@usgb/forms 1.0.3 → 1.0.4
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.
- package/README.md +7 -4
- package/dist/{forms-manifest.1.0.3.json → forms-manifest.1.0.4.json} +3 -3
- package/dist/forms-manifest.json +3 -3
- package/dist/index.js +212 -195
- package/dist/src/definitions/consents.d.ts +5 -0
- package/dist/src/definitions/consents.d.ts.map +1 -1
- package/dist/src/definitions/index.d.ts +1 -1
- package/dist/src/definitions/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/{usgb-forms.1.0.3.js → usgb-forms.1.0.4.js} +9 -9
- package/dist/usgb-forms.css +46 -33
- package/dist/usgb-forms.js +9 -9
- package/forms-manifest.json +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ Use `listFormDefinitions()` (or the manifest) when a CMS needs a picker of avail
|
|
|
35
35
|
| --------------------------- | ------------ | --------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
36
36
|
| `magento-fik` | `lead` | First name, last name, email (required); phone (optional) | Optional TCPA (v1), marketing SMS, and terms/privacy checkboxes | `dense`, `large`, or `sidebar`; optional two-column name row |
|
|
37
37
|
| `magento-ira-kick-article` | `lead` | First name, last name, email, phone (all required) | Optional TCPA checkbox (v2, links terms and privacy) | `dense`, `large`, or `sidebar`; optional two-column name row |
|
|
38
|
-
| `magento-fik-blog-rail` | `lead` | First name, last name, email, phone (all required) |
|
|
38
|
+
| `magento-fik-blog-rail` | `lead` | First name, last name, email, phone (all required) | Required TCPA checkbox (v3, links terms and privacy) | `dense`, `large`, or `sidebar`; optional two-column name row |
|
|
39
39
|
| `main-investors-kit-notice` | `lead` | Same as `magento-fik` | Clickwrap notice only (`lead-clickwrap` v2) | `dense`, `large`, or `sidebar`; optional two-column name row |
|
|
40
40
|
| `newsletter` | `newsletter` | Email only | None | None — omit `variant` and `twoColumn` / `two-column` |
|
|
41
41
|
|
|
@@ -95,7 +95,7 @@ Peer dependency: `react` and `react-dom` `^18` or `^19`.
|
|
|
95
95
|
Load the built script for a release (styles inject themselves):
|
|
96
96
|
|
|
97
97
|
```html
|
|
98
|
-
<script src="https://forms.usgoldbureau.com/usgb-forms.1.0.
|
|
98
|
+
<script src="https://forms.usgoldbureau.com/usgb-forms.1.0.4.js"></script>
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
Pin the script and the catalog together: `usgb-forms.<version>.js` and `forms-manifest.<version>.json` on `https://forms.usgoldbureau.com/`. Gutenberg should load that matching manifest when listing `formId`s.
|
|
@@ -160,7 +160,7 @@ Newsletter (no consent or lead layout options):
|
|
|
160
160
|
Load one script. Styles are injected automatically.
|
|
161
161
|
|
|
162
162
|
```html
|
|
163
|
-
<script src="https://forms.usgoldbureau.com/usgb-forms.1.0.
|
|
163
|
+
<script src="https://forms.usgoldbureau.com/usgb-forms.1.0.4.js"></script>
|
|
164
164
|
<usgb-form
|
|
165
165
|
form-id="magento-fik"
|
|
166
166
|
appearance="on-dark"
|
|
@@ -269,7 +269,8 @@ Successful submits send `formId`, `definitionVersion`, `submissionContractVersio
|
|
|
269
269
|
Consent policies are versioned and package-owned (checkboxes and/or clickwrap notices). Forms list zero or more pins (`definitionId` + `definitionVersion` + optional `required` for checkboxes). Hosts only supply document **hrefs**.
|
|
270
270
|
|
|
271
271
|
- `magento-fik` pins `lead-tcpa`, `lead-sms`, and `lead-tospp` (all v1, optional checkboxes). Required URLs: `userAgreement`, `privacyPolicy` (`user-agreement-url`, `privacy-policy-url`).
|
|
272
|
-
- `magento-ira-kick-article`
|
|
272
|
+
- `magento-ira-kick-article` pins `lead-tcpa` v2 only (optional checkbox). Unlike v1, v2 links the terms and privacy policy, so required URLs: `userAgreement`, `privacyPolicy`.
|
|
273
|
+
- `magento-fik-blog-rail` pins `lead-tcpa` v3 only (required checkbox: automated text-message consent; “Terms of Service” links `userAgreement`, “Privacy Policy” links `privacyPolicy`). It shares the v1 payload keys. Required URLs: `userAgreement`, `privacyPolicy`.
|
|
273
274
|
- `main-investors-kit-notice` pins `lead-clickwrap` v2 (notice only: Privacy Policy, Terms & Conditions, and text/call consent). Required URLs: `privacyPolicy`, `userAgreement`. It shares the v1 payload key `clickwrap_consent_language`. `lead-clickwrap` v1 (five document links) stays in the catalog and is not pinned.
|
|
274
275
|
- `newsletter` has no consents and needs no legal URLs.
|
|
275
276
|
- `LEGAL_URL_ATTRS` lists every host-owned slot, including `clientAgreement` / `client-agreement-url`. No current catalog consent requires `clientAgreement`; it is still valid on `legalUrls` / the attribute (PWA Magento ships it in `PWA_LEGAL_URLS`).
|
|
@@ -326,6 +327,8 @@ Prefer **custom properties** on `.usgb-form` for color, type, and spacing:
|
|
|
326
327
|
|
|
327
328
|
Use class selectors when a token does not exist (`.usgb-form .usgb-btn { border-radius: 0; }`).
|
|
328
329
|
|
|
330
|
+
**Fonts.** Body copy, fields, and the button inherit the host page's `font-family`, so WordPress (`'Montserrat', sans-serif` on `body`) and the PWA (`next/font`'s hashed `__Montserrat_…` family) both render in Montserrat with no extra setup. Set `--usgb-font-primary` on `.usgb-form` only to force a different stack. The heading uses `--usgb-font-secondary`, which reads the host variable `--font-kameron` first and falls back to the `Kameron` family name; a `next/font` host should expose `Kameron({ variable: '--font-kameron' })` on `<html>`, or override `--usgb-font-secondary` directly.
|
|
331
|
+
|
|
329
332
|
Stable hooks: `.usgb-form` (`data-appearance`, `data-variant`, `data-kind`), `.usgb-form-heading`, `.usgb-form-subheading`, `.usgb-form-grid`, `.usgb-form-inline`, `.usgb-field-control`, `.usgb-field-error`, `.usgb-consent-*`, `.usgb-btn`, `.usgb-form-status-*`.
|
|
330
333
|
|
|
331
334
|
Semantic tokens (`--usgb-field-*`, `--usgb-button-*`, `--usgb-newsletter-underline`, …) are the first place to retheme. Palette vars (`--usgb-blue-1`, …) are a PWA snapshot. Error and checkbox glyphs are inline SVGs that use `currentColor` — override `--usgb-alert-danger` or `--usgb-checkbox-mark` to recolor them.
|
|
@@ -342,13 +342,13 @@
|
|
|
342
342
|
"consents": [
|
|
343
343
|
{
|
|
344
344
|
"definitionId": "lead-tcpa",
|
|
345
|
-
"definitionVersion": "
|
|
346
|
-
"required":
|
|
345
|
+
"definitionVersion": "3",
|
|
346
|
+
"required": true
|
|
347
347
|
}
|
|
348
348
|
],
|
|
349
349
|
"editor": {
|
|
350
350
|
"label": "Magento FIK Blog Rail",
|
|
351
|
-
"description": "First name, last name, email, and phone required.
|
|
351
|
+
"description": "First name, last name, email, and phone required. Required automated text-message consent checkbox with linked terms of service and privacy policy (lead-tcpa v3).",
|
|
352
352
|
"whenToUse": "TBD",
|
|
353
353
|
"whenNotToUse": "TBD",
|
|
354
354
|
"options": [
|
package/dist/forms-manifest.json
CHANGED
|
@@ -342,13 +342,13 @@
|
|
|
342
342
|
"consents": [
|
|
343
343
|
{
|
|
344
344
|
"definitionId": "lead-tcpa",
|
|
345
|
-
"definitionVersion": "
|
|
346
|
-
"required":
|
|
345
|
+
"definitionVersion": "3",
|
|
346
|
+
"required": true
|
|
347
347
|
}
|
|
348
348
|
],
|
|
349
349
|
"editor": {
|
|
350
350
|
"label": "Magento FIK Blog Rail",
|
|
351
|
-
"description": "First name, last name, email, and phone required.
|
|
351
|
+
"description": "First name, last name, email, and phone required. Required automated text-message consent checkbox with linked terms of service and privacy policy (lead-tcpa v3).",
|
|
352
352
|
"whenToUse": "TBD",
|
|
353
353
|
"whenNotToUse": "TBD",
|
|
354
354
|
"options": [
|