@almadar/ui 4.45.0 → 4.46.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 +79 -33
- package/dist/avl/index.js +79 -33
- package/dist/components/atoms/index.d.ts +1 -1
- package/dist/components/index.cjs +82 -69
- package/dist/components/index.js +82 -69
- package/dist/components/molecules/game/ResourceBar.d.ts +1 -1
- package/dist/components/organisms/layout/{MasterDetail.d.ts → MasterDetailLayout.d.ts} +3 -3
- package/dist/components/organisms/layout/index.d.ts +1 -1
- package/dist/providers/index.cjs +73 -27
- package/dist/providers/index.js +73 -27
- package/dist/runtime/index.cjs +73 -27
- package/dist/runtime/index.js +73 -27
- package/package.json +1 -1
- /package/dist/components/atoms/{StatCard.d.ts → MarketingStatCard.d.ts} +0 -0
package/dist/runtime/index.js
CHANGED
|
@@ -6386,12 +6386,15 @@ function ControlButton({
|
|
|
6386
6386
|
sizeMap3[size] ?? sizeMap3.md,
|
|
6387
6387
|
shapeMap[shape] ?? shapeMap.circle,
|
|
6388
6388
|
variantMap[variant] ?? variantMap.secondary,
|
|
6389
|
-
actualPressed && "scale-95 brightness-110 border-
|
|
6389
|
+
actualPressed && "scale-95 brightness-110 border-foreground",
|
|
6390
6390
|
disabled && "opacity-50 cursor-not-allowed",
|
|
6391
6391
|
className
|
|
6392
6392
|
),
|
|
6393
6393
|
children: [
|
|
6394
|
-
icon && /* @__PURE__ */ jsx("span", { className: "text-2xl", children: icon
|
|
6394
|
+
icon && /* @__PURE__ */ jsx("span", { className: "text-2xl", children: typeof icon === "string" ? (() => {
|
|
6395
|
+
const I = resolveIcon(icon);
|
|
6396
|
+
return I ? /* @__PURE__ */ jsx(I, { className: "w-6 h-6" }) : null;
|
|
6397
|
+
})() : icon }),
|
|
6395
6398
|
label && !icon && /* @__PURE__ */ jsx("span", { children: label })
|
|
6396
6399
|
]
|
|
6397
6400
|
}
|
|
@@ -6403,6 +6406,7 @@ var init_ControlButton = __esm({
|
|
|
6403
6406
|
"use client";
|
|
6404
6407
|
init_cn();
|
|
6405
6408
|
init_useEventBus();
|
|
6409
|
+
init_Icon();
|
|
6406
6410
|
sizeMap3 = {
|
|
6407
6411
|
sm: "w-10 h-10 text-sm",
|
|
6408
6412
|
md: "w-14 h-14 text-base",
|
|
@@ -6415,9 +6419,9 @@ var init_ControlButton = __esm({
|
|
|
6415
6419
|
square: "rounded-md"
|
|
6416
6420
|
};
|
|
6417
6421
|
variantMap = {
|
|
6418
|
-
primary: "bg-
|
|
6419
|
-
secondary: "bg-
|
|
6420
|
-
ghost: "bg-transparent text-
|
|
6422
|
+
primary: "bg-primary text-primary-foreground border-primary hover:bg-primary-hover",
|
|
6423
|
+
secondary: "bg-secondary text-secondary-foreground border-border hover:bg-secondary-hover",
|
|
6424
|
+
ghost: "bg-transparent text-foreground border-border hover:bg-muted"
|
|
6421
6425
|
};
|
|
6422
6426
|
ControlButton.displayName = "ControlButton";
|
|
6423
6427
|
}
|
|
@@ -7145,8 +7149,8 @@ function ChoiceButton({
|
|
|
7145
7149
|
className: cn(
|
|
7146
7150
|
"w-full text-left px-4 py-2.5 rounded-md border transition-all duration-150",
|
|
7147
7151
|
"flex items-center gap-2",
|
|
7148
|
-
selected ? "bg-
|
|
7149
|
-
disabled && "opacity-40 cursor-not-allowed hover:bg-
|
|
7152
|
+
selected ? "bg-accent/15 border-accent text-foreground" : "bg-muted/40 border-border text-foreground hover:bg-muted hover:border-border",
|
|
7153
|
+
disabled && "opacity-40 cursor-not-allowed hover:bg-muted/40 hover:border-border",
|
|
7150
7154
|
className
|
|
7151
7155
|
),
|
|
7152
7156
|
children: [
|
|
@@ -7155,7 +7159,7 @@ function ChoiceButton({
|
|
|
7155
7159
|
{
|
|
7156
7160
|
className: cn(
|
|
7157
7161
|
"flex-shrink-0 font-mono font-bold text-sm",
|
|
7158
|
-
selected ? "text-
|
|
7162
|
+
selected ? "text-accent" : "text-muted-foreground"
|
|
7159
7163
|
),
|
|
7160
7164
|
children: [
|
|
7161
7165
|
index,
|
|
@@ -7196,7 +7200,7 @@ function ActionButton({
|
|
|
7196
7200
|
disabled: isDisabled,
|
|
7197
7201
|
onClick,
|
|
7198
7202
|
className: cn(
|
|
7199
|
-
"relative inline-flex items-center gap-1.5 rounded-md border font-medium
|
|
7203
|
+
"relative inline-flex items-center gap-1.5 rounded-md border font-medium overflow-hidden transition-colors duration-150",
|
|
7200
7204
|
sizes.button,
|
|
7201
7205
|
variantStyles8[variant],
|
|
7202
7206
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -7206,7 +7210,7 @@ function ActionButton({
|
|
|
7206
7210
|
onCooldown && /* @__PURE__ */ jsx(
|
|
7207
7211
|
"div",
|
|
7208
7212
|
{
|
|
7209
|
-
className: "absolute inset-0 bg-
|
|
7213
|
+
className: "absolute inset-0 bg-foreground/40 pointer-events-none",
|
|
7210
7214
|
style: {
|
|
7211
7215
|
clipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
7212
7216
|
WebkitClipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
@@ -7214,13 +7218,16 @@ function ActionButton({
|
|
|
7214
7218
|
}
|
|
7215
7219
|
}
|
|
7216
7220
|
),
|
|
7217
|
-
icon && /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: icon
|
|
7221
|
+
icon && /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
|
|
7222
|
+
const I = resolveIcon(icon);
|
|
7223
|
+
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : null;
|
|
7224
|
+
})() : icon }),
|
|
7218
7225
|
/* @__PURE__ */ jsx("span", { className: "relative z-10", children: label }),
|
|
7219
7226
|
hotkey && /* @__PURE__ */ jsx(
|
|
7220
7227
|
"span",
|
|
7221
7228
|
{
|
|
7222
7229
|
className: cn(
|
|
7223
|
-
"absolute top-0.5 right-0.5 bg-
|
|
7230
|
+
"absolute top-0.5 right-0.5 bg-foreground/30 text-primary-foreground rounded font-mono leading-tight",
|
|
7224
7231
|
sizes.hotkey
|
|
7225
7232
|
),
|
|
7226
7233
|
children: hotkey
|
|
@@ -7234,15 +7241,16 @@ var sizeMap13, variantStyles8;
|
|
|
7234
7241
|
var init_ActionButton = __esm({
|
|
7235
7242
|
"components/atoms/game/ActionButton.tsx"() {
|
|
7236
7243
|
init_cn();
|
|
7244
|
+
init_Icon();
|
|
7237
7245
|
sizeMap13 = {
|
|
7238
7246
|
sm: { button: "px-3 py-1.5 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
7239
7247
|
md: { button: "px-4 py-2 text-sm", hotkey: "text-[10px] px-1.5", icon: "text-sm" },
|
|
7240
7248
|
lg: { button: "px-5 py-2.5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
7241
7249
|
};
|
|
7242
7250
|
variantStyles8 = {
|
|
7243
|
-
primary: "bg-
|
|
7244
|
-
secondary: "bg-
|
|
7245
|
-
danger: "bg-
|
|
7251
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary-hover border-primary",
|
|
7252
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-hover border-border",
|
|
7253
|
+
danger: "bg-error text-error-foreground hover:bg-error/90 border-error"
|
|
7246
7254
|
};
|
|
7247
7255
|
ActionButton.displayName = "ActionButton";
|
|
7248
7256
|
}
|
|
@@ -21288,7 +21296,7 @@ function DataGrid({
|
|
|
21288
21296
|
onClick: handleActionClick(action, itemData),
|
|
21289
21297
|
"data-testid": `action-${action.event}`,
|
|
21290
21298
|
"data-row-id": String(itemData.id),
|
|
21291
|
-
className: "text-error hover:bg-error/10 px-2",
|
|
21299
|
+
className: "text-error hover:text-error hover:bg-error/10 px-2",
|
|
21292
21300
|
children: [
|
|
21293
21301
|
action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs" }),
|
|
21294
21302
|
action.label
|
|
@@ -23817,7 +23825,7 @@ function StatBadge({
|
|
|
23817
23825
|
const I = resolveIcon(icon);
|
|
23818
23826
|
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : icon;
|
|
23819
23827
|
})() : icon }),
|
|
23820
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
23828
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
23821
23829
|
format === "hearts" && max && /* @__PURE__ */ jsx(
|
|
23822
23830
|
HealthBar,
|
|
23823
23831
|
{
|
|
@@ -23844,7 +23852,7 @@ function StatBadge({
|
|
|
23844
23852
|
animated: true
|
|
23845
23853
|
}
|
|
23846
23854
|
),
|
|
23847
|
-
format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-
|
|
23855
|
+
format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-foreground", children: value })
|
|
23848
23856
|
]
|
|
23849
23857
|
}
|
|
23850
23858
|
);
|
|
@@ -23862,11 +23870,11 @@ var init_StatBadge = __esm({
|
|
|
23862
23870
|
lg: "text-base px-4 py-2"
|
|
23863
23871
|
};
|
|
23864
23872
|
variantMap2 = {
|
|
23865
|
-
default: "bg-
|
|
23866
|
-
primary: "bg-
|
|
23867
|
-
success: "bg-
|
|
23868
|
-
warning: "bg-
|
|
23869
|
-
danger: "bg-
|
|
23873
|
+
default: "bg-card/80 border-border text-foreground",
|
|
23874
|
+
primary: "bg-primary/15 border-primary/40 text-foreground",
|
|
23875
|
+
success: "bg-success/15 border-success/40 text-foreground",
|
|
23876
|
+
warning: "bg-warning/15 border-warning/40 text-foreground",
|
|
23877
|
+
danger: "bg-error/15 border-error/40 text-foreground"
|
|
23870
23878
|
};
|
|
23871
23879
|
StatBadge.displayName = "StatBadge";
|
|
23872
23880
|
}
|
|
@@ -36301,9 +36309,45 @@ var init_List = __esm({
|
|
|
36301
36309
|
List3.displayName = "List";
|
|
36302
36310
|
}
|
|
36303
36311
|
});
|
|
36304
|
-
|
|
36312
|
+
function MasterDetail({
|
|
36313
|
+
entity,
|
|
36314
|
+
masterFields,
|
|
36315
|
+
detailFields: _detailFields,
|
|
36316
|
+
// Captured but not used here - detail handled separately
|
|
36317
|
+
loading: externalLoading,
|
|
36318
|
+
isLoading: externalIsLoading,
|
|
36319
|
+
error: externalError,
|
|
36320
|
+
className,
|
|
36321
|
+
...rest
|
|
36322
|
+
}) {
|
|
36323
|
+
const loading = externalLoading ?? false;
|
|
36324
|
+
const isLoading = externalIsLoading ?? false;
|
|
36325
|
+
const error = externalError ?? null;
|
|
36326
|
+
return /* @__PURE__ */ jsx(
|
|
36327
|
+
DataTable,
|
|
36328
|
+
{
|
|
36329
|
+
fields: masterFields,
|
|
36330
|
+
columns: masterFields,
|
|
36331
|
+
entity,
|
|
36332
|
+
isLoading: loading || isLoading,
|
|
36333
|
+
error,
|
|
36334
|
+
className,
|
|
36335
|
+
emptyTitle: "No items found",
|
|
36336
|
+
emptyDescription: "Create your first item to get started.",
|
|
36337
|
+
...rest
|
|
36338
|
+
}
|
|
36339
|
+
);
|
|
36340
|
+
}
|
|
36305
36341
|
var init_MasterDetail = __esm({
|
|
36306
|
-
"components/organisms/
|
|
36342
|
+
"components/organisms/MasterDetail.tsx"() {
|
|
36343
|
+
"use client";
|
|
36344
|
+
init_DataTable();
|
|
36345
|
+
MasterDetail.displayName = "MasterDetail";
|
|
36346
|
+
}
|
|
36347
|
+
});
|
|
36348
|
+
var DefaultEmptyDetail, MasterDetailLayout;
|
|
36349
|
+
var init_MasterDetailLayout = __esm({
|
|
36350
|
+
"components/organisms/layout/MasterDetailLayout.tsx"() {
|
|
36307
36351
|
init_cn();
|
|
36308
36352
|
init_Typography();
|
|
36309
36353
|
DefaultEmptyDetail = () => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
@@ -36314,7 +36358,7 @@ var init_MasterDetail = __esm({
|
|
|
36314
36358
|
children: "Select an item to view details"
|
|
36315
36359
|
}
|
|
36316
36360
|
) });
|
|
36317
|
-
|
|
36361
|
+
MasterDetailLayout = ({
|
|
36318
36362
|
master,
|
|
36319
36363
|
detail,
|
|
36320
36364
|
emptyDetail,
|
|
@@ -36349,7 +36393,7 @@ var init_MasterDetail = __esm({
|
|
|
36349
36393
|
}
|
|
36350
36394
|
);
|
|
36351
36395
|
};
|
|
36352
|
-
|
|
36396
|
+
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
36353
36397
|
}
|
|
36354
36398
|
});
|
|
36355
36399
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
@@ -43104,6 +43148,7 @@ var init_component_registry_generated = __esm({
|
|
|
43104
43148
|
init_LoadingState();
|
|
43105
43149
|
init_MarkdownContent();
|
|
43106
43150
|
init_MasterDetail();
|
|
43151
|
+
init_MasterDetailLayout();
|
|
43107
43152
|
init_MatrixQuestion();
|
|
43108
43153
|
init_MediaGallery();
|
|
43109
43154
|
init_Meter();
|
|
@@ -43398,6 +43443,7 @@ var init_component_registry_generated = __esm({
|
|
|
43398
43443
|
"MapViewPattern": MapViewPattern,
|
|
43399
43444
|
"MarkdownContent": MarkdownContent,
|
|
43400
43445
|
"MasterDetail": MasterDetail,
|
|
43446
|
+
"MasterDetailLayout": MasterDetailLayout,
|
|
43401
43447
|
"MatrixQuestion": MatrixQuestion,
|
|
43402
43448
|
"MediaGallery": MediaGallery,
|
|
43403
43449
|
"Menu": MenuPattern,
|
package/package.json
CHANGED
|
File without changes
|