@ixo/ui 0.1.10 → 0.1.11

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.
Files changed (55) hide show
  1. package/dist/.vite/manifest.json +43 -43
  2. package/dist/components/AppShellNavigation/components/MenuItem.d.ts +2 -1
  3. package/dist/components/AppShellNavigation/components/MenuItem.d.ts.map +1 -1
  4. package/dist/components/AppShellNavigation/components/RoomCategory.d.ts +3 -1
  5. package/dist/components/AppShellNavigation/components/RoomCategory.d.ts.map +1 -1
  6. package/dist/components/AppShellNavigation/components/RoomItem.d.ts +2 -1
  7. package/dist/components/AppShellNavigation/components/RoomItem.d.ts.map +1 -1
  8. package/dist/components/AppShellNavigation/index.d.ts.map +1 -1
  9. package/dist/{components-kxgjjaBi.js → components-CHbRYZDV.js} +52 -56
  10. package/dist/{components-kxgjjaBi.js.map → components-CHbRYZDV.js.map} +1 -1
  11. package/dist/{components-Bzkhgo_i.cjs → components-JdTP8bty.cjs} +52 -56
  12. package/dist/{components-Bzkhgo_i.cjs.map → components-JdTP8bty.cjs.map} +1 -1
  13. package/dist/export/components.cjs +1 -1
  14. package/dist/export/components.mjs +1 -1
  15. package/dist/{index-BaKCtz_Q.cjs → index-0Gd3Y9ix.cjs} +2 -2
  16. package/dist/{index-BaKCtz_Q.cjs.map → index-0Gd3Y9ix.cjs.map} +1 -1
  17. package/dist/{index-xy6xJBbu.js → index-3jU32ylS.js} +2 -2
  18. package/dist/{index-xy6xJBbu.js.map → index-3jU32ylS.js.map} +1 -1
  19. package/dist/{index-b0lRsVpL.js → index-5nix3uGD.js} +2 -2
  20. package/dist/{index-b0lRsVpL.js.map → index-5nix3uGD.js.map} +1 -1
  21. package/dist/{index-Bxl6UNpR.js → index-8tGadeUE.js} +2 -2
  22. package/dist/{index-Bxl6UNpR.js.map → index-8tGadeUE.js.map} +1 -1
  23. package/dist/{index-BPpBzZ7I.js → index-BVtpqWCs.js} +2 -2
  24. package/dist/{index-BPpBzZ7I.js.map → index-BVtpqWCs.js.map} +1 -1
  25. package/dist/{index-DQZ62cn8.cjs → index-BWT97hNk.cjs} +2 -2
  26. package/dist/{index-DQZ62cn8.cjs.map → index-BWT97hNk.cjs.map} +1 -1
  27. package/dist/{index-DVBuQ8s_.cjs → index-BZuf5Uwh.cjs} +2 -2
  28. package/dist/{index-DVBuQ8s_.cjs.map → index-BZuf5Uwh.cjs.map} +1 -1
  29. package/dist/{index-Qq15_AqP.cjs → index-BnDHepRw.cjs} +3 -3
  30. package/dist/{index-Qq15_AqP.cjs.map → index-BnDHepRw.cjs.map} +1 -1
  31. package/dist/{index-D9z8zxGB.cjs → index-Br0Chnx7.cjs} +2 -2
  32. package/dist/{index-D9z8zxGB.cjs.map → index-Br0Chnx7.cjs.map} +1 -1
  33. package/dist/{index-D2nmz6Om.js → index-BzJhTXjs.js} +2 -2
  34. package/dist/{index-D2nmz6Om.js.map → index-BzJhTXjs.js.map} +1 -1
  35. package/dist/{index-9moXUHtl.js → index-CAGiV0J3.js} +2 -2
  36. package/dist/{index-9moXUHtl.js.map → index-CAGiV0J3.js.map} +1 -1
  37. package/dist/{index-D6ik1G_L.js → index-CYdgFOk0.js} +3 -3
  38. package/dist/{index-D6ik1G_L.js.map → index-CYdgFOk0.js.map} +1 -1
  39. package/dist/{index-DDSVvVaX.cjs → index-CgGNRXUP.cjs} +2 -2
  40. package/dist/{index-DDSVvVaX.cjs.map → index-CgGNRXUP.cjs.map} +1 -1
  41. package/dist/{index-bgLWLpix.cjs → index-CnwnwLBL.cjs} +2 -2
  42. package/dist/{index-bgLWLpix.cjs.map → index-CnwnwLBL.cjs.map} +1 -1
  43. package/dist/{index-DVpkDPVh.cjs → index-DIkd4nvp.cjs} +3 -3
  44. package/dist/{index-DVpkDPVh.cjs.map → index-DIkd4nvp.cjs.map} +1 -1
  45. package/dist/{index-DTabwbad.cjs → index-DIoNw9Is.cjs} +2 -2
  46. package/dist/{index-DTabwbad.cjs.map → index-DIoNw9Is.cjs.map} +1 -1
  47. package/dist/{index-BVjRfBNY.js → index-DeRpsAsl.js} +2 -2
  48. package/dist/{index-BVjRfBNY.js.map → index-DeRpsAsl.js.map} +1 -1
  49. package/dist/{index-S4XgkG5t.js → index-DxE2Ni88.js} +2 -2
  50. package/dist/{index-S4XgkG5t.js.map → index-DxE2Ni88.js.map} +1 -1
  51. package/dist/{index-DHpAlFBt.js → index-F6HHDg6A.js} +3 -3
  52. package/dist/{index-DHpAlFBt.js.map → index-F6HHDg6A.js.map} +1 -1
  53. package/dist/{index-CLxKEJcO.cjs → index-aYeZagBJ.cjs} +2 -2
  54. package/dist/{index-CLxKEJcO.cjs.map → index-aYeZagBJ.cjs.map} +1 -1
  55. package/package.json +1 -1
