@rjsf/fluentui-rc 6.0.0-beta.9 → 6.0.1

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 (84) hide show
  1. package/README.md +2 -0
  2. package/dist/core.umd.js +129 -51
  3. package/dist/{index.js → index.cjs} +210 -123
  4. package/dist/index.cjs.map +7 -0
  5. package/dist/index.esm.js +192 -105
  6. package/dist/index.esm.js.map +4 -4
  7. package/lib/AddButton/AddButton.js +1 -1
  8. package/lib/AddButton/AddButton.js.map +1 -1
  9. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +3 -3
  10. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +1 -1
  11. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
  12. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +1 -1
  13. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +4 -5
  14. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
  15. package/lib/BaseInputTemplate/BaseInputTemplate.js +2 -2
  16. package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  17. package/lib/CheckboxWidget/CheckboxWidget.js +4 -4
  18. package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
  19. package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +1 -1
  20. package/lib/CheckboxesWidget/CheckboxesWidget.js +2 -2
  21. package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
  22. package/lib/FieldErrorTemplate/FieldErrorTemplate.js +2 -2
  23. package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
  24. package/lib/FieldHelpTemplate/FieldHelpTemplate.js +2 -2
  25. package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
  26. package/lib/FieldTemplate/FieldTemplate.js +2 -2
  27. package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
  28. package/lib/IconButton/IconButton.d.ts +7 -5
  29. package/lib/IconButton/IconButton.js.map +1 -1
  30. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.d.ts +2 -0
  31. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js +13 -0
  32. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js.map +1 -0
  33. package/lib/MultiSchemaFieldTemplate/index.d.ts +2 -0
  34. package/lib/MultiSchemaFieldTemplate/index.js +3 -0
  35. package/lib/MultiSchemaFieldTemplate/index.js.map +1 -0
  36. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +4 -3
  37. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
  38. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +10 -0
  39. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +22 -0
  40. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -0
  41. package/lib/OptionalDataControlsTemplate/index.d.ts +2 -0
  42. package/lib/OptionalDataControlsTemplate/index.js +3 -0
  43. package/lib/OptionalDataControlsTemplate/index.js.map +1 -0
  44. package/lib/RadioWidget/RadioWidget.d.ts +1 -1
  45. package/lib/RadioWidget/RadioWidget.js +2 -2
  46. package/lib/RadioWidget/RadioWidget.js.map +1 -1
  47. package/lib/RangeWidget/RangeWidget.js.map +1 -1
  48. package/lib/SelectWidget/SelectWidget.d.ts +1 -1
  49. package/lib/SelectWidget/SelectWidget.js +2 -2
  50. package/lib/SelectWidget/SelectWidget.js.map +1 -1
  51. package/lib/Templates/Templates.js +4 -0
  52. package/lib/Templates/Templates.js.map +1 -1
  53. package/lib/TextareaWidget/TextareaWidget.js +2 -2
  54. package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
  55. package/lib/TitleField/TitleField.d.ts +1 -1
  56. package/lib/TitleField/TitleField.js +7 -2
  57. package/lib/TitleField/TitleField.js.map +1 -1
  58. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +3 -4
  59. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
  60. package/lib/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +18 -18
  62. package/src/AddButton/AddButton.tsx +1 -1
  63. package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +3 -3
  64. package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +23 -17
  65. package/src/BaseInputTemplate/BaseInputTemplate.tsx +5 -4
  66. package/src/CheckboxWidget/CheckboxWidget.tsx +6 -5
  67. package/src/CheckboxesWidget/CheckboxesWidget.tsx +3 -2
  68. package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +2 -2
  69. package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -2
  70. package/src/FieldTemplate/FieldTemplate.tsx +6 -4
  71. package/src/IconButton/IconButton.tsx +12 -6
  72. package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +25 -0
  73. package/src/MultiSchemaFieldTemplate/index.ts +2 -0
  74. package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +10 -6
  75. package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +48 -0
  76. package/src/OptionalDataControlsTemplate/index.ts +2 -0
  77. package/src/RadioWidget/RadioWidget.tsx +3 -2
  78. package/src/RangeWidget/RangeWidget.tsx +1 -1
  79. package/src/SelectWidget/SelectWidget.tsx +3 -2
  80. package/src/Templates/Templates.ts +4 -0
  81. package/src/TextareaWidget/TextareaWidget.tsx +3 -2
  82. package/src/TitleField/TitleField.tsx +16 -3
  83. package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +6 -7
  84. package/dist/index.js.map +0 -7
@@ -74,7 +74,7 @@ function AddButton({
74
74
  ...props
75
75
  }) {
76
76
  const { translateString } = registry;
77
- 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_utils2.TranslatableString.AddItemButton) });
77
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_components2.Button, { title: translateString(import_utils2.TranslatableString.AddItemButton), ...props, icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_icons.AddRegular, {}) });
78
78
  }
