@rjsf/shadcn 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.
- package/dist/index.js +8 -7
- package/dist/index.js.map +3 -3
- package/dist/rjsf-shadcn.esm.js +6 -5
- package/dist/rjsf-shadcn.esm.js.map +2 -2
- package/dist/rjsf-shadcn.umd.js +5 -5
- package/lib/CheckboxWidget/CheckboxWidget.js +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/DescriptionField/DescriptionField.d.ts +1 -1
- package/lib/DescriptionField/DescriptionField.js +5 -4
- package/lib/DescriptionField/DescriptionField.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/CheckboxWidget/CheckboxWidget.tsx +1 -1
- package/src/DescriptionField/DescriptionField.tsx +11 -10
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ __export(index_exports, {
|
|
|
43
43
|
module.exports = __toCommonJS(index_exports);
|
|
44
44
|
|
|
45
45
|
// src/Form/Form.tsx
|
|
46
|
-
var
|
|
46
|
+
var import_core2 = require("@rjsf/core");
|
|
47
47
|
|
|
48
48
|
// src/AddButton/AddButton.tsx
|
|
49
49
|
var import_utils2 = require("@rjsf/utils");
|
|
@@ -271,12 +271,13 @@ function BaseInputTemplate({
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
// src/DescriptionField/DescriptionField.tsx
|
|
274
|
+
var import_core = require("@rjsf/core");
|
|
274
275
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
275
|
-
function DescriptionField({ id, description }) {
|
|
276
|
-
if (description) {
|
|
277
|
-
return
|
|
276
|
+
function DescriptionField({ id, description, registry, uiSchema }) {
|
|
277
|
+
if (!description) {
|
|
278
|
+
return null;
|
|
278
279
|
}
|
|
279
|
-
return
|
|
280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id, className: "text-sm text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core.RichDescription, { description, registry, uiSchema }) }) });
|
|
280
281
|
}
|
|
281
282
|
|
|
282
283
|
// src/ErrorList/ErrorList.tsx
|
|
@@ -779,7 +780,7 @@ function CheckboxWidget(props) {
|
|
|
779
780
|
className: `relative ${disabled || readonly ? "cursor-not-allowed opacity-50" : ""}`,
|
|
780
781
|
"aria-describedby": (0, import_utils24.ariaDescribedByIds)(id),
|
|
781
782
|
children: [
|
|
782
|
-
!hideLabel &&
|
|
783
|
+
!hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
783
784
|
DescriptionFieldTemplate,
|
|
784
785
|
{
|
|
785
786
|
id: (0, import_utils24.descriptionId)(id),
|
|
@@ -1512,7 +1513,7 @@ var Theme_default = generateTheme();
|
|
|
1512
1513
|
|
|
1513
1514
|
// src/Form/Form.tsx
|
|
1514
1515
|
function generateForm() {
|
|
1515
|
-
return (0,
|
|
1516
|
+
return (0, import_core2.withTheme)(generateTheme());
|
|
1516
1517
|
}
|
|
1517
1518
|
var Form_default = generateForm();
|
|
1518
1519
|
|