@plasmicpkgs/antd 2.0.32 → 2.0.34

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.
package/dist/antd.esm.js CHANGED
@@ -207,6 +207,17 @@ class CheckboxWrapper extends React.Component {
207
207
  return /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$6({}, this.props));
208
208
  }
209
209
  }
210
+ const checkboxHelpers = {
211
+ helpers: {
212
+ states: {
213
+ value: {
214
+ onChangeArgsToValue: (e) => e.target.checked
215
+ }
216
+ }
217
+ },
218
+ importName: "checkboxHelpers",
219
+ importPath: "@plasmicpkgs/plasmic-antd/registerCheckbox"
220
+ };
210
221
  const checkboxMeta = {
211
222
  name: "AntdCheckbox",
212
223
  displayName: "Antd Checkbox",
@@ -218,8 +229,6 @@ const checkboxMeta = {
218
229
  },
219
230
  checked: {
220
231
  type: "boolean",
221
- editOnly: true,
222
- uncontrolledProp: "defaultChecked",
223
232
  description: "Specifies the initial state: whether or not the checkbox is selected",
224
233
  defaultValueHint: false
225
234
  },
@@ -245,8 +254,26 @@ const checkboxMeta = {
245
254
  value: "Checkbox"
246
255
  }
247
256
  ]
257
+ },
258
+ onChange: {
259
+ type: "eventHandler",
260
+ argTypes: [
261
+ {
262
+ name: "event",
263
+ type: "object"
264
+ }
265
+ ]
248
266
  }
249
267
  },
268
+ states: {
269
+ value: {
270
+ type: "writable",
271
+ variableType: "boolean",
272
+ onChangeProp: "onChange",
273
+ valueProp: "checked"
274
+ }
275
+ },
276
+ componentHelpers: checkboxHelpers,
250
277
  importPath: "antd/lib/checkbox/Checkbox",
251
278
  importName: "Checkbox",
252
279
  defaultStyles: {
@@ -682,6 +709,17 @@ const commonHtmlAttributes = {
682
709
  description: "The HTML name of the input"
683
710
  }
684
711
  };
712
+ const inputHelpers = {
713
+ helpers: {
714
+ states: {
715
+ value: {
716
+ onChangeArgsToValue: (e) => e.target.value
717
+ }
718
+ }
719
+ },
720
+ importName: "inputHelpers",
721
+ importPath: "@plasmicpkgs/plasmic-antd/registerInput"
722
+ };
685
723
  const inputMeta = {
686
724
  name: "AntdInput",
687
725
  displayName: "Antd Input",
@@ -741,11 +779,27 @@ const inputMeta = {
741
779
  defaultValueHint: "text"
742
780
  },
743
781
  value: {
744
- type: "string",
745
- editOnly: true,
746
- uncontrolledProp: "defaultValue"
782
+ type: "string"
783
+ },
784
+ onChange: {
785
+ type: "eventHandler",
786
+ argTypes: [
787
+ {
788
+ name: "event",
789
+ type: "object"
790
+ }
791
+ ]
747
792
  }
748
793
  })),
794
+ states: {
795
+ value: {
796
+ type: "writable",
797
+ variableType: "text",
798
+ onChangeProp: "onChange",
799
+ valueProp: "value"
800
+ }
801
+ },
802
+ componentHelpers: inputHelpers,
749
803
  importPath: "antd/lib/input",
750
804
  importName: "Input",
751
805
  isDefaultExport: true
@@ -795,11 +849,27 @@ const inputTextAreaMeta = {
795
849
  description: "Placeholder for the input"
796
850
  },
797
851
  value: {
798
- type: "string",
799
- editOnly: true,
800
- uncontrolledProp: "defaultValue"
852
+ type: "string"
853
+ },
854
+ onChange: {
855
+ type: "eventHandler",
856
+ argTypes: [
857
+ {
858
+ name: "event",
859
+ type: "object"
860
+ }
861
+ ]
801
862
  }
802
863
  })),
864
+ states: {
865
+ value: {
866
+ type: "writable",
867
+ variableType: "text",
868
+ onChangeProp: "onChange",
869
+ valueProp: "value"
870
+ }
871
+ },
872
+ componentHelpers: inputHelpers,
803
873
  importPath: "antd/lib/input/TextArea",
