@ibti-tech/chatbot 0.8.1 → 0.8.5

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
@@ -60,9 +60,17 @@ All public types (e.g. `ChatbotTypes`, `ChatbotBarProps`) and parameters are doc
60
60
  | `horizontalPosition` | `'left' \| 'right'` | `'right'` | Bar alignment |
61
61
  | `deviceHorizontalPosition`| `'left' \| 'right' \| 'center' \| string` | — | Device position on desktop (or e.g. `'20px'`, `'calc(100% - 200px)'`) |
62
62
  | `pushContentDown` | `boolean` | `false` | If `true` and `verticalPosition="top"`, widget pushes content down instead of overlaying |
63
+ | `pushContentDownBarHeight`| `number` | `32` | Height in px of the bar when pushContentDown (24–120). |
63
64
  | `zIndex`, `topOffset`, `aboveHeader` | — | — | Optional layout/stacking |
64
65
 
65
- When using `pushContentDown={true}` with `verticalPosition="top"`, render `ChatbotBar` **before** your header/main content so it appears at the top.
66
+ When using `pushContentDown={true}` with `verticalPosition="top"`, the bar is fixed at the top and the widget adds the class `ibti-chatbot-push-down` and CSS variable `--ibti-chatbot-bar-height` (default 32px) to `body`. To avoid extra vertical scroll and keep your content below the bar, reserve the top space in your layout, for example:
67
+
68
+ ```css
69
+ body.ibti-chatbot-push-down .your-main-content {
70
+ padding-top: var(--ibti-chatbot-bar-height, 32px);
71
+ min-height: calc(100vh - var(--ibti-chatbot-bar-height, 32px));
72
+ }
73
+ ```
66
74
 
67
75
  ### Types (`ChatbotTypes`)
68
76
 
package/dist/index.d.ts CHANGED
@@ -85,12 +85,16 @@ declare module '@ibti-tech/chatbot/components/ChatbotBar/index' {
85
85
  pushContentDownRowBackgroundLight?: string;
86
86
  /** Background of the push-content-down full-width row (dark theme). Hex or rgb(). Default: rgb(0, 0, 0). */
87
87
  pushContentDownRowBackgroundDark?: string;
88
+ /** Height in px of the bar when pushContentDown is true (closed state). Default: 32. */
89
+ pushContentDownBarHeight?: number;
88
90
  };
89
- export const ChatbotBar: ({ verticalPosition, horizontalPosition, deviceHorizontalPosition, zIndex, topOffset, aboveHeader, pushContentDown, pushContentDownRowBackgroundLight, pushContentDownRowBackgroundDark, }: ChatbotBarProps) => React.JSX.Element;
91
+ /** Bar height in px when pushContentDown (closed state). Used for body class and CSS variable. */
92
+ export const PUSH_DOWN_BAR_HEIGHT_PX = 32;
93
+ export const ChatbotBar: ({ verticalPosition, horizontalPosition, deviceHorizontalPosition, zIndex, topOffset, aboveHeader, pushContentDown, pushContentDownRowBackgroundLight, pushContentDownRowBackgroundDark, pushContentDownBarHeight, }: ChatbotBarProps) => React.JSX.Element;
90
94
  //# sourceMappingURL=index.d.ts.map
91
95
  }
92
96
  declare module '@ibti-tech/chatbot/components/ChatbotBar/index.d.ts' {
93
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACrC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC/D,2GAA2G;IAC3G,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sIAAsI;IACtI,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,wGAAwG;IACxG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,mHAAmH;IACnH,iCAAiC,CAAC,EAAE,MAAM,CAAA;IAC1C,4GAA4G;IAC5G,gCAAgC,CAAC,EAAE,MAAM,CAAA;CAC1C,CAAA;AAKD,eAAO,MAAM,UAAU,GAAI,2LAUxB,eAAe,sBAuFjB,CAAA"}
97
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACrC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC/D,2GAA2G;IAC3G,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sIAAsI;IACtI,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,wGAAwG;IACxG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,mHAAmH;IACnH,iCAAiC,CAAC,EAAE,MAAM,CAAA;IAC1C,4GAA4G;IAC5G,gCAAgC,CAAC,EAAE,MAAM,CAAA;IACzC,wFAAwF;IACxF,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAKD,kGAAkG;AAClG,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAKzC,eAAO,MAAM,UAAU,GAAI,qNAWxB,eAAe,sBAgGjB,CAAA"}
94
98
  }
