@plasmicpkgs/antd5 0.0.53 → 0.0.55

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 (40) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/antd.esm.js +257 -121
  3. package/dist/antd.esm.js.map +1 -1
  4. package/dist/index.js +257 -121
  5. package/dist/index.js.map +1 -1
  6. package/dist/registerForm.d.ts +9 -1
  7. package/package.json +2 -2
  8. package/skinny/registerButton.cjs.js +1 -1
  9. package/skinny/registerButton.esm.js +1 -1
  10. package/skinny/registerCheckbox.cjs.js +1 -1
  11. package/skinny/registerCheckbox.esm.js +1 -1
  12. package/skinny/registerConfigProvider.cjs.js +1 -1
  13. package/skinny/registerConfigProvider.esm.js +1 -1
  14. package/skinny/registerDropdown.cjs.js +1 -1
  15. package/skinny/registerDropdown.esm.js +1 -1
  16. package/skinny/registerForm.cjs.js +234 -103
  17. package/skinny/registerForm.cjs.js.map +1 -1
  18. package/skinny/registerForm.d.ts +9 -1
  19. package/skinny/registerForm.esm.js +234 -103
  20. package/skinny/registerForm.esm.js.map +1 -1
  21. package/skinny/registerInput.cjs.js +1 -1
  22. package/skinny/registerInput.esm.js +1 -1
  23. package/skinny/registerMenu.cjs.js +1 -1
  24. package/skinny/registerMenu.esm.js +1 -1
  25. package/skinny/registerModal.cjs.js +1 -1
  26. package/skinny/registerModal.esm.js +1 -1
  27. package/skinny/registerRadio.cjs.js +25 -8
  28. package/skinny/registerRadio.cjs.js.map +1 -1
  29. package/skinny/registerRadio.esm.js +25 -8
  30. package/skinny/registerRadio.esm.js.map +1 -1
  31. package/skinny/registerSelect.cjs.js +1 -1
  32. package/skinny/registerSelect.esm.js +1 -1
  33. package/skinny/registerTable.cjs.js +1 -1
  34. package/skinny/registerTable.esm.js +1 -1
  35. package/skinny/registerUpload.cjs.js +1 -1
  36. package/skinny/registerUpload.esm.js +1 -1
  37. package/skinny/{utils-dff55ae0.cjs.js → utils-2d964db8.cjs.js} +1 -14
  38. package/skinny/{utils-dff55ae0.cjs.js.map → utils-2d964db8.cjs.js.map} +1 -1
  39. package/skinny/{utils-94b1c934.esm.js → utils-d0e80a56.esm.js} +2 -14
  40. package/skinny/{utils-94b1c934.esm.js.map → utils-d0e80a56.esm.js.map} +1 -1
package/dist/antd.esm.js CHANGED
@@ -51,18 +51,6 @@ function asArray(x) {
51
51
  return [x];
52
52
  }
53
53
  }