804
874
  importName: "TextArea",
805
875
  isDefaultExport: true,
@@ -872,11 +942,27 @@ const inputSearchMeta = {
872
942
  description: "The type of input"
873
943
  },
874
944
  value: {
875
- type: "string",
876
- editOnly: true,
877
- uncontrolledProp: "defaultValue"
945
+ type: "string"
946
+ },
947
+ onChange: {
948
+ type: "eventHandler",
949
+ argTypes: [
950
+ {
951
+ name: "event",
952
+ type: "object"
953
+ }
954
+ ]
878
955
  }
879
956
  })),
957
+ states: {
958
+ value: {
959
+ type: "writable",
960
+ variableType: "text",
961
+ onChangeProp: "onChange",
962
+ valueProp: "value"
963
+ }
964
+ },
965
+ componentHelpers: inputHelpers,
880
966
  importPath: "antd/lib/input/Search",
881
967
  importName: "Search",
882
968
  isDefaultExport: true,
@@ -940,16 +1026,32 @@ const inputPasswordMeta = {
940
1026
  description: "The type of input"
941
1027
  },
942
1028
  value: {
943
- type: "string",
944
- editOnly: true,
945
- uncontrolledProp: "defaultValue"
1029
+ type: "string"
946
1030
  },
947
1031
  visibilityToggle: {
948
1032
  type: "boolean",
949
1033
  description: "Whether show toggle button",
950
1034
  defaultValueHint: true
1035
+ },
1036
+ onChange: {
1037
+ type: "eventHandler",
1038
+ argTypes: [
1039
+ {
1040
+ name: "event",
1041
+ type: "object"
1042
+ }
1043
+ ]
951
1044
  }
952
1045
  })),
1046
+ states: {
1047
+ value: {
1048
+ type: "writable",
1049
+ variableType: "text",
1050
+ onChangeProp: "onChange",
1051
+ valueProp: "value"
1052
+ }
1053
+ },
1054
+ componentHelpers: inputHelpers,
953
1055
  importPath: "antd/lib/input/Password",
954
1056
  importName: "Password",
955
1057
  isDefaultExport: true,
@@ -1469,8 +1571,6 @@ const selectMeta = {
1469
1571
  },
1470
1572
  value: {
1471
1573
  type: "choice",
1472
- editOnly: true,
1473
- uncontrolledProp: "defaultValue",
1474
1574
  description: "Initial selected option",
1475
1575
  options: (componentProps) => {
1476
1576
  const options = /* @__PURE__ */ new Set();
@@ -1504,6 +1604,27 @@ const selectMeta = {
1504
1604
  }
1505
1605
  }
1506
1606
  ]
1607
+ },
1608
+ onChange: {
1609
+ type: "eventHandler",
1610
+ argTypes: [
1611
+ {
1612
+ name: "value",
1613
+ type: "string"
1614
+ },
1615
+ {
1616
+ name: "option",
1617
+ type: "object"
1618
+ }
1619
+ ]
1620
+ }
1621
+ },
1622
+ states: {
1623
+ value: {
1624
+ type: "writable",
1625
+ variableType: "text",
1626
+ onChangeProp: "onChange",
1627
+ valueProp: "value"
1507
1628
  }
1508
1629
  },
1509
1630
  importPath: "antd/lib/select",
@@ -1654,8 +1775,6 @@ const switchMeta = {
1654
1775
  },
1655
1776
  checked: {
1656
1777
  type: "boolean",
1657
- editOnly: true,
1658
- uncontrolledProp: "defaultChecked",
1659
1778
  description: "Whether to set the initial state",
1660
1779
  defaultValueHint: false
1661
1780
  },
@@ -1684,6 +1803,27 @@ const switchMeta = {
1684
1803
  options: ["small", "default"],
1685
1804
  description: "The size of the Switch",
1686
1805
  defaultValueHint: "default"
1806
+ },
1807
+ onChange: {
1808
+ type: "eventHandler",
1809
+ argTypes: [
1810
+ {
1811
+ name: "checked",
1812
+ type: "boolean"
1813
+ },
1814
+ {
1815
+ name: "event",
1816
+ type: "object"
1817
+ }
1818
+ ]
1819
+ }
1820
+ },
1821
+ states: {
1822
+ value: {
1823
+ type: "writable",
1824
+ variableType: "boolean",
1825
+ onChangeProp: "onChange",
1826
+ valueProp: "checked"
1687
1827
  }
1688
1828
  },
