hey-pharmacist-ecommerce 1.1.23 → 1.1.25

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.
@@ -926,71 +926,66 @@ export function ShopScreen({ initialFilters = {}, categoryName }: ShopScreenProp
926
926
  Shop by Category
927
927
  </h2>
928
928
  <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4">
929
+ <motion.button
930
+ onClick={handleClearCategory}
931
+ initial={{ opacity: 0, y: 20 }}
932
+ animate={{ opacity: 1, y: 0 }}
933
+ className={`group relative overflow-hidden rounded-[24px] p-6 min-h-[180px] min-w-[170px] transition-all duration-300 ${!categoryFilter ? 'bg-linear-to-br from-primary to-secondary text-white shadow-xl scale-105'
934
+ : 'bg-linear-to-br from-gray-50 to-white hover:shadow-lg border-2 border-gray-100 hover:border-primary'
935
+ }`}
936
+ >
937
+ <div className="relative">
938
+ <div className={`size-12 rounded-full mb-3 mx-auto flex items-center justify-center transition-all ${!categoryFilter
939
+ ? 'bg-white/20'
940
+ : 'bg-linear-to-br from-primary/10 to-secondary/10 group-hover:scale-110'
941
+ }`}>
942
+ <Package className={`size-6 ${!categoryFilter ? 'text-white' : 'text-primary'
943
+ }`} />
944
+ </div>
945
+ <h3 className={`font-['Poppins',sans-serif] font-semibold text-[14px] mb-1.5 ${!categoryFilter ? 'text-white' : 'text-secondary'
946
+ }`}>
947
+ All Products
948
+ </h3>
949
+ <p className={`font-['Poppins',sans-serif] text-[11px] ${!categoryFilter ? 'text-white/80' : 'text-muted'
950
+ }`}>
951
+ Browse Everything
952
+ </p>
953
+ </div>
954
+ </motion.button>
955
+
929
956
  {displayCategories.map((category, index) => {
930
957
  const Icon = getCategoryIcon(category.name ?? '');
931
958
  const isSelected = categoryFilter === category.id;
932
959
 
933
960
  return (
934
- <>
935
-
936
- <motion.button
937
- onClick={handleClearCategory}
938
- initial={{ opacity: 0, y: 20 }}
939
- animate={{ opacity: 1, y: 0 }}
940
- transition={{ delay: index * 0.1 }}
941
- className={`group relative overflow-hidden rounded-[24px] p-6 transition-all duration-300 ${!categoryFilter ? 'bg-linear-to-br from-primary to-secondary text-white shadow-xl scale-105'
942
- : 'bg-linear-to-br from-gray-50 to-white hover:shadow-lg border-2 border-gray-100 hover:border-primary'
943
- }`}
944
- >
945
- <div className="relative">
946
- <div className={`size-12 rounded-full mb-3 mx-auto flex items-center justify-center transition-all ${!categoryFilter
947
- ? 'bg-white/20'
948
- : 'bg-linear-to-br from-primary/10 to-secondary/10 group-hover:scale-110'
949
- }`}>
950
- <Icon className={`size-6 ${!categoryFilter ? 'text-white' : 'text-primary'
951
- }`} />
952
- </div>
953
- <h3 className={`font-['Poppins',sans-serif] font-semibold text-[14px] mb-1.5 ${!categoryFilter ? 'text-white' : 'text-secondary'
954
- }`}>
955
- All Products
956
- </h3>
957
- <p className={`font-['Poppins',sans-serif] text-[11px] ${!categoryFilter ? 'text-white/80' : 'text-muted'
958
- }`}>
959
- Browse Everything
960
- </p>
961
+ <motion.button
962
+ key={category.id}
963
+ initial={{ opacity: 0, y: 20 }}
964
+ animate={{ opacity: 1, y: 0 }}
965
+ transition={{ delay: index * 0.1 }}
966
+ onClick={() => handleCategoryChange(category.id ?? '')}
967
+ className={`group relative overflow-hidden rounded-[24px] p-6 min-h-[180px] min-w-[170px] transition-all duration-300 ${isSelected ? 'bg-linear-to-br from-primary to-secondary text-white shadow-xl scale-105'
968
+ : 'bg-linear-to-br from-gray-50 to-white hover:shadow-lg border-2 border-gray-100 hover:border-primary'
969
+ }`}
970
+ >
971
+ <div className="relative">
972
+ <div className={`size-12 rounded-full mb-3 mx-auto flex items-center justify-center transition-all ${isSelected
973
+ ? 'bg-white/20'
974
+ : 'bg-linear-to-br from-primary/10 to-secondary/10 group-hover:scale-110'
975
+ }`}>
976
+ <Icon className={`size-6 ${isSelected ? 'text-white' : 'text-primary'
977
+ }`} />
961
978
  </div>
962
- </motion.button>
963
-
964
-
965
- <motion.button
966
- key={category.id}
967
- initial={{ opacity: 0, y: 20 }}
968
- animate={{ opacity: 1, y: 0 }}
969
- transition={{ delay: index * 0.1 }}
970
- onClick={() => handleCategoryChange(category.id ?? '')}
971
- className={`group relative overflow-hidden rounded-[24px] p-6 transition-all duration-300 ${isSelected ? 'bg-linear-to-br from-primary to-secondary text-white shadow-xl scale-105'
972
- : 'bg-linear-to-br from-gray-50 to-white hover:shadow-lg border-2 border-gray-100 hover:border-primary'
973
- }`}
974
- >
975
- <div className="relative">
976
- <div className={`size-12 rounded-full mb-3 mx-auto flex items-center justify-center transition-all ${isSelected
977
- ? 'bg-white/20'
978
- : 'bg-linear-to-br from-primary/10 to-secondary/10 group-hover:scale-110'
979
- }`}>
980
- <Icon className={`size-6 ${isSelected ? 'text-white' : 'text-primary'
981
- }`} />
982
- </div>
983
- <h3 className={`font-['Poppins',sans-serif] font-semibold text-[14px] mb-1.5 ${isSelected ? 'text-white' : 'text-secondary'
984
- }`}>
985
- {category.name}
986
- </h3>
987
- <p className={`font-['Poppins',sans-serif] text-[11px] ${isSelected ? 'text-white/80' : 'text-muted'
988
- }`}>
989
- {category.description}
990
- </p>
991
- </div>
992
- </motion.button>
993
- </>
979
+ <h3 className={`font-['Poppins',sans-serif] font-semibold text-[14px] mb-1.5 ${isSelected ? 'text-white' : 'text-secondary'
980
+ }`}>
981
+ {category.name}
982
+ </h3>
983
+ <p className={`font-['Poppins',sans-serif] text-[11px] ${isSelected ? 'text-white/80' : 'text-muted'
984
+ }`}>
985
+ {category.description}
986
+ </p>
987
+ </div>
988
+ </motion.button>
994
989
  );
995
990
  })}
996
991
  </div>
@@ -1098,7 +1093,7 @@ export function ShopScreen({ initialFilters = {}, categoryName }: ShopScreenProp
1098
1093
  viewMode === 'grid' ? (
1099
1094
  <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5">
1100
1095
  {displayedProducts.map((product) => (
1101
- <div key={product.id} className="h-full">
1096
+ <div key={product._id} className="h-full">
1102
1097
  <ProductCard
1103
1098
  product={product}
1104
1099
  onClickProduct={(item) => {
@@ -1122,7 +1117,7 @@ export function ShopScreen({ initialFilters = {}, categoryName }: ShopScreenProp
1122
1117
 
1123
1118
  return (
1124
1119
  <motion.div
1125
- key={product.id}
1120
+ key={product._id}
1126
1121
  whileHover={{ y: -4 }}
1127
1122
  className="group flex cursor-pointer flex-col gap-6 rounded-2xl border border-gray-100 bg-white p-5 shadow-xs transition hover:shadow-xl md:flex-row md:items-start"
1128
1123
  onClick={() => router.push(buildPath(`/products/${product._id}`))}
@@ -1152,7 +1147,7 @@ export function ShopScreen({ initialFilters = {}, categoryName }: ShopScreenProp
1152
1147
  </span>
1153
1148
  ))}
1154
1149
  </div>
1155
- <h3 className="text-xl font-semibold text-gray-900">
1150
+ <h3 className="text-xl font-semibold text-gray-900 line-clamp-2">
1156
1151
  {product.name}
1157
1152
  </h3>
1158
1153
  <div className="flex flex-wrap items-center gap-4 text-sm text-gray-500">