@cambly/syntax-core 7.6.1 → 7.7.1
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.css +33 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +44 -2
- package/dist/index.js +145 -88
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +131 -75
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -626,11 +626,11 @@ var ButtonGroup = ({
|
|
|
626
626
|
size = "md",
|
|
627
627
|
children
|
|
628
628
|
}) => {
|
|
629
|
-
const
|
|
629
|
+
const classnames4 = (0, import_classnames5.default)(ButtonGroup_module_default.buttonGroup, gap[size], {
|
|
630
630
|
[ButtonGroup_module_default.horizontal]: orientation === "horizontal",
|
|
631
631
|
[ButtonGroup_module_default.vertical]: orientation === "vertical"
|
|
632
632
|
});
|
|
633
|
-
return /* @__PURE__ */ jsx6("div", { className:
|
|
633
|
+
return /* @__PURE__ */ jsx6("div", { className: classnames4, children });
|
|
634
634
|
};
|
|
635
635
|
var ButtonGroup_default = ButtonGroup;
|
|
636
636
|
|
|
@@ -845,18 +845,73 @@ var Checkbox = ({
|
|
|
845
845
|
};
|
|
846
846
|
var Checkbox_default = Checkbox;
|
|
847
847
|
|
|
848
|
+
// src/Chip/Chip.tsx
|
|
849
|
+
var import_classnames7 = __toESM(require_classnames());
|
|
850
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
851
|
+
|
|
852
|
+
// css-module:./Chip.module.css#css-module
|
|
853
|
+
var Chip_module_default = { "chip": "_chip_ev9ht_1", "selectedChip": "_selectedChip_ev9ht_11", "icon": "_icon_ev9ht_16", "selectedIcon": "_selectedIcon_ev9ht_24", "sm": "_sm_ev9ht_28", "lg": "_lg_ev9ht_34" };
|
|
854
|
+
|
|
855
|
+
// src/Chip/Chip.tsx
|
|
856
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
857
|
+
var Chip = forwardRef3(
|
|
858
|
+
({
|
|
859
|
+
selected = false,
|
|
860
|
+
"data-testid": dataTestId,
|
|
861
|
+
size = "sm",
|
|
862
|
+
text,
|
|
863
|
+
onChange,
|
|
864
|
+
icon: Icon
|
|
865
|
+
}, ref) => {
|
|
866
|
+
const chipStyles = (0, import_classnames7.default)(Chip_module_default.chip, Chip_module_default[size], {
|
|
867
|
+
[Chip_module_default.selectedChip]: selected
|
|
868
|
+
});
|
|
869
|
+
const iconStyles = (0, import_classnames7.default)(Chip_module_default.icon, {
|
|
870
|
+
[Chip_module_default.selectedIcon]: selected
|
|
871
|
+
});
|
|
872
|
+
const typographySize2 = {
|
|
873
|
+
["sm"]: 200,
|
|
874
|
+
["lg"]: 300
|
|
875
|
+
};
|
|
876
|
+
return /* @__PURE__ */ jsxs4(
|
|
877
|
+
"button",
|
|
878
|
+
{
|
|
879
|
+
className: chipStyles,
|
|
880
|
+
"data-testid": dataTestId,
|
|
881
|
+
ref,
|
|
882
|
+
type: "button",
|
|
883
|
+
"aria-pressed": selected,
|
|
884
|
+
onClick: onChange,
|
|
885
|
+
children: [
|
|
886
|
+
Icon && /* @__PURE__ */ jsx9(Icon, { className: iconStyles }),
|
|
887
|
+
/* @__PURE__ */ jsx9(Box_default, { paddingX: Icon ? 1 : 0, children: /* @__PURE__ */ jsx9(
|
|
888
|
+
Typography_default,
|
|
889
|
+
{
|
|
890
|
+
size: typographySize2[size],
|
|
891
|
+
color: selected ? "white" : "gray900",
|
|
892
|
+
children: text
|
|
893
|
+
}
|
|
894
|
+
) })
|
|
895
|
+
]
|
|
896
|
+
}
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
);
|
|
900
|
+
Chip.displayName = "Chip";
|
|
901
|
+
var Chip_default = Chip;
|
|
902
|
+
|
|
848
903
|
// css-module:./Divider.module.css#css-module
|
|
849
904
|
var Divider_module_default = { "divider": "_divider_1ddgq_1" };
|
|
850
905
|
|
|
851
906
|
// src/Divider/Divider.tsx
|
|
852
|
-
import { jsx as
|
|
907
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
853
908
|
function Divider() {
|
|
854
|
-
return /* @__PURE__ */
|
|
909
|
+
return /* @__PURE__ */ jsx10("hr", { className: Divider_module_default.divider });
|
|
855
910
|
}
|
|
856
911
|
Divider.displayName = "Divider";
|
|
857
912
|
|
|
858
913
|
// src/Heading/Heading.tsx
|
|
859
|
-
import { jsx as
|
|
914
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
860
915
|
var Heading = ({
|
|
861
916
|
align = "start",
|
|
862
917
|
as = "h1",
|
|
@@ -866,7 +921,7 @@ var Heading = ({
|
|
|
866
921
|
size = 500
|
|
867
922
|
}) => {
|
|
868
923
|
const weight = [700, 800].includes(size) ? "heavy" : "bold";
|
|
869
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ jsx11(
|
|
870
925
|
Typography_default,
|
|
871
926
|
{
|
|
872
927
|
align,
|
|
@@ -882,20 +937,20 @@ var Heading = ({
|
|
|
882
937
|
var Heading_default = Heading;
|
|
883
938
|
|
|
884
939
|
// src/IconButton/IconButton.tsx
|
|
885
|
-
var
|
|
886
|
-
import { forwardRef as
|
|
940
|
+
var import_classnames8 = __toESM(require_classnames());
|
|
941
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
887
942
|
|
|
888
943
|
// css-module:./IconButton.module.css#css-module
|
|
889
944
|
var IconButton_module_default = { "iconButton": "_iconButton_4e8qe_1", "sm": "_sm_4e8qe_46", "md": "_md_4e8qe_51", "lg": "_lg_4e8qe_56", "smIcon": "_smIcon_4e8qe_61", "mdIcon": "_mdIcon_4e8qe_68", "lgIcon": "_lgIcon_4e8qe_75", "secondaryBorder": "_secondaryBorder_4e8qe_82", "secondaryDestructiveBorder": "_secondaryDestructiveBorder_4e8qe_86" };
|
|
890
945
|
|
|
891
946
|
// src/IconButton/IconButton.tsx
|
|
892
|
-
import { jsx as
|
|
947
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
893
948
|
var iconSize2 = {
|
|
894
949
|
["sm"]: IconButton_module_default.smIcon,
|
|
895
950
|
["md"]: IconButton_module_default.mdIcon,
|
|
896
951
|
["lg"]: IconButton_module_default.lgIcon
|
|
897
952
|
};
|
|
898
|
-
var IconButton =
|
|
953
|
+
var IconButton = forwardRef4(
|
|
899
954
|
({
|
|
900
955
|
accessibilityLabel,
|
|
901
956
|
color = "primary",
|
|
@@ -906,7 +961,7 @@ var IconButton = forwardRef3(
|
|
|
906
961
|
tooltip,
|
|
907
962
|
onClick
|
|
908
963
|
}, ref) => {
|
|
909
|
-
return /* @__PURE__ */
|
|
964
|
+
return /* @__PURE__ */ jsx12(
|
|
910
965
|
"button",
|
|
911
966
|
{
|
|
912
967
|
"aria-label": accessibilityLabel,
|
|
@@ -915,7 +970,7 @@ var IconButton = forwardRef3(
|
|
|
915
970
|
title: tooltip,
|
|
916
971
|
disabled,
|
|
917
972
|
onClick,
|
|
918
|
-
className: (0,
|
|
973
|
+
className: (0, import_classnames8.default)(
|
|
919
974
|
IconButton_module_default.iconButton,
|
|
920
975
|
foregroundColor(color),
|
|
921
976
|
backgroundColor(color),
|
|
@@ -926,7 +981,7 @@ var IconButton = forwardRef3(
|
|
|
926
981
|
}
|
|
927
982
|
),
|
|
928
983
|
ref,
|
|
929
|
-
children: /* @__PURE__ */
|
|
984
|
+
children: /* @__PURE__ */ jsx12(Icon, { className: iconSize2[size] })
|
|
930
985
|
}
|
|
931
986
|
);
|
|
932
987
|
}
|
|
@@ -935,8 +990,8 @@ IconButton.displayName = "IconButton";
|
|
|
935
990
|
var IconButton_default = IconButton;
|
|
936
991
|
|
|
937
992
|
// src/LinkButton/LinkButton.tsx
|
|
938
|
-
var
|
|
939
|
-
import { forwardRef as
|
|
993
|
+
var import_classnames9 = __toESM(require_classnames());
|
|
994
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
940
995
|
|
|
941
996
|
// css-module:../Button/Button.module.css#css-module
|
|
942
997
|
var Button_module_default3 = { "button": "_button_1iunh_1", "buttonGap": "_buttonGap_1iunh_9", "fullWidth": "_fullWidth_1iunh_50", "sm": "_sm_1iunh_54", "md": "_md_1iunh_61", "lg": "_lg_1iunh_68", "icon": "_icon_1iunh_75", "smIcon": "_smIcon_1iunh_79", "mdIcon": "_mdIcon_1iunh_86", "lgIcon": "_lgIcon_1iunh_93", "secondaryBorder": "_secondaryBorder_1iunh_100", "secondaryDestructiveBorder": "_secondaryDestructiveBorder_1iunh_104", "loading": "_loading_1iunh_118", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_1iunh_1", "loadingCircle": "_loadingCircle_1iunh_122" };
|
|
@@ -945,8 +1000,8 @@ var Button_module_default3 = { "button": "_button_1iunh_1", "buttonGap": "_butto
|
|
|
945
1000
|
var LinkButton_module_default = { "linkButton": "_linkButton_1b3ot_1", "fitContent": "_fitContent_1b3ot_10" };
|
|
946
1001
|
|
|
947
1002
|
// src/LinkButton/LinkButton.tsx
|
|
948
|
-
import { jsx as
|
|
949
|
-
var LinkButton =
|
|
1003
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1004
|
+
var LinkButton = forwardRef5(
|
|
950
1005
|
({
|
|
951
1006
|
text,
|
|
952
1007
|
href,
|
|
@@ -960,7 +1015,7 @@ var LinkButton = forwardRef4(
|
|
|
960
1015
|
endIcon: EndIcon,
|
|
961
1016
|
onClick
|
|
962
1017
|
}, ref) => {
|
|
963
|
-
return /* @__PURE__ */
|
|
1018
|
+
return /* @__PURE__ */ jsxs5(
|
|
964
1019
|
"a",
|
|
965
1020
|
{
|
|
966
1021
|
href,
|
|
@@ -968,7 +1023,7 @@ var LinkButton = forwardRef4(
|
|
|
968
1023
|
target,
|
|
969
1024
|
ref,
|
|
970
1025
|
rel,
|
|
971
|
-
className: (0,
|
|
1026
|
+
className: (0, import_classnames9.default)(
|
|
972
1027
|
LinkButton_module_default.linkButton,
|
|
973
1028
|
Button_module_default3.button,
|
|
974
1029
|
foregroundColor(color),
|
|
@@ -984,21 +1039,21 @@ var LinkButton = forwardRef4(
|
|
|
984
1039
|
),
|
|
985
1040
|
onClick,
|
|
986
1041
|
children: [
|
|
987
|
-
StartIcon && /* @__PURE__ */
|
|
1042
|
+
StartIcon && /* @__PURE__ */ jsx13(
|
|
988
1043
|
StartIcon,
|
|
989
1044
|
{
|
|
990
|
-
className: (0,
|
|
1045
|
+
className: (0, import_classnames9.default)(Button_module_default3.icon, iconSize_default[size])
|
|
991
1046
|
}
|
|
992
1047
|
),
|
|
993
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ jsx13(
|
|
994
1049
|
Typography_default,
|
|
995
1050
|
{
|
|
996
1051
|
color: foregroundTypographyColor(color),
|
|
997
1052
|
size: textVariant_default[size],
|
|
998
|
-
children: /* @__PURE__ */
|
|
1053
|
+
children: /* @__PURE__ */ jsx13("span", { style: { fontWeight: 500 }, children: text })
|
|
999
1054
|
}
|
|
1000
1055
|
),
|
|
1001
|
-
EndIcon && /* @__PURE__ */
|
|
1056
|
+
EndIcon && /* @__PURE__ */ jsx13(EndIcon, { className: (0, import_classnames9.default)(Button_module_default3.icon, iconSize_default[size]) })
|
|
1002
1057
|
]
|
|
1003
1058
|
}
|
|
1004
1059
|
);
|
|
@@ -1011,18 +1066,18 @@ var LinkButton_default = LinkButton;
|
|
|
1011
1066
|
var MiniActionCard_module_default = { "miniActionCard": "_miniActionCard_qebkn_1", "card": "_card_qebkn_9" };
|
|
1012
1067
|
|
|
1013
1068
|
// src/MiniActionCard/MiniActionCard.tsx
|
|
1014
|
-
import { jsx as
|
|
1069
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1015
1070
|
var MiniActionCard = ({
|
|
1016
1071
|
children
|
|
1017
|
-
}) => /* @__PURE__ */
|
|
1072
|
+
}) => /* @__PURE__ */ jsx14("div", { className: MiniActionCard_module_default.miniActionCard, children });
|
|
1018
1073
|
var MiniActionCard_default = MiniActionCard;
|
|
1019
1074
|
|
|
1020
1075
|
// src/Modal/Modal.tsx
|
|
1021
|
-
var
|
|
1076
|
+
var import_classnames10 = __toESM(require_classnames());
|
|
1022
1077
|
|
|
1023
1078
|
// src/Modal/FocusTrap.tsx
|
|
1024
1079
|
import { useEffect as useEffect2, useRef } from "react";
|
|
1025
|
-
import { jsx as
|
|
1080
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1026
1081
|
function queryFocusableAll(el) {
|
|
1027
1082
|
const selector = [
|
|
1028
1083
|
"a[href]",
|
|
@@ -1083,7 +1138,7 @@ function FocusTrap({
|
|
|
1083
1138
|
}
|
|
1084
1139
|
};
|
|
1085
1140
|
}, [elRef, previouslyFocusedElRef]);
|
|
1086
|
-
return /* @__PURE__ */
|
|
1141
|
+
return /* @__PURE__ */ jsx15("div", { "data-testid": "syntax-focus-trap", ref: elRef, children });
|
|
1087
1142
|
}
|
|
1088
1143
|
|
|
1089
1144
|
// src/Modal/StopScroll.tsx
|
|
@@ -1101,13 +1156,13 @@ function StopScroll(props) {
|
|
|
1101
1156
|
|
|
1102
1157
|
// src/Modal/Layer.tsx
|
|
1103
1158
|
import { createPortal } from "react-dom";
|
|
1104
|
-
import { jsx as
|
|
1159
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1105
1160
|
function Layer({
|
|
1106
1161
|
children,
|
|
1107
1162
|
zIndex = 1
|
|
1108
1163
|
}) {
|
|
1109
1164
|
return createPortal(
|
|
1110
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ jsx16(
|
|
1111
1166
|
Box_default,
|
|
1112
1167
|
{
|
|
1113
1168
|
"data-testid": "syntax-layer",
|
|
@@ -1126,9 +1181,9 @@ function Layer({
|
|
|
1126
1181
|
var Modal_module_default = { "backdrop": "_backdrop_30t3h_1", "closeButton": "_closeButton_30t3h_12", "closeButtonWithImage": "_closeButtonWithImage_30t3h_32" };
|
|
1127
1182
|
|
|
1128
1183
|
// src/Modal/Modal.tsx
|
|
1129
|
-
import { jsx as
|
|
1184
|
+
import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1130
1185
|
function XIcon({ color = "#000" }) {
|
|
1131
|
-
return /* @__PURE__ */
|
|
1186
|
+
return /* @__PURE__ */ jsx17("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", fill: color, children: /* @__PURE__ */ jsx17(
|
|
1132
1187
|
"path",
|
|
1133
1188
|
{
|
|
1134
1189
|
fill: "inherit",
|
|
@@ -1151,14 +1206,14 @@ function Modal({
|
|
|
1151
1206
|
zIndex = 1,
|
|
1152
1207
|
"data-testid": dataTestId
|
|
1153
1208
|
}) {
|
|
1154
|
-
return /* @__PURE__ */
|
|
1209
|
+
return /* @__PURE__ */ jsx17(Layer, { zIndex, children: /* @__PURE__ */ jsx17(StopScroll, { children: /* @__PURE__ */ jsx17(FocusTrap, { children: /* @__PURE__ */ jsx17(
|
|
1155
1210
|
"div",
|
|
1156
1211
|
{
|
|
1157
1212
|
className: Modal_module_default.backdrop,
|
|
1158
1213
|
role: "presentation",
|
|
1159
1214
|
onClick: (e) => e.target === e.currentTarget && onDismiss(),
|
|
1160
1215
|
onKeyDown: (e) => e.key === "Escape" && onDismiss(),
|
|
1161
|
-
children: /* @__PURE__ */
|
|
1216
|
+
children: /* @__PURE__ */ jsxs6(
|
|
1162
1217
|
Box_default,
|
|
1163
1218
|
{
|
|
1164
1219
|
"data-testid": dataTestId,
|
|
@@ -1171,23 +1226,23 @@ function Modal({
|
|
|
1171
1226
|
width: "100%",
|
|
1172
1227
|
dangerouslySetInlineStyle: { __style: { overflow: "hidden" } },
|
|
1173
1228
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ jsx17(Box_default, { position: "relative", children: /* @__PURE__ */ jsx17(
|
|
1175
1230
|
"button",
|
|
1176
1231
|
{
|
|
1177
1232
|
"aria-label": accessibilityCloseLabel,
|
|
1178
1233
|
type: "button",
|
|
1179
|
-
className: (0,
|
|
1234
|
+
className: (0, import_classnames10.default)(Modal_module_default.closeButton, {
|
|
1180
1235
|
[Modal_module_default.closeButtonWithImage]: !!image
|
|
1181
1236
|
}),
|
|
1182
1237
|
onClick: onDismiss,
|
|
1183
|
-
children: /* @__PURE__ */
|
|
1238
|
+
children: /* @__PURE__ */ jsx17(XIcon, { color: image ? "#fff" : "#000" })
|
|
1184
1239
|
}
|
|
1185
1240
|
) }),
|
|
1186
|
-
image && /* @__PURE__ */
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
footer && /* @__PURE__ */
|
|
1241
|
+
image && /* @__PURE__ */ jsx17(Box_default, { maxHeight: 200, children: image }),
|
|
1242
|
+
/* @__PURE__ */ jsxs6(Box_default, { display: "flex", gap: 3, direction: "column", padding: 9, children: [
|
|
1243
|
+
/* @__PURE__ */ jsx17(Heading_default, { as: "h1", size: 500, children: header }),
|
|
1244
|
+
/* @__PURE__ */ jsx17(Box_default, { marginBottom: 4, children }),
|
|
1245
|
+
footer && /* @__PURE__ */ jsx17(
|
|
1191
1246
|
Box_default,
|
|
1192
1247
|
{
|
|
1193
1248
|
display: "flex",
|
|
@@ -1210,14 +1265,14 @@ function Modal({
|
|
|
1210
1265
|
Modal.displayName = "Modal";
|
|
1211
1266
|
|
|
1212
1267
|
// src/RadioButton/RadioButton.tsx
|
|
1213
|
-
var
|
|
1268
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
1214
1269
|
import { useState as useState3 } from "react";
|
|
1215
1270
|
|
|
1216
1271
|
// css-module:./RadioButton.module.css#css-module
|
|
1217
1272
|
var RadioButton_module_default = { "radioBaseContainer": "_radioBaseContainer_6h2zg_1", "disabled": "_disabled_6h2zg_9", "cursorDisabled": "_cursorDisabled_6h2zg_13", "cursorEnabled": "_cursorEnabled_6h2zg_17", "smBase": "_smBase_6h2zg_21", "mdBase": "_mdBase_6h2zg_25", "radioStyleOverride": "_radioStyleOverride_6h2zg_29", "smOverride": "_smOverride_6h2zg_34", "mdOverride": "_mdOverride_6h2zg_39", "background": "_background_6h2zg_44", "sm": "_sm_6h2zg_21", "md": "_md_6h2zg_25", "neutralBorder": "_neutralBorder_6h2zg_61", "smCheckedBorder": "_smCheckedBorder_6h2zg_65", "mdCheckedBorder": "_mdCheckedBorder_6h2zg_69", "errorBorderColor": "_errorBorderColor_6h2zg_73", "borderColor": "_borderColor_6h2zg_77" };
|
|
1218
1273
|
|
|
1219
1274
|
// src/RadioButton/RadioButton.tsx
|
|
1220
|
-
import { jsx as
|
|
1275
|
+
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1221
1276
|
var RadioButton = ({
|
|
1222
1277
|
checked = false,
|
|
1223
1278
|
"data-testid": dataTestId,
|
|
@@ -1232,15 +1287,15 @@ var RadioButton = ({
|
|
|
1232
1287
|
}) => {
|
|
1233
1288
|
const [isFocused, setIsFocused] = useState3(false);
|
|
1234
1289
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1235
|
-
const sharedStyles = (0,
|
|
1290
|
+
const sharedStyles = (0, import_classnames11.default)(RadioButton_module_default.background, RadioButton_module_default[size], {
|
|
1236
1291
|
[RadioButton_module_default.errorBorderColor]: error,
|
|
1237
1292
|
[RadioButton_module_default.borderColor]: !error,
|
|
1238
1293
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
1239
1294
|
});
|
|
1240
|
-
return /* @__PURE__ */
|
|
1295
|
+
return /* @__PURE__ */ jsxs7(
|
|
1241
1296
|
"label",
|
|
1242
1297
|
{
|
|
1243
|
-
className: (0,
|
|
1298
|
+
className: (0, import_classnames11.default)(
|
|
1244
1299
|
RadioButton_module_default.radioBaseContainer,
|
|
1245
1300
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1246
1301
|
{
|
|
@@ -1250,23 +1305,23 @@ var RadioButton = ({
|
|
|
1250
1305
|
}
|
|
1251
1306
|
),
|
|
1252
1307
|
children: [
|
|
1253
|
-
checked ? /* @__PURE__ */
|
|
1308
|
+
checked ? /* @__PURE__ */ jsx18(
|
|
1254
1309
|
"div",
|
|
1255
1310
|
{
|
|
1256
|
-
className: (0,
|
|
1311
|
+
className: (0, import_classnames11.default)(sharedStyles, {
|
|
1257
1312
|
[RadioButton_module_default.mdCheckedBorder]: size === "md",
|
|
1258
1313
|
[RadioButton_module_default.smCheckedBorder]: size === "sm"
|
|
1259
1314
|
})
|
|
1260
1315
|
}
|
|
1261
|
-
) : /* @__PURE__ */
|
|
1262
|
-
/* @__PURE__ */
|
|
1316
|
+
) : /* @__PURE__ */ jsx18("div", { className: (0, import_classnames11.default)(sharedStyles, RadioButton_module_default.neutralBorder) }),
|
|
1317
|
+
/* @__PURE__ */ jsx18(
|
|
1263
1318
|
"input",
|
|
1264
1319
|
{
|
|
1265
1320
|
"data-testid": dataTestId,
|
|
1266
1321
|
type: "radio",
|
|
1267
1322
|
id,
|
|
1268
1323
|
name,
|
|
1269
|
-
className: (0,
|
|
1324
|
+
className: (0, import_classnames11.default)(
|
|
1270
1325
|
RadioButton_module_default.radioStyleOverride,
|
|
1271
1326
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1272
1327
|
{
|
|
@@ -1286,7 +1341,7 @@ var RadioButton = ({
|
|
|
1286
1341
|
}
|
|
1287
1342
|
}
|
|
1288
1343
|
),
|
|
1289
|
-
label && /* @__PURE__ */
|
|
1344
|
+
label && /* @__PURE__ */ jsx18(
|
|
1290
1345
|
Typography_default,
|
|
1291
1346
|
{
|
|
1292
1347
|
size: size === "md" ? 200 : 100,
|
|
@@ -1301,7 +1356,7 @@ var RadioButton = ({
|
|
|
1301
1356
|
var RadioButton_default = RadioButton;
|
|
1302
1357
|
|
|
1303
1358
|
// src/SelectList/SelectList.tsx
|
|
1304
|
-
var
|
|
1359
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
1305
1360
|
import {
|
|
1306
1361
|
useId,
|
|
1307
1362
|
useState as useState4
|
|
@@ -1315,17 +1370,17 @@ var ColorBaseGray800 = "#353535";
|
|
|
1315
1370
|
var SelectList_module_default = { "selectContainer": "_selectContainer_3ifov_1", "opacityOverlay": "_opacityOverlay_3ifov_7", "outerTextContainer": "_outerTextContainer_3ifov_11", "selectWrapper": "_selectWrapper_3ifov_16", "selectBox": "_selectBox_3ifov_21", "selectMouseFocusStyling": "_selectMouseFocusStyling_3ifov_37", "unselected": "_unselected_3ifov_42", "selected": "_selected_3ifov_46", "arrowIcon": "_arrowIcon_3ifov_50", "sm": "_sm_3ifov_64", "md": "_md_3ifov_70", "lg": "_lg_3ifov_76", "selectError": "_selectError_3ifov_82" };
|
|
1316
1371
|
|
|
1317
1372
|
// src/SelectList/SelectOption.tsx
|
|
1318
|
-
import { jsx as
|
|
1373
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1319
1374
|
var SelectOption = ({
|
|
1320
1375
|
"data-testid": dataTestId,
|
|
1321
1376
|
value,
|
|
1322
1377
|
label,
|
|
1323
1378
|
disabled = false
|
|
1324
|
-
}) => /* @__PURE__ */
|
|
1379
|
+
}) => /* @__PURE__ */ jsx19("option", { "data-testid": dataTestId, value, disabled, children: label });
|
|
1325
1380
|
var SelectOption_default = SelectOption;
|
|
1326
1381
|
|
|
1327
1382
|
// src/SelectList/SelectList.tsx
|
|
1328
|
-
import { jsx as
|
|
1383
|
+
import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1329
1384
|
var iconSize3 = {
|
|
1330
1385
|
sm: 20,
|
|
1331
1386
|
md: 24,
|
|
@@ -1347,22 +1402,22 @@ function SelectList({
|
|
|
1347
1402
|
const id = useId();
|
|
1348
1403
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1349
1404
|
const [isFocused, setIsFocused] = useState4(false);
|
|
1350
|
-
return /* @__PURE__ */
|
|
1405
|
+
return /* @__PURE__ */ jsxs8(
|
|
1351
1406
|
"div",
|
|
1352
1407
|
{
|
|
1353
|
-
className: (0,
|
|
1408
|
+
className: (0, import_classnames12.default)(SelectList_module_default.selectContainer, {
|
|
1354
1409
|
[SelectList_module_default.opacityOverlay]: disabled
|
|
1355
1410
|
}),
|
|
1356
1411
|
children: [
|
|
1357
|
-
label && /* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1412
|
+
label && /* @__PURE__ */ jsx20("label", { htmlFor: id, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ jsx20(Typography_default, { size: 100, color: "gray700", children: label }) }),
|
|
1413
|
+
/* @__PURE__ */ jsxs8("div", { className: SelectList_module_default.selectWrapper, children: [
|
|
1414
|
+
/* @__PURE__ */ jsxs8(
|
|
1360
1415
|
"select",
|
|
1361
1416
|
{
|
|
1362
1417
|
id,
|
|
1363
1418
|
"data-testid": dataTestId,
|
|
1364
1419
|
disabled,
|
|
1365
|
-
className: (0,
|
|
1420
|
+
className: (0, import_classnames12.default)(SelectList_module_default.selectBox, SelectList_module_default[size], {
|
|
1366
1421
|
[SelectList_module_default.unselected]: !selectedValue && !errorText,
|
|
1367
1422
|
[SelectList_module_default.selected]: selectedValue && !errorText,
|
|
1368
1423
|
[SelectList_module_default.selectError]: errorText,
|
|
@@ -1377,19 +1432,19 @@ function SelectList({
|
|
|
1377
1432
|
onFocus: () => setIsFocused(true),
|
|
1378
1433
|
onBlur: () => setIsFocused(false),
|
|
1379
1434
|
children: [
|
|
1380
|
-
placeholderText && /* @__PURE__ */
|
|
1435
|
+
placeholderText && /* @__PURE__ */ jsx20("option", { disabled: true, value: placeholderText, children: placeholderText }),
|
|
1381
1436
|
children
|
|
1382
1437
|
]
|
|
1383
1438
|
}
|
|
1384
1439
|
),
|
|
1385
|
-
/* @__PURE__ */
|
|
1440
|
+
/* @__PURE__ */ jsx20("div", { className: SelectList_module_default.arrowIcon, children: /* @__PURE__ */ jsx20(
|
|
1386
1441
|
"svg",
|
|
1387
1442
|
{
|
|
1388
1443
|
focusable: "false",
|
|
1389
1444
|
"aria-hidden": "true",
|
|
1390
1445
|
viewBox: "0 0 24 24",
|
|
1391
1446
|
width: iconSize3[size],
|
|
1392
|
-
children: /* @__PURE__ */
|
|
1447
|
+
children: /* @__PURE__ */ jsx20(
|
|
1393
1448
|
"path",
|
|
1394
1449
|
{
|
|
1395
1450
|
fill: errorText ? ColorBaseDestructive700 : ColorBaseGray800,
|
|
@@ -1399,7 +1454,7 @@ function SelectList({
|
|
|
1399
1454
|
}
|
|
1400
1455
|
) })
|
|
1401
1456
|
] }),
|
|
1402
|
-
(helperText || errorText) && /* @__PURE__ */
|
|
1457
|
+
(helperText || errorText) && /* @__PURE__ */ jsx20("div", { className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ jsx20(
|
|
1403
1458
|
Typography_default,
|
|
1404
1459
|
{
|
|
1405
1460
|
size: 100,
|
|
@@ -1414,7 +1469,7 @@ function SelectList({
|
|
|
1414
1469
|
SelectList.Option = SelectOption_default;
|
|
1415
1470
|
|
|
1416
1471
|
// src/TextField/TextField.tsx
|
|
1417
|
-
var
|
|
1472
|
+
var import_classnames13 = __toESM(require_classnames());
|
|
1418
1473
|
import {
|
|
1419
1474
|
useId as useId2
|
|
1420
1475
|
} from "react";
|
|
@@ -1423,7 +1478,7 @@ import {
|
|
|
1423
1478
|
var TextField_module_default = { "textfield": "_textfield_cltsv_1", "label": "_label_cltsv_21", "sm": "_sm_cltsv_25", "md": "_md_cltsv_30", "lg": "_lg_cltsv_35", "inputError": "_inputError_cltsv_40" };
|
|
1424
1479
|
|
|
1425
1480
|
// src/TextField/TextField.tsx
|
|
1426
|
-
import { jsx as
|
|
1481
|
+
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1427
1482
|
function TextField({
|
|
1428
1483
|
autoComplete,
|
|
1429
1484
|
"data-testid": dataTestId,
|
|
@@ -1440,7 +1495,7 @@ function TextField({
|
|
|
1440
1495
|
}) {
|
|
1441
1496
|
const reactId = useId2();
|
|
1442
1497
|
const inputId = id != null ? id : reactId;
|
|
1443
|
-
return /* @__PURE__ */
|
|
1498
|
+
return /* @__PURE__ */ jsxs9(
|
|
1444
1499
|
Box_default,
|
|
1445
1500
|
{
|
|
1446
1501
|
display: "flex",
|
|
@@ -1453,12 +1508,12 @@ function TextField({
|
|
|
1453
1508
|
}
|
|
1454
1509
|
},
|
|
1455
1510
|
children: [
|
|
1456
|
-
label && /* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1511
|
+
label && /* @__PURE__ */ jsx21("label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ jsx21(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx21(Typography_default, { size: 100, color: "gray700", children: label }) }) }),
|
|
1512
|
+
/* @__PURE__ */ jsx21(
|
|
1458
1513
|
"input",
|
|
1459
1514
|
{
|
|
1460
1515
|
autoComplete,
|
|
1461
|
-
className: (0,
|
|
1516
|
+
className: (0, import_classnames13.default)(TextField_module_default.textfield, TextField_module_default[size], {
|
|
1462
1517
|
[TextField_module_default.inputError]: errorText
|
|
1463
1518
|
}),
|
|
1464
1519
|
"data-testid": dataTestId,
|
|
@@ -1470,7 +1525,7 @@ function TextField({
|
|
|
1470
1525
|
value
|
|
1471
1526
|
}
|
|
1472
1527
|
),
|
|
1473
|
-
(helperText || errorText) && /* @__PURE__ */
|
|
1528
|
+
(helperText || errorText) && /* @__PURE__ */ jsx21(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx21(
|
|
1474
1529
|
Typography_default,
|
|
1475
1530
|
{
|
|
1476
1531
|
size: 100,
|
|
@@ -1490,6 +1545,7 @@ export {
|
|
|
1490
1545
|
ButtonGroup_default as ButtonGroup,
|
|
1491
1546
|
Card,
|
|
1492
1547
|
Checkbox_default as Checkbox,
|
|
1548
|
+
Chip_default as Chip,
|
|
1493
1549
|
Divider,
|
|
1494
1550
|
Heading_default as Heading,
|
|
1495
1551
|
IconButton_default as IconButton,
|