1689
1829
  importPath: "antd/lib/switch",
@@ -2264,5 +2404,5 @@ function registerAll(loader) {
2264
2404
  registerRate(loader);
2265
2405
  }
2266
2406
 
2267
- export { Collapse, Dropdown, Slider, TabPane, Tabs, buttonMeta, carouselMeta, checkboxGroupMeta, checkboxMeta, collapsteMeta, collapstePanelMeta, dropdownButtonMeta, dropdownMeta, inputGroupMeta, inputMeta, inputPasswordMeta, inputSearchMeta, inputTextAreaMeta, menuDividerMeta, menuItemGroupMeta, menuItemMeta, menuMeta, optGroupMeta, optionMeta, rateMeta, registerAll, registerButton, registerCarousel, registerCheckbox, registerCheckboxGroup, registerCollapse, registerCollapsePanel, registerDropdown, registerDropdownButton, registerInput, registerInputGroup, registerInputPassword, registerInputSearch, registerInputTextArea, registerMenu, registerMenuDivider, registerMenuItem, registerMenuItemGroup, registerOptGroup, registerOption, registerRate, registerSelect, registerSlider, registerSubMenu, registerSwitch, registerTabPane, registerTabs, selectMeta, sliderMeta, subMenuMeta, switchMeta, tabPaneMeta, tabsMeta };
2407
+ export { Collapse, Dropdown, Slider, TabPane, Tabs, buttonMeta, carouselMeta, checkboxGroupMeta, checkboxHelpers, checkboxMeta, collapsteMeta, collapstePanelMeta, dropdownButtonMeta, dropdownMeta, inputGroupMeta, inputHelpers, inputMeta, inputPasswordMeta, inputSearchMeta, inputTextAreaMeta, menuDividerMeta, menuItemGroupMeta, menuItemMeta, menuMeta, optGroupMeta, optionMeta, rateMeta, registerAll, registerButton, registerCarousel, registerCheckbox, registerCheckboxGroup, registerCollapse, registerCollapsePanel, registerDropdown, registerDropdownButton, registerInput, registerInputGroup, registerInputPassword, registerInputSearch, registerInputTextArea, registerMenu, registerMenuDivider, registerMenuItem, registerMenuItemGroup, registerOptGroup, registerOption, registerRate, registerSelect, registerSlider, registerSubMenu, registerSwitch, registerTabPane, registerTabs, selectMeta, sliderMeta, subMenuMeta, switchMeta, tabPaneMeta, tabsMeta };
2268
2408
  //# sourceMappingURL=antd.esm.js.map
package/dist/index.js CHANGED
@@ -237,6 +237,17 @@ class CheckboxWrapper extends React__default.default.Component {
237
237
  return /* @__PURE__ */ React__default.default.createElement(Checkbox__default.default, __spreadValues$6({}, this.props));
238
238
  }
239
239
  }
240
+ const checkboxHelpers = {
241
+ helpers: {
242
+ states: {
243
+ value: {
244
+ onChangeArgsToValue: (e) => e.target.checked
245
+ }
246
+ }
247
+ },
248
+ importName: "checkboxHelpers",
249
+ importPath: "@plasmicpkgs/plasmic-antd/registerCheckbox"
250
+ };
240
251
  const checkboxMeta = {
241
252
  name: "AntdCheckbox",
242
253
  displayName: "Antd Checkbox",
@@ -248,8 +259,6 @@ const checkboxMeta = {
248
259
  },
249
260
  checked: {
250
261
  type: "boolean",
251
- editOnly: true,
252
- uncontrolledProp: "defaultChecked",
253
262
  description: "Specifies the initial state: whether or not the checkbox is selected",
254
263
  defaultValueHint: false
255
264
  },
@@ -275,8 +284,26 @@ const checkboxMeta = {
275
284
  value: "Checkbox"
276
285
  }
277
286
  ]
