@plasmicpkgs/react-aria 0.0.65 → 0.0.66
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 +321 -221
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +319 -219
- package/dist/react-aria.js.map +1 -1
- package/dist/registerButton.d.ts +1 -1
- package/dist/registerTooltip.d.ts +4 -1
- package/dist/variant-utils.d.ts +16 -0
- package/package.json +2 -2
- package/skinny/registerButton.cjs.js +18 -17
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.d.ts +1 -1
- package/skinny/registerButton.esm.js +19 -17
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +1 -1
- package/skinny/registerCheckbox.esm.js +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +1 -1
- package/skinny/registerCheckboxGroup.esm.js +1 -1
- package/skinny/registerComboBox.cjs.js +1 -1
- package/skinny/registerComboBox.esm.js +1 -1
- package/skinny/registerDialogTrigger.cjs.js +1 -1
- package/skinny/registerDialogTrigger.esm.js +1 -1
- package/skinny/registerInput.cjs.js +1 -1
- package/skinny/registerInput.esm.js +1 -1
- package/skinny/registerListBox.cjs.js +1 -1
- package/skinny/registerListBox.esm.js +1 -1
- package/skinny/registerListBoxItem.cjs.js +1 -1
- package/skinny/registerListBoxItem.esm.js +1 -1
- package/skinny/registerModal.cjs.js +14 -3
- package/skinny/registerModal.cjs.js.map +1 -1
- package/skinny/registerModal.esm.js +14 -3
- package/skinny/registerModal.esm.js.map +1 -1
- package/skinny/registerRadio.cjs.js +1 -1
- package/skinny/registerRadio.esm.js +1 -1
- package/skinny/registerRadioGroup.cjs.js +1 -1
- package/skinny/registerRadioGroup.esm.js +1 -1
- package/skinny/registerSelect.cjs.js +1 -1
- package/skinny/registerSelect.esm.js +1 -1
- package/skinny/registerSlider.cjs.js +1 -1
- package/skinny/registerSlider.esm.js +1 -1
- package/skinny/registerSliderOutput.cjs.js +1 -1
- package/skinny/registerSliderOutput.esm.js +1 -1
- package/skinny/registerSliderThumb.cjs.js +1 -1
- package/skinny/registerSliderThumb.esm.js +1 -1
- package/skinny/registerSliderTrack.cjs.js +1 -1
- package/skinny/registerSliderTrack.esm.js +1 -1
- package/skinny/registerSwitch.cjs.js +1 -1
- package/skinny/registerSwitch.esm.js +1 -1
- package/skinny/registerTextArea.cjs.js +1 -1
- package/skinny/registerTextArea.esm.js +1 -1
- package/skinny/registerTextField.cjs.js +1 -1
- package/skinny/registerTextField.esm.js +1 -1
- package/skinny/registerTooltip.cjs.js +118 -46
- package/skinny/registerTooltip.cjs.js.map +1 -1
- package/skinny/registerTooltip.d.ts +4 -1
- package/skinny/registerTooltip.esm.js +117 -45
- package/skinny/registerTooltip.esm.js.map +1 -1
- package/skinny/{variant-utils-23360776.esm.js → variant-utils-5f90385f.esm.js} +17 -1
- package/skinny/variant-utils-5f90385f.esm.js.map +1 -0
- package/skinny/{variant-utils-db5b9590.cjs.js → variant-utils-6c6ef452.cjs.js} +17 -1
- package/skinny/variant-utils-6c6ef452.cjs.js.map +1 -0
- package/skinny/variant-utils.d.ts +16 -0
- package/skinny/variant-utils-23360776.esm.js.map +0 -1
- package/skinny/variant-utils-db5b9590.cjs.js.map +0 -1
package/dist/react-aria.esm.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React, { useEffect, useState, useMemo, forwardRef, useImperativeHandle, Component } from 'react';
|
|
2
|
-
import { Button, Checkbox, Text, FieldError, Label, CheckboxGroup, Input, ListBoxItem, ListBox, Section, Header, PopoverContext, Popover, ComboBox, ComboBoxStateContext, Heading, ModalOverlay, Modal, Dialog, DialogTrigger, Radio, RadioGroup, Select, SelectValue, SliderOutput, SliderThumb, Slider, SliderTrack, Switch, TextArea, TextField } from 'react-aria-components';
|
|
2
|
+
import { Button, Checkbox, Text, FieldError, Label, CheckboxGroup, Input, ListBoxItem, ListBox, Section, Header, PopoverContext, Popover, ComboBox, ComboBoxStateContext, Heading, ModalOverlay, Modal, Dialog, DialogTrigger, Radio, RadioGroup, Select, SelectValue, SliderOutput, SliderThumb, Slider, SliderTrack, Switch, TextArea, TextField, TooltipTrigger, Tooltip } from 'react-aria-components';
|
|
3
3
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
4
4
|
import { usePlasmicCanvasContext, usePlasmicCanvasComponentInfo } from '@plasmicapp/host';
|
|
5
|
-
import { mergeProps,
|
|
5
|
+
import { mergeProps, useButton } from 'react-aria';
|
|
6
6
|
import { mergeProps as mergeProps$1 } from '@react-aria/utils';
|
|
7
7
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
8
|
-
import { useTooltipTriggerState } from 'react-stately';
|
|
9
8
|
|
|
10
9
|
var __defProp$r = Object.defineProperty;
|
|
11
|
-
var __defProps$
|
|
12
|
-
var __getOwnPropDescs$
|
|
10
|
+
var __defProps$h = Object.defineProperties;
|
|
11
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
13
12
|
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
14
13
|
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
15
14
|
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
@@ -25,16 +24,16 @@ var __spreadValues$r = (a, b) => {
|
|
|
25
24
|
}
|
|
26
25
|
return a;
|
|
27
26
|
};
|
|
28
|
-
var __spreadProps$
|
|
27
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
29
28
|
function registerComponentHelper(loader, component, meta, overrides) {
|
|
30
29
|
var _a;
|
|
31
|
-
meta = __spreadProps$
|
|
30
|
+
meta = __spreadProps$h(__spreadValues$r({}, meta), {
|
|
32
31
|
defaultStyles: __spreadValues$r({
|
|
33
32
|
boxSizing: "border-box"
|
|
34
33
|
}, (_a = meta.defaultStyles) != null ? _a : {})
|
|
35
34
|
});
|
|
36
35
|
if (overrides) {
|
|
37
|
-
meta = __spreadProps$
|
|
36
|
+
meta = __spreadProps$h(__spreadValues$r(__spreadValues$r({}, meta), overrides), {
|
|
38
37
|
props: __spreadValues$r(__spreadValues$r({}, meta.props), overrides.props)
|
|
39
38
|
});
|
|
40
39
|
if (overrides.parentComponentName) {
|
|
@@ -450,6 +449,22 @@ const ARIA_COMPONENTS_VARIANTS = {
|
|
|
450
449
|
indeterminate: {
|
|
451
450
|
cssSelector: "[data-indeterminate]",
|
|
452
451
|
displayName: "Indeterminate"
|
|
452
|
+
},
|
|
453
|
+
placementLeft: {
|
|
454
|
+
cssSelector: "[data-placement]=left",
|
|
455
|
+
displayName: "Placement (Left)"
|
|
456
|
+
},
|
|
457
|
+
placementRight: {
|
|
458
|
+
cssSelector: "[data-placement]=right",
|
|
459
|
+
displayName: "Placement (Right)"
|
|
460
|
+
},
|
|
461
|
+
placementTop: {
|
|
462
|
+
cssSelector: "[data-placement]=top",
|
|
463
|
+
displayName: "Placement (Top)"
|
|
464
|
+
},
|
|
465
|
+
placementBottom: {
|
|
466
|
+
cssSelector: "[data-placement]=bottom",
|
|
467
|
+
displayName: "Placement (Bottom)"
|
|
453
468
|
}
|
|
454
469
|
};
|
|
455
470
|
function ChangesObserver({
|
|
@@ -477,8 +492,8 @@ function pickAriaComponentVariants(keys) {
|
|
|
477
492
|
}
|
|
478
493
|
|
|
479
494
|
var __defProp$q = Object.defineProperty;
|
|
480
|
-
var __defProps$
|
|
481
|
-
var __getOwnPropDescs$
|
|
495
|
+
var __defProps$g = Object.defineProperties;
|
|
496
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
482
497
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
483
498
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
484
499
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
@@ -494,8 +509,8 @@ var __spreadValues$q = (a, b) => {
|
|
|
494
509
|
}
|
|
495
510
|
return a;
|
|
496
511
|
};
|
|
497
|
-
var __spreadProps$
|
|
498
|
-
var __objRest$
|
|
512
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
513
|
+
var __objRest$n = (source, exclude) => {
|
|
499
514
|
var target = {};
|
|
500
515
|
for (var prop in source)
|
|
501
516
|
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -514,22 +529,24 @@ const BUTTON_VARIANTS = [
|
|
|
514
529
|
"focusVisible",
|
|
515
530
|
"disabled"
|
|
516
531
|
];
|
|
517
|
-
const { variants: variants$
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
532
|
+
const { variants: variants$e, withObservedValues: withObservedValues$c } = pickAriaComponentVariants(BUTTON_VARIANTS);
|
|
533
|
+
const BaseButton = React.forwardRef(
|
|
534
|
+
(props, ref) => {
|
|
535
|
+
const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$n(_a, ["submitsForm", "resetsForm", "children", "plasmicUpdateVariant"]);
|
|
536
|
+
const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
|
|
537
|
+
return /* @__PURE__ */ React.createElement(Button, __spreadValues$q({ type, ref }, rest), ({ isHovered, isPressed, isFocused, isFocusVisible, isDisabled }) => withObservedValues$c(
|
|
538
|
+
children,
|
|
539
|
+
{
|
|
540
|
+
hovered: isHovered,
|
|
541
|
+
pressed: isPressed,
|
|
542
|
+
focused: isFocused,
|
|
543
|
+
focusVisible: isFocusVisible,
|
|
544
|
+
disabled: isDisabled
|
|
545
|
+
},
|
|
546
|
+
plasmicUpdateVariant
|
|
547
|
+
));
|
|
548
|
+
}
|
|
549
|
+
);
|
|
533
550
|
const BUTTON_COMPONENT_NAME = makeComponentName("button");
|
|
534
551
|
function registerButton(loader, overrides) {
|
|
535
552
|
registerComponentHelper(
|
|
@@ -540,7 +557,7 @@ function registerButton(loader, overrides) {
|
|
|
540
557
|
displayName: "Aria Button",
|
|
541
558
|
importPath: "@plasmicpkgs/react-aria/skinny/registerButton",
|
|
542
559
|
importName: "BaseButton",
|
|
543
|
-
variants: variants$
|
|
560
|
+
variants: variants$e,
|
|
544
561
|
defaultStyles: {
|
|
545
562
|
borderWidth: "1px",
|
|
546
563
|
borderStyle: "solid",
|
|
@@ -548,7 +565,7 @@ function registerButton(loader, overrides) {
|
|
|
548
565
|
padding: "2px 10px",
|
|
549
566
|
cursor: "pointer"
|
|
550
567
|
},
|
|
551
|
-
props: __spreadProps$
|
|
568
|
+
props: __spreadProps$g(__spreadValues$q({}, getCommonProps("button", [
|
|
552
569
|
"autoFocus",
|
|
553
570
|
"isDisabled",
|
|
554
571
|
"aria-label"
|
|
@@ -600,8 +617,8 @@ React.createContext(void 0);
|
|
|
600
617
|
const PlasmicInputContext = React.createContext(void 0);
|
|
601
618
|
|
|
602
619
|
var __defProp$p = Object.defineProperty;
|
|
603
|
-
var __defProps$
|
|
604
|
-
var __getOwnPropDescs$
|
|
620
|
+
var __defProps$f = Object.defineProperties;
|
|
621
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
605
622
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
606
623
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
607
624
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
@@ -617,8 +634,8 @@ var __spreadValues$p = (a, b) => {
|
|
|
617
634
|
}
|
|
618
635
|
return a;
|
|
619
636
|
};
|
|
620
|
-
var __spreadProps$
|
|
621
|
-
var __objRest$
|
|
637
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
638
|
+
var __objRest$m = (source, exclude) => {
|
|
622
639
|
var target = {};
|
|
623
640
|
for (var prop in source)
|
|
624
641
|
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -641,9 +658,9 @@ const CHECKBOX_VARIANTS = [
|
|
|
641
658
|
"readonly",
|
|
642
659
|
"selected"
|
|
643
660
|
];
|
|
644
|
-
const { variants: variants$
|
|
661
|
+
const { variants: variants$d, withObservedValues: withObservedValues$b } = pickAriaComponentVariants(CHECKBOX_VARIANTS);
|
|
645
662
|
function BaseCheckbox(props) {
|
|
646
|
-
const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$
|
|
663
|
+
const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$m(_a, ["children", "plasmicUpdateVariant", "setControlContextData"]);
|
|
647
664
|
const contextProps = React.useContext(PlasmicCheckboxGroupContext);
|
|
648
665
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
649
666
|
parent: contextProps
|
|
@@ -657,7 +674,7 @@ function BaseCheckbox(props) {
|
|
|
657
674
|
isIndeterminate,
|
|
658
675
|
isSelected,
|
|
659
676
|
isReadOnly
|
|
660
|
-
}) => withObservedValues$
|
|
677
|
+
}) => withObservedValues$b(
|
|
661
678
|
children,
|
|
662
679
|
{
|
|
663
680
|
hovered: isHovered,
|
|
@@ -727,8 +744,8 @@ function registerCheckbox(loader, overrides) {
|
|
|
727
744
|
displayName: "Aria Checkbox",
|
|
728
745
|
importPath: "@plasmicpkgs/react-aria/skinny/registerCheckbox",
|
|
729
746
|
importName: "BaseCheckbox",
|
|
730
|
-
variants: variants$
|
|
731
|
-
props: __spreadProps$
|
|
747
|
+
variants: variants$d,
|
|
748
|
+
props: __spreadProps$f(__spreadValues$p({}, getCommonProps("checkbox", [
|
|
732
749
|
"name",
|
|
733
750
|
"isDisabled",
|
|
734
751
|
"isReadOnly",
|
|
@@ -797,8 +814,8 @@ function registerCheckbox(loader, overrides) {
|
|
|
797
814
|
}
|
|
798
815
|
|
|
799
816
|
var __defProp$o = Object.defineProperty;
|
|
800
|
-
var __defProps$
|
|
801
|
-
var __getOwnPropDescs$
|
|
817
|
+
var __defProps$e = Object.defineProperties;
|
|
818
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
802
819
|
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
803
820
|
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
804
821
|
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
@@ -814,8 +831,8 @@ var __spreadValues$o = (a, b) => {
|
|
|
814
831
|
}
|
|
815
832
|
return a;
|
|
816
833
|
};
|
|
817
|
-
var __spreadProps$
|
|
818
|
-
var __objRest$
|
|
834
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
835
|
+
var __objRest$l = (source, exclude) => {
|
|
819
836
|
var target = {};
|
|
820
837
|
for (var prop in source)
|
|
821
838
|
if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -828,8 +845,8 @@ var __objRest$m = (source, exclude) => {
|
|
|
828
845
|
return target;
|
|
829
846
|
};
|
|
830
847
|
function BaseText(_a) {
|
|
831
|
-
var _b = _a, { children, slot, className } = _b, rest = __objRest$
|
|
832
|
-
return /* @__PURE__ */ React.createElement(Text, __spreadProps$
|
|
848
|
+
var _b = _a, { children, slot, className } = _b, rest = __objRest$l(_b, ["children", "slot", "className"]);
|
|
849
|
+
return /* @__PURE__ */ React.createElement(Text, __spreadProps$e(__spreadValues$o({}, extractPlasmicDataProps(rest)), { slot, className }), children);
|
|
833
850
|
}
|
|
834
851
|
const TEXT_COMPONENT_NAME = makeComponentName("text");
|
|
835
852
|
function registerText(loader, overrides) {
|
|
@@ -864,8 +881,8 @@ function registerText(loader, overrides) {
|
|
|
864
881
|
}
|
|
865
882
|
|
|
866
883
|
var __defProp$n = Object.defineProperty;
|
|
867
|
-
var __defProps$
|
|
868
|
-
var __getOwnPropDescs$
|
|
884
|
+
var __defProps$d = Object.defineProperties;
|
|
885
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
869
886
|
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
870
887
|
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
871
888
|
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
@@ -881,10 +898,10 @@ var __spreadValues$n = (a, b) => {
|
|
|
881
898
|
}
|
|
882
899
|
return a;
|
|
883
900
|
};
|
|
884
|
-
var __spreadProps$
|
|
901
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
885
902
|
const DESCRIPTION_COMPONENT_NAME = makeComponentName("description");
|
|
886
903
|
function registerDescription(loader, overrides) {
|
|
887
|
-
return registerText(loader, __spreadProps$
|
|
904
|
+
return registerText(loader, __spreadProps$d(__spreadValues$n({}, overrides), {
|
|
888
905
|
name: DESCRIPTION_COMPONENT_NAME,
|
|
889
906
|
displayName: "Aria Description",
|
|
890
907
|
props: {
|
|
@@ -913,7 +930,7 @@ var __spreadValues$m = (a, b) => {
|
|
|
913
930
|
}
|
|
914
931
|
return a;
|
|
915
932
|
};
|
|
916
|
-
var __objRest$
|
|
933
|
+
var __objRest$k = (source, exclude) => {
|
|
917
934
|
var target = {};
|
|
918
935
|
for (var prop in source)
|
|
919
936
|
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -937,7 +954,7 @@ function BaseFieldError(_a) {
|
|
|
937
954
|
tooShort,
|
|
938
955
|
typeMismatch,
|
|
939
956
|
valueMissing
|
|
940
|
-
} = _b, rest = __objRest$
|
|
957
|
+
} = _b, rest = __objRest$k(_b, [
|
|
941
958
|
"badInput",
|
|
942
959
|
"customError",
|
|
943
960
|
"patternMismatch",
|
|
@@ -1057,8 +1074,8 @@ function registerFieldError(loader, overrides) {
|
|
|
1057
1074
|
}
|
|
1058
1075
|
|
|
1059
1076
|
var __defProp$l = Object.defineProperty;
|
|
1060
|
-
var __defProps$
|
|
1061
|
-
var __getOwnPropDescs$
|
|
1077
|
+
var __defProps$c = Object.defineProperties;
|
|
1078
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1062
1079
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
1063
1080
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
1064
1081
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
@@ -1074,8 +1091,8 @@ var __spreadValues$l = (a, b) => {
|
|
|
1074
1091
|
}
|
|
1075
1092
|
return a;
|
|
1076
1093
|
};
|
|
1077
|
-
var __spreadProps$
|
|
1078
|
-
var __objRest$
|
|
1094
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1095
|
+
var __objRest$j = (source, exclude) => {
|
|
1079
1096
|
var target = {};
|
|
1080
1097
|
for (var prop in source)
|
|
1081
1098
|
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1088,8 +1105,8 @@ var __objRest$k = (source, exclude) => {
|
|
|
1088
1105
|
return target;
|
|
1089
1106
|
};
|
|
1090
1107
|
function BaseLabel(_a) {
|
|
1091
|
-
var _b = _a, { children, className } = _b, rest = __objRest$
|
|
1092
|
-
return /* @__PURE__ */ React.createElement(Label, __spreadProps$
|
|
1108
|
+
var _b = _a, { children, className } = _b, rest = __objRest$j(_b, ["children", "className"]);
|
|
1109
|
+
return /* @__PURE__ */ React.createElement(Label, __spreadProps$c(__spreadValues$l({}, extractPlasmicDataProps(rest)), { className }), children);
|
|
1093
1110
|
}
|
|
1094
1111
|
const LABEL_COMPONENT_NAME = makeComponentName("label");
|
|
1095
1112
|
function registerLabel(loader, overrides) {
|
|
@@ -1121,8 +1138,8 @@ function registerLabel(loader, overrides) {
|
|
|
1121
1138
|
}
|
|
1122
1139
|
|
|
1123
1140
|
var __defProp$k = Object.defineProperty;
|
|
1124
|
-
var __defProps$
|
|
1125
|
-
var __getOwnPropDescs$
|
|
1141
|
+
var __defProps$b = Object.defineProperties;
|
|
1142
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
1126
1143
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
1127
1144
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
1128
1145
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
@@ -1138,8 +1155,8 @@ var __spreadValues$k = (a, b) => {
|
|
|
1138
1155
|
}
|
|
1139
1156
|
return a;
|
|
1140
1157
|
};
|
|
1141
|
-
var __spreadProps$
|
|
1142
|
-
var __objRest$
|
|
1158
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
1159
|
+
var __objRest$i = (source, exclude) => {
|
|
1143
1160
|
var target = {};
|
|
1144
1161
|
for (var prop in source)
|
|
1145
1162
|
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1152,12 +1169,12 @@ var __objRest$j = (source, exclude) => {
|
|
|
1152
1169
|
return target;
|
|
1153
1170
|
};
|
|
1154
1171
|
const CHECKBOX_GROUP_VARIANTS = ["disabled", "readonly"];
|
|
1155
|
-
const { variants: variants$
|
|
1172
|
+
const { variants: variants$c, withObservedValues: withObservedValues$a } = pickAriaComponentVariants(
|
|
1156
1173
|
CHECKBOX_GROUP_VARIANTS
|
|
1157
1174
|
);
|
|
1158
1175
|
function BaseCheckboxGroup(props) {
|
|
1159
|
-
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
1160
|
-
return /* @__PURE__ */ React.createElement(PlasmicCheckboxGroupContext.Provider, { value: rest }, /* @__PURE__ */ React.createElement(CheckboxGroup, __spreadValues$k({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$
|
|
1176
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$i(_a, ["children", "plasmicUpdateVariant"]);
|
|
1177
|
+
return /* @__PURE__ */ React.createElement(PlasmicCheckboxGroupContext.Provider, { value: rest }, /* @__PURE__ */ React.createElement(CheckboxGroup, __spreadValues$k({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$a(
|
|
1161
1178
|
children,
|
|
1162
1179
|
{
|
|
1163
1180
|
disabled: isDisabled,
|
|
@@ -1185,8 +1202,8 @@ function registerCheckboxGroup(loader, overrides) {
|
|
|
1185
1202
|
displayName: "Aria Checkbox Group",
|
|
1186
1203
|
importPath: "@plasmicpkgs/react-aria/skinny/registerCheckboxGroup",
|
|
1187
1204
|
importName: "BaseCheckboxGroup",
|
|
1188
|
-
variants: variants$
|
|
1189
|
-
props: __spreadProps$
|
|
1205
|
+
variants: variants$c,
|
|
1206
|
+
props: __spreadProps$b(__spreadValues$k({}, getCommonProps("checkbox group", [
|
|
1190
1207
|
"name",
|
|
1191
1208
|
"isDisabled",
|
|
1192
1209
|
"isReadOnly",
|
|
@@ -1366,7 +1383,7 @@ var __spreadValues$j = (a, b) => {
|
|
|
1366
1383
|
}
|
|
1367
1384
|
return a;
|
|
1368
1385
|
};
|
|
1369
|
-
var __objRest$
|
|
1386
|
+
var __objRest$h = (source, exclude) => {
|
|
1370
1387
|
var target = {};
|
|
1371
1388
|
for (var prop in source)
|
|
1372
1389
|
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1383,7 +1400,7 @@ const INPUT_VARIANTS = [
|
|
|
1383
1400
|
"hovered",
|
|
1384
1401
|
"disabled"
|
|
1385
1402
|
];
|
|
1386
|
-
const { variants: variants$
|
|
1403
|
+
const { variants: variants$b } = pickAriaComponentVariants(INPUT_VARIANTS);
|
|
1387
1404
|
const inputHelpers$1 = {
|
|
1388
1405
|
states: {
|
|
1389
1406
|
value: {
|
|
@@ -1401,7 +1418,7 @@ function BaseInput(props) {
|
|
|
1401
1418
|
disabled,
|
|
1402
1419
|
autoComplete,
|
|
1403
1420
|
value
|
|
1404
|
-
} = _a, rest = __objRest$
|
|
1421
|
+
} = _a, rest = __objRest$h(_a, [
|
|
1405
1422
|
"plasmicUpdateVariant",
|
|
1406
1423
|
"setControlContextData",
|
|
1407
1424
|
"disabled",
|
|
@@ -1464,7 +1481,7 @@ function registerInput(loader, overrides) {
|
|
|
1464
1481
|
displayName: "Aria Input",
|
|
1465
1482
|
importPath: "@plasmicpkgs/react-aria/skinny/registerInput",
|
|
1466
1483
|
importName: "BaseInput",
|
|
1467
|
-
variants: variants$
|
|
1484
|
+
variants: variants$b,
|
|
1468
1485
|
defaultStyles: {
|
|
1469
1486
|
width: "300px",
|
|
1470
1487
|
borderWidth: "1px",
|
|
@@ -1536,7 +1553,7 @@ var __spreadValues$i = (a, b) => {
|
|
|
1536
1553
|
}
|
|
1537
1554
|
return a;
|
|
1538
1555
|
};
|
|
1539
|
-
var __objRest$
|
|
1556
|
+
var __objRest$g = (source, exclude) => {
|
|
1540
1557
|
var target = {};
|
|
1541
1558
|
for (var prop in source)
|
|
1542
1559
|
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1556,11 +1573,11 @@ const LIST_BOX_ITEM_VARIANTS = [
|
|
|
1556
1573
|
"selected",
|
|
1557
1574
|
"disabled"
|
|
1558
1575
|
];
|
|
1559
|
-
const { variants: variants$
|
|
1576
|
+
const { variants: variants$a, withObservedValues: withObservedValues$9 } = pickAriaComponentVariants(
|
|
1560
1577
|
LIST_BOX_ITEM_VARIANTS
|
|
1561
1578
|
);
|
|
1562
1579
|
function BaseListBoxItem(props) {
|
|
1563
|
-
const _a = props, { children, setControlContextData, plasmicUpdateVariant, id } = _a, rest = __objRest$
|
|
1580
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant, id } = _a, rest = __objRest$g(_a, ["children", "setControlContextData", "plasmicUpdateVariant", "id"]);
|
|
1564
1581
|
const listboxContext = React.useContext(PlasmicListBoxContext);
|
|
1565
1582
|
const isStandalone = !listboxContext;
|
|
1566
1583
|
const [registeredId, setRegisteredId] = useState();
|
|
@@ -1599,7 +1616,7 @@ function BaseListBoxItem(props) {
|
|
|
1599
1616
|
isFocusVisible,
|
|
1600
1617
|
isSelected,
|
|
1601
1618
|
isDisabled
|
|
1602
|
-
}) => withObservedValues$
|
|
1619
|
+
}) => withObservedValues$9(
|
|
1603
1620
|
children,
|
|
1604
1621
|
{
|
|
1605
1622
|
hovered: isHovered,
|
|
@@ -1662,7 +1679,7 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1662
1679
|
displayName: "Aria ListBoxItem",
|
|
1663
1680
|
importPath: "@plasmicpkgs/react-aria/skinny/registerListBoxItem",
|
|
1664
1681
|
importName: "BaseListBoxItem",
|
|
1665
|
-
variants: variants$
|
|
1682
|
+
variants: variants$a,
|
|
1666
1683
|
props: {
|
|
1667
1684
|
id: {
|
|
1668
1685
|
type: "string",
|
|
@@ -1709,7 +1726,7 @@ var __spreadValues$h = (a, b) => {
|
|
|
1709
1726
|
}
|
|
1710
1727
|
return a;
|
|
1711
1728
|
};
|
|
1712
|
-
var __objRest$
|
|
1729
|
+
var __objRest$f = (source, exclude) => {
|
|
1713
1730
|
var target = {};
|
|
1714
1731
|
for (var prop in source)
|
|
1715
1732
|
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1722,7 +1739,7 @@ var __objRest$g = (source, exclude) => {
|
|
|
1722
1739
|
return target;
|
|
1723
1740
|
};
|
|
1724
1741
|
function BaseSection(props) {
|
|
1725
|
-
const _a = props, { header, items } = _a, rest = __objRest$
|
|
1742
|
+
const _a = props, { header, items } = _a, rest = __objRest$f(_a, ["header", "items"]);
|
|
1726
1743
|
const contextProps = React.useContext(PlasmicListBoxContext);
|
|
1727
1744
|
const mergedProps = mergeProps$1(contextProps, rest);
|
|
1728
1745
|
return /* @__PURE__ */ React.createElement(Section, __spreadValues$h({}, mergedProps), /* @__PURE__ */ React.createElement(Header, null, header), items);
|
|
@@ -1778,7 +1795,7 @@ var __spreadValues$g = (a, b) => {
|
|
|
1778
1795
|
}
|
|
1779
1796
|
return a;
|
|
1780
1797
|
};
|
|
1781
|
-
var __objRest$
|
|
1798
|
+
var __objRest$e = (source, exclude) => {
|
|
1782
1799
|
var target = {};
|
|
1783
1800
|
for (var prop in source)
|
|
1784
1801
|
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1808,7 +1825,7 @@ function BaseListBox(props) {
|
|
|
1808
1825
|
children,
|
|
1809
1826
|
selectedKeys,
|
|
1810
1827
|
defaultSelectedKeys
|
|
1811
|
-
} = _a, rest = __objRest$
|
|
1828
|
+
} = _a, rest = __objRest$e(_a, [
|
|
1812
1829
|
"setControlContextData",
|
|
1813
1830
|
"children",
|
|
1814
1831
|
"selectedKeys",
|
|
@@ -2041,7 +2058,7 @@ var __spreadValues$f = (a, b) => {
|
|
|
2041
2058
|
}
|
|
2042
2059
|
return a;
|
|
2043
2060
|
};
|
|
2044
|
-
var __objRest$
|
|
2061
|
+
var __objRest$d = (source, exclude) => {
|
|
2045
2062
|
var target = {};
|
|
2046
2063
|
for (var prop in source)
|
|
2047
2064
|
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2055,7 +2072,7 @@ var __objRest$e = (source, exclude) => {
|
|
|
2055
2072
|
};
|
|
2056
2073
|
function BasePopover(props) {
|
|
2057
2074
|
var _b;
|
|
2058
|
-
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$
|
|
2075
|
+
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$d(_a, ["resetClassName", "setControlContextData"]);
|
|
2059
2076
|
const isStandalone = !React.useContext(PopoverContext);
|
|
2060
2077
|
const context = React.useContext(PlasmicPopoverContext);
|
|
2061
2078
|
const triggerRef = React.useRef(null);
|
|
@@ -2189,8 +2206,8 @@ function registerPopover(loader, overrides) {
|
|
|
2189
2206
|
}
|
|
2190
2207
|
|
|
2191
2208
|
var __defProp$e = Object.defineProperty;
|
|
2192
|
-
var __defProps$
|
|
2193
|
-
var __getOwnPropDescs$
|
|
2209
|
+
var __defProps$a = Object.defineProperties;
|
|
2210
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
2194
2211
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
2195
2212
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
2196
2213
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
@@ -2206,8 +2223,8 @@ var __spreadValues$e = (a, b) => {
|
|
|
2206
2223
|
}
|
|
2207
2224
|
return a;
|
|
2208
2225
|
};
|
|
2209
|
-
var __spreadProps$
|
|
2210
|
-
var __objRest$
|
|
2226
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
2227
|
+
var __objRest$c = (source, exclude) => {
|
|
2211
2228
|
var target = {};
|
|
2212
2229
|
for (var prop in source)
|
|
2213
2230
|
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2238,7 +2255,7 @@ function ComboboxAutoOpen(props) {
|
|
|
2238
2255
|
return null;
|
|
2239
2256
|
}
|
|
2240
2257
|
function BaseComboBox(props) {
|
|
2241
|
-
const _a = props, { children, setControlContextData, isOpen } = _a, rest = __objRest$
|
|
2258
|
+
const _a = props, { children, setControlContextData, isOpen } = _a, rest = __objRest$c(_a, ["children", "setControlContextData", "isOpen"]);
|
|
2242
2259
|
const idManager = useMemo(() => new ListBoxItemIdManager(), []);
|
|
2243
2260
|
useEffect(() => {
|
|
2244
2261
|
idManager.subscribe((ids) => {
|
|
@@ -2269,7 +2286,7 @@ function registerComboBox(loader) {
|
|
|
2269
2286
|
displayName: "Aria ComboBox",
|
|
2270
2287
|
importPath: "@plasmicpkgs/react-aria/skinny/registerComboBox",
|
|
2271
2288
|
importName: "BaseComboBox",
|
|
2272
|
-
props: __spreadProps$
|
|
2289
|
+
props: __spreadProps$a(__spreadValues$e({}, getCommonProps("ComboBox", [
|
|
2273
2290
|
"name",
|
|
2274
2291
|
"aria-label",
|
|
2275
2292
|
"placeholder",
|
|
@@ -2419,7 +2436,7 @@ var __spreadValues$d = (a, b) => {
|
|
|
2419
2436
|
}
|
|
2420
2437
|
return a;
|
|
2421
2438
|
};
|
|
2422
|
-
var __objRest$
|
|
2439
|
+
var __objRest$b = (source, exclude) => {
|
|
2423
2440
|
var target = {};
|
|
2424
2441
|
for (var prop in source)
|
|
2425
2442
|
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2432,7 +2449,7 @@ var __objRest$c = (source, exclude) => {
|
|
|
2432
2449
|
return target;
|
|
2433
2450
|
};
|
|
2434
2451
|
function BaseHeading(_a) {
|
|
2435
|
-
var _b = _a, { children } = _b, rest = __objRest$
|
|
2452
|
+
var _b = _a, { children } = _b, rest = __objRest$b(_b, ["children"]);
|
|
2436
2453
|
return /* @__PURE__ */ React.createElement(Heading, __spreadValues$d({}, rest), children);
|
|
2437
2454
|
}
|
|
2438
2455
|
const HEADING_COMPONENT_NAME = makeComponentName("heading");
|
|
@@ -2472,8 +2489,8 @@ function registerHeading(loader, overrides) {
|
|
|
2472
2489
|
}
|
|
2473
2490
|
|
|
2474
2491
|
var __defProp$c = Object.defineProperty;
|
|
2475
|
-
var __defProps$
|
|
2476
|
-
var __getOwnPropDescs$
|
|
2492
|
+
var __defProps$9 = Object.defineProperties;
|
|
2493
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
2477
2494
|
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2478
2495
|
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2479
2496
|
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
@@ -2489,8 +2506,8 @@ var __spreadValues$c = (a, b) => {
|
|
|
2489
2506
|
}
|
|
2490
2507
|
return a;
|
|
2491
2508
|
};
|
|
2492
|
-
var __spreadProps$
|
|
2493
|
-
var __objRest$
|
|
2509
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
2510
|
+
var __objRest$a = (source, exclude) => {
|
|
2494
2511
|
var target = {};
|
|
2495
2512
|
for (var prop in source)
|
|
2496
2513
|
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2514,20 +2531,31 @@ const BaseModal = forwardRef(
|
|
|
2514
2531
|
className,
|
|
2515
2532
|
isOpen,
|
|
2516
2533
|
resetClassName,
|
|
2517
|
-
setControlContextData
|
|
2518
|
-
|
|
2534
|
+
setControlContextData,
|
|
2535
|
+
isDismissable
|
|
2536
|
+
} = _a, rest = __objRest$a(_a, [
|
|
2519
2537
|
"children",
|
|
2520
2538
|
"modalOverlayClass",
|
|
2521
2539
|
"className",
|
|
2522
2540
|
"isOpen",
|
|
2523
2541
|
"resetClassName",
|
|
2524
|
-
"setControlContextData"
|
|
2542
|
+
"setControlContextData",
|
|
2543
|
+
"isDismissable"
|
|
2525
2544
|
]);
|
|
2526
2545
|
const { isSelected } = (_b = usePlasmicCanvasComponentInfo(props)) != null ? _b : {};
|
|
2527
2546
|
const contextProps = React.useContext(PlasmicDialogTriggerContext);
|
|
2528
2547
|
const isStandalone = !contextProps;
|
|
2529
2548
|
const mergedProps = mergeProps(contextProps, rest, {
|
|
2530
|
-
isOpen: isStandalone ? isSelected || isOpen : contextProps.isOpen
|
|
2549
|
+
isOpen: isStandalone ? isSelected || isOpen : contextProps.isOpen,
|
|
2550
|
+
/*
|
|
2551
|
+
isDismissable on canvas (non-interactive mode) causes the following two issues:
|
|
2552
|
+
1. Clicking anywhere inside the modal dismisses it
|
|
2553
|
+
2. If the modal is auto-opened due to selection in outline tab, the modal stays open despite issue #1, but the text elements inside the modal are no longer selectable, and therefore the text or headings inside the modal are not editable.
|
|
2554
|
+
|
|
2555
|
+
To fix the above issue, we set an interim isDismissable state to false while the modal is auto-open (`isSelected` is true).
|
|
2556
|
+
Also note that `isSelected` can only be true in canvas (non-interactive mode), so we can safely (temporarily) set `isDismissable` to false in this case, because it only matters in interactive mode.
|
|
2557
|
+
*/
|
|
2558
|
+
isDismissable: isSelected ? false : isDismissable
|
|
2531
2559
|
});
|
|
2532
2560
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
2533
2561
|
parent: isStandalone ? void 0 : {}
|
|
@@ -2547,7 +2575,7 @@ const BaseModal = forwardRef(
|
|
|
2547
2575
|
const bodyInPreview = /* @__PURE__ */ React.createElement(Dialog, { style: INLINE_STYLES }, children);
|
|
2548
2576
|
return /* @__PURE__ */ React.createElement(
|
|
2549
2577
|
ModalOverlay,
|
|
2550
|
-
__spreadProps$
|
|
2578
|
+
__spreadProps$9(__spreadValues$c({}, mergedProps), {
|
|
2551
2579
|
className: `${resetClassName} ${modalOverlayClass}`
|
|
2552
2580
|
}),
|
|
2553
2581
|
/* @__PURE__ */ React.createElement(Modal, { className }, isCanvas ? bodyInCanvas : bodyInPreview)
|
|
@@ -2669,8 +2697,8 @@ function registerModal(loader, overrides) {
|
|
|
2669
2697
|
}
|
|
2670
2698
|
|
|
2671
2699
|
var __defProp$b = Object.defineProperty;
|
|
2672
|
-
var __defProps$
|
|
2673
|
-
var __getOwnPropDescs$
|
|
2700
|
+
var __defProps$8 = Object.defineProperties;
|
|
2701
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
2674
2702
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
2675
2703
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
2676
2704
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
@@ -2686,8 +2714,8 @@ var __spreadValues$b = (a, b) => {
|
|
|
2686
2714
|
}
|
|
2687
2715
|
return a;
|
|
2688
2716
|
};
|
|
2689
|
-
var __spreadProps$
|
|
2690
|
-
var __objRest$
|
|
2717
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
2718
|
+
var __objRest$9 = (source, exclude) => {
|
|
2691
2719
|
var target = {};
|
|
2692
2720
|
for (var prop in source)
|
|
2693
2721
|
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2701,10 +2729,10 @@ var __objRest$a = (source, exclude) => {
|
|
|
2701
2729
|
};
|
|
2702
2730
|
function BaseDialogTrigger(props) {
|
|
2703
2731
|
var _b, _c;
|
|
2704
|
-
const _a = props, { trigger, dialog, isOpen } = _a, rest = __objRest$
|
|
2732
|
+
const _a = props, { trigger, dialog, isOpen } = _a, rest = __objRest$9(_a, ["trigger", "dialog", "isOpen"]);
|
|
2705
2733
|
const { isSelected, selectedSlotName } = (_b = usePlasmicCanvasComponentInfo(props)) != null ? _b : {};
|
|
2706
2734
|
const isAutoOpen = selectedSlotName !== "trigger" && isSelected;
|
|
2707
|
-
const mergedProps = __spreadProps$
|
|
2735
|
+
const mergedProps = __spreadProps$8(__spreadValues$b({}, rest), {
|
|
2708
2736
|
isOpen: (_c = isAutoOpen || isOpen) != null ? _c : false
|
|
2709
2737
|
});
|
|
2710
2738
|
return /* @__PURE__ */ React.createElement(PlasmicDialogTriggerContext.Provider, { value: mergedProps }, /* @__PURE__ */ React.createElement(DialogTrigger, __spreadValues$b({}, mergedProps), trigger, dialog));
|
|
@@ -2768,8 +2796,8 @@ function registerDialogTrigger(loader, overrides) {
|
|
|
2768
2796
|
}
|
|
2769
2797
|
|
|
2770
2798
|
var __defProp$a = Object.defineProperty;
|
|
2771
|
-
var __defProps$
|
|
2772
|
-
var __getOwnPropDescs$
|
|
2799
|
+
var __defProps$7 = Object.defineProperties;
|
|
2800
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
2773
2801
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
2774
2802
|
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
2775
2803
|
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
@@ -2785,8 +2813,8 @@ var __spreadValues$a = (a, b) => {
|
|
|
2785
2813
|
}
|
|
2786
2814
|
return a;
|
|
2787
2815
|
};
|
|
2788
|
-
var __spreadProps$
|
|
2789
|
-
var __objRest$
|
|
2816
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
2817
|
+
var __objRest$8 = (source, exclude) => {
|
|
2790
2818
|
var target = {};
|
|
2791
2819
|
for (var prop in source)
|
|
2792
2820
|
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2808,9 +2836,9 @@ const RADIO_VARIANTS = [
|
|
|
2808
2836
|
"readonly",
|
|
2809
2837
|
"selected"
|
|
2810
2838
|
];
|
|
2811
|
-
const { variants: variants$
|
|
2839
|
+
const { variants: variants$9, withObservedValues: withObservedValues$8 } = pickAriaComponentVariants(RADIO_VARIANTS);
|
|
2812
2840
|
function BaseRadio(props) {
|
|
2813
|
-
const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
2841
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$8(_a, ["children", "setControlContextData", "plasmicUpdateVariant"]);
|
|
2814
2842
|
const contextProps = React.useContext(PlasmicRadioGroupContext);
|
|
2815
2843
|
const isStandalone = !contextProps;
|
|
2816
2844
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
@@ -2824,7 +2852,7 @@ function BaseRadio(props) {
|
|
|
2824
2852
|
isSelected,
|
|
2825
2853
|
isDisabled,
|
|
2826
2854
|
isReadOnly
|
|
2827
|
-
}) => withObservedValues$
|
|
2855
|
+
}) => withObservedValues$8(
|
|
2828
2856
|
children,
|
|
2829
2857
|
{
|
|
2830
2858
|
hovered: isHovered,
|
|
@@ -2883,8 +2911,8 @@ function registerRadio(loader, overrides) {
|
|
|
2883
2911
|
displayName: "Aria Radio",
|
|
2884
2912
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadio",
|
|
2885
2913
|
importName: "BaseRadio",
|
|
2886
|
-
variants: variants$
|
|
2887
|
-
props: __spreadProps$
|
|
2914
|
+
variants: variants$9,
|
|
2915
|
+
props: __spreadProps$7(__spreadValues$a({}, getCommonProps("radio", [
|
|
2888
2916
|
"isDisabled",
|
|
2889
2917
|
"autoFocus",
|
|
2890
2918
|
"aria-label"
|
|
@@ -2906,8 +2934,8 @@ function registerRadio(loader, overrides) {
|
|
|
2906
2934
|
}
|
|
2907
2935
|
|
|
2908
2936
|
var __defProp$9 = Object.defineProperty;
|
|
2909
|
-
var __defProps$
|
|
2910
|
-
var __getOwnPropDescs$
|
|
2937
|
+
var __defProps$6 = Object.defineProperties;
|
|
2938
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
2911
2939
|
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
2912
2940
|
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
2913
2941
|
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
@@ -2923,8 +2951,8 @@ var __spreadValues$9 = (a, b) => {
|
|
|
2923
2951
|
}
|
|
2924
2952
|
return a;
|
|
2925
2953
|
};
|
|
2926
|
-
var __spreadProps$
|
|
2927
|
-
var __objRest$
|
|
2954
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
2955
|
+
var __objRest$7 = (source, exclude) => {
|
|
2928
2956
|
var target = {};
|
|
2929
2957
|
for (var prop in source)
|
|
2930
2958
|
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2937,10 +2965,10 @@ var __objRest$8 = (source, exclude) => {
|
|
|
2937
2965
|
return target;
|
|
2938
2966
|
};
|
|
2939
2967
|
const RADIO_GROUP_VARIANTS = ["disabled", "readonly"];
|
|
2940
|
-
const { variants: variants$
|
|
2968
|
+
const { variants: variants$8, withObservedValues: withObservedValues$7 } = pickAriaComponentVariants(RADIO_GROUP_VARIANTS);
|
|
2941
2969
|
function BaseRadioGroup(props) {
|
|
2942
|
-
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
2943
|
-
return /* @__PURE__ */ React.createElement(PlasmicRadioGroupContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$9({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$
|
|
2970
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$7(_a, ["children", "plasmicUpdateVariant"]);
|
|
2971
|
+
return /* @__PURE__ */ React.createElement(PlasmicRadioGroupContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(RadioGroup, __spreadValues$9({}, rest), ({ isDisabled, isReadOnly }) => withObservedValues$7(
|
|
2944
2972
|
children,
|
|
2945
2973
|
{
|
|
2946
2974
|
disabled: isDisabled,
|
|
@@ -2966,8 +2994,8 @@ function registerRadioGroup(loader, overrides) {
|
|
|
2966
2994
|
displayName: "Aria RadioGroup",
|
|
2967
2995
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadioGroup",
|
|
2968
2996
|
importName: "BaseRadioGroup",
|
|
2969
|
-
variants: variants$
|
|
2970
|
-
props: __spreadProps$
|
|
2997
|
+
variants: variants$8,
|
|
2998
|
+
props: __spreadProps$6(__spreadValues$9({}, getCommonProps("radio group", [
|
|
2971
2999
|
"name",
|
|
2972
3000
|
"isDisabled",
|
|
2973
3001
|
"isReadOnly",
|
|
@@ -3073,8 +3101,8 @@ function registerRadioGroup(loader, overrides) {
|
|
|
3073
3101
|
}
|
|
3074
3102
|
|
|
3075
3103
|
var __defProp$8 = Object.defineProperty;
|
|
3076
|
-
var __defProps$
|
|
3077
|
-
var __getOwnPropDescs$
|
|
3104
|
+
var __defProps$5 = Object.defineProperties;
|
|
3105
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
3078
3106
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
3079
3107
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
3080
3108
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
@@ -3090,7 +3118,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
3090
3118
|
}
|
|
3091
3119
|
return a;
|
|
3092
3120
|
};
|
|
3093
|
-
var __spreadProps$
|
|
3121
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
3094
3122
|
const BaseSelectValue = (props) => {
|
|
3095
3123
|
const { children, customize } = props;
|
|
3096
3124
|
return /* @__PURE__ */ React.createElement(SelectValue, null, ({ isPlaceholder, selectedText }) => /* @__PURE__ */ React.createElement(React.Fragment, null, isPlaceholder ? /* @__PURE__ */ React.createElement("span", null, "Select an item") : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", null, customize ? children : selectedText))));
|
|
@@ -3194,7 +3222,7 @@ function registerSelect(loader) {
|
|
|
3194
3222
|
displayName: "Aria Select",
|
|
3195
3223
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSelect",
|
|
3196
3224
|
importName: "BaseSelect",
|
|
3197
|
-
props: __spreadProps$
|
|
3225
|
+
props: __spreadProps$5(__spreadValues$8({}, getCommonProps("Select", [
|
|
3198
3226
|
"name",
|
|
3199
3227
|
"aria-label",
|
|
3200
3228
|
"placeholder",
|
|
@@ -3351,7 +3379,7 @@ var __spreadValues$7 = (a, b) => {
|
|
|
3351
3379
|
}
|
|
3352
3380
|
return a;
|
|
3353
3381
|
};
|
|
3354
|
-
var __objRest$
|
|
3382
|
+
var __objRest$6 = (source, exclude) => {
|
|
3355
3383
|
var target = {};
|
|
3356
3384
|
for (var prop in source)
|
|
3357
3385
|
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3364,12 +3392,12 @@ var __objRest$7 = (source, exclude) => {
|
|
|
3364
3392
|
return target;
|
|
3365
3393
|
};
|
|
3366
3394
|
const SLIDER_OUTPUT_VARIANTS = ["disabled"];
|
|
3367
|
-
const { variants: variants$
|
|
3395
|
+
const { variants: variants$7, withObservedValues: withObservedValues$6 } = pickAriaComponentVariants(
|
|
3368
3396
|
SLIDER_OUTPUT_VARIANTS
|
|
3369
3397
|
);
|
|
3370
3398
|
function BaseSliderOutput(props) {
|
|
3371
|
-
const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$
|
|
3372
|
-
return /* @__PURE__ */ React.createElement(SliderOutput, __spreadValues$7({}, rest), ({ isDisabled }) => withObservedValues$
|
|
3399
|
+
const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$6(_a, ["plasmicUpdateVariant", "children"]);
|
|
3400
|
+
return /* @__PURE__ */ React.createElement(SliderOutput, __spreadValues$7({}, rest), ({ isDisabled }) => withObservedValues$6(
|
|
3373
3401
|
children,
|
|
3374
3402
|
{
|
|
3375
3403
|
disabled: isDisabled
|
|
@@ -3387,7 +3415,7 @@ function registerSliderOutput(loader, overrides) {
|
|
|
3387
3415
|
displayName: "Aria Slider Output",
|
|
3388
3416
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSliderOutput",
|
|
3389
3417
|
importName: "BaseSliderOutput",
|
|
3390
|
-
variants: variants$
|
|
3418
|
+
variants: variants$7,
|
|
3391
3419
|
props: {
|
|
3392
3420
|
children: {
|
|
3393
3421
|
mergeWithParent: true,
|
|
@@ -3417,8 +3445,8 @@ class ErrorBoundary extends Component {
|
|
|
3417
3445
|
}
|
|
3418
3446
|
|
|
3419
3447
|
var __defProp$6 = Object.defineProperty;
|
|
3420
|
-
var __defProps$
|
|
3421
|
-
var __getOwnPropDescs$
|
|
3448
|
+
var __defProps$4 = Object.defineProperties;
|
|
3449
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
3422
3450
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
3423
3451
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
3424
3452
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
@@ -3434,8 +3462,8 @@ var __spreadValues$6 = (a, b) => {
|
|
|
3434
3462
|
}
|
|
3435
3463
|
return a;
|
|
3436
3464
|
};
|
|
3437
|
-
var __spreadProps$
|
|
3438
|
-
var __objRest$
|
|
3465
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
3466
|
+
var __objRest$5 = (source, exclude) => {
|
|
3439
3467
|
var target = {};
|
|
3440
3468
|
for (var prop in source)
|
|
3441
3469
|
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3454,7 +3482,7 @@ const SLIDER_THUMB_VARIANTS = [
|
|
|
3454
3482
|
"focusVisible",
|
|
3455
3483
|
"disabled"
|
|
3456
3484
|
];
|
|
3457
|
-
const { variants: variants$
|
|
3485
|
+
const { variants: variants$6, withObservedValues: withObservedValues$5 } = pickAriaComponentVariants(
|
|
3458
3486
|
SLIDER_THUMB_VARIANTS
|
|
3459
3487
|
);
|
|
3460
3488
|
function BaseSliderThumb(_a) {
|
|
@@ -3462,14 +3490,14 @@ function BaseSliderThumb(_a) {
|
|
|
3462
3490
|
children,
|
|
3463
3491
|
advanced,
|
|
3464
3492
|
plasmicUpdateVariant
|
|
3465
|
-
} = _b, rest = __objRest$
|
|
3493
|
+
} = _b, rest = __objRest$5(_b, [
|
|
3466
3494
|
"children",
|
|
3467
3495
|
"advanced",
|
|
3468
3496
|
"plasmicUpdateVariant"
|
|
3469
3497
|
]);
|
|
3470
3498
|
const context = React.useContext(PlasmicSliderContext);
|
|
3471
3499
|
const mergedProps = mergeProps(context, rest);
|
|
3472
|
-
const thumb = /* @__PURE__ */ React.createElement(SliderThumb, __spreadValues$6({}, mergedProps), ({ isDragging, isHovered, isFocused, isFocusVisible, isDisabled }) => withObservedValues$
|
|
3500
|
+
const thumb = /* @__PURE__ */ React.createElement(SliderThumb, __spreadValues$6({}, mergedProps), ({ isDragging, isHovered, isFocused, isFocusVisible, isDisabled }) => withObservedValues$5(
|
|
3473
3501
|
/* @__PURE__ */ React.createElement(React.Fragment, null, advanced ? children : void 0),
|
|
3474
3502
|
{
|
|
3475
3503
|
dragging: isDragging,
|
|
@@ -3507,8 +3535,8 @@ function registerSliderThumb(loader, overrides) {
|
|
|
3507
3535
|
borderRadius: "100%",
|
|
3508
3536
|
cursor: "pointer"
|
|
3509
3537
|
},
|
|
3510
|
-
variants: variants$
|
|
3511
|
-
props: __spreadProps$
|
|
3538
|
+
variants: variants$6,
|
|
3539
|
+
props: __spreadProps$4(__spreadValues$6({}, getCommonProps("slider thumb", [
|
|
3512
3540
|
"name",
|
|
3513
3541
|
"isDisabled",
|
|
3514
3542
|
"autoFocus"
|
|
@@ -3546,7 +3574,7 @@ var __spreadValues$5 = (a, b) => {
|
|
|
3546
3574
|
}
|
|
3547
3575
|
return a;
|
|
3548
3576
|
};
|
|
3549
|
-
var __objRest$
|
|
3577
|
+
var __objRest$4 = (source, exclude) => {
|
|
3550
3578
|
var target = {};
|
|
3551
3579
|
for (var prop in source)
|
|
3552
3580
|
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3559,7 +3587,7 @@ var __objRest$5 = (source, exclude) => {
|
|
|
3559
3587
|
return target;
|
|
3560
3588
|
};
|
|
3561
3589
|
const SLIDER_TRACK_VARIANTS = ["hovered"];
|
|
3562
|
-
const { variants: variants$
|
|
3590
|
+
const { variants: variants$5, withObservedValues: withObservedValues$4 } = pickAriaComponentVariants(
|
|
3563
3591
|
SLIDER_TRACK_VARIANTS
|
|
3564
3592
|
);
|
|
3565
3593
|
function findMinMaxIndices(values) {
|
|
@@ -3584,7 +3612,7 @@ function BaseSliderTrack(props) {
|
|
|
3584
3612
|
const context = React.useContext(PlasmicSliderContext);
|
|
3585
3613
|
const isStandalone = !context;
|
|
3586
3614
|
const mergedProps = mergeProps(context, props);
|
|
3587
|
-
const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
3615
|
+
const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$4(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
|
|
3588
3616
|
const isMultiValue = isMultiValueGuard(mergedProps.value);
|
|
3589
3617
|
const { minIndex, maxIndex } = useMemo(() => {
|
|
3590
3618
|
if (!context || !Array.isArray(context.value) || context.value.length <= 1) {
|
|
@@ -3616,7 +3644,7 @@ function BaseSliderTrack(props) {
|
|
|
3616
3644
|
});
|
|
3617
3645
|
});
|
|
3618
3646
|
}, [children, context == null ? void 0 : context.value]);
|
|
3619
|
-
const track = /* @__PURE__ */ React.createElement(SliderTrack, __spreadValues$5({ style: { position: "relative" } }, rest), ({ state, isHovered }) => /* @__PURE__ */ React.createElement(React.Fragment, null, withObservedValues$
|
|
3647
|
+
const track = /* @__PURE__ */ React.createElement(SliderTrack, __spreadValues$5({ style: { position: "relative" } }, rest), ({ state, isHovered }) => /* @__PURE__ */ React.createElement(React.Fragment, null, withObservedValues$4(
|
|
3620
3648
|
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
3621
3649
|
"div",
|
|
3622
3650
|
{
|
|
@@ -3650,7 +3678,7 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3650
3678
|
displayName: "Aria Slider Track",
|
|
3651
3679
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSliderTrack",
|
|
3652
3680
|
importName: "BaseSliderTrack",
|
|
3653
|
-
variants: variants$
|
|
3681
|
+
variants: variants$5,
|
|
3654
3682
|
defaultStyles: {
|
|
3655
3683
|
width: "stretch",
|
|
3656
3684
|
backgroundColor: "#aaa",
|
|
@@ -3712,8 +3740,8 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3712
3740
|
}
|
|
3713
3741
|
|
|
3714
3742
|
var __defProp$4 = Object.defineProperty;
|
|
3715
|
-
var __defProps$
|
|
3716
|
-
var __getOwnPropDescs$
|
|
3743
|
+
var __defProps$3 = Object.defineProperties;
|
|
3744
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
3717
3745
|
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
3718
3746
|
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
3719
3747
|
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
@@ -3729,8 +3757,8 @@ var __spreadValues$4 = (a, b) => {
|
|
|
3729
3757
|
}
|
|
3730
3758
|
return a;
|
|
3731
3759
|
};
|
|
3732
|
-
var __spreadProps$
|
|
3733
|
-
var __objRest$
|
|
3760
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
3761
|
+
var __objRest$3 = (source, exclude) => {
|
|
3734
3762
|
var target = {};
|
|
3735
3763
|
for (var prop in source)
|
|
3736
3764
|
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3745,19 +3773,19 @@ var __objRest$4 = (source, exclude) => {
|
|
|
3745
3773
|
const SLIDER_COMPONENT_NAME = makeComponentName("slider");
|
|
3746
3774
|
const RANGE_SLIDER_COMPONENT_NAME = makeComponentName("range-slider");
|
|
3747
3775
|
const SLIDER_VARIANTS = ["disabled"];
|
|
3748
|
-
const { variants: variants$
|
|
3776
|
+
const { variants: variants$4, withObservedValues: withObservedValues$3 } = pickAriaComponentVariants(SLIDER_VARIANTS);
|
|
3749
3777
|
function BaseSlider(props) {
|
|
3750
|
-
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
3778
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$3(_a, ["children", "plasmicUpdateVariant"]);
|
|
3751
3779
|
return /* @__PURE__ */ React.createElement(
|
|
3752
3780
|
PlasmicSliderContext.Provider,
|
|
3753
3781
|
{
|
|
3754
|
-
value: __spreadProps$
|
|
3782
|
+
value: __spreadProps$3(__spreadValues$4({}, rest), {
|
|
3755
3783
|
// Here's why the type casting is needed here: https://github.com/Microsoft/TypeScript/issues/3410
|
|
3756
3784
|
onChange: rest.onChange,
|
|
3757
3785
|
onChangeEnd: rest.onChangeEnd
|
|
3758
3786
|
})
|
|
3759
3787
|
},
|
|
3760
|
-
/* @__PURE__ */ React.createElement(Slider, __spreadValues$4({}, rest), ({ isDisabled }) => withObservedValues$
|
|
3788
|
+
/* @__PURE__ */ React.createElement(Slider, __spreadValues$4({}, rest), ({ isDisabled }) => withObservedValues$3(
|
|
3761
3789
|
children,
|
|
3762
3790
|
{
|
|
3763
3791
|
disabled: isDisabled
|
|
@@ -3809,11 +3837,11 @@ function registerSlider(loader, overrides) {
|
|
|
3809
3837
|
displayName: "Aria Range Slider",
|
|
3810
3838
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSlider",
|
|
3811
3839
|
importName: "BaseSlider",
|
|
3812
|
-
variants: variants$
|
|
3840
|
+
variants: variants$4,
|
|
3813
3841
|
defaultStyles: {
|
|
3814
3842
|
width: "300px"
|
|
3815
3843
|
},
|
|
3816
|
-
props: __spreadProps$
|
|
3844
|
+
props: __spreadProps$3(__spreadValues$4(__spreadValues$4({}, getCommonProps("slider", [
|
|
3817
3845
|
"isDisabled",
|
|
3818
3846
|
"aria-label"
|
|
3819
3847
|
])), getCommonSliderProps()), {
|
|
@@ -3921,11 +3949,11 @@ function registerSlider(loader, overrides) {
|
|
|
3921
3949
|
displayName: "Aria Slider",
|
|
3922
3950
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSlider",
|
|
3923
3951
|
importName: "BaseSlider",
|
|
3924
|
-
variants: variants$
|
|
3952
|
+
variants: variants$4,
|
|
3925
3953
|
defaultStyles: {
|
|
3926
3954
|
width: "300px"
|
|
3927
3955
|
},
|
|
3928
|
-
props: __spreadProps$
|
|
3956
|
+
props: __spreadProps$3(__spreadValues$4(__spreadValues$4({}, getCommonProps("slider", [
|
|
3929
3957
|
"isDisabled",
|
|
3930
3958
|
"aria-label"
|
|
3931
3959
|
])), getCommonSliderProps()), {
|
|
@@ -4001,8 +4029,8 @@ function registerSlider(loader, overrides) {
|
|
|
4001
4029
|
}
|
|
4002
4030
|
|
|
4003
4031
|
var __defProp$3 = Object.defineProperty;
|
|
4004
|
-
var __defProps$
|
|
4005
|
-
var __getOwnPropDescs$
|
|
4032
|
+
var __defProps$2 = Object.defineProperties;
|
|
4033
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
4006
4034
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
4007
4035
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
4008
4036
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
@@ -4018,8 +4046,8 @@ var __spreadValues$3 = (a, b) => {
|
|
|
4018
4046
|
}
|
|
4019
4047
|
return a;
|
|
4020
4048
|
};
|
|
4021
|
-
var __spreadProps$
|
|
4022
|
-
var __objRest$
|
|
4049
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
4050
|
+
var __objRest$2 = (source, exclude) => {
|
|
4023
4051
|
var target = {};
|
|
4024
4052
|
for (var prop in source)
|
|
4025
4053
|
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -4040,9 +4068,9 @@ const SWITCH_VARIANTS = [
|
|
|
4040
4068
|
"disabled",
|
|
4041
4069
|
"readonly"
|
|
4042
4070
|
];
|
|
4043
|
-
const { variants: variants$
|
|
4071
|
+
const { variants: variants$3, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(SWITCH_VARIANTS);
|
|
4044
4072
|
function BaseSwitch(props) {
|
|
4045
|
-
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
4073
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$2(_a, ["children", "plasmicUpdateVariant"]);
|
|
4046
4074
|
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({
|
|
4047
4075
|
isHovered,
|
|
4048
4076
|
isPressed,
|
|
@@ -4051,7 +4079,7 @@ function BaseSwitch(props) {
|
|
|
4051
4079
|
isSelected,
|
|
4052
4080
|
isDisabled,
|
|
4053
4081
|
isReadOnly
|
|
4054
|
-
}) => withObservedValues$
|
|
4082
|
+
}) => withObservedValues$2(
|
|
4055
4083
|
children,
|
|
4056
4084
|
{
|
|
4057
4085
|
hovered: isHovered,
|
|
@@ -4074,7 +4102,7 @@ function registerSwitch(loader, overrides) {
|
|
|
4074
4102
|
displayName: "Aria Switch",
|
|
4075
4103
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSwitch",
|
|
4076
4104
|
importName: "BaseSwitch",
|
|
4077
|
-
variants: variants$
|
|
4105
|
+
variants: variants$3,
|
|
4078
4106
|
defaultStyles: {
|
|
4079
4107
|
display: "flex",
|
|
4080
4108
|
flexDirection: "column",
|
|
@@ -4082,7 +4110,7 @@ function registerSwitch(loader, overrides) {
|
|
|
4082
4110
|
justifyContent: "flex-start",
|
|
4083
4111
|
padding: 0
|
|
4084
4112
|
},
|
|
4085
|
-
props: __spreadProps$
|
|
4113
|
+
props: __spreadProps$2(__spreadValues$3({}, getCommonProps("switch", [
|
|
4086
4114
|
"name",
|
|
4087
4115
|
"isDisabled",
|
|
4088
4116
|
"isReadOnly",
|
|
@@ -4208,7 +4236,7 @@ var __spreadValues$2 = (a, b) => {
|
|
|
4208
4236
|
}
|
|
4209
4237
|
return a;
|
|
4210
4238
|
};
|
|
4211
|
-
var __objRest$
|
|
4239
|
+
var __objRest$1 = (source, exclude) => {
|
|
4212
4240
|
var target = {};
|
|
4213
4241
|
for (var prop in source)
|
|
4214
4242
|
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -4225,7 +4253,7 @@ const TEXTAREA_VARIANTS = [
|
|
|
4225
4253
|
"hovered",
|
|
4226
4254
|
"disabled"
|
|
4227
4255
|
];
|
|
4228
|
-
const { variants: variants$
|
|
4256
|
+
const { variants: variants$2 } = pickAriaComponentVariants(TEXTAREA_VARIANTS);
|
|
4229
4257
|
const inputHelpers = {
|
|
4230
4258
|
states: {
|
|
4231
4259
|
value: {
|
|
@@ -4237,7 +4265,7 @@ const inputHelpers = {
|
|
|
4237
4265
|
};
|
|
4238
4266
|
function BaseTextArea(props) {
|
|
4239
4267
|
var _b;
|
|
4240
|
-
const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$
|
|
4268
|
+
const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$1(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
|
|
4241
4269
|
const textFieldContext = React.useContext(PlasmicTextFieldContext);
|
|
4242
4270
|
const mergedProps = mergeProps(rest, {
|
|
4243
4271
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
@@ -4280,7 +4308,7 @@ function registerTextArea(loader, overrides) {
|
|
|
4280
4308
|
displayName: "Aria TextArea",
|
|
4281
4309
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextArea",
|
|
4282
4310
|
importName: "BaseTextArea",
|
|
4283
|
-
variants: variants$
|
|
4311
|
+
variants: variants$2,
|
|
4284
4312
|
props: __spreadValues$2({}, getCommonProps("Text Area", [
|
|
4285
4313
|
"name",
|
|
4286
4314
|
"disabled",
|
|
@@ -4327,8 +4355,8 @@ function registerTextArea(loader, overrides) {
|
|
|
4327
4355
|
}
|
|
4328
4356
|
|
|
4329
4357
|
var __defProp$1 = Object.defineProperty;
|
|
4330
|
-
var __defProps = Object.defineProperties;
|
|
4331
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4358
|
+
var __defProps$1 = Object.defineProperties;
|
|
4359
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
4332
4360
|
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
4333
4361
|
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
4334
4362
|
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
@@ -4344,8 +4372,8 @@ var __spreadValues$1 = (a, b) => {
|
|
|
4344
4372
|
}
|
|
4345
4373
|
return a;
|
|
4346
4374
|
};
|
|
4347
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
4348
|
-
var __objRest
|
|
4375
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
4376
|
+
var __objRest = (source, exclude) => {
|
|
4349
4377
|
var target = {};
|
|
4350
4378
|
for (var prop in source)
|
|
4351
4379
|
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -4358,10 +4386,10 @@ var __objRest$1 = (source, exclude) => {
|
|
|
4358
4386
|
return target;
|
|
4359
4387
|
};
|
|
4360
4388
|
const TEXT_FIELD_VARIANTS = ["disabled", "readonly"];
|
|
4361
|
-
const { variants, withObservedValues } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
|
|
4389
|
+
const { variants: variants$1, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
|
|
4362
4390
|
function BaseTextField(props) {
|
|
4363
|
-
const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest
|
|
4364
|
-
return /* @__PURE__ */ React.createElement(PlasmicTextFieldContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(TextField, __spreadValues$1({ autoComplete: resolveAutoComplete(autoComplete) }, rest), ({ isDisabled, isReadOnly }) => withObservedValues(
|
|
4391
|
+
const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest(_a, ["children", "plasmicUpdateVariant", "autoComplete"]);
|
|
4392
|
+
return /* @__PURE__ */ React.createElement(PlasmicTextFieldContext.Provider, { value: props }, /* @__PURE__ */ React.createElement(TextField, __spreadValues$1({ autoComplete: resolveAutoComplete(autoComplete) }, rest), ({ isDisabled, isReadOnly }) => withObservedValues$1(
|
|
4365
4393
|
children,
|
|
4366
4394
|
{
|
|
4367
4395
|
disabled: isDisabled,
|
|
@@ -4380,9 +4408,9 @@ function registerTextField(loader, overrides) {
|
|
|
4380
4408
|
displayName: "Aria TextField",
|
|
4381
4409
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextField",
|
|
4382
4410
|
importName: "BaseTextField",
|
|
4383
|
-
variants,
|
|
4411
|
+
variants: variants$1,
|
|
4384
4412
|
// TODO: Support for validate prop
|
|
4385
|
-
props: __spreadProps(__spreadValues$1({}, getCommonProps("Text Field", [
|
|
4413
|
+
props: __spreadProps$1(__spreadValues$1({}, getCommonProps("Text Field", [
|
|
4386
4414
|
"name",
|
|
4387
4415
|
"isDisabled",
|
|
4388
4416
|
"isReadOnly",
|
|
@@ -4491,6 +4519,8 @@ function registerTextField(loader, overrides) {
|
|
|
4491
4519
|
}
|
|
4492
4520
|
|
|
4493
4521
|
var __defProp = Object.defineProperty;
|
|
4522
|
+
var __defProps = Object.defineProperties;
|
|
4523
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4494
4524
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4495
4525
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4496
4526
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -4506,48 +4536,90 @@ var __spreadValues = (a, b) => {
|
|
|
4506
4536
|
}
|
|
4507
4537
|
return a;
|
|
4508
4538
|
};
|
|
4509
|
-
var
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
};
|
|
4521
|
-
function
|
|
4522
|
-
var _b;
|
|
4523
|
-
const _a = props, { children, tooltipContent, className, resetClassName } = _a, restProps = __objRest(_a, ["children", "tooltipContent", "className", "resetClassName"]);
|
|
4524
|
-
const { isSelected, selectedSlotName } = (_b = usePlasmicCanvasComponentInfo(props)) != null ? _b : {};
|
|
4525
|
-
const isAutoOpen = selectedSlotName !== "children" && isSelected;
|
|
4526
|
-
const state = useTooltipTriggerState(restProps);
|
|
4539
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
4540
|
+
function isForwardRefComponent(element) {
|
|
4541
|
+
var _a;
|
|
4542
|
+
return ((_a = element == null ? void 0 : element.type) == null ? void 0 : _a.$$typeof) === Symbol.for("react.forward_ref");
|
|
4543
|
+
}
|
|
4544
|
+
const TOOLTIP_VARIANTS = [
|
|
4545
|
+
"placementTop",
|
|
4546
|
+
"placementBottom",
|
|
4547
|
+
"placementLeft",
|
|
4548
|
+
"placementRight"
|
|
4549
|
+
];
|
|
4550
|
+
const { variants, withObservedValues } = pickAriaComponentVariants(TOOLTIP_VARIANTS);
|
|
4551
|
+
function TooltipButton(props) {
|
|
4527
4552
|
const ref = React.useRef(null);
|
|
4528
|
-
const {
|
|
4529
|
-
|
|
4530
|
-
|
|
4553
|
+
const { buttonProps } = useButton(props, ref);
|
|
4554
|
+
const { children } = props;
|
|
4555
|
+
if (!isForwardRefComponent(children)) {
|
|
4556
|
+
return children;
|
|
4557
|
+
}
|
|
4558
|
+
return React.cloneElement(children, __spreadProps(__spreadValues({}, buttonProps), {
|
|
4531
4559
|
ref
|
|
4532
|
-
);
|
|
4533
|
-
|
|
4560
|
+
}));
|
|
4561
|
+
}
|
|
4562
|
+
function BaseTooltip(props) {
|
|
4563
|
+
var _a;
|
|
4564
|
+
const {
|
|
4565
|
+
children,
|
|
4566
|
+
isDisabled,
|
|
4567
|
+
delay,
|
|
4568
|
+
closeDelay,
|
|
4569
|
+
trigger,
|
|
4570
|
+
isOpen,
|
|
4571
|
+
defaultOpen,
|
|
4572
|
+
tooltipContent,
|
|
4573
|
+
resetClassName,
|
|
4574
|
+
placement,
|
|
4575
|
+
offset,
|
|
4576
|
+
crossOffset,
|
|
4577
|
+
shouldFlip,
|
|
4578
|
+
arrowBoundaryOffset,
|
|
4579
|
+
className,
|
|
4580
|
+
onOpenChange,
|
|
4581
|
+
plasmicUpdateVariant
|
|
4582
|
+
} = props;
|
|
4583
|
+
const { isSelected, selectedSlotName } = (_a = usePlasmicCanvasComponentInfo(props)) != null ? _a : {};
|
|
4584
|
+
const isAutoOpen = selectedSlotName !== "children" && isSelected;
|
|
4534
4585
|
const focusableChild = flattenChildren(children)[0];
|
|
4586
|
+
const _isOpen = isAutoOpen || isOpen;
|
|
4535
4587
|
return /* @__PURE__ */ React.createElement(
|
|
4536
|
-
|
|
4588
|
+
TooltipTrigger,
|
|
4537
4589
|
{
|
|
4538
|
-
|
|
4539
|
-
|
|
4590
|
+
isDisabled,
|
|
4591
|
+
delay,
|
|
4592
|
+
closeDelay,
|
|
4593
|
+
trigger,
|
|
4594
|
+
isOpen: _isOpen,
|
|
4595
|
+
defaultOpen,
|
|
4596
|
+
onOpenChange
|
|
4540
4597
|
},
|
|
4541
|
-
React.
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4598
|
+
/* @__PURE__ */ React.createElement(TooltipButton, null, focusableChild),
|
|
4599
|
+
/* @__PURE__ */ React.createElement(
|
|
4600
|
+
Tooltip,
|
|
4601
|
+
{
|
|
4602
|
+
isOpen: _isOpen,
|
|
4603
|
+
offset,
|
|
4604
|
+
crossOffset,
|
|
4605
|
+
shouldFlip,
|
|
4606
|
+
arrowBoundaryOffset,
|
|
4607
|
+
defaultOpen,
|
|
4608
|
+
className: `${className} ${resetClassName}`,
|
|
4609
|
+
onOpenChange,
|
|
4610
|
+
placement
|
|
4611
|
+
},
|
|
4612
|
+
({ placement: _placement }) => withObservedValues(
|
|
4613
|
+
tooltipContent,
|
|
4614
|
+
{
|
|
4615
|
+
placementTop: _placement === "top",
|
|
4616
|
+
placementBottom: _placement === "bottom",
|
|
4617
|
+
placementLeft: _placement === "left",
|
|
4618
|
+
placementRight: _placement === "right"
|
|
4619
|
+
},
|
|
4620
|
+
plasmicUpdateVariant
|
|
4621
|
+
)
|
|
4622
|
+
)
|
|
4551
4623
|
);
|
|
4552
4624
|
}
|
|
4553
4625
|
function registerTooltip(loader, overrides) {
|
|
@@ -4561,14 +4633,18 @@ function registerTooltip(loader, overrides) {
|
|
|
4561
4633
|
importName: "BaseTooltip",
|
|
4562
4634
|
isAttachment: true,
|
|
4563
4635
|
styleSections: true,
|
|
4636
|
+
variants,
|
|
4564
4637
|
props: {
|
|
4565
4638
|
children: {
|
|
4566
4639
|
type: "slot",
|
|
4567
|
-
displayName: "Trigger",
|
|
4568
4640
|
mergeWithParent: true,
|
|
4641
|
+
displayName: "Trigger",
|
|
4569
4642
|
defaultValue: {
|
|
4570
4643
|
type: "text",
|
|
4571
|
-
value: "Hover me!"
|
|
4644
|
+
value: "Hover me!",
|
|
4645
|
+
styles: {
|
|
4646
|
+
width: "hug"
|
|
4647
|
+
}
|
|
4572
4648
|
}
|
|
4573
4649
|
},
|
|
4574
4650
|
tooltipContent: {
|
|
@@ -4578,7 +4654,11 @@ function registerTooltip(loader, overrides) {
|
|
|
4578
4654
|
// NOTE: This is not applied in attachment
|
|
4579
4655
|
defaultValue: {
|
|
4580
4656
|
type: "text",
|
|
4581
|
-
value: "Hello from Tooltip!"
|
|
4657
|
+
value: "Hello from Tooltip!",
|
|
4658
|
+
styles: {
|
|
4659
|
+
// So the text does not overlap with existing content
|
|
4660
|
+
backgroundColor: "white"
|
|
4661
|
+
}
|
|
4582
4662
|
}
|
|
4583
4663
|
},
|
|
4584
4664
|
resetClassName: {
|
|
@@ -4589,12 +4669,16 @@ function registerTooltip(loader, overrides) {
|
|
|
4589
4669
|
},
|
|
4590
4670
|
delay: {
|
|
4591
4671
|
type: "number",
|
|
4592
|
-
|
|
4672
|
+
// Default value is explicitly set to 0 to prevent users from mistakenly thinking the tooltip isn’t opening due to a delay.
|
|
4673
|
+
defaultValue: 0,
|
|
4674
|
+
defaultValueHint: 0,
|
|
4593
4675
|
description: "The delay (in milliseconds) for the tooltip to show up."
|
|
4594
4676
|
},
|
|
4595
4677
|
closeDelay: {
|
|
4596
4678
|
type: "number",
|
|
4597
|
-
|
|
4679
|
+
// Default value is explicitly set to 0 to prevent users from mistakenly thinking the tooltip isn’t closing due to a delay.
|
|
4680
|
+
defaultValue: 0,
|
|
4681
|
+
defaultValueHint: 0,
|
|
4598
4682
|
description: "The delay (in milliseconds) for the tooltip to close."
|
|
4599
4683
|
},
|
|
4600
4684
|
trigger: {
|
|
@@ -4602,6 +4686,21 @@ function registerTooltip(loader, overrides) {
|
|
|
4602
4686
|
options: ["focus", "focus and hover"],
|
|
4603
4687
|
defaultValueHint: "focus and hover"
|
|
4604
4688
|
},
|
|
4689
|
+
placement: {
|
|
4690
|
+
type: "choice",
|
|
4691
|
+
description: "Default placement of the popover relative to the trigger, if there is enough space",
|
|
4692
|
+
defaultValueHint: "top",
|
|
4693
|
+
// Not providing more options because https://github.com/adobe/react-spectrum/issues/6517
|
|
4694
|
+
options: ["top", "bottom", "left", "right"]
|
|
4695
|
+
},
|
|
4696
|
+
isOpen: {
|
|
4697
|
+
type: "boolean",
|
|
4698
|
+
editOnly: true,
|
|
4699
|
+
uncontrolledProp: "defaultOpen",
|
|
4700
|
+
description: "Whether the overlay is open by default",
|
|
4701
|
+
defaultValueHint: false,
|
|
4702
|
+
hidden: () => true
|
|
4703
|
+
},
|
|
4605
4704
|
onOpenChange: {
|
|
4606
4705
|
type: "eventHandler",
|
|
4607
4706
|
argTypes: [{ name: "isOpen", type: "boolean" }]
|
|
@@ -4609,7 +4708,8 @@ function registerTooltip(loader, overrides) {
|
|
|
4609
4708
|
},
|
|
4610
4709
|
states: {
|
|
4611
4710
|
isOpen: {
|
|
4612
|
-
type: "
|
|
4711
|
+
type: "writable",
|
|
4712
|
+
valueProp: "isOpen",
|
|
4613
4713
|
onChangeProp: "onOpenChange",
|
|
4614
4714
|
variableType: "boolean"
|
|
4615
4715
|
}
|