@plasmicpkgs/react-aria 0.0.81 → 0.0.83

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.
Files changed (52) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/react-aria.esm.js +90 -105
  3. package/dist/react-aria.esm.js.map +1 -1
  4. package/dist/react-aria.js +90 -105
  5. package/dist/react-aria.js.map +1 -1
  6. package/package.json +2 -2
  7. package/skinny/{common-4b974d89.cjs.js → common-1e5dba7d.cjs.js} +2 -2
  8. package/skinny/common-1e5dba7d.cjs.js.map +1 -0
  9. package/skinny/{common-1a6affb0.esm.js → common-a8f4a4b1.esm.js} +2 -2
  10. package/skinny/common-a8f4a4b1.esm.js.map +1 -0
  11. package/skinny/registerButton.cjs.js +21 -29
  12. package/skinny/registerButton.cjs.js.map +1 -1
  13. package/skinny/registerButton.esm.js +21 -29
  14. package/skinny/registerButton.esm.js.map +1 -1
  15. package/skinny/registerCheckbox.cjs.js +1 -1
  16. package/skinny/registerCheckbox.esm.js +1 -1
  17. package/skinny/registerCheckboxGroup.cjs.js +1 -1
  18. package/skinny/registerCheckboxGroup.esm.js +1 -1
  19. package/skinny/registerComboBox.cjs.js +2 -2
  20. package/skinny/registerComboBox.esm.js +2 -2
  21. package/skinny/registerDialogTrigger.cjs.js +1 -1
  22. package/skinny/registerDialogTrigger.esm.js +1 -1
  23. package/skinny/registerInput.cjs.js +1 -1
  24. package/skinny/registerInput.esm.js +1 -1
  25. package/skinny/registerModal.cjs.js +7 -7
  26. package/skinny/registerModal.cjs.js.map +1 -1
  27. package/skinny/registerModal.esm.js +8 -8
  28. package/skinny/registerModal.esm.js.map +1 -1
  29. package/skinny/registerRadio.cjs.js +1 -1
  30. package/skinny/registerRadio.esm.js +1 -1
  31. package/skinny/registerRadioGroup.cjs.js +1 -1
  32. package/skinny/registerRadioGroup.esm.js +1 -1
  33. package/skinny/registerSelect.cjs.js +13 -3
  34. package/skinny/registerSelect.cjs.js.map +1 -1
  35. package/skinny/registerSelect.esm.js +13 -3
  36. package/skinny/registerSelect.esm.js.map +1 -1
  37. package/skinny/registerSlider.cjs.js +1 -1
  38. package/skinny/registerSlider.esm.js +1 -1
  39. package/skinny/registerSliderThumb.cjs.js +1 -1
  40. package/skinny/registerSliderThumb.esm.js +1 -1
  41. package/skinny/registerSwitch.cjs.js +1 -1
  42. package/skinny/registerSwitch.esm.js +1 -1
  43. package/skinny/registerTextArea.cjs.js +1 -1
  44. package/skinny/registerTextArea.esm.js +1 -1
  45. package/skinny/registerTextField.cjs.js +1 -1
  46. package/skinny/registerTextField.esm.js +1 -1
  47. package/skinny/registerTooltip.cjs.js +6 -23
  48. package/skinny/registerTooltip.cjs.js.map +1 -1
  49. package/skinny/registerTooltip.esm.js +6 -23
  50. package/skinny/registerTooltip.esm.js.map +1 -1
  51. package/skinny/common-1a6affb0.esm.js.map +0 -1
  52. package/skinny/common-4b974d89.cjs.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { usePlasmicCanvasContext, usePlasmicCanvasComponentInfo } from '@plasmicapp/host';
2
1
  import React, { useEffect, useState, useMemo, forwardRef, useImperativeHandle, Component } from 'react';
3
2
  import { mergeProps, useFocusable } from 'react-aria';
4
3
  import { Button, Checkbox, Text, Label, CheckboxGroup, Input, ListBoxItem, ListBox, Section, Header, PopoverContext, Popover, ComboBox, ComboBoxStateContext, Heading, ModalOverlay, Modal, Dialog, DialogTrigger, Radio, RadioGroup, Select, SelectStateContext, SelectValue, SliderOutput, SliderThumb, Slider, SliderTrack, Switch, TextArea, TextField, TooltipTrigger, Tooltip } from 'react-aria-components';
4
+ import { usePlasmicCanvasContext, usePlasmicCanvasComponentInfo } from '@plasmicapp/host';
5
5
  import registerComponent from '@plasmicapp/host/registerComponent';
6
6
  import { mergeProps as mergeProps$1 } from '@react-aria/utils';
