@zenpatient-org/healthspan-marketing-ui 0.2.7 → 0.2.8
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/RatingPreview/RatingPreview.cjs.js +1 -0
- package/dist/components/RatingPreview/RatingPreview.d.ts +8 -0
- package/dist/components/RatingPreview/RatingPreview.es.js +25 -0
- package/dist/components/RatingPreview/index.d.ts +1 -0
- package/dist/components/RatingPreview/ratingPreview.module.css +11 -0
- package/dist/pageComponents/ScrollingFeatures/ScrollingFeatures.cjs.js +1 -1
- package/dist/pageComponents/ScrollingFeatures/ScrollingFeatures.es.js +12 -8
- package/dist/pageComponents/ScrollingFeatures/scrollingFeatures.module.css +8 -1
- package/package.json +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("../../src/components/RatingPreview/ratingPreview.module.css"),t=require("../Typography/Typography.cjs.js"),c=require("../Icon/Icon.cjs.js"),l=require("../Icon/constants.cjs.js"),u=a=>{const s=Math.round(a*2)/2,n=[];for(let r=0;r<Math.floor(s);r++)n.push(e.jsx(c.Icon,{name:l.EIconName.STAR_FILL,className:o.starIcon},`full-${r}`));return s%1===.5&&n.push(e.jsx(c.Icon,{name:l.EIconName.STAR_HALF,className:o.starIcon},"half")),n},i=({rating:a,text:s})=>e.jsxs("div",{className:o.ratingPreview,children:[e.jsxs(t.Typography,{as:"p",defaultVariant:"labelMd",children:[a.stars," ",u(a.stars)]}),s&&e.jsxs(e.Fragment,{children:[e.jsx(t.Typography,{as:"p",defaultVariant:"labelSm",children:"|"}),e.jsx(t.Typography,{as:"p",defaultVariant:"labelSm",emphasis:!0,children:s})]})]});exports.RatingPreview=i;exports.default=i;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../components/RatingPreview/ratingPreview.module.css";
|
|
3
|
+
import { Typography as o } from "../Typography/Typography.es.js";
|
|
4
|
+
import { Icon as i } from "../Icon/Icon.es.js";
|
|
5
|
+
import { EIconName as m } from "../Icon/constants.es.js";
|
|
6
|
+
const d = (r) => {
|
|
7
|
+
const a = Math.round(r * 2) / 2, s = [];
|
|
8
|
+
for (let t = 0; t < Math.floor(a); t++)
|
|
9
|
+
s.push(/* @__PURE__ */ e(i, { name: m.STAR_FILL, className: l.starIcon }, `full-${t}`));
|
|
10
|
+
return a % 1 === 0.5 && s.push(/* @__PURE__ */ e(i, { name: m.STAR_HALF, className: l.starIcon }, "half")), s;
|
|
11
|
+
}, I = ({ rating: r, text: a }) => /* @__PURE__ */ n("div", { className: l.ratingPreview, children: [
|
|
12
|
+
/* @__PURE__ */ n(o, { as: "p", defaultVariant: "labelMd", children: [
|
|
13
|
+
r.stars,
|
|
14
|
+
" ",
|
|
15
|
+
d(r.stars)
|
|
16
|
+
] }),
|
|
17
|
+
a && /* @__PURE__ */ n(c, { children: [
|
|
18
|
+
/* @__PURE__ */ e(o, { as: "p", defaultVariant: "labelSm", children: "|" }),
|
|
19
|
+
/* @__PURE__ */ e(o, { as: "p", defaultVariant: "labelSm", emphasis: !0, children: a })
|
|
20
|
+
] })
|
|
21
|
+
] });
|
|
22
|
+
export {
|
|
23
|
+
I as RatingPreview,
|
|
24
|
+
I as default
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RatingPreview } from './RatingPreview';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../src/pageComponents/ScrollingFeatures/scrollingFeatures.module.css"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../src/pageComponents/ScrollingFeatures/scrollingFeatures.module.css"),a=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js"),o=require("../../components/Icon/Icon.cjs.js"),l=require("../../components/Typography/Typography.cjs.js"),i=({text:n,icon:c,href:t})=>{const s=e.jsxs(e.Fragment,{children:[e.jsx(o.Icon,{className:r.featureIcon,name:c}),e.jsx(l.Typography,{className:r.featureText,defaultVariant:"labelMd",children:n})]});return t?e.jsx("a",{href:t,className:r.clickableFeature,children:s}):e.jsx("div",{className:r.feature,children:s})},u=({items:n})=>e.jsx("section",{className:r.root,children:n.length>0&&e.jsx("div",{className:r.featuresContainer,children:e.jsx(a.InfiniteScroll,{items:n,renderItem:i})})});exports.ScrollingFeatures=u;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as c, Fragment as o } from "react/jsx-runtime";
|
|
2
3
|
import r from "../../pageComponents/ScrollingFeatures/scrollingFeatures.module.css";
|
|
3
4
|
import { InfiniteScroll as s } from "../../components/InfiniteScroll/InfiniteScroll.es.js";
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Typography as
|
|
6
|
-
const
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { Icon as i } from "../../components/Icon/Icon.es.js";
|
|
6
|
+
import { Typography as m } from "../../components/Typography/Typography.es.js";
|
|
7
|
+
const d = ({ text: a, icon: l, href: t }) => {
|
|
8
|
+
const n = /* @__PURE__ */ c(o, { children: [
|
|
9
|
+
/* @__PURE__ */ e(i, { className: r.featureIcon, name: l }),
|
|
10
|
+
/* @__PURE__ */ e(m, { className: r.featureText, defaultVariant: "labelMd", children: a })
|
|
11
|
+
] });
|
|
12
|
+
return t ? /* @__PURE__ */ e("a", { href: t, className: r.clickableFeature, children: n }) : /* @__PURE__ */ e("div", { className: r.feature, children: n });
|
|
13
|
+
}, g = ({ items: a }) => /* @__PURE__ */ e("section", { className: r.root, children: a.length > 0 && /* @__PURE__ */ e("div", { className: r.featuresContainer, children: /* @__PURE__ */ e(s, { items: a, renderItem: d }) }) });
|
|
10
14
|
export {
|
|
11
|
-
|
|
15
|
+
g as ScrollingFeatures
|
|
12
16
|
};
|
|
@@ -7,13 +7,20 @@
|
|
|
7
7
|
padding: 16px 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.feature
|
|
10
|
+
.feature,
|
|
11
|
+
.clickableFeature {
|
|
11
12
|
display: flex;
|
|
12
13
|
align-items: center;
|
|
13
14
|
gap: 12px;
|
|
14
15
|
padding: 0 40px;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
.clickableFeature {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
color: var(--color-text-primary);
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
.featureText {
|
|
18
25
|
line-height: 110%;
|
|
19
26
|
letter-spacing: -0.42px;
|
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.8",
|
|
4
4
|
"description": "Design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -675,6 +675,11 @@
|
|
|
675
675
|
"import": "./dist/pageComponents/ScrollingFeatures/ScrollingFeatures.es.js",
|
|
676
676
|
"require": "./dist/pageComponents/ScrollingFeatures/ScrollingFeatures.cjs.js"
|
|
677
677
|
},
|
|
678
|
+
"./RatingPreview": {
|
|
679
|
+
"types": "./dist/components/RatingPreview/RatingPreview.d.ts",
|
|
680
|
+
"import": "./dist/components/RatingPreview/RatingPreview.es.js",
|
|
681
|
+
"require": "./dist/components/RatingPreview/RatingPreview.cjs.js"
|
|
682
|
+
},
|
|
678
683
|
"./dist/*.css": "./dist/*.css",
|
|
679
684
|
"./dist/**/*.module.css": "./dist/**/*.module.css",
|
|
680
685
|
"./styles/core": {
|