@react-form-builder/components-rsuite 7.15.0 → 8.1.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.
Files changed (92) hide show
  1. package/dist/InputCell-tTp9fZXd.js +17 -0
  2. package/dist/InputCell-tTp9fZXd.js.map +1 -0
  3. package/dist/Labeled-8k9VvM4G.js +18 -0
  4. package/dist/Labeled-8k9VvM4G.js.map +1 -0
  5. package/dist/{WrappedInput-BRkBjl0z.js → WrappedInput-Cq5StStF.js} +2 -2
  6. package/dist/{WrappedInput-BRkBjl0z.js.map → WrappedInput-Cq5StStF.js.map} +1 -1
  7. package/dist/assets/styles.css +1 -0
  8. package/dist/assets/styles.ltr.css +319 -0
  9. package/dist/assets/styles.ltr.css.map +1 -0
  10. package/dist/assets/styles.rtl.css +319 -0
  11. package/dist/assets/styles.rtl.css.map +1 -0
  12. package/dist/autocomplete.js +2 -2
  13. package/dist/breadcrumb.js +32 -29
  14. package/dist/breadcrumb.js.map +1 -1
  15. package/dist/builder-view-with-css.js +4 -4
  16. package/dist/builder-view-with-css.js.map +1 -1
  17. package/dist/button.js +1 -1
  18. package/dist/calendar.js +2 -2
  19. package/dist/card.js +1 -1
  20. package/dist/checkbox.js +18 -28
  21. package/dist/checkbox.js.map +1 -1
  22. package/dist/container.d.ts +4 -0
  23. package/dist/container.js +15 -16
  24. package/dist/container.js.map +1 -1
  25. package/dist/css/formengine-rsuite.css +5 -1
  26. package/dist/css/rsuite-ltr.css +2 -0
  27. package/dist/css/rsuite-rtl.css +2 -0
  28. package/dist/css-loader.d.ts +2 -8
  29. package/dist/css-loader.js +12 -12
  30. package/dist/css-loader.js.map +1 -1
  31. package/dist/date-picker.js +2 -2
  32. package/dist/divider.js +1 -1
  33. package/dist/dropdown.js +34 -42
  34. package/dist/dropdown.js.map +1 -1
  35. package/dist/error-message.js +25 -21
  36. package/dist/error-message.js.map +1 -1
  37. package/dist/image.js +12 -13
  38. package/dist/image.js.map +1 -1
  39. package/dist/index.d.ts +15 -28
  40. package/dist/index.js +80 -81
  41. package/dist/input.js +2 -2
  42. package/dist/label.js +1 -1
  43. package/dist/link.js +1 -1
  44. package/dist/localization-wrapper.d.ts +1 -1
  45. package/dist/localization-wrapper.js +51 -50
  46. package/dist/localization-wrapper.js.map +1 -1
  47. package/dist/menu.js +2 -2
  48. package/dist/message.d.ts +1 -11
  49. package/dist/message.js +11 -12
  50. package/dist/message.js.map +1 -1
  51. package/dist/modal-layout.js +1 -1
  52. package/dist/modal.js +1 -1
  53. package/dist/number-format.js +3 -3
  54. package/dist/pattern-format.js +3 -3
  55. package/dist/placeholder.js +1 -1
  56. package/dist/radio-group.js +2 -2
  57. package/dist/rsuite-ltr.css-uDbh7We6.js +4 -0
  58. package/dist/rsuite-ltr.css-uDbh7We6.js.map +1 -0
  59. package/dist/rsuite-rtl.css-icqmWEF6.js +4 -0
  60. package/dist/rsuite-rtl.css-icqmWEF6.js.map +1 -0
  61. package/dist/schemas/rsuite-components.schema.json +1 -4
  62. package/dist/search.js +31 -42
  63. package/dist/search.js.map +1 -1
  64. package/dist/static-content.js +1 -1
  65. package/dist/tab.js +26 -33
  66. package/dist/tab.js.map +1 -1
  67. package/dist/tag-picker.js +2 -2
  68. package/dist/text-area.js +10 -10
  69. package/dist/text-area.js.map +1 -1
  70. package/dist/time-picker.js +2 -2
  71. package/dist/toggle.d.ts +1 -11
  72. package/dist/toggle.js +16 -18
  73. package/dist/toggle.js.map +1 -1
  74. package/dist/tooltip.js +1 -1
  75. package/dist/uploader.js +3 -3
  76. package/dist/useTouchOnEvent-BPYbKiku.js.map +1 -1
  77. package/dist/view-with-css.js +4 -4
  78. package/dist/view-with-css.js.map +1 -1
  79. package/dist/wizard.d.ts +6 -8
  80. package/dist/wizard.js +129 -177
  81. package/dist/wizard.js.map +1 -1
  82. package/package.json +7 -7
  83. package/dist/InputCell-BDyUJFGm.js +0 -21
  84. package/dist/InputCell-BDyUJFGm.js.map +0 -1
  85. package/dist/Labeled-BWYRwMiY.js +0 -35
  86. package/dist/Labeled-BWYRwMiY.js.map +0 -1
  87. package/dist/formengine-rsuite.css-B1zD3_ue.js +0 -5
  88. package/dist/formengine-rsuite.css-B1zD3_ue.js.map +0 -1
  89. package/dist/rsuite-no-reset-rtl.min.css-B0vQWI16.js +0 -5
  90. package/dist/rsuite-no-reset-rtl.min.css-B0vQWI16.js.map +0 -1
  91. package/dist/rsuite-no-reset.min.css-bW1P11UK.js +0 -5
  92. package/dist/rsuite-no-reset.min.css-bW1P11UK.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsuite-rtl.css-icqmWEF6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -60,10 +60,7 @@
60
60
  }
61
61
  },
62
62
  "required": [
63
- "form",
64
- "localization",
65
- "languages",
66
- "defaultLanguage"
63
+ "form"
67
64
  ],
68
65
  "description": "The scheme describes the JSON structure and the set of components used",
