@plasmicpkgs/antd5 0.0.119 → 0.0.121

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/index.js CHANGED
@@ -5756,11 +5756,17 @@ function AntdAccordion(props) {
5756
5756
  if (!React__default.default.isValidElement(currentItem) || !React__default.default.isValidElement(currentItem.props.children)) {
5757
5757
  return null;
5758
5758
  }
5759
- return __spreadProps$1(__spreadValues$3({}, currentItem.props), {
5759
+ const props2 = __spreadProps$1(__spreadValues$3({}, currentItem.props), {
5760
5760
  id: currentItem.props.id,
5761
5761
  key: currentItem.props.id,
5762
5762
  children: React__default.default.cloneElement(currentItem.props.children)
5763
5763
  });
5764
+ if (currentItem.props.label) {
5765
+ delete props2.label2;
5766
+ } else {
5767
+ props2.label = props2.label2;
5768
+ }
5769
+ return props2;
5764
5770
  }).filter((i) => i != null);
5765
5771
  }, [itemsRaw]);
5766
5772
  return /* @__PURE__ */ React__default.default.createElement(
@@ -5789,7 +5795,8 @@ function AntdSingleCollapse(props) {
5789
5795
  collapsible,
5790
5796
  disabled,
5791
5797
  rotateCustomExpandIcon,
5792
- label,
5798
+ label: oldLabelProp,
5799
+ label2: newLabelProp,
5793
5800
  showArrow,
5794
5801
  extra,
5795
5802
  forceRender,
@@ -5803,12 +5810,14 @@ function AntdSingleCollapse(props) {
5803
5810
  "disabled",
5804
5811
  "rotateCustomExpandIcon",
5805
5812
  "label",
5813
+ "label2",
5806
5814
  "showArrow",
5807
5815
  "extra",
5808
5816
  "forceRender",
5809
5817
  "children",
5810
5818
  "headerClass"
5811
5819
  ]);
5820
+ const label = oldLabelProp != null ? oldLabelProp : newLabelProp;
5812
5821
  const defaultItemKey = React.useMemo(() => uniqueId__default.default(), []);
5813
5822
  const item = React.useMemo(
5814
5823
  () => ({
@@ -5899,10 +5908,17 @@ const commonAccordionProps = {
5899
5908
  };
5900
5909
  const commonAccordionItemProps = {
5901
5910
  label: {
5911
+ type: "string",
5912
+ displayName: "Header Content",
5913
+ description: "Text inside the header",
5914
+ hidden: (props) => props.label != null ? false : (props == null ? void 0 : props.label2) !== void 0 || (props == null ? void 0 : props.header) === void 0
5915
+ },
5916
+ label2: {
5902
5917
  type: "slot",
5903
5918
  displayName: "Header Content",
5904
5919
  defaultValue: "Collapse Header",
5905
- hidePlaceholder: true
5920
+ hidePlaceholder: true,
5921
+ hidden: (props) => props.label != null ? true : (props == null ? void 0 : props.label2) === void 0 && (props == null ? void 0 : props.header) !== void 0
5906
5922
  },
5907
5923
  extra: {
5908
5924
  type: "slot",
@@ -6005,7 +6021,7 @@ function registerCollapse(loader) {
6005
6021
  name: accordionItemComponentName,
6006
6022
  props: {
6007
6023
  id: 1,
6008
- label: {
6024
+ label2: {
6009
6025
  type: "text",
6010
6026
  value: "First Item"
6011
6027
  },
@@ -6020,7 +6036,7 @@ function registerCollapse(loader) {
6020
6036
  name: accordionItemComponentName,
6021
6037
  props: {
6022
6038
  id: 2,
6023
- label: {
6039
+ label2: {
6024
6040
  type: "text",
6025
6041
  value: "Second Item"
6026
6042
  },