krl-alfred 1.75.2 → 1.75.3

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,13 +18,14 @@ 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, 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] }) })));
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, iconDirection = props.iconDirection;
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, __assign({ iconDirection: iconDirection }, { children: [icon && ((0, jsx_runtime_1.jsx)(TextLink_styled_1.IconStyled, __assign({ iconDirection: iconDirection }, { 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
28
  size: "small",
29
+ iconDirection: "left",
29
30
  };
30
31
  exports.default = TextLink;
@@ -19,6 +19,6 @@ exports.TextLinkStyled = styled_components_1.default.a(templateObject_1 || (temp
19
19
  return "0";
20
20
  }
21
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)"; });
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"])));
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"])));
22
+ exports.IconStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), function (props) { return props.iconDirection === 'right' ? "margin-left: 0.5rem;" : 'margin-right: 0.5rem;'; });
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 flex-direction:", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-direction:", ";\n"])), function (props) { return props.iconDirection === 'right' ? "row-reverse" : 'row'; });
24
24
  var templateObject_1, templateObject_2, templateObject_3;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.iconNames = exports.sizes = exports.variants = void 0;
3
+ exports.iconNames = exports.iconDirections = exports.sizes = exports.variants = void 0;
4
4
  var Icon_1 = require("../Icon");
5
5
  exports.variants = ['primary', 'secondary'];
6
6
  exports.sizes = ['small', 'medium'];
7
+ exports.iconDirections = ['left', 'right'];
7
8
  exports.iconNames = Object.keys(Icon_1.iconList);
@@ -14,6 +14,7 @@ exports.default = {
14
14
  argTypes: {
15
15
  variant: { control: 'select', options: props_1.variants },
16
16
  size: { control: 'select', options: props_1.sizes },
17
+ iconDirection: { control: 'select', options: props_1.iconDirections },
17
18
  icon: { control: 'select', options: Object.keys(Icon_1.iconList) },
18
19
  }
19
20
  };
@@ -22,5 +23,6 @@ exports.Default = {
22
23
  children: "Text Link",
23
24
  variant: "primary",
24
25
  size: "small",
26
+ iconDirection: "left",
25
27
  },
26
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "1.75.2",
3
+ "version": "1.75.3",
4
4
  "files": [
5
5
  "dist"
6
6
  ],