@banbox/chat 1.0.14 → 1.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banbox/chat",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Banbox Chat UI components — reusable across all Banbox React/Next.js projects",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -161,7 +161,7 @@ const SinglePopup: React.FC<SinglePopupProps> = ({ adapter, uiCallbacks, theme,
161
161
  }, [activeId, adapter, uiCallbacks, close]);
162
162
 
163
163
  return (
164
- <div className="fixed bottom-4 right-4 z-[10002]">
164
+ <div className="fixed bottom-4 right-4 z-10002">
165
165
  {/* Backdrop */}
166
166
  <motion.button
167
167
  aria-label="Close chat"
@@ -223,33 +223,13 @@ const SinglePopup: React.FC<SinglePopupProps> = ({ adapter, uiCallbacks, theme,
223
223
  )
224
224
  }
225
225
  right={
226
- <div className="flex items-center gap-1">
227
- {uiCallbacks?.renderKebabMenu
228
- ? uiCallbacks.renderKebabMenu({
229
- pinned: Boolean(activeThread?.pinned),
230
- onPinToggle: () => {
231
- if (activeId) adapter.threads.pin(activeId, !activeThread?.pinned);
232
- },
233
- onDelete: () => setShowDelete(true),
234
- })
235
- : (
236
- <ChatKebabMenu
237
- pinned={Boolean(activeThread?.pinned)}
238
- onPinToggle={() => {
239
- if (activeId) adapter.threads.pin(activeId, !activeThread?.pinned);
240
- }}
241
- onDelete={() => setShowDelete(true)}
242
- />
243
- )
244
- }
245
- <button
246
- type="button"
247
- onClick={close}
248
- className="flex h-[34px] w-[34px] items-center justify-center rounded-full bg-white text-black shadow-[0px_2px_4px_0px_#A5A3AE4D] hover:bg-black/5 hover:text-[var(--color-banbox-warning)] cursor-pointer border-none"
249
- >
250
- <ChatXIcon className="h-6 w-6" />
251
- </button>
252
- </div>
226
+ <button
227
+ type="button"
228
+ onClick={close}
229
+ className="flex h-[34px] w-[34px] items-center justify-center rounded-full bg-white text-black shadow-[0px_2px_4px_0px_#A5A3AE4D] hover:bg-black/5 hover:text-(--color-banbox-warning) cursor-pointer border-none"
230
+ >
231
+ <ChatXIcon className="h-6 w-6" />
232
+ </button>
253
233
  }
254
234
  />
255
235
  </div>
@@ -540,12 +540,12 @@ const DeleteConfirm: React.FC<{
540
540
  onConfirm: () => void;
541
541
  onCancel: () => void;
542
542
  }> = ({ onConfirm, onCancel }) => (
543
- <div className="fixed inset-0 z-[10010] flex items-center justify-center" onClick={onCancel}>
543
+ <div className="fixed inset-0 z-10010 flex items-center justify-center" onClick={onCancel}>
544
544
  <div className="fixed inset-0 bg-black/40" />
545
545
  <div
546
546
  role="dialog"
547
547
  aria-modal="true"
548
- className="relative z-[10011] w-[420px] max-w-[95vw] rounded-md bg-white shadow-[0_12px_30px_rgba(0,0,0,0.18)] overflow-hidden"
548
+ className="relative z-10011 w-[420px] max-w-[95vw] rounded-md bg-white shadow-[0_12px_30px_rgba(0,0,0,0.18)] overflow-hidden"
549
549
  onClick={(e) => e.stopPropagation()}
550
550
  >
551
551
  <div className="flex h-[44px] items-center bg-[#f8f8f8] px-6">
@@ -701,8 +701,8 @@ const ChatAddressModal: React.FC<Props> = ({
701
701
  <div
702
702
  className={clsx(
703
703
  isSingle
704
- ? "fixed inset-0 z-[10003] flex"
705
- : "absolute inset-0 z-[70] flex items-center justify-center",
704
+ ? "fixed inset-0 z-10003 flex"
705
+ : "absolute inset-0 z-70 flex items-center justify-center",
706
706
  )}
707
707
  onClick={(e) => { e.stopPropagation(); onClose(); }}
708
708
  >
@@ -719,12 +719,12 @@ const ChatAddressModal: React.FC<Props> = ({
719
719
  isSingle
720
720
  ? "fixed bottom-6 right-6 w-[700px] max-w-[95vw]"
721
721
  : "relative w-[700px] max-w-[95vw]",
722
- "overflow-hidden rounded-md bg-white shadow-[0_12px_30px_rgba(0,0,0,0.18)] z-[10004]",
722
+ "overflow-hidden rounded-md bg-white shadow-[0_12px_30px_rgba(0,0,0,0.18)] z-10004",
723
723
  className,
724
724
  )}
725
725
  >
726
726
  {/* Header */}
727
- <div className="h-[44px] px-8 py-[7px] flex items-center w-full bg-[var(--color-banbox-f8,#f8f8f8)] rounded-t-md">
727
+ <div className="h-[44px] px-8 py-[7px] flex items-center w-full bg-(--color-banbox-f8,#f8f8f8) rounded-t-md">
728
728
  {renderHeader()}
729
729
  </div>
730
730
 
@@ -757,7 +757,7 @@ const ChatAddressModal: React.FC<Props> = ({
757
757
  </div>
758
758
 
759
759
  {/* Footer */}
760
- <div className="h-[52px] bg-[var(--color-banbox-primary-container,#f0f4ff)] w-full px-6 py-2 flex justify-end items-center gap-6 rounded-b-[6px]">
760
+ <div className="h-[52px] bg-(--color-banbox-primary-container,#f0f4ff) w-full px-6 py-2 flex justify-end items-center gap-6 rounded-b-[6px]">
761
761
  <div className="flex items-center justify-end gap-3">
762
762
  {mode === "list" && (
763
763
  <>
@@ -88,7 +88,7 @@ const ChatTranslateSettingsModal: React.FC<Props> = ({
88
88
  return (
89
89
  <div
90
90
  className={clsx(
91
- "absolute inset-0 z-[9999] flex items-center justify-center",
91
+ "absolute inset-0 z-9999 flex items-center justify-center",
92
92
  variant === "single" && "rounded-[inherit]",
93
93
  )}
94
94
  onClick={(e) => {
@@ -483,7 +483,7 @@ const ChatFooter: React.FC<Props> = ({
483
483
  {/* Business card edit modal — simple inline form */}
484
484
  {showBizEdit && (
485
485
  <div
486
- className="fixed inset-0 z-[10003] flex items-center justify-center"
486
+ className="fixed inset-0 z-10003 flex items-center justify-center"
487
487
  onClick={() => setShowBizEdit(false)}
488
488
  >
489
489
  <div className="fixed inset-0 bg-black/30" />
@@ -491,7 +491,7 @@ const ChatFooter: React.FC<Props> = ({
491
491
  role="dialog"
492
492
  aria-modal="true"
493
493
  onClick={(e) => e.stopPropagation()}
494
- className="relative z-[10004] w-[480px] max-w-[95vw] overflow-hidden rounded-md bg-white shadow-[0_12px_30px_rgba(0,0,0,0.18)]"
494
+ className="relative z-10004 w-[480px] max-w-[95vw] overflow-hidden rounded-md bg-white shadow-[0_12px_30px_rgba(0,0,0,0.18)]"
495
495
  >
496
496
  <div className="flex h-[44px] items-center justify-between bg-[#f8f8f8] px-6">
497
497
  <h2 className="text-xl font-semibold text-black">Business Info</h2>
@@ -132,7 +132,7 @@ const ChatIdentity: React.FC<ChatIdentityProps> = (props) => {
132
132
  </div>
133
133
  {subtitle &&
134
134
  (title === "banbox.com" ? (
135
- <div className="flex items-center -ml-[5px]">
135
+ <div className="flex items-center ml-[-5px]">
136
136
  <Lottie
137
137
  animationData={globe}
138
138
  loop={true}
@@ -81,7 +81,7 @@ const ChatKebabMenu: React.FC<ChatKebabMenuProps> = ({
81
81
  className="absolute right-0 z-10 mt-2 w-44 rounded-xs bg-white py-1 shadow-[0_4px_16px_rgba(0,0,0,0.08)]"
82
82
  >
83
83
  {/* Speech-bubble caret */}
84
- <div className="pointer-events-none absolute -z-[1] -top-[6px] right-4 h-3 w-3 rotate-45 bg-white" />
84
+ <div className="pointer-events-none absolute z-[-1] top-[-6px] right-4 h-3 w-3 rotate-45 bg-white" />
85
85
 
86
86
  {/* Pin / Unpin */}
87
87
  <button
@@ -119,7 +119,7 @@ const MessageHoverActions: React.FC<Props> = ({
119
119
  }}
120
120
  className={clsx(
121
121
  "inline-flex h-[22px] w-[22px] items-center justify-center rounded-sm bg-white text-[#2c2c2c] shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:bg-[#f8f8f8]",
122
- isActive("translate") && "!bg-[#636363] text-white",
122
+ isActive("translate") && "bg-[#636363]! text-white",
123
123
  )}
124
124
  >
125
125
  <NewLanguageIcon className="h-[14px] w-[14px]" />