@wix/editor-react-components 1.2764.0 → 1.2766.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.
Files changed (122) hide show
  1. package/dist/site/components/AccordionComponent/component.js +80 -3
  2. package/dist/site/components/AccordionComponent/manifest.js +1 -1
  3. package/dist/site/components/AudioPlayer/component.js +4 -3
  4. package/dist/site/components/AudioPlayer/manifest.js +1 -1
  5. package/dist/site/components/BoxContainer/component.js +2 -2
  6. package/dist/site/components/Breadcrumbs/component.js +3 -3
  7. package/dist/site/components/Breadcrumbs/manifest.js +1 -1
  8. package/dist/site/components/Button/component.js +1 -1
  9. package/dist/site/components/Button/manifest.js +1 -1
  10. package/dist/site/components/Checkbox/component.js +3 -4
  11. package/dist/site/components/CheckboxGroup/component.js +3 -4
  12. package/dist/site/components/CollapsibleText/component.js +2 -2
  13. package/dist/site/components/CollapsibleText/manifest.js +1 -1
  14. package/dist/site/components/DatePicker/component.js +7 -7
  15. package/dist/site/components/Dropdown/Dropdown.d.ts +1 -1
  16. package/dist/site/components/Dropdown/Dropdown.types.d.ts +22 -89
  17. package/dist/site/components/Dropdown/component.js +205 -873
  18. package/dist/site/components/Dropdown/constants.d.ts +26 -168
  19. package/dist/site/components/Dropdown/css.css +52 -462
  20. package/dist/site/components/Dropdown/manifest.js +338 -441
  21. package/dist/site/components/GoogleMap/manifest.js +1 -1
  22. package/dist/site/components/HTMLComponent/manifest.js +1 -1
  23. package/dist/site/components/HeadingTextBlock/component.js +2 -2
  24. package/dist/site/components/HipaaIcon/component.js +1 -1
  25. package/dist/site/components/Image3/component.js +1 -1
  26. package/dist/site/components/ImageReveal/component.js +2 -2
  27. package/dist/site/components/LegacyAppWidget/component.js +1 -1
  28. package/dist/site/components/LegacyContainer/component.js +1 -1
  29. package/dist/site/components/LegacyMultiStateBox/component.js +2 -2
  30. package/dist/site/components/Line/component.js +1 -1
  31. package/dist/site/components/Line/manifest.js +39 -3
  32. package/dist/site/components/LinkBar/manifest.js +1 -1
  33. package/dist/site/components/Lottie/component.js +1 -1
  34. package/dist/site/components/Lottie/manifest.js +1 -1
  35. package/dist/site/components/MarkdownBlock/component.js +1 -1
  36. package/dist/site/components/Menu/component.js +3 -3
  37. package/dist/site/components/Menu/manifest.js +1 -1
  38. package/dist/site/components/MultiStateBox/manifest.js +1 -1
  39. package/dist/site/components/RadioButtons/component.js +3 -4
  40. package/dist/site/components/ShareButtons/component.js +1 -1
  41. package/dist/site/components/ShareButtons/manifest.js +1 -1
  42. package/dist/site/components/Slideshow/component.js +1 -1
  43. package/dist/site/components/Slideshow/manifest.js +1 -1
  44. package/dist/site/components/Tabs/manifest.js +1 -1
  45. package/dist/site/components/TestComp/manifest.js +1 -1
  46. package/dist/site/components/TextBox/component.js +2 -3
  47. package/dist/site/components/TextEffects3d/component.js +1 -1
  48. package/dist/site/components/TextEffectsBauhaus/component.js +1 -1
  49. package/dist/site/components/TextEffectsGlass/component.js +1 -1
  50. package/dist/site/components/TextEffectsGlitch/component.js +1 -1
  51. package/dist/site/components/TextEffectsLetterPress/component.js +1 -1
  52. package/dist/site/components/TextEffectsMatrix/component.js +1 -1
  53. package/dist/site/components/TextEffectsNeonSign/component.js +1 -1
  54. package/dist/site/components/TextEffectsNoisy/component.js +1 -1
  55. package/dist/site/components/TextEffectsOutlineOut/component.js +1 -1
  56. package/dist/site/components/TextEffectsRetro/component.js +1 -1
  57. package/dist/site/components/TextEffectsShook/component.js +1 -1
  58. package/dist/site/components/TextEffectsSticker/component.js +1 -1
  59. package/dist/site/components/TextEffectsStriped/component.js +1 -1
  60. package/dist/site/components/TextInput/TextInput.d.ts +3 -7
  61. package/dist/site/components/TextInput/TextInput.types.d.ts +38 -105
  62. package/dist/site/components/TextInput/component.js +104 -780
  63. package/dist/site/components/TextInput/component.preview.d.ts +1 -4
  64. package/dist/site/components/TextInput/constants.d.ts +17 -65
  65. package/dist/site/components/TextInput/css.css +25 -223
  66. package/dist/site/components/TextInput/manifest.js +181 -367
  67. package/dist/site/components/TimePicker/component.js +7 -8
  68. package/dist/site/components/chunks/AnimatedIcon.js +1 -1
  69. package/dist/site/components/chunks/Button.js +1055 -466
  70. package/dist/site/components/chunks/Button2.js +486 -0
  71. package/dist/site/components/chunks/DismissSmall.js +7727 -1
  72. package/dist/site/components/chunks/Group.js +46 -970
  73. package/dist/site/components/chunks/I18nProvider.js +125 -0
  74. package/dist/site/components/chunks/Input.js +369 -0
  75. package/dist/site/components/chunks/Link.js +1 -1
  76. package/dist/site/components/chunks/RequiredIndicator.js +4 -0
  77. package/dist/site/components/chunks/ResponsiveBox.js +1 -1
  78. package/dist/site/components/chunks/ResponsiveContainer.js +1 -1
  79. package/dist/site/components/chunks/TextEffectsShared.js +1 -1
  80. package/dist/site/components/chunks/VisuallyHidden.js +1 -1
  81. package/dist/site/components/chunks/a11y.js +4 -5
  82. package/dist/site/components/chunks/constants3.js +23 -63
  83. package/dist/site/components/chunks/constants36.js +31 -148
  84. package/dist/site/components/chunks/filterDOMProps.js +18 -139
  85. package/dist/site/components/chunks/index10.js +3 -2020
  86. package/dist/site/components/chunks/index11.js +31118 -232
  87. package/dist/site/components/chunks/index12.js +3 -31191
  88. package/dist/site/components/chunks/index13.js +44 -3
  89. package/dist/site/components/chunks/index3.js +1 -1
  90. package/dist/site/components/chunks/index4.js +1 -1
  91. package/dist/site/components/chunks/index5.js +1 -1
  92. package/dist/site/components/chunks/index7.js +67 -3
  93. package/dist/site/components/chunks/index8.js +2020 -3
  94. package/dist/site/components/chunks/index9.js +232 -60
  95. package/dist/site/components/chunks/isObjectLike.js +15 -5
  96. package/dist/site/components/chunks/manifestSdkMixins.js +4 -17
  97. package/dist/site/components/chunks/parseHtml.js +1 -1
  98. package/dist/site/components/chunks/parseSvg.js +1 -1
  99. package/dist/site/components/chunks/staticService.js +1 -1
  100. package/dist/site/components/chunks/useConsentPolicyProps.js +1 -1
  101. package/dist/site/components/chunks/useLocalizedStringFormatter.js +1 -1
  102. package/package.json +2 -2
  103. package/dist/site/components/Dropdown/component.preview.d.ts +0 -9
  104. package/dist/site/components/Dropdown/components/DropdownChips.d.ts +0 -8
  105. package/dist/site/components/Dropdown/components/DropdownList.d.ts +0 -20
  106. package/dist/site/components/Dropdown/components/DropdownTrigger.d.ts +0 -22
  107. package/dist/site/components/Dropdown/dropdownUtils.d.ts +0 -22
  108. package/dist/site/components/Dropdown/hooks/useChipOverflow.d.ts +0 -9
  109. package/dist/site/components/Dropdown/hooks/useDropdownQuery.d.ts +0 -15
  110. package/dist/site/components/Dropdown/hooks/useDropdownSelection.d.ts +0 -16
  111. package/dist/site/components/TextInput/TextInput.viewer.constants.d.ts +0 -24
  112. package/dist/site/components/TextInput/sdk.d.ts +0 -4
  113. package/dist/site/components/TextInput/sdk.js +0 -91
  114. package/dist/site/components/TextInput/utils.d.ts +0 -9
  115. package/dist/site/components/chunks/DateField.js +0 -6762
  116. package/dist/site/components/chunks/InfoCircleSmall.js +0 -7
  117. package/dist/site/components/chunks/NumberFormatter.js +0 -140
  118. package/dist/site/components/chunks/Tooltip.js +0 -1334
  119. package/dist/site/components/chunks/_baseSlice.js +0 -43
  120. package/dist/site/components/chunks/index14.js +0 -46
  121. package/dist/site/components/chunks/isArray.js +0 -12
  122. package/dist/site/components/chunks/isArrayLike.js +0 -88
