@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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/react-aria.esm.js +15 -9
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +15 -9
- package/dist/react-aria.js.map +1 -1
- package/package.json +2 -2
- package/skinny/registerComboBox.cjs.js +4 -5
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +2 -3
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/{registerListBox-3beb3a9f.esm.js → registerListBox-32d2fae3.esm.js} +81 -5
- package/skinny/registerListBox-32d2fae3.esm.js.map +1 -0
- package/skinny/{registerListBox-3f613b40.cjs.js → registerListBox-3d146fe7.cjs.js} +81 -3
- package/skinny/registerListBox-3d146fe7.cjs.js.map +1 -0
- package/skinny/registerListBox.cjs.js +5 -7
- package/skinny/registerListBox.cjs.js.map +1 -1
- package/skinny/registerListBox.esm.js +1 -3
- package/skinny/registerListBox.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +11 -78
- package/skinny/registerSection.cjs.js.map +1 -1
- package/skinny/registerSection.esm.js +9 -76
- package/skinny/registerSection.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +4 -5
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +2 -3
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSlider.cjs.js +0 -1
- package/skinny/registerSlider.cjs.js.map +1 -1
- package/skinny/registerSlider.esm.js +0 -1
- package/skinny/registerSlider.esm.js.map +1 -1
- package/skinny/registerSliderThumb.cjs.js +1 -5
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.esm.js +1 -5
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerSliderTrack.cjs.js +4 -5
- package/skinny/registerSliderTrack.cjs.js.map +1 -1
- package/skinny/registerSliderTrack.esm.js +4 -5
- package/skinny/registerSliderTrack.esm.js.map +1 -1
- package/skinny/registerListBox-3beb3a9f.esm.js.map +0 -1
- package/skinny/registerListBox-3f613b40.cjs.js.map +0 -1
package/dist/react-aria.esm.js
CHANGED
|
@@ -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
|
|
1775
|
-
|
|
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
|
|
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
|
|
3660
|
-
const
|
|
3661
|
-
const isMultiValue =
|
|
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
|
-
}, [
|
|
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)) {
|