@plasmicpkgs/antd 2.0.18 → 2.0.20

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 (79) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/antd.esm.js +703 -616
  3. package/dist/antd.esm.js.map +1 -1
  4. package/dist/customControls.d.ts +17 -17
  5. package/dist/index.d.ts +16 -16
  6. package/dist/index.js +2324 -5
  7. package/dist/index.js.map +1 -0
  8. package/dist/registerButton.d.ts +5 -5
  9. package/dist/registerCarousel.d.ts +5 -5
  10. package/dist/registerCheckbox.d.ts +8 -8
  11. package/dist/registerCollapse.d.ts +14 -14
  12. package/dist/registerDropdown.d.ts +11 -11
  13. package/dist/registerInput.d.ts +14 -14
  14. package/dist/registerMenu.d.ts +15 -15
  15. package/dist/registerOption.d.ts +8 -8
  16. package/dist/registerRate.d.ts +5 -5
  17. package/dist/registerSelect.d.ts +8 -8
  18. package/dist/registerSlider.d.ts +19 -19
  19. package/dist/registerSwitch.d.ts +5 -5
  20. package/dist/registerTable.d.ts +30 -30
  21. package/dist/registerTabs.d.ts +14 -13
  22. package/dist/registerable.d.ts +4 -4
  23. package/package.json +11 -10
  24. package/skinny/customControls-fb0b7e5f.js +22 -0
  25. package/skinny/{customControls-ff79afdf.js.map → customControls-fb0b7e5f.js.map} +1 -1
  26. package/skinny/customControls.d.ts +17 -17
  27. package/skinny/registerButton.d.ts +5 -5
  28. package/skinny/registerButton.js +80 -81
  29. package/skinny/registerButton.js.map +1 -1
  30. package/skinny/registerCarousel.d.ts +5 -5
  31. package/skinny/registerCarousel.js +66 -67
  32. package/skinny/registerCarousel.js.map +1 -1
  33. package/skinny/registerCheckbox.d.ts +8 -8
  34. package/skinny/registerCheckbox.js +125 -121
  35. package/skinny/registerCheckbox.js.map +1 -1
  36. package/skinny/registerCollapse.d.ts +14 -14
  37. package/skinny/registerCollapse.js +174 -153
  38. package/skinny/registerCollapse.js.map +1 -1
  39. package/skinny/registerDropdown.d.ts +11 -11
  40. package/skinny/registerDropdown.js +175 -171
  41. package/skinny/registerDropdown.js.map +1 -1
  42. package/skinny/registerInput.d.ts +14 -14
  43. package/skinny/registerInput.js +362 -312
  44. package/skinny/registerInput.js.map +1 -1
  45. package/skinny/registerMenu.d.ts +15 -15
  46. package/skinny/registerMenu.js +275 -298
  47. package/skinny/registerMenu.js.map +1 -1
  48. package/skinny/registerOption.d.ts +8 -8
  49. package/skinny/registerOption.js +73 -81
  50. package/skinny/registerOption.js.map +1 -1
  51. package/skinny/registerRate.d.ts +5 -5
  52. package/skinny/registerRate.js +66 -0
  53. package/skinny/registerRate.js.map +1 -0
  54. package/skinny/registerSelect.d.ts +8 -8
  55. package/skinny/registerSelect.js +129 -130
  56. package/skinny/registerSelect.js.map +1 -1
  57. package/skinny/registerSlider.d.ts +19 -19
  58. package/skinny/registerSlider.js +132 -104
  59. package/skinny/registerSlider.js.map +1 -1
  60. package/skinny/registerSwitch.d.ts +5 -5
  61. package/skinny/registerSwitch.js +55 -56
  62. package/skinny/registerSwitch.js.map +1 -1
  63. package/skinny/registerTable.d.ts +30 -30
  64. package/skinny/registerTable.js +202 -183
  65. package/skinny/registerTable.js.map +1 -1
  66. package/skinny/registerTabs.d.ts +14 -13
  67. package/skinny/registerTabs.js +344 -311
  68. package/skinny/registerTabs.js.map +1 -1
  69. package/skinny/registerable.d.ts +4 -4
  70. package/skinny/registerable.js +3 -0
  71. package/skinny/registerable.js.map +1 -0
  72. package/dist/antd.cjs.development.js +0 -2243
  73. package/dist/antd.cjs.development.js.map +0 -1
  74. package/dist/antd.cjs.production.min.js +0 -2
  75. package/dist/antd.cjs.production.min.js.map +0 -1
  76. package/skinny/customControls-ff79afdf.js +0 -27
  77. package/skinny/index.d.ts +0 -16
  78. package/skinny/tslib.es6-b92c4a81.js +0 -59
  79. package/skinny/tslib.es6-b92c4a81.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,8 +1,2327 @@
1
+ 'use strict';
1
2
 
2
- 'use strict'
3
+ var registerComponent = require('@plasmicapp/host/registerComponent');
4
+ var Button = require('antd/lib/button');
5
+ var Carousel = require('antd/lib/carousel');
6
+ var Checkbox = require('antd/lib/checkbox/Checkbox');
7
+ var CheckboxGroup = require('antd/lib/checkbox/Group');
8
+ var React = require('react');
9
+ var AntdCollapse = require('antd/lib/collapse/Collapse');
10
+ var CollapsePanel = require('antd/lib/collapse/CollapsePanel');
11
+ var AntdDropdown = require('antd/lib/dropdown');
12
+ var DropdownButton = require('antd/lib/dropdown/dropdown-button');
13
+ var Input = require('antd/lib/input');
14
+ var InputGroup = require('antd/lib/input/Group');
15
+ var Password = require('antd/lib/input/Password');
16
+ var Search = require('antd/lib/input/Search');
17
+ var TextArea = require('antd/lib/input/TextArea');
18
+ var Menu = require('antd/lib/menu/index');
19
+ var MenuDivider = require('antd/lib/menu/MenuDivider');
20
+ var MenuItem = require('antd/lib/menu/MenuItem');
21
+ var SubMenu = require('antd/lib/menu/SubMenu');
22
+ var rcMenu = require('rc-menu');
23
+ var rcSelect = require('rc-select');
24
+ var Rate = require('antd/lib/rate');
25
+ var Select = require('antd/lib/select');
26
+ var AntdSlider = require('antd/lib/slider');
27
+ var Switch = require('antd/lib/switch');
28
+ var host = require('@plasmicapp/host');
29
+ var Table = require('antd/lib/table/Table');
30
+ var antd = require('antd');
31
+ var AntdTabs = require('antd/lib/tabs');
3
32
 
