@saasquatch/mint-components 2.1.8-1 → 2.1.8-2

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 (66) hide show
  1. package/dist/cjs/{ShadowViewAddon-5ce32291.js → ShadowViewAddon-a26deae6.js} +1 -90
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +54 -381
  5. package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +9 -332
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -158
  7. package/dist/collection/collection-manifest.json +0 -1
  8. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -0
  9. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
  10. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +27 -1
  11. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
  12. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
  13. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
  14. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
  15. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
  16. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
  17. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
  18. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
  19. package/dist/esm/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.js} +2 -90
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/mint-components.js +1 -1
  22. package/dist/esm/sqm-banking-info-form_10.entry.js +54 -381
  23. package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +14 -336
  24. package/dist/esm/sqm-stencilbook.entry.js +2 -158
  25. package/dist/esm-es5/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.js} +1 -1
  26. package/dist/esm-es5/loader.js +1 -1
  27. package/dist/esm-es5/mint-components.js +1 -1
  28. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  29. package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -0
  30. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  31. package/dist/mint-components/mint-components.esm.js +1 -1
  32. package/dist/mint-components/p-0614dcbc.entry.js +9 -0
  33. package/dist/mint-components/{p-adc4e263.js → p-217dedde.js} +25 -25
  34. package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
  35. package/dist/mint-components/p-7ee8f2ed.entry.js +273 -0
  36. package/dist/mint-components/p-bf545082.system.entry.js +1 -0
  37. package/dist/mint-components/p-ca098be1.system.js +1 -1
  38. package/dist/mint-components/p-ce050888.system.js +1 -0
  39. package/dist/mint-components/p-d4f332a7.entry.js +106 -0
  40. package/dist/mint-components/p-de343dd0.system.entry.js +1 -0
  41. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -0
  42. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +5 -0
  43. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
  44. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
  45. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
  46. package/dist/types/components.d.ts +10 -378
  47. package/docs/docs.docx +0 -0
  48. package/docs/raisins.json +1 -1
  49. package/grapesjs/grapesjs.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -143
  52. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -90
  53. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -462
  54. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -180
  55. package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
  56. package/dist/mint-components/p-0f036907.system.js +0 -1
  57. package/dist/mint-components/p-22e39d2c.entry.js +0 -342
  58. package/dist/mint-components/p-499885aa.entry.js +0 -9
  59. package/dist/mint-components/p-a6621899.system.entry.js +0 -1
  60. package/dist/mint-components/p-b0253f4c.entry.js +0 -108
  61. package/dist/mint-components/p-d93e19e9.system.entry.js +0 -1
  62. package/dist/mint-components/p-e45a9966.system.entry.js +0 -1
  63. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -13
  64. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -41
  65. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -80
  66. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -16
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saasquatch/mint-components",
3
3
  "title": "Mint Components",
4
- "version": "2.1.8-1",
4
+ "version": "2.1.8-2",
5
5
  "description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",
6
6
  "icon": "https://res.cloudinary.com/saasquatch/image/upload/v1652219900/squatch-assets/For_Mint.svg",
7
7
  "raisins": "docs/raisins.json",
