@saasquatch/mint-components 1.5.2 → 1.5.3-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 (268) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/dist/cjs/{ShadowViewAddon-9b256c28.js → ShadowViewAddon-8de07cc1.js} +58 -27
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/mint-components.cjs.js +1 -1
  5. package/dist/cjs/{sqm-big-stat_34.cjs.entry.js → sqm-big-stat_35.cjs.entry.js} +129 -55
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +224 -43
  7. package/dist/collection/collection-manifest.json +1 -0
  8. package/dist/collection/components/sqm-checkbox-field/CheckboxField.stories.js +4 -0
  9. package/dist/collection/components/sqm-checkbox-field/UseCheckboxField.stories.js +5 -1
  10. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +1 -1
  11. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +18 -8
  12. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +1 -1
  13. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +18 -8
  14. package/dist/collection/components/sqm-hero/Hero.stories.js +1 -1
  15. package/dist/collection/components/sqm-input-field/InputField.stories.js +81 -0
  16. package/dist/collection/components/sqm-input-field/UseInputField.stories.js +71 -0
  17. package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +33 -0
  18. package/dist/collection/components/sqm-input-field/sqm-input-field.js +197 -0
  19. package/dist/collection/components/sqm-input-field/useInputField.js +10 -0
  20. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -2
  21. package/dist/collection/components/sqm-portal-footer/PortalFooter.stories.js +1 -1
  22. package/dist/collection/components/sqm-program-menu/ProgramMenu.stories.js +1 -1
  23. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -1
  24. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +5 -1
  25. package/dist/esm/{ShadowViewAddon-b98faaf1.js → ShadowViewAddon-63a40a95.js} +58 -28
  26. package/dist/esm/loader.js +1 -1
  27. package/dist/esm/mint-components.js +1 -1
  28. package/dist/esm/{sqm-big-stat_34.entry.js → sqm-big-stat_35.entry.js} +131 -58
  29. package/dist/esm/sqm-stencilbook.entry.js +224 -43
  30. package/dist/esm-es5/{ShadowViewAddon-b98faaf1.js → ShadowViewAddon-63a40a95.js} +1 -1
  31. package/dist/esm-es5/loader.js +1 -1
  32. package/dist/esm-es5/mint-components.js +1 -1
  33. package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -0
  34. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  35. package/dist/mint-components/mint-components.esm.js +1 -1
  36. package/dist/mint-components/p-436da6b8.system.js +1 -1
  37. package/dist/mint-components/{p-f702ffef.js → p-86263d7f.js} +1 -1
  38. package/dist/mint-components/p-9e34ff81.system.entry.js +1 -0
  39. package/dist/mint-components/p-aa5474be.system.entry.js +1 -0
  40. package/dist/mint-components/p-d336a610.system.js +1 -0
  41. package/dist/mint-components/{p-52ca31c9.entry.js → p-e218474f.entry.js} +12 -12
  42. package/dist/mint-components/p-ff22834a.entry.js +9 -0
  43. package/dist/types/components/sqm-checkbox-field/CheckboxField.stories.d.ts +3 -0
  44. package/dist/types/components/sqm-checkbox-field/UseCheckboxField.stories.d.ts +3 -0
  45. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field-view.d.ts +1 -1
  46. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +2 -2
  47. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field-view.d.ts +1 -1
  48. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +2 -2
  49. package/dist/types/components/sqm-input-field/InputField.stories.d.ts +15 -0
  50. package/dist/types/components/sqm-input-field/UseInputField.stories.d.ts +43 -0
  51. package/dist/types/components/sqm-input-field/sqm-input-field-view.d.ts +14 -0
  52. package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +35 -0
  53. package/dist/types/components/sqm-input-field/useInputField.d.ts +5 -0
  54. package/dist/types/components.d.ts +74 -8
  55. package/grapesjs/grapesjs.js +1 -1
  56. package/package.json +1 -1
  57. package/shoelace/assets/icons/123.svg +3 -0
  58. package/shoelace/assets/icons/activity.svg +3 -0
  59. package/shoelace/assets/icons/apple.svg +4 -0
  60. package/shoelace/assets/icons/bandaid-fill.svg +3 -0
  61. package/shoelace/assets/icons/bandaid.svg +4 -0
  62. package/shoelace/assets/icons/bank.svg +3 -0
  63. package/shoelace/assets/icons/bank2.svg +3 -0
  64. package/shoelace/assets/icons/behance.svg +3 -0
  65. package/shoelace/assets/icons/bell-slash-fill.svg +3 -0
  66. package/shoelace/assets/icons/bell-slash.svg +3 -0
  67. package/shoelace/assets/icons/bluetooth.svg +3 -0
  68. package/shoelace/assets/icons/body-text.svg +3 -0
  69. package/shoelace/assets/icons/boombox-fill.svg +4 -0
  70. package/shoelace/assets/icons/boombox.svg +6 -0
  71. package/shoelace/assets/icons/boxes.svg +3 -0
  72. package/shoelace/assets/icons/cash-coin.svg +6 -0
  73. package/shoelace/assets/icons/check-lg.svg +3 -0
  74. package/shoelace/assets/icons/cloud-haze2.svg +3 -0
  75. package/shoelace/assets/icons/coin.svg +5 -0
  76. package/shoelace/assets/icons/currency-bitcoin.svg +3 -0
  77. package/shoelace/assets/icons/currency-dollar.svg +3 -0
  78. package/shoelace/assets/icons/currency-euro.svg +3 -0
  79. package/shoelace/assets/icons/currency-exchange.svg +3 -0
  80. package/shoelace/assets/icons/currency-pound.svg +3 -0
  81. package/shoelace/assets/icons/currency-yen.svg +3 -0
  82. package/shoelace/assets/icons/dash-lg.svg +3 -0
  83. package/shoelace/assets/icons/device-hdd-fill.svg +4 -0
  84. package/shoelace/assets/icons/device-hdd.svg +5 -0
  85. package/shoelace/assets/icons/device-ssd-fill.svg +4 -0
  86. package/shoelace/assets/icons/device-ssd.svg +4 -0
  87. package/shoelace/assets/icons/displayport-fill.svg +3 -0
  88. package/shoelace/assets/icons/displayport.svg +4 -0
  89. package/shoelace/assets/icons/dpad-fill.svg +3 -0
  90. package/shoelace/assets/icons/dpad.svg +4 -0
  91. package/shoelace/assets/icons/dribbble.svg +3 -0
  92. package/shoelace/assets/icons/ear-fill.svg +3 -0
  93. package/shoelace/assets/icons/ear.svg +3 -0
  94. package/shoelace/assets/icons/easel2-fill.svg +4 -0
  95. package/shoelace/assets/icons/easel2.svg +3 -0
  96. package/shoelace/assets/icons/easel3-fill.svg +3 -0
  97. package/shoelace/assets/icons/easel3.svg +3 -0
  98. package/shoelace/assets/icons/envelope-check-fill.svg +4 -0
  99. package/shoelace/assets/icons/envelope-check.svg +4 -0
  100. package/shoelace/assets/icons/envelope-dash-fill.svg +4 -0
  101. package/shoelace/assets/icons/envelope-dash.svg +4 -0
  102. package/shoelace/assets/icons/envelope-exclamation-fill.svg +4 -0
  103. package/shoelace/assets/icons/envelope-exclamation.svg +4 -0
  104. package/shoelace/assets/icons/envelope-plus-fill.svg +4 -0
  105. package/shoelace/assets/icons/envelope-plus.svg +4 -0
  106. package/shoelace/assets/icons/envelope-slash-fill.svg +4 -0
  107. package/shoelace/assets/icons/envelope-slash.svg +4 -0
  108. package/shoelace/assets/icons/envelope-x-fill.svg +4 -0
  109. package/shoelace/assets/icons/envelope-x.svg +4 -0
  110. package/shoelace/assets/icons/ethernet.svg +4 -0
  111. package/shoelace/assets/icons/exclamation-lg.svg +3 -0
  112. package/shoelace/assets/icons/explicit-fill.svg +3 -0
  113. package/shoelace/assets/icons/explicit.svg +4 -0
  114. package/shoelace/assets/icons/fan.svg +4 -0
  115. package/shoelace/assets/icons/file-earmark-pdf-fill.svg +4 -0
  116. package/shoelace/assets/icons/file-earmark-pdf.svg +4 -0
  117. package/shoelace/assets/icons/file-pdf-fill.svg +4 -0
  118. package/shoelace/assets/icons/file-pdf.svg +4 -0
  119. package/shoelace/assets/icons/fingerprint.svg +7 -0
  120. package/shoelace/assets/icons/gender-ambiguous.svg +3 -0
  121. package/shoelace/assets/icons/gender-female.svg +3 -0
  122. package/shoelace/assets/icons/gender-male.svg +3 -0
  123. package/shoelace/assets/icons/gender-trans.svg +3 -0
  124. package/shoelace/assets/icons/git.svg +3 -0
  125. package/shoelace/assets/icons/gpu-card.svg +5 -0
  126. package/shoelace/assets/icons/graph-down-arrow.svg +3 -0
  127. package/shoelace/assets/icons/graph-up-arrow.svg +3 -0
  128. package/shoelace/assets/icons/hdmi-fill.svg +3 -0
  129. package/shoelace/assets/icons/hdmi.svg +4 -0
  130. package/shoelace/assets/icons/headset-vr.svg +4 -0
  131. package/shoelace/assets/icons/hypnotize.svg +4 -0
  132. package/shoelace/assets/icons/infinity.svg +3 -0
  133. package/shoelace/assets/icons/info-lg.svg +3 -0
  134. package/shoelace/assets/icons/line.svg +3 -0
  135. package/shoelace/assets/icons/list-columns-reverse.svg +3 -0
  136. package/shoelace/assets/icons/list-columns.svg +3 -0
  137. package/shoelace/assets/icons/magic.svg +3 -0
  138. package/shoelace/assets/icons/mastodon.svg +3 -0
  139. package/shoelace/assets/icons/medium.svg +3 -0
  140. package/shoelace/assets/icons/memory.svg +3 -0
  141. package/shoelace/assets/icons/messenger.svg +3 -0
  142. package/shoelace/assets/icons/meta.svg +3 -0
  143. package/shoelace/assets/icons/microsoft.svg +3 -0
  144. package/shoelace/assets/icons/modem-fill.svg +3 -0
  145. package/shoelace/assets/icons/modem.svg +4 -0
  146. package/shoelace/assets/icons/mortarboard-fill.svg +4 -0
  147. package/shoelace/assets/icons/mortarboard.svg +4 -0
  148. package/shoelace/assets/icons/motherboard-fill.svg +4 -0
  149. package/shoelace/assets/icons/motherboard.svg +4 -0
  150. package/shoelace/assets/icons/nintendo-switch.svg +4 -0
  151. package/shoelace/assets/icons/optical-audio-fill.svg +4 -0
  152. package/shoelace/assets/icons/optical-audio.svg +5 -0
  153. package/shoelace/assets/icons/paypal.svg +3 -0
  154. package/shoelace/assets/icons/pc-display-horizontal.svg +3 -0
  155. package/shoelace/assets/icons/pc-display.svg +3 -0
  156. package/shoelace/assets/icons/pc-horizontal.svg +3 -0
  157. package/shoelace/assets/icons/pc.svg +3 -0
  158. package/shoelace/assets/icons/pci-card.svg +4 -0
  159. package/shoelace/assets/icons/person-rolodex.svg +4 -0
  160. package/shoelace/assets/icons/person-video.svg +4 -0
  161. package/shoelace/assets/icons/person-video2.svg +4 -0
  162. package/shoelace/assets/icons/person-video3.svg +4 -0
  163. package/shoelace/assets/icons/person-workspace.svg +4 -0
  164. package/shoelace/assets/icons/piggy-bank-fill.svg +3 -0
  165. package/shoelace/assets/icons/piggy-bank.svg +4 -0
  166. package/shoelace/assets/icons/pin-map-fill.svg +4 -0
  167. package/shoelace/assets/icons/pin-map.svg +4 -0
  168. package/shoelace/assets/icons/pinterest.svg +3 -0
  169. package/shoelace/assets/icons/playstation.svg +3 -0
  170. package/shoelace/assets/icons/plus-lg.svg +3 -0
  171. package/shoelace/assets/icons/plus-slash-minus.svg +3 -0
  172. package/shoelace/assets/icons/projector-fill.svg +3 -0
  173. package/shoelace/assets/icons/projector.svg +4 -0
  174. package/shoelace/assets/icons/qr-code-scan.svg +7 -0
  175. package/shoelace/assets/icons/qr-code.svg +7 -0
  176. package/shoelace/assets/icons/question-lg.svg +3 -0
  177. package/shoelace/assets/icons/quora.svg +3 -0
  178. package/shoelace/assets/icons/quote.svg +3 -0
  179. package/shoelace/assets/icons/radioactive.svg +4 -0
  180. package/shoelace/assets/icons/recycle.svg +3 -0
  181. package/shoelace/assets/icons/reddit.svg +4 -0
  182. package/shoelace/assets/icons/robot.svg +4 -0
  183. package/shoelace/assets/icons/router-fill.svg +6 -0
  184. package/shoelace/assets/icons/router.svg +6 -0
  185. package/shoelace/assets/icons/safe-fill.svg +4 -0
  186. package/shoelace/assets/icons/safe.svg +4 -0
  187. package/shoelace/assets/icons/safe2-fill.svg +4 -0
  188. package/shoelace/assets/icons/safe2.svg +4 -0
  189. package/shoelace/assets/icons/sd-card-fill.svg +3 -0
  190. package/shoelace/assets/icons/sd-card.svg +4 -0
  191. package/shoelace/assets/icons/send-check-fill.svg +4 -0
  192. package/shoelace/assets/icons/send-check.svg +4 -0
  193. package/shoelace/assets/icons/send-dash-fill.svg +4 -0
  194. package/shoelace/assets/icons/send-dash.svg +4 -0
  195. package/shoelace/assets/icons/send-exclamation-fill.svg +4 -0
  196. package/shoelace/assets/icons/send-exclamation.svg +4 -0
  197. package/shoelace/assets/icons/send-fill.svg +3 -0
  198. package/shoelace/assets/icons/send-plus-fill.svg +4 -0
  199. package/shoelace/assets/icons/send-plus.svg +4 -0
  200. package/shoelace/assets/icons/send-slash-fill.svg +4 -0
  201. package/shoelace/assets/icons/send-slash.svg +4 -0
  202. package/shoelace/assets/icons/send-x-fill.svg +4 -0
  203. package/shoelace/assets/icons/send-x.svg +4 -0
  204. package/shoelace/assets/icons/send.svg +3 -0
  205. package/shoelace/assets/icons/signal.svg +3 -0
  206. package/shoelace/assets/icons/skype.svg +3 -0
  207. package/shoelace/assets/icons/slash-lg.svg +3 -0
  208. package/shoelace/assets/icons/snapchat.svg +3 -0
  209. package/shoelace/assets/icons/spotify.svg +3 -0
  210. package/shoelace/assets/icons/stack-overflow.svg +4 -0
  211. package/shoelace/assets/icons/steam.svg +4 -0
  212. package/shoelace/assets/icons/strava.svg +3 -0
  213. package/shoelace/assets/icons/terminal-dash.svg +4 -0
  214. package/shoelace/assets/icons/terminal-plus.svg +4 -0
  215. package/shoelace/assets/icons/terminal-split.svg +4 -0
  216. package/shoelace/assets/icons/terminal-x.svg +4 -0
  217. package/shoelace/assets/icons/thunderbolt-fill.svg +3 -0
  218. package/shoelace/assets/icons/thunderbolt.svg +4 -0
  219. package/shoelace/assets/icons/ticket-detailed-fill.svg +3 -0
  220. package/shoelace/assets/icons/ticket-detailed.svg +4 -0
  221. package/shoelace/assets/icons/ticket-fill.svg +3 -0
  222. package/shoelace/assets/icons/ticket-perforated-fill.svg +3 -0
  223. package/shoelace/assets/icons/ticket-perforated.svg +4 -0
  224. package/shoelace/assets/icons/ticket.svg +3 -0
  225. package/shoelace/assets/icons/tiktok.svg +3 -0
  226. package/shoelace/assets/icons/translate.svg +4 -0
  227. package/shoelace/assets/icons/usb-c-fill.svg +3 -0
  228. package/shoelace/assets/icons/usb-c.svg +4 -0
  229. package/shoelace/assets/icons/usb-drive-fill.svg +3 -0
  230. package/shoelace/assets/icons/usb-drive.svg +3 -0
  231. package/shoelace/assets/icons/usb-fill.svg +3 -0
  232. package/shoelace/assets/icons/usb-micro-fill.svg +3 -0
  233. package/shoelace/assets/icons/usb-micro.svg +4 -0
  234. package/shoelace/assets/icons/usb-mini-fill.svg +3 -0
  235. package/shoelace/assets/icons/usb-mini.svg +4 -0
  236. package/shoelace/assets/icons/usb-plug-fill.svg +3 -0
  237. package/shoelace/assets/icons/usb-plug.svg +3 -0
  238. package/shoelace/assets/icons/usb-symbol.svg +3 -0
  239. package/shoelace/assets/icons/usb.svg +4 -0
  240. package/shoelace/assets/icons/vimeo.svg +3 -0
  241. package/shoelace/assets/icons/webcam-fill.svg +4 -0
  242. package/shoelace/assets/icons/webcam.svg +4 -0
  243. package/shoelace/assets/icons/window-dash.svg +5 -0
  244. package/shoelace/assets/icons/window-desktop.svg +4 -0
  245. package/shoelace/assets/icons/window-fullscreen.svg +4 -0
  246. package/shoelace/assets/icons/window-plus.svg +5 -0
  247. package/shoelace/assets/icons/window-split.svg +4 -0
  248. package/shoelace/assets/icons/window-stack.svg +4 -0
  249. package/shoelace/assets/icons/window-x.svg +5 -0
  250. package/shoelace/assets/icons/windows.svg +3 -0
  251. package/shoelace/assets/icons/wordpress.svg +5 -0
  252. package/shoelace/assets/icons/x-lg.svg +4 -0
  253. package/shoelace/assets/icons/xbox.svg +3 -0
  254. package/shoelace/assets/icons/yin-yang.svg +4 -0
  255. package/shoelace/themes/themes/dark.styles.d.ts +2 -0
  256. package/shoelace/themes/themes/dark.styles.js +531 -0
  257. package/shoelace/themes/themes/light.css +439 -0
  258. package/shoelace/themes/themes/light.styles.d.ts +2 -0
  259. package/shoelace/themes/themes/light.styles.js +531 -0
  260. package/dist/esm-es5/sqm-big-stat_34.entry.js +0 -1
  261. package/dist/mint-components/p-842aa194.system.js +0 -1
  262. package/dist/mint-components/p-8a1a1fb4.system.entry.js +0 -1
  263. package/dist/mint-components/p-a624b8d7.system.entry.js +0 -1
  264. package/dist/mint-components/p-b176c55c.entry.js +0 -9
  265. package/dist/types/global/android.d.ts +0 -7
  266. package/dist/types/global/demo.d.ts +0 -1
  267. package/dist/types/stories/features.d.ts +0 -4
  268. package/dist/types/stories/templates.d.ts +0 -4
