@pisell/materials 2.2.41 → 2.2.43

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 (137) hide show
  1. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  2. package/es/components/TimeResourceSelector/index.js +115 -0
  3. package/es/components/TimeResourceSelector/index.less +59 -0
  4. package/es/components/pisellAnchor/index.d.ts +15 -0
  5. package/es/components/pisellAnchor/index.js +126 -0
  6. package/es/components/pisellAnchor/index.less +177 -0
  7. package/es/components/pisellAvatar/index.d.ts +19 -0
  8. package/es/components/pisellAvatar/index.js +90 -0
  9. package/es/components/pisellAvatar/index.less +26 -0
  10. package/es/components/pisellCard/index.d.ts +8 -0
  11. package/es/components/pisellCard/index.js +34 -5
  12. package/es/components/pisellCard/index.less +31 -4
  13. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  14. package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
  15. package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
  16. package/es/components/pisellDropdown/index.d.ts +20 -0
  17. package/es/components/pisellDropdown/index.js +51 -0
  18. package/es/components/pisellDropdown/index.less +44 -0
  19. package/es/components/pisellEmpty/index.d.ts +2 -1
  20. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  21. package/es/components/pisellHeaderProgressBar/index.js +76 -0
  22. package/es/components/pisellHeaderProgressBar/index.less +18 -0
  23. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  24. package/es/components/pisellImageCarousels/index.js +108 -0
  25. package/es/components/pisellImageCarousels/index.less +92 -0
  26. package/es/components/pisellList01/index.d.ts +17 -0
  27. package/es/components/pisellList01/index.js +105 -0
  28. package/es/components/pisellList01/index.less +53 -0
  29. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  30. package/es/components/pisellSectionHeaders/index.js +35 -0
  31. package/es/components/pisellSectionHeaders/index.less +46 -0
  32. package/es/components/pisellViewGrid/index.d.ts +16 -0
  33. package/es/components/pisellViewGrid/index.js +66 -0
  34. package/es/components/pisellViewGrid/index.less +31 -0
  35. package/es/components/productCard/components/Header/index.js +3 -2
  36. package/es/components/productCard/hooks/useOpenNote.js +3 -2
  37. package/es/components/productCard/index.js +7 -3
  38. package/es/components/productCard/index.less +6 -2
  39. package/es/components/productCard/status.js +3 -1
  40. package/es/components/productCard/types.d.ts +2 -0
  41. package/es/components/productCard/utils.js +17 -1
  42. package/es/components/section-footers/index.d.ts +9 -0
  43. package/es/components/section-footers/index.js +17 -0
  44. package/es/components/section-footers/index.less +5 -0
  45. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  46. package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
  47. package/es/index.d.ts +10 -0
  48. package/es/index.js +11 -1
  49. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  50. package/lib/components/TimeResourceSelector/index.js +109 -0
  51. package/lib/components/TimeResourceSelector/index.less +59 -0
  52. package/lib/components/pisellAnchor/index.d.ts +15 -0
  53. package/lib/components/pisellAnchor/index.js +120 -0
  54. package/lib/components/pisellAnchor/index.less +177 -0
  55. package/lib/components/pisellAvatar/index.d.ts +19 -0
  56. package/lib/components/pisellAvatar/index.js +108 -0
  57. package/lib/components/pisellAvatar/index.less +26 -0
  58. package/lib/components/pisellCard/index.d.ts +8 -0
  59. package/lib/components/pisellCard/index.js +30 -7
  60. package/lib/components/pisellCard/index.less +31 -4
  61. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  62. package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
  63. package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
  64. package/lib/components/pisellDropdown/index.d.ts +20 -0
  65. package/lib/components/pisellDropdown/index.js +72 -0
  66. package/lib/components/pisellDropdown/index.less +44 -0
  67. package/lib/components/pisellEmpty/index.d.ts +2 -1
  68. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  69. package/lib/components/pisellHeaderProgressBar/index.js +88 -0
  70. package/lib/components/pisellHeaderProgressBar/index.less +18 -0
  71. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  72. package/lib/components/pisellImageCarousels/index.js +108 -0
  73. package/lib/components/pisellImageCarousels/index.less +92 -0
  74. package/lib/components/pisellList01/index.d.ts +17 -0
  75. package/lib/components/pisellList01/index.js +113 -0
  76. package/lib/components/pisellList01/index.less +53 -0
  77. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  78. package/lib/components/pisellSectionHeaders/index.js +52 -0
  79. package/lib/components/pisellSectionHeaders/index.less +46 -0
  80. package/lib/components/pisellViewGrid/index.d.ts +16 -0
  81. package/lib/components/pisellViewGrid/index.js +98 -0
  82. package/lib/components/pisellViewGrid/index.less +31 -0
  83. package/lib/components/productCard/components/Header/index.js +3 -2
  84. package/lib/components/productCard/hooks/useOpenNote.js +2 -1
  85. package/lib/components/productCard/index.js +9 -4
  86. package/lib/components/productCard/index.less +6 -2
  87. package/lib/components/productCard/status.js +3 -1
  88. package/lib/components/productCard/types.d.ts +2 -0
  89. package/lib/components/productCard/utils.js +15 -4
  90. package/lib/components/section-footers/index.d.ts +9 -0
  91. package/lib/components/section-footers/index.js +44 -0
  92. package/lib/components/section-footers/index.less +5 -0
  93. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  94. package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
  95. package/lib/index.d.ts +10 -0
  96. package/lib/index.js +30 -0
  97. package/lowcode/pisell-anchor/meta.ts +118 -0
  98. package/lowcode/pisell-anchor/snippets.ts +26 -0
  99. package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
  100. package/lowcode/pisell-avatar/meta.ts +111 -0
  101. package/lowcode/pisell-avatar/snippets.ts +14 -0
  102. package/lowcode/pisell-card/meta.ts +62 -27
  103. package/lowcode/pisell-card/snippets.ts +6 -0
  104. package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
  105. package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
  106. package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
  107. package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
  108. package/lowcode/pisell-dropdown/meta.ts +180 -0
  109. package/lowcode/pisell-dropdown/snippets.ts +69 -0
  110. package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
  111. package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
  112. package/lowcode/pisell-image-carousels/meta.ts +143 -0
  113. package/lowcode/pisell-image-carousels/snippets.ts +20 -0
  114. package/lowcode/pisell-list01/meta.ts +74 -0
  115. package/lowcode/pisell-list01/snippets.ts +35 -0
  116. package/lowcode/pisell-section-headers/meta.ts +91 -0
  117. package/lowcode/pisell-section-headers/snippets.ts +22 -0
  118. package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
  119. package/lowcode/pisell-view-grid/meta.ts +167 -0
  120. package/lowcode/pisell-view-grid/snippets.ts +54 -0
  121. package/lowcode/section-footers/meta.ts +66 -0
  122. package/lowcode/section-footers/snippe.ts +21 -0
  123. package/package.json +4 -3
  124. package/build/lowcode/assets-daily.json +0 -93
  125. package/build/lowcode/assets-dev.json +0 -93
  126. package/build/lowcode/assets-prod.json +0 -93
  127. package/build/lowcode/designer.html +0 -303
  128. package/build/lowcode/index.html +0 -305
  129. package/build/lowcode/index.js +0 -1
  130. package/build/lowcode/meta.js +0 -9
  131. package/build/lowcode/preview.css +0 -1
  132. package/build/lowcode/preview.html +0 -35
  133. package/build/lowcode/preview.js +0 -304
  134. package/build/lowcode/render/default/view.css +0 -1
  135. package/build/lowcode/render/default/view.js +0 -232
  136. package/build/lowcode/view.css +0 -1
  137. package/build/lowcode/view.js +0 -232