54
- function omit(obj, ...keys) {
55
- if (Object.keys(obj).length === 0) {
56
- return obj;
57
- }
58
- const res = {};
59
- for (const key of Object.keys(obj)) {
60
- if (!keys.includes(key)) {
61
- res[key] = obj[key];
62
- }
63
- }
64
- return res;
65
- }
66
54
  function usePrevious(value) {
67
55
  const prevValue = React.useRef(void 0);
68
56
  React.useEffect(() => {
@@ -1148,8 +1136,9 @@ const FormItem = Form.Item;
1148
1136
  const FormList = Form.List;
1149
1137
  const PathContext = React.createContext({ relativePath: [], fullPath: [] });
1150
1138
  const InternalFormInstanceContext = React.createContext(void 0);
1139
+ const FormLayoutContext = React.createContext(void 0);
1151
1140
  const Internal = (props) => {
1152
- var _b, _c;
1141
+ var _b, _c, _d;
1153
1142
  const [form] = Form.useForm();
1154
1143
  const values = form.getFieldsValue(true);
1155
1144
  const lastValue = React.useRef(values);
@@ -1165,15 +1154,26 @@ const Internal = (props) => {
1165
1154
  React.useEffect(() => {
1166
1155
  fireOnValuesChange();
1167
1156
  }, []);
1157
+ const formLayout = React.useMemo(
1158
+ () => {
1159
+ var _a2;
1160
+ return {
1161
+ layout: props.layout,
1162
+ labelSpan: (_a2 = props.labelCol) == null ? void 0 : _a2.span
1163
+ };
1164
+ },
1165
+ [props.layout, (_b = props.labelCol) == null ? void 0 : _b.span]
1166
+ );
1168
1167
  return /* @__PURE__ */ React.createElement(
1169
1168
  InternalFormInstanceContext.Provider,
1170
1169
  {
1171
1170
  value: {
1171
+ layout: formLayout,
1172
1172
  fireOnValuesChange,
1173
1173
  forceRemount: () => setRemountKey((k) => k + 1)
1174
1174
  }
1175
1175
  },
1176
- /* @__PURE__ */ React.createElement(
1176
+ /* @__PURE__ */ React.createElement(FormLayoutContext.Provider, { value: formLayout }, /* @__PURE__ */ React.createElement(
1177
1177
  Form,
1178
1178
  __spreadProps$5(__spreadValues$6({}, rest), {
1179
1179
  key: props.initialValues ? JSON.stringify(props.initialValues) : void 0,
@@ -1183,16 +1183,16 @@ const Internal = (props) => {
1183
1183
  extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(args[1]);
1184
1184
  },
1185
1185
  form,
1186
- labelCol: ((_b = props.labelCol) == null ? void 0 : _b.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.labelCol,
1187
- wrapperCol: ((_c = props.wrapperCol) == null ? void 0 : _c.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.wrapperCol
1186
+ labelCol: ((_c = props.labelCol) == null ? void 0 : _c.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.labelCol,
1187
+ wrapperCol: ((_d = props.wrapperCol) == null ? void 0 : _d.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.wrapperCol
1188
1188
  }),
1189
1189
  /* @__PURE__ */ React.createElement("style", null, `
1190
- .ant-form-item-explain + div, .ant-form-item-margin-offset {
1191
- display: none;
1192
- }
1193
- `),
1190
+ .ant-form-item-explain + div, .ant-form-item-margin-offset {
1191
+ display: none;
1192
+ }
1193
+ `),
1194
1194
  childrenNode
1195
- )
1195
+ ))
1196
1196
  );
1197
1197
  };
1198
1198
  function FormWrapper(props) {
@@ -1246,40 +1246,41 @@ const COMMON_ACTIONS = [
1246
1246
  // },
1247
1247
  // },
1248
1248
  ];
1249
- function registerForm(loader) {
1250
- const colProp = (displayName, defaultValue) => ({
1251
- type: "object",
1252
- displayName,
1253
- advanced: true,
1254
- fields: {
1255
- span: {
1256
- type: "number",
1257
- displayName: "Grid columns",
1258
- description: "The number of grid columns to span (24 columns available)",
1259
- min: 1,
1260
- max: 24
1261
- },
1262
- offset: {
1263
- type: "number",
1264
- displayName: "Offset columns",
1265
- description: "Number of grid columns to skip from the left",
1266
- min: 0,
1267
- max: 23
1268
- },
1269
- horizontalOnly: {
1270
- type: "boolean",
1271
- displayName: "Horizontal only",
1272
- description: "Only apply to horizontal layout"
1273
- }
1249
+ const colProp = (displayName, defaultValue, description) => ({
1250
+ type: "object",
1251
+ displayName,
1252
+ advanced: true,
1253
+ fields: {
1254
+ span: {
1255
+ type: "number",
1256
+ displayName: "Width",
1257
+ description: "The number of grid columns to span in width (out of 24 columns total)",
1258
+ min: 1,
1259
+ max: 24
1274
1260
  },
1275
- defaultValue
1276
- });
1261
+ offset: {
1262
+ type: "number",
1263
+ displayName: "Offset",
1264
+ description: "Number of grid columns to skip from the left (out of 24 columns total)",
1265
+ min: 0,
1266
+ max: 23
1267
+ },
1268
+ horizontalOnly: {
1269
+ type: "boolean",
1270
+ displayName: "Horizontal only",
1271
+ description: "Only apply to horizontal layout"
1272
+ }
1273
+ },
1274
+ description,
1275
+ defaultValue
1276
+ });
1277
+ function registerForm(loader) {
1277
1278
  registerComponentHelper(loader, FormWrapper, {
1278
1279
  name: "plasmic-antd5-form",
1279
1280
  displayName: "Form",
1280
1281
  defaultStyles: {
1281
- display: "plasmic-content-layout",
1282
- gridRowGap: "10px"
1282
+ layout: "vbox",
1283
+ alignItems: "flex-start"
1283
1284
  },
1284
1285
  props: {
1285
1286
  children: {
@@ -1317,13 +1318,21 @@ function registerForm(loader) {
1317
1318
  },
1318
1319
  {
1319
1320
  type: "component",
1320
- name: "plasmic-antd5-button",
1321
+ name: "plasmic-antd5-form-item",
1321
1322
  props: {
1323
+ noLabel: true,
1322
1324
  children: {
1323
- type: "text",
1324
- value: "Submit"
1325
- },
1326
- submitsForm: true
1325
+ type: "component",
1326
+ name: "plasmic-antd5-button",
1327
+ props: {
1328
+ children: {
1329
+ type: "text",
1330
+ value: "Submit"
1331
+ },
1332
+ type: "primary",
1333
+ submitsForm: true
1334
+ }
1335
+ }
1327
1336
  }
1328
1337
  }
1329
1338
  ]
@@ -1340,16 +1349,25 @@ function registerForm(loader) {
1340
1349
  type: "choice",
1341
1350
  options: ["left", "right"],
1342
1351
  defaultValueHint: "right",
1343
- advanced: true
1352
+ advanced: true,
1353
+ hidden: (ps) => ps.layout !== "horizontal"
1344
1354
  },
1345
- labelCol: colProp("Label layout", {
1346
- span: 8,
1347
- horizontalOnly: true
1348
- }),
1349
- wrapperCol: colProp("Field layout", {
1350
- span: 16,
1351
- horizontalOnly: true
1352
- }),
1355
+ labelCol: colProp(
1356
+ "Label layout",
1357
+ {
1358
+ span: 8,
1359
+ horizontalOnly: true
1360
+ },
1361
+ "Set the width and offset of the labels"
1362
+ ),
1363
+ wrapperCol: colProp(
1364
+ "Control layout",
1365
+ {
1366
+ span: 16,
1367
+ horizontalOnly: true
1368
+ },
1369
+ "Set the width and offset of the form controls"
1370
+ ),
1353
1371
  colon: {
1354
1372
  type: "boolean",
1355
1373
  description: `Show a colon after labels by default (only for horizontal layout)`,
@@ -1437,6 +1455,7 @@ function registerForm(loader) {
1437
1455
  }
1438
1456
  function plasmicRulesToAntdRules(plasmicRules, label) {
1439
1457
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
1458
+ const effectiveLabel = label || "This field";
1440
1459
  const rules = [];
1441
1460
  for (const plasmicRule of plasmicRules) {
1442
1461
  switch (plasmicRule.ruleType) {
@@ -1444,37 +1463,37 @@ function plasmicRulesToAntdRules(plasmicRules, label) {
1444
1463
  rules.push({
1445
1464
  type: "enum",
1446
1465
  enum: (_b = (_a = plasmicRule.options) == null ? void 0 : _a.map((opt) => opt.value)) != null ? _b : [],
1447
- message: (_c = plasmicRule.message) != null ? _c : `Please specify a valid value`
1466
+ message: (_c = plasmicRule.message) != null ? _c : `${effectiveLabel} must be a valid value`
1448
1467
  });
1449
1468
  break;
1450
1469
  case "required":
1451
1470
  rules.push({
1452
1471
  required: true,
1453
- message: (_d = plasmicRule.message) != null ? _d : `Please specify ${label || "this field"}`
1472
+ message: (_d = plasmicRule.message) != null ? _d : `${effectiveLabel} is required`
1454
1473
  });
1455
1474
  break;
1456
1475
  case "regex":
1457
1476
  rules.push({
1458
1477
  pattern: new RegExp((_e = plasmicRule.pattern) != null ? _e : ""),
1459
- message: (_f = plasmicRule.message) != null ? _f : `Please enter a valid value`
1478
+ message: (_f = plasmicRule.message) != null ? _f : `${effectiveLabel} must be a valid value`
1460
1479
  });
1461
1480
  break;
1462
1481
  case "whitespace":
1463
1482
  rules.push({
1464
1483
  whitespace: true,
1465
- message: (_g = plasmicRule.message) != null ? _g : `Please specify ${label || "this field"}`
1484
+ message: (_g = plasmicRule.message) != null ? _g : `${effectiveLabel} is required`
1466
1485
  });
1467
1486
  break;
1468
1487
  case "min":
1469
1488
  rules.push({
1470
1489
  [plasmicRule.ruleType]: plasmicRule.length,
1471
- message: (_h = plasmicRule.message) != null ? _h : `Must be at least ${plasmicRule.length} characters`
1490
+ message: (_h = plasmicRule.message) != null ? _h : `${effectiveLabel} must be at least ${plasmicRule.length} characters`
1472
1491
  });
1473
1492
  break;
1474
1493
  case "max":
1475
1494
  rules.push({
1476
1495
  [plasmicRule.ruleType]: plasmicRule.length,
1477
- message: (_i = plasmicRule.message) != null ? _i : `Must be at most ${plasmicRule.length} characters`
1496
+ message: (_i = plasmicRule.message) != null ? _i : `${effectiveLabel} must be at most ${plasmicRule.length} characters`
1478
1497
  });
1479
1498
  break;
1480
1499
  case "advanced":
@@ -1501,14 +1520,34 @@ function useFormInstanceMaybe() {
1501
1520
  return Form.useFormInstance();
1502
1521
  }
1503
1522
  function FormItemWrapper(props) {
1504
- var _a, _b;
1505
- const relativeFormItemName = useFormItemRelativeName(props.name);
1506
- const fullFormItemName = useFormItemFullName(props.name);
1507
- const bestEffortLabel = !props.noLabel && reactNodeToString(props.label) || ensureArray(props.name).slice(-1)[0];
1508
- const rules = props.rules ? plasmicRulesToAntdRules(
1509
- props.rules,
1523
+ var _b;
1524
+ const _a = props, {
1525
+ rules: plasmicRules,
1526
+ description,
1527
+ noLabel,
1528
+ name,
1529
+ hideValidationMessage,
1530
+ customizeProps,
1531
+ setControlContextData,
1532
+ alignLabellessWithControls = true
1533
+ } = _a, rest = __objRest$5(_a, [
1534
+ "rules",
1535
+ "description",
1536
+ "noLabel",
1537
+ "name",
1538
+ "hideValidationMessage",
1539
+ "customizeProps",
1540
+ "setControlContextData",
1541
+ "alignLabellessWithControls"
1542
+ ]);
1543
+ const relativeFormItemName = useFormItemRelativeName(name);
1544
+ const fullFormItemName = useFormItemFullName(name);
1545
+ const bestEffortLabel = !noLabel && reactNodeToString(props.label) || ensureArray(props.name).slice(-1)[0];
1546
+ const rules = plasmicRules ? plasmicRulesToAntdRules(
1547
+ plasmicRules,
1510
1548
  typeof bestEffortLabel === "number" ? "" + bestEffortLabel : bestEffortLabel
1511
1549
  ) : void 0;
1550
+ const layoutContext = React.useContext(FormLayoutContext);
1512
1551
  const inCanvas = !!usePlasmicCanvasContext();
1513
1552
  if (inCanvas) {
1514
1553
  const form = useFormInstanceMaybe();
@@ -1518,7 +1557,7 @@ function FormItemWrapper(props) {
1518
1557
  });
1519
1558
  const internalFormCtx = React.useContext(InternalFormInstanceContext);
1520
1559
  const { fireOnValuesChange, forceRemount } = internalFormCtx != null ? internalFormCtx : {};
1521
- (_a = props.setControlContextData) == null ? void 0 : _a.call(props, {
1560
+ (_b = props.setControlContextData) == null ? void 0 : _b.call(props, {
1522
1561
  internalFormCtx
1523
1562
  });
1524
1563
  React.useEffect(() => {
@@ -1535,14 +1574,15 @@ function FormItemWrapper(props) {
1535
1574
  }
1536
1575
  return /* @__PURE__ */ React.createElement(
1537
1576
  FormItem,
1538
- __spreadValues$6(__spreadProps$5(__spreadValues$6({}, omit(props, "rules")), {
1539
- label: props.noLabel ? void 0 : props.label,
1577
+ __spreadProps$5(__spreadValues$6({}, rest), {
1578
+ label: noLabel ? void 0 : props.label,
1540
1579
  name: relativeFormItemName,
1541
- rules
1542
- }), props.helpTextMode === "extra" ? { extra: props.help } : props.helpTextMode === "help" ? (
1543
- // Never show validation errors in this mode, even if user didn't specify help
1544
- { help: (_b = props.help) != null ? _b : "" }
1545
- ) : {}),
1580
+ rules,
1581
+ extra: description,
1582
+ help: hideValidationMessage ? "" : props.help,
1583
+ colon: noLabel ? false : void 0,
1584
+ wrapperCol: (layoutContext == null ? void 0 : layoutContext.layout) === "horizontal" && noLabel && alignLabellessWithControls && layoutContext.labelSpan ? { offset: layoutContext.labelSpan } : void 0
1585
+ }),
1546
1586
  props.customizeProps ? /* @__PURE__ */ React.createElement(FormItemForwarder, { formItemProps: props }) : props.children
1547
1587
  );
1548
1588
  }
@@ -1572,13 +1612,18 @@ function registerFormItem(loader) {
1572
1612
  name: "plasmic-antd5-form-item",
1573
1613
  displayName: "Form Item",
1574
1614
  parentComponentName: "plasmic-antd5-form",
1615
+ defaultStyles: {
1616
+ marginBottom: "24px",
1617
+ width: "stretch"
1618
+ },
1575
1619
  props: {
1576
1620
  label: {
1577
1621
  type: "slot",
1578
1622
  defaultValue: {
1579
1623
  type: "text",
1580
1624
  value: "Label"
1581
- }
1625
+ },
1626
+ hidden: (ps) => !!ps.noLabel
1582
1627
  },
1583
1628
  children: {
1584
1629
  type: "slot",
@@ -1596,10 +1641,26 @@ function registerFormItem(loader) {
1596
1641
  rules: {
1597
1642
  type: "formValidationRules"
1598
1643
  },
1644
+ valuePropName: {
1645
+ type: "string",
1646
+ advanced: true,
1647
+ defaultValueHint: "value",
1648
+ description: "The prop name for specifying the value of the form control component"
1649
+ },
1599
1650
  noLabel: {
1600
1651
  type: "boolean",
1601
1652
  advanced: true
1602
1653
  },
1654
+ alignLabellessWithControls: {
1655
+ type: "boolean",
1656
+ displayName: "Align with controls?",
1657
+ description: "Aligns the content with form controls in the grid",
1658
+ hidden: (ps, ctx) => {
1659
+ var _a;
1660
+ return !ps.noLabel || ((_a = ctx == null ? void 0 : ctx.internalFormCtx) == null ? void 0 : _a.layout.layout) !== "horizontal";
1661
+ },
1662
+ defaultValueHint: true
1663
+ },
1603
1664
  colon: {
1604
1665
  type: "boolean",
1605
1666
  defaultValueHint: true,
@@ -1609,7 +1670,11 @@ function registerFormItem(loader) {
1609
1670
  labelAlign: {
1610
1671
  type: "choice",
1611
1672
  options: ["left", "right"],
1612
- advanced: true
1673
+ advanced: true,
1674
+ hidden: (ps, ctx) => {
1675
+ var _a;
1676
+ return !!ps.noLabel || ((_a = ctx == null ? void 0 : ctx.internalFormCtx) == null ? void 0 : _a.layout.layout) !== "horizontal";
1677
+ }
1613
1678
  },
1614
1679
  hidden: {
1615
1680
  type: "boolean",
@@ -1633,34 +1698,16 @@ function registerFormItem(loader) {
1633
1698
  displayName: "Dependencies",
1634
1699
  description: "Form items can depend on other form items. This forces it to reevaluate the validation rules when the other form item changes."
1635
1700
  },
1636
- helpTextMode: {
1637
- type: "choice",
1638
- displayName: "Help text",
1639
- options: [
1640
- {
1641
- value: "errors",
1642
- label: "Validation errors"
1643
- },
1644
- {
1645
- value: "extra",
1646
- label: "Custom help text and validation errors"
1647
- },
1648
- {
1649
- value: "help",
1650
- label: "Custom help text, no validation errors"
1651
- }
1652
- ],
1653
- defaultValueHint: "Show validation errors",
1654
- description: "What to show in the help text. Edit help text by editing the 'help' slot in the outline."
1701
+ hideValidationMessage: {
1702
+ type: "boolean",
1703
+ displayName: "Hide validation message?",
1704
+ description: "If true, will hide the validation error message",
1705
+ defaultValueHint: false,
1706
+ advanced: true
1655
1707
  },
1656
- help: {
1708
+ description: {
1657
1709
  type: "slot",
1658
- hidden: (ps) => {
1659
- var _a;
1660
- return !["extra", "help"].includes((_a = ps.helpTextMode) != null ? _a : "");
1661
- },
1662
1710
  hidePlaceholder: true
1663
- // advanced: true,
1664
1711
  },
1665
1712
  customizeProps: {
1666
1713
  type: "function",
@@ -1678,13 +1725,85 @@ function registerFormItem(loader) {
1678
1725
  },
1679
1726
  noStyle: {
1680
1727
  type: "boolean",
1681
- displayName: "Field only",
1682
- description: "Don't render anything but the wrapped field component - so no label, help text, validation error, etc.",
1728
+ displayName: "Field control only",
1729
+ description: "Don't render anything but the field control - so no label, help text, validation error, etc.",
1683
1730
  advanced: true
1684
1731
  }
1685
1732
  },
1686
1733
  importPath: "@plasmicpkgs/antd5/skinny/registerForm",
1687
- importName: "FormItemWrapper"
1734
+ importName: "FormItemWrapper",
1735
+ templates: {
1736
+ Text: {
1737
+ props: {
1738
+ children: {
1739
+ type: "component",
1740
+ name: "plasmic-antd5-input"
1741
+ }
1742
+ }
1743
+ },
1744
+ "Long Text": {
1745
+ props: {
1746
+ children: {
1747
+ type: "component",
1748
+ name: "plasmic-antd5-textarea"
1749
+ }
1750
+ }
1751
+ },
1752
+ "Select dropdown": {
1753
+ props: {
1754
+ children: {
1755
+ type: "component",
1756
+ name: "plasmic-antd5-select"
1757
+ }
1758
+ }
1759
+ },
1760
+ Number: {
1761
+ props: {
1762
+ children: {
1763
+ type: "component",
1764
+ name: "plasmic-antd5-input-number"
1765
+ }
1766
+ }
1767
+ },
1768
+ Checkbox: {
1769
+ props: {
1770
+ children: {
1771
+ type: "component",
1772
+ name: "plasmic-antd5-checkbox"
1773
+ },
1774
+ valuePropName: "checked",
1775
+ noLabel: true
1776
+ }
1777
+ },
1778
+ Radios: {
1779
+ props: {
1780
+ children: {
1781
+ type: "component",
1782
+ name: "plasmic-antd5-radio-group"
1783
+ }
1784
+ }
1785
+ },
1786
+ Password: {
1787
+ props: {
1788
+ children: {
1789
+ type: "component",
1790
+ name: "plasmic-antd5-input-password"
1791
+ }
1792
+ }
1793
+ },
1794
+ "Submit button": {
1795
+ props: {
1796
+ children: {
1797
+ type: "component",
1798
+ name: "plasmic-antd5-button",
1799
+ props: {
1800
+ type: "primary"
1801
+ }
1802
+ },
1803
+ noLabel: true
1804
+ }
1805
+ }
1806
+ }
1688
1807
  });
1689
1808
  }
1690
1809
  function FormGroup(props) {
@@ -2646,14 +2765,31 @@ function registerRadio(loader) {
2646
2765
  allowedComponents: [
2647
2766
  "plasmic-antd5-radio",
2648
2767
  "plasmic-antd5-radio-button"
2768
+ ],
2769
+ defaultValue: [
2770
+ {
2771
+ type: "component",
2772
+ name: "plasmic-antd5-radio",
2773
+ props: {
2774
+ value: "op1",
2775
+ children: {
2776
+ type: "text",
2777
+ value: "Option 1"
2778
+ }
2779
+ }
2780
+ },
2781
+ {
2782
+ type: "component",
2783
+ name: "plasmic-antd5-radio",
2784
+ props: {
2785
+ value: "op2",
2786
+ children: {
2787
+ type: "text",
2788
+ value: "Option 2"
2789
+ }
2790
+ }
2791
+ }
2649
2792
  ]
2650
- // Error right now when using default slot content with stateful instances
2651
- // defaultValue: [
2652
- // {
2653
- // type: "component",
2654
- // name: "plasmic-antd5-radio",
2655
- // },
2656
- // ],
2657
2793
  },
2658
2794
  onChange: {
2659
2795
  type: "eventHandler",