@@ -1,143 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { PartnerInfoModalView, } from "./sqm-partner-info-modal-view";
3
- export default {
4
- title: "Components/Partner Info Modal",
5
- };
6
- const demoCountries = [
7
- { countryCode: "US", displayName: "United States" },
8
- { countryCode: "CA", displayName: "Canada" },
9
- { countryCode: "GB", displayName: "United Kingdom" },
10
- { countryCode: "AU", displayName: "Australia" },
11
- { countryCode: "DE", displayName: "Germany" },
12
- { countryCode: "FR", displayName: "France" },
13
- { countryCode: "JP", displayName: "Japan" },
14
- ];
15
- const demoCurrencies = [
16
- { currencyCode: "USD", displayName: "US Dollar" },
17
- { currencyCode: "CAD", displayName: "Canadian Dollar" },
18
- { currencyCode: "GBP", displayName: "British Pound" },
19
- { currencyCode: "EUR", displayName: "Euro" },
20
- { currencyCode: "AUD", displayName: "Australian Dollar" },
21
- ];
22
- const noopCallbacks = {
23
- onCountryChange: (e) => console.log("Country changed:", e),
24
- onCurrencyChange: (e) => console.log("Currency changed:", e),
25
- onCountrySearch: (v) => console.log("Country search:", v),
26
- onCurrencySearch: (v) => console.log("Currency search:", v),
27
- onSubmit: () => console.log("Submit"),
28
- onClose: () => console.log("Close"),
29
- };
30
- const defaultText = {
31
- modalBrandHeader: "Welcome to {brandName} Program!",
32
- descriptionNewPartner: "We just need a bit more information about you before you start earning cash!",
33
- descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
34
- countryLabel: "Country",
35
- currencyLabel: "Currency",
36
- submitButtonLabel: "Submit",
37
- confirmButtonLabel: "Confirm",
38
- searchCountryPlaceholder: "Search for a country",
39
- searchCurrencyPlaceholder: "Search for a currency",
40
- };
41
- const defaultProps = {
42
- states: {
43
- open: true,
44
- loading: false,
45
- submitting: false,
46
- isExistingPartner: false,
47
- countryCode: "",
48
- currency: "",
49
- error: "",
50
- success: false,
51
- brandName: "Test Brand",
52
- filteredCountries: demoCountries,
53
- filteredCurrencies: demoCurrencies,
54
- },
55
- callbacks: noopCallbacks,
56
- text: defaultText,
57
- };
58
- export const NewPartnerEmpty = () => {
59
- return h(PartnerInfoModalView, Object.assign({}, defaultProps));
60
- };
61
- export const NewPartnerPrefilled = () => {
62
- const props = {
63
- ...defaultProps,
64
- states: {
65
- ...defaultProps.states,
66
- countryCode: "US",
67
- currency: "",
68
- },
69
- };
70
- return h(PartnerInfoModalView, Object.assign({}, props));
71
- };
72
- export const NewPartnerFullySelected = () => {
73
- const props = {
74
- ...defaultProps,
75
- states: {
76
- ...defaultProps.states,
77
- countryCode: "US",
78
- currency: "USD",
79
- },
80
- };
81
- return h(PartnerInfoModalView, Object.assign({}, props));
82
- };
83
- export const ExistingPartnerConfirm = () => {
84
- const props = {
85
- ...defaultProps,
86
- states: {
87
- ...defaultProps.states,
88
- isExistingPartner: true,
89
- countryCode: "CA",
90
- currency: "CAD",
91
- },
92
- };
93
- return h(PartnerInfoModalView, Object.assign({}, props));
94
- };
95
- export const Submitting = () => {
96
- const props = {
97
- ...defaultProps,
98
- states: {
99
- ...defaultProps.states,
100
- countryCode: "GB",
101
- currency: "GBP",
102
- submitting: true,
103
- },
104
- };
105
- return h(PartnerInfoModalView, Object.assign({}, props));
106
- };
107
- export const WithError = () => {
108
- const props = {
109
- ...defaultProps,
110
- states: {
111
- ...defaultProps.states,
112
- countryCode: "US",
113
- currency: "USD",
114
- error: "An error occurred while creating your partner account. Please try again.",
115
- },
116
- };
117
- return h(PartnerInfoModalView, Object.assign({}, props));
118
- };
119
- export const ValidationError = () => {
120
- const props = {
121
- ...defaultProps,
122
- states: {
123
- ...defaultProps.states,
124
- countryCode: "",
125
- currency: "",
126
- error: "Please select both a country and currency.",
127
- },
128
- };
129
- return h(PartnerInfoModalView, Object.assign({}, props));
130
- };
131
- export const Closed = () => {
132
- const props = {
133
- ...defaultProps,
134
- states: {
135
- ...defaultProps.states,
136
- open: false,
137
- },
138
- };
139
- return h(PartnerInfoModalView, Object.assign({}, props));
140
- };
141
- export const FullStackDemo = () => {
142
- return (h("sqm-partner-info-modal", { "brand-name": "Acme", "header-new-partner": "Welcome to {brandName} Program!", "description-new-partner": "We just need a bit more information about you before you start earning cash!", "submit-button-label": "Submit" }));
143
- };
@@ -1,90 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { createStyleSheet } from "../../styling/JSS";
3
- import { intl } from "../../global/global";
4
- const style = {
5
- Dialog: {
6
- "&::part(panel)": {
7
- maxWidth: "480px",
8
- },
9
- "&::part(title)": {
10
- fontSize: "var(--sl-font-size-x-large)",
11
- fontWeight: "600",
12
- padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
13
- },
14
- "&::part(body)": {
15
- padding: "var(--sl-spacing-small) var(--sl-spacing-x-large)",
16
- fontSize: "var(--sl-font-size-small)",
17
- overflow: "visible",
18
- },
19
- "&::part(footer)": {
20
- display: "flex",
21
- flexDirection: "column",
22
- gap: "var(--sl-spacing-small)",
23
- padding: "var(--sl-spacing-small) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
24
- },
25
- "&::part(overlay)": {
26
- background: "rgba(0, 0, 0, 0.5)",
27
- },
28
- "&::part(close-button)": {
29
- display: "none",
30
- },
31
- },
32
- FormFields: {
33
- display: "flex",
34
- gap: "var(--sl-spacing-medium)",
35
- marginTop: "var(--sl-spacing-medium)",
36
- "& > *": {
37
- flex: 1,
38
- },
39
- },
40
- ErrorMessage: {
41
- color: "var(--sqm-danger-color-text, #d32f2f)",
42
- fontSize: "var(--sl-font-size-small)",
43
- marginTop: "var(--sl-spacing-x-small)",
44
- },
45
- SearchInput: {
46
- "&::part(base)": {
47
- border: "none",
48
- borderBottom: "1px solid var(--sl-color-neutral-300)",
49
- borderRadius: "0",
50
- },
51
- },
52
- };
53
- export function PartnerInfoModalView(props) {
54
- var _a, _b;
55
- const { states, callbacks, text } = props;
56
- const sheet = createStyleSheet(style);
57
- const styleString = sheet.toString();
58
- const description = states.isExistingPartner
59
- ? text.descriptionExistingPartner
60
- : text.descriptionNewPartner;
61
- const buttonLabel = states.isExistingPartner
62
- ? text.confirmButtonLabel
63
- : text.submitButtonLabel;
64
- return (h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: false, label: intl.formatMessage({
65
- id: "modalBrandHeader",
66
- defaultMessage: text.modalBrandHeader,
67
- }, { brandName: states.brandName }), "onSl-request-close": (e) => {
68
- e.preventDefault();
69
- }, "onSl-hide": (e) => {
70
- var _a;
71
- // Prevent closing when clicking outside the dialog but not dropdowns
72
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
73
- e.preventDefault();
74
- }
75
- } },
76
- h("style", { type: "text/css" }, styleString),
77
- h("p", null, description),
78
- h("div", { class: sheet.classes.FormFields },
79
- h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.countryLabel, value: states.countryCode, disabled: states.submitting, required: true, "onSl-select": callbacks.onCountryChange },
80
- h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.onCountrySearch(((_a = e.target) === null || _a === void 0 ? void 0 : _a.value) || ""); } }), (_a = states.filteredCountries) === null || _a === void 0 ? void 0 :
81
- _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
82
- h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting, required: true, "onSl-select": callbacks.onCurrencyChange },
83
- h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.onCurrencySearch(((_a = e.target) === null || _a === void 0 ? void 0 : _a.value) || ""); } }), (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 :
84
- _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
85
- c.currencyCode,
86
- " - ",
87
- c.displayName))))),
88
- states.error && h("p", { class: sheet.classes.ErrorMessage }, states.error),
89
- h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, style: { width: "100%" }, exportparts: "base: primarybutton-base" }, buttonLabel)));
90
- }