79
79
 
80
80
  // src/ArrayFieldTemplate/ArrayFieldTemplate.tsx
@@ -88,7 +88,20 @@ var useStyles2 = (0, import_react_components3.makeStyles)({
88
88
  }
89
89
  });
90
90
  function ArrayFieldTemplate(props) {
91
- const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
91
+ const {
92
+ canAdd,
93
+ disabled,
94
+ fieldPathId,
95
+ uiSchema,
96
+ items,
97
+ optionalDataControl,
98
+ onAddClick,
99
+ readonly,
100
+ registry,
101
+ required,
102
+ schema,
103
+ title
104
+ } = props;
92
105
  const classes = useStyles2();
93
106
  const uiOptions = (0, import_utils3.getUiOptions)(uiSchema);
94
107
  const ArrayFieldDescriptionTemplate = (0, import_utils3.getTemplate)(
@@ -96,16 +109,12 @@ function ArrayFieldTemplate(props) {
96
109
  registry,
97
110
  uiOptions
98
111
  );
99
- const ArrayFieldItemTemplate2 = (0, import_utils3.getTemplate)(
100
- "ArrayFieldItemTemplate",
101
- registry,
102
- uiOptions
103
- );
104
112
  const ArrayFieldTitleTemplate = (0, import_utils3.getTemplate)(
105
113
  "ArrayFieldTitleTemplate",
106
114
  registry,
107
115
  uiOptions
108
116
  );
117
+ const showOptionalDataControlInTitle = !readonly && !disabled;
109
118
  const {
110
119
  ButtonTemplates: { AddButton: AddButton2 }
111
120
  } = registry.templates;
@@ -113,18 +122,19 @@ function ArrayFieldTemplate(props) {
113
122
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
114
123
  ArrayFieldTitleTemplate,
115
124
  {
116
- idSchema,
125
+ fieldPathId,
117
126
  title: uiOptions.title || title,
118
127
  schema,
119
128
  uiSchema,
120
129
  required,
121
- registry
130
+ registry,
131
+ optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
122
132
  }
123
133
  ),
124
134
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
125
135
  ArrayFieldDescriptionTemplate,
126
136
  {
127
- idSchema,
137
+ fieldPathId,
128
138
  description: uiOptions.description || schema.description,
129
139
  schema,
130
140
  uiSchema,
@@ -132,11 +142,12 @@ function ArrayFieldTemplate(props) {
132
142
  }
133
143
  ),
134
144
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_migration_v0_v92.Flex, { column: true, className: classes.arrayItemList, children: [
135
- items && items.map(({ key, ...itemProps }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrayFieldItemTemplate2, { ...itemProps }, key)),
145
+ !showOptionalDataControlInTitle ? optionalDataControl : void 0,
146
+ items,
136
147
  canAdd && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_migration_v0_v92.Flex, { hAlign: "end", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
137
148
  AddButton2,
138
149
  {
139
- id: (0, import_utils3.buttonId)(idSchema, "add"),
150
+ id: (0, import_utils3.buttonId)(fieldPathId, "add"),
140
151
  className: "rjsf-array-item-add",
141
152
  onClick: onAddClick,
142
153
  disabled: disabled || readonly,
@@ -144,7 +155,7 @@ function ArrayFieldTemplate(props) {
144
155
  registry
145
156
  }
146
157
  ) })
147
- ] }, `array-item-list-${idSchema.$id}`)
158
+ ] }, `array-item-list-${fieldPathId.$id}`)
148
159
  ] });
149
160
  }
150
161
 
