@luscii-healthtech/web-ui 58.14.0 → 58.14.1
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/esm/components/Icons/iconWrapper/iconWrapper.js +9 -1
- package/dist/esm/components/Icons/iconWrapper/iconWrapper.js.map +1 -1
- package/dist/index.development.js +9 -1
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stories/Icon.stories.d.ts +8 -0
- package/package.json +1 -1
|
@@ -4,11 +4,19 @@ import classNames from 'classnames';
|
|
|
4
4
|
import { allowedColors } from '../../Text/Text.js';
|
|
5
5
|
|
|
6
6
|
const IconWrapper = (SVGComponent) => (_a) => {
|
|
7
|
+
var _b;
|
|
7
8
|
var { className, size, color } = _a, rest = __rest(_a, ["className", "size", "color"]);
|
|
9
|
+
const hasAccessibleName = Boolean(rest["aria-label"] || rest["aria-labelledby"]);
|
|
10
|
+
let role;
|
|
11
|
+
if (rest.onClick) {
|
|
12
|
+
role = "button";
|
|
13
|
+
} else if (hasAccessibleName) {
|
|
14
|
+
role = "img";
|
|
15
|
+
}
|
|
8
16
|
const classes = classNames({
|
|
9
17
|
"ui:h-[20px] ui:w-[20px]": size === "s"
|
|
10
18
|
}, className, color ? allowedColors[color] : void 0);
|
|
11
|
-
return jsx(SVGComponent, Object.assign({ role: rest.
|
|
19
|
+
return jsx(SVGComponent, Object.assign({ role, "aria-hidden": ((_b = rest.role) !== null && _b !== void 0 ? _b : role) ? void 0 : "true", className: classes }, rest));
|
|
12
20
|
};
|
|
13
21
|
|
|
14
22
|
export { IconWrapper as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconWrapper.js","sources":["../../../../../../../src/components/Icons/iconWrapper/iconWrapper.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"iconWrapper.js","sources":["../../../../../../../src/components/Icons/iconWrapper/iconWrapper.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAWA,MAAM,WAAA,GACJ,CACE,YAAA,KAEF,CAAC,EAAA,KAAuC;;MAAvC,EAAE,SAAA,EAAW,IAAA,EAAM,KAAA,SAAU,IAAA,GAAI,MAAA,CAAA,EAAA,EAAjC,CAAA,WAAA,EAAA,MAAA,EAAA,OAAA,CAAmC,CAAA;AAClC,EAAA,MAAM,oBAAoB,OAAA,CACxB,IAAA,CAAK,YAAY,CAAA,IAAK,IAAA,CAAK,iBAAiB,CAAC,CAAA;AAE/C,EAAA,IAAI,IAAA;AACJ,EAAA,IAAI,KAAK,OAAA,EAAS;AAChB,IAAA,IAAA,GAAO,QAAA;AAAA,EACT,WAAW,iBAAA,EAAmB;AAC5B,IAAA,IAAA,GAAO,KAAA;AAAA,EACT;AACA,EAAA,MAAM,UAAU,UAAA,CACd;AAAA,IACE,2BAA2B,IAAA,KAAS;AAAA,KAEtC,SAAA,EACA,KAAA,GAAQ,aAAA,CAAc,KAAK,IAAI,MAAS,CAAA;AAG1C,EAAA,OACEA,GAAA,CAAC,cAAY,MAAA,CAAA,MAAA,CAAA,EACX,IAAA,EAAU,aAAA,EAAA,CAAA,CACI,KAAA,IAAA,CAAK,IAAA,mCAAQ,IAAA,IAAQ,MAAA,GAAY,QAC/C,SAAA,EAAW,OAAA,EAAO,EACd,IAAI,CAAA,CAAA;AAGd;;"}
|
|
@@ -373,11 +373,19 @@ const Text = (props) => {
|
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
const IconWrapper$1 = (SVGComponent) => (_a) => {
|
|
376
|
+
var _b;
|
|
376
377
|
var { className, size, color } = _a, rest = __rest(_a, ["className", "size", "color"]);
|
|
378
|
+
const hasAccessibleName = Boolean(rest["aria-label"] || rest["aria-labelledby"]);
|
|
379
|
+
let role;
|
|
380
|
+
if (rest.onClick) {
|
|
381
|
+
role = "button";
|
|
382
|
+
} else if (hasAccessibleName) {
|
|
383
|
+
role = "img";
|
|
384
|
+
}
|
|
377
385
|
const classes = classNames__default.default({
|
|
378
386
|
"ui:h-[20px] ui:w-[20px]": size === "s"
|
|
379
387
|
}, className, color ? allowedColors[color] : void 0);
|
|
380
|
-
return jsxRuntime.jsx(SVGComponent, Object.assign({ role: rest.
|
|
388
|
+
return jsxRuntime.jsx(SVGComponent, Object.assign({ role, "aria-hidden": ((_b = rest.role) !== null && _b !== void 0 ? _b : role) ? void 0 : "true", className: classes }, rest));
|
|
381
389
|
};
|
|
382
390
|
|
|
383
391
|
const SvgActionBloodPressureColoredIcon = (props) => jsxRuntime.jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 28, height: 28, fill: "none", viewBox: "0 0 28 28" }, props, { children: jsxRuntime.jsxs("g", { clipPath: "url(#clip0_153_5219)", children: [jsxRuntime.jsx("path", { fill: "#F09", fillRule: "evenodd", d: "M3.075 14.47s-4.917-4.927.387-9.873c0 0 1.942-2.065 5.87-1.498 2.227.322 3.1 1.383 4.581 3.626 0 0 1.836-3.558 6.696-3.57 4.14-.012 7.312 4.635 6.148 8.452 0 0-.39 1.19-2.008 2.863L13.94 25z", clipRule: "evenodd" }), jsxRuntime.jsx("path", { fill: "#fff", d: "M16.689 7.565c1.735-1.793 3.424-2.169 5.242-1.22 1.817.948 2.508 2.813 2.037 5.77a.71.71 0 0 0 .602.812.72.72 0 0 0 .825-.592c.558-3.504-.358-5.977-2.786-7.244-2.426-1.265-4.807-.736-6.967 1.496a.7.7 0 0 0 .026 1.003.73.73 0 0 0 1.021-.025", opacity: 0.232 }), jsxRuntime.jsx("path", { fill: "#6670A5", d: "M20.5 20.001a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13" }), jsxRuntime.jsx("path", { fill: "#6670A5", d: "M22 16.502a1.5 1.5 0 0 0-3 0v9a1.5 1.5 0 1 0 3 0z" }), jsxRuntime.jsx("path", { fill: "#6670A5", d: "M24.5 27.004a1.5 1.5 0 0 0 0-3h-4a1.5 1.5 0 1 0 0 3z" }), jsxRuntime.jsx("path", { fill: "#fff", d: "M20.498 18.002a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9" }), jsxRuntime.jsxs("g", { fill: "#009FE3", children: [jsxRuntime.jsx("path", { d: "M21 15.002a1 1 0 1 0 0-2 1 1 0 0 0 0 2" }), jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M18.5 11.498a.707.707 0 0 1 1 0l2 2a.707.707 0 0 1-1 1l-2-2a.707.707 0 0 1 0-1", clipRule: "evenodd" })] })] }) }));
|