@plasmicpkgs/react-aria 0.0.68 → 0.0.70
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 +35 -60
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +35 -60
- package/dist/react-aria.js.map +1 -1
- package/dist/registerListBox.d.ts +1 -1
- package/dist/registerPopover.d.ts +2 -6
- package/dist/registerSection.d.ts +0 -2
- package/package.json +2 -2
- package/skinny/registerComboBox.cjs.js +14 -20
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +14 -20
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/{registerListBox-62e01fbb.cjs.js → registerListBox-44b5ecda.cjs.js} +7 -7
- package/skinny/registerListBox-44b5ecda.cjs.js.map +1 -0
- package/skinny/{registerListBox-5425b5fe.esm.js → registerListBox-5d740ec8.esm.js} +7 -7
- package/skinny/registerListBox-5d740ec8.esm.js.map +1 -0
- package/skinny/registerListBox.cjs.js +1 -1
- package/skinny/registerListBox.d.ts +1 -1
- package/skinny/registerListBox.esm.js +1 -1
- package/skinny/registerListBoxItem.cjs.js +1 -1
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.esm.js +1 -1
- package/skinny/registerListBoxItem.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +3 -16
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.d.ts +2 -6
- package/skinny/registerPopover.esm.js +3 -16
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js.map +1 -1
- package/skinny/registerSection.d.ts +0 -2
- package/skinny/registerSection.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +13 -19
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +13 -19
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerListBox-5425b5fe.esm.js.map +0 -1
- package/skinny/registerListBox-62e01fbb.cjs.js.map +0 -1
package/dist/react-aria.esm.js
CHANGED
|
@@ -1690,7 +1690,7 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1690
1690
|
props: {
|
|
1691
1691
|
id: {
|
|
1692
1692
|
type: "string",
|
|
1693
|
-
description: "A unique
|
|
1693
|
+
description: "A unique value for tracking the selected item in state",
|
|
1694
1694
|
required: true,
|
|
1695
1695
|
displayName: "Value",
|
|
1696
1696
|
validator: (_value, _props, ctx) => {
|
|
@@ -1816,7 +1816,7 @@ var __objRest$e = (source, exclude) => {
|
|
|
1816
1816
|
};
|
|
1817
1817
|
const listboxHelpers = {
|
|
1818
1818
|
states: {
|
|
1819
|
-
|
|
1819
|
+
selectedValue: {
|
|
1820
1820
|
onChangeArgsToValue: (value) => {
|
|
1821
1821
|
return Array.from(value)[0];
|
|
1822
1822
|
}
|
|
@@ -2015,10 +2015,9 @@ function registerListBox(loader, overrides) {
|
|
|
2015
2015
|
},
|
|
2016
2016
|
selectedKeys: {
|
|
2017
2017
|
type: "choice",
|
|
2018
|
-
description: "The selected keys of the listbox",
|
|
2019
2018
|
editOnly: true,
|
|
2020
2019
|
uncontrolledProp: "defaultSelectedKeys",
|
|
2021
|
-
displayName: "Initial selected
|
|
2020
|
+
displayName: "Initial selected item",
|
|
2022
2021
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
2023
2022
|
hidden: (props, ctx) => !(ctx == null ? void 0 : ctx.isStandalone) || props.selectionMode === "none",
|
|
2024
2023
|
// We do not support multiple selections yet (Because React Aria select and combobox only support single selections).
|
|
@@ -2026,16 +2025,17 @@ function registerListBox(loader, overrides) {
|
|
|
2026
2025
|
},
|
|
2027
2026
|
onSelectionChange: {
|
|
2028
2027
|
type: "eventHandler",
|
|
2029
|
-
argTypes: [{ name: "
|
|
2028
|
+
argTypes: [{ name: "selectedValues", type: "object" }]
|
|
2030
2029
|
}
|
|
2031
2030
|
},
|
|
2032
2031
|
states: {
|
|
2033
|
-
|
|
2032
|
+
selectedValue: __spreadValues$g({
|
|
2034
2033
|
type: "writable",
|
|
2035
2034
|
valueProp: "selectedKeys",
|
|
2035
|
+
hidden: (props, ctx) => !(ctx == null ? void 0 : ctx.isStandalone) || props.selectionMode === "none",
|
|
2036
2036
|
onChangeProp: "onSelectionChange",
|
|
2037
2037
|
variableType: "text"
|
|
2038
|
-
}, listboxHelpers.states.
|
|
2038
|
+
}, listboxHelpers.states.selectedValue)
|
|
2039
2039
|
},
|
|
2040
2040
|
componentHelpers: {
|
|
2041
2041
|
helpers: listboxHelpers,
|
|
@@ -2084,24 +2084,14 @@ const POPOVER_VARIANTS = [
|
|
|
2084
2084
|
];
|
|
2085
2085
|
const { variants: variants$a, withObservedValues: withObservedValues$9 } = pickAriaComponentVariants(POPOVER_VARIANTS);
|
|
2086
2086
|
function BasePopover(props) {
|
|
2087
|
-
|
|
2088
|
-
const _a = props, {
|
|
2089
|
-
resetClassName,
|
|
2090
|
-
setControlContextData,
|
|
2091
|
-
plasmicUpdateVariant
|
|
2092
|
-
} = _a, restProps = __objRest$d(_a, [
|
|
2093
|
-
"resetClassName",
|
|
2094
|
-
"setControlContextData",
|
|
2095
|
-
"plasmicUpdateVariant"
|
|
2096
|
-
]);
|
|
2087
|
+
const _a = props, { resetClassName, plasmicUpdateVariant } = _a, restProps = __objRest$d(_a, ["resetClassName", "plasmicUpdateVariant"]);
|
|
2097
2088
|
const isStandalone = !React.useContext(PopoverContext);
|
|
2098
2089
|
const context = React.useContext(PlasmicPopoverContext);
|
|
2099
2090
|
const triggerRef = React.useRef(null);
|
|
2100
2091
|
const isEditMode = !!usePlasmicCanvasContext();
|
|
2101
2092
|
const _b = mergeProps$1(
|
|
2102
2093
|
{
|
|
2103
|
-
isOpen: context == null ? void 0 : context.isOpen
|
|
2104
|
-
shouldFlip: context == null ? void 0 : context.defaultShouldFlip
|
|
2094
|
+
isOpen: context == null ? void 0 : context.isOpen
|
|
2105
2095
|
},
|
|
2106
2096
|
/**
|
|
2107
2097
|
* isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies. *
|
|
@@ -2122,9 +2112,6 @@ function BasePopover(props) {
|
|
|
2122
2112
|
isOpen: true
|
|
2123
2113
|
} : null
|
|
2124
2114
|
), { children } = _b, mergedProps = __objRest$d(_b, ["children"]);
|
|
2125
|
-
setControlContextData == null ? void 0 : setControlContextData({
|
|
2126
|
-
defaultShouldFlip: (_c = context == null ? void 0 : context.defaultShouldFlip) != null ? _c : true
|
|
2127
|
-
});
|
|
2128
2115
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, isStandalone && /* @__PURE__ */ React.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React.createElement(Popover, __spreadValues$f({}, mergedProps), ({ placement }) => withObservedValues$9(
|
|
2129
2116
|
children,
|
|
2130
2117
|
{
|
|
@@ -2209,7 +2196,7 @@ function registerPopover(loader, overrides) {
|
|
|
2209
2196
|
shouldFlip: {
|
|
2210
2197
|
type: "boolean",
|
|
2211
2198
|
description: "Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.",
|
|
2212
|
-
defaultValueHint:
|
|
2199
|
+
defaultValueHint: true
|
|
2213
2200
|
},
|
|
2214
2201
|
placement: {
|
|
2215
2202
|
type: "choice",
|
|
@@ -2294,21 +2281,15 @@ function BaseComboBox(props) {
|
|
|
2294
2281
|
});
|
|
2295
2282
|
});
|
|
2296
2283
|
}, []);
|
|
2297
|
-
return /* @__PURE__ */ React.createElement(ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React.createElement(
|
|
2298
|
-
|
|
2284
|
+
return /* @__PURE__ */ React.createElement(ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React.createElement(PlasmicPopoverContext.Provider, { value: { isOpen } }, /* @__PURE__ */ React.createElement(
|
|
2285
|
+
PlasmicListBoxContext.Provider,
|
|
2299
2286
|
{
|
|
2300
|
-
value: {
|
|
2287
|
+
value: {
|
|
2288
|
+
idManager
|
|
2289
|
+
}
|
|
2301
2290
|
},
|
|
2302
|
-
/* @__PURE__ */ React.createElement(
|
|
2303
|
-
|
|
2304
|
-
{
|
|
2305
|
-
value: {
|
|
2306
|
-
idManager
|
|
2307
|
-
}
|
|
2308
|
-
},
|
|
2309
|
-
/* @__PURE__ */ React.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
|
|
2310
|
-
)
|
|
2311
|
-
));
|
|
2291
|
+
/* @__PURE__ */ React.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
|
|
2292
|
+
)));
|
|
2312
2293
|
}
|
|
2313
2294
|
function registerComboBox(loader) {
|
|
2314
2295
|
registerComponentHelper(loader, BaseComboBox, {
|
|
@@ -2324,17 +2305,17 @@ function registerComboBox(loader) {
|
|
|
2324
2305
|
])), {
|
|
2325
2306
|
selectedKey: {
|
|
2326
2307
|
type: "choice",
|
|
2327
|
-
description: "The selected keys of the listbox",
|
|
2328
2308
|
editOnly: true,
|
|
2329
2309
|
uncontrolledProp: "defaultSelectedKey",
|
|
2330
|
-
displayName: "Initial selected
|
|
2310
|
+
displayName: "Initial selected item",
|
|
2331
2311
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
2332
|
-
// React Aria ComboBox do not support multiple
|
|
2312
|
+
// React Aria ComboBox do not support multiple selections yet
|
|
2333
2313
|
multiSelect: false
|
|
2334
2314
|
},
|
|
2335
2315
|
disabledKeys: {
|
|
2336
2316
|
type: "choice",
|
|
2337
|
-
|
|
2317
|
+
displayName: "Disabled values",
|
|
2318
|
+
description: "The items that are disabled. These items cannot be selected, focused, or otherwise interacted with.",
|
|
2338
2319
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
2339
2320
|
multiSelect: true,
|
|
2340
2321
|
advanced: true
|
|
@@ -2347,7 +2328,7 @@ function registerComboBox(loader) {
|
|
|
2347
2328
|
},
|
|
2348
2329
|
onSelectionChange: {
|
|
2349
2330
|
type: "eventHandler",
|
|
2350
|
-
argTypes: [{ name: "
|
|
2331
|
+
argTypes: [{ name: "selectedValue", type: "string" }]
|
|
2351
2332
|
},
|
|
2352
2333
|
onOpenChange: {
|
|
2353
2334
|
type: "eventHandler",
|
|
@@ -2433,7 +2414,7 @@ function registerComboBox(loader) {
|
|
|
2433
2414
|
}
|
|
2434
2415
|
}),
|
|
2435
2416
|
states: {
|
|
2436
|
-
|
|
2417
|
+
selectedValue: {
|
|
2437
2418
|
type: "writable",
|
|
2438
2419
|
valueProp: "selectedKey",
|
|
2439
2420
|
onChangeProp: "onSelectionChange",
|
|
@@ -3196,21 +3177,15 @@ function BaseSelect(props) {
|
|
|
3196
3177
|
"aria-label": ariaLabel,
|
|
3197
3178
|
isOpen: _isOpen
|
|
3198
3179
|
}, extractPlasmicDataProps(props)),
|
|
3199
|
-
/* @__PURE__ */ React.createElement(
|
|
3200
|
-
|
|
3180
|
+
/* @__PURE__ */ React.createElement(PlasmicPopoverContext.Provider, { value: { isOpen: _isOpen } }, /* @__PURE__ */ React.createElement(
|
|
3181
|
+
PlasmicListBoxContext.Provider,
|
|
3201
3182
|
{
|
|
3202
|
-
value: {
|
|
3183
|
+
value: {
|
|
3184
|
+
idManager
|
|
3185
|
+
}
|
|
3203
3186
|
},
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
{
|
|
3207
|
-
value: {
|
|
3208
|
-
idManager
|
|
3209
|
-
}
|
|
3210
|
-
},
|
|
3211
|
-
children
|
|
3212
|
-
)
|
|
3213
|
-
)
|
|
3187
|
+
children
|
|
3188
|
+
))
|
|
3214
3189
|
);
|
|
3215
3190
|
}
|
|
3216
3191
|
function registerSelect(loader) {
|
|
@@ -3261,21 +3236,21 @@ function registerSelect(loader) {
|
|
|
3261
3236
|
])), {
|
|
3262
3237
|
selectedKey: {
|
|
3263
3238
|
type: "choice",
|
|
3264
|
-
description: "The selected keys of the listbox",
|
|
3265
3239
|
editOnly: true,
|
|
3266
3240
|
uncontrolledProp: "defaultSelectedKey",
|
|
3267
|
-
displayName: "Initial selected
|
|
3241
|
+
displayName: "Initial selected item",
|
|
3268
3242
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
3269
3243
|
// React Aria Select do not support multiple selections yet
|
|
3270
3244
|
multiSelect: false
|
|
3271
3245
|
},
|
|
3272
3246
|
onSelectionChange: {
|
|
3273
3247
|
type: "eventHandler",
|
|
3274
|
-
argTypes: [{ name: "
|
|
3248
|
+
argTypes: [{ name: "selectedValue", type: "string" }]
|
|
3275
3249
|
},
|
|
3276
3250
|
disabledKeys: {
|
|
3277
3251
|
type: "choice",
|
|
3278
|
-
|
|
3252
|
+
displayName: "Disabled values",
|
|
3253
|
+
description: "The items that are disabled. These items cannot be selected, focused, or otherwise interacted with.",
|
|
3279
3254
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
3280
3255
|
multiSelect: true,
|
|
3281
3256
|
advanced: true
|
|
@@ -3376,7 +3351,7 @@ function registerSelect(loader) {
|
|
|
3376
3351
|
}
|
|
3377
3352
|
}),
|
|
3378
3353
|
states: {
|
|
3379
|
-
|
|
3354
|
+
selectedValue: {
|
|
3380
3355
|
type: "writable",
|
|
3381
3356
|
valueProp: "selectedKey",
|
|
3382
3357
|
onChangeProp: "onSelectionChange",
|