@wix/editor-react-components 1.2875.0 → 1.2877.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/Checkbox/Checkbox.types.d.ts +1 -2
- package/dist/site/components/Checkbox/component.js +0 -16
- package/dist/site/components/Checkbox/constants.d.ts +0 -1
- package/dist/site/components/Checkbox/css.css +0 -11
- package/dist/site/components/Checkbox/manifest.js +2 -8
- package/dist/site/components/chunks/constants40.js +1 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Direction } from '@wix/editor-react-types';
|
|
2
2
|
import { SdkFunctionFocusableProps, SdkFunctionKeyboardProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
3
3
|
export type CheckboxProps = SdkFunctionFocusableProps<HTMLElement> & SdkFunctionKeyboardProps<HTMLElement> & {
|
|
4
4
|
id: string;
|
|
@@ -8,7 +8,6 @@ export type CheckboxProps = SdkFunctionFocusableProps<HTMLElement> & SdkFunction
|
|
|
8
8
|
readOnly?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
checked?: boolean;
|
|
11
|
-
a11y?: A11y;
|
|
12
11
|
direction?: Direction;
|
|
13
12
|
onCheckedChange?: (checked: boolean) => void;
|
|
14
13
|
previewError?: boolean;
|
|
@@ -2,7 +2,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { F as Field, e as Checkbox } from "../chunks/index13.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { c as clsx } from "../chunks/clsx.js";
|
|
5
|
-
import { a as accessibilityStyles } from "../chunks/accessibility.module.js";
|
|
6
5
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
7
6
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
8
7
|
import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
@@ -37,7 +36,6 @@ function CheckboxComponent(props) {
|
|
|
37
36
|
readOnly = defaultValues.readOnly,
|
|
38
37
|
disabled = defaultValues.disabled,
|
|
39
38
|
checked = false,
|
|
40
|
-
a11y,
|
|
41
39
|
direction,
|
|
42
40
|
onCheckedChange,
|
|
43
41
|
onKeyDown,
|
|
@@ -54,8 +52,6 @@ function CheckboxComponent(props) {
|
|
|
54
52
|
const hasError = typeof errorMessage2 !== "undefined" && errorMessage2 !== "";
|
|
55
53
|
const inErrorState = hasError || Boolean(previewError);
|
|
56
54
|
const errorMessageId = inErrorState ? `${id}-error-message` : void 0;
|
|
57
|
-
const ariaLabel = (a11y == null ? void 0 : a11y.ariaLabel) || void 0;
|
|
58
|
-
const customAccessibleNameId = label2 && ariaLabel ? `${id}-accessible-name` : void 0;
|
|
59
55
|
const presetsWrapperProps = (wix == null ? void 0 : wix.presetsWrapperProps) || {};
|
|
60
56
|
const rootClassName = clsx(
|
|
61
57
|
className,
|
|
@@ -80,16 +76,6 @@ function CheckboxComponent(props) {
|
|
|
80
76
|
disabled,
|
|
81
77
|
children: [
|
|
82
78
|
/* @__PURE__ */ jsxs(Field.Item, { className: styles.item, children: [
|
|
83
|
-
customAccessibleNameId && /* @__PURE__ */ jsx(
|
|
84
|
-
"span",
|
|
85
|
-
{
|
|
86
|
-
id: customAccessibleNameId,
|
|
87
|
-
className: accessibilityStyles.visuallyHidden,
|
|
88
|
-
"aria-hidden": "true",
|
|
89
|
-
"data-testid": TestIds.accessibleName,
|
|
90
|
-
children: ariaLabel
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
79
|
/* @__PURE__ */ jsx(
|
|
94
80
|
Checkbox.Root,
|
|
95
81
|
{
|
|
@@ -106,8 +92,6 @@ function CheckboxComponent(props) {
|
|
|
106
92
|
inErrorState ? DesignStates.indicator.error.className : void 0
|
|
107
93
|
),
|
|
108
94
|
"data-testid": TestIds.control,
|
|
109
|
-
"aria-label": ariaLabel,
|
|
110
|
-
"aria-labelledby": customAccessibleNameId,
|
|
111
95
|
"aria-describedby": errorMessageId,
|
|
112
96
|
"aria-invalid": inErrorState || void 0,
|
|
113
97
|
onKeyDown,
|
|
@@ -72,7 +72,6 @@ export declare const TestIds: {
|
|
|
72
72
|
readonly indicator: "checkbox-indicator";
|
|
73
73
|
readonly label: "checkbox-label";
|
|
74
74
|
readonly errorMessage: "checkbox-error-message";
|
|
75
|
-
readonly accessibleName: "checkbox-accessible-name";
|
|
76
75
|
};
|
|
77
76
|
export declare const selectors: {
|
|
78
77
|
readonly root: "checkbox";
|
|
@@ -95,17 +95,6 @@
|
|
|
95
95
|
.errorMessage__PtMqM svg {
|
|
96
96
|
display: none;
|
|
97
97
|
}
|
|
98
|
-
.visuallyHidden__Md84p {
|
|
99
|
-
position: absolute;
|
|
100
|
-
width: 1px;
|
|
101
|
-
height: 1px;
|
|
102
|
-
padding: 0;
|
|
103
|
-
margin: -1px;
|
|
104
|
-
overflow: hidden;
|
|
105
|
-
clip-path: inset(50%);
|
|
106
|
-
white-space: nowrap;
|
|
107
|
-
border: 0;
|
|
108
|
-
}
|
|
109
98
|
.fallbackDirection__HeRgn:not([dir]) {
|
|
110
99
|
direction: var(--wix-opt-in-direction);
|
|
111
100
|
}
|
|
@@ -4,8 +4,8 @@ import { a as manifestFocusable, m as manifestKeyboard } from "../chunks/manifes
|
|
|
4
4
|
import { T as TEXT_PROP_STATIC_VALUE_MAX_LENGTH, g as getSelector } from "../chunks/manifest.js";
|
|
5
5
|
const basePresetName = "baseCheckbox";
|
|
6
6
|
const manifest = {
|
|
7
|
-
id: "
|
|
8
|
-
type: "wixEditorElements.
|
|
7
|
+
id: "ca83e421-6213-4fc5-a434-92740a4fcc50",
|
|
8
|
+
type: "wixEditorElements.Checkbox__DEV__v10",
|
|
9
9
|
description: "A single checkbox input with label",
|
|
10
10
|
installation: {
|
|
11
11
|
presets: {
|
|
@@ -259,12 +259,6 @@ const manifest = {
|
|
|
259
259
|
description: DisplayNames.root.descriptions.checked,
|
|
260
260
|
defaultValue: defaultValues.checked
|
|
261
261
|
},
|
|
262
|
-
a11y: {
|
|
263
|
-
dataType: DATA.DATA_TYPE.a11y,
|
|
264
|
-
[DATA.DATA_TYPE.a11y]: {
|
|
265
|
-
attributes: [DATA.A11Y_ATTRIBUTES.ariaLabel]
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
262
|
direction: {
|
|
269
263
|
dataType: DATA.DATA_TYPE.direction
|
|
270
264
|
},
|
|
@@ -65,8 +65,7 @@ const TestIds = {
|
|
|
65
65
|
control: "checkbox-control",
|
|
66
66
|
indicator: "checkbox-indicator",
|
|
67
67
|
label: "checkbox-label",
|
|
68
|
-
errorMessage: "checkbox-error-message"
|
|
69
|
-
accessibleName: "checkbox-accessible-name"
|
|
68
|
+
errorMessage: "checkbox-error-message"
|
|
70
69
|
};
|
|
71
70
|
const selectors = {
|
|
72
71
|
root: "checkbox",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2877.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -228,5 +228,5 @@
|
|
|
228
228
|
"registry": "https://registry.npmjs.org/",
|
|
229
229
|
"access": "public"
|
|
230
230
|
},
|
|
231
|
-
"falconPackageHash": "
|
|
231
|
+
"falconPackageHash": "479d10bac05aca0b7276de43319dcd336e58522ccf96fb066069f399"
|
|
232
232
|
}
|