@plasmicpkgs/react-aria 0.0.74 → 0.0.76

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 (40) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/react-aria.esm.js +15 -9
  3. package/dist/react-aria.esm.js.map +1 -1
  4. package/dist/react-aria.js +15 -9
  5. package/dist/react-aria.js.map +1 -1
  6. package/package.json +2 -2
  7. package/skinny/registerComboBox.cjs.js +4 -5
  8. package/skinny/registerComboBox.cjs.js.map +1 -1
  9. package/skinny/registerComboBox.esm.js +2 -3
  10. package/skinny/registerComboBox.esm.js.map +1 -1
  11. package/skinny/{registerListBox-3beb3a9f.esm.js → registerListBox-32d2fae3.esm.js} +81 -5
  12. package/skinny/registerListBox-32d2fae3.esm.js.map +1 -0
  13. package/skinny/{registerListBox-3f613b40.cjs.js → registerListBox-3d146fe7.cjs.js} +81 -3
  14. package/skinny/registerListBox-3d146fe7.cjs.js.map +1 -0
  15. package/skinny/registerListBox.cjs.js +5 -7
  16. package/skinny/registerListBox.cjs.js.map +1 -1
  17. package/skinny/registerListBox.esm.js +1 -3
  18. package/skinny/registerListBox.esm.js.map +1 -1
  19. package/skinny/registerSection.cjs.js +11 -78
  20. package/skinny/registerSection.cjs.js.map +1 -1
  21. package/skinny/registerSection.esm.js +9 -76
  22. package/skinny/registerSection.esm.js.map +1 -1
  23. package/skinny/registerSelect.cjs.js +4 -5
  24. package/skinny/registerSelect.cjs.js.map +1 -1
  25. package/skinny/registerSelect.esm.js +2 -3
  26. package/skinny/registerSelect.esm.js.map +1 -1
  27. package/skinny/registerSlider.cjs.js +0 -1
  28. package/skinny/registerSlider.cjs.js.map +1 -1
  29. package/skinny/registerSlider.esm.js +0 -1
  30. package/skinny/registerSlider.esm.js.map +1 -1
  31. package/skinny/registerSliderThumb.cjs.js +1 -5
  32. package/skinny/registerSliderThumb.cjs.js.map +1 -1
  33. package/skinny/registerSliderThumb.esm.js +1 -5
  34. package/skinny/registerSliderThumb.esm.js.map +1 -1
  35. package/skinny/registerSliderTrack.cjs.js +4 -5
  36. package/skinny/registerSliderTrack.cjs.js.map +1 -1
  37. package/skinny/registerSliderTrack.esm.js +4 -5
  38. package/skinny/registerSliderTrack.esm.js.map +1 -1
  39. package/skinny/registerListBox-3beb3a9f.esm.js.map +0 -1
  40. package/skinny/registerListBox-3f613b40.cjs.js.map +0 -1
@@ -1771,8 +1771,16 @@ var __objRest$g = (source, exclude) => {
1771
1771
  function BaseSection(props) {
1772
1772
  const _a = props, { header, items } = _a, rest = __objRest$g(_a, ["header", "items"]);
1773
1773
  const contextProps = React.useContext(PlasmicListBoxContext);
1774
- const mergedProps = mergeProps$1(contextProps, rest);
1775
- return /* @__PURE__ */ React.createElement(Section, __spreadValues$h({}, mergedProps), /* @__PURE__ */ React.createElement(Header, null, header), items);
1774
+ const isStandalone = !contextProps;
1775
+ const section = /* @__PURE__ */ React.createElement(Section, __spreadValues$h({}, rest), /* @__PURE__ */ React.createElement(Header, null, header), items);
1776
+ if (isStandalone) {
1777
+ return (
1778
+ // BaseListbox should give section a listbox context (that it can't be used without)
1779
+ // as well as the id manager (that is needed to identify and warn about duplication of ids)
1780
+ /* @__PURE__ */ React.createElement(BaseListBox, null, section)
1781
+ );
1782
+ }
1783
+ return section;
1776
1784
  }
1777
1785
  function registerSection(loader, overrides) {
1778
1786
  return registerComponentHelper(
@@ -3540,9 +3548,7 @@ function BaseSliderThumb(_a) {
3540
3548
  "advanced",
3541
3549
  "plasmicUpdateVariant"
3542
3550
  ]);
3543
- const context = React.useContext(PlasmicSliderContext);
3544
- const mergedProps = mergeProps(context, rest);
3545
- const thumb = /* @__PURE__ */ React.createElement(SliderThumb, __spreadValues$6({}, mergedProps), ({ isDragging, isHovered, isFocused, isFocusVisible, isDisabled }) => withObservedValues$5(
3551
+ const thumb = /* @__PURE__ */ React.createElement(SliderThumb, __spreadValues$6({}, rest), ({ isDragging, isHovered, isFocused, isFocusVisible, isDisabled }) => withObservedValues$5(
3546
3552
  /* @__PURE__ */ React.createElement(React.Fragment, null, advanced ? children : void 0),
3547
3553
  {
3548
3554
  dragging: isDragging,
@@ -3656,15 +3662,15 @@ function isMultiValueGuard(value) {
3656
3662
  function BaseSliderTrack(props) {
3657
3663
  const context = React.useContext(PlasmicSliderContext);
3658
3664
  const isStandalone = !context;
3659
- const mergedProps = mergeProps(context, props);
3660
- const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$5(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
3661
- const isMultiValue = isMultiValueGuard(mergedProps.value);
3665
+ const _a = props, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$5(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
3666
+ const thumbsLength = context && isMultiValueGuard(context.value) ? context.value.length : 1;
3667
+ const isMultiValue = thumbsLength > 1;
3662
3668
  const { minIndex, maxIndex } = useMemo(() => {
3663
3669
  if (!context || !Array.isArray(context.value) || context.value.length <= 1) {
3664
3670
  return { minIndex: 0, maxIndex: 0 };
3665
3671
  }
3666
3672
  return findMinMaxIndices(context.value);
3667
- }, [context == null ? void 0 : context.value]);
3673
+ }, [thumbsLength]);
3668
3674
  const thumbs = useMemo(() => {
3669
3675
  const thumbNodes = flattenChildren(children);
3670
3676
  if (!thumbNodes || thumbNodes.length === 0 || !isDefined(context == null ? void 0 : context.value)) {