7
7
  import flattenChildren from 'react-keyed-flatten-children';
@@ -171,7 +171,7 @@ function createAriaLabelProp(componentName) {
171
171
  return {
172
172
  type: "string",
173
173
  displayName: "ARIA label",
174
- description: `Label for this ${componentName}, if no visible label is used, to identify the element to assistive technology`,
174
+ description: `Assistive technology uses this if there is no visible label for this ${componentName}`,
175
175
  advanced: true,
176
176
  hidden: hasParent
177
177
  };
@@ -535,7 +535,7 @@ var __spreadValues$p = (a, b) => {
535
535
  return a;
536
536
  };
537
537
  var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
538
- var __objRest$n = (source, exclude) => {
538
+ var __objRest$m = (source, exclude) => {
539
539
  var target = {};
540
540
  for (var prop in source)
541
541
  if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -555,33 +555,25 @@ const BUTTON_VARIANTS = [
555
555
  "disabled"
556
556
  ];
557
557
  const { variants: variants$f, withObservedValues: withObservedValues$d } = pickAriaComponentVariants(BUTTON_VARIANTS);
558
- const BaseButton = React.forwardRef(
559
- (props, ref) => {
560
- var _b;
561
- const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$n(_a, ["submitsForm", "resetsForm", "children", "plasmicUpdateVariant"]);
562
- const canvasContext = (_b = usePlasmicCanvasContext) == null ? void 0 : _b();
563
- const isEditMode = canvasContext && canvasContext.interactive === false;
564
- const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
565
- const mergedProps = mergeProps(rest, {
566
- type,
567
- ref,
568
- // The rich text editor can cancel effect of clicks/hover, but not of key strokes.
569
- // When pressing space key, the button's "pressed" state is triggered, and the rich text editor loses focus as a result.
570
- preventFocusOnPress: isEditMode
571
- });
572
- return /* @__PURE__ */ React.createElement(Button, __spreadValues$p({}, mergedProps), ({ isHovered, isPressed, isFocused, isFocusVisible, isDisabled }) => withObservedValues$d(
573
- children,
574
- {
575
- hovered: isHovered,
576
- pressed: isPressed,
577
- focused: isFocused,
578
- focusVisible: isFocusVisible,
579
- disabled: isDisabled
580
- },
581
- plasmicUpdateVariant
582
- ));
583
- }
584
- );
558
+ const BaseButton = React.forwardRef(function BaseButtonInner(props, ref) {
559
+ const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$m(_a, ["submitsForm", "resetsForm", "children", "plasmicUpdateVariant"]);
560
+ const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
561
+ const mergedProps = mergeProps(rest, {
562
+ type,
563
+ ref
564
+ });
565
+ return /* @__PURE__ */ React.createElement(Button, __spreadValues$p({}, mergedProps), ({ isHovered, isPressed, isFocused, isFocusVisible, isDisabled }) => withObservedValues$d(
566
+ children,
567
+ {
568
+ hovered: isHovered,
569
+ pressed: isPressed,
570
+ focused: isFocused,
571
+ focusVisible: isFocusVisible,
572
+ disabled: isDisabled
573
+ },
574
+ plasmicUpdateVariant
575
+ ));
576
+ });
585
577
  const BUTTON_COMPONENT_NAME = makeComponentName("button");
586
578
  function registerButton(loader, overrides) {
587
579
  registerComponentHelper(
@@ -674,7 +666,7 @@ var __spreadValues$o = (a, b) => {
674
666
  return a;
675
667
  };
676
668
  var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
677
- var __objRest$m = (source, exclude) => {
669
+ var __objRest$l = (source, exclude) => {
678
670
  var target = {};
679
671
  for (var prop in source)
680
672
  if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -699,7 +691,7 @@ const CHECKBOX_VARIANTS = [
699
691
  ];
700
692
  const { variants: variants$e, withObservedValues: withObservedValues$c } = pickAriaComponentVariants(CHECKBOX_VARIANTS);
701
693
  function BaseCheckbox(props) {
702
- const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$m(_a, ["children", "plasmicUpdateVariant", "setControlContextData"]);
694
+ const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$l(_a, ["children", "plasmicUpdateVariant", "setControlContextData"]);
703
695
  const contextProps = React.useContext(PlasmicCheckboxGroupContext);
704
696
  setControlContextData == null ? void 0 : setControlContextData({
705
697
  parent: contextProps
@@ -872,7 +864,7 @@ var __spreadValues$n = (a, b) => {
872
864
  return a;
873
865
  };
874
866
  var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
875
- var __objRest$l = (source, exclude) => {
867
+ var __objRest$k = (source, exclude) => {
876
868
  var target = {};
877
869
  for (var prop in source)
878
870
  if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -885,7 +877,7 @@ var __objRest$l = (source, exclude) => {
885
877
  return target;
886
878
  };
887
879
  function BaseText(_a) {
888
- var _b = _a, { children, slot, className } = _b, rest = __objRest$l(_b, ["children", "slot", "className"]);
880
+ var _b = _a, { children, slot, className } = _b, rest = __objRest$k(_b, ["children", "slot", "className"]);
889
881
  return /* @__PURE__ */ React.createElement(Text, __spreadProps$d(__spreadValues$n({}, extractPlasmicDataProps(rest)), { slot, className }), children);
890
882
  }
891
883
  const TEXT_COMPONENT_NAME = makeComponentName("text");
@@ -973,7 +965,7 @@ var __spreadValues$l = (a, b) => {
973
965
  return a;
974
966
  };
975
967
  var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
976
- var __objRest$k = (source, exclude) => {
968
+ var __objRest$j = (source, exclude) => {
977
969
  var target = {};
978
970
  for (var prop in source)
979
971
  if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -986,7 +978,7 @@ var __objRest$k = (source, exclude) => {
986
978
  return target;
987
979
  };
988
980
  function BaseLabel(_a) {
989
- var _b = _a, { children, className } = _b, rest = __objRest$k(_b, ["children", "className"]);
981
+ var _b = _a, { children, className } = _b, rest = __objRest$j(_b, ["children", "className"]);
990
982
  return /* @__PURE__ */ React.createElement(Label, __spreadProps$b(__spreadValues$l({}, extractPlasmicDataProps(rest)), { className }), children);
991
983
  }
992
984
  const LABEL_COMPONENT_NAME = makeComponentName("label");
@@ -1037,7 +1029,7 @@ var __spreadValues$k = (a, b) => {
1037
1029
  return a;
1038
1030
  };
1039
1031
  var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1040
- var __objRest$j = (source, exclude) => {
1032
+ var __objRest$i = (source, exclude) => {
1041
1033
  var target = {};
1042
1034
  for (var prop in source)
1043
1035
  if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1054,7 +1046,7 @@ const { variants: variants$d, withObservedValues: withObservedValues$b } = pickA
1054
1046
  CHECKBOX_GROUP_VARIANTS
1055
1047
  );
1056
1048
  function BaseCheckboxGroup(props) {
1057
- const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$j(_a, ["children", "plasmicUpdateVariant"]);
1049
+ const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$i(_a, ["children", "plasmicUpdateVariant"]);
1058
1050
  return /* @__PURE__ */ React.createElement(PlasmicCheckboxGroupContext.Provider, { value: rest }, /* @__PURE__ */ React.createElement(CheckboxGroup, __spreadValues$k({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$b(
1059
1051
  children,
1060
1052
  {
@@ -1260,7 +1252,7 @@ var __spreadValues$j = (a, b) => {
1260
1252
  }
1261
1253
  return a;
1262
1254
  };
1263
- var __objRest$i = (source, exclude) => {
1255
+ var __objRest$h = (source, exclude) => {
1264
1256
  var target = {};
1265
1257
  for (var prop in source)
1266
1258
  if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1295,7 +1287,7 @@ function BaseInput(props) {
1295
1287
  disabled,
1296
1288
  autoComplete,
1297
1289
  value
1298
- } = _a, rest = __objRest$i(_a, [
1290
+ } = _a, rest = __objRest$h(_a, [
1299
1291
  "plasmicUpdateVariant",
1300
1292
  "setControlContextData",
1301
1293
  "disabled",
@@ -1430,7 +1422,7 @@ var __spreadValues$i = (a, b) => {
1430
1422
  }
1431
1423
  return a;
1432
1424
  };
1433
- var __objRest$h = (source, exclude) => {
1425
+ var __objRest$g = (source, exclude) => {
1434
1426
  var target = {};
1435
1427
  for (var prop in source)
1436
1428
  if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1454,7 +1446,7 @@ const { variants: variants$b, withObservedValues: withObservedValues$a } = pickA
1454
1446
  LIST_BOX_ITEM_VARIANTS
1455
1447
  );
1456
1448
  function BaseListBoxItem(props) {
1457
- const _a = props, { children, setControlContextData, plasmicUpdateVariant, id } = _a, rest = __objRest$h(_a, ["children", "setControlContextData", "plasmicUpdateVariant", "id"]);
1449
+ const _a = props, { children, setControlContextData, plasmicUpdateVariant, id } = _a, rest = __objRest$g(_a, ["children", "setControlContextData", "plasmicUpdateVariant", "id"]);
1458
1450
  const listboxContext = React.useContext(PlasmicListBoxContext);
1459
1451
  const isStandalone = !listboxContext;
1460
1452
  const [registeredId, setRegisteredId] = useState();
@@ -1603,7 +1595,7 @@ var __spreadValues$h = (a, b) => {
1603
1595
  }
1604
1596
  return a;
1605
1597
  };
1606
- var __objRest$g = (source, exclude) => {
1598
+ var __objRest$f = (source, exclude) => {
1607
1599
  var target = {};
1608
1600
  for (var prop in source)
1609
1601
  if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1616,7 +1608,7 @@ var __objRest$g = (source, exclude) => {
1616
1608
  return target;
1617
1609
  };
1618
1610
  function BaseSection(props) {
1619
- const _a = props, { header, items } = _a, rest = __objRest$g(_a, ["header", "items"]);
1611
+ const _a = props, { header, items } = _a, rest = __objRest$f(_a, ["header", "items"]);
1620
1612
  const contextProps = React.useContext(PlasmicListBoxContext);
1621
1613
  const isStandalone = !contextProps;
1622
1614
  const section = /* @__PURE__ */ React.createElement(Section, __spreadValues$h({}, rest), /* @__PURE__ */ React.createElement(Header, null, header), items);
@@ -1680,7 +1672,7 @@ var __spreadValues$g = (a, b) => {
1680
1672
  }
1681
1673
  return a;
1682
1674
  };
1683
- var __objRest$f = (source, exclude) => {
1675
+ var __objRest$e = (source, exclude) => {
1684
1676
  var target = {};
1685
1677
  for (var prop in source)
1686
1678
  if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1710,7 +1702,7 @@ function BaseListBox(props) {
1710
1702
  children,
1711
1703
  selectedKeys,
1712
1704
  defaultSelectedKeys
1713
- } = _a, rest = __objRest$f(_a, [
1705
+ } = _a, rest = __objRest$e(_a, [
1714
1706
  "setControlContextData",
1715
1707
  "children",
1716
1708
  "selectedKeys",
@@ -1942,7 +1934,7 @@ var __spreadValues$f = (a, b) => {
1942
1934
  }
1943
1935
  return a;
1944
1936
  };
1945
- var __objRest$e = (source, exclude) => {
1937
+ var __objRest$d = (source, exclude) => {
1946
1938
  var target = {};
1947
1939
  for (var prop in source)
1948
1940
  if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1967,7 +1959,7 @@ function BasePopover(props) {
1967
1959
  plasmicUpdateVariant,
1968
1960
  setControlContextData,
1969
1961
  matchTriggerWidth
1970
- } = _a, restProps = __objRest$e(_a, [
1962
+ } = _a, restProps = __objRest$d(_a, [
1971
1963
  "resetClassName",
1972
1964
  "plasmicUpdateVariant",
1973
1965
  "setControlContextData",
@@ -1994,7 +1986,7 @@ function BasePopover(props) {
1994
1986
  // In component view, we never want to start with an empty artboard, so isOpen has to be true
1995
1987
  isOpen: true
1996
1988
  } : null
1997
- ), { children } = _b, mergedProps = __objRest$e(_b, ["children"]);
1989
+ ), { children } = _b, mergedProps = __objRest$d(_b, ["children"]);
1998
1990
  useEffect(() => {
1999
1991
  setControlContextData == null ? void 0 : setControlContextData({
2000
1992
  canMatchTriggerWidth: hasTrigger
@@ -2140,7 +2132,7 @@ var __spreadValues$e = (a, b) => {
2140
2132
  return a;
2141
2133
  };
2142
2134
  var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
2143
- var __objRest$d = (source, exclude) => {
2135
+ var __objRest$c = (source, exclude) => {
2144
2136
  var target = {};
2145
2137
  for (var prop in source)
2146
2138
  if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2169,7 +2161,7 @@ function BaseComboBox(props) {
2169
2161
  className,
2170
2162
  isDisabled,
2171
2163
  isOpen: _isOpen
2172
- } = _a, rest = __objRest$d(_a, [
2164
+ } = _a, rest = __objRest$c(_a, [
2173
2165
  "children",
2174
2166
  "setControlContextData",
2175
2167
  "plasmicUpdateVariant",
@@ -2372,7 +2364,7 @@ var __spreadValues$d = (a, b) => {
2372
2364
  }
2373
2365
  return a;
2374
2366
  };
2375
- var __objRest$c = (source, exclude) => {
2367
+ var __objRest$b = (source, exclude) => {
2376
2368
  var target = {};
2377
2369
  for (var prop in source)
2378
2370
  if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2385,7 +2377,7 @@ var __objRest$c = (source, exclude) => {
2385
2377
  return target;
2386
2378
  };
2387
2379
  function BaseHeading(_a) {
2388
- var _b = _a, { children } = _b, rest = __objRest$c(_b, ["children"]);
2380
+ var _b = _a, { children } = _b, rest = __objRest$b(_b, ["children"]);
2389
2381
  return /* @__PURE__ */ React.createElement(Heading, __spreadValues$d({}, rest), children);
2390
2382
  }
2391
2383
  const HEADING_COMPONENT_NAME = makeComponentName("heading");
@@ -2443,7 +2435,7 @@ var __spreadValues$c = (a, b) => {
2443
2435
  return a;
2444
2436
  };
2445
2437
  var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2446
- var __objRest$b = (source, exclude) => {
2438
+ var __objRest$a = (source, exclude) => {
2447
2439
  var target = {};
2448
2440
  for (var prop in source)
2449
2441
  if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2459,7 +2451,7 @@ const INLINE_STYLES = {
2459
2451
  outline: "none"
2460
2452
  };
2461
2453
  const BaseModal = forwardRef(
2462
- function _BaseModal(props, ref) {
2454
+ function BaseModalInner(props, ref) {
2463
2455
  var _b, _c, _d;
2464
2456
  const _a = props, {
2465
2457
  children,
@@ -2469,7 +2461,7 @@ const BaseModal = forwardRef(
2469
2461
  resetClassName,
2470
2462
  setControlContextData,
2471
2463
  isDismissable
2472
- } = _a, rest = __objRest$b(_a, [
2464
+ } = _a, rest = __objRest$a(_a, [
2473
2465
  "children",
2474
2466
  "modalOverlayClass",
2475
2467
  "className",
@@ -2478,6 +2470,8 @@ const BaseModal = forwardRef(
2478
2470
  "setControlContextData",
2479
2471
  "isDismissable"
2480
2472
  ]);
2473
+ const canvasCtx = usePlasmicCanvasContext();
2474
+ const isEditMode = canvasCtx && canvasCtx.interactive === false;
2481
2475
  const isSelected = (_d = (_c = (_b = usePlasmicCanvasComponentInfo) == null ? void 0 : _b(props)) == null ? void 0 : _c.isSelected) != null ? _d : false;
2482
2476
  const contextProps = React.useContext(PlasmicDialogTriggerContext);
2483
2477
  const isStandalone = !contextProps;
@@ -2488,10 +2482,9 @@ const BaseModal = forwardRef(
2488
2482
  1. Clicking anywhere inside the modal dismisses it
2489
2483
  2. If the modal is auto-opened due to selection in outline tab, the modal stays open despite issue #1, but the text elements inside the modal are no longer selectable, and therefore the text or headings inside the modal are not editable.
2490
2484
 
2491
- To fix the above issue, we set an interim isDismissable state to false while the modal is auto-open (`isSelected` is true).
2492
- Also note that `isSelected` can only be true in canvas (non-interactive mode), so we can safely (temporarily) set `isDismissable` to false in this case, because it only matters in interactive mode.
2485
+ To fix the above issue, we set an interim isDismissable state to false in edit mode, because it only matters in interactive mode.
2493
2486
  */
2494
- isDismissable: isSelected ? false : isDismissable
2487
+ isDismissable: isEditMode ? false : isDismissable
2495
2488
  });
2496
2489
  setControlContextData == null ? void 0 : setControlContextData({
2497
2490
  parent: isStandalone ? void 0 : {}
@@ -2506,7 +2499,6 @@ const BaseModal = forwardRef(
2506
2499
  (_a2 = mergedProps.onOpenChange) == null ? void 0 : _a2.call(mergedProps, true);
2507
2500
  }
2508
2501
  }));
2509
- const isCanvas = usePlasmicCanvasContext();
2510
2502
  const bodyInCanvas = /* @__PURE__ */ React.createElement("div", { style: INLINE_STYLES }, children);
2511
2503
  const bodyInPreview = /* @__PURE__ */ React.createElement(Dialog, { style: INLINE_STYLES }, children);
2512
2504
  return /* @__PURE__ */ React.createElement(
@@ -2514,7 +2506,7 @@ const BaseModal = forwardRef(
2514
2506
  __spreadProps$8(__spreadValues$c({}, mergedProps), {
2515
2507
  className: `${resetClassName} ${modalOverlayClass}`
2516
2508
  }),
2517
- /* @__PURE__ */ React.createElement(Modal, { className }, isCanvas ? bodyInCanvas : bodyInPreview)
2509
+ /* @__PURE__ */ React.createElement(Modal, { className }, canvasCtx ? bodyInCanvas : bodyInPreview)
2518
2510
  );
2519
2511
  }
2520
2512
  );
@@ -2651,7 +2643,7 @@ var __spreadValues$b = (a, b) => {
2651
2643
  return a;
2652
2644
  };
2653
2645
  var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2654
- var __objRest$a = (source, exclude) => {
2646
+ var __objRest$9 = (source, exclude) => {
2655
2647
  var target = {};
2656
2648
  for (var prop in source)
2657
2649
  if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2665,7 +2657,7 @@ var __objRest$a = (source, exclude) => {
2665
2657
  };
2666
2658
  function BaseDialogTrigger(props) {
2667
2659
  var _b, _c, _d;
2668
- const _a = props, { trigger, dialog, isOpen } = _a, rest = __objRest$a(_a, ["trigger", "dialog", "isOpen"]);
2660
+ const _a = props, { trigger, dialog, isOpen } = _a, rest = __objRest$9(_a, ["trigger", "dialog", "isOpen"]);
2669
2661
  const { isSelected, selectedSlotName } = (_c = (_b = usePlasmicCanvasComponentInfo) == null ? void 0 : _b(props)) != null ? _c : {};
2670
2662
  const isAutoOpen = selectedSlotName !== "trigger" && isSelected;
2671
2663
  const mergedProps = __spreadProps$7(__spreadValues$b({}, rest), {
@@ -2751,7 +2743,7 @@ var __spreadValues$a = (a, b) => {
2751
2743
  return a;
2752
2744
  };
2753
2745
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2754
- var __objRest$9 = (source, exclude) => {
2746
+ var __objRest$8 = (source, exclude) => {
2755
2747
  var target = {};
2756
2748
  for (var prop in source)
2757
2749
  if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2775,7 +2767,7 @@ const RADIO_VARIANTS = [
2775
2767
  ];
2776
2768
  const { variants: variants$9, withObservedValues: withObservedValues$8 } = pickAriaComponentVariants(RADIO_VARIANTS);
2777
2769
  function BaseRadio(props) {
2778
- const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$9(_a, ["children", "setControlContextData", "plasmicUpdateVariant"]);
2770
+ const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$8(_a, ["children", "setControlContextData", "plasmicUpdateVariant"]);
2779
2771
  const contextProps = React.useContext(PlasmicRadioGroupContext);
2780
2772
  const isStandalone = !contextProps;
2781
2773
  setControlContextData == null ? void 0 : setControlContextData({
@@ -2889,7 +2881,7 @@ var __spreadValues$9 = (a, b) => {
2889
2881
  return a;
2890
2882
  };
2891
2883
  var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2892
- var __objRest$8 = (source, exclude) => {
2884
+ var __objRest$7 = (source, exclude) => {
2893
2885
  var target = {};
2894
2886
  for (var prop in source)
2895
2887
  if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2904,7 +2896,7 @@ var __objRest$8 = (source, exclude) => {
2904
2896
  const RADIO_GROUP_VARIANTS = ["disabled", "readonly"];
2905
2897
  const { variants: variants$8, withObservedValues: withObservedValues$7 } = pickAriaComponentVariants(RADIO_GROUP_VARIANTS);
2906
2898
  function BaseRadioGroup(props) {
2907
- const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$8(_a, ["children", "plasmicUpdateVariant"]);
2899
+ const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$7(_a, ["children", "plasmicUpdateVariant"]);
2908
2900
  return /* @__PURE__ */ React.createElement(PlasmicRadioGroupContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$9({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$7(
2909
2901
  children,
2910
2902
  {
@@ -3057,7 +3049,17 @@ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
3057
3049
  function SelectAutoOpen(props) {
3058
3050
  var _a;
3059
3051
  const { open, close } = (_a = React.useContext(SelectStateContext)) != null ? _a : {};
3060
- useAutoOpen({ props, open, close });
3052
+ useAutoOpen({
3053
+ props,
3054
+ open: () => {
3055
+ open == null ? void 0 : open();
3056
+ setTimeout(() => {
3057
+ var _a2, _b;
3058
+ (_b = (_a2 = window.parent.document.activeElement) == null ? void 0 : _a2.blur) == null ? void 0 : _b.call(_a2);
3059
+ });
3060
+ },
3061
+ close
3062
+ });
3061
3063
  return null;
3062
3064
  }
3063
3065
  const BaseSelectValue = (props) => {
@@ -3314,7 +3316,7 @@ var __spreadValues$7 = (a, b) => {
3314
3316
  }
3315
3317
  return a;
3316
3318
  };
3317
- var __objRest$7 = (source, exclude) => {
3319
+ var __objRest$6 = (source, exclude) => {
3318
3320
  var target = {};
3319
3321
  for (var prop in source)
3320
3322
  if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -3331,7 +3333,7 @@ const { variants: variants$7, withObservedValues: withObservedValues$6 } = pickA
3331
3333
  SLIDER_OUTPUT_VARIANTS
3332
3334
  );
3333
3335
  function BaseSliderOutput(props) {
3334
- const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$7(_a, ["plasmicUpdateVariant", "children"]);
3336
+ const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$6(_a, ["plasmicUpdateVariant", "children"]);
3335
3337
  return /* @__PURE__ */ React.createElement(SliderOutput, __spreadValues$7({}, rest), ({ isDisabled }) => withObservedValues$6(
3336
3338
  children,
3337
3339
  {
@@ -3398,7 +3400,7 @@ var __spreadValues$6 = (a, b) => {
3398
3400
  return a;
3399
3401
  };
3400
3402
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
3401
- var __objRest$6 = (source, exclude) => {
3403
+ var __objRest$5 = (source, exclude) => {
3402
3404
  var target = {};
3403
3405
  for (var prop in source)
3404
3406
  if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -3425,7 +3427,7 @@ function BaseSliderThumb(_a) {
3425
3427
  children,
3426
3428
  advanced,
3427
3429
  plasmicUpdateVariant
3428
- } = _b, rest = __objRest$6(_b, [
3430
+ } = _b, rest = __objRest$5(_b, [
3429
3431
  "children",
3430
3432
  "advanced",
3431
3433
  "plasmicUpdateVariant"
@@ -3507,7 +3509,7 @@ var __spreadValues$5 = (a, b) => {
3507
3509
  }
3508
3510
  return a;
3509
3511
  };
3510
- var __objRest$5 = (source, exclude) => {
3512
+ var __objRest$4 = (source, exclude) => {
3511
3513
  var target = {};
3512
3514
  for (var prop in source)
3513
3515
  if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -3544,7 +3546,7 @@ function isMultiValueGuard(value) {
3544
3546
  function BaseSliderTrack(props) {
3545
3547
  const context = React.useContext(PlasmicSliderContext);
3546
3548
  const isStandalone = !context;
3547
- const _a = props, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$5(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
3549
+ const _a = props, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$4(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
3548
3550
  const thumbsLength = context && isMultiValueGuard(context.value) ? context.value.length : 1;
3549
3551
  const isMultiValue = thumbsLength > 1;
3550
3552
  const { minIndex, maxIndex } = useMemo(() => {
@@ -3691,7 +3693,7 @@ var __spreadValues$4 = (a, b) => {
3691
3693
  return a;
3692
3694
  };
3693
3695
  var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
3694
- var __objRest$4 = (source, exclude) => {
3696
+ var __objRest$3 = (source, exclude) => {
3695
3697
  var target = {};
3696
3698
  for (var prop in source)
3697
3699
  if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -3708,7 +3710,7 @@ const RANGE_SLIDER_COMPONENT_NAME = makeComponentName("range-slider");
3708
3710
  const SLIDER_VARIANTS = ["disabled"];
3709
3711
  const { variants: variants$4, withObservedValues: withObservedValues$3 } = pickAriaComponentVariants(SLIDER_VARIANTS);
3710
3712
  function BaseSlider(props) {
3711
- const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$4(_a, ["children", "plasmicUpdateVariant"]);
3713
+ const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$3(_a, ["children", "plasmicUpdateVariant"]);
3712
3714
  return /* @__PURE__ */ React.createElement(
3713
3715
  PlasmicSliderContext.Provider,
3714
3716
  {
@@ -3980,7 +3982,7 @@ var __spreadValues$3 = (a, b) => {
3980
3982
  return a;
3981
3983
  };
3982
3984
  var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
3983
- var __objRest$3 = (source, exclude) => {
3985
+ var __objRest$2 = (source, exclude) => {
3984
3986
  var target = {};
3985
3987
  for (var prop in source)
3986
3988
  if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -4003,7 +4005,7 @@ const SWITCH_VARIANTS = [
4003
4005
  ];
4004
4006
  const { variants: variants$3, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(SWITCH_VARIANTS);
4005
4007
  function BaseSwitch(props) {
4006
- const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$3(_a, ["children", "plasmicUpdateVariant"]);
4008
+ const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$2(_a, ["children", "plasmicUpdateVariant"]);
4007
4009
  return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({
4008
4010
  isHovered,
4009
4011
  isPressed,
@@ -4169,7 +4171,7 @@ var __spreadValues$2 = (a, b) => {
4169
4171
  }
4170
4172
  return a;
4171
4173
  };
4172
- var __objRest$2 = (source, exclude) => {
4174
+ var __objRest$1 = (source, exclude) => {
4173
4175
  var target = {};
4174
4176
  for (var prop in source)
4175
4177
  if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -4198,7 +4200,7 @@ const inputHelpers = {
4198
4200
  };
4199
4201
  function BaseTextArea(props) {
4200
4202
  var _b;
4201
- const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$2(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
4203
+ const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$1(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
4202
4204
  const textFieldContext = React.useContext(PlasmicTextFieldContext);
4203
4205
  const mergedProps = mergeProps(rest, {
4204
4206
  disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
@@ -4306,7 +4308,7 @@ var __spreadValues$1 = (a, b) => {
4306
4308
  return a;
4307
4309
  };
4308
4310
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
4309
- var __objRest$1 = (source, exclude) => {
4311
+ var __objRest = (source, exclude) => {
4310
4312
  var target = {};
4311
4313
  for (var prop in source)
4312
4314
  if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -4321,7 +4323,7 @@ var __objRest$1 = (source, exclude) => {
4321
4323
  const TEXT_FIELD_VARIANTS = ["disabled", "readonly"];
4322
4324
  const { variants: variants$1, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
4323
4325
  function BaseTextField(props) {
4324
- const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest$1(_a, ["children", "plasmicUpdateVariant", "autoComplete"]);
4326
+ const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest(_a, ["children", "plasmicUpdateVariant", "autoComplete"]);
4325
4327
  return /* @__PURE__ */ React.createElement(PlasmicTextFieldContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(TextField, __spreadValues$1({ autoComplete: resolveAutoComplete(autoComplete) }, rest), ({ isDisabled, isReadOnly }) => withObservedValues$1(
4326
4328
  children,
4327
4329
  {
@@ -4460,18 +4462,6 @@ var __spreadValues = (a, b) => {
4460
4462
  }
4461
4463
  return a;
4462
4464
  };
4463
- var __objRest = (source, exclude) => {
4464
- var target = {};
4465
- for (var prop in source)
4466
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
4467
- target[prop] = source[prop];
4468
- if (source != null && __getOwnPropSymbols)
4469
- for (var prop of __getOwnPropSymbols(source)) {
4470
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
4471
- target[prop] = source[prop];
4472
- }
4473
- return target;
4474
- };
4475
4465
  const TOOLTIP_VARIANTS = [
4476
4466
  "placementTop",
4477
4467
  "placementBottom",
@@ -4479,18 +4469,13 @@ const TOOLTIP_VARIANTS = [
4479
4469
  "placementRight"
4480
4470
  ];
4481
4471
  const { variants, withObservedValues } = pickAriaComponentVariants(TOOLTIP_VARIANTS);
4482
- function TriggerWrapper(_a) {
4483
- var _b = _a, {
4484
- children
4485
- } = _b, rest = __objRest(_b, [
4486
- "children"
4487
- ]);
4472
+ function TriggerWrapper({ children, className }) {
4488
4473
  const ref = React.useRef(null);
4489
- const { focusableProps } = useFocusable(rest, ref);
4490
- return /* @__PURE__ */ React.createElement("div", __spreadValues({ ref }, focusableProps), children);
4474
+ const { focusableProps } = useFocusable({}, ref);
4475
+ return /* @__PURE__ */ React.createElement("div", __spreadValues({ ref, className }, focusableProps), children);
4491
4476
  }
4492
4477
  function BaseTooltip(props) {
4493
- var _a, _b;
4478
+ var _a, _b, _c;
4494
4479
  const {
4495
4480
  children,
4496
4481
  isDisabled,
@@ -4511,7 +4496,7 @@ function BaseTooltip(props) {
4511
4496
  } = props;
4512
4497
  const { isSelected, selectedSlotName } = (_b = (_a = usePlasmicCanvasComponentInfo) == null ? void 0 : _a(props)) != null ? _b : {};
4513
4498
  const isAutoOpen = selectedSlotName !== "children" && isSelected;
4514
- const _isOpen = isAutoOpen || isOpen;
4499
+ const _isOpen = (_c = isAutoOpen || isOpen) != null ? _c : false;
4515
4500
  return /* @__PURE__ */ React.createElement(
4516
4501
  TooltipTrigger,
4517
4502
  {
@@ -4523,7 +4508,7 @@ function BaseTooltip(props) {
4523
4508
  defaultOpen,
4524
4509
  onOpenChange
4525
4510
  },
4526
- /* @__PURE__ */ React.createElement(TriggerWrapper, null, children),
4511
+ /* @__PURE__ */ React.createElement(TriggerWrapper, { className: resetClassName }, children),
4527
4512
  /* @__PURE__ */ React.createElement(
4528
4513
  Tooltip,
4529
4514
  {