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

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 (210) 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/MarkdownContent/MarkdownContent.d.ts +15 -0
  65. package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.js +29 -0
  66. package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
  67. package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
  68. package/dist/cjs/Helpers/MarkdownContent/index.d.ts +1 -0
  69. package/dist/cjs/Helpers/MarkdownContent/index.js +16 -0
  70. package/dist/cjs/Helpers/ShimmerText/ShimmerText.tailwind.js +1 -1
  71. package/dist/cjs/Helpers/index.d.ts +1 -0
  72. package/dist/cjs/Helpers/index.js +11 -0
  73. package/dist/cjs/Helpers/utilities/focusable.tailwind.js +1 -1
  74. package/dist/cjs/Layout/index.d.ts +0 -1
  75. package/dist/cjs/Layout/index.js +0 -11
  76. package/dist/cjs/Navigation/Link/Link.d.ts +10 -0
  77. package/dist/cjs/Navigation/Link/Link.js +4 -2
  78. package/dist/cjs/Satellite/locale.d.ts +3 -3
  79. package/dist/cjs/index.d.ts +1 -0
  80. package/dist/cjs/index.js +12 -0
  81. package/dist/cjs/styles/helpers/tv.d.ts +5 -1
  82. package/dist/cjs/styles/tailwind.config.js +1 -1
  83. package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
  84. package/dist/esm/Actions/Button/PolymorphicButton.js +6 -6
  85. package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
  86. package/dist/esm/Actions/Button/styles.d.ts +1 -0
  87. package/dist/esm/Actions/Button/styles.js +14 -9
  88. package/dist/esm/Actions/ButtonLink/ButtonLink.d.ts +2 -0
  89. package/dist/esm/Actions/ButtonLink/ButtonLink.js +4 -2
  90. package/dist/esm/Actions/SegmentedControl/SegmentedControl.js +3 -2
  91. package/dist/esm/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
  92. package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +4 -4
  93. package/dist/esm/Actions/ToggleGroup/ToggleGroup.d.ts +13 -14
  94. package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
  95. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
  96. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +20 -1
  97. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
  98. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
  99. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
  100. package/dist/{cjs/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → esm/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
  101. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +20 -14
  102. package/dist/{cjs/Layout → esm}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
  103. package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +8 -3
  104. package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
  105. package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
  106. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
  107. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
  108. package/dist/{cjs/Layout → esm}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
  109. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +3 -3
  110. package/dist/esm/Chat/ChatMessages/ChatMessages.d.ts +141 -0
  111. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +64 -25
  112. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
  113. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
  114. package/dist/esm/Chat/ChatMessages/useLastMessageHeight.d.ts +14 -0
  115. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +22 -15
  116. package/dist/{cjs/Layout → esm}/Chat/ChatPrompt/ChatPrompt.d.ts +34 -12
  117. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +47 -19
  118. package/dist/esm/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
  119. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +11 -4
  120. package/dist/esm/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
  121. package/dist/esm/Chat/ChatPrompt/useFocusTyping.js +59 -0
  122. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
  123. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
  124. package/dist/esm/Fields/Checkbox/Checkbox.d.ts +2 -2
  125. package/dist/esm/Fields/Checkbox/Checkbox.js +2 -2
  126. package/dist/esm/Fields/Dropzone/Dropzone.js +1 -1
  127. package/dist/esm/Fields/Form/stories/Complex.js +123 -50
  128. package/dist/esm/Fields/Input/Input.js +10 -13
  129. package/dist/esm/Fields/RadioGroup/RadioButton.js +10 -3
  130. package/dist/esm/Fields/RadioGroup/RadioButton.tailwind.js +1 -1
  131. package/dist/esm/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
  132. package/dist/esm/Fields/RadioGroup/RadioGroupItem.js +1 -1
  133. package/dist/esm/Fields/Select/Select.tailwind.js +4 -3
  134. package/dist/esm/Fields/SelectableCard/SelectableCard.d.ts +35 -0
  135. package/dist/esm/Fields/SelectableCard/SelectableCard.js +100 -0
  136. package/dist/esm/Fields/SelectableCard/SelectableCardContext.d.ts +13 -0
  137. package/dist/esm/Fields/SelectableCard/SelectableCardContext.js +9 -0
  138. package/dist/esm/Fields/SelectableCard/SelectableCardGroup.d.ts +13 -0
  139. package/dist/esm/Fields/SelectableCard/SelectableCardGroup.js +48 -0
  140. package/dist/esm/Fields/SelectableCard/index.d.ts +2 -0
  141. package/dist/esm/Fields/SelectableCard/index.js +2 -0
  142. package/dist/esm/Fields/Switch/Switch.js +1 -1
  143. package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
  144. package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
  145. package/dist/esm/Fields/index.d.ts +1 -0
  146. package/dist/esm/Fields/index.js +1 -0
  147. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.d.ts +15 -0
  148. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.js +22 -0
  149. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
  150. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
  151. package/dist/esm/Helpers/MarkdownContent/index.d.ts +1 -0
  152. package/dist/esm/Helpers/MarkdownContent/index.js +1 -0
  153. package/dist/esm/Helpers/ShimmerText/ShimmerText.tailwind.js +1 -1
  154. package/dist/esm/Helpers/index.d.ts +1 -0
  155. package/dist/esm/Helpers/index.js +2 -1
  156. package/dist/esm/Helpers/utilities/focusable.tailwind.js +1 -1
  157. package/dist/esm/Layout/index.d.ts +0 -1
  158. package/dist/esm/Layout/index.js +0 -1
  159. package/dist/esm/Navigation/Link/Link.d.ts +10 -0
  160. package/dist/esm/Navigation/Link/Link.js +4 -2
  161. package/dist/esm/Satellite/locale.d.ts +3 -3
  162. package/dist/esm/index.d.ts +1 -0
  163. package/dist/esm/index.js +1 -0
  164. package/dist/esm/styles/helpers/tv.d.ts +5 -1
  165. package/dist/esm/styles/tailwind.config.js +1 -1
  166. package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
  167. package/dist/satellite.min.css +1 -1
  168. package/package.json +5 -4
  169. package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
  170. package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
  171. package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -42
  172. package/dist/cjs/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +0 -10
  173. package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
  174. package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
  175. package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
  176. package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -42
  177. package/dist/esm/Layout/Chat/ChatMessages/useLastMessageHeight.d.ts +0 -10
  178. package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
  179. /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
  180. /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
  181. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
  182. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
  183. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
  184. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
  185. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
  186. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
  187. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
  188. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
  189. /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
  190. /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
  191. /package/dist/cjs/{Layout/Chat → Chat}/index.d.ts +0 -0
  192. /package/dist/cjs/{Layout/Chat → Chat}/index.js +0 -0
  193. /package/dist/cjs/{Layout/Chat → Chat}/types.d.ts +0 -0
  194. /package/dist/cjs/{Layout/Chat → Chat}/types.js +0 -0
  195. /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
  196. /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
  197. /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
  198. /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
  199. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
  200. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
  201. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
  202. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
  203. /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
  204. /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
  205. /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
  206. /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
  207. /package/dist/esm/{Layout/Chat → Chat}/index.d.ts +0 -0
  208. /package/dist/esm/{Layout/Chat → Chat}/index.js +0 -0
  209. /package/dist/esm/{Layout/Chat → Chat}/types.d.ts +0 -0
  210. /package/dist/esm/{Layout/Chat → Chat}/types.js +0 -0
@@ -0,0 +1,35 @@
1
+ import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
2
+ import type { CardProps } from "../../Layout";
3
+ import { Card } from "../../Layout";
4
+ declare type SelectableCardBaseProps = Omit<CardProps, "elevation"> & {
5
+ /**
6
+ * The color of the selected card.
7
+ */
8
+ selectedColor?: keyof typeof SELECTED_COLOR_CLASSNAMES;
9
+ };
10
+ export declare type SelectableCardProps = SelectableCardBaseProps & {
11
+ /**
12
+ * Whether the `SelectableCard` is disabled.
13
+ */
14
+ disabled?: boolean;
15
+ /**
16
+ * The value of the `SelectableCard`.
17
+ */
18
+ value: string;
19
+ };
20
+ interface SelectableCardType extends ForwardRefExoticComponent<PropsWithoutRef<SelectableCardProps> & RefAttributes<HTMLElement>> {
21
+ Header: typeof Card.Header;
22
+ Title: typeof Card.Title;
23
+ }
24
+ declare const SELECTED_COLOR_CLASSNAMES: {
25
+ readonly grey: string;
26
+ readonly pink: string;
27
+ readonly accent: string;
28
+ readonly blue: string;
29
+ readonly green: string;
30
+ readonly orange: string;
31
+ readonly red: string;
32
+ readonly xenon: string;
33
+ };
34
+ export declare const SelectableCard: SelectableCardType;
35
+ export {};
@@ -0,0 +1,100 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
5
+ var _excluded = ["value", "selectedColor", "children", "id", "className"];
6
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
7
+ 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; }
8
+ 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; }
9
+ import cx from "clsx";
10
+ import { forwardRef } from "react";
11
+ import { Checkbox, RadioButton, useField } from "..";
12
+ import { Card } from "../../Layout";
13
+ import stl from "../../styles/helpers/satellitePrefixer";
14
+ import { useSelectableCardContext } from "./SelectableCardContext";
15
+
16
+ // We need to omit the `elevation` prop because we handle it ourselves.
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
+ var SELECTED_COLOR_CLASSNAMES = {
19
+ grey: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["border-grey-600"]))),
20
+ pink: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["border-pink-600"]))),
21
+ accent: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["border-accent-600"]))),
22
+ blue: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["border-blue-600"]))),
23
+ green: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["border-green-600"]))),
24
+ orange: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["border-orange-600"]))),
25
+ red: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["border-red-600"]))),
26
+ xenon: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["border-xenon-600"])))
27
+ };
28
+ export var SelectableCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
+ var value = _ref.value,
30
+ _ref$selectedColor = _ref.selectedColor,
31
+ selectedColor = _ref$selectedColor === void 0 ? "xenon" : _ref$selectedColor,
32
+ children = _ref.children,
33
+ id = _ref.id,
34
+ className = _ref.className,
35
+ props = _objectWithoutProperties(_ref, _excluded);
36
+ var _useSelectableCardCon = useSelectableCardContext(),
37
+ name = _useSelectableCardCon.name,
38
+ isControlled = _useSelectableCardCon.isControlled,
39
+ setValue = _useSelectableCardCon.setValue,
40
+ onValueChange = _useSelectableCardCon.onValueChange,
41
+ type = _useSelectableCardCon.type,
42
+ valueContext = _useSelectableCardCon.value,
43
+ disabledContext = _useSelectableCardCon.disabled;
44
+ var disabled = props.disabled || disabledContext;
45
+ var selected = valueContext === null || valueContext === void 0 ? void 0 : valueContext.includes(value);
46
+ var _useField = useField(),
47
+ status = _useField.state.status;
48
+ var isInvalid = status === "invalid";
49
+ var handleCheckboxChange = function handleCheckboxChange(evt) {
50
+ var _valueContext$filter;
51
+ var newValue = selected ? (_valueContext$filter = valueContext === null || valueContext === void 0 ? void 0 : valueContext.filter(function (v) {
52
+ return v !== value;
53
+ })) !== null && _valueContext$filter !== void 0 ? _valueContext$filter : [] : [].concat(_toConsumableArray(valueContext !== null && valueContext !== void 0 ? valueContext : []), [value]);
54
+ if (!isControlled && !evt.isDefaultPrevented()) {
55
+ setValue(newValue);
56
+ }
57
+ onValueChange === null || onValueChange === void 0 || onValueChange(newValue);
58
+ };
59
+ var handleRadioButtonChange = function handleRadioButtonChange(evt) {
60
+ var newValue = [evt.target.value];
61
+ if (!isControlled && !evt.isDefaultPrevented()) {
62
+ setValue(newValue);
63
+ }
64
+ onValueChange === null || onValueChange === void 0 || onValueChange(newValue);
65
+ };
66
+ return /*#__PURE__*/_jsxs(Card, _objectSpread(_objectSpread({
67
+ ref: ref,
68
+ fullBleed: true,
69
+ className: cx(stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["relative border transition-[shadow,border]"]))), !disabled && !selected && !isInvalid && stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["border-transparent"]))),
70
+ // Disabled
71
+ disabled && stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["bg-grey-100 border-grey-200 text-grey-300 shadow-none cursor-not-allowed [&>*]:text-grey-300"]))),
72
+ // Selected
73
+ selected && stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["card-z200"]))), !disabled && selected && !isInvalid && SELECTED_COLOR_CLASSNAMES[selectedColor],
74
+ // Hovered
75
+ !disabled && !selected && !isInvalid && stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["hover:border-grey-200"]))), // Focused
76
+ stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["focusable-visible-within"]))), !selected && stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["focus-within:border-grey-200"]))),
77
+ // Invalid
78
+ isInvalid && stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["border-red-700 shadow-none"]))),
79
+ // Custom
80
+ className)
81
+ }, props), {}, {
82
+ children: [type === "multiple" ? /*#__PURE__*/_jsx(Checkbox, {
83
+ id: id,
84
+ disabled: disabled,
85
+ checked: selected,
86
+ className: cx(stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["absolute right-4 top-4 z-10"])))),
87
+ onChange: handleCheckboxChange,
88
+ name: name
89
+ }) : /*#__PURE__*/_jsx(RadioButton, {
90
+ id: id,
91
+ disabled: disabled,
92
+ checked: selected,
93
+ className: cx(stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["absolute right-4 top-4 z-10"])))),
94
+ onChange: handleRadioButtonChange,
95
+ value: value,
96
+ name: name
97
+ }), children]
98
+ }));
99
+ });
100
+ SelectableCard.displayName = "SelectableCard";
@@ -0,0 +1,13 @@
1
+ import { type Dispatch, type SetStateAction } from "react";
2
+ import type { SelectionTypes } from "./SelectableCardGroup";
3
+ export interface SelectableCardContextInterface {
4
+ value?: string[];
5
+ name?: string;
6
+ type: SelectionTypes;
7
+ isControlled: boolean;
8
+ setValue: Dispatch<SetStateAction<string[]>>;
9
+ onValueChange?: (value: string[]) => void;
10
+ disabled?: boolean;
11
+ }
12
+ export declare const SelectableCardContext: import("react").Context<SelectableCardContextInterface | null>;
13
+ export declare const useSelectableCardContext: () => SelectableCardContextInterface;
@@ -0,0 +1,9 @@
1
+ import { createContext, useContext } from "react";
2
+ export var SelectableCardContext = /*#__PURE__*/createContext(null);
3
+ export var useSelectableCardContext = function useSelectableCardContext() {
4
+ var context = useContext(SelectableCardContext);
5
+ if (!context) {
6
+ throw new Error("useSelectableCardContext used outside SelectableCardContext");
7
+ }
8
+ return context;
9
+ };
@@ -0,0 +1,13 @@
1
+ import { type FC, type PropsWithChildren } from "react";
2
+ export declare type SelectionTypes = "multiple" | "single";
3
+ export declare type SelectableCardGroupProps = {
4
+ disabled?: boolean;
5
+ name?: string;
6
+ value?: string[];
7
+ defaultValue?: string[];
8
+ type: SelectionTypes;
9
+ onValueChange?: (value: string[]) => void;
10
+ className?: string;
11
+ required?: boolean;
12
+ };
13
+ export declare const SelectableCardGroup: FC<PropsWithChildren<SelectableCardGroupProps>>;
@@ -0,0 +1,48 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { useState } from "react";
3
+ import { useField } from "..";
4
+ import { SelectableCardContext } from "./SelectableCardContext";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export var SelectableCardGroup = function SelectableCardGroup(_ref) {
7
+ var _ref2;
8
+ var children = _ref.children,
9
+ disabled = _ref.disabled,
10
+ name = _ref.name,
11
+ controlledValue = _ref.value,
12
+ defaultValue = _ref.defaultValue,
13
+ type = _ref.type,
14
+ onValueChange = _ref.onValueChange,
15
+ className = _ref.className,
16
+ required = _ref.required;
17
+ var isControlled = controlledValue !== undefined;
18
+ var _useState = useState((_ref2 = controlledValue !== null && controlledValue !== void 0 ? controlledValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : []),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ internalValue = _useState2[0],
21
+ setInternalValue = _useState2[1];
22
+ var value = isControlled ? controlledValue : internalValue;
23
+ var _useField = useField({
24
+ required: required
25
+ }),
26
+ status = _useField.state.status,
27
+ labelId = _useField.labelId,
28
+ descriptionId = _useField.descriptionId;
29
+ return /*#__PURE__*/_jsx(SelectableCardContext.Provider, {
30
+ value: {
31
+ value: value,
32
+ setValue: setInternalValue,
33
+ isControlled: isControlled,
34
+ name: name,
35
+ disabled: disabled,
36
+ onValueChange: onValueChange,
37
+ type: type
38
+ },
39
+ children: /*#__PURE__*/_jsx("div", {
40
+ role: type === "single" ? "radiogroup" : "group",
41
+ "aria-invalid": status === "invalid",
42
+ "aria-labelledby": labelId,
43
+ "aria-describedby": descriptionId,
44
+ className: className,
45
+ children: children
46
+ })
47
+ });
48
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./SelectableCard";
2
+ export * from "./SelectableCardGroup";
@@ -0,0 +1,2 @@
1
+ export * from "./SelectableCard";
2
+ export * from "./SelectableCardGroup";
@@ -76,7 +76,7 @@ export var Switch = /*#__PURE__*/forwardRef(function (_ref, ref) {
76
76
  role: "switch",
77
77
  ref: ref
78
78
  })), /*#__PURE__*/_jsx("div", {
79
- className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["switch focusable-sibling"])))
79
+ className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["switch focusable-visible-sibling"])))
80
80
  })]
