@algolia/satellite 2.3.0-rc.5 → 2.3.0-rc.8

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 (160) hide show
  1. package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
  2. package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
  3. package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +23 -4
  4. package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
  5. package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
  6. package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
  7. package/dist/{esm/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → cjs/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
  8. package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +12 -12
  9. package/dist/{esm/Layout → cjs}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
  10. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +8 -3
  11. package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
  12. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
  13. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
  14. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
  15. package/dist/{esm/Layout → cjs}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
  16. package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +2 -2
  17. package/dist/cjs/Chat/ChatMessages/ChatMessages.d.ts +141 -0
  18. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +18 -7
  19. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
  20. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
  21. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.d.ts +7 -1
  22. package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +6 -0
  23. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.d.ts +16 -2
  24. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +32 -20
  25. package/dist/cjs/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
  26. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +10 -3
  27. package/dist/cjs/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
  28. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useFocusTyping.js +19 -14
  29. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
  30. package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
  31. package/dist/cjs/Fields/Checkbox/Checkbox.d.ts +2 -2
  32. package/dist/cjs/Fields/Checkbox/Checkbox.js +2 -2
  33. package/dist/cjs/Fields/Dropzone/Dropzone.js +1 -1
  34. package/dist/cjs/Fields/Form/stories/Complex.js +123 -50
  35. package/dist/cjs/Fields/RadioGroup/RadioButton.js +9 -2
  36. package/dist/cjs/Fields/RadioGroup/RadioButton.tailwind.js +1 -1
  37. package/dist/cjs/Fields/RadioGroup/RadioGroupItem.js +1 -1
  38. package/dist/cjs/Fields/SelectableCard/SelectableCard.d.ts +35 -0
  39. package/dist/cjs/Fields/SelectableCard/SelectableCard.js +105 -0
  40. package/dist/cjs/Fields/SelectableCard/SelectableCardContext.d.ts +13 -0
  41. package/dist/cjs/Fields/SelectableCard/SelectableCardContext.js +15 -0
  42. package/dist/cjs/Fields/SelectableCard/SelectableCardGroup.d.ts +13 -0
  43. package/dist/cjs/Fields/SelectableCard/SelectableCardGroup.js +55 -0
  44. package/dist/cjs/Fields/SelectableCard/index.d.ts +2 -0
  45. package/dist/cjs/Fields/SelectableCard/index.js +27 -0
  46. package/dist/cjs/Fields/Switch/Switch.js +1 -1
  47. package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
  48. package/dist/cjs/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
  49. package/dist/cjs/Fields/index.d.ts +1 -0
  50. package/dist/cjs/Fields/index.js +11 -0
  51. package/dist/cjs/Helpers/utilities/focusable.tailwind.js +1 -1
  52. package/dist/cjs/Layout/index.d.ts +0 -1
  53. package/dist/cjs/Layout/index.js +0 -11
  54. package/dist/cjs/Satellite/locale.d.ts +3 -3
  55. package/dist/cjs/index.d.ts +1 -0
  56. package/dist/cjs/index.js +12 -0
  57. package/dist/cjs/styles/helpers/tv.d.ts +5 -1
  58. package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
  59. package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +23 -0
  60. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.js +9 -2
  61. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.d.ts +23 -4
  62. package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/ChatContextAccordion.styles.js +3 -3
  63. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.d.ts +80 -3
  64. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.js +14 -5
  65. package/dist/{cjs/Layout/Chat/ChatMessageError/ChatMessageError.styles.d.ts → esm/Chat/ChatMessage/ChatMessage.styles.d.ts} +34 -40
  66. package/dist/esm/{Layout/Chat → Chat}/ChatMessage/ChatMessage.styles.js +12 -12
  67. package/dist/{cjs/Layout → esm}/Chat/ChatMessageError/ChatMessageError.d.ts +7 -2
  68. package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.js +8 -3
  69. package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +253 -0
  70. package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/ChatMessageError.styles.js +2 -2
  71. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.d.ts +6 -3
  72. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.js +9 -4
  73. package/dist/{cjs/Layout → esm}/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +89 -9
  74. package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/ChatMessageLoader.styles.js +2 -2
  75. package/dist/esm/Chat/ChatMessages/ChatMessages.d.ts +141 -0
  76. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.js +18 -7
  77. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.d.ts +27 -1
  78. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/ChatMessages.styles.js +2 -2
  79. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.d.ts +7 -1
  80. package/dist/esm/{Layout/Chat → Chat}/ChatMessages/useLastMessageHeight.js +6 -0
  81. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.d.ts +16 -2
  82. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.js +33 -20
  83. package/dist/esm/Chat/ChatPrompt/ChatPrompt.styles.d.ts +63 -0
  84. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/ChatPrompt.styles.js +10 -3
  85. package/dist/esm/Chat/ChatPrompt/useFocusTyping.d.ts +30 -0
  86. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useFocusTyping.js +19 -14
  87. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.d.ts +9 -0
  88. package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/useTypewriter.js +9 -0
  89. package/dist/esm/Fields/Checkbox/Checkbox.d.ts +2 -2
  90. package/dist/esm/Fields/Checkbox/Checkbox.js +2 -2
  91. package/dist/esm/Fields/Dropzone/Dropzone.js +1 -1
  92. package/dist/esm/Fields/Form/stories/Complex.js +123 -50
  93. package/dist/esm/Fields/RadioGroup/RadioButton.js +10 -3
  94. package/dist/esm/Fields/RadioGroup/RadioButton.tailwind.js +1 -1
  95. package/dist/esm/Fields/RadioGroup/RadioGroupItem.js +1 -1
  96. package/dist/esm/Fields/SelectableCard/SelectableCard.d.ts +35 -0
  97. package/dist/esm/Fields/SelectableCard/SelectableCard.js +100 -0
  98. package/dist/esm/Fields/SelectableCard/SelectableCardContext.d.ts +13 -0
  99. package/dist/esm/Fields/SelectableCard/SelectableCardContext.js +9 -0
  100. package/dist/esm/Fields/SelectableCard/SelectableCardGroup.d.ts +13 -0
  101. package/dist/esm/Fields/SelectableCard/SelectableCardGroup.js +48 -0
  102. package/dist/esm/Fields/SelectableCard/index.d.ts +2 -0
  103. package/dist/esm/Fields/SelectableCard/index.js +2 -0
  104. package/dist/esm/Fields/Switch/Switch.js +1 -1
  105. package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.d.ts +12 -4
  106. package/dist/esm/Fields/TextAreaAutoSize/TextAreaAutoSize.styles.d.ts +13 -1
  107. package/dist/esm/Fields/index.d.ts +1 -0
  108. package/dist/esm/Fields/index.js +1 -0
  109. package/dist/esm/Helpers/utilities/focusable.tailwind.js +1 -1
  110. package/dist/esm/Layout/index.d.ts +0 -1
  111. package/dist/esm/Layout/index.js +0 -1
  112. package/dist/esm/Satellite/locale.d.ts +3 -3
  113. package/dist/esm/index.d.ts +1 -0
  114. package/dist/esm/index.js +1 -0
  115. package/dist/esm/styles/helpers/tv.d.ts +5 -1
  116. package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
  117. package/dist/satellite.min.css +1 -1
  118. package/package.json +3 -3
  119. package/dist/cjs/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
  120. package/dist/cjs/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
  121. package/dist/cjs/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -44
  122. package/dist/cjs/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
  123. package/dist/cjs/Layout/Chat/ChatPrompt/useFocusTyping.d.ts +0 -12
  124. package/dist/esm/Layout/Chat/ChatContextAccordion/ChatContextAccordion.d.ts +0 -8
  125. package/dist/esm/Layout/Chat/ChatMessage/ChatMessage.styles.d.ts +0 -100
  126. package/dist/esm/Layout/Chat/ChatMessages/ChatMessages.d.ts +0 -44
  127. package/dist/esm/Layout/Chat/ChatPrompt/ChatPrompt.styles.d.ts +0 -61
  128. package/dist/esm/Layout/Chat/ChatPrompt/useFocusTyping.d.ts +0 -12
  129. /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
  130. /package/dist/cjs/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
  131. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
  132. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
  133. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
  134. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
  135. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
  136. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
  137. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
  138. /package/dist/cjs/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
  139. /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
  140. /package/dist/cjs/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
  141. /package/dist/cjs/{Layout/Chat → Chat}/index.d.ts +0 -0
  142. /package/dist/cjs/{Layout/Chat → Chat}/index.js +0 -0
  143. /package/dist/cjs/{Layout/Chat → Chat}/types.d.ts +0 -0
  144. /package/dist/cjs/{Layout/Chat → Chat}/types.js +0 -0
  145. /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.d.ts +0 -0
  146. /package/dist/esm/{Layout/Chat → Chat}/ChatContextAccordion/index.js +0 -0
  147. /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.d.ts +0 -0
  148. /package/dist/esm/{Layout/Chat → Chat}/ChatMessage/index.js +0 -0
  149. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.d.ts +0 -0
  150. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageError/index.js +0 -0
  151. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.d.ts +0 -0
  152. /package/dist/esm/{Layout/Chat → Chat}/ChatMessageLoader/index.js +0 -0
  153. /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.d.ts +0 -0
  154. /package/dist/esm/{Layout/Chat → Chat}/ChatMessages/index.js +0 -0
  155. /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.d.ts +0 -0
  156. /package/dist/esm/{Layout/Chat → Chat}/ChatPrompt/index.js +0 -0
  157. /package/dist/esm/{Layout/Chat → Chat}/index.d.ts +0 -0
  158. /package/dist/esm/{Layout/Chat → Chat}/index.js +0 -0
  159. /package/dist/esm/{Layout/Chat → Chat}/types.d.ts +0 -0
  160. /package/dist/esm/{Layout/Chat → Chat}/types.js +0 -0
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.SelectableCard = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
12
+ var _clsx = _interopRequireDefault(require("clsx"));
13
+ var _react = require("react");
14
+ var _ = require("..");
15
+ var _Layout = require("../../Layout");
16
+ var _satellitePrefixer = _interopRequireDefault(require("../../styles/helpers/satellitePrefixer"));
17
+ var _SelectableCardContext = require("./SelectableCardContext");
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+ var _excluded = ["value", "selectedColor", "children", "id", "className"];
20
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18; // We need to omit the `elevation` prop because we handle it ourselves.
21
+ 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; }
22
+ 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) { (0, _defineProperty2["default"])(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; }
23
+ var SELECTED_COLOR_CLASSNAMES = {
24
+ grey: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["border-grey-600"]))),
25
+ pink: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["border-pink-600"]))),
26
+ accent: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["border-accent-600"]))),
27
+ blue: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["border-blue-600"]))),
28
+ green: (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["border-green-600"]))),
29
+ orange: (0, _satellitePrefixer["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["border-orange-600"]))),
30
+ red: (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["border-red-600"]))),
31
+ xenon: (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["border-xenon-600"])))
32
+ };
33
+ var SelectableCard = exports.SelectableCard = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
34
+ var value = _ref.value,
35
+ _ref$selectedColor = _ref.selectedColor,
36
+ selectedColor = _ref$selectedColor === void 0 ? "xenon" : _ref$selectedColor,
37
+ children = _ref.children,
38
+ id = _ref.id,
39
+ className = _ref.className,
40
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
41
+ var _useSelectableCardCon = (0, _SelectableCardContext.useSelectableCardContext)(),
42
+ name = _useSelectableCardCon.name,
43
+ isControlled = _useSelectableCardCon.isControlled,
44
+ setValue = _useSelectableCardCon.setValue,
45
+ onValueChange = _useSelectableCardCon.onValueChange,
46
+ type = _useSelectableCardCon.type,
47
+ valueContext = _useSelectableCardCon.value,
48
+ disabledContext = _useSelectableCardCon.disabled;
49
+ var disabled = props.disabled || disabledContext;
50
+ var selected = valueContext === null || valueContext === void 0 ? void 0 : valueContext.includes(value);
51
+ var _useField = (0, _.useField)(),
52
+ status = _useField.state.status;
53
+ var isInvalid = status === "invalid";
54
+ var handleCheckboxChange = function handleCheckboxChange(evt) {
55
+ var _valueContext$filter;
56
+ var newValue = selected ? (_valueContext$filter = valueContext === null || valueContext === void 0 ? void 0 : valueContext.filter(function (v) {
57
+ return v !== value;
58
+ })) !== null && _valueContext$filter !== void 0 ? _valueContext$filter : [] : [].concat((0, _toConsumableArray2["default"])(valueContext !== null && valueContext !== void 0 ? valueContext : []), [value]);
59
+ if (!isControlled && !evt.isDefaultPrevented()) {
60
+ setValue(newValue);
61
+ }
62
+ onValueChange === null || onValueChange === void 0 || onValueChange(newValue);
63
+ };
64
+ var handleRadioButtonChange = function handleRadioButtonChange(evt) {
65
+ var newValue = [evt.target.value];
66
+ if (!isControlled && !evt.isDefaultPrevented()) {
67
+ setValue(newValue);
68
+ }
69
+ onValueChange === null || onValueChange === void 0 || onValueChange(newValue);
70
+ };
71
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Card, _objectSpread(_objectSpread({
72
+ ref: ref,
73
+ fullBleed: true,
74
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["relative border transition-[shadow,border]"]))), !disabled && !selected && !isInvalid && (0, _satellitePrefixer["default"])(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["border-transparent"]))),
75
+ // Disabled
76
+ disabled && (0, _satellitePrefixer["default"])(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100 border-grey-200 text-grey-300 shadow-none cursor-not-allowed [&>*]:text-grey-300"]))),
77
+ // Selected
78
+ selected && (0, _satellitePrefixer["default"])(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["card-z200"]))), !disabled && selected && !isInvalid && SELECTED_COLOR_CLASSNAMES[selectedColor],
79
+ // Hovered
80
+ !disabled && !selected && !isInvalid && (0, _satellitePrefixer["default"])(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["hover:border-grey-200"]))), // Focused
81
+ (0, _satellitePrefixer["default"])(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["focusable-visible-within"]))), !selected && (0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["focus-within:border-grey-200"]))),
82
+ // Invalid
83
+ isInvalid && (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["border-red-700 shadow-none"]))),
84
+ // Custom
85
+ className)
86
+ }, props), {}, {
87
+ children: [type === "multiple" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Checkbox, {
88
+ id: id,
89
+ disabled: disabled,
90
+ checked: selected,
91
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["absolute right-4 top-4 z-10"])))),
92
+ onChange: handleCheckboxChange,
93
+ name: name
94
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_.RadioButton, {
95
+ id: id,
96
+ disabled: disabled,
97
+ checked: selected,
98
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["absolute right-4 top-4 z-10"])))),
99
+ onChange: handleRadioButtonChange,
100
+ value: value,
101
+ name: name
102
+ }), children]
103
+ }));
104
+ });
105
+ 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,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useSelectableCardContext = exports.SelectableCardContext = void 0;
7
+ var _react = require("react");
8
+ var SelectableCardContext = exports.SelectableCardContext = /*#__PURE__*/(0, _react.createContext)(null);
9
+ var useSelectableCardContext = exports.useSelectableCardContext = function useSelectableCardContext() {
10
+ var context = (0, _react.useContext)(SelectableCardContext);
11
+ if (!context) {
12
+ throw new Error("useSelectableCardContext used outside SelectableCardContext");
13
+ }
14
+ return context;
15
+ };
@@ -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,55 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.SelectableCardGroup = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _react = require("react");
10
+ var _ = require("..");
11
+ var _SelectableCardContext = require("./SelectableCardContext");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ var SelectableCardGroup = exports.SelectableCardGroup = function SelectableCardGroup(_ref) {
14
+ var _ref2;
15
+ var children = _ref.children,
16
+ disabled = _ref.disabled,
17
+ name = _ref.name,
18
+ controlledValue = _ref.value,
19
+ defaultValue = _ref.defaultValue,
20
+ type = _ref.type,
21
+ onValueChange = _ref.onValueChange,
22
+ className = _ref.className,
23
+ required = _ref.required;
24
+ var isControlled = controlledValue !== undefined;
25
+ var _useState = (0, _react.useState)((_ref2 = controlledValue !== null && controlledValue !== void 0 ? controlledValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : []),
26
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
27
+ internalValue = _useState2[0],
28
+ setInternalValue = _useState2[1];
29
+ var value = isControlled ? controlledValue : internalValue;
30
+ var _useField = (0, _.useField)({
31
+ required: required
32
+ }),
33
+ status = _useField.state.status,
34
+ labelId = _useField.labelId,
35
+ descriptionId = _useField.descriptionId;
36
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectableCardContext.SelectableCardContext.Provider, {
37
+ value: {
38
+ value: value,
39
+ setValue: setInternalValue,
40
+ isControlled: isControlled,
41
+ name: name,
42
+ disabled: disabled,
43
+ onValueChange: onValueChange,
44
+ type: type
45
+ },
46
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
47
+ role: type === "single" ? "radiogroup" : "group",
48
+ "aria-invalid": status === "invalid",
49
+ "aria-labelledby": labelId,
50
+ "aria-describedby": descriptionId,
51
+ className: className,
52
+ children: children
53
+ })
54
+ });
55
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./SelectableCard";
2
+ export * from "./SelectableCardGroup";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _SelectableCard = require("./SelectableCard");
7
+ Object.keys(_SelectableCard).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _SelectableCard[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _SelectableCard[key];
14
+ }
15
+ });
16
+ });
17
+ var _SelectableCardGroup = require("./SelectableCardGroup");
18
+ Object.keys(_SelectableCardGroup).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _SelectableCardGroup[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _SelectableCardGroup[key];
25
+ }
26
+ });
27
+ });
@@ -83,7 +83,7 @@ var Switch = exports.Switch = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
83
83
  role: "switch",
