@dxos/react-ui-form 0.8.3-main.672df60 → 0.8.3-main.7f5a14c

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.
@@ -732,6 +732,7 @@ var MarkdownInput = ({ type, label, inputOnly, disabled, placeholder, getStatus,
732
732
  // packages/ui/react-ui-form/src/components/Form/Form.tsx
733
733
  import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
734
734
  import React13, { useEffect as useEffect7, useMemo as useMemo6, useRef as useRef3 } from "react";
735
+ import { cardSpacing } from "@dxos/react-ui-stack";
735
736
  import { mx as mx7 } from "@dxos/react-ui-theme";
736
737
 
737
738
  // packages/ui/react-ui-form/src/components/Form/FormActions.tsx
@@ -1110,7 +1111,7 @@ var FormActions = ({ readonly, onCancel }) => {
1110
1111
  const { canSave, handleSave } = useFormContext();
1111
1112
  return /* @__PURE__ */ React9.createElement("div", {
1112
1113
  role: "none",
1113
- className: "flex [&_button]:grow gap-1 pli-2 pbe-2"
1114
+ className: "flex [&_button]:grow gap-1 mlb-3 last:mbe-0 first:mbs-0"
1114
1115
  }, onCancel && !readonly && /* @__PURE__ */ React9.createElement(IconButton2, {
1115
1116
  "data-testid": "cancel-button",
1116
1117
  icon: "ph--x--regular",
@@ -1833,7 +1834,7 @@ var FormField = ({ property, path, readonly, inline, onQueryRefOptions, lookupCo
1833
1834
  const typeLiteral = baseNode ? getDiscriminatedType2(baseNode, inputProps.getValue()) : findNode3(ast, SchemaAST4.isTypeLiteral);
1834
1835
  if (typeLiteral) {
1835
1836
  return /* @__PURE__ */ React12.createElement(React12.Fragment, null, !inline && /* @__PURE__ */ React12.createElement("h3", {
1836
- className: "text-lg mbs-2 mbe-1 first:mbs-0"
1837
+ className: mx6("text-lg mlb-card-spacing-block first:mbs-0")
1837
1838
  }, label), /* @__PURE__ */ React12.createElement(FormFields, {
1838
1839
  schema: Schema.make(typeLiteral),
1839
1840
  path,
@@ -1867,7 +1868,7 @@ var FormFields = ({ classNames, Custom, schema, path, filter, sort, readonly, lo
1867
1868
  // TODO(burdon): Consistent padding (with composite forms).
1868
1869
  /* @__PURE__ */ React12.createElement("div", {
1869
1870
  role: "form",
1870
- className: mx6("p-2 is-full", classNames)
1871
+ className: mx6("is-full", classNames)
1871
1872
  }, properties.map((property) => {
1872
1873
  return /* @__PURE__ */ React12.createElement(FormField, {
1873
1874
  key: property.name,
@@ -1889,7 +1890,7 @@ var FormFields = ({ classNames, Custom, schema, path, filter, sort, readonly, lo
1889
1890
  };
1890
1891
 
1891
1892
  // packages/ui/react-ui-form/src/components/Form/Form.tsx
1892
- var Form = ({ classNames, schema, values: initialValues, path = [], autoFocus, readonly, filter, sort, autoSave, testId, onValuesChanged, onValidate, onSave, onCancel, onQueryRefOptions, lookupComponent, Custom }) => {
1893
+ var Form = ({ classNames, schema, values: initialValues, path = [], autoFocus, readonly, filter, sort, autoSave, flush, testId, onValuesChanged, onValidate, onSave, onCancel, onQueryRefOptions, lookupComponent, Custom }) => {
1893
1894
  var _effect = _useSignals13();
1894
1895
  try {
1895
1896
  const formRef = useRef3(null);
@@ -1919,7 +1920,7 @@ var Form = ({ classNames, schema, values: initialValues, path = [], autoFocus, r
1919
1920
  }, /* @__PURE__ */ React13.createElement("div", {
1920
1921
  ref: formRef,
1921
1922
  role: "none",
1922
- className: mx7("flex flex-col gap-4", classNames),
1923
+ className: mx7(!flush && cardSpacing, classNames),
1923
1924
  "data-testid": testId
1924
1925
  }, /* @__PURE__ */ React13.createElement(FormFields, {
1925
1926
  schema,
@@ -2252,7 +2253,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2252
2253
  className: mx8("overflow-y-auto", classNames)
2253
2254
  }, immutable && /* @__PURE__ */ React15.createElement("div", {
2254
2255
  role: "none",
2255
- className: "mbe-2"
2256
+ className: "mbe-card-spacing-block"
2256
2257
  }, /* @__PURE__ */ React15.createElement(Message.Root, {
2257
2258
  valence: "neutral",
2258
2259
  className: "rounded"
@@ -2271,7 +2272,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2271
2272
  className: "min-bs-0 overflow-y-auto"
2272
2273
  }, /* @__PURE__ */ React15.createElement("div", {
2273
2274
  role: "none",
2274
- className: "p-2"
2275
+ className: "pli-card-spacing-inline mlb-card-spacing-block"
2275
2276
  }, /* @__PURE__ */ React15.createElement("label", {
2276
2277
  className: mx8(inputTextLabel)
2277
2278
  }, t("fields label"))), /* @__PURE__ */ React15.createElement(List2.Root, {
@@ -2306,7 +2307,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2306
2307
  onClick: () => handleDelete(field2.id)
2307
2308
  }))))))), hiddenProperties.length > 0 && /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement("div", {
2308
2309
  role: "none",
2309
- className: "p-2"
2310
+ className: "pli-card-spacing-inline mlb-card-spacing-block"
2310
2311
  }, /* @__PURE__ */ React15.createElement("label", {
2311
2312
  className: mx8(inputTextLabel)
2312
2313
  }, t("hidden fields label"))), /* @__PURE__ */ React15.createElement(List2.Root, {
@@ -2333,7 +2334,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2333
2334
  onSave: handleClose
2334
2335
  }), !readonly && !field && /* @__PURE__ */ React15.createElement("div", {
2335
2336
  role: "none",
2336
- className: "p-2"
2337
+ className: "pli-card-spacing-chrome mlb-card-spacing-chrome"
2337
2338
  }, /* @__PURE__ */ React15.createElement(IconButton4, {
2338
2339
  icon: "ph--plus--regular",
2339
2340
  label: t("button add property"),