@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.
@@ -18914,10 +18914,7 @@ var init_DataList = __esm({
18914
18914
  HStack,
18915
18915
  {
18916
18916
  gap: "xs",
18917
- className: cn(
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
- HStack,
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
- gap: "xs",
19010
+ variant: action.variant ?? "ghost",
19011
+ size: "sm",
19012
+ onClick: handleActionClick(action, itemData),
19013
+ "data-testid": `action-${action.event}`,
19014
19014
  className: cn(
19015
- "flex-shrink-0 transition-opacity duration-200",
19016
- "opacity-0 group-hover:opacity-100"
19015
+ action.variant === "danger" && "text-error hover:bg-error/10"
19017
19016
  ),
19018
- children: itemActions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
19019
- Button,
19020
- {
19021
- variant: action.variant ?? "ghost",
19022
- size: "sm",
19023
- onClick: handleActionClick(action, itemData),
19024
- "data-testid": `action-${action.event}`,
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
- HStack,
30268
- {
30269
- className: cn(
30270
- "flex items-center gap-1 flex-shrink-0 transition-opacity duration-200",
30271
- "opacity-0 group-hover:opacity-100"
30272
- ),
30273
- children: [
30274
- editAction && /* @__PURE__ */ jsxRuntime.jsx(
30275
- Button,
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
- viewAction && /* @__PURE__ */ jsxRuntime.jsx(
30291
- Button,
30292
- {
30293
- variant: "ghost",
30294
- action: viewAction.event,
30295
- className: cn(
30296
- "p-2 rounded-lg transition-all duration-200",
30297
- "hover:bg-muted hover:text-foreground",
30298
- "text-muted-foreground",
30299
- "active:scale-95"
30300
- ),
30301
- title: viewAction.label,
30302
- "data-testid": viewAction.event ? `action-${viewAction.event}` : void 0,
30303
- children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Eye, { className: "w-4 h-4" })
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
- const filteredActions = actions.filter(
30308
- (a) => !a.label.toLowerCase().includes("edit") && !a.label.toLowerCase().includes("view") && !a.label.toLowerCase().includes("open")
30309
- );
30310
- return filteredActions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
30311
- Menu,
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
- trigger: /* @__PURE__ */ jsxRuntime.jsx(
30314
- Button,
30315
- {
30316
- variant: "ghost",
30317
- className: cn(
30318
- "p-2 rounded-lg transition-all duration-200",
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
- items: filteredActions,
30327
- position: "bottom-right"
30303
+ children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.MoreHorizontal, { className: "w-4 h-4" })
30328
30304
  }
30329
- ) : null;
30330
- })(),
30331
- 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" })
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
  ),
@@ -18869,10 +18869,7 @@ var init_DataList = __esm({
18869
18869
  HStack,
18870
18870
  {
18871
18871
  gap: "xs",
18872
- className: cn(
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
- HStack,
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
- gap: "xs",
18965
+ variant: action.variant ?? "ghost",
18966
+ size: "sm",
18967
+ onClick: handleActionClick(action, itemData),
18968
+ "data-testid": `action-${action.event}`,
18969
18969
  className: cn(
18970
- "flex-shrink-0 transition-opacity duration-200",
18971
- "opacity-0 group-hover:opacity-100"
18970
+ action.variant === "danger" && "text-error hover:bg-error/10"
18972
18971
  ),
18973
- children: itemActions.map((action, idx) => /* @__PURE__ */ jsxs(
18974
- Button,
18975
- {
18976
- variant: action.variant ?? "ghost",
18977
- size: "sm",
18978
- onClick: handleActionClick(action, itemData),
18979
- "data-testid": `action-${action.event}`,
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
- HStack,
30223
- {
30224
- className: cn(
30225
- "flex items-center gap-1 flex-shrink-0 transition-opacity duration-200",
30226
- "opacity-0 group-hover:opacity-100"
30227
- ),
30228
- children: [
30229
- editAction && /* @__PURE__ */ jsx(
30230
- Button,
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
- viewAction && /* @__PURE__ */ jsx(
30246
- Button,
30247
- {
30248
- variant: "ghost",
30249
- action: viewAction.event,
30250
- className: cn(
30251
- "p-2 rounded-lg transition-all duration-200",
30252
- "hover:bg-muted hover:text-foreground",
30253
- "text-muted-foreground",
30254
- "active:scale-95"
30255
- ),
30256
- title: viewAction.label,
30257
- "data-testid": viewAction.event ? `action-${viewAction.event}` : void 0,
30258
- children: /* @__PURE__ */ jsx(Eye, { className: "w-4 h-4" })
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
- const filteredActions = actions.filter(
30263
- (a) => !a.label.toLowerCase().includes("edit") && !a.label.toLowerCase().includes("view") && !a.label.toLowerCase().includes("open")
30264
- );
30265
- return filteredActions.length > 0 ? /* @__PURE__ */ jsx(
30266
- Menu,
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
- trigger: /* @__PURE__ */ jsx(
30269
- Button,
30270
- {
30271
- variant: "ghost",
30272
- className: cn(
30273
- "p-2 rounded-lg transition-all duration-200",
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
- items: filteredActions,
30282
- position: "bottom-right"
30258
+ children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-4 h-4" })
30283
30259
  }
30284
- ) : null;
30285
- })(),
30286
- 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" })
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
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "3.8.2",
3
+ "version": "3.8.3",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",