95
99
  declare module '@ibti-tech/chatbot/components/ChatbotBar/styles' {
96
100
  import { breakpoints } from '@ibti-tech/ui';
@@ -107,6 +111,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotBar/styles' {
107
111
  /** Full-width row strip (pushContentDown + top). Background only; device sits on top with theme styles. */
108
112
  export const PushDownRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
109
113
  $background: string;
114
+ $barHeight: number;
110
115
  }>> & string;
111
116
  export const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
112
117
  $verticalPosition: "top" | "bottom";
@@ -116,11 +121,12 @@ declare module '@ibti-tech/chatbot/components/ChatbotBar/styles' {
116
121
  $topOffset?: string | number;
117
122
  $aboveHeader?: boolean;
118
123
  $pushContentDown?: boolean;
124
+ $pushContentDownBarHeight?: number;
119
125
  }>> & string;
120
126
  //# sourceMappingURL=styles.d.ts.map
121
127
  }
122
128
  declare module '@ibti-tech/chatbot/components/ChatbotBar/styles.d.ts' {
123
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,eAAe,CAAA;AAIpD,eAAO,MAAM,YAAY;;oBAEgB,kBAAmB;;yBADrC,MAAM,GAAG,OAAO;gCACT,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;aACvD,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;iMA4E3B,CAAA;AAED,2GAA2G;AAC3G,eAAO,MAAM,WAAW;iBAA6B,MAAM;YAS1D,CAAA;AAED,eAAO,MAAM,OAAO;uBACC,KAAK,GAAG,QAAQ;yBACd,MAAM,GAAG,OAAO;aAC5B,OAAO;cACN,MAAM;iBACH,MAAM,GAAG,MAAM;mBACb,OAAO;uBACH,OAAO;YA2H3B,CAAA"}
129
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,eAAe,CAAA;AAIpD,eAAO,MAAM,YAAY;;oBAEgB,kBAAmB;;yBADrC,MAAM,GAAG,OAAO;gCACT,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;aACvD,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;iMA4E3B,CAAA;AAED,2GAA2G;AAC3G,eAAO,MAAM,WAAW;iBAA6B,MAAM;gBAAc,MAAM;YAS9E,CAAA;AAED,eAAO,MAAM,OAAO;uBACC,KAAK,GAAG,QAAQ;yBACd,MAAM,GAAG,OAAO;aAC5B,OAAO;cACN,MAAM;iBACH,MAAM,GAAG,MAAM;mBACb,OAAO;uBACH,OAAO;gCACE,MAAM;YAgInC,CAAA"}
124
130
  }
125
131
  declare module '@ibti-tech/chatbot/components/ChatbotBody/index' {
126
132
  import React from 'react';
@@ -153,13 +159,15 @@ declare module '@ibti-tech/chatbot/components/ChatbotDevice/index' {
153
159
  * Default: undefined (uses parent container positioning)
154
160
  */
155
161
  horizontalPosition?: 'left' | 'right' | 'center' | string;
162
+ /** Height in px of the bar when pushContentDown (closed state). Default: 32. */
163
+ pushContentDownBarHeight?: number;
156
164
  };
157
- export const ChatbotDevice: ({ verticalPosition, pushContentDown, horizontalPosition, }: ChatbotDeviceProps) => React.JSX.Element;
165
+ export const ChatbotDevice: ({ verticalPosition, pushContentDown, horizontalPosition, pushContentDownBarHeight, }: ChatbotDeviceProps) => React.JSX.Element;
158
166
  export default ChatbotDevice;
159
167
  //# sourceMappingURL=index.d.ts.map
160
168
  }
161
169
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/index.d.ts' {
162
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;CAC1D,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,4DAI3B,kBAAkB,sBAsBpB,CAAA;AAED,eAAe,aAAa,CAAA"}
170
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACzD,gFAAgF;IAChF,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAID,eAAO,MAAM,aAAa,GAAI,sFAK3B,kBAAkB,sBAyBpB,CAAA;AAED,eAAe,aAAa,CAAA"}
163
171
  }
