@react-form-builder/components-rsuite 7.7.0 → 7.8.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/InputCell-f4236002.js +21 -0
- package/dist/InputCell-f4236002.js.map +1 -0
- package/dist/Labeled-751c2353.js +35 -0
- package/dist/Labeled-751c2353.js.map +1 -0
- package/dist/WrappedInput-bc5a6d33.js +11 -0
- package/dist/WrappedInput-bc5a6d33.js.map +1 -0
- package/dist/autocomplete.d.ts +30 -0
- package/dist/autocomplete.js +62 -0
- package/dist/autocomplete.js.map +1 -0
- package/dist/breadcrumb.d.ts +38 -0
- package/dist/breadcrumb.js +42 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/builder-view-with-css.d.ts +9 -0
- package/dist/builder-view-with-css.js +66 -0
- package/dist/builder-view-with-css.js.map +1 -0
- package/dist/button.d.ts +6 -0
- package/dist/button.js +23 -0
- package/dist/button.js.map +1 -0
- package/dist/calendar.d.ts +20 -0
- package/dist/calendar.js +24 -0
- package/dist/calendar.js.map +1 -0
- package/dist/card.d.ts +20 -0
- package/dist/card.js +30 -0
- package/dist/card.js.map +1 -0
- package/dist/categories-7064b279.js +8 -0
- package/dist/categories-7064b279.js.map +1 -0
- package/dist/checkbox.d.ts +6 -0
- package/dist/checkbox.js +36 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/commonProperties-d849cd5b.js +74 -0
- package/dist/commonProperties-d849cd5b.js.map +1 -0
- package/dist/components-descriptions.d.ts +6 -0
- package/dist/components-descriptions.js +5 -0
- package/dist/components-descriptions.js.map +1 -0
- package/dist/container.d.ts +25 -0
- package/dist/container.js +23 -0
- package/dist/container.js.map +1 -0
- package/dist/css/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/css/rsuite-no-reset.min.css +1 -1
- package/dist/css-loader.d.ts +19 -0
- package/dist/css-loader.js +20 -0
- package/dist/css-loader.js.map +1 -0
- package/dist/date-picker.d.ts +25 -0
- package/dist/date-picker.js +75 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/dateTimeUtils-b07ce438.js +26 -0
- package/dist/dateTimeUtils-b07ce438.js.map +1 -0
- package/dist/definitions.d.ts +5 -0
- package/dist/definitions.js +59 -0
- package/dist/definitions.js.map +1 -0
- package/dist/divider.d.ts +11 -0
- package/dist/divider.js +12 -0
- package/dist/divider.js.map +1 -0
- package/dist/dropdown.d.ts +58 -0
- package/dist/dropdown.js +57 -0
- package/dist/dropdown.js.map +1 -0
- package/dist/error-message.d.ts +20 -0
- package/dist/error-message.js +28 -0
- package/dist/error-message.js.map +1 -0
- package/dist/header.d.ts +69 -0
- package/dist/header.js +20 -0
- package/dist/header.js.map +1 -0
- package/dist/hooks-ff273a8a.js +53 -0
- package/dist/hooks-ff273a8a.js.map +1 -0
- package/dist/image.d.ts +22 -0
- package/dist/image.js +41 -0
- package/dist/image.js.map +1 -0
- package/dist/images/logo.svg +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +116 -19516
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +32 -0
- package/dist/input.js +28 -0
- package/dist/input.js.map +1 -0
- package/dist/label.d.ts +47 -0
- package/dist/label.js +16 -0
- package/dist/label.js.map +1 -0
- package/dist/link.d.ts +56 -0
- package/dist/link.js +20 -0
- package/dist/link.js.map +1 -0
- package/dist/localization-wrapper.d.ts +164 -0
- package/dist/localization-wrapper.js +246 -0
- package/dist/localization-wrapper.js.map +1 -0
- package/dist/menu.d.ts +35 -0
- package/dist/menu.js +50 -0
- package/dist/menu.js.map +1 -0
- package/dist/message.d.ts +16 -0
- package/dist/message.js +18 -0
- package/dist/message.js.map +1 -0
- package/dist/modal-layout.d.ts +28 -0
- package/dist/modal-layout.js +21 -0
- package/dist/modal-layout.js.map +1 -0
- package/dist/modal.d.ts +16 -0
- package/dist/modal.js +27 -0
- package/dist/modal.js.map +1 -0
- package/dist/models.d.ts +8 -0
- package/dist/models.js +60 -0
- package/dist/models.js.map +1 -0
- package/dist/number-format.d.ts +25 -0
- package/dist/number-format.js +53 -0
- package/dist/number-format.js.map +1 -0
- package/dist/pattern-format.d.ts +25 -0
- package/dist/pattern-format.js +39 -0
- package/dist/pattern-format.js.map +1 -0
- package/dist/placeholder.d.ts +17 -0
- package/dist/placeholder.js +38 -0
- package/dist/placeholder.js.map +1 -0
- package/dist/progress.d.ts +14 -0
- package/dist/progress.js +27 -0
- package/dist/progress.js.map +1 -0
- package/dist/r-suite-components.d.ts +8 -0
- package/dist/r-suite-components.js +115 -0
- package/dist/r-suite-components.js.map +1 -0
- package/dist/rSuiteComponentsDescriptions-d616cdc1.js +17911 -0
- package/dist/rSuiteComponentsDescriptions-d616cdc1.js.map +1 -0
- package/dist/radio-group.d.ts +26 -0
- package/dist/radio-group.js +24 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/rsuite-no-reset-rtl.min-af106e5c.js +5 -0
- package/dist/rsuite-no-reset-rtl.min-af106e5c.js.map +1 -0
- package/dist/rsuite-no-reset.min-3caeeea0.js +5 -0
- package/dist/rsuite-no-reset.min-3caeeea0.js.map +1 -0
- package/dist/search.d.ts +54 -0
- package/dist/search.js +60 -0
- package/dist/search.js.map +1 -0
- package/dist/static-content.d.ts +19 -0
- package/dist/static-content.js +15 -0
- package/dist/static-content.js.map +1 -0
- package/dist/tab.d.ts +39 -0
- package/dist/tab.js +59 -0
- package/dist/tab.js.map +1 -0
- package/dist/tag-picker.d.ts +21 -0
- package/dist/tag-picker.js +42 -0
- package/dist/tag-picker.js.map +1 -0
- package/dist/text-area.d.ts +24 -0
- package/dist/text-area.js +24 -0
- package/dist/text-area.js.map +1 -0
- package/dist/time-picker.d.ts +29 -0
- package/dist/time-picker.js +74 -0
- package/dist/time-picker.js.map +1 -0
- package/dist/toggle.d.ts +16 -0
- package/dist/toggle.js +29 -0
- package/dist/toggle.js.map +1 -0
- package/dist/tooltip.d.ts +29 -0
- package/dist/tooltip.js +37 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/uploader.d.ts +20 -0
- package/dist/uploader.js +70 -0
- package/dist/uploader.js.map +1 -0
- package/dist/useTouchOnEvent-2be3c60d.js +12 -0
- package/dist/useTouchOnEvent-2be3c60d.js.map +1 -0
- package/dist/view-with-css.d.ts +9 -0
- package/dist/view-with-css.js +66 -0
- package/dist/view-with-css.js.map +1 -0
- package/dist/view.d.ts +8 -0
- package/dist/view.js +61 -0
- package/dist/view.js.map +1 -0
- package/dist/wizard.d.ts +88 -0
- package/dist/wizard.js +294 -0
- package/dist/wizard.js.map +1 -0
- package/package.json +191 -5
- package/dist/images/logo.png +0 -0
- package/dist/rsuite-no-reset-rtl.min-f9b04ca7.js +0 -5
- package/dist/rsuite-no-reset-rtl.min-f9b04ca7.js.map +0 -1
- package/dist/rsuite-no-reset.min-12eea714.js +0 -5
- package/dist/rsuite-no-reset.min-12eea714.js.map +0 -1
package/dist/menu.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import type { ElementType } from 'react';
|
|
3
|
+
import type { NavProps } from 'rsuite';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Menu item for RsMenu component.
|
|
7
|
+
*/
|
|
8
|
+
export declare type MenuItem = {
|
|
9
|
+
/**
|
|
10
|
+
* The href for the menu item.
|
|
11
|
+
*/
|
|
12
|
+
href?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The title for the menu item.
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export declare const rsMenu: Definer<RsMenuProps>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Props for the RsMenu component.
|
|
23
|
+
*/
|
|
24
|
+
export declare interface RsMenuProps extends NavProps {
|
|
25
|
+
/**
|
|
26
|
+
* The items for the menu.
|
|
27
|
+
*/
|
|
28
|
+
items?: MenuItem[];
|
|
29
|
+
/**
|
|
30
|
+
* The element type for menu items.
|
|
31
|
+
*/
|
|
32
|
+
itemsAs: ElementType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { }
|
package/dist/menu.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { define as f, oneOf as d, array as h, useComponentData as v } from "@react-form-builder/core";
|
|
3
|
+
import { useCallback as y } from "react";
|
|
4
|
+
import { Nav as i } from "rsuite";
|
|
5
|
+
import { n as b } from "./commonProperties-d849cd5b.js";
|
|
6
|
+
import { s as P } from "./categories-7064b279.js";
|
|
7
|
+
import { I as p } from "./InputCell-f4236002.js";
|
|
8
|
+
import "@emotion/styled";
|
|
9
|
+
const g = (t) => t.map((e) => ({ title: e, href: `#${e}` })), w = /* @__PURE__ */ new Set([
|
|
10
|
+
"a",
|
|
11
|
+
"button",
|
|
12
|
+
"div",
|
|
13
|
+
"span",
|
|
14
|
+
"h1",
|
|
15
|
+
"h2",
|
|
16
|
+
"h3",
|
|
17
|
+
"h4",
|
|
18
|
+
"h5",
|
|
19
|
+
"h6",
|
|
20
|
+
"p",
|
|
21
|
+
"b",
|
|
22
|
+
"em",
|
|
23
|
+
"i",
|
|
24
|
+
"q",
|
|
25
|
+
"s",
|
|
26
|
+
"u",
|
|
27
|
+
"input",
|
|
28
|
+
"label",
|
|
29
|
+
"section",
|
|
30
|
+
"article",
|
|
31
|
+
"nav",
|
|
32
|
+
"pre"
|
|
33
|
+
]), C = ({ onSelect: t, items: e, itemsAs: u, ...s }) => {
|
|
34
|
+
const a = v(), c = y((r, o) => {
|
|
35
|
+
a.userDefinedProps ?? (a.userDefinedProps = {}), a.userDefinedProps.activeKey = r, t == null || t(r, o);
|
|
36
|
+
}, [a, t]);
|
|
37
|
+
return e != null && e.length ? /* @__PURE__ */ n(i, { onSelect: c, ...s, children: e.map(({ title: r, href: o }, l) => /* @__PURE__ */ n(i.Item, { href: o, as: u, eventKey: r, active: r === s.activeKey, children: r }, l)) }) : null;
|
|
38
|
+
}, I = [
|
|
39
|
+
{ name: "title", input: p },
|
|
40
|
+
{ name: "href", title: "Url", input: p }
|
|
41
|
+
], { activeKey: K, ...M } = b, m = [...w], q = f(C, "RsMenu").name("Menu").category(P).props({
|
|
42
|
+
activeKey: K.default("Home"),
|
|
43
|
+
...M,
|
|
44
|
+
itemsAs: d(...m).labeled(...m).default("a").withEditorProps({ creatable: !1 }),
|
|
45
|
+
items: h.default(g(["Home", "News", "Products"])).withEditorProps({ columns: I })
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
q as rsMenu
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=menu.js.map
|
package/dist/menu.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","sources":["../src/components/RsMenu.tsx"],"sourcesContent":["import {array, define, oneOf, useComponentData} from '@react-form-builder/core'\nimport type {ElementType, SyntheticEvent} from 'react'\nimport {useCallback} from 'react'\nimport type {NavProps} from 'rsuite'\nimport {Nav} from 'rsuite'\nimport {navProps} from '../commonProperties'\nimport {staticCategory} from './categories'\nimport {InputCell} from './internal/InputCell'\n\n/**\n * Menu item for RsMenu component.\n */\nexport type MenuItem = {\n /**\n * The href for the menu item.\n */\n href?: string\n /**\n * The title for the menu item.\n */\n title?: string\n}\n\nconst makeItems = (data: string[]) => data.map(title => ({title, href: `#${title}`}))\n\nconst suitableReactElementTypes = new Set([\n 'a',\n 'button',\n 'div',\n 'span',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'p',\n 'b',\n 'em',\n 'i',\n 'q',\n 's',\n 'u',\n 'input',\n 'label',\n 'section',\n 'article',\n 'nav',\n 'pre'\n])\n\n/**\n * Props for the RsMenu component.\n */\nexport interface RsMenuProps extends NavProps {\n /**\n * The items for the menu.\n */\n items?: MenuItem[],\n /**\n * The element type for menu items.\n */\n itemsAs: ElementType\n}\n\n/**\n * Menu component with navigation support.\n * @param props the component props.\n * @param props.onSelect the callback when menu item is selected.\n * @param props.items the items for the menu.\n * @param props.itemsAs the element type for menu items.\n * @param props.props the additional menu props.\n * @returns the React element.\n */\nconst RsMenu = ({onSelect, items, itemsAs, ...props}: RsMenuProps) => {\n const componentData = useComponentData()\n\n const onNavSelect: NavProps['onSelect'] = useCallback((eventKey: any, event: SyntheticEvent) => {\n componentData.userDefinedProps ??= {}\n componentData.userDefinedProps.activeKey = eventKey\n onSelect?.(eventKey, event)\n }, [componentData, onSelect])\n\n if (!items?.length) return null\n\n return <Nav onSelect={onNavSelect} {...props}>\n {items.map(({title, href}, index) =>\n <Nav.Item key={index} href={href} as={itemsAs} eventKey={title} active={title === props.activeKey}>\n {title}\n </Nav.Item>)\n }\n </Nav>\n}\n\nconst columns = [\n {name: 'title', input: InputCell},\n {name: 'href', title: 'Url', input: InputCell}\n] as const\n\nconst {activeKey, ...props} = navProps\n\nconst tags = [...suitableReactElementTypes]\n\nexport const rsMenu = define(RsMenu, 'RsMenu')\n .name('Menu')\n .category(staticCategory)\n .props({\n activeKey: activeKey.default('Home'),\n ...props,\n itemsAs: oneOf(...tags)\n .labeled(...tags)\n .default('a')\n .withEditorProps({creatable: false}),\n items: array\n .default(makeItems(['Home', 'News', 'Products']))\n .withEditorProps({columns}),\n })\n"],"names":["makeItems","data","title","suitableReactElementTypes","RsMenu","onSelect","items","itemsAs","props","componentData","useComponentData","onNavSelect","useCallback","eventKey","event","jsx","Nav","href","index","columns","InputCell","activeKey","navProps","tags","rsMenu","define","staticCategory","oneOf","array"],"mappings":";;;;;;;;AAuBA,MAAMA,IAAY,CAACC,MAAmBA,EAAK,IAAI,CAAAC,OAAU,EAAC,OAAAA,GAAO,MAAM,IAAIA,CAAK,GAAA,EAAI,GAE9EC,wBAAgC,IAAI;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAyBKC,IAAS,CAAC,EAAC,UAAAC,GAAU,OAAAC,GAAO,SAAAC,GAAS,GAAGC,QAAwB;AACpE,QAAMC,IAAgBC,KAEhBC,IAAoCC,EAAY,CAACC,GAAeC,MAA0B;AAC9F,IAAAL,EAAc,qBAAdA,EAAc,mBAAqB,KACnCA,EAAc,iBAAiB,YAAYI,GAC3CR,KAAA,QAAAA,EAAWQ,GAAUC;AAAA,EAAK,GACzB,CAACL,GAAeJ,CAAQ,CAAC;AAE5B,SAAKC,KAAA,QAAAA,EAAO,SAEJ,gBAAAS,EAAAC,GAAA,EAAI,UAAUL,GAAc,GAAGH,GACpC,UAAMF,EAAA,IAAI,CAAC,EAAC,OAAAJ,GAAO,MAAAe,KAAOC,MACzB,gBAAAH,EAACC,EAAI,MAAJ,EAAqB,MAAAC,GAAY,IAAIV,GAAS,UAAUL,GAAO,QAAQA,MAAUM,EAAM,WACrF,UADYN,EAAA,GAAAgB,CAEf,CAAW,EAEf,CAAA,IAR2B;AAS7B,GAEMC,IAAU;AAAA,EACd,EAAC,MAAM,SAAS,OAAOC,EAAS;AAAA,EAChC,EAAC,MAAM,QAAQ,OAAO,OAAO,OAAOA,EAAS;AAC/C,GAEM,EAAC,WAAAC,GAAW,GAAGb,EAAS,IAAAc,GAExBC,IAAO,CAAC,GAAGpB,CAAyB,GAE7BqB,IAASC,EAAOrB,GAAQ,QAAQ,EAC1C,KAAK,MAAM,EACX,SAASsB,CAAc,EACvB,MAAM;AAAA,EACL,WAAWL,EAAU,QAAQ,MAAM;AAAA,EACnC,GAAGb;AAAA,EACH,SAASmB,EAAM,GAAGJ,CAAI,EACnB,QAAQ,GAAGA,CAAI,EACf,QAAQ,GAAG,EACX,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,OAAOK,EACJ,QAAQ5B,EAAU,CAAC,QAAQ,QAAQ,UAAU,CAAC,CAAC,EAC/C,gBAAgB,EAAC,SAAAmB,GAAQ;AAC9B,CAAC;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { JSX } from 'react';
|
|
4
|
+
import { MessageProps } from 'rsuite';
|
|
5
|
+
import { Omit as Omit_2 } from 'rsuite/esm/internals/types/utils';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
import { Theme } from '@emotion/react';
|
|
8
|
+
import { WithAsProps } from 'rsuite/esm/internals/types';
|
|
9
|
+
|
|
10
|
+
export declare const rsMessage: Definer<Omit_2<any, WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & MessageProps> & WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & MessageProps & {
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
} & {
|
|
13
|
+
theme?: Theme | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export { }
|
package/dist/message.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import s from "@emotion/styled";
|
|
2
|
+
import { define as o, node as e, boolean as r, oneOf as a } from "@react-form-builder/core";
|
|
3
|
+
import { Message as t } from "rsuite";
|
|
4
|
+
import { s as i } from "./categories-7064b279.js";
|
|
5
|
+
const f = s(t)`
|
|
6
|
+
.rs-message-header {
|
|
7
|
+
overflow: initial;
|
|
8
|
+
}
|
|
9
|
+
`, d = o(f, "RsMessage").name("Message").category(i).props({
|
|
10
|
+
children: e,
|
|
11
|
+
closable: r.default(!1),
|
|
12
|
+
header: e,
|
|
13
|
+
type: a("info", "success", "warning", "error").default("info").withEditorProps({ creatable: !1 })
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
d as rsMessage
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","sources":["../src/components/RsMessage.tsx"],"sourcesContent":["import styled from '@emotion/styled'\nimport {boolean, define, node, oneOf} from '@react-form-builder/core'\nimport {Message} from 'rsuite'\nimport {staticCategory} from './categories'\n\nconst SMessage = styled(Message)`\n .rs-message-header {\n overflow: initial;\n }\n`\n\nexport const rsMessage = define(SMessage, 'RsMessage')\n .name('Message')\n .category(staticCategory)\n .props({\n children: node,\n closable: boolean.default(false),\n header: node,\n type: oneOf('info', 'success', 'warning', 'error').default('info')\n .withEditorProps({creatable: false})\n })\n"],"names":["SMessage","styled","Message","rsMessage","define","staticCategory","node","boolean","oneOf"],"mappings":";;;;AAKA,MAAMA,IAAWC,EAAOC,CAAO;AAAA;AAAA;AAAA;AAAA,GAMlBC,IAAYC,EAAOJ,GAAU,WAAW,EAClD,KAAK,SAAS,EACd,SAASK,CAAc,EACvB,MAAM;AAAA,EACL,UAAUC;AAAA,EACV,UAAUC,EAAQ,QAAQ,EAAK;AAAA,EAC/B,QAAQD;AAAA,EACR,MAAME,EAAM,QAAQ,WAAW,WAAW,OAAO,EAAE,QAAQ,MAAM,EAC9D,gBAAgB,EAAC,WAAW,IAAM;AACvC,CAAC;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const rsModalLayout: Definer<RsModalLayoutProps>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Props for the RsModalLayout component.
|
|
8
|
+
*/
|
|
9
|
+
export declare interface RsModalLayoutProps {
|
|
10
|
+
/**
|
|
11
|
+
* Whether to show the close button.
|
|
12
|
+
*/
|
|
13
|
+
closeButton: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The title for the modal header.
|
|
16
|
+
*/
|
|
17
|
+
headerTitle: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The content for the modal body.
|
|
20
|
+
*/
|
|
21
|
+
body: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* The content for the modal footer.
|
|
24
|
+
*/
|
|
25
|
+
footer: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as s, jsx as o } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { define as i, boolean as c, node as e } from "@react-form-builder/core";
|
|
3
|
+
import { Modal as m } from "rsuite";
|
|
4
|
+
import { m as u } from "./categories-7064b279.js";
|
|
5
|
+
const { Header: y, Title: f, Body: h, Footer: p } = m, M = (t) => {
|
|
6
|
+
const { closeButton: r, headerTitle: d, body: a, footer: l, ...n } = t;
|
|
7
|
+
return /* @__PURE__ */ s("div", { ...n, children: [
|
|
8
|
+
/* @__PURE__ */ o(y, { closeButton: r, children: /* @__PURE__ */ o(f, { children: d }) }),
|
|
9
|
+
/* @__PURE__ */ o(h, { children: a }),
|
|
10
|
+
/* @__PURE__ */ o(p, { children: l })
|
|
11
|
+
] });
|
|
12
|
+
}, T = i(M, "RsModalLayout").name("Modal layout").category(u).props({
|
|
13
|
+
closeButton: c.default(!0),
|
|
14
|
+
headerTitle: e,
|
|
15
|
+
body: e,
|
|
16
|
+
footer: e
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
T as rsModalLayout
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=modal-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-layout.js","sources":["../src/components/RsModalLayout.tsx"],"sourcesContent":["import {boolean, define, node} from '@react-form-builder/core'\nimport type {ReactNode} from 'react'\nimport {Modal} from 'rsuite'\nimport {modalCategory} from './categories'\n\nconst {Header, Title, Body, Footer} = Modal\n\n/**\n * Props for the RsModalLayout component.\n */\nexport interface RsModalLayoutProps {\n /**\n * Whether to show the close button.\n */\n closeButton: boolean,\n /**\n * The title for the modal header.\n */\n headerTitle: ReactNode,\n /**\n * The content for the modal body.\n */\n body: ReactNode,\n /**\n * The content for the modal footer.\n */\n footer: ReactNode,\n}\n\n/**\n * Modal layout component with header, body and footer sections.\n * @param props the component props.\n * @returns the React element.\n */\nconst RsModalLayout = (props: RsModalLayoutProps) => {\n const {closeButton, headerTitle, body, footer, ...rest} = props\n return <div {...rest}>\n <Header closeButton={closeButton}>\n <Title>\n {headerTitle}\n </Title>\n </Header>\n <Body>\n {body}\n </Body>\n <Footer>\n {footer}\n </Footer>\n </div>\n}\n\nexport const rsModalLayout = define(RsModalLayout, 'RsModalLayout')\n .name('Modal layout')\n .category(modalCategory)\n .props({\n closeButton: boolean.default(true),\n headerTitle: node,\n body: node,\n footer: node,\n })\n"],"names":["Header","Title","Body","Footer","Modal","RsModalLayout","props","closeButton","headerTitle","body","footer","rest","jsxs","jsx","rsModalLayout","define","modalCategory","boolean","node"],"mappings":";;;;AAKA,MAAM,EAAC,QAAAA,GAAQ,OAAAC,GAAO,MAAAC,GAAM,QAAAC,MAAUC,GA6BhCC,IAAgB,CAACC,MAA8B;AACnD,QAAM,EAAC,aAAAC,GAAa,aAAAC,GAAa,MAAAC,GAAM,QAAAC,GAAQ,GAAGC,EAAQ,IAAAL;AACnD,SAAA,gBAAAM,EAAC,OAAK,EAAA,GAAGD,GACd,UAAA;AAAA,IAAA,gBAAAE,EAACb,GAAO,EAAA,aAAAO,GACN,UAAC,gBAAAM,EAAAZ,GAAA,EACE,YACH,CAAA,GACF;AAAA,IACA,gBAAAY,EAACX,KACE,UACHO,EAAA,CAAA;AAAA,IACA,gBAAAI,EAACV,KACE,UACHO,EAAA,CAAA;AAAA,EACF,EAAA,CAAA;AACF,GAEaI,IAAgBC,EAAOV,GAAe,eAAe,EAC/D,KAAK,cAAc,EACnB,SAASW,CAAa,EACtB,MAAM;AAAA,EACL,aAAaC,EAAQ,QAAQ,EAAI;AAAA,EACjC,aAAaC;AAAA,EACb,MAAMA;AAAA,EACN,QAAQA;AACV,CAAC;"}
|
package/dist/modal.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import type { ModalProps } from 'rsuite';
|
|
3
|
+
|
|
4
|
+
export declare const rsModal: Definer<RsModalProps>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Props for the RsModal component.
|
|
8
|
+
*/
|
|
9
|
+
export declare interface RsModalProps extends ModalProps {
|
|
10
|
+
/**
|
|
11
|
+
* Custom close handler function.
|
|
12
|
+
*/
|
|
13
|
+
handleClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { }
|
package/dist/modal.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as u } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { oneOf as f, define as c, boolean as o, string as l, event as r } from "@react-form-builder/core";
|
|
3
|
+
import { useCallback as i } from "react";
|
|
4
|
+
import { Modal as p } from "rsuite";
|
|
5
|
+
import { m as b } from "./categories-7064b279.js";
|
|
6
|
+
const g = (t) => {
|
|
7
|
+
const { children: s, handleClose: e, onClose: a, ...m } = t, d = i((n) => {
|
|
8
|
+
e == null || e(), a == null || a(n);
|
|
9
|
+
}, [e, a]);
|
|
10
|
+
return /* @__PURE__ */ u(p, { ...m, onClose: d, children: s });
|
|
11
|
+
}, M = f("xs", "sm", "md", "lg", "full").labeled("Extra small", "Small", "Medium", "Large", "Full").default("md"), R = c(g, "RsModal").name("Modal").category(b).props({
|
|
12
|
+
autoFocus: o.default(!0),
|
|
13
|
+
backdrop: o.default(!0),
|
|
14
|
+
backdropClassName: l,
|
|
15
|
+
classPrefix: l,
|
|
16
|
+
dialogClassName: l,
|
|
17
|
+
enforceFocus: o.default(!0),
|
|
18
|
+
keyboard: o.default(!0),
|
|
19
|
+
overflow: o.default(!0),
|
|
20
|
+
size: M,
|
|
21
|
+
onOpen: r,
|
|
22
|
+
onClose: r
|
|
23
|
+
}).componentRole("modal").hideFromComponentPalette();
|
|
24
|
+
export {
|
|
25
|
+
R as rsModal
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../src/components/RsModal.tsx"],"sourcesContent":["import {boolean, define, event, oneOf, string} from '@react-form-builder/core'\nimport type {SyntheticEvent} from 'react'\nimport {useCallback} from 'react'\nimport type {ModalProps} from 'rsuite'\nimport {Modal} from 'rsuite'\nimport {modalCategory} from './categories'\n\n/**\n * Props for the RsModal component.\n */\nexport interface RsModalProps extends ModalProps {\n /**\n * Custom close handler function.\n */\n handleClose?: () => void\n}\n\n/**\n * A modal component that displays content in an overlay dialog.\n * @param props the component props.\n * @returns the React element.\n */\nconst RsModal = (props: RsModalProps) => {\n const {children, handleClose, onClose, ...rest} = props\n\n const close = useCallback((e: SyntheticEvent) => {\n handleClose?.()\n onClose?.(e)\n }, [handleClose, onClose])\n\n return <Modal {...rest} onClose={close}>\n {children}\n </Modal>\n}\n\nconst modalSize = oneOf('xs', 'sm', 'md', 'lg', 'full')\n .labeled('Extra small', 'Small', 'Medium', 'Large', 'Full')\n .default('md')\n\nexport const rsModal = define(RsModal, 'RsModal')\n .name('Modal')\n .category(modalCategory)\n .props({\n autoFocus: boolean.default(true),\n backdrop: boolean.default(true),\n backdropClassName: string,\n classPrefix: string,\n dialogClassName: string,\n enforceFocus: boolean.default(true),\n keyboard: boolean.default(true),\n overflow: boolean.default(true),\n size: modalSize,\n onOpen: event,\n onClose: event,\n })\n .componentRole('modal')\n .hideFromComponentPalette()\n"],"names":["RsModal","props","children","handleClose","onClose","rest","close","useCallback","e","Modal","modalSize","oneOf","rsModal","define","modalCategory","boolean","string","event"],"mappings":";;;;;AAsBA,MAAMA,IAAU,CAACC,MAAwB;AACvC,QAAM,EAAC,UAAAC,GAAU,aAAAC,GAAa,SAAAC,GAAS,GAAGC,EAAQ,IAAAJ,GAE5CK,IAAQC,EAAY,CAACC,MAAsB;AACjC,IAAAL,KAAA,QAAAA,KACdC,KAAA,QAAAA,EAAUI;AAAA,EAAC,GACV,CAACL,GAAaC,CAAO,CAAC;AAEzB,2BAAQK,GAAO,EAAA,GAAGJ,GAAM,SAASC,GAC9B,UAAAJ,EACH,CAAA;AACF,GAEMQ,IAAYC,EAAM,MAAM,MAAM,MAAM,MAAM,MAAM,EACnD,QAAQ,eAAe,SAAS,UAAU,SAAS,MAAM,EACzD,QAAQ,IAAI,GAEFC,IAAUC,EAAOb,GAAS,SAAS,EAC7C,KAAK,OAAO,EACZ,SAASc,CAAa,EACtB,MAAM;AAAA,EACL,WAAWC,EAAQ,QAAQ,EAAI;AAAA,EAC/B,UAAUA,EAAQ,QAAQ,EAAI;AAAA,EAC9B,mBAAmBC;AAAA,EACnB,aAAaA;AAAA,EACb,iBAAiBA;AAAA,EACjB,cAAcD,EAAQ,QAAQ,EAAI;AAAA,EAClC,UAAUA,EAAQ,QAAQ,EAAI;AAAA,EAC9B,UAAUA,EAAQ,QAAQ,EAAI;AAAA,EAC9B,MAAML;AAAA,EACN,QAAQO;AAAA,EACR,SAASA;AACX,CAAC,EACA,cAAc,OAAO,EACrB,yBAAyB;"}
|
package/dist/models.d.ts
ADDED
package/dist/models.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { components as m } from "./definitions.js";
|
|
2
|
+
import "./r-suite-components.js";
|
|
3
|
+
import "./categories-7064b279.js";
|
|
4
|
+
import "./wizard.js";
|
|
5
|
+
import "@emotion/react/jsx-runtime";
|
|
6
|
+
import "@emotion/css";
|
|
7
|
+
import "@emotion/styled";
|
|
8
|
+
import "@react-form-builder/core";
|
|
9
|
+
import "react";
|
|
10
|
+
import "rsuite";
|
|
11
|
+
import "./hooks-ff273a8a.js";
|
|
12
|
+
import "./InputCell-f4236002.js";
|
|
13
|
+
import "./autocomplete.js";
|
|
14
|
+
import "./commonProperties-d849cd5b.js";
|
|
15
|
+
import "./Labeled-751c2353.js";
|
|
16
|
+
import "@emotion/react";
|
|
17
|
+
import "./breadcrumb.js";
|
|
18
|
+
import "./button.js";
|
|
19
|
+
import "./calendar.js";
|
|
20
|
+
import "./card.js";
|
|
21
|
+
import "./header.js";
|
|
22
|
+
import "./checkbox.js";
|
|
23
|
+
import "./container.js";
|
|
24
|
+
import "./date-picker.js";
|
|
25
|
+
import "./dateTimeUtils-b07ce438.js";
|
|
26
|
+
import "date-fns";
|
|
27
|
+
import "./useTouchOnEvent-2be3c60d.js";
|
|
28
|
+
import "./divider.js";
|
|
29
|
+
import "./dropdown.js";
|
|
30
|
+
import "./error-message.js";
|
|
31
|
+
import "./image.js";
|
|
32
|
+
import "./input.js";
|
|
33
|
+
import "@rsuite/icons";
|
|
34
|
+
import "./label.js";
|
|
35
|
+
import "./link.js";
|
|
36
|
+
import "./menu.js";
|
|
37
|
+
import "./message.js";
|
|
38
|
+
import "./modal.js";
|
|
39
|
+
import "./modal-layout.js";
|
|
40
|
+
import "./number-format.js";
|
|
41
|
+
import "react-number-format";
|
|
42
|
+
import "./WrappedInput-bc5a6d33.js";
|
|
43
|
+
import "./pattern-format.js";
|
|
44
|
+
import "./placeholder.js";
|
|
45
|
+
import "./progress.js";
|
|
46
|
+
import "./radio-group.js";
|
|
47
|
+
import "./search.js";
|
|
48
|
+
import "./static-content.js";
|
|
49
|
+
import "./tab.js";
|
|
50
|
+
import "./tag-picker.js";
|
|
51
|
+
import "./text-area.js";
|
|
52
|
+
import "./time-picker.js";
|
|
53
|
+
import "./toggle.js";
|
|
54
|
+
import "./tooltip.js";
|
|
55
|
+
import "./uploader.js";
|
|
56
|
+
const to = m.map(({ model: o }) => o);
|
|
57
|
+
export {
|
|
58
|
+
to as models
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sources":["../src/models.ts"],"sourcesContent":["import {components} from './definitions'\n\n/**\n * An array of rSuite component metadata for use in FormViewer.\n */\nexport const models = components.map(({model}) => model)\n"],"names":["models","components","model"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAMA,KAASC,EAAW,IAAI,CAAC,EAAC,OAAAC,QAAWA,CAAK;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import type { InputProps } from 'rsuite';
|
|
3
|
+
import type { NumericFormatProps } from 'react-number-format';
|
|
4
|
+
|
|
5
|
+
export declare const rsNumberFormat: Definer<RsNumberFormatProps>;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Props for the RsNumberFormat component.
|
|
9
|
+
*/
|
|
10
|
+
export declare interface RsNumberFormatProps extends NumericFormatProps<InputProps> {
|
|
11
|
+
/**
|
|
12
|
+
* The label for the number input.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* The callback function called when the value changes.
|
|
17
|
+
*/
|
|
18
|
+
onChange: (value: any) => void;
|
|
19
|
+
/**
|
|
20
|
+
* The htmlSize attribute defines the width of the «input> element.
|
|
21
|
+
*/
|
|
22
|
+
htmlSize?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { }
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as m } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { define as p, string as o, number as f, array as S, boolean as s, oneOf as h, isString as b } from "@react-form-builder/core";
|
|
3
|
+
import { useCallback as N } from "react";
|
|
4
|
+
import { NumericFormat as w } from "react-number-format";
|
|
5
|
+
import { i as g, a as x } from "./commonProperties-d849cd5b.js";
|
|
6
|
+
import { f as y } from "./categories-7064b279.js";
|
|
7
|
+
import { L as F } from "./Labeled-751c2353.js";
|
|
8
|
+
import { W as D } from "./WrappedInput-bc5a6d33.js";
|
|
9
|
+
import "@emotion/react";
|
|
10
|
+
import "@emotion/styled";
|
|
11
|
+
import "rsuite";
|
|
12
|
+
function v(t) {
|
|
13
|
+
let { decimalSeparator: r = "." } = t, { thousandSeparator: a } = t;
|
|
14
|
+
return a === !0 && (a = ","), a === r && (console.warn(`
|
|
15
|
+
Decimal separator can't be same as thousand separator.
|
|
16
|
+
thousandSeparator: ${a} (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
17
|
+
decimalSeparator: ${r} (default value for decimalSeparator is .)
|
|
18
|
+
`), a = void 0, r = "."), a && b(a) && (a.indexOf("-") >= 0 ? (console.warn("Thousand separator can't contain '-' character"), a = void 0) : a.match(/\d/g) && (console.warn("Thousand separator should not contain numeric character"), a = void 0)), r.match(/\d/g) && (console.warn("Decimal separator should not contain numeric character"), r = "."), { decimalSeparator: r, thousandSeparator: a };
|
|
19
|
+
}
|
|
20
|
+
const L = ({ style: t, className: r, label: a, onChange: i, value: e, ...n }) => {
|
|
21
|
+
const { decimalSeparator: l, thousandSeparator: u } = v(n);
|
|
22
|
+
e = e ?? "", typeof e == "number" && !Number.isFinite(e) && (e = "");
|
|
23
|
+
const c = N((d) => i == null ? void 0 : i(d.value), [i]);
|
|
24
|
+
return /* @__PURE__ */ m(F, { label: a, style: t, className: r, passAriaToChildren: !0, children: /* @__PURE__ */ m(
|
|
25
|
+
w,
|
|
26
|
+
{
|
|
27
|
+
customInput: D,
|
|
28
|
+
...n,
|
|
29
|
+
decimalSeparator: l,
|
|
30
|
+
thousandSeparator: u,
|
|
31
|
+
onValueChange: c,
|
|
32
|
+
value: e
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
}, V = p(L, "RsNumberFormat").name("Number format").category(y).props({
|
|
36
|
+
label: o.default("Number input"),
|
|
37
|
+
value: f.valued,
|
|
38
|
+
...g,
|
|
39
|
+
allowedDecimalSeparators: S.ofString,
|
|
40
|
+
allowLeadingZeros: s.default(!1),
|
|
41
|
+
allowNegative: s.default(!0),
|
|
42
|
+
decimalScale: x,
|
|
43
|
+
decimalSeparator: o,
|
|
44
|
+
fixedDecimalScale: s.default(!1),
|
|
45
|
+
prefix: o,
|
|
46
|
+
suffix: o,
|
|
47
|
+
thousandsGroupStyle: h("thousand", "lakh", "wan", "none").default("none"),
|
|
48
|
+
thousandSeparator: o
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
V as rsNumberFormat
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=number-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-format.js","sources":["../src/components/RsNumberFormat.tsx"],"sourcesContent":["import {array, boolean, define, isString, number, oneOf, string} from '@react-form-builder/core'\nimport {useCallback} from 'react'\nimport type {NumericFormatProps} from 'react-number-format'\nimport {NumericFormat} from 'react-number-format'\nimport type {NumberFormatValues} from 'react-number-format/types/types'\nimport type {InputProps} from 'rsuite'\nimport {inputProps, nonNegNumber} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\nimport {WrappedInput} from './internal/WrappedInput'\n\n/**\n * Props for the RsNumberFormat component.\n */\nexport interface RsNumberFormatProps extends NumericFormatProps<InputProps> {\n /**\n * The label for the number input.\n */\n label: string\n /**\n * The callback function called when the value changes.\n */\n onChange: (value: any) => void\n /**\n * The htmlSize attribute defines the width of the «input> element.\n */\n htmlSize?: number\n}\n\n/**\n * Gets the decimal and a thousand separators with validation.\n * @param props the separator properties.\n * @param props.thousandSeparator the thousand separator.\n * @param props.decimalSeparator the decimal separator.\n * @returns the validated separators.\n */\nfunction getSeparators(props: { thousandSeparator?: boolean | string, decimalSeparator?: string }) {\n let {decimalSeparator = '.'} = props\n let {thousandSeparator} = props\n if (thousandSeparator === true) thousandSeparator = ','\n\n if (thousandSeparator === decimalSeparator) {\n console.warn(`\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ${thousandSeparator} (thousandSeparator = {true} is same as thousandSeparator = \",\")\n decimalSeparator: ${decimalSeparator} (default value for decimalSeparator is .)\n `)\n thousandSeparator = undefined\n decimalSeparator = '.'\n }\n\n if (thousandSeparator && isString(thousandSeparator)) {\n if (thousandSeparator.indexOf('-') >= 0) {\n console.warn(`Thousand separator can't contain '-' character`)\n thousandSeparator = undefined\n } else if (thousandSeparator.match(/\\d/g)) {\n console.warn(`Thousand separator should not contain numeric character`)\n thousandSeparator = undefined\n }\n }\n\n if (decimalSeparator.match(/\\d/g)) {\n console.warn(`Decimal separator should not contain numeric character`)\n decimalSeparator = '.'\n }\n\n return {decimalSeparator, thousandSeparator}\n}\n\n/**\n * A number format input component with validation and formatting.\n * @param props the component props.\n * @param props.style the CSS style for the component.\n * @param props.className the CSS class name for the component.\n * @param props.label the label for the number input.\n * @param props.onChange the callback function called when the value changes.\n * @param props.value the current value of the input.\n * @returns the React element.\n */\nconst RsNumberFormat = ({style, className, label, onChange, value, ...props}: RsNumberFormatProps) => {\n const {decimalSeparator, thousandSeparator} = getSeparators(props)\n\n value = value ?? ''\n if (typeof value === 'number' && !Number.isFinite(value)) {\n value = ''\n }\n\n const onValueChange = useCallback((values: NumberFormatValues) => onChange?.(values.value), [onChange])\n\n return <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n <NumericFormat<InputProps> customInput={WrappedInput}\n {...props}\n decimalSeparator={decimalSeparator}\n thousandSeparator={thousandSeparator}\n onValueChange={onValueChange}\n value={value}/>\n </Labeled>\n}\n\nexport const rsNumberFormat = define(RsNumberFormat, 'RsNumberFormat')\n .name('Number format')\n .category(fieldsCategory)\n .props({\n label: string.default('Number input'),\n value: number.valued,\n ...inputProps,\n allowedDecimalSeparators: array.ofString,\n allowLeadingZeros: boolean.default(false),\n allowNegative: boolean.default(true),\n decimalScale: nonNegNumber,\n decimalSeparator: string,\n fixedDecimalScale: boolean.default(false),\n prefix: string,\n suffix: string,\n thousandsGroupStyle: oneOf('thousand', 'lakh', 'wan', 'none').default('none'),\n thousandSeparator: string,\n })\n"],"names":["getSeparators","props","decimalSeparator","thousandSeparator","isString","RsNumberFormat","style","className","label","onChange","value","onValueChange","useCallback","values","Labeled","jsx","NumericFormat","WrappedInput","rsNumberFormat","define","fieldsCategory","string","number","inputProps","array","boolean","nonNegNumber","oneOf"],"mappings":";;;;;;;;;;;AAoCA,SAASA,EAAcC,GAA4E;AAC7F,MAAA,EAAC,kBAAAC,IAAmB,IAAO,IAAAD,GAC3B,EAAC,mBAAAE,EAAqB,IAAAF;AAC1B,SAAIE,MAAsB,OAA0BA,IAAA,MAEhDA,MAAsBD,MACxB,QAAQ,KAAK;AAAA;AAAA,6BAEYC,CAAiB;AAAA,4BAClBD,CAAgB;AAAA,MACtC,GACkBC,IAAA,QACDD,IAAA,MAGjBC,KAAqBC,EAASD,CAAiB,MAC7CA,EAAkB,QAAQ,GAAG,KAAK,KACpC,QAAQ,KAAK,gDAAgD,GACzCA,IAAA,UACXA,EAAkB,MAAM,KAAK,MACtC,QAAQ,KAAK,yDAAyD,GAClDA,IAAA,UAIpBD,EAAiB,MAAM,KAAK,MAC9B,QAAQ,KAAK,wDAAwD,GAClDA,IAAA,MAGd,EAAC,kBAAAA,GAAkB,mBAAAC;AAC5B;AAYA,MAAME,IAAiB,CAAC,EAAC,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,OAAAC,GAAO,GAAGT,QAAgC;AACpG,QAAM,EAAC,kBAAAC,GAAkB,mBAAAC,EAAiB,IAAIH,EAAcC,CAAK;AAEjE,EAAAS,IAAQA,KAAS,IACb,OAAOA,KAAU,YAAY,CAAC,OAAO,SAASA,CAAK,MAC7CA,IAAA;AAGJ,QAAAC,IAAgBC,EAAY,CAACC,MAA+BJ,KAAA,gBAAAA,EAAWI,EAAO,QAAQ,CAACJ,CAAQ,CAAC;AAEtG,2BAAQK,GAAQ,EAAA,OAAAN,GAAc,OAAAF,GAAc,WAAAC,GAAsB,oBAAoB,IACpF,UAAA,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MAA0B,aAAaC;AAAA,MACZ,GAAGhB;AAAA,MACJ,kBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,eAAAQ;AAAA,MACA,OAAAD;AAAA,IAAA;AAAA,EAC7B,EAAA,CAAA;AACF,GAEaQ,IAAiBC,EAAOd,GAAgB,gBAAgB,EAClE,KAAK,eAAe,EACpB,SAASe,CAAc,EACvB,MAAM;AAAA,EACL,OAAOC,EAAO,QAAQ,cAAc;AAAA,EACpC,OAAOC,EAAO;AAAA,EACd,GAAGC;AAAA,EACH,0BAA0BC,EAAM;AAAA,EAChC,mBAAmBC,EAAQ,QAAQ,EAAK;AAAA,EACxC,eAAeA,EAAQ,QAAQ,EAAI;AAAA,EACnC,cAAcC;AAAA,EACd,kBAAkBL;AAAA,EAClB,mBAAmBI,EAAQ,QAAQ,EAAK;AAAA,EACxC,QAAQJ;AAAA,EACR,QAAQA;AAAA,EACR,qBAAqBM,EAAM,YAAY,QAAQ,OAAO,MAAM,EAAE,QAAQ,MAAM;AAAA,EAC5E,mBAAmBN;AACrB,CAAC;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import type { InputProps } from 'rsuite';
|
|
3
|
+
import type { PatternFormatProps } from 'react-number-format';
|
|
4
|
+
|
|
5
|
+
export declare const rsPatternFormat: Definer<RsPatternFormatProps>;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Props for the RsPatternFormat component.
|
|
9
|
+
*/
|
|
10
|
+
export declare interface RsPatternFormatProps extends PatternFormatProps<InputProps> {
|
|
11
|
+
/**
|
|
12
|
+
* The label for the pattern format input.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* The callback when value changes.
|
|
17
|
+
*/
|
|
18
|
+
onChange: (value: any) => void;
|
|
19
|
+
/**
|
|
20
|
+
* The htmlSize attribute defines the width of the «input> element.
|
|
21
|
+
*/
|
|
22
|
+
htmlSize?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { }
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as m } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { define as u, string as r, boolean as d } from "@react-form-builder/core";
|
|
3
|
+
import { useCallback as c } from "react";
|
|
4
|
+
import { PatternFormat as k } from "react-number-format";
|
|
5
|
+
import { i as F } from "./commonProperties-d849cd5b.js";
|
|
6
|
+
import { f as P } from "./categories-7064b279.js";
|
|
7
|
+
import { L as b } from "./Labeled-751c2353.js";
|
|
8
|
+
import { W as g } from "./WrappedInput-bc5a6d33.js";
|
|
9
|
+
import "@emotion/react";
|
|
10
|
+
import "@emotion/styled";
|
|
11
|
+
import "rsuite";
|
|
12
|
+
const v = ({ style: s, className: i, label: l, format: n, onChange: a, value: p, ...o }) => {
|
|
13
|
+
let { mask: t } = o;
|
|
14
|
+
t && (t === "string" ? t : t.toString()).match(/\d/g) && (console.warn(`Mask ${t} should not contain numeric character, mask value will be ignored`), t = void 0);
|
|
15
|
+
const f = c((e) => a == null ? void 0 : a(e.formattedValue), [a]);
|
|
16
|
+
return /* @__PURE__ */ m(b, { label: l, style: s, className: i, passAriaToChildren: !0, children: /* @__PURE__ */ m(
|
|
17
|
+
k,
|
|
18
|
+
{
|
|
19
|
+
customInput: g,
|
|
20
|
+
format: n ?? "",
|
|
21
|
+
...o,
|
|
22
|
+
mask: t,
|
|
23
|
+
onValueChange: f,
|
|
24
|
+
value: p ?? ""
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
}, j = u(v, "RsPatternFormat").name("Pattern format").category(P).props({
|
|
28
|
+
label: r.default("Formatted input"),
|
|
29
|
+
value: r.valued,
|
|
30
|
+
...F,
|
|
31
|
+
format: r,
|
|
32
|
+
mask: r,
|
|
33
|
+
patternChar: r,
|
|
34
|
+
allowEmptyFormatting: d.default(!1)
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
j as rsPatternFormat
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=pattern-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-format.js","sources":["../src/components/RsPatternFormat.tsx"],"sourcesContent":["import {boolean, define, string} from '@react-form-builder/core'\nimport {useCallback} from 'react'\nimport type {PatternFormatProps} from 'react-number-format'\nimport {PatternFormat} from 'react-number-format'\nimport type {InputProps} from 'rsuite'\nimport {inputProps} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\nimport {WrappedInput} from './internal/WrappedInput'\n\n/**\n * Props for the RsPatternFormat component.\n */\nexport interface RsPatternFormatProps extends PatternFormatProps<InputProps> {\n /**\n * The label for the pattern format input.\n */\n label: string\n /**\n * The callback when value changes.\n */\n onChange: (value: any) => void\n /**\n * The htmlSize attribute defines the width of the «input> element.\n */\n htmlSize?: number\n}\n\n/**\n * Pattern format input component with label support.\n * @param props the component props.\n * @param props.style the CSS styles.\n * @param props.className the CSS class name.\n * @param props.label the label for the pattern format input.\n * @param props.format the format pattern.\n * @param props.onChange the callback when value changes.\n * @param props.value the value of the input.\n * @param props.props the additional pattern format props.\n * @returns the React element.\n */\nconst RsPatternFormat = ({style, className, label, format, onChange, value, ...props}: RsPatternFormatProps) => {\n let {mask} = props\n\n if (mask) {\n const maskAsStr = mask === 'string' ? mask : mask.toString()\n if (maskAsStr.match(/\\d/g)) {\n console.warn(`Mask ${mask} should not contain numeric character, mask value will be ignored`)\n mask = undefined\n }\n }\n\n const handleValueChange = useCallback((values: any) => onChange?.(values.formattedValue), [onChange])\n\n return <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n <PatternFormat customInput={WrappedInput} format={format ?? ''} {...props} mask={mask}\n onValueChange={handleValueChange}\n value={value ?? ''}/>\n </Labeled>\n}\n\nexport const rsPatternFormat = define(RsPatternFormat, 'RsPatternFormat')\n .name('Pattern format')\n .category(fieldsCategory)\n .props({\n label: string.default('Formatted input'),\n value: string.valued,\n ...inputProps,\n format: string,\n mask: string,\n patternChar: string,\n allowEmptyFormatting: boolean.default(false)\n })\n"],"names":["RsPatternFormat","style","className","label","format","onChange","value","props","mask","handleValueChange","useCallback","values","Labeled","jsx","PatternFormat","WrappedInput","rsPatternFormat","define","fieldsCategory","string","inputProps","boolean"],"mappings":";;;;;;;;;;;AAwCA,MAAMA,IAAkB,CAAC,EAAC,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,OAAAC,GAAO,GAAGC,QAAiC;AAC1G,MAAA,EAAC,MAAAC,EAAQ,IAAAD;AAEb,EAAIC,MACgBA,MAAS,WAAWA,IAAOA,EAAK,YACpC,MAAM,KAAK,MACf,QAAA,KAAK,QAAQA,CAAI,mEAAmE,GACrFA,IAAA;AAIL,QAAAC,IAAoBC,EAAY,CAACC,MAAgBN,KAAA,gBAAAA,EAAWM,EAAO,iBAAiB,CAACN,CAAQ,CAAC;AAEpG,2BAAQO,GAAQ,EAAA,OAAAT,GAAc,OAAAF,GAAc,WAAAC,GAAsB,oBAAoB,IACpF,UAAA,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MAAc,aAAaC;AAAA,MAAc,QAAQX,KAAU;AAAA,MAAK,GAAGG;AAAA,MAAO,MAAAC;AAAA,MAC5D,eAAeC;AAAA,MACf,OAAOH,KAAS;AAAA,IAAA;AAAA,EACjC,EAAA,CAAA;AACF,GAEaU,IAAkBC,EAAOjB,GAAiB,iBAAiB,EACrE,KAAK,gBAAgB,EACrB,SAASkB,CAAc,EACvB,MAAM;AAAA,EACL,OAAOC,EAAO,QAAQ,iBAAiB;AAAA,EACvC,OAAOA,EAAO;AAAA,EACd,GAAGC;AAAA,EACH,QAAQD;AAAA,EACR,MAAMA;AAAA,EACN,aAAaA;AAAA,EACb,sBAAsBE,EAAQ,QAAQ,EAAK;AAC7C,CAAC;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { JSX } from 'react';
|
|
4
|
+
import { PlaceholderGraphProps } from 'rsuite';
|
|
5
|
+
import { PlaceholderGridProps } from 'rsuite';
|
|
6
|
+
import { PlaceholderParagraphProps } from 'rsuite';
|
|
7
|
+
import { PropsWithChildren } from 'react';
|
|
8
|
+
import { ReplaceProps } from 'rsuite/esm/internals/types/utils';
|
|
9
|
+
import { WithAsProps } from 'rsuite/esm/internals/types';
|
|
10
|
+
|
|
11
|
+
export declare const rsPlaceholderGraph: Definer<PropsWithChildren<ReplaceProps<ElementType<any, keyof JSX.IntrinsicElements>, WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & PlaceholderGraphProps>>>;
|
|
12
|
+
|
|
13
|
+
export declare const rsPlaceholderGrid: Definer<PropsWithChildren<ReplaceProps<ElementType<any, keyof JSX.IntrinsicElements>, WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & PlaceholderGridProps>>>;
|
|
14
|
+
|
|
15
|
+
export declare const rsPlaceholderParagraph: Definer<PropsWithChildren<ReplaceProps<ElementType<any, keyof JSX.IntrinsicElements>, WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & PlaceholderParagraphProps>>>;
|
|
16
|
+
|
|
17
|
+
export { }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { define as t, size as c, number as r, boolean as o, oneOf as h } from "@react-form-builder/core";
|
|
3
|
+
import { Placeholder as l } from "rsuite";
|
|
4
|
+
import { s as i } from "./categories-7064b279.js";
|
|
5
|
+
const a = { width: 24, height: 24 }, n = () => /* @__PURE__ */ s("svg", { style: a, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
6
|
+
/* @__PURE__ */ e("line", { x1: "4", y1: "8", x2: "8", y2: "8", stroke: "#9CA3AF", strokeWidth: "1" }),
|
|
7
|
+
/* @__PURE__ */ e("line", { x1: "4", y1: "12", x2: "10", y2: "12", stroke: "#9CA3AF", strokeWidth: "1" }),
|
|
8
|
+
/* @__PURE__ */ e("line", { x1: "4", y1: "16", x2: "9", y2: "16", stroke: "#9CA3AF", strokeWidth: "1" }),
|
|
9
|
+
/* @__PURE__ */ e("line", { x1: "13", y1: "8", x2: "20", y2: "8", stroke: "#9CA3AF", strokeWidth: "1" }),
|
|
10
|
+
/* @__PURE__ */ e("line", { x1: "12", y1: "12", x2: "20", y2: "12", stroke: "#9CA3AF", strokeWidth: "1" }),
|
|
11
|
+
/* @__PURE__ */ e("line", { x1: "14", y1: "16", x2: "20", y2: "16", stroke: "#9CA3AF", strokeWidth: "1" })
|
|
12
|
+
] }), d = () => /* @__PURE__ */ s("svg", { style: a, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
13
|
+
/* @__PURE__ */ e("line", { x1: "12", y1: "10", x2: "20", y2: "10", stroke: "#9CA3AF", strokeWidth: "1" }),
|
|
14
|
+
/* @__PURE__ */ e("line", { x1: "12", y1: "14", x2: "20", y2: "14", stroke: "#9CA3AF", strokeWidth: "1" }),
|
|
15
|
+
/* @__PURE__ */ e("circle", { cx: "5", cy: "12", r: "4", stroke: "#9CA3AF", fill: "#9CA3AF", fillOpacity: "0.7" })
|
|
16
|
+
] }), p = () => /* @__PURE__ */ e("svg", { style: a, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("rect", { x: "4", y: "4", width: "14", height: "14", fill: "#9CA3AF", fillOpacity: "0.7" }) }), f = t(l.Graph, "RsPlaceholderGraph").name("Placeholder graph").category(i).icon(p).props({
|
|
17
|
+
width: c.default("100%"),
|
|
18
|
+
height: r.default(200),
|
|
19
|
+
active: o
|
|
20
|
+
}), A = t(l.Grid, "RsPlaceholderGrid").name("Placeholder grid").category(i).icon(n).props({
|
|
21
|
+
rows: r.default(5),
|
|
22
|
+
columns: r.default(5),
|
|
23
|
+
rowHeight: r.default(10),
|
|
24
|
+
rowSpacing: r.default(20),
|
|
25
|
+
active: o
|
|
26
|
+
}), k = t(l.Paragraph, "RsPlaceholderParagraph").name("Placeholder paragraph").category(i).icon(d).props({
|
|
27
|
+
rows: r.default(2),
|
|
28
|
+
rowHeight: r.default(10),
|
|
29
|
+
rowSpacing: r.default(20),
|
|
30
|
+
graph: h("circle", "square", "image").withEditorProps({ creatable: !1 }),
|
|
31
|
+
active: o
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
f as rsPlaceholderGraph,
|
|
35
|
+
A as rsPlaceholderGrid,
|
|
36
|
+
k as rsPlaceholderParagraph
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=placeholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder.js","sources":["../src/components/RsPlaceholder.tsx"],"sourcesContent":["import {boolean, define, number, oneOf, size} from '@react-form-builder/core'\nimport {Placeholder} from 'rsuite'\nimport {staticCategory} from './categories'\n\nconst iconStyle = {width: 24, height: 24}\n\nconst IconGrid = () => (\n <svg style={iconStyle} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"4\" y1=\"8\" x2=\"8\" y2=\"8\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n <line x1=\"4\" y1=\"12\" x2=\"10\" y2=\"12\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n <line x1=\"4\" y1=\"16\" x2=\"9\" y2=\"16\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n <line x1=\"13\" y1=\"8\" x2=\"20\" y2=\"8\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n <line x1=\"12\" y1=\"12\" x2=\"20\" y2=\"12\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n <line x1=\"14\" y1=\"16\" x2=\"20\" y2=\"16\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n </svg>\n)\n\nconst IconParagraph = () => (\n <svg style={iconStyle} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"12\" y1=\"10\" x2=\"20\" y2=\"10\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n <line x1=\"12\" y1=\"14\" x2=\"20\" y2=\"14\" stroke=\"#9CA3AF\" strokeWidth=\"1\"/>\n <circle cx=\"5\" cy=\"12\" r=\"4\" stroke=\"#9CA3AF\" fill=\"#9CA3AF\" fillOpacity=\"0.7\"/>\n </svg>\n)\n\nconst IconGraph = () => (\n <svg style={iconStyle} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"4\" y=\"4\" width=\"14\" height=\"14\" fill=\"#9CA3AF\" fillOpacity=\"0.7\"/>\n </svg>\n)\n\nexport const rsPlaceholderGraph = define(Placeholder.Graph, 'RsPlaceholderGraph')\n .name('Placeholder graph')\n .category(staticCategory)\n .icon(IconGraph)\n .props({\n width: size.default('100%'),\n height: number.default(200),\n active: boolean,\n })\n\nexport const rsPlaceholderGrid = define(Placeholder.Grid, 'RsPlaceholderGrid')\n .name('Placeholder grid')\n .category(staticCategory)\n .icon(IconGrid)\n .props({\n rows: number.default(5),\n columns: number.default(5),\n rowHeight: number.default(10),\n rowSpacing: number.default(20),\n active: boolean,\n })\n\nexport const rsPlaceholderParagraph = define(Placeholder.Paragraph, 'RsPlaceholderParagraph')\n .name('Placeholder paragraph')\n .category(staticCategory)\n .icon(IconParagraph)\n .props({\n rows: number.default(2),\n rowHeight: number.default(10),\n rowSpacing: number.default(20),\n graph: oneOf('circle', 'square', 'image')\n .withEditorProps({creatable: false}),\n active: boolean,\n })\n"],"names":["iconStyle","IconGrid","jsxs","jsx","IconParagraph","IconGraph","rsPlaceholderGraph","define","Placeholder","staticCategory","size","number","boolean","rsPlaceholderGrid","rsPlaceholderParagraph","oneOf"],"mappings":";;;;AAIA,MAAMA,IAAY,EAAC,OAAO,IAAI,QAAQ,GAAE,GAElCC,IAAW,MACf,gBAAAC,EAAC,OAAI,EAAA,OAAOF,GAAW,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC3D,UAAA;AAAA,EAAA,gBAAAG,EAAC,QAAK,EAAA,IAAG,KAAI,IAAG,KAAI,IAAG,KAAI,IAAG,KAAI,QAAO,WAAU,aAAY,KAAG;AAAA,EACjE,gBAAAA,EAAA,QAAA,EAAK,IAAG,KAAI,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,QAAO,WAAU,aAAY,KAAG;AAAA,EACpE,gBAAAA,EAAA,QAAA,EAAK,IAAG,KAAI,IAAG,MAAK,IAAG,KAAI,IAAG,MAAK,QAAO,WAAU,aAAY,KAAG;AAAA,EACnE,gBAAAA,EAAA,QAAA,EAAK,IAAG,MAAK,IAAG,KAAI,IAAG,MAAK,IAAG,KAAI,QAAO,WAAU,aAAY,KAAG;AAAA,EACnE,gBAAAA,EAAA,QAAA,EAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,QAAO,WAAU,aAAY,KAAG;AAAA,EACrE,gBAAAA,EAAA,QAAA,EAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,QAAO,WAAU,aAAY,KAAG;AAAA,EACxE,CAAA,GAGIC,IAAgB,MACpB,gBAAAF,EAAC,OAAI,EAAA,OAAOF,GAAW,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC3D,UAAA;AAAA,EAAA,gBAAAG,EAAC,QAAK,EAAA,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,QAAO,WAAU,aAAY,KAAG;AAAA,EACrE,gBAAAA,EAAA,QAAA,EAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,QAAO,WAAU,aAAY,KAAG;AAAA,EACrE,gBAAAA,EAAA,UAAA,EAAO,IAAG,KAAI,IAAG,MAAK,GAAE,KAAI,QAAO,WAAU,MAAK,WAAU,aAAY,OAAK;AAAA,EAChF,CAAA,GAGIE,IAAY,MAChB,gBAAAF,EAAC,OAAI,EAAA,OAAOH,GAAW,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC3D,UAAA,gBAAAG,EAAC,UAAK,GAAE,KAAI,GAAE,KAAI,OAAM,MAAK,QAAO,MAAK,MAAK,WAAU,aAAY,MAAK,CAAA,EAC3E,CAAA,GAGWG,IAAqBC,EAAOC,EAAY,OAAO,oBAAoB,EAC7E,KAAK,mBAAmB,EACxB,SAASC,CAAc,EACvB,KAAKJ,CAAS,EACd,MAAM;AAAA,EACL,OAAOK,EAAK,QAAQ,MAAM;AAAA,EAC1B,QAAQC,EAAO,QAAQ,GAAG;AAAA,EAC1B,QAAQC;AACV,CAAC,GAEUC,IAAoBN,EAAOC,EAAY,MAAM,mBAAmB,EAC1E,KAAK,kBAAkB,EACvB,SAASC,CAAc,EACvB,KAAKR,CAAQ,EACb,MAAM;AAAA,EACL,MAAMU,EAAO,QAAQ,CAAC;AAAA,EACtB,SAASA,EAAO,QAAQ,CAAC;AAAA,EACzB,WAAWA,EAAO,QAAQ,EAAE;AAAA,EAC5B,YAAYA,EAAO,QAAQ,EAAE;AAAA,EAC7B,QAAQC;AACV,CAAC,GAEUE,IAAyBP,EAAOC,EAAY,WAAW,wBAAwB,EACzF,KAAK,uBAAuB,EAC5B,SAASC,CAAc,EACvB,KAAKL,CAAa,EAClB,MAAM;AAAA,EACL,MAAMO,EAAO,QAAQ,CAAC;AAAA,EACtB,WAAWA,EAAO,QAAQ,EAAE;AAAA,EAC5B,YAAYA,EAAO,QAAQ,EAAE;AAAA,EAC7B,OAAOI,EAAM,UAAU,UAAU,OAAO,EACrC,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,QAAQH;AACV,CAAC;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Definer } from '@react-form-builder/core';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { JSX } from 'react';
|
|
4
|
+
import { ProgressCircleProps } from 'rsuite';
|
|
5
|
+
import { ProgressLineProps } from 'rsuite';
|
|
6
|
+
import { PropsWithChildren } from 'react';
|
|
7
|
+
import { ReplaceProps } from 'rsuite/esm/internals/types/utils';
|
|
8
|
+
import { WithAsProps } from 'rsuite/esm/internals/types';
|
|
9
|
+
|
|
10
|
+
export declare const rsProgressCircle: Definer<PropsWithChildren<ReplaceProps<ElementType<any, keyof JSX.IntrinsicElements>, WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & ProgressCircleProps>>>;
|
|
11
|
+
|
|
12
|
+
export declare const rsProgressLine: Definer<PropsWithChildren<ReplaceProps<ElementType<any, keyof JSX.IntrinsicElements>, WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & ProgressLineProps>>>;
|
|
13
|
+
|
|
14
|
+
export { }
|
package/dist/progress.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { string as n, number as r, boolean as o, oneOf as e, color as t, define as s } from "@react-form-builder/core";
|
|
2
|
+
import { Progress as a } from "rsuite";
|
|
3
|
+
import { s as i } from "./categories-7064b279.js";
|
|
4
|
+
const l = {
|
|
5
|
+
classPrefix: n.default("progress"),
|
|
6
|
+
percent: r.default(50).withEditorProps({ min: 0, max: 100 }).dataBound,
|
|
7
|
+
showInfo: o.default(!0),
|
|
8
|
+
status: e("success", "fail", "active").default("active").withEditorProps({ creatable: !1 }),
|
|
9
|
+
strokeColor: t,
|
|
10
|
+
strokeWidth: r
|
|
11
|
+
}, p = s(a.Circle, "RsProgressCircle").name("Progress circle").category(i).props({
|
|
12
|
+
...l,
|
|
13
|
+
gapDegree: r.withEditorProps({ min: 0, max: 360 }),
|
|
14
|
+
gapPosition: e("right", "top", "bottom", "left").default("top").withEditorProps({ creatable: !1 }),
|
|
15
|
+
strokeLinecap: e("round", "square", "butt").default("round").withEditorProps({ creatable: !1 }),
|
|
16
|
+
strokeWidth: r.default(6),
|
|
17
|
+
trailColor: t,
|
|
18
|
+
trailWidth: r.default(6)
|
|
19
|
+
}), u = s(a.Line, "RsProgressLine").name("Progress line").category(i).props({
|
|
20
|
+
...l,
|
|
21
|
+
vertical: o.default(!1)
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
p as rsProgressCircle,
|
|
25
|
+
u as rsProgressLine
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sources":["../src/components/RsProgress.tsx"],"sourcesContent":["import {boolean, color, define, number, oneOf, string} from '@react-form-builder/core'\nimport {Progress} from 'rsuite'\nimport {staticCategory} from './categories'\n\nconst rsCommonProgressProps = {\n classPrefix: string.default('progress'),\n percent: number.default(50)\n .withEditorProps({min: 0, max: 100})\n .dataBound,\n showInfo: boolean.default(true),\n status: oneOf('success', 'fail', 'active')\n .default('active')\n .withEditorProps({creatable: false}),\n strokeColor: color,\n strokeWidth: number,\n}\n\nexport const rsProgressCircle = define(Progress.Circle, 'RsProgressCircle')\n .name('Progress circle')\n .category(staticCategory)\n .props({\n ...rsCommonProgressProps,\n gapDegree: number.withEditorProps({min: 0, max: 360}),\n gapPosition: oneOf('right', 'top', 'bottom', 'left')\n .default('top')\n .withEditorProps({creatable: false}),\n strokeLinecap: oneOf('round', 'square', 'butt')\n .default('round')\n .withEditorProps({creatable: false}),\n strokeWidth: number.default(6),\n trailColor: color,\n trailWidth: number.default(6)\n })\n\nexport const rsProgressLine = define(Progress.Line, 'RsProgressLine')\n .name('Progress line')\n .category(staticCategory)\n .props({\n ...rsCommonProgressProps,\n vertical: boolean.default(false)\n })\n"],"names":["rsCommonProgressProps","string","number","boolean","oneOf","color","rsProgressCircle","define","Progress","staticCategory","rsProgressLine"],"mappings":";;;AAIA,MAAMA,IAAwB;AAAA,EAC5B,aAAaC,EAAO,QAAQ,UAAU;AAAA,EACtC,SAASC,EAAO,QAAQ,EAAE,EACvB,gBAAgB,EAAC,KAAK,GAAG,KAAK,IAAG,CAAC,EAClC;AAAA,EACH,UAAUC,EAAQ,QAAQ,EAAI;AAAA,EAC9B,QAAQC,EAAM,WAAW,QAAQ,QAAQ,EACtC,QAAQ,QAAQ,EAChB,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,aAAaC;AAAA,EACb,aAAaH;AACf,GAEaI,IAAmBC,EAAOC,EAAS,QAAQ,kBAAkB,EACvE,KAAK,iBAAiB,EACtB,SAASC,CAAc,EACvB,MAAM;AAAA,EACL,GAAGT;AAAA,EACH,WAAWE,EAAO,gBAAgB,EAAC,KAAK,GAAG,KAAK,KAAI;AAAA,EACpD,aAAaE,EAAM,SAAS,OAAO,UAAU,MAAM,EAChD,QAAQ,KAAK,EACb,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,eAAeA,EAAM,SAAS,UAAU,MAAM,EAC3C,QAAQ,OAAO,EACf,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,aAAaF,EAAO,QAAQ,CAAC;AAAA,EAC7B,YAAYG;AAAA,EACZ,YAAYH,EAAO,QAAQ,CAAC;AAC9B,CAAC,GAEUQ,IAAiBH,EAAOC,EAAS,MAAM,gBAAgB,EACjE,KAAK,eAAe,EACpB,SAASC,CAAc,EACvB,MAAM;AAAA,EACL,GAAGT;AAAA,EACH,UAAUG,EAAQ,QAAQ,EAAK;AACjC,CAAC;"}
|