@open-mercato/core 0.6.6-develop.6176.1.4507b99c2f → 0.6.6-develop.6198.1.0822f97cc6

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.
Files changed (39) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/modules/auth/frontend/login.js +5 -5
  3. package/dist/modules/auth/frontend/login.js.map +2 -2
  4. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js +3 -2
  5. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js.map +2 -2
  6. package/dist/modules/catalog/widgets/injection/product-seo/widget.client.js +26 -14
  7. package/dist/modules/catalog/widgets/injection/product-seo/widget.client.js.map +2 -2
  8. package/dist/modules/customers/api/deals/[id]/route.js +169 -149
  9. package/dist/modules/customers/api/deals/[id]/route.js.map +3 -3
  10. package/dist/modules/customers/components/detail/InlineEditors.js +9 -4
  11. package/dist/modules/customers/components/detail/InlineEditors.js.map +2 -2
  12. package/dist/modules/integrations/backend/integrations/[id]/page.js +13 -9
  13. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  14. package/dist/modules/integrations/backend/integrations/detail-page-refresh.js +17 -0
  15. package/dist/modules/integrations/backend/integrations/detail-page-refresh.js.map +7 -0
  16. package/dist/modules/sales/components/documents/SalesDocumentForm.js +299 -297
  17. package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
  18. package/dist/modules/workflows/components/EdgeEditDialog.js +120 -141
  19. package/dist/modules/workflows/components/EdgeEditDialog.js.map +2 -2
  20. package/dist/modules/workflows/components/NodeEditDialog.js +114 -118
  21. package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
  22. package/dist/modules/workflows/frontend/checkout-demo/page.js +155 -260
  23. package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
  24. package/package.json +7 -7
  25. package/src/modules/auth/frontend/login.tsx +5 -5
  26. package/src/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.tsx +4 -3
  27. package/src/modules/catalog/widgets/injection/product-seo/widget.client.tsx +27 -17
  28. package/src/modules/customers/api/deals/[id]/route.ts +208 -174
  29. package/src/modules/customers/components/detail/InlineEditors.tsx +6 -10
  30. package/src/modules/integrations/backend/integrations/[id]/page.tsx +13 -9
  31. package/src/modules/integrations/backend/integrations/detail-page-refresh.ts +36 -0
  32. package/src/modules/sales/components/documents/SalesDocumentForm.tsx +351 -327
  33. package/src/modules/workflows/components/EdgeEditDialog.tsx +132 -157
  34. package/src/modules/workflows/components/NodeEditDialog.tsx +116 -121
  35. package/src/modules/workflows/frontend/checkout-demo/page.tsx +172 -239
  36. package/src/modules/workflows/i18n/de.json +2 -0
  37. package/src/modules/workflows/i18n/en.json +2 -0
  38. package/src/modules/workflows/i18n/es.json +2 -0
  39. package/src/modules/workflows/i18n/pl.json +2 -0
@@ -11,6 +11,11 @@ import {
11
11
  SelectTrigger,
12
12
  SelectValue,
13
13
  } from '@open-mercato/ui/primitives/select'
14
+ import { IconButton } from '@open-mercato/ui/primitives/icon-button'
15
+ import { Textarea } from '@open-mercato/ui/primitives/textarea'
16
+ import { Checkbox } from '@open-mercato/ui/primitives/checkbox'
17
+ import { Spinner } from '@open-mercato/ui/primitives/spinner'
18
+ import { AlertCircle, AlertTriangle, Check, CheckCircle2, Info, Zap, Minus, Plus, X } from 'lucide-react'
14
19
  import Link from 'next/link'
15
20
  import { useQuery, useQueryClient } from '@tanstack/react-query'
16
21
  import { useT } from '@open-mercato/shared/lib/i18n/context'
