@pisell/materials 3.0.62 → 3.0.64

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 (159) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +22 -54
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +22 -54
  11. package/es/components/Pagination/index.d.ts +1 -1
  12. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  13. package/es/components/TimeResourceSelector/index.js +115 -0
  14. package/es/components/TimeResourceSelector/index.less +59 -0
  15. package/es/components/cardPro/index.js +1 -4
  16. package/es/components/iconfont/index.js +1 -1
  17. package/es/components/pisellAnchor/index.d.ts +15 -0
  18. package/es/components/pisellAnchor/index.js +126 -0
  19. package/es/components/pisellAnchor/index.less +177 -0
  20. package/es/components/pisellAvatar/index.d.ts +19 -0
  21. package/es/components/pisellAvatar/index.js +90 -0
  22. package/es/components/pisellAvatar/index.less +26 -0
  23. package/es/components/pisellCard/index.d.ts +8 -0
  24. package/es/components/pisellCard/index.js +34 -5
  25. package/es/components/pisellCard/index.less +31 -4
  26. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  27. package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
  28. package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
  29. package/es/components/pisellDropdown/index.d.ts +20 -0
  30. package/es/components/pisellDropdown/index.js +51 -0
  31. package/es/components/pisellDropdown/index.less +44 -0
  32. package/es/components/pisellEmpty/index.d.ts +2 -1
  33. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  34. package/es/components/pisellHeaderProgressBar/index.js +76 -0
  35. package/es/components/pisellHeaderProgressBar/index.less +18 -0
  36. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  37. package/es/components/pisellImageCarousels/index.js +108 -0
  38. package/es/components/pisellImageCarousels/index.less +92 -0
  39. package/es/components/pisellList01/index.d.ts +17 -0
  40. package/es/components/pisellList01/index.js +105 -0
  41. package/es/components/pisellList01/index.less +53 -0
  42. package/es/components/pisellModal/components/PcModal/index.js +1 -1
  43. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  44. package/es/components/pisellSectionHeaders/index.js +35 -0
  45. package/es/components/pisellSectionHeaders/index.less +46 -0
  46. package/es/components/pisellText/components/Amount/index.js +1 -1
  47. package/es/components/pisellViewGrid/index.d.ts +16 -0
  48. package/es/components/pisellViewGrid/index.js +66 -0
  49. package/es/components/pisellViewGrid/index.less +31 -0
  50. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
  51. package/es/components/productCard/components/Header/DeleteButton/index.js +21 -0
  52. package/es/components/productCard/components/Header/DeleteButton/index.less +15 -0
  53. package/es/components/productCard/components/Header/index.js +6 -15
  54. package/es/components/productCard/components/Header/index.less +0 -11
  55. package/es/components/productCard/hooks/useOpenNote.js +3 -2
  56. package/es/components/productCard/index.js +18 -5
  57. package/es/components/productCard/index.less +30 -2
  58. package/es/components/productCard/status.js +3 -1
  59. package/es/components/productCard/types.d.ts +2 -0
  60. package/es/components/productCard/utils.js +17 -1
  61. package/es/components/section-footers/index.d.ts +9 -0
  62. package/es/components/section-footers/index.js +17 -0
  63. package/es/components/section-footers/index.less +5 -0
  64. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  65. package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
  66. package/es/index.d.ts +10 -0
  67. package/es/index.js +10 -0
  68. package/lib/components/Pagination/index.d.ts +1 -1
  69. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  70. package/lib/components/TimeResourceSelector/index.js +109 -0
  71. package/lib/components/TimeResourceSelector/index.less +59 -0
  72. package/lib/components/cardPro/index.js +0 -3
  73. package/lib/components/iconfont/index.js +1 -1
  74. package/lib/components/pisellAnchor/index.d.ts +15 -0
  75. package/lib/components/pisellAnchor/index.js +120 -0
  76. package/lib/components/pisellAnchor/index.less +177 -0
  77. package/lib/components/pisellAvatar/index.d.ts +19 -0
  78. package/lib/components/pisellAvatar/index.js +108 -0
  79. package/lib/components/pisellAvatar/index.less +26 -0
  80. package/lib/components/pisellCard/index.d.ts +8 -0
  81. package/lib/components/pisellCard/index.js +30 -7
  82. package/lib/components/pisellCard/index.less +31 -4
  83. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  84. package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
  85. package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
  86. package/lib/components/pisellDropdown/index.d.ts +20 -0
  87. package/lib/components/pisellDropdown/index.js +72 -0
  88. package/lib/components/pisellDropdown/index.less +44 -0
  89. package/lib/components/pisellEmpty/index.d.ts +2 -1
  90. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  91. package/lib/components/pisellHeaderProgressBar/index.js +88 -0
  92. package/lib/components/pisellHeaderProgressBar/index.less +18 -0
  93. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  94. package/lib/components/pisellImageCarousels/index.js +108 -0
  95. package/lib/components/pisellImageCarousels/index.less +92 -0
  96. package/lib/components/pisellList01/index.d.ts +17 -0
  97. package/lib/components/pisellList01/index.js +113 -0
  98. package/lib/components/pisellList01/index.less +53 -0
  99. package/lib/components/pisellModal/components/PcModal/index.js +1 -1
  100. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  101. package/lib/components/pisellSectionHeaders/index.js +52 -0
  102. package/lib/components/pisellSectionHeaders/index.less +46 -0
  103. package/lib/components/pisellText/components/Amount/index.js +2 -2
  104. package/lib/components/pisellViewGrid/index.d.ts +16 -0
  105. package/lib/components/pisellViewGrid/index.js +98 -0
  106. package/lib/components/pisellViewGrid/index.less +31 -0
  107. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
  108. package/lib/components/productCard/components/Header/DeleteButton/index.js +53 -0
  109. package/lib/components/productCard/components/Header/DeleteButton/index.less +15 -0
  110. package/lib/components/productCard/components/Header/index.js +4 -14
  111. package/lib/components/productCard/components/Header/index.less +0 -11
  112. package/lib/components/productCard/hooks/useOpenNote.js +2 -1
  113. package/lib/components/productCard/index.js +94 -74
  114. package/lib/components/productCard/index.less +30 -2
  115. package/lib/components/productCard/status.js +3 -1
  116. package/lib/components/productCard/types.d.ts +2 -0
  117. package/lib/components/productCard/utils.js +15 -4
  118. package/lib/components/section-footers/index.d.ts +9 -0
  119. package/lib/components/section-footers/index.js +44 -0
  120. package/lib/components/section-footers/index.less +5 -0
  121. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  122. package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
  123. package/lib/index.d.ts +10 -0
  124. package/lib/index.js +30 -0
  125. package/lowcode/pisell-anchor/meta.ts +118 -0
  126. package/lowcode/pisell-anchor/snippets.ts +26 -0
  127. package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
  128. package/lowcode/pisell-avatar/meta.ts +111 -0
  129. package/lowcode/pisell-avatar/snippets.ts +14 -0
  130. package/lowcode/pisell-card/meta.ts +62 -27
  131. package/lowcode/pisell-card/snippets.ts +6 -0
  132. package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
  133. package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
  134. package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
  135. package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
  136. package/lowcode/pisell-dropdown/meta.ts +180 -0
  137. package/lowcode/pisell-dropdown/snippets.ts +69 -0
  138. package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
  139. package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
  140. package/lowcode/pisell-image-carousels/meta.ts +143 -0
  141. package/lowcode/pisell-image-carousels/snippets.ts +20 -0
  142. package/lowcode/pisell-list01/meta.ts +74 -0
  143. package/lowcode/pisell-list01/snippets.ts +35 -0
  144. package/lowcode/pisell-section-headers/meta.ts +91 -0
  145. package/lowcode/pisell-section-headers/snippets.ts +22 -0
  146. package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
  147. package/lowcode/pisell-view-grid/meta.ts +167 -0
  148. package/lowcode/pisell-view-grid/snippets.ts +54 -0
  149. package/lowcode/section-footers/meta.ts +66 -0
  150. package/lowcode/section-footers/snippe.ts +21 -0
  151. package/package.json +4 -3
  152. package/dist/umd/materials.min.css +0 -1
  153. package/dist/umd/materials.min.js +0 -1
  154. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  155. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  156. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  157. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  158. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  159. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
