pb-sxp-ui 1.20.18 → 1.20.19

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 (46) hide show
  1. package/dist/index.cjs +725 -26
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +291 -0
  4. package/dist/index.js +725 -26
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +44 -5
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +44 -5
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +725 -26
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +44 -5
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/index.d.ts +2 -0
  15. package/es/core/context/SxpDataSourceProvider.d.ts +1 -1
  16. package/es/materials/sxp/popup/AddToCart/index.d.ts +33 -0
  17. package/es/materials/sxp/popup/AddToCart/index.js +279 -0
  18. package/es/materials/sxp/popup/AddToCart/interactionRender.d.ts +3 -0
  19. package/es/materials/sxp/popup/AddToCart/interactionRender.js +11 -0
  20. package/es/materials/sxp/popup/AddToCart/material.d.ts +2 -0
  21. package/es/materials/sxp/popup/AddToCart/material.js +75 -0
  22. package/es/materials/sxp/popup/AddToCart/settingRender.d.ts +160 -0
  23. package/es/materials/sxp/popup/AddToCart/settingRender.js +277 -0
  24. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +2 -0
  25. package/es/materials/sxp/popup/CommodityDetail/index.js +19 -2
  26. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  27. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +16 -0
  28. package/es/materials/sxp/popup/index.d.ts +1 -0
  29. package/es/materials/sxp/popup/index.js +1 -0
  30. package/lib/core/components/SxpPageRender/index.d.ts +2 -0
  31. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -1
  32. package/lib/materials/sxp/popup/AddToCart/index.d.ts +33 -0
  33. package/lib/materials/sxp/popup/AddToCart/index.js +281 -0
  34. package/lib/materials/sxp/popup/AddToCart/interactionRender.d.ts +3 -0
  35. package/lib/materials/sxp/popup/AddToCart/interactionRender.js +14 -0
  36. package/lib/materials/sxp/popup/AddToCart/material.d.ts +2 -0
  37. package/lib/materials/sxp/popup/AddToCart/material.js +79 -0
  38. package/lib/materials/sxp/popup/AddToCart/settingRender.d.ts +160 -0
  39. package/lib/materials/sxp/popup/AddToCart/settingRender.js +279 -0
  40. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +2 -0
  41. package/lib/materials/sxp/popup/CommodityDetail/index.js +19 -2
  42. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  43. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +16 -0
  44. package/lib/materials/sxp/popup/index.d.ts +1 -0
  45. package/lib/materials/sxp/popup/index.js +1 -0
  46. package/package.json +1 -1
package/dist/index.css CHANGED
@@ -855,6 +855,297 @@ a:active {
855
855
  /* 继承父元素的文本颜色 */
856
856
  }
857
857
 
