@rjsf/chakra-ui 6.0.0-beta.1 → 6.0.0-beta.2

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.
@@ -194,16 +194,14 @@ function BaseInputTemplate(props) {
194
194
  }
195
195
 
196
196
  // src/DescriptionField/DescriptionField.tsx
197
+ import { RichDescription } from "@rjsf/core";
197
198
  import { Text } from "@chakra-ui/react";
198
- import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
199
- function DescriptionField({ description, id }) {
199
+ import { jsx as jsx6 } from "react/jsx-runtime";
200
+ function DescriptionField({ description, id, registry, uiSchema }) {
200
201
  if (!description) {
201
202
  return null;
202
203
  }
203
- if (typeof description === "string") {
204
- return /* @__PURE__ */ jsx6(Text, { as: "sup", fontSize: "md", id, children: description });
205
- }
206
- return /* @__PURE__ */ jsx6(Fragment, { children: description });
204
+ return /* @__PURE__ */ jsx6(Text, { as: "sup", fontSize: "md", id, children: /* @__PURE__ */ jsx6(RichDescription, { description, registry, uiSchema }) });
207
205
  }
208
206
 
209
207
  // src/ErrorList/ErrorList.tsx
@@ -436,7 +434,7 @@ import {
436
434
  getUiOptions as getUiOptions4,
437
435
  titleId
438
436
  } from "@rjsf/utils";
439
- import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
437
+ import { Fragment, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
440
438
  function ObjectFieldTemplate(props) {
441
439
  const {
442
440
  description,
@@ -462,7 +460,7 @@ function ObjectFieldTemplate(props) {
462
460
  const {
463
461
  ButtonTemplates: { AddButton: AddButton2 }
464
462
  } = registry.templates;
465
- return /* @__PURE__ */ jsxs9(Fragment2, { children: [
463
+ return /* @__PURE__ */ jsxs9(Fragment, { children: [
466
464
  title && /* @__PURE__ */ jsx16(
467
465
  TitleFieldTemplate,
468
466
  {
@@ -790,7 +788,7 @@ function CheckboxWidget(props) {
790
788
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
791
789
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
792
790
  return /* @__PURE__ */ jsxs14(Field, { mb: 1, required, children: [
793
- !hideLabel && !!description && /* @__PURE__ */ jsx23(
791
+ !hideLabel && description && /* @__PURE__ */ jsx23(
794
792
  DescriptionFieldTemplate,
795
793
  {
796
794
  id: descriptionId2(id),
@@ -967,7 +965,7 @@ import {
967
965
  // src/components/ui/slider.tsx
968
966
  import { forwardRef as forwardRef6 } from "react";
969
967
  import { Slider as ChakraSlider, HStack as HStack2 } from "@chakra-ui/react";
970
- import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
968
+ import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
971
969
  var Slider = forwardRef6(function Slider2(props, ref) {
972
970
  const { marks: marksProp, showValue, ...rest } = props;
973
971
  const value = props.defaultValue ?? props.value;
@@ -989,7 +987,7 @@ var Slider = forwardRef6(function Slider2(props, ref) {
989
987
  });
990
988
  function SliderThumbs(props) {
991
989
  const { value } = props;
992
- return /* @__PURE__ */ jsx27(Fragment3, { children: value?.map((_, index) => /* @__PURE__ */ jsx27(ChakraSlider.Thumb, { index, children: /* @__PURE__ */ jsx27(ChakraSlider.HiddenInput, {}) }, index)) });
990
+ return /* @__PURE__ */ jsx27(Fragment2, { children: value?.map((_, index) => /* @__PURE__ */ jsx27(ChakraSlider.Thumb, { index, children: /* @__PURE__ */ jsx27(ChakraSlider.HiddenInput, {}) }, index)) });
993
991
  }
994
992
  var SliderMarks = forwardRef6(function SliderMarks2(props, ref) {
995
993
  const { marks } = props;
@@ -1053,7 +1051,7 @@ import { createListCollection, Select as ChakraSelect2 } from "@chakra-ui/react"
1053
1051
  // src/components/ui/select.tsx
1054
1052
  import { forwardRef as forwardRef7 } from "react";
1055
1053
  import { Select as ChakraSelect, Portal } from "@chakra-ui/react";
1056
- import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
1054
+ import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
1057
1055
  var SelectTrigger = forwardRef7(function SelectTrigger2(props, ref) {
1058
1056
  const { children, clearable, ...rest } = props;
1059
1057
  return /* @__PURE__ */ jsxs17(ChakraSelect.Control, { ...rest, children: [
@@ -1097,7 +1095,7 @@ var SelectValueText = forwardRef7(function SelectValueText2(props, ref) {
1097
1095
  } }) });
1098
1096
  });
1099
1097
  var SelectRoot = forwardRef7(function SelectRoot2(props, ref) {
1100
- return /* @__PURE__ */ jsx29(ChakraSelect.Root, { ...props, ref, positioning: { sameWidth: true, ...props.positioning }, children: props.asChild ? props.children : /* @__PURE__ */ jsxs17(Fragment4, { children: [
1098
+ return /* @__PURE__ */ jsx29(ChakraSelect.Root, { ...props, ref, positioning: { sameWidth: true, ...props.positioning }, children: props.asChild ? props.children : /* @__PURE__ */ jsxs17(Fragment3, { children: [
1101
1099
  /* @__PURE__ */ jsx29(ChakraSelect.HiddenSelect, {}),
1102
1100
  props.children
1103
1101
  ] }) });