mall-components 1.0.0

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 (122) hide show
  1. package/README.md +128 -0
  2. package/build/_components-raw.css +791 -0
  3. package/build/_shims/antd.js +1 -0
  4. package/build/_shims/icons.js +1 -0
  5. package/build/_shims/moment.js +1 -0
  6. package/build/_shims/react-dom.js +1 -0
  7. package/build/_shims/react.js +1 -0
  8. package/build/adapters/DataSourceAdapter.d.ts +46 -0
  9. package/build/components/AdminLayout/AdminLayout.d.ts +5 -0
  10. package/build/components/AdminLayout/Breadcrumb.d.ts +8 -0
  11. package/build/components/AdminLayout/MainContent.d.ts +17 -0
  12. package/build/components/AdminLayout/Navbar.d.ts +10 -0
  13. package/build/components/AdminLayout/Sidebar.d.ts +14 -0
  14. package/build/components/AdminLayout/TabBar.d.ts +13 -0
  15. package/build/components/AdminLayout/TabPane.d.ts +4 -0
  16. package/build/components/AdminLayout/index.d.ts +3 -0
  17. package/build/components/AdminLayout/types.d.ts +42 -0
  18. package/build/components/CouponCard/CouponCard.d.ts +20 -0
  19. package/build/components/CouponCard/index.d.ts +1 -0
  20. package/build/components/OrderForm/OrderForm.d.ts +18 -0
  21. package/build/components/OrderForm/index.d.ts +1 -0
  22. package/build/components/OrderList/OrderList.d.ts +29 -0
  23. package/build/components/OrderList/index.d.ts +1 -0
  24. package/build/components/ProductForm/ProductForm.d.ts +18 -0
  25. package/build/components/ProductForm/index.d.ts +3 -0
  26. package/build/components/ProductList/ProductList.d.ts +47 -0
  27. package/build/components/ProductList/index.d.ts +3 -0
  28. package/build/components/PromotionCard/PromotionCard.d.ts +22 -0
  29. package/build/components/PromotionCard/index.d.ts +1 -0
  30. package/build/components/RoleCard/RoleCard.d.ts +18 -0
  31. package/build/components/RoleCard/index.d.ts +1 -0
  32. package/build/components/UserCard/UserCard.d.ts +17 -0
  33. package/build/components/UserCard/index.d.ts +1 -0
  34. package/build/entry-meta.d.ts +603 -0
  35. package/build/index.css +1 -0
  36. package/build/index.js +1 -0
  37. package/build/mall-components-meta.js +2563 -0
  38. package/build/mall-components.cdn.umd.css +1 -0
  39. package/build/mall-components.cdn.umd.js +8 -0
  40. package/build/mall-components.codesandbox.combined.js +1094 -0
  41. package/build/mall-components.codesandbox.css +401 -0
  42. package/build/mall-components.codesandbox.js +1080 -0
  43. package/build/mall-components.umd.css +1 -0
  44. package/build/mall-components.umd.js +8 -0
  45. package/build/meta/adminLayoutMeta.d.ts +3 -0
  46. package/build/meta/couponCardMeta.d.ts +128 -0
  47. package/build/meta/icons.d.ts +10 -0
  48. package/build/meta/orderFormMeta.d.ts +111 -0
  49. package/build/meta/orderListMeta.d.ts +170 -0
  50. package/build/meta/productFormMeta.d.ts +3 -0
  51. package/build/meta/productListMeta.d.ts +200 -0
  52. package/build/meta/promotionCardMeta.d.ts +129 -0
  53. package/build/meta/roleCardMeta.d.ts +3 -0
  54. package/build/meta/tabPaneMeta.d.ts +3 -0
  55. package/build/meta/userCardMeta.d.ts +3 -0
  56. package/build/meta.d.ts +605 -0
  57. package/build/setters/RestApiTester.d.ts +11 -0
  58. package/build/types/common.d.ts +17 -0
  59. package/build/types/marketing.d.ts +128 -0
  60. package/build/types/order.d.ts +174 -0
  61. package/build/types/permission.d.ts +101 -0
  62. package/build/types/product.d.ts +47 -0
  63. package/package.json +1 -0
  64. package/src/adapters/DataSourceAdapter.ts +445 -0
  65. package/src/components/AdminLayout/AdminLayout.scss +447 -0
  66. package/src/components/AdminLayout/AdminLayout.tsx +681 -0
  67. package/src/components/AdminLayout/Breadcrumb.tsx +60 -0
  68. package/src/components/AdminLayout/MainContent.tsx +54 -0
  69. package/src/components/AdminLayout/Navbar.tsx +76 -0
  70. package/src/components/AdminLayout/Sidebar.tsx +256 -0
  71. package/src/components/AdminLayout/TabBar.tsx +177 -0
  72. package/src/components/AdminLayout/TabPane.tsx +29 -0
  73. package/src/components/AdminLayout/index.ts +3 -0
  74. package/src/components/AdminLayout/types.ts +46 -0
  75. package/src/components/CouponCard/CouponCard.scss +55 -0
  76. package/src/components/CouponCard/CouponCard.tsx +687 -0
  77. package/src/components/CouponCard/index.ts +1 -0
  78. package/src/components/OrderForm/OrderForm.scss +148 -0
  79. package/src/components/OrderForm/OrderForm.tsx +503 -0
  80. package/src/components/OrderForm/index.ts +1 -0
  81. package/src/components/OrderList/OrderList.scss +160 -0
  82. package/src/components/OrderList/OrderList.tsx +885 -0
  83. package/src/components/OrderList/index.ts +1 -0
  84. package/src/components/ProductForm/ProductForm.scss +23 -0
  85. package/src/components/ProductForm/ProductForm.tsx +442 -0
  86. package/src/components/ProductForm/index.ts +3 -0
  87. package/src/components/ProductList/ProductList.scss +293 -0
  88. package/src/components/ProductList/ProductList.tsx +454 -0
  89. package/src/components/ProductList/index.ts +3 -0
  90. package/src/components/PromotionCard/PromotionCard.scss +71 -0
  91. package/src/components/PromotionCard/PromotionCard.tsx +579 -0
  92. package/src/components/PromotionCard/index.ts +1 -0
  93. package/src/components/RoleCard/RoleCard.scss +77 -0
  94. package/src/components/RoleCard/RoleCard.tsx +463 -0
  95. package/src/components/RoleCard/index.ts +1 -0
  96. package/src/components/UserCard/UserCard.scss +51 -0
  97. package/src/components/UserCard/UserCard.tsx +432 -0
  98. package/src/components/UserCard/index.ts +1 -0
  99. package/src/entry-components.ts +39 -0
  100. package/src/entry-meta.ts +23 -0
  101. package/src/index.scss +4 -0
  102. package/src/index.ts +36 -0
  103. package/src/index.tsx +17 -0
  104. package/src/meta/adminLayoutMeta.ts +154 -0
  105. package/src/meta/couponCardMeta.ts +287 -0
  106. package/src/meta/icons.ts +41 -0
  107. package/src/meta/orderFormMeta.ts +279 -0
  108. package/src/meta/orderListMeta.ts +443 -0
  109. package/src/meta/productFormMeta.ts +253 -0
  110. package/src/meta/productListMeta.ts +434 -0
  111. package/src/meta/promotionCardMeta.ts +276 -0
  112. package/src/meta/roleCardMeta.ts +142 -0
  113. package/src/meta/tabPaneMeta.ts +69 -0
  114. package/src/meta/userCardMeta.ts +128 -0
  115. package/src/meta.ts +25 -0
  116. package/src/setters/RestApiTester.tsx +219 -0
  117. package/src/shims/require.js +8 -0
  118. package/src/types/common.ts +19 -0
  119. package/src/types/marketing.ts +124 -0
  120. package/src/types/order.ts +169 -0
  121. package/src/types/permission.ts +102 -0
  122. package/src/types/product.ts +49 -0
