@almadar/ui 5.28.1 → 5.28.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.
@@ -22335,10 +22335,10 @@ function Row({
22335
22335
  const [keyDraft, setKeyDraft] = React74__namespace.default.useState(rowKey);
22336
22336
  React74__namespace.default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
22337
22337
  const container = isObj(value) || isArr(value);
22338
- return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: "group", children: [
22339
- /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "xs", align: "center", className: "py-0.5", children: [
22338
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: "group w-max min-w-full", children: [
22339
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
22340
22340
  /* @__PURE__ */ jsxRuntime.jsx(KindSelect, { kind: kindOf(value), onChange: onChangeKind }),
22341
- isArrayItem ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", className: "w-7 shrink-0 font-mono", children: rowKey }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-28 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
22341
+ isArrayItem ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", className: "w-6 shrink-0 font-mono", children: rowKey }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
22342
22342
  exports.Input,
22343
22343
  {
22344
22344
  inputType: "text",
@@ -22351,8 +22351,7 @@ function Row({
22351
22351
  className: "font-mono"
22352
22352
  }
22353
22353
  ) }),
22354
- !container && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) }),
22355
- container && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" }),
22354
+ !container && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-48 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) }),
22356
22355
  /* @__PURE__ */ jsxRuntime.jsx(
22357
22356
  exports.Button,
22358
22357
  {
@@ -22361,11 +22360,11 @@ function Row({
22361
22360
  icon: "x",
22362
22361
  onClick: onRemove,
22363
22362
  "aria-label": "Remove",
22364
- className: "opacity-0 group-hover:opacity-100 transition-opacity"
22363
+ className: "shrink-0 text-muted-foreground hover:text-error"
22365
22364
  }
22366
22365
  )
22367
22366
  ] }),
22368
- container && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pl-3", children: /* @__PURE__ */ jsxRuntime.jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) })
22367
+ container && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pl-2", children: /* @__PURE__ */ jsxRuntime.jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) })
22369
22368
  ] });
22370
22369
  }
