@luscii-healthtech/web-ui 0.15.2 → 0.15.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.
@@ -1,18 +1,4 @@
1
- import React from "react";
2
1
  export interface IconProps {
3
2
  className?: string;
4
3
  onClick?: () => void;
5
- /**
6
- * The trick to a perfectly center item is to make it translate in -half its dimensions.
7
- * Because IE11 doesn't support translating SVG elements in CSS, we need to tap into the
8
- * attribute from the SVG itself to do that.
9
- *
10
- * We can make it dynamic with `ref` and javascript but for now this is good enough.
11
- *
12
- * Assuming `20` is the rendered component height:
13
- *
14
- * @example <SVGIconComponent className="absolute top-1/2" transform="translate(0, -20)" />
15
- *
16
- */
17
- transform?: React.SVGAttributes<SVGSVGElement>["transform"];
18
4
  }
@@ -2033,6 +2033,10 @@ video {
2033
2033
  --transform-translate-x: -50%;
2034
2034
  }
2035
2035
 
2036
+ .-translate-y-1\/2 {
2037
+ --transform-translate-y: -50%;
2038
+ }
2039
+
2036
2040
  .transition-all {
2037
2041
  transition-property: all;
2038
2042
  }
@@ -1828,7 +1828,6 @@ var CrossIcon = function CrossIcon(props) {
1828
1828
  return /*#__PURE__*/React__default.createElement("svg", {
1829
1829
  className: props.className,
1830
1830
  onClick: props.onClick,
1831
- transform: props.transform,
1832
1831
  role: props.onClick ? "button" : undefined,
1833
1832
  width: "24",
1834
1833
  height: "24",
@@ -1925,10 +1924,11 @@ var Input = function Input(_ref) {
1925
1924
  "rounded-l border-l": withPrefix !== "",
1926
1925
  "rounded-r border-r": withSuffix !== ""
1927
1926
  }, "border-t border-b border-solid border-input-border", "flex flex-col items-center p-3", "text-sm", "text-slate-500", "bg-main-background")
1928
- }, withSuffix || withPrefix), icon && /*#__PURE__*/React__default.createElement(icon, {
1929
- transform: "translate(0, -12)",
1930
- className: "w-6 h-6 top-1/2 left-4 text-slate-300 absolute"
1931
- }), /*#__PURE__*/React__default.createElement("input", Object.assign({}, otherProps, {
1927
+ }, withSuffix || withPrefix), icon && /*#__PURE__*/React__default.createElement("div", {
1928
+ className: "absolute transform -translate-y-1/2 top-1/2 left-4"
1929
+ }, /*#__PURE__*/React__default.createElement(icon, {
1930
+ className: "w-6 h-6 text-slate-300 "
1931
+ })), /*#__PURE__*/React__default.createElement("input", Object.assign({}, otherProps, {
1932
1932
  "data-test-id": "input-component",
1933
1933
  name: name,
1934
1934
  value: innerValue,
@@ -1957,14 +1957,15 @@ var Input = function Input(_ref) {
1957
1957
  "order-2": withPrefix !== "",
1958
1958
  "order-1": withSuffix !== ""
1959
1959
  }, "shadow-default", className)
1960
- })), /*#__PURE__*/React__default.createElement(CrossIcon, {
1961
- transform: "translate(0, -12)",
1962
- className: classNames("absolute right-0 top-1/2", "w-6 h-6 mr-3 cursor-pointer text-slate-300", {
1960
+ })), /*#__PURE__*/React__default.createElement("div", {
1961
+ className: "absolute right-0 transform -translate-y-1/2 top-1/2"
1962
+ }, /*#__PURE__*/React__default.createElement(CrossIcon, {
1963
+ className: classNames("w-6 h-6 mr-3 cursor-pointer text-slate-300", {
1963
1964
  block: isClearIconVisible,
1964
1965
  hidden: !isClearIconVisible
1965
1966
  }),
1966
1967
  onClick: clearField
1967
- })));
1968
+ }))));
1968
1969
  };
1969
1970
 
1970
1971
  var Line = function Line(_ref) {
@@ -4519,7 +4520,6 @@ var SearchIcon = function SearchIcon(props) {
4519
4520
  return /*#__PURE__*/React__default.createElement("svg", {
4520
4521
  className: props.className,
4521
4522
  onClick: props.onClick,
4522
- transform: props.transform,
4523
4523
  role: props.onClick ? "button" : undefined,
4524
4524
  width: "24",
4525
4525
  height: "24",