@ixo/ui 0.0.14 → 0.0.16

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 (52) hide show
  1. package/dist/.vite/manifest.json +43 -43
  2. package/dist/components/AppShellNavigation/components/AsideResizable.d.ts +2 -1
  3. package/dist/components/AppShellNavigation/components/AsideResizable.d.ts.map +1 -1
  4. package/dist/components/AppShellNavigation/index.d.ts +3 -1
  5. package/dist/components/AppShellNavigation/index.d.ts.map +1 -1
  6. package/dist/{components-vw6J_dpp.cjs → components-COiOJd-a.cjs} +44 -17
  7. package/dist/{components-vw6J_dpp.cjs.map → components-COiOJd-a.cjs.map} +1 -1
  8. package/dist/{components-BiD0_7V_.js → components-Cil160oB.js} +44 -17
  9. package/dist/{components-BiD0_7V_.js.map → components-Cil160oB.js.map} +1 -1
  10. package/dist/export/components.cjs +1 -1
  11. package/dist/export/components.mjs +1 -1
  12. package/dist/{index-BvFDLUUX.js → index-244kPbim.js} +3 -3
  13. package/dist/{index-BvFDLUUX.js.map → index-244kPbim.js.map} +1 -1
  14. package/dist/{index-4sKOMBmk.cjs → index-9AExx6uv.cjs} +3 -3
  15. package/dist/{index-4sKOMBmk.cjs.map → index-9AExx6uv.cjs.map} +1 -1
  16. package/dist/{index-nhqvNIAj.cjs → index-B2C5-3_c.cjs} +3 -3
  17. package/dist/{index-nhqvNIAj.cjs.map → index-B2C5-3_c.cjs.map} +1 -1
  18. package/dist/{index-DNqtJQVl.cjs → index-BCDGYUvT.cjs} +2 -2
  19. package/dist/{index-DNqtJQVl.cjs.map → index-BCDGYUvT.cjs.map} +1 -1
  20. package/dist/{index-CyysTrZP.cjs → index-BDWtD3Hi.cjs} +2 -2
  21. package/dist/{index-CyysTrZP.cjs.map → index-BDWtD3Hi.cjs.map} +1 -1
  22. package/dist/{index-DqcjuULv.js → index-CLayt7ii.js} +3 -3
  23. package/dist/{index-DqcjuULv.js.map → index-CLayt7ii.js.map} +1 -1
  24. package/dist/{index-Coxm5WEM.cjs → index-CLjuvTd7.cjs} +2 -2
  25. package/dist/{index-Coxm5WEM.cjs.map → index-CLjuvTd7.cjs.map} +1 -1
  26. package/dist/{index-c39fFlNp.js → index-C_8ZG5p0.js} +2 -2
  27. package/dist/{index-c39fFlNp.js.map → index-C_8ZG5p0.js.map} +1 -1
  28. package/dist/{index-yjx-PRyb.cjs → index-CeOdH522.cjs} +2 -2
  29. package/dist/{index-yjx-PRyb.cjs.map → index-CeOdH522.cjs.map} +1 -1
  30. package/dist/{index-CF2PVnSW.js → index-CzbZW1t8.js} +2 -2
  31. package/dist/{index-CF2PVnSW.js.map → index-CzbZW1t8.js.map} +1 -1
  32. package/dist/{index-DVcSKgbJ.js → index-DoHKF47N.js} +2 -2
  33. package/dist/{index-DVcSKgbJ.js.map → index-DoHKF47N.js.map} +1 -1
  34. package/dist/{index-BHcOFwds.cjs → index-L8XFfE9P.cjs} +2 -2
  35. package/dist/{index-BHcOFwds.cjs.map → index-L8XFfE9P.cjs.map} +1 -1
  36. package/dist/{index-BuxCAg_1.cjs → index-OcCefuef.cjs} +2 -2
  37. package/dist/{index-BuxCAg_1.cjs.map → index-OcCefuef.cjs.map} +1 -1
  38. package/dist/{index-BG-QfJbv.cjs → index-Wcu49tWL.cjs} +2 -2
  39. package/dist/{index-BG-QfJbv.cjs.map → index-Wcu49tWL.cjs.map} +1 -1
  40. package/dist/{index-ErQUX7j7.js → index-Z7VGwFzo.js} +2 -2
  41. package/dist/{index-ErQUX7j7.js.map → index-Z7VGwFzo.js.map} +1 -1
  42. package/dist/{index-By0FBgRQ.js → index-asyXfp7h.js} +2 -2
  43. package/dist/{index-By0FBgRQ.js.map → index-asyXfp7h.js.map} +1 -1
  44. package/dist/{index-CsIW1_OQ.js → index-eX99B1CW.js} +2 -2
  45. package/dist/{index-CsIW1_OQ.js.map → index-eX99B1CW.js.map} +1 -1
  46. package/dist/{index-CXrrJ_Le.js → index-jy143QcI.js} +2 -2
  47. package/dist/{index-CXrrJ_Le.js.map → index-jy143QcI.js.map} +1 -1
  48. package/dist/{index-Dva9zr6w.js → index-n-U_gY17.js} +2 -2
  49. package/dist/{index-Dva9zr6w.js.map → index-n-U_gY17.js.map} +1 -1
  50. package/dist/{index-djRt821o.cjs → index-xOhHOvvB.cjs} +2 -2
  51. package/dist/{index-djRt821o.cjs.map → index-xOhHOvvB.cjs.map} +1 -1
  52. package/package.json +1 -1
