@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.esm.js
CHANGED
|
@@ -512,7 +512,7 @@ const BUTTON_VARIANTS = [
|
|
|
512
512
|
];
|
|
513
513
|
const { variants: variants$d, withObservedValues: withObservedValues$b } = pickAriaComponentVariants(BUTTON_VARIANTS);
|
|
514
514
|
function BaseButton(props) {
|
|
515
|
-
const _a = props, { submitsForm, resetsForm, children,
|
|
515
|
+
const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$o(_a, ["submitsForm", "resetsForm", "children", "plasmicUpdateVariant"]);
|
|
516
516
|
const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
|
|
517
517
|
return /* @__PURE__ */ React.createElement(Button, __spreadValues$q({ type }, rest), ({ isHovered, isPressed, isFocused, isFocusVisible, isDisabled }) => withObservedValues$b(
|
|
518
518
|
children,
|
|
@@ -523,7 +523,7 @@ function BaseButton(props) {
|
|
|
523
523
|
focusVisible: isFocusVisible,
|
|
524
524
|
disabled: isDisabled
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
plasmicUpdateVariant
|
|
527
527
|
));
|
|
528
528
|
}
|
|
529
529
|
const BUTTON_COMPONENT_NAME = makeComponentName("button");
|
|
@@ -639,7 +639,7 @@ const CHECKBOX_VARIANTS = [
|
|
|
639
639
|
];
|
|
640
640
|
const { variants: variants$c, withObservedValues: withObservedValues$a } = pickAriaComponentVariants(CHECKBOX_VARIANTS);
|
|
641
641
|
function BaseCheckbox(props) {
|
|
642
|
-
const _a = props, { children,
|
|
642
|
+
const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$n(_a, ["children", "plasmicUpdateVariant", "setControlContextData"]);
|
|
643
643
|
const contextProps = React.useContext(PlasmicCheckboxGroupContext);
|
|
644
644
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
645
645
|
parent: contextProps
|
|
@@ -665,7 +665,7 @@ function BaseCheckbox(props) {
|
|
|
665
665
|
selected: isSelected,
|
|
666
666
|
readonly: isReadOnly
|
|
667
667
|
},
|
|
668
|
-
|
|
668
|
+
plasmicUpdateVariant
|
|
669
669
|
)));
|
|
670
670
|
}
|
|
671
671
|
const makeDefaultCheckboxChildren = ({
|
|
@@ -1065,7 +1065,12 @@ function registerLabel(loader, overrides) {
|
|
|
1065
1065
|
},
|
|
1066
1066
|
props: {
|
|
1067
1067
|
children: {
|
|
1068
|
-
type: "slot"
|
|
1068
|
+
type: "slot",
|
|
1069
|
+
mergeWithParent: true,
|
|
1070
|
+
defaultValue: {
|
|
1071
|
+
type: "text",
|
|
1072
|
+
value: "Label"
|
|
1073
|
+
}
|
|
1069
1074
|
}
|
|
1070
1075
|
},
|
|
1071
1076
|
trapsFocus: true
|
|
@@ -1110,14 +1115,14 @@ const { variants: variants$b, withObservedValues: withObservedValues$9 } = pickA
|
|
|
1110
1115
|
CHECKBOX_GROUP_VARIANTS
|
|
1111
1116
|
);
|
|
1112
1117
|
function BaseCheckboxGroup(props) {
|
|
1113
|
-
const _a = props, { children,
|
|
1118
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$k(_a, ["children", "plasmicUpdateVariant"]);
|
|
1114
1119
|
return /* @__PURE__ */ React.createElement(PlasmicCheckboxGroupContext.Provider, { value: rest }, /* @__PURE__ */ React.createElement(CheckboxGroup, __spreadValues$l({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$9(
|
|
1115
1120
|
children,
|
|
1116
1121
|
{
|
|
1117
1122
|
disabled: isDisabled,
|
|
1118
1123
|
readonly: isReadOnly
|
|
1119
1124
|
},
|
|
1120
|
-
|
|
1125
|
+
plasmicUpdateVariant
|
|
1121
1126
|
)));
|
|
1122
1127
|
}
|
|
1123
1128
|
const componentName = makeComponentName("checkboxGroup");
|
|
@@ -1145,12 +1150,10 @@ function registerCheckboxGroup(loader, overrides) {
|
|
|
1145
1150
|
"isDisabled",
|
|
1146
1151
|
"isReadOnly",
|
|
1147
1152
|
"aria-label",
|
|
1148
|
-
"children",
|
|
1149
1153
|
"isRequired"
|
|
1150
1154
|
])), {
|
|
1151
1155
|
children: {
|
|
1152
1156
|
type: "slot",
|
|
1153
|
-
mergeWithParent: true,
|
|
1154
1157
|
defaultValue: [
|
|
1155
1158
|
{
|
|
1156
1159
|
type: "vbox",
|
|
@@ -1351,12 +1354,12 @@ const inputHelpers$1 = {
|
|
|
1351
1354
|
function BaseInput(props) {
|
|
1352
1355
|
var _b;
|
|
1353
1356
|
const _a = props, {
|
|
1354
|
-
|
|
1357
|
+
plasmicUpdateVariant,
|
|
1355
1358
|
setControlContextData,
|
|
1356
1359
|
disabled,
|
|
1357
1360
|
autoComplete
|
|
1358
1361
|
} = _a, rest = __objRest$j(_a, [
|
|
1359
|
-
"
|
|
1362
|
+
"plasmicUpdateVariant",
|
|
1360
1363
|
"setControlContextData",
|
|
1361
1364
|
"disabled",
|
|
1362
1365
|
"autoComplete"
|
|
@@ -1374,26 +1377,26 @@ function BaseInput(props) {
|
|
|
1374
1377
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
1375
1378
|
});
|
|
1376
1379
|
useEffect(() => {
|
|
1377
|
-
|
|
1380
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1378
1381
|
disabled: mergedProps.disabled
|
|
1379
1382
|
});
|
|
1380
|
-
}, [mergedProps.disabled,
|
|
1383
|
+
}, [mergedProps.disabled, plasmicUpdateVariant]);
|
|
1381
1384
|
return /* @__PURE__ */ React.createElement(
|
|
1382
1385
|
Input,
|
|
1383
1386
|
__spreadValues$k({
|
|
1384
1387
|
autoComplete: resolveAutoComplete(autoComplete),
|
|
1385
1388
|
onHoverChange: (isHovered) => {
|
|
1386
|
-
|
|
1389
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1387
1390
|
hovered: isHovered
|
|
1388
1391
|
});
|
|
1389
1392
|
},
|
|
1390
1393
|
onFocus: () => {
|
|
1391
|
-
|
|
1394
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1392
1395
|
focused: true
|
|
1393
1396
|
});
|
|
1394
1397
|
},
|
|
1395
1398
|
onBlur: () => {
|
|
1396
|
-
|
|
1399
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1397
1400
|
focused: false
|
|
1398
1401
|
});
|
|
1399
1402
|
}
|
|
@@ -1460,8 +1463,7 @@ function registerInput(loader, overrides) {
|
|
|
1460
1463
|
helpers: inputHelpers$1,
|
|
1461
1464
|
importName: "inputHelpers",
|
|
1462
1465
|
importPath: "@plasmicpkgs/react-aria/skinny/registerInput"
|
|
1463
|
-
}
|
|
1464
|
-
trapsFocus: true
|
|
1466
|
+
}
|
|
1465
1467
|
},
|
|
1466
1468
|
overrides
|
|
1467
1469
|
);
|
|
@@ -1507,7 +1509,7 @@ const { variants: variants$9, withObservedValues: withObservedValues$8 } = pickA
|
|
|
1507
1509
|
LIST_BOX_ITEM_VARIANTS
|
|
1508
1510
|
);
|
|
1509
1511
|
function BaseListBoxItem(props) {
|
|
1510
|
-
const _a = props, { children, setControlContextData,
|
|
1512
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant, id } = _a, rest = __objRest$i(_a, ["children", "setControlContextData", "plasmicUpdateVariant", "id"]);
|
|
1511
1513
|
const listboxContext = React.useContext(PlasmicListBoxContext);
|
|
1512
1514
|
const isStandalone = !listboxContext;
|
|
1513
1515
|
const [registeredId, setRegisteredId] = useState();
|
|
@@ -1543,7 +1545,7 @@ function BaseListBoxItem(props) {
|
|
|
1543
1545
|
selected: isSelected,
|
|
1544
1546
|
disabled: isDisabled
|
|
1545
1547
|
},
|
|
1546
|
-
|
|
1548
|
+
plasmicUpdateVariant
|
|
1547
1549
|
));
|
|
1548
1550
|
if (isStandalone) {
|
|
1549
1551
|
return /* @__PURE__ */ React.createElement(ListBox, { selectionMode: "single" }, listboxItem);
|
|
@@ -1615,9 +1617,11 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1615
1617
|
},
|
|
1616
1618
|
children: {
|
|
1617
1619
|
type: "slot",
|
|
1620
|
+
mergeWithParent: true,
|
|
1618
1621
|
defaultValue: makeDefaultListBoxItemChildren("Item")
|
|
1619
1622
|
}
|
|
1620
|
-
}
|
|
1623
|
+
},
|
|
1624
|
+
trapsFocus: true
|
|
1621
1625
|
},
|
|
1622
1626
|
overrides
|
|
1623
1627
|
);
|
|
@@ -1673,6 +1677,7 @@ function registerSection(loader, overrides) {
|
|
|
1673
1677
|
props: {
|
|
1674
1678
|
header: {
|
|
1675
1679
|
type: "slot",
|
|
1680
|
+
mergeWithParent: true,
|
|
1676
1681
|
defaultValue: [
|
|
1677
1682
|
{
|
|
1678
1683
|
type: "text",
|
|
@@ -1681,9 +1686,11 @@ function registerSection(loader, overrides) {
|
|
|
1681
1686
|
]
|
|
1682
1687
|
},
|
|
1683
1688
|
items: {
|
|
1684
|
-
type: "slot"
|
|
1689
|
+
type: "slot",
|
|
1690
|
+
mergeWithParent: true
|
|
1685
1691
|
}
|
|
1686
|
-
}
|
|
1692
|
+
},
|
|
1693
|
+
trapsFocus: true
|
|
1687
1694
|
},
|
|
1688
1695
|
overrides
|
|
1689
1696
|
);
|
|
@@ -2043,6 +2050,7 @@ function registerPopover(loader, overrides) {
|
|
|
2043
2050
|
props: {
|
|
2044
2051
|
children: {
|
|
2045
2052
|
type: "slot",
|
|
2053
|
+
mergeWithParent: true,
|
|
2046
2054
|
defaultValue: [
|
|
2047
2055
|
POPOVER_ARROW_IMG,
|
|
2048
2056
|
{
|
|
@@ -2050,7 +2058,7 @@ function registerPopover(loader, overrides) {
|
|
|
2050
2058
|
styles: {
|
|
2051
2059
|
width: "stretch",
|
|
2052
2060
|
padding: 0,
|
|
2053
|
-
|
|
2061
|
+
rowGap: "10px"
|
|
2054
2062
|
},
|
|
2055
2063
|
children: [
|
|
2056
2064
|
{
|
|
@@ -2103,7 +2111,8 @@ function registerPopover(loader, overrides) {
|
|
|
2103
2111
|
type: "themeResetClass"
|
|
2104
2112
|
}
|
|
2105
2113
|
},
|
|
2106
|
-
styleSections: true
|
|
2114
|
+
styleSections: true,
|
|
2115
|
+
trapsFocus: true
|
|
2107
2116
|
},
|
|
2108
2117
|
overrides
|
|
2109
2118
|
);
|
|
@@ -2289,7 +2298,8 @@ function registerComboBox(loader) {
|
|
|
2289
2298
|
onChangeProp: "onOpenChange",
|
|
2290
2299
|
variableType: "boolean"
|
|
2291
2300
|
}
|
|
2292
|
-
}
|
|
2301
|
+
},
|
|
2302
|
+
trapsFocus: true
|
|
2293
2303
|
});
|
|
2294
2304
|
}
|
|
2295
2305
|
|
|
@@ -2480,6 +2490,7 @@ function registerModal(loader, overrides) {
|
|
|
2480
2490
|
props: {
|
|
2481
2491
|
children: {
|
|
2482
2492
|
type: "slot",
|
|
2493
|
+
mergeWithParent: true,
|
|
2483
2494
|
defaultValue: {
|
|
2484
2495
|
type: "vbox",
|
|
2485
2496
|
styles: {
|
|
@@ -2600,6 +2611,7 @@ function registerDialogTrigger(loader, overrides) {
|
|
|
2600
2611
|
props: {
|
|
2601
2612
|
trigger: {
|
|
2602
2613
|
type: "slot",
|
|
2614
|
+
mergeWithParent: true,
|
|
2603
2615
|
defaultValue: {
|
|
2604
2616
|
type: "component",
|
|
2605
2617
|
name: BUTTON_COMPONENT_NAME,
|
|
@@ -2613,6 +2625,7 @@ function registerDialogTrigger(loader, overrides) {
|
|
|
2613
2625
|
},
|
|
2614
2626
|
dialog: {
|
|
2615
2627
|
type: "slot",
|
|
2628
|
+
mergeWithParent: true,
|
|
2616
2629
|
defaultValue: {
|
|
2617
2630
|
type: "component",
|
|
2618
2631
|
name: MODAL_COMPONENT_NAME
|
|
@@ -2708,7 +2721,8 @@ function registerForm(loader, overrides) {
|
|
|
2708
2721
|
importName: "BaseForm",
|
|
2709
2722
|
props: {
|
|
2710
2723
|
children: {
|
|
2711
|
-
type: "slot"
|
|
2724
|
+
type: "slot",
|
|
2725
|
+
mergeWithParent: true
|
|
2712
2726
|
},
|
|
2713
2727
|
onSubmit: {
|
|
2714
2728
|
type: "eventHandler",
|
|
@@ -2768,7 +2782,7 @@ const RADIO_VARIANTS = [
|
|
|
2768
2782
|
];
|
|
2769
2783
|
const { variants: variants$8, withObservedValues: withObservedValues$7 } = pickAriaComponentVariants(RADIO_VARIANTS);
|
|
2770
2784
|
function BaseRadio(props) {
|
|
2771
|
-
const _a = props, { children, setControlContextData,
|
|
2785
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$9(_a, ["children", "setControlContextData", "plasmicUpdateVariant"]);
|
|
2772
2786
|
const contextProps = React.useContext(PlasmicRadioGroupContext);
|
|
2773
2787
|
const isStandalone = !contextProps;
|
|
2774
2788
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
@@ -2793,7 +2807,7 @@ function BaseRadio(props) {
|
|
|
2793
2807
|
disabled: isDisabled,
|
|
2794
2808
|
readonly: isReadOnly
|
|
2795
2809
|
},
|
|
2796
|
-
|
|
2810
|
+
plasmicUpdateVariant
|
|
2797
2811
|
));
|
|
2798
2812
|
if (isStandalone) {
|
|
2799
2813
|
return /* @__PURE__ */ React.createElement(RadioGroup, null, radio);
|
|
@@ -2897,14 +2911,14 @@ var __objRest$8 = (source, exclude) => {
|
|
|
2897
2911
|
const RADIO_GROUP_VARIANTS = ["disabled", "readonly"];
|
|
2898
2912
|
const { variants: variants$7, withObservedValues: withObservedValues$6 } = pickAriaComponentVariants(RADIO_GROUP_VARIANTS);
|
|
2899
2913
|
function BaseRadioGroup(props) {
|
|
2900
|
-
const _a = props, { children,
|
|
2914
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$8(_a, ["children", "plasmicUpdateVariant"]);
|
|
2901
2915
|
return /* @__PURE__ */ React.createElement(PlasmicRadioGroupContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$9({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$6(
|
|
2902
2916
|
children,
|
|
2903
2917
|
{
|
|
2904
2918
|
disabled: isDisabled,
|
|
2905
2919
|
readonly: isReadOnly
|
|
2906
2920
|
},
|
|
2907
|
-
|
|
2921
|
+
plasmicUpdateVariant
|
|
2908
2922
|
)));
|
|
2909
2923
|
}
|
|
2910
2924
|
const RADIO_GROUP_COMPONENT_NAME = makeComponentName("radioGroup");
|
|
@@ -2934,7 +2948,6 @@ function registerRadioGroup(loader, overrides) {
|
|
|
2934
2948
|
])), {
|
|
2935
2949
|
children: {
|
|
2936
2950
|
type: "slot",
|
|
2937
|
-
mergeWithParent: true,
|
|
2938
2951
|
defaultValue: [
|
|
2939
2952
|
{
|
|
2940
2953
|
type: "vbox",
|
|
@@ -3137,7 +3150,8 @@ function registerSelect(loader) {
|
|
|
3137
3150
|
}
|
|
3138
3151
|
]
|
|
3139
3152
|
}
|
|
3140
|
-
}
|
|
3153
|
+
},
|
|
3154
|
+
trapsFocus: true
|
|
3141
3155
|
});
|
|
3142
3156
|
registerComponentHelper(loader, BaseSelect, {
|
|
3143
3157
|
name: SELECT_NAME,
|
|
@@ -3191,6 +3205,7 @@ function registerSelect(loader) {
|
|
|
3191
3205
|
},
|
|
3192
3206
|
children: {
|
|
3193
3207
|
type: "slot",
|
|
3208
|
+
mergeWithParent: true,
|
|
3194
3209
|
defaultValue: [
|
|
3195
3210
|
{
|
|
3196
3211
|
type: "vbox",
|
|
@@ -3286,7 +3301,8 @@ function registerSelect(loader) {
|
|
|
3286
3301
|
onChangeProp: "onOpenChange",
|
|
3287
3302
|
variableType: "boolean"
|
|
3288
3303
|
}
|
|
3289
|
-
}
|
|
3304
|
+
},
|
|
3305
|
+
trapsFocus: true
|
|
3290
3306
|
});
|
|
3291
3307
|
}
|
|
3292
3308
|
|
|
@@ -3323,13 +3339,13 @@ const { variants: variants$6, withObservedValues: withObservedValues$5 } = pickA
|
|
|
3323
3339
|
SLIDER_OUTPUT_VARIANTS
|
|
3324
3340
|
);
|
|
3325
3341
|
function BaseSliderOutput(props) {
|
|
3326
|
-
const _a = props, {
|
|
3342
|
+
const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$7(_a, ["plasmicUpdateVariant", "children"]);
|
|
3327
3343
|
return /* @__PURE__ */ React.createElement(SliderOutput, __spreadValues$7({}, rest), ({ isDisabled }) => withObservedValues$5(
|
|
3328
3344
|
children,
|
|
3329
3345
|
{
|
|
3330
3346
|
disabled: isDisabled
|
|
3331
3347
|
},
|
|
3332
|
-
|
|
3348
|
+
plasmicUpdateVariant
|
|
3333
3349
|
));
|
|
3334
3350
|
}
|
|
3335
3351
|
const SLIDER_OUTPUT_COMPONENT_NAME = makeComponentName("sliderOutput");
|
|
@@ -3344,7 +3360,10 @@ function registerSliderOutput(loader, overrides) {
|
|
|
3344
3360
|
importName: "BaseSliderOutput",
|
|
3345
3361
|
variants: variants$6,
|
|
3346
3362
|
props: {
|
|
3347
|
-
children: {
|
|
3363
|
+
children: {
|
|
3364
|
+
mergeWithParent: true,
|
|
3365
|
+
type: "slot"
|
|
3366
|
+
}
|
|
3348
3367
|
},
|
|
3349
3368
|
trapsFocus: true
|
|
3350
3369
|
},
|
|
@@ -3413,11 +3432,11 @@ function BaseSliderThumb(_a) {
|
|
|
3413
3432
|
var _b = _a, {
|
|
3414
3433
|
children,
|
|
3415
3434
|
advanced,
|
|
3416
|
-
|
|
3435
|
+
plasmicUpdateVariant
|
|
3417
3436
|
} = _b, rest = __objRest$6(_b, [
|
|
3418
3437
|
"children",
|
|
3419
3438
|
"advanced",
|
|
3420
|
-
"
|
|
3439
|
+
"plasmicUpdateVariant"
|
|
3421
3440
|
]);
|
|
3422
3441
|
const context = React.useContext(PlasmicSliderContext);
|
|
3423
3442
|
const mergedProps = mergeProps(context, rest);
|
|
@@ -3430,7 +3449,7 @@ function BaseSliderThumb(_a) {
|
|
|
3430
3449
|
focusVisible: isFocusVisible,
|
|
3431
3450
|
disabled: isDisabled
|
|
3432
3451
|
},
|
|
3433
|
-
|
|
3452
|
+
plasmicUpdateVariant
|
|
3434
3453
|
));
|
|
3435
3454
|
return /* @__PURE__ */ React.createElement(
|
|
3436
3455
|
ErrorBoundary,
|
|
@@ -3472,6 +3491,7 @@ function registerSliderThumb(loader, overrides) {
|
|
|
3472
3491
|
},
|
|
3473
3492
|
children: {
|
|
3474
3493
|
type: "slot",
|
|
3494
|
+
mergeWithParent: true,
|
|
3475
3495
|
hidden: (ps) => !ps.advanced
|
|
3476
3496
|
}
|
|
3477
3497
|
}),
|
|
@@ -3535,7 +3555,7 @@ function BaseSliderTrack(props) {
|
|
|
3535
3555
|
const context = React.useContext(PlasmicSliderContext);
|
|
3536
3556
|
const isStandalone = !context;
|
|
3537
3557
|
const mergedProps = mergeProps(context, props);
|
|
3538
|
-
const _a = mergedProps, { children, progressBar,
|
|
3558
|
+
const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$5(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
|
|
3539
3559
|
const isMultiValue = isMultiValueGuard(mergedProps.value);
|
|
3540
3560
|
const { minIndex, maxIndex } = useMemo(() => {
|
|
3541
3561
|
if (!context || !Array.isArray(context.value) || context.value.length <= 1) {
|
|
@@ -3584,7 +3604,7 @@ function BaseSliderTrack(props) {
|
|
|
3584
3604
|
{
|
|
3585
3605
|
hovered: isHovered
|
|
3586
3606
|
},
|
|
3587
|
-
|
|
3607
|
+
plasmicUpdateVariant
|
|
3588
3608
|
)));
|
|
3589
3609
|
if (isStandalone) {
|
|
3590
3610
|
return /* @__PURE__ */ React.createElement(Slider, { style: { height: "100%", width: "100%" } }, track);
|
|
@@ -3612,6 +3632,11 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3612
3632
|
props: {
|
|
3613
3633
|
children: {
|
|
3614
3634
|
type: "slot",
|
|
3635
|
+
/**
|
|
3636
|
+
* 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.
|
|
3637
|
+
* 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.
|
|
3638
|
+
* */
|
|
3639
|
+
// mergeWithParent: true,
|
|
3615
3640
|
displayName: "Thumbs",
|
|
3616
3641
|
description: "The thumbs of the slider. For range slider, you can add more than one thumb.",
|
|
3617
3642
|
allowedComponents: [sliderThumbMeta.name],
|
|
@@ -3625,6 +3650,7 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3625
3650
|
},
|
|
3626
3651
|
progressBar: {
|
|
3627
3652
|
type: "slot",
|
|
3653
|
+
mergeWithParent: true,
|
|
3628
3654
|
displayName: "Progress Bar",
|
|
3629
3655
|
defaultValue: [
|
|
3630
3656
|
{
|
|
@@ -3650,8 +3676,7 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3650
3676
|
type: "eventHandler",
|
|
3651
3677
|
argTypes: [{ name: "isHovering", type: "boolean" }]
|
|
3652
3678
|
}
|
|
3653
|
-
}
|
|
3654
|
-
trapsFocus: true
|
|
3679
|
+
}
|
|
3655
3680
|
},
|
|
3656
3681
|
overrides
|
|
3657
3682
|
);
|
|
@@ -3693,7 +3718,7 @@ const RANGE_SLIDER_COMPONENT_NAME = makeComponentName("range-slider");
|
|
|
3693
3718
|
const SLIDER_VARIANTS = ["disabled"];
|
|
3694
3719
|
const { variants: variants$3, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(SLIDER_VARIANTS);
|
|
3695
3720
|
function BaseSlider(props) {
|
|
3696
|
-
const _a = props, { children,
|
|
3721
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$4(_a, ["children", "plasmicUpdateVariant"]);
|
|
3697
3722
|
return /* @__PURE__ */ React.createElement(
|
|
3698
3723
|
PlasmicSliderContext.Provider,
|
|
3699
3724
|
{
|
|
@@ -3708,7 +3733,7 @@ function BaseSlider(props) {
|
|
|
3708
3733
|
{
|
|
3709
3734
|
disabled: isDisabled
|
|
3710
3735
|
},
|
|
3711
|
-
|
|
3736
|
+
plasmicUpdateVariant
|
|
3712
3737
|
))
|
|
3713
3738
|
);
|
|
3714
3739
|
}
|
|
@@ -3988,7 +4013,7 @@ const SWITCH_VARIANTS = [
|
|
|
3988
4013
|
];
|
|
3989
4014
|
const { variants: variants$2, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(SWITCH_VARIANTS);
|
|
3990
4015
|
function BaseSwitch(props) {
|
|
3991
|
-
const _a = props, { children,
|
|
4016
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$3(_a, ["children", "plasmicUpdateVariant"]);
|
|
3992
4017
|
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({
|
|
3993
4018
|
isHovered,
|
|
3994
4019
|
isPressed,
|
|
@@ -4008,7 +4033,7 @@ function BaseSwitch(props) {
|
|
|
4008
4033
|
disabled: isDisabled,
|
|
4009
4034
|
readonly: isReadOnly
|
|
4010
4035
|
},
|
|
4011
|
-
|
|
4036
|
+
plasmicUpdateVariant
|
|
4012
4037
|
));
|
|
4013
4038
|
}
|
|
4014
4039
|
function registerSwitch(loader, overrides) {
|
|
@@ -4183,16 +4208,16 @@ const inputHelpers = {
|
|
|
4183
4208
|
};
|
|
4184
4209
|
function BaseTextArea(props) {
|
|
4185
4210
|
var _b;
|
|
4186
|
-
const _a = props, { disabled,
|
|
4211
|
+
const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$2(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
|
|
4187
4212
|
const textFieldContext = React.useContext(PlasmicTextFieldContext);
|
|
4188
4213
|
const mergedProps = mergeProps(rest, {
|
|
4189
4214
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
4190
4215
|
});
|
|
4191
4216
|
useEffect(() => {
|
|
4192
|
-
|
|
4217
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4193
4218
|
disabled: mergedProps.disabled
|
|
4194
4219
|
});
|
|
4195
|
-
}, [mergedProps.disabled,
|
|
4220
|
+
}, [mergedProps.disabled, plasmicUpdateVariant]);
|
|
4196
4221
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
4197
4222
|
parent: textFieldContext
|
|
4198
4223
|
});
|
|
@@ -4200,17 +4225,17 @@ function BaseTextArea(props) {
|
|
|
4200
4225
|
TextArea,
|
|
4201
4226
|
__spreadValues$2({
|
|
4202
4227
|
onFocus: () => {
|
|
4203
|
-
|
|
4228
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4204
4229
|
focused: true
|
|
4205
4230
|
});
|
|
4206
4231
|
},
|
|
4207
4232
|
onBlur: () => {
|
|
4208
|
-
|
|
4233
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4209
4234
|
focused: false
|
|
4210
4235
|
});
|
|
4211
4236
|
},
|
|
4212
4237
|
onHoverChange: (isHovered) => {
|
|
4213
|
-
|
|
4238
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4214
4239
|
hovered: isHovered
|
|
4215
4240
|
});
|
|
4216
4241
|
}
|
|
@@ -4266,8 +4291,7 @@ function registerTextArea(loader, overrides) {
|
|
|
4266
4291
|
helpers: inputHelpers,
|
|
4267
4292
|
importName: "inputHelpers",
|
|
4268
4293
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextArea"
|
|
4269
|
-
}
|
|
4270
|
-
trapsFocus: true
|
|
4294
|
+
}
|
|
4271
4295
|
},
|
|
4272
4296
|
overrides
|
|
4273
4297
|
);
|
|
@@ -4307,14 +4331,14 @@ var __objRest$1 = (source, exclude) => {
|
|
|
4307
4331
|
const TEXT_FIELD_VARIANTS = ["disabled", "readonly"];
|
|
4308
4332
|
const { variants, withObservedValues } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
|
|
4309
4333
|
function BaseTextField(props) {
|
|
4310
|
-
const _a = props, { children,
|
|
4334
|
+
const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest$1(_a, ["children", "plasmicUpdateVariant", "autoComplete"]);
|
|
4311
4335
|
return /* @__PURE__ */ React.createElement(PlasmicTextFieldContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(TextField, __spreadValues$1({ autoComplete: resolveAutoComplete(autoComplete) }, rest), ({ isDisabled, isReadOnly }) => withObservedValues(
|
|
4312
4336
|
children,
|
|
4313
4337
|
{
|
|
4314
4338
|
disabled: isDisabled,
|
|
4315
4339
|
readonly: isReadOnly
|
|
4316
4340
|
},
|
|
4317
|
-
|
|
4341
|
+
plasmicUpdateVariant
|
|
4318
4342
|
)));
|
|
4319
4343
|
}
|
|
4320
4344
|
const TEXT_FIELD_COMPONENT_NAME = makeComponentName("textField");
|
|
@@ -4508,6 +4532,7 @@ function registerTooltip(loader, overrides) {
|
|
|
4508
4532
|
props: {
|
|
4509
4533
|
children: {
|
|
4510
4534
|
type: "slot",
|
|
4535
|
+
mergeWithParent: true,
|
|
4511
4536
|
defaultValue: {
|
|
4512
4537
|
type: "text",
|
|
4513
4538
|
value: "Hover me!"
|
|
@@ -4515,6 +4540,7 @@ function registerTooltip(loader, overrides) {
|
|
|
4515
4540
|
},
|
|
4516
4541
|
tooltipContent: {
|
|
4517
4542
|
type: "slot",
|
|
4543
|
+
mergeWithParent: true,
|
|
4518
4544
|
displayName: "Tooltip Content",
|
|
4519
4545
|
// NOTE: This is not applied in attachment
|
|
4520
4546
|
defaultValue: {
|
|
@@ -4562,7 +4588,8 @@ function registerTooltip(loader, overrides) {
|
|
|
4562
4588
|
onChangeProp: "onOpenChange",
|
|
4563
4589
|
variableType: "boolean"
|
|
4564
4590
|
}
|
|
4565
|
-
}
|
|
4591
|
+
},
|
|
4592
|
+
trapsFocus: true
|
|
4566
4593
|
},
|
|
4567
4594
|
overrides
|
|
4568
4595
|
);
|