@pradip1995/segment-animation-login 0.1.3 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pradip1995/segment-animation-login",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Motion/Lumière OTP login and account shell",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@medusajs/types": "^2.8.0",
29
29
  "@pradip1995/commerce-core": "^4.0.0",
30
- "@pradip1995/segment-login-template": "^0.5.7",
31
- "@pradip1995/segment-primitives": "^0.4.3",
30
+ "@pradip1995/segment-login-template": "^0.5.14",
31
+ "@pradip1995/segment-primitives": "^0.4.11",
32
32
  "framer-motion": "^11.0.0"
33
33
  },
34
34
  "devDependencies": {
@@ -7,6 +7,7 @@ import type { HttpTypes } from "@medusajs/types"
7
7
  import { addToCart } from "@pradip1995/commerce-core/client/actions/cart"
8
8
  import LocalizedLink from "@pradip1995/segment-primitives/localized-link"
9
9
  import { formatPrice } from "@pradip1995/segment-primitives/format-price"
10
+ import { presentOrderLines } from "@pradip1995/segment-primitives/order-lines"
10
11
 
11
12
  function isCancelled(order: HttpTypes.StoreOrder) {
12
13
  const status = (order.status || "").toLowerCase()
@@ -105,7 +106,8 @@ export default function AnimationAccountOrders({
105
106
  if (!canReorder(order) || reorderingId) return
106
107
  setReorderingId(order.id)
107
108
  try {
108
- for (const item of order.items || []) {
109
+ const reorderItems = presentOrderLines(order).reorderItems
110
+ for (const item of reorderItems) {
109
111
  if (!item.variant_id) continue
110
112
  await addToCart({
111
113
  variantId: item.variant_id,
@@ -234,12 +236,6 @@ export default function AnimationAccountOrders({
234
236
  </ul>
235
237
 
236
238
  <div className="anim-acct__order-card-actions">
237
- <LocalizedLink
238
- href={`/orders/${order.id}`}
239
- className="anim-acct__btn anim-acct__btn--primary anim-acct__btn--sm"
240
- >
241
- View details
242
- </LocalizedLink>
243
239
  {showReorder ? (
244
240
  <button
245
241
  type="button"
@@ -250,6 +246,12 @@ export default function AnimationAccountOrders({
250
246
  {reorderingId === order.id ? "Adding…" : "Reorder"}
251
247
  </button>
252
248
  ) : null}
249
+ <LocalizedLink
250
+ href={`/orders/${order.id}`}
251
+ className="anim-acct__btn anim-acct__btn--primary anim-acct__btn--sm"
252
+ >
253
+ View details
254
+ </LocalizedLink>
253
255
  </div>
254
256
  </li>
255
257
  )
@@ -1,12 +1,12 @@
1
1
  /* Motion account content (overview + restyle nested login-template panels) */
2
2
 
3
3
  .anim-acct {
4
- --aa-ink: #1c1412;
5
- --aa-muted: #7a6e68;
6
- --aa-line: #ebe4df;
7
- --aa-accent: #e23b00;
8
- --aa-accent-hover: #c43200;
9
- --aa-accent-soft: rgba(226, 59, 0, 0.08);
4
+ --aa-ink: #0a0a0a;
5
+ --aa-muted: #737373;
6
+ --aa-line: #e5e5e5;
7
+ --aa-accent: #111111;
8
+ --aa-accent-hover: #333333;
9
+ --aa-accent-soft: rgba(17, 17, 17, 0.08);
10
10
  --aa-sans: var(--font-sans, "DM Sans", sans-serif);
11
11
  display: flex;
12
12
  flex-direction: column;
@@ -77,7 +77,7 @@
77
77
  gap: 0.35rem;
78
78
  padding: 1.1rem 1rem;
79
79
  border: 1px solid var(--aa-line);
80
- background: #fffaf7;
80
+ background: #ffffff;
81
81
  text-decoration: none;
82
82
  color: inherit;
83
83
  transition: border-color 0.2s ease, background 0.2s ease;
@@ -356,7 +356,7 @@
356
356
  .anim-acct__address-card {
357
357
  padding: 1.15rem 1.1rem;
358
358
  border: 1px solid var(--aa-line);
359
- background: #fffaf7;
359
+ background: #ffffff;
360
360
  }
361
361
 
362
362
  .anim-acct__address-top {
@@ -671,7 +671,7 @@
671
671
 
672
672
  .anim-acct__order-card {
673
673
  border: 1px solid var(--aa-line);
674
- background: #fffaf7;
674
+ background: #ffffff;
675
675
  padding: 1.15rem 1.1rem 1.2rem;
676
676
  }
677
677
 
@@ -890,6 +890,8 @@
890
890
  .anim-acct__order-card-actions {
891
891
  display: flex;
892
892
  flex-wrap: wrap;
893
+ align-items: center;
894
+ justify-content: flex-end;
893
895
  gap: 0.55rem;
894
896
  padding-top: 0.15rem;
895
897
  }
@@ -927,27 +929,27 @@
927
929
  [data-anim-account] [class*="btnPrimary"],
928
930
  [data-anim-account] button[class*="bg-heading"],
929
931
  [data-anim-account] .bg-heading {
930
- background: #e23b00 !important;
931
- border-color: #e23b00 !important;
932
+ background: #111111 !important;
933
+ border-color: #111111 !important;
932
934
  color: #ffffff !important;
933
935
  }
934
936
 
935
937
  [data-anim-account] .hover\:bg-brand-accent:hover,
936
938
  [data-anim-account] .bg-brand-primary:hover,
937
939
  [data-anim-account] .bg-brand-accent:hover {
938
- background: #c43200 !important;
939
- border-color: #c43200 !important;
940
+ background: #333333 !important;
941
+ border-color: #333333 !important;
940
942
  }
941
943
 
942
944
  [data-anim-account] .text-brand-accent,
943
945
  [data-anim-account] .text-heading.font-bold,
944
946
  [data-anim-account] .border-brand-accent {
945
- color: #e23b00 !important;
947
+ color: #111111 !important;
946
948
  }
947
949
 
948
950
  [data-anim-account] .border-brand-accent,
949
951
  [data-anim-account] .border-heading {
950
- border-color: #e23b00 !important;
952
+ border-color: #111111 !important;
951
953
  }
952
954
 
953
955
  [data-anim-account] button.border,
@@ -958,7 +960,7 @@
958
960
  [data-anim-account] input:focus,
959
961
  [data-anim-account] select:focus,
960
962
  [data-anim-account] textarea:focus {
961
- border-color: #e23b00 !important;
963
+ border-color: #111111 !important;
962
964
  outline: none !important;
963
965
  box-shadow: none !important;
964
966
  }
@@ -966,7 +968,7 @@
966
968
  [data-anim-account] input:focus-visible,
967
969
  [data-anim-account] select:focus-visible,
968
970
  [data-anim-account] textarea:focus-visible {
969
- border-color: #e23b00 !important;
971
+ border-color: #111111 !important;
970
972
  outline: none !important;
971
973
  box-shadow: none !important;
972
974
  }