@akinon/pz-theme 2.0.37-beta.0 → 2.0.37

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 (78) hide show
  1. package/CHANGELOG.md +4 -4
  2. package/package.json +4 -4
  3. package/src/__tests__/__snapshots__/facet-filters-block.test.tsx.snap +11 -0
  4. package/src/__tests__/custom-css.test.ts +181 -0
  5. package/src/__tests__/designer-chrome-clipping.test.tsx +497 -0
  6. package/src/__tests__/facet-filters-block.test.tsx +707 -0
  7. package/src/__tests__/item-template.test.tsx +184 -0
  8. package/src/__tests__/listing-controls.test.tsx +961 -0
  9. package/src/__tests__/part-style-scope.test.tsx +229 -0
  10. package/src/__tests__/part-styles.test.ts +311 -0
  11. package/src/__tests__/registry-parity.test.ts +42 -0
  12. package/src/__tests__/row-visibility.test.ts +672 -0
  13. package/src/__tests__/sort-select-page-cursor.test.tsx +336 -0
  14. package/src/__tests__/theme-block-html-id.test.tsx +167 -0
  15. package/src/blocks/__tests__/__snapshots__/product-gallery-block.test.tsx.snap +15 -0
  16. package/src/blocks/__tests__/accordion-block-state.test.tsx +201 -0
  17. package/src/blocks/__tests__/facet-filters-block.test.tsx +190 -0
  18. package/src/blocks/__tests__/listing-context-card-model.test.tsx +230 -0
  19. package/src/blocks/__tests__/listing-lookup-hardening.test.ts +80 -0
  20. package/src/blocks/__tests__/product-gallery-block.test.tsx +974 -0
  21. package/src/blocks/__tests__/product-grid-composition.test.tsx +570 -0
  22. package/src/blocks/__tests__/product-grid-lookups.test.tsx +230 -0
  23. package/src/blocks/__tests__/product-price-block.test.tsx +248 -0
  24. package/src/blocks/__tests__/product-recommendations-block.test.tsx +702 -0
  25. package/src/blocks/__tests__/share-block.test.tsx +392 -0
  26. package/src/blocks/__tests__/store-locator-block.test.tsx +691 -0
  27. package/src/blocks/__tests__/variant-selector-block.test.tsx +817 -0
  28. package/src/blocks/__tests__/variant-selector-golden.json +20 -0
  29. package/src/blocks/account-menu-block.tsx +264 -0
  30. package/src/blocks/add-to-cart-block.tsx +417 -0
  31. package/src/blocks/address-list-block.tsx +348 -0
  32. package/src/blocks/applied-filters-block.tsx +288 -0
  33. package/src/blocks/auth-form-block.tsx +295 -0
  34. package/src/blocks/basket-items-block.tsx +457 -0
  35. package/src/blocks/basket-summary-block.tsx +404 -0
  36. package/src/blocks/block-renderer-registry.tsx +94 -0
  37. package/src/blocks/change-password-form-block.tsx +240 -0
  38. package/src/blocks/checkout-steps-block.tsx +288 -0
  39. package/src/blocks/checkout-summary-block.tsx +449 -0
  40. package/src/blocks/countdown-block.tsx +182 -0
  41. package/src/blocks/coupon-list-block.tsx +292 -0
  42. package/src/blocks/facet-filters-block.tsx +1686 -0
  43. package/src/blocks/faq-accordion-block.tsx +358 -0
  44. package/src/blocks/favorite-button-block.tsx +252 -0
  45. package/src/blocks/favourites-grid-block.tsx +510 -0
  46. package/src/blocks/forgot-password-block.tsx +155 -0
  47. package/src/blocks/item-template-utils.ts +131 -0
  48. package/src/blocks/item-template.tsx +164 -0
  49. package/src/blocks/listing-breadcrumb-block.tsx +175 -0
  50. package/src/blocks/listing-context.ts +850 -0
  51. package/src/blocks/listing-pagination-block.tsx +923 -0
  52. package/src/blocks/listing-result-count-block.tsx +126 -0
  53. package/src/blocks/listing-title-block.tsx +115 -0
  54. package/src/blocks/oauth-buttons-block.tsx +205 -0
  55. package/src/blocks/order-detail-block.tsx +474 -0
  56. package/src/blocks/order-list-block.tsx +274 -0
  57. package/src/blocks/order-success-block.tsx +641 -0
  58. package/src/blocks/order-tracking-block.tsx +533 -0
  59. package/src/blocks/product-attributes-block.tsx +307 -0
  60. package/src/blocks/product-block-utils.tsx +639 -0
  61. package/src/blocks/product-breadcrumb-block.tsx +215 -0
  62. package/src/blocks/product-description-block.tsx +169 -0
  63. package/src/blocks/product-gallery-block.tsx +1523 -0
  64. package/src/blocks/product-grid-block.tsx +966 -0
  65. package/src/blocks/product-price-block.tsx +373 -0
  66. package/src/blocks/product-recommendations-block.tsx +1433 -0
  67. package/src/blocks/product-title-block.tsx +129 -0
  68. package/src/blocks/profile-form-block.tsx +297 -0
  69. package/src/blocks/recently-viewed-store.ts +201 -0
  70. package/src/blocks/register-form-block.tsx +362 -0
  71. package/src/blocks/share-block.tsx +667 -0
  72. package/src/blocks/size-guide-block.tsx +313 -0
  73. package/src/blocks/sort-select-block.tsx +636 -0
  74. package/src/blocks/stock-status-block.tsx +168 -0
  75. package/src/blocks/store-locator-block.tsx +1184 -0
  76. package/src/blocks/variant-selector-block.tsx +1110 -0
  77. package/src/sections/__tests__/tablet-raw-bucket-readers.test.tsx +186 -0
  78. package/src/utils/__tests__/part-ownership-guard.test.tsx +29 -4