@@ -1,119 +1,52 @@
1
1
  import { A11y, Direction } from '@wix/editor-react-types';
2
- import { CorvidTypes } from '../../../types/vendored/editor-elements-types-corvid';
3
- import { DefaultCompPlatformProps } from '../../../types/vendored/editor-elements-types-thunderbolt';
4
- import { IReadOnlyPropSDK } from '../../../common/sdk/props-factories/readOnlyPropsSDKFactory';
5
- import { IRequiredPropSDK } from '../../../common/sdk/props-factories/requiredPropsSDKFactory';
6
- import { IValidationPropSDK, IValidationPropSDKProps, IValidationPropsSDKActions, IValidationPropsImperativeActions } from '../../../common/sdk/props-factories/validationPropsSDKFactory';
7
- import { ITextInputPropSDK, ITextInputPropsSDKActions } from '../../../common/sdk/props-factories/textInputPropsSDKFactory';
8
- import { IValuePropsSDK } from '../../../common/sdk/props-factories/valuePropsSDKFactory';
9
- import { IFocusPropsSDKActions, IFocusPropsSDK, IFocusPropsImperativeActions } from '../../../common/sdk/props-factories/focusPropsSDKFactory';
10
- import { IDisabledPropSDK } from '../../../common/sdk/props-factories/disablePropsSDKFactory';
11
- import { IClickPropsSDKActions, IClickPropSDK } from '../../../common/sdk/props-factories/clickPropsSDKFactory';
12
- import { IChangePropsSDKActions } from '../../../common/sdk/props-factories/changePropsSDKFactory';
13
- import { IElementPropsSDKActions, IElementPropsSDK, ToJSONBase } from '../../../common/sdk/props-factories/elementPropsSDKFactory';
14
- import { IAccessibilityPropSDK, IAccessibilityPropSDKProps } from '../../../common/sdk/props-factories/accessibilitySDKFactories/types';
15
- import { ILabelPropSDK } from '../../../common/sdk/props-factories/labelPropsSDKFactory';
16
- import { HydrationSDKAction } from '../../../common/sdk/props-factories/hydrationSDKFactory';
17
- import { ErrorMessageType, ViewerTranslations } from '../../../types/vendored/editor-elements-types-components';
18
- import { IValidationControllerProps } from '../../../utils/controllerUtils';
19
- import { LogicalAlignment, PhysicalAlignment, WithInherit } from '../../../utils/direction.types';
20
- import { InlineErrorMessageTranslationKeys } from '../../../common/InlineErrorMessage/InlineErrorMessage';
21
- import { FieldValidationProps } from '../../../utils/validation/types';
22
2
  import type * as React from 'react';
