@algolia/satellite 2.3.0-rc.1 → 2.3.0-rc.10

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.
Files changed (192) hide show
  1. package/dist/cjs/Actions/Button/PolymorphicButton.js +5 -5
  2. package/dist/cjs/Actions/Button/PolymorphicIconButton.js +2 -2
  3. package/dist/cjs/Actions/Button/styles.d.ts +1 -0
  4. package/dist/cjs/Actions/Button/styles.js +15 -10
  5. package/dist/cjs/Actions/ButtonLink/ButtonLink.d.ts +2 -0
  6. package/dist/cjs/Actions/ButtonLink/ButtonLink.js +4 -2
  7. package/dist/cjs/Actions/SegmentedControl/SegmentedControl.js +3 -2
  8. package/dist/cjs/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
  9. package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +3 -3
  10. package/dist/cjs/Actions/ToggleGroup/ToggleGroup.d.ts +13 -14
  11. package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
  12. package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
  13. package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +20 -1
  14. package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
  15. package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
  16. package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
  17. package/dist/{esm/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → cjs/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
  18. package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +20 -14
  19. package/dist/{esm/Layout → cjs}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
  20. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +9 -4
  21. package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
  22. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
  23. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
  24. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
  25. package/dist/{esm/Layout → cjs}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
  26. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +3 -3
  27. package/dist/cjs/Chat/ChatMessages/ChatMessages.d.ts +141 -0
  28. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +64 -23
  29. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
  30. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
  31. package/dist/cjs/Chat/ChatMessages/useLastMessageHeight.d.ts +14 -0
  32. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +21 -14
  33. package/dist/{esm/Layout → cjs}/Chat/ChatPrompt/ChatPrompt.d.ts +34 -12
  34. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +46 -19
  35. package/dist/cjs/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
  36. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +11 -4
  37. package/dist/cjs/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
  38. package/dist/cjs/Chat/ChatPrompt/useFocusTyping.js +65 -0
  39. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
  40. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
  41. package/dist/cjs/Fields/Checkbox/Checkbox.d.ts +2 -2
  42. package/dist/cjs/Fields/Checkbox/Checkbox.js +2 -2
  43. package/dist/cjs/Fields/Dropzone/Dropzone.js +1 -1
  44. package/dist/cjs/Fields/Form/stories/Complex.js +123 -50
  45. package/dist/cjs/Fields/Input/Input.js +10 -13
  46. package/dist/cjs/Fields/RadioGroup/RadioButton.js +9 -2
  47. package/dist/cjs/Fields/RadioGroup/RadioButton.tailwind.js +1 -1
  48. package/dist/cjs/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
  49. package/dist/cjs/Fields/RadioGroup/RadioGroupItem.js +1 -1
  50. package/dist/cjs/Fields/Select/Select.tailwind.js +4 -3
  51. package/dist/cjs/Fields/SelectableCard/SelectableCard.d.ts +35 -0
  52. package/dist/cjs/Fields/SelectableCard/SelectableCard.js +105 -0
  53. package/dist/cjs/Fields/SelectableCard/SelectableCardContext.d.ts +13 -0
  54. package/dist/cjs/Fields/SelectableCard/SelectableCardContext.js +15 -0
  55. package/dist/cjs/Fields/SelectableCard/SelectableCardGroup.d.ts +13 -0
  56. package/dist/cjs/Fields/SelectableCard/SelectableCardGroup.js +55 -0
  57. package/dist/cjs/Fields/SelectableCard/index.d.ts +2 -0
  58. package/dist/cjs/Fields/SelectableCard/index.js +27 -0
  59. package/dist/cjs/Fields/Switch/Switch.js +1 -1
  60. package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
  61. package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
  62. package/dist/cjs/Fields/index.d.ts +1 -0
  63. package/dist/cjs/Fields/index.js +11 -0
  64. package/dist/cjs/Helpers/ShimmerText/ShimmerText.tailwind.js +1 -1
  65. package/dist/cjs/Helpers/utilities/focusable.tailwind.js +1 -1
  66. package/dist/cjs/Layout/index.d.ts +0 -1
  67. package/dist/cjs/Layout/index.js +0 -11
  68. package/dist/cjs/Navigation/Link/Link.d.ts +10 -0
  69. package/dist/cjs/Navigation/Link/Link.js +4 -2
  70. package/dist/cjs/Satellite/locale.d.ts +3 -3
  71. package/dist/cjs/index.d.ts +1 -0
  72. package/dist/cjs/index.js +12 -0
  73. package/dist/cjs/styles/helpers/tv.d.ts +5 -1
  74. package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
  75. package/dist/esm/Actions/Button/PolymorphicButton.js +6 -6
  76. package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
  77. package/dist/esm/Actions/Button/styles.d.ts +1 -0
  78. package/dist/esm/Actions/Button/styles.js +14 -9
  79. package/dist/esm/Actions/ButtonLink/ButtonLink.d.ts +2 -0
  80. package/dist/esm/Actions/ButtonLink/ButtonLink.js +4 -2
  81. package/dist/esm/Actions/SegmentedControl/SegmentedControl.js +3 -2
  82. package/dist/esm/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
  83. package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +4 -4
  84. package/dist/esm/Actions/ToggleGroup/ToggleGroup.d.ts +13 -14
  85. package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
  86. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
  87. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +20 -1
  88. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
  89. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
  90. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
  91. package/dist/{cjs/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → esm/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
  92. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +20 -14
  93. package/dist/{cjs/Layout → esm}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
  94. package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +8 -3
  95. package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
  96. package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
  97. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
  98. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
  99. package/dist/{cjs/Layout → esm}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
  100. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +3 -3
  101. package/dist/esm/Chat/ChatMessages/ChatMessages.d.ts +141 -0
  102. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +64 -25
  103. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
  104. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
  105. package/dist/esm/Chat/ChatMessages/useLastMessageHeight.d.ts +14 -0
  106. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +22 -15
  107. package/dist/{cjs/Layout → esm}/Chat/ChatPrompt/ChatPrompt.d.ts +34 -12
  108. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +47 -19
  109. package/dist/esm/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
  110. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +11 -4
  111. package/dist/esm/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
  112. package/dist/esm/Chat/ChatPrompt/useFocusTyping.js +59 -0
  113. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
  114. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
  115. package/dist/esm/Fields/Checkbox/Checkbox.d.ts +2 -2
  116. package/dist/esm/Fields/Checkbox/Checkbox.js +2 -2
  117. package/dist/esm/Fields/Dropzone/Dropzone.js +1 -1
  118. package/dist/esm/Fields/Form/stories/Complex.js +123 -50
  119. package/dist/esm/Fields/Input/Input.js +10 -13
  120. package/dist/esm/Fields/RadioGroup/RadioButton.js +10 -3
  121. package/dist/esm/Fields/RadioGroup/RadioButton.tailwind.js +1 -1
  122. package/dist/esm/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
  123. package/dist/esm/Fields/RadioGroup/RadioGroupItem.js +1 -1
  124. package/dist/esm/Fields/Select/Select.tailwind.js +4 -3
  125. package/dist/esm/Fields/SelectableCard/SelectableCard.d.ts +35 -0
  126. package/dist/esm/Fields/SelectableCard/SelectableCard.js +100 -0
  127. package/dist/esm/Fields/SelectableCard/SelectableCardContext.d.ts +13 -0
  128. package/dist/esm/Fields/SelectableCard/SelectableCardContext.js +9 -0
  129. package/dist/esm/Fields/SelectableCard/SelectableCardGroup.d.ts +13 -0
  130. package/dist/esm/Fields/SelectableCard/SelectableCardGroup.js +48 -0
  131. package/dist/esm/Fields/SelectableCard/index.d.ts +2 -0
  132. package/dist/esm/Fields/SelectableCard/index.js +2 -0
  133. package/dist/esm/Fields/Switch/Switch.js +1 -1
  134. package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
  135. package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
  136. package/dist/esm/Fields/index.d.ts +1 -0
  137. package/dist/esm/Fields/index.js +1 -0
  138. package/dist/esm/Helpers/ShimmerText/ShimmerText.tailwind.js +1 -1
  139. package/dist/esm/Helpers/utilities/focusable.tailwind.js +1 -1
  140. package/dist/esm/Layout/index.d.ts +0 -1
  141. package/dist/esm/Layout/index.js +0 -1
  142. package/dist/esm/Navigation/Link/Link.d.ts +10 -0
  143. package/dist/esm/Navigation/Link/Link.js +4 -2
  144. package/dist/esm/Satellite/locale.d.ts +3 -3
  145. package/dist/esm/index.d.ts +1 -0
  146. package/dist/esm/index.js +1 -0
  147. package/dist/esm/styles/helpers/tv.d.ts +5 -1
  148. package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
  149. package/dist/satellite.min.css +1 -1
  150. package/package.json +4 -4
  151. package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
  152. package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
  153. package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -42
  154. package/dist/cjs/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +0 -10
  155. package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
  156. package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
  157. package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
  158. package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -42
  159. package/dist/esm/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +0 -10
  160. package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
  161. /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
  162. /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
  163. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
  164. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
  165. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
  166. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
  167. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
  168. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
  169. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
  170. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
  171. /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
  172. /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
  173. /package/dist/cjs/{Layout/Chat → Chat}/index.d.ts +0 -0
  174. /package/dist/cjs/{Layout/Chat → Chat}/index.js +0 -0
  175. /package/dist/cjs/{Layout/Chat → Chat}/types.d.ts +0 -0
  176. /package/dist/cjs/{Layout/Chat → Chat}/types.js +0 -0
  177. /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
  178. /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
  179. /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
  180. /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
  181. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
  182. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
  183. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
  184. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
  185. /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
  186. /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
  187. /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
  188. /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
  189. /package/dist/esm/{Layout/Chat → Chat}/index.d.ts +0 -0
  190. /package/dist/esm/{Layout/Chat → Chat}/index.js +0 -0
  191. /package/dist/esm/{Layout/Chat → Chat}/types.d.ts +0 -0
  192. /package/dist/esm/{Layout/Chat → Chat}/types.js +0 -0
@@ -15,9 +15,9 @@ import stl from "./../../styles/helpers/satellitePrefixer";
15
15
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  var BASE_CLASSNAMES = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["btn inline-flex items-center justify-center focusable-visible"])));
17
17
  var SIZE_CLASSNAMES = {
18
- small: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["max-h-6 max-w-6 min-h-6 min-w-6 text-mobile md:text-sm"]))),
18
+ small: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["max-h-6 max-w-6 min-h-6 min-w-6 text-md"]))),
19
19
  medium: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["max-h-8 max-w-8 min-h-8 min-w-8 text-md"]))),
