@dxos/react-ui-form 0.8.2-staging.42af850 → 0.8.2-staging.4d6ad0f

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,7 +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 { mx as mx7 } from "@dxos/react-ui-theme";
735
+ import { mx as mx6 } from "@dxos/react-ui-theme";
736
736
 
737
737
  // packages/ui/react-ui-form/src/components/Form/FormActions.tsx
738
738
  import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
@@ -1135,7 +1135,6 @@ import { Schema, SchemaAST as SchemaAST4, pipe as pipe2 } from "effect";
1135
1135
  import { capitalize as capitalize2 } from "effect/String";
1136
1136
  import React12, { useMemo as useMemo5 } from "react";
1137
1137
  import { createJsonPath as createJsonPath3, findNode as findNode3, getDiscriminatedType as getDiscriminatedType2, isDiscriminatedUnion as isDiscriminatedUnion2 } from "@dxos/effect";
1138
- import { mx as mx6 } from "@dxos/react-ui-theme";
1139
1138
  import { getSchemaProperties as getSchemaProperties2 } from "@dxos/schema";
1140
1139
  import { isNotFalsy } from "@dxos/util";
1141
1140
 
@@ -1849,7 +1848,7 @@ var FormField = ({ property, path, readonly, inline, onQueryRefOptions, lookupCo
1849
1848
  _effect.f();
1850
1849
  }
1851
1850
  };