@@ -165,6 +176,7 @@ var useStyles3 = (0, import_react_components4.makeStyles)({
165
176
  function BaseInputTemplate(props) {
166
177
  const {
167
178
  id,
179
+ htmlName,
168
180
  placeholder,
169
181
  required,
170
182
  readonly,
@@ -195,7 +207,7 @@ function BaseInputTemplate(props) {
195
207
  import_react_components4.Input,
196
208
  {
197
209
  id,
198
- name: id,
210
+ name: htmlName || id,
199
211
  placeholder,
200
212
  autoFocus: autofocus,
201
213
  required,
@@ -345,12 +357,12 @@ var useStyles6 = (0, import_react_components8.makeStyles)({
345
357
  errorLabel: { color: import_react_components8.tokens.colorPaletteRedForeground1 }
346
358
  });
347
359
  function FieldErrorTemplate(props) {
348
- const { errors = [], idSchema } = props;
360
+ const { errors = [], fieldPathId } = props;
349
361
  const classes = useStyles6();
350
362
  if (errors.length === 0) {
351
363
  return null;
352
364
  }
353
- const id = (0, import_utils7.errorId)(idSchema);
365
+ const id = (0, import_utils7.errorId)(fieldPathId);
354
366
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: classes.list, children: errors.map((error, i) => {
355
367
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { className: classes.listItem, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { className: classes.errorLabel, id, children: error }) }, i);
356
368
  }) });
@@ -361,11 +373,11 @@ var import_react_components9 = require("@fluentui/react-components");
361
373
  var import_utils8 = require("@rjsf/utils");
362
374
  var import_jsx_runtime9 = require("react/jsx-runtime");
363
375
  function FieldHelpTemplate(props) {
364
- const { idSchema, help } = props;
376
+ const { fieldPathId, help } = props;
365
377
  if (!help) {
366
378
  return null;
367
379
  }
368
- const id = (0, import_utils8.helpId)(idSchema);
380
+ const id = (0, import_utils8.helpId)(fieldPathId);
369
381
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_components9.Caption1, { id, children: help });
370
382
  }
371
383
 
@@ -383,8 +395,9 @@ function FieldTemplate(props) {
383
395
  displayLabel,
384
396
  hidden,
385
397
  label,
386
- onDropPropertyClick,
387
- onKeyChange,
398
+ onKeyRename,
399
+ onKeyRenameBlur,
400
+ onRemoveProperty,
388
401
  readonly,
389
402
  required,
390
403
  rawErrors = [],
@@ -413,8 +426,9 @@ function FieldTemplate(props) {
413
426
  disabled,
414
427
  id,
415
428
  label,
416
- onDropPropertyClick,
417
- onKeyChange,
429
+ onKeyRename,
430
+ onKeyRenameBlur,
431
+ onRemoveProperty,
418
432
  readonly,
419
433
  required,
420
434
  schema,
@@ -446,10 +460,27 @@ function GridTemplate(props) {
446
460
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style, ...rest, children });
447
461
  }
448
462
 
463
+ // src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx
464
+ var import_react_components11 = require("@fluentui/react-components");
465
+ var import_jsx_runtime12 = require("react/jsx-runtime");
466
+ var useStyles7 = (0, import_react_components11.makeStyles)({
467
+ root: {
468
+ "> div": { marginBottom: "4px" }
469
+ }
470
+ });
471
+ function MultiSchemaFieldTemplate(props) {
472
+ const { selector, optionSchemaField } = props;
473
+ const styles = useStyles7();
474
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: styles.root, children: [
475
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: selector }),
476
+ optionSchemaField
477
+ ] });
478
+ }
479
+
449
480
  // src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
450
481
  var import_react_migration_v0_v94 = require("@fluentui/react-migration-v0-v9");
451
482
  var import_utils10 = require("@rjsf/utils");
452
- var import_jsx_runtime12 = require("react/jsx-runtime");
483
+ var import_jsx_runtime13 = require("react/jsx-runtime");
453
484
  function ObjectFieldTemplate(props) {
454
485
  const {
455
486
  description,
@@ -459,10 +490,11 @@ function ObjectFieldTemplate(props) {
459
490
  disabled,
460
491
  readonly,
461
492
  uiSchema,
462
- idSchema,
493
+ fieldPathId,
463
494
  schema,
464
495
  formData,
465
- onAddClick,
496
+ optionalDataControl,
497
+ onAddProperty,
466
498
  registry
467
499
  } = props;
468
500
  const uiOptions = (0, import_utils10.getUiOptions)(uiSchema);
@@ -472,45 +504,48 @@ function ObjectFieldTemplate(props) {
472
504
  registry,
473
505
  uiOptions
474
506
  );
507
+ const showOptionalDataControlInTitle = !readonly && !disabled;
475
508
  const {
476
509
  ButtonTemplates: { AddButton: AddButton2 }
477
510
  } = registry.templates;
478
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
479
- title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
511
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
512
+ title && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
480
513
  TitleFieldTemplate,
481
514
  {
482
- id: (0, import_utils10.titleId)(idSchema),
515
+ id: (0, import_utils10.titleId)(fieldPathId),
483
516
  title,
484
517
  required,
485
518
  schema,
486
519
  uiSchema,
487
- registry
520
+ registry,
521
+ optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
488
522
  }
489
523
  ),
490
- description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
524
+ description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
491
525
  DescriptionFieldTemplate,
492
526
  {
493
- id: (0, import_utils10.descriptionId)(idSchema),
527
+ id: (0, import_utils10.descriptionId)(fieldPathId),
494
528
  description,
495
529
  schema,
496
530
  uiSchema,
497
531
  registry
498
532
  }
499
533
  ),