20
- large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["max-h-10 max-w-10 min-h-10 min-w-10 text-lg"])))
20
+ large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["max-h-10 max-w-10 min-h-10 min-w-10 text-md"])))
21
21
  };
22
22
  var VARIANT_CLASSNAMES = _objectSpread(_objectSpread({}, BUTTON_VARIANT_CLASSNAMES), {}, {
23
23
  neutral: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["btn-neutral text-grey-600"]))),
@@ -1,5 +1,6 @@
1
1
  import type { ButtonBaseProps, ButtonSize, ButtonVariant } from "./types";
2
2
  export declare const BUTTON_SIZE_CLASSNAMES: Record<ButtonSize, string>;
3
+ export declare const BUTTON_PADDING_CLASSNAMES: Record<ButtonSize, string>;
3
4
  export declare const BUTTON_LOADER_ICON_SIZES: Record<ButtonSize, number>;
4
5
  export declare const BUTTON_VARIANT_CLASSNAMES: Record<ButtonVariant, string>;
5
6
  export declare const getIconColorClassName: ({ disabled, variant }: Pick<ButtonBaseProps, "disabled" | "variant">) => string | null;
@@ -1,30 +1,35 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
3
3
  import stl from "./../../styles/helpers/satellitePrefixer";
4
4
  export var BUTTON_SIZE_CLASSNAMES = {
5
5
  small: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["h-6"]))),
