@almadar/ui 3.8.2 → 3.8.3
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 +70 -92
- package/dist/avl/index.js +70 -92
- package/dist/components/index.cjs +70 -92
- package/dist/components/index.js +70 -92
- package/dist/providers/index.cjs +70 -92
- package/dist/providers/index.js +70 -92
- package/dist/runtime/index.cjs +70 -92
- package/dist/runtime/index.js +70 -92
- package/package.json +1 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -18914,10 +18914,7 @@ var init_DataList = __esm({
|
|
|
18914
18914
|
HStack,
|
|
18915
18915
|
{
|
|
18916
18916
|
gap: "xs",
|
|
18917
|
-
className:
|
|
18918
|
-
"flex-shrink-0 transition-opacity duration-200",
|
|
18919
|
-
"opacity-0 group-hover:opacity-100"
|
|
18920
|
-
),
|
|
18917
|
+
className: "flex-shrink-0",
|
|
18921
18918
|
children: itemActions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18922
18919
|
Button,
|
|
18923
18920
|
{
|
|
@@ -19007,33 +19004,23 @@ var init_DataList = __esm({
|
|
|
19007
19004
|
] }, field.name);
|
|
19008
19005
|
})
|
|
19009
19006
|
] }),
|
|
19010
|
-
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19011
|
-
|
|
19007
|
+
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: itemActions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19008
|
+
Button,
|
|
19012
19009
|
{
|
|
19013
|
-
|
|
19010
|
+
variant: action.variant ?? "ghost",
|
|
19011
|
+
size: "sm",
|
|
19012
|
+
onClick: handleActionClick(action, itemData),
|
|
19013
|
+
"data-testid": `action-${action.event}`,
|
|
19014
19014
|
className: cn(
|
|
19015
|
-
"
|
|
19016
|
-
"opacity-0 group-hover:opacity-100"
|
|
19015
|
+
action.variant === "danger" && "text-error hover:bg-error/10"
|
|
19017
19016
|
),
|
|
19018
|
-
children:
|
|
19019
|
-
|
|
19020
|
-
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
|
|
19025
|
-
className: cn(
|
|
19026
|
-
action.variant === "danger" && "text-error hover:bg-error/10"
|
|
19027
|
-
),
|
|
19028
|
-
children: [
|
|
19029
|
-
action.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
|
|
19030
|
-
action.label
|
|
19031
|
-
]
|
|
19032
|
-
},
|
|
19033
|
-
idx
|
|
19034
|
-
))
|
|
19035
|
-
}
|
|
19036
|
-
)
|
|
19017
|
+
children: [
|
|
19018
|
+
action.icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
|
|
19019
|
+
action.label
|
|
19020
|
+
]
|
|
19021
|
+
},
|
|
19022
|
+
idx
|
|
19023
|
+
)) })
|
|
19037
19024
|
]
|
|
19038
19025
|
}
|
|
19039
19026
|
),
|
|
@@ -30263,75 +30250,66 @@ var init_List = __esm({
|
|
|
30263
30250
|
hasProgress && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "ml-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ProgressIndicator, { value: progressValue }) })
|
|
30264
30251
|
] })
|
|
30265
30252
|
] }),
|
|
30266
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
30267
|
-
|
|
30268
|
-
|
|
30269
|
-
|
|
30270
|
-
|
|
30271
|
-
|
|
30272
|
-
|
|
30273
|
-
|
|
30274
|
-
|
|
30275
|
-
|
|
30276
|
-
|
|
30277
|
-
variant: "ghost",
|
|
30278
|
-
action: editAction.event,
|
|
30279
|
-
className: cn(
|
|
30280
|
-
"p-2 rounded-lg transition-all duration-200",
|
|
30281
|
-
"hover:bg-primary/10 hover:text-primary",
|
|
30282
|
-
"text-muted-foreground",
|
|
30283
|
-
"active:scale-95"
|
|
30284
|
-
),
|
|
30285
|
-
title: editAction.label,
|
|
30286
|
-
"data-testid": editAction.event ? `action-${editAction.event}` : void 0,
|
|
30287
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Pencil, { className: "w-4 h-4" })
|
|
30288
|
-
}
|
|
30253
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: "flex items-center gap-1 flex-shrink-0", children: [
|
|
30254
|
+
editAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30255
|
+
Button,
|
|
30256
|
+
{
|
|
30257
|
+
variant: "ghost",
|
|
30258
|
+
action: editAction.event,
|
|
30259
|
+
className: cn(
|
|
30260
|
+
"p-2 rounded-lg transition-all duration-200",
|
|
30261
|
+
"hover:bg-primary/10 hover:text-primary",
|
|
30262
|
+
"text-muted-foreground",
|
|
30263
|
+
"active:scale-95"
|
|
30289
30264
|
),
|
|
30290
|
-
|
|
30291
|
-
|
|
30292
|
-
|
|
30293
|
-
|
|
30294
|
-
|
|
30295
|
-
|
|
30296
|
-
|
|
30297
|
-
|
|
30298
|
-
|
|
30299
|
-
|
|
30300
|
-
|
|
30301
|
-
|
|
30302
|
-
|
|
30303
|
-
|
|
30304
|
-
|
|
30265
|
+
title: editAction.label,
|
|
30266
|
+
"data-testid": editAction.event ? `action-${editAction.event}` : void 0,
|
|
30267
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Pencil, { className: "w-4 h-4" })
|
|
30268
|
+
}
|
|
30269
|
+
),
|
|
30270
|
+
viewAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30271
|
+
Button,
|
|
30272
|
+
{
|
|
30273
|
+
variant: "ghost",
|
|
30274
|
+
action: viewAction.event,
|
|
30275
|
+
className: cn(
|
|
30276
|
+
"p-2 rounded-lg transition-all duration-200",
|
|
30277
|
+
"hover:bg-muted hover:text-foreground",
|
|
30278
|
+
"text-muted-foreground",
|
|
30279
|
+
"active:scale-95"
|
|
30305
30280
|
),
|
|
30306
|
-
|
|
30307
|
-
|
|
30308
|
-
|
|
30309
|
-
|
|
30310
|
-
|
|
30311
|
-
|
|
30281
|
+
title: viewAction.label,
|
|
30282
|
+
"data-testid": viewAction.event ? `action-${viewAction.event}` : void 0,
|
|
30283
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Eye, { className: "w-4 h-4" })
|
|
30284
|
+
}
|
|
30285
|
+
),
|
|
30286
|
+
(() => {
|
|
30287
|
+
const filteredActions = actions.filter(
|
|
30288
|
+
(a) => !a.label.toLowerCase().includes("edit") && !a.label.toLowerCase().includes("view") && !a.label.toLowerCase().includes("open")
|
|
30289
|
+
);
|
|
30290
|
+
return filteredActions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30291
|
+
Menu,
|
|
30292
|
+
{
|
|
30293
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30294
|
+
Button,
|
|
30312
30295
|
{
|
|
30313
|
-
|
|
30314
|
-
|
|
30315
|
-
|
|
30316
|
-
|
|
30317
|
-
|
|
30318
|
-
|
|
30319
|
-
"hover:bg-muted hover:shadow-sm",
|
|
30320
|
-
"text-muted-foreground hover:text-foreground",
|
|
30321
|
-
"active:scale-95"
|
|
30322
|
-
),
|
|
30323
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.MoreHorizontal, { className: "w-4 h-4" })
|
|
30324
|
-
}
|
|
30296
|
+
variant: "ghost",
|
|
30297
|
+
className: cn(
|
|
30298
|
+
"p-2 rounded-lg transition-all duration-200",
|
|
30299
|
+
"hover:bg-muted hover:shadow-sm",
|
|
30300
|
+
"text-muted-foreground hover:text-foreground",
|
|
30301
|
+
"active:scale-95"
|
|
30325
30302
|
),
|
|
30326
|
-
|
|
30327
|
-
position: "bottom-right"
|
|
30303
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.MoreHorizontal, { className: "w-4 h-4" })
|
|
30328
30304
|
}
|
|
30329
|
-
)
|
|
30330
|
-
|
|
30331
|
-
|
|
30332
|
-
|
|
30333
|
-
|
|
30334
|
-
|
|
30305
|
+
),
|
|
30306
|
+
items: filteredActions,
|
|
30307
|
+
position: "bottom-right"
|
|
30308
|
+
}
|
|
30309
|
+
) : null;
|
|
30310
|
+
})(),
|
|
30311
|
+
hasExplicitClick && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronRight, { className: "w-4 h-4 text-muted-foreground/50 group-hover:text-muted-foreground group-hover:translate-x-0.5 transition-all" })
|
|
30312
|
+
] })
|
|
30335
30313
|
]
|
|
30336
30314
|
}
|
|
30337
30315
|
),
|
package/dist/runtime/index.js
CHANGED
|
@@ -18869,10 +18869,7 @@ var init_DataList = __esm({
|
|
|
18869
18869
|
HStack,
|
|
18870
18870
|
{
|
|
18871
18871
|
gap: "xs",
|
|
18872
|
-
className:
|
|
18873
|
-
"flex-shrink-0 transition-opacity duration-200",
|
|
18874
|
-
"opacity-0 group-hover:opacity-100"
|
|
18875
|
-
),
|
|
18872
|
+
className: "flex-shrink-0",
|
|
18876
18873
|
children: itemActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
18877
18874
|
Button,
|
|
18878
18875
|
{
|
|
@@ -18962,33 +18959,23 @@ var init_DataList = __esm({
|
|
|
18962
18959
|
] }, field.name);
|
|
18963
18960
|
})
|
|
18964
18961
|
] }),
|
|
18965
|
-
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsx(
|
|
18966
|
-
|
|
18962
|
+
itemActions && itemActions.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-shrink-0", children: itemActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
18963
|
+
Button,
|
|
18967
18964
|
{
|
|
18968
|
-
|
|
18965
|
+
variant: action.variant ?? "ghost",
|
|
18966
|
+
size: "sm",
|
|
18967
|
+
onClick: handleActionClick(action, itemData),
|
|
18968
|
+
"data-testid": `action-${action.event}`,
|
|
18969
18969
|
className: cn(
|
|
18970
|
-
"
|
|
18971
|
-
"opacity-0 group-hover:opacity-100"
|
|
18970
|
+
action.variant === "danger" && "text-error hover:bg-error/10"
|
|
18972
18971
|
),
|
|
18973
|
-
children:
|
|
18974
|
-
|
|
18975
|
-
|
|
18976
|
-
|
|
18977
|
-
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
className: cn(
|
|
18981
|
-
action.variant === "danger" && "text-error hover:bg-error/10"
|
|
18982
|
-
),
|
|
18983
|
-
children: [
|
|
18984
|
-
action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
|
|
18985
|
-
action.label
|
|
18986
|
-
]
|
|
18987
|
-
},
|
|
18988
|
-
idx
|
|
18989
|
-
))
|
|
18990
|
-
}
|
|
18991
|
-
)
|
|
18972
|
+
children: [
|
|
18973
|
+
action.icon && /* @__PURE__ */ jsx(Icon, { name: action.icon, size: "xs", className: "mr-1" }),
|
|
18974
|
+
action.label
|
|
18975
|
+
]
|
|
18976
|
+
},
|
|
18977
|
+
idx
|
|
18978
|
+
)) })
|
|
18992
18979
|
]
|
|
18993
18980
|
}
|
|
18994
18981
|
),
|
|
@@ -30218,75 +30205,66 @@ var init_List = __esm({
|
|
|
30218
30205
|
hasProgress && /* @__PURE__ */ jsx(Box, { className: "ml-auto", children: /* @__PURE__ */ jsx(ProgressIndicator, { value: progressValue }) })
|
|
30219
30206
|
] })
|
|
30220
30207
|
] }),
|
|
30221
|
-
/* @__PURE__ */ jsxs(
|
|
30222
|
-
|
|
30223
|
-
|
|
30224
|
-
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30228
|
-
|
|
30229
|
-
|
|
30230
|
-
|
|
30231
|
-
|
|
30232
|
-
variant: "ghost",
|
|
30233
|
-
action: editAction.event,
|
|
30234
|
-
className: cn(
|
|
30235
|
-
"p-2 rounded-lg transition-all duration-200",
|
|
30236
|
-
"hover:bg-primary/10 hover:text-primary",
|
|
30237
|
-
"text-muted-foreground",
|
|
30238
|
-
"active:scale-95"
|
|
30239
|
-
),
|
|
30240
|
-
title: editAction.label,
|
|
30241
|
-
"data-testid": editAction.event ? `action-${editAction.event}` : void 0,
|
|
30242
|
-
children: /* @__PURE__ */ jsx(Pencil, { className: "w-4 h-4" })
|
|
30243
|
-
}
|
|
30208
|
+
/* @__PURE__ */ jsxs(HStack, { className: "flex items-center gap-1 flex-shrink-0", children: [
|
|
30209
|
+
editAction && /* @__PURE__ */ jsx(
|
|
30210
|
+
Button,
|
|
30211
|
+
{
|
|
30212
|
+
variant: "ghost",
|
|
30213
|
+
action: editAction.event,
|
|
30214
|
+
className: cn(
|
|
30215
|
+
"p-2 rounded-lg transition-all duration-200",
|
|
30216
|
+
"hover:bg-primary/10 hover:text-primary",
|
|
30217
|
+
"text-muted-foreground",
|
|
30218
|
+
"active:scale-95"
|
|
30244
30219
|
),
|
|
30245
|
-
|
|
30246
|
-
|
|
30247
|
-
|
|
30248
|
-
|
|
30249
|
-
|
|
30250
|
-
|
|
30251
|
-
|
|
30252
|
-
|
|
30253
|
-
|
|
30254
|
-
|
|
30255
|
-
|
|
30256
|
-
|
|
30257
|
-
|
|
30258
|
-
|
|
30259
|
-
|
|
30220
|
+
title: editAction.label,
|
|
30221
|
+
"data-testid": editAction.event ? `action-${editAction.event}` : void 0,
|
|
30222
|
+
children: /* @__PURE__ */ jsx(Pencil, { className: "w-4 h-4" })
|
|
30223
|
+
}
|
|
30224
|
+
),
|
|
30225
|
+
viewAction && /* @__PURE__ */ jsx(
|
|
30226
|
+
Button,
|
|
30227
|
+
{
|
|
30228
|
+
variant: "ghost",
|
|
30229
|
+
action: viewAction.event,
|
|
30230
|
+
className: cn(
|
|
30231
|
+
"p-2 rounded-lg transition-all duration-200",
|
|
30232
|
+
"hover:bg-muted hover:text-foreground",
|
|
30233
|
+
"text-muted-foreground",
|
|
30234
|
+
"active:scale-95"
|
|
30260
30235
|
),
|
|
30261
|
-
|
|
30262
|
-
|
|
30263
|
-
|
|
30264
|
-
|
|
30265
|
-
|
|
30266
|
-
|
|
30236
|
+
title: viewAction.label,
|
|
30237
|
+
"data-testid": viewAction.event ? `action-${viewAction.event}` : void 0,
|
|
30238
|
+
children: /* @__PURE__ */ jsx(Eye, { className: "w-4 h-4" })
|
|
30239
|
+
}
|
|
30240
|
+
),
|
|
30241
|
+
(() => {
|
|
30242
|
+
const filteredActions = actions.filter(
|
|
30243
|
+
(a) => !a.label.toLowerCase().includes("edit") && !a.label.toLowerCase().includes("view") && !a.label.toLowerCase().includes("open")
|
|
30244
|
+
);
|
|
30245
|
+
return filteredActions.length > 0 ? /* @__PURE__ */ jsx(
|
|
30246
|
+
Menu,
|
|
30247
|
+
{
|
|
30248
|
+
trigger: /* @__PURE__ */ jsx(
|
|
30249
|
+
Button,
|
|
30267
30250
|
{
|
|
30268
|
-
|
|
30269
|
-
|
|
30270
|
-
|
|
30271
|
-
|
|
30272
|
-
|
|
30273
|
-
|
|
30274
|
-
"hover:bg-muted hover:shadow-sm",
|
|
30275
|
-
"text-muted-foreground hover:text-foreground",
|
|
30276
|
-
"active:scale-95"
|
|
30277
|
-
),
|
|
30278
|
-
children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-4 h-4" })
|
|
30279
|
-
}
|
|
30251
|
+
variant: "ghost",
|
|
30252
|
+
className: cn(
|
|
30253
|
+
"p-2 rounded-lg transition-all duration-200",
|
|
30254
|
+
"hover:bg-muted hover:shadow-sm",
|
|
30255
|
+
"text-muted-foreground hover:text-foreground",
|
|
30256
|
+
"active:scale-95"
|
|
30280
30257
|
),
|
|
30281
|
-
|
|
30282
|
-
position: "bottom-right"
|
|
30258
|
+
children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-4 h-4" })
|
|
30283
30259
|
}
|
|
30284
|
-
)
|
|
30285
|
-
|
|
30286
|
-
|
|
30287
|
-
|
|
30288
|
-
|
|
30289
|
-
|
|
30260
|
+
),
|
|
30261
|
+
items: filteredActions,
|
|
30262
|
+
position: "bottom-right"
|
|
30263
|
+
}
|
|
30264
|
+
) : null;
|
|
30265
|
+
})(),
|
|
30266
|
+
hasExplicitClick && /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4 text-muted-foreground/50 group-hover:text-muted-foreground group-hover:translate-x-0.5 transition-all" })
|
|
30267
|
+
] })
|
|
30290
30268
|
]
|
|
30291
30269
|
}
|
|
30292
30270
|
),
|