@plasmicpkgs/antd5 0.0.65 → 0.0.66

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/antd5",
3
- "version": "0.0.65",
3
+ "version": "0.0.66",
4
4
  "description": "Plasmic registration calls for antd components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -55,7 +55,7 @@
55
55
  "antd": "^5.1.6"
56
56
  },
57
57
  "devDependencies": {
58
- "@plasmicapp/host": "1.0.142",
58
+ "@plasmicapp/host": "1.0.143",
59
59
  "@plasmicapp/query": "0.1.64",
60
60
  "@types/node": "^14.0.26",
61
61
  "@types/react": "^18.0.27",
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "5cea285d1ce34993d5d48e92cebc9e76ec906371"
79
+ "gitHead": "14ac7da363bb5d22b83752f6c4e67cd83797b7c3"
80
80
  }
@@ -108,11 +108,13 @@ function registerButton(loader) {
108
108
  advanced: true
109
109
  },
110
110
  href: {
111
- type: "string",
112
- description: "Redirect url of link button"
111
+ displayName: "Link to",
112
+ type: "href",
113
+ description: "Use this button as a link to this url"
113
114
  },
114
115
  target: {
115
116
  type: "boolean",
117
+ displayName: "Open in new tab?",
116
118
  description: "Whether to open the link in a new window",
117
119
  hidden: (props) => !props.href,
118
120
  defaultValueHint: false
@@ -1 +1 @@
1
- {"version":3,"file":"registerButton.cjs.js","sources":["../src/registerButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"antd\";\nimport { Registerable, registerComponentHelper } from \"./utils\";\n\nexport function AntdButton(\n props: Omit<React.ComponentProps<typeof Button>, \"target\"> & {\n submitsForm?: boolean;\n target?: React.ComponentProps<typeof Button>[\"target\"] | boolean;\n }\n) {\n const { submitsForm = false, ...rest } = props;\n const target =\n props.target === true\n ? \"_blank\"\n : props.target === false\n ? undefined\n : props.target;\n return (\n <Button\n {...rest}\n htmlType={submitsForm ? \"submit\" : \"button\"}\n {...rest}\n target={target}\n />\n );\n}\n\nexport const buttonComponentName = \"plasmic-antd5-button\";\n\nexport function registerButton(loader?: Registerable) {\n registerComponentHelper(loader, AntdButton, {\n name: buttonComponentName,\n displayName: \"Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description:\n \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Set the button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Whether the button is disabled\",\n defaultValueHint: false,\n },\n submitsForm: {\n type: \"boolean\",\n displayName: \"Submits form?\",\n defaultValueHint: false,\n description:\n \"whether clicking this button should submit the enclosing form.\",\n advanced: true,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n advanced: true,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n href: {\n type: \"string\",\n description: \"Redirect url of link button\",\n },\n target: {\n type: \"boolean\",\n description: \"Whether to open the link in a new window\",\n hidden: (props) => !props.href,\n defaultValueHint: false,\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n ...({ mergeWithParent: true } as any),\n },\n icon: {\n type: \"slot\",\n hidePlaceholder: true,\n hidden: () => true,\n },\n onClick: {\n type: \"eventHandler\",\n argTypes: [],\n },\n },\n importPath: \"@plasmicpkgs/antd5/skinny/registerButton\",\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AQ,EAAA,CAAC,KAAU,KAAA,CAAC,KAAM,CAAA,IAAA;AAAA,QAC1B,gBAAkB,EAAA,KAAA;AAAA,OACpB;AAAA,MACA,QAAU,EAAA,cAAA,CAAA;AAAA,QACR,IAAM,EAAA,MAAA;AAAA,QACN,YAAc,EAAA;AAAA,UACZ;AAAA,YACE,IAAM,EAAA,MAAA;AAAA,YACN,KAAO,EAAA,QAAA;AAAA,WACT;AAAA,SACF;AAAA,OACI,EAAA,EAAE,iBAAiB,IAAK,EAAA,CAAA;AAAA,MAE9B,IAAM,EAAA;AAAA,QACJ,IAAM,EAAA,MAAA;AAAA,QACN,eAAiB,EAAA,IAAA;AAAA,QACjB,QAAQ,MAAM,IAAA;AAAA,OAChB;AAAA,MACA,OAAS,EAAA;AAAA,QACP,IAAM,EAAA,cAAA;AAAA,QACN,UAAU,EAAC;AAAA,OACb;AAAA,KACF;AAAA,IACA,UAAY,EAAA,0CAAA;AAAA,IACZ,UAAY,EAAA,YAAA;AAAA,GACb,CAAA,CAAA;AACH;;;;;;"}
1
+ {"version":3,"file":"registerButton.cjs.js","sources":["../src/registerButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"antd\";\nimport { Registerable, registerComponentHelper } from \"./utils\";\n\nexport function AntdButton(\n props: Omit<React.ComponentProps<typeof Button>, \"target\"> & {\n submitsForm?: boolean;\n target?: React.ComponentProps<typeof Button>[\"target\"] | boolean;\n }\n) {\n const { submitsForm = false, ...rest } = props;\n const target =\n props.target === true\n ? \"_blank\"\n : props.target === false\n ? undefined\n : props.target;\n return (\n <Button\n {...rest}\n htmlType={submitsForm ? \"submit\" : \"button\"}\n {...rest}\n target={target}\n />\n );\n}\n\nexport const buttonComponentName = \"plasmic-antd5-button\";\n\nexport function registerButton(loader?: Registerable) {\n registerComponentHelper(loader, AntdButton, {\n name: buttonComponentName,\n displayName: \"Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description:\n \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Set the button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Whether the button is disabled\",\n defaultValueHint: false,\n },\n submitsForm: {\n type: \"boolean\",\n displayName: \"Submits form?\",\n defaultValueHint: false,\n description:\n \"whether clicking this button should submit the enclosing form.\",\n advanced: true,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n advanced: true,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n href: {\n displayName: \"Link to\",\n type: \"href\",\n description: \"Use this button as a link to this url\",\n },\n target: {\n type: \"boolean\",\n displayName: \"Open in new tab?\",\n description: \"Whether to open the link in a new window\",\n hidden: (props) => !props.href,\n defaultValueHint: false,\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n ...({ mergeWithParent: true } as any),\n },\n icon: {\n type: \"slot\",\n hidePlaceholder: true,\n hidden: () => true,\n },\n onClick: {\n type: \"eventHandler\",\n argTypes: [],\n },\n },\n importPath: \"@plasmicpkgs/antd5/skinny/registerButton\",\n importName: \"AntdButton\",\n });\n}\n"],"names":["React","Button","registerComponentHelper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,WACd,KAIA,EAAA;AACA,EAAA,MAAyC,YAAjC,EAAc,WAAA,GAAA,KAAA,KAAmB,EAAT,EAAA,IAAA,GAAA,SAAA,CAAS,IAAT,CAAxB,aAAA,C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UACZ;AAAA,YACE,IAAM,EAAA,MAAA;AAAA,YACN,KAAO,EAAA,QAAA;AAAA,WACT;AAAA,SACF;AAAA,OACI,EAAA,EAAE,iBAAiB,IAAK,EAAA,CAAA;AAAA,MAE9B,IAAM,EAAA;AAAA,QACJ,IAAM,EAAA,MAAA;AAAA,QACN,eAAiB,EAAA,IAAA;AAAA,QACjB,QAAQ,MAAM,IAAA;AAAA,OAChB;AAAA,MACA,OAAS,EAAA;AAAA,QACP,IAAM,EAAA,cAAA;AAAA,QACN,UAAU,EAAC;AAAA,OACb;AAAA,KACF;AAAA,IACA,UAAY,EAAA,0CAAA;AAAA,IACZ,UAAY,EAAA,YAAA;AAAA,GACb,CAAA,CAAA;AACH;;;;;;"}
@@ -102,11 +102,13 @@ function registerButton(loader) {
102
102
  advanced: true
103
103
  },
104
104
  href: {
105
- type: "string",
106
- description: "Redirect url of link button"
105
+ displayName: "Link to",
106
+ type: "href",
107
+ description: "Use this button as a link to this url"
107
108
  },
108
109
  target: {
109
110
  type: "boolean",
111
+ displayName: "Open in new tab?",
110
112
  description: "Whether to open the link in a new window",
111
113
  hidden: (props) => !props.href,
112
114
  defaultValueHint: false
@@ -1 +1 @@
1
- {"version":3,"file":"registerButton.esm.js","sources":["../src/registerButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"antd\";\nimport { Registerable, registerComponentHelper } from \"./utils\";\n\nexport function AntdButton(\n props: Omit<React.ComponentProps<typeof Button>, \"target\"> & {\n submitsForm?: boolean;\n target?: React.ComponentProps<typeof Button>[\"target\"] | boolean;\n }\n) {\n const { submitsForm = false, ...rest } = props;\n const target =\n props.target === true\n ? \"_blank\"\n : props.target === false\n ? undefined\n : props.target;\n return (\n <Button\n {...rest}\n htmlType={submitsForm ? \"submit\" : \"button\"}\n {...rest}\n target={target}\n />\n );\n}\n\nexport const buttonComponentName = \"plasmic-antd5-button\";\n\nexport function registerButton(loader?: Registerable) {\n registerComponentHelper(loader, AntdButton, {\n name: buttonComponentName,\n displayName: \"Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description:\n \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Set the button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Whether the button is disabled\",\n defaultValueHint: false,\n },\n submitsForm: {\n type: \"boolean\",\n displayName: \"Submits form?\",\n defaultValueHint: false,\n description:\n \"whether clicking this button should submit the enclosing form.\",\n advanced: true,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n advanced: true,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n href: {\n type: \"string\",\n description: \"Redirect url of link button\",\n },\n target: {\n type: \"boolean\",\n description: \"Whether to open the link in a new window\",\n hidden: (props) => !props.href,\n defaultValueHint: false,\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n ...({ mergeWithParent: true } as any),\n },\n icon: {\n type: \"slot\",\n hidePlaceholder: true,\n hidden: () => true,\n },\n onClick: {\n type: \"eventHandler\",\n argTypes: [],\n },\n },\n importPath: \"@plasmicpkgs/antd5/skinny/registerButton\",\n importName: \"AntdButton\",\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,WACd,KAIA,EAAA;AACA,EAAA,MAAyC,YAAjC,EAAc,WAAA,GAAA,KAAA,KAAmB,EAAT,EAAA,IAAA,GAAA,SAAA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AAAA,YACN,KAAO,EAAA,QAAA;AAAA,WACT;AAAA,SACF;AAAA,OACI,EAAA,EAAE,iBAAiB,IAAK,EAAA,CAAA;AAAA,MAE9B,IAAM,EAAA;AAAA,QACJ,IAAM,EAAA,MAAA;AAAA,QACN,eAAiB,EAAA,IAAA;AAAA,QACjB,QAAQ,MAAM,IAAA;AAAA,OAChB;AAAA,MACA,OAAS,EAAA;AAAA,QACP,IAAM,EAAA,cAAA;AAAA,QACN,UAAU,EAAC;AAAA,OACb;AAAA,KACF;AAAA,IACA,UAAY,EAAA,0CAAA;AAAA,IACZ,UAAY,EAAA,YAAA;AAAA,GACb,CAAA,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"registerButton.esm.js","sources":["../src/registerButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"antd\";\nimport { Registerable, registerComponentHelper } from \"./utils\";\n\nexport function AntdButton(\n props: Omit<React.ComponentProps<typeof Button>, \"target\"> & {\n submitsForm?: boolean;\n target?: React.ComponentProps<typeof Button>[\"target\"] | boolean;\n }\n) {\n const { submitsForm = false, ...rest } = props;\n const target =\n props.target === true\n ? \"_blank\"\n : props.target === false\n ? undefined\n : props.target;\n return (\n <Button\n {...rest}\n htmlType={submitsForm ? \"submit\" : \"button\"}\n {...rest}\n target={target}\n />\n );\n}\n\nexport const buttonComponentName = \"plasmic-antd5-button\";\n\nexport function registerButton(loader?: Registerable) {\n registerComponentHelper(loader, AntdButton, {\n name: buttonComponentName,\n displayName: \"Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description:\n \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Set the button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Whether the button is disabled\",\n defaultValueHint: false,\n },\n submitsForm: {\n type: \"boolean\",\n displayName: \"Submits form?\",\n defaultValueHint: false,\n description:\n \"whether clicking this button should submit the enclosing form.\",\n advanced: true,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n advanced: true,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n advanced: true,\n },\n href: {\n displayName: \"Link to\",\n type: \"href\",\n description: \"Use this button as a link to this url\",\n },\n target: {\n type: \"boolean\",\n displayName: \"Open in new tab?\",\n description: \"Whether to open the link in a new window\",\n hidden: (props) => !props.href,\n defaultValueHint: false,\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n ...({ mergeWithParent: true } as any),\n },\n icon: {\n type: \"slot\",\n hidePlaceholder: true,\n hidden: () => true,\n },\n onClick: {\n type: \"eventHandler\",\n argTypes: [],\n },\n },\n importPath: \"@plasmicpkgs/antd5/skinny/registerButton\",\n importName: \"AntdButton\",\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,WACd,KAIA,EAAA;AACA,EAAA,MAAyC,YAAjC,EAAc,WAAA,GAAA,KAAA,KAAmB,EAAT,EAAA,IAAA,GAAA,SAAA,CAAS,IAAT,CAAxB,aAAA,CAAA,CAAA,CAAA;AACR,EAAM,MAAA,MAAA,GACJ,MAAM,MAAW,KAAA,IAAA,GACb,WACA,KAAM,CAAA,MAAA,KAAW,KACjB,GAAA,KAAA,CAAA,GACA,KAAM,CAAA,MAAA,CAAA;AACZ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA,aAAA,CAAA,cAAA,CAAA,aAAA,C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