6
6
  medium: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["h-8"]))),
7
7
  large: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["h-10"])))
8
8
  };
9
+ export var BUTTON_PADDING_CLASSNAMES = {
10
+ small: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["px-2"]))),
11
+ medium: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["px-4"]))),
12
+ large: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["px-4"])))
13
+ };
9
14
  export var BUTTON_LOADER_ICON_SIZES = {
10
- small: 12,
15
+ small: 16,
11
16
  medium: 16,
12
- large: 20
17
+ large: 16
13
18
  };
14
19
  export var BUTTON_VARIANT_CLASSNAMES = {
15
- subtle: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["btn-subtle"]))),
16
- neutral: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["btn-neutral"]))),
17
- primary: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["btn-primary"]))),
18
- destructive: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["btn-destructive"])))
20
+ subtle: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["btn-subtle"]))),
21
+ neutral: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["btn-neutral"]))),
22
+ primary: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["btn-primary"]))),
23
+ destructive: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["btn-destructive"])))
19
24
  };
20
25
  export var getIconColorClassName = function getIconColorClassName(_ref) {
21
26
  var disabled = _ref.disabled,
22
27
  variant = _ref.variant;
23
28
  if (variant === "destructive" || variant === "primary") {
24
- return stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["text-white"])));
29
+ return stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["text-white"])));
25
30
  }
26
31
  if (variant === "subtle" && !disabled) {
27
32
  return null;
28
33
  }
29
- return disabled ? stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["text-grey-300"]))) : stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["text-grey-600"])));
34
+ return disabled ? stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["text-grey-300"]))) : stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["text-grey-600"])));
30
35
  };
@@ -2,6 +2,7 @@
2
2
  import type { PolymorphicButtonProps } from "../../Actions/Button/PolymorphicButton";
3
3
  export declare type ButtonLinkProps = Omit<PolymorphicButtonProps<"a">, "as" | "ref"> & {
4
4
  href: string;
5
+ withExternalLinkIcon?: boolean;
5
6
  };