4
- if (process.env.NODE_ENV === 'production') {
5
- module.exports = require('./antd.cjs.production.min.js')
6
- } else {
7
- module.exports = require('./antd.cjs.development.js')
33
+ const buttonMeta = {
34
+ name: "AntdButton",
35
+ displayName: "Antd Button",
36
+ props: {
37
+ type: {
38
+ type: "choice",
39
+ options: ["default", "primary", "ghost", "dashed", "link", "text"],
40
+ description: "Can be set to primary, ghost, dashed, link, text, default",
41
+ defaultValueHint: "default"
42
+ },
43
+ size: {
44
+ type: "choice",
45
+ options: ["small", "medium", "large"],
46
+ description: "Set the size of button",
47
+ defaultValueHint: "medium"
48
+ },
49
+ shape: {
50
+ type: "choice",
51
+ options: ["default", "circle", "round"],
52
+ description: "Can be set button shape",
53
+ defaultValueHint: "default"
54
+ },
55
+ disabled: {
56
+ type: "boolean",
57
+ description: "Disabled state of button",
58
+ defaultValueHint: false
59
+ },
60
+ ghost: {
61
+ type: "boolean",
62
+ description: "Make background transparent and invert text and border colors",
63
+ defaultValueHint: false
64
+ },
65
+ danger: {
66
+ type: "boolean",
67
+ description: "Set the danger status of button",
68
+ defaultValueHint: false
69
+ },
70
+ block: {
71
+ type: "boolean",
72
+ description: "Option to fit button width to its parent width",
73
+ defaultValueHint: false
74
+ },
75
+ loading: {
76
+ type: "boolean",
77
+ description: "Set the loading status of button",
78
+ defaultValueHint: false
79
+ },
80
+ href: {
81
+ type: "string",
82
+ description: "Redirect url of link button"
83
+ },
84
+ target: {
85
+ type: "choice",
86
+ options: ["_blank", "_self", "_parent", "_top"],
87
+ description: "Same as target attribute of a, works when href is specified",
88
+ hidden: (props) => !props.href,
89
+ defaultValueHint: "_self"
90
+ },
91
+ children: {
92
+ type: "slot",
93
+ defaultValue: [
94
+ {
95
+ type: "text",
96
+ value: "Button"
97
+ }
98
+ ]
99
+ }
100
+ },
101
+ importPath: "antd/lib/button",
102
+ isDefaultExport: true,
103
+ importName: "Button"
104
+ };
105
+ function registerButton(loader, customButtonMeta) {
106
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
107
+ doRegisterComponent(Button, customButtonMeta != null ? customButtonMeta : buttonMeta);
8
108
  }
109
+
110
+ const contentStyle = {
111
+ height: "160px",
112
+ color: "#fff",
113
+ lineHeight: "160px",
114
+ textAlign: "center",
115
+ backgroundColor: "#364d79"
116
+ };
117
+ const carouselMeta = {
118
+ name: "AntdCarousel",
119
+ displayName: "Antd Carousel",
120
+ props: {
121
+ autoplay: {
122
+ type: "boolean",
123
+ description: "Whether to scroll automatically",
124
+ defaultValueHint: false
125
+ },
126
+ dotPosition: {
127
+ type: "choice",
128
+ options: ["top", "bottom", "left", "right"],
129
+ description: "The position of the dots",
130
+ defaultValueHint: "bottom"
131
+ },
132
+ dots: {
133
+ type: "boolean",
134
+ description: "Whether to show the dots at the bottom of the gallery",
135
+ defaultValueHint: true
136
+ },
137
+ effect: {
138
+ type: "choice",
139
+ options: ["scrollx", "fade"],
140
+ defaultValueHint: "scrollx"
141
+ },
142
+ children: {
143
+ type: "slot",
144
+ defaultValue: [
145
+ {
146
+ type: "vbox",
147
+ children: {
148
+ type: "text",
149
+ value: "1",
150
+ styles: contentStyle
151
+ }
152
+ },
153
+ {
154
+ type: "vbox",
155
+ children: {
156
+ type: "text",
157
+ value: "2",
158
+ styles: contentStyle
159
+ }
160
+ }
161
+ ]
162
+ }
163
+ },
164
+ importPath: "antd/lib/carousel",
165
+ importName: "Carousel",
166
+ isDefaultExport: true
167
+ };
168
+ function registerCarousel(loader, customCarouselMeta) {
169
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
170
+ doRegisterComponent(Carousel, customCarouselMeta != null ? customCarouselMeta : carouselMeta);
171
+ }
172
+
173
+ function traverseReactEltTree(children, callback) {
174
+ const rec = (elts) => {
175
+ (Array.isArray(elts) ? elts : [elts]).forEach((elt) => {
176
+ var _a;
177
+ if (elt) {
178
+ callback(elt);
179
+ if (elt.children) {
180
+ rec(elt.children);
181
+ }
182
+ if (((_a = elt.props) == null ? void 0 : _a.children) && elt.props.children !== elt.children) {
183
+ rec(elt.props.children);
184
+ }
185
+ }
186
+ });
187
+ };
188
+ rec(children);
189
+ }
190
+
191
+ var __defProp$6 = Object.defineProperty;
192
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
193
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
194
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
195
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
196
+ var __spreadValues$6 = (a, b) => {
197
+ for (var prop in b || (b = {}))
198
+ if (__hasOwnProp$6.call(b, prop))
199
+ __defNormalProp$6(a, prop, b[prop]);
200
+ if (__getOwnPropSymbols$6)
201
+ for (var prop of __getOwnPropSymbols$6(b)) {
202
+ if (__propIsEnum$6.call(b, prop))
203
+ __defNormalProp$6(a, prop, b[prop]);
204
+ }
205
+ return a;
206
+ };
207
+ class CheckboxWrapper extends React.Component {
208
+ render() {
209
+ return /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$6({}, this.props));
210
+ }
211
+ }
212
+ const checkboxMeta = {
213
+ name: "AntdCheckbox",
214
+ displayName: "Antd Checkbox",
215
+ props: {
216
+ autoFocus: {
217
+ type: "boolean",
218
+ description: "If get focus when component mounted",
219
+ defaultValueHint: false
220
+ },
221
+ checked: {
222
+ type: "boolean",
223
+ editOnly: true,
224
+ uncontrolledProp: "defaultChecked",
225
+ description: "Specifies the initial state: whether or not the checkbox is selected",
226
+ defaultValueHint: false
227
+ },
228
+ disabled: {
229
+ type: "boolean",
230
+ description: "If disable checkbox",
231
+ defaultValueHint: false
232
+ },
233
+ indeterminate: {
234
+ type: "boolean",
235
+ description: "The indeterminate checked state of checkbox",
236
+ defaultValueHint: false
237
+ },
238
+ value: {
239
+ type: "string",
240
+ description: "The checkbox value"
241
+ },
242
+ children: {
243
+ type: "slot",
244
+ defaultValue: [
245
+ {
246
+ type: "text",
247
+ value: "Checkbox"
248
+ }
249
+ ]
250
+ }
251
+ },
252
+ importPath: "antd/lib/checkbox/Checkbox",
253
+ importName: "Checkbox",
254
+ defaultStyles: {
255
+ marginLeft: 0
256
+ },
257
+ isDefaultExport: true
258
+ };
259
+ function registerCheckbox(loader, customCheckboxMeta) {
260
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
261
+ doRegisterComponent(CheckboxWrapper, customCheckboxMeta != null ? customCheckboxMeta : checkboxMeta);
262
+ }
263
+ const checkboxGroupMeta = {
264
+ name: "AntdCheckboxGroup",
265
+ displayName: "Antd Checkbox Group",
266
+ props: {
267
+ disabled: {
268
+ type: "boolean",
269
+ description: "If disable all checkboxes",
270
+ defaultValueHint: false
271
+ },
272
+ value: {
273
+ type: "choice",
274
+ editOnly: true,
275
+ uncontrolledProp: "defaultValue",
276
+ description: "Default selected value",
277
+ multiSelect: true,
278
+ options: (componentProps) => {
279
+ const options = /* @__PURE__ */ new Set();
280
+ traverseReactEltTree(componentProps.children, (elt) => {
281
+ var _a;
282
+ if ((elt == null ? void 0 : elt.type) === CheckboxWrapper && typeof ((_a = elt == null ? void 0 : elt.props) == null ? void 0 : _a.value) === "string") {
283
+ options.add(elt.props.value);
284
+ }
285
+ });
286
+ return Array.from(options.keys());
287
+ }
288
+ },
289
+ children: {
290
+ type: "slot",
291
+ allowedComponents: ["AntdCheckbox"],
292
+ defaultValue: [
293
+ {
294
+ type: "component",
295
+ name: "AntdCheckbox"
296
+ }
297
+ ]
298
+ }
299
+ },
300
+ importPath: "antd/lib/checkbox/Group",
301
+ importName: "CheckboxGroup",
302
+ parentComponentName: "AntdCheckbox",
303
+ isDefaultExport: true
304
+ };
305
+ function registerCheckboxGroup(loader, customCheckboxGroupMeta) {
306
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
307
+ doRegisterComponent(CheckboxGroup, customCheckboxGroupMeta != null ? customCheckboxGroupMeta : checkboxGroupMeta);
308
+ }
309
+
310
+ var __defProp$5 = Object.defineProperty;
311
+ var __defProps$3 = Object.defineProperties;
312
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
313
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
314
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
315
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
316
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
317
+ var __spreadValues$5 = (a, b) => {
318
+ for (var prop in b || (b = {}))
319
+ if (__hasOwnProp$5.call(b, prop))
320
+ __defNormalProp$5(a, prop, b[prop]);
321
+ if (__getOwnPropSymbols$5)
322
+ for (var prop of __getOwnPropSymbols$5(b)) {
323
+ if (__propIsEnum$5.call(b, prop))
324
+ __defNormalProp$5(a, prop, b[prop]);
325
+ }
326
+ return a;
327
+ };
328
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
329
+ var __objRest$3 = (source, exclude) => {
330
+ var target = {};
331
+ for (var prop in source)
332
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
333
+ target[prop] = source[prop];
334
+ if (source != null && __getOwnPropSymbols$5)
335
+ for (var prop of __getOwnPropSymbols$5(source)) {
336
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
337
+ target[prop] = source[prop];
338
+ }
339
+ return target;
340
+ };
341
+ const collapstePanelMeta = {
342
+ name: "AntdCollapsePanel",
343
+ displayName: "Antd Collapse Panel",
344
+ props: {
345
+ collapsible: {
346
+ type: "choice",
347
+ options: ["header", "disabled"],
348
+ description: "Specify whether the panel be collapsible or the trigger area of collapsible"
349
+ },
350
+ forceRender: {
351
+ type: "boolean",
352
+ description: "Forced render of content on panel, instead of lazy rending after clicking on header",
353
+ defaultValueHint: false
354
+ },
355
+ header: {
356
+ type: "slot",
357
+ defaultValue: [
358
+ {
359
+ type: "text",
360
+ value: "Header"
361
+ }
362
+ ]
363
+ },
364
+ key: {
365
+ type: "string",
366
+ description: "Unique key identifying the panel from among its siblings"
367
+ },
368
+ showArrow: {
369
+ type: "boolean",
370
+ description: "If false, panel will not show arrow icon",
371
+ defaultValueHint: true
372
+ },
373
+ extra: {
374
+ type: "slot",
375
+ hidePlaceholder: true
376
+ },
377
+ children: {
378
+ type: "slot",
379
+ defaultValue: [
380
+ {
381
+ type: "text",
382
+ value: "Insert text here"
383
+ }
384
+ ]
385
+ }
386
+ },
387
+ importPath: "antd/lib/collapse/CollapsePanel",
388
+ importName: "CollapsePanel",
389
+ parentComponentName: "AntdCollapse",
390
+ isDefaultExport: true
391
+ };
392
+ function registerCollapsePanel(loader, customCollapsePanelMeta) {
393
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
394
+ doRegisterComponent(CollapsePanel, customCollapsePanelMeta != null ? customCollapsePanelMeta : collapstePanelMeta);
395
+ }
396
+ const collapsteMeta = {
397
+ name: "AntdCollapse",
398
+ displayName: "Antd Collapse",
399
+ props: {
400
+ accordion: {
401
+ type: "boolean",
402
+ description: "If true, Collapse renders as Accordion",
403
+ defaultValueHint: false
404
+ },
405
+ activeKey: {
406
+ type: "choice",
407
+ editOnly: true,
408
+ uncontrolledProp: "defaultActiveKey",
409
+ description: "Key of the active panel",
410
+ multiSelect: true,
411
+ options: (componentProps) => {
412
+ const options = /* @__PURE__ */ new Set();
413
+ traverseReactEltTree(componentProps.children, (elt) => {
414
+ if ((elt == null ? void 0 : elt.type) === CollapsePanel && typeof (elt == null ? void 0 : elt.key) === "string") {
415
+ options.add(elt.key);
416
+ }
417
+ });
418
+ return Array.from(options.keys());
419
+ }
420
+ },
421
+ bordered: {
422
+ type: "boolean",
423
+ description: "Toggles rendering of the border around the collapse block",
424
+ defaultValueHint: true
425
+ },
426
+ collapsible: {
427
+ type: "choice",
428
+ options: ["header", "disabled"],
429
+ description: "Specify whether the panels of children be collapsible or the trigger area of collapsible"
430
+ },
431
+ expandIconPosition: {
432
+ type: "choice",
433
+ options: ["left", "right"],
434
+ description: "Set expand icon position",
435
+ defaultValueHint: "left"
436
+ },
437
+ ghost: {
438
+ type: "boolean",
439
+ description: "Make the collapse borderless and its background transparent",
440
+ defaultValueHint: false
441
+ },
442
+ children: {
443
+ type: "slot",
444
+ allowedComponents: ["AntdCollapsePanel"],
445
+ defaultValue: [
446
+ {
447
+ type: "component",
448
+ name: "AntdCollapsePanel",
449
+ props: {
450
+ key: "1"
451
+ }
452
+ }
453
+ ]
454
+ },
455
+ openIcon: {
456
+ type: "slot",
457
+ hidePlaceholder: true
458
+ },
459
+ closeIcon: {
460
+ type: "slot",
461
+ hidePlaceholder: true
462
+ }
463
+ },
464
+ importPath: "@plasmicpkgs/antd/skinny/registerCollapse",
465
+ importName: "Collapse"
466
+ };
467
+ function Collapse(props) {
468
+ const _a = props, { openIcon, closeIcon } = _a, rest = __objRest$3(_a, ["openIcon", "closeIcon"]);
469
+ return /* @__PURE__ */ React.createElement(AntdCollapse, __spreadProps$3(__spreadValues$5({}, rest), {
470
+ expandIcon: openIcon || closeIcon ? ({ isActive }) => isActive ? openIcon : closeIcon : void 0
471
+ }));
472
+ }
473
+ function registerCollapse(loader, customCollapseMeta) {
474
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
475
+ doRegisterComponent(Collapse, customCollapseMeta != null ? customCollapseMeta : collapsteMeta);
476
+ }
477
+
478
+ var __defProp$4 = Object.defineProperty;
479
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
480
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
481
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
482
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
483
+ var __spreadValues$4 = (a, b) => {
484
+ for (var prop in b || (b = {}))
485
+ if (__hasOwnProp$4.call(b, prop))
486
+ __defNormalProp$4(a, prop, b[prop]);
487
+ if (__getOwnPropSymbols$4)
488
+ for (var prop of __getOwnPropSymbols$4(b)) {
489
+ if (__propIsEnum$4.call(b, prop))
490
+ __defNormalProp$4(a, prop, b[prop]);
491
+ }
492
+ return a;
493
+ };
494
+ class Dropdown extends React.Component {
495
+ render() {
496
+ const thisProps = this.props;
497
+ const finalProps = __spreadValues$4({}, thisProps);
498
+ finalProps.children = typeof thisProps.children === "string" ? /* @__PURE__ */ React.createElement("div", null, thisProps.children) : thisProps.children;
499
+ return /* @__PURE__ */ React.createElement(AntdDropdown, __spreadValues$4({}, finalProps));
500
+ }
501
+ }
502
+ const dropdownMeta = {
503
+ name: "AntdDropdown",
504
+ displayName: "Antd Dropdown",
505
+ props: {
506
+ arrow: {
507
+ type: "boolean",
508
+ description: "Whether the dropdown arrow should be visible",
509
+ defaultValueHint: false
510
+ },
511
+ disabled: {
512
+ type: "boolean",
513
+ description: "Whether the dropdown menu is disabled",
514
+ defaultValueHint: false
515
+ },
516
+ overlay: {
517
+ type: "slot",
518
+ allowedComponents: ["AntdMenu"],
519
+ defaultValue: [
520
+ {
521
+ type: "component",
522
+ name: "AntdMenu"
523
+ }
524
+ ]
525
+ },
526
+ placement: {
527
+ type: "choice",
528
+ options: [
529
+ "bottomLeft",
530
+ "bottomCenter",
531
+ "bottomRight",
532
+ "topLeft",
533
+ "topCenter",
534
+ "topRight"
535
+ ],
536
+ description: "Placement of popup menu",
537
+ defaultValueHint: "bottomLeft"
538
+ },
539
+ trigger: {
540
+ type: "choice",
541
+ options: ["click", "hover", "contextMenu"],
542
+ description: "The trigger mode which executes the dropdown action",
543
+ defaultValueHint: "hover"
544
+ },
545
+ visible: {
546
+ type: "boolean",
547
+ description: "Toggle visibility of dropdown menu in Plasmic Editor",
548
+ editOnly: true,
549
+ defaultValueHint: false
550
+ },
551
+ children: {
552
+ type: "slot",
553
+ defaultValue: [
554
+ {
555
+ type: "text",
556
+ value: "Dropdown"
557
+ }
558
+ ]
559
+ }
560
+ },
561
+ importPath: "@plasmicpkgs/antd/skinny/registerDropdown",
562
+ importName: "Dropdown"
563
+ };
564
+ function registerDropdown(loader, customDropdownMeta) {
565
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
566
+ doRegisterComponent(Dropdown, customDropdownMeta != null ? customDropdownMeta : dropdownMeta);
567
+ }
568
+ const dropdownButtonMeta = {
569
+ name: "AntdDropdownButton",
570
+ displayName: "Antd Dropdown Button",
571
+ props: {
572
+ disabled: {
573
+ type: "boolean",
574
+ description: "Whether the dropdown menu is disabled",
575
+ defaultValueHint: false
576
+ },
577
+ icon: {
578
+ type: "slot",
579
+ hidePlaceholder: true
580
+ },
581
+ overlay: {
582
+ type: "slot",
583
+ allowedComponents: ["AntdMenu"],
584
+ defaultValue: [
585
+ {
586
+ type: "component",
587
+ name: "AntdMenu"
588
+ }
589
+ ]
590
+ },
591
+ placement: {
592
+ type: "choice",
593
+ options: [
594
+ "bottomLeft",
595
+ "bottomCenter",
596
+ "bottomRight",
597
+ "topLeft",
598
+ "topCenter",
599
+ "topRight"
600
+ ],
601
+ description: "Placement of popup menu",
602
+ defaultValueHint: "bottomLeft"
603
+ },
604
+ size: {
605
+ type: "choice",
606
+ options: ["small", "medium", "large"],
607
+ description: "Set the size of button",
608
+ defaultValueHint: "medium"
609
+ },
610
+ trigger: {
611
+ type: "choice",
612
+ options: ["click", "hover", "contextMenu"],
613
+ description: "The trigger mode which executes the dropdown action",
614
+ defaultValueHint: "hover"
615
+ },
616
+ type: {
617
+ type: "choice",
618
+ options: ["default", "primary", "ghost", "dashed", "link", "text"],
619
+ description: "Can be set to primary, ghost, dashed, link, text, default",
620
+ defaultValueHint: "default"
621
+ },
622
+ visible: {
623
+ type: "boolean",
624
+ description: "Toggle visibility of dropdown menu in Plasmic Editor",
625
+ editOnly: true,
626
+ defaultValueHint: false
627
+ },
628
+ children: {
629
+ type: "slot",
630
+ defaultValue: [
631
+ {
632
+ type: "text",
633
+ value: "Dropdown"
634
+ }
635
+ ]
636
+ }
637
+ },
638
+ importPath: "antd/lib/dropdown/dropdown-button",
639
+ importName: "DropdownButton",
640
+ parentComponentName: "AntdDropdown",
641
+ isDefaultExport: true
642
+ };
643
+ function registerDropdownButton(loader, customDropdownButtonMeta) {
644
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
645
+ doRegisterComponent(DropdownButton, customDropdownButtonMeta != null ? customDropdownButtonMeta : dropdownButtonMeta);
646
+ }
647
+
648
+ var __defProp$3 = Object.defineProperty;
649
+ var __defProps$2 = Object.defineProperties;
650
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
651
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
652
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
653
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
654
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
655
+ var __spreadValues$3 = (a, b) => {
656
+ for (var prop in b || (b = {}))
657
+ if (__hasOwnProp$3.call(b, prop))
658
+ __defNormalProp$3(a, prop, b[prop]);
659
+ if (__getOwnPropSymbols$3)
660
+ for (var prop of __getOwnPropSymbols$3(b)) {
661
+ if (__propIsEnum$3.call(b, prop))
662
+ __defNormalProp$3(a, prop, b[prop]);
663
+ }
664
+ return a;
665
+ };
666
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
667
+ function sortObjectKeys(obj) {
668
+ return Object.fromEntries(Object.entries(obj).sort());
669
+ }
670
+ function sortProps(props) {
671
+ return sortObjectKeys(props);
672
+ }
673
+ const commonHtmlAttributes = {
674
+ "aria-label": {
675
+ type: "string",
676
+ description: "The ARIA label for this input"
677
+ },
678
+ "aria-labelledby": {
679
+ type: "string",
680
+ description: "Identifies the element(s) that labels this input"
681
+ },
682
+ name: {
683
+ type: "string",
684
+ description: "The HTML name of the input"
685
+ }
686
+ };
687
+ const inputMeta = {
688
+ name: "AntdInput",
689
+ displayName: "Antd Input",
690
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
691
+ addonAfter: {
692
+ type: "slot",
693
+ hidePlaceholder: true
694
+ },
695
+ addonBefore: {
696
+ type: "slot",
697
+ hidePlaceholder: true
698
+ },
699
+ allowClear: {
700
+ type: "boolean",
701
+ description: "If allow to remove input content with clear icon",
702
+ defaultValueHint: false
703
+ },
704
+ bordered: {
705
+ type: "boolean",
706
+ description: "Whether has border style",
707
+ defaultValueHint: true
708
+ },
709
+ disabled: {
710
+ type: "boolean",
711
+ description: "Whether the input is disabled",
712
+ defaultValueHint: false
713
+ },
714
+ id: {
715
+ type: "string",
716
+ description: "The ID for input"
717
+ },
718
+ maxLength: {
719
+ type: "number",
720
+ description: "The max length"
721
+ },
722
+ placeholder: {
723
+ type: "string",
724
+ description: "Placeholder for the input"
725
+ },
726
+ prefix: {
727
+ type: "slot",
728
+ hidePlaceholder: true
729
+ },
730
+ size: {
731
+ type: "choice",
732
+ options: ["small", "middle", "large"],
733
+ description: "The size of the input box",
734
+ defaultValueHint: "middle,"
735
+ },
736
+ suffix: {
737
+ type: "slot",
738
+ hidePlaceholder: true
739
+ },
740
+ type: {
741
+ type: "string",
742
+ description: "The type of input",
743
+ defaultValueHint: "text"
744
+ },
745
+ value: {
746
+ type: "string",
747
+ editOnly: true,
748
+ uncontrolledProp: "defaultValue"
749
+ }
750
+ })),
751
+ importPath: "antd/lib/input",
752
+ importName: "Input",
753
+ isDefaultExport: true
754
+ };
755
+ function registerInput(loader, customInputMeta) {
756
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
757
+ doRegisterComponent(Input, customInputMeta != null ? customInputMeta : inputMeta);
758
+ }
759
+ const inputTextAreaMeta = {
760
+ name: "AntdInputTextArea",
761
+ displayName: "Antd Input Text Area",
762
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
763
+ allowClear: {
764
+ type: "boolean",
765
+ description: "If allow to remove input content with clear icon",
766
+ defaultValueHint: false
767
+ },
768
+ autoSize: {
769
+ type: "object",
770
+ description: "Height autosize feature, can be set to true | false or an object { minRows: 2, maxRows: 6 }"
771
+ },
772
+ disabled: {
773
+ type: "boolean",
774
+ description: "Whether the input is disabled",
775
+ defaultValueHint: false
776
+ },
777
+ bordered: {
778
+ type: "boolean",
779
+ description: "Whether has border style",
780
+ defaultValueHint: true
781
+ },
782
+ showCount: {
783
+ type: "boolean",
784
+ description: "Whether show text count",
785
+ defaultValueHint: false
786
+ },
787
+ id: {
788
+ type: "string",
789
+ description: "The ID for input"
790
+ },
791
+ maxLength: {
792
+ type: "number",
793
+ description: "The max length"
794
+ },
795
+ placeholder: {
796
+ type: "string",
797
+ description: "Placeholder for the input"
798
+ },
799
+ value: {
800
+ type: "string",
801
+ editOnly: true,
802
+ uncontrolledProp: "defaultValue"
803
+ }
804
+ })),
805
+ importPath: "antd/lib/input/TextArea",
806
+ importName: "TextArea",
807
+ isDefaultExport: true,
808
+ parentComponentName: "AntdInput"
809
+ };
810
+ function registerInputTextArea(loader, customInputTextAreaMeta) {
811
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
812
+ doRegisterComponent(TextArea, customInputTextAreaMeta != null ? customInputTextAreaMeta : inputTextAreaMeta);
813
+ }
814
+ const inputSearchMeta = {
815
+ name: "AntdInputSearch",
816
+ displayName: "Antd Input Search",
817
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
818
+ addonBefore: {
819
+ type: "slot",
820
+ hidePlaceholder: true
821
+ },
822
+ allowClear: {
823
+ type: "boolean",
824
+ description: "If allow to remove input content with clear icon",
825
+ defaultValueHint: false
826
+ },
827
+ bordered: {
828
+ type: "boolean",
829
+ description: "Whether has border style",
830
+ defaultValueHint: true
831
+ },
832
+ disabled: {
833
+ type: "boolean",
834
+ description: "Whether the input is disabled",
835
+ defaultValueHint: false
836
+ },
837
+ enterButton: {
838
+ type: "slot",
839
+ hidePlaceholder: true
840
+ },
841
+ id: {
842
+ type: "string",
843
+ description: "The ID for input"
844
+ },
845
+ loading: {
846
+ type: "boolean",
847
+ description: "Search box with loading",
848
+ defaultValueHint: false
849
+ },
850
+ maxLength: {
851
+ type: "number",
852
+ description: "The max length"
853
+ },
854
+ placeholder: {
855
+ type: "string",
856
+ description: "Placeholder for the input"
857
+ },
858
+ prefix: {
859
+ type: "slot",
860
+ hidePlaceholder: true
861
+ },
862
+ size: {
863
+ type: "choice",
864
+ options: ["small", "middle", "large"],
865
+ description: "The size of the input box",
866
+ defaultValueHint: "middle"
867
+ },
868
+ suffix: {
869
+ type: "slot",
870
+ hidePlaceholder: true
871
+ },
872
+ type: {
873
+ type: "string",
874
+ description: "The type of input"
875
+ },
876
+ value: {
877
+ type: "string",
878
+ editOnly: true,
879
+ uncontrolledProp: "defaultValue"
880
+ }
881
+ })),
882
+ importPath: "antd/lib/input/Search",
883
+ importName: "Search",
884
+ isDefaultExport: true,
885
+ parentComponentName: "AntdInput"
886
+ };
887
+ function registerInputSearch(loader, customInputSearchMeta) {
888
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
889
+ doRegisterComponent(Search, customInputSearchMeta != null ? customInputSearchMeta : inputSearchMeta);
890
+ }
891
+ const inputPasswordMeta = {
892
+ name: "AntdInputPassword",
893
+ displayName: "Antd Input Password",
894
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
895
+ addonAfter: {
896
+ type: "slot",
897
+ hidePlaceholder: true
898
+ },
899
+ addonBefore: {
900
+ type: "slot",
901
+ hidePlaceholder: true
902
+ },
903
+ allowClear: {
904
+ type: "boolean",
905
+ description: "If allow to remove input content with clear icon",
906
+ defaultValueHint: false
907
+ },
908
+ bordered: {
909
+ type: "boolean",
910
+ description: "Whether has border style",
911
+ defaultValueHint: true
912
+ },
913
+ disabled: {
914
+ type: "boolean",
915
+ description: "Whether the input is disabled",
916
+ defaultValueHint: false
917
+ },
918
+ id: {
919
+ type: "string",
920
+ description: "The ID for input"
921
+ },
922
+ maxLength: {
923
+ type: "number",
924
+ description: "The max length"
925
+ },
926
+ placeholder: {
927
+ type: "string",
928
+ description: "Placeholder for the input"
929
+ },
930
+ prefix: {
931
+ type: "slot",
932
+ hidePlaceholder: true
933
+ },
934
+ size: {
935
+ type: "choice",
936
+ options: ["small", "middle", "large"],
937
+ description: "The size of the input box",
938
+ defaultValueHint: "middle"
939
+ },
940
+ type: {
941
+ type: "string",
942
+ description: "The type of input"
943
+ },
944
+ value: {
945
+ type: "string",
946
+ editOnly: true,
947
+ uncontrolledProp: "defaultValue"
948
+ },
949
+ visibilityToggle: {
950
+ type: "boolean",
951
+ description: "Whether show toggle button",
952
+ defaultValueHint: true
953
+ }
954
+ })),
955
+ importPath: "antd/lib/input/Password",
956
+ importName: "Password",
957
+ isDefaultExport: true,
958
+ parentComponentName: "AntdInput"
959
+ };
960
+ function registerInputPassword(loader, customInputPasswordMeta) {
961
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
962
+ doRegisterComponent(Password, customInputPasswordMeta != null ? customInputPasswordMeta : inputPasswordMeta);
963
+ }
964
+ const inputGroupMeta = {
965
+ name: "AntdInputGroup",
966
+ displayName: "Antd Input Group",
967
+ props: {
968
+ compact: {
969
+ type: "boolean",
970
+ description: "Whether use compact style",
971
+ defaultValueHint: false
972
+ },
973
+ size: {
974
+ type: "choice",
975
+ options: ["small", "default", "large"],
976
+ description: "The size of Input.Group specifies the size of the included Input fields",
977
+ defaultValueHint: "default"
978
+ },
979
+ children: {
980
+ type: "slot",
981
+ defaultValue: [
982
+ {
983
+ type: "component",
984
+ name: "AntdInput"
985
+ },
986
+ {
987
+ type: "component",
988
+ name: "AntdInput"
989
+ }
990
+ ]
991
+ }
992
+ },
993
+ importPath: "antd/lib/input/Group",
994
+ importName: "InputGroup",
995
+ isDefaultExport: true,
996
+ parentComponentName: "AntdInput"
997
+ };
998
+ function registerInputGroup(loader, customInputGroupMeta) {
999
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1000
+ doRegisterComponent(InputGroup, customInputGroupMeta != null ? customInputGroupMeta : inputGroupMeta);
1001
+ }
1002
+
1003
+ const menuDividerMeta = {
1004
+ name: "AntdMenuDivider",
1005
+ displayName: "Antd Menu Divider",
1006
+ props: {
1007
+ dashed: {
1008
+ type: "boolean",
1009
+ description: "Whether line is dashed",
1010
+ defaultValueHint: false
1011
+ }
1012
+ },
1013
+ importPath: "antd/lib/menu/MenuDivider",
1014
+ importName: "MenuDivider",
1015
+ isDefaultExport: true,
1016
+ parentComponentName: "AntdMenu"
1017
+ };
1018
+ function registerMenuDivider(loader, customMenuDividerMeta) {
1019
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1020
+ doRegisterComponent(MenuDivider, customMenuDividerMeta != null ? customMenuDividerMeta : menuDividerMeta);
1021
+ }
1022
+ const menuItemMeta = {
1023
+ name: "AntdMenuItem",
1024
+ displayName: "Antd Menu Item",
1025
+ props: {
1026
+ danger: {
1027
+ type: "boolean",
1028
+ description: "Display the danger style",
1029
+ defaultValueHint: false
1030
+ },
1031
+ disabled: {
1032
+ type: "boolean",
1033
+ description: "Whether disabled select",
1034
+ defaultValueHint: false
1035
+ },
1036
+ key: {
1037
+ type: "string",
1038
+ description: "Unique ID of the menu item",
1039
+ defaultValue: "menuItemKey"
1040
+ },
1041
+ title: {
1042
+ type: "string",
1043
+ description: "Set display title for collapsed item"
1044
+ },
1045
+ children: {
1046
+ type: "slot",
1047
+ defaultValue: [
1048
+ {
1049
+ type: "text",
1050
+ value: "Option"
1051
+ }
1052
+ ]
1053
+ }
1054
+ },
1055
+ importPath: "antd/lib/menu/MenuItem",
1056
+ importName: "MenuItem",
1057
+ isDefaultExport: true,
1058
+ parentComponentName: "AntdMenu"
1059
+ };
1060
+ function registerMenuItem(loader, customMenuItemMeta) {
1061
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1062
+ doRegisterComponent(MenuItem, customMenuItemMeta != null ? customMenuItemMeta : menuItemMeta);
1063
+ }
1064
+ const menuItemGroupMeta = {
1065
+ name: "AntdMenuItemGroup",
1066
+ displayName: "Antd Menu Item Group",
1067
+ props: {
1068
+ title: {
1069
+ type: "slot",
1070
+ defaultValue: [
1071
+ {
1072
+ type: "text",
1073
+ value: "Group"
1074
+ }
1075
+ ]
1076
+ },
1077
+ children: {
1078
+ type: "slot",
1079
+ allowedComponents: [
1080
+ "AntdMenuItem",
1081
+ "AntdMenuDivider",
1082
+ "AntdMenuItemGroup"
1083
+ ],
1084
+ defaultValue: [
1085
+ {
1086
+ type: "component",
1087
+ name: "AntdMenuItem"
1088
+ }
1089
+ ]
1090
+ }
1091
+ },
1092
+ importPath: "rc-menu",
1093
+ importName: "ItemGroup",
1094
+ parentComponentName: "AntdMenu"
1095
+ };
1096
+ function registerMenuItemGroup(loader, customMenuItemGroupMeta) {
1097
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1098
+ doRegisterComponent(rcMenu.ItemGroup, customMenuItemGroupMeta != null ? customMenuItemGroupMeta : menuItemGroupMeta);
1099
+ }
1100
+ const subMenuMeta = {
1101
+ name: "AntdSubMenu",
1102
+ displayName: "Antd SubMenu",
1103
+ props: {
1104
+ disabled: {
1105
+ type: "boolean",
1106
+ description: "Whether sub-menu is disabled",
1107
+ defaultValueHint: false
1108
+ },
1109
+ key: {
1110
+ type: "string",
1111
+ description: "Unique ID of the sub-menu",
1112
+ defaultValue: "subMenuKey"
1113
+ },
1114
+ title: {
1115
+ type: "slot",
1116
+ defaultValue: [
1117
+ {
1118
+ type: "text",
1119
+ value: "Sub-menu"
1120
+ }
1121
+ ]
1122
+ },
1123
+ children: {
1124
+ type: "slot",
1125
+ allowedComponents: [
1126
+ "AntdMenuItem",
1127
+ "AntdMenuDivider",
1128
+ "AntdMenuItemGroup",
1129
+ "AntdSubMenu"
1130
+ ],
1131
+ defaultValue: [1, 2].map((i) => ({
1132
+ type: "component",
1133
+ name: "AntdMenuItem",
1134
+ props: {
1135
+ key: `subMenuItemKey${i}`,
1136
+ children: [
1137
+ {
1138
+ type: "text",
1139
+ value: `Sub-menu item ${i}`
1140
+ }
1141
+ ]
1142
+ }
1143
+ }))
1144
+ }
1145
+ },
1146
+ importPath: "antd/lib/menu/SubMenu",
1147
+ importName: "SubMenu",
1148
+ isDefaultExport: true,
1149
+ parentComponentName: "AntdMenu"
1150
+ };
1151
+ function registerSubMenu(loader, customSubMenuMeta) {
1152
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1153
+ doRegisterComponent(SubMenu, customSubMenuMeta != null ? customSubMenuMeta : subMenuMeta);
1154
+ }
1155
+ const menuMeta = {
1156
+ name: "AntdMenu",
1157
+ displayName: "Antd Menu",
1158
+ props: {
1159
+ expandIcon: {
1160
+ type: "slot",
1161
+ hidePlaceholder: true
1162
+ },
1163
+ forceSubMenuRender: {
1164
+ type: "boolean",
1165
+ description: "Render submenu into DOM before it becomes visible",
1166
+ defaultValueHint: false
1167
+ },
1168
+ inlineIndent: {
1169
+ type: "number",
1170
+ description: "Indent (in pixels) of inline menu items on each level",
1171
+ defaultValueHint: 24
1172
+ },
1173
+ mode: {
1174
+ type: "choice",
1175
+ options: ["horizontal", "vertical", "inline"],
1176
+ description: "Type of menu",
1177
+ defaultValueHint: "vertical"
1178
+ },
1179
+ multiple: {
1180
+ type: "boolean",
1181
+ description: "Allows selection of multiple items",
1182
+ defaultValueHint: false
1183
+ },
1184
+ openKeys: {
1185
+ type: "choice",
1186
+ editOnly: true,
1187
+ uncontrolledProp: "defaultOpenKeys",
1188
+ description: "Array with the keys of default opened sub menus",
1189
+ multiSelect: true,
1190
+ options: (componentProps) => {
1191
+ const options = /* @__PURE__ */ new Set();
1192
+ traverseReactEltTree(componentProps.children, (elt) => {
1193
+ if ((elt == null ? void 0 : elt.type) === SubMenu && typeof (elt == null ? void 0 : elt.key) === "string") {
1194
+ options.add(elt.key);
1195
+ }
1196
+ });
1197
+ return Array.from(options.keys());
1198
+ }
1199
+ },
1200
+ overflowedIndicator: {
1201
+ type: "slot",
1202
+ hidePlaceholder: true
1203
+ },
1204
+ selectable: {
1205
+ type: "boolean",
1206
+ description: "Allows selecting menu items",
1207
+ defaultValueHint: true
1208
+ },
1209
+ selectedKeys: {
1210
+ type: "choice",
1211
+ editOnly: true,
1212
+ uncontrolledProp: "defaultSelectedKeys",
1213
+ description: "Array with the keys of default selected menu items",
1214
+ multiSelect: true,
1215
+ options: (componentProps) => {
1216
+ const options = /* @__PURE__ */ new Set();
1217
+ traverseReactEltTree(componentProps.children, (elt) => {
1218
+ if ([SubMenu, MenuItem].includes(elt == null ? void 0 : elt.type) && typeof (elt == null ? void 0 : elt.key) === "string") {
1219
+ options.add(elt.key);
1220
+ }
1221
+ });
1222
+ return Array.from(options.keys());
1223
+ }
1224
+ },
1225
+ subMenuCloseDelay: {
1226
+ type: "number",
1227
+ description: "Delay time to hide submenu when mouse leaves (in seconds)",
1228
+ defaultValueHint: 0.1
1229
+ },
1230
+ subMenuOpenDelay: {
1231
+ type: "number",
1232
+ description: "Delay time to show submenu when mouse enters, (in seconds)",
1233
+ defaultValueHint: 0
1234
+ },
1235
+ theme: {
1236
+ type: "choice",
1237
+ options: ["light", "dark"],
1238
+ description: "Color theme of the menu",
1239
+ defaultValueHint: "light"
1240
+ },
1241
+ triggerSubMenuAction: {
1242
+ type: "choice",
1243
+ options: ["hover", "click"],
1244
+ description: "Which action can trigger submenu open/close",
1245
+ defaultValueHint: "hover"
1246
+ },
1247
+ children: {
1248
+ type: "slot",
1249
+ allowedComponents: ["AntdMenuItem", "AntdMenuDivider", "AntdSubMenu"],
1250
+ defaultValue: [
1251
+ {
1252
+ type: "component",
1253
+ name: "AntdMenuItem"
1254
+ },
1255
+ {
1256
+ type: "component",
1257
+ name: "AntdSubMenu"
1258
+ }
1259
+ ]
1260
+ }
1261
+ },
1262
+ importPath: "antd/lib/menu/index",
1263
+ importName: "Menu",
1264
+ isDefaultExport: true
1265
+ };
1266
+ function registerMenu(loader, customMenuMeta) {
1267
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1268
+ doRegisterComponent(Menu, customMenuMeta != null ? customMenuMeta : menuMeta);
1269
+ }
1270
+
1271
+ const optionMeta = {
1272
+ name: "AntdOption",
1273
+ displayName: "Antd Option",
1274
+ props: {
1275
+ disabled: {
1276
+ type: "boolean",
1277
+ description: "Disable this option",
1278
+ defaultValueHint: false
1279
+ },
1280
+ title: {
1281
+ type: "string",
1282
+ description: "title of Select after select this Option"
1283
+ },
1284
+ value: {
1285
+ type: "string",
1286
+ description: "Default to filter with this property"
1287
+ },
1288
+ key: {
1289
+ type: "string",
1290
+ description: "Option key"
1291
+ },
1292
+ children: {
1293
+ type: "slot",
1294
+ defaultValue: [
1295
+ {
1296
+ type: "text",
1297
+ value: "Option"
1298
+ }
1299
+ ]
1300
+ }
1301
+ },
1302
+ importPath: "rc-select",
1303
+ importName: "Option",
1304
+ parentComponentName: "AntdSelect"
1305
+ };
1306
+ function registerOption(loader, customOptionMeta) {
1307
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1308
+ doRegisterComponent(rcSelect.Option, customOptionMeta != null ? customOptionMeta : optionMeta);
1309
+ }
1310
+ const optGroupMeta = {
1311
+ name: "AntdOptionGroup",
1312
+ displayName: "Antd Option Group",
1313
+ props: {
1314
+ key: {
1315
+ type: "string",
1316
+ description: "Group key"
1317
+ },
1318
+ label: {
1319
+ type: "string",
1320
+ description: "Group label"
1321
+ },
1322
+ children: {
1323
+ type: "slot",
1324
+ allowedComponents: ["AntdOption"],
1325
+ defaultValue: [
1326
+ {
1327
+ type: "component",
1328
+ name: "AntdOption"
1329
+ }
1330
+ ]
1331
+ }
1332
+ },
1333
+ importPath: "rc-select",
1334
+ importName: "OptGroup",
1335
+ parentComponentName: "AntdSelect"
1336
+ };
1337
+ function registerOptGroup(loader, customOptGroupMeta) {
1338
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1339
+ doRegisterComponent(rcSelect.OptGroup, customOptGroupMeta != null ? customOptGroupMeta : optGroupMeta);
1340
+ }
1341
+
1342
+ const rateMeta = {
1343
+ name: "AntdRate",
1344
+ displayName: "Antd Rate",
1345
+ props: {
1346
+ allowClear: {
1347
+ type: "boolean",
1348
+ description: "Whether to allow clear when clicking again",
1349
+ defaultValueHint: true
1350
+ },
1351
+ allowHalf: {
1352
+ type: "boolean",
1353
+ description: "Whether to allow semi selection",
1354
+ defaultValueHint: false
1355
+ },
1356
+ autoFocus: {
1357
+ type: "boolean",
1358
+ description: "If componet is focused when mounted",
1359
+ defaultValueHint: false
1360
+ },
1361
+ count: {
1362
+ type: "number",
1363
+ description: "Star count"
1364
+ },
1365
+ disabled: {
1366
+ type: "boolean",
1367
+ description: "Disabled state of component",
1368
+ defaultValueHint: false
1369
+ },
1370
+ tooltips: {
1371
+ type: "array",
1372
+ description: "Array to customize tooltip for each icon"
1373
+ },
1374
+ value: {
1375
+ type: "number",
1376
+ description: "The default value",
1377
+ editOnly: true,
1378
+ uncontrolledProp: "defaultValue",
1379
+ defaultValueHint: 0
1380
+ },
1381
+ character: {
1382
+ type: "slot",
1383
+ hidePlaceholder: true
1384
+ }
1385
+ },
1386
+ importPath: "antd/lib/rate",
1387
+ importName: "Rate",
1388
+ isDefaultExport: true
1389
+ };
1390
+ function registerRate(loader, customRateMeta) {
1391
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1392
+ doRegisterComponent(Rate, customRateMeta != null ? customRateMeta : rateMeta);
1393
+ }
1394
+
1395
+ const selectMeta = {
1396
+ name: "AntdSelect",
1397
+ displayName: "Antd Select",
1398
+ props: {
1399
+ allowClear: {
1400
+ type: "boolean",
1401
+ description: "Show clear button",
1402
+ defaultValueHint: false
1403
+ },
1404
+ autoClearSearchValue: {
1405
+ type: "boolean",
1406
+ description: "Whether the current search will be cleared on selecting an item",
1407
+ defaultValueHint: true,
1408
+ hidden: (props) => props.mode !== "multiple" && props.mode !== "tags"
1409
+ },
1410
+ autoFocus: {
1411
+ type: "boolean",
1412
+ description: "Get focus by default",
1413
+ defaultValueHint: false
1414
+ },
1415
+ bordered: {
1416
+ type: "boolean",
1417
+ description: "Whether has border style",
1418
+ defaultValueHint: true
1419
+ },
1420
+ disabled: {
1421
+ type: "boolean",
1422
+ description: "Whether disabled select",
1423
+ defaultValueHint: false
1424
+ },
1425
+ listHeight: {
1426
+ type: "number",
1427
+ description: "Config popup height",
1428
+ defaultValueHint: 256
1429
+ },
1430
+ loading: {
1431
+ type: "boolean",
1432
+ description: "Indicate loading state",
1433
+ defaultValueHint: false
1434
+ },
1435
+ mode: {
1436
+ type: "choice",
1437
+ options: ["multiple", "tags"],
1438
+ description: "Set mode of Select"
1439
+ },
1440
+ open: {
1441
+ type: "boolean",
1442
+ editOnly: true,
1443
+ uncontrolledProp: "defaultOpen",
1444
+ description: "Initial open state of dropdown",
1445
+ defaultValueHint: false
1446
+ },
1447
+ placeholder: {
1448
+ type: "slot",
1449
+ defaultValue: [
1450
+ {
1451
+ type: "text",
1452
+ value: "Select"
1453
+ }
1454
+ ]
1455
+ },
1456
+ showArrow: {
1457
+ type: "boolean",
1458
+ description: "Whether to show the drop-down arrow",
1459
+ defaultValueHint: true
1460
+ },
1461
+ showSearch: {
1462
+ type: "boolean",
1463
+ description: "Whether show search input in single mode",
1464
+ defaultValueHint: false
1465
+ },
1466
+ size: {
1467
+ type: "choice",
1468
+ options: ["large", "middle", "small"],
1469
+ description: "Set mode of Select",
1470
+ defaultValueHint: "middle"
1471
+ },
1472
+ value: {
1473
+ type: "choice",
1474
+ editOnly: true,
1475
+ uncontrolledProp: "defaultValue",
1476
+ description: "Initial selected option",
1477
+ options: (componentProps) => {
1478
+ const options = /* @__PURE__ */ new Set();
1479
+ traverseReactEltTree(componentProps.children, (elt) => {
1480
+ var _a;
1481
+ if ((elt == null ? void 0 : elt.type) === rcSelect.Option && typeof ((_a = elt == null ? void 0 : elt.props) == null ? void 0 : _a.value) === "string") {
1482
+ options.add(elt.props.value);
1483
+ }
1484
+ });
1485
+ return Array.from(options.keys());
1486
+ }
1487
+ },
1488
+ virtual: {
1489
+ type: "boolean",
1490
+ description: "Disable virtual scroll when set to false",
1491
+ defaultValueHint: true
1492
+ },
1493
+ children: {
1494
+ type: "slot",
1495
+ allowedComponents: ["AntdOption, AntdOptionGroup"],
1496
+ defaultValue: [
1497
+ {
1498
+ type: "component",
1499
+ name: "AntdOption",
1500
+ props: {
1501
+ value: "Option",
1502
+ children: {
1503
+ type: "text",
1504
+ value: "Option"
1505
+ }
1506
+ }
1507
+ }
1508
+ ]
1509
+ }
1510
+ },
1511
+ importPath: "antd/lib/select",
1512
+ importName: "Select",
1513
+ isDefaultExport: true
1514
+ };
1515
+ function registerSelect(loader, customSelectMeta) {
1516
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1517
+ doRegisterComponent(Select, customSelectMeta != null ? customSelectMeta : selectMeta);
1518
+ }
1519
+
1520
+ var __defProp$2 = Object.defineProperty;
1521
+ var __defProps$1 = Object.defineProperties;
1522
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1523
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1524
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1525
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1526
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1527
+ var __spreadValues$2 = (a, b) => {
1528
+ for (var prop in b || (b = {}))
1529
+ if (__hasOwnProp$2.call(b, prop))
1530
+ __defNormalProp$2(a, prop, b[prop]);
1531
+ if (__getOwnPropSymbols$2)
1532
+ for (var prop of __getOwnPropSymbols$2(b)) {
1533
+ if (__propIsEnum$2.call(b, prop))
1534
+ __defNormalProp$2(a, prop, b[prop]);
1535
+ }
1536
+ return a;
1537
+ };
1538
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1539
+ var __objRest$2 = (source, exclude) => {
1540
+ var target = {};
1541
+ for (var prop in source)
1542
+ if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
1543
+ target[prop] = source[prop];
1544
+ if (source != null && __getOwnPropSymbols$2)
1545
+ for (var prop of __getOwnPropSymbols$2(source)) {
1546
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
1547
+ target[prop] = source[prop];
1548
+ }
1549
+ return target;
1550
+ };
1551
+ const Slider = React.forwardRef((_a, ref) => {
1552
+ var _b = _a, { value, defaultValue, value2, defaultValue2 } = _b, props = __objRest$2(_b, ["value", "defaultValue", "value2", "defaultValue2"]);
1553
+ const newProps = __spreadValues$2({}, props);
1554
+ if (props.range) {
1555
+ if (typeof value === "number" || typeof value2 === "number") {
1556
+ newProps.value = [value != null ? value : 0, value2 != null ? value2 : 0];
1557
+ }
1558
+ if (typeof defaultValue === "number" || typeof defaultValue2 === "number") {
1559
+ newProps.defaultValue = [defaultValue != null ? defaultValue : 0, defaultValue2 != null ? defaultValue2 : 0];
1560
+ }
1561
+ } else {
1562
+ if (typeof value === "number") {
1563
+ newProps.value = value;
1564
+ }
1565
+ if (typeof defaultValue === "number") {
1566
+ newProps.defaultValue = defaultValue;
1567
+ }
1568
+ }
1569
+ return /* @__PURE__ */ React.createElement(AntdSlider, __spreadProps$1(__spreadValues$2({}, newProps), {
1570
+ ref
1571
+ }));
1572
+ });
1573
+ const sliderMeta = {
1574
+ name: "AntdSlider",
1575
+ displayName: "Antd Slider",
1576
+ props: {
1577
+ max: {
1578
+ type: "number",
1579
+ description: "The maximum value the slider can slide to",
1580
+ defaultValueHint: 100
1581
+ },
1582
+ min: {
1583
+ type: "number",
1584
+ description: "The minimum value the slider can slide to",
1585
+ defaultValueHint: 0
1586
+ },
1587
+ included: {
1588
+ type: "boolean",
1589
+ description: "Make effect when marks not null, true means containment and false means coordinative",
1590
+ defaultValueHint: true
1591
+ },
1592
+ disabled: {
1593
+ type: "boolean",
1594
+ description: "If true, the slider will not be interactable",
1595
+ defaultValueHint: false
1596
+ },
1597
+ range: {
1598
+ type: "boolean",
1599
+ description: "Dual thumb mode",
1600
+ defaultValueHint: false
1601
+ },
1602
+ reverse: {
1603
+ type: "boolean",
1604
+ description: "Reverse the component",
1605
+ defaultValueHint: false
1606
+ },
1607
+ vertical: {
1608
+ type: "boolean",
1609
+ description: "If true, the slider will be vertical",
1610
+ defaultValueHint: false
1611
+ },
1612
+ value: {
1613
+ type: "number",
1614
+ editOnly: true,
1615
+ uncontrolledProp: "defaultValue",
1616
+ description: "The default value of slider"
1617
+ },
1618
+ value2: {
1619
+ type: "number",
1620
+ displayName: "value 2",
1621
+ editOnly: true,
1622
+ uncontrolledProp: "defaultValue2",
1623
+ description: "The default value for the second value of the slider",
1624
+ hidden: (props) => !props.range
1625
+ },
1626
+ step: {
1627
+ type: "number",
1628
+ description: "The granularity the slider can step through values. Must greater than 0, and be divided by (max - min). When marks no null, step can be null",
1629
+ defaultValueHint: 1
1630
+ },
1631
+ marks: {
1632
+ type: "object",
1633
+ description: "Tick mark of Slider, type of key must be number, and must in closed interval [min, max], each mark can declare its own style"
1634
+ }
1635
+ },
1636
+ defaultStyles: {
1637
+ width: "200px",
1638
+ maxWidth: "100%"
1639
+ },
1640
+ importPath: "@plasmicpkgs/antd/skinny/registerSlider",
1641
+ importName: "Slider"
1642
+ };
1643
+ function registerSlider(loader, customSliderMeta) {
1644
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1645
+ doRegisterComponent(Slider, customSliderMeta != null ? customSliderMeta : sliderMeta);
1646
+ }
1647
+
1648
+ const switchMeta = {
1649
+ name: "AntdSwitch",
1650
+ displayName: "Antd Switch",
1651
+ props: {
1652
+ autoFocus: {
1653
+ type: "boolean",
1654
+ description: "Whether get focus when component mounted",
1655
+ defaultValueHint: false
1656
+ },
1657
+ checked: {
1658
+ type: "boolean",
1659
+ editOnly: true,
1660
+ uncontrolledProp: "defaultChecked",
1661
+ description: "Whether to set the initial state",
1662
+ defaultValueHint: false
1663
+ },
1664
+ disabled: {
1665
+ type: "boolean",
1666
+ description: "Disable switch",
1667
+ defaultValueHint: false
1668
+ },
1669
+ loading: {
1670
+ type: "boolean",
1671
+ description: "Loading state of switch",
1672
+ defaultValueHint: false
1673
+ },
1674
+ checkedChildren: {
1675
+ type: "slot",
1676
+ defaultValue: [],
1677
+ hidePlaceholder: true
1678
+ },
1679
+ unCheckedChildren: {
1680
+ type: "slot",
1681
+ defaultValue: [],
1682
+ hidePlaceholder: true
1683
+ },
1684
+ size: {
1685
+ type: "choice",
1686
+ options: ["small", "default"],
1687
+ description: "The size of the Switch",
1688
+ defaultValueHint: "default"
1689
+ }
1690
+ },
1691
+ importPath: "antd/lib/switch",
1692
+ importName: "Switch",
1693
+ isDefaultExport: true
1694
+ };
1695
+ function registerSwitch(loader, customSwitchMeta) {
1696
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1697
+ doRegisterComponent(Switch, customSwitchMeta != null ? customSwitchMeta : switchMeta);
1698
+ }
1699
+
1700
+ var __defProp$1 = Object.defineProperty;
1701
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1702
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1703
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1704
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1705
+ var __spreadValues$1 = (a, b) => {
1706
+ for (var prop in b || (b = {}))
1707
+ if (__hasOwnProp$1.call(b, prop))
1708
+ __defNormalProp$1(a, prop, b[prop]);
1709
+ if (__getOwnPropSymbols$1)
1710
+ for (var prop of __getOwnPropSymbols$1(b)) {
1711
+ if (__propIsEnum$1.call(b, prop))
1712
+ __defNormalProp$1(a, prop, b[prop]);
1713
+ }
1714
+ return a;
1715
+ };
1716
+ var __objRest$1 = (source, exclude) => {
1717
+ var target = {};
1718
+ for (var prop in source)
1719
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
1720
+ target[prop] = source[prop];
1721
+ if (source != null && __getOwnPropSymbols$1)
1722
+ for (var prop of __getOwnPropSymbols$1(source)) {
1723
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
1724
+ target[prop] = source[prop];
1725
+ }
1726
+ return target;
1727
+ };
1728
+ function TableColumn(_props) {
1729
+ return null;
1730
+ }
1731
+ function TableValue(props) {
1732
+ var _a;
1733
+ const { className } = props;
1734
+ const column = host.useSelector("currentColumn");
1735
+ return /* @__PURE__ */ React.createElement("div", {
1736
+ className
1737
+ }, (_a = column == null ? void 0 : column.toString()) != null ? _a : "");
1738
+ }
1739
+ function ColumnWrapper(props) {
1740
+ return props.children;
1741
+ }
1742
+ function TableWrapper(props) {
1743
+ var _a, _b;
1744
+ const { className, items, columns, size, onSelect, pagination } = props;
1745
+ const tableColumns = (_b = (_a = columns == null ? void 0 : columns.props) == null ? void 0 : _a.children) != null ? _b : columns;
1746
+ const columnDefinitions = React.useMemo(() => {
1747
+ return React.Children.map(tableColumns, (column, columnIndex) => {
1748
+ if (!column) {
1749
+ return void 0;
1750
+ }
1751
+ const _a2 = column.props, { columnTemplate, title, dataIndex } = _a2, rest = __objRest$1(_a2, ["columnTemplate", "title", "dataIndex"]);
1752
+ const columnDefinition = {
1753
+ columnIndex,
1754
+ title,
1755
+ dataIndex,
1756
+ key: columnIndex,
1757
+ render: (value, record, rowIndex) => {
1758
+ return /* @__PURE__ */ React.createElement(host.DataProvider, {
1759
+ name: "currentRow",
1760
+ data: record
1761
+ }, /* @__PURE__ */ React.createElement(host.DataProvider, {
1762
+ name: "currentRowIndex",
1763
+ data: rowIndex
1764
+ }, /* @__PURE__ */ React.createElement(host.DataProvider, {
1765
+ name: "currentColumn",
1766
+ data: value
1767
+ }, host.repeatedElement(rowIndex, /* @__PURE__ */ React.createElement(ColumnWrapper, __spreadValues$1({}, rest), columnTemplate)))));
1768
+ }
1769
+ };
1770
+ return columnDefinition;
1771
+ }).filter(Boolean);
1772
+ }, [tableColumns]);
1773
+ return /* @__PURE__ */ React.createElement(Table, {
1774
+ className,
1775
+ columns: columnDefinitions,
1776
+ dataSource: items,
1777
+ size,
1778
+ onRow: (record) => {
1779
+ return {
1780
+ onMouseUp: () => {
1781
+ return onSelect == null ? void 0 : onSelect(record.id);
1782
+ }
1783
+ };
1784
+ },
1785
+ pagination: pagination ? void 0 : pagination,
1786
+ rowKey: "id"
1787
+ });
1788
+ }
1789
+ const DEFAULT_ITEMS = [
1790
+ {
1791
+ name: "John Brown",
1792
+ age: 19,
1793
+ address: "New York No. 1 Lake Park",
1794
+ tags: ["student", "developer"]
1795
+ },
1796
+ {
1797
+ name: "Jim Green",
1798
+ age: 42,
1799
+ address: "London No. 1 Lake Park",
1800
+ tags: ["teacher"]
1801
+ },
1802
+ {
1803
+ name: "Joe Black",
1804
+ age: 32,
1805
+ address: "Sidney No. 1 Lake Park",
1806
+ tags: ["cool", "teacher"]
1807
+ }
1808
+ ];
1809
+ function capitalize(input) {
1810
+ return input.charAt(0).toUpperCase() + input.slice(1);
1811
+ }
1812
+ const tableMeta = {
1813
+ name: "AntdTable",
1814
+ displayName: "Antd Table",
1815
+ props: {
1816
+ items: {
1817
+ type: "array",
1818
+ description: "The data to display in the table, as a list of objects (one object per row)",
1819
+ defaultValue: DEFAULT_ITEMS
1820
+ },
1821
+ columns: {
1822
+ type: "slot",
1823
+ allowedComponents: ["AntdTableColumn"],
1824
+ defaultValue: Object.keys(DEFAULT_ITEMS[0]).map((columnName) => ({
1825
+ type: "component",
1826
+ name: "AntdTableColumn",
1827
+ props: {
1828
+ title: capitalize(columnName),
1829
+ dataIndex: columnName
1830
+ }
1831
+ }))
1832
+ },
1833
+ size: {
1834
+ type: "choice",
1835
+ options: ["large", "middle", "small"],
1836
+ defaultValueHint: "large"
1837
+ },
1838
+ pagination: {
1839
+ type: "boolean",
1840
+ defaultValueHint: true
1841
+ }
1842
+ },
1843
+ importPath: "@plasmicpkgs/antd/skinny/registerTable",
1844
+ importName: "TableWrapper"
1845
+ };
1846
+ const tableColumnMeta = {
1847
+ name: "AntdTableColumn",
1848
+ parentComponentName: "AntdTable",
1849
+ providesData: true,
1850
+ props: {
1851
+ title: {
1852
+ type: "string",
1853
+ defaultValue: "Name"
1854
+ },
1855
+ dataIndex: {
1856
+ type: "string",
1857
+ defaultValue: "name",
1858
+ description: "The field to show. The table accepts some data as a list of objects, and this is the name of the field in those objects that this column will display."
1859
+ },
1860
+ columnTemplate: {
1861
+ type: "slot",
1862
+ defaultValue: {
1863
+ type: "vbox",
1864
+ styles: {
1865
+ padding: 0
1866
+ },
1867
+ children: [
1868
+ {
1869
+ type: "component",
1870
+ name: "AntdTableValue"
1871
+ }
1872
+ ]
1873
+ }
1874
+ }
1875
+ },
1876
+ importPath: "@plasmicpkgs/antd/skinny/registerTable",
1877
+ importName: "TableColumn"
1878
+ };
1879
+ const tableValueMeta = {
1880
+ name: "AntdTableValue",
1881
+ parentComponentName: "AntdTableColumn",
1882
+ props: {},
1883
+ importPath: "@plasmicpkgs/antd/skinny/registerTable",
1884
+ importName: "TableValue"
1885
+ };
1886
+ function registerTable(loader, customMeta) {
1887
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : host.registerComponent(...args);
1888
+ doRegisterComponent(TableWrapper, customMeta != null ? customMeta : tableMeta);
1889
+ }
1890
+ function registerTableColumn(loader, customMeta) {
1891
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : host.registerComponent(...args);
1892
+ doRegisterComponent(TableColumn, customMeta != null ? customMeta : tableColumnMeta);
1893
+ }
1894
+ function registerTableValue(loader, customMeta) {
1895
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : host.registerComponent(...args);
1896
+ doRegisterComponent(TableValue, customMeta != null ? customMeta : tableValueMeta);
1897
+ }
1898
+
1899
+ var __defProp = Object.defineProperty;
1900
+ var __defProps = Object.defineProperties;
1901
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1902
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1903
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
1904
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
1905
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1906
+ var __spreadValues = (a, b) => {
1907
+ for (var prop in b || (b = {}))
1908
+ if (__hasOwnProp.call(b, prop))
1909
+ __defNormalProp(a, prop, b[prop]);
1910
+ if (__getOwnPropSymbols)
1911
+ for (var prop of __getOwnPropSymbols(b)) {
1912
+ if (__propIsEnum.call(b, prop))
1913
+ __defNormalProp(a, prop, b[prop]);
1914
+ }
1915
+ return a;
1916
+ };
1917
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1918
+ var __objRest = (source, exclude) => {
1919
+ var target = {};
1920
+ for (var prop in source)
1921
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
1922
+ target[prop] = source[prop];
1923
+ if (source != null && __getOwnPropSymbols)
1924
+ for (var prop of __getOwnPropSymbols(source)) {
1925
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
1926
+ target[prop] = source[prop];
1927
+ }
1928
+ return target;
1929
+ };
1930
+ const TabPane = AntdTabs.TabPane;
1931
+ const tabPaneMeta = {
1932
+ name: "AntdTabPane",
1933
+ displayName: "Antd Tab Pane",
1934
+ props: {
1935
+ tab: {
1936
+ type: "slot",
1937
+ defaultValue: [
1938
+ {
1939
+ type: "text",
1940
+ value: "Tab"
1941
+ }
1942
+ ]
1943
+ },
1944
+ key: {
1945
+ type: "string",
1946
+ description: "Unique TabPane's key",
1947
+ defaultValue: "tabPaneKey"
1948
+ },
1949
+ closable: {
1950
+ type: "boolean",
1951
+ description: "Wether the tab can be closed or not. Only works for editable tabs",
1952
+ defaultValueHint: true
1953
+ },
1954
+ disabled: {
1955
+ type: "boolean",
1956
+ description: "Disabled state of tab",
1957
+ defaultValueHint: false
1958
+ },
1959
+ forceRender: {
1960
+ type: "boolean",
1961
+ description: "Forced render of content in tabs, not lazy render after clicking on tabs",
1962
+ defaultValueHint: false
1963
+ },
1964
+ closeIcon: {
1965
+ type: "slot",
1966
+ hidePlaceholder: true
1967
+ },
1968
+ children: {
1969
+ type: "slot",
1970
+ defaultValue: [
1971
+ {
1972
+ type: "text",
1973
+ value: "Tab Content"
1974
+ }
1975
+ ]
1976
+ }
1977
+ },
1978
+ parentComponentName: "AntdTabs",
1979
+ importPath: "@plasmicpkgs/antd/skinny/registerTabs",
1980
+ importName: "TabPane"
1981
+ };
1982
+ function registerTabPane(loader, customTabPaneMeta) {
1983
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1984
+ doRegisterComponent(TabPane, customTabPaneMeta != null ? customTabPaneMeta : tabPaneMeta);
1985
+ }
1986
+ function Tabs(props) {
1987
+ const _a = props, {
1988
+ leftTabBarExtraContent,
1989
+ rightTabBarExtraContent
1990
+ } = _a, otherProps = __objRest(_a, [
1991
+ "leftTabBarExtraContent",
1992
+ "rightTabBarExtraContent"
1993
+ ]);
1994
+ return /* @__PURE__ */ React.createElement(AntdTabs, __spreadProps(__spreadValues({}, otherProps), {
1995
+ tabBarExtraContent: {
1996
+ left: leftTabBarExtraContent,
1997
+ right: rightTabBarExtraContent
1998
+ }
1999
+ }));
2000
+ }
2001
+ function NavigateTabs({ componentProps, studioOps }) {
2002
+ const tabPanes = [];
2003
+ traverseReactEltTree(componentProps.children, (elt) => {
2004
+ if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2005
+ tabPanes.push(elt.key);
2006
+ }
2007
+ });
2008
+ const activeKey = componentProps.activeKey;
2009
+ const currTabPos = activeKey ? tabPanes.findIndex((tabKey) => {
2010
+ return tabKey === activeKey;
2011
+ }) : 0;
2012
+ return /* @__PURE__ */ React.createElement("div", {
2013
+ style: {
2014
+ width: "100%",
2015
+ display: "flex",
2016
+ flexDirection: "row",
2017
+ gap: "10px",
2018
+ justifyContent: "space-between"
2019
+ }
2020
+ }, /* @__PURE__ */ React.createElement(antd.Button, {
2021
+ style: { width: "100%" },
2022
+ onClick: () => {
2023
+ if (tabPanes.length > 0) {
2024
+ const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
2025
+ studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
2026
+ }
2027
+ }
2028
+ }, "Prev tab"), /* @__PURE__ */ React.createElement(antd.Button, {
2029
+ style: { width: "100%" },
2030
+ onClick: () => {
2031
+ if (tabPanes.length > 0) {
2032
+ const nextTabPos = (currTabPos + 1) % tabPanes.length;
2033
+ studioOps.updateProps({ activeKey: tabPanes[nextTabPos] });
2034
+ }
2035
+ }
2036
+ }, "Next tab"));
2037
+ }
2038
+ function OutlineMessage() {
2039
+ return /* @__PURE__ */ React.createElement("div", null, "* To re-arrange tab panes, use the Outline panel");
2040
+ }
2041
+ const tabsMeta = {
2042
+ name: "AntdTabs",
2043
+ displayName: "Antd Tabs",
2044
+ props: {
2045
+ type: {
2046
+ type: "choice",
2047
+ options: ["line", "card", "editable-card"],
2048
+ defaultValueHint: "line",
2049
+ description: "Basic style of tabs"
2050
+ },
2051
+ addIcon: {
2052
+ type: "slot",
2053
+ hidePlaceholder: true
2054
+ },
2055
+ animated: {
2056
+ type: "object",
2057
+ hidden: (props) => props.tabPosition !== "top" && !!props.tabPosition,
2058
+ defaultValueHint: { inkBar: true, tabPane: false },
2059
+ description: "Whether to change tabs with animation. Can be either a boolean or specify for inkBar and tabPane"
2060
+ },
2061
+ hideAdd: {
2062
+ type: "boolean",
2063
+ hidden: (props) => props.type !== "editable-card",
2064
+ defaultValueHint: false,
2065
+ description: "Hide plus icon or not"
2066
+ },
2067
+ moreIcon: {
2068
+ type: "slot",
2069
+ hidePlaceholder: true
2070
+ },
2071
+ size: {
2072
+ type: "choice",
2073
+ options: ["large", "default", "small"],
2074
+ defaultValueHint: "default",
2075
+ description: "Preset tab bar size"
2076
+ },
2077
+ tabPosition: {
2078
+ type: "choice",
2079
+ options: ["top", "right", "bottom", "left"],
2080
+ defaultValueHint: "top",
2081
+ description: "Position of tabs"
2082
+ },
2083
+ tabBarGutter: {
2084
+ type: "number",
2085
+ description: "The gap between tabs"
2086
+ },
2087
+ centered: {
2088
+ type: "boolean",
2089
+ description: "Centers tabs",
2090
+ defaultValueHint: false
2091
+ },
2092
+ leftTabBarExtraContent: {
2093
+ type: "slot",
2094
+ hidePlaceholder: true
2095
+ },
2096
+ rightTabBarExtraContent: {
2097
+ type: "slot",
2098
+ hidePlaceholder: true
2099
+ },
2100
+ tabBarStyle: {
2101
+ type: "object",
2102
+ description: "CSS for the Tab Bar style"
2103
+ },
2104
+ activeKey: {
2105
+ type: "choice",
2106
+ editOnly: true,
2107
+ uncontrolledProp: "defaultActiveKey",
2108
+ description: "Initial active TabPane's key",
2109
+ options: (props) => {
2110
+ const options = /* @__PURE__ */ new Set();
2111
+ traverseReactEltTree(props.children, (elt) => {
2112
+ if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2113
+ options.add(elt.key);
2114
+ }
2115
+ });
2116
+ return Array.from(options.keys());
2117
+ }
2118
+ },
2119
+ children: {
2120
+ type: "slot",
2121
+ allowedComponents: ["AntdTabPane"],
2122
+ defaultValue: [
2123
+ {
2124
+ type: "component",
2125
+ name: "AntdTabPane",
2126
+ props: {
2127
+ key: "1",
2128
+ tab: [
2129
+ {
2130
+ type: "text",
2131
+ value: "Tab"
2132
+ }
2133
+ ],
2134
+ children: [
2135
+ {
2136
+ type: "text",
2137
+ value: "Tab content"
2138
+ }
2139
+ ]
2140
+ }
2141
+ },
2142
+ {
2143
+ type: "component",
2144
+ name: "AntdTabPane",
2145
+ props: {
2146
+ key: "2",
2147
+ tab: [
2148
+ {
2149
+ type: "text",
2150
+ value: "Tab"
2151
+ }
2152
+ ],
2153
+ children: [
2154
+ {
2155
+ type: "text",
2156
+ value: "Tab content"
2157
+ }
2158
+ ]
2159
+ }
2160
+ }
2161
+ ]
2162
+ }
2163
+ },
2164
+ actions: [
2165
+ {
2166
+ type: "custom-action",
2167
+ control: NavigateTabs
2168
+ },
2169
+ {
2170
+ type: "button-action",
2171
+ label: "Add new tab",
2172
+ onClick: ({ componentProps, studioOps }) => {
2173
+ const generateNewKey = () => {
2174
+ let keysSet = /* @__PURE__ */ new Set();
2175
+ traverseReactEltTree(componentProps.children, (elt) => {
2176
+ if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2177
+ keysSet.add(elt.key);
2178
+ }
2179
+ });
2180
+ for (let keyCandidate = 1; keyCandidate <= keysSet.size + 1; keyCandidate++) {
2181
+ const strKey = keyCandidate.toString();
2182
+ if (!keysSet.has(strKey)) {
2183
+ return strKey;
2184
+ }
2185
+ }
2186
+ return void 0;
2187
+ };
2188
+ const tabKey = generateNewKey();
2189
+ studioOps.appendToSlot({
2190
+ type: "component",
2191
+ name: "AntdTabPane",
2192
+ props: {
2193
+ key: tabKey
2194
+ }
2195
+ }, "children");
2196
+ studioOps.updateProps({ activeKey: tabKey });
2197
+ }
2198
+ },
2199
+ {
2200
+ type: "button-action",
2201
+ label: "Delete current tab",
2202
+ onClick: ({ componentProps, studioOps }) => {
2203
+ if (componentProps.activeKey) {
2204
+ const tabPanes = [];
2205
+ traverseReactEltTree(componentProps.children, (elt) => {
2206
+ if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2207
+ tabPanes.push(elt.key);
2208
+ }
2209
+ });
2210
+ const activeKey = componentProps.activeKey;
2211
+ const currTabPos = tabPanes.findIndex((tabKey) => {
2212
+ return tabKey === activeKey;
2213
+ });
2214
+ if (currTabPos !== -1) {
2215
+ studioOps.removeFromSlotAt(currTabPos, "children");
2216
+ if (tabPanes.length - 1 > 0) {
2217
+ const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
2218
+ studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
2219
+ }
2220
+ }
2221
+ }
2222
+ }
2223
+ },
2224
+ {
2225
+ type: "custom-action",
2226
+ control: OutlineMessage
2227
+ }
2228
+ ],
2229
+ importPath: "@plasmicpkgs/antd/skinny/registerTabs",
2230
+ importName: "Tabs"
2231
+ };
2232
+ function registerTabs(loader, customTabsMeta) {
2233
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
2234
+ doRegisterComponent(Tabs, customTabsMeta != null ? customTabsMeta : tabsMeta);
2235
+ }
2236
+
2237
+ function registerAll(loader) {
2238
+ registerButton(loader);
2239
+ registerSlider(loader);
2240
+ registerSwitch(loader);
2241
+ registerOption(loader);
2242
+ registerOptGroup(loader);
2243
+ registerSelect(loader);
2244
+ registerCollapsePanel(loader);
2245
+ registerCollapse(loader);
2246
+ registerCheckbox(loader);
2247
+ registerCheckboxGroup(loader);
2248
+ registerMenuDivider(loader);
2249
+ registerMenuItem(loader);
2250
+ registerMenuItemGroup(loader);
2251
+ registerSubMenu(loader);
2252
+ registerMenu(loader);
2253
+ registerDropdown(loader);
2254
+ registerDropdownButton(loader);
2255
+ registerCarousel(loader);
2256
+ registerInput(loader);
2257
+ registerInputTextArea(loader);
2258
+ registerInputSearch(loader);
2259
+ registerInputPassword(loader);
2260
+ registerInputGroup(loader);
2261
+ registerTabPane(loader);
2262
+ registerTable(loader);
2263
+ registerTableColumn(loader);
2264
+ registerTableValue(loader);
2265
+ registerTabs(loader);
2266
+ registerRate(loader);
2267
+ }
2268
+
2269
+ exports.Collapse = Collapse;
2270
+ exports.Dropdown = Dropdown;
2271
+ exports.Slider = Slider;
2272
+ exports.TabPane = TabPane;
2273
+ exports.Tabs = Tabs;
2274
+ exports.buttonMeta = buttonMeta;
2275
+ exports.carouselMeta = carouselMeta;
2276
+ exports.checkboxGroupMeta = checkboxGroupMeta;
2277
+ exports.checkboxMeta = checkboxMeta;
2278
+ exports.collapsteMeta = collapsteMeta;
2279
+ exports.collapstePanelMeta = collapstePanelMeta;
2280
+ exports.dropdownButtonMeta = dropdownButtonMeta;
2281
+ exports.dropdownMeta = dropdownMeta;
2282
+ exports.inputGroupMeta = inputGroupMeta;
2283
+ exports.inputMeta = inputMeta;
2284
+ exports.inputPasswordMeta = inputPasswordMeta;
2285
+ exports.inputSearchMeta = inputSearchMeta;
2286
+ exports.inputTextAreaMeta = inputTextAreaMeta;
2287
+ exports.menuDividerMeta = menuDividerMeta;
2288
+ exports.menuItemGroupMeta = menuItemGroupMeta;
2289
+ exports.menuItemMeta = menuItemMeta;
2290
+ exports.menuMeta = menuMeta;
2291
+ exports.optGroupMeta = optGroupMeta;
2292
+ exports.optionMeta = optionMeta;
2293
+ exports.rateMeta = rateMeta;
2294
+ exports.registerAll = registerAll;
2295
+ exports.registerButton = registerButton;
2296
+ exports.registerCarousel = registerCarousel;
2297
+ exports.registerCheckbox = registerCheckbox;
2298
+ exports.registerCheckboxGroup = registerCheckboxGroup;
2299
+ exports.registerCollapse = registerCollapse;
2300
+ exports.registerCollapsePanel = registerCollapsePanel;
2301
+ exports.registerDropdown = registerDropdown;
2302
+ exports.registerDropdownButton = registerDropdownButton;
2303
+ exports.registerInput = registerInput;
2304
+ exports.registerInputGroup = registerInputGroup;
2305
+ exports.registerInputPassword = registerInputPassword;
2306
+ exports.registerInputSearch = registerInputSearch;
2307
+ exports.registerInputTextArea = registerInputTextArea;
2308
+ exports.registerMenu = registerMenu;
2309
+ exports.registerMenuDivider = registerMenuDivider;
2310
+ exports.registerMenuItem = registerMenuItem;
2311
+ exports.registerMenuItemGroup = registerMenuItemGroup;
2312
+ exports.registerOptGroup = registerOptGroup;
2313
+ exports.registerOption = registerOption;
2314
+ exports.registerRate = registerRate;
2315
+ exports.registerSelect = registerSelect;
2316
+ exports.registerSlider = registerSlider;
2317
+ exports.registerSubMenu = registerSubMenu;
2318
+ exports.registerSwitch = registerSwitch;
2319
+ exports.registerTabPane = registerTabPane;
2320
+ exports.registerTabs = registerTabs;
2321
+ exports.selectMeta = selectMeta;
2322
+ exports.sliderMeta = sliderMeta;
2323
+ exports.subMenuMeta = subMenuMeta;
2324
+ exports.switchMeta = switchMeta;
2325
+ exports.tabPaneMeta = tabPaneMeta;
2326
+ exports.tabsMeta = tabsMeta;
2327
+ //# sourceMappingURL=index.js.map