@saasquatch/mint-components 1.5.0-24 → 1.5.0-25

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.
Files changed (22) hide show
  1. package/dist/cjs/sqm-brand_39.cjs.entry.js +171 -94
  2. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -1
  3. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +57 -0
  4. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-rewards-cell.js +17 -13
  5. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +8 -4
  6. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +21 -2
  7. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table-view.js +57 -74
  8. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +5 -5
  9. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +2 -2
  10. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +3 -1
  11. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +0 -1
  12. package/dist/esm/sqm-brand_39.entry.js +171 -94
  13. package/dist/esm-es5/sqm-brand_39.entry.js +1 -1
  14. package/dist/mint-components/mint-components.esm.js +1 -1
  15. package/dist/mint-components/mint-components.js +8543 -98
  16. package/dist/mint-components/{p-51a96e80.entry.js → p-0fb2480a.entry.js} +8 -8
  17. package/dist/mint-components/p-59943eed.system.entry.js +1 -0
  18. package/dist/mint-components/p-ba0e812a.system.js +1 -1
  19. package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +9 -0
  20. package/dist/types/components/sqm-rewards-table/sqm-rewards-table-view.d.ts +2 -2
  21. package/package.json +1 -1
  22. package/dist/mint-components/p-7b9ff91b.system.entry.js +0 -1
@@ -6436,7 +6436,7 @@ function useReferraltableDemo(props) {
6436
6436
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
6437
6437
  }
6438
6438
  function EmptySlot() {
6439
- return (index.h("slot", { name: "empty" }, index.h("div", { style: { width: "100%" } }, index.h("sqm-text", null, index.h("h3", { style: { color: "#777777" } }, "No Referrals Yet")))));
6439
+ return (index.h("slot", { name: "empty" }, index.h("div", { style: { width: "100%" } }, index.h("sqm-text", null, index.h("h3", { style: { color: "#777777", textAlign: "center" } }, "No Referrals Yet")))));
6440
6440
  }
6441
6441
 
