@plasmicpkgs/antd 0.0.6 → 0.0.10
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.cjs.development.js +201 -10
- package/dist/antd.cjs.development.js.map +1 -1
- package/dist/antd.cjs.production.min.js +1 -1
- package/dist/antd.cjs.production.min.js.map +1 -1
- package/dist/antd.esm.js +198 -12
- package/dist/antd.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/registerTabs.d.ts +13 -0
- package/package.json +5 -4
|
@@ -23,6 +23,7 @@ var MenuItem = _interopDefault(require('antd/lib/menu/MenuItem'));
|
|
|
23
23
|
var SubMenu = _interopDefault(require('antd/lib/menu/SubMenu'));
|
|
24
24
|
var rcMenu = require('rc-menu');
|
|
25
25
|
var rcSelect = require('rc-select');
|
|
26
|
+
var rcTabs = require('rc-tabs');
|
|
26
27
|
|
|
27
28
|
var buttonMeta = {
|
|
28
29
|
name: "AntdButton",
|
|
@@ -268,6 +269,7 @@ var checkboxGroupMeta = {
|
|
|
268
269
|
},
|
|
269
270
|
importPath: "antd/lib/checkbox/Group",
|
|
270
271
|
importName: "CheckboxGroup",
|
|
272
|
+
parentComponentName: "AntdCheckbox",
|
|
271
273
|
isDefaultExport: true
|
|
272
274
|
};
|
|
273
275
|
function registerCheckboxGroup(loader, customCheckboxGroupMeta) {
|
|
@@ -374,6 +376,7 @@ var collapstePanelMeta = {
|
|
|
374
376
|
},
|
|
375
377
|
importPath: "antd/lib/collapse/CollapsePanel",
|
|
376
378
|
importName: "CollapsePanel",
|
|
379
|
+
parentComponentName: "AntdCollapse",
|
|
377
380
|
isDefaultExport: true
|
|
378
381
|
};
|
|
379
382
|
function registerCollapsePanel(loader, customCollapsePanelMeta) {
|
|
@@ -573,6 +576,7 @@ var dropdownButtonMeta = {
|
|
|
573
576
|
},
|
|
574
577
|
importPath: "antd/lib/dropdown/dropdown-button",
|
|
575
578
|
importName: "DropdownButton",
|
|
579
|
+
parentComponentName: "AntdDropdown",
|
|
576
580
|
isDefaultExport: true
|
|
577
581
|
};
|
|
578
582
|
function registerDropdownButton(loader, customDropdownButtonMeta) {
|
|
@@ -696,7 +700,8 @@ var inputTextAreaMeta = {
|
|
|
696
700
|
},
|
|
697
701
|
importPath: "antd/lib/input/TextArea",
|
|
698
702
|
importName: "TextArea",
|
|
699
|
-
isDefaultExport: true
|
|
703
|
+
isDefaultExport: true,
|
|
704
|
+
parentComponentName: "AntdInput"
|
|
700
705
|
};
|
|
701
706
|
function registerInputTextArea(loader, customInputTextAreaMeta) {
|
|
702
707
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -770,7 +775,8 @@ var inputSearchMeta = {
|
|
|
770
775
|
},
|
|
771
776
|
importPath: "antd/lib/input/Search",
|
|
772
777
|
importName: "Search",
|
|
773
|
-
isDefaultExport: true
|
|
778
|
+
isDefaultExport: true,
|
|
779
|
+
parentComponentName: "AntdInput"
|
|
774
780
|
};
|
|
775
781
|
function registerInputSearch(loader, customInputSearchMeta) {
|
|
776
782
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -840,7 +846,8 @@ var inputPasswordMeta = {
|
|
|
840
846
|
},
|
|
841
847
|
importPath: "antd/lib/input/Password",
|
|
842
848
|
importName: "Password",
|
|
843
|
-
isDefaultExport: true
|
|
849
|
+
isDefaultExport: true,
|
|
850
|
+
parentComponentName: "AntdInput"
|
|
844
851
|
};
|
|
845
852
|
function registerInputPassword(loader, customInputPasswordMeta) {
|
|
846
853
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -875,7 +882,8 @@ var inputGroupMeta = {
|
|
|
875
882
|
},
|
|
876
883
|
importPath: "antd/lib/input/Group",
|
|
877
884
|
importName: "InputGroup",
|
|
878
|
-
isDefaultExport: true
|
|
885
|
+
isDefaultExport: true,
|
|
886
|
+
parentComponentName: "AntdInput"
|
|
879
887
|
};
|
|
880
888
|
function registerInputGroup(loader, customInputGroupMeta) {
|
|
881
889
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -896,7 +904,8 @@ var menuDividerMeta = {
|
|
|
896
904
|
},
|
|
897
905
|
importPath: "antd/lib/menu/MenuDivider",
|
|
898
906
|
importName: "MenuDivider",
|
|
899
|
-
isDefaultExport: true
|
|
907
|
+
isDefaultExport: true,
|
|
908
|
+
parentComponentName: "AntdMenu"
|
|
900
909
|
};
|
|
901
910
|
function registerMenuDivider(loader, customMenuDividerMeta) {
|
|
902
911
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -936,7 +945,8 @@ var menuItemMeta = {
|
|
|
936
945
|
},
|
|
937
946
|
importPath: "antd/lib/menu/MenuItem",
|
|
938
947
|
importName: "MenuItem",
|
|
939
|
-
isDefaultExport: true
|
|
948
|
+
isDefaultExport: true,
|
|
949
|
+
parentComponentName: "AntdMenu"
|
|
940
950
|
};
|
|
941
951
|
function registerMenuItem(loader, customMenuItemMeta) {
|
|
942
952
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -966,7 +976,8 @@ var menuItemGroupMeta = {
|
|
|
966
976
|
}
|
|
967
977
|
},
|
|
968
978
|
importPath: "rc-menu",
|
|
969
|
-
importName: "ItemGroup"
|
|
979
|
+
importName: "ItemGroup",
|
|
980
|
+
parentComponentName: "AntdMenu"
|
|
970
981
|
};
|
|
971
982
|
function registerMenuItemGroup(loader, customMenuItemGroupMeta) {
|
|
972
983
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -1009,7 +1020,8 @@ var subMenuMeta = {
|
|
|
1009
1020
|
},
|
|
1010
1021
|
importPath: "antd/lib/menu/SubMenu",
|
|
1011
1022
|
importName: "SubMenu",
|
|
1012
|
-
isDefaultExport: true
|
|
1023
|
+
isDefaultExport: true,
|
|
1024
|
+
parentComponentName: "AntdMenu"
|
|
1013
1025
|
};
|
|
1014
1026
|
function registerSubMenu(loader, customSubMenuMeta) {
|
|
1015
1027
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -1154,7 +1166,8 @@ var optionMeta = {
|
|
|
1154
1166
|
}
|
|
1155
1167
|
},
|
|
1156
1168
|
importPath: "rc-select",
|
|
1157
|
-
importName: "Option"
|
|
1169
|
+
importName: "Option",
|
|
1170
|
+
parentComponentName: "AntdSelect"
|
|
1158
1171
|
};
|
|
1159
1172
|
function registerOption(loader, customOptionMeta) {
|
|
1160
1173
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -1185,7 +1198,8 @@ var optGroupMeta = {
|
|
|
1185
1198
|
}
|
|
1186
1199
|
},
|
|
1187
1200
|
importPath: "rc-select",
|
|
1188
|
-
importName: "OptGroup"
|
|
1201
|
+
importName: "OptGroup",
|
|
1202
|
+
parentComponentName: "AntdSelect"
|
|
1189
1203
|
};
|
|
1190
1204
|
function registerOptGroup(loader, customOptGroupMeta) {
|
|
1191
1205
|
var doRegisterComponent = function doRegisterComponent() {
|
|
@@ -1451,6 +1465,176 @@ function registerSwitch(loader, customSwitchMeta) {
|
|
|
1451
1465
|
doRegisterComponent(antd.Switch, customSwitchMeta != null ? customSwitchMeta : switchMeta);
|
|
1452
1466
|
}
|
|
1453
1467
|
|
|
1468
|
+
var tabPaneMeta = {
|
|
1469
|
+
name: "AntdTabPane",
|
|
1470
|
+
displayName: "Antd Tab Pane",
|
|
1471
|
+
props: {
|
|
1472
|
+
tab: {
|
|
1473
|
+
type: "slot",
|
|
1474
|
+
defaultValue: [{
|
|
1475
|
+
type: "text",
|
|
1476
|
+
value: "Tab"
|
|
1477
|
+
}]
|
|
1478
|
+
},
|
|
1479
|
+
key: {
|
|
1480
|
+
type: "string",
|
|
1481
|
+
description: "Unique TabPane's key",
|
|
1482
|
+
defaultValue: "tabPaneKey"
|
|
1483
|
+
},
|
|
1484
|
+
closable: {
|
|
1485
|
+
type: "boolean",
|
|
1486
|
+
description: "Wether the tab can be closed or not. Only works for editable tabs",
|
|
1487
|
+
defaultValueHint: true
|
|
1488
|
+
},
|
|
1489
|
+
closeIcon: {
|
|
1490
|
+
type: "slot",
|
|
1491
|
+
hidePlaceholder: true
|
|
1492
|
+
},
|
|
1493
|
+
children: {
|
|
1494
|
+
type: "slot",
|
|
1495
|
+
defaultValue: [{
|
|
1496
|
+
type: "text",
|
|
1497
|
+
value: "Tab Content"
|
|
1498
|
+
}]
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
parentComponentName: "AntdTabs",
|
|
1502
|
+
importPath: "rc-tabs",
|
|
1503
|
+
importName: "TabPane"
|
|
1504
|
+
};
|
|
1505
|
+
function registerTabPane(loader, customTabPaneMeta) {
|
|
1506
|
+
var doRegisterComponent = function doRegisterComponent() {
|
|
1507
|
+
return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
doRegisterComponent(rcTabs.TabPane, customTabPaneMeta != null ? customTabPaneMeta : tabPaneMeta);
|
|
1511
|
+
}
|
|
1512
|
+
function Tabs(props) {
|
|
1513
|
+
var leftTabBarExtraContent = props.leftTabBarExtraContent,
|
|
1514
|
+
rightTabBarExtraContent = props.rightTabBarExtraContent,
|
|
1515
|
+
otherProps = _objectWithoutPropertiesLoose(props, ["leftTabBarExtraContent", "rightTabBarExtraContent"]);
|
|
1516
|
+
|
|
1517
|
+
return React.createElement(antd.Tabs, Object.assign({}, otherProps, {
|
|
1518
|
+
tabBarExtraContent: {
|
|
1519
|
+
left: leftTabBarExtraContent,
|
|
1520
|
+
right: rightTabBarExtraContent
|
|
1521
|
+
}
|
|
1522
|
+
}));
|
|
1523
|
+
}
|
|
1524
|
+
var tabsMeta = {
|
|
1525
|
+
name: "AntdTabs",
|
|
1526
|
+
displayName: "Antd Tabs",
|
|
1527
|
+
props: {
|
|
1528
|
+
type: {
|
|
1529
|
+
type: "choice",
|
|
1530
|
+
options: ["line", "card", "editable-card"],
|
|
1531
|
+
defaultValueHint: "line",
|
|
1532
|
+
description: "Basic style of tabs"
|
|
1533
|
+
},
|
|
1534
|
+
addIcon: {
|
|
1535
|
+
type: "slot",
|
|
1536
|
+
hidePlaceholder: true
|
|
1537
|
+
},
|
|
1538
|
+
animated: {
|
|
1539
|
+
type: "object",
|
|
1540
|
+
hidden: function hidden(props) {
|
|
1541
|
+
return props.tabPosition !== "top" && !!props.tabPosition;
|
|
1542
|
+
},
|
|
1543
|
+
defaultValueHint: {
|
|
1544
|
+
inkBar: true,
|
|
1545
|
+
tabPane: false
|
|
1546
|
+
},
|
|
1547
|
+
description: "Whether to change tabs with animation. Can be either a boolean or specify for inkBar and tabPane"
|
|
1548
|
+
},
|
|
1549
|
+
hideAdd: {
|
|
1550
|
+
type: "boolean",
|
|
1551
|
+
hidden: function hidden(props) {
|
|
1552
|
+
return props.type !== "editable-card";
|
|
1553
|
+
},
|
|
1554
|
+
defaultValueHint: false,
|
|
1555
|
+
description: "Hide plus icon or not"
|
|
1556
|
+
},
|
|
1557
|
+
moreIcon: {
|
|
1558
|
+
type: "slot",
|
|
1559
|
+
hidePlaceholder: true
|
|
1560
|
+
},
|
|
1561
|
+
size: {
|
|
1562
|
+
type: "choice",
|
|
1563
|
+
options: ["large", "default", "small"],
|
|
1564
|
+
defaultValueHint: "default",
|
|
1565
|
+
description: "Preset tab bar size"
|
|
1566
|
+
},
|
|
1567
|
+
tabPosition: {
|
|
1568
|
+
type: "choice",
|
|
1569
|
+
options: ["top", "right", "bottom", "left"],
|
|
1570
|
+
defaultValueHint: "top",
|
|
1571
|
+
description: "Position of tabs"
|
|
1572
|
+
},
|
|
1573
|
+
tabBarGutter: {
|
|
1574
|
+
type: "number",
|
|
1575
|
+
description: "The gap between tabs"
|
|
1576
|
+
},
|
|
1577
|
+
centered: {
|
|
1578
|
+
type: "boolean",
|
|
1579
|
+
description: "Centers tabs",
|
|
1580
|
+
defaultValueHint: false
|
|
1581
|
+
},
|
|
1582
|
+
leftTabBarExtraContent: {
|
|
1583
|
+
type: "slot",
|
|
1584
|
+
hidePlaceholder: true
|
|
1585
|
+
},
|
|
1586
|
+
rightTabBarExtraContent: {
|
|
1587
|
+
type: "slot",
|
|
1588
|
+
hidePlaceholder: true
|
|
1589
|
+
},
|
|
1590
|
+
tabBarStyle: {
|
|
1591
|
+
type: "object",
|
|
1592
|
+
description: "CSS for the Tab Bar style"
|
|
1593
|
+
},
|
|
1594
|
+
activeKey: {
|
|
1595
|
+
type: "choice",
|
|
1596
|
+
editOnly: true,
|
|
1597
|
+
uncontrolledProp: "defaultActiveKey",
|
|
1598
|
+
description: "Initial active TabPane's key",
|
|
1599
|
+
options: function options(props) {
|
|
1600
|
+
var options = new Set();
|
|
1601
|
+
traverseReactEltTree(props.children, function (elt) {
|
|
1602
|
+
if ((elt == null ? void 0 : elt.type) === rcTabs.TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
|
|
1603
|
+
options.add(elt.key);
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
1606
|
+
return Array.from(options.keys());
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
children: {
|
|
1610
|
+
type: "slot",
|
|
1611
|
+
allowedComponents: ["AntdTabPane"],
|
|
1612
|
+
defaultValue: [{
|
|
1613
|
+
type: "component",
|
|
1614
|
+
name: "AntdTabPane",
|
|
1615
|
+
props: {
|
|
1616
|
+
key: "1"
|
|
1617
|
+
}
|
|
1618
|
+
}, {
|
|
1619
|
+
type: "component",
|
|
1620
|
+
name: "AntdTabPane",
|
|
1621
|
+
props: {
|
|
1622
|
+
key: "2"
|
|
1623
|
+
}
|
|
1624
|
+
}]
|
|
1625
|
+
}
|
|
1626
|
+
},
|
|
1627
|
+
importPath: "@plasmicpkgs/antd",
|
|
1628
|
+
importName: "Tabs"
|
|
1629
|
+
};
|
|
1630
|
+
function registerTabs(loader, customTabsMeta) {
|
|
1631
|
+
var doRegisterComponent = function doRegisterComponent() {
|
|
1632
|
+
return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
|
|
1633
|
+
};
|
|
1634
|
+
|
|
1635
|
+
doRegisterComponent(Tabs, customTabsMeta != null ? customTabsMeta : tabsMeta);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1454
1638
|
function registerAll(loader) {
|
|
1455
1639
|
registerButton(loader);
|
|
1456
1640
|
registerSlider(loader);
|
|
@@ -1475,10 +1659,13 @@ function registerAll(loader) {
|
|
|
1475
1659
|
registerInputSearch(loader);
|
|
1476
1660
|
registerInputPassword(loader);
|
|
1477
1661
|
registerInputGroup(loader);
|
|
1662
|
+
registerTabPane(loader);
|
|
1663
|
+
registerTabs(loader);
|
|
1478
1664
|
}
|
|
1479
1665
|
|
|
1480
1666
|
exports.Dropdown = Dropdown;
|
|
1481
1667
|
exports.Slider = Slider;
|
|
1668
|
+
exports.Tabs = Tabs;
|
|
1482
1669
|
exports.buttonMeta = buttonMeta;
|
|
1483
1670
|
exports.carouselMeta = carouselMeta;
|
|
1484
1671
|
exports.checkboxGroupMeta = checkboxGroupMeta;
|
|
@@ -1522,8 +1709,12 @@ exports.registerSelect = registerSelect;
|
|
|
1522
1709
|
exports.registerSlider = registerSlider;
|
|
1523
1710
|
exports.registerSubMenu = registerSubMenu;
|
|
1524
1711
|
exports.registerSwitch = registerSwitch;
|
|
1712
|
+
exports.registerTabPane = registerTabPane;
|
|
1713
|
+
exports.registerTabs = registerTabs;
|
|
1525
1714
|
exports.selectMeta = selectMeta;
|
|
1526
1715
|
exports.sliderMeta = sliderMeta;
|
|
1527
1716
|
exports.subMenuMeta = subMenuMeta;
|
|
1528
1717
|
exports.switchMeta = switchMeta;
|
|
1718
|
+
exports.tabPaneMeta = tabPaneMeta;
|
|
1719
|
+
exports.tabsMeta = tabsMeta;
|
|
1529
1720
|
//# sourceMappingURL=antd.cjs.development.js.map
|