@zenpatient-org/healthspan-marketing-ui 0.2.47 → 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.
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  export type QuoteProps = {
4
- prefix: 'quotation_marks';
5
4
  color: 'indigo' | 'ochre' | 'grey' | 'solar';
6
5
  quote: string;
6
+ prefix?: 'quotation_marks';
7
7
  sourcePrefix?: 'hyphen';
8
8
  source?: string;
9
9
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[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"),p=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},u=({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," ",p(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=u;exports.default=u;
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;
@@ -6,4 +6,3 @@ export type TRatingPreviewProps = {
6
6
  text?: string;
7
7
  };
8
8
  export declare const RatingPreview: ({ rating, text }: TRatingPreviewProps) => import("react/jsx-runtime").JSX.Element | null;
9
- export default RatingPreview;
@@ -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 d } from "../Icon/constants.es.js";
6
- const f = (s) => {
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: d.STAR_FILL, className: t.starIcon }, `full-${o}`));
10
- return a % 1 === 0.5 && r.push(/* @__PURE__ */ e(c, { name: d.STAR_HALF, className: t.starIcon }, "half")), r;
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
- f(s.stars)
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.47",
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
- "./Quotes": {
165
- "types": "./dist/components/Quotes/index.d.ts",
166
- "import": "./dist/components/Quotes/Quotes.es.js",
167
- "require": "./dist/components/Quotes/Quotes.cjs.js"
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",