6442
6442
  const ReferralTableCell = class {
@@ -15848,88 +15848,73 @@ function RewardsTableView(props) {
15848
15848
  const { show } = states;
15849
15849
  const hiddenCols = data.hiddenColumns.split(",").map(Number);
15850
15850
  console.log(props);
15851
- const mobile = `@media (max-width: ${data.tabletBreakpoint}px)`;
15851
+ const mobile = "@media (max-width: " + data.mdBreakpoint + "px)";
15852
15852
  const tablet = "@media (min-width: " +
15853
- data.phoneBreakpoint +
15853
+ data.smBreakpoint +
15854
15854
  "px) and (max-width: " +
15855
- data.tabletBreakpoint +
15855
+ data.mdBreakpoint +
15856
15856
  "px)";
15857
15857
  const style = {
15858
- THead: {
15859
- padding: "var(--sl-spacing-small)",
15860
- paddingLeft: "0",
15861
- textAlign: "left",
15862
- [mobile]: {
15863
- display: "none",
15858
+ Table: {
15859
+ borderCollapse: "collapse",
15860
+ width: "100%",
15861
+ "& thead": {
15862
+ padding: "var(--sl-spacing-small)",
15863
+ paddingLeft: "0",
15864
+ textAlign: "left",
15865
+ fontWeight: "var(--sl-font-weight-normal)",
15864
15866
  },
15865
- },
15866
- TCell: {
15867
- padding: "var(--sl-spacing-small)",
15868
- paddingLeft: "0",
15869
- [mobile]: {
15870
- display: "block",
15871
- padding: "0",
15872
- marginBottom: "var(--sl-spacing-medium)",
15873
- "&:first-child": {
15874
- textAlign: "left",
15875
- },
15876
- "&:before": {
15877
- content: "attr(data-label)",
15878
- float: "left",
15879
- width: "40%",
15880
- marginBottom: "1px",
15881
- },
15882
- "&:last-child": {
15883
- marginBottom: "0",
15884
- },
15867
+ "& tr": {},
15868
+ "& td": {
15869
+ borderTop: "1px solid var(--sl-color-neutral-200)",
15870
+ padding: "var(--sl-spacing-small)",
15871
+ paddingLeft: "0",
15885
15872
  },
15886
- },
15887
- TCellHidden: {
15888
- padding: "var(--sl-spacing-small)",
15889
- paddingLeft: "0",
15890
15873
  [mobile]: {
15891
- display: "block",
15892
- padding: "0",
15893
- marginBottom: "var(--sl-spacing-medium)",
15894
- "&:first-child": {
15895
- textAlign: "left",
15874
+ "& thead": {
15875
+ display: "none",
15896
15876
  },
15897
- "&:before": {
15898
- content: "",
15899
- float: "left",
15900
- width: "40%",
15901
- marginBottom: "1px",
15877
+ "& tr": {
15878
+ display: "block",
15879
+ background: "#FFFFFF",
15880
+ border: "1px solid var(--sl-color-neutral-200)",
15881
+ boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
15882
+ borderRadius: "var(--sl-border-radius-medium)",
15883
+ padding: "var(--sl-spacing-medium)",
15884
+ color: "var(--sl-color-neutral-500)",
15885
+ fontSize: "var(--sl-font-size-small)",
15886
+ marginBottom: "var(--sl-spacing-large)",
15902
15887
  },
15903
- "&:last-child": {
15904
- marginBottom: "0",
15888
+ "& td": {
15889
+ display: "block",
15890
+ borderTop: "none",
15891
+ padding: "0",
15892
+ marginBottom: "var(--sl-spacing-medium)",
15893
+ ".hidden::before": {
15894
+ content: "",
15895
+ },
15896
+ "&:first-child": {
15897
+ textAlign: "left",
15898
+ },
15899
+ "&:before": {
15900
+ content: "attr(data-label)",
15901
+ float: "left",
15902
+ width: "40%",
15903
+ marginBottom: "5px",
15904
+ },
15905
+ "&:last-child": {
15906
+ marginBottom: "0",
15907
+ },
15905
15908
  },
15906
15909
  },
15907
- },
15908
- TRow: {
15909
- "border-top": "1px solid #EAEAEA",
15910
- [mobile]: {
15911
- display: "block",
15912
- background: "#FFFFFF",
15913
- border: "1px solid #E0E0E0",
15914
- boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
15915
- borderRadius: "4px",
15916
- padding: "var(--sl-spacing-medium)",
15917
- color: "var(--sl-color-neutral-500)",
15918
- fontSize: "var(--sl-font-size-small)",
15919
- marginBottom: "var(--sl-spacing-large)",
15920
- },
15921
- },
15922
- TBody: {
15923
15910
  [tablet]: {
15924
- display: "grid",
15925
- gridTemplateColumns: "0.5fr 0.5fr",
15926
- gap: "25px",
15911
+ "& tbody": {
15912
+ display: "grid",
15913
+ gridTemplateColumns: "0.5fr 0.5fr",
15914
+ gap: "25px",
15915
+ },
15927
15916
  },
15928
15917
  },
15929
- Table: {
15930
- "border-collapse": "collapse",
15931
- width: "100%",
15932
- },
15933
15918
  ButtonContainer: {
15934
15919
  display: "flex",
15935
15920
  "justify-content": "flex-end",
@@ -15944,15 +15929,13 @@ function RewardsTableView(props) {
15944
15929
  index.h("style", { type: "text/css" }, styleString),
15945
15930
  index.h("table", { class: sheet.classes.Table },
15946
15931
  data.textOverrides.showLabels && (index.h("thead", null,
15947
- index.h("tr", null, columns === null || columns === void 0 ? void 0 : columns.map((column) => (index.h("th", { class: sheet.classes.THead }, column)))))),
15948
- index.h("tbody", { class: sheet.classes.TBody },
15932
+ index.h("tr", null, columns === null || columns === void 0 ? void 0 : columns.map((column) => (index.h("th", null, column)))))),
15933
+ index.h("tbody", null,
15949
15934
  show === "loading" && elements.loadingElement,
15950
15935
  show === "empty" && elements.emptyElement,
15951
- show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) => (index.h("tr", { class: sheet.classes.TRow, style: {
15936
+ show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) => (index.h("tr", { style: {
15952
15937
  borderTop: `${!data.textOverrides.showLabels && i === 0 ? "none" : ""}`,
15953
- }, part: "table-row" }, row.map((cell, j) => (index.h("td", { class: hiddenCols.includes(j)
15954
- ? sheet.classes.TCellHidden
15955
- : sheet.classes.TCell, "data-label": columns[j] + ":" }, cell))))))))),
15938
+ }, part: "table-row" }, row.map((cell, j) => (index.h("td", { class: hiddenCols.includes(j) ? "hidden" : "", "data-label": columns[j] + ":" }, cell))))))))),
15956
15939
  index.h("div", { class: sheet.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
15957
15940
  index.h("sl-button", { size: "small", disabled: !states.hasPrev, loading: show === "loading", onClick: callbacks.prevPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.prevLabel),
15958
15941
  index.h("sl-button", { size: "small", loading: show === "loading", disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base" }, data.textOverrides.moreLabel))));
@@ -16117,8 +16100,8 @@ function useRewardsTable(props, emptyElement, loadingElement) {
16117
16100
  moreLabel: props.moreLabel,
16118
16101
  },
16119
16102
  hiddenColumns: props.hiddenColumns,
16120
- phoneBreakpoint: props.smBreakpoint,
16121
- tabletBreakpoint: props.mdBreakpoint,
16103
+ smBreakpoint: props.smBreakpoint,
16104
+ mdBreakpoint: props.mdBreakpoint,
16122
16105
  },
16123
16106
  elements: {
16124
16107
  columns: content.columns,
@@ -16185,9 +16168,9 @@ const RewardsTable = class {
16185
16168
  /** @uiName Hide Columns (Mobile View) */
16186
16169
  this.hiddenColumns = "0";
16187
16170
  /** @uiName Hide Columns (Mobile View) */
16188
- this.smBreakpoint = 499;
16171
+ this.smBreakpoint = 599;
16189
16172
  /** @uiName Hide Columns (Mobile View) */
16190
- this.mdBreakpoint = 999;
16173
+ this.mdBreakpoint = 899;
16191
16174
  _extends.h$1(this);
16192
16175
  }
16193
16176
  disconnectedCallback() { }
@@ -16382,17 +16365,15 @@ const RewardTableRewardsCell = class {
16382
16365
  })));
16383
16366
  const style = {
16384
16367
  Progress: {
16385
- background: "#e0e0e0",
16386
- borderRadius: "4px",
16387
16368
  height: "3px",
16388
- width: "80px",
16389
- marginTop: "6px",
16390
- marginBottom: "6px",
16369
+ width: "100px",
16370
+ margin: "var(--sl-spacing-xx-small) 0",
16371
+ background: "var(--sl-color-neutral-200)",
16391
16372
  "&:after": {
16392
16373
  content: '""',
16393
16374
  display: "block",
16394
- background: "#222222",
16395
- borderRadius: "4px",
16375
+ background: "var(--sl-color-neutral-1000)",
16376
+ borderRadius: "100px",
16396
16377
  width: `${progress}%`,
16397
16378
  height: "100%",
16398
16379
  },
@@ -16406,15 +16387,23 @@ const RewardTableRewardsCell = class {
16406
16387
  overflow: "hidden",
16407
16388
  textOverflow: "ellipsis",
16408
16389
  },
16390
+ RewardAmount: {
16391
+ fontSize: "var(--sl-font-size-medium)",
16392
+ fontWeight: "var(--sl-font-weight-semibold)",
16393
+ },
16394
+ RewardRemain: {
16395
+ fontSize: "var(--sl-font-size-small)",
16396
+ color: "var(--sl-color-neutral-500)",
16397
+ },
16409
16398
  };
16410
16399
  jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
16411
16400
  const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
16412
16401
  const styleString = sheet.toString();
16413
- return (index.h("div", null, index.h("style", { type: "text/css" }, styleString), index.h("div", { class: sheet.classes.Container }, index.h("span", { style: { color: "#232323" } }, pimpedPrettyValue), " ", index.h("br", null), " ", index.h("div", { class: sheet.classes.Progress }), progressBarSubtext)));
16402
+ return (index.h("div", null, index.h("style", { type: "text/css" }, styleString), index.h("div", { class: sheet.classes.Container }, index.h("span", { class: sheet.classes.RewardAmount }, pimpedPrettyValue + " "), index.h("br", null), " ", index.h("div", { class: sheet.classes.Progress }), index.h("span", { class: sheet.classes.RewardRemain }, progressBarSubtext))));
16414
16403
  }
16415
- return index.h("span", { style: { color: "#232323" } }, pimpedPrettyValue);
16404
+ return index.h("span", null, pimpedPrettyValue);
16416
16405
  };
16417
- return (index.h("div", { style: { display: "contents" } }, index.h("style", { type: "text/css" }, styleString), index.h(sqmTextSpanView.TextSpanView, { type: "p" }, index.h("span", { class: sheet.classes.BoldText }, index.h(RewardValue, { reward: this.reward })))));
16406
+ return (index.h("div", { style: { display: "contents" } }, index.h("style", { type: "text/css" }, styleString), index.h(sqmTextSpanView.TextSpanView, { type: "p" }, index.h(RewardValue, { reward: this.reward }))));
16418
16407
  }
16419
16408
  };
16420
16409
 
@@ -16458,12 +16447,17 @@ const RewardTableSourceCell = class {
16458
16447
  return `${user.firstName} ${user.lastName}`;
16459
16448
  };
16460
16449
  const source = () => this.reward.rewardSource === "FRIEND_SIGNUP" ||
16461
- this.reward.rewardSource === "REFERRED" ? (index.h("div", null, global.intl.formatMessage({
16450
+ this.reward.rewardSource === "REFERRED" ? (index.h("div", null, index.h("div", { style: {
16451
+ fontSize: "var(--sl-font-size-small)",
16452
+ color: "var(--sl-color-neutral-500)",
16453
+ } }, global.intl.formatMessage({
16462
16454
  id: "referralText",
16463
16455
  defaultMessage: this.referralText,
16464
16456
  }, {
16465
16457
  rewardSource: this.reward.rewardSource,
16466
- }), index.h("br", null), index.h("b", null, getFullName(this.reward.referral.referredUser)))) : this.reward.exchangedRewardRedemptionTransaction ? (index.h(RewardExchangeBadge, { reward: this.reward })) : (index.h(RewardSource, { reward: this.reward }));
16458
+ })), index.h("div", { style: {
16459
+ fontSize: "var(--sl-font-size-medium)",
16460
+ } }, getFullName(this.reward.referral.referredUser)))) : this.reward.exchangedRewardRedemptionTransaction ? (index.h(RewardExchangeBadge, { reward: this.reward })) : (index.h(RewardSource, { reward: this.reward }));
16467
16461
  return index.h(sqmTextSpanView.TextSpanView, { type: "p" }, source());
16468
16462
  }
