@rjsf/fluentui-rc 5.14.2 → 5.14.3
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/dist/index.js
CHANGED
|
@@ -38,7 +38,15 @@ var import_core = require("@rjsf/core");
|
|
|
38
38
|
|
|
39
39
|
// src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx
|
|
40
40
|
var import_react_migration_v0_v9 = require("@fluentui/react-migration-v0-v9");
|
|
41
|
+
var import_react_components = require("@fluentui/react-components");
|
|
41
42
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
var useStyles = (0, import_react_components.makeStyles)({
|
|
44
|
+
arrayFieldItem: {
|
|
45
|
+
"> .form-group": {
|
|
46
|
+
width: "100%"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
42
50
|
function ArrayFieldItemTemplate(props) {
|
|
43
51
|
const {
|
|
44
52
|
children,
|
|
@@ -56,9 +64,10 @@ function ArrayFieldItemTemplate(props) {
|
|
|
56
64
|
uiSchema,
|
|
57
65
|
registry
|
|
58
66
|
} = props;
|
|
67
|
+
const classes = useStyles();
|
|
59
68
|
const { CopyButton: CopyButton2, MoveDownButton: MoveDownButton2, MoveUpButton: MoveUpButton2, RemoveButton: RemoveButton2 } = registry.templates.ButtonTemplates;
|
|
60
69
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_migration_v0_v9.Flex, { vAlign: "end", children: [
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_migration_v0_v9.Flex, { children }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_migration_v0_v9.Flex, { fill: true, className: classes.arrayFieldItem, children }),
|
|
62
71
|
hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_migration_v0_v9.Flex, { style: { marginLeft: "8px" }, children: [
|
|
63
72
|
(hasMoveUp || hasMoveDown) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
73
|
MoveUpButton2,
|
|
@@ -102,7 +111,7 @@ function ArrayFieldItemTemplate(props) {
|
|
|
102
111
|
|
|
103
112
|
// src/AddButton/AddButton.tsx
|
|
104
113
|
var import_utils = require("@rjsf/utils");
|
|
105
|
-
var
|
|
114
|
+
var import_react_components2 = require("@fluentui/react-components");
|
|
106
115
|
var import_react_icons = require("@fluentui/react-icons");
|
|
107
116
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
108
117
|
function AddButton({
|
|
@@ -111,22 +120,22 @@ function AddButton({
|
|
|
111
120
|
...props
|
|
112
121
|
}) {
|
|
113
122
|
const { translateString } = registry;
|
|
114
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_components2.Button, { ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_icons.AddRegular, {}), title: translateString(import_utils.TranslatableString.AddItemButton) });
|
|
115
124
|
}
|
|
116
125
|
|
|
117
126
|
// src/ArrayFieldTemplate/ArrayFieldTemplate.tsx
|
|
118
|
-
var
|
|
127
|
+
var import_react_components3 = require("@fluentui/react-components");
|
|
119
128
|
var import_react_migration_v0_v92 = require("@fluentui/react-migration-v0-v9");
|
|
120
129
|
var import_utils2 = require("@rjsf/utils");
|
|
121
130
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
122
|
-
var
|
|
131
|
+
var useStyles2 = (0, import_react_components3.makeStyles)({
|
|
123
132
|
arrayItemList: {
|
|
124
|
-
...
|
|
133
|
+
...import_react_components3.shorthands.gap("12px")
|
|
125
134
|
}
|
|
126
135
|
});
|
|
127
136
|
function ArrayFieldTemplate(props) {
|
|
128
137
|
const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
|
|
129
|
-
const classes =
|
|
138
|
+
const classes = useStyles2();
|
|
130
139
|
const uiOptions = (0, import_utils2.getUiOptions)(uiSchema);
|
|
131
140
|
const ArrayFieldDescriptionTemplate = (0, import_utils2.getTemplate)(
|
|
132
141
|
"ArrayFieldDescriptionTemplate",
|
|
@@ -185,10 +194,10 @@ function ArrayFieldTemplate(props) {
|
|
|
185
194
|
}
|
|
186
195
|
|
|
187
196
|
// src/BaseInputTemplate/BaseInputTemplate.tsx
|
|
188
|
-
var
|
|
197
|
+
var import_react_components4 = require("@fluentui/react-components");
|
|
189
198
|
var import_utils3 = require("@rjsf/utils");
|
|
190
199
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
191
|
-
var
|
|
200
|
+
var useStyles3 = (0, import_react_components4.makeStyles)({
|
|
192
201
|
input: {
|
|
193
202
|
width: "100%"
|
|
194
203
|
},
|
|
@@ -217,18 +226,18 @@ function BaseInputTemplate(props) {
|
|
|
217
226
|
options,
|
|
218
227
|
schema
|
|
219
228
|
} = props;
|
|
220
|
-
const classes =
|
|
229
|
+
const classes = useStyles3();
|
|
221
230
|
const inputProps = (0, import_utils3.getInputProps)(schema, type, options);
|
|
222
231
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
223
232
|
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
224
233
|
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
225
234
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
226
235
|
(0, import_utils3.labelValue)(
|
|
227
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
236
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_components4.Label, { htmlFor: id, required, disabled, className: classes.label, children: label }),
|
|
228
237
|
hideLabel
|
|
229
238
|
),
|
|
230
239
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
231
|
-
|
|
240
|
+
import_react_components4.Input,
|
|
232
241
|
{
|
|
233
242
|
id,
|
|
234
243
|
name: id,
|
|
@@ -256,33 +265,33 @@ function BaseInputTemplate(props) {
|
|
|
256
265
|
}
|
|
257
266
|
|
|
258
267
|
// src/DescriptionField/DescriptionField.tsx
|
|
259
|
-
var
|
|
268
|
+
var import_react_components5 = require("@fluentui/react-components");
|
|
260
269
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
261
|
-
var
|
|
270
|
+
var useStyles4 = (0, import_react_components5.makeStyles)({
|
|
262
271
|
label: {
|
|
263
|
-
marginTop:
|
|
264
|
-
marginBottom:
|
|
272
|
+
marginTop: import_react_components5.tokens.spacingVerticalS,
|
|
273
|
+
marginBottom: import_react_components5.tokens.spacingVerticalM
|
|
265
274
|
}
|
|
266
275
|
});
|
|
267
276
|
function DescriptionField(props) {
|
|
268
277
|
const { id, description } = props;
|
|
269
|
-
const classes =
|
|
278
|
+
const classes = useStyles4();
|
|
270
279
|
if (description) {
|
|
271
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_components5.Text, { block: true, id, className: classes.label, children: description });
|
|
272
281
|
}
|
|
273
282
|
return null;
|
|
274
283
|
}
|
|
275
284
|
|
|
276
285
|
// src/ErrorList/ErrorList.tsx
|
|
277
|
-
var
|
|
286
|
+
var import_react_components6 = require("@fluentui/react-components");
|
|
278
287
|
var import_utils4 = require("@rjsf/utils");
|
|
279
288
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
280
|
-
var
|
|
289
|
+
var useStyles5 = (0, import_react_components6.makeStyles)({
|
|
281
290
|
errorCard: {
|
|
282
|
-
backgroundColor:
|
|
283
|
-
marginBottom:
|
|
291
|
+
backgroundColor: import_react_components6.tokens.colorStatusDangerBackground1,
|
|
292
|
+
marginBottom: import_react_components6.tokens.spacingVerticalL,
|
|
284
293
|
"&::after": {
|
|
285
|
-
...
|
|
294
|
+
...import_react_components6.shorthands.borderColor(import_react_components6.tokens.colorStatusDangerBorder1)
|
|
286
295
|
}
|
|
287
296
|
},
|
|
288
297
|
errorTitle: {
|
|
@@ -295,9 +304,9 @@ function ErrorList({
|
|
|
295
304
|
registry
|
|
296
305
|
}) {
|
|
297
306
|
const { translateString } = registry;
|
|
298
|
-
const classes =
|
|
299
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
300
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
307
|
+
const classes = useStyles5();
|
|
308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_components6.Card, { appearance: "outline", className: classes.errorCard, children: [
|
|
309
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_components6.Text, { as: "h6", size: 400, className: classes.errorTitle, children: translateString(import_utils4.TranslatableString.ErrorsLabel) }),
|
|
301
310
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { children: errors.map((error, i) => {
|
|
302
311
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("li", { children: error.stack }, i);
|
|
303
312
|
}) })
|
|
@@ -305,13 +314,13 @@ function ErrorList({
|
|
|
305
314
|
}
|
|
306
315
|
|
|
307
316
|
// src/IconButton/IconButton.tsx
|
|
308
|
-
var
|
|
317
|
+
var import_react_components7 = require("@fluentui/react-components");
|
|
309
318
|
var import_react_icons2 = require("@fluentui/react-icons");
|
|
310
319
|
var import_utils5 = require("@rjsf/utils");
|
|
311
320
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
312
321
|
function FluentIconButton(props) {
|
|
313
322
|
const { color, uiSchema, registry, ...otherProps } = props;
|
|
314
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_components7.Button, { ...otherProps, color: "secondary" });
|
|
315
324
|
}
|
|
316
325
|
function CopyButton(props) {
|
|
317
326
|
const {
|
|
@@ -367,21 +376,21 @@ function RemoveButton(props) {
|
|
|
367
376
|
}
|
|
368
377
|
|
|
369
378
|
// src/FieldErrorTemplate/FieldErrorTemplate.tsx
|
|
370
|
-
var
|
|
379
|
+
var import_react_components8 = require("@fluentui/react-components");
|
|
371
380
|
var import_utils6 = require("@rjsf/utils");
|
|
372
381
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
373
|
-
var
|
|
382
|
+
var useStyles6 = (0, import_react_components8.makeStyles)({
|
|
374
383
|
list: { marginTop: 0, marginBottom: 0, paddingLeft: 0, listStyleType: "none" },
|
|
375
384
|
listItem: {
|
|
376
|
-
paddingLeft:
|
|
377
|
-
paddingTop:
|
|
378
|
-
paddingBottom:
|
|
385
|
+
paddingLeft: import_react_components8.tokens.spacingHorizontalL,
|
|
386
|
+
paddingTop: import_react_components8.tokens.spacingVerticalXS,
|
|
387
|
+
paddingBottom: import_react_components8.tokens.spacingVerticalXS
|
|
379
388
|
},
|
|
380
|
-
errorLabel: { color:
|
|
389
|
+
errorLabel: { color: import_react_components8.tokens.colorPaletteRedForeground1 }
|
|
381
390
|
});
|
|
382
391
|
function FieldErrorTemplate(props) {
|
|
383
392
|
const { errors = [], idSchema } = props;
|
|
384
|
-
const classes =
|
|
393
|
+
const classes = useStyles6();
|
|
385
394
|
if (errors.length === 0) {
|
|
386
395
|
return null;
|
|
387
396
|
}
|
|
@@ -392,7 +401,7 @@ function FieldErrorTemplate(props) {
|
|
|
392
401
|
}
|
|
393
402
|
|
|
394
403
|
// src/FieldHelpTemplate/FieldHelpTemplate.tsx
|
|
395
|
-
var
|
|
404
|
+
var import_react_components9 = require("@fluentui/react-components");
|
|
396
405
|
var import_utils7 = require("@rjsf/utils");
|
|
397
406
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
398
407
|
function FieldHelpTemplate(props) {
|
|
@@ -401,11 +410,11 @@ function FieldHelpTemplate(props) {
|
|
|
401
410
|
return null;
|
|
402
411
|
}
|
|
403
412
|
const id = (0, import_utils7.helpId)(idSchema);
|
|
404
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_components9.Caption1, { id, children: help });
|
|
405
414
|
}
|
|
406
415
|
|
|
407
416
|
// src/FieldTemplate/FieldTemplate.tsx
|
|
408
|
-
var
|
|
417
|
+
var import_react_components10 = require("@fluentui/react-components");
|
|
409
418
|
var import_utils8 = require("@rjsf/utils");
|
|
410
419
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
411
420
|
function FieldTemplate(props) {
|
|
@@ -455,9 +464,9 @@ function FieldTemplate(props) {
|
|
|
455
464
|
schema,
|
|
456
465
|
uiSchema,
|
|
457
466
|
registry,
|
|
458
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_components10.Field, { validationState: rawErrors.length ? "error" : void 0, required, children: [
|
|
459
468
|
children,
|
|
460
|
-
displayLabel && rawDescription ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
469
|
+
displayLabel && rawDescription ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_components10.Text, { as: "p", block: true, style: { marginTop: 0, marginBottom: 0 }, children: description }) : null,
|
|
461
470
|
errors,
|
|
462
471
|
help
|
|
463
472
|
] })
|
|
@@ -540,26 +549,26 @@ function ObjectFieldTemplate(props) {
|
|
|
540
549
|
|
|
541
550
|
// src/SubmitButton/SubmitButton.tsx
|
|
542
551
|
var import_utils10 = require("@rjsf/utils");
|
|
543
|
-
var
|
|
552
|
+
var import_react_components11 = require("@fluentui/react-components");
|
|
544
553
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
545
|
-
var
|
|
554
|
+
var useStyles7 = (0, import_react_components11.makeStyles)({
|
|
546
555
|
buttonRow: {
|
|
547
|
-
marginTop:
|
|
556
|
+
marginTop: import_react_components11.tokens.spacingVerticalL
|
|
548
557
|
}
|
|
549
558
|
});
|
|
550
559
|
function SubmitButton({ uiSchema }) {
|
|
551
|
-
const classes =
|
|
560
|
+
const classes = useStyles7();
|
|
552
561
|
const { submitText, norender, props: submitButtonProps } = (0, import_utils10.getSubmitButtonOptions)(uiSchema);
|
|
553
562
|
if (norender) {
|
|
554
563
|
return null;
|
|
555
564
|
}
|
|
556
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: classes.buttonRow, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: classes.buttonRow, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_components11.Button, { appearance: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
|
|
557
566
|
}
|
|
558
567
|
|
|
559
568
|
// src/TitleField/TitleField.tsx
|
|
560
|
-
var
|
|
569
|
+
var import_react_components12 = require("@fluentui/react-components");
|
|
561
570
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
562
|
-
var
|
|
571
|
+
var useStyles8 = (0, import_react_components12.makeStyles)({
|
|
563
572
|
root: {
|
|
564
573
|
marginTop: "8px",
|
|
565
574
|
marginBottom: "8px"
|
|
@@ -569,19 +578,19 @@ function TitleField({
|
|
|
569
578
|
id,
|
|
570
579
|
title
|
|
571
580
|
}) {
|
|
572
|
-
const classes =
|
|
581
|
+
const classes = useStyles8();
|
|
573
582
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { id, className: classes.root, children: [
|
|
574
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
575
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
583
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_components12.Text, { as: "h5", size: 600, children: title }),
|
|
584
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_components12.Divider, {})
|
|
576
585
|
] });
|
|
577
586
|
}
|
|
578
587
|
|
|
579
588
|
// src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
|
|
580
589
|
var import_utils11 = require("@rjsf/utils");
|
|
581
|
-
var
|
|
590
|
+
var import_react_components13 = require("@fluentui/react-components");
|
|
582
591
|
var import_react_migration_v0_v94 = require("@fluentui/react-migration-v0-v9");
|
|
583
592
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
584
|
-
var
|
|
593
|
+
var useStyles9 = (0, import_react_components13.makeStyles)({
|
|
585
594
|
input: {
|
|
586
595
|
width: "100%"
|
|
587
596
|
},
|
|
@@ -606,7 +615,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
606
615
|
registry
|
|
607
616
|
} = props;
|
|
608
617
|
const { templates, translateString } = registry;
|
|
609
|
-
const classes =
|
|
618
|
+
const classes = useStyles9();
|
|
610
619
|
const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
|
|
611
620
|
const keyLabel = translateString(import_utils11.TranslatableString.KeyLabel, [label]);
|
|
612
621
|
const additional = import_utils11.ADDITIONAL_PROPERTY_FLAG in schema;
|
|
@@ -621,8 +630,8 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
621
630
|
}
|
|
622
631
|
const handleBlur = ({ target }) => onKeyChange(target.value);
|
|
623
632
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_migration_v0_v94.Flex, { gap: "gap.medium", vAlign: "center", className: classNames, style, children: [
|
|
624
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
625
|
-
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_components13.Field, { label: keyLabel, required, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
634
|
+
import_react_components13.Input,
|
|
626
635
|
{
|
|
627
636
|
required,
|
|
628
637
|
defaultValue: label,
|
|
@@ -679,7 +688,7 @@ var Templates_default = generateTemplates();
|
|
|
679
688
|
|
|
680
689
|
// src/CheckboxWidget/CheckboxWidget.tsx
|
|
681
690
|
var import_utils12 = require("@rjsf/utils");
|
|
682
|
-
var
|
|
691
|
+
var import_react_components14 = require("@fluentui/react-components");
|
|
683
692
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
684
693
|
function CheckboxWidget(props) {
|
|
685
694
|
const {
|
|
@@ -720,7 +729,7 @@ function CheckboxWidget(props) {
|
|
|
720
729
|
}
|
|
721
730
|
),
|
|
722
731
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
723
|
-
|
|
732
|
+
import_react_components14.Checkbox,
|
|
724
733
|
{
|
|
725
734
|
id,
|
|
726
735
|
name: id,
|
|
@@ -740,7 +749,7 @@ function CheckboxWidget(props) {
|
|
|
740
749
|
|
|
741
750
|
// src/CheckboxesWidget/CheckboxesWidget.tsx
|
|
742
751
|
var import_utils13 = require("@rjsf/utils");
|
|
743
|
-
var
|
|
752
|
+
var import_react_components15 = require("@fluentui/react-components");
|
|
744
753
|
var import_react_migration_v0_v95 = require("@fluentui/react-migration-v0-v9");
|
|
745
754
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
746
755
|
function CheckboxesWidget({
|
|
@@ -770,14 +779,14 @@ function CheckboxesWidget({
|
|
|
770
779
|
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, (0, import_utils13.enumOptionsValueForIndex)(value2, enumOptions, emptyValue));
|
|
771
780
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
772
781
|
(0, import_utils13.labelValue)(
|
|
773
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
782
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_components15.Label, { required, htmlFor: id, children: label || void 0 }),
|
|
774
783
|
hideLabel
|
|
775
784
|
),
|
|
776
785
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_migration_v0_v95.Flex, { column: !inline, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
777
786
|
const checked = (0, import_utils13.enumOptionsIsSelected)(option.value, checkboxesValues);
|
|
778
787
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
779
788
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
780
|
-
|
|
789
|
+
import_react_components15.Checkbox,
|
|
781
790
|
{
|
|
782
791
|
id: (0, import_utils13.optionId)(id, index),
|
|
783
792
|
name: id,
|
|
@@ -798,7 +807,7 @@ function CheckboxesWidget({
|
|
|
798
807
|
|
|
799
808
|
// src/RadioWidget/RadioWidget.tsx
|
|
800
809
|
var import_utils14 = require("@rjsf/utils");
|
|
801
|
-
var
|
|
810
|
+
var import_react_components16 = require("@fluentui/react-components");
|
|
802
811
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
803
812
|
function RadioWidget({
|
|
804
813
|
id,
|
|
@@ -820,11 +829,11 @@ function RadioWidget({
|
|
|
820
829
|
const selectedIndex = (0, import_utils14.enumOptionsIndexForValue)(value, enumOptions) ?? void 0;
|
|
821
830
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
822
831
|
(0, import_utils14.labelValue)(
|
|
823
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
832
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_components16.Label, { required, htmlFor: id, children: label || void 0 }),
|
|
824
833
|
hideLabel
|
|
825
834
|
),
|
|
826
835
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
827
|
-
|
|
836
|
+
import_react_components16.RadioGroup,
|
|
828
837
|
{
|
|
829
838
|
id,
|
|
830
839
|
name: id,
|
|
@@ -836,7 +845,7 @@ function RadioWidget({
|
|
|
836
845
|
children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
837
846
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
838
847
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
839
|
-
|
|
848
|
+
import_react_components16.Radio,
|
|
840
849
|
{
|
|
841
850
|
id: (0, import_utils14.optionId)(id, index),
|
|
842
851
|
label: option.label,
|
|
@@ -853,7 +862,7 @@ function RadioWidget({
|
|
|
853
862
|
|
|
854
863
|
// src/RangeWidget/RangeWidget.tsx
|
|
855
864
|
var import_utils15 = require("@rjsf/utils");
|
|
856
|
-
var
|
|
865
|
+
var import_react_components17 = require("@fluentui/react-components");
|
|
857
866
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
858
867
|
function RangeWidget(props) {
|
|
859
868
|
const { value, readonly, disabled, onBlur, onFocus, options, schema, onChange, required, label, hideLabel, id } = props;
|
|
@@ -865,11 +874,11 @@ function RangeWidget(props) {
|
|
|
865
874
|
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
866
875
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
867
876
|
(0, import_utils15.labelValue)(
|
|
868
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_components17.Label, { required, htmlFor: id, children: label || void 0 }),
|
|
869
878
|
hideLabel
|
|
870
879
|
),
|
|
871
880
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
872
|
-
|
|
881
|
+
import_react_components17.Slider,
|
|
873
882
|
{
|
|
874
883
|
disabled: disabled || readonly,
|
|
875
884
|
onChange: _onChange,
|
|
@@ -884,7 +893,7 @@ function RangeWidget(props) {
|
|
|
884
893
|
|
|
885
894
|
// src/SelectWidget/SelectWidget.tsx
|
|
886
895
|
var import_utils16 = require("@rjsf/utils");
|
|
887
|
-
var
|
|
896
|
+
var import_react_components18 = require("@fluentui/react-components");
|
|
888
897
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
889
898
|
function getValue(data, multiple) {
|
|
890
899
|
if (multiple) {
|
|
@@ -924,13 +933,13 @@ function SelectWidget({
|
|
|
924
933
|
return onChange((0, import_utils16.enumOptionsValueForIndex)(newValue, enumOptions, optEmptyVal));
|
|
925
934
|
};
|
|
926
935
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
927
|
-
|
|
936
|
+
import_react_components18.Field,
|
|
928
937
|
{
|
|
929
938
|
label: (0, import_utils16.labelValue)(label, hideLabel),
|
|
930
939
|
validationState: rawErrors.length ? "error" : void 0,
|
|
931
940
|
required,
|
|
932
941
|
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
933
|
-
|
|
942
|
+
import_react_components18.Dropdown,
|
|
934
943
|
{
|
|
935
944
|
id,
|
|
936
945
|
name: id,
|
|
@@ -946,7 +955,7 @@ function SelectWidget({
|
|
|
946
955
|
"aria-describedby": (0, import_utils16.ariaDescribedByIds)(id),
|
|
947
956
|
children: Array.isArray(enumOptions) && enumOptions.map(({ value: value2, label: label2 }, i) => {
|
|
948
957
|
const disabled2 = enumDisabled && enumDisabled.indexOf(value2) !== -1;
|
|
949
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_components18.Option, { value: String(i), disabled: disabled2, children: label2 }, i);
|
|
950
959
|
})
|
|
951
960
|
}
|
|
952
961
|
)
|
|
@@ -956,10 +965,10 @@ function SelectWidget({
|
|
|
956
965
|
var SelectWidget_default = SelectWidget;
|
|
957
966
|
|
|
958
967
|
// src/TextareaWidget/TextareaWidget.tsx
|
|
959
|
-
var
|
|
968
|
+
var import_react_components19 = require("@fluentui/react-components");
|
|
960
969
|
var import_utils17 = require("@rjsf/utils");
|
|
961
970
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
962
|
-
var
|
|
971
|
+
var useStyles10 = (0, import_react_components19.makeStyles)({
|
|
963
972
|
label: {
|
|
964
973
|
paddingTop: "2px",
|
|
965
974
|
paddingBottom: "2px",
|
|
@@ -984,7 +993,7 @@ function TextareaWidget(props) {
|
|
|
984
993
|
options,
|
|
985
994
|
schema
|
|
986
995
|
} = props;
|
|
987
|
-
const classes =
|
|
996
|
+
const classes = useStyles10();
|
|
988
997
|
const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
|
|
989
998
|
const _onBlur = ({ target: { value: value2 } }) => onBlur(id, value2);
|
|
990
999
|
const _onFocus = ({ target: { value: value2 } }) => onFocus(id, value2);
|
|
@@ -994,11 +1003,11 @@ function TextareaWidget(props) {
|
|
|
994
1003
|
}
|
|
995
1004
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
996
1005
|
(0, import_utils17.labelValue)(
|
|
997
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1006
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_components19.Label, { htmlFor: id, required, disabled, className: classes.label, children: label }),
|
|
998
1007
|
hideLabel
|
|
999
1008
|
),
|
|
1000
1009
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1001
|
-
|
|
1010
|
+
import_react_components19.Textarea,
|
|
1002
1011
|
{
|
|
1003
1012
|
id,
|
|
1004
1013
|
name: id,
|
|
@@ -1046,13 +1055,13 @@ function generateForm() {
|
|
|
1046
1055
|
var FluentForm_default = generateForm();
|
|
1047
1056
|
|
|
1048
1057
|
// src/FluentUIRCFrameProvider.tsx
|
|
1049
|
-
var
|
|
1058
|
+
var import_react_components20 = require("@fluentui/react-components");
|
|
1050
1059
|
var import_react = require("react");
|
|
1051
1060
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1052
1061
|
var FluentWrapper = (props) => {
|
|
1053
1062
|
const { children, targetDocument } = props;
|
|
1054
|
-
const renderer = (0, import_react.useMemo)(() => (0,
|
|
1055
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1063
|
+
const renderer = (0, import_react.useMemo)(() => (0, import_react_components20.createDOMRenderer)(targetDocument), [targetDocument]);
|
|
1064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_components20.RendererProvider, { renderer, targetDocument, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_components20.FluentProvider, { targetDocument, theme: import_react_components20.teamsLightTheme, children }) });
|
|
1056
1065
|
};
|
|
1057
1066
|
var __createFluentUIRCFrameProvider = (props) => ({ document }) => {
|
|
1058
1067
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FluentWrapper, { targetDocument: document, children: props.children });
|