@plasmicpkgs/react-aria 0.0.64 → 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 +325 -223
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +323 -221
- 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 +5 -3
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.esm.js +5 -3
- package/skinny/registerListBoxItem.esm.js.map +1 -1
- package/skinny/registerModal.cjs.js +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,12 +1679,13 @@ 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",
|
|
1669
|
-
description: "
|
|
1686
|
+
description: "A unique key for tracking the selected item in state",
|
|
1670
1687
|
required: true,
|
|
1688
|
+
displayName: "Value",
|
|
1671
1689
|
validator: (_value, _props, ctx) => {
|
|
1672
1690
|
if (ctx == null ? void 0 : ctx.idError) {
|
|
1673
1691
|
return ctx.idError;
|
|
@@ -1677,7 +1695,8 @@ function registerListBoxItem(loader, overrides) {
|
|
|
1677
1695
|
},
|
|
1678
1696
|
textValue: {
|
|
1679
1697
|
type: "string",
|
|
1680
|
-
|
|
1698
|
+
displayName: "Label",
|
|
1699
|
+
description: "A user-friendly text representation of the item's contents, used for features like typeahead."
|
|
1681
1700
|
},
|
|
1682
1701
|
children: {
|
|
1683
1702
|
type: "slot",
|
|
@@ -1707,7 +1726,7 @@ var __spreadValues$h = (a, b) => {
|
|
|
1707
1726
|
}
|
|
1708
1727
|
return a;
|
|
1709
1728
|
};
|
|
1710
|
-
var __objRest$
|
|
1729
|
+
var __objRest$f = (source, exclude) => {
|
|
1711
1730
|
var target = {};
|
|
1712
1731
|
for (var prop in source)
|
|
1713
1732
|
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1720,7 +1739,7 @@ var __objRest$g = (source, exclude) => {
|
|
|
1720
1739
|
return target;
|
|
1721
1740
|
};
|
|
1722
1741
|
function BaseSection(props) {
|
|
1723
|
-
const _a = props, { header, items } = _a, rest = __objRest$
|
|
1742
|
+
const _a = props, { header, items } = _a, rest = __objRest$f(_a, ["header", "items"]);
|
|
1724
1743
|
const contextProps = React.useContext(PlasmicListBoxContext);
|
|
1725
1744
|
const mergedProps = mergeProps$1(contextProps, rest);
|
|
1726
1745
|
return /* @__PURE__ */ React.createElement(Section, __spreadValues$h({}, mergedProps), /* @__PURE__ */ React.createElement(Header, null, header), items);
|
|
@@ -1776,7 +1795,7 @@ var __spreadValues$g = (a, b) => {
|
|
|
1776
1795
|
}
|
|
1777
1796
|
return a;
|
|
1778
1797
|
};
|
|
1779
|
-
var __objRest$
|
|
1798
|
+
var __objRest$e = (source, exclude) => {
|
|
1780
1799
|
var target = {};
|
|
1781
1800
|
for (var prop in source)
|
|
1782
1801
|
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1806,7 +1825,7 @@ function BaseListBox(props) {
|
|
|
1806
1825
|
children,
|
|
1807
1826
|
selectedKeys,
|
|
1808
1827
|
defaultSelectedKeys
|
|
1809
|
-
} = _a, rest = __objRest$
|
|
1828
|
+
} = _a, rest = __objRest$e(_a, [
|
|
1810
1829
|
"setControlContextData",
|
|
1811
1830
|
"children",
|
|
1812
1831
|
"selectedKeys",
|
|
@@ -2039,7 +2058,7 @@ var __spreadValues$f = (a, b) => {
|
|
|
2039
2058
|
}
|
|
2040
2059
|
return a;
|
|
2041
2060
|
};
|
|
2042
|
-
var __objRest$
|
|
2061
|
+
var __objRest$d = (source, exclude) => {
|
|
2043
2062
|
var target = {};
|
|
2044
2063
|
for (var prop in source)
|
|
2045
2064
|
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2053,7 +2072,7 @@ var __objRest$e = (source, exclude) => {
|
|
|
2053
2072
|
};
|
|
2054
2073
|
function BasePopover(props) {
|
|
2055
2074
|
var _b;
|
|
2056
|
-
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$
|
|
2075
|
+
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$d(_a, ["resetClassName", "setControlContextData"]);
|
|
2057
2076
|
const isStandalone = !React.useContext(PopoverContext);
|
|
2058
2077
|
const context = React.useContext(PlasmicPopoverContext);
|
|
2059
2078
|
const triggerRef = React.useRef(null);
|
|
@@ -2187,8 +2206,8 @@ function registerPopover(loader, overrides) {
|
|
|
2187
2206
|
}
|
|
2188
2207
|
|
|
2189
2208
|
var __defProp$e = Object.defineProperty;
|
|
2190
|
-
var __defProps$
|
|
2191
|
-
var __getOwnPropDescs$
|
|
2209
|
+
var __defProps$a = Object.defineProperties;
|
|
2210
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
2192
2211
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
2193
2212
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
2194
2213
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
@@ -2204,8 +2223,8 @@ var __spreadValues$e = (a, b) => {
|
|
|
2204
2223
|
}
|
|
2205
2224
|
return a;
|
|
2206
2225
|
};
|
|
2207
|
-
var __spreadProps$
|
|
2208
|
-
var __objRest$
|
|
2226
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
2227
|
+
var __objRest$c = (source, exclude) => {
|
|
2209
2228
|
var target = {};
|
|
2210
2229
|
for (var prop in source)
|
|
2211
2230
|
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2236,7 +2255,7 @@ function ComboboxAutoOpen(props) {
|
|
|
2236
2255
|
return null;
|
|
2237
2256
|
}
|
|
2238
2257
|
function BaseComboBox(props) {
|
|
2239
|
-
const _a = props, { children, setControlContextData, isOpen } = _a, rest = __objRest$
|
|
2258
|
+
const _a = props, { children, setControlContextData, isOpen } = _a, rest = __objRest$c(_a, ["children", "setControlContextData", "isOpen"]);
|
|
2240
2259
|
const idManager = useMemo(() => new ListBoxItemIdManager(), []);
|
|
2241
2260
|
useEffect(() => {
|
|
2242
2261
|
idManager.subscribe((ids) => {
|
|
@@ -2267,7 +2286,7 @@ function registerComboBox(loader) {
|
|
|
2267
2286
|
displayName: "Aria ComboBox",
|
|
2268
2287
|
importPath: "@plasmicpkgs/react-aria/skinny/registerComboBox",
|
|
2269
2288
|
importName: "BaseComboBox",
|
|
2270
|
-
props: __spreadProps$
|
|
2289
|
+
props: __spreadProps$a(__spreadValues$e({}, getCommonProps("ComboBox", [
|
|
2271
2290
|
"name",
|
|
2272
2291
|
"aria-label",
|
|
2273
2292
|
"placeholder",
|
|
@@ -2417,7 +2436,7 @@ var __spreadValues$d = (a, b) => {
|
|
|
2417
2436
|
}
|
|
2418
2437
|
return a;
|
|
2419
2438
|
};
|
|
2420
|
-
var __objRest$
|
|
2439
|
+
var __objRest$b = (source, exclude) => {
|
|
2421
2440
|
var target = {};
|
|
2422
2441
|
for (var prop in source)
|
|
2423
2442
|
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2430,7 +2449,7 @@ var __objRest$c = (source, exclude) => {
|
|
|
2430
2449
|
return target;
|
|
2431
2450
|
};
|
|
2432
2451
|
function BaseHeading(_a) {
|
|
2433
|
-
var _b = _a, { children } = _b, rest = __objRest$
|
|
2452
|
+
var _b = _a, { children } = _b, rest = __objRest$b(_b, ["children"]);
|
|
2434
2453
|
return /* @__PURE__ */ React.createElement(Heading, __spreadValues$d({}, rest), children);
|
|
2435
2454
|
}
|
|
2436
2455
|
const HEADING_COMPONENT_NAME = makeComponentName("heading");
|
|
@@ -2470,8 +2489,8 @@ function registerHeading(loader, overrides) {
|
|
|
2470
2489
|
}
|
|
2471
2490
|
|
|
2472
2491
|
var __defProp$c = Object.defineProperty;
|
|
2473
|
-
var __defProps$
|
|
2474
|
-
var __getOwnPropDescs$
|
|
2492
|
+
var __defProps$9 = Object.defineProperties;
|
|
2493
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
2475
2494
|
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2476
2495
|
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2477
2496
|
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
@@ -2487,8 +2506,8 @@ var __spreadValues$c = (a, b) => {
|
|
|
2487
2506
|
}
|
|
2488
2507
|
return a;
|
|
2489
2508
|
};
|
|
2490
|
-
var __spreadProps$
|
|
2491
|
-
var __objRest$
|
|
2509
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
2510
|
+
var __objRest$a = (source, exclude) => {
|
|
2492
2511
|
var target = {};
|
|
2493
2512
|
for (var prop in source)
|
|
2494
2513
|
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2512,20 +2531,31 @@ const BaseModal = forwardRef(
|
|
|
2512
2531
|
className,
|
|
2513
2532
|
isOpen,
|
|
2514
2533
|
resetClassName,
|
|
2515
|
-
setControlContextData
|
|
2516
|
-
|
|
2534
|
+
setControlContextData,
|
|
2535
|
+
isDismissable
|
|
2536
|
+
} = _a, rest = __objRest$a(_a, [
|
|
2517
2537
|
"children",
|
|
2518
2538
|
"modalOverlayClass",
|
|
2519
2539
|
"className",
|
|
2520
2540
|
"isOpen",
|
|
2521
2541
|
"resetClassName",
|
|
2522
|
-
"setControlContextData"
|
|
2542
|
+
"setControlContextData",
|
|
2543
|
+
"isDismissable"
|
|
2523
2544
|
]);
|
|
2524
2545
|
const { isSelected } = (_b = usePlasmicCanvasComponentInfo(props)) != null ? _b : {};
|
|
2525
2546
|
const contextProps = React.useContext(PlasmicDialogTriggerContext);
|
|
2526
2547
|
const isStandalone = !contextProps;
|
|
2527
2548
|
const mergedProps = mergeProps(contextProps, rest, {
|
|
2528
|
-
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
|
|
2529
2559
|
});
|
|
2530
2560
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
2531
2561
|
parent: isStandalone ? void 0 : {}
|
|
@@ -2545,7 +2575,7 @@ const BaseModal = forwardRef(
|
|
|
2545
2575
|
const bodyInPreview = /* @__PURE__ */ React.createElement(Dialog, { style: INLINE_STYLES }, children);
|
|
2546
2576
|
return /* @__PURE__ */ React.createElement(
|
|
2547
2577
|
ModalOverlay,
|
|
2548
|
-
__spreadProps$
|
|
2578
|
+
__spreadProps$9(__spreadValues$c({}, mergedProps), {
|
|
2549
2579
|
className: `${resetClassName} ${modalOverlayClass}`
|
|
2550
2580
|
}),
|
|
2551
2581
|
/* @__PURE__ */ React.createElement(Modal, { className }, isCanvas ? bodyInCanvas : bodyInPreview)
|
|
@@ -2667,8 +2697,8 @@ function registerModal(loader, overrides) {
|
|
|
2667
2697
|
}
|
|
2668
2698
|
|
|
2669
2699
|
var __defProp$b = Object.defineProperty;
|
|
2670
|
-
var __defProps$
|
|
2671
|
-
var __getOwnPropDescs$
|
|
2700
|
+
var __defProps$8 = Object.defineProperties;
|
|
2701
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
2672
2702
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
2673
2703
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
2674
2704
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
@@ -2684,8 +2714,8 @@ var __spreadValues$b = (a, b) => {
|
|
|
2684
2714
|
}
|
|
2685
2715
|
return a;
|
|
2686
2716
|
};
|
|
2687
|
-
var __spreadProps$
|
|
2688
|
-
var __objRest$
|
|
2717
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
2718
|
+
var __objRest$9 = (source, exclude) => {
|
|
2689
2719
|
var target = {};
|
|
2690
2720
|
for (var prop in source)
|
|
2691
2721
|
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2699,10 +2729,10 @@ var __objRest$a = (source, exclude) => {
|
|
|
2699
2729
|
};
|
|
2700
2730
|
function BaseDialogTrigger(props) {
|
|
2701
2731
|
var _b, _c;
|
|
2702
|
-
const _a = props, { trigger, dialog, isOpen } = _a, rest = __objRest$
|
|
2732
|
+
const _a = props, { trigger, dialog, isOpen } = _a, rest = __objRest$9(_a, ["trigger", "dialog", "isOpen"]);
|
|
2703
2733
|
const { isSelected, selectedSlotName } = (_b = usePlasmicCanvasComponentInfo(props)) != null ? _b : {};
|
|
2704
2734
|
const isAutoOpen = selectedSlotName !== "trigger" && isSelected;
|
|
2705
|
-
const mergedProps = __spreadProps$
|
|
2735
|
+
const mergedProps = __spreadProps$8(__spreadValues$b({}, rest), {
|
|
2706
2736
|
isOpen: (_c = isAutoOpen || isOpen) != null ? _c : false
|
|
2707
2737
|
});
|
|
2708
2738
|
return /* @__PURE__ */ React.createElement(PlasmicDialogTriggerContext.Provider, { value: mergedProps }, /* @__PURE__ */ React.createElement(DialogTrigger, __spreadValues$b({}, mergedProps), trigger, dialog));
|
|
@@ -2766,8 +2796,8 @@ function registerDialogTrigger(loader, overrides) {
|
|
|
2766
2796
|
}
|
|
2767
2797
|
|
|
2768
2798
|
var __defProp$a = Object.defineProperty;
|
|
2769
|
-
var __defProps$
|
|
2770
|
-
var __getOwnPropDescs$
|
|
2799
|
+
var __defProps$7 = Object.defineProperties;
|
|
2800
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
2771
2801
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
2772
2802
|
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
2773
2803
|
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
@@ -2783,8 +2813,8 @@ var __spreadValues$a = (a, b) => {
|
|
|
2783
2813
|
}
|
|
2784
2814
|
return a;
|
|
2785
2815
|
};
|
|
2786
|
-
var __spreadProps$
|
|
2787
|
-
var __objRest$
|
|
2816
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
2817
|
+
var __objRest$8 = (source, exclude) => {
|
|
2788
2818
|
var target = {};
|
|
2789
2819
|
for (var prop in source)
|
|
2790
2820
|
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2806,9 +2836,9 @@ const RADIO_VARIANTS = [
|
|
|
2806
2836
|
"readonly",
|
|
2807
2837
|
"selected"
|
|
2808
2838
|
];
|
|
2809
|
-
const { variants: variants$
|
|
2839
|
+
const { variants: variants$9, withObservedValues: withObservedValues$8 } = pickAriaComponentVariants(RADIO_VARIANTS);
|
|
2810
2840
|
function BaseRadio(props) {
|
|
2811
|
-
const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
2841
|
+
const _a = props, { children, setControlContextData, plasmicUpdateVariant } = _a, rest = __objRest$8(_a, ["children", "setControlContextData", "plasmicUpdateVariant"]);
|
|
2812
2842
|
const contextProps = React.useContext(PlasmicRadioGroupContext);
|
|
2813
2843
|
const isStandalone = !contextProps;
|
|
2814
2844
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
@@ -2822,7 +2852,7 @@ function BaseRadio(props) {
|
|
|
2822
2852
|
isSelected,
|
|
2823
2853
|
isDisabled,
|
|
2824
2854
|
isReadOnly
|
|
2825
|
-
}) => withObservedValues$
|
|
2855
|
+
}) => withObservedValues$8(
|
|
2826
2856
|
children,
|
|
2827
2857
|
{
|
|
2828
2858
|
hovered: isHovered,
|
|
@@ -2881,8 +2911,8 @@ function registerRadio(loader, overrides) {
|
|
|
2881
2911
|
displayName: "Aria Radio",
|
|
2882
2912
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadio",
|
|
2883
2913
|
importName: "BaseRadio",
|
|
2884
|
-
variants: variants$
|
|
2885
|
-
props: __spreadProps$
|
|
2914
|
+
variants: variants$9,
|
|
2915
|
+
props: __spreadProps$7(__spreadValues$a({}, getCommonProps("radio", [
|
|
2886
2916
|
"isDisabled",
|
|
2887
2917
|
"autoFocus",
|
|
2888
2918
|
"aria-label"
|
|
@@ -2904,8 +2934,8 @@ function registerRadio(loader, overrides) {
|
|
|
2904
2934
|
}
|
|
2905
2935
|
|
|
2906
2936
|
var __defProp$9 = Object.defineProperty;
|
|
2907
|
-
var __defProps$
|
|
2908
|
-
var __getOwnPropDescs$
|
|
2937
|
+
var __defProps$6 = Object.defineProperties;
|
|
2938
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
2909
2939
|
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
2910
2940
|
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
2911
2941
|
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
@@ -2921,8 +2951,8 @@ var __spreadValues$9 = (a, b) => {
|
|
|
2921
2951
|
}
|
|
2922
2952
|
return a;
|
|
2923
2953
|
};
|
|
2924
|
-
var __spreadProps$
|
|
2925
|
-
var __objRest$
|
|
2954
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
2955
|
+
var __objRest$7 = (source, exclude) => {
|
|
2926
2956
|
var target = {};
|
|
2927
2957
|
for (var prop in source)
|
|
2928
2958
|
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2935,10 +2965,10 @@ var __objRest$8 = (source, exclude) => {
|
|
|
2935
2965
|
return target;
|
|
2936
2966
|
};
|
|
2937
2967
|
const RADIO_GROUP_VARIANTS = ["disabled", "readonly"];
|
|
2938
|
-
const { variants: variants$
|
|
2968
|
+
const { variants: variants$8, withObservedValues: withObservedValues$7 } = pickAriaComponentVariants(RADIO_GROUP_VARIANTS);
|
|
2939
2969
|
function BaseRadioGroup(props) {
|
|
2940
|
-
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
2941
|
-
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(
|
|
2942
2972
|
children,
|
|
2943
2973
|
{
|
|
2944
2974
|
disabled: isDisabled,
|
|
@@ -2964,8 +2994,8 @@ function registerRadioGroup(loader, overrides) {
|
|
|
2964
2994
|
displayName: "Aria RadioGroup",
|
|
2965
2995
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadioGroup",
|
|
2966
2996
|
importName: "BaseRadioGroup",
|
|
2967
|
-
variants: variants$
|
|
2968
|
-
props: __spreadProps$
|
|
2997
|
+
variants: variants$8,
|
|
2998
|
+
props: __spreadProps$6(__spreadValues$9({}, getCommonProps("radio group", [
|
|
2969
2999
|
"name",
|
|
2970
3000
|
"isDisabled",
|
|
2971
3001
|
"isReadOnly",
|
|
@@ -3071,8 +3101,8 @@ function registerRadioGroup(loader, overrides) {
|
|
|
3071
3101
|
}
|
|
3072
3102
|
|
|
3073
3103
|
var __defProp$8 = Object.defineProperty;
|
|
3074
|
-
var __defProps$
|
|
3075
|
-
var __getOwnPropDescs$
|
|
3104
|
+
var __defProps$5 = Object.defineProperties;
|
|
3105
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
3076
3106
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
3077
3107
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
3078
3108
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
@@ -3088,7 +3118,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
3088
3118
|
}
|
|
3089
3119
|
return a;
|
|
3090
3120
|
};
|
|
3091
|
-
var __spreadProps$
|
|
3121
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
3092
3122
|
const BaseSelectValue = (props) => {
|
|
3093
3123
|
const { children, customize } = props;
|
|
3094
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))));
|
|
@@ -3192,7 +3222,7 @@ function registerSelect(loader) {
|
|
|
3192
3222
|
displayName: "Aria Select",
|
|
3193
3223
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSelect",
|
|
3194
3224
|
importName: "BaseSelect",
|
|
3195
|
-
props: __spreadProps$
|
|
3225
|
+
props: __spreadProps$5(__spreadValues$8({}, getCommonProps("Select", [
|
|
3196
3226
|
"name",
|
|
3197
3227
|
"aria-label",
|
|
3198
3228
|
"placeholder",
|
|
@@ -3349,7 +3379,7 @@ var __spreadValues$7 = (a, b) => {
|
|
|
3349
3379
|
}
|
|
3350
3380
|
return a;
|
|
3351
3381
|
};
|
|
3352
|
-
var __objRest$
|
|
3382
|
+
var __objRest$6 = (source, exclude) => {
|
|
3353
3383
|
var target = {};
|
|
3354
3384
|
for (var prop in source)
|
|
3355
3385
|
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3362,12 +3392,12 @@ var __objRest$7 = (source, exclude) => {
|
|
|
3362
3392
|
return target;
|
|
3363
3393
|
};
|
|
3364
3394
|
const SLIDER_OUTPUT_VARIANTS = ["disabled"];
|
|
3365
|
-
const { variants: variants$
|
|
3395
|
+
const { variants: variants$7, withObservedValues: withObservedValues$6 } = pickAriaComponentVariants(
|
|
3366
3396
|
SLIDER_OUTPUT_VARIANTS
|
|
3367
3397
|
);
|
|
3368
3398
|
function BaseSliderOutput(props) {
|
|
3369
|
-
const _a = props, { plasmicUpdateVariant, children } = _a, rest = __objRest$
|
|
3370
|
-
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(
|
|
3371
3401
|
children,
|
|
3372
3402
|
{
|
|
3373
3403
|
disabled: isDisabled
|
|
@@ -3385,7 +3415,7 @@ function registerSliderOutput(loader, overrides) {
|
|
|
3385
3415
|
displayName: "Aria Slider Output",
|
|
3386
3416
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSliderOutput",
|
|
3387
3417
|
importName: "BaseSliderOutput",
|
|
3388
|
-
variants: variants$
|
|
3418
|
+
variants: variants$7,
|
|
3389
3419
|
props: {
|
|
3390
3420
|
children: {
|
|
3391
3421
|
mergeWithParent: true,
|
|
@@ -3415,8 +3445,8 @@ class ErrorBoundary extends Component {
|
|
|
3415
3445
|
}
|
|
3416
3446
|
|
|
3417
3447
|
var __defProp$6 = Object.defineProperty;
|
|
3418
|
-
var __defProps$
|
|
3419
|
-
var __getOwnPropDescs$
|
|
3448
|
+
var __defProps$4 = Object.defineProperties;
|
|
3449
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
3420
3450
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
3421
3451
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
3422
3452
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
@@ -3432,8 +3462,8 @@ var __spreadValues$6 = (a, b) => {
|
|
|
3432
3462
|
}
|
|
3433
3463
|
return a;
|
|
3434
3464
|
};
|
|
3435
|
-
var __spreadProps$
|
|
3436
|
-
var __objRest$
|
|
3465
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
3466
|
+
var __objRest$5 = (source, exclude) => {
|
|
3437
3467
|
var target = {};
|
|
3438
3468
|
for (var prop in source)
|
|
3439
3469
|
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3452,7 +3482,7 @@ const SLIDER_THUMB_VARIANTS = [
|
|
|
3452
3482
|
"focusVisible",
|
|
3453
3483
|
"disabled"
|
|
3454
3484
|
];
|
|
3455
|
-
const { variants: variants$
|
|
3485
|
+
const { variants: variants$6, withObservedValues: withObservedValues$5 } = pickAriaComponentVariants(
|
|
3456
3486
|
SLIDER_THUMB_VARIANTS
|
|
3457
3487
|
);
|
|
3458
3488
|
function BaseSliderThumb(_a) {
|
|
@@ -3460,14 +3490,14 @@ function BaseSliderThumb(_a) {
|
|
|
3460
3490
|
children,
|
|
3461
3491
|
advanced,
|
|
3462
3492
|
plasmicUpdateVariant
|
|
3463
|
-
} = _b, rest = __objRest$
|
|
3493
|
+
} = _b, rest = __objRest$5(_b, [
|
|
3464
3494
|
"children",
|
|
3465
3495
|
"advanced",
|
|
3466
3496
|
"plasmicUpdateVariant"
|
|
3467
3497
|
]);
|
|
3468
3498
|
const context = React.useContext(PlasmicSliderContext);
|
|
3469
3499
|
const mergedProps = mergeProps(context, rest);
|
|
3470
|
-
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(
|
|
3471
3501
|
/* @__PURE__ */ React.createElement(React.Fragment, null, advanced ? children : void 0),
|
|
3472
3502
|
{
|
|
3473
3503
|
dragging: isDragging,
|
|
@@ -3505,8 +3535,8 @@ function registerSliderThumb(loader, overrides) {
|
|
|
3505
3535
|
borderRadius: "100%",
|
|
3506
3536
|
cursor: "pointer"
|
|
3507
3537
|
},
|
|
3508
|
-
variants: variants$
|
|
3509
|
-
props: __spreadProps$
|
|
3538
|
+
variants: variants$6,
|
|
3539
|
+
props: __spreadProps$4(__spreadValues$6({}, getCommonProps("slider thumb", [
|
|
3510
3540
|
"name",
|
|
3511
3541
|
"isDisabled",
|
|
3512
3542
|
"autoFocus"
|
|
@@ -3544,7 +3574,7 @@ var __spreadValues$5 = (a, b) => {
|
|
|
3544
3574
|
}
|
|
3545
3575
|
return a;
|
|
3546
3576
|
};
|
|
3547
|
-
var __objRest$
|
|
3577
|
+
var __objRest$4 = (source, exclude) => {
|
|
3548
3578
|
var target = {};
|
|
3549
3579
|
for (var prop in source)
|
|
3550
3580
|
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3557,7 +3587,7 @@ var __objRest$5 = (source, exclude) => {
|
|
|
3557
3587
|
return target;
|
|
3558
3588
|
};
|
|
3559
3589
|
const SLIDER_TRACK_VARIANTS = ["hovered"];
|
|
3560
|
-
const { variants: variants$
|
|
3590
|
+
const { variants: variants$5, withObservedValues: withObservedValues$4 } = pickAriaComponentVariants(
|
|
3561
3591
|
SLIDER_TRACK_VARIANTS
|
|
3562
3592
|
);
|
|
3563
3593
|
function findMinMaxIndices(values) {
|
|
@@ -3582,7 +3612,7 @@ function BaseSliderTrack(props) {
|
|
|
3582
3612
|
const context = React.useContext(PlasmicSliderContext);
|
|
3583
3613
|
const isStandalone = !context;
|
|
3584
3614
|
const mergedProps = mergeProps(context, props);
|
|
3585
|
-
const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
3615
|
+
const _a = mergedProps, { children, progressBar, plasmicUpdateVariant } = _a, rest = __objRest$4(_a, ["children", "progressBar", "plasmicUpdateVariant"]);
|
|
3586
3616
|
const isMultiValue = isMultiValueGuard(mergedProps.value);
|
|
3587
3617
|
const { minIndex, maxIndex } = useMemo(() => {
|
|
3588
3618
|
if (!context || !Array.isArray(context.value) || context.value.length <= 1) {
|
|
@@ -3614,7 +3644,7 @@ function BaseSliderTrack(props) {
|
|
|
3614
3644
|
});
|
|
3615
3645
|
});
|
|
3616
3646
|
}, [children, context == null ? void 0 : context.value]);
|
|
3617
|
-
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(
|
|
3618
3648
|
/* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
3619
3649
|
"div",
|
|
3620
3650
|
{
|
|
@@ -3648,7 +3678,7 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3648
3678
|
displayName: "Aria Slider Track",
|
|
3649
3679
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSliderTrack",
|
|
3650
3680
|
importName: "BaseSliderTrack",
|
|
3651
|
-
variants: variants$
|
|
3681
|
+
variants: variants$5,
|
|
3652
3682
|
defaultStyles: {
|
|
3653
3683
|
width: "stretch",
|
|
3654
3684
|
backgroundColor: "#aaa",
|
|
@@ -3710,8 +3740,8 @@ function registerSliderTrack(sliderThumbMeta, loader, overrides) {
|
|
|
3710
3740
|
}
|
|
3711
3741
|
|
|
3712
3742
|
var __defProp$4 = Object.defineProperty;
|
|
3713
|
-
var __defProps$
|
|
3714
|
-
var __getOwnPropDescs$
|
|
3743
|
+
var __defProps$3 = Object.defineProperties;
|
|
3744
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
3715
3745
|
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
3716
3746
|
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
3717
3747
|
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
@@ -3727,8 +3757,8 @@ var __spreadValues$4 = (a, b) => {
|
|
|
3727
3757
|
}
|
|
3728
3758
|
return a;
|
|
3729
3759
|
};
|
|
3730
|
-
var __spreadProps$
|
|
3731
|
-
var __objRest$
|
|
3760
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
3761
|
+
var __objRest$3 = (source, exclude) => {
|
|
3732
3762
|
var target = {};
|
|
3733
3763
|
for (var prop in source)
|
|
3734
3764
|
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -3743,19 +3773,19 @@ var __objRest$4 = (source, exclude) => {
|
|
|
3743
3773
|
const SLIDER_COMPONENT_NAME = makeComponentName("slider");
|
|
3744
3774
|
const RANGE_SLIDER_COMPONENT_NAME = makeComponentName("range-slider");
|
|
3745
3775
|
const SLIDER_VARIANTS = ["disabled"];
|
|
3746
|
-
const { variants: variants$
|
|
3776
|
+
const { variants: variants$4, withObservedValues: withObservedValues$3 } = pickAriaComponentVariants(SLIDER_VARIANTS);
|
|
3747
3777
|
function BaseSlider(props) {
|
|
3748
|
-
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
3778
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$3(_a, ["children", "plasmicUpdateVariant"]);
|
|
3749
3779
|
return /* @__PURE__ */ React.createElement(
|
|
3750
3780
|
PlasmicSliderContext.Provider,
|
|
3751
3781
|
{
|
|
3752
|
-
value: __spreadProps$
|
|
3782
|
+
value: __spreadProps$3(__spreadValues$4({}, rest), {
|
|
3753
3783
|
// Here's why the type casting is needed here: https://github.com/Microsoft/TypeScript/issues/3410
|
|
3754
3784
|
onChange: rest.onChange,
|
|
3755
3785
|
onChangeEnd: rest.onChangeEnd
|
|
3756
3786
|
})
|
|
3757
3787
|
},
|
|
3758
|
-
/* @__PURE__ */ React.createElement(Slider, __spreadValues$4({}, rest), ({ isDisabled }) => withObservedValues$
|
|
3788
|
+
/* @__PURE__ */ React.createElement(Slider, __spreadValues$4({}, rest), ({ isDisabled }) => withObservedValues$3(
|
|
3759
3789
|
children,
|
|
3760
3790
|
{
|
|
3761
3791
|
disabled: isDisabled
|
|
@@ -3807,11 +3837,11 @@ function registerSlider(loader, overrides) {
|
|
|
3807
3837
|
displayName: "Aria Range Slider",
|
|
3808
3838
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSlider",
|
|
3809
3839
|
importName: "BaseSlider",
|
|
3810
|
-
variants: variants$
|
|
3840
|
+
variants: variants$4,
|
|
3811
3841
|
defaultStyles: {
|
|
3812
3842
|
width: "300px"
|
|
3813
3843
|
},
|
|
3814
|
-
props: __spreadProps$
|
|
3844
|
+
props: __spreadProps$3(__spreadValues$4(__spreadValues$4({}, getCommonProps("slider", [
|
|
3815
3845
|
"isDisabled",
|
|
3816
3846
|
"aria-label"
|
|
3817
3847
|
])), getCommonSliderProps()), {
|
|
@@ -3919,11 +3949,11 @@ function registerSlider(loader, overrides) {
|
|
|
3919
3949
|
displayName: "Aria Slider",
|
|
3920
3950
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSlider",
|
|
3921
3951
|
importName: "BaseSlider",
|
|
3922
|
-
variants: variants$
|
|
3952
|
+
variants: variants$4,
|
|
3923
3953
|
defaultStyles: {
|
|
3924
3954
|
width: "300px"
|
|
3925
3955
|
},
|
|
3926
|
-
props: __spreadProps$
|
|
3956
|
+
props: __spreadProps$3(__spreadValues$4(__spreadValues$4({}, getCommonProps("slider", [
|
|
3927
3957
|
"isDisabled",
|
|
3928
3958
|
"aria-label"
|
|
3929
3959
|
])), getCommonSliderProps()), {
|
|
@@ -3999,8 +4029,8 @@ function registerSlider(loader, overrides) {
|
|
|
3999
4029
|
}
|
|
4000
4030
|
|
|
4001
4031
|
var __defProp$3 = Object.defineProperty;
|
|
4002
|
-
var __defProps$
|
|
4003
|
-
var __getOwnPropDescs$
|
|
4032
|
+
var __defProps$2 = Object.defineProperties;
|
|
4033
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
4004
4034
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
4005
4035
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
4006
4036
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
@@ -4016,8 +4046,8 @@ var __spreadValues$3 = (a, b) => {
|
|
|
4016
4046
|
}
|
|
4017
4047
|
return a;
|
|
4018
4048
|
};
|
|
4019
|
-
var __spreadProps$
|
|
4020
|
-
var __objRest$
|
|
4049
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
4050
|
+
var __objRest$2 = (source, exclude) => {
|
|
4021
4051
|
var target = {};
|
|
4022
4052
|
for (var prop in source)
|
|
4023
4053
|
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -4038,9 +4068,9 @@ const SWITCH_VARIANTS = [
|
|
|
4038
4068
|
"disabled",
|
|
4039
4069
|
"readonly"
|
|
4040
4070
|
];
|
|
4041
|
-
const { variants: variants$
|
|
4071
|
+
const { variants: variants$3, withObservedValues: withObservedValues$2 } = pickAriaComponentVariants(SWITCH_VARIANTS);
|
|
4042
4072
|
function BaseSwitch(props) {
|
|
4043
|
-
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
4073
|
+
const _a = props, { children, plasmicUpdateVariant } = _a, rest = __objRest$2(_a, ["children", "plasmicUpdateVariant"]);
|
|
4044
4074
|
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$3({}, rest), ({
|
|
4045
4075
|
isHovered,
|
|
4046
4076
|
isPressed,
|
|
@@ -4049,7 +4079,7 @@ function BaseSwitch(props) {
|
|
|
4049
4079
|
isSelected,
|
|
4050
4080
|
isDisabled,
|
|
4051
4081
|
isReadOnly
|
|
4052
|
-
}) => withObservedValues$
|
|
4082
|
+
}) => withObservedValues$2(
|
|
4053
4083
|
children,
|
|
4054
4084
|
{
|
|
4055
4085
|
hovered: isHovered,
|
|
@@ -4072,7 +4102,7 @@ function registerSwitch(loader, overrides) {
|
|
|
4072
4102
|
displayName: "Aria Switch",
|
|
4073
4103
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSwitch",
|
|
4074
4104
|
importName: "BaseSwitch",
|
|
4075
|
-
variants: variants$
|
|
4105
|
+
variants: variants$3,
|
|
4076
4106
|
defaultStyles: {
|
|
4077
4107
|
display: "flex",
|
|
4078
4108
|
flexDirection: "column",
|
|
@@ -4080,7 +4110,7 @@ function registerSwitch(loader, overrides) {
|
|
|
4080
4110
|
justifyContent: "flex-start",
|
|
4081
4111
|
padding: 0
|
|
4082
4112
|
},
|
|
4083
|
-
props: __spreadProps$
|
|
4113
|
+
props: __spreadProps$2(__spreadValues$3({}, getCommonProps("switch", [
|
|
4084
4114
|
"name",
|
|
4085
4115
|
"isDisabled",
|
|
4086
4116
|
"isReadOnly",
|
|
@@ -4206,7 +4236,7 @@ var __spreadValues$2 = (a, b) => {
|
|
|
4206
4236
|
}
|
|
4207
4237
|
return a;
|
|
4208
4238
|
};
|
|
4209
|
-
var __objRest$
|
|
4239
|
+
var __objRest$1 = (source, exclude) => {
|
|
4210
4240
|
var target = {};
|
|
4211
4241
|
for (var prop in source)
|
|
4212
4242
|
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -4223,7 +4253,7 @@ const TEXTAREA_VARIANTS = [
|
|
|
4223
4253
|
"hovered",
|
|
4224
4254
|
"disabled"
|
|
4225
4255
|
];
|
|
4226
|
-
const { variants: variants$
|
|
4256
|
+
const { variants: variants$2 } = pickAriaComponentVariants(TEXTAREA_VARIANTS);
|
|
4227
4257
|
const inputHelpers = {
|
|
4228
4258
|
states: {
|
|
4229
4259
|
value: {
|
|
@@ -4235,7 +4265,7 @@ const inputHelpers = {
|
|
|
4235
4265
|
};
|
|
4236
4266
|
function BaseTextArea(props) {
|
|
4237
4267
|
var _b;
|
|
4238
|
-
const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$
|
|
4268
|
+
const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$1(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
|
|
4239
4269
|
const textFieldContext = React.useContext(PlasmicTextFieldContext);
|
|
4240
4270
|
const mergedProps = mergeProps(rest, {
|
|
4241
4271
|
disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
|
|
@@ -4278,7 +4308,7 @@ function registerTextArea(loader, overrides) {
|
|
|
4278
4308
|
displayName: "Aria TextArea",
|
|
4279
4309
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextArea",
|
|
4280
4310
|
importName: "BaseTextArea",
|
|
4281
|
-
variants: variants$
|
|
4311
|
+
variants: variants$2,
|
|
4282
4312
|
props: __spreadValues$2({}, getCommonProps("Text Area", [
|
|
4283
4313
|
"name",
|
|
4284
4314
|
"disabled",
|
|
@@ -4325,8 +4355,8 @@ function registerTextArea(loader, overrides) {
|
|
|
4325
4355
|
}
|
|
4326
4356
|
|
|
4327
4357
|
var __defProp$1 = Object.defineProperty;
|
|
4328
|
-
var __defProps = Object.defineProperties;
|
|
4329
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4358
|
+
var __defProps$1 = Object.defineProperties;
|
|
4359
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
4330
4360
|
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
4331
4361
|
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
4332
4362
|
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
@@ -4342,8 +4372,8 @@ var __spreadValues$1 = (a, b) => {
|
|
|
4342
4372
|
}
|
|
4343
4373
|
return a;
|
|
4344
4374
|
};
|
|
4345
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
4346
|
-
var __objRest
|
|
4375
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
4376
|
+
var __objRest = (source, exclude) => {
|
|
4347
4377
|
var target = {};
|
|
4348
4378
|
for (var prop in source)
|
|
4349
4379
|
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -4356,10 +4386,10 @@ var __objRest$1 = (source, exclude) => {
|
|
|
4356
4386
|
return target;
|
|
4357
4387
|
};
|
|
4358
4388
|
const TEXT_FIELD_VARIANTS = ["disabled", "readonly"];
|
|
4359
|
-
const { variants, withObservedValues } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
|
|
4389
|
+
const { variants: variants$1, withObservedValues: withObservedValues$1 } = pickAriaComponentVariants(TEXT_FIELD_VARIANTS);
|
|
4360
4390
|
function BaseTextField(props) {
|
|
4361
|
-
const _a = props, { children, plasmicUpdateVariant, autoComplete } = _a, rest = __objRest
|
|
4362
|
-
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(
|
|
4363
4393
|
children,
|
|
4364
4394
|
{
|
|
4365
4395
|
disabled: isDisabled,
|
|
@@ -4378,9 +4408,9 @@ function registerTextField(loader, overrides) {
|
|
|
4378
4408
|
displayName: "Aria TextField",
|
|
4379
4409
|
importPath: "@plasmicpkgs/react-aria/skinny/registerTextField",
|
|
4380
4410
|
importName: "BaseTextField",
|
|
4381
|
-
variants,
|
|
4411
|
+
variants: variants$1,
|
|
4382
4412
|
// TODO: Support for validate prop
|
|
4383
|
-
props: __spreadProps(__spreadValues$1({}, getCommonProps("Text Field", [
|
|
4413
|
+
props: __spreadProps$1(__spreadValues$1({}, getCommonProps("Text Field", [
|
|
4384
4414
|
"name",
|
|
4385
4415
|
"isDisabled",
|
|
4386
4416
|
"isReadOnly",
|
|
@@ -4489,6 +4519,8 @@ function registerTextField(loader, overrides) {
|
|
|
4489
4519
|
}
|
|
4490
4520
|
|
|
4491
4521
|
var __defProp = Object.defineProperty;
|
|
4522
|
+
var __defProps = Object.defineProperties;
|
|
4523
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4492
4524
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4493
4525
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4494
4526
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -4504,48 +4536,90 @@ var __spreadValues = (a, b) => {
|
|
|
4504
4536
|
}
|
|
4505
4537
|
return a;
|
|
4506
4538
|
};
|
|
4507
|
-
var
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
};
|
|
4519
|
-
function
|
|
4520
|
-
var _b;
|
|
4521
|
-
const _a = props, { children, tooltipContent, className, resetClassName } = _a, restProps = __objRest(_a, ["children", "tooltipContent", "className", "resetClassName"]);
|
|
4522
|
-
const { isSelected, selectedSlotName } = (_b = usePlasmicCanvasComponentInfo(props)) != null ? _b : {};
|
|
4523
|
-
const isAutoOpen = selectedSlotName !== "children" && isSelected;
|
|
4524
|
-
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) {
|
|
4525
4552
|
const ref = React.useRef(null);
|
|
4526
|
-
const {
|
|
4527
|
-
|
|
4528
|
-
|
|
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), {
|
|
4529
4559
|
ref
|
|
4530
|
-
);
|
|
4531
|
-
|
|
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;
|
|
4532
4585
|
const focusableChild = flattenChildren(children)[0];
|
|
4586
|
+
const _isOpen = isAutoOpen || isOpen;
|
|
4533
4587
|
return /* @__PURE__ */ React.createElement(
|
|
4534
|
-
|
|
4588
|
+
TooltipTrigger,
|
|
4535
4589
|
{
|
|
4536
|
-
|
|
4537
|
-
|
|
4590
|
+
isDisabled,
|
|
4591
|
+
delay,
|
|
4592
|
+
closeDelay,
|
|
4593
|
+
trigger,
|
|
4594
|
+
isOpen: _isOpen,
|
|
4595
|
+
defaultOpen,
|
|
4596
|
+
onOpenChange
|
|
4538
4597
|
},
|
|
4539
|
-
React.
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
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
|
+
)
|
|
4549
4623
|
);
|
|
4550
4624
|
}
|
|
4551
4625
|
function registerTooltip(loader, overrides) {
|
|
@@ -4559,14 +4633,18 @@ function registerTooltip(loader, overrides) {
|
|
|
4559
4633
|
importName: "BaseTooltip",
|
|
4560
4634
|
isAttachment: true,
|
|
4561
4635
|
styleSections: true,
|
|
4636
|
+
variants,
|
|
4562
4637
|
props: {
|
|
4563
4638
|
children: {
|
|
4564
4639
|
type: "slot",
|
|
4565
|
-
displayName: "Trigger",
|
|
4566
4640
|
mergeWithParent: true,
|
|
4641
|
+
displayName: "Trigger",
|
|
4567
4642
|
defaultValue: {
|
|
4568
4643
|
type: "text",
|
|
4569
|
-
value: "Hover me!"
|
|
4644
|
+
value: "Hover me!",
|
|
4645
|
+
styles: {
|
|
4646
|
+
width: "hug"
|
|
4647
|
+
}
|
|
4570
4648
|
}
|
|
4571
4649
|
},
|
|
4572
4650
|
tooltipContent: {
|
|
@@ -4576,7 +4654,11 @@ function registerTooltip(loader, overrides) {
|
|
|
4576
4654
|
// NOTE: This is not applied in attachment
|
|
4577
4655
|
defaultValue: {
|
|
4578
4656
|
type: "text",
|
|
4579
|
-
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
|
+
}
|
|
4580
4662
|
}
|
|
4581
4663
|
},
|
|
4582
4664
|
resetClassName: {
|
|
@@ -4587,12 +4669,16 @@ function registerTooltip(loader, overrides) {
|
|
|
4587
4669
|
},
|
|
4588
4670
|
delay: {
|
|
4589
4671
|
type: "number",
|
|
4590
|
-
|
|
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,
|
|
4591
4675
|
description: "The delay (in milliseconds) for the tooltip to show up."
|
|
4592
4676
|
},
|
|
4593
4677
|
closeDelay: {
|
|
4594
4678
|
type: "number",
|
|
4595
|
-
|
|
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,
|
|
4596
4682
|
description: "The delay (in milliseconds) for the tooltip to close."
|
|
4597
4683
|
},
|
|
4598
4684
|
trigger: {
|
|
@@ -4600,6 +4686,21 @@ function registerTooltip(loader, overrides) {
|
|
|
4600
4686
|
options: ["focus", "focus and hover"],
|
|
4601
4687
|
defaultValueHint: "focus and hover"
|
|
4602
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
|
+
},
|
|
4603
4704
|
onOpenChange: {
|
|
4604
4705
|
type: "eventHandler",
|
|
4605
4706
|
argTypes: [{ name: "isOpen", type: "boolean" }]
|
|
@@ -4607,7 +4708,8 @@ function registerTooltip(loader, overrides) {
|
|
|
4607
4708
|
},
|
|
4608
4709
|
states: {
|
|
4609
4710
|
isOpen: {
|
|
4610
|
-
type: "
|
|
4711
|
+
type: "writable",
|
|
4712
|
+
valueProp: "isOpen",
|
|
4611
4713
|
onChangeProp: "onOpenChange",
|
|
4612
4714
|
variableType: "boolean"
|
|
4613
4715
|
}
|