@almadar/ui 6.52.0 → 6.53.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/{EntityBindingContext-BbxrwSb9.d.ts → AwaitingSkeletonContext-Bh399p1x.d.ts} +17 -2
- package/dist/{Canvas3DHost-CWO0tswb.d.ts → Canvas3DHost-B-y2TNij.d.ts} +1 -1
- package/dist/{GameAudioProvider-_hPzjqp-.d.ts → GameAudioProvider-DyBvYP2c.d.ts} +1 -1
- package/dist/Typography-JGSDH4JP.js +5 -0
- package/dist/{UISlotRenderer-CR7SCAMR.js → UISlotRenderer-JT34I3O7.js} +9 -9
- package/dist/avl/index.cjs +39792 -40170
- package/dist/avl/index.d.ts +5 -2
- package/dist/avl/index.js +25 -17
- package/dist/{chunk-XUSSAWKL.js → chunk-2LFBQ4IS.js} +1 -1
- package/dist/{chunk-EERAGPBW.js → chunk-3EF5SDIJ.js} +31499 -32794
- package/dist/{chunk-V5AGW2JN.js → chunk-4OZDHCZV.js} +1 -1
- package/dist/{chunk-MSBMVG3B.js → chunk-6O37FCX4.js} +1 -0
- package/dist/{chunk-BHZG4PDZ.js → chunk-7LM6I3NA.js} +629 -626
- package/dist/chunk-CBIJP5PL.js +284 -0
- package/dist/{chunk-CLSLVFSP.js → chunk-GMDMOYXD.js} +2 -2
- package/dist/{chunk-NCNP2RKZ.js → chunk-GODZKHAL.js} +2 -2
- package/dist/{chunk-QWDKMVLX.js → chunk-IKULQIDX.js} +141 -82
- package/dist/{chunk-TWHYH25Q.js → chunk-JRW33U35.js} +80 -80
- package/dist/{chunk-G4GMXYMY.js → chunk-KQXXO42S.js} +93 -171
- package/dist/chunk-OKWD7LPO.js +80 -0
- package/dist/{chunk-YHY5K2Y7.js → chunk-PEST66PN.js} +6 -0
- package/dist/{chunk-WB2A6V3I.js → chunk-UGHAADU5.js} +47 -1
- package/dist/{chunk-2QB2PXOO.js → chunk-VHTJRS2N.js} +3 -5
- package/dist/{chunk-5GCI6C7J.js → chunk-WPNM2KC6.js} +2 -2
- package/dist/components/index.cjs +42017 -42467
- package/dist/components/index.d.ts +182 -319
- package/dist/components/index.js +621 -13
- package/dist/context/index.cjs +8 -3
- package/dist/context/index.js +3 -3
- package/dist/hooks/index.cjs +54 -4
- package/dist/hooks/index.js +7 -7
- package/dist/lib/drawable/three/index.cjs +47 -1
- package/dist/lib/drawable/three/index.d.ts +5 -5
- package/dist/lib/drawable/three/index.js +7 -7
- package/dist/lib/index.cjs +48 -1
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +6 -5
- package/dist/locales/index.cjs +141 -3
- package/dist/locales/index.js +95 -3
- package/dist/{paintDispatch-DHo3WhaU.d.ts → paintDispatch-_6EhJCiL.d.ts} +3 -3
- package/dist/providers/index.cjs +34611 -35020
- package/dist/providers/index.d.ts +33 -8
- package/dist/providers/index.js +36 -12
- package/dist/renderer/index.cjs +6 -0
- package/dist/renderer/index.d.ts +1 -1
- package/dist/renderer/index.js +1 -1
- package/dist/runtime/index.cjs +41106 -41488
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.js +11 -11
- package/dist/ssr/index.cjs +375 -137
- package/dist/ssr/index.d.cts +5 -1
- package/dist/ssr/index.d.ts +5 -1
- package/dist/ssr/index.js +311 -73
- package/dist/{verificationRegistry-BYD3cVhS.d.ts → verificationRegistry-CD7Xb40L.d.ts} +1 -1
- package/locales/ar.json +47 -1
- package/locales/en.json +47 -1
- package/locales/sl.json +47 -1
- package/package.json +6 -6
- package/tailwind-preset.cjs +13 -0
- package/themes/_base.css +28 -8
- package/themes/_contract.md +5 -0
- package/dist/Typography-7FRZOS2H.js +0 -5
- package/dist/{avl-3d-context-DLteNEwu.d.ts → avl-3d-context-MAt_NuU9.d.ts} +3 -3
- package/dist/{chunk-IN3BVW2Z.js → chunk-64WACXM7.js} +14 -14
package/dist/ssr/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React17 = require('react');
|
|
4
4
|
var logger = require('@almadar/logger');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var LucideIcons2 = require('lucide-react');
|
|
@@ -25,7 +25,7 @@ function _interopNamespace(e) {
|
|
|
25
25
|
return Object.freeze(n);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var React17__namespace = /*#__PURE__*/_interopNamespace(React17);
|
|
29
29
|
var LucideIcons2__namespace = /*#__PURE__*/_interopNamespace(LucideIcons2);
|
|
30
30
|
|
|
31
31
|
// node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -2578,11 +2578,11 @@ function cn(...inputs) {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
logger.createLogger("almadar:eventbus");
|
|
2580
2580
|
logger.createLogger("almadar:eventbus:subscribe");
|
|
2581
|
-
var EventBusContext = globalThis.__almadarUiEventBusContext ?? (globalThis.__almadarUiEventBusContext =
|
|
2581
|
+
var EventBusContext = globalThis.__almadarUiEventBusContext ?? (globalThis.__almadarUiEventBusContext = React17.createContext(null));
|
|
2582
2582
|
var EMPTY_CHAIN = Object.freeze([]);
|
|
2583
|
-
var TraitScopeContext =
|
|
2583
|
+
var TraitScopeContext = React17.createContext(null);
|
|
2584
2584
|
function useTraitScopeChain() {
|
|
2585
|
-
const chain =
|
|
2585
|
+
const chain = React17.useContext(TraitScopeContext);
|
|
2586
2586
|
return chain ?? EMPTY_CHAIN;
|
|
2587
2587
|
}
|
|
2588
2588
|
var log = logger.createLogger("almadar:eventbus");
|
|
@@ -2659,10 +2659,10 @@ var fallbackEventBus = {
|
|
|
2659
2659
|
}
|
|
2660
2660
|
};
|
|
2661
2661
|
function useEventBus() {
|
|
2662
|
-
const context =
|
|
2662
|
+
const context = React17.useContext(EventBusContext);
|
|
2663
2663
|
const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
|
|
2664
2664
|
const chain = useTraitScopeChain();
|
|
2665
|
-
return
|
|
2665
|
+
return React17.useMemo(() => {
|
|
2666
2666
|
if (chain.length === 0) {
|
|
2667
2667
|
return {
|
|
2668
2668
|
...baseBus,
|
|
@@ -2708,24 +2708,24 @@ function useEventBus() {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
function useTapReveal(options = {}) {
|
|
2710
2710
|
const { onReveal, onDismiss, refs, enabled = true } = options;
|
|
2711
|
-
const [revealed, setRevealed] =
|
|
2712
|
-
const onRevealRef =
|
|
2713
|
-
const onDismissRef =
|
|
2711
|
+
const [revealed, setRevealed] = React17.useState(false);
|
|
2712
|
+
const onRevealRef = React17.useRef(onReveal);
|
|
2713
|
+
const onDismissRef = React17.useRef(onDismiss);
|
|
2714
2714
|
onRevealRef.current = onReveal;
|
|
2715
2715
|
onDismissRef.current = onDismiss;
|
|
2716
|
-
const reveal =
|
|
2716
|
+
const reveal = React17.useCallback(() => {
|
|
2717
2717
|
setRevealed((wasRevealed) => {
|
|
2718
2718
|
if (!wasRevealed) onRevealRef.current?.();
|
|
2719
2719
|
return true;
|
|
2720
2720
|
});
|
|
2721
2721
|
}, []);
|
|
2722
|
-
const dismiss =
|
|
2722
|
+
const dismiss = React17.useCallback(() => {
|
|
2723
2723
|
setRevealed((wasRevealed) => {
|
|
2724
2724
|
if (wasRevealed) onDismissRef.current?.();
|
|
2725
2725
|
return false;
|
|
2726
2726
|
});
|
|
2727
2727
|
}, []);
|
|
2728
|
-
const onPointerDown =
|
|
2728
|
+
const onPointerDown = React17.useCallback(
|
|
2729
2729
|
(e) => {
|
|
2730
2730
|
if (!enabled || e.pointerType === "mouse") return;
|
|
2731
2731
|
if (revealed) dismiss();
|
|
@@ -2733,7 +2733,7 @@ function useTapReveal(options = {}) {
|
|
|
2733
2733
|
},
|
|
2734
2734
|
[enabled, revealed, reveal, dismiss]
|
|
2735
2735
|
);
|
|
2736
|
-
|
|
2736
|
+
React17.useEffect(() => {
|
|
2737
2737
|
if (!revealed || typeof document === "undefined") return;
|
|
2738
2738
|
const onDocDown = (ev) => {
|
|
2739
2739
|
const target = ev.target;
|
|
@@ -2750,10 +2750,10 @@ function useTapReveal(options = {}) {
|
|
|
2750
2750
|
return { revealed, triggerProps: { onPointerDown }, reveal, dismiss };
|
|
2751
2751
|
}
|
|
2752
2752
|
logger.createLogger("almadar:ui:theme");
|
|
2753
|
-
|
|
2754
|
-
var ThemeScopeContext =
|
|
2753
|
+
React17.createContext(void 0);
|
|
2754
|
+
var ThemeScopeContext = React17.createContext({});
|
|
2755
2755
|
function useThemeScope() {
|
|
2756
|
-
return
|
|
2756
|
+
return React17.useContext(ThemeScopeContext);
|
|
2757
2757
|
}
|
|
2758
2758
|
|
|
2759
2759
|
// lib/pressable.ts
|
|
@@ -2883,7 +2883,7 @@ var positionStyles = {
|
|
|
2883
2883
|
fixed: "fixed",
|
|
2884
2884
|
sticky: "sticky"
|
|
2885
2885
|
};
|
|
2886
|
-
var Box =
|
|
2886
|
+
var Box = React17__namespace.default.forwardRef(
|
|
2887
2887
|
({
|
|
2888
2888
|
padding,
|
|
2889
2889
|
paddingX,
|
|
@@ -2918,20 +2918,20 @@ var Box = React16__namespace.default.forwardRef(
|
|
|
2918
2918
|
const { override: themeOverride } = useThemeScope();
|
|
2919
2919
|
const declaredTheme = rest["data-theme"];
|
|
2920
2920
|
const dataTheme = declaredTheme !== void 0 && themeOverride ? themeOverride : declaredTheme;
|
|
2921
|
-
const handleClick =
|
|
2921
|
+
const handleClick = React17.useCallback((e) => {
|
|
2922
2922
|
if (action) {
|
|
2923
2923
|
e.stopPropagation();
|
|
2924
2924
|
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
2925
2925
|
}
|
|
2926
2926
|
onClick?.(e);
|
|
2927
2927
|
}, [action, actionPayload, eventBus, onClick]);
|
|
2928
|
-
const handleMouseEnter =
|
|
2928
|
+
const handleMouseEnter = React17.useCallback((e) => {
|
|
2929
2929
|
if (hoverEvent) {
|
|
2930
2930
|
eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
2931
2931
|
}
|
|
2932
2932
|
onMouseEnter?.(e);
|
|
2933
2933
|
}, [hoverEvent, eventBus, onMouseEnter]);
|
|
2934
|
-
const handleMouseLeave =
|
|
2934
|
+
const handleMouseLeave = React17.useCallback((e) => {
|
|
2935
2935
|
if (hoverEvent) {
|
|
2936
2936
|
eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
2937
2937
|
}
|
|
@@ -2939,20 +2939,20 @@ var Box = React16__namespace.default.forwardRef(
|
|
|
2939
2939
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
2940
2940
|
const { triggerProps } = useTapReveal({
|
|
2941
2941
|
enabled: tapReveal && !!hoverEvent,
|
|
2942
|
-
onReveal:
|
|
2942
|
+
onReveal: React17.useCallback(() => {
|
|
2943
2943
|
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
2944
2944
|
}, [hoverEvent, eventBus]),
|
|
2945
|
-
onDismiss:
|
|
2945
|
+
onDismiss: React17.useCallback(() => {
|
|
2946
2946
|
if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
2947
2947
|
}, [hoverEvent, eventBus])
|
|
2948
2948
|
});
|
|
2949
|
-
const handlePointerDown =
|
|
2949
|
+
const handlePointerDown = React17.useCallback((e) => {
|
|
2950
2950
|
if (hoverEvent && tapReveal) triggerProps.onPointerDown(e);
|
|
2951
2951
|
onPointerDown?.(e);
|
|
2952
2952
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
2953
2953
|
const isClickable = action || onClick;
|
|
2954
2954
|
const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
|
|
2955
|
-
return
|
|
2955
|
+
return React17__namespace.default.createElement(
|
|
2956
2956
|
Component,
|
|
2957
2957
|
{
|
|
2958
2958
|
ref,
|
|
@@ -3057,7 +3057,7 @@ var Stack = ({
|
|
|
3057
3057
|
};
|
|
3058
3058
|
const isHorizontal = direction === "horizontal";
|
|
3059
3059
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
3060
|
-
return
|
|
3060
|
+
return React17__namespace.default.createElement(
|
|
3061
3061
|
Component,
|
|
3062
3062
|
{
|
|
3063
3063
|
...domPassthrough(rest),
|
|
@@ -3200,6 +3200,7 @@ var en_default = {
|
|
|
3200
3200
|
"aria.removeFilter": "Remove filter",
|
|
3201
3201
|
"aria.closeDrawer": "Close drawer",
|
|
3202
3202
|
"aria.closePanel": "Close panel",
|
|
3203
|
+
"aria.dockPanel": "Side panel",
|
|
3203
3204
|
"aria.previousImage": "Previous image",
|
|
3204
3205
|
"aria.nextImage": "Next image",
|
|
3205
3206
|
"aria.dismiss": "Dismiss",
|
|
@@ -3221,6 +3222,7 @@ var en_default = {
|
|
|
3221
3222
|
"aria.openMenu": "Open menu",
|
|
3222
3223
|
"aria.closeMenu": "Close menu",
|
|
3223
3224
|
"aria.openSidebar": "Open sidebar",
|
|
3225
|
+
"aria.openRow": "Open item {{position}}",
|
|
3224
3226
|
"sidebar.expand": "Expand sidebar",
|
|
3225
3227
|
"sidebar.collapse": "Collapse sidebar",
|
|
3226
3228
|
"sidebar.close": "Close sidebar",
|
|
@@ -4266,7 +4268,51 @@ var en_default = {
|
|
|
4266
4268
|
"aria.walkTraitDone": "completed",
|
|
4267
4269
|
"aria.walkTraitPending": "pending",
|
|
4268
4270
|
"aria.walkGraph": "State graph for {{trait}}: {{from}} to {{to}}",
|
|
4269
|
-
"aria.loading": "Loading"
|
|
4271
|
+
"aria.loading": "Loading",
|
|
4272
|
+
"agentActivity.toolCall": "Called {{tool}}",
|
|
4273
|
+
"agentActivity.toolResult": "{{tool}} returned",
|
|
4274
|
+
"agentActivity.toolRows": "{{count}} rows",
|
|
4275
|
+
"agentActivity.thinking": "Thinking\u2026",
|
|
4276
|
+
"agentActivity.analyzed": "Analyzed your request \u2014 {{organism}}",
|
|
4277
|
+
"agentActivity.renamed": "Rename {{from}} \u2192 {{to}}",
|
|
4278
|
+
"agentActivity.deleted": "Remove {{orbitalName}}",
|
|
4279
|
+
"agentActivity.roster": "Planning {{count}} orbitals",
|
|
4280
|
+
"agentActivity.orbitalStarted": "Working on {{orbitalName}}\u2026",
|
|
4281
|
+
"agentActivity.orbitalStartedSettled": "Started {{orbitalName}}",
|
|
4282
|
+
"agentActivity.orbitalDone": "{{orbitalName}} ready",
|
|
4283
|
+
"agentActivity.orbitalCounts": "{{traitCount}} traits, {{transitionCount}} transitions",
|
|
4284
|
+
"agentActivity.change.orbital-added": "Added {{orbitalName}}",
|
|
4285
|
+
"agentActivity.change.orbital-removed": "Removed {{orbitalName}}",
|
|
4286
|
+
"agentActivity.change.entity-fields-changed": "Changed the data fields of {{orbitalName}}",
|
|
4287
|
+
"agentActivity.change.trait-added": "Added a behavior to {{orbitalName}}",
|
|
4288
|
+
"agentActivity.change.trait-removed": "Removed a behavior from {{orbitalName}}",
|
|
4289
|
+
"agentActivity.change.state-machine-changed": "Changed the flow of {{orbitalName}}",
|
|
4290
|
+
"agentActivity.change.guard-changed": "Changed a rule in {{orbitalName}}",
|
|
4291
|
+
"agentActivity.change.effect-changed": "Changed what {{orbitalName}} does",
|
|
4292
|
+
"agentActivity.change.render-ui-changed": "Changed the design of {{orbitalName}}",
|
|
4293
|
+
"agentActivity.change.event-wiring-changed": "Changed the connections of {{orbitalName}}",
|
|
4294
|
+
"agentActivity.change.page-changed": "Changed the pages of {{orbitalName}}",
|
|
4295
|
+
"agentActivity.change.behavior-composed": "Composed a behavior into {{orbitalName}}",
|
|
4296
|
+
"agentActivity.done": "Done \u2014 {{count}} orbitals ready",
|
|
4297
|
+
"agentActivity.cancelled": "Cancelled",
|
|
4298
|
+
"agentActivity.jump": "Show",
|
|
4299
|
+
"agentActivity.emptyTitle": "No activity yet",
|
|
4300
|
+
"agentActivity.emptyDescription": "Send a message and the agent's work shows up here.",
|
|
4301
|
+
"agentActivity.fileOperation": "{{operation}}",
|
|
4302
|
+
"agentActivity.schemaDiff": "Edited {{filePath}}",
|
|
4303
|
+
"agentActivity.coordinatorDecision": "Chose {{organism}}",
|
|
4304
|
+
"agentActivity.change.trait-config-changed": "Changed the settings of {{orbitalName}}",
|
|
4305
|
+
"agentActivity.change.theme-changed": "Changed the theme of {{orbitalName}}",
|
|
4306
|
+
"agentActivity.llmResponse": "Raw LLM response",
|
|
4307
|
+
"agentActivity.llmDuration": "{{seconds}}s",
|
|
4308
|
+
"agentActivity.llmTokens": "{{prompt}} in / {{completion}} out tokens",
|
|
4309
|
+
"agentActivity.llmResponseLabel": "Response",
|
|
4310
|
+
"agentActivity.llmSystemPrompt": "System prompt",
|
|
4311
|
+
"agentActivity.llmUserPrompt": "User prompt",
|
|
4312
|
+
"agentActivity.llmToolCalls": "Tool calls",
|
|
4313
|
+
"agentActivity.showRawLlm": "Raw LLM",
|
|
4314
|
+
"agentActivity.earlierConversations": "Earlier conversations ({{count}})",
|
|
4315
|
+
"agentActivity.earlierActivity": "Earlier activity"
|
|
4270
4316
|
};
|
|
4271
4317
|
|
|
4272
4318
|
// lib/format.ts
|
|
@@ -4330,7 +4376,7 @@ function formatValue(value, format, fmt = {}) {
|
|
|
4330
4376
|
var INLINE_TEXT_ATTR = "data-inline-text";
|
|
4331
4377
|
var { $meta: _meta2, ...coreMessages2 } = en_default;
|
|
4332
4378
|
var coreLocale2 = coreMessages2;
|
|
4333
|
-
var I18nContext =
|
|
4379
|
+
var I18nContext = React17.createContext({
|
|
4334
4380
|
locale: "en",
|
|
4335
4381
|
direction: "ltr",
|
|
4336
4382
|
t: (key, params) => {
|
|
@@ -4345,11 +4391,11 @@ var I18nContext = React16.createContext({
|
|
|
4345
4391
|
});
|
|
4346
4392
|
I18nContext.displayName = "I18nContext";
|
|
4347
4393
|
function useTranslate() {
|
|
4348
|
-
return
|
|
4394
|
+
return React17.useContext(I18nContext);
|
|
4349
4395
|
}
|
|
4350
4396
|
function useFormatContext() {
|
|
4351
|
-
const { t, locale, currency } =
|
|
4352
|
-
return
|
|
4397
|
+
const { t, locale, currency } = React17.useContext(I18nContext);
|
|
4398
|
+
return React17.useMemo(
|
|
4353
4399
|
() => ({ locale, currency: currency ?? DEFAULT_CURRENCY, booleanLabels: { yes: t("common.yes"), no: t("common.no") } }),
|
|
4354
4400
|
[t, locale, currency]
|
|
4355
4401
|
);
|
|
@@ -4455,7 +4501,7 @@ var Typography = ({
|
|
|
4455
4501
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
4456
4502
|
body = formatValue(body, format, fmt);
|
|
4457
4503
|
}
|
|
4458
|
-
return
|
|
4504
|
+
return React17__namespace.default.createElement(
|
|
4459
4505
|
Component,
|
|
4460
4506
|
{
|
|
4461
4507
|
...domPassthrough(rest),
|
|
@@ -4509,20 +4555,20 @@ function subscribePending(key, cb) {
|
|
|
4509
4555
|
if (set && set.size === 0) keyListeners.delete(key);
|
|
4510
4556
|
};
|
|
4511
4557
|
}
|
|
4512
|
-
var PendingScopeContext =
|
|
4558
|
+
var PendingScopeContext = React17.createContext(null);
|
|
4513
4559
|
function usePendingAction() {
|
|
4514
|
-
const scope =
|
|
4515
|
-
const [key, setKey] =
|
|
4516
|
-
const pending =
|
|
4517
|
-
|
|
4560
|
+
const scope = React17.useContext(PendingScopeContext);
|
|
4561
|
+
const [key, setKey] = React17.useState(null);
|
|
4562
|
+
const pending = React17.useSyncExternalStore(
|
|
4563
|
+
React17.useCallback((cb) => key ? subscribePending(key, cb) : () => {
|
|
4518
4564
|
}, [key]),
|
|
4519
4565
|
() => key ? isPending(key) : false,
|
|
4520
4566
|
() => false
|
|
4521
4567
|
);
|
|
4522
|
-
|
|
4568
|
+
React17.useEffect(() => {
|
|
4523
4569
|
if (key && !pending) setKey(null);
|
|
4524
4570
|
}, [key, pending]);
|
|
4525
|
-
const activate =
|
|
4571
|
+
const activate = React17.useCallback((emit) => {
|
|
4526
4572
|
const k = newPendingKey();
|
|
4527
4573
|
emit(k);
|
|
4528
4574
|
if (!isPending(k)) return;
|
|
@@ -4613,16 +4659,16 @@ function getThemeVersionSnapshot() {
|
|
|
4613
4659
|
return themeVersion;
|
|
4614
4660
|
}
|
|
4615
4661
|
function useThemeIconStrokeApplies(ref) {
|
|
4616
|
-
const documentApplies =
|
|
4617
|
-
const version =
|
|
4618
|
-
const [scopedApplies, setScopedApplies] =
|
|
4619
|
-
|
|
4662
|
+
const documentApplies = React17.useSyncExternalStore(subscribeIconFamily, getStrokeAppliesSnapshot, () => true);
|
|
4663
|
+
const version = React17.useSyncExternalStore(subscribeIconFamily, getThemeVersionSnapshot, () => 0);
|
|
4664
|
+
const [scopedApplies, setScopedApplies] = React17.useState(null);
|
|
4665
|
+
React17.useLayoutEffect(() => {
|
|
4620
4666
|
if (ref.current) setScopedApplies(familyStrokeApplies(scopedIconFamily(ref.current)));
|
|
4621
4667
|
}, [ref, version]);
|
|
4622
4668
|
return scopedApplies ?? documentApplies;
|
|
4623
4669
|
}
|
|
4624
4670
|
function useIconFamily() {
|
|
4625
|
-
return
|
|
4671
|
+
return React17.useSyncExternalStore(
|
|
4626
4672
|
subscribeIconFamily,
|
|
4627
4673
|
getIconFamilySnapshot,
|
|
4628
4674
|
getIconFamilyServerSnapshot
|
|
@@ -4661,7 +4707,7 @@ function resolveLucide(name) {
|
|
|
4661
4707
|
}
|
|
4662
4708
|
function makeLucideAdapter(name) {
|
|
4663
4709
|
const LucideComp = resolveLucide(name);
|
|
4664
|
-
const Adapter =
|
|
4710
|
+
const Adapter = React17__namespace.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4665
4711
|
LucideComp,
|
|
4666
4712
|
{
|
|
4667
4713
|
ref,
|
|
@@ -4749,9 +4795,9 @@ var Icon = ({
|
|
|
4749
4795
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
4750
4796
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
4751
4797
|
const family = useIconFamily();
|
|
4752
|
-
const svgRef =
|
|
4798
|
+
const svgRef = React17__namespace.default.useRef(null);
|
|
4753
4799
|
const themeStroke = useThemeIconStrokeApplies(svgRef);
|
|
4754
|
-
const RenderedComponent =
|
|
4800
|
+
const RenderedComponent = React17__namespace.default.useMemo(() => {
|
|
4755
4801
|
if (directIcon) return null;
|
|
4756
4802
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
4757
4803
|
}, [directIcon, effectiveName, family]);
|
|
@@ -4893,13 +4939,13 @@ function AtlasImage({
|
|
|
4893
4939
|
"aria-hidden": ariaHidden,
|
|
4894
4940
|
...rest
|
|
4895
4941
|
}) {
|
|
4896
|
-
const [, bump] =
|
|
4897
|
-
const canvasRef =
|
|
4942
|
+
const [, bump] = React17__namespace.useReducer((x) => x + 1, 0);
|
|
4943
|
+
const canvasRef = React17__namespace.useRef(null);
|
|
4898
4944
|
const sliced = isAtlasAsset(asset);
|
|
4899
4945
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
4900
4946
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
4901
4947
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
4902
|
-
|
|
4948
|
+
React17__namespace.useEffect(() => {
|
|
4903
4949
|
const canvas = canvasRef.current;
|
|
4904
4950
|
if (!canvas || !img || !rect) return;
|
|
4905
4951
|
canvas.width = rect.sw;
|
|
@@ -4954,7 +5000,7 @@ function AtlasImage({
|
|
|
4954
5000
|
}
|
|
4955
5001
|
AtlasImage.displayName = "AtlasImage";
|
|
4956
5002
|
logger.createLogger("almadar:ui:navigation");
|
|
4957
|
-
|
|
5003
|
+
React17.createContext(null);
|
|
4958
5004
|
var INERT_API = {
|
|
4959
5005
|
entries: [],
|
|
4960
5006
|
canGoBack: false,
|
|
@@ -4964,12 +5010,12 @@ var INERT_API = {
|
|
|
4964
5010
|
setCurrentLabel: () => void 0,
|
|
4965
5011
|
registerNavItems: () => void 0
|
|
4966
5012
|
};
|
|
4967
|
-
var NavStackContext =
|
|
5013
|
+
var NavStackContext = React17.createContext(INERT_API);
|
|
4968
5014
|
function isInertNavStack(api) {
|
|
4969
5015
|
return api === INERT_API;
|
|
4970
5016
|
}
|
|
4971
5017
|
function useNavStack() {
|
|
4972
|
-
return
|
|
5018
|
+
return React17.useContext(NavStackContext);
|
|
4973
5019
|
}
|
|
4974
5020
|
|
|
4975
5021
|
// lib/followHref.ts
|
|
@@ -5064,7 +5110,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5064
5110
|
const IconComp = value;
|
|
5065
5111
|
return /* @__PURE__ */ jsxRuntime.jsx(IconComp, { className: sizeClass });
|
|
5066
5112
|
}
|
|
5067
|
-
if (
|
|
5113
|
+
if (React17__namespace.default.isValidElement(value)) {
|
|
5068
5114
|
return value;
|
|
5069
5115
|
}
|
|
5070
5116
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -5073,7 +5119,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5073
5119
|
}
|
|
5074
5120
|
return value;
|
|
5075
5121
|
}
|
|
5076
|
-
var Button =
|
|
5122
|
+
var Button = React17__namespace.default.forwardRef(
|
|
5077
5123
|
({
|
|
5078
5124
|
className,
|
|
5079
5125
|
variant = "primary",
|
|
@@ -5100,7 +5146,7 @@ var Button = React16__namespace.default.forwardRef(
|
|
|
5100
5146
|
const navStack = useNavStack();
|
|
5101
5147
|
const { pending, activate } = usePendingAction();
|
|
5102
5148
|
const busy = isLoading || pending;
|
|
5103
|
-
const [focused, setFocused] =
|
|
5149
|
+
const [focused, setFocused] = React17__namespace.default.useState(false);
|
|
5104
5150
|
const inert = Boolean(disabled) || busy;
|
|
5105
5151
|
const emitAction = () => {
|
|
5106
5152
|
if (!action) return;
|
|
@@ -5238,7 +5284,7 @@ var sizeStyles2 = {
|
|
|
5238
5284
|
md: "px-2.5 py-1 text-sm",
|
|
5239
5285
|
lg: "px-3 py-1.5 text-base"
|
|
5240
5286
|
};
|
|
5241
|
-
var Badge =
|
|
5287
|
+
var Badge = React17__namespace.default.forwardRef(
|
|
5242
5288
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, onClick, ...props }, ref) => {
|
|
5243
5289
|
const { t } = useTranslate();
|
|
5244
5290
|
const iconSizes = {
|
|
@@ -5302,13 +5348,25 @@ var Badge = React16__namespace.default.forwardRef(
|
|
|
5302
5348
|
}
|
|
5303
5349
|
);
|
|
5304
5350
|
Badge.displayName = "Badge";
|
|
5351
|
+
var SurfaceContext = React17__namespace.default.createContext(false);
|
|
5352
|
+
function SurfaceBoundary({ children }) {
|
|
5353
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SurfaceContext.Provider, { value: true, children });
|
|
5354
|
+
}
|
|
5355
|
+
function useContentSurface(surface = "auto") {
|
|
5356
|
+
const onSurface = React17__namespace.default.useContext(SurfaceContext);
|
|
5357
|
+
const paints = surface === "auto" && !onSurface;
|
|
5358
|
+
return {
|
|
5359
|
+
className: paints ? "surface-content" : void 0,
|
|
5360
|
+
provide: (node) => paints ? /* @__PURE__ */ jsxRuntime.jsx(SurfaceBoundary, { children: node }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: node })
|
|
5361
|
+
};
|
|
5362
|
+
}
|
|
5305
5363
|
var sizeStyles3 = {
|
|
5306
5364
|
xs: "h-3 w-3",
|
|
5307
5365
|
sm: "h-icon-default w-icon-default",
|
|
5308
5366
|
md: "h-6 w-6",
|
|
5309
5367
|
lg: "h-8 w-8"
|
|
5310
5368
|
};
|
|
5311
|
-
var Spinner =
|
|
5369
|
+
var Spinner = React17__namespace.default.forwardRef(
|
|
5312
5370
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
5313
5371
|
const { t } = useTranslate();
|
|
5314
5372
|
if (overlay) {
|
|
@@ -5346,16 +5404,12 @@ var Spinner = React16__namespace.default.forwardRef(
|
|
|
5346
5404
|
Spinner.displayName = "Spinner";
|
|
5347
5405
|
var variantStyles4 = {
|
|
5348
5406
|
default: [
|
|
5349
|
-
"
|
|
5350
|
-
"border-[length:var(--border-width)] border-border",
|
|
5351
|
-
"shadow-elevation-card",
|
|
5407
|
+
"surface-content",
|
|
5352
5408
|
"transition-all duration-normal",
|
|
5353
5409
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
5354
5410
|
].join(" "),
|
|
5355
5411
|
bordered: [
|
|
5356
|
-
"
|
|
5357
|
-
"border-[length:var(--border-width)] border-border",
|
|
5358
|
-
"shadow-elevation-card",
|
|
5412
|
+
"surface-content",
|
|
5359
5413
|
"transition-all duration-normal",
|
|
5360
5414
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
5361
5415
|
].join(" "),
|
|
@@ -5397,7 +5451,7 @@ var lookStyles = {
|
|
|
5397
5451
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
5398
5452
|
"tile-image-first": "p-0 overflow-hidden"
|
|
5399
5453
|
};
|
|
5400
|
-
var Card =
|
|
5454
|
+
var Card = React17__namespace.default.forwardRef(
|
|
5401
5455
|
({
|
|
5402
5456
|
className,
|
|
5403
5457
|
variant = "bordered",
|
|
@@ -5440,16 +5494,16 @@ var Card = React16__namespace.default.forwardRef(
|
|
|
5440
5494
|
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg text-card-foreground heading-voice", children: title }),
|
|
5441
5495
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1", children: subtitle })
|
|
5442
5496
|
] }),
|
|
5443
|
-
children
|
|
5497
|
+
/* @__PURE__ */ jsxRuntime.jsx(SurfaceBoundary, { children })
|
|
5444
5498
|
]
|
|
5445
5499
|
}
|
|
5446
5500
|
);
|
|
5447
5501
|
}
|
|
5448
5502
|
);
|
|
5449
5503
|
Card.displayName = "Card";
|
|
5450
|
-
var CardHeader =
|
|
5504
|
+
var CardHeader = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
5451
5505
|
CardHeader.displayName = "CardHeader";
|
|
5452
|
-
var CardTitle =
|
|
5506
|
+
var CardTitle = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5453
5507
|
"h3",
|
|
5454
5508
|
{
|
|
5455
5509
|
ref,
|
|
@@ -5462,11 +5516,11 @@ var CardTitle = React16__namespace.default.forwardRef(({ className, ...props },
|
|
|
5462
5516
|
}
|
|
5463
5517
|
));
|
|
5464
5518
|
CardTitle.displayName = "CardTitle";
|
|
5465
|
-
var CardContent =
|
|
5519
|
+
var CardContent = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
|
|
5466
5520
|
CardContent.displayName = "CardContent";
|
|
5467
5521
|
var CardBody = CardContent;
|
|
5468
5522
|
CardBody.displayName = "CardBody";
|
|
5469
|
-
var CardFooter =
|
|
5523
|
+
var CardFooter = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5470
5524
|
"div",
|
|
5471
5525
|
{
|
|
5472
5526
|
ref,
|
|
@@ -5563,7 +5617,7 @@ var Center = ({
|
|
|
5563
5617
|
...rest
|
|
5564
5618
|
}) => {
|
|
5565
5619
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
5566
|
-
return
|
|
5620
|
+
return React17__namespace.default.createElement(Component, {
|
|
5567
5621
|
...domPassthrough(rest),
|
|
5568
5622
|
className: cn(
|
|
5569
5623
|
inline ? "inline-flex" : "flex",
|
|
@@ -5670,8 +5724,8 @@ var Avatar = ({
|
|
|
5670
5724
|
}) => {
|
|
5671
5725
|
const eventBus = useEventBus();
|
|
5672
5726
|
const { t } = useTranslate();
|
|
5673
|
-
const [imgFailed, setImgFailed] =
|
|
5674
|
-
|
|
5727
|
+
const [imgFailed, setImgFailed] = React17__namespace.default.useState(false);
|
|
5728
|
+
React17__namespace.default.useEffect(() => {
|
|
5675
5729
|
setImgFailed(false);
|
|
5676
5730
|
}, [src]);
|
|
5677
5731
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -6027,7 +6081,7 @@ var Container = ({
|
|
|
6027
6081
|
...rest
|
|
6028
6082
|
}) => {
|
|
6029
6083
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
6030
|
-
return
|
|
6084
|
+
return React17__namespace.default.createElement(
|
|
6031
6085
|
Component,
|
|
6032
6086
|
{
|
|
6033
6087
|
...domPassthrough(rest),
|
|
@@ -6043,6 +6097,186 @@ var Container = ({
|
|
|
6043
6097
|
);
|
|
6044
6098
|
};
|
|
6045
6099
|
Container.displayName = "Container";
|
|
6100
|
+
var pulseClass = "almadar-shimmer animate-shimmer rounded-container";
|
|
6101
|
+
function SkeletonLine({ className }) {
|
|
6102
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn(pulseClass, "h-4", className) });
|
|
6103
|
+
}
|
|
6104
|
+
function SkeletonBlock({ className }) {
|
|
6105
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn(pulseClass, className) });
|
|
6106
|
+
}
|
|
6107
|
+
function HeaderSkeleton({ className }) {
|
|
6108
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: cn("items-center justify-between px-6 py-5", className), children: [
|
|
6109
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "flex-1", children: [
|
|
6110
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-7 w-48" }),
|
|
6111
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-64" })
|
|
6112
|
+
] }),
|
|
6113
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", children: [
|
|
6114
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-24 rounded-interactive" }),
|
|
6115
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-32 rounded-interactive" })
|
|
6116
|
+
] })
|
|
6117
|
+
] });
|
|
6118
|
+
}
|
|
6119
|
+
function TableSkeleton({ rows = 5, columns = 4, className }) {
|
|
6120
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("border border-border rounded-container overflow-hidden", className), children: [
|
|
6121
|
+
/* @__PURE__ */ jsxRuntime.jsx(HStack, { className: "px-4 py-3 bg-muted/30 border-b border-border", children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-4 flex-1 mx-2" }, i)) }),
|
|
6122
|
+
Array.from({ length: rows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6123
|
+
HStack,
|
|
6124
|
+
{
|
|
6125
|
+
className: cn(
|
|
6126
|
+
"px-4 py-3",
|
|
6127
|
+
rowIdx < rows - 1 && "border-b border-border"
|
|
6128
|
+
),
|
|
6129
|
+
children: Array.from({ length: columns }).map((_2, colIdx) => /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "flex-1 mx-2" }, colIdx))
|
|
6130
|
+
},
|
|
6131
|
+
rowIdx
|
|
6132
|
+
))
|
|
6133
|
+
] });
|
|
6134
|
+
}
|
|
6135
|
+
function FormSkeleton({ fields = 4, className }) {
|
|
6136
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "lg", className: cn("p-6", className), children: [
|
|
6137
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-40" }),
|
|
6138
|
+
Array.from({ length: fields }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", children: [
|
|
6139
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-4 w-24" }),
|
|
6140
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-full rounded-interactive" })
|
|
6141
|
+
] }, i)),
|
|
6142
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", className: "justify-end pt-2", children: [
|
|
6143
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-20 rounded-interactive" }),
|
|
6144
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-24 rounded-interactive" })
|
|
6145
|
+
] })
|
|
6146
|
+
] });
|
|
6147
|
+
}
|
|
6148
|
+
function CardSkeleton({ className }) {
|
|
6149
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6150
|
+
VStack,
|
|
6151
|
+
{
|
|
6152
|
+
gap: "md",
|
|
6153
|
+
className: cn(
|
|
6154
|
+
"p-5 border border-border rounded-container",
|
|
6155
|
+
className
|
|
6156
|
+
),
|
|
6157
|
+
children: [
|
|
6158
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: "items-center", gap: "md", children: [
|
|
6159
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-10 rounded-full" }),
|
|
6160
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1", children: [
|
|
6161
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-5 w-32" }),
|
|
6162
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-48" })
|
|
6163
|
+
] })
|
|
6164
|
+
] }),
|
|
6165
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-full" }),
|
|
6166
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-3/4" }),
|
|
6167
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "pt-2", children: [
|
|
6168
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-16 rounded-full" }),
|
|
6169
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-20 rounded-full" })
|
|
6170
|
+
] })
|
|
6171
|
+
]
|
|
6172
|
+
}
|
|
6173
|
+
);
|
|
6174
|
+
}
|
|
6175
|
+
function TextSkeleton({ rows = 3, className }) {
|
|
6176
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "sm", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6177
|
+
SkeletonLine,
|
|
6178
|
+
{
|
|
6179
|
+
className: i === rows - 1 ? "w-2/3" : "w-full"
|
|
6180
|
+
},
|
|
6181
|
+
i
|
|
6182
|
+
)) });
|
|
6183
|
+
}
|
|
6184
|
+
function ListSkeleton({ rows = 5, className }) {
|
|
6185
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: cn("border border-border rounded-container overflow-hidden", className), children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", className: cn("items-center px-4 py-3", i < rows - 1 && "border-b border-border"), children: [
|
|
6186
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-10 w-10 rounded-full shrink-0" }),
|
|
6187
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
6188
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-4 w-1/3" }),
|
|
6189
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-2/3 h-3" })
|
|
6190
|
+
] }),
|
|
6191
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-16 rounded-full" })
|
|
6192
|
+
] }, i)) });
|
|
6193
|
+
}
|
|
6194
|
+
function GridSkeleton({ rows = 6, className }) {
|
|
6195
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "260px", gap: "md", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(CardSkeleton, {}, i)) });
|
|
6196
|
+
}
|
|
6197
|
+
function StatsSkeleton({ columns = 4, className }) {
|
|
6198
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "180px", gap: "md", className, children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4 border border-border rounded-container", children: [
|
|
6199
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-1/2 h-3" }),
|
|
6200
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-7 w-2/3" })
|
|
6201
|
+
] }, i)) });
|
|
6202
|
+
}
|
|
6203
|
+
function DetailSkeleton({ rows = 6, className }) {
|
|
6204
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "lg", className: cn("p-6 border border-border rounded-container", className), children: [
|
|
6205
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: "items-start justify-between", gap: "md", children: [
|
|
6206
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
6207
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-8 w-56" }),
|
|
6208
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-6 w-20 rounded-full" })
|
|
6209
|
+
] }),
|
|
6210
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", children: [
|
|
6211
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-24 rounded-interactive" }),
|
|
6212
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-9 w-9 rounded-interactive" })
|
|
6213
|
+
] })
|
|
6214
|
+
] }),
|
|
6215
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", children: [
|
|
6216
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" }),
|
|
6217
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" }),
|
|
6218
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" })
|
|
6219
|
+
] }),
|
|
6220
|
+
/* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "200px", maxCols: 3, gap: "md", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
|
|
6221
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-1/3 h-3" }),
|
|
6222
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-5 w-2/3" })
|
|
6223
|
+
] }, i)) }),
|
|
6224
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextSkeleton, { rows: 3 })
|
|
6225
|
+
] });
|
|
6226
|
+
}
|
|
6227
|
+
function Skeleton({
|
|
6228
|
+
variant = "text",
|
|
6229
|
+
spec,
|
|
6230
|
+
rows,
|
|
6231
|
+
columns,
|
|
6232
|
+
fields,
|
|
6233
|
+
className,
|
|
6234
|
+
...rest
|
|
6235
|
+
}) {
|
|
6236
|
+
const { t } = useTranslate();
|
|
6237
|
+
const shape = spec !== void 0 ? shapeOfSpec(spec) : { variant, rows, columns, fields };
|
|
6238
|
+
if (shape === null) return null;
|
|
6239
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6240
|
+
Box,
|
|
6241
|
+
{
|
|
6242
|
+
...domPassthrough(rest),
|
|
6243
|
+
role: "status",
|
|
6244
|
+
"aria-busy": "true",
|
|
6245
|
+
"aria-label": rest["aria-label"] ?? t("common.loading"),
|
|
6246
|
+
"data-skeleton": shape.variant,
|
|
6247
|
+
...{ [core.LOADING_STATE_MARKER]: "" },
|
|
6248
|
+
className: "w-full",
|
|
6249
|
+
children: renderVariant(shape.variant, shape.rows, shape.columns, shape.fields, className)
|
|
6250
|
+
}
|
|
6251
|
+
);
|
|
6252
|
+
}
|
|
6253
|
+
function shapeOfSpec(spec) {
|
|
6254
|
+
if (spec === "none") return null;
|
|
6255
|
+
return typeof spec === "string" ? { variant: spec } : spec;
|
|
6256
|
+
}
|
|
6257
|
+
function renderVariant(variant, rows, columns, fields, className) {
|
|
6258
|
+
switch (variant) {
|
|
6259
|
+
case "header":
|
|
6260
|
+
return /* @__PURE__ */ jsxRuntime.jsx(HeaderSkeleton, { className });
|
|
6261
|
+
case "table":
|
|
6262
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableSkeleton, { rows, columns, className });
|
|
6263
|
+
case "list":
|
|
6264
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ListSkeleton, { rows, className });
|
|
6265
|
+
case "grid":
|
|
6266
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GridSkeleton, { rows, className });
|
|
6267
|
+
case "detail":
|
|
6268
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DetailSkeleton, { rows, className });
|
|
6269
|
+
case "stats":
|
|
6270
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StatsSkeleton, { columns, className });
|
|
6271
|
+
case "form":
|
|
6272
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormSkeleton, { fields, className });
|
|
6273
|
+
case "card":
|
|
6274
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CardSkeleton, { className });
|
|
6275
|
+
case "text":
|
|
6276
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextSkeleton, { rows, className });
|
|
6277
|
+
}
|
|
6278
|
+
}
|
|
6279
|
+
Skeleton.displayName = "Skeleton";
|
|
6046
6280
|
var COLOR_VAR = {
|
|
6047
6281
|
primary: "var(--color-primary)",
|
|
6048
6282
|
success: "var(--color-success)",
|
|
@@ -6102,7 +6336,7 @@ var Sparkline = ({
|
|
|
6102
6336
|
Sparkline.displayName = "Sparkline";
|
|
6103
6337
|
var lookStyles2 = {
|
|
6104
6338
|
elevated: "",
|
|
6105
|
-
flat: "shadow-none
|
|
6339
|
+
flat: "shadow-none",
|
|
6106
6340
|
"progress-backed": "",
|
|
6107
6341
|
gauge: "",
|
|
6108
6342
|
sparkline: ""
|
|
@@ -6142,12 +6376,15 @@ var StatDisplay = ({
|
|
|
6142
6376
|
look = "elevated",
|
|
6143
6377
|
className,
|
|
6144
6378
|
isLoading = false,
|
|
6379
|
+
skeleton = { variant: "stats", columns: 1 },
|
|
6145
6380
|
error = null,
|
|
6381
|
+
surface = "auto",
|
|
6146
6382
|
...rest
|
|
6147
6383
|
}) => {
|
|
6384
|
+
const contentSurface = useContentSurface(surface);
|
|
6148
6385
|
const eventBus = useEventBus();
|
|
6149
6386
|
const fmt = useFormatContext();
|
|
6150
|
-
const handleClick =
|
|
6387
|
+
const handleClick = React17.useCallback(() => {
|
|
6151
6388
|
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { metricLabel: label });
|
|
6152
6389
|
}, [clickEvent, eventBus, label]);
|
|
6153
6390
|
const ResolvedIcon = typeof iconProp === "string" ? resolveIcon(iconProp) : typeof iconProp === "function" ? iconProp : null;
|
|
@@ -6165,13 +6402,12 @@ var StatDisplay = ({
|
|
|
6165
6402
|
const trendSuffix = trendFormat === "percent" ? "%" : "";
|
|
6166
6403
|
const trendLabel = showTrend ? `${trendUp ? "\u2191" : "\u2193"} ${trendMagnitude}${trendSuffix}` : "";
|
|
6167
6404
|
if (error) {
|
|
6168
|
-
return
|
|
6405
|
+
return contentSurface.provide(
|
|
6406
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { ...domPassthrough(rest), className: cn(contentSurface.className, "rounded-container", padSizes[size], className), children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "error", children: error.message }) })
|
|
6407
|
+
);
|
|
6169
6408
|
}
|
|
6170
6409
|
if (isLoading) {
|
|
6171
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6172
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-3 bg-muted rounded w-16" }),
|
|
6173
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-6 bg-muted rounded w-12" })
|
|
6174
|
-
] }) });
|
|
6410
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { spec: skeleton, className });
|
|
6175
6411
|
}
|
|
6176
6412
|
if (compact) {
|
|
6177
6413
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6191,40 +6427,42 @@ var StatDisplay = ({
|
|
|
6191
6427
|
}
|
|
6192
6428
|
);
|
|
6193
6429
|
}
|
|
6194
|
-
return
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6202
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6203
|
-
|
|
6204
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6205
|
-
|
|
6206
|
-
|
|
6430
|
+
return contentSurface.provide(
|
|
6431
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6432
|
+
Box,
|
|
6433
|
+
{
|
|
6434
|
+
...domPassthrough(rest),
|
|
6435
|
+
className: cn(contentSurface.className, "rounded-container", padSizes[size], lookStyles2[look], clickEvent && "cursor-pointer hover:shadow-elevation-dialog transition-shadow", className),
|
|
6436
|
+
...pressableProps(clickEvent ? handleClick : void 0),
|
|
6437
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "start", justify: "between", children: [
|
|
6438
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "space-y-1 flex-1", children: [
|
|
6439
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "overline", color: "secondary", children: label }),
|
|
6440
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "end", children: [
|
|
6441
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h4", className: cn("", valueSizes[size], variantColor[variant]), children: displayValue }),
|
|
6442
|
+
showTrend && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6443
|
+
Typography,
|
|
6444
|
+
{
|
|
6445
|
+
variant: "caption",
|
|
6446
|
+
className: cn("font-semibold pb-1", trendIsGood ? "text-success" : "text-error"),
|
|
6447
|
+
children: trendLabel
|
|
6448
|
+
}
|
|
6449
|
+
)
|
|
6450
|
+
] }),
|
|
6451
|
+
showTarget && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "mt-2 h-1.5 w-full bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6452
|
+
Box,
|
|
6207
6453
|
{
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
children: trendLabel
|
|
6454
|
+
className: cn("h-full rounded-full transition-all", `bg-${variant === "default" ? "primary" : variant}`),
|
|
6455
|
+
style: { width: `${targetPct}%` }
|
|
6211
6456
|
}
|
|
6212
|
-
)
|
|
6457
|
+
) })
|
|
6213
6458
|
] }),
|
|
6214
|
-
|
|
6215
|
-
Box,
|
|
6216
|
-
{
|
|
6217
|
-
|
|
6218
|
-
style: { width: `${targetPct}%` }
|
|
6219
|
-
}
|
|
6220
|
-
) })
|
|
6221
|
-
] }),
|
|
6222
|
-
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", align: "end", children: [
|
|
6223
|
-
ResolvedIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("p-3 rounded-container", iconBg), children: /* @__PURE__ */ jsxRuntime.jsx(ResolvedIcon, { className: cn(iconSizes[size], iconColor) }) }),
|
|
6224
|
-
sparklineData && sparklineData.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(Sparkline, { data: sparklineData, color: "auto" })
|
|
6459
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", align: "end", children: [
|
|
6460
|
+
ResolvedIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("p-3 rounded-container", iconBg), children: /* @__PURE__ */ jsxRuntime.jsx(ResolvedIcon, { className: cn(iconSizes[size], iconColor) }) }),
|
|
6461
|
+
sparklineData && sparklineData.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(Sparkline, { data: sparklineData, color: "auto" })
|
|
6462
|
+
] })
|
|
6225
6463
|
] })
|
|
6226
|
-
|
|
6227
|
-
|
|
6464
|
+
}
|
|
6465
|
+
)
|
|
6228
6466
|
);
|
|
6229
6467
|
};
|
|
6230
6468
|
StatDisplay.displayName = "StatDisplay";
|
|
@@ -6300,14 +6538,14 @@ var AnimatedCounter = ({
|
|
|
6300
6538
|
...rest
|
|
6301
6539
|
}) => {
|
|
6302
6540
|
const fmt = useFormatContext();
|
|
6303
|
-
const ref =
|
|
6541
|
+
const ref = React17.useRef(null);
|
|
6304
6542
|
const parsed = parseValue(value);
|
|
6305
6543
|
const target = parsed.num ?? 0;
|
|
6306
|
-
const [visible, setVisible] =
|
|
6307
|
-
const [display, setDisplay] =
|
|
6308
|
-
const shownRef =
|
|
6309
|
-
const frameRef =
|
|
6310
|
-
|
|
6544
|
+
const [visible, setVisible] = React17.useState(() => typeof IntersectionObserver === "undefined");
|
|
6545
|
+
const [display, setDisplay] = React17.useState(() => typeof IntersectionObserver === "undefined" ? target : 0);
|
|
6546
|
+
const shownRef = React17.useRef(display);
|
|
6547
|
+
const frameRef = React17.useRef(null);
|
|
6548
|
+
React17.useEffect(() => {
|
|
6311
6549
|
if (visible) return;
|
|
6312
6550
|
const el = ref.current;
|
|
6313
6551
|
if (!el || typeof IntersectionObserver === "undefined") {
|
|
@@ -6326,7 +6564,7 @@ var AnimatedCounter = ({
|
|
|
6326
6564
|
observer2.observe(el);
|
|
6327
6565
|
return () => observer2.disconnect();
|
|
6328
6566
|
}, [visible]);
|
|
6329
|
-
|
|
6567
|
+
React17.useEffect(() => {
|
|
6330
6568
|
if (!visible) return;
|
|
6331
6569
|
const from = shownRef.current;
|
|
6332
6570
|
if (from === target || prefersReducedMotion() || typeof requestAnimationFrame === "undefined") {
|
|
@@ -6375,7 +6613,7 @@ var animatedStyles = {
|
|
|
6375
6613
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6376
6614
|
"none": {}
|
|
6377
6615
|
};
|
|
6378
|
-
var AnimatedReveal =
|
|
6616
|
+
var AnimatedReveal = React17__namespace.default.forwardRef(
|
|
6379
6617
|
({
|
|
6380
6618
|
trigger = "scroll",
|
|
6381
6619
|
animation = "fade-up",
|
|
@@ -6390,10 +6628,10 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
|
|
|
6390
6628
|
style,
|
|
6391
6629
|
...props
|
|
6392
6630
|
}, forwardedRef) => {
|
|
6393
|
-
const [isAnimated, setIsAnimated] =
|
|
6394
|
-
const internalRef =
|
|
6395
|
-
const hasAnimated =
|
|
6396
|
-
const setRef =
|
|
6631
|
+
const [isAnimated, setIsAnimated] = React17.useState(false);
|
|
6632
|
+
const internalRef = React17.useRef(null);
|
|
6633
|
+
const hasAnimated = React17.useRef(false);
|
|
6634
|
+
const setRef = React17.useCallback(
|
|
6397
6635
|
(node) => {
|
|
6398
6636
|
internalRef.current = node;
|
|
6399
6637
|
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
@@ -6401,7 +6639,7 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
|
|
|
6401
6639
|
},
|
|
6402
6640
|
[forwardedRef]
|
|
6403
6641
|
);
|
|
6404
|
-
|
|
6642
|
+
React17.useEffect(() => {
|
|
6405
6643
|
if (trigger !== "scroll") return;
|
|
6406
6644
|
const el = internalRef.current;
|
|
6407
6645
|
if (!el) return;
|
|
@@ -6427,7 +6665,7 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
|
|
|
6427
6665
|
setIsAnimated(false);
|
|
6428
6666
|
}
|
|
6429
6667
|
} : void 0;
|
|
6430
|
-
|
|
6668
|
+
React17.useEffect(() => {
|
|
6431
6669
|
if (trigger === "manual" && manualAnimate !== void 0) {
|
|
6432
6670
|
setIsAnimated(manualAnimate);
|
|
6433
6671
|
}
|
|
@@ -6457,9 +6695,9 @@ var AnimatedReveal = React16__namespace.default.forwardRef(
|
|
|
6457
6695
|
);
|
|
6458
6696
|
AnimatedReveal.displayName = "AnimatedReveal";
|
|
6459
6697
|
function useFetchedSvg(src) {
|
|
6460
|
-
const [svg, setSvg] =
|
|
6461
|
-
const cache =
|
|
6462
|
-
|
|
6698
|
+
const [svg, setSvg] = React17.useState(null);
|
|
6699
|
+
const cache = React17.useRef({});
|
|
6700
|
+
React17.useEffect(() => {
|
|
6463
6701
|
if (!src) {
|
|
6464
6702
|
setSvg(null);
|
|
6465
6703
|
return;
|
|
@@ -6528,7 +6766,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
|
6528
6766
|
el.style.opacity = animate ? "1" : "0";
|
|
6529
6767
|
});
|
|
6530
6768
|
}
|
|
6531
|
-
var AnimatedGraphic =
|
|
6769
|
+
var AnimatedGraphic = React17__namespace.default.forwardRef(
|
|
6532
6770
|
({
|
|
6533
6771
|
src,
|
|
6534
6772
|
svgContent,
|
|
@@ -6547,11 +6785,11 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
|
|
|
6547
6785
|
children,
|
|
6548
6786
|
...props
|
|
6549
6787
|
}, ref) => {
|
|
6550
|
-
const containerRef =
|
|
6788
|
+
const containerRef = React17.useRef(null);
|
|
6551
6789
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6552
6790
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6553
|
-
const prevAnimateRef =
|
|
6554
|
-
const setRef =
|
|
6791
|
+
const prevAnimateRef = React17.useRef(animate);
|
|
6792
|
+
const setRef = React17__namespace.default.useCallback(
|
|
6555
6793
|
(node) => {
|
|
6556
6794
|
containerRef.current = node;
|
|
6557
6795
|
if (typeof ref === "function") ref(node);
|
|
@@ -6559,7 +6797,7 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
|
|
|
6559
6797
|
},
|
|
6560
6798
|
[ref]
|
|
6561
6799
|
);
|
|
6562
|
-
|
|
6800
|
+
React17.useEffect(() => {
|
|
6563
6801
|
const el = containerRef.current;
|
|
6564
6802
|
if (!el || !strokeColor) return;
|
|
6565
6803
|
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
@@ -6567,7 +6805,7 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
|
|
|
6567
6805
|
p.style.stroke = strokeColor;
|
|
6568
6806
|
});
|
|
6569
6807
|
}, [resolvedSvg, strokeColor]);
|
|
6570
|
-
|
|
6808
|
+
React17.useEffect(() => {
|
|
6571
6809
|
const el = containerRef.current;
|
|
6572
6810
|
if (!el || !resolvedSvg) return;
|
|
6573
6811
|
if (animation === "draw" || animation === "fill") {
|
|
@@ -6592,7 +6830,7 @@ var AnimatedGraphic = React16__namespace.default.forwardRef(
|
|
|
6592
6830
|
});
|
|
6593
6831
|
}
|
|
6594
6832
|
}, [resolvedSvg, animation]);
|
|
6595
|
-
|
|
6833
|
+
React17.useEffect(() => {
|
|
6596
6834
|
const el = containerRef.current;
|
|
6597
6835
|
if (!el) return;
|
|
6598
6836
|
const id = requestAnimationFrame(() => {
|
|
@@ -7393,7 +7631,7 @@ var GeometricPattern = ({
|
|
|
7393
7631
|
children,
|
|
7394
7632
|
className
|
|
7395
7633
|
}) => {
|
|
7396
|
-
const reactId =
|
|
7634
|
+
const reactId = React17.useId();
|
|
7397
7635
|
const patternId = `gp${reactId.replace(/:/g, "")}`;
|
|
7398
7636
|
const size = 60 * scale2;
|
|
7399
7637
|
const stripHeight = 40 * scale2;
|
|
@@ -7628,7 +7866,7 @@ var EdgeDecoration = ({
|
|
|
7628
7866
|
width = 15,
|
|
7629
7867
|
className
|
|
7630
7868
|
}) => {
|
|
7631
|
-
const id =
|
|
7869
|
+
const id = React17.useId();
|
|
7632
7870
|
const Variant = VARIANT_MAP2[variant];
|
|
7633
7871
|
const resolvedColor = color in colorTokenVars2 ? colorTokenVars2[color] : color;
|
|
7634
7872
|
const sides = side === "both" ? ["left", "right"] : [side];
|