@plasmicpkgs/antd 0.0.7 → 0.0.11
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 +188 -0
- 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 +185 -2
- 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",
|
|
@@ -1464,6 +1465,186 @@ function registerSwitch(loader, customSwitchMeta) {
|
|
|
1464
1465
|
doRegisterComponent(antd.Switch, customSwitchMeta != null ? customSwitchMeta : switchMeta);
|
|
1465
1466
|
}
|
|
1466
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
|
+
disabled: {
|
|
1490
|
+
type: "boolean",
|
|
1491
|
+
description: "Disabled state of tab",
|
|
1492
|
+
defaultValueHint: false
|
|
1493
|
+
},
|
|
1494
|
+
forceRender: {
|
|
1495
|
+
type: "boolean",
|
|
1496
|
+
description: "Forced render of content in tabs, not lazy render after clicking on tabs",
|
|
1497
|
+
defaultValueHint: false
|
|
1498
|
+
},
|
|
1499
|
+
closeIcon: {
|
|
1500
|
+
type: "slot",
|
|
1501
|
+
hidePlaceholder: true
|
|
1502
|
+
},
|
|
1503
|
+
children: {
|
|
1504
|
+
type: "slot",
|
|
1505
|
+
defaultValue: [{
|
|
1506
|
+
type: "text",
|
|
1507
|
+
value: "Tab Content"
|
|
1508
|
+
}]
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
parentComponentName: "AntdTabs",
|
|
1512
|
+
importPath: "rc-tabs",
|
|
1513
|
+
importName: "TabPane"
|
|
1514
|
+
};
|
|
1515
|
+
function registerTabPane(loader, customTabPaneMeta) {
|
|
1516
|
+
var doRegisterComponent = function doRegisterComponent() {
|
|
1517
|
+
return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
|
|
1518
|
+
};
|
|
1519
|
+
|
|
1520
|
+
doRegisterComponent(rcTabs.TabPane, customTabPaneMeta != null ? customTabPaneMeta : tabPaneMeta);
|
|
1521
|
+
}
|
|
1522
|
+
function Tabs(props) {
|
|
1523
|
+
var leftTabBarExtraContent = props.leftTabBarExtraContent,
|
|
1524
|
+
rightTabBarExtraContent = props.rightTabBarExtraContent,
|
|
1525
|
+
otherProps = _objectWithoutPropertiesLoose(props, ["leftTabBarExtraContent", "rightTabBarExtraContent"]);
|
|
1526
|
+
|
|
1527
|
+
return React.createElement(antd.Tabs, Object.assign({}, otherProps, {
|
|
1528
|
+
tabBarExtraContent: {
|
|
1529
|
+
left: leftTabBarExtraContent,
|
|
1530
|
+
right: rightTabBarExtraContent
|
|
1531
|
+
}
|
|
1532
|
+
}));
|
|
1533
|
+
}
|
|
1534
|
+
var tabsMeta = {
|
|
1535
|
+
name: "AntdTabs",
|
|
1536
|
+
displayName: "Antd Tabs",
|
|
1537
|
+
props: {
|
|
1538
|
+
type: {
|
|
1539
|
+
type: "choice",
|
|
1540
|
+
options: ["line", "card", "editable-card"],
|
|
1541
|
+
defaultValueHint: "line",
|
|
1542
|
+
description: "Basic style of tabs"
|
|
1543
|
+
},
|
|
1544
|
+
addIcon: {
|
|
1545
|
+
type: "slot",
|
|
1546
|
+
hidePlaceholder: true
|
|
1547
|
+
},
|
|
1548
|
+
animated: {
|
|
1549
|
+
type: "object",
|
|
1550
|
+
hidden: function hidden(props) {
|
|
1551
|
+
return props.tabPosition !== "top" && !!props.tabPosition;
|
|
1552
|
+
},
|
|
1553
|
+
defaultValueHint: {
|
|
1554
|
+
inkBar: true,
|
|
1555
|
+
tabPane: false
|
|
1556
|
+
},
|
|
1557
|
+
description: "Whether to change tabs with animation. Can be either a boolean or specify for inkBar and tabPane"
|
|
1558
|
+
},
|
|
1559
|
+
hideAdd: {
|
|
1560
|
+
type: "boolean",
|
|
1561
|
+
hidden: function hidden(props) {
|
|
1562
|
+
return props.type !== "editable-card";
|
|
1563
|
+
},
|
|
1564
|
+
defaultValueHint: false,
|
|
1565
|
+
description: "Hide plus icon or not"
|
|
1566
|
+
},
|
|
1567
|
+
moreIcon: {
|
|
1568
|
+
type: "slot",
|
|
1569
|
+
hidePlaceholder: true
|
|
1570
|
+
},
|
|
1571
|
+
size: {
|
|
1572
|
+
type: "choice",
|
|
1573
|
+
options: ["large", "default", "small"],
|
|
1574
|
+
defaultValueHint: "default",
|
|
1575
|
+
description: "Preset tab bar size"
|
|
1576
|
+
},
|
|
1577
|
+
tabPosition: {
|
|
1578
|
+
type: "choice",
|
|
1579
|
+
options: ["top", "right", "bottom", "left"],
|
|
1580
|
+
defaultValueHint: "top",
|
|
1581
|
+
description: "Position of tabs"
|
|
1582
|
+
},
|
|
1583
|
+
tabBarGutter: {
|
|
1584
|
+
type: "number",
|
|
1585
|
+
description: "The gap between tabs"
|
|
1586
|
+
},
|
|
1587
|
+
centered: {
|
|
1588
|
+
type: "boolean",
|
|
1589
|
+
description: "Centers tabs",
|
|
1590
|
+
defaultValueHint: false
|
|
1591
|
+
},
|
|
1592
|
+
leftTabBarExtraContent: {
|
|
1593
|
+
type: "slot",
|
|
1594
|
+
hidePlaceholder: true
|
|
1595
|
+
},
|
|
1596
|
+
rightTabBarExtraContent: {
|
|
1597
|
+
type: "slot",
|
|
1598
|
+
hidePlaceholder: true
|
|
1599
|
+
},
|
|
1600
|
+
tabBarStyle: {
|
|
1601
|
+
type: "object",
|
|
1602
|
+
description: "CSS for the Tab Bar style"
|
|
1603
|
+
},
|
|
1604
|
+
activeKey: {
|
|
1605
|
+
type: "choice",
|
|
1606
|
+
editOnly: true,
|
|
1607
|
+
uncontrolledProp: "defaultActiveKey",
|
|
1608
|
+
description: "Initial active TabPane's key",
|
|
1609
|
+
options: function options(props) {
|
|
1610
|
+
var options = new Set();
|
|
1611
|
+
traverseReactEltTree(props.children, function (elt) {
|
|
1612
|
+
if ((elt == null ? void 0 : elt.type) === rcTabs.TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
|
|
1613
|
+
options.add(elt.key);
|
|
1614
|
+
}
|
|
1615
|
+
});
|
|
1616
|
+
return Array.from(options.keys());
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
children: {
|
|
1620
|
+
type: "slot",
|
|
1621
|
+
allowedComponents: ["AntdTabPane"],
|
|
1622
|
+
defaultValue: [{
|
|
1623
|
+
type: "component",
|
|
1624
|
+
name: "AntdTabPane",
|
|
1625
|
+
props: {
|
|
1626
|
+
key: "1"
|
|
1627
|
+
}
|
|
1628
|
+
}, {
|
|
1629
|
+
type: "component",
|
|
1630
|
+
name: "AntdTabPane",
|
|
1631
|
+
props: {
|
|
1632
|
+
key: "2"
|
|
1633
|
+
}
|
|
1634
|
+
}]
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
importPath: "@plasmicpkgs/antd",
|
|
1638
|
+
importName: "Tabs"
|
|
1639
|
+
};
|
|
1640
|
+
function registerTabs(loader, customTabsMeta) {
|
|
1641
|
+
var doRegisterComponent = function doRegisterComponent() {
|
|
1642
|
+
return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
|
|
1643
|
+
};
|
|
1644
|
+
|
|
1645
|
+
doRegisterComponent(Tabs, customTabsMeta != null ? customTabsMeta : tabsMeta);
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1467
1648
|
function registerAll(loader) {
|
|
1468
1649
|
registerButton(loader);
|
|
1469
1650
|
registerSlider(loader);
|
|
@@ -1488,10 +1669,13 @@ function registerAll(loader) {
|
|
|
1488
1669
|
registerInputSearch(loader);
|
|
1489
1670
|
registerInputPassword(loader);
|
|
1490
1671
|
registerInputGroup(loader);
|
|
1672
|
+
registerTabPane(loader);
|
|
1673
|
+
registerTabs(loader);
|
|
1491
1674
|
}
|
|
1492
1675
|
|
|
1493
1676
|
exports.Dropdown = Dropdown;
|
|
1494
1677
|
exports.Slider = Slider;
|
|
1678
|
+
exports.Tabs = Tabs;
|
|
1495
1679
|
exports.buttonMeta = buttonMeta;
|
|
1496
1680
|
exports.carouselMeta = carouselMeta;
|
|
1497
1681
|
exports.checkboxGroupMeta = checkboxGroupMeta;
|
|
@@ -1535,8 +1719,12 @@ exports.registerSelect = registerSelect;
|
|
|
1535
1719
|
exports.registerSlider = registerSlider;
|
|
1536
1720
|
exports.registerSubMenu = registerSubMenu;
|
|
1537
1721
|
exports.registerSwitch = registerSwitch;
|
|
1722
|
+
exports.registerTabPane = registerTabPane;
|
|
1723
|
+
exports.registerTabs = registerTabs;
|
|
1538
1724
|
exports.selectMeta = selectMeta;
|
|
1539
1725
|
exports.sliderMeta = sliderMeta;
|
|
1540
1726
|
exports.subMenuMeta = subMenuMeta;
|
|
1541
1727
|
exports.switchMeta = switchMeta;
|
|
1728
|
+
exports.tabPaneMeta = tabPaneMeta;
|
|
1729
|
+
exports.tabsMeta = tabsMeta;
|
|
1542
1730
|
//# sourceMappingURL=antd.cjs.development.js.map
|