500
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_migration_v0_v94.Flex, { fill: true, column: true, gap: "gap.medium", children: [
534
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_migration_v0_v94.Flex, { fill: true, column: true, gap: "gap.medium", children: [
535
+ !showOptionalDataControlInTitle ? optionalDataControl : void 0,
501
536
  properties.map(
502
537
  (element, index) => (
503
538
  // Remove the <Grid> if the inner element is hidden as the <Grid>
504
539
  // itself would otherwise still take up space.
505
- element.hidden ? element.content : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_migration_v0_v94.Flex, { column: true, fill: true, style: { marginBottom: "10px" }, children: element.content }, index)
540
+ element.hidden ? element.content : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_migration_v0_v94.Flex, { column: true, fill: true, style: { marginBottom: "10px" }, children: element.content }, index)
506
541
  )
507
542
  ),
508
- (0, import_utils10.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_migration_v0_v94.Flex, { hAlign: "end", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
543
+ (0, import_utils10.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_migration_v0_v94.Flex, { hAlign: "end", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
509
544
  AddButton2,
510
545
  {
511
- id: (0, import_utils10.buttonId)(idSchema, "add"),
546
+ id: (0, import_utils10.buttonId)(fieldPathId, "add"),
512
547
  className: "rjsf-object-property-expand",
513
- onClick: onAddClick(schema),
548
+ onClick: onAddProperty,
514
549
  disabled: disabled || readonly,
515
550
  uiSchema,
516
551
  registry
@@ -520,28 +555,66 @@ function ObjectFieldTemplate(props) {
520
555
  ] });
521
556
  }
522
557
 
558
+ // src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx
559
+ var import_react_icons3 = require("@fluentui/react-icons");
560
+ var import_jsx_runtime14 = require("react/jsx-runtime");
561
+ function OptionalDataControlsTemplate(props) {
562
+ const { id, registry, label, onAddClick, onRemoveClick } = props;
563
+ if (onAddClick) {
564
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
565
+ FluentIconButton,
566
+ {
567
+ id,
568
+ registry,
569
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons3.AddSquareMultipleRegular, {}),
570
+ className: "rjsf-add-optional-data",
571
+ onClick: onAddClick,
572
+ title: label,
573
+ size: "small",
574
+ appearance: "secondary"
575
+ }
576
+ );
577
+ } else if (onRemoveClick) {
578
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
579
+ FluentIconButton,
580
+ {
581
+ id,
582
+ registry,
583
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons3.SubtractSquareMultipleRegular, {}),
584
+ className: "rjsf-remove-optional-data",
585
+ onClick: onRemoveClick,
586
+ title: label,
587
+ size: "small",
588
+ appearance: "secondary"
589
+ }
590
+ );
591
+ }
592
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("em", { id, children: label });
593
+ }
594
+
523
595
  // src/SubmitButton/SubmitButton.tsx
524
596
  var import_utils11 = require("@rjsf/utils");
