@cambly/syntax-core 5.0.0 → 5.2.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/index.d.ts +29 -4
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -490,6 +490,7 @@ var iconSize = {
|
|
|
490
490
|
};
|
|
491
491
|
var Button = forwardRef2(
|
|
492
492
|
({
|
|
493
|
+
"data-testid": dataTestId,
|
|
493
494
|
text,
|
|
494
495
|
loadingText,
|
|
495
496
|
color = "primary",
|
|
@@ -506,6 +507,7 @@ var Button = forwardRef2(
|
|
|
506
507
|
return /* @__PURE__ */ jsxs(
|
|
507
508
|
"button",
|
|
508
509
|
{
|
|
510
|
+
"data-testid": dataTestId,
|
|
509
511
|
ref,
|
|
510
512
|
"aria-label": accessibilityLabel,
|
|
511
513
|
type: "button",
|
|
@@ -629,6 +631,7 @@ var IconButton = forwardRef3(
|
|
|
629
631
|
({
|
|
630
632
|
accessibilityLabel,
|
|
631
633
|
color = "primary",
|
|
634
|
+
"data-testid": dataTestId,
|
|
632
635
|
disabled = false,
|
|
633
636
|
icon: Icon,
|
|
634
637
|
size = "md",
|
|
@@ -639,6 +642,7 @@ var IconButton = forwardRef3(
|
|
|
639
642
|
"button",
|
|
640
643
|
{
|
|
641
644
|
"aria-label": accessibilityLabel,
|
|
645
|
+
"data-testid": dataTestId,
|
|
642
646
|
type: "button",
|
|
643
647
|
title: tooltip,
|
|
644
648
|
disabled,
|
|
@@ -770,6 +774,7 @@ var iconWidth = {
|
|
|
770
774
|
};
|
|
771
775
|
var Checkbox = ({
|
|
772
776
|
checked = false,
|
|
777
|
+
"data-testid": dataTestId,
|
|
773
778
|
disabled = false,
|
|
774
779
|
size = "md",
|
|
775
780
|
label,
|
|
@@ -794,6 +799,7 @@ var Checkbox = ({
|
|
|
794
799
|
/* @__PURE__ */ jsx11(
|
|
795
800
|
"input",
|
|
796
801
|
{
|
|
802
|
+
"data-testid": dataTestId,
|
|
797
803
|
type: "checkbox",
|
|
798
804
|
className: (0, import_classnames7.default)(Checkbox_module_default.inputOverlay, Checkbox_module_default[size]),
|
|
799
805
|
checked,
|
|
@@ -848,8 +854,10 @@ var RadioButton_module_default = { "radioBaseContainer": "_radioBaseContainer_ne
|
|
|
848
854
|
import { jsx as jsx13, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
849
855
|
var RadioButton = ({
|
|
850
856
|
checked = false,
|
|
857
|
+
"data-testid": dataTestId,
|
|
851
858
|
disabled = false,
|
|
852
859
|
error = false,
|
|
860
|
+
id,
|
|
853
861
|
label,
|
|
854
862
|
name,
|
|
855
863
|
onChange,
|
|
@@ -874,7 +882,9 @@ var RadioButton = ({
|
|
|
874
882
|
/* @__PURE__ */ jsx13(
|
|
875
883
|
"input",
|
|
876
884
|
{
|
|
885
|
+
"data-testid": dataTestId,
|
|
877
886
|
type: "radio",
|
|
887
|
+
id,
|
|
878
888
|
name,
|
|
879
889
|
className: (0, import_classnames8.default)(RadioButton_module_default.radioStyleOverride, {
|
|
880
890
|
[RadioButton_module_default.smOverride]: size === "sm",
|
|
@@ -901,7 +911,7 @@ var RadioButton = ({
|
|
|
901
911
|
})
|
|
902
912
|
}
|
|
903
913
|
) : /* @__PURE__ */ jsx13("div", { className: (0, import_classnames8.default)(sharedStyles, RadioButton_module_default.neutralBorder) }),
|
|
904
|
-
/* @__PURE__ */ jsx13(
|
|
914
|
+
label && /* @__PURE__ */ jsx13(
|
|
905
915
|
Typography_default,
|
|
906
916
|
{
|
|
907
917
|
size: size === "md" ? 200 : 100,
|
|
@@ -932,18 +942,11 @@ var SelectList_module_default = { "selectContainer": "_selectContainer_1e7f9_1",
|
|
|
932
942
|
// src/SelectList/SelectOption.tsx
|
|
933
943
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
934
944
|
var SelectOption = ({
|
|
945
|
+
"data-testid": dataTestId,
|
|
935
946
|
value,
|
|
936
947
|
label,
|
|
937
948
|
disabled = false
|
|
938
|
-
}) => /* @__PURE__ */ jsx14(
|
|
939
|
-
"option",
|
|
940
|
-
{
|
|
941
|
-
"data-testid": `syntax-select-${value}`,
|
|
942
|
-
value,
|
|
943
|
-
disabled,
|
|
944
|
-
children: label
|
|
945
|
-
}
|
|
946
|
-
);
|
|
949
|
+
}) => /* @__PURE__ */ jsx14("option", { "data-testid": dataTestId, value, disabled, children: label });
|
|
947
950
|
var SelectOption_default = SelectOption;
|
|
948
951
|
|
|
949
952
|
// src/SelectList/SelectList.tsx
|
|
@@ -955,6 +958,7 @@ var iconSize3 = {
|
|
|
955
958
|
};
|
|
956
959
|
var SelectList = ({
|
|
957
960
|
children,
|
|
961
|
+
"data-testid": dataTestId,
|
|
958
962
|
disabled = false,
|
|
959
963
|
errorText,
|
|
960
964
|
helperText,
|
|
@@ -980,7 +984,7 @@ var SelectList = ({
|
|
|
980
984
|
"select",
|
|
981
985
|
{
|
|
982
986
|
id,
|
|
983
|
-
"data-testid":
|
|
987
|
+
"data-testid": dataTestId,
|
|
984
988
|
disabled,
|
|
985
989
|
className: (0, import_classnames9.default)(SelectList_module_default.selectBox, SelectList_module_default[size], {
|
|
986
990
|
[SelectList_module_default.unselected]: !selectedValue && !errorText,
|