@@ -1,5 +1,10 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import React from 'react';
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ import React, { useEffect } from 'react';
3
8
  import { Card } from 'antd';
4
9
  import classNames from 'classnames';
5
10
  import "./index.less";
@@ -9,8 +14,32 @@ import "./index.less";
9
14
  * @constructor
10
15
  */
11
16
  var PisellCard = function PisellCard(props) {
12
- return /*#__PURE__*/React.createElement(Card, _extends({}, props, {
13
- className: classNames('pisell-card-wrap', props.className)
14
- }));
17
+ var _props$borderRadius = props.borderRadius,
18
+ borderRadius = _props$borderRadius === void 0 ? 12 : _props$borderRadius,
19
+ _props$padding = props.padding,
20
+ padding = _props$padding === void 0 ? 16 : _props$padding,
21
+ _props$loading = props.loading,
22
+ loading = _props$loading === void 0 ? false : _props$loading,
23
+ _props$selected = props.selected,
24
+ selected = _props$selected === void 0 ? false : _props$selected,
25
+ _props$bordered = props.bordered,
26
+ bordered = _props$bordered === void 0 ? true : _props$bordered,
27
+ _props$disabled = props.disabled,
28
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
29
+ style = props.style,
30
+ className = props.className,
31
+ _props$isClickable = props.isClickable,
32
+ isClickable = _props$isClickable === void 0 ? true : _props$isClickable;
33
+ useEffect(function () {
34
+ document.body.id = 'body';
35
+ }, []);
36
+ var cardProps = _objectSpread(_objectSpread({}, props), {}, {
37
+ style: _objectSpread({
38
+ '--card-padding': "".concat(padding, "px"),
39
+ '--card-borderRadius': "".concat(borderRadius, "px")
40
+ }, style),
41
+ className: classNames('pisell-card-wrap', selected && 'pisell-card-wrap-selected', disabled && 'pisell-card-wrap-disabled', !isClickable && 'pisell-card-wrap-clickable', className)
42
+ });
43
+ return /*#__PURE__*/React.createElement(Card, cardProps);
15
44
  };