23
- type ResolverType = 'scale' | 'fixed';
24
- type Spx = {
25
- refWidth: number;
26
- resolverType: ResolverType;
3
+ /**
4
+ * Per-element className overrides. Keys match the manifest element keys — the
5
+ * Viewer resolves the active design state (Hover / Focus / Error / Disabled) to
6
+ * a class token and delivers it here, so every one of these has to reach the
7
+ * matching DOM node or the state silently does nothing.
8
+ */
9
+ export type TextInputElementProps = {
10
+ label?: {
11
+ className?: string;
12
+ };
13
+ input?: {
14
+ className?: string;
15
+ };
16
+ helperText?: {
17
+ className?: string;
18
+ };
19
+ errorMessage?: {
20
+ className?: string;
21
+ };
27
22
  };
28
- export type ITextInputImperativeActions = IFocusPropsImperativeActions & IValidationPropsImperativeActions;
29
- export type ITextInputProps = ITextInputMapperProps & DefaultCompPlatformProps & IValidationPropSDKProps & FieldValidationProps<string> & IChangePropsSDKActions<HTMLInputElement> & Partial<ITextInputPropsSDKActions<HTMLInputElement>> & Partial<IFocusPropsSDKActions> & Partial<IClickPropsSDKActions> & Partial<IValidationPropsSDKActions<ITextInputProps>> & Partial<IElementPropsSDKActions> & Partial<HydrationSDKAction> & ITextInputControllerProps & IAccessibilityPropSDKProps & {
30
- a11y?: Pick<A11y, 'ariaLabel'>;
31
- ref?: React.Ref<ITextInputImperativeActions>;
23
+ export type ITextInputProps = ITextInputMapperProps & {
24
+ id: string;
32
25
  autoFocus?: boolean;
33
26
  className?: string;
34
27
  dataTestId?: string;
35
- } & {
36
28
  contentRef?: React.Ref<HTMLDivElement>;
37
- } & {
38
- componentViewMode?: string;
39
- } & Partial<ViewerTranslations<'phoneFormatLengthValidationError' | 'phoneFormatDefaultValidationError' | 'phoneFormatComplexPhoneDefaultValidationError' | InlineErrorMessageTranslationKeys>>;
40
- export type ITextInputOwnSDK = {
41
- max?: number | null;
42
- min?: number | null;
43
- inputType: TextInputType;
44
- numberSpinnerHidden?: boolean;
45
- showNumberSpinner: () => Promise<void>;
46
- hideNumberSpinner: () => Promise<void>;
47
- toJSON(): ToJSONBase & Pick<ITextInputProps, 'readOnly' | 'required' | 'value' | 'max' | 'min' | 'inputType'>;
29
+ elementProps?: TextInputElementProps;
30
+ wix?: {
31
+ presetsWrapperProps?: Record<string, unknown>;
32
+ };
48
33
  };
49
- export type ITextInputOwnSDKFactory = CorvidTypes.CorvidSDKFactory<ITextInputProps, ITextInputOwnSDK, any, ITextInputImperativeActions>;
50
- export type ITextInputSDK = ITextInputOwnSDK & IDisabledPropSDK & IRequiredPropSDK & IReadOnlyPropSDK & ITextInputPropSDK & ILabelPropSDK & IFocusPropsSDK & IClickPropSDK & IElementPropsSDK & IValuePropsSDK<ITextInputProps['value']> & IAccessibilityPropSDK & IValidationPropSDK;
51
- export type ITextInputSDKFactory = CorvidTypes.CorvidSDKFactory<ITextInputProps, ITextInputSDK>;
52
- export type ITextInputCorvidModel = CorvidTypes.ICorvidModel<ITextInputSDKFactory>;
53
- export type TextInputCSSVars = {
54
- '--fntlbl': string;
55
- '--fnt': string;
56
- '--direction'?: string;
57
- '--align': string;
58
- '--labelDirection': string;
59
- '--inputDirection': string;
60
- '--errorDirection': string;
61
- '--textPadding': string;
62
- '--textPadding_start': string;
63
- '--textPadding_end': string;
64
- '--labelPadding_start': string;
65
- '--labelPadding_end': string;
66
- '--labelMarginBottom': string;
67
- '--inputHeight'?: string;
68
- '--requiredIndicationDisplay'?: 'none' | 'inline';
69
- height?: string;
70
- };
71
- export type TextInputPreviewCSSVars = TextInputCSSVars & {
72
- '--height': string;
73
- height: `var(--height)`;
74
- };
75
- export type TextInputAutocomplete = 'on' | 'off';
76
34
  export type ITextInputMapperProps = {
77
- skin: TextInputSkin;
78
- value: string;
79
- defaultValue?: string;
80
- inputType: TextInputType;
35
+ a11y?: A11y;
36
+ /** Controlled value. Omission renders an empty input; edits require a parent update. */
37
+ value?: string;
38
+ onValueChange?: (value: string) => void;
81
39
  label?: string;
82
40
  placeholder?: string;
83
- tooltip?: string;
84
- description?: string;
41
+ helperText?: string;
42
+ errorMessage?: string;
43
+ /**
44
+ * Editor-only: the `previewError` functional state forces the error message
45
+ * part visible while a designer is styling it.
46
+ */
47
+ previewError?: boolean;
48
+ /** The one direction for the whole component — label, input and messages. */
85
49
  direction?: Direction;
86
- labelDirection?: Direction;
87
- inputDirection?: Direction;
88
50
  readOnly: boolean;
89
- required: boolean;
90
- isDisabled: boolean;
91
- pattern?: string;
92
- phoneFormat?: string;
93
- autoComplete: boolean;
94
- prefix?: string;
95
- name?: string;
96
- autoComplete_?: TextInputAutocomplete | null;
97
- autocompleteToken?: string;
98
- minLength?: number | null;
99
- maxLength?: number | null;
100
- min?: number | null;
101
- max?: number | null;
102
- step?: number | null;
103
- numberSpinnerHidden?: boolean | undefined;
104
- errorMessageType?: ErrorMessageType;
105
- textInputAutoFillFixEnabled?: boolean;
106
- };
107
- export type ITextInputControllerProps = ITextInputMapperProps & Partial<IValidationControllerProps>;
108
- export type TextInputSkin = 'AppsTextInputSkin' | 'ResponsiveTextInputSkin';
109
- export type TextInputType = 'text' | 'password' | 'number' | 'email' | 'url' | 'tel' | 'search';
110
- export type TextInputAlignment = PhysicalAlignment;
111
- export type TextInputDefaultTextType = 'none' | 'initialText' | 'placeholderText' | 'placeholderAndInitialText';
112
- export type TextInputStyleProperties = Record<string, string> & {
113
- spx: Spx;
114
- align: LogicalAlignment;
115
- labelAlign: WithInherit<LogicalAlignment>;
116
- inputAlign: WithInherit<LogicalAlignment>;
117
- errorAlign: WithInherit<LogicalAlignment>;
51
+ disabled: boolean;
118
52
  };
119
- export {};