@@ -0,0 +1,20 @@
1
+ {
2
+ "defaults": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
3
+ "defaults-designer": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
4
+ "dropdown": "<div data-variant-selector=\"\" data-variant-layout=\"dropdown\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><select data-variant-dropdown=\"\" data-part=\"dropdown\" aria-label=\"Color\" style=\"width: 100%; padding: 8px 10px; background: transparent;\"><option value=\"/p/blue\">Blue</option><option value=\"/p/red\">Red</option></select></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><select data-variant-dropdown=\"\" data-part=\"dropdown\" aria-label=\"Size\" style=\"width: 100%; padding: 8px 10px; background: transparent;\"><option value=\"/p/s\">S</option><option value=\"/p/m\">M</option><option value=\"/p/l\" disabled=\"\">L</option><option value=\"\" disabled=\"\">XL</option></select></div></div>",
5
+ "diagonal": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed; position: relative;\">L<svg data-part=\"strike\" aria-hidden=\"true\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; pointer-events: none;\"><line x1=\"0\" y1=\"100\" x2=\"100\" y2=\"0\" stroke=\"currentColor\" stroke-width=\"1\" vector-effect=\"non-scaling-stroke\"></line></svg></span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed; position: relative;\">XL<svg data-part=\"strike\" aria-hidden=\"true\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; pointer-events: none;\"><line x1=\"0\" y1=\"100\" x2=\"100\" y2=\"0\" stroke=\"currentColor\" stroke-width=\"1\" vector-effect=\"non-scaling-stroke\"></line></svg></span></div></div></div>",
6
+ "diagonal-w3": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed; position: relative;\">L<svg data-part=\"strike\" aria-hidden=\"true\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; pointer-events: none;\"><line x1=\"0\" y1=\"100\" x2=\"100\" y2=\"0\" stroke=\"currentColor\" stroke-width=\"3\" vector-effect=\"non-scaling-stroke\"></line></svg></span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed; position: relative;\">XL<svg data-part=\"strike\" aria-hidden=\"true\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; pointer-events: none;\"><line x1=\"0\" y1=\"100\" x2=\"100\" y2=\"0\" stroke=\"currentColor\" stroke-width=\"3\" vector-effect=\"non-scaling-stroke\"></line></svg></span></div></div></div>",
7
+ "nomark": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
8
+ "lowstock": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer; position: relative;\">Red<span data-part=\"low-stock\" role=\"img\" aria-label=\"Low stock\" style=\"position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; pointer-events: none;\"></span></a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer; position: relative;\">M<span data-part=\"low-stock\" role=\"img\" aria-label=\"Low stock\" style=\"position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; pointer-events: none;\"></span></a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
9
+ "lowstock-label": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer; position: relative;\">Red<span data-part=\"low-stock\" role=\"img\" aria-label=\"Few left\" style=\"position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; pointer-events: none;\"></span></a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer; position: relative;\">M<span data-part=\"low-stock\" role=\"img\" aria-label=\"Few left\" style=\"position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; pointer-events: none;\"></span></a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
10
+ "chip": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-variant-group-layout=\"chip\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" aria-label=\"Blue\" title=\"Blue\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; padding: 2px; text-decoration: none; opacity: 1; cursor: pointer;\"><span data-part=\"swatch\" style=\"display: block; width: 32px; height: 32px; background: rgb(0, 0, 255);\"></span></a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; padding: 2px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
11
+ "chip-image": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-variant-group-layout=\"chip\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; padding: 2px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; padding: 2px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
12
+ "text-layout": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-variant-group-layout=\"text\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; text-decoration: underline; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
13
+ "group-dropdown": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-variant-group-layout=\"dropdown\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><select data-variant-dropdown=\"\" data-part=\"dropdown\" aria-label=\"Size\" style=\"width: 100%; padding: 8px 10px; background: transparent;\"><option value=\"/p/s\">S</option><option value=\"/p/m\">M</option><option value=\"/p/l\" disabled=\"\">L</option><option value=\"\" disabled=\"\">XL</option></select></div></div>",
14
+ "selected-value": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color: <span data-variant-selected-value=\"\" data-part=\"selected-value\" style=\"opacity: 1;\">Blue</span></span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size: <span data-variant-selected-value=\"\" data-part=\"selected-value\" style=\"opacity: 1;\">M</span></span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
15
+ "selected-sep": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color - <span data-variant-selected-value=\"\" data-part=\"selected-value\" style=\"opacity: 1;\">Blue</span></span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size - <span data-variant-selected-value=\"\" data-part=\"selected-value\" style=\"opacity: 1;\">M</span></span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
16
+ "no-label": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
17
+ "gaps": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 4px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 20px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Blue</a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 20px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
18
+ "swatchsize": "<div data-variant-selector=\"\" data-variant-layout=\"swatch\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-variant-group-layout=\"chip\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/blue\" data-variant-option=\"selected\" aria-current=\"true\" aria-label=\"Blue\" title=\"Blue\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; padding: 2px; text-decoration: none; opacity: 1; cursor: pointer;\"><span data-part=\"swatch\" style=\"display: block; width: 48px; height: 48px; background: rgb(0, 0, 255);\"></span></a><a href=\"/p/red\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; padding: 2px; text-decoration: none; opacity: 1; cursor: pointer;\">Red</a></div></div><div data-variant-group=\"size\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">M</a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">L</span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: line-through; opacity: 0.4; cursor: not-allowed;\">XL</span></div></div></div>",
19
+ "combo": "<div data-variant-selector=\"\" data-variant-layout=\"dropdown\" style=\"display: flex; flex-direction: column; gap: 16px; width: 100%;\"><div data-variant-group=\"color\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Color</span><select data-variant-dropdown=\"\" data-part=\"dropdown\" aria-label=\"Color\" style=\"width: 100%; padding: 8px 10px; background: transparent;\"><option value=\"/p/blue\">Blue</option><option value=\"/p/red\">Red</option></select></div><div data-variant-group=\"size\" data-variant-group-layout=\"box\" data-part=\"group\"><span data-variant-group-label=\"\" data-part=\"label\" style=\"display: block; margin-bottom: 6px; font-size: 0.85em; opacity: 0.75;\">Size</span><div data-part=\"option-list\" style=\"display: flex; flex-wrap: wrap; gap: 8px;\"><a href=\"/p/s\" data-variant-option=\"default\" aria-current=\"false\" data-part=\"option\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer;\">S</a><a href=\"/p/m\" data-variant-option=\"selected\" aria-current=\"true\" data-part=\"option\" data-state=\"selected\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 1; cursor: pointer; position: relative;\">M<span data-part=\"low-stock\" role=\"img\" aria-label=\"Low stock\" style=\"position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; pointer-events: none;\"></span></a><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed; position: relative;\">L<svg data-part=\"strike\" aria-hidden=\"true\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; pointer-events: none;\"><line x1=\"0\" y1=\"100\" x2=\"100\" y2=\"0\" stroke=\"currentColor\" stroke-width=\"1\" vector-effect=\"non-scaling-stroke\"></line></svg></span><span data-variant-option=\"disabled\" aria-disabled=\"true\" data-part=\"option\" data-state=\"disabled\" style=\"display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 8px 12px; text-decoration: none; opacity: 0.4; cursor: not-allowed; position: relative;\">XL<svg data-part=\"strike\" aria-hidden=\"true\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; pointer-events: none;\"><line x1=\"0\" y1=\"100\" x2=\"100\" y2=\"0\" stroke=\"currentColor\" stroke-width=\"1\" vector-effect=\"non-scaling-stroke\"></line></svg></span></div></div></div>"
20
+ }
@@ -0,0 +1,264 @@
1
+ 'use client';
2
+
3
+ import React from 'react';
4
+ import NextLink from 'next/link';
5
+ import { usePathname } from 'next/navigation';
6
+ import { signOut } from 'next-auth/react';
7
+ import { useLogoutMutation } from '@akinon/next/data/client/user';
8
+ import { getResponsiveValue, partAttrs } from '../utils';
9
+ import { hasItemTemplate, ItemTemplateList } from './item-template';
10
+ import { BlockRendererProps } from './block-renderer-registry';
11
+
12
+ /**
13
+ * The order the menu has always shipped in. Also the fallback when the order
14
+ * property is blank, so clearing the field cannot empty the menu.
15
+ */
16
+ const DEFAULT_ITEM_ORDER = [
17
+ 'orders',
18
+ 'addresses',
19
+ 'profile',
20
+ 'favourites',
21
+ 'coupons'
22
+ ];
23
+
24
+ /**
25
+ * Functional account block: account area navigation.
26
+ *
27
+ * Account routes are brand-defined (@theme/routes), and pz-theme cannot
28
+ * import the brand alias, so every target is an editor property. The
29
+ * defaults are the conventional '/account/...' paths — brands whose ROUTES
30
+ * differ (superstep uses '/users/orders' for orders) override them here.
31
+ * Properties: showLogout, itemOrder, orientation, activeMatch, emptyLabel,
32
+ * ordersHref, addressesHref, profileHref, favouritesHref, couponsHref,
33
+ * logoutLabel and the matching *Label keys.
34
+ * Parts: menu, item (selected), logout, empty.
35
+ */
36
+ const AccountMenuBlock = ({
37
+ block,
38
+ placeholderId,
39
+ sectionId,
40
+ selectedBlockId = null,
41
+ currentBreakpoint = 'desktop',
42
+ isDesigner = false
43
+ }: BlockRendererProps) => {
44
+ const prop = (key: string, fallback: string) =>
45
+ String(
46
+ getResponsiveValue(block.properties?.[key], currentBreakpoint, fallback)
47
+ );
48
+
49
+ const boolProp = (key: string, fallback: boolean) => {
50
+ const raw = getResponsiveValue(
51
+ block.properties?.[key],
52
+ currentBreakpoint,
53
+ fallback
54
+ );
55
+
56
+ if (typeof raw === 'boolean') return raw;
57
+
58
+ return String(raw) === 'true';
59
+ };
60
+
61
+ const showLogout = boolProp('showLogout', true);
62
+ const orientation =
63
+ prop('orientation', 'vertical') === 'horizontal' ? 'horizontal' : 'vertical';
64
+ const activeMatch =
65
+ prop('activeMatch', 'exact') === 'startsWith' ? 'startsWith' : 'exact';
66
+ const emptyLabel = prop('emptyLabel', '');
67
+
68
+ const pathname = usePathname();
69
+ const [logout, { isLoading: isLoggingOut }] = useLogoutMutation();
70
+
71
+ const definitions: Record<
72
+ string,
73
+ { key: string; href: string; label: string }
74
+ > = {
75
+ orders: {
76
+ key: 'orders',
77
+ href: prop('ordersHref', '/account/orders'),
78
+ label: prop('ordersLabel', 'Orders')
79
+ },
80
+ addresses: {
81
+ key: 'addresses',
82
+ href: prop('addressesHref', '/account/address'),
83
+ label: prop('addressesLabel', 'Addresses')
84
+ },
85
+ profile: {
86
+ key: 'profile',
87
+ href: prop('profileHref', '/account/profile'),
88
+ label: prop('profileLabel', 'Profile')
89
+ },
90
+ favourites: {
91
+ key: 'favourites',
92
+ href: prop('favouritesHref', '/account/favourite-products'),
93
+ label: prop('favouritesLabel', 'Favourites')
94
+ },
95
+ coupons: {
96
+ key: 'coupons',
97
+ href: prop('couponsHref', '/account/coupons'),
98
+ label: prop('couponsLabel', 'Coupons')
99
+ }
100
+ };
101
+
102
+ const requestedOrder = prop('itemOrder', DEFAULT_ITEM_ORDER.join(','))
103
+ .split(',')
104
+ .map((key) => key.trim())
105
+ .filter(Boolean);
106
+ // A repeated key would render the same route twice and collide on the React
107
+ // key, so the list is de-duplicated before it is resolved.
108
+ const resolvedOrder = Array.from(
109
+ new Set(requestedOrder.length > 0 ? requestedOrder : DEFAULT_ITEM_ORDER)
110
+ );
111
+
112
+ const items = resolvedOrder
113
+ .map((key) => definitions[key])
114
+ .filter((item) => Boolean(item?.href) && Boolean(item?.label));
115
+
116
+ const isActive = (href: string) => {
117
+ if (!pathname || !href) return false;
118
+ if (activeMatch === 'startsWith') {
119
+ return (
120
+ pathname === href || pathname.startsWith(`${href.replace(/\/$/, '')}/`)
121
+ );
122
+ }
123
+
124
+ return pathname === href;
125
+ };
126
+
127
+ const handleLogout = async () => {
128
+ if (isDesigner) return;
129
+
130
+ // The commerce session must be dropped before the next-auth session,
131
+ // otherwise next-auth can immediately re-authenticate from osessionid.
132
+ try {
133
+ await logout().unwrap();
134
+ } catch {
135
+ // A failed commerce logout must not trap the user in a signed-in state.
136
+ }
137
+
138
+ signOut({ callbackUrl: prop('logoutRedirect', '/') });
139
+ };
140
+
141
+ if (items.length === 0 && !showLogout) {
142
+ if (isDesigner) {
143
+ return (
144
+ <div
145
+ data-account-menu=""
146
+ data-account-menu-state="empty"
147
+ {...partAttrs('empty', { empty: true })}
148
+ >
149
+ {emptyLabel || 'Account menu (no items)'}
150
+ </div>
151
+ );
152
+ }
153
+
154
+ // Without an empty message the block stays absent, which is what every
155
+ // published composition renders today.
156
+ if (!emptyLabel) return null;
157
+
158
+ return (
159
+ <div
160
+ data-account-menu=""
161
+ data-account-menu-state="empty"
162
+ {...partAttrs('empty', { empty: true })}
163
+ >
164
+ {emptyLabel}
165
+ </div>
166
+ );
167
+ }
168
+
169
+ // Navigating inside the designer iframe would drop the author out of the
170
+ // page they are editing, so the menu links are inert there.
171
+ const guard = (event: React.MouseEvent) => {
172
+ if (isDesigner) event.preventDefault();
173
+ };
174
+
175
+ const linkStyle = (active: boolean): React.CSSProperties => ({
176
+ display: 'block',
177
+ padding: '8px 0',
178
+ color: 'inherit',
179
+ textDecoration: 'none',
180
+ fontWeight: active ? 600 : 400
181
+ });
182
+
183
+ // Both spellings of each field are published so a designer can bind either
184
+ // the generic name a text/link block defaults to (`item.url`) or the one the
185
+ // menu itself uses (`item.href`).
186
+ const itemRows = items.map((item) => ({
187
+ key: item.key,
188
+ name: item.label,
189
+ label: item.label,
190
+ href: item.href,
191
+ url: item.href,
192
+ active: isActive(item.href)
193
+ }));
194
+
195
+ // A designer who marked a child as the row layout gets that layout repeated
196
+ // per menu entry; otherwise the built-in link renders unchanged.
197
+ const customItems = hasItemTemplate(block, currentBreakpoint) ? (
198
+ <ItemTemplateList
199
+ block={block}
200
+ items={itemRows}
201
+ placeholderId={placeholderId}
202
+ sectionId={sectionId}
203
+ isDesigner={isDesigner}
204
+ selectedBlockId={selectedBlockId}
205
+ currentBreakpoint={currentBreakpoint}
206
+ designerPlaceholderCount={items.length || 5}
207
+ />
208
+ ) : null;
209
+
210
+ return (
211
+ <nav
212
+ data-account-menu=""
213
+ data-account-menu-orientation={orientation}
214
+ {...partAttrs('menu')}
215
+ style={{
216
+ display: 'flex',
217
+ flexDirection: orientation === 'horizontal' ? 'row' : 'column',
218
+ ...(orientation === 'horizontal' ? { flexWrap: 'wrap' } : null),
219
+ gap: 'var(--account-menu-gap, 4px)'
220
+ }}
221
+ >
222
+ {customItems ??
223
+ items.map((item) => {
224
+ const active = isActive(item.href);
225
+
226
+ return (
227
+ <NextLink
228
+ key={item.key}
229
+ href={isDesigner ? '#' : item.href}
230
+ onClick={guard}
231
+ data-account-menu-item={item.key}
232
+ aria-current={active ? 'page' : undefined}
233
+ {...partAttrs('item', { selected: active })}
234
+ style={linkStyle(active)}
235
+ >
236
+ {item.label}
237
+ </NextLink>
238
+ );
239
+ })}
240
+
241
+ {showLogout && (
242
+ <button
243
+ type="button"
244
+ data-account-menu-item="logout"
245
+ disabled={isLoggingOut}
246
+ onClick={handleLogout}
247
+ {...partAttrs('logout', { loading: isLoggingOut })}
248
+ style={{
249
+ ...linkStyle(false),
250
+ textAlign: 'left',
251
+ background: 'none',
252
+ border: 'none',
253
+ cursor: 'pointer',
254
+ font: 'inherit'
255
+ }}
256
+ >
257
+ {prop('logoutLabel', 'Log out')}
258
+ </button>
259
+ )}
260
+ </nav>
261
+ );
262
+ };
263
+
264
+ export default AccountMenuBlock;