@@ -18,7 +18,7 @@ require('./luxon-59ca7d19.js');
18
18
  const utils = require('./utils-8ef4fe4a.js');
19
19
  require('./sqm-text-span-view-ab4ad6ef.js');
20
20
  require('./sqm-portal-container-view-2d11ed71.js');
21
- const ShadowViewAddon = require('./ShadowViewAddon-9b256c28.js');
21
+ const ShadowViewAddon = require('./ShadowViewAddon-8de07cc1.js');
22
22
  require('./sqm-portal-section-view-765aae4d.js');
23
23
 
24
24
  const BigStat = class {
@@ -123,6 +123,51 @@ const CardFeed = class {
123
123
  }
124
124
  };
125
125
 
126
+ const style = {
127
+ IconStyle: {
128
+ display: "block",
129
+ position: "absolute",
130
+ top: "23px",
131
+ },
132
+ DivStyle: {
133
+ marginLeft: "30px",
134
+ },
135
+ Details: {
136
+ marginLeft: "30px",
137
+ },
138
+ Heading: {
139
+ display: "inline-block",
140
+ },
141
+ Alert: {
142
+ margin: "30px",
143
+ },
144
+ };
145
+ const sheet = JSS.createStyleSheet(style);
146
+ const styleString = sheet.toString();
147
+ function RequiredPropsError({ missingProps }) {
148
+ if (!missingProps)
149
+ return false;
150
+ const host = index_module.P();
151
+ const [detailsOpen, setDetailsOpen] = stencilHooks_module.useState(false);
152
+ return (index.h("sl-alert", { type: "danger", open: true, class: sheet.classes.Alert },
153
+ index.h("style", { type: "text/css" }, styleString),
154
+ index.h("div", { slot: "icon", class: sheet.classes.IconStyle },
155
+ index.h("sl-icon", { name: "exclamation-octagon" })),
156
+ index.h("div", { class: sheet.classes.DivStyle },
157
+ index.h("h2", { class: sheet.classes.Heading }, "There was a problem loading this page"),
158
+ index.h("p", null, "There was a technical problem that prevented this page from loading. Please contact us with the link to this page.")),
159
+ index.h("details", { class: sheet.classes.Details },
160
+ index.h("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
161
+ detailsOpen ? "Less" : "More",
162
+ " details"),
163
+ index.h("p", null,
164
+ "Error occured while loading ",
165
+ `<${host.tagName.toLowerCase()}>`,
166
+ ". Values for the following attributes are missing:"),
167
+ index.h("ul", null, missingProps.map((prop) => (index.h("li", null,
168
+ index.h("strong", null, prop.attribute))))))));
169
+ }
170
+
126
171
  const FORM_VALIDATION_CONTEXT = "sq:validation-state";