525
- var import_react_components11 = require("@fluentui/react-components");
526
- var import_jsx_runtime13 = require("react/jsx-runtime");
527
- var useStyles7 = (0, import_react_components11.makeStyles)({
597
+ var import_react_components12 = require("@fluentui/react-components");
598
+ var import_jsx_runtime15 = require("react/jsx-runtime");
599
+ var useStyles8 = (0, import_react_components12.makeStyles)({
528
600
  buttonRow: {
529
- marginTop: import_react_components11.tokens.spacingVerticalL
601
+ marginTop: import_react_components12.tokens.spacingVerticalL
530
602
  }
531
603
  });
532
604
  function SubmitButton({ uiSchema }) {
533
- const classes = useStyles7();
605
+ const classes = useStyles8();
534
606
  const { submitText, norender, props: submitButtonProps } = (0, import_utils11.getSubmitButtonOptions)(uiSchema);
535
607
  if (norender) {
536
608
  return null;
537
609
  }
538
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: classes.buttonRow, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_components11.Button, { appearance: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
610
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: classes.buttonRow, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_components12.Button, { appearance: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
539
611
  }
540
612
 
541
613
  // src/TitleField/TitleField.tsx
542
- var import_react_components12 = require("@fluentui/react-components");
543
- var import_jsx_runtime14 = require("react/jsx-runtime");
544
- var useStyles8 = (0, import_react_components12.makeStyles)({
614
+ var import_react_migration_v0_v95 = require("@fluentui/react-migration-v0-v9");
615
+ var import_react_components13 = require("@fluentui/react-components");
616
+ var import_jsx_runtime16 = require("react/jsx-runtime");
617
+ var useStyles9 = (0, import_react_components13.makeStyles)({
545
618
  root: {
546
619
  marginTop: "8px",
547
620
  marginBottom: "8px"
@@ -549,21 +622,29 @@ var useStyles8 = (0, import_react_components12.makeStyles)({
549
622
  });
550
623
  function TitleField({
551
624
  id,
552
- title
625
+ title,
626
+ optionalDataControl
553
627
  }) {
554
- const classes = useStyles8();
555
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { id, className: classes.root, children: [
556
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_components12.Text, { as: "h5", size: 600, children: title }),
557
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_components12.Divider, {})
628
+ const classes = useStyles9();
629
+ let heading = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_components13.Text, { as: "h5", size: 600, style: { marginBlock: 0 }, children: title });
630
+ if (optionalDataControl) {
631
+ heading = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_migration_v0_v95.Flex, { children: [
632
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_migration_v0_v95.Flex, { fill: true, children: heading }),
633
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_migration_v0_v95.Flex, { hAlign: "end", children: optionalDataControl })
634
+ ] });
635
+ }
636
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { id, className: classes.root, children: [
637
+ heading,
638
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_components13.Divider, {})
558
639
  ] });
559
640
  }
560
641
 
561
642
  // src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
562
643
  var import_utils12 = require("@rjsf/utils");
563
- var import_react_components13 = require("@fluentui/react-components");
564
- var import_react_migration_v0_v95 = require("@fluentui/react-migration-v0-v9");
565
- var import_jsx_runtime15 = require("react/jsx-runtime");
566
- var useStyles9 = (0, import_react_components13.makeStyles)({
644
+ var import_react_components14 = require("@fluentui/react-components");
645
+ var import_react_migration_v0_v96 = require("@fluentui/react-migration-v0-v9");
646
+ var import_jsx_runtime17 = require("react/jsx-runtime");
647
+ var useStyles10 = (0, import_react_components14.makeStyles)({
567
648
  input: {
568
649
  width: "100%"
569
650
  },
@@ -579,8 +660,8 @@ function WrapIfAdditionalTemplate(props) {
579
660
  disabled,
580
661
  id,
581
662
  label,
582
- onDropPropertyClick,
583
- onKeyChange,
663
+ onRemoveProperty,
664
+ onKeyRenameBlur,
584
665
  readonly,
585
666
  required,
586
667
  schema,
@@ -588,7 +669,7 @@ function WrapIfAdditionalTemplate(props) {
588
669
  registry
589
670
  } = props;
590
671
  const { templates, translateString } = registry;
591
- const classes = useStyles9();
672
+ const classes = useStyles10();
592
673
  const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
593
674
  const keyLabel = translateString(import_utils12.TranslatableString.KeyLabel, [label]);
594
675
  const additional = import_utils12.ADDITIONAL_PROPERTY_FLAG in schema;
@@ -599,27 +680,26 @@ function WrapIfAdditionalTemplate(props) {
599
680
  fontWeight: "bold"
600
681
  };
601
682
  if (!additional) {
602
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: classNames, style, children });
683
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: classNames, style, children });
603
684
  }
604
- const handleBlur = ({ target }) => onKeyChange(target.value);
605
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_migration_v0_v95.Flex, { gap: "gap.medium", vAlign: "center", className: classNames, style, children: [
606
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_components13.Field, { label: keyLabel, required, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
607
- import_react_components13.Input,
685
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_migration_v0_v96.Flex, { gap: "gap.medium", vAlign: "center", className: classNames, style, children: [
686
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_components14.Field, { label: keyLabel, required, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
687
+ import_react_components14.Input,
608
688
  {
609
689
  required,
610
690
  defaultValue: label,
611
691
  disabled: disabled || readonly,
612
692
  id: `${id}-key`,
613
693
  name: `${id}-key`,
614
- onBlur: !readonly ? handleBlur : void 0,
694
+ onBlur: !readonly ? onKeyRenameBlur : void 0,
615
695
  type: "text",
616
696
  input: {
617
697
  className: classes.input
618
698
  }
619
699
  }
620
700
  ) }) }),
621
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children }),
622
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
701
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children }),
702
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
623
703
  RemoveButton2,
624
704
  {
625
705
  id: (0, import_utils12.buttonId)(id, "remove"),
@@ -627,7 +707,7 @@ function WrapIfAdditionalTemplate(props) {
627
707
  className: "rjsf-object-property-remove",
628
708
  style: btnStyle,
629
709
  disabled: disabled || readonly,
630
- onClick: onDropPropertyClick(label),
710
+ onClick: onRemoveProperty,
631
711
  uiSchema,
632
712
  registry
633
713
  }
@@ -655,7 +735,9 @@ function generateTemplates() {
655
735
  FieldHelpTemplate,
656
736
  FieldTemplate,
657
737
  GridTemplate,
738
+ MultiSchemaFieldTemplate,
658
739
  ObjectFieldTemplate,
740
+ OptionalDataControlsTemplate,
659
741
  TitleFieldTemplate: TitleField,
660
742
  WrapIfAdditionalTemplate
661
743
  };
@@ -664,12 +746,13 @@ var Templates_default = generateTemplates();
664
746
 
665
747
  // src/CheckboxWidget/CheckboxWidget.tsx
666
748
  var import_utils13 = require("@rjsf/utils");
667
- var import_react_components14 = require("@fluentui/react-components");
668
- var import_jsx_runtime16 = require("react/jsx-runtime");
749
+ var import_react_components15 = require("@fluentui/react-components");
750
+ var import_jsx_runtime18 = require("react/jsx-runtime");
669
751
  function CheckboxWidget(props) {
670
752
  const {
671
753
  schema,
672
754
  id,
755
+ htmlName,
673
756
  value,
674
757
  disabled,
675
758
  readonly,
@@ -690,11 +773,11 @@ function CheckboxWidget(props) {
690
773
  );
691
774
  const required = (0, import_utils13.schemaRequiresTrueValue)(schema);
692
775
  const _onChange = ({ target: { checked } }) => onChange(checked);
693
- const _onBlur = ({ target }) => onBlur(id, target && target.value);
694
- const _onFocus = ({ target }) => onFocus(id, target && target.value);
776
+ const _onBlur = ({ target }) => onBlur(id, target && target.checked);
777
+ const _onFocus = ({ target }) => onFocus(id, target && target.checked);
695
778
  const description = options.description ?? schema.description;
696
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
697
- !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
779
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
780
+ !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
698
781
  DescriptionFieldTemplate,
699
782
  {
700
783
  id: (0, import_utils13.descriptionId)(id),
@@ -704,11 +787,11 @@ function CheckboxWidget(props) {
704
787
  registry
705
788
  }
706
789
  ),
707
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
708
- import_react_components14.Checkbox,
790
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
791
+ import_react_components15.Checkbox,
709
792
  {
710
793
  id,
711
- name: id,
794
+ name: htmlName || id,
712
795
  label,
713
796
  checked: typeof value === "undefined" ? false : Boolean(value),
714
797
  required,
@@ -725,13 +808,14 @@ function CheckboxWidget(props) {
725
808
 
726
809
  // src/CheckboxesWidget/CheckboxesWidget.tsx
727
810
  var import_utils14 = require("@rjsf/utils");
728
- var import_react_components15 = require("@fluentui/react-components");
729
- var import_react_migration_v0_v96 = require("@fluentui/react-migration-v0-v9");
730
- var import_jsx_runtime17 = require("react/jsx-runtime");
811
+ var import_react_components16 = require("@fluentui/react-components");
812
+ var import_react_migration_v0_v97 = require("@fluentui/react-migration-v0-v9");
813
+ var import_jsx_runtime19 = require("react/jsx-runtime");
731
814
  function CheckboxesWidget({
732
815
  label,
733
816
  hideLabel,
734
817
  id,
818
+ htmlName,
735
819
  disabled,
736
820
  options,
737
821
  value,
@@ -753,19 +837,19 @@ function CheckboxesWidget({
753
837
  };
754
838
  const _onBlur = ({ target }) => onBlur(id, (0, import_utils14.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
755
839
  const _onFocus = ({ target }) => onFocus(id, (0, import_utils14.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
756
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
840
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
757
841
  (0, import_utils14.labelValue)(
758
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_components15.Label, { required, htmlFor: id, children: label || void 0 }),
842
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_components16.Label, { required, htmlFor: id, children: label || void 0 }),
759
843
  hideLabel
760
844
  ),
761
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_migration_v0_v96.Flex, { column: !inline, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
845
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_migration_v0_v97.Flex, { column: !inline, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
762
846
  const checked = (0, import_utils14.enumOptionsIsSelected)(option.value, checkboxesValues);
763
847
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
764
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
765
- import_react_components15.Checkbox,
848
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
849
+ import_react_components16.Checkbox,
766
850
  {
767
851
  id: (0, import_utils14.optionId)(id, index),
768
- name: id,
852
+ name: htmlName || id,
769
853
  label: option.label,
770
854
  checked,
771
855
  disabled: disabled || itemDisabled || readonly,
@@ -783,10 +867,11 @@ function CheckboxesWidget({
783
867
 
784
868
  // src/RadioWidget/RadioWidget.tsx
785
869
  var import_utils15 = require("@rjsf/utils");
786
- var import_react_components16 = require("@fluentui/react-components");
787
- var import_jsx_runtime18 = require("react/jsx-runtime");
870
+ var import_react_components17 = require("@fluentui/react-components");
871
+ var import_jsx_runtime20 = require("react/jsx-runtime");
788
872
  function RadioWidget({
789
873
  id,
874
+ htmlName,
790
875
  options,
791
876
  value,
792
877
  required,
@@ -803,16 +888,16 @@ function RadioWidget({
803
888
  const _onBlur = ({ target }) => onBlur(id, (0, import_utils15.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
804
889
  const _onFocus = ({ target }) => onFocus(id, (0, import_utils15.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
805
890
  const selectedIndex = (0, import_utils15.enumOptionsIndexForValue)(value, enumOptions) ?? void 0;
806
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
891
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
807
892
  (0, import_utils15.labelValue)(
808
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_components16.Label, { required, htmlFor: id, children: label || void 0 }),
893
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_components17.Label, { required, htmlFor: id, children: label || void 0 }),
809
894
  hideLabel
810
895
  ),
811
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
812
- import_react_components16.RadioGroup,
896
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
897
+ import_react_components17.RadioGroup,
813
898
  {
814
899
  id,
815
- name: id,
900
+ name: htmlName || id,
816
901
  layout: inline ? "horizontal" : "vertical",
817
902
  value: selectedIndex,
818
903
  onChange: _onChange,
@@ -821,8 +906,8 @@ function RadioWidget({
821
906
  "aria-describedby": (0, import_utils15.ariaDescribedByIds)(id),
822
907
  children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
823
908
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
824
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
825
- import_react_components16.Radio,
909
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
910
+ import_react_components17.Radio,
826
911
  {
827
912
  id: (0, import_utils15.optionId)(id, index),
828
913
  label: option.label,
@@ -839,8 +924,8 @@ function RadioWidget({
839
924
 
840
925
  // src/RangeWidget/RangeWidget.tsx
841
926
  var import_utils16 = require("@rjsf/utils");
842
- var import_react_components17 = require("@fluentui/react-components");
843
- var import_jsx_runtime19 = require("react/jsx-runtime");
927
+ var import_react_components18 = require("@fluentui/react-components");
928
+ var import_jsx_runtime21 = require("react/jsx-runtime");
844
929
  function RangeWidget(props) {
845
930
  const { value, readonly, disabled, onBlur, onFocus, options, schema, onChange, required, label, hideLabel, id } = props;
846
931
  const sliderProps = { value, label, id, name: id, ...(0, import_utils16.rangeSpec)(schema) };
@@ -849,13 +934,13 @@ function RangeWidget(props) {
849
934
  };
850
935
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
851
936
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
852
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
937
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
853
938
  (0, import_utils16.labelValue)(
854
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_components17.Label, { required, htmlFor: id, children: label || void 0 }),
939
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_components18.Label, { required, htmlFor: id, children: label || void 0 }),
855
940
  hideLabel
856
941
  ),
857
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
858
- import_react_components17.Slider,
942
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
943
+ import_react_components18.Slider,
859
944
  {
860
945
  disabled: disabled || readonly,
861
946
  onChange: _onChange,
@@ -870,8 +955,8 @@ function RangeWidget(props) {
870
955
 
871
956
  // src/SelectWidget/SelectWidget.tsx
872
957
  var import_utils17 = require("@rjsf/utils");
873
- var import_react_components18 = require("@fluentui/react-components");
874
- var import_jsx_runtime20 = require("react/jsx-runtime");
958
+ var import_react_components19 = require("@fluentui/react-components");
959
+ var import_jsx_runtime22 = require("react/jsx-runtime");
875
960
  function getValue(data, multiple) {
876
961
  if (multiple) {
877
962
  return data.selectedOptions;
@@ -880,6 +965,7 @@ function getValue(data, multiple) {
880
965
  }
881
966
  function SelectWidget({
882
967
  id,
968
+ htmlName,
883
969
  options,
884
970
  label,
885
971
  hideLabel,
@@ -912,17 +998,17 @@ function SelectWidget({
912
998
  return onChange((0, import_utils17.enumOptionsValueForIndex)(newValue, enumOptions, optEmptyVal));
913
999
  };
914
1000
  const showPlaceholderOption = !multiple && schema.default === void 0;
915
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
916
- import_react_components18.Field,
1001
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1002
+ import_react_components19.Field,
917
1003
  {
918
1004
  label: (0, import_utils17.labelValue)(label, hideLabel),
919
1005
  validationState: rawErrors.length ? "error" : void 0,
920
1006
  required,
921
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
922
- import_react_components18.Dropdown,
1007
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1008
+ import_react_components19.Dropdown,
923
1009
  {
924
1010
  id,
925
- name: id,
1011
+ name: htmlName || id,
926
1012
  multiselect: multiple,
927
1013
  className: "form-control",
928
1014
  value: dropdownValue,
@@ -934,10 +1020,10 @@ function SelectWidget({
934
1020
  selectedOptions: selectedIndexesAsArray,
935
1021
  "aria-describedby": (0, import_utils17.ariaDescribedByIds)(id),
936
1022
  children: [
937
- showPlaceholderOption && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_components18.Option, { value: "", children: placeholder || "" }),
1023
+ showPlaceholderOption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_components19.Option, { value: "", children: placeholder || "" }),
938
1024
  Array.isArray(enumOptions) && enumOptions.map(({ value: value2, label: label2 }, i) => {
939
1025
  const disabled2 = enumDisabled && enumDisabled.indexOf(value2) !== -1;
940
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_components18.Option, { value: String(i), disabled: disabled2, children: label2 }, i);
1026
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_components19.Option, { value: String(i), disabled: disabled2, children: label2 }, i);
941
1027
  })
942
1028
  ]
943
1029
  }
@@ -948,10 +1034,10 @@ function SelectWidget({
948
1034
  var SelectWidget_default = SelectWidget;
949
1035
 
950
1036
  // src/TextareaWidget/TextareaWidget.tsx
951
- var import_react_components19 = require("@fluentui/react-components");
1037
+ var import_react_components20 = require("@fluentui/react-components");
952
1038
  var import_utils18 = require("@rjsf/utils");
953
- var import_jsx_runtime21 = require("react/jsx-runtime");
954
- var useStyles10 = (0, import_react_components19.makeStyles)({
1039
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1040
+ var useStyles11 = (0, import_react_components20.makeStyles)({
955
1041
  label: {
956
1042
  paddingTop: "2px",
957
1043
  paddingBottom: "2px",
@@ -961,6 +1047,7 @@ var useStyles10 = (0, import_react_components19.makeStyles)({
961
1047
  function TextareaWidget(props) {
962
1048
  const {
963
1049
  id,
1050
+ htmlName,
964
1051
  placeholder,
965
1052
  required,
966
1053
  readonly,
@@ -976,7 +1063,7 @@ function TextareaWidget(props) {
976
1063
  options,
977
1064
  schema
978
1065
  } = props;
979
- const classes = useStyles10();
1066
+ const classes = useStyles11();
980
1067
  const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
981
1068
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
982
1069
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
@@ -984,16 +1071,16 @@ function TextareaWidget(props) {
984
1071
  if (typeof options.rows === "string" || typeof options.rows === "number") {
985
1072
  rows = options.rows;
986
1073
  }
987
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
1074
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
988
1075
  (0, import_utils18.labelValue)(
989
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_components19.Label, { htmlFor: id, required, disabled, className: classes.label, children: label }),
1076
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_components20.Label, { htmlFor: id, required, disabled, className: classes.label, children: label }),
990
1077
  hideLabel
991
1078
  ),
992
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
993
- import_react_components19.Textarea,
1079
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1080
+ import_react_components20.Textarea,
994
1081
  {
995
1082
  id,
996
- name: id,
1083
+ name: htmlName || id,
997
1084
  placeholder,
998
1085
  autoFocus: autofocus,
999
1086
  required,
@@ -1038,18 +1125,18 @@ function generateForm() {
1038
1125
  var FluentForm_default = generateForm();
1039
1126
 
1040
1127
  // src/FluentUIRCFrameProvider.tsx
1041
- var import_react_components20 = require("@fluentui/react-components");
1128
+ var import_react_components21 = require("@fluentui/react-components");
1042
1129
  var import_react = require("react");
1043
- var import_jsx_runtime22 = require("react/jsx-runtime");
1130
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1044
1131
  var FluentWrapper = (props) => {
1045
1132
  const { children, targetDocument } = props;
1046
- const renderer = (0, import_react.useMemo)(() => (0, import_react_components20.createDOMRenderer)(targetDocument), [targetDocument]);
1047
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_components20.RendererProvider, { renderer, targetDocument, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_components20.FluentProvider, { targetDocument, theme: import_react_components20.teamsLightTheme, children }) });
1133
+ const renderer = (0, import_react.useMemo)(() => (0, import_react_components21.createDOMRenderer)(targetDocument), [targetDocument]);
1134
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_components21.RendererProvider, { renderer, targetDocument, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_components21.FluentProvider, { targetDocument, theme: import_react_components21.teamsLightTheme, children }) });
1048
1135
  };
1049
1136
  var __createFluentUIRCFrameProvider = (props) => ({ document }) => {
1050
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FluentWrapper, { targetDocument: document, children: props.children });
1137
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FluentWrapper, { targetDocument: document, children: props.children });
1051
1138
  };
1052
1139
 
1053
1140
  // src/index.ts
1054
1141
  var index_default = FluentForm_default;
1055
- //# sourceMappingURL=index.js.map
1142
+ //# sourceMappingURL=index.cjs.map