16
45
  export default PisellCard;
@@ -1,9 +1,36 @@
1
1
  .pisell-card-wrap {
2
- border-radius: 12px;
2
+ border-radius: var(--card-borderRadius, 12px);
3
+ box-sizing: border-box;
4
+ cursor: pointer;
5
+ box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
6
+ &.pisell-card-wrap-selected {
7
+ border-width: 2px;
8
+ border-color: var(--theme-color, #7f56d9);
9
+ }
10
+ &.pisell-card-wrap-disabled {
11
+ cursor: not-allowed;
12
+ opacity: 0.4;
13
+ // pointer-events: none;
14
+
15
+ &:hover,
16
+ &:active,
17
+ &.focus {
18
+ background-color: inherit;
19
+ color: inherit;
20
+ text-decoration: none;
21
+ }
22
+ }
3
23
  .pisell-lowcode-card-body {
4
- padding: 16px;
24
+ padding: var(--card-padding, 16px);
25
+ }
26
+ &:hover {
27
+ background: var(--Gray-50, #f9fafb);
5
28
  }
29
+ }
30
+
31
+ &.pisell-card-wrap-clickable {
32
+ cursor: initial;
6
33
  &:hover {
7
- background: var(--Gray-50, #F9FAFB);
34
+ background: none;
8
35
  }
9
- }
36
+ }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface PisellCustomCheckboxGroupProps {
4
+ dataSource?: any[];
5
+ disabled?: boolean;
6
+ allowAdd?: boolean;
7
+ isMultiple?: boolean;
8
+ id?: string | string[];
9
+ onClick?: (value: any) => void;
10
+ onAdd?: () => void;
11
+ renderAddItem?: (item: any) => React.ReactNode;
12
+ [key: string]: any;
13
+ className?: string;
14
+ }
15
+ declare const PisellCustomCheckboxGroup: React.FC<PisellCustomCheckboxGroupProps>;
16
+ export default PisellCustomCheckboxGroup;
@@ -0,0 +1,72 @@
1
+ var _excluded = ["dataSource", "allowAdd", "onAdd", "onClick", "renderAddItem", "disabled", "isMultiple", "value", "onChange", "className"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
+ import React, { useMemo } from 'react';
12
+ import classNames from 'classnames';
13
+ import PisellViewGrid from "../pisellViewGrid";
14
+ import "./index.less";
15
+ var PisellCustomCheckboxGroup = function PisellCustomCheckboxGroup(_ref) {
16
+ var _ref$dataSource = _ref.dataSource,
17
+ dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
18
+ _ref$allowAdd = _ref.allowAdd,
19
+ allowAdd = _ref$allowAdd === void 0 ? false : _ref$allowAdd,
20
+ onAdd = _ref.onAdd,
21
+ _onClick = _ref.onClick,
22
+ renderAddItem = _ref.renderAddItem,
23
+ _ref$disabled = _ref.disabled,
24
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
25
+ _ref$isMultiple = _ref.isMultiple,
26
+ isMultiple = _ref$isMultiple === void 0 ? false : _ref$isMultiple,
27
+ value = _ref.value,
28
+ onChange = _ref.onChange,
29
+ className = _ref.className,
30
+ rest = _objectWithoutProperties(_ref, _excluded);
31
+ /**
32
+ * @title: 构建最终数据,如果允许添加,则增加一项
33
+ * @description:
34
+ * @param {*} useMemo
35
+ * @return {*}
36
+ * @Author: WangHan
37
+ * @Date: 2025-01-08 18:21
38
+ */
39
+ var finalDataSource = useMemo(function () {
40
+ return allowAdd ? [{
41
+ id: 0,
42
+ text: '+',
43
+ isAddCard: true
44
+ }].concat(_toConsumableArray(dataSource)) : dataSource;
45
+ }, [allowAdd, dataSource]);
46
+
47
+ /**
48
+ * @title: 渲染卡片
49
+ * @description:
50
+ * @param {any} item
51
+ * @param {number} index
52
+ * @return {*}
53
+ * @Author: WangHan
54
+ * @Date: 2025-01-08 18:11
55
+ */
56
+ var renderGridItem = function renderGridItem(item, index) {
57
+ var _rest$renderItem;
58
+ return /*#__PURE__*/React.createElement("div", {
59
+ onClick: function onClick() {
60
+ return _onClick(item);
61
+ }
62
+ }, item !== null && item !== void 0 && item.isAddCard && renderAddItem ? renderAddItem(item) : rest === null || rest === void 0 ? void 0 : (_rest$renderItem = rest.renderItem) === null || _rest$renderItem === void 0 ? void 0 : _rest$renderItem.call(rest, item, index));
63
+ };
64
+ return /*#__PURE__*/React.createElement(PisellViewGrid, _extends({}, rest, {
65
+ dataSource: finalDataSource,
66
+ renderItem: function renderItem(item, index) {
67
+ return renderGridItem(item, index);
68
+ },
69
+ className: classNames('pisell-custom-checkbox-group', className)
70
+ }));
71
+ };
72
+ export default PisellCustomCheckboxGroup;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface MenuItemType {
4
+ key: string;
5
+ label: string;
6
+ icon?: React.ReactNode;
7
+ shortcut?: string;
8
+ divider?: boolean;
9
+ }
10
+ export interface PisellDropdownProps {
11
+ trigger?: React.ReactNode;
12
+ items?: MenuItemType[];
13
+ showShortcut?: boolean;
14
+ triggerType?: ('click' | 'hover')[];
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ onSelect?: (key: string) => void;
18
+ }
19
+ declare const PisellDropdown: React.FC<PisellDropdownProps>;
20
+ export default PisellDropdown;
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { Menu } from 'antd';
3
+ import Dropdown from "../dropdown";
4
+ import classNames from 'classnames';
5
+ import "./index.less";
6
+ var PisellDropdown = function PisellDropdown(_ref) {
7
+ var trigger = _ref.trigger,
8
+ _ref$items = _ref.items,
9
+ items = _ref$items === void 0 ? [] : _ref$items,
10
+ _ref$showShortcut = _ref.showShortcut,
11
+ showShortcut = _ref$showShortcut === void 0 ? true : _ref$showShortcut,
12
+ _ref$triggerType = _ref.triggerType,
13
+ triggerType = _ref$triggerType === void 0 ? ['click'] : _ref$triggerType,
14
+ className = _ref.className,
15
+ style = _ref.style,
16
+ onSelect = _ref.onSelect;
17
+ var renderMenuItem = function renderMenuItem(item) {
18
+ var menuItem = /*#__PURE__*/React.createElement("div", {
19
+ className: "pisell-dropdown-item"
20
+ }, /*#__PURE__*/React.createElement("div", {
21
+ className: "pisell-dropdown-item-content"
22
+ }, item.icon && /*#__PURE__*/React.createElement("span", {
23
+ className: "pisell-dropdown-item-icon"
24
+ }, item.icon), /*#__PURE__*/React.createElement("span", {
25
+ className: "pisell-dropdown-item-label"
26
+ }, item.label)), showShortcut && item.shortcut && /*#__PURE__*/React.createElement("span", {
27
+ className: "pisell-dropdown-item-shortcut"
28
+ }, item.shortcut));
29
+ return item.divider ? /*#__PURE__*/React.createElement(React.Fragment, {
30
+ key: item.key
31
+ }, /*#__PURE__*/React.createElement(Menu.Item, {
32
+ key: item.key
33
+ }, menuItem), /*#__PURE__*/React.createElement(Menu.Divider, null)) : /*#__PURE__*/React.createElement(Menu.Item, {
34
+ key: item.key
35
+ }, menuItem);
36
+ };
37
+ var menu = /*#__PURE__*/React.createElement(Menu, {
38
+ onClick: function onClick(_ref2) {
39
+ var key = _ref2.key;
40
+ return onSelect === null || onSelect === void 0 ? void 0 : onSelect(key);
41
+ },
42
+ className: "pisell-dropdown-menu"
43
+ }, items.map(renderMenuItem));
44
+ return /*#__PURE__*/React.createElement(Dropdown, {
45
+ overlay: menu,
46
+ trigger: triggerType,
47
+ className: classNames('pisell-dropdown', className),
48
+ style: style
49
+ }, trigger || /*#__PURE__*/React.createElement("span", null, "Account"));
50
+ };
51
+ export default PisellDropdown;
@@ -0,0 +1,44 @@
1
+ .pisell-dropdown {
2
+ &-menu {
3
+ min-width: 200px;
4
+ }
5
+
6
+ &-item {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: space-between;
10
+ padding: 8px 12px;
11
+
12
+ &-content {
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 8px;
16
+ }
17
+
18
+ &-icon {
19
+ display: flex;
20
+ align-items: center;
21
+ font-size: 16px;
22
+ color: #666;
23
+ }
24
+
25
+ &-label {
26
+ color: #333;
27
+ }
28
+
29
+ &-shortcut {
30
+ color: #999;
31
+ font-size: 12px;
32
+ }
33
+ }
34
+ }
35
+
36
+ .ant-dropdown-menu-item {
37
+ padding: 0 !important;
38
+
39
+ &:hover {
40
+ .pisell-dropdown-item {
41
+ background-color: #f5f5f5;
42
+ }
43
+ }
44
+ }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { EmptyProps } from 'antd';
3
- import { PisellContextType } from "../pisell-config-provider/context";
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
4
  import './index.less';
5
5
  export interface PisellEmptyProps extends EmptyProps {
6
6
  /** 平台 */
@@ -11,6 +11,7 @@ export interface PisellEmptyProps extends EmptyProps {
11
11
  icon?: React.ReactNode;
12
12
  /** 自定义底部额外操作区域 */
13
13
  footer?: React.ReactNode;
14
+ [key: string]: any;
14
15
  }
15
16
  declare const PisellEmpty: (props: PisellEmptyProps) => React.JSX.Element;
16
17
  export default PisellEmpty;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface PisellHeaderProgressBarProps {
4
+ title?: React.ReactNode;
5
+ stepText?: React.ReactNode;
6
+ showClose?: boolean;
7
+ /** 是否启用投影 */
8
+ enableShadow?: boolean;
9
+ /** 是否启用描边 */
10
+ enableBorder?: boolean;
11
+ /** 描边粗细 */
12
+ borderWidth?: number;
13
+ /** 描边颜色 */
14
+ borderColor?: string;
15
+ /** 头部背景颜色 */
16
+ backgroundColor?: string;
17
+ /** 自定义类名 */
18
+ className?: string;
19
+ /** 自定义样式 */
20
+ style?: React.CSSProperties;
21
+ /** 是否显示返回键 */
22
+ showBack?: boolean;
23
+ /** 返回按钮点击事件 */
24
+ onBack?: () => void;
25
+ /** 关闭按钮点击事件 */
26
+ onClose?: () => void;
27
+ }
28
+ declare const PisellHeaderProgressBar: React.FC<PisellHeaderProgressBarProps>;
29
+ export default PisellHeaderProgressBar;
@@ -0,0 +1,76 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ import React from 'react';
8
+ import classNames from 'classnames';
9
+ import PisellSectionHeaders from "../pisellSectionHeaders";
10
+ import Iconfont from "../iconfont";
11
+ import "./index.less";
12
+ var prefixCls = 'pisell-header-progress-bar';
13
+ var PisellHeaderProgressBar = function PisellHeaderProgressBar(_ref) {
14
+ var title = _ref.title,
15
+ stepText = _ref.stepText,
16
+ _ref$showBack = _ref.showBack,
17
+ showBack = _ref$showBack === void 0 ? true : _ref$showBack,
18
+ _ref$showClose = _ref.showClose,
19
+ showClose = _ref$showClose === void 0 ? true : _ref$showClose,
20
+ _ref$enableShadow = _ref.enableShadow,
21
+ enableShadow = _ref$enableShadow === void 0 ? false : _ref$enableShadow,
22
+ _ref$enableBorder = _ref.enableBorder,
23
+ enableBorder = _ref$enableBorder === void 0 ? false : _ref$enableBorder,
24
+ _ref$borderWidth = _ref.borderWidth,
25
+ borderWidth = _ref$borderWidth === void 0 ? 1 : _ref$borderWidth,
26
+ _ref$borderColor = _ref.borderColor,
27
+ borderColor = _ref$borderColor === void 0 ? '#d0d5dd' : _ref$borderColor,
28
+ _ref$backgroundColor = _ref.backgroundColor,
29
+ backgroundColor = _ref$backgroundColor === void 0 ? '#FFFFFF' : _ref$backgroundColor,
30
+ className = _ref.className,
31
+ style = _ref.style,
32
+ onBack = _ref.onBack,
33
+ onClose = _ref.onClose;
34
+ var classes = classNames(prefixCls, className);
35
+
36
+ /**
37
+ * @title: 左侧内容
38
+ * @description:
39
+ * @return {*}
40
+ * @Author: WangHan
41
+ * @Date: 2025-01-12 16:04
42
+ */
43
+ // const backNode = () => {
44
+ // return (
45
+
46
+ // );
47
+ // };
48
+
49
+ var customStyle = _objectSpread(_objectSpread({}, style), {}, {
50
+ backgroundColor: backgroundColor,
51
+ boxShadow: enableShadow ? '0px 1px 2px 0px rgba(16, 24, 40, 0.05)' : 'none',
52
+ borderBottom: enableBorder ? "".concat(borderWidth, "px solid ").concat(borderColor) : 'none'
53
+ });
54
+ return /*#__PURE__*/React.createElement(PisellSectionHeaders, {
55
+ backNode: showBack ? /*#__PURE__*/React.createElement(Iconfont, {
56
+ className: "".concat(prefixCls, "-back-icon"),
57
+ type: "pisell2-chevron-left"
58
+ }) : null,
59
+ centerNode: /*#__PURE__*/React.createElement("div", {
60
+ className: "".concat(prefixCls, "-center")
61
+ }, stepText ? /*#__PURE__*/React.createElement("div", {
62
+ className: "step"
63
+ }, stepText) : null, title ? /*#__PURE__*/React.createElement("div", {
64
+ className: "select-text"
65
+ }, title) : null),
66
+ actionNode: showClose ? /*#__PURE__*/React.createElement(Iconfont, {
67
+ type: "pisell2-x-close",
68
+ className: "".concat(prefixCls, "-close-icon")
69
+ }) : null,
70
+ style: customStyle,
71
+ className: classes,
72
+ onAction: onClose,
73
+ onBack: onBack
74
+ });
75
+ };
76
+ export default PisellHeaderProgressBar;
@@ -0,0 +1,18 @@
1
+ .pisell-header-progress-bar {
2
+ width: 100%;
3
+
4
+ &-center {
5
+ margin-left: 14px;
6
+ }
7
+
8
+ &-back-icon {
9
+ font-size: 36px;
10
+ color: #000000;
11
+ }
12
+
13
+ &-close-icon {
14
+ font-size: 36px;
15
+ flex-shrink: 0;
16
+ color: #000000;
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import 'swiper/swiper-bundle.css';
3
+ import './index.less';
4
+ export interface PisellImageCarouselsProps {
5
+ dataSource?: string[];
6
+ width?: number | string;
7
+ height?: number;
8
+ showArrows?: boolean;
9
+ showDots?: boolean;
10
+ autoplay?: boolean;
11
+ interval?: number;
12
+ borderRadius?: number;
13
+ loop?: boolean;
14
+ className?: string;
15
+ style?: React.CSSProperties;
16
+ }
17
+ declare const PisellImageCarousels: React.FC<PisellImageCarouselsProps>;
18
+ export default PisellImageCarousels;
@@ -0,0 +1,108 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ import React, { useRef, useEffect } from 'react';
8
+ import { Image } from 'antd';
9
+ import { Swiper, Navigation, Pagination, Autoplay } from 'swiper';
10
+ import 'swiper/swiper-bundle.css';
11
+ import Iconfont from "../iconfont";
12
+ import classNames from 'classnames';
13
+ import "./index.less";
14
+ var PisellImageCarousels = function PisellImageCarousels(_ref) {
15
+ var _ref$dataSource = _ref.dataSource,
16
+ dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
17
+ _ref$width = _ref.width,
18
+ width = _ref$width === void 0 ? 640 : _ref$width,
19
+ _ref$height = _ref.height,
20
+ height = _ref$height === void 0 ? 400 : _ref$height,
21
+ _ref$showArrows = _ref.showArrows,
22
+ showArrows = _ref$showArrows === void 0 ? true : _ref$showArrows,
23
+ _ref$showDots = _ref.showDots,
24
+ showDots = _ref$showDots === void 0 ? true : _ref$showDots,
25
+ _ref$autoplay = _ref.autoplay,
26
+ autoplay = _ref$autoplay === void 0 ? true : _ref$autoplay,
27
+ _ref$interval = _ref.interval,
28
+ interval = _ref$interval === void 0 ? 3000 : _ref$interval,
29
+ _ref$borderRadius = _ref.borderRadius,
30
+ borderRadius = _ref$borderRadius === void 0 ? 8 : _ref$borderRadius,
31
+ _ref$loop = _ref.loop,
32
+ loop = _ref$loop === void 0 ? true : _ref$loop,
33
+ className = _ref.className,
34
+ style = _ref.style;
35
+ var swiperRef = useRef(null);
36
+ var swiperInstance = useRef(null);
37
+ useEffect(function () {
38
+ if (swiperRef.current) {
39
+ swiperInstance.current = new Swiper(swiperRef.current, {
40
+ modules: [Navigation, Pagination, Autoplay],
41
+ slidesPerView: 1,
42
+ spaceBetween: 0,
43
+ loop: loop,
44
+ // 导航箭头
45
+ navigation: showArrows ? {
46
+ nextEl: '.pisell-carousel-next',
47
+ prevEl: '.pisell-carousel-prev'
48
+ } : false,
49
+ // 分页点
50
+ pagination: showDots ? {
51
+ el: '.pisell-carousel-pagination',
52
+ clickable: true
53
+ } : false,
54
+ // 自动播放
55
+ autoplay: autoplay ? {
56
+ delay: interval,
57
+ disableOnInteraction: false
58
+ } : false
59
+ });
60
+ }
61
+ return function () {
62
+ if (swiperInstance.current) {
63
+ swiperInstance.current.destroy();
64
+ }
65
+ };
66
+ }, [showArrows, showDots, autoplay, interval, loop]);
67
+ return /*#__PURE__*/React.createElement("div", {
68
+ className: classNames('pisell-image-carousel', className),
69
+ style: _objectSpread({
70
+ width: width,
71
+ height: height
72
+ }, style)
73
+ }, /*#__PURE__*/React.createElement("div", {
74
+ className: "swiper",
75
+ ref: swiperRef
76
+ }, /*#__PURE__*/React.createElement("div", {
77
+ className: "swiper-wrapper"
78
+ }, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item, index) {
79
+ return /*#__PURE__*/React.createElement("div", {
80
+ key: index,
81
+ className: "swiper-slide"
82
+ }, /*#__PURE__*/React.createElement(Image, {
83
+ preview: false,
84
+ src: item,
85
+ width: width,
86
+ height: height,
87
+ loading: "lazy",
88
+ style: {
89
+ borderRadius: "".concat(borderRadius, "px")
90
+ }
91
+ }));
92
+ })), showArrows && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
93
+ className: "pisell-carousel-prev"
94
+ }, /*#__PURE__*/React.createElement("span", {
95
+ className: "carousel-arrow"
96
+ }, /*#__PURE__*/React.createElement(Iconfont, {
97
+ type: "pisell2-chevron-left"
98
+ }))), /*#__PURE__*/React.createElement("div", {
99
+ className: "pisell-carousel-next"
100
+ }, /*#__PURE__*/React.createElement("span", {
101
+ className: "carousel-arrow"
102
+ }, /*#__PURE__*/React.createElement(Iconfont, {
103
+ type: "pisell2-chevron-right"
104
+ })))), showDots && /*#__PURE__*/React.createElement("div", {
105
+ className: "pisell-carousel-pagination"
106
+ })));
107
+ };
108
+ export default PisellImageCarousels;
@@ -0,0 +1,92 @@
1
+ .pisell-image-carousel {
2
+ position: relative;
3
+ overflow: hidden;
4
+
5
+ .swiper {
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+
10
+ .swiper-slide {
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+
15
+ img {
16
+ width: 100%;
17
+ height: 100%;
18
+ object-fit: cover;
19
+ }
20
+ }
21
+
22
+ // 导航箭头样式
23
+ .pisell-carousel-prev,
24
+ .pisell-carousel-next {
25
+ position: absolute;
26
+ top: 50%;
27
+ transform: translateY(-50%);
28
+ width: 44px;
29
+ height: 44px;
30
+ border-radius: 50%;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ cursor: pointer;
35
+ z-index: 10;
36
+ transition: all 0.3s;
37
+ padding: 10px;
38
+ background: rgba(255, 255, 255, 0.6);
39
+ backdrop-filter: blur(4px);
40
+
41
+ &:hover {
42
+ background: rgba(255, 255, 255, 1);
43
+ }
44
+
45
+ .carousel-arrow {
46
+ color: #344054;
47
+ font-size: 24px;
48
+ line-height: 1;
49
+ }
50
+ }
51
+
52
+ .pisell-carousel-prev {
53
+ left: 20px;
54
+ }
55
+
56
+ .pisell-carousel-next {
57
+ right: 20px;
58
+ }
59
+
60
+ // 分页点样式
61
+ .pisell-carousel-pagination {
62
+ position: absolute;
63
+ bottom: 16px;
64
+ left: 50%;
65
+ transform: translateX(-50%);
66
+ z-index: 10;
67
+ display: inline-flex;
68
+ padding: 12px;
69
+ justify-content: center;
70
+ align-items: center;
71
+ gap: 6px;
72
+ border-radius: 17px;
73
+ background: rgba(255, 255, 255, 0.9);
74
+ backdrop-filter: blur(4px);
75
+ width: max-content;
76
+
77
+ .swiper-pagination-bullet {
78
+ width: 10px;
79
+ height: 10px;
80
+ border-radius: 50%;
81
+ cursor: pointer;
82
+ background: var(--Gray-300, #d0d5dd);
83
+ mix-blend-mode: multiply;
84
+ margin: 0;
85
+ opacity: 1;
86
+
87
+ &-active {
88
+ background: var(--Primary-700, #6941c6);
89
+ }
90
+ }
91
+ }
92
+ }