164
172
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles' {
165
173
  export const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
@@ -167,11 +175,12 @@ declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles' {
167
175
  $verticalPosition: "top" | "bottom";
168
176
  $pushContentDown?: boolean;
169
177
  $horizontalPosition?: "left" | "right" | "center" | string;
178
+ $pushContentDownBarHeight?: number;
170
179
  }>> & string;
171
180
  //# sourceMappingURL=styles.d.ts.map
172
181
  }
173
182
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles.d.ts' {
174
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;aACT,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;0BACJ,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;YAqO3D,CAAA"}
183
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;aACT,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;0BACJ,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;gCAC9B,MAAM;YAyOnC,CAAA"}
175
184
  }
176
185
  declare module '@ibti-tech/chatbot/components/ChatbotFooter/index' {
177
186
  import React from 'react';
@@ -240,13 +249,15 @@ declare module '@ibti-tech/chatbot/components/ChatbotToggle/index' {
240
249
  verticalPosition?: 'top' | 'bottom';
241
250
  opened?: boolean;
242
251
  pushContentDown?: boolean;
252
+ /** Height in px of the bar when closed (pushContentDown or bottom). Default: 32. */
253
+ pushContentDownBarHeight?: number;
243
254
  };
244
- export const ChatbotToggle: ({ verticalPosition, opened: openedProp, pushContentDown, }: ChatbotToggleProps) => React.JSX.Element;
255
+ export const ChatbotToggle: ({ verticalPosition, opened: openedProp, pushContentDown, pushContentDownBarHeight, }: ChatbotToggleProps) => React.JSX.Element;
245
256
  export default ChatbotToggle;
246
257
  //# sourceMappingURL=index.d.ts.map
247
258
  }
248
259
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/index.d.ts' {
249
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotToggle/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,4DAI3B,kBAAkB,sBAkCpB,CAAA;AAED,eAAe,aAAa,CAAA"}
260
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotToggle/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,oFAAoF;IACpF,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAID,eAAO,MAAM,aAAa,GAAI,sFAK3B,kBAAkB,sBAmCpB,CAAA;AAED,eAAe,aAAa,CAAA"}
250
261
  }
251
262
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/styles' {
252
263
  export const ButtonWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
@@ -254,11 +265,12 @@ declare module '@ibti-tech/chatbot/components/ChatbotToggle/styles' {
254
265
  $verticalPosition: "top" | "bottom";
255
266
  $pushContentDown?: boolean;
256
267
  $themeMode?: "light" | "dark";
268
+ $barHeight?: number;
257
269
  }>> & string;
258
270
  //# sourceMappingURL=styles.d.ts.map
259
271
  }
260
272
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/styles.d.ts' {
261
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotToggle/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;aACf,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;iBACb,OAAO,GAAG,MAAM;YAwE9B,CAAA"}
273
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotToggle/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;aACf,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;iBACb,OAAO,GAAG,MAAM;iBAChB,MAAM;YAwEpB,CAAA"}
262
274
  }