@@ -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 卡片容器组件
@@ -37,12 +37,35 @@ var import_antd = require("antd");
37
37
  var import_classnames = __toESM(require("classnames"));
38
38
  var import_index = require("./index.less");
39
39
  var PisellCard = (props) => {
40
- return /* @__PURE__ */ import_react.default.createElement(
41
- import_antd.Card,
42
- {
43
- ...props,
44
- className: (0, import_classnames.default)("pisell-card-wrap", props.className)
45
- }
46
- );
40
+ const {
41
+ borderRadius = 12,
42
+ padding = 16,
43
+ loading = false,
44
+ selected = false,
45
+ bordered = true,
46
+ disabled = false,
47
+ style,
48
+ className,
49
+ isClickable = true
50
+ } = props;
51
+ (0, import_react.useEffect)(() => {
52
+ document.body.id = "body";
53
+ }, []);
54
+ const cardProps = {
55
+ ...props,
56
+ style: {
57
+ "--card-padding": `${padding}px`,
58
+ "--card-borderRadius": `${borderRadius}px`,
59
+ ...style
60
+ },
61
+ className: (0, import_classnames.default)(
62
+ "pisell-card-wrap",
63
+ selected && "pisell-card-wrap-selected",
64
+ disabled && "pisell-card-wrap-disabled",
65
+ !isClickable && "pisell-card-wrap-clickable",
66
+ className
67
+ )
68
+ };
69
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Card, { ...cardProps });
47
70
  };