@@ -846,8 +846,8 @@ function AccordionTable({
846
846
  }
847
847
  );
848
848
  }
849
- const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-bgLWLpix.cjs")));
850
- const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-DVpkDPVh.cjs")));
849
+ const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CnwnwLBL.cjs")));
850
+ const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-DIkd4nvp.cjs")));
851
851
  function ActionCard({ header, content, footer, useHoverMode = false }) {
852
852
  const hasContent = !!content || !!footer;
853
853
  const initialVisibility = footer?.startHidden !== true;
@@ -931,7 +931,7 @@ function Loader({ size, color = "primary" }) {
931
931
  }
932
932
  const CARD_WIDTH$1 = 350;
933
933
  const CARD_HEADER_HEIGHT = 158;
934
- const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-DDSVvVaX.cjs")));
934
+ const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CgGNRXUP.cjs")));
935
935
  function Card({ children, className, contentClassName, roundedBottom, noPadding = false, fullWidth = false, header, wrapperSx, onClick }) {
936
936
  const wrapperRef = react$1.useRef(null);
937
937
  const handleOnClick = react$1.useCallback(
@@ -1366,7 +1366,7 @@ function ModalSheet({ isOpen, children, hideHandler, zIndex, onRequestHide, onRe
1366
1366
  document.body
1367
1367
  );
1368
1368
  }
1369
- const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-D9z8zxGB.cjs")));
1369
+ const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-Br0Chnx7.cjs")));
1370
1370
  function ActionSheet({ children, isOpen, header, navMenu = void 0, onRequestHide, onRequestShow }) {
1371
1371
  const shadowScrollRef = react$1.useRef(null);
1372
1372
  const wrapperContentAreaRef = react$1.useRef(null);
@@ -2346,37 +2346,7 @@ function NavigationItemSkeleton() {
2346
2346
  }
2347
2347
  );
2348
2348
  }
2349
- function cutText(text, length, ending = "…") {
2350
- if (!length || text.length <= length) {
2351
- return text;
2352
- }
2353
- const words = text.split(" ");
2354
- const endingSize = ending.length;
2355
- let result = "";
2356
- for (const word of words) {
2357
- const newValue = result + word + " ";
2358
- if (newValue.length + endingSize - 1 > length) {
2359
- break;
2360
- }
2361
- result = newValue;
2362
- }
2363
- return result.trim() + ending;
2364
- }
2365
- function shortStr(str, threshold = 30, saveSymbolsAtTheEnd = 10, insert = "...") {
2366
- if (!str) return str;
2367
- const len = str.length;
2368
- if (len <= threshold) return str;
2369
- const ending = saveSymbolsAtTheEnd ? str.slice(-1 * saveSymbolsAtTheEnd) : "";
2370
- const beginning = str.substring(0, threshold - saveSymbolsAtTheEnd - insert.length);
2371
- return `${beginning}${insert}${ending}`;
2372
- }
2373
- function carbonToUSD(carbon) {
2374
- return (carbon * 0.03).toLocaleString(void 0, {
2375
- minimumFractionDigits: 0,
2376
- maximumFractionDigits: 6
2377
- });
2378
- }
2379
- function RoomItem({ room }) {
2349
+ function RoomItem({ room, navbarWidth }) {
2380
2350
  const { hovered, ref } = hooks.useHover();
2381
2351
  const renderIcon = () => {
2382
2352
  if (!room.icon) return null;
@@ -2389,8 +2359,7 @@ function RoomItem({ room }) {
2389
2359
  return room.icon;
2390
2360
  }
2391
2361
  };
2392
- const displayName = shortStr(room.name, 19, 0) || room.name;
2393
- const shouldShowTooltip = room.name.length > 19;
2362
+ const textMaxWidth = navbarWidth - 190;
2394
2363
  const content = /* @__PURE__ */ jsxRuntime.jsxs(
2395
2364
  Flex,
2396
2365
  {
@@ -2410,7 +2379,7 @@ function RoomItem({ room }) {
2410
2379
  children: [
2411
2380
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
2412
2381
  renderIcon(),
2413
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: room.isActive ? "neutralColor.8" : "neutralColor.7", fz: 14, children: displayName })
2382
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: room.isActive ? "neutralColor.8" : "neutralColor.7", fz: 14, truncate: true, style: { maxWidth: textMaxWidth }, children: room.name })
2414
2383
  ] }),
2415
2384
  hovered && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 4, children: [
2416
2385
  room.onActionClick && /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: room.onActionClick.label, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2429,9 +2398,9 @@ function RoomItem({ room }) {
2429
2398
  ]
2430
2399
  }
2431
2400
  );
