@wix/editor-react-components 1.2290.0 → 1.2292.0
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/site/components/AccordionComponent/manifest.js +1 -1
- package/dist/site/components/AudioPlayer/manifest.js +1 -1
- package/dist/site/components/Breadcrumbs/manifest.js +1 -1
- package/dist/site/components/Button/manifest.js +1 -1
- package/dist/site/components/CollapsibleText/manifest.js +1 -1
- package/dist/site/components/Dropdown/manifest.js +1 -1
- package/dist/site/components/GoogleMap/manifest.js +1 -1
- package/dist/site/components/HTMLComponent/manifest.js +1 -1
- package/dist/site/components/LinkBar/manifest.js +1 -1
- package/dist/site/components/Lottie/manifest.js +1 -1
- package/dist/site/components/Menu/manifest.js +1 -1
- package/dist/site/components/MultiStateBox/manifest.js +1 -1
- package/dist/site/components/ShareButtons/manifest.js +1 -1
- package/dist/site/components/SiteLogo/panels/customizeLogo/LogoColorPanel.d.ts +1 -1
- package/dist/site/components/SiteLogo/panels/customizeLogo/utils.d.ts +5 -2
- package/dist/site/components/Slideshow/manifest.js +1 -1
- package/dist/site/components/Tabs/manifest.js +1 -1
- package/dist/site/components/TestComp/manifest.js +1 -1
- package/dist/site/components/TextBox/manifest.js +1 -1
- package/dist/site/components/TextInput/TextInput.types.d.ts +3 -0
- package/dist/site/components/TextInput/component.js +19 -9
- package/dist/site/components/TextInput/component.preview.d.ts +4 -0
- package/dist/site/components/TextInput/constants.d.ts +27 -0
- package/dist/site/components/TextInput/css.css +36 -13
- package/dist/site/components/TextInput/manifest.js +103 -4
- package/dist/site/components/chunks/constants18.js +2 -2
- package/dist/site/components/chunks/constants3.js +16 -0
- package/dist/site/components/chunks/manifestSdkMixins.js +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, L as LAYOUT, c as ContainerType, a as ACTIONS, E as ELEMENTS, N as NativeStateType, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { a as DesignStates, b as DISPLAY_NAMES, c as accordionManifestDefaults, C as CONTAINER_INITIAL_HEIGHT } from "../chunks/constants37.js";
|
|
3
|
-
import { m as manifestFocusable,
|
|
3
|
+
import { m as manifestFocusable, c as manifestMouseHover, d as manifestClickable } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
5
5
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
6
6
|
const options = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as DISPLAY_GROUPS, N as NativeStateType, C as CSS_PROPERTIES, E as ELEMENTS, D as DATA, I as INTERACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import {
|
|
2
|
+
import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
3
3
|
import { D as DesignStates, a as DisplayNames, s as selectors, b as borderDefaultValue } from "../chunks/constants36.js";
|
|
4
4
|
import manifest$1 from "../Image3/manifest.js";
|
|
5
5
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
@@ -2,7 +2,7 @@ import { L as LAYOUT, a as ACTIONS, b as DISPLAY_GROUPS, C as CSS_PROPERTIES, E
|
|
|
2
2
|
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
3
3
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
4
4
|
import { D as DesignStates, a as DisplayNames, h as homepageModeValues, d as defaultStateValues, b as separatorValues, c as componentMetadata, s as semanticClassNames } from "../chunks/constants35.js";
|
|
5
|
-
import {
|
|
5
|
+
import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
6
6
|
const manifest = {
|
|
7
7
|
id: componentMetadata.id,
|
|
8
8
|
type: componentMetadata.type,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ACTIONS, E as ELEMENTS, N as NativeStateType, C as CSS_PROPERTIES, I as INTERACTIONS, D as DATA, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { D as DesignStates, b as DisplayNames } from "../chunks/constants20.js";
|
|
3
|
-
import { m as manifestFocusable,
|
|
3
|
+
import { m as manifestFocusable, c as manifestMouseHover, d as manifestClickable } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
5
5
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
6
6
|
const displayConfig = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as CSS_PROPERTIES, E as ELEMENTS, D as DATA, b as DISPLAY_GROUPS, L as LAYOUT, I as INTERACTIONS, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { D as DisplayNames, d as defaultValues, m as manifestClasses } from "../chunks/constants34.js";
|
|
3
3
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
4
|
-
import {
|
|
4
|
+
import { c as manifestMouseHover, d as manifestClickable } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
const manifest = {
|
|
6
6
|
id: "1392cc2d-20e7-411a-8b60-6e0af55b8ece",
|
|
7
7
|
type: "wixEditorElements.CollapsibleText",
|
|
@@ -2,7 +2,7 @@ import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, N as NativeStateTy
|
|
|
2
2
|
import { D as DesignStates, f as DisplayNames, d as defaultValues, e as selectors } from "../chunks/constants32.js";
|
|
3
3
|
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
|
-
import { m as manifestFocusable,
|
|
5
|
+
import { m as manifestFocusable, b as manifestInputable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
6
6
|
const manifest = {
|
|
7
7
|
id: "f49b3649-fff3-42b4-8e18-a3cd2b23c2eb",
|
|
8
8
|
type: "wixEditorElements.Dropdown__DEV__v3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as DISPLAY_GROUPS, D as DATA, M as MEDIA, a as ACTIONS, I as INTERACTIONS, A as Archetype, L as LAYOUT } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { h as DisplayNames, i as MAP_STYLE_KEYS, j as defaultValues, a as MAX_ZOOM, M as MIN_ZOOM } from "../chunks/consts.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
const manifest = {
|
|
5
5
|
id: "bf8a38af-5784-47d5-92d3-3627a6a60bc6",
|
|
6
6
|
type: "wixEditorElements.GoogleMap",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _a, _b;
|
|
2
2
|
import { D as DATA, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
const DisplayNames = {
|
|
5
5
|
root: {
|
|
6
6
|
elementDisplayName: "HTML Element",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ACTIONS, D as DATA, M as MEDIA, N as NativeStateType, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, L as LAYOUT, I as INTERACTIONS, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { D as DesignStates, p as presets, c as DisplayNames } from "../chunks/constants29.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
5
5
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
6
6
|
const manifest = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as DISPLAY_GROUPS, E as ELEMENTS, D as DATA, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
3
3
|
import { e as speedConstraints, f as playButtonDefaults, D as DisplayNames, r as rootDataDefaults, c as showButtonOnHoverDefaults, g as borderDefaultValue, i as initialSize, s as semanticSelectors } from "../chunks/constants27.js";
|
|
4
|
-
import { m as manifestFocusable,
|
|
4
|
+
import { m as manifestFocusable, c as manifestMouseHover, d as manifestClickable } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
const manifest = {
|
|
6
6
|
id: "13165477-8205-4050-b078-424a1479159e",
|
|
7
7
|
type: "wixEditorElements.Lottie",
|
|
@@ -2,7 +2,7 @@ import { E as ELEMENTS, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, N as NativeSta
|
|
|
2
2
|
import { e as DesignStates, f as DisplayNames, s as selectors, g as DropdownAnchorPositions, h as DropdownAppliedStyleProperties, i as elementKeys, j as states, p as presets } from "../chunks/constants26.js";
|
|
3
3
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
4
4
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
|
-
import {
|
|
5
|
+
import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
6
6
|
const dropdownItemConfig = {
|
|
7
7
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
8
8
|
[ELEMENTS.ELEMENT_TYPE.inlineElement]: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as DISPLAY_GROUPS, a as ACTIONS, D as DATA, L as LAYOUT, c as ContainerType, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { D as DESCRIPTIONS, a as DISPLAY_NAMES, s as selectors } from "../chunks/constants25.js";
|
|
3
|
-
import { m as manifestFocusable,
|
|
3
|
+
import { m as manifestFocusable, c as manifestMouseHover, d as manifestClickable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
5
5
|
const manifest = {
|
|
6
6
|
id: "32d6f6fe-72ef-4490-82aa-d3b13cce6ef1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as CSS_PROPERTIES, E as ELEMENTS, a as ACTIONS, D as DATA, N as NativeStateType, I as INTERACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { h as DesignStates, i as DisplayNames, j as DisplayConfig, D as DefaultValues, I as IconPositionOptions, k as PageToShareOptions, m as DefaultButtons, B as ButtonWidthOptions } from "../chunks/constants22.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
5
5
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
6
6
|
const presets = {
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { SvgInfo } from '../../../SvgImage/SvgImage.types';
|
|
3
3
|
import { Translations } from './translations';
|
|
4
4
|
type LogoColorPanelProps = {
|
|
5
|
-
resolvedVectorArtData
|
|
5
|
+
resolvedVectorArtData?: SvgInfo | null;
|
|
6
6
|
translations: Translations;
|
|
7
7
|
};
|
|
8
8
|
export declare const LogoColorPanel: React.FC<LogoColorPanelProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementDataInput, ElementImage, ElementVectorArt } from '@wix/editor';
|
|
2
|
+
import { SvgInfo } from '../../../SvgImage/SvgImage.types';
|
|
2
3
|
import { BUILDER_IMAGE_TYPE } from '../../../Logo/constants';
|
|
3
4
|
export type SelectedLogoMedia = {
|
|
4
5
|
uri?: string;
|
|
@@ -21,9 +22,11 @@ type SiteLogoData = {
|
|
|
21
22
|
svgId: SiteLogoVectorArtData;
|
|
22
23
|
image: SiteLogoImageData;
|
|
23
24
|
};
|
|
24
|
-
export type SiteLogoDataUpdate = ElementDataInput<
|
|
25
|
+
export type SiteLogoDataUpdate = ElementDataInput<SiteLogoData>;
|
|
25
26
|
export declare const SITE_LOGO_COLOR_STYLE_KEYS: string[];
|
|
26
|
-
export declare const
|
|
27
|
+
export declare const getDefaultColorStyles: (resolvedData: SvgInfo) => Record<"svg-color-1" | "svg-color-2" | "svg-color-3" | "svg-color-4" | "svg-color-5" | "svg-color-6" | "svg-color-7" | "svg-color-8", string> | {
|
|
28
|
+
[x: string]: string;
|
|
29
|
+
};
|
|
27
30
|
export declare const getSelectedLogoUri: (selectedMedia: Array<SelectedLogoMedia> | undefined) => string | undefined;
|
|
28
31
|
export declare const getSiteLogoDataUpdateFromSelectedMedia: (selectedMedia: Array<SelectedLogoMedia> | undefined) => SiteLogoDataUpdate | undefined;
|
|
29
32
|
export declare const getSiteLogoDataUpdateFromLogoMakerUrl: (logoUrl: string | undefined) => SiteLogoDataUpdate | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as ELEMENTS, C as CSS_PROPERTIES, D as DATA, a as ACTIONS, I as INTERACTIONS, b as DISPLAY_GROUPS, L as LAYOUT, c as ContainerType, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
3
3
|
import { D as DisplayNames, a as semanticClassNames, b as slideshowCssCustomPropertiesDefaults, c as slideshowCssPropertiesDefaults, s as slideshowDataDefaults } from "../chunks/Slideshow.semanticClassNames.js";
|
|
4
|
-
import {
|
|
4
|
+
import { c as manifestMouseHover, d as manifestClickable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
const navigationButtons = {
|
|
6
6
|
elementType: ELEMENTS.ELEMENT_TYPE.refElement,
|
|
7
7
|
refElement: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ACTIONS, I as INTERACTIONS, b as DISPLAY_GROUPS, C as CSS_PROPERTIES, E as ELEMENTS, N as NativeStateType, D as DATA, L as LAYOUT, c as ContainerType, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
2
|
import { D as DesignStates, c as classes } from "../chunks/constants19.js";
|
|
3
|
-
import { m as manifestFocusable,
|
|
3
|
+
import { m as manifestFocusable, c as manifestMouseHover, d as manifestClickable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
5
5
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
6
6
|
const manifest = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as LAYOUT, N as NativeStateType, D as DATA, E as ELEMENTS, b as DISPLAY_GROUPS, C as CSS_PROPERTIES, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { m as manifestFocusable,
|
|
2
|
+
import { m as manifestFocusable, c as manifestMouseHover, d as manifestClickable } from "../chunks/manifestSdkMixins.js";
|
|
3
3
|
const DesignStates = {
|
|
4
4
|
testCompCard: {
|
|
5
5
|
hover: { displayName: "Hover", className: "test-comp-card--hover" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as ELEMENTS, b as DISPLAY_GROUPS, C as CSS_PROPERTIES, N as NativeStateType, D as DATA, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { D as
|
|
2
|
+
import { D as DesignStates, b as DisplayNames, d as defaultValues, s as selectors } from "../chunks/constants18.js";
|
|
3
3
|
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
5
|
import { m as manifestFocusable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
@@ -76,6 +76,7 @@ export type ITextInputMapperProps = {
|
|
|
76
76
|
inputType: TextInputType;
|
|
77
77
|
label?: string;
|
|
78
78
|
placeholder?: string;
|
|
79
|
+
tooltip?: string;
|
|
79
80
|
readOnly: boolean;
|
|
80
81
|
required: boolean;
|
|
81
82
|
isDisabled: boolean;
|
|
@@ -85,6 +86,8 @@ export type ITextInputMapperProps = {
|
|
|
85
86
|
prefix?: string;
|
|
86
87
|
name?: string;
|
|
87
88
|
autoComplete_?: TextInputAutocomplete | null;
|
|
89
|
+
autocompleteToken?: string;
|
|
90
|
+
minLength?: number | null;
|
|
88
91
|
maxLength?: number | null;
|
|
89
92
|
min?: number | null;
|
|
90
93
|
max?: number | null;
|
|
@@ -585,7 +585,9 @@ const TextInput = (props, ref) => {
|
|
|
585
585
|
pattern,
|
|
586
586
|
autoComplete,
|
|
587
587
|
autoComplete_,
|
|
588
|
+
autocompleteToken,
|
|
588
589
|
maxLength,
|
|
590
|
+
minLength,
|
|
589
591
|
min,
|
|
590
592
|
max,
|
|
591
593
|
step,
|
|
@@ -624,6 +626,13 @@ const TextInput = (props, ref) => {
|
|
|
624
626
|
const [shouldShowValidityIndication, setValidityIndication] = React.useState(
|
|
625
627
|
sdkValidityIndication
|
|
626
628
|
);
|
|
629
|
+
const boundValue = props.value;
|
|
630
|
+
React.useEffect(() => {
|
|
631
|
+
if (boundValue !== void 0 && boundValue !== value) {
|
|
632
|
+
setValue(boundValue);
|
|
633
|
+
setSdkValue(boundValue);
|
|
634
|
+
}
|
|
635
|
+
}, [boundValue]);
|
|
627
636
|
const isTextInputAutoFillFixExperimentEnabled = isExperimentOpen(
|
|
628
637
|
"specs.thunderbolt.TextInputAutoFillFix"
|
|
629
638
|
);
|
|
@@ -672,9 +681,10 @@ const TextInput = (props, ref) => {
|
|
|
672
681
|
};
|
|
673
682
|
});
|
|
674
683
|
const valueChanged = React.useRef();
|
|
684
|
+
const activePhoneFormat = inputType === "tel" ? phoneFormat : "";
|
|
675
685
|
const formattedValue = React.useMemo(() => {
|
|
676
|
-
return
|
|
677
|
-
}, [value,
|
|
686
|
+
return activePhoneFormat ? formatPhoneNumber(value, activePhoneFormat) : value;
|
|
687
|
+
}, [value, activePhoneFormat]);
|
|
678
688
|
const handleAutoFillChange = (event) => {
|
|
679
689
|
if (isTextInputAutoFillFixExperimentEnabled && !hasFocus()) {
|
|
680
690
|
onChange({
|
|
@@ -688,11 +698,11 @@ const TextInput = (props, ref) => {
|
|
|
688
698
|
shouldCallOnInput
|
|
689
699
|
}) => (newValue) => {
|
|
690
700
|
let unformattedNumber = newValue;
|
|
691
|
-
if (
|
|
701
|
+
if (activePhoneFormat) {
|
|
692
702
|
const didDeleteChars = newValue.length < formattedValue.length;
|
|
693
703
|
unformattedNumber = getUnformattedNumber(
|
|
694
704
|
newValue,
|
|
695
|
-
|
|
705
|
+
activePhoneFormat,
|
|
696
706
|
didDeleteChars
|
|
697
707
|
);
|
|
698
708
|
if (hasNonNumericChar(unformattedNumber)) {
|
|
@@ -717,7 +727,7 @@ const TextInput = (props, ref) => {
|
|
|
717
727
|
}
|
|
718
728
|
if (shouldCallOnInput) {
|
|
719
729
|
const syntheticEvent = {
|
|
720
|
-
target: { value },
|
|
730
|
+
target: { value: unformattedNumber },
|
|
721
731
|
type: "input"
|
|
722
732
|
};
|
|
723
733
|
onInput(syntheticEvent);
|
|
@@ -771,12 +781,12 @@ const TextInput = (props, ref) => {
|
|
|
771
781
|
});
|
|
772
782
|
const getMaxLength = () => {
|
|
773
783
|
let updatedMaxLength = maxLength === null ? void 0 : maxLength;
|
|
774
|
-
if (
|
|
775
|
-
updatedMaxLength =
|
|
784
|
+
if (activePhoneFormat) {
|
|
785
|
+
updatedMaxLength = activePhoneFormat.length;
|
|
776
786
|
}
|
|
777
787
|
return updatedMaxLength;
|
|
778
788
|
};
|
|
779
|
-
const getMinLength = () =>
|
|
789
|
+
const getMinLength = () => activePhoneFormat ? activePhoneFormat.length : minLength ?? void 0;
|
|
780
790
|
const {
|
|
781
791
|
ariaAttributes: { "aria-label": ariaLabel, ...restAriaAttributes }
|
|
782
792
|
} = getAccessibilityAttributes({ ariaAttributes });
|
|
@@ -807,7 +817,7 @@ const TextInput = (props, ref) => {
|
|
|
807
817
|
pattern,
|
|
808
818
|
maxLength: getMaxLength(),
|
|
809
819
|
minLength: getMinLength(),
|
|
810
|
-
autoComplete: autoComplete ? "on" : autoComplete_ || "off",
|
|
820
|
+
autoComplete: autoComplete ? autocompleteToken || "on" : autoComplete_ || "off",
|
|
811
821
|
step: step === null ? void 0 : step,
|
|
812
822
|
min: min === null ? void 0 : min,
|
|
813
823
|
max: max === null ? void 0 : max,
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
export declare const selectors: {
|
|
2
2
|
readonly root: "textInput";
|
|
3
3
|
};
|
|
4
|
+
export declare const DesignStates: {
|
|
5
|
+
readonly root: {
|
|
6
|
+
readonly hover: {
|
|
7
|
+
readonly displayName: "Hover";
|
|
8
|
+
readonly className: "textInput--hover";
|
|
9
|
+
};
|
|
10
|
+
readonly focus: {
|
|
11
|
+
readonly displayName: "Focus";
|
|
12
|
+
readonly className: "textInput--focus";
|
|
13
|
+
};
|
|
14
|
+
readonly error: {
|
|
15
|
+
readonly displayName: "Error";
|
|
16
|
+
readonly className: "textInput--error";
|
|
17
|
+
};
|
|
18
|
+
readonly disabled: {
|
|
19
|
+
readonly displayName: "Disabled";
|
|
20
|
+
readonly className: "textInput--disabled";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
4
24
|
export declare const DisplayNames: {
|
|
5
25
|
root: {
|
|
6
26
|
elementDisplayName: string;
|
|
@@ -20,6 +40,12 @@ export declare const DisplayNames: {
|
|
|
20
40
|
inputAlign: string;
|
|
21
41
|
};
|
|
22
42
|
data: {
|
|
43
|
+
value: string;
|
|
44
|
+
isDisabled: string;
|
|
45
|
+
name: string;
|
|
46
|
+
minLength: string;
|
|
47
|
+
autocompleteToken: string;
|
|
48
|
+
numberSpinnerHidden: string;
|
|
23
49
|
labelDirection: string;
|
|
24
50
|
inputDirection: string;
|
|
25
51
|
inputType: string;
|
|
@@ -30,6 +56,7 @@ export declare const DisplayNames: {
|
|
|
30
56
|
phoneFormat: string;
|
|
31
57
|
label: string;
|
|
32
58
|
placeholder: string;
|
|
59
|
+
tooltip: string;
|
|
33
60
|
autoComplete: string;
|
|
34
61
|
readOnly: string;
|
|
35
62
|
required: string;
|
|
@@ -103,15 +103,15 @@
|
|
|
103
103
|
opacity: 0.6;
|
|
104
104
|
}
|
|
105
105
|
.root__zQlRz .input__fyTfx:hover {
|
|
106
|
-
background-color: #ffffff;
|
|
107
|
-
border-color: #a3d9f6;
|
|
108
|
-
border-width: 1px;
|
|
106
|
+
background-color: var(--hoverBackground, #ffffff);
|
|
107
|
+
border-color: var(--hoverBorderColor, #a3d9f6);
|
|
108
|
+
border-width: var(--hoverBorderWidth, 1px);
|
|
109
109
|
}
|
|
110
110
|
.root__zQlRz .input__fyTfx:disabled {
|
|
111
|
-
background-color: #f5f5f5;
|
|
112
|
-
color: #999;
|
|
113
|
-
border-color: #e3e3e3;
|
|
114
|
-
border-width: 1px;
|
|
111
|
+
background-color: var(--disabledBackground, #f5f5f5);
|
|
112
|
+
color: var(--disabledTextColor, #999);
|
|
113
|
+
border-color: var(--disabledBorderColor, #e3e3e3);
|
|
114
|
+
border-width: var(--disabledBorderWidth, 1px);
|
|
115
115
|
opacity: 0.6;
|
|
116
116
|
cursor: not-allowed;
|
|
117
117
|
}
|
|
@@ -128,9 +128,32 @@
|
|
|
128
128
|
padding-inline-end: calc(var(--textPaddingInlineEnd) + var(--prefixWidth));
|
|
129
129
|
}
|
|
130
130
|
.root__zQlRz:not(.validation-indication__QMvkt) .input__fyTfx:focus {
|
|
131
|
-
background-color: #ffffff;
|
|
132
|
-
border-color: #a3d9f6;
|
|
133
|
-
border-width: 1px;
|
|
131
|
+
background-color: var(--focusBackground, #ffffff);
|
|
132
|
+
border-color: var(--focusBorderColor, #a3d9f6);
|
|
133
|
+
border-width: var(--focusBorderWidth, 1px);
|
|
134
|
+
}
|
|
135
|
+
.root__zQlRz.textInput--hover .input__fyTfx {
|
|
136
|
+
background-color: var(--hoverBackground, #ffffff);
|
|
137
|
+
border-color: var(--hoverBorderColor, #a3d9f6);
|
|
138
|
+
border-width: var(--hoverBorderWidth, 1px);
|
|
139
|
+
}
|
|
140
|
+
.root__zQlRz.textInput--focus .input__fyTfx {
|
|
141
|
+
background-color: var(--focusBackground, #ffffff);
|
|
142
|
+
border-color: var(--focusBorderColor, #a3d9f6);
|
|
143
|
+
border-width: var(--focusBorderWidth, 1px);
|
|
144
|
+
}
|
|
145
|
+
.root__zQlRz.textInput--error .input__fyTfx {
|
|
146
|
+
background-color: var(--errorBackground, #ffffff);
|
|
147
|
+
border-color: var(--errorBorderColor, #e3e3e3);
|
|
148
|
+
border-width: var(--errorBorderWidth, 1px);
|
|
149
|
+
}
|
|
150
|
+
.root__zQlRz.textInput--disabled .input__fyTfx {
|
|
151
|
+
background-color: var(--disabledBackground, #f5f5f5);
|
|
152
|
+
color: var(--disabledTextColor, #999);
|
|
153
|
+
border-color: var(--disabledBorderColor, #e3e3e3);
|
|
154
|
+
border-width: var(--disabledBorderWidth, 1px);
|
|
155
|
+
opacity: 0.6;
|
|
156
|
+
cursor: not-allowed;
|
|
134
157
|
}
|
|
135
158
|
.root__zQlRz.validation-indication__QMvkt .input__fyTfx:invalid {
|
|
136
159
|
background-color: #ffffff;
|
|
@@ -162,7 +185,7 @@
|
|
|
162
185
|
color: var(--requiredTextColor);
|
|
163
186
|
}
|
|
164
187
|
.root__zQlRz.validationIndication__GE20D .input__fyTfx:invalid {
|
|
165
|
-
background-color: #ffffff;
|
|
166
|
-
border-color: #e3e3e3;
|
|
167
|
-
border-width: 1px;
|
|
188
|
+
background-color: var(--errorBackground, #ffffff);
|
|
189
|
+
border-color: var(--errorBorderColor, #e3e3e3);
|
|
190
|
+
border-width: var(--errorBorderWidth, 1px);
|
|
168
191
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { I as INTERACTIONS, D as DATA, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { D as DisplayNames, s as selectors } from "../chunks/constants3.js";
|
|
3
|
-
import { g as getSelector } from "../chunks/manifest.js";
|
|
1
|
+
import { I as INTERACTIONS, D as DATA, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, N as NativeStateType, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
+
import { D as DisplayNames, a as DesignStates, s as selectors } from "../chunks/constants3.js";
|
|
3
|
+
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
|
+
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
|
+
import { m as manifestFocusable, b as manifestInputable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
4
6
|
const manifest = {
|
|
5
7
|
id: "b8f7e3d2-4a5c-4e8f-9b2d-1c3e5f7a9b4d",
|
|
6
8
|
type: "wixEditorElements.TextInput",
|
|
@@ -24,6 +26,9 @@ const manifest = {
|
|
|
24
26
|
},
|
|
25
27
|
sdk: {
|
|
26
28
|
url: "./site/components/TextInput/sdk.ts"
|
|
29
|
+
},
|
|
30
|
+
editor: {
|
|
31
|
+
componentUrl: "./site/components/TextInput/component.preview.tsx"
|
|
27
32
|
}
|
|
28
33
|
},
|
|
29
34
|
editorElement: {
|
|
@@ -36,7 +41,59 @@ const manifest = {
|
|
|
36
41
|
disableStretching: false,
|
|
37
42
|
disablePositioning: false
|
|
38
43
|
},
|
|
44
|
+
states: {
|
|
45
|
+
hover: withSpec({
|
|
46
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
47
|
+
displayName: DesignStates.root.hover.displayName,
|
|
48
|
+
className: DesignStates.root.hover.className,
|
|
49
|
+
pseudoClass: NativeStateType.hover
|
|
50
|
+
}),
|
|
51
|
+
focus: withSpec({
|
|
52
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
53
|
+
displayName: DesignStates.root.focus.displayName,
|
|
54
|
+
className: DesignStates.root.focus.className,
|
|
55
|
+
pseudoClass: NativeStateType.focus
|
|
56
|
+
}),
|
|
57
|
+
error: withSpec({
|
|
58
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
59
|
+
displayName: DesignStates.root.error.displayName,
|
|
60
|
+
className: DesignStates.root.error.className
|
|
61
|
+
}),
|
|
62
|
+
disabled: withSpec({
|
|
63
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
64
|
+
displayName: DesignStates.root.disabled.displayName,
|
|
65
|
+
className: DesignStates.root.disabled.className,
|
|
66
|
+
pseudoClass: NativeStateType.disabled,
|
|
67
|
+
props: { isDisabled: true }
|
|
68
|
+
})
|
|
69
|
+
},
|
|
39
70
|
displayGroups: {
|
|
71
|
+
orderedDataGroup: {
|
|
72
|
+
groupType: DISPLAY_GROUPS.GROUP_TYPE.data,
|
|
73
|
+
data: {
|
|
74
|
+
items: [
|
|
75
|
+
"required",
|
|
76
|
+
"readOnly",
|
|
77
|
+
"isDisabled",
|
|
78
|
+
"autoComplete",
|
|
79
|
+
"numberSpinnerHidden",
|
|
80
|
+
"inputType",
|
|
81
|
+
"label",
|
|
82
|
+
"placeholder",
|
|
83
|
+
"tooltip",
|
|
84
|
+
"prefix",
|
|
85
|
+
"autocompleteToken",
|
|
86
|
+
"pattern",
|
|
87
|
+
"minLength",
|
|
88
|
+
"maxLength",
|
|
89
|
+
"min",
|
|
90
|
+
"max",
|
|
91
|
+
"step",
|
|
92
|
+
"phoneFormat",
|
|
93
|
+
"errorMessageType"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
40
97
|
textPaddingGroup: {
|
|
41
98
|
groupType: DISPLAY_GROUPS.GROUP_TYPE.padding,
|
|
42
99
|
padding: {
|
|
@@ -310,6 +367,19 @@ const manifest = {
|
|
|
310
367
|
}
|
|
311
368
|
},
|
|
312
369
|
data: {
|
|
370
|
+
value: {
|
|
371
|
+
displayName: DisplayNames.data.value,
|
|
372
|
+
dataType: DATA.DATA_TYPE.text
|
|
373
|
+
},
|
|
374
|
+
isDisabled: {
|
|
375
|
+
displayName: DisplayNames.data.isDisabled,
|
|
376
|
+
dataType: DATA.DATA_TYPE.booleanValue,
|
|
377
|
+
defaultValue: false
|
|
378
|
+
},
|
|
379
|
+
name: {
|
|
380
|
+
displayName: DisplayNames.data.name,
|
|
381
|
+
dataType: DATA.DATA_TYPE.text
|
|
382
|
+
},
|
|
313
383
|
// Direction properties
|
|
314
384
|
direction: {
|
|
315
385
|
dataType: DATA.DATA_TYPE.direction
|
|
@@ -338,6 +408,13 @@ const manifest = {
|
|
|
338
408
|
}
|
|
339
409
|
},
|
|
340
410
|
// Validation properties
|
|
411
|
+
minLength: {
|
|
412
|
+
displayName: DisplayNames.data.minLength,
|
|
413
|
+
dataType: DATA.DATA_TYPE.number,
|
|
414
|
+
[DATA.DATA_TYPE.number]: {
|
|
415
|
+
min: "0"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
341
418
|
maxLength: {
|
|
342
419
|
displayName: DisplayNames.data.maxLength,
|
|
343
420
|
dataType: DATA.DATA_TYPE.number
|
|
@@ -388,6 +465,13 @@ const manifest = {
|
|
|
388
465
|
maxLength: 4e3
|
|
389
466
|
}
|
|
390
467
|
},
|
|
468
|
+
tooltip: {
|
|
469
|
+
displayName: DisplayNames.data.tooltip,
|
|
470
|
+
dataType: DATA.DATA_TYPE.text,
|
|
471
|
+
[DATA.DATA_TYPE.text]: {
|
|
472
|
+
maxLength: 400
|
|
473
|
+
}
|
|
474
|
+
},
|
|
391
475
|
// Accessibility
|
|
392
476
|
a11y: {
|
|
393
477
|
dataType: DATA.DATA_TYPE.a11y,
|
|
@@ -434,7 +518,22 @@ const manifest = {
|
|
|
434
518
|
step: {
|
|
435
519
|
displayName: DisplayNames.data.step,
|
|
436
520
|
dataType: DATA.DATA_TYPE.number
|
|
437
|
-
}
|
|
521
|
+
},
|
|
522
|
+
autocompleteToken: {
|
|
523
|
+
displayName: DisplayNames.data.autocompleteToken,
|
|
524
|
+
dataType: DATA.DATA_TYPE.text,
|
|
525
|
+
[DATA.DATA_TYPE.text]: {
|
|
526
|
+
maxLength: 50
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
numberSpinnerHidden: {
|
|
530
|
+
displayName: DisplayNames.data.numberSpinnerHidden,
|
|
531
|
+
dataType: DATA.DATA_TYPE.booleanValue,
|
|
532
|
+
defaultValue: false
|
|
533
|
+
},
|
|
534
|
+
...manifestChangeable(),
|
|
535
|
+
...manifestInputable(),
|
|
536
|
+
...manifestFocusable()
|
|
438
537
|
},
|
|
439
538
|
interactions: {
|
|
440
539
|
triggers: [
|
|
@@ -65,10 +65,10 @@ const semanticClassNames = {
|
|
|
65
65
|
label: "textbox__label"
|
|
66
66
|
};
|
|
67
67
|
export {
|
|
68
|
-
|
|
68
|
+
DesignStates as D,
|
|
69
69
|
TestIds as T,
|
|
70
70
|
semanticClassNames as a,
|
|
71
|
-
|
|
71
|
+
DisplayNames as b,
|
|
72
72
|
defaultValues as d,
|
|
73
73
|
selectors as s
|
|
74
74
|
};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
const selectors = {
|
|
2
2
|
root: "textInput"
|
|
3
3
|
};
|
|
4
|
+
const DesignStates = {
|
|
5
|
+
root: {
|
|
6
|
+
hover: { displayName: "Hover", className: "textInput--hover" },
|
|
7
|
+
focus: { displayName: "Focus", className: "textInput--focus" },
|
|
8
|
+
error: { displayName: "Error", className: "textInput--error" },
|
|
9
|
+
disabled: { displayName: "Disabled", className: "textInput--disabled" }
|
|
10
|
+
}
|
|
11
|
+
};
|
|
4
12
|
const DisplayNames = {
|
|
5
13
|
root: {
|
|
6
14
|
elementDisplayName: "TextInput"
|
|
@@ -20,6 +28,12 @@ const DisplayNames = {
|
|
|
20
28
|
inputAlign: "Input alignment"
|
|
21
29
|
},
|
|
22
30
|
data: {
|
|
31
|
+
value: "Value",
|
|
32
|
+
isDisabled: "Disabled",
|
|
33
|
+
name: "Name",
|
|
34
|
+
minLength: "Minimum length",
|
|
35
|
+
autocompleteToken: "Autocomplete type",
|
|
36
|
+
numberSpinnerHidden: "Hide number spinner",
|
|
23
37
|
labelDirection: "Label direction",
|
|
24
38
|
inputDirection: "Input direction",
|
|
25
39
|
inputType: "Input type",
|
|
@@ -30,6 +44,7 @@ const DisplayNames = {
|
|
|
30
44
|
phoneFormat: "Phone format",
|
|
31
45
|
label: "Label text",
|
|
32
46
|
placeholder: "Placeholder text",
|
|
47
|
+
tooltip: "Tooltip",
|
|
33
48
|
autoComplete: "Autocomplete",
|
|
34
49
|
readOnly: "Read only",
|
|
35
50
|
required: "Required",
|
|
@@ -53,5 +68,6 @@ const DisplayNames = {
|
|
|
53
68
|
};
|
|
54
69
|
export {
|
|
55
70
|
DisplayNames as D,
|
|
71
|
+
DesignStates as a,
|
|
56
72
|
selectors as s
|
|
57
73
|
};
|
|
@@ -86,8 +86,8 @@ function manifestMouseHover(names = {}) {
|
|
|
86
86
|
}
|
|
87
87
|
export {
|
|
88
88
|
manifestChangeable as a,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
manifestInputable as b,
|
|
90
|
+
manifestMouseHover as c,
|
|
91
|
+
manifestClickable as d,
|
|
92
92
|
manifestFocusable as m
|
|
93
93
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2292.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -186,5 +186,5 @@
|
|
|
186
186
|
"registry": "https://registry.npmjs.org/",
|
|
187
187
|
"access": "public"
|
|
188
188
|
},
|
|
189
|
-
"falconPackageHash": "
|
|
189
|
+
"falconPackageHash": "0f66f999f586627bef3f3a028f1ef69c894672951f4c4f5f30d83d0f"
|
|
190
190
|
}
|