@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.
package/dist/antd.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import registerComponent from '@plasmicapp/host/registerComponent';
2
- import { Button, Carousel, Input, Select, Slider as Slider$1, Switch } from 'antd';
2
+ import { Button, Carousel, Input, Select, Slider as Slider$1, Switch, Tabs as Tabs$1 } from 'antd';
3
3
  import Checkbox from 'antd/lib/checkbox/Checkbox';
4
4
  import CheckboxGroup from 'antd/lib/checkbox/Group';
5
5
  import React from 'react';
@@ -17,6 +17,7 @@ import MenuItem from 'antd/lib/menu/MenuItem';
17
17
  import SubMenu from 'antd/lib/menu/SubMenu';
18
18
  import { ItemGroup } from 'rc-menu';
19
19
  import { Option, OptGroup } from 'rc-select';
20
+ import { TabPane } from 'rc-tabs';
20
21
 
21
22
  var buttonMeta = {
22
23
  name: "AntdButton",
@@ -1458,6 +1459,176 @@ function registerSwitch(loader, customSwitchMeta) {
1458
1459
  doRegisterComponent(Switch, customSwitchMeta != null ? customSwitchMeta : switchMeta);
1459
1460
  }
1460
1461
 
1462
+ var tabPaneMeta = {
1463
+ name: "AntdTabPane",
1464
+ displayName: "Antd Tab Pane",
1465
+ props: {
1466
+ tab: {
1467
+ type: "slot",
1468
+ defaultValue: [{
1469
+ type: "text",
1470
+ value: "Tab"
1471
+ }]
1472
+ },
1473
+ key: {
1474
+ type: "string",
1475
+ description: "Unique TabPane's key",
1476
+ defaultValue: "tabPaneKey"
1477
+ },
1478
+ closable: {
1479
+ type: "boolean",
1480
+ description: "Wether the tab can be closed or not. Only works for editable tabs",
1481
+ defaultValueHint: true
1482
+ },
1483
+ closeIcon: {
1484
+ type: "slot",
1485
+ hidePlaceholder: true
1486
+ },
1487
+ children: {
1488
+ type: "slot",
1489
+ defaultValue: [{
1490
+ type: "text",
1491
+ value: "Tab Content"
1492
+ }]
1493
+ }
1494
+ },
1495
+ parentComponentName: "AntdTabs",
1496
+ importPath: "rc-tabs",
1497
+ importName: "TabPane"
1498
+ };
1499
+ function registerTabPane(loader, customTabPaneMeta) {
1500
+ var doRegisterComponent = function doRegisterComponent() {
1501
+ return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1502
+ };
1503
+
1504
+ doRegisterComponent(TabPane, customTabPaneMeta != null ? customTabPaneMeta : tabPaneMeta);
1505
+ }
1506
+ function Tabs(props) {
1507
+ var leftTabBarExtraContent = props.leftTabBarExtraContent,
1508
+ rightTabBarExtraContent = props.rightTabBarExtraContent,
1509
+ otherProps = _objectWithoutPropertiesLoose(props, ["leftTabBarExtraContent", "rightTabBarExtraContent"]);
1510
+
1511
+ return React.createElement(Tabs$1, Object.assign({}, otherProps, {
1512
+ tabBarExtraContent: {
1513
+ left: leftTabBarExtraContent,
1514
+ right: rightTabBarExtraContent
1515
+ }
1516
+ }));
1517
+ }
1518
+ var tabsMeta = {
1519
+ name: "AntdTabs",
1520
+ displayName: "Antd Tabs",
1521
+ props: {
1522
+ type: {
1523
+ type: "choice",
1524
+ options: ["line", "card", "editable-card"],
1525
+ defaultValueHint: "line",
1526
+ description: "Basic style of tabs"
1527
+ },
1528
+ addIcon: {
1529
+ type: "slot",
1530
+ hidePlaceholder: true
1531
+ },
1532
+ animated: {
1533
+ type: "object",
1534
+ hidden: function hidden(props) {
1535
+ return props.tabPosition !== "top" && !!props.tabPosition;
1536
+ },
1537
+ defaultValueHint: {
1538
+ inkBar: true,
1539
+ tabPane: false
1540
+ },
1541
+ description: "Whether to change tabs with animation. Can be either a boolean or specify for inkBar and tabPane"
1542
+ },
1543
+ hideAdd: {
1544
+ type: "boolean",
1545
+ hidden: function hidden(props) {
1546
+ return props.type !== "editable-card";
1547
+ },
1548
+ defaultValueHint: false,
1549
+ description: "Hide plus icon or not"
1550
+ },
1551
+ moreIcon: {
1552
+ type: "slot",
1553
+ hidePlaceholder: true
1554
+ },
1555
+ size: {
1556
+ type: "choice",
1557
+ options: ["large", "default", "small"],
1558
+ defaultValueHint: "default",
1559
+ description: "Preset tab bar size"
1560
+ },
1561
+ tabPosition: {
1562
+ type: "choice",
1563
+ options: ["top", "right", "bottom", "left"],
1564
+ defaultValueHint: "top",
1565
+ description: "Position of tabs"
1566
+ },
1567
+ tabBarGutter: {
1568
+ type: "number",
1569
+ description: "The gap between tabs"
1570
+ },
1571
+ centered: {
1572
+ type: "boolean",
1573
+ description: "Centers tabs",
1574
+ defaultValueHint: false
1575
+ },
1576
+ leftTabBarExtraContent: {
1577
+ type: "slot",
1578
+ hidePlaceholder: true
1579
+ },
1580
+ rightTabBarExtraContent: {
1581
+ type: "slot",
1582
+ hidePlaceholder: true
1583
+ },
1584
+ tabBarStyle: {
1585
+ type: "object",
1586
+ description: "CSS for the Tab Bar style"
1587
+ },
1588
+ activeKey: {
1589
+ type: "choice",
1590
+ editOnly: true,
1591
+ uncontrolledProp: "defaultActiveKey",
1592
+ description: "Initial active TabPane's key",
1593
+ options: function options(props) {
1594
+ var options = new Set();
1595
+ traverseReactEltTree(props.children, function (elt) {
1596
+ if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
1597
+ options.add(elt.key);
1598
+ }
1599
+ });
1600
+ return Array.from(options.keys());
1601
+ }
1602
+ },
1603
+ children: {
1604
+ type: "slot",
1605
+ allowedComponents: ["AntdTabPane"],
1606
+ defaultValue: [{
1607
+ type: "component",
1608
+ name: "AntdTabPane",
1609
+ props: {
1610
+ key: "1"
1611
+ }
1612
+ }, {
1613
+ type: "component",
1614
+ name: "AntdTabPane",
1615
+ props: {
1616
+ key: "2"
1617
+ }
1618
+ }]
1619
+ }
1620
+ },
1621
+ importPath: "@plasmicpkgs/antd",
1622
+ importName: "Tabs"
1623
+ };
1624
+ function registerTabs(loader, customTabsMeta) {
1625
+ var doRegisterComponent = function doRegisterComponent() {
1626
+ return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1627
+ };
1628
+
1629
+ doRegisterComponent(Tabs, customTabsMeta != null ? customTabsMeta : tabsMeta);
1630
+ }
1631
+
1461
1632
  function registerAll(loader) {
1462
1633
  registerButton(loader);
1463
1634
  registerSlider(loader);
@@ -1482,7 +1653,9 @@ function registerAll(loader) {
1482
1653
  registerInputSearch(loader);
1483
1654
  registerInputPassword(loader);
1484
1655
  registerInputGroup(loader);
1656
+ registerTabPane(loader);
1657
+ registerTabs(loader);
1485
1658
  }
1486
1659
 
1487
- export { Dropdown, Slider, buttonMeta, carouselMeta, checkboxGroupMeta, checkboxMeta, collapsteMeta, collapstePanelMeta, dropdownButtonMeta, dropdownMeta, inputGroupMeta, inputMeta, inputPasswordMeta, inputSearchMeta, inputTextAreaMeta, menuDividerMeta, menuItemGroupMeta, menuItemMeta, menuMeta, optGroupMeta, optionMeta, registerAll, registerButton, registerCarousel, registerCheckbox, registerCheckboxGroup, registerCollapse, registerCollapsePanel, registerDropdown, registerDropdownButton, registerInput, registerInputGroup, registerInputPassword, registerInputSearch, registerInputTextArea, registerMenu, registerMenuDivider, registerMenuItem, registerMenuItemGroup, registerOptGroup, registerOption, registerSelect, registerSlider, registerSubMenu, registerSwitch, selectMeta, sliderMeta, subMenuMeta, switchMeta };
1660
+ export { Dropdown, Slider, Tabs, buttonMeta, carouselMeta, checkboxGroupMeta, checkboxMeta, collapsteMeta, collapstePanelMeta, dropdownButtonMeta, dropdownMeta, inputGroupMeta, inputMeta, inputPasswordMeta, inputSearchMeta, inputTextAreaMeta, menuDividerMeta, menuItemGroupMeta, menuItemMeta, menuMeta, optGroupMeta, optionMeta, registerAll, registerButton, registerCarousel, registerCheckbox, registerCheckboxGroup, registerCollapse, registerCollapsePanel, registerDropdown, registerDropdownButton, registerInput, registerInputGroup, registerInputPassword, registerInputSearch, registerInputTextArea, registerMenu, registerMenuDivider, registerMenuItem, registerMenuItemGroup, registerOptGroup, registerOption, registerSelect, registerSlider, registerSubMenu, registerSwitch, registerTabPane, registerTabs, selectMeta, sliderMeta, subMenuMeta, switchMeta, tabPaneMeta, tabsMeta };
1488
1661
  //# sourceMappingURL=antd.esm.js.map