2432
- return shouldShowTooltip ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: room.name, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: content }) }) : content;
2401
+ return content;
2433
2402
  }
2434
- function RoomCategory({ name, rooms, actions, primaryActions }) {
2403
+ function RoomCategory({ name, rooms, actions, primaryActions, navbarWidth }) {
2435
2404
  const { hovered, ref } = hooks.useHover();
2436
2405
  const { value, toggle } = useToggle(false);
2437
2406
  return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 2, children: [
@@ -2497,14 +2466,19 @@ function RoomCategory({ name, rooms, actions, primaryActions }) {
2497
2466
  ]
2498
2467
  }
2499
2468
  ),
2500
- !value && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: rooms?.map((room) => /* @__PURE__ */ jsxRuntime.jsx(RoomItem, { room }, room.id)) })
2469
+ !value && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: rooms?.map((room) => /* @__PURE__ */ jsxRuntime.jsx(RoomItem, { room, navbarWidth }, room.id)) })
2501
2470
  ] });
2502
2471
  }
2503
2472
  function hasActiveDescendant(children) {
2504
2473
  if (!children || children.length === 0) return false;
2505
2474
  return children.some((child) => child.isActive === true || hasActiveDescendant(child.children));
2506
2475
  }
2507
- function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2476
+ function MenuItem({
2477
+ item,
2478
+ onMenuItemClick,
2479
+ depth = 0,
2480
+ navbarWidth
2481
+ }) {
2508
2482
  const { hovered, ref } = hooks.useHover();
2509
2483
  const hasChildren = item.children && item.children.length > 0;
2510
2484
  const hasActiveChild = react$1.useMemo(() => hasActiveDescendant(item.children), [item.children]);
@@ -2584,7 +2558,7 @@ function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2584
2558
  children: [
2585
2559
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
2586
2560
  renderIcon(),
2587
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 14, fw: 500, c: item.isActive ? "neutralColor.8" : "neutralColor.7", style: { flex: 1 }, children: item.name }),
2561
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 14, fw: 500, c: item.isActive ? "neutralColor.8" : "neutralColor.7", truncate: true, style: { maxWidth: navbarWidth - 160 - depth * 16 }, children: item.name }),
2588
2562
  item.badgeCount ? /* @__PURE__ */ jsxRuntime.jsx(core.Badge, { size: "xs", variant: "filled", ml: 4, style: { minWidth: "16px", height: "15px", padding: "0 4px", fontSize: "8px" }, children: item.badgeCount }) : null
