@plasmicpkgs/react-aria 0.0.53 → 0.0.55
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 +86 -59
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +86 -59
- package/dist/react-aria.js.map +1 -1
- package/dist/registerSliderThumb.d.ts +1 -1
- package/dist/variant-utils.d.ts +1 -1
- package/package.json +2 -2
- 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/registerCheckbox.cjs.js +2 -2
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.esm.js +2 -2
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +2 -4
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +2 -4
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +2 -1
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +2 -1
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerDialogTrigger.cjs.js +2 -0
- package/skinny/registerDialogTrigger.cjs.js.map +1 -1
- package/skinny/registerDialogTrigger.esm.js +2 -0
- package/skinny/registerDialogTrigger.esm.js.map +1 -1
- package/skinny/registerForm.cjs.js +2 -1
- package/skinny/registerForm.cjs.js.map +1 -1
- package/skinny/registerForm.esm.js +2 -1
- package/skinny/registerForm.esm.js.map +1 -1
- package/skinny/registerInput.cjs.js +8 -9
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.esm.js +8 -9
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/registerLabel.cjs.js +6 -1
- package/skinny/registerLabel.cjs.js.map +1 -1
- package/skinny/registerLabel.esm.js +6 -1
- package/skinny/registerLabel.esm.js.map +1 -1
- package/skinny/registerListBoxItem.cjs.js +5 -3
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.esm.js +5 -3
- package/skinny/registerListBoxItem.esm.js.map +1 -1
- package/skinny/registerModal.cjs.js +1 -0
- package/skinny/registerModal.cjs.js.map +1 -1
- package/skinny/registerModal.esm.js +1 -0
- package/skinny/registerModal.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +4 -2
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.esm.js +4 -2
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerRadio.cjs.js +2 -2
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.esm.js +2 -2
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +2 -3
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.esm.js +2 -3
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +5 -2
- package/skinny/registerSection.cjs.js.map +1 -1
- package/skinny/registerSection.esm.js +5 -2
- package/skinny/registerSection.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +5 -2
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +5 -2
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSlider.cjs.js +2 -2
- package/skinny/registerSlider.cjs.js.map +1 -1
- package/skinny/registerSlider.esm.js +2 -2
- package/skinny/registerSlider.esm.js.map +1 -1
- package/skinny/registerSliderOutput.cjs.js +6 -3
- package/skinny/registerSliderOutput.cjs.js.map +1 -1
- package/skinny/registerSliderOutput.esm.js +6 -3
- package/skinny/registerSliderOutput.esm.js.map +1 -1
- package/skinny/registerSliderThumb.cjs.js +4 -3
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.d.ts +1 -1
- package/skinny/registerSliderThumb.esm.js +4 -3
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerSliderTrack.cjs.js +9 -4
- package/skinny/registerSliderTrack.cjs.js.map +1 -1
- package/skinny/registerSliderTrack.esm.js +9 -4
- package/skinny/registerSliderTrack.esm.js.map +1 -1
- package/skinny/registerSwitch.cjs.js +2 -2
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.esm.js +2 -2
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerText.cjs.js.map +1 -1
- package/skinny/registerText.esm.js.map +1 -1
- package/skinny/registerTextArea.cjs.js +7 -8
- package/skinny/registerTextArea.cjs.js.map +1 -1
- package/skinny/registerTextArea.esm.js +7 -8
- package/skinny/registerTextArea.esm.js.map +1 -1
- package/skinny/registerTextField.cjs.js +2 -2
- package/skinny/registerTextField.cjs.js.map +1 -1
- package/skinny/registerTextField.esm.js +2 -2
- package/skinny/registerTextField.esm.js.map +1 -1
- package/skinny/registerTooltip.cjs.js +4 -1
- package/skinny/registerTooltip.cjs.js.map +1 -1
- package/skinny/registerTooltip.esm.js +4 -1
- package/skinny/registerTooltip.esm.js.map +1 -1
- package/skinny/variant-utils-23360776.esm.js.map +1 -1
- package/skinny/variant-utils-db5b9590.cjs.js.map +1 -1
- package/skinny/variant-utils.d.ts +1 -1
package/dist/react-aria.js
CHANGED
|
@@ -520,7 +520,7 @@ const BUTTON_VARIANTS = [
|
|
|
520
520
|
];
|
|
521
521
|
const { variants: variants$d, withObservedValues: withObservedValues$b } = pickAriaComponentVariants(BUTTON_VARIANTS);
|
|
522
522
|
function BaseButton(props) {
|
|
523
|
-
const _a = props, { submitsForm, resetsForm, children,
|
|
523
|
+
const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$o(_a, ["submitsForm", "resetsForm", "children", "plasmicUpdateVariant"]);
|
|
524
524
|
const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
|
|
525
525
|
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Button, __spreadValues$q({ type }, rest), ({ isHovered, isPressed, isFocused, isFocusVisible, isDisabled }) => withObservedValues$b(
|
|
526
526
|
children,
|
|
@@ -531,7 +531,7 @@ function BaseButton(props) {
|
|
|
531
531
|
focusVisible: isFocusVisible,
|
|
532
532
|
disabled: isDisabled
|
|
533
533
|
},
|
|
534
|
-
|
|
534
|
+
plasmicUpdateVariant
|
|
535
535
|
));
|
|
536
536
|
}
|
|
537
537
|
const BUTTON_COMPONENT_NAME = makeComponentName("button");
|
|
@@ -647,7 +647,7 @@ const CHECKBOX_VARIANTS = [
|
|
|
647
647
|
];
|
|
648
648
|
const { variants: variants$c, withObservedValues: withObservedValues$a } = pickAriaComponentVariants(CHECKBOX_VARIANTS);
|
|
649
649
|
function BaseCheckbox(props) {
|
|
650
|
-
const _a = props, { children,
|
|
650
|
+
const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$n(_a, ["children", "plasmicUpdateVariant", "setControlContextData"]);
|
|
651
651
|
const contextProps = React__default.default.useContext(PlasmicCheckboxGroupContext);
|
|
652
652
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
653
653
|
parent: contextProps
|
|
@@ -673,7 +673,7 @@ function BaseCheckbox(props) {
|
|
|
673
673
|
selected: isSelected,
|
|
674
674
|
readonly: isReadOnly
|
|
675
675
|
},
|
|
676
|
-
|
|
676
|
+
plasmicUpdateVariant
|
|
677
677
|
)));
|
|
678
678
|
}
|
|
679
679
|
const makeDefaultCheckboxChildren = ({
|
|
@@ -1073,7 +1073,12 @@ function registerLabel(loader, overrides) {
|
|
|
1073
1073
|
},
|
|
1074
1074
|
props: {
|
|
1075
1075
|
children: {
|
|
1076
|
-
type: "slot"
|
|
1076
|
+
type: "slot",
|
|
1077
|
+
mergeWithParent: true,
|
|
1078
|
+
defaultValue: {
|
|
1079
|
+
type: "text",
|
|
1080
|
+
value: "Label"
|
|
1081
|
+
}
|
|
1077
1082
|
}
|
|
1078
1083
|
},
|
|
1079
1084
|
trapsFocus: true
|
|
@@ -1118,14 +1123,14 @@ const { variants: variants$b, withObservedValues: withObservedValues$9 } = pickA
|
|
|
1118
1123
|
CHECKBOX_GROUP_VARIANTS
|
|
1119
1124
|
);
|
|
1120
1125
|
function BaseCheckboxGroup(props) {
|
|
1121
|
-
const _a = props, { children,
|
|
1126
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$k(_a, ["children", "plasmicUpdateVariant"]);
|
|
1122
1127
|
return /* @__PURE__ */ React__default.default.createElement(PlasmicCheckboxGroupContext.Provider, { value: rest }, /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.CheckboxGroup, __spreadValues$l({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$9(
|
|
1123
1128
|
children,
|
|
1124
1129
|
{
|
|
1125
1130
|
disabled: isDisabled,
|
|
1126
1131
|
readonly: isReadOnly
|
|
1127
1132
|
},
|
|
1128
|
-
|
|
1133
|
+
plasmicUpdateVariant
|
|
1129
1134
|
)));
|
|
1130
1135
|
}
|
|
1131
1136
|
const componentName = makeComponentName("checkboxGroup");
|
|
@@ -1153,12 +1158,10 @@ function registerCheckboxGroup(loader, overrides) {
|
|
|
1153
1158
|
"isDisabled",
|
|
1154
1159
|
"isReadOnly",
|
|
1155
1160
|
"aria-label",
|
|
1156
|
-
"children",
|
|
1157
1161
|
"isRequired"
|
|
1158
1162
|
])), {
|
|
1159
1163
|
children: {
|
|
1160
1164
|
type: "slot",
|
|
1161
|
-
mergeWithParent: true,
|
|
1162
1165
|
defaultValue: [
|
|
1163
1166
|
{
|
|
1164
1167
|
type: "vbox",
|
|
@@ -1359,12 +1362,12 @@ const inputHelpers$1 = {
|
|
|
1359
1362
|
function BaseInput(props) {
|
|
1360
1363
|
var _b;
|
|
1361
1364
|
const _a = props, {
|
|
1362
|
-
|
|
1365
|
+
plasmicUpdateVariant,
|
|
1363
1366
|
setControlContextData,
|
|
1364
1367
|
disabled,
|
|
1365
1368
|
autoComplete
|
|
1366
1369
|
} = _a, rest = __objRest$j(_a, [
|
|
1367
|
-
"
|
|
1370
|
+
"plasmicUpdateVariant",
|
|
1368
1371
|
"setControlContextData",
|
|
1369
1372
|
"disabled",
|
|
1370
1373
|
"autoComplete"
|
|
@@ -1382,26 +1385,26 @@ function BaseInput(props) {
|
|
|
1382
1385
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
1383
1386
|
});
|
|
1384
1387
|
React.useEffect(() => {
|
|
1385
|
-
|
|
1388
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1386
1389
|
disabled: mergedProps.disabled
|
|
1387
1390
|
});
|
|
1388
|
-
}, [mergedProps.disabled,
|
|
1391
|
+
}, [mergedProps.disabled, plasmicUpdateVariant]);
|
|
1389
1392
|
return /* @__PURE__ */ React__default.default.createElement(
|
|
1390
1393
|
reactAriaComponents.Input,
|
|
1391
1394
|
__spreadValues$k({
|
|
1392
1395
|
autoComplete: resolveAutoComplete(autoComplete),
|
|
1393
1396
|
onHoverChange: (isHovered) => {
|
|
1394
|
-
|
|
1397
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1395
1398
|
hovered: isHovered
|
|
1396
1399
|
});
|
|
1397
1400
|
},
|
|
1398
1401
|
onFocus: () => {
|
|
1399
|
-
|
|
1402
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1400
1403
|
focused: true
|
|
1401
1404
|
});
|
|
1402
1405
|
},
|
|
1403
1406
|
onBlur: () => {
|
|
1404
|
-
|
|
1407
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1405
1408
|
focused: false
|
|
1406
1409
|
});
|
|
1407
1410
|
}
|
|
@@ -1468,8 +1471,7 @@ function registerInput(loader, overrides) {
|
|
|
1468
1471
|
helpers: inputHelpers$1,
|
|
1469
1472
|
importName: "inputHelpers",
|
|
1470
1473
|
importPath: "@plasmicpkgs/react-aria/skinny/registerInput"
|
|
1471
|
-
}
|
|
1472
|
-
trapsFocus: true
|
|
1474
|
+
}
|
|
1473
1475
|
},
|
|
1474
1476
|
overrides
|
|
1475
1477
|
);
|
|
@@ -1515,7 +1517,7 @@ const { variants: variants$9, withObservedValues: withObservedValues$8 } = pickA
|
|
|
1515
1517
|
LIST_BOX_ITEM_VARIANTS
|
|
1516
1518
|
);
|
|
1517
1519
|
function BaseListBoxItem(props) {
|
|
1518
|
-
const _a = props, { children, setControlContextData,
|
|
1520
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant, id } = _a, rest = __objRest$i(_a, ["children", "setControlContextData", "plasmicUpdateVariant", "id"]);
|
|
1519
1521
|
const listboxContext = React__default.default.useContext(PlasmicListBoxContext);
|
|
1520
1522
|
const isStandalone = !listboxContext;
|
|
1521
1523
|
const [registeredId, setRegisteredId] = React.useState();
|
|
@@ -1551,7 +1553,7 @@ function BaseListBoxItem(props) {
|
|
|
1551
1553
|
selected: isSelected,
|
|
1552
1554
|
disabled: isDisabled
|
|
1553
1555
|
},
|
|
1554
|
-
|
|
1556
|
+
plasmicUpdateVariant
|
|
1555
1557
|
));
|
|
1556
1558
|
if (isStandalone) {
|
|
1557
1559
|
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ListBox, { selectionMode: "single" }, listboxItem);
|
|
@@ -1623,9 +1625,11 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1623
1625
|
},
|
|
1624
1626
|
children: {
|
|
1625
1627
|
type: "slot",
|
|
1628
|
+
mergeWithParent: true,
|
|
1626
1629
|
defaultValue: makeDefaultListBoxItemChildren("Item")
|
|
1627
1630
|
}
|
|
1628
|
-
}
|
|
1631
|
+
},
|
|
1632
|
+
trapsFocus: true
|
|
1629
1633
|
},
|
|
1630
1634
|
overrides
|
|
1631
1635
|
);
|
|
@@ -1681,6 +1685,7 @@ function registerSection(loader, overrides) {
|
|
|
1681
1685
|
props: {
|
|
1682
1686
|
header: {
|
|
1683
1687
|
type: "slot",
|
|
1688
|
+
mergeWithParent: true,
|
|
1684
1689
|
defaultValue: [
|
|
1685
1690
|
{
|
|
1686
1691
|
type: "text",
|
|
@@ -1689,9 +1694,11 @@ function registerSection(loader, overrides) {
|
|
|
1689
1694
|
]
|
|
1690
1695
|
},
|
|
1691
1696
|
items: {
|
|
1692
|
-
type: "slot"
|
|
1697
|
+
type: "slot",
|
|
1698
|
+
mergeWithParent: true
|
|
1693
1699
|
}
|
|
1694
|
-
}
|
|
1700
|
+
},
|
|
1701
|
+
trapsFocus: true
|
|
1695
1702
|
},
|
|
1696
1703
|
overrides
|
|
1697
1704
|
);
|
|
@@ -2051,6 +2058,7 @@ function registerPopover(loader, overrides) {
|
|
|
2051
2058
|
props: {
|
|
2052
2059
|
children: {
|
|
2053
2060
|
type: "slot",
|
|
2061
|
+
mergeWithParent: true,
|
|
2054
2062
|
defaultValue: [
|
|
2055
2063
|
POPOVER_ARROW_IMG,
|
|
2056
2064
|
{
|
|
@@ -2058,7 +2066,7 @@ function registerPopover(loader, overrides) {
|
|
|
2058
2066
|
styles: {
|
|
2059
2067
|
width: "stretch",
|
|
2060
2068
|
padding: 0,
|
|
2061
|
-
|
|
2069
|
+
rowGap: "10px"
|
|
2062
2070
|
},
|
|
2063
2071
|
children: [
|
|
2064
2072
|
{
|
|
@@ -2111,7 +2119,8 @@ function registerPopover(loader, overrides) {
|
|
|
2111
2119
|
type: "themeResetClass"
|
|
2112
2120
|
}
|
|
2113
2121
|
},
|
|
2114
|
-
styleSections: true
|
|
2122
|
+
styleSections: true,
|
|
2123
|
+
trapsFocus: true
|
|
2115
2124
|
},
|
|
2116
2125
|
overrides
|
|
2117
2126
|
);
|
|
@@ -2297,7 +2306,8 @@ function registerComboBox(loader) {
|
|
|
2297
2306
|
onChangeProp: "onOpenChange",
|
|
2298
2307
|
variableType: "boolean"
|
|
2299
2308
|
}
|
|
2300
|
-
}
|
|
2309
|
+
},
|
|
2310
|
+
trapsFocus: true
|
|
2301
2311
|
});
|
|
2302
2312
|
}
|
|
2303
2313
|
|
|
@@ -2488,6 +2498,7 @@ function registerModal(loader, overrides) {
|
|
|
2488
2498
|
props: {
|
|
2489
2499
|
children: {
|
|
2490
2500
|
type: "slot",
|
|
2501
|
+
mergeWithParent: true,
|
|
2491
2502
|
defaultValue: {
|
|
2492
2503
|
type: "vbox",
|
|
2493
2504
|
styles: {
|
|
@@ -2608,6 +2619,7 @@ function registerDialogTrigger(loader, overrides) {
|
|
|
2608
2619
|
props: {
|
|
2609
2620
|
trigger: {
|
|
2610
2621
|
type: "slot",
|
|
2622
|
+
mergeWithParent: true,
|
|
2611
2623
|
defaultValue: {
|
|
2612
2624
|
type: "component",
|
|
2613
2625
|
name: BUTTON_COMPONENT_NAME,
|
|
@@ -2621,6 +2633,7 @@ function registerDialogTrigger(loader, overrides) {
|
|
|
2621
2633
|
},
|
|
2622
2634
|
dialog: {
|
|
2623
2635
|
type: "slot",
|
|
2636
|
+
mergeWithParent: true,
|
|
2624
2637
|
defaultValue: {
|
|
2625
2638
|
type: "component",
|
|
2626
2639
|
name: MODAL_COMPONENT_NAME
|
|
@@ -2716,7 +2729,8 @@ function registerForm(loader, overrides) {
|
|
|
2716
2729
|
importName: "BaseForm",
|
|
2717
2730
|
props: {
|
|
2718
2731
|
children: {
|
|
2719
|
-
type: "slot"
|
|
2732
|
+
type: "slot",
|
|
2733
|
+
mergeWithParent: true
|
|
2720
2734
|
},
|
|
2721
2735
|
onSubmit: {
|
|
2722
2736
|
type: "eventHandler",
|
|
@@ -2776,7 +2790,7 @@ const RADIO_VARIANTS = [
|
|
|
2776
2790
|
];
|
|
2777
2791
|
const { variants: variants$8, withObservedValues: withObservedValues$7 } = pickAriaComponentVariants(RADIO_VARIANTS);
|
|
2778
2792
|
function BaseRadio(props) {
|
|
2779
|
-
const _a = props, { children, setControlContextData,
|
|
2793
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$9(_a, ["children", "setControlContextData", "plasmicUpdateVariant"]);
|
|
2780
2794
|
const contextProps = React__default.default.useContext(PlasmicRadioGroupContext);
|
|
2781
2795
|
const isStandalone = !contextProps;
|
|
2782
2796
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
@@ -2801,7 +2815,7 @@ function BaseRadio(props) {
|
|
|
2801
2815
|
disabled: isDisabled,
|
|
2802
2816
|
readonly: isReadOnly
|
|
2803
2817
|
},
|
|
2804
|
-
|
|
2818
|
+
plasmicUpdateVariant
|
|
2805
2819
|
));
|
|
2806
2820
|
if (isStandalone) {
|
|
2807
2821
|
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.RadioGroup, null, radio);
|
|
@@ -2905,14 +2919,14 @@ var __objRest$8 = (source, exclude) => {
|
|
|
2905
2919
|
const RADIO_GROUP_VARIANTS = ["disabled", "readonly"];
|
|
2906
2920
|
const { variants: variants$7, withObservedValues: withObservedValues$6 } = pickAriaComponentVariants(RADIO_GROUP_VARIANTS);
|
|
2907
2921
|
function BaseRadioGroup(props) {
|
|
2908
|
-
const _a = props, { children,
|
|
2922
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$8(_a, ["children", "plasmicUpdateVariant"]);
|
|
2909
2923
|
return /* @__PURE__ */ React__default.default.createElement(PlasmicRadioGroupContext.Provider, { value: props }, /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.RadioGroup, __spreadValues$9({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$6(
|
|
2910
2924
|
children,
|
|
2911
2925
|
{
|
|
2912
2926
|
disabled: isDisabled,
|
|
2913
2927
|
readonly: isReadOnly
|
|
2914
2928
|
},
|
|
2915
|
-
|
|
2929
|
+
plasmicUpdateVariant
|
|
2916
2930
|
)));
|
|
2917
2931
|
}
|
|
2918
2932
|
const RADIO_GROUP_COMPONENT_NAME = makeComponentName("radioGroup");
|
|
@@ -2942,7 +2956,6 @@ function registerRadioGroup(loader, overrides) {
|
|
|
2942
2956
|
])), {
|
|
2943
2957
|
children: {
|
|
2944
2958
|
type: "slot",
|
|
2945
|
-
mergeWithParent: true,
|
|
2946
2959
|
defaultValue: [
|
|
2947
2960
|
{
|
|
2948
2961
|
type: "vbox",
|
|
@@ -3145,7 +3158,8 @@ function registerSelect(loader) {
|
|
|
3145
3158
|
}
|
|
3146
3159
|
]
|
|
3147
3160
|
}
|
|
3148
|
-
}
|
|
3161
|
+
},
|
|
3162
|
+
trapsFocus: true
|
|
3149
3163
|
});
|
|
3150
3164
|
registerComponentHelper(loader, BaseSelect, {
|
|
3151
3165
|
name: SELECT_NAME,
|
|
@@ -3199,6 +3213,7 @@ function registerSelect(loader) {
|
|
|
3199
3213
|
},
|
|
3200
3214
|
children: {
|
|
3201
3215
|
type: "slot",
|
|
3216
|
+
mergeWithParent: true,
|
|
3202
3217
|
defaultValue: [
|
|
3203
3218
|
{
|
|
3204
3219
|
type: "vbox",
|
|
@@ -3294,7 +3309,8 @@ function registerSelect(loader) {
|
|
|
3294
3309
|
onChangeProp: "onOpenChange",
|
|
3295
3310
|
variableType: "boolean"
|
|
3296
3311
|
}
|
|
3297
|
-
}
|
|
3312
|
+
},
|
|
3313
|
+
trapsFocus: true
|
|
3298
3314
|
});
|
|
3299
3315
|
}
|
|
3300
3316
|
|
|
@@ -3331,13 +3347,13 @@ const { variants: variants$6, withObservedValues: withObservedValues$5 } = pickA
|
|
|
3331
3347
|
SLIDER_OUTPUT_VARIANTS
|
|
3332
3348
|
);
|
|
3333
3349
|
function BaseSliderOutput(props) {
|
|
3334
|
-
const _a = props, {
|
|
3350
|
+
const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$7(_a, ["plasmicUpdateVariant", "children"]);
|
|
3335
3351
|
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.SliderOutput, __spreadValues$7({}, rest), ({ isDisabled }) => withObservedValues$5(
|
|
3336
3352
|
children,
|
|
3337
3353
|
{
|
|
3338
3354
|
disabled: isDisabled
|
|
3339
3355
|
},
|
|
3340
|
-
|
|
3356
|
+
plasmicUpdateVariant
|
|
3341
3357
|
));
|
|
3342
3358
|
}
|
|
3343
3359
|
const SLIDER_OUTPUT_COMPONENT_NAME = makeComponentName("sliderOutput");
|
|
@@ -3352,7 +3368,10 @@ function registerSliderOutput(loader, overrides) {
|
|
|
3352
3368
|
importName: "BaseSliderOutput",
|
|
3353
3369
|
variants: variants$6,
|
|
3354
3370
|
props: {
|
|
3355
|
-
children: {
|
|
3371
|
+
children: {
|
|
3372
|
+
mergeWithParent: true,
|
|
3373
|
+
type: "slot"
|
|
3374
|
+
}
|
|
3356
3375
|
},
|
|
3357
3376
|
trapsFocus: true
|
|
3358
3377
|
},
|
|
@@ -3421,11 +3440,11 @@ function BaseSliderThumb(_a) {
|
|
|
3421
3440
|
var _b = _a, {
|
|
3422
3441
|
children,
|
|
3423
3442
|
advanced,
|
|
3424
|
-
|
|
3443
|
+
plasmicUpdateVariant
|
|
3425
3444
|
} = _b, rest = __objRest$6(_b, [
|
|
3426
3445
|
"children",
|
|
3427
3446
|
"advanced",
|
|
3428
|
-
"
|
|
3447
|
+
"plasmicUpdateVariant"
|
|
3429
3448
|
]);
|
|
3430
3449
|
const context = React__default.default.useContext(PlasmicSliderContext);
|
|
3431
3450
|
const mergedProps = reactAria.mergeProps(context, rest);
|
|
@@ -3438,7 +3457,7 @@ function BaseSliderThumb(_a) {
|
|
|
3438
3457
|
focusVisible: isFocusVisible,
|
|
3439
3458
|
disabled: isDisabled
|
|
3440
3459
|
},
|
|
3441
|
-
|
|
3460
|
+
plasmicUpdateVariant
|
|
3442
3461
|
));
|
|
3443
3462
|
return /* @__PURE__ */ React__default.default.createElement(
|
|
3444
3463
|
ErrorBoundary,
|
|
@@ -3480,6 +3499,7 @@ function registerSliderThumb(loader, overrides) {
|
|
|
3480
3499
|
},
|
|
3481
3500
|
children: {
|
|
3482
3501
|
type: "slot",
|
|
3502
|
+
mergeWithParent: true,
|
|
3483
3503
|
hidden: (ps) => !ps.advanced
|
|
3484
3504
|
}
|
|
3485
3505
|
}),
|
|
@@ -3543,7 +3563,7 @@ function BaseSliderTrack(props) {
|
|
|
3543
3563
|
const context = React__default.default.useContext(PlasmicSliderContext);
|
|
3544
3564
|
const isStandalone = !context;
|
|
3545
3565
|
const mergedProps = reactAria.mergeProps(context, props);
|
|
3546
|
-
const _a = mergedProps, { children, progressBar,
|
|
3566
|
+
const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$5(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
|
|
3547
3567
|
const isMultiValue = isMultiValueGuard(mergedProps.value);
|
|
3548
3568
|
const { minIndex, maxIndex } = React.useMemo(() => {
|
|
3549
3569
|
if (!context || !Array.isArray(context.value) || context.value.length <= 1) {
|
|
@@ -3592,7 +3612,7 @@ function BaseSliderTrack(props) {
|
|
|
3592
3612
|
{
|
|
3593
3613
|
hovered: isHovered
|
|
3594
3614
|
},
|
|
3595
|
-
|
|
3615
|
+
plasmicUpdateVariant
|
|
3596
3616
|
)));
|
|
3597
3617
|
if (isStandalone) {
|
|
3598
3618
|
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Slider, { style: { height: "100%", width: "100%" } }, track);
|
|
@@ -3620,6 +3640,11 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3620
3640
|
props: {
|
|
3621
3641
|
children: {
|
|
3622
3642
|
type: "slot",
|
|
3643
|
+
/**
|
|
3644
|
+
* NOTE: We don't merge with parent here, because we want to allow the user to select the thumbs without having to first select the slider track.
|
|
3645
|
+
* Also, there can be more than one thumbs (e.g. in a range slider), but `mergeWithParent` only shows prop controls of the slot content if there is only one direct descendant of the slot.
|
|
3646
|
+
* */
|
|
3647
|
+
// mergeWithParent: true,
|
|
3623
3648
|
displayName: "Thumbs",
|
|
3624
3649
|
description: "The thumbs of the slider. For range slider, you can add more than one thumb.",
|
|
3625
3650
|
allowedComponents: [sliderThumbMeta.name],
|
|
@@ -3633,6 +3658,7 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3633
3658
|
},
|
|
3634
3659
|
progressBar: {
|
|
3635
3660
|
type: "slot",
|
|
3661
|
+
mergeWithParent: true,
|
|
3636
3662
|
displayName: "Progress Bar",
|
|
3637
3663
|
defaultValue: [
|
|
3638
3664
|
{
|
|
@@ -3658,8 +3684,7 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3658
3684
|
type: "eventHandler",
|
|
3659
3685
|
argTypes: [{ name: "isHovering", type: "boolean" }]
|
|
3660
3686
|
}
|
|
3661
|
-
}
|
|
3662
|
-
trapsFocus: true
|
|
3687
|
+
}
|
|
3663
3688
|
},
|
|
3664
3689
|
overrides
|
|
3665
3690
|
);
|
|
@@ -3701,7 +3726,7 @@ const RANGE_SLIDER_COMPONENT_NAME = makeComponentName("range-slider");
|
|
|
3701
3726
|
const SLIDER_VARIANTS = ["disabled"];
|
|
3702
3727
|
const { variants: variants$3, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(SLIDER_VARIANTS);
|
|
3703
3728
|
function BaseSlider(props) {
|
|
3704
|
-
const _a = props, { children,
|
|
3729
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$4(_a, ["children", "plasmicUpdateVariant"]);
|
|
3705
3730
|
return /* @__PURE__ */ React__default.default.createElement(
|
|
3706
3731
|
PlasmicSliderContext.Provider,
|
|
3707
3732
|
{
|
|
@@ -3716,7 +3741,7 @@ function BaseSlider(props) {
|
|
|
3716
3741
|
{
|
|
3717
3742
|
disabled: isDisabled
|
|
3718
3743
|
},
|
|
3719
|
-
|
|
3744
|
+
plasmicUpdateVariant
|
|
3720
3745
|
))
|
|
3721
3746
|
);
|
|
3722
3747
|
}
|
|
@@ -3996,7 +4021,7 @@ const SWITCH_VARIANTS = [
|
|
|
3996
4021
|
];
|
|
3997
4022
|
const { variants: variants$2, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(SWITCH_VARIANTS);
|
|
3998
4023
|
function BaseSwitch(props) {
|
|
3999
|
-
const _a = props, { children,
|
|
4024
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$3(_a, ["children", "plasmicUpdateVariant"]);
|
|
4000
4025
|
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Switch, __spreadValues$3({}, rest), ({
|
|
4001
4026
|
isHovered,
|
|
4002
4027
|
isPressed,
|
|
@@ -4016,7 +4041,7 @@ function BaseSwitch(props) {
|
|
|
4016
4041
|
disabled: isDisabled,
|
|
4017
4042
|
readonly: isReadOnly
|
|
4018
4043
|
},
|
|
4019
|
-
|
|
4044
|
+
plasmicUpdateVariant
|
|
4020
4045
|
));
|
|
4021
4046
|
}
|
|
4022
4047
|
function registerSwitch(loader, overrides) {
|
|
@@ -4191,16 +4216,16 @@ const inputHelpers = {
|
|
|
4191
4216
|
};
|
|
4192
4217
|
function BaseTextArea(props) {
|
|
4193
4218
|
var _b;
|
|
4194
|
-
const _a = props, { disabled,
|
|
4219
|
+
const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$2(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
|
|
4195
4220
|
const textFieldContext = React__default.default.useContext(PlasmicTextFieldContext);
|
|
4196
4221
|
const mergedProps = reactAria.mergeProps(rest, {
|
|
4197
4222
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
4198
4223
|
});
|
|
4199
4224
|
React.useEffect(() => {
|
|
4200
|
-
|
|
4225
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4201
4226
|
disabled: mergedProps.disabled
|
|
4202
4227
|
});
|
|
4203
|
-
}, [mergedProps.disabled,
|
|
4228
|
+
}, [mergedProps.disabled, plasmicUpdateVariant]);
|
|
4204
4229
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
4205
4230
|
parent: textFieldContext
|
|
4206
4231
|
});
|
|
@@ -4208,17 +4233,17 @@ function BaseTextArea(props) {
|
|
|
4208
4233
|
reactAriaComponents.TextArea,
|
|
4209
4234
|
__spreadValues$2({
|
|
4210
4235
|
onFocus: () => {
|
|
4211
|
-
|
|
4236
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4212
4237
|
focused: true
|
|
4213
4238
|
});
|
|
4214
4239
|
},
|
|
4215
4240
|
onBlur: () => {
|
|
4216
|
-
|
|
4241
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4217
4242
|
focused: false
|
|
4218
4243
|
});
|
|
4219
4244
|
},
|
|
4220
4245
|
onHoverChange: (isHovered) => {
|
|
4221
|
-
|
|
4246
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4222
4247
|
hovered: isHovered
|
|
4223
4248
|
});
|
|
4224
4249
|
}
|
|
@@ -4274,8 +4299,7 @@ function registerTextArea(loader, overrides) {
|
|
|
4274
4299
|
helpers: inputHelpers,
|
|
4275
4300
|
importName: "inputHelpers",
|
|
4276
4301
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextArea"
|
|
4277
|
-
}
|
|
4278
|
-
trapsFocus: true
|
|
4302
|
+
}
|
|
4279
4303
|
},
|
|
4280
4304
|
overrides
|
|
4281
4305
|
);
|
|
@@ -4315,14 +4339,14 @@ var __objRest$1 = (source, exclude) => {
|
|
|
4315
4339
|
const TEXT_FIELD_VARIANTS = ["disabled", "readonly"];
|
|
4316
4340
|
const { variants, withObservedValues } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
|
|
4317
4341
|
function BaseTextField(props) {
|
|
4318
|
-
const _a = props, { children,
|
|
4342
|
+
const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest$1(_a, ["children", "plasmicUpdateVariant", "autoComplete"]);
|
|
4319
4343
|
return /* @__PURE__ */ React__default.default.createElement(PlasmicTextFieldContext.Provider, { value: props }, /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.TextField, __spreadValues$1({ autoComplete: resolveAutoComplete(autoComplete) }, rest), ({ isDisabled, isReadOnly }) => withObservedValues(
|
|
4320
4344
|
children,
|
|
4321
4345
|
{
|
|
4322
4346
|
disabled: isDisabled,
|
|
4323
4347
|
readonly: isReadOnly
|
|
4324
4348
|
},
|
|
4325
|
-
|
|
4349
|
+
plasmicUpdateVariant
|
|
4326
4350
|
)));
|
|
4327
4351
|
}
|
|
4328
4352
|
const TEXT_FIELD_COMPONENT_NAME = makeComponentName("textField");
|
|
@@ -4516,6 +4540,7 @@ function registerTooltip(loader, overrides) {
|
|
|
4516
4540
|
props: {
|
|
4517
4541
|
children: {
|
|
4518
4542
|
type: "slot",
|
|
4543
|
+
mergeWithParent: true,
|
|
4519
4544
|
defaultValue: {
|
|
4520
4545
|
type: "text",
|
|
4521
4546
|
value: "Hover me!"
|
|
@@ -4523,6 +4548,7 @@ function registerTooltip(loader, overrides) {
|
|
|
4523
4548
|
},
|
|
4524
4549
|
tooltipContent: {
|
|
4525
4550
|
type: "slot",
|
|
4551
|
+
mergeWithParent: true,
|
|
4526
4552
|
displayName: "Tooltip Content",
|
|
4527
4553
|
// NOTE: This is not applied in attachment
|
|
4528
4554
|
defaultValue: {
|
|
@@ -4570,7 +4596,8 @@ function registerTooltip(loader, overrides) {
|
|
|
4570
4596
|
onChangeProp: "onOpenChange",
|
|
4571
4597
|
variableType: "boolean"
|
|
4572
4598
|
}
|
|
4573
|
-
}
|
|
4599
|
+
},
|
|
4600
|
+
trapsFocus: true
|
|
4574
4601
|
},
|
|
4575
4602
|
overrides
|
|
4576
4603
|
);
|