@plasmicpkgs/react-aria 0.0.79 → 0.0.80
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 +96 -268
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +95 -267
- package/dist/react-aria.js.map +1 -1
- package/dist/registerCheckbox.d.ts +1 -0
- package/package.json +2 -2
- package/skinny/registerCheckbox.cjs.js +3 -1
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +1 -0
- package/skinny/registerCheckbox.esm.js +4 -3
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +4 -10
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +6 -12
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +0 -3
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.esm.js +1 -4
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerTextField.cjs.js +0 -10
- package/skinny/registerTextField.cjs.js.map +1 -1
- package/skinny/registerTextField.esm.js +3 -13
- package/skinny/registerTextField.esm.js.map +1 -1
- package/dist/registerFieldError.d.ts +0 -19
- package/skinny/registerFieldError.d.ts +0 -19
package/dist/react-aria.esm.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { usePlasmicCanvasContext, usePlasmicCanvasComponentInfo } from '@plasmicapp/host';
|
|
2
2
|
import React, { useEffect, useState, useMemo, forwardRef, useImperativeHandle, Component } from 'react';
|
|
3
3
|
import { mergeProps, useFocusable } from 'react-aria';
|
|
4
|
-
import { Button, Checkbox, Text,
|
|
4
|
+
import { Button, Checkbox, Text, Label, CheckboxGroup, Input, ListBoxItem, ListBox, Section, Header, PopoverContext, Popover, ComboBox, ComboBoxStateContext, Heading, ModalOverlay, Modal, Dialog, DialogTrigger, Radio, RadioGroup, Select, SelectStateContext, SelectValue, SliderOutput, SliderThumb, Slider, SliderTrack, Switch, TextArea, TextField, TooltipTrigger, Tooltip } from 'react-aria-components';
|
|
5
5
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
6
6
|
import { mergeProps as mergeProps$1 } from '@react-aria/utils';
|
|
7
7
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
8
8
|
|
|
9
|
-
var __defProp$
|
|
9
|
+
var __defProp$q = Object.defineProperty;
|
|
10
10
|
var __defProps$g = Object.defineProperties;
|
|
11
11
|
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
12
|
-
var __getOwnPropSymbols$
|
|
13
|
-
var __hasOwnProp$
|
|
14
|
-
var __propIsEnum$
|
|
15
|
-
var __defNormalProp$
|
|
16
|
-
var __spreadValues$
|
|
12
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
13
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
15
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16
|
+
var __spreadValues$q = (a, b) => {
|
|
17
17
|
for (var prop in b || (b = {}))
|
|
18
|
-
if (__hasOwnProp$
|
|
19
|
-
__defNormalProp$
|
|
20
|
-
if (__getOwnPropSymbols$
|
|
21
|
-
for (var prop of __getOwnPropSymbols$
|
|
22
|
-
if (__propIsEnum$
|
|
23
|
-
__defNormalProp$
|
|
18
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
19
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
20
|
+
if (__getOwnPropSymbols$q)
|
|
21
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
22
|
+
if (__propIsEnum$q.call(b, prop))
|
|
23
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
24
24
|
}
|
|
25
25
|
return a;
|
|
26
26
|
};
|
|
@@ -46,14 +46,14 @@ function useAutoOpen({
|
|
|
46
46
|
}
|
|
47
47
|
function registerComponentHelper(loader, component, meta, overrides) {
|
|
48
48
|
var _a;
|
|
49
|
-
meta = __spreadProps$g(__spreadValues$
|
|
50
|
-
defaultStyles: __spreadValues$
|
|
49
|
+
meta = __spreadProps$g(__spreadValues$q({}, meta), {
|
|
50
|
+
defaultStyles: __spreadValues$q({
|
|
51
51
|
boxSizing: "border-box"
|
|
52
52
|
}, (_a = meta.defaultStyles) != null ? _a : {})
|
|
53
53
|
});
|
|
54
54
|
if (overrides) {
|
|
55
|
-
meta = __spreadProps$g(__spreadValues$
|
|
56
|
-
props: __spreadValues$
|
|
55
|
+
meta = __spreadProps$g(__spreadValues$q(__spreadValues$q({}, meta), overrides), {
|
|
56
|
+
props: __spreadValues$q(__spreadValues$q({}, meta.props), overrides.props)
|
|
57
57
|
});
|
|
58
58
|
if (overrides.parentComponentName) {
|
|
59
59
|
meta.name = makeChildComponentName(
|
|
@@ -516,33 +516,33 @@ function pickAriaComponentVariants(keys) {
|
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
var __defProp$
|
|
519
|
+
var __defProp$p = Object.defineProperty;
|
|
520
520
|
var __defProps$f = Object.defineProperties;
|
|
521
521
|
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
522
|
-
var __getOwnPropSymbols$
|
|
523
|
-
var __hasOwnProp$
|
|
524
|
-
var __propIsEnum$
|
|
525
|
-
var __defNormalProp$
|
|
526
|
-
var __spreadValues$
|
|
522
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
523
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
524
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
525
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
526
|
+
var __spreadValues$p = (a, b) => {
|
|
527
527
|
for (var prop in b || (b = {}))
|
|
528
|
-
if (__hasOwnProp$
|
|
529
|
-
__defNormalProp$
|
|
530
|
-
if (__getOwnPropSymbols$
|
|
531
|
-
for (var prop of __getOwnPropSymbols$
|
|
532
|
-
if (__propIsEnum$
|
|
533
|
-
__defNormalProp$
|
|
528
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
529
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
530
|
+
if (__getOwnPropSymbols$p)
|
|
531
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
532
|
+
if (__propIsEnum$p.call(b, prop))
|
|
533
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
534
534
|
}
|
|
535
535
|
return a;
|
|
536
536
|
};
|
|
537
537
|
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
538
|
-
var __objRest$
|
|
538
|
+
var __objRest$n = (source, exclude) => {
|
|
539
539
|
var target = {};
|
|
540
540
|
for (var prop in source)
|
|
541
|
-
if (__hasOwnProp$
|
|
541
|
+
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
542
542
|
target[prop] = source[prop];
|
|
543
|
-
if (source != null && __getOwnPropSymbols$
|
|
544
|
-
for (var prop of __getOwnPropSymbols$
|
|
545
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
543
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
544
|
+
for (var prop of __getOwnPropSymbols$p(source)) {
|
|
545
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
|
|
546
546
|
target[prop] = source[prop];
|
|
547
547
|
}
|
|
548
548
|
return target;
|
|
@@ -558,7 +558,7 @@ const { variants: variants$f, withObservedValues: withObservedValues$d } = pickA
|
|
|
558
558
|
const BaseButton = React.forwardRef(
|
|
559
559
|
(props, ref) => {
|
|
560
560
|
var _b;
|
|
561
|
-
const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$
|
|
561
|
+
const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$n(_a, ["submitsForm", "resetsForm", "children", "plasmicUpdateVariant"]);
|
|
562
562
|
const canvasContext = (_b = usePlasmicCanvasContext) == null ? void 0 : _b();
|
|
563
563
|
const isEditMode = canvasContext && canvasContext.interactive === false;
|
|
564
564
|
const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
|
|
@@ -569,7 +569,7 @@ const BaseButton = React.forwardRef(
|
|
|
569
569
|
// When pressing space key, the button's "pressed" state is triggered, and the rich text editor loses focus as a result.
|
|
570
570
|
preventFocusOnPress: isEditMode
|
|
571
571
|
});
|
|
572
|
-
return /* @__PURE__ */ React.createElement(Button, __spreadValues$
|
|
572
|
+
return /* @__PURE__ */ React.createElement(Button, __spreadValues$p({}, mergedProps), ({ isHovered, isPressed, isFocused, isFocusVisible, isDisabled }) => withObservedValues$d(
|
|
573
573
|
children,
|
|
574
574
|
{
|
|
575
575
|
hovered: isHovered,
|
|
@@ -600,7 +600,7 @@ function registerButton(loader, overrides) {
|
|
|
600
600
|
padding: "2px 10px",
|
|
601
601
|
cursor: "pointer"
|
|
602
602
|
},
|
|
603
|
-
props: __spreadProps$f(__spreadValues$
|
|
603
|
+
props: __spreadProps$f(__spreadValues$p({}, getCommonProps("button", [
|
|
604
604
|
"autoFocus",
|
|
605
605
|
"isDisabled",
|
|
606
606
|
"aria-label"
|
|
@@ -655,33 +655,33 @@ const PlasmicListBoxContext = React.createContext(void 0);
|
|
|
655
655
|
React.createContext(void 0);
|
|
656
656
|
const PlasmicInputContext = React.createContext(void 0);
|
|
657
657
|
|
|
658
|
-
var __defProp$
|
|
658
|
+
var __defProp$o = Object.defineProperty;
|
|
659
659
|
var __defProps$e = Object.defineProperties;
|
|
660
660
|
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
661
|
-
var __getOwnPropSymbols$
|
|
662
|
-
var __hasOwnProp$
|
|
663
|
-
var __propIsEnum$
|
|
664
|
-
var __defNormalProp$
|
|
665
|
-
var __spreadValues$
|
|
661
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
662
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
663
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
664
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
665
|
+
var __spreadValues$o = (a, b) => {
|
|
666
666
|
for (var prop in b || (b = {}))
|
|
667
|
-
if (__hasOwnProp$
|
|
668
|
-
__defNormalProp$
|
|
669
|
-
if (__getOwnPropSymbols$
|
|
670
|
-
for (var prop of __getOwnPropSymbols$
|
|
671
|
-
if (__propIsEnum$
|
|
672
|
-
__defNormalProp$
|
|
667
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
668
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
669
|
+
if (__getOwnPropSymbols$o)
|
|
670
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
671
|
+
if (__propIsEnum$o.call(b, prop))
|
|
672
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
673
673
|
}
|
|
674
674
|
return a;
|
|
675
675
|
};
|
|
676
676
|
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
677
|
-
var __objRest$
|
|
677
|
+
var __objRest$m = (source, exclude) => {
|
|
678
678
|
var target = {};
|
|
679
679
|
for (var prop in source)
|
|
680
|
-
if (__hasOwnProp$
|
|
680
|
+
if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
681
681
|
target[prop] = source[prop];
|
|
682
|
-
if (source != null && __getOwnPropSymbols$
|
|
683
|
-
for (var prop of __getOwnPropSymbols$
|
|
684
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
682
|
+
if (source != null && __getOwnPropSymbols$o)
|
|
683
|
+
for (var prop of __getOwnPropSymbols$o(source)) {
|
|
684
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
|
|
685
685
|
target[prop] = source[prop];
|
|
686
686
|
}
|
|
687
687
|
return target;
|
|
@@ -699,12 +699,12 @@ const CHECKBOX_VARIANTS = [
|
|
|
699
699
|
];
|
|
700
700
|
const { variants: variants$e, withObservedValues: withObservedValues$c } = pickAriaComponentVariants(CHECKBOX_VARIANTS);
|
|
701
701
|
function BaseCheckbox(props) {
|
|
702
|
-
const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$
|
|
702
|
+
const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$m(_a, ["children", "plasmicUpdateVariant", "setControlContextData"]);
|
|
703
703
|
const contextProps = React.useContext(PlasmicCheckboxGroupContext);
|
|
704
704
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
705
705
|
parent: contextProps
|
|
706
706
|
});
|
|
707
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$
|
|
707
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$o({}, rest), ({
|
|
708
708
|
isHovered,
|
|
709
709
|
isPressed,
|
|
710
710
|
isFocused,
|
|
@@ -774,17 +774,18 @@ const makeDefaultCheckboxChildren = ({
|
|
|
774
774
|
] : []
|
|
775
775
|
]
|
|
776
776
|
});
|
|
777
|
+
const CHECKBOX_COMPONENT_NAME = makeComponentName("checkbox");
|
|
777
778
|
function registerCheckbox(loader, overrides) {
|
|
778
779
|
return registerComponentHelper(
|
|
779
780
|
loader,
|
|
780
781
|
BaseCheckbox,
|
|
781
782
|
{
|
|
782
|
-
name:
|
|
783
|
+
name: CHECKBOX_COMPONENT_NAME,
|
|
783
784
|
displayName: "Aria Checkbox",
|
|
784
785
|
importPath: "@plasmicpkgs/react-aria/skinny/registerCheckbox",
|
|
785
786
|
importName: "BaseCheckbox",
|
|
786
787
|
variants: variants$e,
|
|
787
|
-
props: __spreadProps$e(__spreadValues$
|
|
788
|
+
props: __spreadProps$e(__spreadValues$o({}, getCommonProps("checkbox", [
|
|
788
789
|
"name",
|
|
789
790
|
"isDisabled",
|
|
790
791
|
"isReadOnly",
|
|
@@ -852,40 +853,40 @@ function registerCheckbox(loader, overrides) {
|
|
|
852
853
|
);
|
|
853
854
|
}
|
|
854
855
|
|
|
855
|
-
var __defProp$
|
|
856
|
+
var __defProp$n = Object.defineProperty;
|
|
856
857
|
var __defProps$d = Object.defineProperties;
|
|
857
858
|
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
858
|
-
var __getOwnPropSymbols$
|
|
859
|
-
var __hasOwnProp$
|
|
860
|
-
var __propIsEnum$
|
|
861
|
-
var __defNormalProp$
|
|
862
|
-
var __spreadValues$
|
|
859
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
860
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
861
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
862
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
863
|
+
var __spreadValues$n = (a, b) => {
|
|
863
864
|
for (var prop in b || (b = {}))
|
|
864
|
-
if (__hasOwnProp$
|
|
865
|
-
__defNormalProp$
|
|
866
|
-
if (__getOwnPropSymbols$
|
|
867
|
-
for (var prop of __getOwnPropSymbols$
|
|
868
|
-
if (__propIsEnum$
|
|
869
|
-
__defNormalProp$
|
|
865
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
866
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
867
|
+
if (__getOwnPropSymbols$n)
|
|
868
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
869
|
+
if (__propIsEnum$n.call(b, prop))
|
|
870
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
870
871
|
}
|
|
871
872
|
return a;
|
|
872
873
|
};
|
|
873
874
|
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
874
|
-
var __objRest$
|
|
875
|
+
var __objRest$l = (source, exclude) => {
|
|
875
876
|
var target = {};
|
|
876
877
|
for (var prop in source)
|
|
877
|
-
if (__hasOwnProp$
|
|
878
|
+
if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
878
879
|
target[prop] = source[prop];
|
|
879
|
-
if (source != null && __getOwnPropSymbols$
|
|
880
|
-
for (var prop of __getOwnPropSymbols$
|
|
881
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
880
|
+
if (source != null && __getOwnPropSymbols$n)
|
|
881
|
+
for (var prop of __getOwnPropSymbols$n(source)) {
|
|
882
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
|
|
882
883
|
target[prop] = source[prop];
|
|
883
884
|
}
|
|
884
885
|
return target;
|
|
885
886
|
};
|
|
886
887
|
function BaseText(_a) {
|
|
887
|
-
var _b = _a, { children, slot, className } = _b, rest = __objRest$
|
|
888
|
-
return /* @__PURE__ */ React.createElement(Text, __spreadProps$d(__spreadValues$
|
|
888
|
+
var _b = _a, { children, slot, className } = _b, rest = __objRest$l(_b, ["children", "slot", "className"]);
|
|
889
|
+
return /* @__PURE__ */ React.createElement(Text, __spreadProps$d(__spreadValues$n({}, extractPlasmicDataProps(rest)), { slot, className }), children);
|
|
889
890
|
}
|
|
890
891
|
const TEXT_COMPONENT_NAME = makeComponentName("text");
|
|
891
892
|
function registerText(loader, overrides) {
|
|
@@ -919,28 +920,28 @@ function registerText(loader, overrides) {
|
|
|
919
920
|
);
|
|
920
921
|
}
|
|
921
922
|
|
|
922
|
-
var __defProp$
|
|
923
|
+
var __defProp$m = Object.defineProperty;
|
|
923
924
|
var __defProps$c = Object.defineProperties;
|
|
924
925
|
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
925
|
-
var __getOwnPropSymbols$
|
|
926
|
-
var __hasOwnProp$
|
|
927
|
-
var __propIsEnum$
|
|
928
|
-
var __defNormalProp$
|
|
929
|
-
var __spreadValues$
|
|
926
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
927
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
928
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
929
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
930
|
+
var __spreadValues$m = (a, b) => {
|
|
930
931
|
for (var prop in b || (b = {}))
|
|
931
|
-
if (__hasOwnProp$
|
|
932
|
-
__defNormalProp$
|
|
933
|
-
if (__getOwnPropSymbols$
|
|
934
|
-
for (var prop of __getOwnPropSymbols$
|
|
935
|
-
if (__propIsEnum$
|
|
936
|
-
__defNormalProp$
|
|
932
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
933
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
934
|
+
if (__getOwnPropSymbols$m)
|
|
935
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
936
|
+
if (__propIsEnum$m.call(b, prop))
|
|
937
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
937
938
|
}
|
|
938
939
|
return a;
|
|
939
940
|
};
|
|
940
941
|
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
941
942
|
const DESCRIPTION_COMPONENT_NAME = makeComponentName("description");
|
|
942
943
|
function registerDescription(loader, overrides) {
|
|
943
|
-
return registerText(loader, __spreadProps$c(__spreadValues$
|
|
944
|
+
return registerText(loader, __spreadProps$c(__spreadValues$m({}, overrides), {
|
|
944
945
|
name: DESCRIPTION_COMPONENT_NAME,
|
|
945
946
|
displayName: "Aria Description",
|
|
946
947
|
props: {
|
|
@@ -953,165 +954,6 @@ function registerDescription(loader, overrides) {
|
|
|
953
954
|
}));
|
|
954
955
|
}
|
|
955
956
|
|
|
956
|
-
var __defProp$m = Object.defineProperty;
|
|
957
|
-
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
958
|
-
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
959
|
-
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
960
|
-
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
961
|
-
var __spreadValues$m = (a, b) => {
|
|
962
|
-
for (var prop in b || (b = {}))
|
|
963
|
-
if (__hasOwnProp$m.call(b, prop))
|
|
964
|
-
__defNormalProp$m(a, prop, b[prop]);
|
|
965
|
-
if (__getOwnPropSymbols$m)
|
|
966
|
-
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
967
|
-
if (__propIsEnum$m.call(b, prop))
|
|
968
|
-
__defNormalProp$m(a, prop, b[prop]);
|
|
969
|
-
}
|
|
970
|
-
return a;
|
|
971
|
-
};
|
|
972
|
-
var __objRest$l = (source, exclude) => {
|
|
973
|
-
var target = {};
|
|
974
|
-
for (var prop in source)
|
|
975
|
-
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
976
|
-
target[prop] = source[prop];
|
|
977
|
-
if (source != null && __getOwnPropSymbols$m)
|
|
978
|
-
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
979
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
980
|
-
target[prop] = source[prop];
|
|
981
|
-
}
|
|
982
|
-
return target;
|
|
983
|
-
};
|
|
984
|
-
function BaseFieldError(_a) {
|
|
985
|
-
var _b = _a, {
|
|
986
|
-
badInput,
|
|
987
|
-
customError,
|
|
988
|
-
patternMismatch,
|
|
989
|
-
rangeOverflow,
|
|
990
|
-
rangeUnderflow,
|
|
991
|
-
stepMismatch,
|
|
992
|
-
tooLong,
|
|
993
|
-
tooShort,
|
|
994
|
-
typeMismatch,
|
|
995
|
-
valueMissing
|
|
996
|
-
} = _b, rest = __objRest$l(_b, [
|
|
997
|
-
"badInput",
|
|
998
|
-
"customError",
|
|
999
|
-
"patternMismatch",
|
|
1000
|
-
"rangeOverflow",
|
|
1001
|
-
"rangeUnderflow",
|
|
1002
|
-
"stepMismatch",
|
|
1003
|
-
"tooLong",
|
|
1004
|
-
"tooShort",
|
|
1005
|
-
"typeMismatch",
|
|
1006
|
-
"valueMissing"
|
|
1007
|
-
]);
|
|
1008
|
-
return /* @__PURE__ */ React.createElement(FieldError, __spreadValues$m({}, rest), ({ validationDetails, validationErrors }) => {
|
|
1009
|
-
if (validationDetails.badInput && badInput) {
|
|
1010
|
-
return badInput;
|
|
1011
|
-
}
|
|
1012
|
-
if (validationDetails.customError && customError) {
|
|
1013
|
-
return customError;
|
|
1014
|
-
}
|
|
1015
|
-
if (validationDetails.patternMismatch && patternMismatch) {
|
|
1016
|
-
return patternMismatch;
|
|
1017
|
-
}
|
|
1018
|
-
if (validationDetails.rangeOverflow && rangeOverflow) {
|
|
1019
|
-
return rangeOverflow;
|
|
1020
|
-
}
|
|
1021
|
-
if (validationDetails.rangeUnderflow && rangeUnderflow) {
|
|
1022
|
-
return rangeUnderflow;
|
|
1023
|
-
}
|
|
1024
|
-
if (validationDetails.stepMismatch && stepMismatch) {
|
|
1025
|
-
return stepMismatch;
|
|
1026
|
-
}
|
|
1027
|
-
if (validationDetails.tooLong && tooLong) {
|
|
1028
|
-
return tooLong;
|
|
1029
|
-
}
|
|
1030
|
-
if (validationDetails.tooShort && tooShort) {
|
|
1031
|
-
return tooShort;
|
|
1032
|
-
}
|
|
1033
|
-
if (validationDetails.typeMismatch && typeMismatch) {
|
|
1034
|
-
return typeMismatch;
|
|
1035
|
-
}
|
|
1036
|
-
if (validationDetails.valueMissing && valueMissing) {
|
|
1037
|
-
return valueMissing;
|
|
1038
|
-
}
|
|
1039
|
-
return validationErrors;
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
function PropsDescription() {
|
|
1043
|
-
return /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 20 } }, /* @__PURE__ */ React.createElement("p", null, "You can customize the error messages for built-in validations by utilizing the props below."), /* @__PURE__ */ React.createElement("p", null, "For further information on the specific conditions triggering each error, please refer to the", " ", /* @__PURE__ */ React.createElement(
|
|
1044
|
-
"a",
|
|
1045
|
-
{
|
|
1046
|
-
target: "_blank",
|
|
1047
|
-
href: "https://developer.mozilla.org/en-US/docs/Web/API/ValidityState#instance_properties"
|
|
1048
|
-
},
|
|
1049
|
-
"MDN Docs"
|
|
1050
|
-
), "."));
|
|
1051
|
-
}
|
|
1052
|
-
function registerFieldError(loader, overrides) {
|
|
1053
|
-
registerComponentHelper(
|
|
1054
|
-
loader,
|
|
1055
|
-
BaseFieldError,
|
|
1056
|
-
{
|
|
1057
|
-
name: makeComponentName("fielderror"),
|
|
1058
|
-
displayName: "Aria Field Error",
|
|
1059
|
-
importPath: "@plasmicpkgs/react-aria/skinny/registerFieldError",
|
|
1060
|
-
importName: "BaseFieldError",
|
|
1061
|
-
actions: [
|
|
1062
|
-
{
|
|
1063
|
-
type: "custom-action",
|
|
1064
|
-
control: PropsDescription
|
|
1065
|
-
}
|
|
1066
|
-
],
|
|
1067
|
-
props: {
|
|
1068
|
-
badInput: {
|
|
1069
|
-
type: "string",
|
|
1070
|
-
description: "Error message if the user has provided input that the browser is unable to convert"
|
|
1071
|
-
},
|
|
1072
|
-
customError: {
|
|
1073
|
-
type: "string",
|
|
1074
|
-
description: "Error message for custom validations"
|
|
1075
|
-
},
|
|
1076
|
-
patternMismatch: {
|
|
1077
|
-
type: "string",
|
|
1078
|
-
description: "Error message if the value does not match the specified pattern"
|
|
1079
|
-
},
|
|
1080
|
-
rangeOverflow: {
|
|
1081
|
-
type: "string",
|
|
1082
|
-
description: "Error message if the value is greater than the maximum specified"
|
|
1083
|
-
},
|
|
1084
|
-
rangeUnderflow: {
|
|
1085
|
-
type: "string",
|
|
1086
|
-
description: "Error message if the value is less than the minimum specified"
|
|
1087
|
-
},
|
|
1088
|
-
stepMismatch: {
|
|
1089
|
-
type: "string",
|
|
1090
|
-
description: "Error message if the value is not evenly divisible by the step value"
|
|
1091
|
-
},
|
|
1092
|
-
tooLong: {
|
|
1093
|
-
type: "string",
|
|
1094
|
-
description: "Error message if the value exceeds the specified maximum number of characters"
|
|
1095
|
-
},
|
|
1096
|
-
tooShort: {
|
|
1097
|
-
type: "string",
|
|
1098
|
-
description: "Error message if the value fails to meet the specified minimum number of characters"
|
|
1099
|
-
},
|
|
1100
|
-
typeMismatch: {
|
|
1101
|
-
type: "string",
|
|
1102
|
-
description: "Error message if the value is not in the required syntax (when type is email or url)"
|
|
1103
|
-
},
|
|
1104
|
-
valueMissing: {
|
|
1105
|
-
type: "string",
|
|
1106
|
-
description: "Error message if a required field has no value"
|
|
1107
|
-
}
|
|
1108
|
-
},
|
|
1109
|
-
trapsFocus: true
|
|
1110
|
-
},
|
|
1111
|
-
overrides
|
|
1112
|
-
);
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
957
|
var __defProp$l = Object.defineProperty;
|
|
1116
958
|
var __defProps$b = Object.defineProperties;
|
|
1117
959
|
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
@@ -1224,15 +1066,10 @@ function BaseCheckboxGroup(props) {
|
|
|
1224
1066
|
}
|
|
1225
1067
|
const componentName = makeComponentName("checkboxGroup");
|
|
1226
1068
|
function registerCheckboxGroup(loader, overrides) {
|
|
1227
|
-
|
|
1069
|
+
makeChildComponentName(
|
|
1228
1070
|
overrides == null ? void 0 : overrides.parentComponentName,
|
|
1229
1071
|
componentName
|
|
1230
1072
|
);
|
|
1231
|
-
registerFieldError(loader, { parentComponentName: thisName });
|
|
1232
|
-
const checkboxMeta = registerCheckbox(loader, {
|
|
1233
|
-
parentComponentName: thisName
|
|
1234
|
-
});
|
|
1235
|
-
registerLabel(loader, { parentComponentName: thisName });
|
|
1236
1073
|
registerComponentHelper(
|
|
1237
1074
|
loader,
|
|
1238
1075
|
BaseCheckboxGroup,
|
|
@@ -1273,7 +1110,7 @@ function registerCheckboxGroup(loader, overrides) {
|
|
|
1273
1110
|
},
|
|
1274
1111
|
{
|
|
1275
1112
|
type: "component",
|
|
1276
|
-
name:
|
|
1113
|
+
name: CHECKBOX_COMPONENT_NAME,
|
|
1277
1114
|
props: {
|
|
1278
1115
|
children: makeDefaultCheckboxChildren({
|
|
1279
1116
|
label: "Checkbox 1",
|
|
@@ -1284,7 +1121,7 @@ function registerCheckboxGroup(loader, overrides) {
|
|
|
1284
1121
|
},
|
|
1285
1122
|
{
|
|
1286
1123
|
type: "component",
|
|
1287
|
-
name:
|
|
1124
|
+
name: CHECKBOX_COMPONENT_NAME,
|
|
1288
1125
|
props: {
|
|
1289
1126
|
children: makeDefaultCheckboxChildren({
|
|
1290
1127
|
label: "Checkbox 2",
|
|
@@ -1295,7 +1132,7 @@ function registerCheckboxGroup(loader, overrides) {
|
|
|
1295
1132
|
},
|
|
1296
1133
|
{
|
|
1297
1134
|
type: "component",
|
|
1298
|
-
name:
|
|
1135
|
+
name: CHECKBOX_COMPONENT_NAME,
|
|
1299
1136
|
props: {
|
|
1300
1137
|
children: makeDefaultCheckboxChildren({
|
|
1301
1138
|
label: "Checkbox 3",
|
|
@@ -3076,9 +2913,7 @@ function registerRadioGroup(loader, overrides) {
|
|
|
3076
2913
|
overrides == null ? void 0 : overrides.parentComponentName,
|
|
3077
2914
|
RADIO_GROUP_COMPONENT_NAME
|
|
3078
2915
|
);
|
|
3079
|
-
registerFieldError(loader, { parentComponentName: thisName });
|
|
3080
2916
|
const radioMeta = registerRadio(loader, { parentComponentName: thisName });
|
|
3081
|
-
registerLabel(loader, { parentComponentName: thisName });
|
|
3082
2917
|
registerComponentHelper(
|
|
3083
2918
|
loader,
|
|
3084
2919
|
BaseRadioGroup,
|
|
@@ -4597,14 +4432,6 @@ function registerTextField(loader, overrides) {
|
|
|
4597
4432
|
},
|
|
4598
4433
|
overrides
|
|
4599
4434
|
);
|
|
4600
|
-
const thisName = makeChildComponentName(
|
|
4601
|
-
overrides == null ? void 0 : overrides.parentComponentName,
|
|
4602
|
-
TEXT_FIELD_COMPONENT_NAME
|
|
4603
|
-
);
|
|
4604
|
-
registerFieldError(loader, { parentComponentName: thisName });
|
|
4605
|
-
registerInput(loader, { parentComponentName: thisName });
|
|
4606
|
-
registerLabel(loader, { parentComponentName: thisName });
|
|
4607
|
-
registerTextArea(loader, { parentComponentName: thisName });
|
|
4608
4435
|
}
|
|
4609
4436
|
|
|
4610
4437
|
var __defProp = Object.defineProperty;
|
|
@@ -4821,6 +4648,7 @@ function registerAll(loader) {
|
|
|
4821
4648
|
registerLabel(loader);
|
|
4822
4649
|
registerListBox(loader);
|
|
4823
4650
|
registerPopover(loader);
|
|
4651
|
+
registerTextArea(loader);
|
|
4824
4652
|
registerInput(loader);
|
|
4825
4653
|
registerSwitch(loader);
|
|
4826
4654
|
registerCheckbox(loader);
|