s-material-react 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/css/basic/textLine.scss +13 -0
  2. package/css/common/card.scss +52 -0
  3. package/css/common/icon.scss +42 -0
  4. package/css/common/index.scss +2 -0
  5. package/css/index.scss +3 -0
  6. package/css/pages/classifyNav.scss +19 -0
  7. package/css/pages/cube.scss +76 -0
  8. package/css/pages/goods.scss +90 -0
  9. package/css/pages/goodsClassify.scss +108 -0
  10. package/css/pages/goodsGroup.scss +0 -0
  11. package/css/pages/goodsList.scss +83 -0
  12. package/css/pages/index.scss +17 -0
  13. package/css/pages/notice.scss +25 -0
  14. package/css/pages/order-goodsItem.scss +17 -0
  15. package/css/pages/orderDetail.scss +144 -0
  16. package/css/pages/orderEntry.scss +41 -0
  17. package/css/pages/orderList.scss +72 -0
  18. package/css/pages/service.scss +9 -0
  19. package/css/pages/slider.scss +17 -0
  20. package/css/pages/title.scss +3 -0
  21. package/css/variables/default.scss +55 -0
  22. package/dist/common/card/index.d.ts +8 -0
  23. package/dist/common/card/index.js +6 -0
  24. package/dist/common/icon/index.d.ts +7 -0
  25. package/dist/common/icon/index.js +12 -0
  26. package/dist/components/ClassifyNav/index.d.ts +15 -0
  27. package/dist/components/ClassifyNav/index.js +24 -0
  28. package/dist/components/Cube/index.d.ts +15 -0
  29. package/dist/components/Cube/index.js +36 -0
  30. package/dist/components/Goods/index.d.ts +20 -0
  31. package/dist/components/Goods/index.js +67 -0
  32. package/dist/components/GoodsClassify/components/classifyFloor.d.ts +1 -0
  33. package/dist/components/GoodsClassify/components/classifyFloor.js +11 -0
  34. package/dist/components/GoodsClassify/index.d.ts +2 -0
  35. package/dist/components/GoodsClassify/index.js +36 -0
  36. package/dist/components/GoodsDetail/index.d.ts +2 -0
  37. package/dist/components/GoodsDetail/index.js +6 -0
  38. package/dist/components/GoodsGroup/index.d.ts +25 -0
  39. package/dist/components/GoodsGroup/index.js +26 -0
  40. package/dist/components/GoodsList/index.d.ts +2 -0
  41. package/dist/components/GoodsList/index.js +66 -0
  42. package/dist/components/Line/index.d.ts +11 -0
  43. package/dist/components/Line/index.js +17 -0
  44. package/dist/components/Notice/index.d.ts +9 -0
  45. package/dist/components/Notice/index.js +20 -0
  46. package/dist/components/OrderDetail/index.d.ts +2 -0
  47. package/dist/components/OrderDetail/index.js +12 -0
  48. package/dist/components/OrderEntry/index.d.ts +2 -0
  49. package/dist/components/OrderEntry/index.js +9 -0
  50. package/dist/components/OrderList/components/OrderListItem.d.ts +7 -0
  51. package/dist/components/OrderList/components/OrderListItem.js +35 -0
  52. package/dist/components/OrderList/components/mock.d.ts +1647 -0
  53. package/dist/components/OrderList/components/mock.js +4417 -0
  54. package/dist/components/OrderList/components/orderItem.d.ts +15 -0
  55. package/dist/components/OrderList/components/orderItem.js +8 -0
  56. package/dist/components/OrderList/index.d.ts +2 -0
  57. package/dist/components/OrderList/index.js +16 -0
  58. package/dist/components/Search/index.d.ts +12 -0
  59. package/dist/components/Search/index.js +30 -0
  60. package/dist/components/Service/index.d.ts +2 -0
  61. package/dist/components/Service/index.js +7 -0
  62. package/dist/components/Slider/index.d.ts +22 -0
  63. package/dist/components/Slider/index.js +26 -0
  64. package/dist/components/Slider/item.d.ts +6 -0
  65. package/dist/components/Slider/item.js +13 -0
  66. package/dist/components/Title/index.d.ts +15 -0
  67. package/dist/components/Title/index.js +18 -0
  68. package/dist/components/Video/index.d.ts +11 -0
  69. package/dist/components/Video/index.js +11 -0
  70. package/dist/components/index.d.ts +18 -0
  71. package/dist/components/index.js +18 -0
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.js +1 -0
  74. package/dist/static/icon/index.d.ts +6 -0
  75. package/dist/static/icon/index.js +12 -0
  76. package/dist/static/index.d.ts +1 -0
  77. package/dist/static/index.js +1 -0
  78. package/package.json +48 -0
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare const Notice: ({ text, backgroundColor, color, fontSize, marginBottom, borderColor }: {
3
+ fontSize: string;
4
+ borderColor: string;
5
+ marginBottom: string;
6
+ color: string;
7
+ text: React.ReactNode;
8
+ backgroundColor: string;
9
+ }) => JSX.Element | null;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useComponent } from '@brushes/qj-simulate-component';
3
+ import { getEnv } from '@brushes/api';
4
+ export const Notice = ({ text, backgroundColor, color, fontSize, marginBottom, borderColor }) => {
5
+ const flag = getEnv();
6
+ const { View, NoticeBar } = useComponent();
7
+ console.log(22, flag);
8
+ if (!View)
9
+ return null;
10
+ return (_jsx(_Fragment, { children: flag ? (_jsx("div", { children: "12312312" })) : (
11
+ // <AtNoticebar marquee icon='volume-plus'>
12
+ // { text }
13
+ // </AtNoticebar>
14
+ _jsx(View, Object.assign({ style: { marginBottom } }, { children: _jsx(NoticeBar, { speed: 50, style: {
15
+ '--border-color': borderColor,
16
+ '--font-size': fontSize + 'px',
17
+ '--background-color': backgroundColor,
18
+ '--text-color': color
19
+ }, content: text, color: "alert" }) }))) }));
20
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const OrderDetail: React.NamedExoticComponent<{}>;
@@ -0,0 +1,12 @@
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 { ORDERTOPAY } from '../../static';
5
+ import { CardJsx } from '../../common/card';
6
+ import { Button } from 'antd-mobile';
7
+ import { result } from '../OrderList/components/mock';
8
+ const OrderDetailJsx = () => {
9
+ const { View, Text } = useComponent();
10
+ return (_jsxs(View, Object.assign({ className: 'orderDetail' }, { children: [_jsx(View, Object.assign({ className: 'orderDetailTopTitle' }, { children: _jsxs(View, Object.assign({ className: 'orderDetailTopTitleContent' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u8BA2\u5355\u8BE6\u60C5" })), _jsxs(View, Object.assign({ className: 'subTitleWrap' }, { children: [_jsx("img", { src: ORDERTOPAY, alt: "", className: 'subTitleIcon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5DF2\u5B8C\u6210" }))] }))] })) })), _jsx(View, Object.assign({ className: 'orderDetailContent' }, { children: _jsxs(View, Object.assign({ style: { position: 'relative', top: -26 } }, { children: [_jsxs(View, Object.assign({ className: 'addressInfo' }, { children: [_jsx(View, Object.assign({ className: 'lPart' }, { children: _jsx("img", { src: ORDERTOPAY, alt: "", className: 'icon' }) })), _jsxs(View, Object.assign({ className: 'mPart' }, { children: [_jsxs(View, Object.assign({ className: 'personInfo' }, { children: [_jsx(Text, Object.assign({ className: 'personName' }, { children: "\u674E\u660E\u771F" })), _jsx(Text, Object.assign({ className: 'personPhone' }, { children: "13679126756" }))] })), _jsx(View, Object.assign({ className: 'address' }, { children: "\u4E0A\u6D77\u5E02\u95F5\u884C\u533A\u53E4\u7F8E\u8DEF\u534E\u4E00\u65B0\u57CE18-201" }))] })), _jsx(View, Object.assign({ className: 'rPart' }, { children: _jsx("img", { src: ORDERTOPAY, alt: "", className: 'icon' }) }))] })), _jsxs(View, Object.assign({ className: 'orderDetailGoodsWrap' }, { children: [result.rows[0].goodsList.map((item) => (_jsx(CardJsx, Object.assign({}, item), item.contractGoodsId))), _jsxs(View, Object.assign({ className: 'btnGroup' }, { children: [_jsx(Button, Object.assign({ shape: "rounded", className: 'btn white' }, { children: "\u67E5\u770B\u7269\u6D41" })), _jsx(Button, Object.assign({ shape: "rounded", className: 'btn black' }, { children: "\u786E\u8BA4\u6536\u8D27" }))] })), _jsxs(View, Object.assign({ className: 'priceInfo' }, { children: [_jsxs(View, Object.assign({ className: 'priceInfoFloor top' }, { children: [_jsx(View, Object.assign({ className: 'totalNum' }, { children: "\u51712\u4EF6\u5546\u54C1" })), _jsx(View, Object.assign({ className: 'totalPrice' }, { children: "\u5408\u8BA1 \uFFE51960.00" }))] })), _jsxs(View, Object.assign({ className: 'priceInfoFloor' }, { children: [_jsx(View, Object.assign({ className: 'totalNum' }, { children: "\u5546\u54C1\u603B\u989D" })), _jsx(View, Object.assign({ className: 'totalPrice' }, { children: "\u5408\u8BA1 \uFFE51960.00" }))] })), _jsxs(View, Object.assign({ className: 'priceInfoFloor' }, { children: [_jsx(View, Object.assign({ className: 'totalNum' }, { children: "\u4F18\u60E0" })), _jsx(View, Object.assign({ className: 'totalPrice' }, { children: "\u5408\u8BA1 \uFFE51960.00" }))] }))] }))] })), _jsxs(View, Object.assign({ className: 'express' }, { children: [_jsx(View, Object.assign({ className: 'label' }, { children: "\u914D\u9001\u65B9\u5F0F" })), _jsx(View, Object.assign({ className: 'name' }, { children: "\u5FEB\u9012" }))] })), _jsxs(View, Object.assign({ className: 'orderInfo' }, { children: [_jsx(View, Object.assign({ className: 'orderInfoItem' }, { children: _jsx(View, Object.assign({ className: 'label' }, { children: "\u8BA2\u5355\u4FE1\u606F" })) })), _jsxs(View, Object.assign({ className: 'orderInfoItem' }, { children: [_jsx(View, Object.assign({ className: 'label' }, { children: "\u4E70\u5BB6\u7559\u8A00" })), _jsx(View, Object.assign({ className: 'name' }, { children: "\u5FEB\u70B9\u53D1\u8D27\u54DF" }))] })), _jsxs(View, Object.assign({ className: 'orderInfoItem' }, { children: [_jsx(View, Object.assign({ className: 'label' }, { children: "\u8BA2\u5355\u7F16\u53F7" })), _jsx(View, Object.assign({ className: 'name' }, { children: "243728743824782" }))] })), _jsxs(View, Object.assign({ className: 'orderInfoItem' }, { children: [_jsx(View, Object.assign({ className: 'label' }, { children: "\u7CFB\u7EDF\u7F16\u53F7" })), _jsx(View, Object.assign({ className: 'name' }, { children: "243728743824782" }))] })), _jsxs(View, Object.assign({ className: 'orderInfoItem' }, { children: [_jsx(View, Object.assign({ className: 'label' }, { children: "\u4E0B\u5355\u65F6\u95F4" })), _jsx(View, Object.assign({ className: 'name' }, { children: "2022-10-01 10:00:00" }))] }))] })), _jsxs(View, Object.assign({ className: 'btnGroupFooter' }, { children: [_jsx(Button, Object.assign({ shape: "rounded" }, { children: "\u7533\u8BF7\u9000\u6B3E" })), _jsx(Button, Object.assign({ shape: "rounded" }, { children: "\u7533\u8BF7\u552E\u540E" }))] }))] })) }))] })));
11
+ };
12
+ export const OrderDetail = memo(OrderDetailJsx);
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const OrderEntry: React.NamedExoticComponent<{}>;
@@ -0,0 +1,9 @@
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);
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { TabItemType } from '@brushes/qj-simulate-component';
3
+ declare function OrderListItemJsx({ item }: {
4
+ item: TabItemType;
5
+ }): JSX.Element;
6
+ export declare const OrderListItem: import("react").MemoExoticComponent<typeof OrderListItemJsx>;
7
+ export {};
@@ -0,0 +1,35 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ import { createElement as _createElement } from "react";
12
+ import { memo, useEffect, useState } from 'react';
13
+ import { getEnv, queryContractPageC } from '@brushes/api';
14
+ import { useComponent, ScrollView, Loading } from '@brushes/qj-simulate-component';
15
+ import { Item } from './orderItem';
16
+ import { result } from './mock';
17
+ function OrderListItemJsx({ item }) {
18
+ const { View } = useComponent();
19
+ const [loading, setLoading] = useState(false);
20
+ const [data, setData] = useState([]);
21
+ const isTaro = getEnv();
22
+ useEffect(() => {
23
+ onScroll();
24
+ }, []);
25
+ const onScroll = (e = {}) => __awaiter(this, void 0, void 0, function* () {
26
+ setLoading(true);
27
+ // console.log(17, e.detail);
28
+ const data = yield queryContractPageC({ page: 1, rows: 10 });
29
+ console.log(19, data);
30
+ setData((val) => [...val, ...result.rows]);
31
+ setLoading(false);
32
+ });
33
+ return (_jsx(View, Object.assign({ className: 'orderListItemWrap', style: { height: isTaro ? '100vh' : '667px' } }, { children: _jsx(ScrollView, Object.assign({ onScroll: onScroll, style: { height: '100vh' } }, { children: _jsxs(View, { children: [data.map((item, index) => (_createElement(Item, Object.assign({}, item, { key: index })))), loading ? _jsx(Loading, {}) : null] }) })) })));
34
+ }
35
+ export const OrderListItem = memo(OrderListItemJsx);