@wix/editor-react-components 1.2452.0 → 1.2453.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/AccordionItem.d.ts +1 -1
- package/dist/site/components/AccordionComponent/component.js +59 -34
- package/dist/site/components/AccordionComponent/manifestConfigs/iconPositionConfig.d.ts +2 -2
- package/dist/site/components/AccordionComponent/types.d.ts +9 -3
- package/dist/site/components/AudioPlayer/component.js +92 -35
- package/dist/site/components/AudioPlayer/manifestConfigs/controlsConfig.d.ts +8 -8
- package/dist/site/components/AudioPlayer/manifestConfigs/coverMediaConfig.d.ts +1 -1
- package/dist/site/components/AudioPlayer/types.d.ts +26 -0
- package/dist/site/components/Breadcrumbs/BreadcrumbItem.d.ts +1 -1
- package/dist/site/components/Breadcrumbs/Separator.d.ts +3 -1
- package/dist/site/components/Breadcrumbs/component.js +20 -11
- package/dist/site/components/Breadcrumbs/types.d.ts +10 -7
- package/dist/site/components/Button/Button.types.d.ts +5 -0
- package/dist/site/components/Checkbox/Checkbox.types.d.ts +8 -0
- package/dist/site/components/Checkbox/component.js +7 -3
- package/dist/site/components/CheckboxGroup/CheckboxGroup.types.d.ts +12 -0
- package/dist/site/components/CheckboxGroup/component.js +41 -31
- package/dist/site/components/CollapsibleText/component.js +7 -5
- package/dist/site/components/CollapsibleText/types.d.ts +1 -0
- package/dist/site/components/DatePicker/DatePicker.types.d.ts +28 -0
- package/dist/site/components/DatePicker/component.js +128 -88
- package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +3 -1
- package/dist/site/components/DatePicker/components/DatePickerField.d.ts +9 -1
- package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +2 -1
- package/dist/site/components/Dropdown/Dropdown.types.d.ts +25 -0
- package/dist/site/components/Dropdown/component.js +36 -23
- package/dist/site/components/Dropdown/components/DropdownChips.d.ts +2 -1
- package/dist/site/components/Dropdown/components/DropdownList.d.ts +3 -1
- package/dist/site/components/Dropdown/components/DropdownTrigger.d.ts +3 -1
- package/dist/site/components/LegacyAppWidget/component.js +3 -2
- package/dist/site/components/LegacyAppWidget/components/AppWidget.types.d.ts +4 -2
- package/dist/site/components/LegacyContainer/component.d.ts +3 -1
- package/dist/site/components/LegacyContainer/component.js +2 -0
- package/dist/site/components/LegacyContainer/components/Container.types.d.ts +2 -1
- package/dist/site/components/LegacyMultiStateBox/LegacyMultiStateBox.types.d.ts +2 -0
- package/dist/site/components/Line/manifestConfigs/shapeConfig.d.ts +2 -2
- package/dist/site/components/Line/manifestConfigs/typeConfig.d.ts +2 -2
- package/dist/site/components/Lottie/component.js +4 -1
- package/dist/site/components/Lottie/types.d.ts +6 -0
- package/dist/site/components/Menu/Menu.types.d.ts +33 -3
- package/dist/site/components/Menu/component.js +62 -30
- package/dist/site/components/Menu/components/MenuContent/MenuItem/MenuItemLabel.d.ts +1 -0
- package/dist/site/components/Menu/components/Submenu/types.d.ts +2 -0
- package/dist/site/components/Menu/manifestConfigs/dropdownConfig.d.ts +45 -45
- package/dist/site/components/ProgressBar/ProgressBar.d.ts +9 -8
- package/dist/site/components/ProgressBar/component.js +8 -3
- package/dist/site/components/RadioButtons/RadioButtons.types.d.ts +12 -0
- package/dist/site/components/RadioButtons/component.js +61 -54
- package/dist/site/components/ShareButtons/ShareButtons.types.d.ts +13 -0
- package/dist/site/components/ShareButtons/component.js +23 -8
- package/dist/site/components/ShareButtons/constants.d.ts +1 -1
- package/dist/site/components/Slideshow/SlideIndicators.d.ts +2 -5
- package/dist/site/components/Slideshow/Slideshow.d.ts +10 -7
- package/dist/site/components/Slideshow/component.js +23 -12
- package/dist/site/components/Tabs/Tabs.d.ts +9 -0
- package/dist/site/components/Tabs/component.js +23 -10
- package/dist/site/components/Tabs/components/ScrollControls/ScrollControls.d.ts +3 -0
- package/dist/site/components/TestComp/TestComp.d.ts +3 -0
- package/dist/site/components/TestComp/component.js +39 -9
- package/dist/site/components/TextBox/TextBox.types.d.ts +12 -0
- package/dist/site/components/TextBox/component.js +9 -4
- package/dist/site/components/TextEffectsShared/manifestBase.d.ts +15 -15
- package/dist/site/components/TimePicker/TimePicker.types.d.ts +16 -0
- package/dist/site/components/TimePicker/component.js +59 -33
- package/dist/site/components/TimePicker/components/TimePickerField.d.ts +3 -1
- package/dist/site/components/TransparentVideo/useTransparentVideo.d.ts +1 -1
- package/dist/site/components/chunks/Button.js +7 -4
- package/dist/site/components/chunks/ResponsiveBox.js +9 -6
- package/dist/site/components/chunks/ResponsiveContainer.js +8 -2
- package/dist/site/components/chunks/types.impl.js +0 -18
- package/package.json +4 -4
|
@@ -40,7 +40,7 @@ const styles = {
|
|
|
40
40
|
const noop = () => {
|
|
41
41
|
};
|
|
42
42
|
function RadioButtonsComponent(props) {
|
|
43
|
-
var _a;
|
|
43
|
+
var _a, _b;
|
|
44
44
|
const environmentService = useService(EnvironmentDefinition);
|
|
45
45
|
const {
|
|
46
46
|
id,
|
|
@@ -56,7 +56,8 @@ function RadioButtonsComponent(props) {
|
|
|
56
56
|
showValidityIndication,
|
|
57
57
|
onValidate,
|
|
58
58
|
onValidityChange,
|
|
59
|
-
wix
|
|
59
|
+
wix,
|
|
60
|
+
elementProps
|
|
60
61
|
} = props;
|
|
61
62
|
const sourceOptions = Array.isArray(props.options) && props.options.length ? props.options : defaultOptions;
|
|
62
63
|
const options = sourceOptions.filter((option2) => !!option2).map((option2) => ({
|
|
@@ -127,7 +128,8 @@ function RadioButtonsComponent(props) {
|
|
|
127
128
|
className: clsx(
|
|
128
129
|
styles.groupLabel,
|
|
129
130
|
selectors.groupLabel,
|
|
130
|
-
formatClassNames(semanticClassNames.groupLabel)
|
|
131
|
+
formatClassNames(semanticClassNames.groupLabel),
|
|
132
|
+
(_b = elementProps == null ? void 0 : elementProps.groupLabel) == null ? void 0 : _b.className
|
|
131
133
|
),
|
|
132
134
|
"data-testid": TestIds.legend,
|
|
133
135
|
children: [
|
|
@@ -173,58 +175,63 @@ function RadioButtonsComponent(props) {
|
|
|
173
175
|
"data-testid": TestIds.group,
|
|
174
176
|
onFocus,
|
|
175
177
|
onBlur: handleBlur,
|
|
176
|
-
children: options.map((option2, index) =>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
children: [
|
|
185
|
-
/* @__PURE__ */ jsx(
|
|
186
|
-
Radio.Root,
|
|
187
|
-
{
|
|
188
|
-
value: option2.value,
|
|
189
|
-
readOnly,
|
|
190
|
-
disabled: disabled || !!option2.disabled,
|
|
191
|
-
"data-invalid": isInvalid || void 0,
|
|
192
|
-
className: clsx(
|
|
193
|
-
styles.control,
|
|
194
|
-
selectors.radio,
|
|
195
|
-
formatClassNames(semanticClassNames.radio)
|
|
196
|
-
),
|
|
197
|
-
"data-testid": TestIds.control,
|
|
198
|
-
children: /* @__PURE__ */ jsx(
|
|
199
|
-
Radio.Indicator,
|
|
200
|
-
{
|
|
201
|
-
keepMounted: true,
|
|
202
|
-
className: clsx(
|
|
203
|
-
styles.indicator,
|
|
204
|
-
selectors.indicator,
|
|
205
|
-
formatClassNames(semanticClassNames.indicator)
|
|
206
|
-
),
|
|
207
|
-
"data-testid": TestIds.indicator
|
|
208
|
-
}
|
|
209
|
-
)
|
|
210
|
-
}
|
|
178
|
+
children: options.map((option2, index) => {
|
|
179
|
+
var _a2, _b2;
|
|
180
|
+
return /* @__PURE__ */ jsxs(
|
|
181
|
+
"label",
|
|
182
|
+
{
|
|
183
|
+
className: clsx(
|
|
184
|
+
styles.option,
|
|
185
|
+
formatClassNames(semanticClassNames.option)
|
|
211
186
|
),
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
187
|
+
"data-testid": TestIds.option,
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsx(
|
|
190
|
+
Radio.Root,
|
|
191
|
+
{
|
|
192
|
+
value: option2.value,
|
|
193
|
+
readOnly,
|
|
194
|
+
disabled: disabled || !!option2.disabled,
|
|
195
|
+
"data-invalid": isInvalid || void 0,
|
|
196
|
+
className: clsx(
|
|
197
|
+
styles.control,
|
|
198
|
+
selectors.radio,
|
|
199
|
+
formatClassNames(semanticClassNames.radio),
|
|
200
|
+
(_a2 = elementProps == null ? void 0 : elementProps.radio) == null ? void 0 : _a2.className
|
|
201
|
+
),
|
|
202
|
+
"data-testid": TestIds.control,
|
|
203
|
+
children: /* @__PURE__ */ jsx(
|
|
204
|
+
Radio.Indicator,
|
|
205
|
+
{
|
|
206
|
+
keepMounted: true,
|
|
207
|
+
className: clsx(
|
|
208
|
+
styles.indicator,
|
|
209
|
+
selectors.indicator,
|
|
210
|
+
formatClassNames(semanticClassNames.indicator)
|
|
211
|
+
),
|
|
212
|
+
"data-testid": TestIds.indicator
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
option2.label && /* @__PURE__ */ jsx(
|
|
218
|
+
"span",
|
|
219
|
+
{
|
|
220
|
+
className: clsx(
|
|
221
|
+
styles.label,
|
|
222
|
+
selectors.label,
|
|
223
|
+
formatClassNames(semanticClassNames.label),
|
|
224
|
+
(_b2 = elementProps == null ? void 0 : elementProps.optionLabel) == null ? void 0 : _b2.className
|
|
225
|
+
),
|
|
226
|
+
"data-testid": TestIds.optionLabel,
|
|
227
|
+
children: option2.label
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
option2.value || index
|
|
233
|
+
);
|
|
234
|
+
})
|
|
228
235
|
}
|
|
229
236
|
),
|
|
230
237
|
isInvalid && validity.validationMessage && /* @__PURE__ */ jsxs(
|
|
@@ -2,6 +2,17 @@ import { VectorArt, A11y, Direction } from '@wix/editor-react-types';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { PagesToShare } from './constants';
|
|
4
4
|
import { SdkFunctionMouseHoverProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
5
|
+
export type ShareButtonElementProps = {
|
|
6
|
+
button?: {
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
label?: {
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
icon?: {
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
5
16
|
export type ShareButtonsProps = Partial<any> & SdkFunctionMouseHoverProps & {
|
|
6
17
|
onClick?: () => void;
|
|
7
18
|
icon?: VectorArt;
|
|
@@ -10,6 +21,7 @@ export type ShareButtonsProps = Partial<any> & SdkFunctionMouseHoverProps & {
|
|
|
10
21
|
direction?: Direction;
|
|
11
22
|
a11y?: A11y;
|
|
12
23
|
pageToShare?: PagesToShare;
|
|
24
|
+
elementProps?: ShareButtonElementProps;
|
|
13
25
|
};
|
|
14
26
|
export type IShareButtonProps = {
|
|
15
27
|
id: string;
|
|
@@ -24,6 +36,7 @@ export type IShareButtonProps = {
|
|
|
24
36
|
displayIcon?: boolean;
|
|
25
37
|
isHidden?: boolean;
|
|
26
38
|
translations?: Record<string, string | undefined>;
|
|
39
|
+
elementProps?: ShareButtonElementProps;
|
|
27
40
|
};
|
|
28
41
|
export type IShareButtonIconProps = {
|
|
29
42
|
svg: string;
|
|
@@ -297,8 +297,20 @@ const ShareButton = ({
|
|
|
297
297
|
label: label2,
|
|
298
298
|
illustration,
|
|
299
299
|
url = "",
|
|
300
|
-
translations
|
|
300
|
+
translations,
|
|
301
|
+
elementProps
|
|
301
302
|
}) => {
|
|
303
|
+
var _a, _b, _c;
|
|
304
|
+
const iconClassName = clsx(
|
|
305
|
+
shareButtonStyles.icon,
|
|
306
|
+
"icon",
|
|
307
|
+
(_a = elementProps == null ? void 0 : elementProps.icon) == null ? void 0 : _a.className
|
|
308
|
+
);
|
|
309
|
+
const labelClassName = clsx(
|
|
310
|
+
shareButtonStyles.label,
|
|
311
|
+
"label",
|
|
312
|
+
(_b = elementProps == null ? void 0 : elementProps.label) == null ? void 0 : _b.className
|
|
313
|
+
);
|
|
302
314
|
const platformIdWithFallback = getPlatformIdWithFallback(platformId, value);
|
|
303
315
|
const translatedCopyLinkLabel = translations == null ? void 0 : translations[label2];
|
|
304
316
|
const buttonLabel = platformIdWithFallback === platformIds.copyButton && translatedCopyLinkLabel ? translatedCopyLinkLabel : label2;
|
|
@@ -315,11 +327,11 @@ const ShareButton = ({
|
|
|
315
327
|
shareButtonIcon: /* @__PURE__ */ jsx(
|
|
316
328
|
ShareButtonIcon,
|
|
317
329
|
{
|
|
318
|
-
className:
|
|
330
|
+
className: iconClassName,
|
|
319
331
|
svg: (illustration == null ? void 0 : illustration.svgId) ?? ""
|
|
320
332
|
}
|
|
321
333
|
),
|
|
322
|
-
labelNode: /* @__PURE__ */ jsx("span", { className:
|
|
334
|
+
labelNode: /* @__PURE__ */ jsx("span", { className: labelClassName, children: buttonLabel })
|
|
323
335
|
}
|
|
324
336
|
) : /* @__PURE__ */ jsxs(
|
|
325
337
|
"a",
|
|
@@ -328,7 +340,8 @@ const ShareButton = ({
|
|
|
328
340
|
className: clsx(
|
|
329
341
|
shareButtonStyles.root,
|
|
330
342
|
HAS_CUSTOM_FOCUS_CLASSNAME,
|
|
331
|
-
"button"
|
|
343
|
+
"button",
|
|
344
|
+
(_c = elementProps == null ? void 0 : elementProps.button) == null ? void 0 : _c.className
|
|
332
345
|
),
|
|
333
346
|
target: "popup",
|
|
334
347
|
href: url,
|
|
@@ -343,11 +356,11 @@ const ShareButton = ({
|
|
|
343
356
|
/* @__PURE__ */ jsx(
|
|
344
357
|
ShareButtonIcon,
|
|
345
358
|
{
|
|
346
|
-
className:
|
|
359
|
+
className: iconClassName,
|
|
347
360
|
svg: (illustration == null ? void 0 : illustration.svgId) ?? ""
|
|
348
361
|
}
|
|
349
362
|
),
|
|
350
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
363
|
+
/* @__PURE__ */ jsx("span", { className: labelClassName, children: buttonLabel })
|
|
351
364
|
]
|
|
352
365
|
}
|
|
353
366
|
) });
|
|
@@ -442,7 +455,8 @@ const ShareButtons = (props) => {
|
|
|
442
455
|
getShareUrlPrefix(visibleButtons[0]),
|
|
443
456
|
shareUrl
|
|
444
457
|
),
|
|
445
|
-
translations: memoizedProps.translations
|
|
458
|
+
translations: memoizedProps.translations,
|
|
459
|
+
elementProps: props.elementProps
|
|
446
460
|
}
|
|
447
461
|
) : (
|
|
448
462
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
@@ -464,7 +478,8 @@ const ShareButtons = (props) => {
|
|
|
464
478
|
{
|
|
465
479
|
...button,
|
|
466
480
|
url: getFullShareUrl(getShareUrlPrefix(button), shareUrl),
|
|
467
|
-
translations: memoizedProps.translations
|
|
481
|
+
translations: memoizedProps.translations,
|
|
482
|
+
elementProps: props.elementProps
|
|
468
483
|
}
|
|
469
484
|
)
|
|
470
485
|
},
|
|
@@ -152,5 +152,5 @@ export declare const DefaultButtons: {
|
|
|
152
152
|
isDefault: boolean;
|
|
153
153
|
}[];
|
|
154
154
|
export declare const DisplayConfig: {
|
|
155
|
-
displayValues: import('@wix/
|
|
155
|
+
displayValues: import('@wix/component-protocol/schema').DisplayValueEnumDisplayValue[];
|
|
156
156
|
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Direction } from '@wix/editor-react-types';
|
|
3
|
-
import {
|
|
3
|
+
import { SlideIndicatorsElementProps } from './Slideshow';
|
|
4
4
|
type SlideIndicatorsProps = {
|
|
5
5
|
numberOfSlides: number;
|
|
6
6
|
onSlideClick: (index: number, skipTransition?: boolean) => void;
|
|
7
7
|
activeSlideIndex: number;
|
|
8
|
-
slideIndicatorsProps?:
|
|
9
|
-
indicatorMode: IndicatorMode;
|
|
10
|
-
direction?: Direction;
|
|
11
|
-
};
|
|
8
|
+
slideIndicatorsProps?: SlideIndicatorsElementProps;
|
|
12
9
|
parentDirection?: Direction;
|
|
13
10
|
siteDirection?: Direction;
|
|
14
11
|
};
|
|
@@ -3,6 +3,15 @@ import { Direction, A11y } from '@wix/editor-react-types';
|
|
|
3
3
|
import { IndicatorMode } from './types';
|
|
4
4
|
import { ButtonProps } from '../Button/Button';
|
|
5
5
|
import { SdkFunctionClickableProps, SdkFunctionMouseHoverProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
6
|
+
export type SlideIndicatorsElementProps = {
|
|
7
|
+
indicatorMode: IndicatorMode;
|
|
8
|
+
direction?: Direction;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export type SlideshowElementProps = {
|
|
12
|
+
slideIndicators?: SlideIndicatorsElementProps;
|
|
13
|
+
navigationButtons?: Partial<ButtonProps>;
|
|
14
|
+
};
|
|
6
15
|
type SlideshowDataProps = SdkFunctionClickableProps & SdkFunctionMouseHoverProps & {
|
|
7
16
|
autoplay?: boolean;
|
|
8
17
|
autoplayDelay?: number;
|
|
@@ -17,13 +26,7 @@ type SlideshowDataProps = SdkFunctionClickableProps & SdkFunctionMouseHoverProps
|
|
|
17
26
|
}>;
|
|
18
27
|
activeSlide?: number;
|
|
19
28
|
direction?: Direction;
|
|
20
|
-
elementProps?:
|
|
21
|
-
slideIndicators?: {
|
|
22
|
-
indicatorMode: IndicatorMode;
|
|
23
|
-
direction?: Direction;
|
|
24
|
-
};
|
|
25
|
-
navigationButtons?: Partial<ButtonProps>;
|
|
26
|
-
};
|
|
29
|
+
elementProps?: SlideshowElementProps;
|
|
27
30
|
showPauseButton?: boolean;
|
|
28
31
|
a11y?: A11y;
|
|
29
32
|
onChange?: (event?: React.SyntheticEvent) => void;
|
|
@@ -231,11 +231,15 @@ const NavigationButtons = ({
|
|
|
231
231
|
nextButtonLabel = slideshowDataDefaults.nextButtonLabel,
|
|
232
232
|
prevButtonLabel = slideshowDataDefaults.prevButtonLabel
|
|
233
233
|
}) => {
|
|
234
|
-
var _a;
|
|
235
|
-
const
|
|
234
|
+
var _a, _b;
|
|
235
|
+
const {
|
|
236
|
+
className: navButtonsClassName,
|
|
237
|
+
direction,
|
|
238
|
+
a11y,
|
|
239
|
+
...restNavButtonsProps
|
|
240
|
+
} = navigationButtonsProps || {};
|
|
236
241
|
const isRTL = (direction || parentDirection || siteDirection) === "rtl";
|
|
237
|
-
|
|
238
|
-
if (!(animatedIcon == null ? void 0 : animatedIcon.svg)) {
|
|
242
|
+
if (!((_b = (_a = restNavButtonsProps.elementProps) == null ? void 0 : _a.animatedIcon) == null ? void 0 : _b.svg)) {
|
|
239
243
|
return null;
|
|
240
244
|
}
|
|
241
245
|
return /* @__PURE__ */ jsxs(
|
|
@@ -255,10 +259,11 @@ const NavigationButtons = ({
|
|
|
255
259
|
className: clsx(
|
|
256
260
|
styles.button,
|
|
257
261
|
styles.prev,
|
|
258
|
-
semanticClassNames.navigationButtons
|
|
262
|
+
semanticClassNames.navigationButtons,
|
|
263
|
+
navButtonsClassName
|
|
259
264
|
),
|
|
260
265
|
disabled: prevDisabled,
|
|
261
|
-
...
|
|
266
|
+
...restNavButtonsProps,
|
|
262
267
|
label: prevButtonLabel || void 0,
|
|
263
268
|
labelContent: prevButtonLabel ? /* @__PURE__ */ jsx(
|
|
264
269
|
LabelWithSizer,
|
|
@@ -268,7 +273,7 @@ const NavigationButtons = ({
|
|
|
268
273
|
}
|
|
269
274
|
) : void 0,
|
|
270
275
|
a11y: {
|
|
271
|
-
...
|
|
276
|
+
...a11y,
|
|
272
277
|
ariaLabel: prevButtonLabel || slideshowDataDefaults.prevButtonLabel
|
|
273
278
|
}
|
|
274
279
|
}
|
|
@@ -279,10 +284,11 @@ const NavigationButtons = ({
|
|
|
279
284
|
onClick: onNextClick,
|
|
280
285
|
className: clsx(
|
|
281
286
|
styles.button,
|
|
282
|
-
semanticClassNames.navigationButtons
|
|
287
|
+
semanticClassNames.navigationButtons,
|
|
288
|
+
navButtonsClassName
|
|
283
289
|
),
|
|
284
290
|
disabled: nextDisabled,
|
|
285
|
-
...
|
|
291
|
+
...restNavButtonsProps,
|
|
286
292
|
label: nextButtonLabel || void 0,
|
|
287
293
|
labelContent: nextButtonLabel ? /* @__PURE__ */ jsx(
|
|
288
294
|
LabelWithSizer,
|
|
@@ -292,7 +298,7 @@ const NavigationButtons = ({
|
|
|
292
298
|
}
|
|
293
299
|
) : void 0,
|
|
294
300
|
a11y: {
|
|
295
|
-
...
|
|
301
|
+
...a11y,
|
|
296
302
|
ariaLabel: nextButtonLabel || slideshowDataDefaults.nextButtonLabel
|
|
297
303
|
}
|
|
298
304
|
}
|
|
@@ -395,7 +401,11 @@ const SlideIndicators = ({
|
|
|
395
401
|
parentDirection,
|
|
396
402
|
siteDirection
|
|
397
403
|
}) => {
|
|
398
|
-
const {
|
|
404
|
+
const {
|
|
405
|
+
indicatorMode = "max-5",
|
|
406
|
+
direction,
|
|
407
|
+
className
|
|
408
|
+
} = slideIndicatorsProps || {};
|
|
399
409
|
const isRTL = (direction || parentDirection || siteDirection) === "rtl";
|
|
400
410
|
const { indicators, handleArrowNavigation, registerButtonRef } = useSlideIndicators({
|
|
401
411
|
numberOfSlides,
|
|
@@ -416,7 +426,8 @@ const SlideIndicators = ({
|
|
|
416
426
|
[styles.modeAll]: indicatorMode === "all",
|
|
417
427
|
[styles.modeMax5]: indicatorMode === "max-5"
|
|
418
428
|
},
|
|
419
|
-
semanticClassNames.pagination
|
|
429
|
+
semanticClassNames.pagination,
|
|
430
|
+
className
|
|
420
431
|
),
|
|
421
432
|
...direction && { dir: direction },
|
|
422
433
|
children: indicators.map(({ slideIndex, distanceFromActiveSlide }) => {
|
|
@@ -2,11 +2,20 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { Direction } from '@wix/editor-react-types';
|
|
3
3
|
import { TransitionType, TransitionDirection } from './constants';
|
|
4
4
|
import { SdkFunctionClickableProps, SdkFunctionMouseHoverProps, SdkFunctionFocusableProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
5
|
+
export type TabsElementProps = {
|
|
6
|
+
tabContent?: {
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
scrollButton?: {
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
5
13
|
type TabsViewerProps = {
|
|
6
14
|
/** DOM `id` on the root `<div>`. */
|
|
7
15
|
id: string;
|
|
8
16
|
/** Appended to the root. Use this for CSS-variable and per-element overrides. */
|
|
9
17
|
className?: string;
|
|
18
|
+
elementProps?: TabsElementProps;
|
|
10
19
|
};
|
|
11
20
|
type TabsDataProps = SdkFunctionClickableProps & SdkFunctionMouseHoverProps & SdkFunctionFocusableProps & {
|
|
12
21
|
/** Animation applied when switching tabs. Default `'none'`. */
|
|
@@ -297,7 +297,8 @@ const ScrollButton = ({
|
|
|
297
297
|
direction,
|
|
298
298
|
onClick,
|
|
299
299
|
isVisible,
|
|
300
|
-
isRTL
|
|
300
|
+
isRTL,
|
|
301
|
+
className
|
|
301
302
|
}) => /* @__PURE__ */ jsx(
|
|
302
303
|
"button",
|
|
303
304
|
{
|
|
@@ -306,10 +307,15 @@ const ScrollButton = ({
|
|
|
306
307
|
onClick,
|
|
307
308
|
"aria-hidden": !isVisible,
|
|
308
309
|
"aria-label": direction === "forward" ? "Scroll forward" : "Scroll backward",
|
|
309
|
-
className: clsx(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
310
|
+
className: clsx(
|
|
311
|
+
styles.button,
|
|
312
|
+
classes.scrollButton,
|
|
313
|
+
{
|
|
314
|
+
[styles.visible]: isVisible,
|
|
315
|
+
HAS_CUSTOM_FOCUS_CLASSNAME
|
|
316
|
+
},
|
|
317
|
+
className
|
|
318
|
+
),
|
|
313
319
|
"data-direction": direction,
|
|
314
320
|
tabIndex: isVisible ? 0 : -1,
|
|
315
321
|
children: /* @__PURE__ */ jsx("span", { className: clsx(styles.icon, { [styles.rtl]: isRTL }), children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 6 12", children: /* @__PURE__ */ jsx("path", { d: ARROW_PATHS[direction] }) }) })
|
|
@@ -320,7 +326,8 @@ const ScrollControls = ({
|
|
|
320
326
|
isScrollForwardButtonVisible,
|
|
321
327
|
onScrollBackward,
|
|
322
328
|
onScrollForward,
|
|
323
|
-
direction
|
|
329
|
+
direction,
|
|
330
|
+
scrollButtonProps
|
|
324
331
|
}) => {
|
|
325
332
|
const isRTL = direction === "rtl";
|
|
326
333
|
return /* @__PURE__ */ jsxs("div", { className: styles.root, children: [
|
|
@@ -330,7 +337,8 @@ const ScrollControls = ({
|
|
|
330
337
|
direction: "backward",
|
|
331
338
|
onClick: onScrollBackward,
|
|
332
339
|
isVisible: isScrollBackwardButtonVisible,
|
|
333
|
-
isRTL
|
|
340
|
+
isRTL,
|
|
341
|
+
className: scrollButtonProps == null ? void 0 : scrollButtonProps.className
|
|
334
342
|
}
|
|
335
343
|
),
|
|
336
344
|
/* @__PURE__ */ jsx(
|
|
@@ -339,15 +347,18 @@ const ScrollControls = ({
|
|
|
339
347
|
direction: "forward",
|
|
340
348
|
onClick: onScrollForward,
|
|
341
349
|
isVisible: isScrollForwardButtonVisible,
|
|
342
|
-
isRTL
|
|
350
|
+
isRTL,
|
|
351
|
+
className: scrollButtonProps == null ? void 0 : scrollButtonProps.className
|
|
343
352
|
}
|
|
344
353
|
)
|
|
345
354
|
] });
|
|
346
355
|
};
|
|
347
356
|
const Tabs = (props) => {
|
|
357
|
+
var _a;
|
|
348
358
|
const {
|
|
349
359
|
id,
|
|
350
360
|
className,
|
|
361
|
+
elementProps,
|
|
351
362
|
tabs: tabs2,
|
|
352
363
|
activeTab = 0,
|
|
353
364
|
transitionType = "none",
|
|
@@ -478,7 +489,8 @@ const Tabs = (props) => {
|
|
|
478
489
|
onScrollForward: handleScrollForward,
|
|
479
490
|
isScrollBackwardButtonVisible,
|
|
480
491
|
isScrollForwardButtonVisible,
|
|
481
|
-
direction
|
|
492
|
+
direction,
|
|
493
|
+
scrollButtonProps: elementProps == null ? void 0 : elementProps.scrollButton
|
|
482
494
|
}
|
|
483
495
|
)
|
|
484
496
|
]
|
|
@@ -491,7 +503,8 @@ const Tabs = (props) => {
|
|
|
491
503
|
{
|
|
492
504
|
className: clsx(
|
|
493
505
|
styles$1["tab-content"],
|
|
494
|
-
classes.tabContentContainer
|
|
506
|
+
classes.tabContentContainer,
|
|
507
|
+
(_a = elementProps == null ? void 0 : elementProps.tabContent) == null ? void 0 : _a.className
|
|
495
508
|
),
|
|
496
509
|
children: tabs2 == null ? void 0 : tabs2.map((tab, index) => {
|
|
497
510
|
const { tabId, panelId } = a11yIds[index];
|
|
@@ -12,13 +12,16 @@ type TestCompProps = {
|
|
|
12
12
|
elementProps?: {
|
|
13
13
|
title?: {
|
|
14
14
|
text?: string;
|
|
15
|
+
className?: string;
|
|
15
16
|
};
|
|
16
17
|
description?: {
|
|
17
18
|
text?: string;
|
|
19
|
+
className?: string;
|
|
18
20
|
};
|
|
19
21
|
image?: {
|
|
20
22
|
src?: string;
|
|
21
23
|
alt?: string;
|
|
24
|
+
className?: string;
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
27
|
a11y?: A11y;
|
|
@@ -38,7 +38,7 @@ const styles = {
|
|
|
38
38
|
functionBtn
|
|
39
39
|
};
|
|
40
40
|
const TestComp = (props) => {
|
|
41
|
-
var _a, _b, _c;
|
|
41
|
+
var _a, _b, _c, _d, _e, _f;
|
|
42
42
|
const {
|
|
43
43
|
id,
|
|
44
44
|
className,
|
|
@@ -118,16 +118,46 @@ const TestComp = (props) => {
|
|
|
118
118
|
onFocus,
|
|
119
119
|
onBlur,
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */ jsx(
|
|
122
|
-
|
|
123
|
-
((_c = elementProps.image) == null ? void 0 : _c.src) && /* @__PURE__ */ jsx("div", { className: clsx(styles.imageWrapper, "card-image"), children: /* @__PURE__ */ jsx(
|
|
124
|
-
"img",
|
|
121
|
+
/* @__PURE__ */ jsx(
|
|
122
|
+
"h3",
|
|
125
123
|
{
|
|
126
|
-
className:
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
className: clsx(
|
|
125
|
+
styles.title,
|
|
126
|
+
"card-title",
|
|
127
|
+
(_a = elementProps.title) == null ? void 0 : _a.className
|
|
128
|
+
),
|
|
129
|
+
children: ((_b = elementProps.title) == null ? void 0 : _b.text) || "Test Component"
|
|
129
130
|
}
|
|
130
|
-
)
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
"p",
|
|
134
|
+
{
|
|
135
|
+
className: clsx(
|
|
136
|
+
styles.description,
|
|
137
|
+
"card-description",
|
|
138
|
+
(_c = elementProps.description) == null ? void 0 : _c.className
|
|
139
|
+
),
|
|
140
|
+
children: ((_d = elementProps.description) == null ? void 0 : _d.text) || "Edit the settings to see values change"
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
((_e = elementProps.image) == null ? void 0 : _e.src) && /* @__PURE__ */ jsx(
|
|
144
|
+
"div",
|
|
145
|
+
{
|
|
146
|
+
className: clsx(
|
|
147
|
+
styles.imageWrapper,
|
|
148
|
+
"card-image",
|
|
149
|
+
(_f = elementProps.image) == null ? void 0 : _f.className
|
|
150
|
+
),
|
|
151
|
+
children: /* @__PURE__ */ jsx(
|
|
152
|
+
"img",
|
|
153
|
+
{
|
|
154
|
+
className: styles.image,
|
|
155
|
+
src: elementProps.image.src,
|
|
156
|
+
alt: elementProps.image.alt ?? "Card Image"
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
),
|
|
131
161
|
/* @__PURE__ */ jsxs("div", { className: styles.settingsSection, children: [
|
|
132
162
|
/* @__PURE__ */ jsx("h4", { className: styles.sectionTitle, children: "Settings Panel Values" }),
|
|
133
163
|
/* @__PURE__ */ jsx(ValueRow, { label: "isEnabled (boolean)", value: String(isEnabled) }),
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { A11y, Direction } from '@wix/editor-react-types';
|
|
2
2
|
import { SdkFunctionChangeableProps, SdkFunctionFocusableProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
3
3
|
import { FieldValidationProps } from '../../../utils/validation/types';
|
|
4
|
+
export type TextBoxElementProps = {
|
|
5
|
+
input?: {
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
label?: {
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
description?: {
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
4
15
|
export type TextBoxProps = Omit<SdkFunctionChangeableProps, 'onChange'> & SdkFunctionFocusableProps & FieldValidationProps<string> & {
|
|
5
16
|
id: string;
|
|
6
17
|
className: string;
|
|
@@ -18,6 +29,7 @@ export type TextBoxProps = Omit<SdkFunctionChangeableProps, 'onChange'> & SdkFun
|
|
|
18
29
|
maxLength?: number | null;
|
|
19
30
|
direction?: Direction;
|
|
20
31
|
a11y?: A11y;
|
|
32
|
+
elementProps?: TextBoxElementProps;
|
|
21
33
|
wix?: {
|
|
22
34
|
presetsWrapperProps?: Record<string, unknown>;
|
|
23
35
|
};
|