16469
16463
  };
@@ -16548,6 +16542,22 @@ const RewardTableStatusCell = class {
16548
16542
  }
16549
16543
  render() {
16550
16544
  var _a;
16545
+ const style = {
16546
+ Badge: {
16547
+ "&::part(base)": {
16548
+ fontSize: "var(--sl-font-size-small)",
16549
+ padding: "4px 8px",
16550
+ },
16551
+ },
16552
+ Date: {
16553
+ fontSize: "var(--sl-font-size-small)",
16554
+ margin: "0",
16555
+ color: "var(--sl-color-neutral-500)",
16556
+ },
16557
+ };
16558
+ jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
16559
+ const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
16560
+ const styleString = sheet.toString();
16551
16561
  const rewardStatus = this.rewardStatus(this.reward);
16552
16562
  const statusText = global.intl.formatMessage({ id: "statusMessage", defaultMessage: this.statusText }, {
16553
16563
  status: rewardStatus,
@@ -16565,7 +16575,7 @@ const RewardTableStatusCell = class {
16565
16575
  "";
16566
16576
  const date = dateShown &&
16567
16577
  `${this.reward.dateExpires ? this.expiryText : ""}${(_a = luxon.DateTime.fromMillis(dateShown)) === null || _a === void 0 ? void 0 : _a.toLocaleString(luxon.DateTime.DATE_MED)}`;
16568
- return (index.h("div", { style: { display: "contents" } }, index.h("sl-badge", { type: badgeType, pill: true }, statusText), index.h("p", { style: { fontSize: "90%", marginTop: "0" } }, date)));
16578
+ return (index.h("div", { style: { display: "contents" } }, index.h("style", { type: "text/css" }, styleString), index.h("sl-badge", { type: badgeType, pill: true, class: sheet.classes.Badge }, statusText), index.h("p", { class: sheet.classes.Date }, date)));
16569
16579
  }
16570
16580
  };
16571
16581
 
@@ -22472,7 +22482,6 @@ function TaskCardView(props) {
22472
22482
  "& .main": {
22473
22483
  position: "relative",
22474
22484
  boxSizing: "border-box",
22475
- // minWidth: "347px",
22476
22485
  background: "var(--sl-color-neutral-0)",
22477
22486
  border: "1px solid var(--sl-color-neutral-200)",
22478
22487
  borderRadius: "var(--sl-border-radius-medium)",
@@ -27350,6 +27359,73 @@ const PortalContainer$1 = /*#__PURE__*/Object.freeze({
27350
27359
  FullWidth: FullWidth
27351
27360
  });
27352
27361
 
27362
+ const RewardsTableCell_stories = {
27363
+ title: "Components/Rewards Table Cell",
27364
+ };
27365
+ const rewardsData$1 = {
27366
+ id: "61c100117a82a376d8804166",
27367
+ type: "CREDIT",
27368
+ value: 5,
27369
+ unit: "TESTUNIT",
27370
+ name: null,
27371
+ dateGiven: 1640038417468,
27372
+ dateExpires: null,
27373
+ dateCancelled: null,
27374
+ dateRedeemed: null,
27375
+ dateScheduledFor: null,
27376
+ fuelTankCode: null,
27377
+ fuelTankType: null,
27378
+ currency: null,
27379
+ prettyValue: "5 Salmons",
27380
+ prettyValueNumber: "5",
27381
+ prettyAvailableNumber: "5",
27382
+ prettyRedeemedNumber: "0",
27383
+ statuses: ["AVAILABLE"],
27384
+ globalRewardKey: null,
27385
+ rewardSource: "MANUAL",
27386
+ prettyRedeemedCredit: "0 Salmons",
27387
+ prettyAssignedCredit: "5 Salmons",
27388
+ prettyAvailableValue: "5 Salmons",
27389
+ exchangedRewardRedemptionTransaction: {
27390
+ id: "61c100117a82a376d8804156",
27391
+ creditRedeemed: 5,
27392
+ prettyRedeemedCredit: "5 Points",
27393
+ unit: "POINT",
27394
+ dateRedeemed: 1640038417173,
27395
+ redeemedRewards: null,
27396
+ exchangedRewards: null,
27397
+ },
27398
+ referral: null,
27399
+ rewardRedemptionTransactions: {
27400
+ data: null,
27401
+ },
27402
+ };
27403
+ const RewardsCell$1 = () => {
27404
+ return (index.h("sqm-rewards-table-rewards-cell", { reward: rewardsData$1 }));
27405
+ };
27406
+ const SourceCell = () => {
27407
+ return (index.h("sqm-rewards-table-source-cell", { reward: rewardsData$1 }));
27408
+ };
27409
+ const StatusCell$1 = () => {
27410
+ return (index.h("sqm-rewards-table-status-cell", { statusText: "Available", reward: rewardsData$1 }));
27411
+ };
27412
+ const DateCell$1 = () => {
27413
+ return (index.h("sqm-rewards-table-date-cell", { date: 1640038417468 }));
27414
+ };
27415
+ const EmptyCell$2 = () => {
27416
+ return index.h("sqm-rewards-table-date-cell", null);
27417
+ };
27418
+
27419
+ const RewardsTableCell = /*#__PURE__*/Object.freeze({
27420
+ __proto__: null,
27421
+ 'default': RewardsTableCell_stories,
27422
+ RewardsCell: RewardsCell$1,
27423
+ SourceCell: SourceCell,
27424
+ StatusCell: StatusCell$1,
27425
+ DateCell: DateCell$1,
27426
+ EmptyCell: EmptyCell$2
27427
+ });
27428
+
27353
27429
  /**
27354
27430
  *
27355
27431
  * Themes
@@ -30039,7 +30115,8 @@ const stories = [
30039
30115
  ProgramExplainerStep,
30040
30116
  BrandStories,
30041
30117
  CardFeed,
30042
- PortalContainer$1
30118
+ PortalContainer$1,
30119
+ RewardsTableCell,
30043
30120
  ];
30044
30121
  const StencilStorybook = class {
30045
30122
  constructor(hostRef) {
@@ -237,5 +237,5 @@ function EmptySlot() {
237
237
  return (h("slot", { name: "empty" },
238
238
  h("div", { style: { width: "100%" } },
239
239
  h("sqm-text", null,
240
- h("h3", { style: { color: "#777777" } }, "No Referrals Yet")))));
240
+ h("h3", { style: { color: "#777777", textAlign: "center" } }, "No Referrals Yet")))));
241
241
  }
@@ -0,0 +1,57 @@
1
+ import { h } from "@stencil/core";
2
+ export default {
3
+ title: "Components/Rewards Table Cell",
4
+ };
5
+ const rewardsData = {
6
+ id: "61c100117a82a376d8804166",
7
+ type: "CREDIT",
8
+ value: 5,
9
+ unit: "TESTUNIT",
10
+ name: null,
11
+ dateGiven: 1640038417468,
12
+ dateExpires: null,
13
+ dateCancelled: null,
14
+ dateRedeemed: null,
15
+ dateScheduledFor: null,
16
+ fuelTankCode: null,
17
+ fuelTankType: null,
18
+ currency: null,
19
+ prettyValue: "5 Salmons",
20
+ prettyValueNumber: "5",
21
+ prettyAvailableNumber: "5",
22
+ prettyRedeemedNumber: "0",
23
+ statuses: ["AVAILABLE"],
24
+ globalRewardKey: null,
25
+ rewardSource: "MANUAL",
26
+ prettyRedeemedCredit: "0 Salmons",
27
+ prettyAssignedCredit: "5 Salmons",
28
+ prettyAvailableValue: "5 Salmons",
29
+ exchangedRewardRedemptionTransaction: {
30
+ id: "61c100117a82a376d8804156",
31
+ creditRedeemed: 5,
32
+ prettyRedeemedCredit: "5 Points",
33
+ unit: "POINT",
34
+ dateRedeemed: 1640038417173,
35
+ redeemedRewards: null,
36
+ exchangedRewards: null,
37
+ },
38
+ referral: null,
39
+ rewardRedemptionTransactions: {
40
+ data: null,
41
+ },
42
+ };
43
+ export const RewardsCell = () => {
44
+ return (h("sqm-rewards-table-rewards-cell", { reward: rewardsData }));
45
+ };
46
+ export const SourceCell = () => {
47
+ return (h("sqm-rewards-table-source-cell", { reward: rewardsData }));
48
+ };
49
+ export const StatusCell = () => {
50
+ return (h("sqm-rewards-table-status-cell", { statusText: "Available", reward: rewardsData }));
51
+ };
52
+ export const DateCell = () => {
53
+ return (h("sqm-rewards-table-date-cell", { date: 1640038417468 }));
54
+ };
55
+ export const EmptyCell = () => {
56
+ return h("sqm-rewards-table-date-cell", null);
57
+ };
@@ -72,17 +72,15 @@ export class RewardTableRewardsCell {
72
72
  })));
73
73
  const style = {
74
74
  Progress: {
75
- background: "#e0e0e0",
76
- borderRadius: "4px",
77
75
  height: "3px",
78
- width: "80px",
79
- marginTop: "6px",
80
- marginBottom: "6px",
76
+ width: "100px",
77
+ margin: "var(--sl-spacing-xx-small) 0",
78
+ background: "var(--sl-color-neutral-200)",
81
79
  "&:after": {
82
80
  content: '""',
83
81
  display: "block",
84
- background: "#222222",
85
- borderRadius: "4px",
82
+ background: "var(--sl-color-neutral-1000)",
83
+ borderRadius: "100px",
86
84
  width: `${progress}%`,
87
85
  height: "100%",
88
86
  },
@@ -96,6 +94,14 @@ export class RewardTableRewardsCell {
96
94
  overflow: "hidden",
97
95
  textOverflow: "ellipsis",
98
96
  },
97
+ RewardAmount: {
98
+ fontSize: "var(--sl-font-size-medium)",
99
+ fontWeight: "var(--sl-font-weight-semibold)",
100
+ },
101
+ RewardRemain: {
102
+ fontSize: "var(--sl-font-size-small)",
103
+ color: "var(--sl-color-neutral-500)",
104
+ },
99
105
  };
100
106
  jss.setup(preset());
101
107
  const sheet = jss.createStyleSheet(style);
@@ -103,20 +109,18 @@ export class RewardTableRewardsCell {
103
109
  return (h("div", null,
104
110
  h("style", { type: "text/css" }, styleString),
105
111
  h("div", { class: sheet.classes.Container },
106
- h("span", { style: { color: "#232323" } }, pimpedPrettyValue),
107
- " ",
112
+ h("span", { class: sheet.classes.RewardAmount }, pimpedPrettyValue + " "),
108
113
  h("br", null),
109
114
  " ",
110
115
  h("div", { class: sheet.classes.Progress }),
111
- progressBarSubtext)));
116
+ h("span", { class: sheet.classes.RewardRemain }, progressBarSubtext))));
112
117
  }
113
- return h("span", { style: { color: "#232323" } }, pimpedPrettyValue);
118
+ return h("span", null, pimpedPrettyValue);
114
119
  };
115
120
  return (h("div", { style: { display: "contents" } },
116
121
  h("style", { type: "text/css" }, styleString),
117
122
  h(TextSpanView, { type: "p" },
118
- h("span", { class: sheet.classes.BoldText },
119
- h(RewardValue, { reward: this.reward })))));
123
+ h(RewardValue, { reward: this.reward }))));
120
124
  }
121
125
  static get is() { return "sqm-rewards-table-rewards-cell"; }
122
126
  static get encapsulation() { return "shadow"; }
@@ -43,14 +43,18 @@ export class RewardTableSourceCell {
43
43
  };
44
44
  const source = () => this.reward.rewardSource === "FRIEND_SIGNUP" ||
45
45
  this.reward.rewardSource === "REFERRED" ? (h("div", null,
46
- intl.formatMessage({
46
+ h("div", { style: {
47
+ fontSize: "var(--sl-font-size-small)",
48
+ color: "var(--sl-color-neutral-500)",
49
+ } }, intl.formatMessage({
47
50
  id: "referralText",
48
51
  defaultMessage: this.referralText,
49
52
  }, {
50
53
  rewardSource: this.reward.rewardSource,
51
- }),
52
- h("br", null),
53
- h("b", null, getFullName(this.reward.referral.referredUser)))) : this.reward.exchangedRewardRedemptionTransaction ? (h(RewardExchangeBadge, { reward: this.reward })) : (h(RewardSource, { reward: this.reward }));
54
+ })),
55
+ h("div", { style: {
56
+ fontSize: "var(--sl-font-size-medium)",
57
+ } }, getFullName(this.reward.referral.referredUser)))) : this.reward.exchangedRewardRedemptionTransaction ? (h(RewardExchangeBadge, { reward: this.reward })) : (h(RewardSource, { reward: this.reward }));
54
58
  return h(TextSpanView, { type: "p" }, source());
55
59
  }
56
60
  static get is() { return "sqm-rewards-table-source-cell"; }
@@ -1,6 +1,8 @@
1
1
  import { Component, h, Prop } from "@stencil/core";
2
2
  import { DateTime } from "luxon";
3
3
  import { intl } from "../../../global/global";
4
+ import jss from "jss";
5
+ import preset from "jss-preset-default";
4
6
  export class RewardTableStatusCell {
5
7
  rewardStatus(reward) {
6
8
  if (reward.dateCancelled)
@@ -30,6 +32,22 @@ export class RewardTableStatusCell {
30
32
  }
31
33
  render() {
32
34
  var _a;
35
+ const style = {
36
+ Badge: {
37
+ "&::part(base)": {
38
+ fontSize: "var(--sl-font-size-small)",
39
+ padding: "4px 8px",
40
+ },
41
+ },
42
+ Date: {
43
+ fontSize: "var(--sl-font-size-small)",
44
+ margin: "0",
45
+ color: "var(--sl-color-neutral-500)",
46
+ },
47
+ };
48
+ jss.setup(preset());
49
+ const sheet = jss.createStyleSheet(style);
50
+ const styleString = sheet.toString();
33
51
  const rewardStatus = this.rewardStatus(this.reward);
34
52
  const statusText = intl.formatMessage({ id: "statusMessage", defaultMessage: this.statusText }, {
35
53
  status: rewardStatus,
@@ -48,8 +66,9 @@ export class RewardTableStatusCell {
48
66
  const date = dateShown &&
49
67
  `${this.reward.dateExpires ? this.expiryText : ""}${(_a = DateTime.fromMillis(dateShown)) === null || _a === void 0 ? void 0 : _a.toLocaleString(DateTime.DATE_MED)}`;
50
68
  return (h("div", { style: { display: "contents" } },
51
- h("sl-badge", { type: badgeType, pill: true }, statusText),
52
- h("p", { style: { fontSize: "90%", marginTop: "0" } }, date)));
69
+ h("style", { type: "text/css" }, styleString),
70
+ h("sl-badge", { type: badgeType, pill: true, class: sheet.classes.Badge }, statusText),
71
+ h("p", { class: sheet.classes.Date }, date)));
53
72
  }
54
73
  static get is() { return "sqm-rewards-table-status-cell"; }
55
74
  static get encapsulation() { return "shadow"; }