krl-alfred 1.71.9 → 1.71.10

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.
@@ -18,12 +18,13 @@ var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var TextLink_styled_1 = require("./TextLink.styled");
19
19
  var Icon_1 = __importDefault(require("../Icon/Icon"));
20
20
  var TextLink = function (props) {
21
- var onClick = props.onClick, children = props.children, href = props.href, target = props.target, icon = props.icon, iconWidth = props.iconWidth, iconHeight = props.iconHeight;
22
- return ((0, jsx_runtime_1.jsx)(TextLink_styled_1.TextLinkStyled, __assign({ href: href, target: target, onClick: onClick }, props, { children: (0, jsx_runtime_1.jsxs)(TextLink_styled_1.Inner, { children: [icon && ((0, jsx_runtime_1.jsx)(TextLink_styled_1.IconStyled, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: icon, width: iconWidth, height: iconHeight }) })), children] }) })));
21
+ var onClick = props.onClick, children = props.children, href = props.href, target = props.target, icon = props.icon, iconWidth = props.iconWidth, iconHeight = props.iconHeight, size = props.size;
22
+ return ((0, jsx_runtime_1.jsx)(TextLink_styled_1.TextLinkStyled, __assign({ size: size, href: href, target: target, onClick: onClick }, props, { children: (0, jsx_runtime_1.jsxs)(TextLink_styled_1.Inner, { children: [icon && ((0, jsx_runtime_1.jsx)(TextLink_styled_1.IconStyled, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: icon, width: iconWidth, height: iconHeight }) })), children] }) })));
23
23
  };
24
24
  TextLink.defaultProps = {
25
25
  iconWidth: "24px",
26
26
  iconHeight: "24px",
27
27
  variant: "primary",
28
+ size: "small",
28
29
  };
29
30
  exports.default = TextLink;
@@ -9,7 +9,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.Inner = exports.IconStyled = exports.TextLinkStyled = void 0;
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
- exports.TextLinkStyled = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"], ["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"])), function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; });
12
+ exports.TextLinkStyled = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n padding: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"], ["\n color: ", ";\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n display: inline-block;\n text-decoration: none;\n cursor: pointer;\n padding: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n &:hover , :focus , :active {\n color: ", ";\n svg{\n display: block;\n path, rect{\n stroke : ", ";\n }\n circle{\n fill : ", ";\n ~ path{\n stroke : white;\n }\n }\n }\n }\n"])), function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) {
13
+ switch (props.size) {
14
+ case 'small':
15
+ return "0";
16
+ case 'medium':
17
+ return "0.5rem 0 0.5rem 0";
18
+ default:
19
+ return "0";
20
+ }
21
+ }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; }, function (props) { return props.variant === "primary" ? "var(--primary-hover)" : "var(--grey-50)"; });
13
22
  exports.IconStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-right: 0.5rem;\n"], ["\n margin-right: 0.5rem;\n"])));
14
23
  exports.Inner = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"])));
15
24
  var templateObject_1, templateObject_2, templateObject_3;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.iconNames = exports.variants = void 0;
3
+ exports.iconNames = exports.sizes = exports.variants = void 0;
4
4
  var Icon_1 = require("../Icon");
5
5
  exports.variants = ['primary', 'secondary'];
6
+ exports.sizes = ['small', 'medium'];
6
7
  exports.iconNames = Object.keys(Icon_1.iconList);
@@ -13,6 +13,7 @@ exports.default = {
13
13
  tags: ['autodocs'],
14
14
  argTypes: {
15
15
  variant: { control: 'select', options: props_1.variants },
16
+ size: { control: 'select', options: props_1.sizes },
16
17
  icon: { control: 'select', options: Object.keys(Icon_1.iconList) },
17
18
  }
18
19
  };
@@ -20,5 +21,6 @@ exports.Default = {
20
21
  args: {
21
22
  children: "Text Link",
22
23
  variant: "primary",
24
+ size: "small",
23
25
  },
24
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "1.71.9",
3
+ "version": "1.71.10",
4
4
  "files": [
5
5
  "dist"
6
6
  ],