@pisell/materials 1.0.522 → 1.0.523

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.
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
5
5
  className: string;
6
6
  defaultCurrent: number;
7
7
  showTotal: (total: number, range: [number, number]) => string;
8
- itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
8
+ itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
9
9
  responsive: boolean;
10
10
  size: string;
11
11
  };
@@ -5,7 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
5
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState, forwardRef, useImperativeHandle } from 'react';
8
- import { locales } from '@pisell/utils';
8
+ import { locales, isMobile } from '@pisell/utils';
9
9
  import { PisellModal, Input } from "../../../index";
10
10
  var useOpenNote = function useOpenNote(_ref, ref) {
11
11
  var onNoteChange = _ref.onNoteChange;
@@ -36,7 +36,7 @@ var useOpenNote = function useOpenNote(_ref, ref) {
36
36
  setOpen(false);
37
37
  };
38
38
  return /*#__PURE__*/React.createElement(PisellModal, {
39
- platform: 'pc',
39
+ platform: isMobile() ? 'h5' : 'pc',
40
40
  open: open,
41
41
  bodyStyle: {
42
42
  padding: 0
@@ -47,6 +47,7 @@ var useOpenNote = function useOpenNote(_ref, ref) {
47
47
  },
48
48
  onOk: handleOk,
49
49
  destroyOnClose: true,
50
+ mobileModalHeight: '80vh',
50
51
  className: "pisell-lowcode__booking-select-pet-modal-wrap",
51
52
  okText: locales.getText('pisell2.product.card.confirm'),
52
53
  cancelText: locales.getText('pisell2.product.card.cancel')
@@ -81,7 +81,7 @@ var ProductCard = function ProductCard(props) {
81
81
  return (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (relation_products === null || relation_products === void 0 ? void 0 : relation_products.length);
82
82
  }, [bundle, relation_products]);
83
83
  return /*#__PURE__*/React.createElement(CardPro, {
84
- className: classNames('pisell-lowcode-product-card', (_classNames = {}, _defineProperty(_classNames, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames, 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct), _classNames)),
84
+ className: classNames('pisell-lowcode-product-card', (_classNames = {}, _defineProperty(_classNames, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames, 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct), _defineProperty(_classNames, 'pisell-lowcode-product-card-disabled', dataSource === null || dataSource === void 0 ? void 0 : dataSource.disabled), _classNames)),
85
85
  key: _id
86
86
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
87
87
  onClick: function onClick(e) {
@@ -47,8 +47,12 @@
47
47
  }
48
48
  }
49
49
 
50
+ .pisell-lowcode-product-card-disabled {
51
+ opacity: 0.4;
52
+ }
53
+
50
54
  .pisell-lowcode-product-card-error {
51
55
  border: none !important;
52
56
  margin: 8px -16px -8px;
53
57
  border-radius: 0 0 8px 8px;
54
- }
58
+ }
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
5
5
  className: string;
6
6
  defaultCurrent: number;
7
7
  showTotal: (total: number, range: [number, number]) => string;
8
- itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
8
+ itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
9
9
  responsive: boolean;
10
10
  size: string;
11
11
  };
@@ -55,13 +55,14 @@ var useOpenNote = ({ onNoteChange }, ref) => {
55
55
  return /* @__PURE__ */ import_react.default.createElement(
56
56
  import__.PisellModal,
57
57
  {
58
- platform: "pc",
58
+ platform: (0, import_utils.isMobile)() ? "h5" : "pc",
59
59
  open,
60
60
  bodyStyle: { padding: 0 },
61
61
  title: (item == null ? void 0 : item.note) ? import_utils.locales.getText("pisell2.product.card.discount.edit.note") : import_utils.locales.getText("pisell2.product.card.discount.add.note"),
62
62
  onCancel: () => setOpen(false),
63
63
  onOk: handleOk,
64
64
  destroyOnClose: true,
65
+ mobileModalHeight: "80vh",
65
66
  className: "pisell-lowcode__booking-select-pet-modal-wrap",
66
67
  okText: import_utils.locales.getText("pisell2.product.card.confirm"),
67
68
  cancelText: import_utils.locales.getText("pisell2.product.card.cancel")
@@ -89,7 +89,8 @@ var ProductCard = (props) => {
89
89
  {
90
90
  className: (0, import_classnames.default)("pisell-lowcode-product-card", {
91
91
  ["pisell-lowcode-product-card-image"]: !showImage,
92
- ["pisell-lowcode-normal-product-card"]: !showImage && isNormalProduct
92
+ ["pisell-lowcode-normal-product-card"]: !showImage && isNormalProduct,
93
+ ["pisell-lowcode-product-card-disabled"]: dataSource == null ? void 0 : dataSource.disabled
93
94
  }),
94
95
  key: _id
95
96
  },
@@ -47,8 +47,12 @@
47
47
  }
48
48
  }
49
49
 
50
+ .pisell-lowcode-product-card-disabled {
51
+ opacity: 0.4;
52
+ }
53
+
50
54
  .pisell-lowcode-product-card-error {
51
55
  border: none !important;
52
56
  margin: 8px -16px -8px;
53
57
  border-radius: 0 0 8px 8px;
54
- }
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.522",
3
+ "version": "1.0.523",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -68,9 +68,9 @@
68
68
  "styled-components": "^6.0.0-rc.3",
69
69
  "libphonenumber-js": "^1.11.17",
70
70
  "swiper": "^8.4.7",
71
+ "@pisell/utils": "1.0.43",
71
72
  "@pisell/date-picker": "1.0.114",
72
- "@pisell/icon": "0.0.10",
73
- "@pisell/utils": "1.0.43"
73
+ "@pisell/icon": "0.0.10"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": "^18.0.0",