@@ -0,0 +1,293 @@
1
+ .mall-product-list {
2
+ background: #f5f7fa;
3
+ padding: 16px;
4
+ border-radius: 8px;
5
+ min-height: 100%;
6
+
7
+ .mall-product-list-filter {
8
+ margin-bottom: 16px;
9
+ border-radius: 8px;
10
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
11
+ transition: all 0.3s ease;
12
+
13
+ &:hover {
14
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
15
+ }
16
+
17
+ .ant-card-body {
18
+ padding: 20px;
19
+ }
20
+
21
+ .ant-input-affix-wrapper {
22
+ border-radius: 6px;
23
+ transition: all 0.3s ease;
24
+
25
+ &:hover, &:focus {
26
+ border-color: #40a9ff;
27
+ box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
28
+ }
29
+ }
30
+
31
+ .ant-btn {
32
+ border-radius: 6px;
33
+ font-weight: 500;
34
+ transition: all 0.3s ease;
35
+
36
+ &:hover {
37
+ transform: translateY(-1px);
38
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
39
+ }
40
+
41
+ &:active {
42
+ transform: translateY(0);
43
+ }
44
+ }
45
+ }
46
+
47
+ .mall-product-list-action {
48
+ margin-bottom: 16px;
49
+ border-radius: 8px;
50
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
51
+ transition: all 0.3s ease;
52
+
53
+ &:hover {
54
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
55
+ }
56
+
57
+ .ant-card-body {
58
+ padding: 16px 20px;
59
+ }
60
+
61
+ .ant-btn {
62
+ border-radius: 6px;
63
+ font-weight: 500;
64
+ transition: all 0.3s ease;
65
+
66
+ &:hover {
67
+ transform: translateY(-1px);
68
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
69
+ }
70
+ }
71
+
72
+ .ant-select {
73
+ .ant-select-selector {
74
+ border-radius: 6px;
75
+ transition: all 0.3s ease;
76
+
77
+ &:hover {
78
+ border-color: #40a9ff;
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ .mall-product-list-table {
85
+ background: #fff;
86
+ border-radius: 8px;
87
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
88
+
89
+ .ant-table-thead > tr > th {
90
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
91
+ color: #fff;
92
+ font-weight: 600;
93
+ font-size: 14px;
94
+ padding: 16px;
95
+ border-bottom: none;
96
+
97
+ &::before {
98
+ background-color: rgba(255, 255, 255, 0.2);
99
+ }
100
+ }
101
+
102
+ .ant-table-tbody > tr {
103
+ transition: all 0.3s ease;
104
+
105
+ &:hover {
106
+ background: #f0f5ff;
107
+ cursor: pointer;
108
+ transform: scale(1.01);
109
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
110
+ }
111
+
112
+ > td {
113
+ padding: 16px;
114
+ border-bottom: 1px solid #f0f0f0;
115
+ }
116
+ }
117
+
118
+ img {
119
+ border-radius: 8px;
120
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
121
+ transition: all 0.3s ease;
122
+
123
+ &:hover {
124
+ transform: scale(1.1);
125
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
126
+ }
127
+ }
128
+
129
+ .price-cell {
130
+ color: #f56c6c;
131
+ font-weight: 600;
132
+ font-size: 16px;
133
+ }
134
+
135
+ .stock-cell {
136
+ font-weight: 500;
137
+
138
+ &.low-stock {
139
+ color: #f56c6c;
140
+ }
141
+
142
+ &.normal-stock {
143
+ color: #67c23a;
144
+ }
145
+ }
146
+
147
+ .ant-space {
148
+ .ant-btn-link {
149
+ padding: 4px 8px;
150
+ height: auto;
151
+ font-weight: 500;
152
+ transition: all 0.3s ease;
153
+
154
+ &:hover {
155
+ background: #f0f5ff;
156
+ border-radius: 4px;
157
+ }
158
+
159
+ &.ant-btn-dangerous {
160
+ color: #f56c6c;
161
+
162
+ &:hover {
163
+ background: #fff1f0;
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+
170
+ .pagination-wrapper {
171
+ background: #fff;
172
+ padding: 16px 20px;
173
+ border-radius: 8px;
174
+ margin-top: 16px;
175
+ display: flex;
176
+ justify-content: flex-end;
177
+
178
+ .ant-pagination {
179
+ .ant-pagination-item {
180
+ border-radius: 6px;
181
+ transition: all 0.3s ease;
182
+
183
+ &:hover {
184
+ border-color: #40a9ff;
185
+ transform: translateY(-1px);
186
+ }
187
+ }
188
+
189
+ .ant-pagination-item-active {
190
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
191
+ border-color: #667eea;
192
+
193
+ a {
194
+ color: #fff;
195
+ }
196
+ }
197
+
198
+ .ant-pagination-prev,
199
+ .ant-pagination-next {
200
+ border-radius: 6px;
201
+ transition: all 0.3s ease;
202
+
203
+ &:hover {
204
+ border-color: #40a9ff;
205
+ transform: translateY(-1px);
206
+ }
207
+ }
208
+ }
209
+ }
210
+
211
+ .ant-switch {
212
+ &.ant-switch-checked {
213
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
214
+ }
215
+ }
216
+
217
+ @media (max-width: 1200px) {
218
+ padding: 12px;
219
+
220
+ .mall-product-list-filter,
221
+ .mall-product-list-action {
222
+ .ant-card-body {
223
+ padding: 16px;
224
+ }
225
+ }
226
+
227
+ .ant-table-wrapper {
228
+ .ant-table-thead > tr > th,
229
+ .ant-table-tbody > tr > td {
230
+ padding: 12px;
231
+ }
232
+ }
233
+ }
234
+
235
+ @media (max-width: 768px) {
236
+ padding: 8px;
237
+
238
+ .mall-product-list-filter {
239
+ .ant-input-affix-wrapper {
240
+ width: 100% !important;
241
+ margin-bottom: 8px;
242
+ }
243
+
244
+ .ant-btn {
245
+ width: 100%;
246
+ margin-bottom: 8px;
247
+ }
248
+ }
249
+
250
+ .mall-product-list-action {
251
+ .ant-btn {
252
+ width: 100%;
253
+ margin-bottom: 8px;
254
+ }
255
+
256
+ .ant-select {
257
+ width: 100% !important;
258
+ margin-bottom: 8px;
259
+ }
260
+ }
261
+
262
+ .pagination-wrapper {
263
+ padding: 12px;
264
+ justify-content: center;
265
+
266
+ .ant-pagination {
267
+ flex-wrap: wrap;
268
+ justify-content: center;
269
+ }
270
+ }
271
+ }
272
+
273
+ .ant-spin-nested-loading {
274
+ .ant-spin {
275
+ .ant-spin-dot {
276
+ font-size: 32px;
277
+ }
278
+ }
279
+ }
280
+
281
+ .ant-empty {
282
+ padding: 48px 0;
283
+
284
+ .ant-empty-image {
285
+ height: 100px;
286
+ }
287
+
288
+ .ant-empty-description {
289
+ color: #999;
290
+ font-size: 14px;
291
+ }
292
+ }
293
+ }