84
84
  ref: ref
85
85
  })), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
86
- className: (0, _satellitePrefixer["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["switch focusable-sibling"])))
86
+ className: (0, _satellitePrefixer["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["switch focusable-visible-sibling"])))
87
87
  })]
88
88
  });
89
89
  });
@@ -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";
@@ -146,6 +146,17 @@ Object.keys(_Select).forEach(function (key) {
146
146
  }
147
147
  });
148
148
  });
149
+ var _SelectableCard = require("./SelectableCard");
150
+ Object.keys(_SelectableCard).forEach(function (key) {
151
+ if (key === "default" || key === "__esModule") return;
152
+ if (key in exports && exports[key] === _SelectableCard[key]) return;
153
+ Object.defineProperty(exports, key, {
154
+ enumerable: true,
155
+ get: function get() {
156
+ return _SelectableCard[key];
157
+ }
158
+ });
159
+ });
149
160
  var _Switch = require("./Switch");
150
161
  Object.keys(_Switch).forEach(function (key) {
151
162
  if (key === "default" || key === "__esModule") return;
@@ -7,7 +7,7 @@ var plugin = require("tailwindcss/plugin");
7
7
  module.exports = plugin(function (_ref) {
8
8
  var addComponents = _ref.addComponents,
9
9
  theme = _ref.theme;
10
- addComponents((0, _defineProperty2["default"])({}, ".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", {
10
+ addComponents((0, _defineProperty2["default"])({}, ".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", {
11
11
  outline: "2px solid ".concat(theme("colors.accent.600")),
12
12
  outlineOffset: "1px"
13
13
  }));
@@ -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";
@@ -14,17 +14,6 @@ Object.keys(_Card).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
- var _Chat = require("./Chat");
18
- Object.keys(_Chat).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _Chat[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function get() {
24
- return _Chat[key];
25
- }
26
- });
27
- });
28
17
  var _CollapsibleCard = require("./CollapsibleCard");
29
18
  Object.keys(_CollapsibleCard).forEach(function (key) {
30
19
  if (key === "default" || key === "__esModule") return;
@@ -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/cjs/index.js CHANGED
@@ -98,6 +98,18 @@ Object.keys(_Actions).forEach(function (key) {
98
98
  }
99
99
  });
100
100
  });
101
+ var _Chat = require("./Chat");
102
+ Object.keys(_Chat).forEach(function (key) {
103
+ if (key === "default" || key === "__esModule") return;
104
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
105
+ if (key in exports && exports[key] === _Chat[key]) return;
106
+ Object.defineProperty(exports, key, {
107
+ enumerable: true,
108
+ get: function get() {
109
+ return _Chat[key];
110
+ }
111
+ });
112
+ });
101
113
  var _Fields = require("./Fields");
102
114
  Object.keys(_Fields).forEach(function (key) {
103
115
  if (key === "default" || key === "__esModule") return;
@@ -1 +1,5 @@
1
- export declare const tv: import("tailwind-variants").CreateTV;
1
+ export declare const tv: import("tailwind-variants").CreateTV<{
2
+ twMergeConfig: {
3
+ prefix: string;
4
+ };
5
+ }>;
@@ -1 +1 @@
1
- export declare const isCssPropertySupported: <P extends number | typeof Symbol.iterator | "filter" | "fill" | "width" | "height" | "color" | "alignmentBaseline" | "baselineShift" | "clip" | "clipPath" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "direction" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "offset" | "opacity" | "order" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textDecoration" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "wordSpacing" | "writingMode" | "grid" | "marker" | "translate" | "content" | "item" | "all" | "border" | "left" | "right" | "columns" | "top" | "bottom" | "appearance" | "clear" | "flex" | "float" | "gap" | "hyphens" | "inset" | "isolation" | "perspective" | "position" | "resize" | "transition" | "font" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "emptyCells" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSynthesis" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "imageOrientation" | "inlineSize" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "justifyContent" | "justifyItems" | "justifySelf" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetDistance" | "offsetPath" | "offsetRotate" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "printColorAdjust" | "quotes" | "rowGap" | "rubyPosition" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "scrollbarGutter" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "userSelect" | "verticalAlign" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "widows" | "willChange" | "wordBreak" | "wordWrap" | "zIndex" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
1
+ export declare const isCssPropertySupported: <P extends number | typeof Symbol.iterator | "filter" | "fill" | "width" | "height" | "color" | "alignmentBaseline" | "baselineShift" | "clip" | "clipPath" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "direction" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "offset" | "opacity" | "order" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textDecoration" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "wordSpacing" | "writingMode" | "grid" | "marker" | "translate" | "content" | "item" | "all" | "border" | "left" | "right" | "columns" | "top" | "bottom" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "emptyCells" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "font" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSynthesis" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "gap" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hyphens" | "imageOrientation" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetDistance" | "offsetPath" | "offsetRotate" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "position" | "printColorAdjust" | "quotes" | "resize" | "rowGap" | "rubyPosition" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "scrollbarGutter" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transformBox" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "userSelect" | "verticalAlign" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "widows" | "willChange" | "wordBreak" | "wordWrap" | "zIndex" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
@@ -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
  }),
@@ -6,8 +6,8 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
6
6
  title?: import("tailwind-merge").ClassNameValue;
7
7
  content?: import("tailwind-merge").ClassNameValue;
8
8
  item?: import("tailwind-merge").ClassNameValue;
9
- iconBg?: import("tailwind-merge").ClassNameValue;
10
9
  trigger?: import("tailwind-merge").ClassNameValue;
10
+ iconBg?: import("tailwind-merge").ClassNameValue;
11
11
  titleWrapper?: import("tailwind-merge").ClassNameValue;
12
12
  };
13
13
  };
@@ -19,8 +19,8 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
19
19
  title?: import("tailwind-merge").ClassNameValue;
20
20
  content?: import("tailwind-merge").ClassNameValue;
21
21
  item?: import("tailwind-merge").ClassNameValue;
22
- iconBg?: import("tailwind-merge").ClassNameValue;
23
22
  trigger?: import("tailwind-merge").ClassNameValue;
23
+ iconBg?: import("tailwind-merge").ClassNameValue;
24
24
  titleWrapper?: import("tailwind-merge").ClassNameValue;
25
25
  };
26
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;
@@ -41,8 +47,8 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
41
47
  title?: import("tailwind-merge").ClassNameValue;
42
48
  content?: import("tailwind-merge").ClassNameValue;
43
49
  item?: import("tailwind-merge").ClassNameValue;
44
- iconBg?: import("tailwind-merge").ClassNameValue;
45
50
  trigger?: import("tailwind-merge").ClassNameValue;
51
+ iconBg?: import("tailwind-merge").ClassNameValue;
46
52
  titleWrapper?: import("tailwind-merge").ClassNameValue;
47
53
  };
48
54
  };
@@ -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
  });