81
81
  });
82
82
  });
@@ -2,17 +2,25 @@
2
2
  import type { TextAreaProps } from "../../Fields/TextArea";
3
3
  export declare type TextAreaAutoSizeProps = TextAreaProps & {
4
4
  /**
5
- * The maximum number of rows the `TextArea` can expand to when `autoResize` is enabled.
6
- * If set to 0, the `TextArea` will expand indefinitely.
5
+ * The maximum number of rows the `TextAreaAutoSize` can expand to when `autoResize` is enabled.
6
+ * If set to 0, the `TextAreaAutoSize` will expand indefinitely.
7
7
  * @default 0
8
8
  */
9
9
  maxRows?: number;
10
+ /**
11
+ * The number of rows the `TextAreaAutoSize` should start with.
12
+ */
13
+ rows?: number;
10
14
  };
11
15
  export declare const TextAreaAutoSize: import("react").ForwardRefExoticComponent<TextAreaProps & {
12
16
  /**
13
- * The maximum number of rows the `TextArea` can expand to when `autoResize` is enabled.
14
- * If set to 0, the `TextArea` will expand indefinitely.
17
+ * The maximum number of rows the `TextAreaAutoSize` can expand to when `autoResize` is enabled.
18
+ * If set to 0, the `TextAreaAutoSize` will expand indefinitely.
15
19
  * @default 0
16
20
  */
17
21
  maxRows?: number | undefined;
22
+ /**
23
+ * The number of rows the `TextAreaAutoSize` should start with.
24
+ */
25
+ rows?: number | undefined;
18
26
  } & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -13,6 +13,12 @@ export declare const textAreaAutoSizeStyles: import("tailwind-variants").TVRetur
