@plasmicpkgs/react-aria 0.0.54 → 0.0.56
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 +61 -47
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +61 -47
- package/dist/react-aria.js.map +1 -1
- package/dist/registerListBoxItem.d.ts +1 -1
- package/dist/registerSliderThumb.d.ts +1 -1
- package/dist/variant-utils.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/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 -2
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +2 -2
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +1 -1
- package/skinny/registerComboBox.esm.js +1 -1
- package/skinny/registerInput.cjs.js +7 -7
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.esm.js +7 -7
- package/skinny/registerInput.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 +20 -7
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.d.ts +1 -1
- package/skinny/registerListBoxItem.esm.js +20 -7
- package/skinny/registerListBoxItem.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 -2
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.esm.js +2 -2
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +1 -1
- package/skinny/registerSelect.esm.js +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 +2 -2
- package/skinny/registerSliderOutput.cjs.js.map +1 -1
- package/skinny/registerSliderOutput.esm.js +2 -2
- package/skinny/registerSliderOutput.esm.js.map +1 -1
- package/skinny/registerSliderThumb.cjs.js +3 -3
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.d.ts +1 -1
- package/skinny/registerSliderThumb.esm.js +3 -3
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerSliderTrack.cjs.js +2 -2
- package/skinny/registerSliderTrack.cjs.js.map +1 -1
- package/skinny/registerSliderTrack.esm.js +2 -2
- 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/registerTextArea.cjs.js +6 -6
- package/skinny/registerTextArea.cjs.js.map +1 -1
- package/skinny/registerTextArea.esm.js +6 -6
- 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/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/skinny/registerListBox-85f61377.esm.js.map +0 -1
- package/skinny/registerListBox-96ae5783.cjs.js.map +0 -1
|
@@ -4,7 +4,7 @@ export declare class ListBoxItemIdManager {
|
|
|
4
4
|
private readonly _observers;
|
|
5
5
|
private generateDuplicateId;
|
|
6
6
|
private generateMissingId;
|
|
7
|
-
register(id?:
|
|
7
|
+
register(id?: unknown): string;
|
|
8
8
|
unregister(id: string): void;
|
|
9
9
|
subscribe(observer: Observer): void;
|
|
10
10
|
notify(): void;
|
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 = ({
|
|
@@ -1115,14 +1115,14 @@ const { variants: variants$b, withObservedValues: withObservedValues$9 } = pickA
|
|
|
1115
1115
|
CHECKBOX_GROUP_VARIANTS
|
|
1116
1116
|
);
|
|
1117
1117
|
function BaseCheckboxGroup(props) {
|
|
1118
|
-
const _a = props, { children,
|
|
1118
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$k(_a, ["children", "plasmicUpdateVariant"]);
|
|
1119
1119
|
return /* @__PURE__ */ React.createElement(PlasmicCheckboxGroupContext.Provider, { value: rest }, /* @__PURE__ */ React.createElement(CheckboxGroup, __spreadValues$l({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$9(
|
|
1120
1120
|
children,
|
|
1121
1121
|
{
|
|
1122
1122
|
disabled: isDisabled,
|
|
1123
1123
|
readonly: isReadOnly
|
|
1124
1124
|
},
|
|
1125
|
-
|
|
1125
|
+
plasmicUpdateVariant
|
|
1126
1126
|
)));
|
|
1127
1127
|
}
|
|
1128
1128
|
const componentName = makeComponentName("checkboxGroup");
|
|
@@ -1280,13 +1280,14 @@ class ListBoxItemIdManager {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
register(id) {
|
|
1283
|
+
const idStr = id === void 0 ? void 0 : String(id).trim();
|
|
1283
1284
|
let newId;
|
|
1284
|
-
if (!
|
|
1285
|
+
if (!idStr) {
|
|
1285
1286
|
newId = this.generateMissingId();
|
|
1286
|
-
} else if (this._ids.has(
|
|
1287
|
-
newId = this.generateDuplicateId(
|
|
1287
|
+
} else if (this._ids.has(idStr)) {
|
|
1288
|
+
newId = this.generateDuplicateId(idStr);
|
|
1288
1289
|
} else {
|
|
1289
|
-
newId =
|
|
1290
|
+
newId = idStr;
|
|
1290
1291
|
}
|
|
1291
1292
|
this._ids.add(newId);
|
|
1292
1293
|
this.notify();
|
|
@@ -1354,12 +1355,12 @@ const inputHelpers$1 = {
|
|
|
1354
1355
|
function BaseInput(props) {
|
|
1355
1356
|
var _b;
|
|
1356
1357
|
const _a = props, {
|
|
1357
|
-
|
|
1358
|
+
plasmicUpdateVariant,
|
|
1358
1359
|
setControlContextData,
|
|
1359
1360
|
disabled,
|
|
1360
1361
|
autoComplete
|
|
1361
1362
|
} = _a, rest = __objRest$j(_a, [
|
|
1362
|
-
"
|
|
1363
|
+
"plasmicUpdateVariant",
|
|
1363
1364
|
"setControlContextData",
|
|
1364
1365
|
"disabled",
|
|
1365
1366
|
"autoComplete"
|
|
@@ -1377,26 +1378,26 @@ function BaseInput(props) {
|
|
|
1377
1378
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
1378
1379
|
});
|
|
1379
1380
|
useEffect(() => {
|
|
1380
|
-
|
|
1381
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1381
1382
|
disabled: mergedProps.disabled
|
|
1382
1383
|
});
|
|
1383
|
-
}, [mergedProps.disabled,
|
|
1384
|
+
}, [mergedProps.disabled, plasmicUpdateVariant]);
|
|
1384
1385
|
return /* @__PURE__ */ React.createElement(
|
|
1385
1386
|
Input,
|
|
1386
1387
|
__spreadValues$k({
|
|
1387
1388
|
autoComplete: resolveAutoComplete(autoComplete),
|
|
1388
1389
|
onHoverChange: (isHovered) => {
|
|
1389
|
-
|
|
1390
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1390
1391
|
hovered: isHovered
|
|
1391
1392
|
});
|
|
1392
1393
|
},
|
|
1393
1394
|
onFocus: () => {
|
|
1394
|
-
|
|
1395
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1395
1396
|
focused: true
|
|
1396
1397
|
});
|
|
1397
1398
|
},
|
|
1398
1399
|
onBlur: () => {
|
|
1399
|
-
|
|
1400
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
1400
1401
|
focused: false
|
|
1401
1402
|
});
|
|
1402
1403
|
}
|
|
@@ -1509,7 +1510,7 @@ const { variants: variants$9, withObservedValues: withObservedValues$8 } = pickA
|
|
|
1509
1510
|
LIST_BOX_ITEM_VARIANTS
|
|
1510
1511
|
);
|
|
1511
1512
|
function BaseListBoxItem(props) {
|
|
1512
|
-
const _a = props, { children, setControlContextData,
|
|
1513
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant, id } = _a, rest = __objRest$i(_a, ["children", "setControlContextData", "plasmicUpdateVariant", "id"]);
|
|
1513
1514
|
const listboxContext = React.useContext(PlasmicListBoxContext);
|
|
1514
1515
|
const isStandalone = !listboxContext;
|
|
1515
1516
|
const [registeredId, setRegisteredId] = useState();
|
|
@@ -1525,8 +1526,21 @@ function BaseListBoxItem(props) {
|
|
|
1525
1526
|
};
|
|
1526
1527
|
}, [id]);
|
|
1527
1528
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
1528
|
-
|
|
1529
|
-
|
|
1529
|
+
idError: (() => {
|
|
1530
|
+
if (id === void 0) {
|
|
1531
|
+
return "ID must be defined";
|
|
1532
|
+
}
|
|
1533
|
+
if (typeof id !== "string") {
|
|
1534
|
+
return "ID must be a string";
|
|
1535
|
+
}
|
|
1536
|
+
if (!id.trim()) {
|
|
1537
|
+
return "ID must be defined";
|
|
1538
|
+
}
|
|
1539
|
+
if (!isStandalone && id != registeredId) {
|
|
1540
|
+
return "ID must be unique";
|
|
1541
|
+
}
|
|
1542
|
+
return void 0;
|
|
1543
|
+
})()
|
|
1530
1544
|
});
|
|
1531
1545
|
const listboxItem = /* @__PURE__ */ React.createElement(ListBoxItem, __spreadValues$j({ key: registeredId, id: registeredId }, rest), ({
|
|
1532
1546
|
isHovered,
|
|
@@ -1545,7 +1559,7 @@ function BaseListBoxItem(props) {
|
|
|
1545
1559
|
selected: isSelected,
|
|
1546
1560
|
disabled: isDisabled
|
|
1547
1561
|
},
|
|
1548
|
-
|
|
1562
|
+
plasmicUpdateVariant
|
|
1549
1563
|
));
|
|
1550
1564
|
if (isStandalone) {
|
|
1551
1565
|
return /* @__PURE__ */ React.createElement(ListBox, { selectionMode: "single" }, listboxItem);
|
|
@@ -1602,11 +1616,11 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1602
1616
|
props: {
|
|
1603
1617
|
id: {
|
|
1604
1618
|
type: "string",
|
|
1605
|
-
description: "The
|
|
1619
|
+
description: "The ID of the item",
|
|
1606
1620
|
required: true,
|
|
1607
1621
|
validator: (_value, _props, ctx) => {
|
|
1608
|
-
if (ctx == null ? void 0 : ctx.
|
|
1609
|
-
return
|
|
1622
|
+
if (ctx == null ? void 0 : ctx.idError) {
|
|
1623
|
+
return ctx.idError;
|
|
1610
1624
|
}
|
|
1611
1625
|
return true;
|
|
1612
1626
|
}
|
|
@@ -2782,7 +2796,7 @@ const RADIO_VARIANTS = [
|
|
|
2782
2796
|
];
|
|
2783
2797
|
const { variants: variants$8, withObservedValues: withObservedValues$7 } = pickAriaComponentVariants(RADIO_VARIANTS);
|
|
2784
2798
|
function BaseRadio(props) {
|
|
2785
|
-
const _a = props, { children, setControlContextData,
|
|
2799
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$9(_a, ["children", "setControlContextData", "plasmicUpdateVariant"]);
|
|
2786
2800
|
const contextProps = React.useContext(PlasmicRadioGroupContext);
|
|
2787
2801
|
const isStandalone = !contextProps;
|
|
2788
2802
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
@@ -2807,7 +2821,7 @@ function BaseRadio(props) {
|
|
|
2807
2821
|
disabled: isDisabled,
|
|
2808
2822
|
readonly: isReadOnly
|
|
2809
2823
|
},
|
|
2810
|
-
|
|
2824
|
+
plasmicUpdateVariant
|
|
2811
2825
|
));
|
|
2812
2826
|
if (isStandalone) {
|
|
2813
2827
|
return /* @__PURE__ */ React.createElement(RadioGroup, null, radio);
|
|
@@ -2911,14 +2925,14 @@ var __objRest$8 = (source, exclude) => {
|
|
|
2911
2925
|
const RADIO_GROUP_VARIANTS = ["disabled", "readonly"];
|
|
2912
2926
|
const { variants: variants$7, withObservedValues: withObservedValues$6 } = pickAriaComponentVariants(RADIO_GROUP_VARIANTS);
|
|
2913
2927
|
function BaseRadioGroup(props) {
|
|
2914
|
-
const _a = props, { children,
|
|
2928
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$8(_a, ["children", "plasmicUpdateVariant"]);
|
|
2915
2929
|
return /* @__PURE__ */ React.createElement(PlasmicRadioGroupContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$9({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$6(
|
|
2916
2930
|
children,
|
|
2917
2931
|
{
|
|
2918
2932
|
disabled: isDisabled,
|
|
2919
2933
|
readonly: isReadOnly
|
|
2920
2934
|
},
|
|
2921
|
-
|
|
2935
|
+
plasmicUpdateVariant
|
|
2922
2936
|
)));
|
|
2923
2937
|
}
|
|
2924
2938
|
const RADIO_GROUP_COMPONENT_NAME = makeComponentName("radioGroup");
|
|
@@ -3339,13 +3353,13 @@ const { variants: variants$6, withObservedValues: withObservedValues$5 } = pickA
|
|
|
3339
3353
|
SLIDER_OUTPUT_VARIANTS
|
|
3340
3354
|
);
|
|
3341
3355
|
function BaseSliderOutput(props) {
|
|
3342
|
-
const _a = props, {
|
|
3356
|
+
const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$7(_a, ["plasmicUpdateVariant", "children"]);
|
|
3343
3357
|
return /* @__PURE__ */ React.createElement(SliderOutput, __spreadValues$7({}, rest), ({ isDisabled }) => withObservedValues$5(
|
|
3344
3358
|
children,
|
|
3345
3359
|
{
|
|
3346
3360
|
disabled: isDisabled
|
|
3347
3361
|
},
|
|
3348
|
-
|
|
3362
|
+
plasmicUpdateVariant
|
|
3349
3363
|
));
|
|
3350
3364
|
}
|
|
3351
3365
|
const SLIDER_OUTPUT_COMPONENT_NAME = makeComponentName("sliderOutput");
|
|
@@ -3432,11 +3446,11 @@ function BaseSliderThumb(_a) {
|
|
|
3432
3446
|
var _b = _a, {
|
|
3433
3447
|
children,
|
|
3434
3448
|
advanced,
|
|
3435
|
-
|
|
3449
|
+
plasmicUpdateVariant
|
|
3436
3450
|
} = _b, rest = __objRest$6(_b, [
|
|
3437
3451
|
"children",
|
|
3438
3452
|
"advanced",
|
|
3439
|
-
"
|
|
3453
|
+
"plasmicUpdateVariant"
|
|
3440
3454
|
]);
|
|
3441
3455
|
const context = React.useContext(PlasmicSliderContext);
|
|
3442
3456
|
const mergedProps = mergeProps(context, rest);
|
|
@@ -3449,7 +3463,7 @@ function BaseSliderThumb(_a) {
|
|
|
3449
3463
|
focusVisible: isFocusVisible,
|
|
3450
3464
|
disabled: isDisabled
|
|
3451
3465
|
},
|
|
3452
|
-
|
|
3466
|
+
plasmicUpdateVariant
|
|
3453
3467
|
));
|
|
3454
3468
|
return /* @__PURE__ */ React.createElement(
|
|
3455
3469
|
ErrorBoundary,
|
|
@@ -3555,7 +3569,7 @@ function BaseSliderTrack(props) {
|
|
|
3555
3569
|
const context = React.useContext(PlasmicSliderContext);
|
|
3556
3570
|
const isStandalone = !context;
|
|
3557
3571
|
const mergedProps = mergeProps(context, props);
|
|
3558
|
-
const _a = mergedProps, { children, progressBar,
|
|
3572
|
+
const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$5(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
|
|
3559
3573
|
const isMultiValue = isMultiValueGuard(mergedProps.value);
|
|
3560
3574
|
const { minIndex, maxIndex } = useMemo(() => {
|
|
3561
3575
|
if (!context || !Array.isArray(context.value) || context.value.length <= 1) {
|
|
@@ -3604,7 +3618,7 @@ function BaseSliderTrack(props) {
|
|
|
3604
3618
|
{
|
|
3605
3619
|
hovered: isHovered
|
|
3606
3620
|
},
|
|
3607
|
-
|
|
3621
|
+
plasmicUpdateVariant
|
|
3608
3622
|
)));
|
|
3609
3623
|
if (isStandalone) {
|
|
3610
3624
|
return /* @__PURE__ */ React.createElement(Slider, { style: { height: "100%", width: "100%" } }, track);
|
|
@@ -3718,7 +3732,7 @@ const RANGE_SLIDER_COMPONENT_NAME = makeComponentName("range-slider");
|
|
|
3718
3732
|
const SLIDER_VARIANTS = ["disabled"];
|
|
3719
3733
|
const { variants: variants$3, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(SLIDER_VARIANTS);
|
|
3720
3734
|
function BaseSlider(props) {
|
|
3721
|
-
const _a = props, { children,
|
|
3735
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$4(_a, ["children", "plasmicUpdateVariant"]);
|
|
3722
3736
|
return /* @__PURE__ */ React.createElement(
|
|
3723
3737
|
PlasmicSliderContext.Provider,
|
|
3724
3738
|
{
|
|
@@ -3733,7 +3747,7 @@ function BaseSlider(props) {
|
|
|
3733
3747
|
{
|
|
3734
3748
|
disabled: isDisabled
|
|
3735
3749
|
},
|
|
3736
|
-
|
|
3750
|
+
plasmicUpdateVariant
|
|
3737
3751
|
))
|
|
3738
3752
|
);
|
|
3739
3753
|
}
|
|
@@ -4013,7 +4027,7 @@ const SWITCH_VARIANTS = [
|
|
|
4013
4027
|
];
|
|
4014
4028
|
const { variants: variants$2, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(SWITCH_VARIANTS);
|
|
4015
4029
|
function BaseSwitch(props) {
|
|
4016
|
-
const _a = props, { children,
|
|
4030
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$3(_a, ["children", "plasmicUpdateVariant"]);
|
|
4017
4031
|
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({
|
|
4018
4032
|
isHovered,
|
|
4019
4033
|
isPressed,
|
|
@@ -4033,7 +4047,7 @@ function BaseSwitch(props) {
|
|
|
4033
4047
|
disabled: isDisabled,
|
|
4034
4048
|
readonly: isReadOnly
|
|
4035
4049
|
},
|
|
4036
|
-
|
|
4050
|
+
plasmicUpdateVariant
|
|
4037
4051
|
));
|
|
4038
4052
|
}
|
|
4039
4053
|
function registerSwitch(loader, overrides) {
|
|
@@ -4208,16 +4222,16 @@ const inputHelpers = {
|
|
|
4208
4222
|
};
|
|
4209
4223
|
function BaseTextArea(props) {
|
|
4210
4224
|
var _b;
|
|
4211
|
-
const _a = props, { disabled,
|
|
4225
|
+
const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$2(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
|
|
4212
4226
|
const textFieldContext = React.useContext(PlasmicTextFieldContext);
|
|
4213
4227
|
const mergedProps = mergeProps(rest, {
|
|
4214
4228
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
4215
4229
|
});
|
|
4216
4230
|
useEffect(() => {
|
|
4217
|
-
|
|
4231
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4218
4232
|
disabled: mergedProps.disabled
|
|
4219
4233
|
});
|
|
4220
|
-
}, [mergedProps.disabled,
|
|
4234
|
+
}, [mergedProps.disabled, plasmicUpdateVariant]);
|
|
4221
4235
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
4222
4236
|
parent: textFieldContext
|
|
4223
4237
|
});
|
|
@@ -4225,17 +4239,17 @@ function BaseTextArea(props) {
|
|
|
4225
4239
|
TextArea,
|
|
4226
4240
|
__spreadValues$2({
|
|
4227
4241
|
onFocus: () => {
|
|
4228
|
-
|
|
4242
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4229
4243
|
focused: true
|
|
4230
4244
|
});
|
|
4231
4245
|
},
|
|
4232
4246
|
onBlur: () => {
|
|
4233
|
-
|
|
4247
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4234
4248
|
focused: false
|
|
4235
4249
|
});
|
|
4236
4250
|
},
|
|
4237
4251
|
onHoverChange: (isHovered) => {
|
|
4238
|
-
|
|
4252
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
4239
4253
|
hovered: isHovered
|
|
4240
4254
|
});
|
|
4241
4255
|
}
|
|
@@ -4331,14 +4345,14 @@ var __objRest$1 = (source, exclude) => {
|
|
|
4331
4345
|
const TEXT_FIELD_VARIANTS = ["disabled", "readonly"];
|
|
4332
4346
|
const { variants, withObservedValues } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
|
|
4333
4347
|
function BaseTextField(props) {
|
|
4334
|
-
const _a = props, { children,
|
|
4348
|
+
const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest$1(_a, ["children", "plasmicUpdateVariant", "autoComplete"]);
|
|
4335
4349
|
return /* @__PURE__ */ React.createElement(PlasmicTextFieldContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(TextField, __spreadValues$1({ autoComplete: resolveAutoComplete(autoComplete) }, rest), ({ isDisabled, isReadOnly }) => withObservedValues(
|
|
4336
4350
|
children,
|
|
4337
4351
|
{
|
|
4338
4352
|
disabled: isDisabled,
|
|
4339
4353
|
readonly: isReadOnly
|
|
4340
4354
|
},
|
|
4341
|
-
|
|
4355
|
+
plasmicUpdateVariant
|
|
4342
4356
|
)));
|
|
4343
4357
|
}
|
|
4344
4358
|
const TEXT_FIELD_COMPONENT_NAME = makeComponentName("textField");
|