@cambly/syntax-core 7.3.0 → 7.4.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 +6 -5
- package/dist/index.js +72 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -936,6 +936,7 @@ var IconButton_default = IconButton;
|
|
|
936
936
|
|
|
937
937
|
// src/LinkButton/LinkButton.tsx
|
|
938
938
|
var import_classnames8 = __toESM(require_classnames());
|
|
939
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
939
940
|
|
|
940
941
|
// css-module:../Button/Button.module.css#css-module
|
|
941
942
|
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,56 +946,66 @@ var LinkButton_module_default = { "linkButton": "_linkButton_1b3ot_1", "fitConte
|
|
|
945
946
|
|
|
946
947
|
// src/LinkButton/LinkButton.tsx
|
|
947
948
|
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
[
|
|
976
|
-
[LinkButton_module_default.fitContent]: !fullWidth,
|
|
977
|
-
[Button_module_default3.buttonGap]: size === "lg" || size === "md",
|
|
978
|
-
[Button_module_default3.secondaryBorder]: color === "secondary",
|
|
979
|
-
[Button_module_default3.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
980
|
-
}
|
|
981
|
-
),
|
|
982
|
-
onClick,
|
|
983
|
-
children: [
|
|
984
|
-
StartIcon && /* @__PURE__ */ jsx12(StartIcon, { className: (0, import_classnames8.default)(Button_module_default3.icon, iconSize_default[size]) }),
|
|
985
|
-
/* @__PURE__ */ jsx12(
|
|
986
|
-
Typography_default,
|
|
949
|
+
var LinkButton = forwardRef4(
|
|
950
|
+
({
|
|
951
|
+
text,
|
|
952
|
+
href,
|
|
953
|
+
target,
|
|
954
|
+
rel,
|
|
955
|
+
"data-testid": dataTestId,
|
|
956
|
+
color = "primary",
|
|
957
|
+
size = "md",
|
|
958
|
+
fullWidth = false,
|
|
959
|
+
startIcon: StartIcon,
|
|
960
|
+
endIcon: EndIcon,
|
|
961
|
+
onClick
|
|
962
|
+
}, ref) => {
|
|
963
|
+
return /* @__PURE__ */ jsxs4(
|
|
964
|
+
"a",
|
|
965
|
+
{
|
|
966
|
+
href,
|
|
967
|
+
"data-testid": dataTestId,
|
|
968
|
+
target,
|
|
969
|
+
ref,
|
|
970
|
+
rel,
|
|
971
|
+
className: (0, import_classnames8.default)(
|
|
972
|
+
LinkButton_module_default.linkButton,
|
|
973
|
+
Button_module_default3.button,
|
|
974
|
+
foregroundColor(color),
|
|
975
|
+
backgroundColor(color),
|
|
976
|
+
Button_module_default3[size],
|
|
987
977
|
{
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
978
|
+
[Button_module_default3.fullWidth]: fullWidth,
|
|
979
|
+
[LinkButton_module_default.fitContent]: !fullWidth,
|
|
980
|
+
[Button_module_default3.buttonGap]: size === "lg" || size === "md",
|
|
981
|
+
[Button_module_default3.secondaryBorder]: color === "secondary",
|
|
982
|
+
[Button_module_default3.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
991
983
|
}
|
|
992
984
|
),
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
985
|
+
onClick,
|
|
986
|
+
children: [
|
|
987
|
+
StartIcon && /* @__PURE__ */ jsx12(
|
|
988
|
+
StartIcon,
|
|
989
|
+
{
|
|
990
|
+
className: (0, import_classnames8.default)(Button_module_default3.icon, iconSize_default[size])
|
|
991
|
+
}
|
|
992
|
+
),
|
|
993
|
+
/* @__PURE__ */ jsx12(
|
|
994
|
+
Typography_default,
|
|
995
|
+
{
|
|
996
|
+
color: foregroundTypographyColor(color),
|
|
997
|
+
size: textVariant_default[size],
|
|
998
|
+
children: /* @__PURE__ */ jsx12("span", { style: { fontWeight: 500 }, children: text })
|
|
999
|
+
}
|
|
1000
|
+
),
|
|
1001
|
+
EndIcon && /* @__PURE__ */ jsx12(EndIcon, { className: (0, import_classnames8.default)(Button_module_default3.icon, iconSize_default[size]) })
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
);
|
|
1007
|
+
LinkButton.displayName = "LinkButton";
|
|
1008
|
+
var LinkButton_default = LinkButton;
|
|
998
1009
|
|
|
999
1010
|
// css-module:./MiniActionCard.module.css#css-module
|
|
1000
1011
|
var MiniActionCard_module_default = { "miniActionCard": "_miniActionCard_qebkn_1", "card": "_card_qebkn_9" };
|
|
@@ -1482,7 +1493,7 @@ export {
|
|
|
1482
1493
|
Divider,
|
|
1483
1494
|
Heading_default as Heading,
|
|
1484
1495
|
IconButton_default as IconButton,
|
|
1485
|
-
LinkButton,
|
|
1496
|
+
LinkButton_default as LinkButton,
|
|
1486
1497
|
MiniActionCard_default as MiniActionCard,
|
|
1487
1498
|
Modal,
|
|
1488
1499
|
RadioButton_default as RadioButton,
|