@plasmicpkgs/react-aria 0.0.55 → 0.0.57
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/ListBoxItemIdManager.d.ts +1 -1
- package/dist/react-aria.esm.js +37 -14
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +37 -14
- package/dist/react-aria.js.map +1 -1
- package/dist/registerListBoxItem.d.ts +1 -1
- package/package.json +2 -2
- package/skinny/ListBoxItemIdManager.d.ts +1 -1
- package/skinny/registerButton.cjs.js +2 -2
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.esm.js +2 -2
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +8 -1
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +8 -1
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/{registerListBox-85f61377.esm.js → registerListBox-3c236462.esm.js} +6 -5
- package/skinny/registerListBox-3c236462.esm.js.map +1 -0
- package/skinny/{registerListBox-96ae5783.cjs.js → registerListBox-da9cf4ed.cjs.js} +6 -5
- package/skinny/registerListBox-da9cf4ed.cjs.js.map +1 -0
- package/skinny/registerListBox.cjs.js +1 -1
- package/skinny/registerListBox.esm.js +1 -1
- package/skinny/registerListBoxItem.cjs.js +18 -5
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.d.ts +1 -1
- package/skinny/registerListBoxItem.esm.js +18 -5
- package/skinny/registerListBoxItem.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +1 -1
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.esm.js +1 -1
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +4 -2
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +4 -2
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSliderThumb.cjs.js +1 -1
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.esm.js +1 -1
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerListBox-85f61377.esm.js.map +0 -1
- package/skinny/registerListBox-96ae5783.cjs.js.map +0 -1
package/dist/react-aria.js
CHANGED
|
@@ -569,7 +569,7 @@ function registerButton(loader, overrides) {
|
|
|
569
569
|
type: "boolean",
|
|
570
570
|
displayName: "Submits form?",
|
|
571
571
|
defaultValueHint: false,
|
|
572
|
-
hidden: (
|
|
572
|
+
hidden: (props) => Boolean(props.resetsForm),
|
|
573
573
|
description: "Whether clicking this button should submit the enclosing form.",
|
|
574
574
|
advanced: true
|
|
575
575
|
},
|
|
@@ -577,7 +577,7 @@ function registerButton(loader, overrides) {
|
|
|
577
577
|
type: "boolean",
|
|
578
578
|
displayName: "Resets form?",
|
|
579
579
|
defaultValueHint: false,
|
|
580
|
-
hidden: (
|
|
580
|
+
hidden: (props) => Boolean(props.submitsForm),
|
|
581
581
|
description: "Whether clicking this button should reset the enclosing form.",
|
|
582
582
|
advanced: true
|
|
583
583
|
},
|
|
@@ -1288,13 +1288,14 @@ class ListBoxItemIdManager {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
register(id) {
|
|
1291
|
+
const idStr = id === void 0 ? void 0 : String(id).trim();
|
|
1291
1292
|
let newId;
|
|
1292
|
-
if (!
|
|
1293
|
+
if (!idStr) {
|
|
1293
1294
|
newId = this.generateMissingId();
|
|
1294
|
-
} else if (this._ids.has(
|
|
1295
|
-
newId = this.generateDuplicateId(
|
|
1295
|
+
} else if (this._ids.has(idStr)) {
|
|
1296
|
+
newId = this.generateDuplicateId(idStr);
|
|
1296
1297
|
} else {
|
|
1297
|
-
newId =
|
|
1298
|
+
newId = idStr;
|
|
1298
1299
|
}
|
|
1299
1300
|
this._ids.add(newId);
|
|
1300
1301
|
this.notify();
|
|
@@ -1533,8 +1534,21 @@ function BaseListBoxItem(props) {
|
|
|
1533
1534
|
};
|
|
1534
1535
|
}, [id]);
|
|
1535
1536
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
1536
|
-
|
|
1537
|
-
|
|
1537
|
+
idError: (() => {
|
|
1538
|
+
if (id === void 0) {
|
|
1539
|
+
return "ID must be defined";
|
|
1540
|
+
}
|
|
1541
|
+
if (typeof id !== "string") {
|
|
1542
|
+
return "ID must be a string";
|
|
1543
|
+
}
|
|
1544
|
+
if (!id.trim()) {
|
|
1545
|
+
return "ID must be defined";
|
|
1546
|
+
}
|
|
1547
|
+
if (!isStandalone && id != registeredId) {
|
|
1548
|
+
return "ID must be unique";
|
|
1549
|
+
}
|
|
1550
|
+
return void 0;
|
|
1551
|
+
})()
|
|
1538
1552
|
});
|
|
1539
1553
|
const listboxItem = /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ListBoxItem, __spreadValues$j({ key: registeredId, id: registeredId }, rest), ({
|
|
1540
1554
|
isHovered,
|
|
@@ -1610,11 +1624,11 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1610
1624
|
props: {
|
|
1611
1625
|
id: {
|
|
1612
1626
|
type: "string",
|
|
1613
|
-
description: "The
|
|
1627
|
+
description: "The ID of the item",
|
|
1614
1628
|
required: true,
|
|
1615
1629
|
validator: (_value, _props, ctx) => {
|
|
1616
|
-
if (ctx == null ? void 0 : ctx.
|
|
1617
|
-
return
|
|
1630
|
+
if (ctx == null ? void 0 : ctx.idError) {
|
|
1631
|
+
return ctx.idError;
|
|
1618
1632
|
}
|
|
1619
1633
|
return true;
|
|
1620
1634
|
}
|
|
@@ -2097,7 +2111,7 @@ function registerPopover(loader, overrides) {
|
|
|
2097
2111
|
shouldFlip: {
|
|
2098
2112
|
type: "boolean",
|
|
2099
2113
|
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.",
|
|
2100
|
-
defaultValueHint: (
|
|
2114
|
+
defaultValueHint: (_props, ctx) => {
|
|
2101
2115
|
var _a;
|
|
2102
2116
|
return (_a = ctx == null ? void 0 : ctx.defaultShouldFlip) != null ? _a : true;
|
|
2103
2117
|
}
|
|
@@ -2200,6 +2214,13 @@ function registerComboBox(loader) {
|
|
|
2200
2214
|
// React Aria ComboBox do not support multiple comboBoxions yet
|
|
2201
2215
|
multiSelect: false
|
|
2202
2216
|
},
|
|
2217
|
+
disabledKeys: {
|
|
2218
|
+
type: "choice",
|
|
2219
|
+
description: "The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with.",
|
|
2220
|
+
options: (_props, ctx) => (ctx == null ? void 0 : ctx.itemIds) ? Array.from(ctx.itemIds) : [],
|
|
2221
|
+
multiSelect: true,
|
|
2222
|
+
advanced: true
|
|
2223
|
+
},
|
|
2203
2224
|
isOpen: {
|
|
2204
2225
|
type: "boolean",
|
|
2205
2226
|
defaultValue: false,
|
|
@@ -3087,6 +3108,7 @@ function BaseSelect(props) {
|
|
|
3087
3108
|
className,
|
|
3088
3109
|
style,
|
|
3089
3110
|
children,
|
|
3111
|
+
disabledKeys,
|
|
3090
3112
|
name,
|
|
3091
3113
|
isOpen,
|
|
3092
3114
|
setControlContextData,
|
|
@@ -3113,6 +3135,7 @@ function BaseSelect(props) {
|
|
|
3113
3135
|
className,
|
|
3114
3136
|
style,
|
|
3115
3137
|
name,
|
|
3138
|
+
disabledKeys,
|
|
3116
3139
|
"aria-label": ariaLabel,
|
|
3117
3140
|
isOpen: openProp
|
|
3118
3141
|
}, extractPlasmicDataProps(props)),
|
|
@@ -3147,7 +3170,7 @@ function registerSelect(loader) {
|
|
|
3147
3170
|
value: "Selected value..."
|
|
3148
3171
|
}
|
|
3149
3172
|
],
|
|
3150
|
-
hidden: (
|
|
3173
|
+
hidden: (props) => !props.customize
|
|
3151
3174
|
},
|
|
3152
3175
|
className: {
|
|
3153
3176
|
type: "class",
|
|
@@ -3500,7 +3523,7 @@ function registerSliderThumb(loader, overrides) {
|
|
|
3500
3523
|
children: {
|
|
3501
3524
|
type: "slot",
|
|
3502
3525
|
mergeWithParent: true,
|
|
3503
|
-
hidden: (
|
|
3526
|
+
hidden: (props) => !props.advanced
|
|
3504
3527
|
}
|
|
3505
3528
|
}),
|
|
3506
3529
|
trapsFocus: true
|