127
172
  function useValidationState(formState) {
128
173
  const host = index_module.P();
@@ -166,13 +211,22 @@ const CheckboxField = class {
166
211
  */
167
212
  this.errorMessage = "Must be checked";
168
213
  /**
169
- * @uiName Required
214
+ * @uiName Optional
170
215
  */
171
- this.checkboxRequired = true;
216
+ this.checkboxOptional = false;
172
217
  stencilHooks_module.h$1(this);
173
218
  }
174
219
  disconnectedCallback() { }
175
220
  render() {
221
+ const missingProps = utils.getMissingProps([
222
+ {
223
+ attribute: "checkbox-name",
224
+ value: this.checkboxName,
225
+ },
226
+ ]);
227
+ if (missingProps) {
228
+ return index.h(RequiredPropsError, { missingProps: missingProps });
229
+ }
176
230
  const content = {
177
231
  ...utils.getProps(this),
178
232
  };
@@ -283,13 +337,22 @@ const DropdownField = class {
283
337
  */
284
338
  this.errorMessage = "Select an option";
285
339
  /**
286
- * @uiName Required
340
+ * @uiName Optional
287
341
  */
288
- this.dropdownRequired = true;
342
+ this.dropdownOptional = false;
289
343
  stencilHooks_module.h$1(this);
290
344
  }
291
345
  disconnectedCallback() { }
292
346
  render() {
347
+ const missingProps = utils.getMissingProps([
348
+ {
349
+ attribute: "dropdown-name",
350
+ value: this.dropdownName,
351
+ },
352
+ ]);
353
+ if (missingProps) {
354
+ return index.h(RequiredPropsError, { missingProps: missingProps });
355
+ }
293
356
  const content = {
294
357
  ...utils.getProps(this),
295
358
  selectOptions: index.h("slot", null),
@@ -741,6 +804,61 @@ const SqmHookStoryContainer = class {
741
804
  }
742
805
  };
743
806
 
807
+ function useInputField() {
808
+ const validationState = stencilHooks_module.d(FORM_VALIDATION_CONTEXT);
809
+ return {
810
+ states: {
811
+ validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
812
+ },
813
+ };
814
+ }
815
+
816
+ const InputField = class {
817
+ constructor(hostRef) {
818
+ index.registerInstance(this, hostRef);
819
+ this.ignored = true;
820
+ /**
821
+ * @uiName Input Type
822
+ * @uiType string
823
+ * @uiEnum ["text", "date", "tel"]
824
+ */
825
+ this.fieldType = "text";
826
+ /**
827
+ * @uiName Empty error message
828
+ */
829
+ this.errorMessage = "Cannot be empty";
830
+ /**
831
+ * @uiName Optional
832
+ */
833
+ this.fieldOptional = false;
834
+ stencilHooks_module.h$1(this);
835
+ }
836
+ disconnectedCallback() { }
837
+ render() {
838
+ const content = {
839
+ ...utils.getProps(this),
840
+ };
841
+ const missingProps = utils.getMissingProps([
842
+ {
843
+ attribute: "field-name",
844
+ value: this.fieldName,
845
+ },
846
+ ]);
847
+ if (missingProps) {
848
+ return index.h(RequiredPropsError, { missingProps: missingProps });
849
+ }
850
+ const { states } = index_module.jn() ? useInputFieldDemo(this) : useInputField();
851
+ return index.h(ShadowViewAddon.InputFieldView, { states: states, content: content });
852
+ }
853
+ };
854
+ function useInputFieldDemo(props) {
855
+ return cjs.cjs({
856
+ states: {
857
+ validationErrors: [],
858
+ },
859
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
860
+ }
861
+
744
862
  const GET_LEADERBOARD = index_module.dist.gql `
745
863
  query ($type: String!, $filter: UserLeaderboardFilterInput) {
746
864
  userLeaderboard(type: $type, filter: $filter) {
@@ -5597,7 +5715,7 @@ const ProgramMenu = class {
5597
5715
  }
5598
5716
  };
5599
5717
 
5600
- const style = {
5718
+ const style$1 = {
5601
5719
  Container: {
5602
5720
  display: "flex",
5603
5721
  color: "var(--sl-color-neutral-900)",
@@ -5631,8 +5749,8 @@ const style = {
5631
5749
  },
5632
5750
  },
5633
5751
  };
5634
- const sheet = JSS.createStyleSheet(style);
5635
- const styleString = sheet.toString();
5752
+ const sheet$1 = JSS.createStyleSheet(style$1);
5753
+ const styleString$1 = sheet$1.toString();
5636
5754
  const vanillaStyle = `
5637
5755
  :host{
5638
5756
  display: block;
@@ -5641,9 +5759,9 @@ const vanillaStyle = `
5641
5759
  function ReferralCardView(props) {
5642
5760
  return (index.h("div", null,
5643
5761
  index.h("style", { type: "text/css" },
5644
- styleString,
5762
+ styleString$1,
5645
5763
  vanillaStyle),
5646
- index.h("div", { class: sheet.classes.Container },
5764
+ index.h("div", { class: sheet$1.classes.Container },
5647
5765
  index.h("div", { class: "left", style: {
5648
5766
  alignSelf: props.verticalAlignment,
5649
5767
  } }, props.slots.left),
@@ -5699,51 +5817,6 @@ function useReferralIframe(props) {
5699
5817
  };
5700
5818
  }
5701
5819
 
5702
- const style$1 = {
5703
- IconStyle: {
5704
- display: "block",
5705
- position: "absolute",
5706
- top: "23px",
5707
- },
5708
- DivStyle: {
5709
- marginLeft: "30px",
5710
- },
5711
- Details: {
5712
- marginLeft: "30px",
5713
- },
5714
- Heading: {
5715
- display: "inline-block",
5716
- },
5717
- Alert: {
5718
- margin: "30px",
5719
- },
5720
- };
5721
- const sheet$1 = JSS.createStyleSheet(style$1);
5722
- const styleString$1 = sheet$1.toString();
5723
- function RequiredPropsError({ missingProps }) {
5724
- if (!missingProps)
5725
- return false;
5726
- const host = index_module.P();
5727
- const [detailsOpen, setDetailsOpen] = stencilHooks_module.useState(false);
5728
- return (index.h("sl-alert", { type: "danger", open: true, class: sheet$1.classes.Alert },
5729
- index.h("style", { type: "text/css" }, styleString$1),
5730
- index.h("div", { slot: "icon", class: sheet$1.classes.IconStyle },
5731
- index.h("sl-icon", { name: "exclamation-octagon" })),
5732
- index.h("div", { class: sheet$1.classes.DivStyle },
5733
- index.h("h2", { class: sheet$1.classes.Heading }, "There was a problem loading this page"),
5734
- index.h("p", null, "There was a technical problem that prevented this page from loading. Please contact us with the link to this page.")),
5735
- index.h("details", { class: sheet$1.classes.Details },
5736
- index.h("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
5737
- detailsOpen ? "Less" : "More",
5738
- " details"),
5739
- index.h("p", null,
5740
- "Error occured while loading ",
5741
- `<${host.tagName.toLowerCase()}>`,
5742
- ". Values for the following attributes are missing:"),
5743
- index.h("ul", null, missingProps.map((prop) => (index.h("li", null,
5744
- index.h("strong", null, prop.attribute))))))));
5745
- }
5746
-
5747
5820
  const SqmReferralIframe = class {
5748
5821
  constructor(hostRef) {
5749
5822
  index.registerInstance(this, hostRef);
@@ -7538,6 +7611,7 @@ exports.sqm_dropdown_field = DropdownField;
7538
7611
  exports.sqm_edit_profile = EditProfile;
7539
7612
  exports.sqm_hero_image = HeroImage;
7540
7613
  exports.sqm_hook_story_container = SqmHookStoryContainer;
7614
+ exports.sqm_input_field = InputField;
7541
7615
  exports.sqm_leaderboard = Leaderboard;
7542
7616
  exports.sqm_name_fields = NameFields;
7543
7617
  exports.sqm_navigation_menu = NavigationMenu;