858
+ .add-to-cart-popup-container {
859
+ display: -webkit-box;
860
+ display: -webkit-flex;
861
+ display: -ms-flexbox;
862
+ display: flex;
863
+ -webkit-box-orient: vertical;
864
+ -webkit-box-direction: normal;
865
+ -webkit-flex-direction: column;
866
+ -ms-flex-direction: column;
867
+ flex-direction: column;
868
+ height: 100%;
869
+ background: #fff;
870
+ overflow: hidden;
871
+ }
872
+ .add-to-cart-popup-loading,
873
+ .add-to-cart-popup-error {
874
+ display: -webkit-box;
875
+ display: -webkit-flex;
876
+ display: -ms-flexbox;
877
+ display: flex;
878
+ -webkit-box-align: center;
879
+ -webkit-align-items: center;
880
+ -ms-flex-align: center;
881
+ align-items: center;
882
+ -webkit-box-pack: center;
883
+ -webkit-justify-content: center;
884
+ -ms-flex-pack: center;
885
+ justify-content: center;
886
+ height: 100%;
887
+ padding: 20px;
888
+ font-size: 16px;
889
+ color: #666;
890
+ }
891
+ .add-to-cart-popup-error {
892
+ color: #ef4444;
893
+ text-align: center;
894
+ }
895
+ /* Variant Detail 区域 */
896
+ .variant-detail-section {
897
+ padding: 20px;
898
+ border-bottom: 1px solid #e5e7eb;
899
+ }
900
+ .variant-image-wrapper {
901
+ width: 100%;
902
+ aspect-ratio: 1;
903
+ margin-bottom: 16px;
904
+ overflow: hidden;
905
+ border-radius: 8px;
906
+ background: #f9fafb;
907
+ }
908
+ .variant-image {
909
+ width: 100%;
910
+ height: 100%;
911
+ -o-object-fit: cover;
912
+ object-fit: cover;
913
+ display: block;
914
+ }
915
+ .variant-info-wrapper .product-title-text {
916
+ font-size: 20px;
917
+ font-weight: 600;
918
+ margin: 0 0 12px 0;
919
+ line-height: 1.4;
920
+ color: #111;
921
+ }
922
+ .selected-options-tags {
923
+ display: -webkit-box;
924
+ display: -webkit-flex;
925
+ display: -ms-flexbox;
926
+ display: flex;
927
+ -webkit-flex-wrap: wrap;
928
+ -ms-flex-wrap: wrap;
929
+ flex-wrap: wrap;
930
+ gap: 8px;
931
+ margin-bottom: 12px;
932
+ }
933
+ .option-tag {
934
+ padding: 4px 12px;
935
+ background: #f3f4f6;
936
+ border-radius: 4px;
937
+ font-size: 14px;
938
+ color: #374151;
939
+ }
940
+ .price-display {
941
+ margin-bottom: 16px;
942
+ }
943
+ .price-value {
944
+ font-size: 24px;
945
+ font-weight: 700;
946
+ color: #111;
947
+ }
948
+ .quantity-selector-wrapper {
949
+ display: -webkit-box;
950
+ display: -webkit-flex;
951
+ display: -ms-flexbox;
952
+ display: flex;
953
+ -webkit-box-align: center;
954
+ -webkit-align-items: center;
955
+ -ms-flex-align: center;
956
+ align-items: center;
957
+ gap: 12px;
958
+ }
959
+ .quantity-btn {
960
+ width: 36px;
961
+ height: 36px;
962
+ border: 1px solid #e5e7eb;
963
+ background: #fff;
964
+ border-radius: 4px;
965
+ cursor: pointer;
966
+ font-size: 18px;
967
+ font-weight: 600;
968
+ color: #111;
969
+ -webkit-transition: all 0.2s;
970
+ transition: all 0.2s;
971
+ }
972
+ .quantity-btn:disabled {
973
+ opacity: 0.5;
974
+ cursor: not-allowed;
975
+ background: #f9fafb;
976
+ }
977
+ .quantity-btn:hover:not(:disabled) {
978
+ background: #f3f4f6;
979
+ border-color: #d1d5db;
980
+ }
981
+ .quantity-btn:active:not(:disabled) {
982
+ -webkit-transform: scale(0.95);
983
+ transform: scale(0.95);
984
+ }
985
+ .quantity-input-field {
986
+ width: 60px;
987
+ height: 36px;
988
+ text-align: center;
989
+ border: 1px solid #e5e7eb;
990
+ border-radius: 4px;
991
+ font-size: 16px;
992
+ font-weight: 600;
993
+ color: #111;
994
+ background: #fff;
995
+ }
996
+ .quantity-input-field::-webkit-outer-spin-button,
997
+ .quantity-input-field::-webkit-inner-spin-button {
998
+ -webkit-appearance: none;
999
+ appearance: none;
1000
+ margin: 0;
1001
+ }
1002
+ .quantity-input-field[type='number'] {
1003
+ -moz-appearance: textfield;
1004
+ -webkit-appearance: textfield;
1005
+ appearance: textfield;
1006
+ }
1007
+ .no-selection-hint {
1008
+ padding: 20px;
1009
+ text-align: center;
1010
+ color: #9ca3af;
1011
+ font-style: italic;
1012
+ font-size: 14px;
1013
+ background: #f9fafb;
1014
+ border-radius: 8px;
1015
+ margin-top: 12px;
1016
+ }
1017
+ /* Variant Options 区域 */
1018
+ .variant-options-section {
1019
+ -webkit-box-flex: 1;
1020
+ -webkit-flex: 1;
1021
+ -ms-flex: 1;
1022
+ flex: 1;
1023
+ padding: 20px;
1024
+ overflow-y: auto;
1025
+ }
1026
+ .variant-options-section::-webkit-scrollbar {
1027
+ width: 6px;
1028
+ }
1029
+ .variant-options-section::-webkit-scrollbar-track {
1030
+ background: #f1f1f1;
1031
+ border-radius: 3px;
1032
+ }
1033
+ .variant-options-section::-webkit-scrollbar-thumb {
1034
+ background: #888;
1035
+ border-radius: 3px;
1036
+ }
1037
+ .variant-options-section::-webkit-scrollbar-thumb:hover {
1038
+ background: #555;
1039
+ }
1040
+ .option-group-wrapper {
1041
+ margin-bottom: 24px;
1042
+ }
1043
+ .option-group-wrapper:last-child {
1044
+ margin-bottom: 0;
1045
+ }
1046
+ .option-group-name {
1047
+ font-size: 16px;
1048
+ font-weight: 600;
1049
+ margin: 0 0 12px 0;
1050
+ color: #111;
1051
+ }
1052
+ .option-values-grid {
1053
+ display: -webkit-box;
1054
+ display: -webkit-flex;
1055
+ display: -ms-flexbox;
1056
+ display: flex;
1057
+ -webkit-flex-wrap: wrap;
1058
+ -ms-flex-wrap: wrap;
1059
+ flex-wrap: wrap;
1060
+ gap: 8px;
1061
+ }
1062
+ .option-value-button {
1063
+ padding: 10px 20px;
1064
+ margin: 0;
1065
+ border: 1px solid #e5e7eb;
1066
+ background: #fff;
1067
+ color: #000;
1068
+ cursor: pointer;
1069
+ border-radius: 4px;
1070
+ font-size: 14px;
1071
+ -webkit-transition: all 0.2s;
1072
+ transition: all 0.2s;
1073
+ }
1074
+ .option-value-button.selected {
1075
+ border: 2px solid #22c55e;
1076
+ border-color: #22c55e;
1077
+ }
1078
+ .option-value-button.disabled {
1079
+ background: #f3f4f6;
1080
+ color: #9ca3af;
1081
+ cursor: not-allowed;
1082
+ opacity: 0.5;
1083
+ }
1084
+ .option-value-button:hover:not(.disabled) {
1085
+ border-color: #22c55e;
1086
+ -webkit-transform: translateY(-1px);
1087
+ transform: translateY(-1px);
1088
+ }
1089
+ /* Add to Cart 按钮 */
1090
+ .add-to-cart-button {
1091
+ width: 100%;
1092
+ padding: 16px;
1093
+ background: #000;
1094
+ color: #fff;
1095
+ border: none;
1096
+ font-size: 16px;
1097
+ font-weight: 600;
1098
+ cursor: pointer;
1099
+ -webkit-transition: all 0.2s;
1100
+ transition: all 0.2s;
1101
+ text-transform: uppercase;
1102
+ letter-spacing: 0.5px;
1103
+ }
1104
+ .add-to-cart-button:hover:not(:disabled) {
1105
+ background: #333;
1106
+ -webkit-transform: translateY(-1px);
1107
+ transform: translateY(-1px);
1108
+ -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1109
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1110
+ }
1111
+ .add-to-cart-button:active:not(:disabled) {
1112
+ -webkit-transform: translateY(0);
1113
+ transform: translateY(0);
1114
+ -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
1115
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
1116
+ }
1117
+ .add-to-cart-button:disabled,
1118
+ .add-to-cart-button.disabled {
1119
+ background: #9ca3af;
1120
+ cursor: not-allowed;
1121
+ opacity: 0.6;
1122
+ }
1123
+ .add-to-cart-button span {
1124
+ display: inline-block;
1125
+ }
1126
+ /* 响应式 */
1127
+ @media (max-width: 375px) {
1128
+ .variant-detail-section {
1129
+ padding: 16px;
1130
+ }
1131
+ .product-title-text {
1132
+ font-size: 18px !important;
1133
+ }
1134
+ .price-value {
1135
+ font-size: 20px !important;
1136
+ }
1137
+ .variant-options-section {
1138
+ padding: 16px;
1139
+ }
1140
+ .option-group-name {
1141
+ font-size: 14px !important;
1142
+ }
1143
+ .add-to-cart-button {
1144
+ padding: 14px;
1145
+ font-size: 14px !important;
1146
+ }
1147
+ }
1148
+
858
1149
  .index-module_tow-line-ellipsis__3bKKx {
859
1150
  display: -webkit-box;
860
1151
  -webkit-box-orient: vertical;