@cambly/syntax-core 6.7.1 → 6.9.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.mjs CHANGED
@@ -396,8 +396,11 @@ var Box = forwardRef(function Box2(props, ref) {
396
396
  });
397
397
  var Box_default = Box;
398
398
 
399
+ // css-module:./Badge.module.css#css-module
400
+ var Badge_module_default = { "icon": "_icon_f2bzd_1" };
401
+
399
402
  // src/Badge/Badge.tsx
400
- import { jsx as jsx4 } from "react/jsx-runtime";
403
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
401
404
  var textColorForBackgroundColor = (color) => {
402
405
  switch (color) {
403
406
  case "gray200":
@@ -408,6 +411,7 @@ var textColorForBackgroundColor = (color) => {
408
411
  }
409
412
  };
410
413
  var Badge = ({
414
+ icon: Icon,
411
415
  text,
412
416
  color = "primary700"
413
417
  }) => /* @__PURE__ */ jsx4(
@@ -418,15 +422,19 @@ var Badge = ({
418
422
  paddingY: 1,
419
423
  rounding: "full",
420
424
  backgroundColor: color,
421
- children: /* @__PURE__ */ jsx4(
422
- Typography_default,
423
- {
424
- color: textColorForBackgroundColor(color),
425
- size: 100,
426
- weight: "bold",
427
- children: text
428
- }
429
- )
425
+ dangerouslySetInlineStyle: { __style: { lineHeight: "14px" } },
426
+ children: /* @__PURE__ */ jsx4(Typography_default, { color: textColorForBackgroundColor(color), size: 100, children: /* @__PURE__ */ jsxs(Box_default, { display: "flex", gap: 1, alignItems: "center", justifyContent: "start", children: [
427
+ Icon && /* @__PURE__ */ jsx4(Icon, { className: Badge_module_default.icon }),
428
+ /* @__PURE__ */ jsx4(
429
+ Typography_default,
430
+ {
431
+ color: textColorForBackgroundColor(color),
432
+ size: 100,
433
+ weight: "bold",
434
+ children: text
435
+ }
436
+ )
437
+ ] }) })
430
438
  }
431
439
  );
432
440
  var Badge_default = Badge;
@@ -522,7 +530,7 @@ var loadingIconSize_default = loadingIconSize;
522
530
  var Button_module_default2 = { "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" };
523
531
 
524
532
  // src/Button/Button.tsx
525
- import { jsx as jsx5, jsxs } from "react/jsx-runtime";
533
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
526
534
  var Button = forwardRef2(
527
535
  ({
528
536
  "data-testid": dataTestId,
@@ -540,7 +548,7 @@ var Button = forwardRef2(
540
548
  tooltip,
541
549
  type = "button"
542
550
  }, ref) => {
543
- return /* @__PURE__ */ jsxs(
551
+ return /* @__PURE__ */ jsxs2(
544
552
  "button",
545
553
  {
546
554
  "data-testid": dataTestId,
@@ -752,7 +760,7 @@ var Checkbox_module_default = { "mainContainer": "_mainContainer_1omm6_1", "inpu
752
760
  var Focus_module_default = { "accessibilityOutlineFocus": "_accessibilityOutlineFocus_1h8bq_1" };
753
761
 
754
762
  // src/Checkbox/Checkbox.tsx
755
- import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
763
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
756
764
  var typographySize = {
757
765
  sm: 100,
758
766
  md: 200
@@ -783,7 +791,7 @@ var Checkbox = ({
783
791
  [Checkbox_module_default.checkedError]: error,
784
792
  [Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
785
793
  });
786
- return /* @__PURE__ */ jsxs2(
794
+ return /* @__PURE__ */ jsxs3(
787
795
  "label",
788
796
  {
789
797
  className: (0, import_classnames6.default)(
@@ -923,7 +931,7 @@ var Button_module_default3 = { "button": "_button_1iunh_1", "buttonGap": "_butto
923
931
  var LinkButton_module_default = { "linkButton": "_linkButton_1b3ot_1", "fitContent": "_fitContent_1b3ot_10" };
924
932
 
925
933
  // src/LinkButton/LinkButton.tsx
926
- import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
934
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
927
935
  function LinkButton({
928
936
  text,
929
937
  href,
@@ -937,7 +945,7 @@ function LinkButton({
937
945
  endIcon: EndIcon,
938
946
  onClick
939
947
  }) {
940
- return /* @__PURE__ */ jsxs3(
948
+ return /* @__PURE__ */ jsxs4(
941
949
  "a",
942
950
  {
943
951
  href,
@@ -1094,7 +1102,7 @@ function Layer({
1094
1102
  var Modal_module_default = { "backdrop": "_backdrop_30t3h_1", "closeButton": "_closeButton_30t3h_12", "closeButtonWithImage": "_closeButtonWithImage_30t3h_32" };
1095
1103
 
1096
1104
  // src/Modal/Modal.tsx
1097
- import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
1105
+ import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
1098
1106
  function XIcon({ color = "#000" }) {
1099
1107
  return /* @__PURE__ */ jsx16("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", fill: color, children: /* @__PURE__ */ jsx16(
1100
1108
  "path",
@@ -1126,7 +1134,7 @@ function Modal({
1126
1134
  role: "presentation",
1127
1135
  onClick: (e) => e.target === e.currentTarget && onDismiss(),
1128
1136
  onKeyDown: (e) => e.key === "Escape" && onDismiss(),
1129
- children: /* @__PURE__ */ jsxs4(
1137
+ children: /* @__PURE__ */ jsxs5(
1130
1138
  Box_default,
1131
1139
  {
1132
1140
  "data-testid": dataTestId,
@@ -1152,7 +1160,7 @@ function Modal({
1152
1160
  }
1153
1161
  ) }),
1154
1162
  image && /* @__PURE__ */ jsx16(Box_default, { maxHeight: 200, children: image }),
1155
- /* @__PURE__ */ jsxs4(Box_default, { display: "flex", gap: 3, direction: "column", padding: 9, children: [
1163
+ /* @__PURE__ */ jsxs5(Box_default, { display: "flex", gap: 3, direction: "column", padding: 9, children: [
1156
1164
  /* @__PURE__ */ jsx16(Heading_default, { as: "h1", size: 500, children: header }),
1157
1165
  /* @__PURE__ */ jsx16(Box_default, { marginBottom: 4, children }),
1158
1166
  footer && /* @__PURE__ */ jsx16(
@@ -1185,7 +1193,7 @@ import { useState as useState3 } from "react";
1185
1193
  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" };
1186
1194
 
1187
1195
  // src/RadioButton/RadioButton.tsx
1188
- import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
1196
+ import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
1189
1197
  var RadioButton = ({
1190
1198
  checked = false,
1191
1199
  "data-testid": dataTestId,
@@ -1205,7 +1213,7 @@ var RadioButton = ({
1205
1213
  [RadioButton_module_default.borderColor]: !error,
1206
1214
  [Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
1207
1215
  });
1208
- return /* @__PURE__ */ jsxs5(
1216
+ return /* @__PURE__ */ jsxs6(
1209
1217
  "label",
1210
1218
  {
1211
1219
  className: (0, import_classnames10.default)(
@@ -1293,7 +1301,7 @@ var SelectOption = ({
1293
1301
  var SelectOption_default = SelectOption;
1294
1302
 
1295
1303
  // src/SelectList/SelectList.tsx
1296
- import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
1304
+ import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
1297
1305
  var iconSize3 = {
1298
1306
  sm: 20,
1299
1307
  md: 24,
@@ -1315,7 +1323,7 @@ function SelectList({
1315
1323
  const id = useId();
1316
1324
  const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
1317
1325
  const [isFocused, setIsFocused] = useState4(false);
1318
- return /* @__PURE__ */ jsxs6(
1326
+ return /* @__PURE__ */ jsxs7(
1319
1327
  "div",
1320
1328
  {
1321
1329
  className: (0, import_classnames11.default)(SelectList_module_default.selectContainer, {
@@ -1323,8 +1331,8 @@ function SelectList({
1323
1331
  }),
1324
1332
  children: [
1325
1333
  label && /* @__PURE__ */ jsx19("label", { htmlFor: id, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ jsx19(Typography_default, { size: 100, color: "gray700", children: label }) }),
1326
- /* @__PURE__ */ jsxs6("div", { className: SelectList_module_default.selectWrapper, children: [
1327
- /* @__PURE__ */ jsxs6(
1334
+ /* @__PURE__ */ jsxs7("div", { className: SelectList_module_default.selectWrapper, children: [
1335
+ /* @__PURE__ */ jsxs7(
1328
1336
  "select",
1329
1337
  {
1330
1338
  id,
@@ -1391,7 +1399,7 @@ import {
1391
1399
  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" };
1392
1400
 
1393
1401
  // src/TextField/TextField.tsx
1394
- import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
1402
+ import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
1395
1403
  function TextField({
1396
1404
  autoComplete,
1397
1405
  "data-testid": dataTestId,
@@ -1408,7 +1416,7 @@ function TextField({
1408
1416
  }) {
1409
1417
  const reactId = useId2();
1410
1418
  const inputId = id != null ? id : reactId;
1411
- return /* @__PURE__ */ jsxs7(
1419
+ return /* @__PURE__ */ jsxs8(
1412
1420
  Box_default,
1413
1421
  {
1414
1422
  display: "flex",