6
7
  /**
7
8
  * The `ButtonLink` component is used to display a link as a button.
@@ -10,4 +11,5 @@ export declare type ButtonLinkProps = Omit<PolymorphicButtonProps<"a">, "as" | "
10
11
  */
11
12
  export declare const ButtonLink: import("react").ForwardRefExoticComponent<Omit<PolymorphicButtonProps<"a">, "ref" | "as"> & {
12
13
  href: string;
14
+ withExternalLinkIcon?: boolean | undefined;
13
15
  } & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["endIcon", "href", "onClick"];
3
+ var _excluded = ["endIcon", "href", "onClick", "withExternalLinkIcon"];
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  import { forwardRef } from "react";
@@ -17,12 +17,14 @@ export var ButtonLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
17
17
  var EndIcon = _ref.endIcon,
18
18
  href = _ref.href,
19
19
  onClick = _ref.onClick,
20
+ _ref$withExternalLink = _ref.withExternalLinkIcon,
21
+ withExternalLinkIcon = _ref$withExternalLink === void 0 ? true : _ref$withExternalLink,
20
22
  props = _objectWithoutProperties(_ref, _excluded);
21
23
  var linkProps = useLinkProps(_objectSpread(_objectSpread({}, props), {}, {
22
24
  href: href,
23
25
  onClick: onClick
24
26
  }));
25
- if (linkProps.target === "_blank" && EndIcon === undefined) {
27
+ if (linkProps.target === "_blank" && EndIcon === undefined && withExternalLinkIcon) {
26
28
  EndIcon = ExternalLinkIcon;
27
29
  }
28
30
  return /*#__PURE__*/_jsx(PolymorphicButton, _objectSpread(_objectSpread(_objectSpread({}, props), linkProps), {}, {
@@ -69,11 +69,12 @@ export var SegmentedControl = /*#__PURE__*/forwardRef(function (_ref, ref) {
69
69
  value: value,
70
70
  name: radioName,
71
71
  onChange: onChange,
72
- disabled: disabled
72
+ disabled: disabled,
73
+ size: size
73
74
  },
74
75
  children: /*#__PURE__*/_jsxs("div", {
75
76
  ref: mergeRefs([ref, containerRef]),
76
- className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["segmented-control focusable-visible-within\n relative inline-flex typo-display-body rounded bg-grey-100\n ", "\n "])), size === "large" ? "segmented-control-large space-x-1" : "space-x-2px"), BUTTON_SIZE_CLASSNAMES[size], className),
77
+ className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["segmented-control focusable-visible-within\n relative inline-flex typo-display-body rounded bg-grey-100\n ", "\n "])), size === "large" ? "segmented-control-large space-x-1" : "space-x-0.5"), BUTTON_SIZE_CLASSNAMES[size], className),
77
78
  children: [/*#__PURE__*/_jsx("div", {
78
79
  ref: valueIndicatorRef,
79
80
  style: valueIndicatorStyle,
@@ -1,9 +1,11 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
- var _templateObject, _templateObject2;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ import cx from "clsx";
6
7
  import { buildAnimationProps } from "./utils";
8
+ import { BUTTON_PADDING_CLASSNAMES } from "./../Button/styles";
7
9
  import { useRadioGroupContext } from "./../../Fields/RadioGroup/RadioGroupContext";
8
10
  import { OverflowTooltipWrapper } from "./../../Overlay";
9
11
  import stl from "./../../styles/helpers/satellitePrefixer";
@@ -15,11 +17,12 @@ export var SegmentedControlOption = function SegmentedControlOption(_ref) {
15
17
  var context = useRadioGroupContext();
16
18
  var checked = context.value === value;
17
19
  var inputDisabled = context.disabled || disabled;
20
+ var size = context.size || "medium";
18
21
  return /*#__PURE__*/_jsxs("label", _objectSpread(_objectSpread({
19
- className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n inline-flex grow shrink justify-center items-center min-w-16 max-w-48 px-4 z-10 text-grey-600\n ", "\n ", "\n "])), inputDisabled ? "cursor-not-allowed opacity-60 rounded bg-grey-100" : "cursor-pointer hover:text-grey-900", !checked && !inputDisabled && "rounded active:bg-accent-200/20")
22
+ className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["inline-flex grow shrink justify-center items-center min-w-16 max-w-48 z-10 text-grey-600"]))), BUTTON_PADDING_CLASSNAMES[size], inputDisabled ? stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["cursor-not-allowed opacity-60 rounded bg-grey-100"]))) : stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["cursor-pointer hover:text-grey-900"]))), !checked && !inputDisabled && stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["rounded active:bg-accent-200/20"]))))
20
23
  }, buildAnimationProps(context.name, value)), {}, {
21
24
  children: [/*#__PURE__*/_jsx("input", {
22
- className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["w-0 h-0 opacity-0"]))),
25
+ className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["w-0 h-0 opacity-0"]))),
23
26
  type: "radio",
