@plasmicpkgs/antd 0.0.9 → 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.
@@ -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,176 @@ 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
+ 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
+
1467
1638
  function registerAll(loader) {
1468
1639
  registerButton(loader);
1469
1640
  registerSlider(loader);
@@ -1488,10 +1659,13 @@ function registerAll(loader) {
1488
1659
  registerInputSearch(loader);
1489
1660
  registerInputPassword(loader);
1490
1661
  registerInputGroup(loader);
1662
+ registerTabPane(loader);
1663
+ registerTabs(loader);
1491
1664
  }
1492
1665
 
1493
1666
  exports.Dropdown = Dropdown;
1494
1667
  exports.Slider = Slider;
1668
+ exports.Tabs = Tabs;
1495
1669
  exports.buttonMeta = buttonMeta;
1496
1670
  exports.carouselMeta = carouselMeta;
1497
1671
  exports.checkboxGroupMeta = checkboxGroupMeta;
@@ -1535,8 +1709,12 @@ exports.registerSelect = registerSelect;
1535
1709
  exports.registerSlider = registerSlider;
1536
1710
  exports.registerSubMenu = registerSubMenu;
1537
1711
  exports.registerSwitch = registerSwitch;
1712
+ exports.registerTabPane = registerTabPane;
1713
+ exports.registerTabs = registerTabs;
1538
1714
  exports.selectMeta = selectMeta;
1539
1715
  exports.sliderMeta = sliderMeta;
1540
1716
  exports.subMenuMeta = subMenuMeta;
1541
1717
  exports.switchMeta = switchMeta;
1718
+ exports.tabPaneMeta = tabPaneMeta;
1719
+ exports.tabsMeta = tabsMeta;
1542
1720
  //# sourceMappingURL=antd.cjs.development.js.map