@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
package/es/index.js CHANGED
@@ -134,4 +134,14 @@ export { default as PisellAdjustPriceInputNumber } from "./components/pisellAdju
134
134
  export { default as PisellStatisticList } from "./components/pisellStatisticList";
135
135
  export { default as PisellFloatingPanel } from "./components/pisellFloatingPanel";
136
136
  export { default as ProductCard } from "./components/productCard";
137
- export { default as Collapse } from "./components/collapse";
137
+ export { default as Collapse } from "./components/collapse";
138
+ export { default as PisellAvatar } from "./components/pisellAvatar";
139
+ export { default as PisellViewGrid } from "./components/pisellViewGrid";
140
+ export { default as PisellCustomCheckboxGroup } from "./components/pisellCustomCheckboxGroup";
141
+ export { default as PisellDropdown } from "./components/pisellDropdown";
142
+ export { default as PisellSectionHeaders } from "./components/pisellSectionHeaders";
143
+ export { default as PisellImageCarousels } from "./components/pisellImageCarousels";
144
+ export { default as PisellHeaderProgressBar } from "./components/pisellHeaderProgressBar";
145
+ export { default as PisellList01 } from "./components/pisellList01";
146
+ export { default as PisellAnchor } from "./components/pisellAnchor";
147
+ export { default as SectionFooters } from "./components/section-footers";
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface TimeSlot {
4
+ value: string;
5
+ label: string;
6
+ time: string;
7
+ remainingCount: number;
8
+ disabled?: boolean;
9
+ }
10
+ export interface TimeResourceSelectorProps {
11
+ timeSlots?: TimeSlot[];
12
+ multiple?: boolean;
13
+ showUnavailable?: boolean;
14
+ defaultExpanded?: boolean;
15
+ defaultSelectFirst?: boolean;
16
+ onChange?: (values: string | string[]) => void;
17
+ className?: string;
18
+ style?: React.CSSProperties;
19
+ }
20
+ declare const TimeResourceSelector: React.FC<TimeResourceSelectorProps>;
21
+ export default TimeResourceSelector;
@@ -0,0 +1,109 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/TimeResourceSelector/index.tsx
30
+ var TimeResourceSelector_exports = {};
31
+ __export(TimeResourceSelector_exports, {
32
+ default: () => TimeResourceSelector_default
33
+ });
34
+ module.exports = __toCommonJS(TimeResourceSelector_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_materials = require("@pisell/materials");
38
+ var import_PisellCustomCheckboxGroup = __toESM(require("../PisellCustomCheckboxGroup"));
39
+ var import_index = require("./index.less");
40
+ var TimeResourceSelector = ({
41
+ timeSlots = [],
42
+ multiple = false,
43
+ showUnavailable = true,
44
+ defaultExpanded = true,
45
+ defaultSelectFirst = true,
46
+ onChange,
47
+ className,
48
+ style
49
+ }) => {
50
+ const [selectedValues, setSelectedValues] = (0, import_react.useState)([]);
51
+ const [error, setError] = (0, import_react.useState)("");
52
+ const filteredTimeSlots = timeSlots.filter(
53
+ (slot) => showUnavailable ? true : !slot.disabled
54
+ );
55
+ (0, import_react.useEffect)(() => {
56
+ if (defaultSelectFirst && filteredTimeSlots.length > 0 && selectedValues.length === 0) {
57
+ const firstAvailable = filteredTimeSlots.find((slot) => !slot.disabled);
58
+ if (firstAvailable) {
59
+ const value = firstAvailable.value;
60
+ setSelectedValues([value]);
61
+ onChange == null ? void 0 : onChange(multiple ? [value] : value);
62
+ }
63
+ }
64
+ }, [filteredTimeSlots, defaultSelectFirst, multiple, onChange]);
65
+ const renderTimeCard = (item) => {
66
+ const { time, remainingCount, disabled } = item;
67
+ return /* @__PURE__ */ import_react.default.createElement(
68
+ import_materials.PisellCard,
69
+ {
70
+ className: "time-resource-card",
71
+ bodyStyle: { padding: "12px" }
72
+ },
73
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "time-slot-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "time-text" }, time), /* @__PURE__ */ import_react.default.createElement("div", { className: "remaining-count" }, "剩余: ", remainingCount))
74
+ );
75
+ };
76
+ const handleChange = (0, import_react.useCallback)(
77
+ (value) => {
78
+ if (Array.isArray(value)) {
79
+ setSelectedValues(value);
80
+ setError(value.length === 0 ? "Please select a session time" : "");
81
+ } else {
82
+ setSelectedValues([value]);
83
+ setError("");
84
+ }
85
+ onChange == null ? void 0 : onChange(value);
86
+ },
87
+ [onChange]
88
+ );
89
+ const renderContent = () => {
90
+ if (filteredTimeSlots.length === 0) {
91
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, { description: "No dates are available" });
92
+ }
93
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, error && /* @__PURE__ */ import_react.default.createElement("div", { className: "time-resource-error" }, error), /* @__PURE__ */ import_react.default.createElement(
94
+ import_PisellCustomCheckboxGroup.default,
95
+ {
96
+ dataSource: filteredTimeSlots,
97
+ renderItem: renderTimeCard,
98
+ value: selectedValues,
99
+ onChange: handleChange,
100
+ isMultiple: multiple,
101
+ columns: 4,
102
+ horizontalGap: 16,
103
+ verticalGap: 16
104
+ }
105
+ ));
106
+ };
107
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `time-resource-selector ${className || ""}`, style }, /* @__PURE__ */ import_react.default.createElement(import_antd.Collapse, { defaultActiveKey: defaultExpanded ? ["1"] : [] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Collapse.Panel, { header: "选择时间段", key: "1" }, renderContent())));
108
+ };
109
+ var TimeResourceSelector_default = TimeResourceSelector;
@@ -0,0 +1,59 @@
1
+ .time-resource-selector {
2
+ .time-resource-card {
3
+ cursor: pointer;
4
+ transition: all 0.3s;
5
+
6
+ &:hover {
7
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
8
+ }
9
+ }
10
+
11
+ .time-slot-content {
12
+ display: flex;
13
+ flex-direction: column;
14
+ align-items: center;
15
+ justify-content: center;
16
+ min-height: 80px;
17
+
18
+ .time-text {
19
+ font-size: 16px;
20
+ font-weight: 500;
21
+ margin-bottom: 8px;
22
+ }
23
+
24
+ .remaining-count {
25
+ font-size: 14px;
26
+ color: #666;
27
+ }
28
+ }
29
+
30
+ // 选中状态
31
+ .pisell-checkbox-item-selected {
32
+ .time-resource-card {
33
+ border-color: #1890ff;
34
+ background: rgba(24, 144, 255, 0.1);
35
+ }
36
+ }
37
+
38
+ // 禁用状态
39
+ .pisell-checkbox-item-disabled {
40
+ .time-resource-card {
41
+ cursor: not-allowed;
42
+ opacity: 0.5;
43
+
44
+ &:hover {
45
+ box-shadow: none;
46
+ }
47
+ }
48
+ }
49
+
50
+ // 错误提示
51
+ .time-resource-error {
52
+ color: #ff4d4f;
53
+ padding: 8px 0;
54
+ text-align: center;
55
+ background-color: #fff2f0;
56
+ border-radius: 4px;
57
+ margin-bottom: 16px;
58
+ }
59
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface Option {
4
+ id: string | number;
5
+ name: React.ReactNode;
6
+ }
7
+ export interface PisellAnchorProps {
8
+ options?: Option[];
9
+ tab?: string | number;
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ onChange?: (key: string | number) => void;
13
+ }
14
+ declare const PisellAnchor: React.ForwardRefExoticComponent<PisellAnchorProps & React.RefAttributes<any>>;
15
+ export default PisellAnchor;
@@ -0,0 +1,120 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellAnchor/index.tsx
30
+ var pisellAnchor_exports = {};
31
+ __export(pisellAnchor_exports, {
32
+ default: () => pisellAnchor_default
33
+ });
34
+ module.exports = __toCommonJS(pisellAnchor_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ var import_ahooks = require("ahooks");
38
+ var import_ChevronLeft = __toESM(require("@pisell/icon/es/ChevronLeft"));
39
+ var import_ChevronRight = __toESM(require("@pisell/icon/es/ChevronRight"));
40
+ var import_index = require("./index.less");
41
+ var PisellAnchor = (0, import_react.forwardRef)((props, ref) => {
42
+ const { options = [], tab, className, style, onChange } = props;
43
+ const contentRef = (0, import_react.useRef)(null);
44
+ const [isShowButton, setIsShowButton] = (0, import_react.useState)(true);
45
+ const [leftWidth, setLeftWidth] = (0, import_react.useState)(0);
46
+ const [rightWidth, setRightWidth] = (0, import_react.useState)(40);
47
+ const { run: onScroll } = (0, import_ahooks.useDebounceFn)(
48
+ (e) => {
49
+ const { scrollLeft, scrollWidth, clientWidth } = e.target;
50
+ setLeftWidth(scrollLeft > 0 ? 40 : 0);
51
+ setRightWidth(scrollLeft + clientWidth >= scrollWidth ? 0 : 40);
52
+ },
53
+ { wait: 200 }
54
+ );
55
+ const setTabScroll = (offsetLeft) => {
56
+ if (contentRef.current) {
57
+ contentRef.current.scrollTo({
58
+ left: offsetLeft,
59
+ behavior: "smooth"
60
+ });
61
+ }
62
+ };
63
+ (0, import_react.useImperativeHandle)(ref, () => ({
64
+ scroll: (tab2) => {
65
+ if (tab2) {
66
+ const dom = document.querySelector(`#tab-${tab2}`);
67
+ if (dom) {
68
+ setTabScroll(dom.offsetLeft);
69
+ }
70
+ }
71
+ }
72
+ }));
73
+ const onPageChange = (type) => {
74
+ if (contentRef.current) {
75
+ const { scrollLeft, clientWidth } = contentRef.current;
76
+ contentRef.current.scrollTo({
77
+ left: scrollLeft + (type === "left" ? -clientWidth : clientWidth),
78
+ behavior: "smooth"
79
+ });
80
+ }
81
+ };
82
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-tabs", className), style }, /* @__PURE__ */ import_react.default.createElement(
83
+ "div",
84
+ {
85
+ className: "pisell-tabs-btn-left",
86
+ style: { width: leftWidth },
87
+ onClick: () => onPageChange("left")
88
+ },
89
+ /* @__PURE__ */ import_react.default.createElement(import_ChevronLeft.default, { className: "pisell-tabs-btn-icon" })
90
+ ), /* @__PURE__ */ import_react.default.createElement(
91
+ "div",
92
+ {
93
+ ref: contentRef,
94
+ className: "pisell-tabs-content",
95
+ id: `tab-${tab}-content`,
96
+ onScroll
97
+ },
98
+ options.map((item) => /* @__PURE__ */ import_react.default.createElement(
99
+ "div",
100
+ {
101
+ key: item.id,
102
+ id: `tab-${item.id}`,
103
+ className: (0, import_classnames.default)("pisell-tabs-tab", {
104
+ "pisell-tabs-tab-active": tab === item.id
105
+ }),
106
+ onClick: () => onChange == null ? void 0 : onChange(item.id)
107
+ },
108
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-tabs-tab-content" }, item.name)
109
+ ))
110
+ ), /* @__PURE__ */ import_react.default.createElement(
111
+ "div",
112
+ {
113
+ className: "pisell-tabs-btn-right",
114
+ style: { width: rightWidth },
115
+ onClick: () => onPageChange("right")
116
+ },
117
+ /* @__PURE__ */ import_react.default.createElement(import_ChevronRight.default, { className: "pisell-tabs-btn-icon" })
118
+ ));
119
+ });
120
+ var pisellAnchor_default = PisellAnchor;
@@ -0,0 +1,177 @@
1
+ .pisell-anchor-containers {
2
+ // display: flex;
3
+ // align-items: center;
4
+ // background-color: #fff;
5
+ // height: 40px;
6
+ .pisell-lowcode-anchor-wrapper {
7
+ &::before {
8
+ content: '';
9
+ display: none;
10
+ }
11
+ .pisell-lowcode-anchor {
12
+ height: 40px;
13
+ border-bottom: none !important;
14
+ background-color: #fff;
15
+
16
+ .pisell-lowcode-anchor-ink {
17
+ display: none;
18
+ }
19
+
20
+ .pisell-lowcode-anchor-link {
21
+ height: 100%;
22
+ padding: 0 16px;
23
+ display: flex;
24
+ align-items: center;
25
+
26
+ &-title {
27
+ color: var(--Gray-900, #101828);
28
+ font-family: Inter;
29
+ font-size: 16px;
30
+ font-weight: 600;
31
+ line-height: 40px;
32
+ }
33
+ }
34
+
35
+ .pisell-lowcode-anchor-link-active {
36
+ border-radius: 100px;
37
+ background: var(--theme-color, #7f56d9);
38
+ height: 40px;
39
+
40
+ .pisell-lowcode-anchor-link-title {
41
+ color: var(--White, #fff);
42
+ line-height: 40px;
43
+ }
44
+ }
45
+ }
46
+ }
47
+ .pisell-anchor-scroll {
48
+ height: 40px;
49
+ flex: 1;
50
+ overflow-x: auto;
51
+
52
+ // 隐藏滚动条 - Firefox
53
+ scrollbar-width: none;
54
+
55
+ // 隐藏滚动条 - IE and Edge
56
+ -ms-overflow-style: none;
57
+
58
+ // 隐藏滚动条 - Chrome, Safari, Opera
59
+ &::-webkit-scrollbar {
60
+ display: none;
61
+ }
62
+ }
63
+
64
+ .pisell-anchor-buttons {
65
+ display: flex;
66
+ gap: 8px;
67
+ margin-left: 16px;
68
+
69
+ .scroll-button {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: center;
73
+ width: 24px;
74
+ height: 24px;
75
+ border: 1px solid #d9d9d9;
76
+ border-radius: 4px;
77
+ background: white;
78
+ cursor: pointer;
79
+ transition: all 0.3s;
80
+
81
+ &:hover:not(.disabled) {
82
+ color: #1890ff;
83
+ border-color: #1890ff;
84
+ }
85
+
86
+ &.disabled {
87
+ color: #d9d9d9;
88
+ cursor: not-allowed;
89
+ background: #f5f5f5;
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+ .pisell-tabs {
96
+ display: flex;
97
+ align-items: center;
98
+ width: 100%;
99
+ height: 100%;
100
+ font-size: 17px;
101
+ font-weight: 400;
102
+ color: #0d1619;
103
+ cursor: default;
104
+ position: relative;
105
+
106
+ .pisell-tabs-btn-left,
107
+ .pisell-tabs-btn-right {
108
+ position: absolute;
109
+ top: 50%;
110
+ transform: translateY(-50%);
111
+ z-index: 1;
112
+ width: 40px;
113
+ height: 40px;
114
+ display: flex;
115
+ align-items: center;
116
+ justify-content: center;
117
+ background: linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0.8) 100%);
118
+ cursor: pointer;
119
+ transition: width 300ms ease;
120
+ user-select: none;
121
+
122
+ .pisell-tabs-btn-icon {
123
+ width: 24px;
124
+ height: 24px;
125
+ background: #f1f1f1;
126
+ border-radius: 50%;
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ color: #262626;
131
+ font-size: 20px;
132
+ }
133
+ }
134
+
135
+ .pisell-tabs-btn-left {
136
+ left: 0;
137
+ background: linear-gradient(270deg, rgba(255, 255, 255, 0.8) 0%, #fff 70%);
138
+ }
139
+
140
+ .pisell-tabs-btn-right {
141
+ right: 0;
142
+ background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, #fff 70%);
143
+ }
144
+
145
+ .pisell-tabs-content {
146
+ flex: 1;
147
+ display: flex;
148
+ overflow-x: auto;
149
+ overflow-y: hidden;
150
+ scroll-behavior: smooth;
151
+ -webkit-overflow-scrolling: touch;
152
+ scrollbar-width: none;
153
+ -ms-overflow-style: none;
154
+ padding: 0;
155
+
156
+ &::-webkit-scrollbar {
157
+ display: none;
158
+ }
159
+
160
+ .pisell-tabs-tab {
161
+ flex: 0 0 auto;
162
+ padding: 8px 16px;
163
+ cursor: pointer;
164
+ white-space: nowrap;
165
+ transition: all 0.3s;
166
+
167
+ &:hover {
168
+ color: #1677ff;
169
+ }
170
+
171
+ &.pisell-tabs-tab-active {
172
+ color: #1677ff;
173
+ font-weight: 600;
174
+ }
175
+ }
176
+ }
177
+ }
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { AvatarProps } from 'antd';
3
+ import './index.less';
4
+ export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
+ export interface PisellAvatarProps extends Omit<AvatarProps, 'size' | 'shape'> {
6
+ shape?: 'circle' | 'square';
7
+ size?: AvatarSize;
8
+ src?: string;
9
+ alt?: string;
10
+ icon?: React.ReactNode;
11
+ children?: React.ReactNode;
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ useTextAvatar?: boolean;
15
+ borderRadius?: number;
16
+ onError?: () => boolean;
17
+ }
18
+ declare const PisellAvatar: React.FC<PisellAvatarProps>;
19
+ export default PisellAvatar;
@@ -0,0 +1,108 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellAvatar/index.tsx
30
+ var pisellAvatar_exports = {};
31
+ __export(pisellAvatar_exports, {
32
+ default: () => pisellAvatar_default
33
+ });
34
+ module.exports = __toCommonJS(pisellAvatar_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var import_iconfont = __toESM(require("../iconfont"));
39
+ var import_index = require("./index.less");
40
+ var sizeMap = {
41
+ xs: 24,
42
+ sm: 32,
43
+ md: 40,
44
+ lg: 48,
45
+ xl: 56,
46
+ xxl: 64
47
+ };
48
+ var fontSizeMap = {
49
+ xs: 12,
50
+ sm: 14,
51
+ md: 16,
52
+ lg: 18,
53
+ xl: 20,
54
+ xxl: 24
55
+ };
56
+ var PisellAvatar = ({
57
+ shape = "circle",
58
+ size = "xs",
59
+ src,
60
+ alt,
61
+ icon,
62
+ children,
63
+ className,
64
+ style,
65
+ useTextAvatar,
66
+ borderRadius = 4,
67
+ onError,
68
+ ...restProps
69
+ }) => {
70
+ const classes = (0, import_classnames.default)(
71
+ "pisell-avatar",
72
+ `pisell-avatar-${size}`,
73
+ `pisell-avatar-${shape}`,
74
+ {
75
+ "pisell-avatar-with-text": !src && !icon && children
76
+ },
77
+ className
78
+ );
79
+ const mergedStyle = {
80
+ ...style,
81
+ width: sizeMap[size],
82
+ height: sizeMap[size],
83
+ fontSize: fontSizeMap[size],
84
+ lineHeight: `${sizeMap[size]}px`,
85
+ borderRadius: shape === "square" ? `${borderRadius}px` : "50%"
86
+ };
87
+ const renderChildren = (0, import_react.useMemo)(() => {
88
+ if (useTextAvatar && children) {
89
+ return children;
90
+ }
91
+ return /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-user-01", className: "pisell-avatar-icon" });
92
+ }, [useTextAvatar, children]);
93
+ return /* @__PURE__ */ import_react.default.createElement(
94
+ import_antd.Avatar,
95
+ {
96
+ ...restProps,
97
+ className: classes,
98
+ shape,
99
+ style: mergedStyle,
100
+ src,
101
+ alt,
102
+ icon,
103
+ onError
104
+ },
105
+ renderChildren
106
+ );
107
+ };
108
+ var pisellAvatar_default = PisellAvatar;
@@ -0,0 +1,26 @@
1
+ @prefix: pisell-avatar;
2
+
3
+ .@{prefix} {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ background: var(--Gray-100, #f2f4f7); // 默认背景色
8
+ border: none; // 移除默认边框
9
+
10
+ img {
11
+ object-fit: cover;
12
+ }
13
+
14
+ .anticon {
15
+ font-size: inherit !important;
16
+ color: var(--Gray-600, #475467) !important;
17
+ }
18
+
19
+ // 文本头像样式
20
+ &.pisell-avatar-with-text {
21
+ background: var(--Gray-100, #f2f4f7); // 文本头像的背景色
22
+ color: var(--Gray-600, #475467); // 文本颜色
23
+ font-weight: 600;
24
+ // border: 0.75px solid var(--Gray-900, #101828);
25
+ }
26
+ }
@@ -2,6 +2,14 @@ import React from 'react';
2
2
  import { CardProps } from 'antd';
3
3
  import './index.less';
4
4
  export interface PisellCardProps extends CardProps {
5
+ bordered?: boolean;
6
+ selected?: boolean;
7
+ loading?: boolean;
8
+ padding?: number;
9
+ borderRadius?: number;
10
+ disabled?: boolean;
11
+ onClick?: () => void;
12
+ isClickable?: boolean;
5
13
  }
6
14
  /**
7
15
  * Pisell 卡片容器组件