2589
2563
  ] }),
2590
2564
  /* @__PURE__ */ jsxRuntime.jsx(Flex, { children: item?.actions && item.actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2604,7 +2578,7 @@ function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2604
2578
  ]
2605
2579
  }
2606
2580
  ),
2607
- hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 1, children: item.children?.map((childItem) => /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { item: childItem, onMenuItemClick, depth: depth + 1 }, childItem.id)) })
2581
+ hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 1, children: item.children?.map((childItem) => /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { item: childItem, onMenuItemClick, depth: depth + 1, navbarWidth }, childItem.id)) })
2608
2582
  ] });
2609
2583
  }
2610
2584
  function SelectedIndicator() {
@@ -2721,7 +2695,6 @@ function AppShellNavigation({
2721
2695
  },
2722
2696
  [onSplitRatioChange]
2723
2697
  );
2724
- const isTitleOverflowing = (pageItem?.pageTitle?.length || 0) > 21;
2725
2698
  const handleSplitMouseUp = react$1.useCallback(() => {
2726
2699
  setIsSplitResizing(false);
2727
2700
  isSplitResizingRef.current = false;
@@ -2751,8 +2724,9 @@ function AppShellNavigation({
2751
2724
  };
2752
2725
  }, [isSplitResizing, handleSplitMouseMove, handleSplitMouseUp]);
2753
2726
  const [navbarWidthAiOpen, setNavbarWidthAiOpen] = useEventSubscribe.useLocalStorage("navbar-width-ai-open", 450);
2754
- const [navbarWidthAiClosed, setNavbarWidthAiClosed] = useEventSubscribe.useLocalStorage("navbar-width-ai-closed", 300);
2727
+ const [navbarWidthAiClosed, setNavbarWidthAiClosed] = useEventSubscribe.useLocalStorage("navbar-width-ai-closed", 330);
2755
2728
  const navbarWidth = isAiOpened ? navbarWidthAiOpen : navbarWidthAiClosed;
2729
+ const titleMaxWidth = navbarWidth - 120;
2756
2730
  const [isNavbarResizing, setIsNavbarResizing] = react$1.useState(false);
2757
2731
  const isNavbarResizingRef = react$1.useRef(false);
2758
2732
  function clearNavbarListeners() {
@@ -2907,7 +2881,7 @@ function AppShellNavigation({
2907
2881
  isAiOpened && !isMobile && aiNavbarContent,
2908
2882
  !isAiOpened && /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { w: "100%", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
2909
2883
  /* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Section, { px: 12, pt: 16, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { mb: 24, style: { width: "100%" }, justify: "space-between", align: "center", children: [
2910
- /* @__PURE__ */ jsxRuntime.jsx(Flex, { align: "center", gap: "10px", children: /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: pageItem.pageTitle || "Unknown", disabled: !isTitleOverflowing, position: "bottom", withArrow: true, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { lh: 1, c: "neutralColor.8", children: isTitleOverflowing ? shortStr(pageItem.pageTitle, 21, 0) : pageItem.pageTitle || "Unknown" }) }) }),
2884
+ /* @__PURE__ */ jsxRuntime.jsx(Flex, { align: "center", gap: "10px", children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { lh: 1, c: "neutralColor.8", truncate: true, style: { maxWidth: titleMaxWidth }, children: pageItem.pageTitle || "Unknown" }) }),
2911
2885
  isAiBtnVisible && !isAiOpened && !isMobile && /* @__PURE__ */ jsxRuntime.jsx(
2912
2886
  core.Center,
2913
2887
  {
@@ -2931,12 +2905,12 @@ function AppShellNavigation({
2931
2905
  if (index !== 0 && index === separator) {
2932
2906
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2933
2907
  /* @__PURE__ */ jsxRuntime.jsx(core.Space, { h: 16 }),
2934
- /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item }, item.id)
2908
+ /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item, navbarWidth }, item.id)
2935
2909
  ] });
