@almadar/ui 2.56.0 → 2.58.0

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.
@@ -1,5 +1,5 @@
1
- import * as React114 from 'react';
2
- import React114__default, { createContext, useCallback, useState, useRef, useEffect, lazy, useMemo, useLayoutEffect, useContext, useSyncExternalStore } from 'react';
1
+ import * as React115 from 'react';
2
+ import React115__default, { createContext, useCallback, useState, useRef, useEffect, lazy, useMemo, useLayoutEffect, useContext, useSyncExternalStore } from 'react';
3
3
  import { EventBusContext } from '@almadar/ui/providers';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
@@ -743,7 +743,7 @@ function addWatch(entityType, callback) {
743
743
  function useEntityRef(entityType) {
744
744
  const versionRef = useRef(0);
745
745
  const dataRef = useRef([]);
746
- const getSnapshotStable = React114__default.useCallback(() => {
746
+ const getSnapshotStable = React115__default.useCallback(() => {
747
747
  const currentVersion = getVersion(entityType);
748
748
  if (currentVersion !== versionRef.current) {
749
749
  versionRef.current = currentVersion;
@@ -756,7 +756,7 @@ function useEntityRef(entityType) {
756
756
  function useEntityById(entityType, id) {
757
757
  const versionRef = useRef(0);
758
758
  const dataRef = useRef(null);
759
- const getSnapshotStable = React114__default.useCallback(() => {
759
+ const getSnapshotStable = React115__default.useCallback(() => {
760
760
  if (!id) return null;
761
761
  const currentVersion = getVersion(entityType);
762
762
  if (currentVersion !== versionRef.current) {
@@ -1154,7 +1154,7 @@ var positionStyles = {
1154
1154
  fixed: "fixed",
1155
1155
  sticky: "sticky"
1156
1156
  };
1157
- var Box = React114__default.forwardRef(
1157
+ var Box = React115__default.forwardRef(
1158
1158
  ({
1159
1159
  padding,
1160
1160
  paddingX,
@@ -1339,7 +1339,7 @@ function resolveIconProp(value, sizeClass) {
1339
1339
  const IconComp = value;
1340
1340
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1341
1341
  }
1342
- if (React114__default.isValidElement(value)) {
1342
+ if (React115__default.isValidElement(value)) {
1343
1343
  return value;
1344
1344
  }
1345
1345
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1348,7 +1348,7 @@ function resolveIconProp(value, sizeClass) {
1348
1348
  }
1349
1349
  return value;
1350
1350
  }
1351
- var Button = React114__default.forwardRef(
1351
+ var Button = React115__default.forwardRef(
1352
1352
  ({
1353
1353
  className,
1354
1354
  variant = "primary",
@@ -1447,7 +1447,7 @@ var sizeStyles3 = {
1447
1447
  md: "px-2.5 py-1 text-sm",
1448
1448
  lg: "px-3 py-1.5 text-base"
1449
1449
  };
1450
- var Badge = React114__default.forwardRef(
1450
+ var Badge = React115__default.forwardRef(
1451
1451
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
1452
1452
  const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
1453
1453
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -1491,7 +1491,7 @@ init_cn();
1491
1491
 
1492
1492
  // components/atoms/Input.tsx
1493
1493
  init_cn();
1494
- var Input = React114__default.forwardRef(
1494
+ var Input = React115__default.forwardRef(
1495
1495
  ({
1496
1496
  className,
1497
1497
  inputType,
@@ -1606,7 +1606,7 @@ Input.displayName = "Input";
1606
1606
 
1607
1607
  // components/atoms/Label.tsx
1608
1608
  init_cn();
1609
- var Label = React114__default.forwardRef(
1609
+ var Label = React115__default.forwardRef(
1610
1610
  ({ className, required, children, ...props }, ref) => {
1611
1611
  return /* @__PURE__ */ jsxs(
1612
1612
  "label",
@@ -1629,7 +1629,7 @@ Label.displayName = "Label";
1629
1629
 
1630
1630
  // components/atoms/Textarea.tsx
1631
1631
  init_cn();
1632
- var Textarea = React114__default.forwardRef(
1632
+ var Textarea = React115__default.forwardRef(
1633
1633
  ({ className, error, ...props }, ref) => {
1634
1634
  return /* @__PURE__ */ jsx(
1635
1635
  "textarea",
@@ -1655,7 +1655,7 @@ Textarea.displayName = "Textarea";
1655
1655
 
1656
1656
  // components/atoms/Select.tsx
1657
1657
  init_cn();
1658
- var Select = React114__default.forwardRef(
1658
+ var Select = React115__default.forwardRef(
1659
1659
  ({ className, options, placeholder, error, ...props }, ref) => {
1660
1660
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1661
1661
  /* @__PURE__ */ jsxs(
@@ -1694,7 +1694,7 @@ Select.displayName = "Select";
1694
1694
 
1695
1695
  // components/atoms/Checkbox.tsx
1696
1696
  init_cn();
1697
- var Checkbox = React114__default.forwardRef(
1697
+ var Checkbox = React115__default.forwardRef(
1698
1698
  ({ className, label, id, ...props }, ref) => {
1699
1699
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
1700
1700
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -1773,7 +1773,7 @@ var shadowStyles2 = {
1773
1773
  md: "shadow",
1774
1774
  lg: "shadow-lg"
1775
1775
  };
1776
- var Card = React114__default.forwardRef(
1776
+ var Card = React115__default.forwardRef(
1777
1777
  ({
1778
1778
  className,
1779
1779
  variant = "bordered",
@@ -1809,9 +1809,9 @@ var Card = React114__default.forwardRef(
1809
1809
  }
1810
1810
  );
1811
1811
  Card.displayName = "Card";
1812
- var CardHeader = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
1812
+ var CardHeader = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
1813
1813
  CardHeader.displayName = "CardHeader";
1814
- var CardTitle = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1814
+ var CardTitle = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1815
1815
  "h3",
1816
1816
  {
1817
1817
  ref,
@@ -1824,11 +1824,11 @@ var CardTitle = React114__default.forwardRef(({ className, ...props }, ref) => /
1824
1824
  }
1825
1825
  ));
1826
1826
  CardTitle.displayName = "CardTitle";
1827
- var CardContent = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
1827
+ var CardContent = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
1828
1828
  CardContent.displayName = "CardContent";
1829
1829
  var CardBody = CardContent;
1830
1830
  CardBody.displayName = "CardBody";
1831
- var CardFooter = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1831
+ var CardFooter = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1832
1832
  "div",
1833
1833
  {
1834
1834
  ref,
@@ -1846,7 +1846,7 @@ var sizeStyles4 = {
1846
1846
  md: "h-6 w-6",
1847
1847
  lg: "h-8 w-8"
1848
1848
  };
1849
- var Spinner = React114__default.forwardRef(
1849
+ var Spinner = React115__default.forwardRef(
1850
1850
  ({ className, size = "md", ...props }, ref) => {
1851
1851
  return /* @__PURE__ */ jsx(
1852
1852
  "div",
@@ -1876,7 +1876,7 @@ init_cn();
1876
1876
 
1877
1877
  // components/atoms/Radio.tsx
1878
1878
  init_cn();
1879
- var Radio = React114__default.forwardRef(
1879
+ var Radio = React115__default.forwardRef(
1880
1880
  ({
1881
1881
  label,
1882
1882
  helperText,
@@ -1983,7 +1983,7 @@ Radio.displayName = "Radio";
1983
1983
 
1984
1984
  // components/atoms/Switch.tsx
1985
1985
  init_cn();
1986
- var Switch = React114.forwardRef(
1986
+ var Switch = React115.forwardRef(
1987
1987
  ({
1988
1988
  checked,
1989
1989
  defaultChecked = false,
@@ -1994,10 +1994,10 @@ var Switch = React114.forwardRef(
1994
1994
  name,
1995
1995
  className
1996
1996
  }, ref) => {
1997
- const [isChecked, setIsChecked] = React114.useState(
1997
+ const [isChecked, setIsChecked] = React115.useState(
1998
1998
  checked !== void 0 ? checked : defaultChecked
1999
1999
  );
2000
- React114.useEffect(() => {
2000
+ React115.useEffect(() => {
2001
2001
  if (checked !== void 0) {
2002
2002
  setIsChecked(checked);
2003
2003
  }
@@ -2187,7 +2187,7 @@ var sizeStyles5 = {
2187
2187
  md: "w-2.5 h-2.5",
2188
2188
  lg: "w-3 h-3"
2189
2189
  };
2190
- var StatusDot = React114__default.forwardRef(
2190
+ var StatusDot = React115__default.forwardRef(
2191
2191
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
2192
2192
  return /* @__PURE__ */ jsx(
2193
2193
  "span",
@@ -2237,7 +2237,7 @@ var iconMap2 = {
2237
2237
  down: TrendingDown,
2238
2238
  flat: ArrowRight
2239
2239
  };
2240
- var TrendIndicator = React114__default.forwardRef(
2240
+ var TrendIndicator = React115__default.forwardRef(
2241
2241
  ({
2242
2242
  className,
2243
2243
  value,
@@ -2300,7 +2300,7 @@ var thumbSizes = {
2300
2300
  md: "w-4 h-4",
2301
2301
  lg: "w-5 h-5"
2302
2302
  };
2303
- var RangeSlider = React114__default.forwardRef(
2303
+ var RangeSlider = React115__default.forwardRef(
2304
2304
  ({
2305
2305
  className,
2306
2306
  min = 0,
@@ -2531,7 +2531,7 @@ var paddingClasses = {
2531
2531
  md: "py-16",
2532
2532
  lg: "py-24"
2533
2533
  };
2534
- var ContentSection = React114__default.forwardRef(
2534
+ var ContentSection = React115__default.forwardRef(
2535
2535
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
2536
2536
  return /* @__PURE__ */ jsx(
2537
2537
  Box,
@@ -2573,7 +2573,7 @@ var animatedStyles = {
2573
2573
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
2574
2574
  "none": {}
2575
2575
  };
2576
- var AnimatedReveal = React114__default.forwardRef(
2576
+ var AnimatedReveal = React115__default.forwardRef(
2577
2577
  ({
2578
2578
  trigger = "scroll",
2579
2579
  animation = "fade-up",
@@ -2729,7 +2729,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
2729
2729
  el.style.opacity = animate ? "1" : "0";
2730
2730
  });
2731
2731
  }
2732
- var AnimatedGraphic = React114__default.forwardRef(
2732
+ var AnimatedGraphic = React115__default.forwardRef(
2733
2733
  ({
2734
2734
  src,
2735
2735
  svgContent,
@@ -2752,7 +2752,7 @@ var AnimatedGraphic = React114__default.forwardRef(
2752
2752
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
2753
2753
  const resolvedSvg = svgContent ?? fetchedSvg;
2754
2754
  const prevAnimateRef = useRef(animate);
2755
- const setRef = React114__default.useCallback(
2755
+ const setRef = React115__default.useCallback(
2756
2756
  (node) => {
2757
2757
  containerRef.current = node;
2758
2758
  if (typeof ref === "function") ref(node);
@@ -3053,7 +3053,7 @@ var ErrorState = ({
3053
3053
  );
3054
3054
  };
3055
3055
  ErrorState.displayName = "ErrorState";
3056
- var ErrorBoundary = class extends React114__default.Component {
3056
+ var ErrorBoundary = class extends React115__default.Component {
3057
3057
  constructor(props) {
3058
3058
  super(props);
3059
3059
  __publicField(this, "reset", () => {
@@ -3523,7 +3523,7 @@ lazy(async () => {
3523
3523
  shadowSize: [41, 41]
3524
3524
  });
3525
3525
  L.Marker.prototype.options.icon = defaultIcon;
3526
- const { useEffect: useEffect62, useRef: useRef63, useCallback: useCallback94, useState: useState85 } = React114__default;
3526
+ const { useEffect: useEffect62, useRef: useRef63, useCallback: useCallback95, useState: useState86 } = React115__default;
3527
3527
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
3528
3528
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
3529
3529
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -3567,8 +3567,8 @@ lazy(async () => {
3567
3567
  showAttribution = true
3568
3568
  }) {
3569
3569
  const eventBus = useEventBus2();
3570
- const [clickedPosition, setClickedPosition] = useState85(null);
3571
- const handleMapClick = useCallback94((lat, lng) => {
3570
+ const [clickedPosition, setClickedPosition] = useState86(null);
3571
+ const handleMapClick = useCallback95((lat, lng) => {
3572
3572
  if (showClickedPin) {
3573
3573
  setClickedPosition({ lat, lng });
3574
3574
  }
@@ -3577,7 +3577,7 @@ lazy(async () => {
3577
3577
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
3578
3578
  }
3579
3579
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
3580
- const handleMarkerClick = useCallback94((marker) => {
3580
+ const handleMarkerClick = useCallback95((marker) => {
3581
3581
  onMarkerClick?.(marker);
3582
3582
  if (markerClickEvent) {
3583
3583
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -3835,7 +3835,7 @@ exposeOnWindow();
3835
3835
  init_Typography();
3836
3836
  init_cn();
3837
3837
  init_cn();
3838
- var MarkdownContent = React114__default.memo(
3838
+ var MarkdownContent = React115__default.memo(
3839
3839
  ({ content, direction, className }) => {
3840
3840
  const { t: _t } = useTranslate();
3841
3841
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -4041,7 +4041,7 @@ function computeFoldRegions(code) {
4041
4041
  }
4042
4042
  var LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
4043
4043
  var HIDDEN_LINE_NUMBERS = { display: "none" };
4044
- var CodeBlock = React114__default.memo(
4044
+ var CodeBlock = React115__default.memo(
4045
4045
  ({
4046
4046
  code: rawCode,
4047
4047
  language = "text",
@@ -4242,7 +4242,7 @@ var CodeBlock = React114__default.memo(
4242
4242
  }
4243
4243
  };
4244
4244
  const hasHeader = showLanguageBadge || showCopyButton;
4245
- return /* @__PURE__ */ jsxs(Box, { className: `relative group ${className || ""}`, children: [
4245
+ return /* @__PURE__ */ jsxs(Box, { className: `relative group ${className || ""}`, style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
4246
4246
  hasHeader && /* @__PURE__ */ jsxs(
4247
4247
  HStack,
4248
4248
  {
@@ -4295,8 +4295,8 @@ var CodeBlock = React114__default.memo(
4295
4295
  {
4296
4296
  style: {
4297
4297
  position: "relative",
4298
- height: "100%",
4299
- minHeight: "160px",
4298
+ flex: 1,
4299
+ minHeight: 0,
4300
4300
  maxHeight,
4301
4301
  backgroundColor: "#1e1e1e",
4302
4302
  borderRadius: hasHeader ? "0 0 0.5rem 0.5rem" : "0.5rem",
@@ -4392,6 +4392,8 @@ var CodeBlock = React114__default.memo(
4392
4392
  {
4393
4393
  ref: scrollRef,
4394
4394
  style: {
4395
+ flex: 1,
4396
+ minHeight: 0,
4395
4397
  overflowX: "auto",
4396
4398
  overflowY: "auto",
4397
4399
  WebkitOverflowScrolling: "touch",
@@ -4544,6 +4546,7 @@ init_Typography();
4544
4546
  // components/organisms/DataTable.tsx
4545
4547
  init_cn();
4546
4548
  init_Typography();
4549
+ init_Typography();
4547
4550
 
4548
4551
  // components/molecules/FormField.tsx
4549
4552
  init_cn();
@@ -4955,12 +4958,12 @@ init_useEventBus();
4955
4958
 
4956
4959
  // components/organisms/component-registry.generated.ts
4957
4960
  function lazyThree(name, loader) {
4958
- const Lazy = React114__default.lazy(() => loader().then((m) => ({ default: m[name] })));
4961
+ const Lazy = React115__default.lazy(() => loader().then((m) => ({ default: m[name] })));
4959
4962
  function ThreeWrapper(props) {
4960
- return React114__default.createElement(
4961
- React114__default.Suspense,
4963
+ return React115__default.createElement(
4964
+ React115__default.Suspense,
4962
4965
  { fallback: null },
4963
- React114__default.createElement(Lazy, props)
4966
+ React115__default.createElement(Lazy, props)
4964
4967
  );
4965
4968
  }
4966
4969
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -4987,7 +4990,7 @@ function SuspenseConfigProvider({
4987
4990
  config,
4988
4991
  children
4989
4992
  }) {
4990
- return React114__default.createElement(
4993
+ return React115__default.createElement(
4991
4994
  SuspenseConfigContext.Provider,
4992
4995
  { value: config },
4993
4996
  children