@zenpatient-org/healthspan-marketing-ui 0.2.46 → 0.2.48
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/components/Quote/Quote.d.ts +1 -1
- package/dist/components/RatingPreview/RatingPreview.cjs.js +1 -1
- package/dist/components/RatingPreview/RatingPreview.d.ts +0 -1
- package/dist/components/RatingPreview/RatingPreview.es.js +6 -7
- package/dist/modules/BasicImageText/basicImageText.module.css +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../../src/components/RatingPreview/ratingPreview.module.css"),n=require("../Typography/Typography.cjs.js"),c=require("../Icon/Icon.cjs.js"),l=require("../Icon/constants.cjs.js"),u=s=>{const e=Math.round(s*2)/2,a=[];for(let r=0;r<Math.floor(e);r++)a.push(o.jsx(c.Icon,{name:l.EIconName.STAR_FILL,className:t.starIcon},`full-${r}`));return e%1===.5&&a.push(o.jsx(c.Icon,{name:l.EIconName.STAR_HALF,className:t.starIcon},"half")),a},p=({rating:s,text:e})=>{if(!(s!=null&&s.stars)&&!e)return null;const a=!!(s!=null&&s.stars)&&!!e;return o.jsxs("div",{className:t.ratingPreview,children:[s!==void 0&&s.stars!==void 0&&o.jsxs(n.Typography,{as:"p",defaultVariant:"labelMd",children:[s.stars," ",u(s.stars)]}),a&&o.jsx(n.Typography,{as:"p",defaultVariant:"labelSm",children:"|"}),e&&o.jsx(n.Typography,{as:"p",defaultVariant:"labelSm",emphasis:!0,children:e})]})};exports.RatingPreview=p;
|
|
@@ -2,12 +2,12 @@ import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import t from "../../components/RatingPreview/ratingPreview.module.css";
|
|
3
3
|
import { Typography as l } from "../Typography/Typography.es.js";
|
|
4
4
|
import { Icon as c } from "../Icon/Icon.es.js";
|
|
5
|
-
import { EIconName as
|
|
6
|
-
const
|
|
5
|
+
import { EIconName as n } from "../Icon/constants.es.js";
|
|
6
|
+
const d = (s) => {
|
|
7
7
|
const a = Math.round(s * 2) / 2, r = [];
|
|
8
8
|
for (let o = 0; o < Math.floor(a); o++)
|
|
9
|
-
r.push(/* @__PURE__ */ e(c, { name:
|
|
10
|
-
return a % 1 === 0.5 && r.push(/* @__PURE__ */ e(c, { name:
|
|
9
|
+
r.push(/* @__PURE__ */ e(c, { name: n.STAR_FILL, className: t.starIcon }, `full-${o}`));
|
|
10
|
+
return a % 1 === 0.5 && r.push(/* @__PURE__ */ e(c, { name: n.STAR_HALF, className: t.starIcon }, "half")), r;
|
|
11
11
|
}, v = ({ rating: s, text: a }) => {
|
|
12
12
|
if (!(s != null && s.stars) && !a) return null;
|
|
13
13
|
const r = !!(s != null && s.stars) && !!a;
|
|
@@ -15,13 +15,12 @@ const f = (s) => {
|
|
|
15
15
|
s !== void 0 && s.stars !== void 0 && /* @__PURE__ */ m(l, { as: "p", defaultVariant: "labelMd", children: [
|
|
16
16
|
s.stars,
|
|
17
17
|
" ",
|
|
18
|
-
|
|
18
|
+
d(s.stars)
|
|
19
19
|
] }),
|
|
20
20
|
r && /* @__PURE__ */ e(l, { as: "p", defaultVariant: "labelSm", children: "|" }),
|
|
21
21
|
a && /* @__PURE__ */ e(l, { as: "p", defaultVariant: "labelSm", emphasis: !0, children: a })
|
|
22
22
|
] });
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
|
-
v as RatingPreview
|
|
26
|
-
v as default
|
|
25
|
+
v as RatingPreview
|
|
27
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenpatient-org/healthspan-marketing-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.48",
|
|
4
4
|
"description": "Design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -161,10 +161,10 @@
|
|
|
161
161
|
"import": "./dist/components/Tabs/Tabs.es.js",
|
|
162
162
|
"require": "./dist/components/Tabs/Tabs.cjs.js"
|
|
163
163
|
},
|
|
164
|
-
"./
|
|
165
|
-
"types": "./dist/components/
|
|
166
|
-
"import": "./dist/components/
|
|
167
|
-
"require": "./dist/components/
|
|
164
|
+
"./Quote": {
|
|
165
|
+
"types": "./dist/components/Quote/index.d.ts",
|
|
166
|
+
"import": "./dist/components/Quote/Quote.es.js",
|
|
167
|
+
"require": "./dist/components/Quote/Quote.cjs.js"
|
|
168
168
|
},
|
|
169
169
|
"./StudyGridCard": {
|
|
170
170
|
"types": "./dist/components/StudyGridCard/StudyGridCard.d.ts",
|