@geomak/ui 7.3.2 → 7.3.3

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.cjs CHANGED
@@ -1286,8 +1286,7 @@ function TreeNodeItem({
1286
1286
  item,
1287
1287
  onNodeClick,
1288
1288
  defaultExpandAll,
1289
- defaultExpandedKeys,
1290
- depth = 0
1289
+ defaultExpandedKeys
1291
1290
  }) {
1292
1291
  if (!isParent(item)) {
1293
1292
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1295,7 +1294,6 @@ function TreeNodeItem({
1295
1294
  {
1296
1295
  type: "button",
1297
1296
  className: "flex w-full items-center gap-2.5 cursor-pointer select-none group text-left rounded-md px-2 py-1.5 hover:bg-surface-raised transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
1298
- style: { paddingLeft: depth * 12 + 8 },
1299
1297
  onClick: () => onNodeClick({
1300
1298
  isParent: false,
1301
1299
  key: item.key,
@@ -1311,62 +1309,53 @@ function TreeNodeItem({
1311
1309
  );
1312
1310
  }
1313
1311
  const initialOpen = defaultExpandAll || defaultExpandedKeys.includes(item.key) ? [item.key] : [];
1314
- return /* @__PURE__ */ jsxRuntime.jsx(
1315
- AccordionPrimitive__namespace.Root,
1316
- {
1317
- type: "multiple",
1318
- defaultValue: initialOpen,
1319
- style: { paddingLeft: depth * 12 },
1320
- children: /* @__PURE__ */ jsxRuntime.jsxs(AccordionPrimitive__namespace.Item, { value: item.key, className: "border-none", children: [
1321
- /* @__PURE__ */ jsxRuntime.jsxs(
1322
- AccordionPrimitive__namespace.Trigger,
1323
- {
1324
- onClick: () => onNodeClick({
1325
- isParent: true,
1326
- key: item.key,
1327
- label: item.label,
1328
- data: item.nodeData,
1329
- parentLabel: item.parentLabel
1330
- }),
1331
- className: "flex items-center gap-2 cursor-pointer py-1.5 px-2 group focus:outline-none focus-visible:ring-2 focus-visible:ring-accent w-full text-left rounded-md hover:bg-surface-raised transition-colors duration-150",
1332
- children: [
1333
- /* @__PURE__ */ jsxRuntime.jsx(
1334
- "svg",
1312
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { type: "multiple", defaultValue: initialOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(AccordionPrimitive__namespace.Item, { value: item.key, className: "border-none", children: [
1313
+ /* @__PURE__ */ jsxRuntime.jsxs(
1314
+ AccordionPrimitive__namespace.Trigger,
1315
+ {
1316
+ onClick: () => onNodeClick({
1317
+ isParent: true,
1318
+ key: item.key,
1319
+ label: item.label,
1320
+ data: item.nodeData,
1321
+ parentLabel: item.parentLabel
1322
+ }),
1323
+ className: "flex items-center gap-2 cursor-pointer py-1.5 px-2 group focus:outline-none focus-visible:ring-2 focus-visible:ring-accent w-full text-left rounded-md hover:bg-surface-raised transition-colors duration-150",
1324
+ children: [
1325
+ /* @__PURE__ */ jsxRuntime.jsx(
1326
+ "svg",
1327
+ {
1328
+ viewBox: "0 0 24 24",
1329
+ fill: "none",
1330
+ stroke: "currentColor",
1331
+ strokeWidth: 2.5,
1332
+ className: "h-3.5 w-3.5 flex-shrink-0 text-foreground-muted transition-transform duration-200 group-data-[state=open]:rotate-0 group-data-[state=closed]:-rotate-90",
1333
+ "aria-hidden": "true",
1334
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1335
+ "path",
1335
1336
  {
1336
- viewBox: "0 0 24 24",
1337
- fill: "none",
1338
- stroke: "currentColor",
1339
- strokeWidth: 2.5,
1340
- className: "h-3.5 w-3.5 flex-shrink-0 text-foreground-muted transition-transform duration-200 group-data-[state=open]:rotate-0 group-data-[state=closed]:-rotate-90",
1341
- "aria-hidden": "true",
1342
- children: /* @__PURE__ */ jsxRuntime.jsx(
1343
- "path",
1344
- {
1345
- strokeLinecap: "round",
1346
- strokeLinejoin: "round",
1347
- d: "M19 9l-7 7-7-7"
1348
- }
1349
- )
1337
+ strokeLinecap: "round",
1338
+ strokeLinejoin: "round",
1339
+ d: "M19 9l-7 7-7-7"
1350
1340
  }
1351
- ),
1352
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground select-none", children: item.label })
1353
- ]
1354
- }
1355
- ),
1356
- /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Content, { className: "overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-3.5 border-l border-border py-0.5", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
1357
- TreeNodeItem,
1358
- {
1359
- item: child,
1360
- onNodeClick,
1361
- defaultExpandAll,
1362
- defaultExpandedKeys,
1363
- depth: depth + 1
1364
- },
1365
- child.key
1366
- )) }) })
1367
- ] })
1368
- }
1369
- );
1341
+ )
1342
+ }
1343
+ ),
1344
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground select-none", children: item.label })
1345
+ ]
1346
+ }
1347
+ ),
1348
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Content, { className: "overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-3.5 border-l border-border py-0.5", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
1349
+ TreeNodeItem,
1350
+ {
1351
+ item: child,
1352
+ onNodeClick,
1353
+ defaultExpandAll,
1354
+ defaultExpandedKeys
1355
+ },
1356
+ child.key
1357
+ )) }) })
1358
+ ] }) });
1370
1359
  }
1371
1360
  function Tree({
1372
1361
  nodes,