263
275
  declare module '@ibti-tech/chatbot/components/MessageBalloon/index' {
264
276
  import React from 'react';
@@ -632,6 +644,18 @@ declare module '@ibti-tech/chatbot/embed' {
632
644
  icon?: string;
633
645
  /** Custom UI texts per locale: { 'pt-BR': CustomTexts, 'en': CustomTexts }. */
634
646
  texts?: ChatbotTypes.Texts;
647
+ /** When true and position is top-*, the bar pushes page content down (no overlay). Avoids extra scroll when combined with body class .ibti-chatbot-push-down. */
648
+ pushContentDown?: boolean;
649
+ /** Offset from top (e.g. '64px', 80). Use to sit below a fixed header. */
650
+ topOffset?: string | number;
651
+ /** When true, sets z-index to 9999 so the chatbot appears above header elements. */
652
+ aboveHeader?: boolean;
653
+ /** Bar background when pushContentDown (light theme). Default rgb(230,230,230). */
654
+ pushContentDownRowBackgroundLight?: string;
655
+ /** Bar background when pushContentDown (dark theme). Default rgb(0,0,0). */
656
+ pushContentDownRowBackgroundDark?: string;
657
+ /** Height in px of the bar when pushContentDown is true. Default: 32. Clamped between 24 and 120. */
658
+ pushContentDownBarHeight?: number;
635
659
  }
636
660
  global {
637
661
  interface Window {
@@ -646,7 +670,7 @@ declare module '@ibti-tech/chatbot/embed' {
646
670
  //# sourceMappingURL=embed.d.ts.map
647
671
  }
648
672
  declare module '@ibti-tech/chatbot/embed.d.ts' {
649
- {"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/embed.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,MAAM,CAAC,EAAE,YAAY,CAAC,MAAM,CAAA;IAC5B,iDAAiD;IACjD,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAA;IACpE,uHAAuH;IACvH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,oFAAoF;IACpF,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,CAAA;IAClC,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+EAA+E;IAC/E,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;QAC1C,gBAAgB,CAAC,EAAE;YACjB,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAA;YAC/C,OAAO,EAAE,MAAM,IAAI,CAAA;SACpB,CAAA;KACF;CACF;AAyID,wBAAgB,UAAU,SAEzB"}
673
+ {"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/embed.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,MAAM,CAAC,EAAE,YAAY,CAAC,MAAM,CAAA;IAC5B,iDAAiD;IACjD,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAA;IACpE,uHAAuH;IACvH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,oFAAoF;IACpF,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,CAAA;IAClC,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+EAA+E;IAC/E,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC1B,iKAAiK;IACjK,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,oFAAoF;IACpF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mFAAmF;IACnF,iCAAiC,CAAC,EAAE,MAAM,CAAA;IAC1C,4EAA4E;IAC5E,gCAAgC,CAAC,EAAE,MAAM,CAAA;IACzC,qGAAqG;IACrG,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;QAC1C,gBAAgB,CAAC,EAAE;YACjB,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAA;YAC/C,OAAO,EAAE,MAAM,IAAI,CAAA;SACpB,CAAA;KACF;CACF;AAmJD,wBAAgB,UAAU,SAEzB"}
650
674
  }
651
675
  declare module '@ibti-tech/chatbot/events/assistant-answer' {
652
676
  export const dispatchAssitantAnswer: () => void;
package/dist/index.mjs CHANGED
@@ -1019,10 +1019,11 @@ var Wrapper = styled.div`
1019
1019
 
1020
1020
  /* Default height - will be overridden by specific states */
1021
1021
  ${(props) => {
1022
+ const barH = props.$pushContentDownBarHeight ?? 32;
1022
1023
  if (props.$pushContentDown && props.$verticalPosition === "top") {
1023
1024
  if (!props.$opened) {
1024
1025
  return css`
1025
- height: 32px;
1026
+ height: ${barH}px;
1026
1027
  `;
1027
1028
  }
1028
1029
  return css`
@@ -1080,12 +1081,13 @@ var Wrapper = styled.div`
1080
1081
  ${screens.tablet} {
1081
1082
  /* Height when closed with pushContentDown vs opened */
1082
1083
  ${(props) => {
1084
+ const barH = props.$pushContentDownBarHeight ?? 32;
1083
1085
  if (props.$pushContentDown && props.$verticalPosition === "top") {
1084
1086
  if (!props.$opened) {
1085
1087
  return css`
1086
- height: 32px !important;
1087
- max-height: 32px !important;
1088
- min-height: 32px !important;
1088
+ height: ${barH}px !important;
1089
+ max-height: ${barH}px !important;
1090
+ min-height: ${barH}px !important;
1089
1091
  `;
1090
1092
  } else {
1091
1093
  return css`
@@ -1131,18 +1133,20 @@ var Wrapper = styled.div`
1131
1133
  }
1132
1134
 
1133
1135
  /* Closed state styles */
1134
- ${(props) => !props.$opened && (props.$verticalPosition === "top" ? css`
1136
+ ${(props) => {
1137
+ const barH = props.$pushContentDownBarHeight ?? 32;
1138
+ return !props.$opened && (props.$verticalPosition === "top" ? css`
1135
1139
  ${props.$pushContentDown ? css`
1136
1140
  /* Push content down mode: show only toggle button - based on commit 8379cc8 */
1137
- height: 32px !important;
1138
- max-height: 32px !important;
1139
- min-height: 32px !important;
1141
+ height: ${barH}px !important;
1142
+ max-height: ${barH}px !important;
1143
+ min-height: ${barH}px !important;
1140
1144
  transform: none !important;
1141
1145
  overflow: visible !important;
1142
1146
  ${screens.tablet} {
1143
- height: 32px !important;
1144
- max-height: 32px !important;
1145
- min-height: 32px !important;
1147
+ height: ${barH}px !important;
1148
+ max-height: ${barH}px !important;
1149
+ min-height: ${barH}px !important;
1146
1150
  transform: none !important;
1147
1151
  }
1148
1152
  > *:not(:last-child) {
@@ -1150,9 +1154,9 @@ var Wrapper = styled.div`
1150
1154
  }
1151
1155
  > *:last-child {
1152
1156
  flex-shrink: 0 !important;
1153
- min-height: 32px !important;
1154
- height: 32px !important;
1155
- max-height: 32px !important;
1157
+ min-height: ${barH}px !important;
1158
+ height: ${barH}px !important;
1159
+ max-height: ${barH}px !important;
1156
1160
  width: 100% !important;
1157
1161
  min-width: 100% !important;
1158
1162
  max-width: 100% !important;
@@ -1161,11 +1165,11 @@ var Wrapper = styled.div`
1161
1165
  }
1162
1166
  ` : css`
1163
1167
  /* Overlay mode: translate up to show only toggle button - based on commit 8379cc8 */
1164
- transform: translateY(calc(-100% + 32px));
1168
+ transform: translateY(calc(-100% + ${barH}px));
1165
1169
  `}
1166
1170
  ` : css`
1167
1171
  /* Bottom position: translate down to show only toggle button */
1168
- transform: translateY(calc(100% - 32px));
1172
+ transform: translateY(calc(100% - ${barH}px));
1169
1173
  width: 100%;
1170
1174
 
1171
1175
  ${screens.tablet} {
@@ -1180,11 +1184,12 @@ var Wrapper = styled.div`
1180
1184
 
1181
1185
  > *:last-child {
1182
1186
  flex-shrink: 0;
1183
- min-height: 32px;
1184
- height: 32px;
1187
+ min-height: ${barH}px;
1188
+ height: ${barH}px;
1185
1189
  width: 100%;
1186
1190
  }
1187
- `)}
1191
+ `);
1192
+ }}
1188
1193
 
1189
1194
  /* Opened state styles when pushContentDown is true - must come after closed state */
1190
1195
  /* Chat overlays (Bar is fixed); same internal layout as overlay — no display overrides */
@@ -2530,9 +2535,9 @@ var ChatbotFooter_default = ChatbotFooter;
2530
2535
  import { screens as screens2 } from "@ibti-tech/ui";
2531
2536
  import { css as css4, styled as styled9 } from "styled-components";
2532
2537
  var ButtonWrapper = styled9.button`
2533
- height: 32px !important;
2534
- min-height: 32px !important;
2535
- max-height: 32px !important;
2538
+ height: ${(p) => p.$barHeight ?? 32}px !important;
2539
+ min-height: ${(p) => p.$barHeight ?? 32}px !important;
2540
+ max-height: ${(p) => p.$barHeight ?? 32}px !important;
2536
2541
  width: 100% !important;
2537
2542
  min-width: 100% !important;
2538
2543
  max-width: 100% !important;
@@ -2561,8 +2566,8 @@ var ButtonWrapper = styled9.button`
2561
2566
  ${(props) => !props.$opened && props.$verticalPosition === "bottom" && css4`
2562
2567
  background-color: ${props.theme.colors.layers[1].background};
2563
2568
  cursor: pointer;
2564
- min-height: 32px;
2565
- height: 32px;
2569
+ min-height: ${props.$barHeight ?? 32}px;
2570
+ height: ${props.$barHeight ?? 32}px;
2566
2571
  width: 100%;
2567
2572
  flex-shrink: 0;
2568
2573
  box-sizing: border-box;
@@ -2595,10 +2600,12 @@ var ButtonWrapper = styled9.button`
2595
2600
  // src/components/ChatbotToggle/index.tsx
2596
2601
  import React12 from "react";
2597
2602
  import { ChevronDownIcon, ChevronUpIcon } from "@ibti-tech/ui/dist/icons";
2603
+ var DEFAULT_BAR_HEIGHT = 32;
2598
2604
  var ChatbotToggle = /* @__PURE__ */ __name(({
2599
2605
  verticalPosition = "bottom",
2600
2606
  opened: openedProp,
2601
- pushContentDown = false
2607
+ pushContentDown = false,
2608
+ pushContentDownBarHeight = DEFAULT_BAR_HEIGHT
2602
2609
  }) => {
2603
2610
  const { opened: openedContext, openedToggle, theme: themeMode } = useChatbot_default();
2604
2611
  const opened = openedProp ?? openedContext;
@@ -2612,7 +2619,8 @@ var ChatbotToggle = /* @__PURE__ */ __name(({
2612
2619
  $opened: opened,
2613
2620
  $verticalPosition: verticalPosition,
2614
2621
  $pushContentDown: pushContentDown,
2615
- $themeMode: themeMode
2622
+ $themeMode: themeMode,
2623
+ $barHeight: pushContentDownBarHeight
2616
2624
  },
2617
2625
  /* @__PURE__ */ React12.createElement(BotIcon, null),
2618
2626
  /* @__PURE__ */ React12.createElement("span", null, toggleText),
@@ -2852,20 +2860,24 @@ var useChatFeedbackBox = /* @__PURE__ */ __name(() => {
2852
2860
  }, "useChatFeedbackBox");
2853
2861
 
2854
2862
  // src/components/ChatbotDevice/index.tsx
2863
+ var DEFAULT_PUSH_DOWN_BAR_HEIGHT = 32;
2855
2864
  var ChatbotDevice = /* @__PURE__ */ __name(({
2856
2865
  verticalPosition = "bottom",
2857
2866
  pushContentDown = false,
2858
- horizontalPosition
2867
+ horizontalPosition,
2868
+ pushContentDownBarHeight = DEFAULT_PUSH_DOWN_BAR_HEIGHT
2859
2869
  }) => {
2860
2870
  const { opened } = useChatbot_default();
2861
2871
  const chatFeedbackBox = useChatFeedbackBox();
2872
+ const barH = pushContentDownBarHeight;
2862
2873
  return /* @__PURE__ */ React14.createElement(
2863
2874
  Wrapper,
2864
2875
  {
2865
2876
  $opened: opened,
2866
2877
  $verticalPosition: verticalPosition,
2867
2878
  $pushContentDown: pushContentDown,
2868
- $horizontalPosition: horizontalPosition
2879
+ $horizontalPosition: horizontalPosition,
2880
+ $pushContentDownBarHeight: barH
2869
2881
  },
2870
2882
  /* @__PURE__ */ React14.createElement(ChatUserFeedbackRating, { chatFeedbackBox }),
2871
2883
  /* @__PURE__ */ React14.createElement(ChatbotHeader_default, { chatFeedbackBox }),
@@ -2876,7 +2888,8 @@ var ChatbotDevice = /* @__PURE__ */ __name(({
2876
2888
  {
2877
2889
  verticalPosition,
2878
2890
  opened,
2879
- pushContentDown
2891
+ pushContentDown,
2892
+ pushContentDownBarHeight: barH
2880
2893
  }
2881
2894
  )
2882
2895
  );
@@ -2954,20 +2967,22 @@ var PushDownRow = styled11.div`
2954
2967
  position: absolute;
2955
2968
  inset: 0;
2956
2969
  width: 100%;
2957
- height: 32px;
2958
- min-height: 32px;
2970
+ height: ${(p) => p.$barHeight}px;
2971
+ min-height: ${(p) => p.$barHeight}px;
2959
2972
  background-color: ${(p) => p.$background};
2960
2973
  z-index: 0;
2961
2974
  pointer-events: none;
2962
2975
  `;
2963
2976
  var Wrapper10 = styled11.div`
2964
2977
  ${(props) => {
2978
+ const barH = props.$pushContentDownBarHeight ?? 32;
2979
+ const topVal = props.$topOffset !== void 0 ? typeof props.$topOffset === "number" ? `${props.$topOffset}px` : props.$topOffset : "0";
2965
2980
  if (props.$pushContentDown && props.$verticalPosition === "top") {
2966
2981
  if (props.$opened) {
2967
2982
  return css6`
2968
2983
  position: fixed !important;
2969
2984
  width: 100%;
2970
- top: 0 !important;
2985
+ top: ${topVal} !important;
2971
2986
  bottom: auto !important;
2972
2987
  left: 0 !important;
2973
2988
  right: 0 !important;
@@ -2982,13 +2997,13 @@ var Wrapper10 = styled11.div`
2982
2997
  background-color: transparent;
2983
2998
  border: none;
2984
2999
  padding: 0;
2985
- top: ${props.$topOffset !== void 0 ? typeof props.$topOffset === "number" ? `${props.$topOffset}px` : props.$topOffset : "0"} !important;
3000
+ top: ${topVal} !important;
2986
3001
  bottom: auto !important;
2987
3002
  ${props.$horizontalPosition === "right" ? css6`left: auto !important; right: 2.5rem !important;` : css6`left: 2.5rem !important; right: auto !important;`}
2988
3003
  }
2989
3004
  @media screen and (max-width: ${breakpoints3.tablet}px) {
2990
3005
  padding-top: 0 !important;
2991
- top: 0 !important;
3006
+ top: ${topVal} !important;
2992
3007
  height: 100vh;
2993
3008
  }
2994
3009
  `;
@@ -2996,14 +3011,14 @@ var Wrapper10 = styled11.div`
2996
3011
  return css6`
2997
3012
  position: fixed !important;
2998
3013
  width: 100%;
2999
- top: 0 !important;
3014
+ top: ${topVal} !important;
3000
3015
  bottom: auto !important;
3001
3016
  left: 0 !important;
3002
3017
  right: 0 !important;
3003
3018
  z-index: ${props.$zIndex !== void 0 ? props.$zIndex : props.theme.zIndex.modals};
3004
3019
  pointer-events: auto;
3005
- height: 32px !important;
3006
- min-height: 32px !important;
3020
+ height: ${barH}px !important;
3021
+ min-height: ${barH}px !important;
3007
3022
  background-color: transparent;
3008
3023
  ${screens3.tablet} {
3009
3024
  width: 100% !important;
@@ -3011,10 +3026,12 @@ var Wrapper10 = styled11.div`
3011
3026
  border: none;
3012
3027
  padding: 0;
3013
3028
  bottom: auto !important;
3029
+ top: ${topVal} !important;
3014
3030
  }
3015
3031
  @media screen and (max-width: ${breakpoints3.tablet}px) {
3016
- height: 32px !important;
3017
- min-height: 32px !important;
3032
+ height: ${barH}px !important;
3033
+ min-height: ${barH}px !important;
3034
+ top: ${topVal} !important;
3018
3035
  }
3019
3036
  `;
3020
3037
  }
@@ -3063,6 +3080,9 @@ import React15, { useEffect as useEffect8, useState as useState10 } from "react"
3063
3080
  import { createPortal } from "react-dom";
3064
3081
  var PUSH_DOWN_ROW_BG_LIGHT = "rgb(230, 230, 230)";
3065
3082
  var PUSH_DOWN_ROW_BG_DARK = "rgb(0, 0, 0)";
3083
+ var PUSH_DOWN_BAR_HEIGHT_PX = 32;
3084
+ var BODY_CLASS_PUSH_DOWN = "ibti-chatbot-push-down";
3085
+ var BODY_CSS_VAR_BAR_HEIGHT = "--ibti-chatbot-bar-height";
3066
3086
  var ChatbotBar = /* @__PURE__ */ __name(({
3067
3087
  verticalPosition = "bottom",
3068
3088
  horizontalPosition = "right",
@@ -3072,8 +3092,10 @@ var ChatbotBar = /* @__PURE__ */ __name(({
3072
3092
  aboveHeader = false,
3073
3093
  pushContentDown = false,
3074
3094
  pushContentDownRowBackgroundLight = PUSH_DOWN_ROW_BG_LIGHT,
3075
- pushContentDownRowBackgroundDark = PUSH_DOWN_ROW_BG_DARK
3095
+ pushContentDownRowBackgroundDark = PUSH_DOWN_ROW_BG_DARK,
3096
+ pushContentDownBarHeight = PUSH_DOWN_BAR_HEIGHT_PX
3076
3097
  }) => {
3098
+ const barHeightPx = Math.max(24, Math.min(120, pushContentDownBarHeight));
3077
3099
  const { opened, theme } = useChatbot_default();
3078
3100
  const pushDownRowBackground = theme === "dark" ? pushContentDownRowBackgroundDark : pushContentDownRowBackgroundLight;
3079
3101
  const [portalContainer, setPortalContainer] = useState10(null);
@@ -3101,18 +3123,17 @@ var ChatbotBar = /* @__PURE__ */ __name(({
3101
3123
  }
3102
3124
  }, [verticalPosition]);
3103
3125
  const usePushDown = pushContentDown && verticalPosition === "top";
3104
- const content = /* @__PURE__ */ React15.createElement(React15.Fragment, null, usePushDown && /* @__PURE__ */ React15.createElement(
3105
- "div",
3106
- {
3107
- style: {
3108
- height: 33,
3109
- minHeight: 33,
3110
- width: "100%",
3111
- backgroundColor: pushDownRowBackground
3112
- },
3113
- "aria-hidden": true
3114
- }
3115
- ), /* @__PURE__ */ React15.createElement(
3126
+ useEffect8(() => {
3127
+ if (!usePushDown || typeof document === "undefined") return;
3128
+ const body = document.body;
3129
+ body.classList.add(BODY_CLASS_PUSH_DOWN);
3130
+ body.style.setProperty(BODY_CSS_VAR_BAR_HEIGHT, `${barHeightPx}px`);
3131
+ return () => {
3132
+ body.classList.remove(BODY_CLASS_PUSH_DOWN);
3133
+ body.style.removeProperty(BODY_CSS_VAR_BAR_HEIGHT);
3134
+ };
3135
+ }, [usePushDown, barHeightPx]);
3136
+ const content = /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
3116
3137
  Wrapper10,
3117
3138
  {
3118
3139
  $verticalPosition: verticalPosition,
@@ -3121,9 +3142,17 @@ var ChatbotBar = /* @__PURE__ */ __name(({
3121
3142
  $zIndex: calculatedZIndex,
3122
3143
  $topOffset: topOffset,
3123
3144
  $aboveHeader: aboveHeader,
3124
- $pushContentDown: pushContentDown
3145
+ $pushContentDown: pushContentDown,
3146
+ $pushContentDownBarHeight: barHeightPx
3125
3147
  },
3126
- usePushDown && !opened && /* @__PURE__ */ React15.createElement(PushDownRow, { $background: pushDownRowBackground, "aria-hidden": true }),
3148
+ usePushDown && !opened && /* @__PURE__ */ React15.createElement(
3149
+ PushDownRow,
3150
+ {
3151
+ $background: pushDownRowBackground,
3152
+ $barHeight: barHeightPx,
3153
+ "aria-hidden": true
3154
+ }
3155
+ ),
3127
3156
  /* @__PURE__ */ React15.createElement(
3128
3157
  BarContainer,
3129
3158
  {
@@ -3138,7 +3167,8 @@ var ChatbotBar = /* @__PURE__ */ __name(({
3138
3167
  {
3139
3168
  verticalPosition,
3140
3169
  pushContentDown: usePushDown,
3141
- horizontalPosition: deviceHorizontalPosition
3170
+ horizontalPosition: deviceHorizontalPosition,
3171
+ pushContentDownBarHeight: barHeightPx
3142
3172
  }
3143
3173
  )
3144
3174
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibti-tech/chatbot",
3
- "version": "0.8.1",
3
+ "version": "0.8.5",
4
4
  "description": "Chatbot system developed to be embedded in any website",
5
5
  "packageManager": "yarn@3.6.4",
6
6
  "main": "./dist/index.mjs",