22371
22370
  function ContainerNode({
@@ -22432,7 +22431,7 @@ function ContainerNode({
22432
22431
  exports.VStack,
22433
22432
  {
22434
22433
  gap: "none",
22435
- className: cn("ml-2 pl-2 border-l-[length:var(--border-width-thin)] border-border"),
22434
+ className: cn("ml-1.5 pl-1.5 w-max min-w-full border-l-[length:var(--border-width-thin)] border-border"),
22436
22435
  children: [
22437
22436
  entries.map(([k, v], idx) => /* @__PURE__ */ jsxRuntime.jsx(
22438
22437
  Row,
@@ -22480,15 +22479,15 @@ var init_JsonTreeEditor = __esm({
22480
22479
  TYPE_LABEL = {
22481
22480
  object: "{}",
22482
22481
  array: "[]",
22483
- string: "abc",
22484
- number: "123",
22485
- boolean: "on/off",
22482
+ string: "txt",
22483
+ number: "num",
22484
+ boolean: "y/n",
22486
22485
  null: "\u2014"
22487
22486
  };
22488
22487
  KIND_OPTIONS = ["string", "number", "boolean", "object", "array"];
22489
22488
  exports.JsonTreeEditor = ({ value, onChange, className }) => {
22490
22489
  const root = value ?? "";
22491
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full rounded-sm bg-card/40 p-2 border-[length:var(--border-width-thin)] border-border", className), children: /* @__PURE__ */ jsxRuntime.jsx(ValueNode, { value: root, onChange, depth: 0 }) });
22490
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full overflow-x-auto rounded-sm bg-card/40 p-2 border-[length:var(--border-width-thin)] border-border", className), children: /* @__PURE__ */ jsxRuntime.jsx(ValueNode, { value: root, onChange, depth: 0 }) });
22492
22491
  };
22493
22492
  }
22494
22493
  });
@@ -22287,10 +22287,10 @@ function Row({
22287
22287
  const [keyDraft, setKeyDraft] = React74__default.useState(rowKey);
22288
22288
  React74__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
22289
22289
  const container = isObj(value) || isArr(value);
22290
- return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group", children: [
22291
- /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5", children: [
22290
+ return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
22291
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
22292
22292
  /* @__PURE__ */ jsx(KindSelect, { kind: kindOf(value), onChange: onChangeKind }),
22293
- isArrayItem ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "w-7 shrink-0 font-mono", children: rowKey }) : /* @__PURE__ */ jsx("div", { className: "w-28 shrink-0", children: /* @__PURE__ */ jsx(
22293
+ isArrayItem ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "w-6 shrink-0 font-mono", children: rowKey }) : /* @__PURE__ */ jsx("div", { className: "w-20 shrink-0", children: /* @__PURE__ */ jsx(
22294
22294
  Input,
22295
22295
  {
22296
22296
  inputType: "text",
@@ -22303,8 +22303,7 @@ function Row({
22303
22303
  className: "font-mono"
22304
22304
  }
22305
22305
  ) }),
22306
- !container && /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) }),
22307
- container && /* @__PURE__ */ jsx("div", { className: "flex-1" }),
22306
+ !container && /* @__PURE__ */ jsx("div", { className: "w-48 shrink-0", children: /* @__PURE__ */ jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) }),
22308
22307
  /* @__PURE__ */ jsx(
22309
22308
  Button,
22310
22309
  {
@@ -22313,11 +22312,11 @@ function Row({
22313
22312
  icon: "x",
22314
22313
  onClick: onRemove,
22315
22314
  "aria-label": "Remove",
22316
- className: "opacity-0 group-hover:opacity-100 transition-opacity"
22315
+ className: "shrink-0 text-muted-foreground hover:text-error"
22317
22316
  }
22318
22317
  )
22319
22318
  ] }),
22320
- container && /* @__PURE__ */ jsx("div", { className: "pl-3", children: /* @__PURE__ */ jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) })
22319
+ container && /* @__PURE__ */ jsx("div", { className: "pl-2", children: /* @__PURE__ */ jsx(ValueNode, { value, onChange: onValue, depth: depth + 1 }) })
22321
22320
  ] });
22322
22321
  }
22323
22322
  function ContainerNode({
@@ -22384,7 +22383,7 @@ function ContainerNode({
22384
22383
  VStack,
22385
22384
  {
22386
22385
  gap: "none",
22387
- className: cn("ml-2 pl-2 border-l-[length:var(--border-width-thin)] border-border"),
22386
+ className: cn("ml-1.5 pl-1.5 w-max min-w-full border-l-[length:var(--border-width-thin)] border-border"),
22388
22387
  children: [
22389
22388
  entries.map(([k, v], idx) => /* @__PURE__ */ jsx(
22390
22389
  Row,
@@ -22432,15 +22431,15 @@ var init_JsonTreeEditor = __esm({
22432
22431
  TYPE_LABEL = {
22433
22432
  object: "{}",
22434
22433
  array: "[]",
22435
- string: "abc",
22436
- number: "123",
22437
- boolean: "on/off",
22434
+ string: "txt",
22435
+ number: "num",
22436
+ boolean: "y/n",
22438
22437
  null: "\u2014"
22439
22438
  };
22440
22439
  KIND_OPTIONS = ["string", "number", "boolean", "object", "array"];
22441
22440
  JsonTreeEditor = ({ value, onChange, className }) => {
22442
22441
  const root = value ?? "";
22443
- return /* @__PURE__ */ jsx("div", { className: cn("w-full rounded-sm bg-card/40 p-2 border-[length:var(--border-width-thin)] border-border", className), children: /* @__PURE__ */ jsx(ValueNode, { value: root, onChange, depth: 0 }) });
22442
+ return /* @__PURE__ */ jsx("div", { className: cn("w-full overflow-x-auto rounded-sm bg-card/40 p-2 border-[length:var(--border-width-thin)] border-border", className), children: /* @__PURE__ */ jsx(ValueNode, { value: root, onChange, depth: 0 }) });
22444
22443
  };
22445
22444
  }
22446
22445
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.28.1",
3
+ "version": "5.28.2",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [