@ibti-tech/chatbot 0.5.8 → 0.6.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.
package/README.md CHANGED
@@ -10,6 +10,7 @@ A modern and customizable React chatbot component developed by IBTI Soluções e
10
10
  - ⚡ **Optimized performance**: Built with ESBuild for maximum performance
11
11
  - 🔌 **Easy integration**: Simple React component to use
12
12
  - 📱 **Responsive**: Works perfectly on desktop and mobile
13
+ - 📍 **Flexible positioning**: Precise horizontal positioning with predefined values or custom CSS units (px, %, rem, calc, etc.)
13
14
 
14
15
  ## 📦 Installation
15
16
 
@@ -78,7 +79,115 @@ Main component that displays the chatbot bar with toggle button and conversation
78
79
  | Prop | Type | Required | Description |
79
80
  |------|------|----------|-------------|
80
81
  | `verticalPosition` | `'top' \| 'bottom'` | ❌ | Vertical position of the chatbot. Default: `'bottom'` |
81
- | `horizontalPosition` | `'left' \| 'right'` | ❌ | Horizontal position of the chatbot. Default: `'right'` |
82
+ | `horizontalPosition` | `'left' \| 'right'` | ❌ | Horizontal position of the chatbot bar container. Default: `'right'` |
83
+ | `deviceHorizontalPosition` | `'left' \| 'right' \| 'center' \| string` | ❌ | Horizontal position of the ChatbotDevice on desktop. Can be a predefined value ('left', 'right', 'center') or a custom value with any CSS unit (e.g., '20px', '10%', '2rem', 'calc(100% - 200px)'). When using a custom value, it will be applied as the 'left' property. If not provided, the device will use the parent container's positioning. Only affects desktop view. |
84
+ | `zIndex` | `number` | ❌ | Custom z-index value. If not provided, uses theme.zIndex.modals. Useful when you need the chatbot to appear above specific elements like headers |
85
+ | `topOffset` | `string \| number` | ❌ | Offset from the top when verticalPosition is 'top'. Can be a number (in pixels) or a string (e.g., '100px', '10rem'). Useful to position the chatbot below a fixed header |
86
+ | `aboveHeader` | `boolean` | ❌ | Convenient prop to position the chatbot above header elements. When true, sets z-index to 9999 and allows topOffset configuration. Default: `false` |
87
+ | `pushContentDown` | `boolean` | ❌ | When true and verticalPosition is 'top', the chatbot will push content down instead of overlaying it. The chatbot will occupy space in the document flow. When false, the chatbot will be fixed and overlay the content. Default: `false` |
88
+
89
+ #### Examples
90
+
91
+ **Positioning above header elements:**
92
+
93
+ ```jsx
94
+ // Option 1: Using aboveHeader prop (recommended)
95
+ <ChatbotBar
96
+ verticalPosition="top"
97
+ aboveHeader={true}
98
+ topOffset={120} // Adjust based on your header height
99
+ />
100
+
101
+ // Option 2: Using custom zIndex
102
+ <ChatbotBar
103
+ verticalPosition="top"
104
+ zIndex={9999}
105
+ topOffset="120px"
106
+ />
107
+
108
+ // Option 3: Using CSS units for topOffset
109
+ <ChatbotBar
110
+ verticalPosition="top"
111
+ aboveHeader={true}
112
+ topOffset="8rem" // Using rem units for better scalability
113
+ />
114
+
115
+ // Option 4: Push content down instead of overlaying (only works with verticalPosition="top")
116
+ // When pushContentDown is true, the chatbot occupies full width and pushes header content down
117
+ <ChatbotBar
118
+ verticalPosition="top"
119
+ pushContentDown={true}
120
+ />
121
+
122
+ // ✅ CORRECT - Component at the beginning
123
+ function App() {
124
+ return (
125
+ <ChatbotProvider ...>
126
+ <ChatbotBar verticalPosition="top" pushContentDown={true} />
127
+ <header>...</header>
128
+ <main>...</main>
129
+ </ChatbotProvider>
130
+ )
131
+ }
132
+
133
+ // ❌ WRONG - Component at the end (will appear at bottom even with pushContentDown)
134
+ function App() {
135
+ return (
136
+ <ChatbotProvider ...>
137
+ <header>...</header>
138
+ <main>...</main>
139
+ <ChatbotBar verticalPosition="top" pushContentDown={true} />
140
+ </ChatbotProvider>
141
+ )
142
+ }
143
+ ```
144
+
145
+ **Note:** The component maintains full responsiveness even with custom positioning. The `topOffset` prop accepts both numbers (pixels) and strings (any valid CSS unit). The `pushContentDown` prop only works when `verticalPosition` is `'top'` and makes the chatbot reserve space in the document flow instead of overlaying content. When `pushContentDown` is enabled, the chatbot will occupy the full width of the page (aligned with the host site's container) and push all content below it down, making it perfect for top-of-page integration.
146
+
147
+ **⚠️ CRITICAL:** When using `pushContentDown={true}`, you **MUST** render the `ChatbotBar` component at the **beginning** of your DOM structure (before your header and other content) for it to appear at the top of the page. This is because `pushContentDown` uses `position: relative`, which means the component appears where it is in the DOM flow. If you render it at the end of the DOM, it will appear at the bottom of the page even with `pushContentDown={true}`.
148
+
149
+ **Precise horizontal positioning on desktop:**
150
+
151
+ ```jsx
152
+ // Using predefined values
153
+ <ChatbotBar
154
+ deviceHorizontalPosition="left" // Aligns to left
155
+ />
156
+ <ChatbotBar
157
+ deviceHorizontalPosition="right" // Aligns to right (default behavior)
158
+ />
159
+ <ChatbotBar
160
+ deviceHorizontalPosition="center" // Centers the device
161
+ />
162
+
163
+ // Using custom values with any CSS unit
164
+ <ChatbotBar
165
+ deviceHorizontalPosition="20px" // 20 pixels from left
166
+ />
167
+ <ChatbotBar
168
+ deviceHorizontalPosition="10%" // 10% from left edge
169
+ />
170
+ <ChatbotBar
171
+ deviceHorizontalPosition="2rem" // 2rem from left edge
172
+ />
173
+ <ChatbotBar
174
+ deviceHorizontalPosition="calc(100% - 200px)" // 200px from right edge
175
+ />
176
+
177
+ // Combining with other positioning props
178
+ <ChatbotBar
179
+ verticalPosition="bottom"
180
+ horizontalPosition="right" // Bar container alignment
181
+ deviceHorizontalPosition="50px" // Device positioned 50px from left
182
+ />
183
+ ```
184
+
185
+ **Important notes about `deviceHorizontalPosition`:**
186
+ - Only affects desktop/tablet view (mobile always uses full width)
187
+ - Custom values are applied as the `left` CSS property
188
+ - Predefined values (`'left'`, `'right'`, `'center'`) use margin-based alignment
189
+ - When using custom values, the device maintains its fixed width to prevent button shrinking
190
+ - This prop provides precise control over the ChatbotDevice position, independent of the bar container alignment
82
191
 
83
192
  ### `ChatbotDevice`
84
193
 
@@ -89,6 +198,8 @@ Alternative component that can be used to display the chatbot on different devic
89
198
  | Prop | Type | Required | Description |
90
199
  |------|------|----------|-------------|
91
200
  | `verticalPosition` | `'top' \| 'bottom'` | ❌ | Vertical position of the chatbot. Default: `'bottom'` |
201
+ | `pushContentDown` | `boolean` | ❌ | When true and verticalPosition is 'top', the chatbot will push content down instead of overlaying it. Default: `false` |
202
+ | `horizontalPosition` | `'left' \| 'right' \| 'center' \| string` | ❌ | Horizontal position on desktop. Can be a predefined value ('left', 'right', 'center') or a custom value with any CSS unit (e.g., '20px', '10%', '2rem', 'calc(100% - 200px)'). When using a custom value, it will be applied as the 'left' property. Default: `undefined` (uses parent container positioning). Only affects desktop view. |
92
203
 
93
204
  ## 🎨 Themes
94
205
 
@@ -208,6 +319,7 @@ function MyApp() {
208
319
  <ChatbotBar
209
320
  verticalPosition="bottom"
210
321
  horizontalPosition="right"
322
+ deviceHorizontalPosition="right"
211
323
  />
212
324
  </ChatbotProvider>
213
325
  </div>
@@ -230,16 +342,42 @@ You can control the position of the chatbot using the `ChatbotBar` component pro
230
342
  // Top right
231
343
  <ChatbotBar verticalPosition="top" />
232
344
 
233
- // Bottom left
345
+ // Bottom left (bar container aligned left)
234
346
  <ChatbotBar horizontalPosition="left" />
235
347
 
236
- // Top left
348
+ // Top left (bar container aligned left)
237
349
  <ChatbotBar
238
350
  verticalPosition="top"
239
351
  horizontalPosition="left"
240
352
  />
353
+
354
+ // Precise horizontal positioning on desktop
355
+ <ChatbotBar
356
+ deviceHorizontalPosition="center" // Centers the device
357
+ />
358
+
359
+ <ChatbotBar
360
+ deviceHorizontalPosition="50px" // 50px from left edge
361
+ />
362
+
363
+ <ChatbotBar
364
+ deviceHorizontalPosition="calc(100% - 250px)" // 250px from right edge
365
+ />
366
+
367
+ // Combining bar container and device positioning
368
+ <ChatbotBar
369
+ horizontalPosition="right" // Bar container on right
370
+ deviceHorizontalPosition="20px" // Device 20px from left (within container)
371
+ />
241
372
  ```
242
373
 
374
+ **Understanding the positioning props:**
375
+ - `horizontalPosition`: Controls the alignment of the bar container (`'left'` or `'right'`)
376
+ - `deviceHorizontalPosition`: Provides precise control over the ChatbotDevice position on desktop:
377
+ - Predefined values: `'left'`, `'right'`, `'center'` (use margin-based alignment)
378
+ - Custom values: Any CSS unit string (e.g., `'20px'`, `'10%'`, `'calc(100% - 200px)'`) applied as the `left` property
379
+ - Only affects desktop/tablet view; mobile always uses full width
380
+
243
381
  ### Controlling Initial State
244
382
 
245
383
  Use the `isOpen` prop to control whether the chatbot starts open or closed:
package/dist/index.d.ts CHANGED
@@ -44,12 +44,53 @@ declare module '@ibti-tech/chatbot/components/ChatbotBar/index' {
44
44
  export type ChatbotBarProps = {
45
45
  verticalPosition?: 'top' | 'bottom';
46
46
  horizontalPosition?: 'left' | 'right';
47
+ /**
48
+ * Horizontal position of the ChatbotDevice on desktop.
49
+ * Can be a predefined value ('left', 'right', 'center') or a custom value with any unit (e.g., '20px', '10%', '2rem', 'calc(100% - 200px)').
50
+ * When using a custom value, it will be applied as the 'left' property.
51
+ * If not provided, the device will use the parent container's positioning.
52
+ */
53
+ deviceHorizontalPosition?: 'left' | 'right' | 'center' | string;
54
+ /**
55
+ * Custom z-index value. If not provided, uses theme.zIndex.modals
56
+ * Useful when you need the chatbot to appear above specific elements like headers
57
+ */
58
+ zIndex?: number;
59
+ /**
60
+ * Offset from the top when verticalPosition is 'top'
61
+ * Can be a number (in pixels) or a string (e.g., '100px', '10rem')
62
+ * Useful to position the chatbot below a fixed header
63
+ */
64
+ topOffset?: string | number;
65
+ /**
66
+ * Convenient prop to position the chatbot above header elements
67
+ * When true, sets z-index to 9999 and allows topOffset configuration
68
+ */
69
+ aboveHeader?: boolean;
70
+ /**
71
+ * When true and verticalPosition is 'top', the chatbot will push content down
72
+ * instead of overlaying it. The chatbot will occupy space in the document flow.
73
+ * When false, the chatbot will be fixed and overlay the content.
74
+ */
75
+ pushContentDown?: boolean;
76
+ /**
77
+ * Background color of the push-content-down row (full-width bar) for light theme.
78
+ * Does not affect the chatbot button. Accepts rgb(), hex (e.g. #e6e6e6), etc.
79
+ * Default: rgb(230, 230, 230)
80
+ */
81
+ pushContentDownRowBackgroundLight?: string;
82
+ /**
83
+ * Background color of the push-content-down row (full-width bar) for dark theme.
84
+ * Does not affect the chatbot button. Accepts rgb(), hex (e.g. #000000), etc.
85
+ * Default: rgb(0, 0, 0)
86
+ */
87
+ pushContentDownRowBackgroundDark?: string;
47
88
  };
48
- export const ChatbotBar: ({ verticalPosition, horizontalPosition, }: ChatbotBarProps) => React.JSX.Element;
89
+ export const ChatbotBar: ({ verticalPosition, horizontalPosition, deviceHorizontalPosition, zIndex, topOffset, aboveHeader, pushContentDown, pushContentDownRowBackgroundLight, pushContentDownRowBackgroundDark, }: ChatbotBarProps) => React.JSX.Element;
49
90
  //# sourceMappingURL=index.d.ts.map
50
91
  }
51
92
  declare module '@ibti-tech/chatbot/components/ChatbotBar/index.d.ts' {
52
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,MAAM,eAAe,GAAG;IAC5B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,2CAGxB,eAAe,sBAkBjB,CAAA"}
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,MAAM,MAAM,eAAe,GAAG;IAC5B,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACrC;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC/D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,iCAAiC,CAAC,EAAE,MAAM,CAAA;IAC1C;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAA;CAC1C,CAAA;AAKD,eAAO,MAAM,UAAU,GAAI,2LAUxB,eAAe,sBAuFjB,CAAA"}
53
94
  }
54
95
  declare module '@ibti-tech/chatbot/components/ChatbotBar/styles' {
55
96
  import { breakpoints } from '@ibti-tech/ui';
@@ -58,18 +99,28 @@ declare module '@ibti-tech/chatbot/components/ChatbotBar/styles' {
58
99
  variant?: keyof typeof breakpoints;
59
100
  } & import("@ibti-tech/ui").HTMLStyleAttributes, {
60
101
  $horizontalPosition: "left" | "right";
102
+ $deviceHorizontalPosition?: "left" | "right" | "center" | string;
61
103
  $opened: boolean;
62
104
  $verticalPosition: "top" | "bottom";
105
+ $pushContentDown?: boolean;
63
106
  }>> & string & Omit<({ children, className, style, variant, }: import("@ibti-tech/ui").ContainerProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
107
+ /** Full-width row strip (pushContentDown + top). Background only; device sits on top with theme styles. */
108
+ 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
+ $background: string;
110
+ }>> & string;
64
111
  export const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
65
112
  $verticalPosition: "top" | "bottom";
66
113
  $horizontalPosition: "left" | "right";
67
114
  $opened: boolean;
115
+ $zIndex?: number;
116
+ $topOffset?: string | number;
117
+ $aboveHeader?: boolean;
118
+ $pushContentDown?: boolean;
68
119
  }>> & string;
69
120
  //# sourceMappingURL=styles.d.ts.map
70
121
  }
71
122
  declare module '@ibti-tech/chatbot/components/ChatbotBar/styles.d.ts' {
72
- {"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;;oBAGH,kBACnB;;yBAHoB,MAAM,GAAG,OAAO;aAC5B,OAAO;uBACG,KAAK,GAAG,QAAQ;iMAgCpC,CAAA;AAED,eAAO,MAAM,OAAO;uBACC,KAAK,GAAG,QAAQ;yBACd,MAAM,GAAG,OAAO;aAC5B,OAAO;YAwCjB,CAAA"}
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"}
73
124
  }
74
125
  declare module '@ibti-tech/chatbot/components/ChatbotBody/index' {
75
126
  import React from 'react';
@@ -88,29 +139,39 @@ declare module '@ibti-tech/chatbot/components/ChatbotBody/styles' {
88
139
  //# sourceMappingURL=styles.d.ts.map
89
140
  }
90
141
  declare module '@ibti-tech/chatbot/components/ChatbotBody/styles.d.ts' {
91
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBody/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6NAAe,CAAA;AAExC,eAAO,MAAM,YAAY,iOAQxB,CAAA;AAED,eAAO,MAAM,OAAO,6NAsCnB,CAAA"}
142
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBody/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6NAAe,CAAA;AAExC,eAAO,MAAM,YAAY,iOAYxB,CAAA;AAED,eAAO,MAAM,OAAO,6NAuCnB,CAAA"}
92
143
  }
93
144
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/index' {
94
145
  import React from 'react';
95
146
  export type ChatbotDeviceProps = {
96
147
  verticalPosition?: 'top' | 'bottom';
148
+ pushContentDown?: boolean;
149
+ /**
150
+ * Horizontal position on desktop.
151
+ * Can be a predefined value ('left', 'right', 'center') or a custom value with any unit (e.g., '20px', '10%', '2rem', 'calc(100% - 200px)').
152
+ * When using a custom value, it will be applied as the 'left' property.
153
+ * Default: undefined (uses parent container positioning)
154
+ */
155
+ horizontalPosition?: 'left' | 'right' | 'center' | string;
97
156
  };
98
- export const ChatbotDevice: ({ verticalPosition, }: ChatbotDeviceProps) => React.JSX.Element;
157
+ export const ChatbotDevice: ({ verticalPosition, pushContentDown, horizontalPosition, }: ChatbotDeviceProps) => React.JSX.Element;
99
158
  export default ChatbotDevice;
100
159
  //# sourceMappingURL=index.d.ts.map
101
160
  }
102
161
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/index.d.ts' {
103
- {"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;CACpC,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,uBAE3B,kBAAkB,sBAapB,CAAA;AAED,eAAe,aAAa,CAAA"}
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"}
104
163
  }
105
164
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles' {
106
165
  export const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
107
166
  $opened: boolean;
108
167
  $verticalPosition: "top" | "bottom";
168
+ $pushContentDown?: boolean;
169
+ $horizontalPosition?: "left" | "right" | "center" | string;
109
170
  }>> & string;
110
171
  //# sourceMappingURL=styles.d.ts.map
111
172
  }
112
173
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles.d.ts' {
113
- {"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;YA0EpC,CAAA"}
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"}
114
175
  }
115
176
  declare module '@ibti-tech/chatbot/components/ChatbotFooter/index' {
116
177
  import React from 'react';
@@ -129,7 +190,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotFooter/styles' {
129
190
  //# sourceMappingURL=styles.d.ts.map
130
191
  }
131
192
  declare module '@ibti-tech/chatbot/components/ChatbotFooter/styles.d.ts' {
132
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotFooter/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,+NAQrC,CAAA;AAED,eAAO,MAAM,IAAI,mOA+EhB,CAAA;AAED,eAAO,MAAM,OAAO,6NAYnB,CAAA"}
193
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotFooter/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,+NAQrC,CAAA;AAED,eAAO,MAAM,IAAI,mOAqFhB,CAAA;AAED,eAAO,MAAM,OAAO,6NAenB,CAAA"}
133
194
  }
134
195
  declare module '@ibti-tech/chatbot/components/ChatbotHeader/index' {
135
196
  import React from 'react';
@@ -178,23 +239,26 @@ declare module '@ibti-tech/chatbot/components/ChatbotToggle/index' {
178
239
  export type ChatbotToggleProps = {
179
240
  verticalPosition?: 'top' | 'bottom';
180
241
  opened?: boolean;
242
+ pushContentDown?: boolean;
181
243
  };
182
- export const ChatbotToggle: ({ verticalPosition, opened: openedProp, }: ChatbotToggleProps) => React.JSX.Element;
244
+ export const ChatbotToggle: ({ verticalPosition, opened: openedProp, pushContentDown, }: ChatbotToggleProps) => React.JSX.Element;
183
245
  export default ChatbotToggle;
184
246
  //# sourceMappingURL=index.d.ts.map
185
247
  }
186
248
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/index.d.ts' {
187
- {"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;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,2CAG3B,kBAAkB,sBAgCpB,CAAA;AAED,eAAe,aAAa,CAAA"}
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"}
188
250
  }
189
251
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/styles' {
190
252
  export const ButtonWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
191
253
  $opened: boolean;
192
254
  $verticalPosition: "top" | "bottom";
255
+ $pushContentDown?: boolean;
256
+ $themeMode?: "light" | "dark";
193
257
  }>> & string;
194
258
  //# sourceMappingURL=styles.d.ts.map
195
259
  }
196
260
  declare module '@ibti-tech/chatbot/components/ChatbotToggle/styles.d.ts' {
197
- {"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;YAgDpC,CAAA"}
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"}
198
262
  }
199
263
  declare module '@ibti-tech/chatbot/components/MessageBalloon/index' {
200
264
  import React from 'react';
@@ -244,7 +308,7 @@ declare module '@ibti-tech/chatbot/components/MessageBalloon/styles' {
244
308
  //# sourceMappingURL=styles.d.ts.map
245
309
  }
246
310
  declare module '@ibti-tech/chatbot/components/MessageBalloon/styles.d.ts' {
247
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/MessageBalloon/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;WAAwB,UAAU,GAAG,MAAM;YAoB3D,CAAA;AAED,eAAO,MAAM,OAAO;WACX,UAAU,GAAG,MAAM;aACjB,OAAO;YAqKjB,CAAA;AAED,eAAO,MAAM,KAAK,+NAKjB,CAAA;AAED,eAAO,MAAM,wBAAwB;WAAuB,UAAU,GAAG,MAAM;YAiB9E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;YAmBtE,CAAA;AAED,eAAO,MAAM,sBAAsB;WAAuB,UAAU,GAAG,MAAM;YAqB5E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;gBAAc,OAAO;YAoC3F,CAAA;AAED,eAAO,MAAM,YAAY;kBAAiC,UAAU,GAAG,MAAM;YA2B5E,CAAA;AAED,eAAO,MAAM,OAAO;kBAA+B,UAAU,GAAG,MAAM;YAgBrE,CAAA;AAED,eAAO,MAAM,OAAO;WAAuB,UAAU,GAAG,MAAM;YAkB7D,CAAA"}
311
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/MessageBalloon/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;WAAwB,UAAU,GAAG,MAAM;YAoB3D,CAAA;AAED,eAAO,MAAM,OAAO;WACX,UAAU,GAAG,MAAM;aACjB,OAAO;YAqKjB,CAAA;AAED,eAAO,MAAM,KAAK,+NAKjB,CAAA;AAED,eAAO,MAAM,wBAAwB;WAAuB,UAAU,GAAG,MAAM;YAmB9E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;YAoBtE,CAAA;AAED,eAAO,MAAM,sBAAsB;WAAuB,UAAU,GAAG,MAAM;YAqB5E,CAAA;AAED,eAAO,MAAM,gBAAgB;WAAuB,UAAU,GAAG,MAAM;gBAAc,OAAO;YAoC3F,CAAA;AAED,eAAO,MAAM,YAAY;kBAAiC,UAAU,GAAG,MAAM;YA2B5E,CAAA;AAED,eAAO,MAAM,OAAO;kBAA+B,UAAU,GAAG,MAAM;YAgBrE,CAAA;AAED,eAAO,MAAM,OAAO;WAAuB,UAAU,GAAG,MAAM;YAqB7D,CAAA"}
248
312
  }
249
313
  declare module '@ibti-tech/chatbot/components/SuggestedQuestions/index' {
250
314
  import React from 'react';
@@ -265,7 +329,7 @@ declare module '@ibti-tech/chatbot/components/SuggestedQuestions/styles' {
265
329
  //# sourceMappingURL=styles.d.ts.map
266
330
  }
267
331
  declare module '@ibti-tech/chatbot/components/SuggestedQuestions/styles.d.ts' {
268
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/SuggestedQuestions/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,mcAY1B,CAAA;AAED,eAAO,MAAM,gBAAgB,6NAAc,CAAA;AAE3C,eAAO,MAAM,YAAY,iOAIxB,CAAA;AAED,eAAO,MAAM,KAAK,+NAMjB,CAAA;AAED,eAAO,MAAM,OAAO,6NAYnB,CAAA"}
332
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/SuggestedQuestions/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,mcAY1B,CAAA;AAED,eAAO,MAAM,gBAAgB,6NAAc,CAAA;AAE3C,eAAO,MAAM,YAAY,iOAIxB,CAAA;AAED,eAAO,MAAM,KAAK,+NAMjB,CAAA;AAED,eAAO,MAAM,OAAO,6NAenB,CAAA"}
269
333
  }
270
334
  declare module '@ibti-tech/chatbot/components/WritingIndicator/index' {
271
335
  import React from 'react';
@@ -308,12 +372,13 @@ declare module '@ibti-tech/chatbot/contexts/Chatbot/context' {
308
372
  suggestedQuestions: ReturnType<typeof useChatbotSuggestedQuestions>;
309
373
  apiURL: string;
310
374
  texts?: ChatbotTypes.Texts;
375
+ theme: ChatbotTypes.Theme;
311
376
  };
312
377
  export const ChatbotContext: React.Context<ChatbotContextProps>;
313
378
  //# sourceMappingURL=context.d.ts.map
314
379
  }
315
380
  declare module '@ibti-tech/chatbot/contexts/Chatbot/context.d.ts' {
316
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/contexts/Chatbot/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAE7E,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,YAAY,EAAE,YAAY,CAAC,WAAW,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACtD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,kBAAkB,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAA;IACnE,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,cAAc,oCAAiD,CAAA"}
381
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/contexts/Chatbot/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAE7E,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,YAAY,EAAE,YAAY,CAAC,WAAW,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACtD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,kBAAkB,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAA;IACnE,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC1B,KAAK,EAAE,YAAY,CAAC,KAAK,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,cAAc,oCAAiD,CAAA"}
317
382
  }
318
383
  declare module '@ibti-tech/chatbot/contexts/Chatbot/provider' {
319
384
  import React, { ReactNode } from 'react';
@@ -330,7 +395,7 @@ declare module '@ibti-tech/chatbot/contexts/Chatbot/provider' {
330
395
  //# sourceMappingURL=provider.d.ts.map
331
396
  }
332
397
  declare module '@ibti-tech/chatbot/contexts/Chatbot/provider.d.ts' {
333
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/contexts/Chatbot/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAMpC,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,YAAY,CAAC,KAAK,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,qDAO7B,oBAAoB,sBAuDtB,CAAA"}
398
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/contexts/Chatbot/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAMpC,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,YAAY,CAAC,KAAK,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,qDAO7B,oBAAoB,sBAwDtB,CAAA"}
334
399
  }
335
400
  declare module '@ibti-tech/chatbot/contexts/Chatbot/useChatFeedbackBox' {
336
401
  type SendUserRatingProps = {
package/dist/index.mjs CHANGED
@@ -712,7 +712,8 @@ var ChatbotProvider = /* @__PURE__ */ __name(({
712
712
  apiConnectionError,
713
713
  suggestedQuestions,
714
714
  apiURL,
715
- texts
715
+ texts,
716
+ theme
716
717
  }
717
718
  },
718
719
  /* @__PURE__ */ React3.createElement(ThemeProvider, { theme: themes[theme] }, children)
@@ -726,6 +727,7 @@ import React14 from "react";
726
727
  import { breakpoints, screens } from "@ibti-tech/ui";
727
728
  import { css, styled } from "styled-components";
728
729
  var Wrapper = styled.div`
730
+ /* Base styles */
729
731
  width: 100%;
730
732
  background-color: ${(props) => props.theme.colors.layers[1].background};
731
733
  border: 1px solid ${(props) => props.theme.colors.layers[1].border};
@@ -734,10 +736,28 @@ var Wrapper = styled.div`
734
736
  transition: ${(props) => props.theme.transitionDurations.fast};
735
737
  overflow: hidden;
736
738
  pointer-events: all;
737
- height: 100vh;
738
- max-height: calc(100vh - 45px);
739
739
  box-sizing: border-box;
740
740
  position: relative;
741
+
742
+ /* Default height - will be overridden by specific states */
743
+ ${(props) => {
744
+ if (props.$pushContentDown && props.$verticalPosition === "top") {
745
+ if (!props.$opened) {
746
+ return css`
747
+ height: 32px;
748
+ `;
749
+ }
750
+ return css`
751
+ height: auto;
752
+ `;
753
+ }
754
+ return css`
755
+ height: 100vh;
756
+ max-height: calc(100vh - 45px);
757
+ `;
758
+ }}
759
+
760
+ /* Typography */
741
761
  font-family: 'Montserrat', sans-serif !important;
742
762
  font-weight: 600 !important;
743
763
 
@@ -749,38 +769,137 @@ var Wrapper = styled.div`
749
769
  font-weight: 600 !important;
750
770
  }
751
771
 
772
+ /* Mobile styles */
752
773
  @media screen and (max-width: ${breakpoints.tablet}px) {
774
+ ${(props) => props.$opened && props.$verticalPosition === "top" && css`
775
+ max-height: 100vh !important;
776
+ height: 100vh !important;
777
+ `}
778
+
753
779
  ${(props) => props.$opened && props.$verticalPosition === "bottom" ? css`
754
780
  max-height: 100vh;
755
781
  ` : ""}
782
+
783
+ ${(props) => props.$opened && props.$verticalPosition === "top" ? css`
784
+ max-height: 100vh !important;
785
+ height: 100vh !important;
786
+ width: 100% !important;
787
+ transform: none !important;
788
+ position: relative !important;
789
+ ` : ""}
756
790
  }
757
791
 
792
+ /* Border radius based on vertical position */
758
793
  ${(props) => props.$verticalPosition === "top" ? css`
759
- border-end-end-radius: ${(props2) => props2.theme.borderRadius.medium};
760
- border-end-start-radius: ${(props2) => props2.theme.borderRadius.medium};
794
+ border-end-end-radius: ${props.theme.borderRadius.medium};
795
+ border-end-start-radius: ${props.theme.borderRadius.medium};
761
796
  ` : css`
762
- border-start-end-radius: ${(props2) => props2.theme.borderRadius.medium};
763
- border-start-start-radius: ${(props2) => props2.theme.borderRadius.medium};
797
+ border-start-end-radius: ${props.theme.borderRadius.medium};
798
+ border-start-start-radius: ${props.theme.borderRadius.medium};
764
799
  `}
765
800
 
801
+ /* Desktop styles */
766
802
  ${screens.tablet} {
767
- height: 500px;
803
+ /* Height when closed with pushContentDown vs opened */
804
+ ${(props) => {
805
+ if (props.$pushContentDown && props.$verticalPosition === "top") {
806
+ if (!props.$opened) {
807
+ return css`
808
+ height: 32px !important;
809
+ max-height: 32px !important;
810
+ min-height: 32px !important;
811
+ `;
812
+ } else {
813
+ return css`
814
+ height: 500px !important;
815
+ max-height: 500px !important;
816
+ `;
817
+ }
818
+ }
819
+ return css`
820
+ height: 500px;
821
+ `;
822
+ }}
823
+
768
824
  max-width: ${breakpoints.mobileL}px;
825
+
826
+ /* Horizontal positioning on desktop - same for overlay and pushContentDown */
827
+ ${(props) => {
828
+ if (!props.$horizontalPosition) return "";
829
+ if (props.$horizontalPosition === "left") {
830
+ return css`
831
+ margin-left: 0;
832
+ margin-right: auto;
833
+ `;
834
+ }
835
+ if (props.$horizontalPosition === "right") {
836
+ return css`
837
+ margin-left: auto;
838
+ margin-right: 0;
839
+ `;
840
+ }
841
+ if (props.$horizontalPosition === "center") {
842
+ return css`
843
+ margin-left: auto;
844
+ margin-right: auto;
845
+ `;
846
+ }
847
+ return css`
848
+ left: ${props.$horizontalPosition};
849
+ width: ${breakpoints.mobileL}px;
850
+ min-width: ${breakpoints.mobileL}px;
851
+ `;
852
+ }}
769
853
  }
770
854
 
855
+ /* Closed state styles */
771
856
  ${(props) => !props.$opened && (props.$verticalPosition === "top" ? css`
772
- transform: translateY(calc(-100% + 32px));
857
+ ${props.$pushContentDown ? css`
858
+ /* Push content down mode: show only toggle button - based on commit 8379cc8 */
859
+ height: 32px !important;
860
+ max-height: 32px !important;
861
+ min-height: 32px !important;
862
+ transform: none !important;
863
+ overflow: visible !important;
864
+ ${screens.tablet} {
865
+ height: 32px !important;
866
+ max-height: 32px !important;
867
+ min-height: 32px !important;
868
+ transform: none !important;
869
+ }
870
+ > *:not(:last-child) {
871
+ display: none !important;
872
+ }
873
+ > *:last-child {
874
+ flex-shrink: 0 !important;
875
+ min-height: 32px !important;
876
+ height: 32px !important;
877
+ max-height: 32px !important;
878
+ width: 100% !important;
879
+ min-width: 100% !important;
880
+ max-width: 100% !important;
881
+ pointer-events: all !important;
882
+ cursor: pointer !important;
883
+ }
884
+ ` : css`
885
+ /* Overlay mode: translate up to show only toggle button - based on commit 8379cc8 */
886
+ transform: translateY(calc(-100% + 32px));
887
+ `}
773
888
  ` : css`
889
+ /* Bottom position: translate down to show only toggle button */
774
890
  transform: translateY(calc(100% - 32px));
775
891
  width: 100%;
892
+
776
893
  ${screens.tablet} {
777
894
  width: ${breakpoints.mobileL}px;
778
895
  max-width: ${breakpoints.mobileL}px;
779
896
  min-width: ${breakpoints.mobileL}px;
780
897
  }
898
+
781
899
  > *:not(:last-child) {
782
900
  display: none;
783
901
  }
902
+
784
903
  > *:last-child {
785
904
  flex-shrink: 0;
786
905
  min-height: 32px;
@@ -788,6 +907,27 @@ var Wrapper = styled.div`
788
907
  width: 100%;
789
908
  }
790
909
  `)}
910
+
911
+ /* Opened state styles when pushContentDown is true - must come after closed state */
912
+ /* Chat overlays (Bar is fixed); same internal layout as overlay — no display overrides */
913
+ ${(props) => props.$opened && props.$pushContentDown && props.$verticalPosition === "top" && css`
914
+ overflow: hidden !important;
915
+ transform: none !important;
916
+
917
+ ${screens.tablet} {
918
+ height: 500px !important;
919
+ max-height: 500px !important;
920
+ min-height: 500px !important;
921
+ overflow: hidden !important;
922
+ }
923
+
924
+ @media screen and (max-width: ${breakpoints.tablet}px) {
925
+ height: 100vh !important;
926
+ max-height: 100vh !important;
927
+ min-height: 100vh !important;
928
+ overflow: hidden !important;
929
+ }
930
+ `}
791
931
  `;
792
932
 
793
933
  // src/components/ChatbotHeader/index.tsx
@@ -1042,11 +1182,16 @@ var MessagesList = styled4.ul`
1042
1182
  display: flex;
1043
1183
  flex-direction: column;
1044
1184
  gap: 0;
1185
+ width: 100%;
1186
+ box-sizing: border-box;
1187
+ list-style: none;
1188
+ margin: 0;
1045
1189
  `;
1046
1190
  var Wrapper4 = styled4.div`
1047
- overflow: hidden;
1191
+ overflow-x: hidden;
1048
1192
  overflow-y: auto;
1049
1193
  flex: 1;
1194
+ min-width: 0;
1050
1195
  height: 100%;
1051
1196
  padding-right: ${(props) => props.theme.spacing.components.small};
1052
1197
  font-family: 'Montserrat', sans-serif !important;
@@ -1277,6 +1422,8 @@ var BalloonAndActionsWrapper = styled5.div`
1277
1422
  flex-direction: column;
1278
1423
  gap: 2px;
1279
1424
  margin-bottom: ${(props) => props.theme.spacing.components.medium};
1425
+ min-width: 0;
1426
+ width: 100%;
1280
1427
 
1281
1428
  ${({ $type }) => {
1282
1429
  switch ($type) {
@@ -1294,6 +1441,7 @@ var BalloonContainer = styled5.div`
1294
1441
  position: relative;
1295
1442
  width: max-content;
1296
1443
  max-width: 100%;
1444
+ min-width: 0;
1297
1445
 
1298
1446
  ${({ $type }) => {
1299
1447
  switch ($type) {
@@ -1420,6 +1568,9 @@ var Wrapper5 = styled5.div`
1420
1568
  display: flex;
1421
1569
  flex-direction: column;
1422
1570
  gap: 2px;
1571
+ width: 100%;
1572
+ min-width: 0;
1573
+ box-sizing: border-box;
1423
1574
 
1424
1575
  ${(props) => {
1425
1576
  switch (props.$type) {
@@ -1765,6 +1916,9 @@ var Title = styled7.span`
1765
1916
  `;
1766
1917
  var Wrapper7 = styled7.div`
1767
1918
  padding: ${(props) => props.theme.spacing.components.medium};
1919
+ width: 100%;
1920
+ min-width: 0;
1921
+ box-sizing: border-box;
1768
1922
  font-family: 'Montserrat', sans-serif !important;
1769
1923
  font-weight: 600 !important;
1770
1924
 
@@ -1850,18 +2004,24 @@ var LoadingSuggestedQuestions = styled8.span`
1850
2004
  `;
1851
2005
  var Form = styled8.form`
1852
2006
  display: flex;
2007
+ align-items: flex-end;
1853
2008
  gap: ${(props) => props.theme.spacing.components.small};
2009
+ width: 100%;
2010
+ min-width: 0;
1854
2011
 
1855
2012
  /* Remove border from submit button */
1856
2013
  button[type='submit'] {
1857
2014
  border: none !important;
1858
2015
  outline: none !important;
1859
2016
  box-shadow: none !important;
2017
+ flex-shrink: 0 !important;
1860
2018
  }
1861
2019
 
1862
2020
  /* Chatbot textarea styles */
1863
2021
  .textareaField {
1864
2022
  font-family: 'Montserrat', sans-serif !important;
2023
+ flex: 1 !important;
2024
+ min-width: 0 !important;
1865
2025
 
1866
2026
  &,
1867
2027
  *,
@@ -1930,6 +2090,9 @@ var Form = styled8.form`
1930
2090
  `;
1931
2091
  var Wrapper8 = styled8.div`
1932
2092
  padding: ${(props) => props.theme.spacing.components.small};
2093
+ width: 100%;
2094
+ min-width: 0;
2095
+ box-sizing: border-box;
1933
2096
  font-family: 'Montserrat', sans-serif !important;
1934
2097
  font-weight: 600 !important;
1935
2098
 
@@ -2015,8 +2178,12 @@ var ChatbotFooter_default = ChatbotFooter;
2015
2178
  import { screens as screens2 } from "@ibti-tech/ui";
2016
2179
  import { css as css4, styled as styled9 } from "styled-components";
2017
2180
  var ButtonWrapper = styled9.button`
2018
- height: 32px;
2019
- width: 100%;
2181
+ height: 32px !important;
2182
+ min-height: 32px !important;
2183
+ max-height: 32px !important;
2184
+ width: 100% !important;
2185
+ min-width: 100% !important;
2186
+ max-width: 100% !important;
2020
2187
  background: transparent;
2021
2188
  color: ${(props) => props.theme.colors.palette.primary.normal};
2022
2189
  padding: ${(props) => props.theme.spacing.components.small};
@@ -2036,7 +2203,8 @@ var ButtonWrapper = styled9.button`
2036
2203
  border: none !important;
2037
2204
  outline: none !important;
2038
2205
  box-shadow: none !important;
2039
- flex-shrink: 0;
2206
+ flex-shrink: 0 !important;
2207
+ box-sizing: border-box;
2040
2208
 
2041
2209
  ${(props) => !props.$opened && props.$verticalPosition === "bottom" && css4`
2042
2210
  background-color: ${props.theme.colors.layers[1].background};
@@ -2049,6 +2217,19 @@ var ButtonWrapper = styled9.button`
2049
2217
  border-radius: ${(props2) => props2.theme.borderRadius.medium} ${(props2) => props2.theme.borderRadius.medium} 0 0;
2050
2218
  `}
2051
2219
 
2220
+ ${(props) => !props.$opened && props.$verticalPosition === "top" && props.$pushContentDown && css4`
2221
+ background-color: ${props.theme.colors.layers[1].background};
2222
+ cursor: pointer;
2223
+ border-radius: ${(props2) => props2.theme.borderRadius.medium};
2224
+ box-shadow: ${props.$themeMode === "dark" ? "0 2px 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08)" : "0 2px 8px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06)"};
2225
+ pointer-events: auto;
2226
+ color: ${(props2) => props2.theme.colors.palette.primary.normal};
2227
+ &:hover {
2228
+ background-color: ${(props2) => props2.theme.colors.layers[1].hoveredBackground};
2229
+ color: ${(props2) => props2.theme.colors.palette.primary.normal};
2230
+ }
2231
+ `}
2232
+
2052
2233
  ${screens2.tablet} {
2053
2234
  transition: ${(props) => props.theme.transitionDurations.default};
2054
2235
 
@@ -2064,9 +2245,10 @@ import React12 from "react";
2064
2245
  import { ChevronDownIcon, ChevronUpIcon } from "@ibti-tech/ui/dist/icons";
2065
2246
  var ChatbotToggle = /* @__PURE__ */ __name(({
2066
2247
  verticalPosition = "bottom",
2067
- opened: openedProp
2248
+ opened: openedProp,
2249
+ pushContentDown = false
2068
2250
  }) => {
2069
- const { opened: openedContext, openedToggle } = useChatbot_default();
2251
+ const { opened: openedContext, openedToggle, theme: themeMode } = useChatbot_default();
2070
2252
  const opened = openedProp ?? openedContext;
2071
2253
  const texts = useChatbotTexts();
2072
2254
  const toggleText = (opened ? texts.CHATBOT_BAR.CLOSE : texts.CHATBOT_BAR.OPEN).replace("{{CHATBOT_NAME}}", texts.CHATBOT_NAME);
@@ -2076,7 +2258,9 @@ var ChatbotToggle = /* @__PURE__ */ __name(({
2076
2258
  {
2077
2259
  onClick: openedToggle,
2078
2260
  $opened: opened,
2079
- $verticalPosition: verticalPosition
2261
+ $verticalPosition: verticalPosition,
2262
+ $pushContentDown: pushContentDown,
2263
+ $themeMode: themeMode
2080
2264
  },
2081
2265
  /* @__PURE__ */ React12.createElement(BotIcon, null),
2082
2266
  /* @__PURE__ */ React12.createElement("span", null, toggleText),
@@ -2308,11 +2492,33 @@ var useChatFeedbackBox = /* @__PURE__ */ __name(() => {
2308
2492
 
2309
2493
  // src/components/ChatbotDevice/index.tsx
2310
2494
  var ChatbotDevice = /* @__PURE__ */ __name(({
2311
- verticalPosition = "bottom"
2495
+ verticalPosition = "bottom",
2496
+ pushContentDown = false,
2497
+ horizontalPosition
2312
2498
  }) => {
2313
2499
  const { opened } = useChatbot_default();
2314
2500
  const chatFeedbackBox = useChatFeedbackBox();
2315
- return /* @__PURE__ */ React14.createElement(Wrapper, { $opened: opened, $verticalPosition: verticalPosition }, /* @__PURE__ */ React14.createElement(ChatUserFeedbackRating, { chatFeedbackBox }), /* @__PURE__ */ React14.createElement(ChatbotHeader_default, { chatFeedbackBox }), /* @__PURE__ */ React14.createElement(ChatbotBody_default, null), /* @__PURE__ */ React14.createElement(ChatbotFooter_default, null), /* @__PURE__ */ React14.createElement(ChatbotToggle_default, { verticalPosition, opened }));
2501
+ return /* @__PURE__ */ React14.createElement(
2502
+ Wrapper,
2503
+ {
2504
+ $opened: opened,
2505
+ $verticalPosition: verticalPosition,
2506
+ $pushContentDown: pushContentDown,
2507
+ $horizontalPosition: horizontalPosition
2508
+ },
2509
+ /* @__PURE__ */ React14.createElement(ChatUserFeedbackRating, { chatFeedbackBox }),
2510
+ /* @__PURE__ */ React14.createElement(ChatbotHeader_default, { chatFeedbackBox }),
2511
+ /* @__PURE__ */ React14.createElement(ChatbotBody_default, null),
2512
+ /* @__PURE__ */ React14.createElement(ChatbotFooter_default, null),
2513
+ /* @__PURE__ */ React14.createElement(
2514
+ ChatbotToggle_default,
2515
+ {
2516
+ verticalPosition,
2517
+ opened,
2518
+ pushContentDown
2519
+ }
2520
+ )
2521
+ );
2316
2522
  }, "ChatbotDevice");
2317
2523
  var ChatbotDevice_default = ChatbotDevice;
2318
2524
 
@@ -2334,77 +2540,252 @@ var BarContainer = styled11(Container)`
2334
2540
 
2335
2541
  @media screen and (max-width: ${breakpoints3.tablet}px) {
2336
2542
  padding: 0;
2543
+ ${(props) => props.$opened && props.$verticalPosition === "top" && css6`
2544
+ width: 100% !important;
2545
+ max-width: 100% !important;
2546
+ `}
2547
+ /* pushContentDown + top closed, mobile: Wrapper full width → keep margin for lateral position */
2548
+ ${(props) => props.$pushContentDown && props.$verticalPosition === "top" && !props.$opened ? css6`
2549
+ width: ${breakpoints3.mobileL}px !important;
2550
+ max-width: ${breakpoints3.mobileL}px !important;
2551
+ min-width: ${breakpoints3.mobileL}px !important;
2552
+ position: relative;
2553
+ z-index: 1;
2554
+ padding-left: 0;
2555
+ padding-right: 0;
2556
+ ${props.$horizontalPosition === "right" ? css6`margin-left: auto !important; margin-right: 2.5rem !important;` : css6`margin-left: 2.5rem !important; margin-right: auto !important;`}
2557
+ ` : ""}
2337
2558
  }
2338
2559
 
2339
2560
  ${screens3.tablet} {
2340
2561
  display: flex;
2341
- justify-content: ${(props) => props.$horizontalPosition === "right" ? "flex-end" : "flex-start"};
2562
+ justify-content: ${(props) => {
2563
+ const pos = props.$deviceHorizontalPosition ?? props.$horizontalPosition;
2564
+ if (pos === "center") return "center";
2565
+ if (pos === "right") return "flex-end";
2566
+ if (pos === "left") return "flex-start";
2567
+ if (typeof pos === "string") return "flex-start";
2568
+ return props.$horizontalPosition === "right" ? "flex-end" : "flex-start";
2569
+ }};
2570
+
2571
+ ${(props) => !props.$opened && props.$verticalPosition === "bottom" && !props.$pushContentDown ? css6`
2572
+ width: ${breakpoints3.mobileL}px;
2573
+ max-width: ${breakpoints3.mobileL}px;
2574
+ min-width: ${breakpoints3.mobileL}px;
2575
+ padding-left: 0;
2576
+ padding-right: 0;
2577
+ ` : ""}
2342
2578
 
2343
- ${(props) => !props.$opened && props.$verticalPosition === "bottom" ? css6`
2579
+ /* pushContentDown + top closed: mobileL bar + 2.5rem lateral margin */
2580
+ ${(props) => props.$pushContentDown && props.$verticalPosition === "top" && !props.$opened ? css6`
2344
2581
  width: ${breakpoints3.mobileL}px;
2345
2582
  max-width: ${breakpoints3.mobileL}px;
2346
2583
  min-width: ${breakpoints3.mobileL}px;
2347
2584
  padding-left: 0;
2585
+ padding-right: 0;
2586
+ position: relative;
2587
+ z-index: 1;
2588
+ ${props.$horizontalPosition === "right" ? css6`margin-left: auto; margin-right: 2.5rem;` : css6`margin-left: 2.5rem; margin-right: auto;`}
2348
2589
  ` : ""}
2349
2590
  }
2350
2591
  `;
2351
- var Wrapper10 = styled11.div`
2352
- position: fixed;
2592
+ var PushDownRow = styled11.div`
2593
+ position: absolute;
2594
+ inset: 0;
2353
2595
  width: 100%;
2354
- z-index: ${(props) => props.theme.zIndex.modals};
2596
+ height: 32px;
2597
+ min-height: 32px;
2598
+ background-color: ${(p) => p.$background};
2599
+ z-index: 0;
2355
2600
  pointer-events: none;
2356
-
2357
- ${(props) => props.$verticalPosition === "top" ? css6`
2358
- top: 0;
2359
- padding-top: ${(props2) => props2.theme.spacing.components.xsmall};
2360
- ` : css6`
2361
- bottom: 0;
2362
- padding-bottom: ${(props2) => props2.theme.spacing.components.xsmall};
2363
-
2601
+ `;
2602
+ var Wrapper10 = styled11.div`
2603
+ ${(props) => {
2604
+ if (props.$pushContentDown && props.$verticalPosition === "top") {
2605
+ if (props.$opened) {
2606
+ return css6`
2607
+ position: fixed !important;
2608
+ width: 100%;
2609
+ top: 0 !important;
2610
+ bottom: auto !important;
2611
+ left: 0 !important;
2612
+ right: 0 !important;
2613
+ z-index: ${props.$zIndex !== void 0 ? props.$zIndex : props.theme.zIndex.modals};
2614
+ pointer-events: auto;
2615
+ padding-top: ${props.$topOffset !== void 0 ? 0 : props.theme.spacing.components.xsmall};
2616
+ background-color: transparent;
2617
+ ${screens3.tablet} {
2618
+ width: auto !important;
2619
+ height: auto !important;
2620
+ min-height: auto !important;
2621
+ background-color: transparent;
2622
+ border: none;
2623
+ padding: 0;
2624
+ top: ${props.$topOffset !== void 0 ? typeof props.$topOffset === "number" ? `${props.$topOffset}px` : props.$topOffset : "0"} !important;
2625
+ bottom: auto !important;
2626
+ ${props.$horizontalPosition === "right" ? css6`left: auto !important; right: 2.5rem !important;` : css6`left: 2.5rem !important; right: auto !important;`}
2627
+ }
2364
2628
  @media screen and (max-width: ${breakpoints3.tablet}px) {
2365
- ${props.$opened ? css6`
2366
- padding-bottom: 0;
2367
- ` : ""}
2629
+ padding-top: 0 !important;
2630
+ top: 0 !important;
2631
+ height: 100vh;
2368
2632
  }
2369
- `}
2370
-
2371
- ${screens3.tablet} {
2372
- width: auto;
2373
- background-color: transparent;
2374
- border: none;
2375
- padding: 0;
2376
- ${(props) => props.$horizontalPosition === "right" ? css6`
2377
- right: ${(props2) => props2.theme.spacing.components.medium};
2633
+ `;
2634
+ }
2635
+ return css6`
2636
+ position: fixed !important;
2637
+ width: 100%;
2638
+ top: 0 !important;
2639
+ bottom: auto !important;
2640
+ left: 0 !important;
2641
+ right: 0 !important;
2642
+ z-index: ${props.$zIndex !== void 0 ? props.$zIndex : props.theme.zIndex.modals};
2643
+ pointer-events: auto;
2644
+ height: 32px !important;
2645
+ min-height: 32px !important;
2646
+ background-color: transparent;
2647
+ ${screens3.tablet} {
2648
+ width: 100% !important;
2649
+ max-width: 100% !important;
2650
+ border: none;
2651
+ padding: 0;
2652
+ bottom: auto !important;
2653
+ }
2654
+ @media screen and (max-width: ${breakpoints3.tablet}px) {
2655
+ height: 32px !important;
2656
+ min-height: 32px !important;
2657
+ }
2658
+ `;
2659
+ }
2660
+ return css6`
2661
+ position: fixed;
2662
+ width: 100%;
2663
+ z-index: ${props.$zIndex !== void 0 ? props.$zIndex : props.theme.zIndex.modals};
2664
+ pointer-events: none;
2665
+
2666
+ ${props.$verticalPosition === "top" ? css6`
2667
+ top: ${props.$topOffset !== void 0 ? typeof props.$topOffset === "number" ? `${props.$topOffset}px` : props.$topOffset : "0"};
2668
+ padding-top: ${props.$topOffset !== void 0 ? 0 : props.theme.spacing.components.xsmall};
2669
+
2670
+ @media screen and (max-width: ${breakpoints3.tablet}px) {
2671
+ ${props.$opened ? css6`
2672
+ padding-top: 0 !important;
2673
+ top: 0 !important;
2674
+ height: 100vh;
2675
+ ` : ""}
2676
+ }
2378
2677
  ` : css6`
2379
- left: ${(props2) => props2.theme.spacing.components.medium};
2678
+ bottom: 0;
2679
+ padding-bottom: ${(props2) => props2.theme.spacing.components.xsmall};
2680
+
2681
+ @media screen and (max-width: ${breakpoints3.tablet}px) {
2682
+ ${props.$opened ? css6`
2683
+ padding-bottom: 0;
2684
+ ` : ""}
2685
+ }
2380
2686
  `}
2381
- }
2687
+
2688
+ ${screens3.tablet} {
2689
+ width: auto;
2690
+ background-color: transparent;
2691
+ border: none;
2692
+ padding: 0;
2693
+ /* Top (portal): 2.5rem to match push-down bar; bottom: theme medium */
2694
+ ${props.$horizontalPosition === "right" ? css6`right: ${props.$verticalPosition === "top" ? "2.5rem" : props.theme.spacing.components.medium}; left: auto;` : css6`left: ${props.$verticalPosition === "top" ? "2.5rem" : props.theme.spacing.components.medium}; right: auto;`}
2695
+ }
2696
+ `;
2697
+ }}
2382
2698
  `;
2383
2699
 
2384
2700
  // src/components/ChatbotBar/index.tsx
2385
- import React15 from "react";
2701
+ import React15, { useEffect as useEffect8, useState as useState10 } from "react";
2702
+ import { createPortal } from "react-dom";
2703
+ var PUSH_DOWN_ROW_BG_LIGHT = "rgb(230, 230, 230)";
2704
+ var PUSH_DOWN_ROW_BG_DARK = "rgb(0, 0, 0)";
2386
2705
  var ChatbotBar = /* @__PURE__ */ __name(({
2387
2706
  verticalPosition = "bottom",
2388
- horizontalPosition = "right"
2707
+ horizontalPosition = "right",
2708
+ deviceHorizontalPosition,
2709
+ zIndex,
2710
+ topOffset,
2711
+ aboveHeader = false,
2712
+ pushContentDown = false,
2713
+ pushContentDownRowBackgroundLight = PUSH_DOWN_ROW_BG_LIGHT,
2714
+ pushContentDownRowBackgroundDark = PUSH_DOWN_ROW_BG_DARK
2389
2715
  }) => {
2390
- const { opened } = useChatbot_default();
2391
- return /* @__PURE__ */ React15.createElement(
2716
+ const { opened, theme } = useChatbot_default();
2717
+ const pushDownRowBackground = theme === "dark" ? pushContentDownRowBackgroundDark : pushContentDownRowBackgroundLight;
2718
+ const [portalContainer, setPortalContainer] = useState10(null);
2719
+ const calculatedZIndex = aboveHeader ? 9999 : zIndex;
2720
+ useEffect8(() => {
2721
+ if (verticalPosition === "top" && typeof document !== "undefined") {
2722
+ let container = document.getElementById("chatbot-portal-container");
2723
+ if (!container) {
2724
+ container = document.createElement("div");
2725
+ container.id = "chatbot-portal-container";
2726
+ container.style.width = "100%";
2727
+ container.style.margin = "0";
2728
+ container.style.padding = "0";
2729
+ container.style.boxSizing = "border-box";
2730
+ document.body.insertBefore(container, document.body.firstChild);
2731
+ }
2732
+ setPortalContainer(container);
2733
+ return () => {
2734
+ if (container?.parentNode) {
2735
+ container.parentNode.removeChild(container);
2736
+ }
2737
+ };
2738
+ } else {
2739
+ setPortalContainer(null);
2740
+ }
2741
+ }, [verticalPosition]);
2742
+ const usePushDown = pushContentDown && verticalPosition === "top";
2743
+ const content = /* @__PURE__ */ React15.createElement(React15.Fragment, null, usePushDown && /* @__PURE__ */ React15.createElement(
2744
+ "div",
2745
+ {
2746
+ style: {
2747
+ height: 33,
2748
+ minHeight: 33,
2749
+ width: "100%",
2750
+ backgroundColor: pushDownRowBackground
2751
+ },
2752
+ "aria-hidden": true
2753
+ }
2754
+ ), /* @__PURE__ */ React15.createElement(
2392
2755
  Wrapper10,
2393
2756
  {
2394
2757
  $verticalPosition: verticalPosition,
2395
2758
  $horizontalPosition: horizontalPosition,
2396
- $opened: opened
2759
+ $opened: opened,
2760
+ $zIndex: calculatedZIndex,
2761
+ $topOffset: topOffset,
2762
+ $aboveHeader: aboveHeader,
2763
+ $pushContentDown: pushContentDown
2397
2764
  },
2765
+ usePushDown && !opened && /* @__PURE__ */ React15.createElement(PushDownRow, { $background: pushDownRowBackground, "aria-hidden": true }),
2398
2766
  /* @__PURE__ */ React15.createElement(
2399
2767
  BarContainer,
2400
2768
  {
2401
2769
  $horizontalPosition: horizontalPosition,
2770
+ $deviceHorizontalPosition: deviceHorizontalPosition,
2402
2771
  $opened: opened,
2403
- $verticalPosition: verticalPosition
2772
+ $verticalPosition: verticalPosition,
2773
+ $pushContentDown: usePushDown
2404
2774
  },
2405
- /* @__PURE__ */ React15.createElement(ChatbotDevice_default, { verticalPosition })
2775
+ /* @__PURE__ */ React15.createElement(
2776
+ ChatbotDevice_default,
2777
+ {
2778
+ verticalPosition,
2779
+ pushContentDown: usePushDown,
2780
+ horizontalPosition: deviceHorizontalPosition
2781
+ }
2782
+ )
2406
2783
  )
2407
- );
2784
+ ));
2785
+ if (portalContainer) {
2786
+ return createPortal(content, portalContainer);
2787
+ }
2788
+ return content;
2408
2789
  }, "ChatbotBar");
2409
2790
  export {
2410
2791
  ChatbotBar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibti-tech/chatbot",
3
- "version": "0.5.8",
3
+ "version": "0.6.2",
4
4
  "description": "Chatbot developed for IBTI products",
5
5
  "packageManager": "yarn@3.6.4",
6
6
  "main": "./dist/index.mjs",