@rjsf/fluentui-rc 6.0.0-beta.1 → 6.0.0-beta.11

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 CHANGED
@@ -59,11 +59,15 @@ Fluent UI React Components (v9) theme, fields and widgets for `react-jsonschema-
59
59
 
60
60
  ### Prerequisites
61
61
 
62
- - `@fluentui/react-components >= 9.35.0`
63
- - `@rjsf/core >= 2.0.0`
62
+ - `@fluentui/react-components >= 9`
63
+ - `@fluentui/react-icons >= 2`
64
+ - `@fluentui/react-migration-v0-v9 >= 9`
65
+ - `@rjsf/core >= 6`
66
+ - `@rjsf/utils >= 6`
67
+ - `@rjsf/validator-ajv8 >= 6`
64
68
 
65
69
  ```bash
66
- yarn add @fluentui/react-components @rjsf/core @rjsf/utils @rjsf/validator-ajv8
70
+ yarn add @fluentui/react-components @fluentui/react-icons @fluentui/react-migration-v0-v9 @rjsf/core @rjsf/utils @rjsf/validator-ajv8
67
71
  ```
68
72
 
69
73
  ### Installation
package/dist/core.umd.js CHANGED
@@ -172,12 +172,12 @@
172
172
  }
173
173
  });
174
174
  function DescriptionField(props) {
175
- const { id, description } = props;
175
+ const { id, description, registry, uiSchema } = props;
176
176
  const classes = useStyles4();
177
- if (description) {
178
- return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Text, { block: true, id, className: classes.label, children: description });
177
+ if (!description) {
178
+ return null;
179
179
  }
180
- return null;
180
+ return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Text, { block: true, id, className: classes.label, children: /* @__PURE__ */ jsxRuntime.jsx(core.RichDescription, { description, registry, uiSchema }) });
181
181
  }
182
182
  var useStyles5 = reactComponents.makeStyles({
183
183
  errorCard: {
@@ -357,6 +357,19 @@
357
357
  }
358
358
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style, ...rest, children });
359
359
  }
360
+ var useStyles7 = reactComponents.makeStyles({
361
+ root: {
362
+ "> div": { marginBottom: "4px" }
363
+ }
364
+ });
365
+ function MultiSchemaFieldTemplate(props) {
366
+ const { selector, optionSchemaField } = props;
367
+ const styles = useStyles7();
368
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.root, children: [
369
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: selector }),
370
+ optionSchemaField
371
+ ] });
372
+ }
360
373
  function ObjectFieldTemplate(props) {
361
374
  const {
362
375
  description,
@@ -426,20 +439,20 @@
426
439
  ] })
427
440
  ] });
428
441
  }
429
- var useStyles7 = reactComponents.makeStyles({
442
+ var useStyles8 = reactComponents.makeStyles({
430
443
  buttonRow: {
431
444
  marginTop: reactComponents.tokens.spacingVerticalL
432
445
  }
433
446
  });
434
447
  function SubmitButton({ uiSchema }) {
435
- const classes = useStyles7();
448
+ const classes = useStyles8();
436
449
  const { submitText, norender, props: submitButtonProps } = utils.getSubmitButtonOptions(uiSchema);
437
450
  if (norender) {
438
451
  return null;
439
452
  }
440
453
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.buttonRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Button, { appearance: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
441
454
  }
442
- var useStyles8 = reactComponents.makeStyles({
455
+ var useStyles9 = reactComponents.makeStyles({
443
456
  root: {
444
457
  marginTop: "8px",
445
458
  marginBottom: "8px"
@@ -449,13 +462,13 @@
449
462
  id,
450
463
  title
451
464
  }) {
452
- const classes = useStyles8();
465
+ const classes = useStyles9();
453
466
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { id, className: classes.root, children: [
454
467
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Text, { as: "h5", size: 600, children: title }),
455
468
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {})
456
469
  ] });
457
470
  }
458
- var useStyles9 = reactComponents.makeStyles({
471
+ var useStyles10 = reactComponents.makeStyles({
459
472
  input: {
460
473
  width: "100%"
461
474
  },
@@ -480,7 +493,7 @@
480
493
  registry
481
494
  } = props;
482
495
  const { templates, translateString } = registry;
483
- const classes = useStyles9();
496
+ const classes = useStyles10();
484
497
  const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
485
498
  const keyLabel = translateString(utils.TranslatableString.KeyLabel, [label]);
486
499
  const additional = utils.ADDITIONAL_PROPERTY_FLAG in schema;
@@ -547,6 +560,7 @@
547
560
  FieldHelpTemplate,
548
561
  FieldTemplate,
549
562
  GridTemplate,
563
+ MultiSchemaFieldTemplate,
550
564
  ObjectFieldTemplate,
551
565
  TitleFieldTemplate: TitleField,
552
566
  WrapIfAdditionalTemplate
@@ -581,7 +595,7 @@
581
595
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
582
596
  const description = options.description ?? schema.description;
583
597
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
584
- !hideLabel && !!description && /* @__PURE__ */ jsxRuntime.jsx(
598
+ !hideLabel && description && /* @__PURE__ */ jsxRuntime.jsx(
585
599
  DescriptionFieldTemplate,
586
600
  {
587
601
  id: utils.descriptionId(id),
@@ -812,7 +826,7 @@
812
826
  );
813
827
  }
814
828
  var SelectWidget_default = SelectWidget;
815
- var useStyles10 = reactComponents.makeStyles({
829
+ var useStyles11 = reactComponents.makeStyles({
816
830
  label: {
817
831
  paddingTop: "2px",
818
832
  paddingBottom: "2px",
@@ -837,7 +851,7 @@
837
851
  options,
838
852
  schema
839
853
  } = props;
840
- const classes = useStyles10();
854
+ const classes = useStyles11();
841
855
  const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
842
856
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
843
857
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
package/dist/index.esm.js CHANGED
@@ -198,6 +198,7 @@ function BaseInputTemplate(props) {
198
198
 
199
199
  // src/DescriptionField/DescriptionField.tsx
200
200
  import { Text, makeStyles as makeStyles4, tokens } from "@fluentui/react-components";
201
+ import { RichDescription } from "@rjsf/core";
201
202
  import { jsx as jsx5 } from "react/jsx-runtime";
202
203
  var useStyles4 = makeStyles4({
203
204
  label: {
@@ -206,12 +207,12 @@ var useStyles4 = makeStyles4({
206
207
  }
207
208
  });
208
209
  function DescriptionField(props) {
209
- const { id, description } = props;
210
+ const { id, description, registry, uiSchema } = props;
210
211
  const classes = useStyles4();
211
- if (description) {
212
- return /* @__PURE__ */ jsx5(Text, { block: true, id, className: classes.label, children: description });
212
+ if (!description) {
213
+ return null;
213
214
  }
214
- return null;
215
+ return /* @__PURE__ */ jsx5(Text, { block: true, id, className: classes.label, children: /* @__PURE__ */ jsx5(RichDescription, { description, registry, uiSchema }) });
215
216
  }
216
217
 
217
218
  // src/ErrorList/ErrorList.tsx
@@ -425,6 +426,23 @@ function GridTemplate(props) {
425
426
  return /* @__PURE__ */ jsx11("div", { style, ...rest, children });
426
427
  }
427
428
 
429
+ // src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx
430
+ import { makeStyles as makeStyles7 } from "@fluentui/react-components";
431
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
432
+ var useStyles7 = makeStyles7({
433
+ root: {
434
+ "> div": { marginBottom: "4px" }
435
+ }
436
+ });
437
+ function MultiSchemaFieldTemplate(props) {
438
+ const { selector, optionSchemaField } = props;
439
+ const styles = useStyles7();
440
+ return /* @__PURE__ */ jsxs6("div", { className: styles.root, children: [
441
+ /* @__PURE__ */ jsx12("div", { children: selector }),
442
+ optionSchemaField
443
+ ] });
444
+ }
445
+
428
446
  // src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
429
447
  import { Flex as Flex3 } from "@fluentui/react-migration-v0-v9";
430
448
  import {
@@ -435,7 +453,7 @@ import {
435
453
  titleId,
436
454
  buttonId as buttonId2
437
455
  } from "@rjsf/utils";
438
- import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
456
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
439
457
  function ObjectFieldTemplate(props) {
440
458
  const {
441
459
  description,
@@ -461,8 +479,8 @@ function ObjectFieldTemplate(props) {
461
479
  const {
462
480
  ButtonTemplates: { AddButton: AddButton2 }
463
481
  } = registry.templates;
464
- return /* @__PURE__ */ jsxs6(Fragment3, { children: [
465
- title && /* @__PURE__ */ jsx12(
482
+ return /* @__PURE__ */ jsxs7(Fragment3, { children: [
483
+ title && /* @__PURE__ */ jsx13(
466
484
  TitleFieldTemplate,
467
485
  {
468
486
  id: titleId(idSchema),
@@ -473,7 +491,7 @@ function ObjectFieldTemplate(props) {
473
491
  registry
474
492
  }
475
493
  ),
476
- description && /* @__PURE__ */ jsx12(
494
+ description && /* @__PURE__ */ jsx13(
477
495
  DescriptionFieldTemplate,
478
496
  {
479
497
  id: descriptionId(idSchema),
@@ -483,15 +501,15 @@ function ObjectFieldTemplate(props) {
483
501
  registry
484
502
  }
485
503
  ),
486
- /* @__PURE__ */ jsxs6(Flex3, { fill: true, column: true, gap: "gap.medium", children: [
504
+ /* @__PURE__ */ jsxs7(Flex3, { fill: true, column: true, gap: "gap.medium", children: [
487
505
  properties.map(
488
506
  (element, index) => (
489
507
  // Remove the <Grid> if the inner element is hidden as the <Grid>
490
508
  // itself would otherwise still take up space.
491
- element.hidden ? element.content : /* @__PURE__ */ jsx12(Flex3, { column: true, fill: true, style: { marginBottom: "10px" }, children: element.content }, index)
509
+ element.hidden ? element.content : /* @__PURE__ */ jsx13(Flex3, { column: true, fill: true, style: { marginBottom: "10px" }, children: element.content }, index)
492
510
  )
493
511
  ),
494
- canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx12(Flex3, { hAlign: "end", children: /* @__PURE__ */ jsx12(
512
+ canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx13(Flex3, { hAlign: "end", children: /* @__PURE__ */ jsx13(
495
513
  AddButton2,
496
514
  {
497
515
  id: buttonId2(idSchema, "add"),
@@ -508,26 +526,26 @@ function ObjectFieldTemplate(props) {
508
526
 
509
527
  // src/SubmitButton/SubmitButton.tsx
510
528
  import { getSubmitButtonOptions } from "@rjsf/utils";
511
- import { Button as Button3, makeStyles as makeStyles7, tokens as tokens4 } from "@fluentui/react-components";
512
- import { jsx as jsx13 } from "react/jsx-runtime";
513
- var useStyles7 = makeStyles7({
529
+ import { Button as Button3, makeStyles as makeStyles8, tokens as tokens4 } from "@fluentui/react-components";
530
+ import { jsx as jsx14 } from "react/jsx-runtime";
531
+ var useStyles8 = makeStyles8({
514
532
  buttonRow: {
515
533
  marginTop: tokens4.spacingVerticalL
516
534
  }
517
535
  });
518
536
  function SubmitButton({ uiSchema }) {
519
- const classes = useStyles7();
537
+ const classes = useStyles8();
520
538
  const { submitText, norender, props: submitButtonProps } = getSubmitButtonOptions(uiSchema);
521
539
  if (norender) {
522
540
  return null;
523
541
  }
524
- return /* @__PURE__ */ jsx13("div", { className: classes.buttonRow, children: /* @__PURE__ */ jsx13(Button3, { appearance: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
542
+ return /* @__PURE__ */ jsx14("div", { className: classes.buttonRow, children: /* @__PURE__ */ jsx14(Button3, { appearance: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
525
543
  }
526
544
 
527
545
  // src/TitleField/TitleField.tsx
528
- import { Text as Text4, Divider, makeStyles as makeStyles8 } from "@fluentui/react-components";
529
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
530
- var useStyles8 = makeStyles8({
546
+ import { Text as Text4, Divider, makeStyles as makeStyles9 } from "@fluentui/react-components";
547
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
548
+ var useStyles9 = makeStyles9({
531
549
  root: {
532
550
  marginTop: "8px",
533
551
  marginBottom: "8px"
@@ -537,10 +555,10 @@ function TitleField({
537
555
  id,
538
556
  title
539
557
  }) {
540
- const classes = useStyles8();
541
- return /* @__PURE__ */ jsxs7("div", { id, className: classes.root, children: [
542
- /* @__PURE__ */ jsx14(Text4, { as: "h5", size: 600, children: title }),
543
- /* @__PURE__ */ jsx14(Divider, {})
558
+ const classes = useStyles9();
559
+ return /* @__PURE__ */ jsxs8("div", { id, className: classes.root, children: [
560
+ /* @__PURE__ */ jsx15(Text4, { as: "h5", size: 600, children: title }),
561
+ /* @__PURE__ */ jsx15(Divider, {})
544
562
  ] });
545
563
  }
546
564
 
@@ -550,10 +568,10 @@ import {
550
568
  buttonId as buttonId3,
551
569
  TranslatableString as TranslatableString4
552
570
  } from "@rjsf/utils";
553
- import { Field as Field2, Input as Input2, makeStyles as makeStyles9 } from "@fluentui/react-components";
571
+ import { Field as Field2, Input as Input2, makeStyles as makeStyles10 } from "@fluentui/react-components";
554
572
  import { Flex as Flex4 } from "@fluentui/react-migration-v0-v9";
555
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
556
- var useStyles9 = makeStyles9({
573
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
574
+ var useStyles10 = makeStyles10({
557
575
  input: {
558
576
  width: "100%"
559
577
  },
@@ -578,7 +596,7 @@ function WrapIfAdditionalTemplate(props) {
578
596
  registry
579
597
  } = props;
580
598
  const { templates, translateString } = registry;
581
- const classes = useStyles9();
599
+ const classes = useStyles10();
582
600
  const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
583
601
  const keyLabel = translateString(TranslatableString4.KeyLabel, [label]);
584
602
  const additional = ADDITIONAL_PROPERTY_FLAG in schema;
@@ -589,11 +607,11 @@ function WrapIfAdditionalTemplate(props) {
589
607
  fontWeight: "bold"
590
608
  };
591
609
  if (!additional) {
592
- return /* @__PURE__ */ jsx15("div", { className: classNames, style, children });
610
+ return /* @__PURE__ */ jsx16("div", { className: classNames, style, children });
593
611
  }
594
612
  const handleBlur = ({ target }) => onKeyChange(target.value);
595
- return /* @__PURE__ */ jsxs8(Flex4, { gap: "gap.medium", vAlign: "center", className: classNames, style, children: [
596
- /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsx15(Field2, { label: keyLabel, required, children: /* @__PURE__ */ jsx15(
613
+ return /* @__PURE__ */ jsxs9(Flex4, { gap: "gap.medium", vAlign: "center", className: classNames, style, children: [
614
+ /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(Field2, { label: keyLabel, required, children: /* @__PURE__ */ jsx16(
597
615
  Input2,
598
616
  {
599
617
  required,
@@ -608,8 +626,8 @@ function WrapIfAdditionalTemplate(props) {
608
626
  }
609
627
  }
610
628
  ) }) }),
611
- /* @__PURE__ */ jsx15("div", { children }),
612
- /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsx15(
629
+ /* @__PURE__ */ jsx16("div", { children }),
630
+ /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(
613
631
  RemoveButton2,
614
632
  {
615
633
  id: buttonId3(id, "remove"),
@@ -645,6 +663,7 @@ function generateTemplates() {
645
663
  FieldHelpTemplate,
646
664
  FieldTemplate,
647
665
  GridTemplate,
666
+ MultiSchemaFieldTemplate,
648
667
  ObjectFieldTemplate,
649
668
  TitleFieldTemplate: TitleField,
650
669
  WrapIfAdditionalTemplate
@@ -660,7 +679,7 @@ import {
660
679
  schemaRequiresTrueValue
661
680
  } from "@rjsf/utils";
662
681
  import { Checkbox } from "@fluentui/react-components";
663
- import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
682
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
664
683
  function CheckboxWidget(props) {
665
684
  const {
666
685
  schema,
@@ -688,8 +707,8 @@ function CheckboxWidget(props) {
688
707
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
689
708
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
690
709
  const description = options.description ?? schema.description;
691
- return /* @__PURE__ */ jsxs9(Fragment4, { children: [
692
- !hideLabel && !!description && /* @__PURE__ */ jsx16(
710
+ return /* @__PURE__ */ jsxs10(Fragment4, { children: [
711
+ !hideLabel && description && /* @__PURE__ */ jsx17(
693
712
  DescriptionFieldTemplate,
694
713
  {
695
714
  id: descriptionId2(id),
@@ -699,7 +718,7 @@ function CheckboxWidget(props) {
699
718
  registry
700
719
  }
701
720
  ),
702
- /* @__PURE__ */ jsx16(
721
+ /* @__PURE__ */ jsx17(
703
722
  Checkbox,
704
723
  {
705
724
  id,
@@ -730,7 +749,7 @@ import {
730
749
  } from "@rjsf/utils";
731
750
  import { Label as Label2, Checkbox as Checkbox2 } from "@fluentui/react-components";
732
751
  import { Flex as Flex5 } from "@fluentui/react-migration-v0-v9";
733
- import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
752
+ import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
734
753
  function CheckboxesWidget({
735
754
  label,
736
755
  hideLabel,
@@ -756,15 +775,15 @@ function CheckboxesWidget({
756
775
  };
757
776
  const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
758
777
  const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
759
- return /* @__PURE__ */ jsxs10(Fragment5, { children: [
778
+ return /* @__PURE__ */ jsxs11(Fragment5, { children: [
760
779
  labelValue2(
761
- /* @__PURE__ */ jsx17(Label2, { required, htmlFor: id, children: label || void 0 }),
780
+ /* @__PURE__ */ jsx18(Label2, { required, htmlFor: id, children: label || void 0 }),
762
781
  hideLabel
763
782
  ),
764
- /* @__PURE__ */ jsx17(Flex5, { column: !inline, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
783
+ /* @__PURE__ */ jsx18(Flex5, { column: !inline, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
765
784
  const checked = enumOptionsIsSelected(option.value, checkboxesValues);
766
785
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
767
- return /* @__PURE__ */ jsx17(
786
+ return /* @__PURE__ */ jsx18(
768
787
  Checkbox2,
769
788
  {
770
789
  id: optionId(id, index),
@@ -793,7 +812,7 @@ import {
793
812
  optionId as optionId2
794
813
  } from "@rjsf/utils";
795
814
  import { Label as Label3, Radio, RadioGroup } from "@fluentui/react-components";
796
- import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
815
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
797
816
  function RadioWidget({
798
817
  id,
799
818
  options,
@@ -812,12 +831,12 @@ function RadioWidget({
812
831
  const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
813
832
  const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
814
833
  const selectedIndex = enumOptionsIndexForValue(value, enumOptions) ?? void 0;
815
- return /* @__PURE__ */ jsxs11(Fragment6, { children: [
834
+ return /* @__PURE__ */ jsxs12(Fragment6, { children: [
816
835
  labelValue3(
817
- /* @__PURE__ */ jsx18(Label3, { required, htmlFor: id, children: label || void 0 }),
836
+ /* @__PURE__ */ jsx19(Label3, { required, htmlFor: id, children: label || void 0 }),
818
837
  hideLabel
819
838
  ),
820
- /* @__PURE__ */ jsx18(
839
+ /* @__PURE__ */ jsx19(
821
840
  RadioGroup,
822
841
  {
823
842
  id,
@@ -830,7 +849,7 @@ function RadioWidget({
830
849
  "aria-describedby": ariaDescribedByIds4(id),
831
850
  children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
832
851
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
833
- return /* @__PURE__ */ jsx18(
852
+ return /* @__PURE__ */ jsx19(
834
853
  Radio,
835
854
  {
836
855
  id: optionId2(id, index),
@@ -853,7 +872,7 @@ import {
853
872
  rangeSpec
854
873
  } from "@rjsf/utils";
855
874
  import { Label as Label4, Slider } from "@fluentui/react-components";
856
- import { Fragment as Fragment7, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
875
+ import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
857
876
  function RangeWidget(props) {
858
877
  const { value, readonly, disabled, onBlur, onFocus, options, schema, onChange, required, label, hideLabel, id } = props;
859
878
  const sliderProps = { value, label, id, name: id, ...rangeSpec(schema) };
@@ -862,12 +881,12 @@ function RangeWidget(props) {
862
881
  };
863
882
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
864
883
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
865
- return /* @__PURE__ */ jsxs12(Fragment7, { children: [
884
+ return /* @__PURE__ */ jsxs13(Fragment7, { children: [
866
885
  labelValue4(
867
- /* @__PURE__ */ jsx19(Label4, { required, htmlFor: id, children: label || void 0 }),
886
+ /* @__PURE__ */ jsx20(Label4, { required, htmlFor: id, children: label || void 0 }),
868
887
  hideLabel
869
888
  ),
870
- /* @__PURE__ */ jsx19(
889
+ /* @__PURE__ */ jsx20(
871
890
  Slider,
872
891
  {
873
892
  disabled: disabled || readonly,
@@ -889,7 +908,7 @@ import {
889
908
  labelValue as labelValue5
890
909
  } from "@rjsf/utils";
891
910
  import { Dropdown, Field as Field3, Option } from "@fluentui/react-components";
892
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
911
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
893
912
  function getValue(data, multiple) {
894
913
  if (multiple) {
895
914
  return data.selectedOptions;
@@ -930,13 +949,13 @@ function SelectWidget({
930
949
  return onChange(enumOptionsValueForIndex3(newValue, enumOptions, optEmptyVal));
931
950
  };
932
951
  const showPlaceholderOption = !multiple && schema.default === void 0;
933
- return /* @__PURE__ */ jsx20(
952
+ return /* @__PURE__ */ jsx21(
934
953
  Field3,
935
954
  {
936
955
  label: labelValue5(label, hideLabel),
937
956
  validationState: rawErrors.length ? "error" : void 0,
938
957
  required,
939
- children: /* @__PURE__ */ jsxs13(
958
+ children: /* @__PURE__ */ jsxs14(
940
959
  Dropdown,
941
960
  {
942
961
  id,
@@ -952,10 +971,10 @@ function SelectWidget({
952
971
  selectedOptions: selectedIndexesAsArray,
953
972
  "aria-describedby": ariaDescribedByIds6(id),
954
973
  children: [
955
- showPlaceholderOption && /* @__PURE__ */ jsx20(Option, { value: "", children: placeholder || "" }),
974
+ showPlaceholderOption && /* @__PURE__ */ jsx21(Option, { value: "", children: placeholder || "" }),
956
975
  Array.isArray(enumOptions) && enumOptions.map(({ value: value2, label: label2 }, i) => {
957
976
  const disabled2 = enumDisabled && enumDisabled.indexOf(value2) !== -1;
958
- return /* @__PURE__ */ jsx20(Option, { value: String(i), disabled: disabled2, children: label2 }, i);
977
+ return /* @__PURE__ */ jsx21(Option, { value: String(i), disabled: disabled2, children: label2 }, i);
959
978
  })
960
979
  ]
961
980
  }
@@ -966,13 +985,13 @@ function SelectWidget({
966
985
  var SelectWidget_default = SelectWidget;
967
986
 
968
987
  // src/TextareaWidget/TextareaWidget.tsx
969
- import { Label as Label5, Textarea, makeStyles as makeStyles10 } from "@fluentui/react-components";
988
+ import { Label as Label5, Textarea, makeStyles as makeStyles11 } from "@fluentui/react-components";
970
989
  import {
971
990
  ariaDescribedByIds as ariaDescribedByIds7,
972
991
  labelValue as labelValue6
973
992
  } from "@rjsf/utils";
974
- import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
975
- var useStyles10 = makeStyles10({
993
+ import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
994
+ var useStyles11 = makeStyles11({
976
995
  label: {
977
996
  paddingTop: "2px",
978
997
  paddingBottom: "2px",
@@ -997,7 +1016,7 @@ function TextareaWidget(props) {
997
1016
  options,
998
1017
  schema
999
1018
  } = props;
1000
- const classes = useStyles10();
1019
+ const classes = useStyles11();
1001
1020
  const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
1002
1021
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
1003
1022
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
@@ -1005,12 +1024,12 @@ function TextareaWidget(props) {
1005
1024
  if (typeof options.rows === "string" || typeof options.rows === "number") {
1006
1025
  rows = options.rows;
1007
1026
  }
1008
- return /* @__PURE__ */ jsxs14(Fragment8, { children: [
1027
+ return /* @__PURE__ */ jsxs15(Fragment8, { children: [
1009
1028
  labelValue6(
1010
- /* @__PURE__ */ jsx21(Label5, { htmlFor: id, required, disabled, className: classes.label, children: label }),
1029
+ /* @__PURE__ */ jsx22(Label5, { htmlFor: id, required, disabled, className: classes.label, children: label }),
1011
1030
  hideLabel
1012
1031
  ),
1013
- /* @__PURE__ */ jsx21(
1032
+ /* @__PURE__ */ jsx22(
1014
1033
  Textarea,
1015
1034
  {
1016
1035
  id,
@@ -1061,14 +1080,14 @@ var FluentForm_default = generateForm();
1061
1080
  // src/FluentUIRCFrameProvider.tsx
1062
1081
  import { FluentProvider, RendererProvider, createDOMRenderer, teamsLightTheme } from "@fluentui/react-components";
1063
1082
  import { useMemo } from "react";
1064
- import { jsx as jsx22 } from "react/jsx-runtime";
1083
+ import { jsx as jsx23 } from "react/jsx-runtime";
1065
1084
  var FluentWrapper = (props) => {
1066
1085
  const { children, targetDocument } = props;
1067
1086
  const renderer = useMemo(() => createDOMRenderer(targetDocument), [targetDocument]);
1068
- return /* @__PURE__ */ jsx22(RendererProvider, { renderer, targetDocument, children: /* @__PURE__ */ jsx22(FluentProvider, { targetDocument, theme: teamsLightTheme, children }) });
1087
+ return /* @__PURE__ */ jsx23(RendererProvider, { renderer, targetDocument, children: /* @__PURE__ */ jsx23(FluentProvider, { targetDocument, theme: teamsLightTheme, children }) });
1069
1088
  };
1070
1089
  var __createFluentUIRCFrameProvider = (props) => ({ document }) => {
1071
- return /* @__PURE__ */ jsx22(FluentWrapper, { targetDocument: document, children: props.children });
1090
+ return /* @__PURE__ */ jsx23(FluentWrapper, { targetDocument: document, children: props.children });
1072
1091
  };
1073
1092
 
1074
1093
  // src/index.ts