48
71
  var pisellCard_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,71 @@
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/pisellCustomCheckboxGroup/index.tsx
30
+ var pisellCustomCheckboxGroup_exports = {};
31
+ __export(pisellCustomCheckboxGroup_exports, {
32
+ default: () => pisellCustomCheckboxGroup_default
33
+ });
34
+ module.exports = __toCommonJS(pisellCustomCheckboxGroup_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ var import_pisellViewGrid = __toESM(require("../pisellViewGrid"));
38
+ var import_index = require("./index.less");
39
+ var PisellCustomCheckboxGroup = ({
40
+ dataSource = [],
41
+ allowAdd = false,
42
+ onAdd,
43
+ onClick,
44
+ renderAddItem,
45
+ disabled = false,
46
+ isMultiple = false,
47
+ value,
48
+ onChange,
49
+ className,
50
+ ...rest
51
+ }) => {
52
+ const finalDataSource = (0, import_react.useMemo)(() => {
53
+ return allowAdd ? [{ id: 0, text: "+", isAddCard: true }, ...dataSource] : dataSource;
54
+ }, [allowAdd, dataSource]);
55
+ const renderGridItem = (item, index) => {
56
+ var _a;
57
+ return /* @__PURE__ */ import_react.default.createElement("div", { onClick: () => onClick(item) }, (item == null ? void 0 : item.isAddCard) && renderAddItem ? renderAddItem(item) : (_a = rest == null ? void 0 : rest.renderItem) == null ? void 0 : _a.call(rest, item, index));
58
+ };
59
+ return /* @__PURE__ */ import_react.default.createElement(
60
+ import_pisellViewGrid.default,
61
+ {
62
+ ...rest,
63
+ dataSource: finalDataSource,
64
+ renderItem: (item, index) => {
65
+ return renderGridItem(item, index);
66
+ },
67
+ className: (0, import_classnames.default)("pisell-custom-checkbox-group", className)
68
+ }
69
+ );
70
+ };
71
+ var pisellCustomCheckboxGroup_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,72 @@
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/pisellDropdown/index.tsx
30
+ var pisellDropdown_exports = {};
31
+ __export(pisellDropdown_exports, {
32
+ default: () => pisellDropdown_default
33
+ });
34
+ module.exports = __toCommonJS(pisellDropdown_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_dropdown = __toESM(require("../dropdown"));
38
+ var import_classnames = __toESM(require("classnames"));
39
+ var import_index = require("./index.less");
40
+ var PisellDropdown = ({
41
+ trigger,
42
+ items = [],
43
+ showShortcut = true,
44
+ triggerType = ["click"],
45
+ className,
46
+ style,
47
+ onSelect
48
+ }) => {
49
+ const renderMenuItem = (item) => {
50
+ const menuItem = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-dropdown-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-dropdown-item-content" }, item.icon && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-dropdown-item-icon" }, item.icon), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-dropdown-item-label" }, item.label)), showShortcut && item.shortcut && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-dropdown-item-shortcut" }, item.shortcut));
51
+ return item.divider ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key: item.key }, /* @__PURE__ */ import_react.default.createElement(import_antd.Menu.Item, { key: item.key }, menuItem), /* @__PURE__ */ import_react.default.createElement(import_antd.Menu.Divider, null)) : /* @__PURE__ */ import_react.default.createElement(import_antd.Menu.Item, { key: item.key }, menuItem);
52
+ };
53
+ const menu = /* @__PURE__ */ import_react.default.createElement(
54
+ import_antd.Menu,
55
+ {
56
+ onClick: ({ key }) => onSelect == null ? void 0 : onSelect(key),
57
+ className: "pisell-dropdown-menu"
58
+ },
59
+ items.map(renderMenuItem)
60
+ );
61
+ return /* @__PURE__ */ import_react.default.createElement(
62
+ import_dropdown.default,
63
+ {
64
+ overlay: menu,
65
+ trigger: triggerType,
66
+ className: (0, import_classnames.default)("pisell-dropdown", className),
67
+ style
68
+ },
69
+ trigger || /* @__PURE__ */ import_react.default.createElement("span", null, "Account")
70
+ );
71
+ };
72
+ var pisellDropdown_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;