@cambly/syntax-core 6.7.0 → 6.8.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.css +47 -33
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +26 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -425,6 +425,9 @@ var Box = (0, import_react.forwardRef)(function Box2(props, ref) {
|
|
|
425
425
|
});
|
|
426
426
|
var Box_default = Box;
|
|
427
427
|
|
|
428
|
+
// css-module:./Badge.module.css#css-module
|
|
429
|
+
var Badge_module_default = { "icon": "_icon_f2bzd_1" };
|
|
430
|
+
|
|
428
431
|
// src/Badge/Badge.tsx
|
|
429
432
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
430
433
|
var textColorForBackgroundColor = (color) => {
|
|
@@ -437,6 +440,7 @@ var textColorForBackgroundColor = (color) => {
|
|
|
437
440
|
}
|
|
438
441
|
};
|
|
439
442
|
var Badge = ({
|
|
443
|
+
icon: Icon,
|
|
440
444
|
text,
|
|
441
445
|
color = "primary700"
|
|
442
446
|
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -447,15 +451,19 @@ var Badge = ({
|
|
|
447
451
|
paddingY: 1,
|
|
448
452
|
rounding: "full",
|
|
449
453
|
backgroundColor: color,
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
{
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
454
|
+
dangerouslySetInlineStyle: { __style: { lineHeight: "14px" } },
|
|
455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Typography_default, { color: textColorForBackgroundColor(color), size: 100, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { display: "flex", gap: 1, alignItems: "center", justifyContent: "start", children: [
|
|
456
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { className: Badge_module_default.icon }),
|
|
457
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
458
|
+
Typography_default,
|
|
459
|
+
{
|
|
460
|
+
color: textColorForBackgroundColor(color),
|
|
461
|
+
size: 100,
|
|
462
|
+
weight: "bold",
|
|
463
|
+
children: text
|
|
464
|
+
}
|
|
465
|
+
)
|
|
466
|
+
] }) })
|
|
459
467
|
}
|
|
460
468
|
);
|
|
461
469
|
var Badge_default = Badge;
|
|
@@ -521,7 +529,7 @@ function foregroundTypographyColor(color) {
|
|
|
521
529
|
}
|
|
522
530
|
|
|
523
531
|
// css-module:../Button.module.css#css-module
|
|
524
|
-
var Button_module_default = { "button": "
|
|
532
|
+
var Button_module_default = { "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" };
|
|
525
533
|
|
|
526
534
|
// src/Button/constants/iconSize.ts
|
|
527
535
|
var iconSize = {
|
|
@@ -548,7 +556,7 @@ var loadingIconSize = {
|
|
|
548
556
|
var loadingIconSize_default = loadingIconSize;
|
|
549
557
|
|
|
550
558
|
// css-module:./Button.module.css#css-module
|
|
551
|
-
var Button_module_default2 = { "button": "
|
|
559
|
+
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" };
|
|
552
560
|
|
|
553
561
|
// src/Button/Button.tsx
|
|
554
562
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
@@ -894,7 +902,7 @@ var import_classnames7 = __toESM(require_classnames());
|
|
|
894
902
|
var import_react5 = require("react");
|
|
895
903
|
|
|
896
904
|
// css-module:./IconButton.module.css#css-module
|
|
897
|
-
var IconButton_module_default = { "iconButton": "
|
|
905
|
+
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" };
|
|
898
906
|
|
|
899
907
|
// src/IconButton/IconButton.tsx
|
|
900
908
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
@@ -927,7 +935,11 @@ var IconButton = (0, import_react5.forwardRef)(
|
|
|
927
935
|
IconButton_module_default.iconButton,
|
|
928
936
|
foregroundColor(color),
|
|
929
937
|
backgroundColor(color),
|
|
930
|
-
IconButton_module_default[size]
|
|
938
|
+
IconButton_module_default[size],
|
|
939
|
+
{
|
|
940
|
+
[IconButton_module_default.secondaryBorder]: color === "secondary",
|
|
941
|
+
[IconButton_module_default.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
942
|
+
}
|
|
931
943
|
),
|
|
932
944
|
ref,
|
|
933
945
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: iconSize2[size] })
|
|
@@ -942,7 +954,7 @@ var IconButton_default = IconButton;
|
|
|
942
954
|
var import_classnames8 = __toESM(require_classnames());
|
|
943
955
|
|
|
944
956
|
// css-module:../Button/Button.module.css#css-module
|
|
945
|
-
var Button_module_default3 = { "button": "
|
|
957
|
+
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" };
|
|
946
958
|
|
|
947
959
|
// css-module:./LinkButton.module.css#css-module
|
|
948
960
|
var LinkButton_module_default = { "linkButton": "_linkButton_1b3ot_1", "fitContent": "_fitContent_1b3ot_10" };
|