287
+ },
288
+ onChange: {
289
+ type: "eventHandler",
290
+ argTypes: [
291
+ {
292
+ name: "event",
293
+ type: "object"
294
+ }
295
+ ]
278
296
  }
279
297
  },
298
+ states: {
299
+ value: {
300
+ type: "writable",
301
+ variableType: "boolean",
302
+ onChangeProp: "onChange",
303
+ valueProp: "checked"
304
+ }
305
+ },
306
+ componentHelpers: checkboxHelpers,
280
307
  importPath: "antd/lib/checkbox/Checkbox",
281
308
  importName: "Checkbox",
282
309
  defaultStyles: {
@@ -712,6 +739,17 @@ const commonHtmlAttributes = {
712
739
  description: "The HTML name of the input"
713
740
  }
714
741
  };
742
+ const inputHelpers = {
743
+ helpers: {
744
+ states: {
745
+ value: {
746
+ onChangeArgsToValue: (e) => e.target.value
747
+ }
748
+ }
749
+ },
750
+ importName: "inputHelpers",
751
+ importPath: "@plasmicpkgs/plasmic-antd/registerInput"
752
+ };
715
753
  const inputMeta = {
716
754
  name: "AntdInput",
717
755
  displayName: "Antd Input",
@@ -771,11 +809,27 @@ const inputMeta = {
771
809
  defaultValueHint: "text"
772
810
  },
773
811
  value: {
774
- type: "string",
775
- editOnly: true,
776
- uncontrolledProp: "defaultValue"
812
+ type: "string"
813
+ },
814
+ onChange: {
815
+ type: "eventHandler",
816
+ argTypes: [
817
+ {
818
+ name: "event",
819
+ type: "object"
820
+ }
821
+ ]
777
822
  }
778
823
  })),
824
+ states: {
825
+ value: {
826
+ type: "writable",
827
+ variableType: "text",
828
+ onChangeProp: "onChange",
829
+ valueProp: "value"
830
+ }
831
+ },
832
+ componentHelpers: inputHelpers,
779
833
  importPath: "antd/lib/input",
780
834
  importName: "Input",
781
835
  isDefaultExport: true
@@ -825,11 +879,27 @@ const inputTextAreaMeta = {
825
879
  description: "Placeholder for the input"
826
880
  },
827
881
  value: {
828
- type: "string",
829
- editOnly: true,
830
- uncontrolledProp: "defaultValue"
882
+ type: "string"
883
+ },
884
+ onChange: {
885
+ type: "eventHandler",
886
+ argTypes: [
887
+ {
888
+ name: "event",
889
+ type: "object"
890
+ }
891
+ ]
831
892
  }
832
893
  })),
894
+ states: {
895
+ value: {
896
+ type: "writable",
897
+ variableType: "text",
898
+ onChangeProp: "onChange",
899
+ valueProp: "value"
900
+ }
901
+ },
902
+ componentHelpers: inputHelpers,
833
903
  importPath: "antd/lib/input/TextArea",
834
904
  importName: "TextArea",
835
905
  isDefaultExport: true,
@@ -902,11 +972,27 @@ const inputSearchMeta = {
902
972
  description: "The type of input"
903
973
  },
904
974
  value: {
905
- type: "string",
906
- editOnly: true,
907
- uncontrolledProp: "defaultValue"
975
+ type: "string"
976
+ },
977
+ onChange: {
978
+ type: "eventHandler",
979
+ argTypes: [
980
+ {
981
+ name: "event",
982
+ type: "object"
983
+ }
984
+ ]
908
985
  }
909
986
  })),
987
+ states: {
988
+ value: {
989
+ type: "writable",
990
+ variableType: "text",
991
+ onChangeProp: "onChange",
992
+ valueProp: "value"
993
+ }
994
+ },
995
+ componentHelpers: inputHelpers,
910
996
  importPath: "antd/lib/input/Search",
911
997
  importName: "Search",
912
998
  isDefaultExport: true,
@@ -970,16 +1056,32 @@ const inputPasswordMeta = {
970
1056
  description: "The type of input"
971
1057
  },
972
1058
  value: {
973
- type: "string",
974
- editOnly: true,
975
- uncontrolledProp: "defaultValue"
1059
+ type: "string"
976
1060
  },
