@saasquatch/mint-components 2.0.6 → 2.0.7

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.
@@ -3779,6 +3779,7 @@ const style$5 = {
3779
3779
  marginBottom: "var(--sl-spacing-xx-small)",
3780
3780
  margin: "0",
3781
3781
  display: "flex",
3782
+ alignItems: "center",
3782
3783
  gap: "var(--sl-spacing-x-small)",
3783
3784
  "&::part(base)": {
3784
3785
  color: "var(--sqm-text)",
@@ -3860,6 +3861,9 @@ const style$5 = {
3860
3861
  display: "flex",
3861
3862
  textAlign: "center",
3862
3863
  width: "250px",
3864
+ "&::part(body)": {
3865
+ pointerEvents: "auto",
3866
+ },
3863
3867
  },
3864
3868
  ToolTip: {
3865
3869
  top: "6px",
@@ -3938,6 +3942,43 @@ const style$5 = {
3938
3942
  gap: "var(--sl-spacing-medium)",
3939
3943
  flexWrap: "wrap",
3940
3944
  },
3945
+ DropdownTooltipContainer: {
3946
+ top: "-4px",
3947
+ "&::part(panel)": {
3948
+ boxShadow: "none",
3949
+ border: "none",
3950
+ marginTop: "var(--sl-spacing-x-small)",
3951
+ },
3952
+ },
3953
+ DropdownContent: {
3954
+ padding: "var(--sl-spacing-xxx-small) var(--sl-spacing-x-small)",
3955
+ fontSize: "var(--sl-font-size-small)",
3956
+ fontFamily: "var(--sl-font-sans)",
3957
+ fontWeight: "var(--sl-font-weight-normal)",
3958
+ lineHeight: "var(--sl-line-height-dense)",
3959
+ minWidth: "225px",
3960
+ backgroundColor: "var(--sl-color-gray-900)",
3961
+ color: "var(--sl-color-white)",
3962
+ borderRadius: "var(--sl-border-radius-medium)",
3963
+ position: "relative",
3964
+ marginLeft: "5px",
3965
+ },
3966
+ DropdownArrow: {
3967
+ position: "absolute",
3968
+ left: "-5px",
3969
+ top: "50%",
3970
+ transform: "translateY(-50%)",
3971
+ width: "0",
3972
+ height: "0",
3973
+ borderTop: "5px solid transparent",
3974
+ borderBottom: "5px solid transparent",
3975
+ borderRight: "5px solid var(--sl-color-gray-900)",
3976
+ zIndex: "1",
3977
+ },
3978
+ DropdownLink: {
3979
+ color: "var(--sl-color-white)",
3980
+ textDecoration: "underline",
3981
+ },
3941
3982
  };
3942
3983
  const sheet$4 = JSS.createStyleSheet(style$5);
3943
3984
  const styleString$4 = sheet$4.toString();
@@ -4253,6 +4294,34 @@ const TaxAndCashDashboardView = (props) => {
4253
4294
  }
4254
4295
  };
4255
4296
  const alertInfo = getAlert(states.payoutStatus);
4297
+ const dropdownHover = (el) => {
4298
+ var _a;
4299
+ if (!el)
4300
+ return;
4301
+ const trigger = el.querySelector('[slot="trigger"]');
4302
+ const panel = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dropdown__panel");
4303
+ if (!trigger || !panel)
4304
+ return;
4305
+ let hideTimeout;
4306
+ const show = () => {
4307
+ clearTimeout(hideTimeout);
4308
+ el.show();
4309
+ };
4310
+ const scheduleHide = () => {
4311
+ hideTimeout = setTimeout(() => el.hide(), 100);
4312
+ };
4313
+ trigger.addEventListener("mouseenter", show);
4314
+ trigger.addEventListener("mouseleave", scheduleHide);
4315
+ panel.addEventListener("mouseenter", show);
4316
+ panel.addEventListener("mouseleave", scheduleHide);
4317
+ return () => {
4318
+ trigger.removeEventListener("mouseenter", show);
4319
+ trigger.removeEventListener("mouseleave", scheduleHide);
4320
+ panel.removeEventListener("mouseenter", show);
4321
+ panel.removeEventListener("mouseleave", scheduleHide);
4322
+ clearTimeout(hideTimeout);
4323
+ };
4324
+ };
4256
4325
  return (index.h("div", null,
4257
4326
  index.h("div", null,
4258
4327
  index.h("style", { type: "text/css" },
@@ -4316,8 +4385,16 @@ const TaxAndCashDashboardView = (props) => {
4316
4385
  index.h("sl-skeleton", { class: sheet$4.classes.SkeletonTwo }))) : (index.h("div", null,
4317
4386
  index.h("h3", { class: sheet$4.classes.IndirectTaxPreviewHeaderContainer },
4318
4387
  text.indirectTaxInfoSectionHeader,
4319
- index.h("sl-tooltip", { trigger: "hover", placement: "right", content: text.indirectTaxTooltipSupport, class: sheet$4.classes.TooltipContainer },
4320
- index.h("sl-icon", { name: "info-circle", class: sheet$4.classes.ToolTip }))),
4388
+ index.h("sl-dropdown", { placement: "right", distance: 1, ref: dropdownHover, class: sheet$4.classes.DropdownTooltipContainer },
4389
+ index.h("sl-icon", { slot: "trigger", name: "info-circle", class: sheet$4.classes.ToolTip, style: { cursor: "pointer" } }),
4390
+ index.h("div", { class: sheet$4.classes.DropdownContent },
4391
+ index.h("div", { class: sheet$4.classes.DropdownArrow }),
4392
+ global.intl.formatMessage({
4393
+ id: "indirectTaxTooltipSupport",
4394
+ defaultMessage: text.indirectTaxTooltipSupport,
4395
+ }, {
4396
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet$4.classes.DropdownLink }, text.supportLink)),
4397
+ })))),
4321
4398
  index.h("div", { class: sheet$4.classes.IndirectTaxPreviewDetails },
4322
4399
  index.h("span", null, states.notRegistered ? (index.h("span", { class: sheet$4.classes.NotRegisteredIndirectTaxText }, global.intl.formatMessage({
4323
4400
  id: "notRegisteredForTax",
@@ -4612,7 +4689,7 @@ const TaxAndCashDashboard = class {
4612
4689
  * @uiName Indirect tax tooltip
4613
4690
  * @uiWidget textArea
4614
4691
  */
4615
- this.indirectTaxTooltipSupport = "To make changes to your indirect tax information, please contact our Support team.";
4692
+ this.indirectTaxTooltipSupport = "To make changes to your indirect tax information, please contact our {supportLink}.";
4616
4693
  /**
4617
4694
  * Displayed to participants who have submitted their indirect tax information.
4618
4695
  *
@@ -57,6 +57,7 @@ const style = {
57
57
  marginBottom: "var(--sl-spacing-xx-small)",
58
58
  margin: "0",
59
59
  display: "flex",
60
+ alignItems: "center",
60
61
  gap: "var(--sl-spacing-x-small)",
61
62
  "&::part(base)": {
62
63
  color: "var(--sqm-text)",
@@ -138,6 +139,9 @@ const style = {
138
139
  display: "flex",
139
140
  textAlign: "center",
140
141
  width: "250px",
142
+ "&::part(body)": {
143
+ pointerEvents: "auto",
144
+ },
141
145
  },
142
146
  ToolTip: {
143
147
  top: "6px",
@@ -216,6 +220,43 @@ const style = {
216
220
  gap: "var(--sl-spacing-medium)",
217
221
  flexWrap: "wrap",
218
222
  },
223
+ DropdownTooltipContainer: {
224
+ top: "-4px",
225
+ "&::part(panel)": {
226
+ boxShadow: "none",
227
+ border: "none",
228
+ marginTop: "var(--sl-spacing-x-small)",
229
+ },
230
+ },
231
+ DropdownContent: {
232
+ padding: "var(--sl-spacing-xxx-small) var(--sl-spacing-x-small)",
233
+ fontSize: "var(--sl-font-size-small)",
234
+ fontFamily: "var(--sl-font-sans)",
235
+ fontWeight: "var(--sl-font-weight-normal)",
236
+ lineHeight: "var(--sl-line-height-dense)",
237
+ minWidth: "225px",
238
+ backgroundColor: "var(--sl-color-gray-900)",
239
+ color: "var(--sl-color-white)",
240
+ borderRadius: "var(--sl-border-radius-medium)",
241
+ position: "relative",
242
+ marginLeft: "5px",
243
+ },
244
+ DropdownArrow: {
245
+ position: "absolute",
246
+ left: "-5px",
247
+ top: "50%",
248
+ transform: "translateY(-50%)",
249
+ width: "0",
250
+ height: "0",
251
+ borderTop: "5px solid transparent",
252
+ borderBottom: "5px solid transparent",
253
+ borderRight: "5px solid var(--sl-color-gray-900)",
254
+ zIndex: "1",
255
+ },
256
+ DropdownLink: {
257
+ color: "var(--sl-color-white)",
258
+ textDecoration: "underline",
259
+ },
219
260
  };
220
261
  const sheet = createStyleSheet(style);
221
262
  const styleString = sheet.toString();
@@ -531,6 +572,34 @@ export const TaxAndCashDashboardView = (props) => {
531
572
  }
532
573
  };
533
574
  const alertInfo = getAlert(states.payoutStatus);
575
+ const dropdownHover = (el) => {
576
+ var _a;
577
+ if (!el)
578
+ return;
579
+ const trigger = el.querySelector('[slot="trigger"]');
580
+ const panel = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dropdown__panel");
581
+ if (!trigger || !panel)
582
+ return;
583
+ let hideTimeout;
584
+ const show = () => {
585
+ clearTimeout(hideTimeout);
586
+ el.show();
587
+ };
588
+ const scheduleHide = () => {
589
+ hideTimeout = setTimeout(() => el.hide(), 100);
590
+ };
591
+ trigger.addEventListener("mouseenter", show);
592
+ trigger.addEventListener("mouseleave", scheduleHide);
593
+ panel.addEventListener("mouseenter", show);
594
+ panel.addEventListener("mouseleave", scheduleHide);
595
+ return () => {
596
+ trigger.removeEventListener("mouseenter", show);
597
+ trigger.removeEventListener("mouseleave", scheduleHide);
598
+ panel.removeEventListener("mouseenter", show);
599
+ panel.removeEventListener("mouseleave", scheduleHide);
600
+ clearTimeout(hideTimeout);
601
+ };
602
+ };
534
603
  return (h("div", null,
535
604
  h("div", null,
536
605
  h("style", { type: "text/css" },
@@ -594,8 +663,16 @@ export const TaxAndCashDashboardView = (props) => {
594
663
  h("sl-skeleton", { class: sheet.classes.SkeletonTwo }))) : (h("div", null,
595
664
  h("h3", { class: sheet.classes.IndirectTaxPreviewHeaderContainer },
596
665
  text.indirectTaxInfoSectionHeader,
597
- h("sl-tooltip", { trigger: "hover", placement: "right", content: text.indirectTaxTooltipSupport, class: sheet.classes.TooltipContainer },
598
- h("sl-icon", { name: "info-circle", class: sheet.classes.ToolTip }))),
666
+ h("sl-dropdown", { placement: "right", distance: 1, ref: dropdownHover, class: sheet.classes.DropdownTooltipContainer },
667
+ h("sl-icon", { slot: "trigger", name: "info-circle", class: sheet.classes.ToolTip, style: { cursor: "pointer" } }),
668
+ h("div", { class: sheet.classes.DropdownContent },
669
+ h("div", { class: sheet.classes.DropdownArrow }),
670
+ intl.formatMessage({
671
+ id: "indirectTaxTooltipSupport",
672
+ defaultMessage: text.indirectTaxTooltipSupport,
673
+ }, {
674
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet.classes.DropdownLink }, text.supportLink)),
675
+ })))),
599
676
  h("div", { class: sheet.classes.IndirectTaxPreviewDetails },
600
677
  h("span", null, states.notRegistered ? (h("span", { class: sheet.classes.NotRegisteredIndirectTaxText }, intl.formatMessage({
601
678
  id: "notRegisteredForTax",
@@ -129,7 +129,7 @@ export class TaxAndCashDashboard {
129
129
  * @uiName Indirect tax tooltip
130
130
  * @uiWidget textArea
131
131
  */
132
- this.indirectTaxTooltipSupport = "To make changes to your indirect tax information, please contact our Support team.";
132
+ this.indirectTaxTooltipSupport = "To make changes to your indirect tax information, please contact our {supportLink}.";
133
133
  /**
134
134
  * Displayed to participants who have submitted their indirect tax information.
135
135
  *
@@ -872,7 +872,7 @@ export class TaxAndCashDashboard {
872
872
  },
873
873
  "attribute": "indirect-tax-tooltip-support",
874
874
  "reflect": false,
875
- "defaultValue": "\"To make changes to your indirect tax information, please contact our Support team.\""
875
+ "defaultValue": "\"To make changes to your indirect tax information, please contact our {supportLink}.\""
876
876
  },
877
877
  "indirectTaxDetails": {
878
878
  "type": "string",
@@ -3775,6 +3775,7 @@ const style$5 = {
3775
3775
  marginBottom: "var(--sl-spacing-xx-small)",
3776
3776
  margin: "0",
3777
3777
  display: "flex",
3778
+ alignItems: "center",
3778
3779
  gap: "var(--sl-spacing-x-small)",
3779
3780
  "&::part(base)": {
3780
3781
  color: "var(--sqm-text)",
@@ -3856,6 +3857,9 @@ const style$5 = {
3856
3857
  display: "flex",
3857
3858
  textAlign: "center",
3858
3859
  width: "250px",
3860
+ "&::part(body)": {
3861
+ pointerEvents: "auto",
3862
+ },
3859
3863
  },
3860
3864
  ToolTip: {
3861
3865
  top: "6px",
@@ -3934,6 +3938,43 @@ const style$5 = {
3934
3938
  gap: "var(--sl-spacing-medium)",
3935
3939
  flexWrap: "wrap",
3936
3940
  },
3941
+ DropdownTooltipContainer: {
3942
+ top: "-4px",
3943
+ "&::part(panel)": {
3944
+ boxShadow: "none",
3945
+ border: "none",
3946
+ marginTop: "var(--sl-spacing-x-small)",
3947
+ },
3948
+ },
3949
+ DropdownContent: {
3950
+ padding: "var(--sl-spacing-xxx-small) var(--sl-spacing-x-small)",
3951
+ fontSize: "var(--sl-font-size-small)",
3952
+ fontFamily: "var(--sl-font-sans)",
3953
+ fontWeight: "var(--sl-font-weight-normal)",
3954
+ lineHeight: "var(--sl-line-height-dense)",
3955
+ minWidth: "225px",
3956
+ backgroundColor: "var(--sl-color-gray-900)",
3957
+ color: "var(--sl-color-white)",
3958
+ borderRadius: "var(--sl-border-radius-medium)",
3959
+ position: "relative",
3960
+ marginLeft: "5px",
3961
+ },
3962
+ DropdownArrow: {
3963
+ position: "absolute",
3964
+ left: "-5px",
3965
+ top: "50%",
3966
+ transform: "translateY(-50%)",
3967
+ width: "0",
3968
+ height: "0",
3969
+ borderTop: "5px solid transparent",
3970
+ borderBottom: "5px solid transparent",
3971
+ borderRight: "5px solid var(--sl-color-gray-900)",
3972
+ zIndex: "1",
3973
+ },
3974
+ DropdownLink: {
3975
+ color: "var(--sl-color-white)",
3976
+ textDecoration: "underline",
3977
+ },
3937
3978
  };
3938
3979
  const sheet$4 = createStyleSheet(style$5);
3939
3980
  const styleString$4 = sheet$4.toString();
@@ -4249,6 +4290,34 @@ const TaxAndCashDashboardView = (props) => {
4249
4290
  }
4250
4291
  };
4251
4292
  const alertInfo = getAlert(states.payoutStatus);
4293
+ const dropdownHover = (el) => {
4294
+ var _a;
4295
+ if (!el)
4296
+ return;
4297
+ const trigger = el.querySelector('[slot="trigger"]');
4298
+ const panel = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dropdown__panel");
4299
+ if (!trigger || !panel)
4300
+ return;
4301
+ let hideTimeout;
4302
+ const show = () => {
4303
+ clearTimeout(hideTimeout);
4304
+ el.show();
4305
+ };
4306
+ const scheduleHide = () => {
4307
+ hideTimeout = setTimeout(() => el.hide(), 100);
4308
+ };
4309
+ trigger.addEventListener("mouseenter", show);
4310
+ trigger.addEventListener("mouseleave", scheduleHide);
4311
+ panel.addEventListener("mouseenter", show);
4312
+ panel.addEventListener("mouseleave", scheduleHide);
4313
+ return () => {
4314
+ trigger.removeEventListener("mouseenter", show);
4315
+ trigger.removeEventListener("mouseleave", scheduleHide);
4316
+ panel.removeEventListener("mouseenter", show);
4317
+ panel.removeEventListener("mouseleave", scheduleHide);
4318
+ clearTimeout(hideTimeout);
4319
+ };
4320
+ };
4252
4321
  return (h("div", null,
4253
4322
  h("div", null,
4254
4323
  h("style", { type: "text/css" },
@@ -4312,8 +4381,16 @@ const TaxAndCashDashboardView = (props) => {
4312
4381
  h("sl-skeleton", { class: sheet$4.classes.SkeletonTwo }))) : (h("div", null,
4313
4382
  h("h3", { class: sheet$4.classes.IndirectTaxPreviewHeaderContainer },
4314
4383
  text.indirectTaxInfoSectionHeader,
4315
- h("sl-tooltip", { trigger: "hover", placement: "right", content: text.indirectTaxTooltipSupport, class: sheet$4.classes.TooltipContainer },
4316
- h("sl-icon", { name: "info-circle", class: sheet$4.classes.ToolTip }))),
4384
+ h("sl-dropdown", { placement: "right", distance: 1, ref: dropdownHover, class: sheet$4.classes.DropdownTooltipContainer },
4385
+ h("sl-icon", { slot: "trigger", name: "info-circle", class: sheet$4.classes.ToolTip, style: { cursor: "pointer" } }),
4386
+ h("div", { class: sheet$4.classes.DropdownContent },
4387
+ h("div", { class: sheet$4.classes.DropdownArrow }),
4388
+ intl.formatMessage({
4389
+ id: "indirectTaxTooltipSupport",
4390
+ defaultMessage: text.indirectTaxTooltipSupport,
4391
+ }, {
4392
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet$4.classes.DropdownLink }, text.supportLink)),
4393
+ })))),
4317
4394
  h("div", { class: sheet$4.classes.IndirectTaxPreviewDetails },
4318
4395
  h("span", null, states.notRegistered ? (h("span", { class: sheet$4.classes.NotRegisteredIndirectTaxText }, intl.formatMessage({
4319
4396
  id: "notRegisteredForTax",
@@ -4608,7 +4685,7 @@ const TaxAndCashDashboard = class {
4608
4685
  * @uiName Indirect tax tooltip
4609
4686
  * @uiWidget textArea
4610
4687
  */
4611
- this.indirectTaxTooltipSupport = "To make changes to your indirect tax information, please contact our Support team.";
4688
+ this.indirectTaxTooltipSupport = "To make changes to your indirect tax information, please contact our {supportLink}.";
4612
4689
  /**
4613
4690
  * Displayed to participants who have submitted their indirect tax information.
4614
4691
  *