24
27
  value: value,
25
28
  name: context.name,
@@ -2,12 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
4
  var _excluded = ["className", "size", "icon", "children", "label"];
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
5
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import cx from "clsx";
9
9
  import { forwardRef } from "react";
10
- import { BUTTON_SIZE_CLASSNAMES } from "./../Button/styles";
10
+ import { BUTTON_PADDING_CLASSNAMES, BUTTON_SIZE_CLASSNAMES } from "./../Button/styles";
11
11
  import { TooltipWrapper } from "./../../Overlay";
12
12
  import stl from "./../../styles/helpers/satellitePrefixer";
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -37,11 +37,11 @@ export var ToggleButtonBase = /*#__PURE__*/forwardRef(function (props, ref) {
37
37
  ref: ref,
38
38
  type: "button",
39
39
  "aria-label": label,
40
- className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["inline-flex items-center justify-center gap-1 min-w-min whitespace-nowrap typo-display-body"]))), stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["group/toggle-button rounded focusable-visible focus-visible:border-transparent disabled:cursor-not-allowed"]))), stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["data-[state=on]:text-accent-600 disabled:!text-grey-300"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-white data-[state=off]:hover:bg-grey-100 data-[state=on]:bg-accent-100 disabled:!bg-grey-50"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border border-grey-200 data-[state=on]:border-accent-600 disabled:!border-grey-200"]))), !isIconOnly && stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["px-3"]))), isIconOnly ? ICON_ONLY_CLASSNAMES[size] : BUTTON_SIZE_CLASSNAMES[size], className)
40
+ className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["inline-flex items-center justify-center gap-1 min-w-min whitespace-nowrap typo-display-body"]))), stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["group/toggle-button rounded focusable-visible focus-visible:border-transparent disabled:cursor-not-allowed"]))), stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["data-[state=on]:text-accent-600 disabled:!text-grey-300"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-white data-[state=off]:hover:bg-grey-100 data-[state=on]:bg-accent-100 disabled:!bg-grey-50"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border border-grey-200 data-[state=on]:border-accent-600 disabled:!border-grey-200"]))), !isIconOnly && BUTTON_PADDING_CLASSNAMES[size], isIconOnly ? ICON_ONLY_CLASSNAMES[size] : BUTTON_SIZE_CLASSNAMES[size], className)
41
41
  }, rest), {}, {
42
42
  children: [!!Icon && /*#__PURE__*/_jsx(Icon, {
43
43
  "aria-hidden": "true",
44
- className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["shrink-0 h-4 w-4 text-grey-600 group-data-[state=on]/toggle-button:text-inherit group-disabled/toggle-button:text-inherit"])))
44
+ className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["shrink-0 h-4 w-4 text-grey-600 group-data-[state=on]/toggle-button:text-inherit group-disabled/toggle-button:text-inherit"])))
45
45
  }), !!children && /*#__PURE__*/_jsx("div", {
46
46
  children: children
47
47
  })]
@@ -1,4 +1,3 @@
1
- import type { ToggleGroupItemProps as RadixToggleGroupItemProps, ToggleGroupMultipleProps as RadixToggleGroupMultipleProps, ToggleGroupSingleProps as RadixToggleGroupSingleProps } from "@radix-ui/react-toggle-group";
2
1
  import type { FC, PropsWithChildren } from "react";
3
2
  import type { ToggleButtonBaseProps } from "../../Actions/ToggleButton/ToggleButtonBase";