977
1061
  visibilityToggle: {
978
1062
  type: "boolean",
979
1063
  description: "Whether show toggle button",
980
1064
  defaultValueHint: true
1065
+ },
1066
+ onChange: {
1067
+ type: "eventHandler",
1068
+ argTypes: [
1069
+ {
1070
+ name: "event",
1071
+ type: "object"
1072
+ }
1073
+ ]
981
1074
  }
982
1075
  })),
1076
+ states: {
1077
+ value: {
1078
+ type: "writable",
1079
+ variableType: "text",
1080
+ onChangeProp: "onChange",
1081
+ valueProp: "value"
1082
+ }
1083
+ },
1084
+ componentHelpers: inputHelpers,
983
1085
  importPath: "antd/lib/input/Password",
984
1086
  importName: "Password",
985
1087
  isDefaultExport: true,
@@ -1499,8 +1601,6 @@ const selectMeta = {
1499
1601
  },
1500
1602
  value: {
1501
1603
  type: "choice",
1502
- editOnly: true,
1503
- uncontrolledProp: "defaultValue",
1504
1604
  description: "Initial selected option",
1505
1605
  options: (componentProps) => {
1506
1606
  const options = /* @__PURE__ */ new Set();
@@ -1534,6 +1634,27 @@ const selectMeta = {
1534
1634
  }
1535
1635
  }
1536
1636
  ]
1637
+ },
1638
+ onChange: {
1639
+ type: "eventHandler",
1640
+ argTypes: [
1641
+ {
1642
+ name: "value",
1643
+ type: "string"
1644
+ },
1645
+ {
1646
+ name: "option",
1647
+ type: "object"
1648
+ }
1649
+ ]
1650
+ }
1651
+ },
1652
+ states: {
1653
+ value: {
1654
+ type: "writable",
1655
+ variableType: "text",
1656
+ onChangeProp: "onChange",
1657
+ valueProp: "value"
1537
1658
  }
1538
1659
  },
1539
1660
  importPath: "antd/lib/select",
@@ -1684,8 +1805,6 @@ const switchMeta = {
1684
1805
  },
1685
1806
  checked: {
1686
1807
  type: "boolean",
1687
- editOnly: true,
1688
- uncontrolledProp: "defaultChecked",
1689
1808
  description: "Whether to set the initial state",
1690
1809
  defaultValueHint: false
1691
1810
  },
@@ -1714,6 +1833,27 @@ const switchMeta = {
1714
1833
  options: ["small", "default"],
1715
1834
  description: "The size of the Switch",
1716
1835
  defaultValueHint: "default"
1836
+ },
1837
+ onChange: {
1838
+ type: "eventHandler",
1839
+ argTypes: [
1840
+ {
1841
+ name: "checked",
1842
+ type: "boolean"
1843
+ },
1844
+ {
1845
+ name: "event",
1846
+ type: "object"
1847
+ }
1848
+ ]
1849
+ }
1850
+ },
1851
+ states: {
1852
+ value: {
1853
+ type: "writable",
1854
+ variableType: "boolean",
1855
+ onChangeProp: "onChange",
1856
+ valueProp: "checked"
1717
1857
  }
1718
1858
  },
1719
1859
  importPath: "antd/lib/switch",
@@ -2302,12 +2442,14 @@ exports.Tabs = Tabs;
2302
2442
  exports.buttonMeta = buttonMeta;
2303
2443
  exports.carouselMeta = carouselMeta;
2304
2444
  exports.checkboxGroupMeta = checkboxGroupMeta;
2445
+ exports.checkboxHelpers = checkboxHelpers;
2305
2446
  exports.checkboxMeta = checkboxMeta;
2306
2447
  exports.collapsteMeta = collapsteMeta;
2307
2448
  exports.collapstePanelMeta = collapstePanelMeta;
2308
2449
  exports.dropdownButtonMeta = dropdownButtonMeta;
2309
2450
  exports.dropdownMeta = dropdownMeta;
2310
2451
  exports.inputGroupMeta = inputGroupMeta;
2452
+ exports.inputHelpers = inputHelpers;
2311
2453
  exports.inputMeta = inputMeta;
2312
2454
  exports.inputPasswordMeta = inputPasswordMeta;
2313
2455
  exports.inputSearchMeta = inputSearchMeta;