2936
2910
  }
2937
- return /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item }, item.id);
2911
+ return /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item, navbarWidth }, item.id);
2938
2912
  }),
2939
- roomCategories && roomCategories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 8, mt: 16, children: roomCategories.map(({ id, name, actions, rooms, primaryActions: onAddClick }) => /* @__PURE__ */ jsxRuntime.jsx(RoomCategory, { id, name, actions, rooms, primaryActions: onAddClick }, id)) })
2913
+ roomCategories && roomCategories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 8, mt: 16, children: roomCategories.map(({ id, name, actions, rooms, primaryActions: onAddClick }) => /* @__PURE__ */ jsxRuntime.jsx(RoomCategory, { id, name, actions, rooms, primaryActions: onAddClick, navbarWidth }, id)) })
2940
2914
  ] }) }),
2941
2915
  footerContent && /* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Section, { px: 12, py: 10, children: /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: footerContent }) })
2942
2916
  ] })
@@ -6142,13 +6116,13 @@ function ActionButton({ onClick, left, right }) {
6142
6116
  }
6143
6117
  );
6144
6118
  }
6145
- const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-DVBuQ8s_.cjs")));
6146
- const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-CLxKEJcO.cjs")));
6147
- const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-DQZ62cn8.cjs")));
6119
+ const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-BZuf5Uwh.cjs")));
6120
+ const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-aYeZagBJ.cjs")));
6121
+ const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-BWT97hNk.cjs")));
6148
6122
  const Map = react$1.lazy(() => Promise.resolve().then(() => require("./index-D4PsPquZ.cjs")));
6149
6123
  const CustomContent = react$1.lazy(() => Promise.resolve().then(() => require("./index-ByrCNpS2.cjs")));
6150
- const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-DTabwbad.cjs")));
6151
- const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-Qq15_AqP.cjs")));
6124
+ const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-DIoNw9Is.cjs")));
6125
+ const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-BnDHepRw.cjs")));
6152
6126
  const HOVER_BORDER_WIDTH = 1;
6153
6127
  function SodaCardCmp({ numSelected = 0, expanded = true, mainAction, header, content, map, customContent, customFooter, actions, assets, onClick }, ref) {
6154
6128
  const wrapperRef = react$1.useRef(null);
@@ -6485,6 +6459,28 @@ function AssetInfo({
6485
6459
  }
6486
6460
  );
6487
6461
  }
6462
+ function cutText(text, length, ending = "…") {
6463
+ if (!length || text.length <= length) {
6464
+ return text;
6465
+ }
6466
+ const words = text.split(" ");
6467
+ const endingSize = ending.length;
6468
+ let result = "";
6469
+ for (const word of words) {
6470
+ const newValue = result + word + " ";
6471
+ if (newValue.length + endingSize - 1 > length) {
6472
+ break;
6473
+ }
6474
+ result = newValue;
6475
+ }
6476
+ return result.trim() + ending;
6477
+ }
6478
+ function carbonToUSD(carbon) {
6479
+ return (carbon * 0.03).toLocaleString(void 0, {
6480
+ minimumFractionDigits: 0,
6481
+ maximumFractionDigits: 6
6482
+ });
6483
+ }
6488
6484
  const SHARED_ASSET_PROPS = {
6489
6485
  leftTitleColor: "text",
6490
6486
  rightTitleColor: "text",
@@ -11423,4 +11419,4 @@ exports.UserMessage = UserMessage;
11423
11419
  exports.WorkspaceModal = WorkspaceModal;
11424
11420
  exports.cutText = cutText;
11425
11421
  exports.isValidClick = isValidClick;
11426
- //# sourceMappingURL=components-Bzkhgo_i.cjs.map
11422
+ //# sourceMappingURL=components-JdTP8bty.cjs.map