@alexgorbatchev/shadcn 0.0.136 → 0.0.137

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.
@@ -83,7 +83,10 @@ export interface IJsonFieldLabelProps {
83
83
  id?: string;
84
84
  htmlFor?: string;
85
85
  }
86
- /** The field's "Required" and "Default" tags, in that order; nothing when neither applies. */
86
+ /**
87
+ * The field's "Required" and "Default" tags, in that order; nothing when neither applies. "Required" asks for an
88
+ * answer, so a read-only value never carries it.
89
+ */
87
90
  export declare function JsonFieldTags({ field }: {
88
91
  field: IJsonField;
89
92
  }): ReactElement | null;
@@ -333,11 +333,12 @@ function useJsonField({ path, label, checks, ownErrors = [] }) {
333
333
  };
334
334
  }
335
335
  function JsonFieldTags({ field }) {
336
- if (!field.isRequired && !field.isDefault)
336
+ const isRequiredShown = field.isRequired && field.mode !== "values";
337
+ if (!isRequiredShown && !field.isDefault)
337
338
  return null;
338
339
  return /* @__PURE__ */ jsxs2(Fragment, {
339
340
  children: [
340
- field.isRequired && /* @__PURE__ */ jsx5(Badge2, {
341
+ isRequiredShown && /* @__PURE__ */ jsx5(Badge2, {
341
342
  variant: "outline",
342
343
  children: "Required"
343
344
  }),
@@ -350,7 +351,7 @@ function JsonFieldTags({ field }) {
350
351
  });
351
352
  }
352
353
  function JsonFieldLabel({ field, id, htmlFor }) {
353
- if (!field.label && !field.isRequired && !field.isDefault)
354
+ if (!field.label && !(field.isRequired && field.mode !== "values") && !field.isDefault)
354
355
  return null;
355
356
  return /* @__PURE__ */ jsxs2("div", {
356
357
  "data-slot": "json-field-label",
package/dist/prototype.js CHANGED
@@ -2051,7 +2051,7 @@ var program = new Command;
2051
2051
  // package.json
2052
2052
  var package_default = {
2053
2053
  name: "@alexgorbatchev/shadcn",
2054
- version: "0.0.136",
2054
+ version: "0.0.137",
2055
2055
  description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.136",
3
+ "version": "0.0.137",
4
4
  "description": "Sharp, monospace React components with compact, comfortable, and touch densities.",
5
5
  "license": "MIT",
6
6
  "repository": {