@@ -774,8 +774,8 @@ function AccordionTable({
774
774
  }
775
775
  );
776
776
  }
777
- const Header$3 = lazy(() => import("./index-Dva9zr6w.js"));
778
- const Footer = lazy(() => import("./index-BvFDLUUX.js"));
777
+ const Header$3 = lazy(() => import("./index-n-U_gY17.js"));
778
+ const Footer = lazy(() => import("./index-244kPbim.js"));
779
779
  function ActionCard({ header, content, footer, useHoverMode = false }) {
780
780
  const hasContent = !!content || !!footer;
781
781
  const initialVisibility = footer?.startHidden !== true;
@@ -859,7 +859,7 @@ function Loader({ size, color = "primary" }) {
859
859
  }
860
860
  const CARD_WIDTH$1 = 350;
861
861
  const CARD_HEADER_HEIGHT = 158;
862
- const Header$2 = lazy(() => import("./index-CsIW1_OQ.js"));
862
+ const Header$2 = lazy(() => import("./index-eX99B1CW.js"));
863
863
  function Card({ children, className, contentClassName, roundedBottom, noPadding = false, fullWidth = false, header, wrapperSx, onClick }) {
864
864
  const wrapperRef = useRef(null);
865
865
  const handleOnClick = useCallback(
@@ -1294,7 +1294,7 @@ function ModalSheet({ isOpen, children, hideHandler, zIndex, onRequestHide, onRe
1294
1294
  document.body
1295
1295
  );
1296
1296
  }
1297
- const Badge = lazy(() => import("./index-CF2PVnSW.js"));
1297
+ const Badge = lazy(() => import("./index-CzbZW1t8.js"));
1298
1298
  function ActionSheet({ children, isOpen, header, navMenu = void 0, onRequestHide, onRequestShow }) {
1299
1299
  const shadowScrollRef = useRef(null);
1300
1300
  const wrapperContentAreaRef = useRef(null);
@@ -2137,16 +2137,16 @@ function Avatar({ src, rounded = true, size = 62, did }) {
2137
2137
  return /* @__PURE__ */ jsx(User, { css: ({ text }) => ({ ...css2, backgroundColor: text.secondary }) });
2138
2138
  }
2139
2139
  const MIN_WIDTH = 200;
2140
- const MAX_WIDTH = 600;
2141
- function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width = 300, onWidthChange }) {
2140
+ function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width = 450, onWidthChange, onMaxExpand }) {
2142
2141
  const [isResizing, setIsResizing] = useState(false);
2143
2142
  const [ref] = useResizeObserver();
2144
2143
  const isShowingRef = useRef(false);
2144
+ const hasFiredMaxExpand = useRef(false);
2145
2145
  const theme = useUITheme();
2146
2146
  useEffect(() => {
2147
2147
  if (!asideCollapsed && width <= MIN_WIDTH) {
2148
2148
  isShowingRef.current = true;
2149
- onWidthChange?.(300);
2149
+ onWidthChange?.(width);
2150
2150
  setTimeout(() => {
2151
2151
  isShowingRef.current = false;
2152
2152
  }, 200);
@@ -2172,7 +2172,9 @@ function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width
2172
2172
  const handleMouseMove = (e) => {
2173
2173
  if (!isResizing) return;
2174
2174
  const newWidth = window.innerWidth - e.clientX;
2175
- onWidthChange?.(Math.min(Math.max(newWidth, MIN_WIDTH), MAX_WIDTH));
2175
+ const maxWidth = window.innerWidth - 600;
2176
+ const constrainedWidth = Math.min(Math.max(newWidth, MIN_WIDTH), maxWidth);
2177
+ onWidthChange?.(constrainedWidth);
2176
2178
  };
2177
2179
  useEffect(() => {
2178
2180
  if (width === MIN_WIDTH && !asideCollapsed && onAsideToggle && !isShowingRef.current) {
@@ -2180,13 +2182,36 @@ function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width
2180
2182
  onAsideToggle();
2181
2183
  }
2182
2184
  }, [width, asideCollapsed, onAsideToggle]);
2185
+ useEffect(() => {
2186
+ const maxWidth = window.innerWidth - 600;
2187
+ if (width >= maxWidth && onMaxExpand && !hasFiredMaxExpand.current) {
2188
+ hasFiredMaxExpand.current = true;
2189
+ clearListeners();
2190
+ onMaxExpand();
2191
+ } else if (width < maxWidth) {
2192
+ hasFiredMaxExpand.current = false;
2193
+ }
2194
+ }, [width, onMaxExpand]);
2195
+ useEffect(() => {
2196
+ const handleWindowResize = () => {
2197
+ const newMaxWidth = window.innerWidth - 600;
2198
+ const newMinWidth = MIN_WIDTH;
2199
+ if (width > newMaxWidth) {
2200
+ onWidthChange?.(newMaxWidth);
2201
+ } else if (width < newMinWidth) {
2202
+ onWidthChange?.(newMinWidth);
2203
+ }
2204
+ };
2205
+ window.addEventListener("resize", handleWindowResize);
2206
+ return () => window.removeEventListener("resize", handleWindowResize);
2207
+ }, [width, onWidthChange]);
2183
2208
  const handleMouseUp = () => setIsResizing(false);
2184
2209
  const handleMouseDown = (e) => {
2185
2210
  e.preventDefault();
2186
2211
  setIsResizing(true);
2187
2212
  };
2188
2213
  if (asideCollapsed) return null;
2189
- return /* @__PURE__ */ jsxs(AppShell.Aside, { w: width, miw: 200, maw: 600, ref, children: [
2214
+ return /* @__PURE__ */ jsxs(AppShell.Aside, { w: width, miw: 200, maw: window.innerWidth - 340, ref, children: [
2190
2215
  /* @__PURE__ */ jsx(
2191
2216
  Box,
2192
2217
  {
@@ -2252,6 +2277,7 @@ function MenuItem({ item, onMenuItemClick, depth = 0 }) {
2252
2277
  const { value: isExpanded, toggle: toggle2 } = useToggle(false);
2253
2278
  const hasChildren = item.children && item.children.length > 0;
2254
2279
  const handleItemClick = () => {
2280
+ if (!!item?.disabled) return;
2255
2281
  onMenuItemClick(item);
2256
2282
  };
2257
2283
  const handleToggleClick = (e) => {
@@ -2406,10 +2432,11 @@ function AppShellNavigation({
2406
2432
  right,
2407
2433
  asideCollapsed = true,
2408
2434
  onAsideToggle,
2435
+ onMaxExpand,
2409
2436
  children
2410
2437
  }) {
2411
2438
  const [navbarCollapsed, { toggle: toggleNavbar }] = useDisclosure(true);
2412
- const [asideWidth, setAsideWidth] = useState(300);
2439
+ const [asideWidth, setAsideWidth] = useState(450);
2413
2440
  const theme = useUITheme();
2414
2441
  return /* @__PURE__ */ jsxs(
2415
2442
  AppShell,
@@ -2504,7 +2531,7 @@ function AppShellNavigation({
2504
2531
  ] })
2505
2532
  ] }) }),
2506
2533
  /* @__PURE__ */ jsx(AppShell.Main, { children }),
2507
- /* @__PURE__ */ jsx(AsideResizable, { asideCollapsed, onAsideToggle, width: asideWidth, onWidthChange: setAsideWidth, children: right })
2534
+ /* @__PURE__ */ jsx(AsideResizable, { asideCollapsed, onAsideToggle, onMaxExpand, width: asideWidth, onWidthChange: setAsideWidth, children: right })
2508
2535
  ]
2509
2536
  }
2510
2537
  );
@@ -5482,13 +5509,13 @@ function ActionButton({ onClick, left, right }) {
5482
5509
  }
5483
5510
  );
5484
5511
  }
5485
- const MainAction = lazy(() => import("./index-CXrrJ_Le.js"));
5486
- const Header$1 = lazy(() => import("./index-By0FBgRQ.js"));
5487
- const Content = lazy(() => import("./index-DVcSKgbJ.js"));
5512
+ const MainAction = lazy(() => import("./index-jy143QcI.js"));
5513
+ const Header$1 = lazy(() => import("./index-asyXfp7h.js"));
5514
+ const Content = lazy(() => import("./index-DoHKF47N.js"));
5488
5515
  const Map = lazy(() => import("./index-D5Ufmf-s.js"));
5489
5516
  const CustomContent = lazy(() => import("./index-DsYjW_4y.js"));
5490
- const Assets = lazy(() => import("./index-c39fFlNp.js"));
5491
- const Actions = lazy(() => import("./index-DqcjuULv.js"));
5517
+ const Assets = lazy(() => import("./index-C_8ZG5p0.js"));
5518
+ const Actions = lazy(() => import("./index-CLayt7ii.js"));
5492
5519
  const HOVER_BORDER_WIDTH = 1;
5493
5520
  function SodaCardCmp({ numSelected = 0, expanded = true, mainAction, header, content, map, customContent, customFooter, actions, assets, onClick }, ref) {
5494
5521
  const wrapperRef = useRef(null);
@@ -10802,4 +10829,4 @@ export {
10802
10829
  CardSelector as y,
10803
10830
  CardOutput as z
10804
10831
  };
10805
- //# sourceMappingURL=components-BiD0_7V_.js.map
10832
+ //# sourceMappingURL=components-Cil160oB.js.map