@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.js
CHANGED
|
@@ -1698,7 +1698,7 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1698
1698
|
props: {
|
|
1699
1699
|
id: {
|
|
1700
1700
|
type: "string",
|
|
1701
|
-
description: "A unique
|
|
1701
|
+
description: "A unique value for tracking the selected item in state",
|
|
1702
1702
|
required: true,
|
|
1703
1703
|
displayName: "Value",
|
|
1704
1704
|
validator: (_value, _props, ctx) => {
|
|
@@ -1824,7 +1824,7 @@ var __objRest$e = (source, exclude) => {
|
|
|
1824
1824
|
};
|
|
1825
1825
|
const listboxHelpers = {
|
|
1826
1826
|
states: {
|
|
1827
|
-
|
|
1827
|
+
selectedValue: {
|
|
1828
1828
|
onChangeArgsToValue: (value) => {
|
|
1829
1829
|
return Array.from(value)[0];
|
|
1830
1830
|
}
|
|
@@ -2023,10 +2023,9 @@ function registerListBox(loader, overrides) {
|
|
|
2023
2023
|
},
|
|
2024
2024
|
selectedKeys: {
|
|
2025
2025
|
type: "choice",
|
|
2026
|
-
description: "The selected keys of the listbox",
|
|
2027
2026
|
editOnly: true,
|
|
2028
2027
|
uncontrolledProp: "defaultSelectedKeys",
|
|
2029
|
-
displayName: "Initial selected
|
|
2028
|
+
displayName: "Initial selected item",
|
|
2030
2029
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
2031
2030
|
hidden: (props, ctx) => !(ctx == null ? void 0 : ctx.isStandalone) || props.selectionMode === "none",
|
|
2032
2031
|
// We do not support multiple selections yet (Because React Aria select and combobox only support single selections).
|
|
@@ -2034,16 +2033,17 @@ function registerListBox(loader, overrides) {
|
|
|
2034
2033
|
},
|
|
2035
2034
|
onSelectionChange: {
|
|
2036
2035
|
type: "eventHandler",
|
|
2037
|
-
argTypes: [{ name: "
|
|
2036
|
+
argTypes: [{ name: "selectedValues", type: "object" }]
|
|
2038
2037
|
}
|
|
2039
2038
|
},
|
|
2040
2039
|
states: {
|
|
2041
|
-
|
|
2040
|
+
selectedValue: __spreadValues$g({
|
|
2042
2041
|
type: "writable",
|
|
2043
2042
|
valueProp: "selectedKeys",
|
|
2043
|
+
hidden: (props, ctx) => !(ctx == null ? void 0 : ctx.isStandalone) || props.selectionMode === "none",
|
|
2044
2044
|
onChangeProp: "onSelectionChange",
|
|
2045
2045
|
variableType: "text"
|
|
2046
|
-
}, listboxHelpers.states.
|
|
2046
|
+
}, listboxHelpers.states.selectedValue)
|
|
2047
2047
|
},
|
|
2048
2048
|
componentHelpers: {
|
|
2049
2049
|
helpers: listboxHelpers,
|
|
@@ -2092,24 +2092,14 @@ const POPOVER_VARIANTS = [
|
|
|
2092
2092
|
];
|
|
2093
2093
|
const { variants: variants$a, withObservedValues: withObservedValues$9 } = pickAriaComponentVariants(POPOVER_VARIANTS);
|
|
2094
2094
|
function BasePopover(props) {
|
|
2095
|
-
|
|
2096
|
-
const _a = props, {
|
|
2097
|
-
resetClassName,
|
|
2098
|
-
setControlContextData,
|
|
2099
|
-
plasmicUpdateVariant
|
|
2100
|
-
} = _a, restProps = __objRest$d(_a, [
|
|
2101
|
-
"resetClassName",
|
|
2102
|
-
"setControlContextData",
|
|
2103
|
-
"plasmicUpdateVariant"
|
|
2104
|
-
]);
|
|
2095
|
+
const _a = props, { resetClassName, plasmicUpdateVariant } = _a, restProps = __objRest$d(_a, ["resetClassName", "plasmicUpdateVariant"]);
|
|
2105
2096
|
const isStandalone = !React__default.default.useContext(reactAriaComponents.PopoverContext);
|
|
2106
2097
|
const context = React__default.default.useContext(PlasmicPopoverContext);
|
|
2107
2098
|
const triggerRef = React__default.default.useRef(null);
|
|
2108
2099
|
const isEditMode = !!host.usePlasmicCanvasContext();
|
|
2109
2100
|
const _b = utils.mergeProps(
|
|
2110
2101
|
{
|
|
2111
|
-
isOpen: context == null ? void 0 : context.isOpen
|
|
2112
|
-
shouldFlip: context == null ? void 0 : context.defaultShouldFlip
|
|
2102
|
+
isOpen: context == null ? void 0 : context.isOpen
|
|
2113
2103
|
},
|
|
2114
2104
|
/**
|
|
2115
2105
|
* isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies. *
|
|
@@ -2130,9 +2120,6 @@ function BasePopover(props) {
|
|
|
2130
2120
|
isOpen: true
|
|
2131
2121
|
} : null
|
|
2132
2122
|
), { children } = _b, mergedProps = __objRest$d(_b, ["children"]);
|
|
2133
|
-
setControlContextData == null ? void 0 : setControlContextData({
|
|
2134
|
-
defaultShouldFlip: (_c = context == null ? void 0 : context.defaultShouldFlip) != null ? _c : true
|
|
2135
|
-
});
|
|
2136
2123
|
return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, isStandalone && /* @__PURE__ */ React__default.default.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Popover, __spreadValues$f({}, mergedProps), ({ placement }) => withObservedValues$9(
|
|
2137
2124
|
children,
|
|
2138
2125
|
{
|
|
@@ -2217,7 +2204,7 @@ function registerPopover(loader, overrides) {
|
|
|
2217
2204
|
shouldFlip: {
|
|
2218
2205
|
type: "boolean",
|
|
2219
2206
|
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.",
|
|
2220
|
-
defaultValueHint:
|
|
2207
|
+
defaultValueHint: true
|
|
2221
2208
|
},
|
|
2222
2209
|
placement: {
|
|
2223
2210
|
type: "choice",
|
|
@@ -2302,21 +2289,15 @@ function BaseComboBox(props) {
|
|
|
2302
2289
|
});
|
|
2303
2290
|
});
|
|
2304
2291
|
}, []);
|
|
2305
|
-
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React__default.default.createElement(
|
|
2306
|
-
|
|
2292
|
+
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React__default.default.createElement(PlasmicPopoverContext.Provider, { value: { isOpen } }, /* @__PURE__ */ React__default.default.createElement(
|
|
2293
|
+
PlasmicListBoxContext.Provider,
|
|
2307
2294
|
{
|
|
2308
|
-
value: {
|
|
2295
|
+
value: {
|
|
2296
|
+
idManager
|
|
2297
|
+
}
|
|
2309
2298
|
},
|
|
2310
|
-
/* @__PURE__ */ React__default.default.createElement(
|
|
2311
|
-
|
|
2312
|
-
{
|
|
2313
|
-
value: {
|
|
2314
|
-
idManager
|
|
2315
|
-
}
|
|
2316
|
-
},
|
|
2317
|
-
/* @__PURE__ */ React__default.default.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React__default.default.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
|
|
2318
|
-
)
|
|
2319
|
-
));
|
|
2299
|
+
/* @__PURE__ */ React__default.default.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React__default.default.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
|
|
2300
|
+
)));
|
|
2320
2301
|
}
|
|
2321
2302
|
function registerComboBox(loader) {
|
|
2322
2303
|
registerComponentHelper(loader, BaseComboBox, {
|
|
@@ -2332,17 +2313,17 @@ function registerComboBox(loader) {
|
|
|
2332
2313
|
])), {
|
|
2333
2314
|
selectedKey: {
|
|
2334
2315
|
type: "choice",
|
|
2335
|
-
description: "The selected keys of the listbox",
|
|
2336
2316
|
editOnly: true,
|
|
2337
2317
|
uncontrolledProp: "defaultSelectedKey",
|
|
2338
|
-
displayName: "Initial selected
|
|
2318
|
+
displayName: "Initial selected item",
|
|
2339
2319
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
2340
|
-
// React Aria ComboBox do not support multiple
|
|
2320
|
+
// React Aria ComboBox do not support multiple selections yet
|
|
2341
2321
|
multiSelect: false
|
|
2342
2322
|
},
|
|
2343
2323
|
disabledKeys: {
|
|
2344
2324
|
type: "choice",
|
|
2345
|
-
|
|
2325
|
+
displayName: "Disabled values",
|
|
2326
|
+
description: "The items that are disabled. These items cannot be selected, focused, or otherwise interacted with.",
|
|
2346
2327
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
2347
2328
|
multiSelect: true,
|
|
2348
2329
|
advanced: true
|
|
@@ -2355,7 +2336,7 @@ function registerComboBox(loader) {
|
|
|
2355
2336
|
},
|
|
2356
2337
|
onSelectionChange: {
|
|
2357
2338
|
type: "eventHandler",
|
|
2358
|
-
argTypes: [{ name: "
|
|
2339
|
+
argTypes: [{ name: "selectedValue", type: "string" }]
|
|
2359
2340
|
},
|
|
2360
2341
|
onOpenChange: {
|
|
2361
2342
|
type: "eventHandler",
|
|
@@ -2441,7 +2422,7 @@ function registerComboBox(loader) {
|
|
|
2441
2422
|
}
|
|
2442
2423
|
}),
|
|
2443
2424
|
states: {
|
|
2444
|
-
|
|
2425
|
+
selectedValue: {
|
|
2445
2426
|
type: "writable",
|
|
2446
2427
|
valueProp: "selectedKey",
|
|
2447
2428
|
onChangeProp: "onSelectionChange",
|
|
@@ -3204,21 +3185,15 @@ function BaseSelect(props) {
|
|
|
3204
3185
|
"aria-label": ariaLabel,
|
|
3205
3186
|
isOpen: _isOpen
|
|
3206
3187
|
}, extractPlasmicDataProps(props)),
|
|
3207
|
-
/* @__PURE__ */ React__default.default.createElement(
|
|
3208
|
-
|
|
3188
|
+
/* @__PURE__ */ React__default.default.createElement(PlasmicPopoverContext.Provider, { value: { isOpen: _isOpen } }, /* @__PURE__ */ React__default.default.createElement(
|
|
3189
|
+
PlasmicListBoxContext.Provider,
|
|
3209
3190
|
{
|
|
3210
|
-
value: {
|
|
3191
|
+
value: {
|
|
3192
|
+
idManager
|
|
3193
|
+
}
|
|
3211
3194
|
},
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
{
|
|
3215
|
-
value: {
|
|
3216
|
-
idManager
|
|
3217
|
-
}
|
|
3218
|
-
},
|
|
3219
|
-
children
|
|
3220
|
-
)
|
|
3221
|
-
)
|
|
3195
|
+
children
|
|
3196
|
+
))
|
|
3222
3197
|
);
|
|
3223
3198
|
}
|
|
3224
3199
|
function registerSelect(loader) {
|
|
@@ -3269,21 +3244,21 @@ function registerSelect(loader) {
|
|
|
3269
3244
|
])), {
|
|
3270
3245
|
selectedKey: {
|
|
3271
3246
|
type: "choice",
|
|
3272
|
-
description: "The selected keys of the listbox",
|
|
3273
3247
|
editOnly: true,
|
|
3274
3248
|
uncontrolledProp: "defaultSelectedKey",
|
|
3275
|
-
displayName: "Initial selected
|
|
3249
|
+
displayName: "Initial selected item",
|
|
3276
3250
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
3277
3251
|
// React Aria Select do not support multiple selections yet
|
|
3278
3252
|
multiSelect: false
|
|
3279
3253
|
},
|
|
3280
3254
|
onSelectionChange: {
|
|
3281
3255
|
type: "eventHandler",
|
|
3282
|
-
argTypes: [{ name: "
|
|
3256
|
+
argTypes: [{ name: "selectedValue", type: "string" }]
|
|
3283
3257
|
},
|
|
3284
3258
|
disabledKeys: {
|
|
3285
3259
|
type: "choice",
|
|
3286
|
-
|
|
3260
|
+
displayName: "Disabled values",
|
|
3261
|
+
description: "The items that are disabled. These items cannot be selected, focused, or otherwise interacted with.",
|
|
3287
3262
|
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
3288
3263
|
multiSelect: true,
|
|
3289
3264
|
advanced: true
|
|
@@ -3384,7 +3359,7 @@ function registerSelect(loader) {
|
|
|
3384
3359
|
}
|
|
3385
3360
|
}),
|
|
3386
3361
|
states: {
|
|
3387
|
-
|
|
3362
|
+
selectedValue: {
|
|
3388
3363
|
type: "writable",
|
|
3389
3364
|
valueProp: "selectedKey",
|
|
3390
3365
|
onChangeProp: "onSelectionChange",
|