s-material-react 0.1.0 → 0.1.2

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 (100) hide show
  1. package/css/common/addressItem.scss +47 -0
  2. package/css/common/coupon.scss +73 -0
  3. package/css/common/evaluateItem.scss +58 -0
  4. package/css/common/index.scss +4 -0
  5. package/css/common/stepNum.scss +20 -0
  6. package/css/pages/addressList.scss +29 -0
  7. package/css/pages/cart.scss +130 -0
  8. package/css/pages/couponList.scss +204 -0
  9. package/css/pages/evaluateEntry.scss +57 -0
  10. package/css/pages/evaluateList.scss +82 -51
  11. package/css/pages/goodsDetail.scss +262 -2
  12. package/css/pages/index.scss +7 -0
  13. package/css/pages/mine.scss +96 -0
  14. package/css/pages/orderEntry.scss +3 -0
  15. package/css/pages/placeOrder.scss +104 -0
  16. package/css/pages/placeOrderResult.scss +100 -0
  17. package/dist/common/addressItem/index.d.ts +1 -0
  18. package/dist/common/addressItem/index.js +10 -0
  19. package/dist/common/coupon/index.d.ts +2 -0
  20. package/dist/common/coupon/index.js +9 -0
  21. package/dist/common/evaluateItem/index.d.ts +2 -0
  22. package/dist/common/evaluateItem/index.js +13 -0
  23. package/dist/common/mock/index.d.ts +300 -0
  24. package/dist/common/mock/index.js +623 -0
  25. package/dist/common/stepNum/index.d.ts +5 -0
  26. package/dist/common/stepNum/index.js +9 -0
  27. package/dist/components/AddressDetail/index.d.ts +2 -0
  28. package/dist/components/AddressDetail/index.js +119 -0
  29. package/dist/components/AddressDetail/option.d.ts +2 -0
  30. package/dist/components/AddressDetail/option.js +32 -0
  31. package/dist/components/AddressList/index.d.ts +2 -0
  32. package/dist/components/AddressList/index.js +15 -0
  33. package/dist/components/Cart/index.d.ts +2 -0
  34. package/dist/components/Cart/index.js +29 -0
  35. package/dist/components/Cart/useNumStep.d.ts +1 -0
  36. package/dist/components/Cart/useNumStep.js +7 -0
  37. package/dist/components/CouponList/index.d.ts +2 -0
  38. package/dist/components/CouponList/index.js +29 -0
  39. package/dist/components/Cube/index.js +2 -2
  40. package/dist/components/EvaluateList/index.d.ts +2 -0
  41. package/dist/components/EvaluateList/index.js +40 -0
  42. package/dist/components/GoodsClassify/components/classifyFloor.js +5 -24
  43. package/dist/components/GoodsClassify/index.js +13 -5
  44. package/dist/components/GoodsDetail/components/evaluateEntry.d.ts +2 -0
  45. package/dist/components/GoodsDetail/components/evaluateEntry.js +43 -0
  46. package/dist/components/GoodsDetail/components/goodsDetailCollection.d.ts +2 -0
  47. package/dist/components/GoodsDetail/components/goodsDetailCollection.js +60 -0
  48. package/dist/components/GoodsDetail/components/goodsDetailCoupon.js +5 -5
  49. package/dist/components/GoodsDetail/components/goodsDetailEvaluate.js +3 -2
  50. package/dist/components/GoodsDetail/components/goodsDetailHandleBar.d.ts +2 -0
  51. package/dist/components/GoodsDetail/components/goodsDetailHandleBar.js +7 -0
  52. package/dist/components/GoodsDetail/components/goodsDetailInfo.d.ts +1 -1
  53. package/dist/components/GoodsDetail/components/goodsDetailInfo.js +2 -2
  54. package/dist/components/GoodsDetail/components/goodsDetailPopup.d.ts +2 -0
  55. package/dist/components/GoodsDetail/components/goodsDetailPopup.js +27 -0
  56. package/dist/components/GoodsDetail/components/goodsDetailPromotion.d.ts +1 -1
  57. package/dist/components/GoodsDetail/components/goodsDetailPromotion.js +3 -3
  58. package/dist/components/GoodsDetail/components/goodsDetailSize.d.ts +1 -1
  59. package/dist/components/GoodsDetail/components/goodsDetailSize.js +6 -6
  60. package/dist/components/GoodsDetail/index.js +53 -15
  61. package/dist/components/GoodsGroup/index.js +2 -1
  62. package/dist/components/GoodsList/components/filter.d.ts +1 -0
  63. package/dist/components/GoodsList/components/filter.js +31 -0
  64. package/dist/components/GoodsList/hooks/useGoodsList.d.ts +5 -0
  65. package/dist/components/GoodsList/hooks/useGoodsList.js +49 -0
  66. package/dist/components/GoodsList/index.js +9 -60
  67. package/dist/components/Mine/components/menuList.d.ts +1 -0
  68. package/dist/components/Mine/components/menuList.js +21 -0
  69. package/dist/components/Mine/components/orderEntry.d.ts +1 -0
  70. package/dist/components/Mine/components/orderEntry.js +41 -0
  71. package/dist/components/Mine/index.d.ts +7 -0
  72. package/dist/components/Mine/index.js +14 -0
  73. package/dist/components/Notice/index.js +7 -11
  74. package/dist/components/OrderDetail/index.js +2 -2
  75. package/dist/components/OrderList/components/OrderListItem.js +8 -4
  76. package/dist/components/OrderList/components/orderItem.js +2 -2
  77. package/dist/components/OrderList/index.js +3 -2
  78. package/dist/components/PlaceOrder/index.d.ts +2 -0
  79. package/dist/components/PlaceOrder/index.js +12 -0
  80. package/dist/components/PlaceOrderResult/index.d.ts +2 -0
  81. package/dist/components/PlaceOrderResult/index.js +12 -0
  82. package/dist/components/SearchPage/index.d.ts +7 -1
  83. package/dist/components/SearchPage/index.js +5 -6
  84. package/dist/components/Slider/index.d.ts +12 -12
  85. package/dist/components/Slider/item.d.ts +2 -2
  86. package/dist/components/index.d.ts +8 -0
  87. package/dist/components/index.js +8 -0
  88. package/dist/options/index.d.ts +2 -0
  89. package/dist/options/index.js +31 -0
  90. package/dist/routerMap/index.d.ts +5 -0
  91. package/dist/routerMap/index.js +5 -0
  92. package/dist/utils/checkImgUrl.d.ts +1 -0
  93. package/dist/utils/checkImgUrl.js +9 -0
  94. package/dist/utils/index.d.ts +0 -0
  95. package/dist/utils/index.js +1 -0
  96. package/package.json +4 -5
  97. package/dist/components/OrderEntry/index.d.ts +0 -2
  98. package/dist/components/OrderEntry/index.js +0 -9
  99. package/dist/components/Stamp/index.d.ts +0 -2
  100. package/dist/components/Stamp/index.js +0 -9
