hazo_ui 2.1.0 → 2.1.1

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/index.cjs CHANGED
@@ -1253,7 +1253,8 @@ function MultiStateRadio({
1253
1253
  selection = "single",
1254
1254
  value,
1255
1255
  onChange,
1256
- className
1256
+ className,
1257
+ compressed = false
1257
1258
  }) {
1258
1259
  const handleSingleSelection = (selectedValue) => {
1259
1260
  onChange(selectedValue);
@@ -1284,7 +1285,8 @@ function MultiStateRadio({
1284
1285
  className: cn(
1285
1286
  "cls_radio_option flex items-center gap-2",
1286
1287
  layout === "horizontal" ? "flex-row" : "flex-col",
1287
- "p-2 rounded-md hover:bg-accent transition-colors",
1288
+ compressed ? "" : "p-2 rounded-md",
1289
+ "hover:bg-accent transition-colors",
1288
1290
  selected && "bg-accent"
1289
1291
  ),
1290
1292
  children: [
@@ -1318,7 +1320,8 @@ function MultiStateRadio({
1318
1320
  className: cn(
1319
1321
  "cls_radio_option flex items-center gap-2 cursor-pointer",
1320
1322
  layout === "horizontal" ? "flex-row" : "flex-col",
1321
- "p-2 rounded-md hover:bg-accent transition-colors",
1323
+ compressed ? "" : "p-2 rounded-md",
1324
+ "hover:bg-accent transition-colors",
1322
1325
  selected && "bg-accent"
1323
1326
  ),
1324
1327
  onClick: () => handleMultiSelection(item.value),
@@ -1381,7 +1384,8 @@ function MultiStateRadio({
1381
1384
  className: cn(
1382
1385
  "cls_icon_option border-0",
1383
1386
  layout === "horizontal" ? "flex-row" : "flex-col",
1384
- "gap-2 h-auto py-2 px-3 sm:py-3 sm:px-4",
1387
+ "gap-2 h-auto",
1388
+ compressed ? "py-0 px-0" : "py-2 px-3 sm:py-3 sm:px-4",
1385
1389
  selected && "bg-primary text-primary-foreground",
1386
1390
  !selected && "hover:bg-accent"
1387
1391
  ),
@@ -1406,8 +1410,15 @@ function MultiStateRadio({
1406
1410
  ] }, item.value);
1407
1411
  };
1408
1412
  const containerClasses = cn(
1409
- "cls_multi_state_radio border border-input rounded-md p-2 sm:p-3",
1410
- layout === "horizontal" ? "flex flex-row flex-wrap gap-2 sm:gap-3" : "flex flex-col gap-2 sm:gap-3",
1413
+ "cls_multi_state_radio border border-input rounded-md",
1414
+ compressed ? "" : "p-2 sm:p-3",
1415
+ layout === "horizontal" ? cn(
1416
+ "flex flex-row flex-wrap",
1417
+ compressed ? "gap-0" : "gap-2 sm:gap-3"
1418
+ ) : cn(
1419
+ "flex flex-col",
1420
+ compressed ? "gap-0" : "gap-2 sm:gap-3"
1421
+ ),
1411
1422
  className
1412
1423
  );
1413
1424
  const radioGroupClasses = cn(