@rjsf/fluentui-rc 5.14.2 → 5.15.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/README.md +6 -6
- package/dist/core.umd.js +31 -23
- package/dist/index.esm.js +37 -28
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +88 -79
- package/dist/index.js.map +3 -3
- package/lib/AddButton/AddButton.js +2 -4
- package/lib/AddButton/AddButton.js.map +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +10 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +5 -7
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js +3 -3
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js +2 -2
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/DescriptionField/DescriptionField.js +1 -1
- package/lib/DescriptionField/DescriptionField.js.map +1 -1
- package/lib/ErrorList/ErrorList.js +5 -3
- package/lib/ErrorList/ErrorList.js.map +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +3 -3
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/FieldTemplate/FieldTemplate.js +2 -2
- package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
- package/lib/FluentUIRCFrameProvider.js +2 -2
- package/lib/FluentUIRCFrameProvider.js.map +1 -1
- package/lib/IconButton/IconButton.js +6 -7
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +2 -2
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.js +2 -2
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.js +2 -2
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.js +3 -3
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/SubmitButton/SubmitButton.js +1 -1
- package/lib/SubmitButton/SubmitButton.js.map +1 -1
- package/lib/TextareaWidget/TextareaWidget.js +1 -1
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
- package/lib/TitleField/TitleField.js +1 -1
- package/lib/TitleField/TitleField.js.map +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +3 -3
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +13 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<br />
|
|
8
8
|
<p align="center">
|
|
9
9
|
<a href="https://github.com/rjsf-team/react-jsonschema-form">
|
|
10
|
-
<img src="
|
|
10
|
+
<img src="https://github.com/rjsf-team/react-jsonschema-form/blob/main/packages/fluentui-rc/logo.png?raw=true" alt="Logo" width="120" height="120">
|
|
11
11
|
</a>
|
|
12
12
|
|
|
13
13
|
<h3 align="center">@rjsf/fluentui-rc</h3>
|
|
@@ -120,8 +120,8 @@ GitHub repository: [https://github.com/rjsf-team/react-jsonschema-form](https://
|
|
|
120
120
|
[contributors-url]: https://github.com/rjsf-team/react-jsonschema-form/graphs/contributors
|
|
121
121
|
[license-shield]: https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square
|
|
122
122
|
[license-url]: https://choosealicense.com/licenses/apache-2.0/
|
|
123
|
-
[npm-shield]: https://img.shields.io/npm/v/@rjsf/
|
|
124
|
-
[npm-url]: https://www.npmjs.com/package/@rjsf/
|
|
125
|
-
[npm-dl-shield]: https://img.shields.io/npm/dm/@rjsf/
|
|
126
|
-
[npm-dl-url]: https://www.npmjs.com/package/@rjsf/
|
|
127
|
-
[product-screenshot]: https://
|
|
123
|
+
[npm-shield]: https://img.shields.io/npm/v/@rjsf/fluentui-rc/latest.svg?style=flat-square
|
|
124
|
+
[npm-url]: https://www.npmjs.com/package/@rjsf/fluentui-rc
|
|
125
|
+
[npm-dl-shield]: https://img.shields.io/npm/dm/@rjsf/fluentui-rc.svg?style=flat-square
|
|
126
|
+
[npm-dl-url]: https://www.npmjs.com/package/@rjsf/fluentui-rc
|
|
127
|
+
[product-screenshot]: https://github.com/rjsf-team/react-jsonschema-form/blob/main/packages/fluentui-rc/screenshot.png?raw=true
|
package/dist/core.umd.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('@fluentui/react-migration-v0-v9'), require('react
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', '@fluentui/react-migration-v0-v9', 'react/jsx-runtime', '@rjsf/utils', '@fluentui/react-
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JSONSchemaForm = {}, global.core, global.reactMigrationV0V9, global.
|
|
5
|
-
})(this, (function (exports, core, reactMigrationV0V9, jsxRuntime, utils,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@rjsf/core'), require('@fluentui/react-migration-v0-v9'), require('@fluentui/react-components'), require('react/jsx-runtime'), require('@rjsf/utils'), require('@fluentui/react-icons'), require('react')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@rjsf/core', '@fluentui/react-migration-v0-v9', '@fluentui/react-components', 'react/jsx-runtime', '@rjsf/utils', '@fluentui/react-icons', 'react'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JSONSchemaForm = {}, global.core, global.reactMigrationV0V9, global.reactComponents, global.jsxRuntime, global.utils, global.reactIcons, global.react));
|
|
5
|
+
})(this, (function (exports, core, reactMigrationV0V9, reactComponents, jsxRuntime, utils, reactIcons, react) { 'use strict';
|
|
6
6
|
|
|
7
7
|
// src/FluentForm/FluentForm.ts
|
|
8
|
+
var useStyles = reactComponents.makeStyles({
|
|
9
|
+
arrayFieldItem: {
|
|
10
|
+
"> .form-group": {
|
|
11
|
+
width: "100%"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
8
15
|
function ArrayFieldItemTemplate(props) {
|
|
9
16
|
const {
|
|
10
17
|
children,
|
|
@@ -22,9 +29,10 @@
|
|
|
22
29
|
uiSchema,
|
|
23
30
|
registry
|
|
24
31
|
} = props;
|
|
32
|
+
const classes = useStyles();
|
|
25
33
|
const { CopyButton: CopyButton2, MoveDownButton: MoveDownButton2, MoveUpButton: MoveUpButton2, RemoveButton: RemoveButton2 } = registry.templates.ButtonTemplates;
|
|
26
34
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactMigrationV0V9.Flex, { vAlign: "end", children: [
|
|
27
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactMigrationV0V9.Flex, { children }),
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactMigrationV0V9.Flex, { fill: true, className: classes.arrayFieldItem, children }),
|
|
28
36
|
hasToolbar && /* @__PURE__ */ jsxRuntime.jsxs(reactMigrationV0V9.Flex, { style: { marginLeft: "8px" }, children: [
|
|
29
37
|
(hasMoveUp || hasMoveDown) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
38
|
MoveUpButton2,
|
|
@@ -73,14 +81,14 @@
|
|
|
73
81
|
const { translateString } = registry;
|
|
74
82
|
return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Button, { ...props, icon: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.AddRegular, {}), title: translateString(utils.TranslatableString.AddItemButton) });
|
|
75
83
|
}
|
|
76
|
-
var
|
|
84
|
+
var useStyles2 = reactComponents.makeStyles({
|
|
77
85
|
arrayItemList: {
|
|
78
86
|
...reactComponents.shorthands.gap("12px")
|
|
79
87
|
}
|
|
80
88
|
});
|
|
81
89
|
function ArrayFieldTemplate(props) {
|
|
82
90
|
const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
|
|
83
|
-
const classes =
|
|
91
|
+
const classes = useStyles2();
|
|
84
92
|
const uiOptions = utils.getUiOptions(uiSchema);
|
|
85
93
|
const ArrayFieldDescriptionTemplate = utils.getTemplate(
|
|
86
94
|
"ArrayFieldDescriptionTemplate",
|
|
@@ -137,7 +145,7 @@
|
|
|
137
145
|
] }, `array-item-list-${idSchema.$id}`)
|
|
138
146
|
] });
|
|
139
147
|
}
|
|
140
|
-
var
|
|
148
|
+
var useStyles3 = reactComponents.makeStyles({
|
|
141
149
|
input: {
|
|
142
150
|
width: "100%"
|
|
143
151
|
},
|
|
@@ -166,7 +174,7 @@
|
|
|
166
174
|
options,
|
|
167
175
|
schema
|
|
168
176
|
} = props;
|
|
169
|
-
const classes =
|
|
177
|
+
const classes = useStyles3();
|
|
170
178
|
const inputProps = utils.getInputProps(schema, type, options);
|
|
171
179
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
172
180
|
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
@@ -203,7 +211,7 @@
|
|
|
203
211
|
}) })
|
|
204
212
|
] });
|
|
205
213
|
}
|
|
206
|
-
var
|
|
214
|
+
var useStyles4 = reactComponents.makeStyles({
|
|
207
215
|
label: {
|
|
208
216
|
marginTop: reactComponents.tokens.spacingVerticalS,
|
|
209
217
|
marginBottom: reactComponents.tokens.spacingVerticalM
|
|
@@ -211,13 +219,13 @@
|
|
|
211
219
|
});
|
|
212
220
|
function DescriptionField(props) {
|
|
213
221
|
const { id, description } = props;
|
|
214
|
-
const classes =
|
|
222
|
+
const classes = useStyles4();
|
|
215
223
|
if (description) {
|
|
216
224
|
return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Text, { block: true, id, className: classes.label, children: description });
|
|
217
225
|
}
|
|
218
226
|
return null;
|
|
219
227
|
}
|
|
220
|
-
var
|
|
228
|
+
var useStyles5 = reactComponents.makeStyles({
|
|
221
229
|
errorCard: {
|
|
222
230
|
backgroundColor: reactComponents.tokens.colorStatusDangerBackground1,
|
|
223
231
|
marginBottom: reactComponents.tokens.spacingVerticalL,
|
|
@@ -235,7 +243,7 @@
|
|
|
235
243
|
registry
|
|
236
244
|
}) {
|
|
237
245
|
const { translateString } = registry;
|
|
238
|
-
const classes =
|
|
246
|
+
const classes = useStyles5();
|
|
239
247
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { appearance: "outline", className: classes.errorCard, children: [
|
|
240
248
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Text, { as: "h6", size: 400, className: classes.errorTitle, children: translateString(utils.TranslatableString.ErrorsLabel) }),
|
|
241
249
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { children: errors.map((error, i) => {
|
|
@@ -299,7 +307,7 @@
|
|
|
299
307
|
}
|
|
300
308
|
);
|
|
301
309
|
}
|
|
302
|
-
var
|
|
310
|
+
var useStyles6 = reactComponents.makeStyles({
|
|
303
311
|
list: { marginTop: 0, marginBottom: 0, paddingLeft: 0, listStyleType: "none" },
|
|
304
312
|
listItem: {
|
|
305
313
|
paddingLeft: reactComponents.tokens.spacingHorizontalL,
|
|
@@ -310,7 +318,7 @@
|
|
|
310
318
|
});
|
|
311
319
|
function FieldErrorTemplate(props) {
|
|
312
320
|
const { errors = [], idSchema } = props;
|
|
313
|
-
const classes =
|
|
321
|
+
const classes = useStyles6();
|
|
314
322
|
if (errors.length === 0) {
|
|
315
323
|
return null;
|
|
316
324
|
}
|
|
@@ -451,20 +459,20 @@
|
|
|
451
459
|
] })
|
|
452
460
|
] });
|
|
453
461
|
}
|
|
454
|
-
var
|
|
462
|
+
var useStyles7 = reactComponents.makeStyles({
|
|
455
463
|
buttonRow: {
|
|
456
464
|
marginTop: reactComponents.tokens.spacingVerticalL
|
|
457
465
|
}
|
|
458
466
|
});
|
|
459
467
|
function SubmitButton({ uiSchema }) {
|
|
460
|
-
const classes =
|
|
468
|
+
const classes = useStyles7();
|
|
461
469
|
const { submitText, norender, props: submitButtonProps } = utils.getSubmitButtonOptions(uiSchema);
|
|
462
470
|
if (norender) {
|
|
463
471
|
return null;
|
|
464
472
|
}
|
|
465
473
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.buttonRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Button, { appearance: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
|
|
466
474
|
}
|
|
467
|
-
var
|
|
475
|
+
var useStyles8 = reactComponents.makeStyles({
|
|
468
476
|
root: {
|
|
469
477
|
marginTop: "8px",
|
|
470
478
|
marginBottom: "8px"
|
|
@@ -474,13 +482,13 @@
|
|
|
474
482
|
id,
|
|
475
483
|
title
|
|
476
484
|
}) {
|
|
477
|
-
const classes =
|
|
485
|
+
const classes = useStyles8();
|
|
478
486
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { id, className: classes.root, children: [
|
|
479
487
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Text, { as: "h5", size: 600, children: title }),
|
|
480
488
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {})
|
|
481
489
|
] });
|
|
482
490
|
}
|
|
483
|
-
var
|
|
491
|
+
var useStyles9 = reactComponents.makeStyles({
|
|
484
492
|
input: {
|
|
485
493
|
width: "100%"
|
|
486
494
|
},
|
|
@@ -505,7 +513,7 @@
|
|
|
505
513
|
registry
|
|
506
514
|
} = props;
|
|
507
515
|
const { templates, translateString } = registry;
|
|
508
|
-
const classes =
|
|
516
|
+
const classes = useStyles9();
|
|
509
517
|
const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
|
|
510
518
|
const keyLabel = translateString(utils.TranslatableString.KeyLabel, [label]);
|
|
511
519
|
const additional = utils.ADDITIONAL_PROPERTY_FLAG in schema;
|
|
@@ -827,7 +835,7 @@
|
|
|
827
835
|
);
|
|
828
836
|
}
|
|
829
837
|
var SelectWidget_default = SelectWidget;
|
|
830
|
-
var
|
|
838
|
+
var useStyles10 = reactComponents.makeStyles({
|
|
831
839
|
label: {
|
|
832
840
|
paddingTop: "2px",
|
|
833
841
|
paddingBottom: "2px",
|
|
@@ -852,7 +860,7 @@
|
|
|
852
860
|
options,
|
|
853
861
|
schema
|
|
854
862
|
} = props;
|
|
855
|
-
const classes =
|
|
863
|
+
const classes = useStyles10();
|
|
856
864
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
857
865
|
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
858
866
|
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,15 @@ import { withTheme } from "@rjsf/core";
|
|
|
3
3
|
|
|
4
4
|
// src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx
|
|
5
5
|
import { Flex } from "@fluentui/react-migration-v0-v9";
|
|
6
|
+
import { makeStyles } from "@fluentui/react-components";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
var useStyles = makeStyles({
|
|
9
|
+
arrayFieldItem: {
|
|
10
|
+
"> .form-group": {
|
|
11
|
+
width: "100%"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
7
15
|
function ArrayFieldItemTemplate(props) {
|
|
8
16
|
const {
|
|
9
17
|
children,
|
|
@@ -21,9 +29,10 @@ function ArrayFieldItemTemplate(props) {
|
|
|
21
29
|
uiSchema,
|
|
22
30
|
registry
|
|
23
31
|
} = props;
|
|
32
|
+
const classes = useStyles();
|
|
24
33
|
const { CopyButton: CopyButton2, MoveDownButton: MoveDownButton2, MoveUpButton: MoveUpButton2, RemoveButton: RemoveButton2 } = registry.templates.ButtonTemplates;
|
|
25
34
|
return /* @__PURE__ */ jsxs(Flex, { vAlign: "end", children: [
|
|
26
|
-
/* @__PURE__ */ jsx(Flex, { children }),
|
|
35
|
+
/* @__PURE__ */ jsx(Flex, { fill: true, className: classes.arrayFieldItem, children }),
|
|
27
36
|
hasToolbar && /* @__PURE__ */ jsxs(Flex, { style: { marginLeft: "8px" }, children: [
|
|
28
37
|
(hasMoveUp || hasMoveDown) && /* @__PURE__ */ jsx(
|
|
29
38
|
MoveUpButton2,
|
|
@@ -80,21 +89,21 @@ function AddButton({
|
|
|
80
89
|
}
|
|
81
90
|
|
|
82
91
|
// src/ArrayFieldTemplate/ArrayFieldTemplate.tsx
|
|
83
|
-
import { makeStyles, shorthands } from "@fluentui/react-components";
|
|
92
|
+
import { makeStyles as makeStyles2, shorthands } from "@fluentui/react-components";
|
|
84
93
|
import { Flex as Flex2 } from "@fluentui/react-migration-v0-v9";
|
|
85
94
|
import {
|
|
86
95
|
getTemplate,
|
|
87
96
|
getUiOptions
|
|
88
97
|
} from "@rjsf/utils";
|
|
89
98
|
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
90
|
-
var
|
|
99
|
+
var useStyles2 = makeStyles2({
|
|
91
100
|
arrayItemList: {
|
|
92
101
|
...shorthands.gap("12px")
|
|
93
102
|
}
|
|
94
103
|
});
|
|
95
104
|
function ArrayFieldTemplate(props) {
|
|
96
105
|
const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
|
|
97
|
-
const classes =
|
|
106
|
+
const classes = useStyles2();
|
|
98
107
|
const uiOptions = getUiOptions(uiSchema);
|
|
99
108
|
const ArrayFieldDescriptionTemplate = getTemplate(
|
|
100
109
|
"ArrayFieldDescriptionTemplate",
|
|
@@ -153,7 +162,7 @@ function ArrayFieldTemplate(props) {
|
|
|
153
162
|
}
|
|
154
163
|
|
|
155
164
|
// src/BaseInputTemplate/BaseInputTemplate.tsx
|
|
156
|
-
import { Input, Label, makeStyles as
|
|
165
|
+
import { Input, Label, makeStyles as makeStyles3 } from "@fluentui/react-components";
|
|
157
166
|
import {
|
|
158
167
|
ariaDescribedByIds,
|
|
159
168
|
examplesId,
|
|
@@ -161,7 +170,7 @@ import {
|
|
|
161
170
|
labelValue
|
|
162
171
|
} from "@rjsf/utils";
|
|
163
172
|
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
164
|
-
var
|
|
173
|
+
var useStyles3 = makeStyles3({
|
|
165
174
|
input: {
|
|
166
175
|
width: "100%"
|
|
167
176
|
},
|
|
@@ -190,7 +199,7 @@ function BaseInputTemplate(props) {
|
|
|
190
199
|
options,
|
|
191
200
|
schema
|
|
192
201
|
} = props;
|
|
193
|
-
const classes =
|
|
202
|
+
const classes = useStyles3();
|
|
194
203
|
const inputProps = getInputProps(schema, type, options);
|
|
195
204
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
196
205
|
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
@@ -229,9 +238,9 @@ function BaseInputTemplate(props) {
|
|
|
229
238
|
}
|
|
230
239
|
|
|
231
240
|
// src/DescriptionField/DescriptionField.tsx
|
|
232
|
-
import { Text, makeStyles as
|
|
241
|
+
import { Text, makeStyles as makeStyles4, tokens } from "@fluentui/react-components";
|
|
233
242
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
234
|
-
var
|
|
243
|
+
var useStyles4 = makeStyles4({
|
|
235
244
|
label: {
|
|
236
245
|
marginTop: tokens.spacingVerticalS,
|
|
237
246
|
marginBottom: tokens.spacingVerticalM
|
|
@@ -239,7 +248,7 @@ var useStyles3 = makeStyles3({
|
|
|
239
248
|
});
|
|
240
249
|
function DescriptionField(props) {
|
|
241
250
|
const { id, description } = props;
|
|
242
|
-
const classes =
|
|
251
|
+
const classes = useStyles4();
|
|
243
252
|
if (description) {
|
|
244
253
|
return /* @__PURE__ */ jsx5(Text, { block: true, id, className: classes.label, children: description });
|
|
245
254
|
}
|
|
@@ -247,10 +256,10 @@ function DescriptionField(props) {
|
|
|
247
256
|
}
|
|
248
257
|
|
|
249
258
|
// src/ErrorList/ErrorList.tsx
|
|
250
|
-
import { Card, Text as Text2, makeStyles as
|
|
259
|
+
import { Card, Text as Text2, makeStyles as makeStyles5, shorthands as shorthands2, tokens as tokens2 } from "@fluentui/react-components";
|
|
251
260
|
import { TranslatableString as TranslatableString2 } from "@rjsf/utils";
|
|
252
261
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
253
|
-
var
|
|
262
|
+
var useStyles5 = makeStyles5({
|
|
254
263
|
errorCard: {
|
|
255
264
|
backgroundColor: tokens2.colorStatusDangerBackground1,
|
|
256
265
|
marginBottom: tokens2.spacingVerticalL,
|
|
@@ -268,7 +277,7 @@ function ErrorList({
|
|
|
268
277
|
registry
|
|
269
278
|
}) {
|
|
270
279
|
const { translateString } = registry;
|
|
271
|
-
const classes =
|
|
280
|
+
const classes = useStyles5();
|
|
272
281
|
return /* @__PURE__ */ jsxs4(Card, { appearance: "outline", className: classes.errorCard, children: [
|
|
273
282
|
/* @__PURE__ */ jsx6(Text2, { as: "h6", size: 400, className: classes.errorTitle, children: translateString(TranslatableString2.ErrorsLabel) }),
|
|
274
283
|
/* @__PURE__ */ jsx6("ul", { children: errors.map((error, i) => {
|
|
@@ -340,10 +349,10 @@ function RemoveButton(props) {
|
|
|
340
349
|
}
|
|
341
350
|
|
|
342
351
|
// src/FieldErrorTemplate/FieldErrorTemplate.tsx
|
|
343
|
-
import { makeStyles as
|
|
352
|
+
import { makeStyles as makeStyles6, tokens as tokens3 } from "@fluentui/react-components";
|
|
344
353
|
import { errorId } from "@rjsf/utils";
|
|
345
354
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
346
|
-
var
|
|
355
|
+
var useStyles6 = makeStyles6({
|
|
347
356
|
list: { marginTop: 0, marginBottom: 0, paddingLeft: 0, listStyleType: "none" },
|
|
348
357
|
listItem: {
|
|
349
358
|
paddingLeft: tokens3.spacingHorizontalL,
|
|
@@ -354,7 +363,7 @@ var useStyles5 = makeStyles5({
|
|
|
354
363
|
});
|
|
355
364
|
function FieldErrorTemplate(props) {
|
|
356
365
|
const { errors = [], idSchema } = props;
|
|
357
|
-
const classes =
|
|
366
|
+
const classes = useStyles6();
|
|
358
367
|
if (errors.length === 0) {
|
|
359
368
|
return null;
|
|
360
369
|
}
|
|
@@ -522,15 +531,15 @@ function ObjectFieldTemplate(props) {
|
|
|
522
531
|
|
|
523
532
|
// src/SubmitButton/SubmitButton.tsx
|
|
524
533
|
import { getSubmitButtonOptions } from "@rjsf/utils";
|
|
525
|
-
import { Button as Button3, makeStyles as
|
|
534
|
+
import { Button as Button3, makeStyles as makeStyles7, tokens as tokens4 } from "@fluentui/react-components";
|
|
526
535
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
527
|
-
var
|
|
536
|
+
var useStyles7 = makeStyles7({
|
|
528
537
|
buttonRow: {
|
|
529
538
|
marginTop: tokens4.spacingVerticalL
|
|
530
539
|
}
|
|
531
540
|
});
|
|
532
541
|
function SubmitButton({ uiSchema }) {
|
|
533
|
-
const classes =
|
|
542
|
+
const classes = useStyles7();
|
|
534
543
|
const { submitText, norender, props: submitButtonProps } = getSubmitButtonOptions(uiSchema);
|
|
535
544
|
if (norender) {
|
|
536
545
|
return null;
|
|
@@ -539,9 +548,9 @@ function SubmitButton({ uiSchema }) {
|
|
|
539
548
|
}
|
|
540
549
|
|
|
541
550
|
// src/TitleField/TitleField.tsx
|
|
542
|
-
import { Text as Text4, Divider, makeStyles as
|
|
551
|
+
import { Text as Text4, Divider, makeStyles as makeStyles8 } from "@fluentui/react-components";
|
|
543
552
|
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
544
|
-
var
|
|
553
|
+
var useStyles8 = makeStyles8({
|
|
545
554
|
root: {
|
|
546
555
|
marginTop: "8px",
|
|
547
556
|
marginBottom: "8px"
|
|
@@ -551,7 +560,7 @@ function TitleField({
|
|
|
551
560
|
id,
|
|
552
561
|
title
|
|
553
562
|
}) {
|
|
554
|
-
const classes =
|
|
563
|
+
const classes = useStyles8();
|
|
555
564
|
return /* @__PURE__ */ jsxs7("div", { id, className: classes.root, children: [
|
|
556
565
|
/* @__PURE__ */ jsx13(Text4, { as: "h5", size: 600, children: title }),
|
|
557
566
|
/* @__PURE__ */ jsx13(Divider, {})
|
|
@@ -563,10 +572,10 @@ import {
|
|
|
563
572
|
ADDITIONAL_PROPERTY_FLAG,
|
|
564
573
|
TranslatableString as TranslatableString4
|
|
565
574
|
} from "@rjsf/utils";
|
|
566
|
-
import { Field as Field2, Input as Input2, makeStyles as
|
|
575
|
+
import { Field as Field2, Input as Input2, makeStyles as makeStyles9 } from "@fluentui/react-components";
|
|
567
576
|
import { Flex as Flex4 } from "@fluentui/react-migration-v0-v9";
|
|
568
577
|
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
569
|
-
var
|
|
578
|
+
var useStyles9 = makeStyles9({
|
|
570
579
|
input: {
|
|
571
580
|
width: "100%"
|
|
572
581
|
},
|
|
@@ -591,7 +600,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
591
600
|
registry
|
|
592
601
|
} = props;
|
|
593
602
|
const { templates, translateString } = registry;
|
|
594
|
-
const classes =
|
|
603
|
+
const classes = useStyles9();
|
|
595
604
|
const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
|
|
596
605
|
const keyLabel = translateString(TranslatableString4.KeyLabel, [label]);
|
|
597
606
|
const additional = ADDITIONAL_PROPERTY_FLAG in schema;
|
|
@@ -969,13 +978,13 @@ function SelectWidget({
|
|
|
969
978
|
var SelectWidget_default = SelectWidget;
|
|
970
979
|
|
|
971
980
|
// src/TextareaWidget/TextareaWidget.tsx
|
|
972
|
-
import { Label as Label5, Textarea, makeStyles as
|
|
981
|
+
import { Label as Label5, Textarea, makeStyles as makeStyles10 } from "@fluentui/react-components";
|
|
973
982
|
import {
|
|
974
983
|
ariaDescribedByIds as ariaDescribedByIds7,
|
|
975
984
|
labelValue as labelValue6
|
|
976
985
|
} from "@rjsf/utils";
|
|
977
986
|
import { Fragment as Fragment8, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
978
|
-
var
|
|
987
|
+
var useStyles10 = makeStyles10({
|
|
979
988
|
label: {
|
|
980
989
|
paddingTop: "2px",
|
|
981
990
|
paddingBottom: "2px",
|
|
@@ -1000,7 +1009,7 @@ function TextareaWidget(props) {
|
|
|
1000
1009
|
options,
|
|
1001
1010
|
schema
|
|
1002
1011
|
} = props;
|
|
1003
|
-
const classes =
|
|
1012
|
+
const classes = useStyles10();
|
|
1004
1013
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
1005
1014
|
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
1006
1015
|
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|