4
3
  declare type ToggleGroupSharedProps = {
@@ -12,7 +11,7 @@ declare type ToggleGroupSharedProps = {
12
11
  */
13
12
  disabled?: boolean;
14
13
  };
15
- declare type ToggleGroupSingleProps = {
14
+ declare type ToggleGroupSingleProps<T extends string = string> = {
16
15
  /**
17
16
  * Defines whether a single or multiple items can be pressed at a time.
18
17
  */
@@ -21,18 +20,18 @@ declare type ToggleGroupSingleProps = {
21
20
  * Defines the controlled value of the pressed item.
22
21
  * Must be used in conjunction with `onChange`.
23
22
  */
24
- value?: RadixToggleGroupSingleProps["value"];
23
+ value?: T;
25
24
  /**
26
25
  * Defines the value of the item to show as pressed when initially rendered.
27
26
  * Use when you do not need to control the state of the items.
28
27
  */
29
- defaultValue?: RadixToggleGroupSingleProps["defaultValue"];
28
+ defaultValue?: T;
30
29
  /**
31
30
  * Defines the event handler called when the pressed state of an item changes.
32
31
  */
33
- onChange?: RadixToggleGroupSingleProps["onValueChange"];
32
+ onChange?: (value: T) => void;
34
33
  };
35
- declare type ToggleGroupMultipleProps = {
34
+ declare type ToggleGroupMultipleProps<T extends string = string> = {
36
35
  /**
37
36
  * Defines whether a single or multiple items can be pressed at a time.
38
37
  */
@@ -41,24 +40,24 @@ declare type ToggleGroupMultipleProps = {
41
40
  * Defines the controlled value of the pressed items.
42
41
  * Must be used in conjunction with `onChange`.
43
42
  */
44
- value?: RadixToggleGroupMultipleProps["value"];
43
+ value?: T[];
45
44
  /**
46
45
  * Defines the values of the items to show as pressed when initially rendered.
47
46
  * Use when you do not need to control the state of the items.
48
47
  */
49
- defaultValue?: RadixToggleGroupMultipleProps["defaultValue"];
48
+ defaultValue?: T[];
50
49
  /**
51
50
  * Defines the event handler called when the pressed state of an item changes.
52
51
  */
53
- onChange?: RadixToggleGroupMultipleProps["onValueChange"];
52
+ onChange?: (value: T[]) => void;
54
53
  };
55
- export declare type ToggleGroupProps = ToggleGroupSharedProps & (ToggleGroupSingleProps | ToggleGroupMultipleProps);
56
- declare type ToggleGroupComponent = FC<PropsWithChildren<ToggleGroupProps>> & {
57
- Item: FC<PropsWithChildren<ToggleGroupItemProps>>;
54
+ export declare type ToggleGroupProps<T extends string = string> = ToggleGroupSharedProps & (ToggleGroupSingleProps<T> | ToggleGroupMultipleProps<T>);
55
+ export declare type ToggleGroupComponent<T extends string = string> = FC<PropsWithChildren<ToggleGroupProps<T>>> & {
56
+ Item: FC<PropsWithChildren<ToggleGroupItemProps<T>>>;
58
57
  };
59
- export declare type ToggleGroupItemProps = PropsWithChildren<ToggleButtonBaseProps & {
58
+ export declare type ToggleGroupItemProps<T extends string = string> = PropsWithChildren<ToggleButtonBaseProps & {
60
59
  /** Defines a unique value for the item. */
61
- value: RadixToggleGroupItemProps["value"];
60
+ value: T;
62
61
  }>;
63
62
  /**
64
63
  * The `ToggleGroup` component is a toggle group that allows users to select one or more options.
@@ -0,0 +1,23 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { AccordionProps } from "../../Actions";
3
+ import type { IconComponentType } from "../../Icons";
4
+ export declare type ChatContextAccordionProps = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & Omit<AccordionProps, "multiple" | "defaultValue" | "value" | "onChange"> & {
5
+ /**
6
+ * The header of the accordion.
7
+ */
8
+ header: ReactNode;
9
+ /**
10
+ * The icon of the accordion.
11
+ */
12
+ icon?: IconComponentType;
13
+ /**
14
+ * Whether the accordion is open by default.
15
+ */
16
+ defaultOpen?: boolean;
17
+ };
18
+ /**
19
+ * The `ChatContextAccordion` component provides a context menu for the chat.
20
+ *
21
+ * See the [ChatContextAccordion documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-context-accordion) for more information.
22
+ */
23
+ export declare const ChatContextAccordion: ({ header, icon, children, className, defaultOpen, ...props }: ChatContextAccordionProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,19 +1,26 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["header", "icon", "children", "className"];
3
+ var _excluded = ["header", "icon", "children", "className", "defaultOpen"];
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  import { chatContextAccordionStyles } from "./ChatContextAccordion.styles";
7
- import { Accordion } from "./../../../Actions";
7
+ import { Accordion } from "./../../Actions";
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ /**
10
+ * The `ChatContextAccordion` component provides a context menu for the chat.
11
+ *
12
+ * See the [ChatContextAccordion documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-context-accordion) for more information.
13
+ */
9
14
  export var ChatContextAccordion = function ChatContextAccordion(_ref) {
10
15
  var header = _ref.header,
11
16
  icon = _ref.icon,
12
17
  children = _ref.children,
13
18
  className = _ref.className,
19
+ defaultOpen = _ref.defaultOpen,
14
20
  props = _objectWithoutProperties(_ref, _excluded);
15
21
  var styles = chatContextAccordionStyles();
16
22
  return /*#__PURE__*/_jsx(Accordion, _objectSpread(_objectSpread({}, props), {}, {
23
+ defaultValue: defaultOpen ? "default" : undefined,
17
24
  className: styles.base({
18
25
  className: className
19
26
  }),
@@ -34,6 +34,12 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
34
34
  title: string;
35
35
  content: string;
36
36
  }, undefined, {
37
+ responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
38
+ } & import("tailwind-variants/dist/config").TWMConfig & {
39
+ twMergeConfig: {
40
+ prefix: string;
41
+ };
42
+ }, {
37
43
  [key: string]: {
38
44
  [key: string]: import("tailwind-merge").ClassNameValue | {
39
45
  base?: import("tailwind-merge").ClassNameValue;
@@ -64,4 +70,17 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
64
70
  titleWrapper: string;
65
71
  title: string;
66
72
  content: string;
67
- }, undefined, unknown, unknown, undefined>>;
73
+ }, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
74
+ [key: string]: {
75
+ [key: string]: import("tailwind-merge").ClassNameValue | {
76
+ base?: import("tailwind-merge").ClassNameValue;
77
+ header?: import("tailwind-merge").ClassNameValue;
78
+ title?: import("tailwind-merge").ClassNameValue;
79
+ content?: import("tailwind-merge").ClassNameValue;
80
+ item?: import("tailwind-merge").ClassNameValue;
81
+ trigger?: import("tailwind-merge").ClassNameValue;
82
+ iconBg?: import("tailwind-merge").ClassNameValue;
83
+ titleWrapper?: import("tailwind-merge").ClassNameValue;
84
+ };
85
+ };
86
+ } | {}>, unknown, unknown, undefined>>;
@@ -1,7 +1,7 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
- import stl from "./../../../styles/helpers/satellitePrefixer";
4
- import { tv } from "./../../../styles/helpers/tv";
3
+ import stl from "./../../styles/helpers/satellitePrefixer";
4
+ import { tv } from "./../../styles/helpers/tv";
5
5
  export var chatContextAccordionStyles = tv({
6
6
  slots: {
7
7
  base: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-full"]))),
@@ -11,6 +11,6 @@ export var chatContextAccordionStyles = tv({
11
11
  trigger: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["!px-2 !py-0.5"]))),
12
12
  titleWrapper: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["gap-x-1"]))),
13
13
  title: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["typo-subdued typo-display-caption"]))),
14
- content: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-grey-100 [&>div]:px-3 [&>div]:py-2 overflow-y-auto max-h-36"])))
14
+ content: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-grey-100 [&>div]:px-3 [&>div]:py-2 overflow-y-auto max-h-36 data-[state=closed]:overflow-y-hidden"])))
15
15
  }
16
16
  });
@@ -1,38 +1,115 @@
1
1
  import type { HTMLAttributes, MouseEvent, ReactElement, ReactNode, Ref } from "react";
2
2
  import type { VariantProps } from "tailwind-variants";
3
3
  import { chatMessageStyles } from "./ChatMessage.styles";
4
- import type { IconButtonWithFeedbackProps } from "../../../Actions";
5
- import type { UserAvatarProps } from "../../../Indicators";
4
+ import type { IconButtonWithFeedbackProps } from "../../Actions";
5
+ import type { UserAvatarProps } from "../../Indicators";
6
6
  declare type ChatMessageVariants = VariantProps<typeof chatMessageStyles>;
7
7
  declare type Actions<ActionsExtraData extends Record<string, any> = Record<string, any>> = Array<Omit<IconButtonWithFeedbackProps, "onClick" | "tooltipDelay" | "tooltipHideDelay"> & {
8
8
  onClick?: (e: MouseEvent<HTMLButtonElement>, actionsExtraData?: ActionsExtraData) => Promise<void> | void;
9
9
  }>;
10
10
  export declare type ChatMessageProps<ActionsExtraData extends Record<string, any> = Record<string, any>> = Omit<HTMLAttributes<HTMLElement>, "children" | "content"> & {
11
+ /**
12
+ * The content of the message.
13
+ */
11
14
  content: ReactNode;
15
+ /**
16
+ * The avatar of the message.
17
+ */
12
18
  avatar?: UserAvatarProps["user"];
19
+ /**
20
+ * The size of the avatar.
21
+ */
13
22
  avatarSize?: UserAvatarProps["size"];
23
+ /**
24
+ * The side of the message.
25
+ */
14
26
  side?: ChatMessageVariants["side"];
27
+ /**
28
+ * The variant of the message.
29
+ */
15
30
  variant?: ChatMessageVariants["variant"];
31
+ /**
32
+ * The actions of the message.
33
+ */
16
34
  actions?: Actions<ActionsExtraData>;
35
+ /**
36
+ * Whether to automatically hide the actions.
37
+ */
17
38
  autoHideActions?: boolean;
39
+ /**
40
+ * The leading content of the message.
41
+ */
18
42
  renderLeading?: ReactNode;
43
+ /**
44
+ * The actions content of the message.
45
+ */
19
46
  renderActions?: (actions?: Actions<ActionsExtraData>) => ReactNode;
47
+ /**
48
+ * The footer content of the message.
49
+ */
20
50
  renderFooter?: ReactNode;
51
+ /**
52
+ * The extra data of the actions.
53
+ */
21
54
  actionsExtraData?: ActionsExtraData;
55
+ /**
56
+ * Whether to render the message in RTL.
57
+ */
22
58
  rtl?: boolean;
23
59
  };
60
+ /**
61
+ * The `ChatMessage` component provides a message to display in the chat.
62
+ *
63
+ * See the [ChatMessage documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-message) for more information.
64
+ */
24
65
  export declare const ChatMessage: <ActionsExtraData extends Record<string, any> = Record<string, any>>(props: Omit<HTMLAttributes<HTMLElement>, "children" | "content"> & {
66
+ /**
67
+ * The content of the message.
68
+ */
25
69
  content: ReactNode;
26
- avatar?: import("../../../Indicators/Avatars/types").MinimalUser | undefined;
70
+ /**
71
+ * The avatar of the message.
72
+ */
73
+ avatar?: import("../../Indicators/Avatars/types").MinimalUser | undefined;
74
+ /**
75
+ * The size of the avatar.
76
+ */
27
77
  avatarSize?: UserAvatarProps["size"];
78
+ /**
79
+ * The side of the message.
80
+ */
28
81
  side?: ChatMessageVariants["side"];
82
+ /**
83
+ * The variant of the message.
84
+ */
29
85
  variant?: ChatMessageVariants["variant"];
86
+ /**
87
+ * The actions of the message.
88
+ */
30
89
  actions?: Actions<ActionsExtraData> | undefined;
90
+ /**
91
+ * Whether to automatically hide the actions.
92
+ */
31
93
  autoHideActions?: boolean | undefined;
94
+ /**
95
+ * The leading content of the message.
96
+ */
32
97
  renderLeading?: ReactNode;
98
+ /**
99
+ * The actions content of the message.
100
+ */
33
101
  renderActions?: ((actions?: Actions<ActionsExtraData> | undefined) => ReactNode) | undefined;
102
+ /**
103
+ * The footer content of the message.
104
+ */
34
105
  renderFooter?: ReactNode;
106
+ /**
107
+ * The extra data of the actions.
108
+ */
35
109
  actionsExtraData?: ActionsExtraData | undefined;
110
+ /**
111
+ * Whether to render the message in RTL.
112
+ */
36
113
  rtl?: boolean | undefined;
37
114
  } & {
38
115
  ref?: Ref<HTMLDivElement> | undefined;
@@ -6,8 +6,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
6
6
  import { memo } from "react";
7
7
  import { forwardRef } from "react";
8
8
  import { chatMessageStyles } from "./ChatMessage.styles";
9
- import { IconButtonWithFeedback } from "./../../../Actions";
10
- import { UserAvatar } from "./../../../Indicators";
9
+ import { IconButtonWithFeedback } from "./../../Actions";
10
+ import { UserAvatar } from "./../../Indicators";
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  var ChatMessageBase = function ChatMessageBase(_ref, ref) {
13
13
  var content = _ref.content,
@@ -44,10 +44,10 @@ var ChatMessageBase = function ChatMessageBase(_ref, ref) {
44
44
  className: styles.container(),
45
45
  children: [(!!avatar || !!renderLeading) && /*#__PURE__*/_jsx("div", {
46
46
  className: styles.leading(),
47
- children: avatar ? /*#__PURE__*/_jsx(UserAvatar, {
47
+ children: renderLeading || avatar && /*#__PURE__*/_jsx(UserAvatar, {
48
48
  user: avatar,
49
49
  size: avatarSize
50
- }) : renderLeading
50
+ })
51
51
  }), /*#__PURE__*/_jsxs("div", {
52
52
  className: styles.content(),
53
53
  children: [/*#__PURE__*/_jsx("div", {
@@ -69,9 +69,18 @@ var ChatMessageBase = function ChatMessageBase(_ref, ref) {
69
69
  tooltipHideDelay: 0
70
70
  }), index);
71
71
  }))
72
- }), renderFooter]
72
+ }), !!renderFooter && /*#__PURE__*/_jsx("div", {
73
+ className: styles.footer(),
74
+ children: renderFooter
75
+ })]
73
76
  })]
74
77
  })
75
78
  }));
76
79
  };
80
+
81
+ /**
82
+ * The `ChatMessage` component provides a message to display in the chat.
83
+ *
84
+ * See the [ChatMessage documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-message) for more information.
85
+ */
77
86
  export var ChatMessage = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(ChatMessageBase));