@xapp/form-widget 1.107.5 → 1.109.0

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 CHANGED
@@ -11,6 +11,42 @@ A scheduling widget that supports multi-step forms and displays.
11
11
  - Audio/voice input capabilities
12
12
  - Address autocomplete and service area validation
13
13
  - Session management and response caching
14
+ - Inline embedding into a container the host page controls
15
+
16
+ ## Embedding
17
+
18
+ By default the widget appends its own `#xapp-form-widget` div to the page and opens as a
19
+ fixed, full-viewport modal over it.
20
+
21
+ To render the form **inline** instead — inside a box the host page positions and sizes —
22
+ create that div yourself and give it the `embedded` class:
23
+
24
+ ```html
25
+ <div id="xapp-form-widget" class="embedded" style="
26
+ background-color: transparent;
27
+ width: 400px;
28
+ height: 600px;
29
+ overflow-y: auto;
30
+ overflow-x: hidden;
31
+ position: absolute;
32
+ top: 40px;
33
+ left: 100px;">
34
+ </div>
35
+ ```
36
+
37
+ The widget script finds the existing div and renders into it rather than creating one. In
38
+ embedded mode it:
39
+
40
+ - fills the container instead of capping itself at the desktop breakpoint widths, and drops
41
+ the border, corner radius and drop shadow that make it read as a floating card;
42
+ - renders no backdrop, and does not lock the host page's scroll;
43
+ - hides the side button (a `position: fixed` page-edge tab that would escape the container).
44
+
45
+ Use `class="xapp-embedded"` instead if your own CSS already claims `.embedded`. Either class
46
+ works; the div must still carry `id="xapp-form-widget"`.
47
+
48
+ The div is inspected once, when the widget mounts, so it must carry the class before the
49
+ widget script runs — changing it later has no effect for that page view.
14
50
 
15
51
  ## Tracking & Analytics
16
52
 
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -8,4 +8,4 @@ export { DEFAULT_DATE_FIELD_NAME, DEFAULT_DATE_TIME_FIELD_NAME, DEFAULT_HORIZON_
8
8
  export { FormStyleContext, ResolvedFormStyle, STYLE_PRESET_NONE, mergeFormWidgetTheme, resolveFormStyle, resolveStylePresetName, } from "./utils/stylePreset";
9
9
  export { COST_GUIDE_FORM_STYLE } from "./presets";
10
10
  export * from "./components/FormDisplay/model";
11
- export { FormWidgetEnv, FormWidgetTheme, PartnerFormFraming, PartnerFormStyle, } from "@xapp/stentor-form-widget-channel";
11
+ export { FormWidgetEnv, FormWidgetSubHeader, FormWidgetTheme, PartnerFormFraming, PartnerFormStyle, } from "@xapp/stentor-form-widget-channel";