@@ -212,36 +217,37 @@ export default function CheckoutDemoPage() {
212
217
 
213
218
  // Cart management functions
214
219
  const addToCart = (product: Product) => {
215
- const existing = cart.find(item => item.id === product.id)
216
- if (existing) {
217
- setCart(cart.map(item =>
218
- item.id === product.id
219
- ? { ...item, quantity: item.quantity + 1 }
220
- : item
221
- ))
222
- } else {
223
- setCart([...cart, {
220
+ setCart(prev => {
221
+ const existing = prev.find(item => item.id === product.id)
222
+ if (existing) {
223
+ return prev.map(item =>
224
+ item.id === product.id
225
+ ? { ...item, quantity: item.quantity + 1 }
226
+ : item
227
+ )
228
+ }
229
+ return [...prev, {
224
230
  id: product.id,
225
231
  name: product.title,
226
232
  // Use resolved pricing from catalog pricing service (in USD)
227
233
  price: product.pricing?.unit_price_gross || product.pricing?.unit_price_net || 99.99,
228
234
  quantity: 1,
229
- }])
230
- }
235
+ }]
236
+ })
231
237
  }
232
238
 
233
239
  const updateQuantity = (productId: string, quantity: number) => {
234
240
  if (quantity <= 0) {
235
- setCart(cart.filter(item => item.id !== productId))
241
+ setCart(prev => prev.filter(item => item.id !== productId))
236
242
  } else {
237
- setCart(cart.map(item =>
243
+ setCart(prev => prev.map(item =>
238
244
  item.id === productId ? { ...item, quantity } : item
239
245
  ))
240
246
  }
241
247
  }
242
248
 
243
249
  const removeFromCart = (productId: string) => {
244
- setCart(cart.filter(item => item.id !== productId))
250
+ setCart(prev => prev.filter(item => item.id !== productId))
245
251
  }
246
252
 
247
253
  // Convert prices to selected currency (cart items are in USD by default)
@@ -506,17 +512,17 @@ export default function CheckoutDemoPage() {
506
512
  const getStatusColor = (status: string) => {
507
513
  switch (status) {
508
514
  case 'RUNNING':
509
- return 'text-blue-600 bg-blue-50'
515
+ return 'text-status-info-text bg-status-info-bg'
510
516
  case 'WAITING_FOR_ACTIVITIES':
511
- return 'text-purple-600 bg-purple-50'
517
+ return 'text-status-info-text bg-status-info-bg'
512
518
  case 'PAUSED':
513
- return 'text-yellow-600 bg-yellow-50'
519
+ return 'text-status-warning-text bg-status-warning-bg'
514
520
  case 'COMPLETED':
515
- return 'text-green-600 bg-green-50'
521
+ return 'text-status-success-text bg-status-success-bg'
516
522
  case 'FAILED':
517
- return 'text-red-600 bg-red-50'
523
+ return 'text-status-error-text bg-status-error-bg'
518
524
  default:
519
- return 'text-gray-600 bg-gray-50'
525
+ return 'text-status-neutral-text bg-status-neutral-bg'
520
526
  }
521
527
  }
522
528
 
@@ -539,23 +545,23 @@ export default function CheckoutDemoPage() {
539
545
  const getStepColor = (status: string) => {
540
546
  switch (status) {
541
547
  case 'completed':
542
- return 'bg-green-100 text-green-600 border-green-300'
548
+ return 'bg-status-success-bg text-status-success-text border-status-success-border'
543
549
  case 'current':
544
- return 'bg-blue-100 text-blue-600 border-blue-300'
550
+ return 'bg-status-info-bg text-status-info-text border-status-info-border'
545
551
  case 'paused':
546
- return 'bg-yellow-100 text-yellow-600 border-yellow-300'
552
+ return 'bg-status-warning-bg text-status-warning-text border-status-warning-border'
547
553
  default:
548
- return 'bg-gray-100 text-gray-600 border-gray-300'
554
+ return 'bg-status-neutral-bg text-status-neutral-text border-status-neutral-border'
549
555
  }
550
556
  }
551
557
 
552
558
  const getEventTypeBadgeClass = (eventType: string) => {
553
- if (eventType.includes('STARTED')) return 'bg-blue-100 text-blue-800'
554
- if (eventType.includes('COMPLETED')) return 'bg-green-100 text-green-800'
555
- if (eventType.includes('FAILED') || eventType.includes('REJECTED')) return 'bg-red-100 text-red-800'
556
- if (eventType.includes('CANCELLED')) return 'bg-gray-100 text-gray-800'
557
- if (eventType.includes('ENTERED') || eventType.includes('EXITED')) return 'bg-purple-100 text-purple-800'
558
- return 'bg-gray-100 text-gray-800'
559
+ if (eventType.includes('STARTED')) return 'bg-status-info-bg text-status-info-text'
560
+ if (eventType.includes('COMPLETED')) return 'bg-status-success-bg text-status-success-text'
561
+ if (eventType.includes('FAILED') || eventType.includes('REJECTED')) return 'bg-status-error-bg text-status-error-text'
562
+ if (eventType.includes('CANCELLED')) return 'bg-status-neutral-bg text-status-neutral-text'
563
+ if (eventType.includes('ENTERED') || eventType.includes('EXITED')) return 'bg-status-info-bg text-status-info-text'
564
+ return 'bg-status-neutral-bg text-status-neutral-text'
559
565
  }
560
566
 
561
567
  const formatEventType = (eventType: string) => {
@@ -716,7 +722,7 @@ export default function CheckoutDemoPage() {
716
722
  <div key={fieldName} className="space-y-1">
717
723
  <label htmlFor={fieldName} className={labelClasses}>
718
724
  {fieldTitle}
719
- {required && <span className="text-red-600 ml-1">*</span>}
725
+ {required && <span className="text-status-error-text ml-1">*</span>}
720
726
  </label>
721
727
  {fieldDescription && (
722
728
  <p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
@@ -748,7 +754,7 @@ export default function CheckoutDemoPage() {
748
754
  <div key={fieldName} className="space-y-1">
749
755
  <label htmlFor={fieldName} className={labelClasses}>
750
756
  {fieldTitle}
751
- {required && <span className="text-red-600 ml-1">*</span>}
757
+ {required && <span className="text-status-error-text ml-1">*</span>}
752
758
  </label>
753
759
  {fieldDescription && (
754
760
  <p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
@@ -767,18 +773,17 @@ export default function CheckoutDemoPage() {
767
773
  <div key={fieldName} className="space-y-1">
768
774
  <label htmlFor={fieldName} className={labelClasses}>
769
775
  {fieldTitle}
770
- {required && <span className="text-red-600 ml-1">*</span>}
776
+ {required && <span className="text-status-error-text ml-1">*</span>}
771
777
  </label>
772
778
  {fieldDescription && (
773
779
  <p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
774
780
  )}
775
- <input
781
+ <Input
776
782
  type="date"
777
783
  id={fieldName}
778
784
  value={formData[fieldName] || ''}
779
785
  onChange={(e) => handleFieldChange(fieldName, e.target.value)}
780
786
  required={required}
781
- className={inputClasses}
782
787
  />
783
788
  </div>
784
789
  )
@@ -788,18 +793,17 @@ export default function CheckoutDemoPage() {
788
793
  <div key={fieldName} className="space-y-1">
789
794
  <label htmlFor={fieldName} className={labelClasses}>
790
795
  {fieldTitle}
791
- {required && <span className="text-red-600 ml-1">*</span>}
796
+ {required && <span className="text-status-error-text ml-1">*</span>}
792
797
  </label>
793
798
  {fieldDescription && (
794
799
  <p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
795
800
  )}
796
- <textarea
801
+ <Textarea
797
802
  id={fieldName}
798
803
  value={formData[fieldName] || ''}
799
804
  onChange={(e) => handleFieldChange(fieldName, e.target.value)}
800
805
  required={required}
801
806
  rows={3}
802
- className={inputClasses}
803
807
  />
804
808
  </div>
805
809
  )
@@ -808,7 +812,7 @@ export default function CheckoutDemoPage() {
808
812
  <div key={fieldName} className="space-y-1">
809
813
  <label htmlFor={fieldName} className={labelClasses}>
810
814
  {fieldTitle}
811
- {required && <span className="text-red-600 ml-1">*</span>}
815
+ {required && <span className="text-status-error-text ml-1">*</span>}
812
816
  </label>
813
817
  {fieldDescription && (
814
818
  <p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
@@ -829,7 +833,7 @@ export default function CheckoutDemoPage() {
829
833
  <div key={fieldName} className="space-y-1">
830
834
  <label htmlFor={fieldName} className={labelClasses}>
831
835
  {fieldTitle}
832
- {required && <span className="text-red-600 ml-1">*</span>}
836
+ {required && <span className="text-status-error-text ml-1">*</span>}
833
837
  </label>
834
838
  {fieldDescription && (
835
839
  <p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
@@ -849,16 +853,14 @@ export default function CheckoutDemoPage() {
849
853
  return (
850
854
  <div key={fieldName} className="space-y-1">
851
855
  <div className="flex items-center gap-2">
852
- <input
853
- type="checkbox"
856
+ <Checkbox
854
857
  id={fieldName}
855
858
  checked={!!formData[fieldName]}
856
- onChange={(e) => handleFieldChange(fieldName, e.target.checked)}
857
- className="w-4 h-4 text-yellow-600 border-gray-300 rounded focus-visible:ring-ring"
859
+ onCheckedChange={(v) => handleFieldChange(fieldName, v === true)}
858
860
  />
859
861
  <label htmlFor={fieldName} className="text-sm font-medium text-gray-700">
860
862
  {fieldTitle}
861
- {required && <span className="text-red-600 ml-1">*</span>}
863
+ {required && <span className="text-status-error-text ml-1">*</span>}
862
864
  </label>
863
865
  </div>
864
866
  {fieldDescription && (
@@ -872,7 +874,7 @@ export default function CheckoutDemoPage() {
872
874
  <div key={fieldName} className="space-y-1">
873
875
  <label htmlFor={fieldName} className={labelClasses}>
874
876
  {fieldTitle}
875
- {required && <span className="text-red-600 ml-1">*</span>}
877
+ {required && <span className="text-status-error-text ml-1">*</span>}
876
878
  </label>
877
879
  {fieldDescription && (
878
880
  <p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
@@ -915,15 +917,15 @@ export default function CheckoutDemoPage() {
915
917
  <div className="mb-6 pb-6 border-b border-gray-200">
916
918
  <label htmlFor="customer-select" className="block text-sm font-medium text-gray-700 mb-2">
917
919
  {t('workflows.checkoutDemo.customer.selectLabel', 'Select Customer')}{' '}
918
- <span className="text-red-600">*</span>
920
+ <span className="text-status-error-text">*</span>
919
921
  </label>
920
922
  {customersLoading ? (
921
923
  <div className="flex items-center justify-center py-3 text-sm text-gray-500">
922
- <div className="inline-block w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin mr-2"></div>
924
+ <Spinner size="sm" className="mr-2" />
923
925
  {t('workflows.checkoutDemo.customer.loading', 'Loading customers...')}
924
926
  </div>
925
927
  ) : customers.length === 0 ? (
926
- <div className="bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-sm text-yellow-800">
928
+ <div className="bg-status-warning-bg border border-status-warning-border rounded-lg p-3 text-sm text-status-warning-text">
927
929
  {t('workflows.checkoutDemo.customer.noneFound', 'No customers found. Please create a customer first.')}
928
930
  </div>
929
931
  ) : (
@@ -973,11 +975,11 @@ export default function CheckoutDemoPage() {
973
975
  </label>
974
976
  {productsLoading ? (
975
977
  <div className="flex items-center justify-center py-3 text-sm text-gray-500">
976
- <div className="inline-block w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin mr-2"></div>
978
+ <Spinner size="sm" className="mr-2" />
977
979
  {t('workflows.checkoutDemo.product.loading', 'Loading products...')}
978
980
  </div>
979
981
  ) : products.length === 0 ? (
980
- <div className="bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-sm text-yellow-800">
982
+ <div className="bg-status-warning-bg border border-status-warning-border rounded-lg p-3 text-sm text-status-warning-text">
981
983
  {t('workflows.checkoutDemo.product.noneFound', 'No products found. Please create products in the catalog first.')}
982
984
  </div>
983
985
  ) : (
@@ -1042,31 +1044,40 @@ export default function CheckoutDemoPage() {
1042
1044
  <p className="text-xs text-gray-500">{currencySymbol}{item.price.toFixed(2)} {t('workflows.checkoutDemo.cart.pricePerUnitSuffix', 'each')}</p>
1043
1045
  </div>
1044
1046
  <div className="flex items-center gap-2">
1045
- <button
1047
+ <IconButton
1048
+ type="button"
1049
+ variant="outline"
1050
+ size="sm"
1051
+ aria-label={t('workflows.checkoutDemo.cart.decreaseQty', 'Decrease quantity')}
1046
1052
  onClick={() => updateQuantity(item.id, item.quantity - 1)}
1047
- className="w-7 h-7 flex items-center justify-center rounded border border-gray-300 hover:bg-gray-50 text-gray-600"
1048
1053
  >
1049
- -
1050
- </button>
1054
+ <Minus />
1055
+ </IconButton>
1051
1056
  <span className="w-8 text-center text-sm font-medium">{item.quantity}</span>
1052
- <button
1057
+ <IconButton
1058
+ type="button"
1059
+ variant="outline"
1060
+ size="sm"
1061
+ aria-label={t('workflows.checkoutDemo.cart.increaseQty', 'Increase quantity')}
1053
1062
  onClick={() => updateQuantity(item.id, item.quantity + 1)}
1054
- className="w-7 h-7 flex items-center justify-center rounded border border-gray-300 hover:bg-gray-50 text-gray-600"
1055
1063
  >
1056
- +
1057
- </button>
1064
+ <Plus />
1065
+ </IconButton>
1058
1066
  </div>
1059
1067
  <div className="flex items-center gap-2">
1060
1068
  <p className="font-medium text-gray-900 min-w-[80px] text-right">
1061
1069
  {currencySymbol}{(item.price * item.quantity).toFixed(2)}
1062
1070
  </p>
1063
- <button
1071
+ <IconButton
1072
+ type="button"
1073
+ variant="ghost"
1074
+ size="sm"
1075
+ className="text-status-error-text hover:bg-status-error-bg"
1076
+ aria-label={t('workflows.checkoutDemo.cart.removeItemTitle', 'Remove from cart')}
1064
1077
  onClick={() => removeFromCart(item.id)}
1065
- className="w-7 h-7 flex items-center justify-center rounded hover:bg-red-50 text-red-600"
1066
- title={t('workflows.checkoutDemo.cart.removeItemTitle', 'Remove from cart')}
1067
1078
  >
1068
- ×
1069
- </button>
1079
+ <X />
1080
+ </IconButton>
1070
1081
  </div>
1071
1082
  </div>
1072
1083
  ))}
@@ -1095,16 +1106,14 @@ export default function CheckoutDemoPage() {
1095
1106
 
1096
1107
  {/* Validation Errors */}
1097
1108
  {validationErrors.length > 0 && (
1098
- <div className="bg-red-50 border border-red-200 rounded-lg p-4 mt-6">
1099
- <h4 className="text-sm font-medium text-red-800 mb-2 flex items-center gap-2">
1100
- <svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
1101
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
1102
- </svg>
1109
+ <div className="bg-status-error-bg border border-status-error-border rounded-lg p-4 mt-6">
1110
+ <h4 className="text-sm font-medium text-status-error-text mb-2 flex items-center gap-2">
1111
+ <AlertCircle className="h-4 w-4" />
1103
1112
  {t('workflows.checkoutDemo.validation.errorTitle', 'Cannot start checkout')}
1104
1113
  </h4>
1105
1114
  <ul className="list-disc list-inside space-y-1">
1106
1115
  {validationErrors.map((err, idx) => (
1107
- <li key={idx} className="text-sm text-red-700">
1116
+ <li key={idx} className="text-sm text-status-error-text">
1108
1117
  {err.message}
1109
1118
  </li>
1110
1119
  ))}
@@ -1143,18 +1152,18 @@ export default function CheckoutDemoPage() {
1143
1152
  {result && (result.currentStepId === 'start' || result.currentStepId === 'cart_validation') && (
1144
1153
  <>
1145
1154
  <h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
1146
- <span className="inline-block w-2 h-2 bg-blue-600 rounded-full animate-pulse"></span>
1155
+ <span className="inline-block w-2 h-2 bg-status-info-icon rounded-full animate-pulse"></span>
1147
1156
  {t('workflows.checkoutDemo.cartValidation.title', 'Validating Cart')}
1148
1157
  </h2>
1149
1158
  <div className="space-y-4">
1150
1159
  {result.status === 'WAITING_FOR_ACTIVITIES' ? (
1151
- <div className="bg-purple-50 border border-purple-200 rounded-lg p-4">
1152
- <p className="text-sm text-purple-800 font-medium">{t('workflows.checkoutDemo.cartValidation.processingActivities', 'Processing background activities...')}</p>
1153
- <p className="text-xs text-purple-700 mt-1">{t('workflows.checkoutDemo.cartValidation.processingActivitiesHint', 'The workflow is waiting for async tasks to complete before proceeding.')}</p>
1160
+ <div className="bg-status-info-bg border border-status-info-border rounded-lg p-4">
1161
+ <p className="text-sm text-status-info-text font-medium">{t('workflows.checkoutDemo.cartValidation.processingActivities', 'Processing background activities...')}</p>
1162
+ <p className="text-xs text-status-info-text mt-1">{t('workflows.checkoutDemo.cartValidation.processingActivitiesHint', 'The workflow is waiting for async tasks to complete before proceeding.')}</p>
1154
1163
  </div>
1155
1164
  ) : (
1156
- <div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
1157
- <p className="text-sm text-blue-800">{t('workflows.checkoutDemo.cartValidation.inventoryCheck', 'Checking cart items and inventory availability...')}</p>
1165
+ <div className="bg-status-info-bg border border-status-info-border rounded-lg p-4">
1166
+ <p className="text-sm text-status-info-text">{t('workflows.checkoutDemo.cartValidation.inventoryCheck', 'Checking cart items and inventory availability...')}</p>
1158
1167
  </div>
1159
1168
  )}
1160
1169
  {demoCart.map((item) => (
@@ -1163,7 +1172,7 @@ export default function CheckoutDemoPage() {
1163
1172
  <p className="font-medium text-gray-900">{item.name}</p>
1164
1173
  <p className="text-xs text-gray-500">{t('workflows.checkoutDemo.cartValidation.qtyPrefix', 'Qty:')} {item.quantity}</p>
1165
1174
  </div>
1166
- <span className="text-green-600 text-sm">{t('workflows.checkoutDemo.cartValidation.available', '✓ Available')}</span>
1175
+ <span className="text-status-success-text text-sm">{t('workflows.checkoutDemo.cartValidation.available', '✓ Available')}</span>
1167
1176
  </div>
1168
1177
  ))}
1169
1178
  <div className="pt-2 border-t border-gray-200">
@@ -1177,25 +1186,25 @@ export default function CheckoutDemoPage() {
1177
1186
  {result && result.currentStepId === 'customer_info' && (
1178
1187
  <>
1179
1188
  <h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
1180
- <span className="inline-block w-2 h-2 bg-yellow-600 rounded-full animate-pulse"></span>
1189
+ <span className="inline-block w-2 h-2 bg-status-warning-icon rounded-full animate-pulse"></span>
1181
1190
  {t('workflows.checkoutDemo.customerInfo.title', 'Customer Information Required')}
1182
1191
  </h2>
1183
1192
  <div className="space-y-4">
1184
- <div className="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
1185
- <p className="text-sm text-yellow-800 font-medium mb-2">
1193
+ <div className="bg-status-warning-bg border border-status-warning-border rounded-lg p-4">
1194
+ <p className="text-sm text-status-warning-text font-medium mb-2">
1186
1195
  {t('workflows.checkoutDemo.customerInfo.promptTitle', 'Please provide your shipping information')}
1187
1196
  </p>
1188
- <p className="text-xs text-yellow-700">
1197
+ <p className="text-xs text-status-warning-text">
1189
1198
  {t('workflows.checkoutDemo.customerInfo.promptHint', 'The workflow is paused waiting for customer details. Complete the form to continue checkout.')}
1190
1199
  </p>
1191
1200
  </div>
1192
1201
 
1193
1202
  {tasksError ? (
1194
- <div className="bg-red-50 border border-red-200 rounded-lg p-4">
1195
- <p className="text-sm text-red-800 font-medium mb-2">
1203
+ <div className="bg-status-error-bg border border-status-error-border rounded-lg p-4">
1204
+ <p className="text-sm text-status-error-text font-medium mb-2">
1196
1205
  {t('workflows.checkoutDemo.customerInfo.errorLoadingTask', 'Error loading task')}
1197
1206
  </p>
1198
- <p className="text-xs text-red-700 mb-3">
1207
+ <p className="text-xs text-status-error-text mb-3">
1199
1208
  {tasksError instanceof Error ? tasksError.message : t('workflows.checkoutDemo.customerInfo.unknownError', 'Unknown error')}
1200
1209
  </p>
1201
1210
  <Button
@@ -1208,17 +1217,17 @@ export default function CheckoutDemoPage() {
1208
1217
  </Button>
1209
1218
  </div>
1210
1219
  ) : tasksLoading ? (
1211
- <div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
1220
+ <div className="bg-status-info-bg border border-status-info-border rounded-lg p-4">
1212
1221
  <div className="flex items-center justify-center py-4">
1213
- <div className="inline-block w-8 h-8 border-4 border-yellow-600 border-t-transparent rounded-full animate-spin"></div>
1222
+ <Spinner size="lg" />
1214
1223
  <p className="ml-3 text-sm text-gray-600">{t('workflows.checkoutDemo.customerInfo.loading', 'Loading task...')}</p>
1215
1224
  </div>
1216
1225
  </div>
1217
1226
  ) : userTasks.length > 0 ? (
1218
1227
  <form onSubmit={handleTaskSubmit} className="bg-white border border-gray-200 rounded-lg p-4 space-y-4">
1219
1228
  {taskError && (
1220
- <div className="bg-red-50 border border-red-200 rounded-lg p-3">
1221
- <p className="text-sm text-red-800">{taskError}</p>
1229
+ <div className="bg-status-error-bg border border-status-error-border rounded-lg p-3">
1230
+ <p className="text-sm text-status-error-text">{taskError}</p>
1222
1231
  </div>
1223
1232
  )}
1224
1233
 
@@ -1235,7 +1244,7 @@ export default function CheckoutDemoPage() {
1235
1244
  <Button
1236
1245
  type="submit"
1237
1246
  disabled={submittingTask}
1238
- className="w-full bg-yellow-600 hover:bg-yellow-700 text-white font-medium"
1247
+ className="w-full font-medium"
1239
1248
  >
1240
1249
  {submittingTask
1241
1250
  ? t('workflows.checkoutDemo.customerInfo.submitting', 'Submitting...')
@@ -1244,11 +1253,11 @@ export default function CheckoutDemoPage() {
1244
1253
  </div>
1245
1254
  </form>
1246
1255
  ) : (
1247
- <div className="bg-orange-50 border border-orange-200 rounded-lg p-4">
1248
- <p className="text-sm text-orange-800 font-medium mb-2">
1256
+ <div className="bg-status-warning-bg border border-status-warning-border rounded-lg p-4">
1257
+ <p className="text-sm text-status-warning-text font-medium mb-2">
1249
1258
  {t('workflows.checkoutDemo.customerInfo.noTaskTitle', 'No task found')}
1250
1259
  </p>
1251
- <p className="text-xs text-orange-700 mb-3">
1260
+ <p className="text-xs text-status-warning-text mb-3">
1252
1261
  {t('workflows.checkoutDemo.customerInfo.noTaskHint', 'The user task may still be creating. This usually takes less than a second.')}
1253
1262
  </p>
1254
1263
  <Button
@@ -1269,12 +1278,12 @@ export default function CheckoutDemoPage() {
1269
1278
  {result && result.currentStepId === 'payment_initiation' && (
1270
1279
  <>
1271
1280
  <h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
1272
- <span className="inline-block w-2 h-2 bg-blue-600 rounded-full animate-pulse"></span>
1281
+ <span className="inline-block w-2 h-2 bg-status-info-icon rounded-full animate-pulse"></span>
1273
1282
  {t('workflows.checkoutDemo.paymentInitiation.title', 'Initiating Payment')}
1274
1283
  </h2>
1275
1284
  <div className="space-y-6">
1276
- <div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
1277
- <p className="text-sm text-blue-800 font-medium mb-2">{t('workflows.checkoutDemo.paymentInitiation.detailsTitle', 'Payment Details')}</p>
1285
+ <div className="bg-status-info-bg border border-status-info-border rounded-lg p-4">
1286
+ <p className="text-sm text-status-info-text font-medium mb-2">{t('workflows.checkoutDemo.paymentInitiation.detailsTitle', 'Payment Details')}</p>
1278
1287
  <div className="space-y-2 text-sm">
1279
1288
  <div className="flex justify-between">
1280
1289
  <span className="text-gray-600">{t('workflows.checkoutDemo.paymentInitiation.methodLabel', 'Method:')}</span>
@@ -1288,7 +1297,7 @@ export default function CheckoutDemoPage() {
1288
1297
  </div>
1289
1298
  <div className="flex items-center justify-center py-8">
1290
1299
  <div className="text-center">
1291
- <div className="inline-block w-16 h-16 border-4 border-blue-600 border-t-transparent rounded-full animate-spin mb-4"></div>
1300
+ <Spinner size="lg" className="mb-4" />
1292
1301
  <p className="text-sm text-gray-600">{t('workflows.checkoutDemo.paymentInitiation.sending', 'Sending payment request...')}</p>
1293
1302
  </div>
1294
1303
  </div>
@@ -1300,52 +1309,40 @@ export default function CheckoutDemoPage() {
1300
1309
  {result && result.currentStepId === 'wait_payment_confirmation' && (
1301
1310
  <>
1302
1311
  <h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
1303
- <span className="inline-block w-2 h-2 bg-yellow-600 rounded-full animate-pulse"></span>
1312
+ <span className="inline-block w-2 h-2 bg-status-warning-icon rounded-full animate-pulse"></span>
1304
1313
  {t('workflows.checkoutDemo.waitPayment.title', 'Waiting for Payment Confirmation')}
1305
1314
  </h2>
1306
1315
  <div className="space-y-4">
1307
- <div className="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
1308
- <p className="text-sm text-yellow-800 font-medium mb-2">
1316
+ <div className="bg-status-warning-bg border border-status-warning-border rounded-lg p-4">
1317
+ <p className="text-sm text-status-warning-text font-medium mb-2">
1309
1318
  {t('workflows.checkoutDemo.waitPayment.heading', 'Awaiting Payment Provider Webhook')}
1310
1319
  </p>
1311
- <p className="text-xs text-yellow-700 mb-3">
1320
+ <p className="text-xs text-status-warning-text mb-3">
1312
1321
  {t('workflows.checkoutDemo.waitPayment.description', 'The workflow is paused waiting for the payment provider to confirm the transaction via webhook. In production, this would be sent automatically by Stripe, PayPal, etc.')}
1313
1322
  </p>
1314
- <div className="space-y-2 text-xs text-yellow-700">
1323
+ <div className="space-y-2 text-xs text-status-warning-text">
1315
1324
  <div className="flex items-center gap-2">
1316
- <span className="inline-block w-1.5 h-1.5 bg-yellow-600 rounded-full"></span>
1325
+ <span className="inline-block w-1.5 h-1.5 bg-status-warning-icon rounded-full"></span>
1317
1326
  <span>{t('workflows.checkoutDemo.waitPayment.statusLabel', 'Status:')} <strong>{result.status}</strong></span>
1318
1327
  </div>
1319
1328
  <div className="flex items-center gap-2">
1320
- <span className="inline-block w-1.5 h-1.5 bg-yellow-600 rounded-full"></span>
1321
- <span>{t('workflows.checkoutDemo.waitPayment.signalNameLabel', 'Signal Name:')} <code className="bg-yellow-100 px-1 py-0.5 rounded">payment_confirmed</code></span>
1329
+ <span className="inline-block w-1.5 h-1.5 bg-status-warning-icon rounded-full"></span>
1330
+ <span>{t('workflows.checkoutDemo.waitPayment.signalNameLabel', 'Signal Name:')} <code className="bg-status-warning-bg px-1 py-0.5 rounded">payment_confirmed</code></span>
1322
1331
  </div>
1323
1332
  <div className="flex items-center gap-2">
1324
- <span className="inline-block w-1.5 h-1.5 bg-yellow-600 rounded-full"></span>
1333
+ <span className="inline-block w-1.5 h-1.5 bg-status-warning-icon rounded-full"></span>
1325
1334
  <span>{t('workflows.checkoutDemo.waitPayment.timeout', 'Timeout: 5 minutes')}</span>
1326
1335
  </div>
1327
1336
  </div>
1328
1337
  </div>
1329
1338
 
1330
1339
  {signalError && (
1331
- <div className="bg-red-50 border border-red-200 rounded-lg p-4">
1340
+ <div className="bg-status-error-bg border border-status-error-border rounded-lg p-4">
1332
1341
  <div className="flex items-start">
1333
- <svg
1334
- className="h-5 w-5 text-red-600 mt-0.5 flex-shrink-0"
1335
- fill="none"
1336
- viewBox="0 0 24 24"
1337
- stroke="currentColor"
1338
- >
1339
- <path
1340
- strokeLinecap="round"
1341
- strokeLinejoin="round"
1342
- strokeWidth={2}
1343
- d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1344
- />
1345
- </svg>
1342
+ <AlertCircle className="h-5 w-5 text-status-error-text mt-0.5 flex-shrink-0" />
1346
1343
  <div className="ml-3">
1347
- <h3 className="text-sm font-medium text-red-800">{t('workflows.checkoutDemo.waitPayment.signalErrorTitle', 'Signal Error')}</h3>
1348
- <p className="text-sm text-red-700 mt-1 whitespace-pre-wrap">{signalError}</p>
1344
+ <h3 className="text-sm font-medium text-status-error-text">{t('workflows.checkoutDemo.waitPayment.signalErrorTitle', 'Signal Error')}</h3>
1345
+ <p className="text-sm text-status-error-text mt-1 whitespace-pre-wrap">{signalError}</p>
1349
1346
  <Button
1350
1347
  onClick={() => setSignalError(null)}
1351
1348
  variant="outline"
@@ -1368,7 +1365,7 @@ export default function CheckoutDemoPage() {
1368
1365
  <Button
1369
1366
  onClick={handleSendPaymentSignal}
1370
1367
  disabled={sendingSignal || result.status !== 'PAUSED'}
1371
- className="w-full bg-yellow-600 hover:bg-yellow-700 text-white font-medium"
1368
+ className="w-full font-medium"
1372
1369
  >
1373
1370
  {sendingSignal
1374
1371
  ? t('workflows.checkoutDemo.waitPayment.sendingSignal', 'Sending Signal...')
@@ -1381,16 +1378,16 @@ export default function CheckoutDemoPage() {
1381
1378
  )}
1382
1379
 
1383
1380
  {result.status !== 'PAUSED' && (
1384
- <div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
1385
- <p className="text-sm text-blue-800">
1381
+ <div className="bg-status-info-bg border border-status-info-border rounded-lg p-4">
1382
+ <p className="text-sm text-status-info-text">
1386
1383
  <strong>{t('workflows.checkoutDemo.waitPayment.noteLabel', 'Note:')}</strong> {t('workflows.checkoutDemo.waitPayment.noteStatusPrefix', 'Workflow status is ')}<strong>{result.status}</strong>{t('workflows.checkoutDemo.waitPayment.noteStatusSuffix', '. The signal button will appear when the workflow is fully paused at this step.')}
1387
1384
  </p>
1388
1385
  </div>
1389
1386
  )}
1390
1387
 
1391
- <div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
1392
- <p className="text-xs text-blue-800">
1393
- <strong>{t('workflows.checkoutDemo.waitPayment.realWorldLabel', 'Real-world scenario:')}</strong> {t('workflows.checkoutDemo.waitPayment.realWorldPart1', 'Your payment provider (Stripe, PayPal) would send a webhook to your server endpoint (e.g., ')}<code className="bg-blue-100 px-1 py-0.5 rounded">/api/webhooks/payments</code>{t('workflows.checkoutDemo.waitPayment.realWorldPart2', '), which would then call ')}<code className="bg-blue-100 px-1 py-0.5 rounded">POST /api/workflows/instances/[id]/signal</code>{t('workflows.checkoutDemo.waitPayment.realWorldPart3', ' to resume the workflow.')}
1388
+ <div className="bg-status-info-bg border border-status-info-border rounded-lg p-4">
1389
+ <p className="text-xs text-status-info-text">
1390
+ <strong>{t('workflows.checkoutDemo.waitPayment.realWorldLabel', 'Real-world scenario:')}</strong> {t('workflows.checkoutDemo.waitPayment.realWorldPart1', 'Your payment provider (Stripe, PayPal) would send a webhook to your server endpoint (e.g., ')}<code className="bg-status-info-bg px-1 py-0.5 rounded">/api/webhooks/payments</code>{t('workflows.checkoutDemo.waitPayment.realWorldPart2', '), which would then call ')}<code className="bg-status-info-bg px-1 py-0.5 rounded">POST /api/workflows/instances/[id]/signal</code>{t('workflows.checkoutDemo.waitPayment.realWorldPart3', ' to resume the workflow.')}
1394
1391
  </p>
1395
1392
  </div>
1396
1393
  </div>
@@ -1401,21 +1398,21 @@ export default function CheckoutDemoPage() {
1401
1398
  {result && result.currentStepId === 'order_confirmation' && (
1402
1399
  <>
1403
1400
  <h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
1404
- <span className="inline-block w-2 h-2 bg-blue-600 rounded-full animate-pulse"></span>
1401
+ <span className="inline-block w-2 h-2 bg-status-info-icon rounded-full animate-pulse"></span>
1405
1402
  {t('workflows.checkoutDemo.orderConfirmation.title', 'Creating Order')}
1406
1403
  </h2>
1407
1404
  <div className="space-y-6">
1408
- <div className="bg-green-50 border border-green-200 rounded-lg p-4">
1409
- <p className="text-sm text-green-800 font-medium mb-1">{t('workflows.checkoutDemo.orderConfirmation.paymentSuccess', 'Payment Successful!')}</p>
1410
- <p className="text-xs text-green-700">{t('workflows.checkoutDemo.orderConfirmation.transactionIdPrefix', 'Transaction ID: ')}{result.instanceId.slice(0, 8)}...</p>
1405
+ <div className="bg-status-success-bg border border-status-success-border rounded-lg p-4">
1406
+ <p className="text-sm text-status-success-text font-medium mb-1">{t('workflows.checkoutDemo.orderConfirmation.paymentSuccess', 'Payment Successful!')}</p>
1407
+ <p className="text-xs text-status-success-text">{t('workflows.checkoutDemo.orderConfirmation.transactionIdPrefix', 'Transaction ID: ')}{result.instanceId.slice(0, 8)}...</p>
1411
1408
  </div>
1412
1409
  <div className="space-y-3">
1413
1410
  <div className="flex items-center gap-2 text-sm">
1414
- <span className="text-green-600">✓</span>
1411
+ <span className="text-status-success-text">✓</span>
1415
1412
  <span className="text-gray-700">{t('workflows.checkoutDemo.orderConfirmation.creatingRecord', 'Creating order record')}</span>
1416
1413
  </div>
1417
1414
  <div className="flex items-center gap-2 text-sm">
1418
- <span className="inline-block w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"></span>
1415
+ <Spinner size="sm" />
1419
1416
  <span className="text-gray-700">{t('workflows.checkoutDemo.orderConfirmation.sendingEmail', 'Sending confirmation email')}</span>
1420
1417
  </div>
1421
1418
  <div className="flex items-center gap-2 text-sm">
@@ -1431,10 +1428,8 @@ export default function CheckoutDemoPage() {
1431
1428
  {result && result.status === 'COMPLETED' && (
1432
1429
  <>
1433
1430
  <div className="text-center mb-6">
1434
- <div className="inline-flex items-center justify-center w-16 h-16 bg-green-100 rounded-full mb-4">
1435
- <svg className="w-8 h-8 text-green-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
1436
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
1437
- </svg>
1431
+ <div className="inline-flex items-center justify-center w-16 h-16 bg-status-success-bg rounded-full mb-4">
1432
+ <Check className="w-8 h-8 text-status-success-text" />
1438
1433
  </div>
1439
1434
  <h2 className="text-2xl font-bold text-gray-900 mb-2">{t('workflows.checkoutDemo.completed.title', 'Order Confirmed!')}</h2>
1440
1435
  <p className="text-sm text-gray-600">{t('workflows.checkoutDemo.completed.orderNumberPrefix', 'Order #')}{result.instanceId.slice(0, 8).toUpperCase()}</p>
@@ -1466,8 +1461,8 @@ export default function CheckoutDemoPage() {
1466
1461
  ))}
1467
1462
  </div>
1468
1463
 
1469
- <div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
1470
- <p className="text-xs text-blue-800">
1464
+ <div className="bg-status-info-bg border border-status-info-border rounded-lg p-4">
1465
+ <p className="text-xs text-status-info-text">
1471
1466
  {t('workflows.checkoutDemo.completed.emailSent', '✉️ A confirmation email has been sent to demo@example.com')}
1472
1467
  </p>
1473
1468
  </div>
@@ -1489,9 +1484,9 @@ export default function CheckoutDemoPage() {
1489
1484
  {/* Failed State */}
1490
1485
  {result && result.status === 'FAILED' && (
1491
1486
  <>
1492
- <h2 className="text-xl font-semibold text-red-900 mb-4">{t('workflows.checkoutDemo.failed.title', 'Order Failed')}</h2>
1493
- <div className="bg-red-50 border border-red-200 rounded-lg p-4">
1494
- <p className="text-sm text-red-800">
1487
+ <h2 className="text-xl font-semibold text-status-error-text mb-4">{t('workflows.checkoutDemo.failed.title', 'Order Failed')}</h2>
1488
+ <div className="bg-status-error-bg border border-status-error-border rounded-lg p-4">
1489
+ <p className="text-sm text-status-error-text">
1495
1490
  {t('workflows.checkoutDemo.failed.message', 'Unfortunately, your order could not be processed. Please try again.')}
1496
1491
  </p>
1497
1492
  </div>
@@ -1514,19 +1509,7 @@ export default function CheckoutDemoPage() {
1514
1509
 
1515
1510
  {!result && !error && (
1516
1511
  <div className="text-center py-12">
1517
- <svg
1518
- className="mx-auto h-12 w-12 text-gray-400"
1519
- fill="none"
1520
- viewBox="0 0 24 24"
1521
- stroke="currentColor"
1522
- >
1523
- <path
1524
- strokeLinecap="round"
1525
- strokeLinejoin="round"
1526
- strokeWidth={2}
1527
- d="M13 10V3L4 14h7v7l9-11h-7z"
1528
- />
1529
- </svg>
1512
+ <Zap className="mx-auto h-12 w-12 text-muted-foreground" />
1530
1513
  <p className="mt-4 text-gray-600">
1531
1514
  {t('workflows.checkoutDemo.progress.prompt', 'Click "Start Checkout Workflow" to begin')}
1532
1515
  </p>
@@ -1535,30 +1518,18 @@ export default function CheckoutDemoPage() {
1535
1518
 
1536
1519
  {loading && (
1537
1520
  <div className="text-center py-12">
1538
- <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"></div>
1521
+ <Spinner size="lg" className="mx-auto" />
1539
1522
  <p className="mt-4 text-gray-600">{t('workflows.checkoutDemo.progress.startingWorkflow', 'Starting workflow...')}</p>
1540
1523
  </div>
1541
1524
  )}
1542
1525
 
1543
1526
  {error && (
1544
- <div className="bg-red-50 border border-red-200 rounded-lg p-4">
1527
+ <div className="bg-status-error-bg border border-status-error-border rounded-lg p-4">
1545
1528
  <div className="flex items-start">
1546
- <svg
1547
- className="h-5 w-5 text-red-600 mt-0.5 flex-shrink-0"
1548
- fill="none"
1549
- viewBox="0 0 24 24"
1550
- stroke="currentColor"
1551
- >
1552
- <path
1553
- strokeLinecap="round"
1554
- strokeLinejoin="round"
1555
- strokeWidth={2}
1556
- d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1557
- />
1558
- </svg>
1529
+ <AlertCircle className="h-5 w-5 text-status-error-text mt-0.5 flex-shrink-0" />
1559
1530
  <div className="ml-3 flex-1">
1560
- <h3 className="text-sm font-medium text-red-800">{t('workflows.checkoutDemo.progress.errorTitle', 'Error')}</h3>
1561
- <p className="mt-1 text-sm text-red-700 whitespace-pre-wrap">{error}</p>
1531
+ <h3 className="text-sm font-medium text-status-error-text">{t('workflows.checkoutDemo.progress.errorTitle', 'Error')}</h3>
1532
+ <p className="mt-1 text-sm text-status-error-text whitespace-pre-wrap">{error}</p>
1562
1533
  <Button
1563
1534
  onClick={() => setError(null)}
1564
1535
  variant="outline"
@@ -1638,33 +1609,21 @@ export default function CheckoutDemoPage() {
1638
1609
  {/* User Task Required */}
1639
1610
  {result.status === 'PAUSED' && userTasks.length > 0 && (
1640
1611
  <div className="border-t border-gray-200 pt-4">
1641
- <div className="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
1612
+ <div className="bg-status-warning-bg border border-status-warning-border rounded-lg p-4">
1642
1613
  <div className="flex items-start mb-3">
1643
- <svg
1644
- className="h-5 w-5 text-yellow-600 mt-0.5"
1645
- fill="none"
1646
- viewBox="0 0 24 24"
1647
- stroke="currentColor"
1648
- >
1649
- <path
1650
- strokeLinecap="round"
1651
- strokeLinejoin="round"
1652
- strokeWidth={2}
1653
- d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
1654
- />
1655
- </svg>
1614
+ <AlertTriangle className="h-5 w-5 text-status-warning-text mt-0.5" />
1656
1615
  <div className="ml-3">
1657
- <h3 className="text-sm font-medium text-yellow-800">
1616
+ <h3 className="text-sm font-medium text-status-warning-text">
1658
1617
  {t('workflows.checkoutDemo.progress.userActionTitle', 'User Action Required')}
1659
1618
  </h3>
1660
- <p className="text-sm text-yellow-700 mt-1">
1619
+ <p className="text-sm text-status-warning-text mt-1">
1661
1620
  {t('workflows.checkoutDemo.progress.userActionHint', 'This workflow is paused waiting for user input. Please complete the task below to continue.')}
1662
1621
  </p>
1663
1622
  </div>
1664
1623
  </div>
1665
1624
 
1666
1625
  {userTasks.map((task: any) => (
1667
- <div key={task.id} className="mt-3 bg-white rounded-md p-3 border border-yellow-200">
1626
+ <div key={task.id} className="mt-3 bg-white rounded-md p-3 border border-status-warning-border">
1668
1627
  <div className="flex items-start justify-between">
1669
1628
  <div className="flex-1">
1670
1629
  <h4 className="text-sm font-semibold text-gray-900">{task.taskName}</h4>
@@ -1679,12 +1638,11 @@ export default function CheckoutDemoPage() {
1679
1638
  </div>
1680
1639
  </div>
1681
1640
  <div className="mt-3">
1682
- <a
1683
- href={`/backend/tasks/${task.id}`}
1684
- className="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-white bg-yellow-600 hover:bg-yellow-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring"
1685
- >
1686
- {t('workflows.checkoutDemo.progress.completeTask', 'Complete Task →')}
1687
- </a>
1641
+ <Button asChild>
1642
+ <a href={`/backend/tasks/${task.id}`}>
1643
+ {t('workflows.checkoutDemo.progress.completeTask', 'Complete Task →')}
1644
+ </a>
1645
+ </Button>
1688
1646
  </div>
1689
1647
  </div>
1690
1648
  ))}
@@ -1715,26 +1673,14 @@ export default function CheckoutDemoPage() {
1715
1673
 
1716
1674
  {/* Completed State */}
1717
1675
  {result.status === 'COMPLETED' && (
1718
- <div className="bg-green-50 border border-green-200 rounded-lg p-4">
1676
+ <div className="bg-status-success-bg border border-status-success-border rounded-lg p-4">
1719
1677
  <div className="flex items-start">
1720
- <svg
1721
- className="h-5 w-5 text-green-600 mt-0.5"
1722
- fill="none"
1723
- viewBox="0 0 24 24"
1724
- stroke="currentColor"
1725
- >
1726
- <path
1727
- strokeLinecap="round"
1728
- strokeLinejoin="round"
1729
- strokeWidth={2}
1730
- d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
1731
- />
1732
- </svg>
1678
+ <CheckCircle2 className="h-5 w-5 text-status-success-text mt-0.5" />
1733
1679
  <div className="ml-3">
1734
- <h3 className="text-sm font-medium text-green-800">
1680
+ <h3 className="text-sm font-medium text-status-success-text">
1735
1681
  {t('workflows.checkoutDemo.progress.workflowCompleted', 'Workflow Completed!')}
1736
1682
  </h3>
1737
- <p className="mt-1 text-sm text-green-700">
1683
+ <p className="mt-1 text-sm text-status-success-text">
1738
1684
  {t('workflows.checkoutDemo.progress.workflowCompletedHint', 'All steps executed successfully')}
1739
1685
  </p>
1740
1686
  </div>
@@ -1744,12 +1690,11 @@ export default function CheckoutDemoPage() {
1744
1690
 
1745
1691
  {/* Actions */}
1746
1692
  <div className="border-t border-gray-200 pt-4 space-y-3">
1747
- <Link
1748
- href={`/backend/instances/${result.instanceId}`}
1749
- className="block w-full text-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
1750
- >
1751
- {t('workflows.checkoutDemo.progress.viewInAdmin', 'View in Admin')}
1752
- </Link>
1693
+ <Button asChild className="w-full">
1694
+ <Link href={`/backend/instances/${result.instanceId}`}>
1695
+ {t('workflows.checkoutDemo.progress.viewInAdmin', 'View in Admin')}
1696
+ </Link>
1697
+ </Button>
1753
1698
 
1754
1699
  <Button
1755
1700
  onClick={() => {
@@ -1779,15 +1724,15 @@ export default function CheckoutDemoPage() {
1779
1724
  </span>
1780
1725
  </h2>
1781
1726
  {(result.status === 'RUNNING' || result.status === 'WAITING_FOR_ACTIVITIES') && (
1782
- <span className="inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800">
1783
- <span className="inline-block w-2 h-2 bg-red-600 rounded-full animate-pulse"></span>
1727
+ <span className="inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-status-error-bg text-status-error-text">
1728
+ <span className="inline-block w-2 h-2 bg-status-error-icon rounded-full animate-pulse"></span>
1784
1729
  {t('workflows.checkoutDemo.events.liveBadge', 'Live')}
1785
1730
  </span>
1786
1731
  )}
1787
1732
  </div>
1788
1733
  <Link
1789
1734
  href={`/backend/events?workflowInstanceId=${result.instanceId}`}
1790
- className="text-sm text-blue-600 hover:text-blue-800 hover:underline"
1735
+ className="text-sm text-primary hover:underline"
1791
1736
  >
1792
1737
  {t('workflows.checkoutDemo.events.viewAllLink', 'View all events →')}
1793
1738
  </Link>
@@ -1826,7 +1771,7 @@ export default function CheckoutDemoPage() {
1826
1771
  </div>
1827
1772
  <Link
1828
1773
  href={`/backend/events/${event.id}`}
1829
- className="text-xs text-blue-600 hover:text-blue-800 hover:underline whitespace-nowrap"
1774
+ className="text-xs text-primary hover:underline whitespace-nowrap"
1830
1775
  >
1831
1776
  {t('workflows.checkoutDemo.events.detailsLink', 'Details')}
1832
1777
  </Link>
@@ -1839,7 +1784,7 @@ export default function CheckoutDemoPage() {
1839
1784
  <div className="mt-4 text-center">
1840
1785
  <Link
1841
1786
  href={`/backend/events?workflowInstanceId=${result.instanceId}`}
1842
- className="text-sm text-blue-600 hover:text-blue-800 hover:underline"
1787
+ className="text-sm text-primary hover:underline"
1843
1788
  >
1844
1789
  {t('workflows.checkoutDemo.events.viewAllPrefix', 'View all')} {events.length} {t('workflows.checkoutDemo.events.viewAllSuffix', 'events →')}
1845
1790
  </Link>
@@ -1849,24 +1794,12 @@ export default function CheckoutDemoPage() {
1849
1794
  )}
1850
1795
 
1851
1796
  {/* Features Info */}
1852
- <div className="mt-4 bg-blue-50 border border-blue-200 rounded-lg p-4">
1797
+ <div className="mt-4 bg-status-info-bg border border-status-info-border rounded-lg p-4">
1853
1798
  <div className="flex items-start">
1854
- <svg
1855
- className="h-5 w-5 text-blue-600 mt-0.5"
1856
- fill="none"
1857
- viewBox="0 0 24 24"
1858
- stroke="currentColor"
1859
- >
1860
- <path
1861
- strokeLinecap="round"
1862
- strokeLinejoin="round"
1863
- strokeWidth={2}
1864
- d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1865
- />
1866
- </svg>
1799
+ <Info className="h-5 w-5 text-status-info-text mt-0.5" />
1867
1800
  <div className="ml-3">
1868
- <h3 className="text-sm font-medium text-blue-800">{t('workflows.checkoutDemo.features.title', 'Features')}</h3>
1869
- <div className="mt-2 text-sm text-blue-700">
1801
+ <h3 className="text-sm font-medium text-status-info-text">{t('workflows.checkoutDemo.features.title', 'Features')}</h3>
1802
+ <div className="mt-2 text-sm text-status-info-text">
1870
1803
  <ul className="list-disc list-inside space-y-1">
1871
1804
  <li><strong>{t('workflows.checkoutDemo.features.signalFlow.label', 'Signal-Based Payment Flow:')}</strong>{t('workflows.checkoutDemo.features.signalFlow.body', ' Demonstrates real-world webhook pattern with WAIT_FOR_SIGNAL step type')}</li>
1872
1805
  <li><strong>{t('workflows.checkoutDemo.features.interactiveUi.label', 'Interactive UI Changes:')}</strong>{t('workflows.checkoutDemo.features.interactiveUi.body', ' Left panel dynamically updates to show cart validation, payment initiation, webhook waiting, and order confirmation screens')}</li>
@@ -1879,7 +1812,7 @@ export default function CheckoutDemoPage() {
1879
1812
  <li><strong>{t('workflows.checkoutDemo.features.startPreconditions.label', 'START Step Pre-conditions:')}</strong>{t('workflows.checkoutDemo.features.startPreconditions.body', ' Validate business rules before workflow can start (e.g., cart not empty) with localized error messages')}</li>
1880
1813
  </ul>
1881
1814
  <p className="mt-2">
1882
- <Link href="/backend/definitions" className="text-blue-800 hover:text-blue-900 underline">
1815
+ <Link href="/backend/definitions" className="text-primary underline">
1883
1816
  {t('workflows.checkoutDemo.features.viewAllWorkflowsLink', 'View all workflows →')}
1884
1817
  </Link>
1885
1818
  </p>