@@ -1,22 +1,22 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export interface itemType {
3
3
  imgUrl: string;
4
4
  link: string;
5
5
  }
6
6
  interface SwiperType {
7
- defaultValue: Array<itemType>;
8
- type: number;
9
- autoplay: boolean;
10
- autoplayInterval: number;
11
- direction: 'horizontal' | 'vertical';
12
- loop: boolean;
13
- marginTop: number;
14
- marginBottom: number;
15
- selectImg: Array<itemType>;
16
- imgHeight: {
7
+ defaultValue?: Array<itemType>;
8
+ type?: number;
9
+ autoplay?: boolean;
10
+ autoplayInterval?: number;
11
+ direction?: 'horizontal' | 'vertical';
12
+ loop?: boolean;
13
+ marginTop?: number;
14
+ marginBottom?: number;
15
+ selectImg?: Array<itemType>;
16
+ imgHeight?: {
17
17
  height: number;
18
18
  width: number;
19
19
  };
20
20
  }
21
- export declare const Slider: React.NamedExoticComponent<SwiperType>;
21
+ export declare const Slider: import("react").NamedExoticComponent<SwiperType>;
22
22
  export {};
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { itemType } from './index';
3
- export declare const Items: React.MemoExoticComponent<({ item, type }: {
3
+ export declare const Items: import("react").MemoExoticComponent<({ item, type }: {
4
4
  item: itemType;
5
5
  type: number;
6
6
  }) => JSX.Element>;
@@ -19,3 +19,11 @@ export * from '../common/icon';
19
19
  export * from './SearchPage';
20
20
  export * from './GoodsDetailTopInfo';
21
21
  export * from './GoodsDetailPromotion';
22
+ export * from './EvaluateList';
23
+ export * from './AddressList';
24
+ export * from './AddressDetail';
25
+ export * from './PlaceOrder';
26
+ export * from './PlaceOrderResult';
27
+ export * from './CouponList';
28
+ export * from './Cart';
29
+ export * from './Mine';
@@ -19,3 +19,11 @@ export * from '../common/icon';
19
19
  export * from './SearchPage';
20
20
  export * from './GoodsDetailTopInfo';
21
21
  export * from './GoodsDetailPromotion';
22
+ export * from './EvaluateList';
23
+ export * from './AddressList';
24
+ export * from './AddressDetail';
25
+ export * from './PlaceOrder';
26
+ export * from './PlaceOrderResult';
27
+ export * from './CouponList';
28
+ export * from './Cart';
29
+ export * from './Mine';
@@ -0,0 +1,2 @@
1
+ declare const options: any;
2
+ export default options;
@@ -0,0 +1,31 @@
1
+ import provinces from 'china-division/dist/provinces.json';
2
+ import cities from 'china-division/dist/cities.json';
3
+ import areas from 'china-division/dist/areas.json';
4
+ console.log(5, provinces);
5
+ areas.forEach((area) => {
6
+ const matchCity = cities.filter((city) => city.code === area.cityCode)[0];
7
+ if (matchCity) {
8
+ matchCity.children = matchCity.children || [];
9
+ matchCity.children.push({
10
+ label: area.name,
11
+ value: area.code
12
+ });
13
+ }
14
+ });
15
+ cities.forEach((city) => {
16
+ const matchProvince = provinces.filter((province) => province.code === city.provinceCode)[0];
17
+ if (matchProvince) {
18
+ matchProvince.children = matchProvince.children || [];
19
+ matchProvince.children.push({
20
+ label: city.name,
21
+ value: city.code,
22
+ children: city.children
23
+ });
24
+ }
25
+ });
26
+ const options = provinces.map((province) => ({
27
+ label: province.name,
28
+ value: province.code,
29
+ children: province.children
30
+ }));
31
+ export default options;
@@ -0,0 +1,5 @@
1
+ export declare const routerMap: {
2
+ order: string;
3
+ goodList: string;
4
+ goodDetail: string;
5
+ };
@@ -0,0 +1,5 @@
1
+ export const routerMap = {
2
+ order: '/subpackage/orderlist/index',
3
+ goodList: '/subpackage/goodlist/index',
4
+ goodDetail: '/subpackage/gooddetail/index'
5
+ };
@@ -0,0 +1 @@
1
+ export declare function checkImgUrl(str: string): string;
@@ -0,0 +1,9 @@
1
+ export function checkImgUrl(str) {
2
+ const $domain = process.env.REACT_APP_BASE_URL;
3
+ if (!RegExp(/https?/).test(str)) {
4
+ return $domain + str;
5
+ }
6
+ else {
7
+ return str;
8
+ }
9
+ }
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s-material-react",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "'组件库'",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": [
@@ -27,14 +27,13 @@
27
27
  "author": "",
28
28
  "license": "ISC",
29
29
  "dependencies": {
30
- "@brushes/api": "^0.1.5",
31
- "@brushes/qj-simulate-component": "^0.0.5",
30
+ "@brushes/api": "^0.2.6",
31
+ "@brushes/qj-simulate-component": "^0.0.9",
32
32
  "@brushes/tools": "^1.0.25",
33
33
  "@stencil/core": "^2.19.1",
34
- "@tarojs/components": "^3.5.4",
35
34
  "@types/node": ">18.0.0",
36
35
  "@types/react": "^18.0.0",
37
- "antd-mobile": "^5.24.0",
36
+ "china-division": "^2.5.0",
38
37
  "classnames": "^2.3.2",
39
38
  "flyio": "^0.6.14",
40
39
  "nodemon": "^2.0.19",
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const OrderEntry: React.NamedExoticComponent<{}>;
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { useComponent } from '@brushes/qj-simulate-component';
4
- import { OBLIGATION, ORDERTOPAY, ORDERTORECEIVE, FINISH, AFTERSALE } from '../../static';
5
- const OrderEntryJsx = () => {
6
- const { View, Text, Badge } = useComponent();
7
- return (_jsxs(View, Object.assign({ className: 'orderEntry' }, { children: [_jsxs(View, Object.assign({ className: 'title' }, { children: [_jsx(View, Object.assign({ className: 'name' }, { children: "\u6211\u7684\u8BA2\u5355" })), _jsx(View, Object.assign({ className: 'more' }, { children: "\u67E5\u770B\u5168\u90E8" }))] })), _jsxs(View, Object.assign({ className: 'content' }, { children: [_jsxs(View, Object.assign({ className: 'contentItem obligation' }, { children: [_jsx(Badge, Object.assign({ content: 5, color: 'red', style: { color: '#fff', fontSize: 12 } }, { children: _jsx("img", { src: OBLIGATION, mode: 'widthFix', className: 'icon' }) })), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5F85\u4ED8\u6B3E" }))] })), _jsxs(View, Object.assign({ className: 'contentItem orderToPay' }, { children: [_jsx("img", { src: ORDERTOPAY, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5F85\u53D1\u8D27" }))] })), _jsxs(View, Object.assign({ className: 'contentItem orderToReceive' }, { children: [_jsx("img", { src: ORDERTORECEIVE, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5F85\u6536\u8D27" }))] })), _jsxs(View, Object.assign({ className: 'contentItem finish' }, { children: [_jsx("img", { src: FINISH, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5DF2\u5B8C\u6210" }))] })), _jsxs(View, Object.assign({ className: 'contentItem afterSale' }, { children: [_jsx("img", { src: AFTERSALE, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u9000\u6362/\u552E\u540E" }))] }))] }))] })));
8
- };
9
- export const OrderEntry = memo(OrderEntryJsx);
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Stamp: import("react").MemoExoticComponent<({ index, item }: any) => JSX.Element>;
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { Radio } from 'antd-mobile';
4
- import { useComponent } from '@brushes/qj-simulate-component';
5
- const StampJsx = ({ index, item }) => {
6
- const { View, Text } = useComponent();
7
- return (_jsx(View, Object.assign({ className: "stamp" }, { children: _jsxs(View, Object.assign({ className: 'stamp-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: item.price }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: item.title })), _jsxs(Text, Object.assign({ className: 'date' }, { children: ["\u6709\u6548\u671F\u81F3\uFF1A", item.date] }))] })), _jsx(Radio, { value: index, className: 'choose' })] })) })));
8
- };
9
- export const Stamp = memo(StampJsx);