@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.js
CHANGED
|
@@ -1779,8 +1779,16 @@ var __objRest$g = (source, exclude) => {
|
|
|
1779
1779
|
function BaseSection(props) {
|
|
1780
1780
|
const _a = props, { header, items } = _a, rest = __objRest$g(_a, ["header", "items"]);
|
|
1781
1781
|
const contextProps = React__default.default.useContext(PlasmicListBoxContext);
|
|
1782
|
-
const
|
|
1783
|
-
|
|
1782
|
+
const isStandalone = !contextProps;
|
|
1783
|
+
const section = /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Section, __spreadValues$h({}, rest), /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Header, null, header), items);
|
|
1784
|
+
if (isStandalone) {
|
|
1785
|
+
return (
|
|
1786
|
+
// BaseListbox should give section a listbox context (that it can't be used without)
|
|
1787
|
+
// as well as the id manager (that is needed to identify and warn about duplication of ids)
|
|
1788
|
+
/* @__PURE__ */ React__default.default.createElement(BaseListBox, null, section)
|
|
1789
|
+
);
|
|
1790
|
+
}
|
|
1791
|
+
return section;
|
|
1784
1792
|
}
|
|
1785
1793
|
function registerSection(loader, overrides) {
|
|
1786
1794
|
return registerComponentHelper(
|
|
@@ -3548,9 +3556,7 @@ function BaseSliderThumb(_a) {
|
|
|
3548
3556
|
"advanced",
|
|
3549
3557
|
"plasmicUpdateVariant"
|
|
3550
3558
|
]);
|
|
3551
|
-
const
|
|
3552
|
-
const mergedProps = reactAria.mergeProps(context, rest);
|
|
3553
|
-
const thumb = /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.SliderThumb, __spreadValues$6({}, mergedProps), ({ isDragging, isHovered, isFocused, isFocusVisible, isDisabled }) => withObservedValues$5(
|
|
3559
|
+
const thumb = /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.SliderThumb, __spreadValues$6({}, rest), ({ isDragging, isHovered, isFocused, isFocusVisible, isDisabled }) => withObservedValues$5(
|
|
3554
3560
|
/* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, advanced ? children : void 0),
|
|
3555
3561
|
{
|
|
3556
3562
|
dragging: isDragging,
|
|
@@ -3664,15 +3670,15 @@ function isMultiValueGuard(value) {
|
|
|
3664
3670
|
function BaseSliderTrack(props) {
|
|
3665
3671
|
const context = React__default.default.useContext(PlasmicSliderContext);
|
|
3666
3672
|
const isStandalone = !context;
|
|
3667
|
-
const
|
|
3668
|
-
const
|
|
3669
|
-
const isMultiValue =
|
|
3673
|
+
const _a = props, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$5(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
|
|
3674
|
+
const thumbsLength = context && isMultiValueGuard(context.value) ? context.value.length : 1;
|
|
3675
|
+
const isMultiValue = thumbsLength > 1;
|
|
3670
3676
|
const { minIndex, maxIndex } = React.useMemo(() => {
|
|
3671
3677
|
if (!context || !Array.isArray(context.value) || context.value.length <= 1) {
|
|
3672
3678
|
return { minIndex: 0, maxIndex: 0 };
|
|
3673
3679
|
}
|
|
3674
3680
|
return findMinMaxIndices(context.value);
|
|
3675
|
-
}, [
|
|
3681
|
+
}, [thumbsLength]);
|
|
3676
3682
|
const thumbs = React.useMemo(() => {
|
|
3677
3683
|
const thumbNodes = flattenChildren__default.default(children);
|
|
3678
3684
|
if (!thumbNodes || thumbNodes.length === 0 || !isDefined(context == null ? void 0 : context.value)) {
|