13
13
  } | {}, {
14
14
  base: string;
15
15
  }, undefined, {
16
+ responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
17
+ } & import("tailwind-variants/dist/config").TWMConfig & {
18
+ twMergeConfig: {
19
+ prefix: string;
20
+ };
21
+ }, {
16
22
  [key: string]: {
17
23
  [key: string]: import("tailwind-merge").ClassNameValue | {
18
24
  base?: import("tailwind-merge").ClassNameValue;
@@ -22,4 +28,10 @@ export declare const textAreaAutoSizeStyles: import("tailwind-variants").TVRetur
22
28
  base: string;
23
29
  }, import("tailwind-variants").TVReturnType<unknown, {
24
30
  base: string;
25
- }, undefined, unknown, unknown, undefined>>;
31
+ }, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
32
+ [key: string]: {
33
+ [key: string]: import("tailwind-merge").ClassNameValue | {
34
+ base?: import("tailwind-merge").ClassNameValue;
35
+ };
36
+ };
37
+ } | {}>, unknown, unknown, undefined>>;
@@ -11,6 +11,7 @@ export * from "./Input";
11
11
  export * from "./RadioGroup";
12
12
  export * from "./RangeSlider";
13
13
  export * from "./Select";
14
+ export * from "./SelectableCard";
14
15
  export * from "./Switch";