69
66
  "definitions": {
package/dist/search.js CHANGED
@@ -1,55 +1,44 @@
1
- import { jsx as o, jsxs as k } from "@emotion/react/jsx-runtime";
2
- import i from "@emotion/styled";
3
- import { define as P, string as s, boolean as y, useComponentData as I, useAriaAttributes as L } from "@react-form-builder/core";
4
- import { Search as R } from "@rsuite/icons";
5
- import { useCallback as j, useMemo as D } from "react";
6
- import { InputPicker as F, Loader as M } from "rsuite";
7
- import { b as O } from "./commonProperties-X-t50qaZ.js";
8
- import { u as T, a as w } from "./hooks-DMVtrI-b.js";
9
- import { f as z } from "./categories-_98lyB3C.js";
1
+ import { jsx as a, jsxs as S } from "react/jsx-runtime";
2
+ import { define as g, string as s, boolean as A, useComponentData as x, useAriaAttributes as L } from "@react-form-builder/core";
3
+ import { Search as v } from "@rsuite/icons";
4
+ import y from "clsx";
5
+ import { useCallback as N, useMemo as R } from "react";
6
+ import { Loader as j, InputPicker as D } from "rsuite";
7
+ import { b as F } from "./commonProperties-X-t50qaZ.js";
8
+ import { u as M, a as O } from "./hooks-DMVtrI-b.js";
9
+ import { f as T } from "./categories-_98lyB3C.js";
10
10
  import { u as E } from "./useTouchOnEvent-BPYbKiku.js";
11
- import { L as N } from "./Labeled-BWYRwMiY.js";
12
- const q = i.div`
13
- display: flex;
14
- flex: 1;
15
-
16
- .search-icon {
17
- margin-inline-start: -28px;
18
- margin-top: 10px;
19
- z-index: 10;
20
- }
21
-
22
- .rs-loader .rs-loader-spin, .rs-loader .rs-loader-spin:after, .rs-loader .rs-loader-spin:before {
23
- height: 16px !important;
24
- width: 16px !important;
25
- }
26
- `, v = i(F)`
27
- flex: 1;
28
- `, B = () => null, G = ({ data: l, label: t, onLoadData: c, onSearch: d, value: r = "", className: m, preload: p, disableVirtualized: f, ...e }) => {
29
- const { loading: u, onOpen: H, ...a } = T({ data: l, onLoadData: c, onSearch: d, value: r, preload: p, disableVirtualized: f }), h = j((A) => a.data?.length ? A : null, [a.data?.length]), x = E(e, "onClean"), n = u ? M : R, { id: b } = I(), g = L({ labeled: !!t }), C = w(), S = D(() => e.cleanable && r ? null : /* @__PURE__ */ o(n, { className: "search-icon" }), [n, e.cleanable, r]);
30
- return /* @__PURE__ */ o(N, { label: t, className: m, passAriaToChildren: !1, children: /* @__PURE__ */ k(q, { children: [
31
- /* @__PURE__ */ o(
32
- v,
11
+ import { L as q } from "./Labeled-8k9VvM4G.js";
12
+ const w = "_container_7opfv_1", z = "_inputPicker_7opfv_6", B = "_searchIcon_7opfv_10", n = {
13
+ container: w,
14
+ inputPicker: z,
15
+ searchIcon: B
16
+ }, G = () => null, H = ({ data: i, label: t, onLoadData: l, onSearch: m, value: r = "", className: u, preload: p, disableVirtualized: f, ...e }) => {
17
+ const { loading: d, onOpen: J, ...o } = M({ data: i, onLoadData: l, onSearch: m, value: r, preload: p, disableVirtualized: f }), h = N((I) => o.data?.length ? I : null, [o.data?.length]), b = E(e, "onClean"), c = d ? j : v, { id: _ } = x(), k = L({ labeled: !!t }), C = O(), P = R(() => e.cleanable && r ? null : /* @__PURE__ */ a(c, { className: n.searchIcon }), [c, e.cleanable, r]);
18
+ return /* @__PURE__ */ a(q, { label: t, className: u, passAriaToChildren: !1, children: /* @__PURE__ */ S("div", { className: n.container, children: [
19
+ /* @__PURE__ */ a(
20
+ D,
33
21
  {
34
- id: b,
35
- ...g,
22
+ id: _,
23
+ ...k,
36
24
  ...e,
37
- ...a,
38
- onClean: x,
25
+ ...o,
26
+ onClean: b,
39
27
  renderMenu: h,
40
- caretAs: B,
41
- ref: C
28
+ caretAs: G,
29
+ ref: C,
30
+ className: y(n.inputPicker)
42
31
  }
43
32
  ),
44
- S
33
+ P
45
34
  ] }) });
46
- }, ee = P(G, "RsSearch").name("Search").category(z).props({
47
- ...O,
48
- preload: y.default(!1),
35
+ }, oe = g(H, "RsSearch").name("Search").category(T).props({
36
+ ...F,
37
+ preload: A.default(!1),
49
38
  label: s.default("Search"),
50
39
  placeholder: s.default("Search")
51
40
  });
52
41
  export {
53
- ee as rsSearch
42
+ oe as rsSearch
54
43
  };
55
44
  //# sourceMappingURL=search.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sources":["../src/components/RsSearch.tsx"],"sourcesContent":["import styled from '@emotion/styled'\nimport {boolean, define, string, useAriaAttributes, useComponentData} from '@react-form-builder/core'\nimport {Search} from '@rsuite/icons'\nimport type {ReactNode} from 'react'\nimport {useCallback, useMemo} from 'react'\nimport type {InputPickerProps} from 'rsuite'\nimport {InputPicker, Loader} from 'rsuite'\nimport {pickerProps} from '../commonProperties'\nimport type {LoadDataProps} from '../hooks'\nimport {useFixAriaAttributesForInputPicker, useLoadData} from '../hooks'\nimport {fieldsCategory} from './categories'\nimport {useTouchOnEvent} from './hooks/useTouchOnEvent'\nimport {Labeled} from './internal/Labeled'\n\nconst Container = styled.div`\n display: flex;\n flex: 1;\n\n .search-icon {\n margin-inline-start: -28px;\n margin-top: 10px;\n z-index: 10;\n }\n\n .rs-loader .rs-loader-spin, .rs-loader .rs-loader-spin:after, .rs-loader .rs-loader-spin:before {\n height: 16px !important;\n width: 16px !important;\n }\n`\n\nconst SInputPicker = styled(InputPicker)`\n flex: 1;\n`\n\n/**\n * Props for the RsSearch component.\n */\nexport interface RsSearchProps extends InputPickerProps, LoadDataProps {\n /**\n * The label for the search input.\n */\n label: string\n /**\n * Called after the value has been changed.\n * @param value the value.\n */\n onChange?: (value: any) => void\n}\n\nconst CustomCaret = () => null\n\n/**\n * Search component with label and data loading support.\n * @param props the component props.\n * @param props.data the data for the search.\n * @param props.label the label for the search input.\n * @param props.onLoadData the callback for loading data.\n * @param props.onSearch the callback for search.\n * @param props.value the value of the search.\n * @param props.className the CSS class name.\n * @param props.preload whether to preload data.\n * @param props.disableVirtualized whether to disable virtualization.\n * @param props.props the additional search props.\n * @returns the React element.\n */\nconst RsSearch = ({data, label, onLoadData, onSearch, value = '', className, preload, disableVirtualized, ...props}: RsSearchProps) => {\n const {loading, onOpen, ...loadProps} = useLoadData({data, onLoadData, onSearch, value, preload, disableVirtualized})\n\n const renderMenu = useCallback((menu: ReactNode) => {\n return loadProps.data?.length ? menu : null\n }, [loadProps.data?.length])\n\n const onClean = useTouchOnEvent(props, 'onClean')\n const Icon = loading ? Loader : Search\n const {id} = useComponentData()\n const aria = useAriaAttributes({labeled: !!label})\n const inputRef = useFixAriaAttributesForInputPicker()\n\n const icon = useMemo(() => {\n return !(props.cleanable && value) ? <Icon className={'search-icon'}/> : null\n }, [Icon, props.cleanable, value])\n\n return (\n <Labeled label={label} className={className} passAriaToChildren={false}>\n <Container>\n <SInputPicker id={id} {...aria} {...props} {...loadProps} onClean={onClean} renderMenu={renderMenu} caretAs={CustomCaret}\n ref={inputRef}/>\n {icon}\n </Container>\n </Labeled>\n )\n}\n\nexport const rsSearch = define(RsSearch, 'RsSearch')\n .name('Search')\n .category(fieldsCategory)\n .props({\n ...pickerProps,\n preload: boolean.default(false),\n label: string.default('Search'),\n placeholder: string.default('Search')\n })\n"],"names":["Container","styled","SInputPicker","InputPicker","CustomCaret","RsSearch","data","label","onLoadData","onSearch","value","className","preload","disableVirtualized","props","loading","onOpen","loadProps","useLoadData","renderMenu","useCallback","menu","onClean","useTouchOnEvent","Icon","Loader","Search","id","useComponentData","aria","useAriaAttributes","inputRef","useFixAriaAttributesForInputPicker","icon","useMemo","Labeled","jsx","rsSearch","define","fieldsCategory","pickerProps","boolean","string"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBnBC,IAAeD,EAAOE,CAAW;AAAA;AAAA,GAmBjCC,IAAc,MAAM,MAgBpBC,IAAW,CAAC,EAAC,MAAAC,GAAM,OAAAC,GAAO,YAAAC,GAAY,UAAAC,GAAU,OAAAC,IAAQ,IAAI,WAAAC,GAAW,SAAAC,GAAS,oBAAAC,GAAoB,GAAGC,QAA0B;AACrI,QAAM,EAAC,SAAAC,GAAS,QAAAC,GAAQ,GAAGC,MAAaC,EAAY,EAAC,MAAAZ,GAAM,YAAAE,GAAY,UAAAC,GAAU,OAAAC,GAAO,SAAAE,GAAS,oBAAAC,GAAmB,GAE9GM,IAAaC,EAAY,CAACC,MACvBJ,EAAU,MAAM,SAASI,IAAO,MACtC,CAACJ,EAAU,MAAM,MAAM,CAAC,GAErBK,IAAUC,EAAgBT,GAAO,SAAS,GAC1CU,IAAOT,IAAUU,IAASC,GAC1B,EAAC,IAAAC,EAAA,IAAMC,EAAA,GACPC,IAAOC,EAAkB,EAAC,SAAS,CAAC,CAACvB,GAAM,GAC3CwB,IAAWC,EAAA,GAEXC,IAAOC,EAAQ,MACVpB,EAAM,aAAaJ,IAA6C,yBAAnCc,GAAA,EAAK,WAAW,eAAc,GACnE,CAACA,GAAMV,EAAM,WAAWJ,CAAK,CAAC;AAEjC,2BACGyB,GAAA,EAAQ,OAAA5B,GAAc,WAAAI,GAAsB,oBAAoB,IAC/D,4BAACX,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAoC;AAAA,MAAClC;AAAA,MAAA;AAAA,QAAa,IAAAyB;AAAA,QAAS,GAAGE;AAAA,QAAO,GAAGf;AAAA,QAAQ,GAAGG;AAAA,QAAW,SAAAK;AAAA,QAAkB,YAAAH;AAAA,QAAwB,SAASf;AAAA,QAC/F,KAAK2B;AAAA,MAAA;AAAA,IAAA;AAAA,IAClBE;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ,GAEaI,KAAWC,EAAOjC,GAAU,UAAU,EAChD,KAAK,QAAQ,EACb,SAASkC,CAAc,EACvB,MAAM;AAAA,EACL,GAAGC;AAAA,EACH,SAASC,EAAQ,QAAQ,EAAK;AAAA,EAC9B,OAAOC,EAAO,QAAQ,QAAQ;AAAA,EAC9B,aAAaA,EAAO,QAAQ,QAAQ;AACtC,CAAC;"}
1
+ {"version":3,"file":"search.js","sources":["../src/components/RsSearch.tsx"],"sourcesContent":["import {boolean, define, string, useAriaAttributes, useComponentData} from '@react-form-builder/core'\nimport {Search} from '@rsuite/icons'\nimport cx from 'clsx'\nimport type {ReactNode} from 'react'\nimport {useCallback, useMemo} from 'react'\nimport type {InputPickerProps} from 'rsuite'\nimport {InputPicker, Loader} from 'rsuite'\nimport {pickerProps} from '../commonProperties'\nimport type {LoadDataProps} from '../hooks'\nimport {useFixAriaAttributesForInputPicker, useLoadData} from '../hooks'\nimport {fieldsCategory} from './categories'\nimport {useTouchOnEvent} from './hooks/useTouchOnEvent'\nimport {Labeled} from './internal/Labeled'\nimport styles from './RsSearch.module.css'\n\n/**\n * Props for the RsSearch component.\n */\nexport interface RsSearchProps extends InputPickerProps, LoadDataProps {\n /**\n * The label for the search input.\n */\n label: string\n /**\n * Called after the value has been changed.\n * @param value the value.\n */\n onChange?: (value: any) => void\n}\n\nconst CustomCaret = () => null\n\n/**\n * Search component with label and data loading support.\n * @param props the component props.\n * @param props.data the data for the search.\n * @param props.label the label for the search input.\n * @param props.onLoadData the callback for loading data.\n * @param props.onSearch the callback for search.\n * @param props.value the value of the search.\n * @param props.className the CSS class name.\n * @param props.preload whether to preload data.\n * @param props.disableVirtualized whether to disable virtualization.\n * @param props.props the additional search props.\n * @returns the React element.\n */\nconst RsSearch = ({data, label, onLoadData, onSearch, value = '', className, preload, disableVirtualized, ...props}: RsSearchProps) => {\n const {loading, onOpen, ...loadProps} = useLoadData({data, onLoadData, onSearch, value, preload, disableVirtualized})\n\n const renderMenu = useCallback((menu: ReactNode) => {\n return loadProps.data?.length ? menu : null\n }, [loadProps.data?.length])\n\n const onClean = useTouchOnEvent(props, 'onClean')\n const Icon = loading ? Loader : Search\n const {id} = useComponentData()\n const aria = useAriaAttributes({labeled: !!label})\n const inputRef = useFixAriaAttributesForInputPicker()\n\n const icon = useMemo(() => {\n return !(props.cleanable && value) ? <Icon className={styles.searchIcon}/> : null\n }, [Icon, props.cleanable, value])\n\n return (\n <Labeled label={label} className={className} passAriaToChildren={false}>\n <div className={styles.container}>\n <InputPicker\n id={id}\n {...aria}\n {...props}\n {...loadProps}\n onClean={onClean}\n renderMenu={renderMenu}\n caretAs={CustomCaret}\n ref={inputRef}\n className={cx(styles.inputPicker)}\n />\n {icon}\n </div>\n </Labeled>\n )\n}\n\nexport const rsSearch = define(RsSearch, 'RsSearch')\n .name('Search')\n .category(fieldsCategory)\n .props({\n ...pickerProps,\n preload: boolean.default(false),\n label: string.default('Search'),\n placeholder: string.default('Search')\n })\n"],"names":["CustomCaret","RsSearch","data","label","onLoadData","onSearch","value","className","preload","disableVirtualized","props","loading","onOpen","loadProps","useLoadData","renderMenu","useCallback","menu","onClean","useTouchOnEvent","Icon","Loader","Search","id","useComponentData","aria","useAriaAttributes","inputRef","useFixAriaAttributesForInputPicker","icon","useMemo","styles","jsx","Labeled","jsxs","InputPicker","cx","rsSearch","define","fieldsCategory","pickerProps","boolean","string"],"mappings":";;;;;;;;;;;;;;;GA8BMA,IAAc,MAAM,MAgBpBC,IAAW,CAAC,EAAC,MAAAC,GAAM,OAAAC,GAAO,YAAAC,GAAY,UAAAC,GAAU,OAAAC,IAAQ,IAAI,WAAAC,GAAW,SAAAC,GAAS,oBAAAC,GAAoB,GAAGC,QAA0B;AACrI,QAAM,EAAC,SAAAC,GAAS,QAAAC,GAAQ,GAAGC,MAAaC,EAAY,EAAC,MAAAZ,GAAM,YAAAE,GAAY,UAAAC,GAAU,OAAAC,GAAO,SAAAE,GAAS,oBAAAC,GAAmB,GAE9GM,IAAaC,EAAY,CAACC,MACvBJ,EAAU,MAAM,SAASI,IAAO,MACtC,CAACJ,EAAU,MAAM,MAAM,CAAC,GAErBK,IAAUC,EAAgBT,GAAO,SAAS,GAC1CU,IAAOT,IAAUU,IAASC,GAC1B,EAAC,IAAAC,EAAA,IAAMC,EAAA,GACPC,IAAOC,EAAkB,EAAC,SAAS,CAAC,CAACvB,GAAM,GAC3CwB,IAAWC,EAAA,GAEXC,IAAOC,EAAQ,MACVpB,EAAM,aAAaJ,IAAiD,yBAAvCc,GAAA,EAAK,WAAWW,EAAO,WAAA,CAAW,GACvE,CAACX,GAAMV,EAAM,WAAWJ,CAAK,CAAC;AAEjC,SACE,gBAAA0B,EAACC,GAAA,EAAQ,OAAA9B,GAAc,WAAAI,GAAsB,oBAAoB,IAC/D,UAAA,gBAAA2B,EAAC,OAAA,EAAI,WAAWH,EAAO,WACrB,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,IAAAZ;AAAA,QACC,GAAGE;AAAA,QACH,GAAGf;AAAA,QACH,GAAGG;AAAA,QACJ,SAAAK;AAAA,QACA,YAAAH;AAAA,QACA,SAASf;AAAA,QACT,KAAK2B;AAAA,QACL,WAAWS,EAAGL,EAAO,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,IAEjCF;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ,GAEaQ,KAAWC,EAAOrC,GAAU,UAAU,EAChD,KAAK,QAAQ,EACb,SAASsC,CAAc,EACvB,MAAM;AAAA,EACL,GAAGC;AAAA,EACH,SAASC,EAAQ,QAAQ,EAAK;AAAA,EAC9B,OAAOC,EAAO,QAAQ,QAAQ;AAAA,EAC9B,aAAaA,EAAO,QAAQ,QAAQ;AACtC,CAAC;"}
@@ -1,4 +1,4 @@
1
- import { jsx as e } from "@emotion/react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import { define as c, boolean as i, string as m, useBuilderValue as u } from "@react-form-builder/core";
3
3
  import { useMemo as d } from "react";
4
4
  import { a as f } from "./categories-_98lyB3C.js";
package/dist/tab.js CHANGED
@@ -1,36 +1,29 @@
1
- import { jsxs as d, Fragment as p, jsx as n } from "@emotion/react/jsx-runtime";
2
- import b from "@emotion/styled";
3
- import { define as v, node as f, boolean as y, array as h, toLabeledValues as g, useComponentData as K } from "@react-form-builder/core";
1
+ import { jsxs as p, Fragment as d, jsx as n } from "react/jsx-runtime";
2
+ import { define as f, node as v, boolean as y, array as h, toLabeledValues as g, useComponentData as K } from "@react-form-builder/core";
3
+ import x from "clsx";
4
4
  import { useCallback as C } from "react";
5
- import { Nav as i } from "rsuite";
6
- import { n as I } from "./commonProperties-X-t50qaZ.js";
7
- import { s as T } from "./categories-_98lyB3C.js";
8
- const x = b(i)({
9
- ".builder & .rs-nav-item": {
10
- zIndex: 7
11
- },
12
- ".rs-nav-item": {
13
- border: "none",
14
- outline: "none",
15
- appearance: "none",
16
- backgroundColor: "transparent"
17
- }
18
- }), D = ({
5
+ import { Nav as c } from "rsuite";
6
+ import { n as D } from "./commonProperties-X-t50qaZ.js";
7
+ import { s as I } from "./categories-_98lyB3C.js";
8
+ const N = "_tabs_77wg9_1", P = {
9
+ tabs: N
10
+ }, T = ({
19
11
  pane: t,
20
- onSelect: l,
21
- showNavigation: c,
12
+ onSelect: s,
13
+ showNavigation: i,
22
14
  items: a,
23
- ...s
15
+ className: m,
16
+ ...l
24
17
  }) => {
25
- const r = K(), u = C((e, o) => {
26
- r.userDefinedProps ??= {}, r.userDefinedProps.activeKey = e, l?.(e, o);
27
- }, [r, l]);
18
+ const o = K(), u = C((e, r) => {
19
+ o.userDefinedProps ??= {}, o.userDefinedProps.activeKey = e, s?.(e, r);
20
+ }, [o, s]);
28
21
  if (!a?.length) return null;
29
- const m = s.activeKey ?? a?.[0].value;
30
- return /* @__PURE__ */ d(p, { children: [
31
- c === !0 && /* @__PURE__ */ n(x, { onSelect: u, activeKey: m, ...s, children: a.map(
32
- (e, o) => /* @__PURE__ */ n(
33
- i.Item,
22
+ const b = l.activeKey ?? a?.[0].value;
23
+ return /* @__PURE__ */ p(d, { children: [
24
+ i === !0 && /* @__PURE__ */ n(c, { onSelect: u, activeKey: b, ...l, className: x(P.tabs, m), children: a.map(
25
+ (e, r) => /* @__PURE__ */ n(
26
+ c.Item,
34
27
  {
35
28
  eventKey: e.value,
36
29
  role: "tab",
@@ -38,18 +31,18 @@ const x = b(i)({
38
31
  type: "button",
39
32
  children: e.label
40
33
  },
41
- o
34
+ r
42
35
  )
43
36
  ) }),
44
37
  /* @__PURE__ */ n("div", { children: t })
45
38
  ] });
46
- }, z = v(D, "RsTab").name("Tab").category(T).props({
47
- ...I,
39
+ }, F = f(T, "RsTab").name("Tab").category(I).props({
40
+ ...D,
48
41
  items: h.default(g(["Item1", "Item2", "Item3"])),
49
42
  showNavigation: y.default(!0),
50
- pane: f.withSlotConditionBuilder((t) => `return parentProps.activeKey === '${t.activeKey?.value ?? t.activeKey}'`).calculable(!1)
43
+ pane: v.withSlotConditionBuilder((t) => `return parentProps.activeKey === '${t.activeKey?.value ?? t.activeKey}'`).calculable(!1)
51
44
  });
52
45
  export {
53
- z as rsTab
46
+ F as rsTab
54
47
  };
55
48
  //# sourceMappingURL=tab.js.map
package/dist/tab.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tab.js","sources":["../src/components/RsTab.tsx"],"sourcesContent":["import styled from '@emotion/styled'\nimport {array, boolean, define, node, toLabeledValues, useComponentData} from '@react-form-builder/core'\nimport type {ReactNode, SyntheticEvent} from 'react'\nimport {useCallback} from 'react'\nimport type {NavProps} from 'rsuite'\nimport {Nav} from 'rsuite'\nimport {navProps} from '../commonProperties'\nimport {structureCategory} from './categories'\n\n/**\n * Tab item for RsTab component.\n */\nexport type RsTabItem = {\n /**\n * Label for the tab item.\n */\n label: string\n /**\n * Value for the tab item.\n */\n value: string\n}\n\n/**\n * Props for the RsTab component.\n */\nexport interface RsTabProps extends NavProps {\n /**\n * Items for the tab.\n */\n items?: RsTabItem[]\n /**\n * Whether to show navigation.\n */\n showNavigation?: boolean\n /**\n * Pane content for the tab.\n */\n pane: ReactNode\n}\n\nconst STabs = styled(Nav)({\n '.builder & .rs-nav-item': {\n zIndex: 7,\n },\n '.rs-nav-item': {\n border: 'none',\n outline: 'none',\n appearance: 'none',\n backgroundColor: 'transparent'\n }\n})\n\n/**\n * Tab component with navigation and pane support.\n * @param props the component props.\n * @param props.pane the pane content for the tab.\n * @param props.onSelect the callback when tab is selected.\n * @param props.showNavigation whether to show navigation.\n * @param props.items the items for the tab.\n * @param props.props the additional tab props.\n * @returns the React element.\n */\nconst RsTab = ({\n pane,\n onSelect,\n showNavigation,\n items,\n ...props\n }: RsTabProps) => {\n const componentData = useComponentData()\n\n const onNavSelect = useCallback((eventKey: string, 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 const activeKey = props.activeKey ?? items?.[0].value\n\n return <>\n {showNavigation === true &&\n <STabs onSelect={onNavSelect} activeKey={activeKey} {...props}>\n {items.map((item, index) => <Nav.Item key={index}\n eventKey={item.value}\n role=\"tab\"\n as=\"button\"\n type=\"button\">\n {item.label}\n </Nav.Item>\n )}\n </STabs>\n }\n <div>{pane}</div>\n </>\n}\n\nexport const rsTab = define(RsTab, 'RsTab')\n .name('Tab')\n .category(structureCategory)\n .props({\n ...navProps,\n items: array.default(toLabeledValues(['Item1', 'Item2', 'Item3'])),\n showNavigation: boolean.default(true),\n pane: node\n .withSlotConditionBuilder(props => `return parentProps.activeKey === '${props.activeKey?.value ?? props.activeKey}'`)\n .calculable(false),\n })\n"],"names":["STabs","styled","Nav","RsTab","pane","onSelect","showNavigation","items","props","componentData","useComponentData","onNavSelect","useCallback","eventKey","event","activeKey","jsxs","Fragment","item","index","jsx","rsTab","define","structureCategory","navProps","array","toLabeledValues","boolean","node"],"mappings":";;;;;;;AAyCA,MAAMA,IAAQC,EAAOC,CAAG,EAAE;AAAA,EACxB,2BAA2B;AAAA,IACzB,QAAQ;AAAA,EAAA;AAAA,EAEV,gBAAgB;AAAA,IACd,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,iBAAiB;AAAA,EAAA;AAErB,CAAC,GAYKC,IAAQ,CAAC;AAAA,EACE,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAkB;AAC/B,QAAMC,IAAgBC,EAAA,GAEhBC,IAAcC,EAAY,CAACC,GAAkBC,MAA0B;AAC3E,IAAAL,EAAc,qBAAqB,CAAA,GACnCA,EAAc,iBAAiB,YAAYI,GAC3CR,IAAWQ,GAAUC,CAAK;AAAA,EAC5B,GAAG,CAACL,GAAeJ,CAAQ,CAAC;AAE5B,MAAI,CAACE,GAAO,OAAQ,QAAO;AAE3B,QAAMQ,IAAYP,EAAM,aAAaD,IAAQ,CAAC,EAAE;AAEhD,SAAO,gBAAAS,EAAAC,GAAA,EACJ,UAAA;AAAA,IAAAX,MAAmB,wBACjBN,GAAA,EAAM,UAAUW,GAAa,WAAAI,GAAuB,GAAGP,GACrD,UAAAD,EAAM;AAAA,MAAI,CAACW,GAAMC,MAAU,gBAAAC;AAAA,QAAClB,EAAI;AAAA,QAAJ;AAAA,UACS,UAAUgB,EAAK;AAAA,UACf,MAAK;AAAA,UACL,IAAG;AAAA,UACH,MAAK;AAAA,UACtC,UAAAA,EAAK;AAAA,QAAA;AAAA,QALiCC;AAAA,MAAA;AAAA,IAMzC,GAEJ;AAAA,IAEF,gBAAAC,EAAC,SAAK,UAAAhB,EAAA,CAAK;AAAA,EAAA,GACb;AACF,GAEaiB,IAAQC,EAAOnB,GAAO,OAAO,EACvC,KAAK,KAAK,EACV,SAASoB,CAAiB,EAC1B,MAAM;AAAA,EACL,GAAGC;AAAA,EACH,OAAOC,EAAM,QAAQC,EAAgB,CAAC,SAAS,SAAS,OAAO,CAAC,CAAC;AAAA,EACjE,gBAAgBC,EAAQ,QAAQ,EAAI;AAAA,EACpC,MAAMC,EACH,yBAAyB,CAAApB,MAAS,qCAAqCA,EAAM,WAAW,SAASA,EAAM,SAAS,GAAG,EACnH,WAAW,EAAK;AACrB,CAAC;"}
1
+ {"version":3,"file":"tab.js","sources":["../src/components/RsTab.tsx"],"sourcesContent":["import {array, boolean, define, node, toLabeledValues, useComponentData} from '@react-form-builder/core'\nimport cx from 'clsx'\nimport type {ReactNode, SyntheticEvent} from 'react'\nimport {useCallback} from 'react'\nimport type {NavProps} from 'rsuite'\nimport {Nav} from 'rsuite'\nimport {navProps} from '../commonProperties'\nimport {structureCategory} from './categories'\nimport styles from './RsTab.module.css'\n\n/**\n * Tab item for RsTab component.\n */\nexport type RsTabItem = {\n /**\n * Label for the tab item.\n */\n label: string\n /**\n * Value for the tab item.\n */\n value: string\n}\n\n/**\n * Props for the RsTab component.\n */\nexport interface RsTabProps extends NavProps {\n /**\n * Items for the tab.\n */\n items?: RsTabItem[]\n /**\n * Whether to show navigation.\n */\n showNavigation?: boolean\n /**\n * Pane content for the tab.\n */\n pane: ReactNode\n}\n\n\n/**\n * Tab component with navigation and pane support.\n * @param props the component props.\n * @param props.pane the pane content for the tab.\n * @param props.onSelect the callback when tab is selected.\n * @param props.showNavigation whether to show navigation.\n * @param props.items the items for the tab.\n * @param props.className the CSS class name.\n * @param props.props the additional tab props.\n * @returns the React element.\n */\nconst RsTab = ({\n pane,\n onSelect,\n showNavigation,\n items,\n className,\n ...props\n }: RsTabProps) => {\n const componentData = useComponentData()\n\n const onNavSelect = useCallback((eventKey: string, 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 const activeKey = props.activeKey ?? items?.[0].value\n\n return <>\n {showNavigation === true &&\n <Nav onSelect={onNavSelect} activeKey={activeKey} {...props} className={cx(styles.tabs, className)}>\n {items.map((item, index) => <Nav.Item key={index}\n eventKey={item.value}\n role=\"tab\"\n as=\"button\"\n type=\"button\">\n {item.label}\n </Nav.Item>\n )}\n </Nav>\n }\n <div>{pane}</div>\n </>\n}\n\nexport const rsTab = define(RsTab, 'RsTab')\n .name('Tab')\n .category(structureCategory)\n .props({\n ...navProps,\n items: array.default(toLabeledValues(['Item1', 'Item2', 'Item3'])),\n showNavigation: boolean.default(true),\n pane: node\n .withSlotConditionBuilder(props => `return parentProps.activeKey === '${props.activeKey?.value ?? props.activeKey}'`)\n .calculable(false),\n })\n"],"names":["RsTab","pane","onSelect","showNavigation","items","className","props","componentData","useComponentData","onNavSelect","useCallback","eventKey","event","activeKey","jsxs","Fragment","jsx","Nav","cx","styles","item","index","rsTab","define","structureCategory","navProps","array","toLabeledValues","boolean","node"],"mappings":";;;;;;;;;GAsDMA,IAAQ,CAAC;AAAA,EACE,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MAAkB;AAC/B,QAAMC,IAAgBC,EAAA,GAEhBC,IAAcC,EAAY,CAACC,GAAkBC,MAA0B;AAC3E,IAAAL,EAAc,qBAAqB,CAAA,GACnCA,EAAc,iBAAiB,YAAYI,GAC3CT,IAAWS,GAAUC,CAAK;AAAA,EAC5B,GAAG,CAACL,GAAeL,CAAQ,CAAC;AAE5B,MAAI,CAACE,GAAO,OAAQ,QAAO;AAE3B,QAAMS,IAAYP,EAAM,aAAaF,IAAQ,CAAC,EAAE;AAEhD,SAAO,gBAAAU,EAAAC,GAAA,EACJ,UAAA;AAAA,IAAAZ,MAAmB,MAClB,gBAAAa,EAACC,GAAA,EAAI,UAAUR,GAAa,WAAAI,GAAuB,GAAGP,GAAO,WAAWY,EAAGC,EAAO,MAAMd,CAAS,GAC9F,UAAAD,EAAM;AAAA,MAAI,CAACgB,GAAMC,MAAU,gBAAAL;AAAA,QAACC,EAAI;AAAA,QAAJ;AAAA,UACS,UAAUG,EAAK;AAAA,UACf,MAAK;AAAA,UACL,IAAG;AAAA,UACH,MAAK;AAAA,UACtC,UAAAA,EAAK;AAAA,QAAA;AAAA,QALiCC;AAAA,MAAA;AAAA,IAMzC,GAEJ;AAAA,IAEF,gBAAAL,EAAC,SAAK,UAAAf,EAAA,CAAK;AAAA,EAAA,GACb;AACF,GAEaqB,IAAQC,EAAOvB,GAAO,OAAO,EACvC,KAAK,KAAK,EACV,SAASwB,CAAiB,EAC1B,MAAM;AAAA,EACL,GAAGC;AAAA,EACH,OAAOC,EAAM,QAAQC,EAAgB,CAAC,SAAS,SAAS,OAAO,CAAC,CAAC;AAAA,EACjE,gBAAgBC,EAAQ,QAAQ,EAAI;AAAA,EACpC,MAAMC,EACH,yBAAyB,CAAAvB,MAAS,qCAAqCA,EAAM,WAAW,SAASA,EAAM,SAAS,GAAG,EACnH,WAAW,EAAK;AACrB,CAAC;"}
@@ -1,4 +1,4 @@
1
- import { jsx as o } from "@emotion/react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { define as p, array as s, toLabeledValues as i } from "@react-form-builder/core";
3
3
  import { useRef as d, useEffect as g, useMemo as P } from "react";
4
4
  import { TagPicker as T } from "rsuite";
@@ -6,7 +6,7 @@ import { b as n } from "./commonProperties-X-t50qaZ.js";
6
6
  import { s as b } from "./hooks-DMVtrI-b.js";
7
7
  import { f as k } from "./categories-_98lyB3C.js";
8
8
  import { u as h } from "./useTouchOnEvent-BPYbKiku.js";
9
- import { L as v } from "./Labeled-BWYRwMiY.js";
9
+ import { L as v } from "./Labeled-8k9VvM4G.js";
10
10
  const y = ({ value: e, label: r }) => ({
11
11
  value: e ?? "",
12
12
  label: r ?? ""
package/dist/text-area.js CHANGED
@@ -1,17 +1,17 @@
1
- import { jsx as r } from "@emotion/react/jsx-runtime";
2
- import { define as d, event as a, string as e, disabled as i } from "@react-form-builder/core";
3
- import { Input as f } from "rsuite";
4
- import { r as m, s as n, d as p } from "./commonProperties-X-t50qaZ.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { define as l, event as a, string as e, disabled as d } from "@react-form-builder/core";
3
+ import { Input as m } from "rsuite";
4
+ import { r as n, s as f, d as p } from "./commonProperties-X-t50qaZ.js";
5
5
  import { f as u } from "./categories-_98lyB3C.js";
6
- import { L as x } from "./Labeled-BWYRwMiY.js";
7
- const T = ({ style: t, className: s, label: o, ...l }) => /* @__PURE__ */ r(x, { label: o, style: t, className: s, passAriaToChildren: !0, children: /* @__PURE__ */ r(f, { as: "textarea", ...l }) }), y = d(T, "RsTextArea").name("Text area").category(u).props({
6
+ import { L as x } from "./Labeled-8k9VvM4G.js";
7
+ const T = ({ style: t, className: s, label: o, ...i }) => /* @__PURE__ */ r(x, { label: o, style: t, className: s, passAriaToChildren: !0, children: /* @__PURE__ */ r(m, { as: "textarea", ...i }) }), y = l(T, "RsTextArea").name("Text area").category(u).props({
8
8
  label: e.default("Text area"),
9
- value: e.default("").valued,
9
+ value: e.valued,
10
10
  placeholder: e,
11
11
  rows: p.default(5),
12
- size: n,
13
- disabled: i.default(!1),
14
- readOnly: m,
12
+ size: f,
13
+ disabled: d.default(!1),
14
+ readOnly: n,
15
15
  onChange: a,
16
16
  onPressEnter: a
17
17
  });
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.js","sources":["../src/components/RsTextArea.tsx"],"sourcesContent":["import {define, disabled, event, string} from '@react-form-builder/core'\nimport type {InputProps} from 'rsuite'\nimport {Input} from 'rsuite'\nimport {positiveNumber, readOnly, size} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\n\n/**\n * Props for the RsTextArea component.\n */\nexport interface RsTextAreaProps extends InputProps {\n /**\n * The label for the text area.\n */\n label: string\n /**\n * The number of visible text lines.\n */\n rows: number\n /**\n * The htmlSize attribute defines the width of the &laquo;input> element.\n */\n htmlSize?: number\n}\n\n/**\n * A text area component for multi-line text input.\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 text area.\n * @returns the React element.\n */\nconst RsTextArea = ({style, className, label, ...props}: RsTextAreaProps) => (\n <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n <Input as=\"textarea\" {...props}/>\n </Labeled>\n)\n\nexport const rsTextArea = define(RsTextArea, 'RsTextArea')\n .name('Text area')\n .category(fieldsCategory)\n .props({\n label: string.default('Text area'),\n value: string.default('').valued,\n placeholder: string,\n rows: positiveNumber.default(5),\n size,\n disabled: disabled.default(false),\n readOnly,\n onChange: event,\n onPressEnter: event\n })\n"],"names":["RsTextArea","style","className","label","props","jsx","Labeled","Input","rsTextArea","define","fieldsCategory","string","positiveNumber","size","disabled","readOnly","event"],"mappings":";;;;;;AAiCA,MAAMA,IAAa,CAAC,EAAC,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,MAC/C,gBAAAC,EAACC,GAAA,EAAQ,OAAAH,GAAc,OAAAF,GAAc,WAAAC,GAAsB,oBAAoB,IAC7E,UAAA,gBAAAG,EAACE,KAAM,IAAG,YAAY,GAAGH,EAAA,CAAM,EAAA,CACjC,GAGWI,IAAaC,EAAOT,GAAY,YAAY,EACtD,KAAK,WAAW,EAChB,SAASU,CAAc,EACvB,MAAM;AAAA,EACL,OAAOC,EAAO,QAAQ,WAAW;AAAA,EACjC,OAAOA,EAAO,QAAQ,EAAE,EAAE;AAAA,EAC1B,aAAaA;AAAA,EACb,MAAMC,EAAe,QAAQ,CAAC;AAAA,EAC9B,MAAAC;AAAA,EACA,UAAUC,EAAS,QAAQ,EAAK;AAAA,EAChC,UAAAC;AAAA,EACA,UAAUC;AAAA,EACV,cAAcA;AAChB,CAAC;"}
1
+ {"version":3,"file":"text-area.js","sources":["../src/components/RsTextArea.tsx"],"sourcesContent":["import {define, disabled, event, string} from '@react-form-builder/core'\nimport type {InputProps} from 'rsuite'\nimport {Input} from 'rsuite'\nimport {positiveNumber, readOnly, size} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\n\n/**\n * Props for the RsTextArea component.\n */\nexport interface RsTextAreaProps extends InputProps {\n /**\n * The label for the text area.\n */\n label: string\n /**\n * The number of visible text lines.\n */\n rows: number\n /**\n * The htmlSize attribute defines the width of the &laquo;input> element.\n */\n htmlSize?: number\n}\n\n/**\n * A text area component for multi-line text input.\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 text area.\n * @returns the React element.\n */\nconst RsTextArea = ({style, className, label, ...props}: RsTextAreaProps) => (\n <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n <Input as=\"textarea\" {...props}/>\n </Labeled>\n)\n\nexport const rsTextArea = define(RsTextArea, 'RsTextArea')\n .name('Text area')\n .category(fieldsCategory)\n .props({\n label: string.default('Text area'),\n value: string.valued,\n placeholder: string,\n rows: positiveNumber.default(5),\n size,\n disabled: disabled.default(false),\n readOnly,\n onChange: event,\n onPressEnter: event\n })\n"],"names":["RsTextArea","style","className","label","props","jsx","Labeled","Input","rsTextArea","define","fieldsCategory","string","positiveNumber","size","disabled","readOnly","event"],"mappings":";;;;;;AAiCA,MAAMA,IAAa,CAAC,EAAC,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,MAC/C,gBAAAC,EAACC,GAAA,EAAQ,OAAAH,GAAc,OAAAF,GAAc,WAAAC,GAAsB,oBAAoB,IAC7E,UAAA,gBAAAG,EAACE,KAAM,IAAG,YAAY,GAAGH,EAAA,CAAM,EAAA,CACjC,GAGWI,IAAaC,EAAOT,GAAY,YAAY,EACtD,KAAK,WAAW,EAChB,SAASU,CAAc,EACvB,MAAM;AAAA,EACL,OAAOC,EAAO,QAAQ,WAAW;AAAA,EACjC,OAAOA,EAAO;AAAA,EACd,aAAaA;AAAA,EACb,MAAMC,EAAe,QAAQ,CAAC;AAAA,EAC9B,MAAAC;AAAA,EACA,UAAUC,EAAS,QAAQ,EAAK;AAAA,EAChC,UAAAC;AAAA,EACA,UAAUC;AAAA,EACV,cAAcA;AAChB,CAAC;"}
@@ -1,4 +1,4 @@
1
- import { jsx as u } from "@emotion/react/jsx-runtime";
1
+ import { jsx as u } from "react/jsx-runtime";
2
2
  import { define as P, event as e, boolean as m, time as T, string as l, disabled as V, isNull as v, timeFormat as o } from "@react-form-builder/core";
3
3
  import { format as x, parse as y } from "date-fns";
4
4
  import { useMemo as a, useCallback as F } from "react";
@@ -7,7 +7,7 @@ import { s as I, p as w, r as A } from "./commonProperties-X-t50qaZ.js";
7
7
  import { f as L, t as M } from "./dateTimeUtils-C2AEniv5.js";
8
8
  import { f as R } from "./categories-_98lyB3C.js";
9
9
  import { u as S } from "./useTouchOnEvent-BPYbKiku.js";
10
- import { L as _ } from "./Labeled-BWYRwMiY.js";
10
+ import { L as _ } from "./Labeled-8k9VvM4G.js";
11
11
  const j = (t) => t instanceof Date && !Number.isNaN(t.getTime()), g = (t, n) => {
12
12
  if (typeof t == "string") {
13
13
  const r = y(t, n, /* @__PURE__ */ new Date());
package/dist/toggle.d.ts CHANGED
@@ -1,16 +1,6 @@
1
1
  import { Definer } from '@react-form-builder/core';
2
- import { ElementType } from 'react';
3
- import { JSX } from 'react';
4
- import { Omit as Omit_2 } from 'rsuite/esm/internals/types/utils';
5
- import { ReactNode } from 'react';
6
- import { Theme } from '@emotion/react';
7
2
  import { ToggleProps } from 'rsuite';
8
- import { WithAsProps } from 'rsuite/esm/internals/types';
9
3
 
10
- export declare const rsToggle: Definer<Omit_2<any, WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & ToggleProps> & WithAsProps<ElementType<any, keyof JSX.IntrinsicElements>> & ToggleProps & {
11
- children?: ReactNode | undefined;
12
- } & {
13
- theme?: Theme;
14
- }>;
4
+ export declare const rsToggle: Definer<ToggleProps>;
15
5
 
16
6
  export { }
package/dist/toggle.js CHANGED
@@ -1,26 +1,24 @@
1
- import o from "@emotion/styled";
2
- import { define as r, event as a, string as e, boolean as l, oneOf as d, disabled as t } from "@react-form-builder/core";
3
- import { Toggle as s } from "rsuite";
4
- import { c as i, r as f } from "./commonProperties-X-t50qaZ.js";
5
- import { f as g } from "./categories-_98lyB3C.js";
6
- import { r as n } from "./Labeled-BWYRwMiY.js";
7
- const m = o(s)`
8
- &.required .rs-toggle-label::after {
9
- ${n};
10
- }
11
- `, y = r(m, "RsToggle").name("Toggle").category(g).props({
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { define as a, event as s, string as e, boolean as o, oneOf as d, disabled as g } from "@react-form-builder/core";
3
+ import n from "clsx";
4
+ import { Toggle as i } from "rsuite";
5
+ import { c as m, r as c } from "./commonProperties-X-t50qaZ.js";
6
+ import { f } from "./categories-_98lyB3C.js";
7
+ const p = "_toggle_bwzod_1", u = {
8
+ toggle: p
9
+ }, h = ({ className: l, ...r }) => /* @__PURE__ */ t(i, { ...r, className: n(u.toggle, l) }), _ = a(h, "RsToggle").name("Toggle").category(f).props({
12
10
  children: e,
13
- checked: l.valued.default(!0).uncontrolledValue(!1),
11
+ checked: o.valued.uncontrolledValue(!1),
14
12
  checkedChildren: e,
15
13
  unCheckedChildren: e,
16
- disabled: t.default(!1),
17
- readOnly: f,
14
+ disabled: g.default(!1),
15
+ readOnly: c,
18
16
  size: d("sm", "md", "lg").labeled("Small", "Medium", "Large").default("md").withEditorProps({ creatable: !1 }),
19
- color: i,
20
- loading: l.default(!1),
21
- onChange: a
17
+ color: m,
18
+ loading: o.default(!1),
19
+ onChange: s
22
20
  });
23
21
  export {
24
- y as rsToggle
22
+ _ as rsToggle
25
23
  };
26
24
  //# sourceMappingURL=toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.js","sources":["../src/components/RsToggle.tsx"],"sourcesContent":["import styled from '@emotion/styled'\nimport {boolean, define, disabled, event, oneOf, string} from '@react-form-builder/core'\nimport {Toggle} from 'rsuite'\nimport {controlColor, readOnly} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {requiredStyle} from './internal/Labeled'\n\nconst SToggle = styled(Toggle)`\n &.required .rs-toggle-label::after {\n ${requiredStyle};\n }\n`\n\nexport const rsToggle = define(SToggle, 'RsToggle')\n .name('Toggle')\n .category(fieldsCategory)\n .props({\n children: string,\n checked: boolean.valued.default(true).uncontrolledValue(false),\n checkedChildren: string,\n unCheckedChildren: string,\n disabled: disabled.default(false),\n readOnly,\n size: oneOf('sm', 'md', 'lg')\n .labeled('Small', 'Medium', 'Large')\n .default('md')\n .withEditorProps({creatable: false}),\n color: controlColor,\n loading: boolean.default(false),\n onChange: event,\n })\n"],"names":["SToggle","styled","Toggle","requiredStyle","rsToggle","define","fieldsCategory","string","boolean","disabled","readOnly","oneOf","controlColor","event"],"mappings":";;;;;;AAOA,MAAMA,IAAUC,EAAOC,CAAM;AAAA;AAAA,MAEvBC,CAAa;AAAA;AAAA,GAINC,IAAWC,EAAOL,GAAS,UAAU,EAC/C,KAAK,QAAQ,EACb,SAASM,CAAc,EACvB,MAAM;AAAA,EACL,UAAUC;AAAA,EACV,SAASC,EAAQ,OAAO,QAAQ,EAAI,EAAE,kBAAkB,EAAK;AAAA,EAC7D,iBAAiBD;AAAA,EACjB,mBAAmBA;AAAA,EACnB,UAAUE,EAAS,QAAQ,EAAK;AAAA,EAChC,UAAAC;AAAA,EACA,MAAMC,EAAM,MAAM,MAAM,IAAI,EACzB,QAAQ,SAAS,UAAU,OAAO,EAClC,QAAQ,IAAI,EACZ,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,OAAOC;AAAA,EACP,SAASJ,EAAQ,QAAQ,EAAK;AAAA,EAC9B,UAAUK;AACZ,CAAC;"}
1
+ {"version":3,"file":"toggle.js","sources":["../src/components/RsToggle.tsx"],"sourcesContent":["import {boolean, define, disabled, event, oneOf, string} from '@react-form-builder/core'\nimport cx from 'clsx'\nimport type {ToggleProps} from 'rsuite'\nimport {Toggle} from 'rsuite'\nimport {controlColor, readOnly} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport styles from './RsToggle.module.css'\n\nconst RsToggle = ({className, ...props}: ToggleProps) => {\n return <Toggle {...props} className={cx(styles.toggle, className)}/>\n}\n\nexport const rsToggle = define(RsToggle, 'RsToggle')\n .name('Toggle')\n .category(fieldsCategory)\n .props({\n children: string,\n checked: boolean.valued.uncontrolledValue(false),\n checkedChildren: string,\n unCheckedChildren: string,\n disabled: disabled.default(false),\n readOnly,\n size: oneOf('sm', 'md', 'lg')\n .labeled('Small', 'Medium', 'Large')\n .default('md')\n .withEditorProps({creatable: false}),\n color: controlColor,\n loading: boolean.default(false),\n onChange: event,\n })\n"],"names":["RsToggle","className","props","jsx","Toggle","cx","styles","rsToggle","define","fieldsCategory","string","boolean","disabled","readOnly","oneOf","controlColor","event"],"mappings":";;;;;;;;GAQMA,IAAW,CAAC,EAAC,WAAAC,GAAW,GAAGC,QACxB,gBAAAC,EAACC,KAAQ,GAAGF,GAAO,WAAWG,EAAGC,EAAO,QAAQL,CAAS,GAAE,GAGvDM,IAAWC,EAAOR,GAAU,UAAU,EAChD,KAAK,QAAQ,EACb,SAASS,CAAc,EACvB,MAAM;AAAA,EACL,UAAUC;AAAA,EACV,SAASC,EAAQ,OAAO,kBAAkB,EAAK;AAAA,EAC/C,iBAAiBD;AAAA,EACjB,mBAAmBA;AAAA,EACnB,UAAUE,EAAS,QAAQ,EAAK;AAAA,EAChC,UAAAC;AAAA,EACA,MAAMC,EAAM,MAAM,MAAM,IAAI,EACzB,QAAQ,SAAS,UAAU,OAAO,EAClC,QAAQ,IAAI,EACZ,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,OAAOC;AAAA,EACP,SAASJ,EAAQ,QAAQ,EAAK;AAAA,EAC9B,UAAUK;AACZ,CAAC;"}
package/dist/tooltip.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as t } from "@emotion/react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import { define as n, node as p, someOf as s, oneOf as d, string as m } from "@react-form-builder/core";
3
3
  import { useMemo as c } from "react";
4
4
  import { Tooltip as u, Whisper as f } from "rsuite";
package/dist/uploader.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as n } from "@emotion/react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { define as y, event as t, string as o, node as R, array as U, boolean as e, oneOf as x, disabled as E } from "@react-form-builder/core";
3
3
  import { useRef as I, useEffect as C, useMemo as m } from "react";
4
4
  import { Uploader as w } from "rsuite";
@@ -6,8 +6,8 @@ import { a as A, r as P } from "./commonProperties-X-t50qaZ.js";
6
6
  import { s as N } from "./hooks-DMVtrI-b.js";
7
7
  import { f as O } from "./categories-_98lyB3C.js";
8
8
  import { u as T } from "./useTouchOnEvent-BPYbKiku.js";
9
- import { I as s } from "./InputCell-BDyUJFGm.js";
10
- import { L as M } from "./Labeled-BWYRwMiY.js";
9
+ import { I as s } from "./InputCell-tTp9fZXd.js";
10
+ import { L as M } from "./Labeled-8k9VvM4G.js";
11
11
  const S = ({ customElement: p, children: c, disabled: d, multiple: l, fileList: r, className: b, label: h, ...i }) => {
12
12
  const u = I(null), v = T(i, "onRemove");
13
13
  C(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"useTouchOnEvent-BPYbKiku.js","sources":["../src/components/hooks/useTouchOnEvent.ts"],"sourcesContent":["import {useComponentData} from '@react-form-builder/core'\nimport {useCallback} from 'react'\n\n/**\n * A function that accepts arguments and returns void.\n */\nexport type GenericVoidFunction = (...args: any[]) => void\n\n/**\n * Creates a wrapper for a function from the component properties that sets the touched flag for the field.\n * @param props the component properties.\n * @param propertyName the property name containing a function.\n * @template T the component property type.\n * @returns the wrapped function.\n */\nexport const useTouchOnEvent = <T>(props: T, propertyName: keyof T): GenericVoidFunction => {\n const {field} = useComponentData()\n const eventCallback = props[propertyName] as GenericVoidFunction | undefined\n\n return useCallback((e) => {\n field?.setTouched()\n eventCallback?.(e)\n }, [field, eventCallback])\n}\n"],"names":["useTouchOnEvent","props","propertyName","field","useComponentData","eventCallback","useCallback","e"],"mappings":";;AAeO,MAAMA,IAAkB,CAAIC,GAAUC,MAA+C;AAC1F,QAAM,EAAC,OAAAC,EAAA,IAASC,EAAA,GACVC,IAAgBJ,EAAMC,CAAY;AAExC,SAAOI,EAAY,CAACC,MAAM;AACxB,IAAAJ,GAAO,WAAA,GACPE,IAAgBE,CAAC;AAAA,EACnB,GAAG,CAACJ,GAAOE,CAAa,CAAC;AAC3B;"}
1
+ {"version":3,"file":"useTouchOnEvent-BPYbKiku.js","sources":["../src/components/hooks/useTouchOnEvent.ts"],"sourcesContent":["import {useComponentData} from '@react-form-builder/core'\nimport {useCallback} from 'react'\n\n/**\n * A function that accepts arguments and returns void.\n */\ntype GenericVoidFunction = (...args: any[]) => void\n\n/**\n * Creates a wrapper for a function from the component properties that sets the touched flag for the field.\n * @param props the component properties.\n * @param propertyName the property name containing a function.\n * @template T the component property type.\n * @returns the wrapped function.\n */\nexport const useTouchOnEvent = <T>(props: T, propertyName: keyof T): GenericVoidFunction => {\n const {field} = useComponentData()\n const eventCallback = props[propertyName] as GenericVoidFunction | undefined\n\n return useCallback((e) => {\n field?.setTouched()\n eventCallback?.(e)\n }, [field, eventCallback])\n}\n"],"names":["useTouchOnEvent","props","propertyName","field","useComponentData","eventCallback","useCallback","e"],"mappings":";;AAeO,MAAMA,IAAkB,CAAIC,GAAUC,MAA+C;AAC1F,QAAM,EAAC,OAAAC,EAAA,IAASC,EAAA,GACVC,IAAgBJ,EAAMC,CAAY;AAExC,SAAOI,EAAY,CAACC,MAAM;AACxB,IAAAJ,GAAO,WAAA,GACPE,IAAgBE,CAAC;AAAA,EACnB,GAAG,CAACJ,GAAOE,CAAa,CAAC;AAC3B;"}
@@ -1,8 +1,8 @@
1
1
  import { createView as o, BiDi as r } from "@react-form-builder/core";
2
- import { RsLocalizationWrapper as e } from "./localization-wrapper.js";
3
- import { ltrCssLoader as i, rtlCssLoader as s, formEngineRsuiteCssLoader as t } from "./css-loader.js";
4
- import { models as m } from "./models.js";
5
- const w = o(m).withViewerWrapper(e).withCssLoader(r.LTR, i).withCssLoader(r.RTL, s).withCssLoader("common", t);
2
+ import { RsLocalizationWrapper as i } from "./localization-wrapper.js";
3
+ import { ltrCssLoader as e, rtlCssLoader as t } from "./css-loader.js";
4
+ import { models as s } from "./models.js";
5
+ const w = o(s).withViewerWrapper(i).withCssLoader(r.LTR, e).withCssLoader(r.RTL, t);
6
6
  export {
7
7
  w as viewWithCss
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"view-with-css.js","sources":["../src/viewWithCss.ts"],"sourcesContent":["import {BiDi, createView} from '@react-form-builder/core'\nimport {RsLocalizationWrapper} from './components/RsLocalizationWrapper'\nimport {formEngineRsuiteCssLoader, ltrCssLoader, rtlCssLoader} from './cssLoader'\nimport {models} from './models'\n\n/**\n * An assembled set of rSuite components, ready to be passed as a property to the FormViewer.\n * This view contains CSS loaders.\n */\nexport const viewWithCss = createView(models)\n // The following parameters are required for correct CSS loading in LTR and RTL modes\n .withViewerWrapper(RsLocalizationWrapper)\n .withCssLoader(BiDi.LTR, ltrCssLoader)\n .withCssLoader(BiDi.RTL, rtlCssLoader)\n .withCssLoader('common', formEngineRsuiteCssLoader)\n"],"names":["viewWithCss","createView","models","RsLocalizationWrapper","BiDi","ltrCssLoader","rtlCssLoader","formEngineRsuiteCssLoader"],"mappings":";;;;AASO,MAAMA,IAAcC,EAAWC,CAAM,EAEzC,kBAAkBC,CAAqB,EACvC,cAAcC,EAAK,KAAKC,CAAY,EACpC,cAAcD,EAAK,KAAKE,CAAY,EACpC,cAAc,UAAUC,CAAyB;"}
1
+ {"version":3,"file":"view-with-css.js","sources":["../src/viewWithCss.ts"],"sourcesContent":["import {BiDi, createView} from '@react-form-builder/core'\nimport {RsLocalizationWrapper} from './components/RsLocalizationWrapper'\nimport {ltrCssLoader, rtlCssLoader} from './cssLoader'\nimport {models} from './models'\n\n/**\n * An assembled set of rSuite components, ready to be passed as a property to the FormViewer.\n * This view contains CSS loaders.\n */\nexport const viewWithCss = createView(models)\n // The following parameters are required for correct CSS loading in LTR and RTL modes\n .withViewerWrapper(RsLocalizationWrapper)\n .withCssLoader(BiDi.LTR, ltrCssLoader)\n .withCssLoader(BiDi.RTL, rtlCssLoader)\n"],"names":["viewWithCss","createView","models","RsLocalizationWrapper","BiDi","ltrCssLoader","rtlCssLoader"],"mappings":";;;;AASO,MAAMA,IAAcC,EAAWC,CAAM,EAEzC,kBAAkBC,CAAqB,EACvC,cAAcC,EAAK,KAAKC,CAAY,EACpC,cAAcD,EAAK,KAAKE,CAAY;"}
package/dist/wizard.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- import { ClassAttributes } from 'react';
2
1
  import { Definer } from '@react-form-builder/core';
3
- import { HTMLAttributes } from 'react';
4
2
  import { PropsWithChildren } from 'react';
5
3
  import { RefAttributes } from 'react';
6
4
  import { SyntheticEvent } from 'react';
7
- import { Theme } from '@emotion/react';
8
5
 
9
6
  export declare const rsWizard: Definer<Omit<RsWizardProps, "ref"> & RefAttributes<HTMLDivElement>>;
10
7
 
@@ -70,19 +67,20 @@ export declare interface RsWizardProps extends PropsWithChildren<any> {
70
67
  onFinish?: (event: SyntheticEvent) => void;
71
68
  }
72
69
 
73
- export declare const rsWizardStep: Definer< {
74
- theme?: Theme;
75
- as?: React.ElementType;
76
- } & RsWizardStepProps & ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>>;
70
+ export declare const rsWizardStep: Definer<RsWizardStepProps>;
77
71
 
78
72
  /**
79
73
  * Props for the RsWizardStep component.
80
74
  */
81
- declare interface RsWizardStepProps {
75
+ declare interface RsWizardStepProps extends PropsWithChildren<any> {
82
76
  /**
83
77
  * Label for the wizard step.
84
78
  */
85
79
  label?: string;
80
+ /**
81
+ * className for element.
82
+ */
83
+ className?: string;
86
84
  }
87
85
 
88
86
  export { }