@plasmicapp/react-web 0.2.204 → 0.2.206

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/all.d.ts CHANGED
@@ -12407,6 +12407,7 @@ type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, i
12407
12407
  type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
12408
12408
 
12409
12409
  interface CommonProps {
12410
+ htmlType?: "submit" | "button";
12410
12411
  showStartIcon?: boolean;
12411
12412
  showEndIcon?: boolean;
12412
12413
  startIcon?: React$1.ReactNode;
package/dist/index.cjs.js CHANGED
@@ -2620,13 +2620,16 @@ function getPlumeType(child) {
2620
2620
  function useButton(plasmicClass, props, config, ref) {
2621
2621
  var _a, _b, _c, _d;
2622
2622
  if (ref === void 0) { ref = null; }
2623
- var link = props.link, isDisabled = props.isDisabled, startIcon = props.startIcon, endIcon = props.endIcon, showStartIcon = props.showStartIcon, showEndIcon = props.showEndIcon, children = props.children, rest = __rest(props, ["link", "isDisabled", "startIcon", "endIcon", "showStartIcon", "showEndIcon", "children"]);
2623
+ var link = props.link, isDisabled = props.isDisabled, startIcon = props.startIcon, endIcon = props.endIcon, showStartIcon = props.showStartIcon, showEndIcon = props.showEndIcon, children = props.children, htmlType = props.htmlType, rest = __rest(props, ["link", "isDisabled", "startIcon", "endIcon", "showStartIcon", "showEndIcon", "children", "htmlType"]);
2624
2624
  var variants = __assign(__assign({}, pick.apply(void 0, __spreadArray([props], __read(plasmicClass.internalVariantProps), false))), mergeVariantToggles({ def: config.showStartIconVariant, active: showStartIcon }, { def: config.showEndIconVariant, active: showEndIcon }, { def: config.isDisabledVariant, active: isDisabled }));
2625
2625
  var args = __assign(__assign(__assign(__assign({}, pick.apply(void 0, __spreadArray([props], __read(plasmicClass.internalArgProps), false))), (config.startIconSlot && (_a = {}, _a[config.startIconSlot] = startIcon, _a))), (config.endIconSlot && (_b = {}, _b[config.endIconSlot] = endIcon, _b))), (_c = {}, _c[config.contentSlot] = children, _c));
2626
2626
  var overrides = (_d = {},
2627
2627
  _d[config.root] = {
2628
- as: !!link ? "a" : "button",
2629
- props: __assign(__assign(__assign({}, omit.apply(void 0, __spreadArray(__spreadArray([rest], __read(plasmicClass.internalArgProps), false), __read(plasmicClass.internalVariantProps), false))), { ref: ref, disabled: isDisabled }), (!!link && { href: link })),
2628
+ as: link ? "a" : "button",
2629
+ props: __assign(__assign(__assign({
2630
+ // Put this at the top, as user may also have set `type` as
2631
+ // inherited from "button", so let `rest` override it
2632
+ type: htmlType }, omit.apply(void 0, __spreadArray(__spreadArray([rest], __read(plasmicClass.internalArgProps), false), __read(plasmicClass.internalVariantProps), false))), { ref: ref, disabled: isDisabled }), (!!link && { href: link })),
2630
2633
  },
2631
2634
  _d);
2632
2635
  return {