15
16
  export * from "./TextArea";
16
17
  export * from "./TextAreaAutoSize";
@@ -11,6 +11,7 @@ export * from "./Input";
11
11
  export * from "./RadioGroup";
12
12
  export * from "./RangeSlider";
13
13
  export * from "./Select";
14
+ export * from "./SelectableCard";
14
15
  export * from "./Switch";
15
16
  export * from "./TextArea";
16
17
  export * from "./TextAreaAutoSize";
@@ -0,0 +1,15 @@
1
+ import type { FC } from "react";
2
+ export interface MarkdownContentProps {
3
+ /**
4
+ * Additional classes to apply to the `MarkdownContent`.
5
+ */
6
+ className?: string;
7
+ /**
8
+ * The content of the `MarkdownContent`.
9
+ */
10
+ content?: string;
11
+ }
12
+ /**
13
+ * The `MarkdownContent` component is used to style user generated content that comes as Markdown.
14
+ */
15
+ export declare const MarkdownContent: FC<MarkdownContentProps>;
@@ -0,0 +1,22 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import cx from "clsx";
4
+ import { marked } from "marked";
5
+ import stl from "./../../styles/helpers/satellitePrefixer";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * The `MarkdownContent` component is used to style user generated content that comes as Markdown.
9
+ */
10
+ export var MarkdownContent = function MarkdownContent(_ref) {
11
+ var className = _ref.className,
12
+ content = _ref.content;
13
+ if (!content) {
14
+ return null;
15
+ }
16
+ return /*#__PURE__*/_jsx("div", {
17
+ className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["markdown-content"]))), className),
18
+ dangerouslySetInnerHTML: {
19
+ __html: marked.parse(content)
20
+ }
21
+ });
22
+ };
@@ -0,0 +1,5 @@
1
+ declare const _exports: {
2
+ handler: import("tailwindcss/types/config").PluginCreator;
3
+ config?: Partial<import("tailwindcss/types/config").Config> | undefined;
4
+ };
5
+ export = _exports;
@@ -0,0 +1,138 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ 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; }
3
+ 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; }
4
+ import _rgba from "../../styles/rgba";
5
+ import _require2 from "../../styles/helpers/icons";
6
+ import _plugin from "tailwindcss/plugin";
7
+ // @ts-check
8
+ var plugin = _plugin;
9
+ var _require = _require2,
10
+ toBG = _require.toBG;
11
+ var rgba = _rgba;
12
+ export default plugin(function (_ref) {
13
+ var addComponents = _ref.addComponents,
14
+ theme = _ref.theme;
15
+ /** @type {any} */
16
+ var desktop = theme("stlTypography.desktop", {});
17
+ /** @type {any} */
18
+ var mobile = theme("stlTypography.mobile", {});
19
+ addComponents({
20
+ ".markdown-content": {
21
+ "h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, table": {
22
+ "&:not(:first-child)": {
23
+ marginTop: theme("spacing.3")
24
+ },
25
+ "&:not(:last-child)": {
26
+ marginBottom: theme("spacing.2")
27
+ }
28
+ },
29
+ h1: desktop["display-medium"],
30
+ h2: desktop["display-small"],
31
+ h3: _objectSpread(_objectSpread({}, desktop["display-body"]), {}, {
32
+ fontWeight: theme("fontWeight.semibold")
33
+ }),
34
+ "h4, h5, h6": _objectSpread(_objectSpread({}, desktop["display-body"]), {}, {
35
+ fontWeight: theme("fontWeight.medium")
36
+ }),
37
+ "p, ul, ol, blockquote, table": _objectSpread(_objectSpread({}, mobile["display-body"]), {}, {
38
+ fontSize: theme("fontSize.base")
39
+ }),
40
+ code: {
41
+ display: "inline-block",
42
+ padding: "0 ".concat(theme("spacing.1")),
43
+ backgroundColor: theme("colors.grey.100"),
44
+ color: theme("colors.grey.700"),
45
+ fontFamily: theme("fontFamily.mono"),
46
+ fontSize: theme("fontSize.base")
47
+ },
48
+ ul: {
49
+ paddingLeft: theme("spacing.5"),
50
+ listStyleType: "disc"
51
+ },
52
+ ol: {
53
+ paddingLeft: theme("spacing.5"),
54
+ listStyleType: "decimal"
55
+ },
56
+ a: {
57
+ color: theme("colors.accent.600"),
58
+ "&:hover": {
59
+ textDecoration: "underline"
60
+ },
61
+ '&[target="_blank"], &[href^="http"]': {
62
+ position: "relative",
63
+ display: "inline-flex",
64
+ alignItems: "center",
65
+ whiteSpace: "nowrap",
66
+ "&:after": {
67
+ content: "''",
68
+ background: toBG("ExternalLink", {
69
+ stroke: theme("colors.accent.600"),
70
+ viewBox: "0 0 24 24",
71
+ width: "100%",
72
+ height: "100%"
73
+ }),
74
+ backgroundRepeat: "no-repeat",
75
+ width: "1em",
76
+ height: "1em",
77
+ marginLeft: theme("spacing.1")
78
+ }
79
+ }
80
+ },
81
+ blockquote: {
82
+ paddingLeft: theme("spacing.4"),
83
+ borderLeft: "2px solid ".concat(theme("colors.grey.200")),
84
+ color: theme("colors.grey.600")
85
+ },
86
+ pre: _objectSpread(_objectSpread({}, mobile["display-code"]), {}, {
87
+ overflow: "auto",
88
+ maxWidth: "100%",
89
+ maxHeight: theme("spacing.64"),
90
+ margin: "".concat(theme("spacing.2"), " 0"),
91
+ padding: "".concat(theme("spacing.2"), " ").concat(theme("spacing.4")),
92
+ borderRadius: theme("borderRadius.DEFAULT"),
93
+ backgroundColor: theme("colors.grey.100"),
94
+ color: theme("colors.grey.700"),
95
+ code: {
96
+ display: "inline",
97
+ backgroundColor: "transparent",
98
+ color: "inherit"
99
+ }
100
+ }),
101
+ img: {
102
+ display: "block",
103
+ maxWidth: "100%",
104
+ height: "auto",
105
+ margin: "auto"
106
+ },
107
+ hr: {
108
+ borderWidth: "0 0 1px 0",
109
+ borderStyle: "solid",
110
+ borderColor: theme("colors.grey.200"),
111
+ marginTop: theme("spacing.6"),
112
+ marginBottom: theme("spacing.6")
113
+ },
114
+ "b, strong, th": {
115
+ fontWeight: "600"
116
+ },
117
+ table: {
118
+ width: "100%",
119
+ borderCollapse: "collapse",
120
+ textAlign: "left",
121
+ "th, td": {
122
+ padding: "8px 12px",
123
+ fontSize: theme("fontSize.base")
124
+ },
125
+ th: {
126
+ borderBottom: "1px solid ".concat(theme("colors.grey.200")),
127
+ fontWeight: "normal"
128
+ },
129
+ "tr:not(:last-child) td": {
130
+ borderBottom: "1px solid ".concat(theme("colors.grey.100"))
131
+ },
132
+ "tr:hover td": {
133
+ backgroundColor: rgba(theme("colors.grey.100"), 0.6)
134
+ }
135
+ }
136
+ }
137
+ });
138
+ });
@@ -0,0 +1 @@
1
+ export * from "./MarkdownContent";
@@ -0,0 +1 @@
1
+ export * from "./MarkdownContent";
@@ -13,7 +13,7 @@ var shimmerTextPlugin = plugin(function (_ref) {
13
13
  "animation-duration": "3s",
14
14
  "animation-iteration-count": "infinite",
15
15
  "animation-name": "shimmer-text",
16
- background: "".concat(theme("colors.grey.900"), " linear-gradient(to right, ").concat(theme("colors.grey.900"), " 0%, #ffffffbf 40%, #ffffffbf 60%, ").concat(theme("colors.grey.900"), " 100%)"),
16
+ background: "".concat(theme("colors.grey.600"), " linear-gradient(to right, ").concat(theme("colors.grey.600"), " 0%, #ffffffbf 40%, #ffffffbf 60%, ").concat(theme("colors.grey.600"), " 100%)"),
17
17
  "-webkit-background-clip": "text",
18
18
  "background-clip": "text",
19
19
  "background-repeat": "no-repeat",
@@ -4,3 +4,4 @@ export * from "./HelpUnderline";
4
4
  export * from "./TextWrap";
5
5
  export * from "./UserContent";
6
6
  export * from "./ShimmerText";
7
+ export * from "./MarkdownContent";
@@ -3,4 +3,5 @@ export * from "./CodeEditor";
3
3
  export * from "./HelpUnderline";
4
4
  export * from "./TextWrap";
5
5
  export * from "./UserContent";
6
- export * from "./ShimmerText";
6
+ export * from "./ShimmerText";
7
+ export * from "./MarkdownContent";
@@ -5,7 +5,7 @@ var plugin = _plugin;
5
5
  export default plugin(function (_ref) {
6
6
  var addComponents = _ref.addComponents,
7
7
  theme = _ref.theme;
8
- addComponents(_defineProperty({}, ".focusable:focus,\n .focusable-within:focus-within,\n .focusable-visible:focus-visible,\n .focusable-visible-within:has(:focus-visible),\n input:focus ~ .focusable-sibling,\n .focusable-visible-group:focus-visible .focusable-visible-group-item,\n .focusable-show", {
8
+ addComponents(_defineProperty({}, ".focusable:focus,\n .focusable-within:focus-within,\n .focusable-visible:focus-visible,\n .focusable-visible-within:has(:focus-visible),\n input:focus ~ .focusable-sibling,\n input:focus-visible ~ .focusable-visible-sibling,\n .focusable-visible-group:focus-visible .focusable-visible-group-item,\n .focusable-show", {
9
9
  outline: "2px solid ".concat(theme("colors.accent.600")),
10
10
  outlineOffset: "1px"
11
11
  }));
@@ -1,5 +1,4 @@
1
1
  export * from "./Card";
2
- export * from "./Chat";
3
2
  export * from "./CollapsibleCard";
4
3
  export * from "./FlexGrid";
5
4
  export * from "./Insert";
@@ -1,5 +1,4 @@
1
1
  export * from "./Card";
2
- export * from "./Chat";
3
2
  export * from "./CollapsibleCard";
4
3
  export * from "./FlexGrid";
5
4
  export * from "./Insert";
@@ -13,6 +13,11 @@ export declare type LinkProps = {
13
13
  * The icon to display at the end of the link.
14
14
  */
15
15
  endIcon?: IconComponentType;
16
+ /**
17
+ * To determine if the `ExternalLink` icon should be displayed.
18
+ * @default true
19
+ */
20
+ withExternalLinkIcon?: boolean;
16
21
  } & AnchorHTMLAttributes<HTMLAnchorElement>;
17
22
  /**
18
23
  * The `Link` component is used to display a link.
@@ -32,4 +37,9 @@ export declare const Link: import("react").ForwardRefExoticComponent<{
32
37
  * The icon to display at the end of the link.
33
38
  */
34
39
  endIcon?: IconComponentType | undefined;
40
+ /**
41
+ * To determine if the `ExternalLink` icon should be displayed.
42
+ * @default true
43
+ */
44
+ withExternalLinkIcon?: boolean | undefined;
35
45
  } & AnchorHTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _templateObject, _templateObject2, _templateObject3;
5
- var _excluded = ["className", "children", "startIcon", "endIcon", "href", "onClick"];
5
+ var _excluded = ["className", "children", "startIcon", "endIcon", "withExternalLinkIcon", "href", "onClick"];
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";
@@ -21,6 +21,8 @@ export var Link = /*#__PURE__*/forwardRef(function (_ref, ref) {
21
21
  children = _ref.children,
22
22
  StartIcon = _ref.startIcon,
23
23
  EndIcon = _ref.endIcon,
24
+ _ref$withExternalLink = _ref.withExternalLinkIcon,
25
+ withExternalLinkIcon = _ref$withExternalLink === void 0 ? true : _ref$withExternalLink,
24
26
  href = _ref.href,
25
27
  onClick = _ref.onClick,
26
28
  anchorProps = _objectWithoutProperties(_ref, _excluded);
@@ -29,7 +31,7 @@ export var Link = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
31
  onClick: onClick
30
32
  }));
31
33
  var isExternalLink = linkProps.target === "_blank" && EndIcon === undefined;
32
- if (isExternalLink) {
34
+ if (isExternalLink && withExternalLinkIcon) {
33
35
  EndIcon = ExternalLinkIcon;
34
36
  }
35
37
  return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread(_objectSpread({}, anchorProps), linkProps), {}, {
@@ -1,11 +1,11 @@
1
1
  import type { IconButtonWithFeedbackLocale } from "../Actions";
2
+ import type { ChatMessageErrorLocale } from "../Chat/ChatMessageError";
3
+ import type { ChatMessageLocale } from "../Chat/ChatMessages";
4
+ import type { ChatPromptLocale } from "../Chat/ChatPrompt";
2
5
  import type { AutoCompleteLocale, DateInputLocale, DatePickerLocale, DropzoneLocale, ExperimentalDateRangeInputLocale, ExperimentalFormLocale, FilePickerLocale, InputPropsLocale } from "../Fields";
3
6
  import type { AnnouncementBadgeLocale, TagLocale, ToastLocale, ToastsLocale } from "../Indicators";
4
7
  import type { UserAvatarLocale } from "../Indicators/Avatars";
5
8
  import type { DataTableLocale, SidebarLocale } from "../Layout";
6
- import type { ChatMessageErrorLocale } from "../Layout/Chat/ChatMessageError";
7
- import type { ChatMessageLocale } from "../Layout/Chat/ChatMessages";
8
- import type { ChatPromptLocale } from "../Layout/Chat/ChatPrompt";
9
9
  import type { CompactPaginationLocale, DotPaginationLocale, PaginationLocale, StepperLocale } from "../Navigation";
10
10
  import type { ModalLocale, PopoverLocale } from "../Overlay";
11
11
  export declare type ComponentsLocales = {
@@ -7,6 +7,7 @@ export * from "./utils/NumberUnion";
7
7
  export * from "./utils/parseUrl";
8
8
  export * from "./utils/useLinkProps";
9
9
  export * from "./Actions";
10
+ export * from "./Chat";
10
11
  export * from "./Fields";
11
12
  export * from "./Helpers";
12
13
  export * from "./Icons";
package/dist/esm/index.js CHANGED
@@ -7,6 +7,7 @@ export * from "./utils/NumberUnion";
7
7
  export * from "./utils/parseUrl";
8
8
  export * from "./utils/useLinkProps";
9
9
  export * from "./Actions";
10
+ export * from "./Chat";
10
11
  export * from "./Fields";
11
12
  export * from "./Helpers";
12
13
  export * from "./Icons";