@almadar/ui 2.56.0 → 2.57.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.
- package/dist/avl/index.cjs +1240 -1236
- package/dist/avl/index.js +169 -165
- package/dist/components/index.cjs +1175 -1053
- package/dist/components/index.js +272 -151
- package/dist/components/molecules/FileTree.d.ts +37 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/providers/index.cjs +180 -179
- package/dist/providers/index.js +43 -42
- package/dist/runtime/index.cjs +911 -910
- package/dist/runtime/index.js +147 -146
- package/package.json +1 -1
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 (
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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] =
|
|
1997
|
+
const [isChecked, setIsChecked] = React115.useState(
|
|
1998
1998
|
checked !== void 0 ? checked : defaultChecked
|
|
1999
1999
|
);
|
|
2000
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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:
|
|
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] =
|
|
3571
|
-
const handleMapClick =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
4044
|
+
var CodeBlock = React115__default.memo(
|
|
4045
4045
|
({
|
|
4046
4046
|
code: rawCode,
|
|
4047
4047
|
language = "text",
|
|
@@ -4544,6 +4544,7 @@ init_Typography();
|
|
|
4544
4544
|
// components/organisms/DataTable.tsx
|
|
4545
4545
|
init_cn();
|
|
4546
4546
|
init_Typography();
|
|
4547
|
+
init_Typography();
|
|
4547
4548
|
|
|
4548
4549
|
// components/molecules/FormField.tsx
|
|
4549
4550
|
init_cn();
|
|
@@ -4955,12 +4956,12 @@ init_useEventBus();
|
|
|
4955
4956
|
|
|
4956
4957
|
// components/organisms/component-registry.generated.ts
|
|
4957
4958
|
function lazyThree(name, loader) {
|
|
4958
|
-
const Lazy =
|
|
4959
|
+
const Lazy = React115__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
4959
4960
|
function ThreeWrapper(props) {
|
|
4960
|
-
return
|
|
4961
|
-
|
|
4961
|
+
return React115__default.createElement(
|
|
4962
|
+
React115__default.Suspense,
|
|
4962
4963
|
{ fallback: null },
|
|
4963
|
-
|
|
4964
|
+
React115__default.createElement(Lazy, props)
|
|
4964
4965
|
);
|
|
4965
4966
|
}
|
|
4966
4967
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -4987,7 +4988,7 @@ function SuspenseConfigProvider({
|
|
|
4987
4988
|
config,
|
|
4988
4989
|
children
|
|
4989
4990
|
}) {
|
|
4990
|
-
return
|
|
4991
|
+
return React115__default.createElement(
|
|
4991
4992
|
SuspenseConfigContext.Provider,
|
|
4992
4993
|
{ value: config },
|
|
4993
4994
|
children
|