1852
- var FormFields = ({ classNames, Custom, schema, path, filter, sort, readonly, lookupComponent, onQueryRefOptions }) => {
1851
+ var FormFields = ({ schema, path, filter, sort, readonly, onQueryRefOptions, lookupComponent, Custom }) => {
1853
1852
  var _effect = _useSignals12();
1854
1853
  try {
1855
1854
  const values = useFormValues(path);
@@ -1863,26 +1862,23 @@ var FormFields = ({ classNames, Custom, schema, path, filter, sort, readonly, lo
1863
1862
  filter,
1864
1863
  sort
1865
1864
  ]);
1866
- return (
1867
- // TODO(burdon): Consistent padding (with composite forms).
1868
- /* @__PURE__ */ React12.createElement("div", {
1869
- role: "form",
1870
- className: mx6("p-2 is-full", classNames)
1871
- }, properties.map((property) => {
1872
- return /* @__PURE__ */ React12.createElement(FormField, {
1873
- key: property.name,
1874
- property,
1875
- path: [
1876
- ...path ?? [],
1877
- property.name
1878
- ],
1879
- readonly,
1880
- onQueryRefOptions,
1881
- lookupComponent,
1882
- Custom
1883
- });
1884
- }).filter(isNotFalsy))
1885
- );
1865
+ return /* @__PURE__ */ React12.createElement("div", {
1866
+ role: "form",
1867
+ className: "is-full"
1868
+ }, properties.map((property) => {
1869
+ return /* @__PURE__ */ React12.createElement(FormField, {
1870
+ key: property.name,
1871
+ property,
1872
+ path: [
1873
+ ...path ?? [],
1874
+ property.name
1875
+ ],
1876
+ readonly,
1877
+ onQueryRefOptions,
1878
+ lookupComponent,
1879
+ Custom
1880
+ });
1881
+ }).filter(isNotFalsy));
1886
1882
  } finally {
1887
1883
  _effect.f();
1888
1884
  }
@@ -1919,7 +1915,7 @@ var Form = ({ classNames, schema, values: initialValues, path = [], autoFocus, r
1919
1915
  }, /* @__PURE__ */ React13.createElement("div", {
1920
1916
  ref: formRef,
1921
1917
  role: "none",
1922
- className: mx7("flex flex-col gap-4", classNames),
1918
+ className: mx6("flex flex-col gap-4", classNames),
1923
1919
  "data-testid": testId
1924
1920
  }, /* @__PURE__ */ React13.createElement(FormFields, {
1925
1921
  schema,
@@ -2111,7 +2107,7 @@ import { EchoSchema, Format, isMutable, toJsonSchema } from "@dxos/echo-schema";
2111
2107
  import { invariant as invariant3 } from "@dxos/invariant";
2112
2108
  import { Icon as Icon3, IconButton as IconButton4, Message, useTranslation as useTranslation9 } from "@dxos/react-ui";
2113
2109
  import { List as List2 } from "@dxos/react-ui-list";
2114
- import { ghostHover, inputTextLabel, mx as mx8 } from "@dxos/react-ui-theme";
2110
+ import { ghostHover, inputTextLabel, mx as mx7 } from "@dxos/react-ui-theme";
2115
2111
  import { FieldSchema, ViewProjection, VIEW_FIELD_LIMIT } from "@dxos/schema";
2116
2112
  var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx";
2117
2113
  var grid = "grid grid-cols-[32px_1fr_32px] min-bs-[2.5rem]";
@@ -2249,7 +2245,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2249
2245
  ]);
2250
2246
  return /* @__PURE__ */ React15.createElement("div", {
2251
2247
  role: "none",
2252
- className: mx8("overflow-y-auto", classNames)
2248
+ className: mx7("overflow-y-auto", classNames)
2253
2249
  }, /* @__PURE__ */ React15.createElement("div", {
2254
2250
  role: "none",
2255
2251
  className: "p-2"
@@ -2276,7 +2272,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2276
2272
  role: "none",
2277
2273
  className: "p-2"
2278
2274
  }, /* @__PURE__ */ React15.createElement("label", {
2279
- className: mx8(inputTextLabel)
2275
+ className: mx7(inputTextLabel)
2280
2276
  }, t("fields label"))), /* @__PURE__ */ React15.createElement(List2.Root, {
2281
2277
  items: view.fields,
2282
2278
  isItem: Schema2.is(FieldSchema),
@@ -2293,7 +2289,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2293
2289
  }, fields?.map((field2) => /* @__PURE__ */ React15.createElement(List2.Item, {
2294
2290
  key: field2.id,
2295
2291
  item: field2,
2296
- classNames: mx8(grid, ghostHover, !immutable && "cursor-pointer")
2292
+ classNames: mx7(grid, ghostHover, !immutable && "cursor-pointer")
2297
2293
  }, /* @__PURE__ */ React15.createElement(List2.ItemDragHandle, null), /* @__PURE__ */ React15.createElement(List2.ItemTitle, {
2298
2294
  onClick: () => handleSelect(field2)
2299
2295
  }, field2.path), /* @__PURE__ */ React15.createElement("div", {
@@ -2310,7 +2306,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2310
2306
  role: "none",
2311
2307
  className: "p-2"
2312
2308
  }, /* @__PURE__ */ React15.createElement("label", {
2313
- className: mx8(inputTextLabel)
2309
+ className: mx7(inputTextLabel)
2314
2310
  }, t("hidden fields label"))), /* @__PURE__ */ React15.createElement(List2.Root, {
2315
2311
  items: hiddenProperties,
2316
2312
  isItem: (item) => typeof item === "string",
@@ -2321,7 +2317,7 @@ var ViewEditor = ({ classNames, schema, view, registry, readonly, showHeading =
2321
2317
  }, properties?.map((property) => /* @__PURE__ */ React15.createElement(List2.Item, {
2322
2318
  key: property,
2323
2319
  item: property,
2324
- classNames: mx8(grid, ghostHover, !immutable && "cursor-pointer")
2320
+ classNames: mx7(grid, ghostHover, !immutable && "cursor-pointer")
2325
2321
  }, /* @__PURE__ */ React15.createElement("div", null), /* @__PURE__ */ React15.createElement(List2.ItemTitle, null, property), /* @__PURE__ */ React15.createElement(List2.ItemButton, {
2326
2322
  icon: "ph--eye--regular",
2327
2323
  onClick: () => handleShow(property)