fictoan-react 1.8.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.js +5 -5
- package/dist/components/Badge/Badge.js +5 -5
- package/dist/components/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +3 -3
- package/dist/components/Breadcrumbs/Breadcrumbs/Breadcrumbs.js +3 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Callout/Callout.js +3 -3
- package/dist/components/Card/Card.js +3 -3
- package/dist/components/CodeBlock/CodeBlock.js +10 -10
- package/dist/components/Divider/Divider.js +3 -3
- package/dist/components/Drawer/Drawer.js +6 -6
- package/dist/components/Element/Element.js +3 -3
- package/dist/components/Element/Tags.js +3 -3
- package/dist/components/Form/BaseInputComponent/BaseInputComponent.js +6 -6
- package/dist/components/Form/Checkbox/Checkbox.js +3 -3
- package/dist/components/Form/Checkbox/Switch.js +3 -3
- package/dist/components/Form/Form/Form.js +4 -4
- package/dist/components/Form/Form/FormGenerator.js +4 -4
- package/dist/components/Form/FormItem/FormItem.js +3 -3
- package/dist/components/Form/FormItemGroup/FormItemGroup.js +3 -3
- package/dist/components/Form/InputField/FileUpload.js +3 -3
- package/dist/components/Form/InputField/InputField.js +3 -3
- package/dist/components/Form/InputLabel/InputLabel.js +3 -3
- package/dist/components/Form/ListBox/ListBox.js +17 -17
- package/dist/components/Form/PinInputField/PinInputField.js +4 -4
- package/dist/components/Form/RadioButton/RadioButton.js +4 -4
- package/dist/components/Form/RadioButton/RadioGroup.js +5 -5
- package/dist/components/Form/RadioButton/RadioTabGroup.js +5 -5
- package/dist/components/Form/Range/Range.js +3 -3
- package/dist/components/Form/Select/Select.js +6 -6
- package/dist/components/Form/TextArea/TextArea.js +3 -3
- package/dist/components/Meter/Meter.js +10 -10
- package/dist/components/Modal/Modal.js +6 -6
- package/dist/components/Notification/NotificationItem/NotificationItem.js +6 -6
- package/dist/components/Notification/NotificationsWrapper/NotificationsWrapper.js +4 -4
- package/dist/components/OptionCard/OptionCard.js +4 -4
- package/dist/components/Pagination/Pagination.js +14 -14
- package/dist/components/Portion/Portion.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.js +6 -6
- package/dist/components/Row/Row.js +3 -3
- package/dist/components/Sidebar/ContentWrapper/ContentWrapper.js +3 -3
- package/dist/components/Sidebar/SidebarFooter/SidebarFooter.js +3 -3
- package/dist/components/Sidebar/SidebarHeader/SidebarHeader.js +3 -3
- package/dist/components/Sidebar/SidebarItem/SidebarItem.js +4 -4
- package/dist/components/Sidebar/SidebarWrapper/SidebarWrapper.js +3 -3
- package/dist/components/Skeleton/Skeleton.js +6 -6
- package/dist/components/Spinner/Spinner.js +3 -3
- package/dist/components/Table/Table.js +9 -9
- package/dist/components/Table/index.js +1 -3
- package/dist/components/Tabs/Tabs.js +6 -6
- package/dist/components/ThemeProvider/ThemeProvider.js +6 -6
- package/dist/components/Toast/ToastItem/ToastItem.js +3 -3
- package/dist/components/Toast/ToastsWrapper/ToastsWrapper.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +146 -0
- package/dist/components/Tooltip/index.js +6 -0
- package/dist/components/Typography/Heading.js +9 -9
- package/dist/components/Typography/Text.js +3 -3
- package/dist/components/index.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/components/Table/TablePagination/TablePagination.js +0 -31
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import { Text } from "../Typography/Text.js";
|
|
6
|
-
const Accordion =
|
|
6
|
+
const Accordion = React.forwardRef(
|
|
7
7
|
({ summary, children, open = false, ...props }, ref) => {
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ React.createElement(
|
|
9
9
|
Element,
|
|
10
10
|
{
|
|
11
11
|
as: "details",
|
|
@@ -16,7 +16,7 @@ const Accordion = React__default.forwardRef(
|
|
|
16
16
|
role: "region",
|
|
17
17
|
"aria-labelledby": "accordion-summary"
|
|
18
18
|
},
|
|
19
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ React.createElement(
|
|
20
20
|
"summary",
|
|
21
21
|
{
|
|
22
22
|
role: "button",
|
|
@@ -24,7 +24,7 @@ const Accordion = React__default.forwardRef(
|
|
|
24
24
|
"aria-controls": "accordion-content",
|
|
25
25
|
"aria-expanded": open
|
|
26
26
|
},
|
|
27
|
-
typeof summary === "string" ? /* @__PURE__ */
|
|
27
|
+
typeof summary === "string" ? /* @__PURE__ */ React.createElement(Text, { margin: "none" }, summary) : summary
|
|
28
28
|
),
|
|
29
29
|
children
|
|
30
30
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import { Text } from "../Typography/Text.js";
|
|
6
|
-
const Badge =
|
|
6
|
+
const Badge = React.forwardRef(
|
|
7
7
|
({
|
|
8
8
|
children,
|
|
9
9
|
size = "medium",
|
|
@@ -30,7 +30,7 @@ const Badge = React__default.forwardRef(
|
|
|
30
30
|
onDelete == null ? void 0 : onDelete(e);
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ React.createElement(
|
|
34
34
|
Element,
|
|
35
35
|
{
|
|
36
36
|
"data-badge": true,
|
|
@@ -40,8 +40,8 @@ const Badge = React__default.forwardRef(
|
|
|
40
40
|
"aria-label": label || (typeof children === "string" ? children : void 0),
|
|
41
41
|
...props
|
|
42
42
|
},
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
withDelete && /* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ React.createElement(Text, null, children),
|
|
44
|
+
withDelete && /* @__PURE__ */ React.createElement(
|
|
45
45
|
Text,
|
|
46
46
|
{
|
|
47
47
|
className: "dismiss-button",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import "../../Element/Tags.js";
|
|
6
|
-
const BreadcrumbItem =
|
|
6
|
+
const BreadcrumbItem = React.forwardRef(
|
|
7
7
|
({ children, current, ...props }, ref) => {
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ React.createElement(
|
|
9
9
|
Element,
|
|
10
10
|
{
|
|
11
11
|
as: "li",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import "../../Element/Tags.js";
|
|
6
|
-
const Breadcrumbs =
|
|
6
|
+
const Breadcrumbs = React.forwardRef(
|
|
7
7
|
({ children, ...props }, ref) => {
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ React.createElement("nav", { "aria-label": "Breadcrumb", ref, ...props }, /* @__PURE__ */ React.createElement(Element, { as: "ul", "data-breadcrumbs-wrapper": true }, children));
|
|
9
9
|
}
|
|
10
10
|
);
|
|
11
11
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
|
-
const Button =
|
|
5
|
+
const Button = React.forwardRef(
|
|
6
6
|
({ size = "medium", shape, kind, isLoading, hasDelete, label, ...props }, ref) => {
|
|
7
7
|
let classNames = [];
|
|
8
8
|
if (kind) {
|
|
@@ -20,7 +20,7 @@ const Button = React__default.forwardRef(
|
|
|
20
20
|
if (hasDelete) {
|
|
21
21
|
classNames.push("has-delete");
|
|
22
22
|
}
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ React.createElement(
|
|
24
24
|
Element,
|
|
25
25
|
{
|
|
26
26
|
as: "button",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import "../Element/Tags.js";
|
|
6
|
-
const Callout =
|
|
6
|
+
const Callout = React.forwardRef(
|
|
7
7
|
({ kind, children, title, ...props }, ref) => {
|
|
8
8
|
const roleMap = {
|
|
9
9
|
info: "status",
|
|
@@ -11,7 +11,7 @@ const Callout = React__default.forwardRef(
|
|
|
11
11
|
warning: "alert",
|
|
12
12
|
error: "alert"
|
|
13
13
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ React.createElement(
|
|
15
15
|
Element,
|
|
16
16
|
{
|
|
17
17
|
as: "div",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
|
-
const Card =
|
|
5
|
+
const Card = React.forwardRef(({ shape, heading, children, ...props }, ref) => {
|
|
6
6
|
let classNames = [];
|
|
7
7
|
if (shape) {
|
|
8
8
|
classNames.push(`shape-${shape}`);
|
|
9
9
|
}
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ React.createElement(
|
|
11
11
|
Element,
|
|
12
12
|
{
|
|
13
13
|
as: "div",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React$1, { useState } from "react";
|
|
4
4
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs, P as Prism } from "../../prism-3zG3kdoy.js";
|
|
5
5
|
import { Element as Element$1 } from "../Element/Element.js";
|
|
6
6
|
import { Button } from "../Button/Button.js";
|
|
@@ -2013,7 +2013,7 @@ var cjs = StyleToJS;
|
|
|
2013
2013
|
exports.returnFirstArg = exports.canTextBeChildOfNode = exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = exports.PRESERVE_CUSTOM_ATTRIBUTES = void 0;
|
|
2014
2014
|
exports.isCustomComponent = isCustomComponent;
|
|
2015
2015
|
exports.setStyleProp = setStyleProp;
|
|
2016
|
-
var react_12 =
|
|
2016
|
+
var react_12 = React$1;
|
|
2017
2017
|
var style_to_js_1 = __importDefault2(cjs);
|
|
2018
2018
|
var RESERVED_SVG_MATHML_ELEMENTS = /* @__PURE__ */ new Set([
|
|
2019
2019
|
"annotation-xml",
|
|
@@ -2130,7 +2130,7 @@ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || functi
|
|
|
2130
2130
|
};
|
|
2131
2131
|
Object.defineProperty(domToReact$1, "__esModule", { value: true });
|
|
2132
2132
|
domToReact$1.default = domToReact;
|
|
2133
|
-
var react_1 =
|
|
2133
|
+
var react_1 = React$1;
|
|
2134
2134
|
var attributes_to_props_1 = __importDefault(attributesToProps$1);
|
|
2135
2135
|
var utilities_1 = utilities$1;
|
|
2136
2136
|
var React = {
|
|
@@ -2249,7 +2249,7 @@ function skipAttributesToProps(node2) {
|
|
|
2249
2249
|
})(lib$3);
|
|
2250
2250
|
const HTMLReactParser = /* @__PURE__ */ getDefaultExportFromCjs(lib$3);
|
|
2251
2251
|
const parse = HTMLReactParser.default || HTMLReactParser;
|
|
2252
|
-
const CodeBlock =
|
|
2252
|
+
const CodeBlock = React$1.forwardRef(
|
|
2253
2253
|
({
|
|
2254
2254
|
children,
|
|
2255
2255
|
source,
|
|
@@ -2260,7 +2260,7 @@ const CodeBlock = React__default.forwardRef(
|
|
|
2260
2260
|
...props
|
|
2261
2261
|
}, ref) => {
|
|
2262
2262
|
const [isCodeCopied, setIsCodeCopied] = useState(false);
|
|
2263
|
-
let code = typeof children === "string" ? children :
|
|
2263
|
+
let code = typeof children === "string" ? children : React$1.Children.toArray(children).join("");
|
|
2264
2264
|
if (!children) {
|
|
2265
2265
|
code = typeof source === "object" ? JSON.stringify(source, null, 2) : source ?? "";
|
|
2266
2266
|
}
|
|
@@ -2288,7 +2288,7 @@ const CodeBlock = React__default.forwardRef(
|
|
|
2288
2288
|
await copyToClipboard();
|
|
2289
2289
|
}
|
|
2290
2290
|
};
|
|
2291
|
-
return /* @__PURE__ */
|
|
2291
|
+
return /* @__PURE__ */ React$1.createElement(
|
|
2292
2292
|
Element$1,
|
|
2293
2293
|
{
|
|
2294
2294
|
"data-code-block": true,
|
|
@@ -2298,7 +2298,7 @@ const CodeBlock = React__default.forwardRef(
|
|
|
2298
2298
|
"aria-label": description || `Code block in ${language}`,
|
|
2299
2299
|
...props
|
|
2300
2300
|
},
|
|
2301
|
-
showCopyButton ? isCodeCopied ? /* @__PURE__ */
|
|
2301
|
+
showCopyButton ? isCodeCopied ? /* @__PURE__ */ React$1.createElement(
|
|
2302
2302
|
Badge,
|
|
2303
2303
|
{
|
|
2304
2304
|
className: "code-block-copied-badge",
|
|
@@ -2307,7 +2307,7 @@ const CodeBlock = React__default.forwardRef(
|
|
|
2307
2307
|
"aria-live": "polite"
|
|
2308
2308
|
},
|
|
2309
2309
|
"Copied!"
|
|
2310
|
-
) : /* @__PURE__ */
|
|
2310
|
+
) : /* @__PURE__ */ React$1.createElement(
|
|
2311
2311
|
Button,
|
|
2312
2312
|
{
|
|
2313
2313
|
type: "button",
|
|
@@ -2320,7 +2320,7 @@ const CodeBlock = React__default.forwardRef(
|
|
|
2320
2320
|
},
|
|
2321
2321
|
"Copy"
|
|
2322
2322
|
) : null,
|
|
2323
|
-
/* @__PURE__ */
|
|
2323
|
+
/* @__PURE__ */ React$1.createElement(
|
|
2324
2324
|
"pre",
|
|
2325
2325
|
{
|
|
2326
2326
|
ref,
|
|
@@ -2328,7 +2328,7 @@ const CodeBlock = React__default.forwardRef(
|
|
|
2328
2328
|
tabIndex: 0,
|
|
2329
2329
|
"aria-label": `Code in ${language}`
|
|
2330
2330
|
},
|
|
2331
|
-
showLineNumbers && Array.from(Array(lines.length).keys()).map((index) => /* @__PURE__ */
|
|
2331
|
+
showLineNumbers && Array.from(Array(lines.length).keys()).map((index) => /* @__PURE__ */ React$1.createElement(
|
|
2332
2332
|
"span",
|
|
2333
2333
|
{
|
|
2334
2334
|
key: index,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
|
-
const Divider =
|
|
5
|
+
const Divider = React.forwardRef(
|
|
6
6
|
({ kind, height, label, ...props }, ref) => {
|
|
7
7
|
let classNames = [];
|
|
8
8
|
if (kind) {
|
|
9
9
|
classNames.push(kind);
|
|
10
10
|
}
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ React.createElement(
|
|
12
12
|
Element,
|
|
13
13
|
{
|
|
14
14
|
as: "hr",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
4
4
|
import { Element } from "../Element/Element.js";
|
|
5
5
|
import { Div } from "../Element/Tags.js";
|
|
6
6
|
import { u as useClickOutside } from "../../UseClickOutside-CJ5IQE6n.js";
|
|
7
|
-
const Drawer =
|
|
7
|
+
const Drawer = React.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
children,
|
|
10
10
|
openWhen,
|
|
@@ -53,7 +53,7 @@ const Drawer = React__default.forwardRef(
|
|
|
53
53
|
closeDrawer();
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
return shouldRender ? /* @__PURE__ */
|
|
56
|
+
return shouldRender ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
57
57
|
Element,
|
|
58
58
|
{
|
|
59
59
|
as: "div",
|
|
@@ -69,14 +69,14 @@ const Drawer = React__default.forwardRef(
|
|
|
69
69
|
...closeOnClickOutside ? { onClick: closeDrawer } : {},
|
|
70
70
|
...props
|
|
71
71
|
},
|
|
72
|
-
openWhen && showOverlay && /* @__PURE__ */
|
|
72
|
+
openWhen && showOverlay && /* @__PURE__ */ React.createElement(
|
|
73
73
|
Div,
|
|
74
74
|
{
|
|
75
75
|
className: `rest-of-page-overlay ${openWhen ? "visible" : ""}`,
|
|
76
76
|
"aria-hidden": "true"
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ React.createElement(
|
|
80
80
|
Element,
|
|
81
81
|
{
|
|
82
82
|
as: "div",
|
|
@@ -86,7 +86,7 @@ const Drawer = React__default.forwardRef(
|
|
|
86
86
|
bgColour,
|
|
87
87
|
role: "document"
|
|
88
88
|
},
|
|
89
|
-
isDismissible && /* @__PURE__ */
|
|
89
|
+
isDismissible && /* @__PURE__ */ React.createElement(
|
|
90
90
|
"button",
|
|
91
91
|
{
|
|
92
92
|
className: "dismiss-button",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
const createClassName = (classNames) => {
|
|
5
5
|
return classNames.filter((item) => !!item).join(" ");
|
|
6
6
|
};
|
|
7
|
-
const Element =
|
|
7
|
+
const Element = React.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
as: Component = "div",
|
|
10
10
|
role,
|
|
@@ -66,7 +66,7 @@ const Element = React__default.forwardRef(
|
|
|
66
66
|
weight,
|
|
67
67
|
...minimalProps
|
|
68
68
|
} = props;
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ React.createElement(
|
|
70
70
|
Component,
|
|
71
71
|
{
|
|
72
72
|
ref,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "./Element.js";
|
|
5
5
|
const createComponentWithElement = (tagName) => {
|
|
6
|
-
return
|
|
7
|
-
(props, ref) => /* @__PURE__ */
|
|
6
|
+
return React.forwardRef(
|
|
7
|
+
(props, ref) => /* @__PURE__ */ React.createElement(Element, { as: tagName, ref, ...props })
|
|
8
8
|
);
|
|
9
9
|
};
|
|
10
10
|
const Article = createComponentWithElement("article");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { Div } from "../../Element/Tags.js";
|
|
6
6
|
import { InputLabel } from "../InputLabel/InputLabel.js";
|
|
7
7
|
import { FormItem } from "../FormItem/FormItem.js";
|
|
8
|
-
const BaseInputComponent =
|
|
8
|
+
const BaseInputComponent = React.forwardRef(
|
|
9
9
|
({
|
|
10
10
|
as: Component,
|
|
11
11
|
className,
|
|
@@ -15,13 +15,13 @@ const BaseInputComponent = React__default.forwardRef(
|
|
|
15
15
|
validateThis,
|
|
16
16
|
classNames,
|
|
17
17
|
...inputProps
|
|
18
|
-
}, ref) => /* @__PURE__ */
|
|
18
|
+
}, ref) => /* @__PURE__ */ React.createElement(
|
|
19
19
|
FormItem,
|
|
20
20
|
{
|
|
21
21
|
"data-form-item": true,
|
|
22
22
|
required: inputProps.required
|
|
23
23
|
},
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ React.createElement(
|
|
25
25
|
Element,
|
|
26
26
|
{
|
|
27
27
|
as: Component,
|
|
@@ -33,8 +33,8 @@ const BaseInputComponent = React__default.forwardRef(
|
|
|
33
33
|
...inputProps
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
label && /* @__PURE__ */
|
|
37
|
-
(helpText || errorText) && /* @__PURE__ */
|
|
36
|
+
label && /* @__PURE__ */ React.createElement(InputLabel, { label, htmlFor: inputProps.id }),
|
|
37
|
+
(helpText || errorText) && /* @__PURE__ */ React.createElement(Div, { className: "info-section vertically-center-items", marginTop: "nano" }, helpText && /* @__PURE__ */ React.createElement(Element, { as: "span", className: "help-text" }, helpText), errorText && /* @__PURE__ */ React.createElement(Element, { as: "span", className: "error-text" }, errorText))
|
|
38
38
|
)
|
|
39
39
|
);
|
|
40
40
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
6
|
-
const Checkbox =
|
|
7
|
-
return /* @__PURE__ */
|
|
6
|
+
const Checkbox = React.forwardRef(({ ...props }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ React.createElement(Element, { as: "div", "data-checkbox": true, ref }, /* @__PURE__ */ React.createElement(BaseInputComponent, { as: "input", type: "checkbox", ...props }));
|
|
8
8
|
});
|
|
9
9
|
export {
|
|
10
10
|
Checkbox
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
6
|
-
const Switch =
|
|
6
|
+
const Switch = React.forwardRef(
|
|
7
7
|
({ size = "medium", ...props }, ref) => {
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ React.createElement(Element, { as: "div", "data-switch": true, ref, className: `size-${size}` }, /* @__PURE__ */ React.createElement(BaseInputComponent, { as: "input", type: "checkbox", ...props }));
|
|
9
9
|
}
|
|
10
10
|
);
|
|
11
11
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { Callout } from "../../Callout/Callout.js";
|
|
6
6
|
import { generateFormThroughConfig } from "./FormGenerator.js";
|
|
7
|
-
const Form =
|
|
7
|
+
const Form = React.forwardRef(
|
|
8
8
|
({ spacing = "small", fields, onFieldsChange, children, errorText, ...props }, ref) => {
|
|
9
9
|
let classNames = [];
|
|
10
10
|
if (spacing) {
|
|
@@ -13,7 +13,7 @@ const Form = React__default.forwardRef(
|
|
|
13
13
|
if (fields && fields.length > 0) {
|
|
14
14
|
children = [generateFormThroughConfig(fields, onFieldsChange, spacing), children];
|
|
15
15
|
}
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ React.createElement(
|
|
17
17
|
Element,
|
|
18
18
|
{
|
|
19
19
|
as: "form",
|
|
@@ -23,7 +23,7 @@ const Form = React__default.forwardRef(
|
|
|
23
23
|
...props
|
|
24
24
|
},
|
|
25
25
|
children,
|
|
26
|
-
errorText && /* @__PURE__ */
|
|
26
|
+
errorText && /* @__PURE__ */ React.createElement(Callout, { kind: "error" }, errorText)
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
5
|
import { Row } from "../../Row/Row.js";
|
|
6
6
|
import { Portion } from "../../Portion/Portion.js";
|
|
@@ -27,7 +27,7 @@ const FormElements = {
|
|
|
27
27
|
};
|
|
28
28
|
const getFormItem = (formField, onFieldsChange) => {
|
|
29
29
|
const { as: elementName, ...formFieldProps } = formField;
|
|
30
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ React.createElement(
|
|
31
31
|
Element,
|
|
32
32
|
{
|
|
33
33
|
as: FormElements[elementName] || InputField,
|
|
@@ -49,10 +49,10 @@ const generateFormThroughConfig = (fields, onFieldsChange, spacing) => {
|
|
|
49
49
|
isHorizontal
|
|
50
50
|
};
|
|
51
51
|
formChildren.push(
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ React.createElement(Portion, { ...portionProps, key: `fields-${i}` }, getFormItem(formField, onFieldsChange))
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ React.createElement(Row, { gutters: spacing }, formChildren);
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
58
|
generateFormThroughConfig
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
|
-
const FormItem =
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
const FormItem = React.forwardRef(({ ...props }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ React.createElement(
|
|
7
7
|
Element,
|
|
8
8
|
{
|
|
9
9
|
as: "div",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
|
-
const FormItemGroup =
|
|
5
|
+
const FormItemGroup = React.forwardRef(
|
|
6
6
|
({
|
|
7
7
|
isJoint,
|
|
8
8
|
retainLayout,
|
|
@@ -19,7 +19,7 @@ const FormItemGroup = React__default.forwardRef(
|
|
|
19
19
|
if (retainLayout) {
|
|
20
20
|
classNames.push("retain-layout");
|
|
21
21
|
}
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ React.createElement(
|
|
23
23
|
Element,
|
|
24
24
|
{
|
|
25
25
|
as: "div",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { InputField } from "./InputField.js";
|
|
5
|
-
const FileUpload =
|
|
5
|
+
const FileUpload = React.forwardRef(
|
|
6
6
|
({
|
|
7
7
|
accept,
|
|
8
8
|
multiple,
|
|
@@ -11,7 +11,7 @@ const FileUpload = React__default.forwardRef(
|
|
|
11
11
|
label,
|
|
12
12
|
...props
|
|
13
13
|
}, ref) => {
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ React.createElement(
|
|
15
15
|
InputField,
|
|
16
16
|
{
|
|
17
17
|
type: "file",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { BaseInputComponent } from "../BaseInputComponent/BaseInputComponent.js";
|
|
5
|
-
const InputField =
|
|
5
|
+
const InputField = React.forwardRef(
|
|
6
6
|
({
|
|
7
7
|
"aria-label": ariaLabel,
|
|
8
8
|
"aria-invalid": ariaInvalid,
|
|
9
9
|
...props
|
|
10
10
|
}, ref) => {
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ React.createElement(
|
|
12
12
|
BaseInputComponent,
|
|
13
13
|
{
|
|
14
14
|
as: "input",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Element } from "../../Element/Element.js";
|
|
5
|
-
const InputLabel =
|
|
5
|
+
const InputLabel = React.forwardRef(
|
|
6
6
|
({
|
|
7
7
|
label,
|
|
8
8
|
hideLabel,
|
|
@@ -13,7 +13,7 @@ const InputLabel = React__default.forwardRef(
|
|
|
13
13
|
if (hideLabel) {
|
|
14
14
|
classNames.push("visually-hidden");
|
|
15
15
|
}
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ React.createElement(
|
|
17
17
|
Element,
|
|
18
18
|
{
|
|
19
19
|
as: "label",
|