@algolia/satellite 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Actions/Accordion/Accordion.d.ts +8 -0
- package/dist/cjs/Actions/Accordion/Accordion.js +104 -57
- package/dist/cjs/Actions/Accordion/Accordion.styles.d.ts +170 -0
- package/dist/cjs/Actions/Accordion/Accordion.styles.js +57 -0
- package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +4 -4
- package/dist/cjs/Chat/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/cjs/Chat/ChatMessage/ChatMessage.styles.d.ts +1 -1
- package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +2 -2
- package/dist/cjs/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +2 -2
- package/dist/cjs/Fields/TextArea/TextArea.tailwind.js +3 -3
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.d.ts +7 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.js +11 -5
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.js +2 -2
- package/dist/cjs/Helpers/UserContent/UserContent.tailwind.js +1 -3
- package/dist/cjs/Illustrations/index.d.ts +7 -0
- package/dist/cjs/Illustrations/index.js +1254 -0
- package/dist/cjs/Indicators/EmptyState/EmptyState.js +35 -2
- package/dist/cjs/Indicators/EmptyState/types.d.ts +4 -3
- package/dist/cjs/Overlay/Modal/components/ModalFooter.js +2 -7
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/types.d.ts +7 -0
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/Actions/Accordion/Accordion.d.ts +8 -0
- package/dist/esm/Actions/Accordion/Accordion.js +105 -58
- package/dist/esm/Actions/Accordion/Accordion.styles.d.ts +170 -0
- package/dist/esm/Actions/Accordion/Accordion.styles.js +50 -0
- package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +4 -4
- package/dist/esm/Chat/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/esm/Chat/ChatMessage/ChatMessage.styles.d.ts +1 -1
- package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +2 -2
- package/dist/esm/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +2 -2
- package/dist/esm/Fields/TextArea/TextArea.tailwind.js +3 -3
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.d.ts +7 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.js +11 -5
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.js +2 -2
- package/dist/esm/Helpers/UserContent/UserContent.tailwind.js +1 -3
- package/dist/esm/Illustrations/index.d.ts +7 -0
- package/dist/esm/Illustrations/index.js +1248 -0
- package/dist/esm/Indicators/EmptyState/EmptyState.js +35 -2
- package/dist/esm/Indicators/EmptyState/types.d.ts +4 -3
- package/dist/esm/Overlay/Modal/components/ModalFooter.js +2 -7
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/types.d.ts +7 -0
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +4 -5
@@ -1,6 +1,9 @@
|
|
1
1
|
import * as RadixAccordion from "@radix-ui/react-accordion";
|
2
2
|
import type { FC, ReactNode } from "react";
|
3
|
+
import type { VariantProps } from "tailwind-variants";
|
4
|
+
import { accordionStyles } from "./Accordion.styles";
|
3
5
|
import type { IconComponentType } from "../../Icons";
|
6
|
+
declare type AccordionVariants = VariantProps<typeof accordionStyles>;
|
4
7
|
declare type AccordionSharedProps = {
|
5
8
|
/**
|
6
9
|
* The content of the `Accordion`.
|
@@ -14,6 +17,11 @@ declare type AccordionSharedProps = {
|
|
14
17
|
* Whether the `Accordion` is disabled, preventing the user from interacting with the accordion and all its items.
|
15
18
|
*/
|
16
19
|
disabled?: boolean;
|
20
|
+
/**
|
21
|
+
* Display the Accordion in normal or a more compact style (no meta or description, smaller paddings).
|
22
|
+
* @default normal
|
23
|
+
*/
|
24
|
+
variant?: AccordionVariants["variant"];
|
17
25
|
};
|
18
26
|
declare type AccordionSingleProps = {
|
19
27
|
/**
|
@@ -7,25 +7,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
});
|
8
8
|
exports.Accordion = void 0;
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
11
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
12
11
|
var RadixAccordion = _interopRequireWildcard(require("@radix-ui/react-accordion"));
|
13
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
14
13
|
var _react = require("react");
|
14
|
+
var _Accordion = require("./Accordion.styles");
|
15
15
|
var _Icons = require("./../../Icons");
|
16
|
-
var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
18
|
-
var
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
var _excluded = ["children", "variant"],
|
18
|
+
_excluded2 = ["children", "className"],
|
19
|
+
_excluded3 = ["onChange", "multiple"],
|
20
|
+
_excluded4 = ["onChange", "multiple", "collapsible"];
|
22
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
23
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
24
23
|
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; }
|
25
24
|
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; }
|
26
|
-
var
|
27
|
-
|
28
|
-
|
25
|
+
var AccordionVariantContext = /*#__PURE__*/(0, _react.createContext)({
|
26
|
+
variant: "normal"
|
27
|
+
});
|
28
|
+
var useAccordionVariant = function useAccordionVariant() {
|
29
|
+
return (0, _react.useContext)(AccordionVariantContext);
|
30
|
+
};
|
29
31
|
/**
|
30
32
|
* The `Accordion` component is a compact section for revealing and hiding content, ideal for keeping interfaces clean.
|
31
33
|
*
|
@@ -33,15 +35,36 @@ var TRIGGER_ICON_SIZE = 20;
|
|
33
35
|
*/
|
34
36
|
var Accordion = exports.Accordion = function Accordion(_ref) {
|
35
37
|
var children = _ref.children,
|
36
|
-
|
38
|
+
_ref$variant = _ref.variant,
|
39
|
+
variant = _ref$variant === void 0 ? "normal" : _ref$variant,
|
37
40
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionVariantContext.Provider, {
|
42
|
+
value: {
|
43
|
+
variant: variant
|
44
|
+
},
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionRootInternal, _objectSpread(_objectSpread({}, props), {}, {
|
46
|
+
children: children
|
47
|
+
}))
|
48
|
+
});
|
49
|
+
};
|
50
|
+
var AccordionRootInternal = function AccordionRootInternal(_ref2) {
|
51
|
+
var children = _ref2.children,
|
52
|
+
className = _ref2.className,
|
53
|
+
props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
54
|
+
var _useAccordionVariant = useAccordionVariant(),
|
55
|
+
variant = _useAccordionVariant.variant;
|
56
|
+
var styles = (0, _Accordion.accordionStyles)({
|
57
|
+
variant: variant
|
58
|
+
});
|
38
59
|
var sharedProps = {
|
39
|
-
className: (
|
60
|
+
className: styles.base({
|
61
|
+
className: className
|
62
|
+
})
|
40
63
|
};
|
41
64
|
if (props.multiple) {
|
42
65
|
var _onChange = props.onChange,
|
43
66
|
_multiple = props.multiple,
|
44
|
-
_rest = (0, _objectWithoutProperties2["default"])(props,
|
67
|
+
_rest = (0, _objectWithoutProperties2["default"])(props, _excluded3);
|
45
68
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RadixAccordion.Root, _objectSpread(_objectSpread(_objectSpread({}, _rest), sharedProps), {}, {
|
46
69
|
type: "multiple",
|
47
70
|
onValueChange: _onChange,
|
@@ -52,7 +75,7 @@ var Accordion = exports.Accordion = function Accordion(_ref) {
|
|
52
75
|
multiple = props.multiple,
|
53
76
|
_props$collapsible = props.collapsible,
|
54
77
|
collapsible = _props$collapsible === void 0 ? true : _props$collapsible,
|
55
|
-
rest = (0, _objectWithoutProperties2["default"])(props,
|
78
|
+
rest = (0, _objectWithoutProperties2["default"])(props, _excluded4);
|
56
79
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RadixAccordion.Root, _objectSpread(_objectSpread(_objectSpread({}, rest), sharedProps), {}, {
|
57
80
|
type: "single",
|
58
81
|
onValueChange: onChange,
|
@@ -61,71 +84,88 @@ var Accordion = exports.Accordion = function Accordion(_ref) {
|
|
61
84
|
}));
|
62
85
|
};
|
63
86
|
Accordion.displayName = "Accordion";
|
64
|
-
var AccordionItem = /*#__PURE__*/(0, _react.forwardRef)(function (
|
65
|
-
var value =
|
66
|
-
disabled =
|
67
|
-
children =
|
68
|
-
className =
|
87
|
+
var AccordionItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref) {
|
88
|
+
var value = _ref3.value,
|
89
|
+
disabled = _ref3.disabled,
|
90
|
+
children = _ref3.children,
|
91
|
+
className = _ref3.className;
|
92
|
+
var _useAccordionVariant2 = useAccordionVariant(),
|
93
|
+
variant = _useAccordionVariant2.variant;
|
94
|
+
var styles = (0, _Accordion.accordionStyles)({
|
95
|
+
variant: variant
|
96
|
+
});
|
69
97
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RadixAccordion.Item, {
|
70
98
|
value: value,
|
71
99
|
disabled: disabled,
|
72
100
|
ref: ref,
|
73
|
-
className: (
|
101
|
+
className: styles.item({
|
102
|
+
className: className
|
103
|
+
}),
|
74
104
|
children: children
|
75
105
|
});
|
76
106
|
});
|
77
107
|
AccordionItem.displayName = "AccordionItem";
|
78
|
-
var AccordionHeader = /*#__PURE__*/(0, _react.forwardRef)(function (
|
79
|
-
var children =
|
80
|
-
description =
|
81
|
-
Icon =
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
108
|
+
var AccordionHeader = /*#__PURE__*/(0, _react.forwardRef)(function (_ref4, ref) {
|
109
|
+
var children = _ref4.children,
|
110
|
+
description = _ref4.description,
|
111
|
+
Icon = _ref4.icon,
|
112
|
+
iconClassName = _ref4.iconClassName,
|
113
|
+
iconBgClassName = _ref4.iconBgClassName,
|
114
|
+
meta = _ref4.meta,
|
115
|
+
triggerIcon = _ref4.triggerIcon,
|
116
|
+
triggerClassName = _ref4.triggerClassName,
|
117
|
+
className = _ref4.className,
|
118
|
+
titleWrapperClassName = _ref4.titleWrapperClassName,
|
119
|
+
titleClassName = _ref4.titleClassName;
|
120
|
+
var _useAccordionVariant3 = useAccordionVariant(),
|
121
|
+
variant = _useAccordionVariant3.variant;
|
122
|
+
var styles = (0, _Accordion.accordionStyles)({
|
123
|
+
variant: variant
|
124
|
+
});
|
125
|
+
var isCompact = variant === "compact";
|
92
126
|
var TriggerIcon = triggerIcon || _Icons.ChevronDownIcon;
|
93
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RadixAccordion.Header, {
|
94
|
-
className:
|
128
|
+
className: styles.header({
|
129
|
+
className: className
|
130
|
+
}),
|
95
131
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(RadixAccordion.Trigger, {
|
96
132
|
ref: ref,
|
97
|
-
className: (
|
133
|
+
className: styles.trigger({
|
134
|
+
className: triggerClassName
|
135
|
+
}),
|
98
136
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
99
|
-
className: (
|
137
|
+
className: styles.titleWrapper({
|
138
|
+
className: titleWrapperClassName
|
139
|
+
}),
|
100
140
|
children: [Icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
101
|
-
className: (
|
141
|
+
className: styles.iconBg({
|
142
|
+
className: iconBgClassName
|
143
|
+
}),
|
102
144
|
"aria-hidden": true,
|
103
145
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
104
|
-
className: (
|
105
|
-
|
106
|
-
|
146
|
+
className: styles.icon({
|
147
|
+
className: iconClassName
|
148
|
+
})
|
107
149
|
})
|
108
150
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
109
|
-
className: (
|
151
|
+
className: styles.titleCol(),
|
110
152
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
111
|
-
className: (
|
153
|
+
className: styles.title({
|
154
|
+
className: titleClassName
|
155
|
+
}),
|
112
156
|
children: children
|
113
|
-
}), typeof description !== "undefined" && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
114
|
-
className: (
|
157
|
+
}), !isCompact && typeof description !== "undefined" && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
158
|
+
className: styles.description(),
|
115
159
|
children: description
|
116
160
|
})]
|
117
161
|
})]
|
118
162
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
119
|
-
className: (
|
120
|
-
children: [typeof meta !== "undefined" && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
121
|
-
className: (
|
163
|
+
className: styles.metaWrapper(),
|
164
|
+
children: [typeof meta !== "undefined" && !isCompact && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
165
|
+
className: styles.meta(),
|
122
166
|
children: meta
|
123
167
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(TriggerIcon, {
|
124
|
-
className: (0, _clsx["default"])((
|
125
|
-
// Don't rotate the trigger icon if it's a custom one.
|
126
|
-
!triggerIcon && (0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])([" group-data-[state=open]/accordion-trigger:rotate-180 motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out"])))),
|
127
|
-
width: TRIGGER_ICON_SIZE,
|
128
|
-
height: TRIGGER_ICON_SIZE,
|
168
|
+
className: (0, _clsx["default"])(styles.triggerIcon(), !triggerIcon && styles.triggerIconChevron()),
|
129
169
|
"aria-hidden": true
|
130
170
|
})]
|
131
171
|
})]
|
@@ -133,14 +173,21 @@ var AccordionHeader = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref)
|
|
133
173
|
});
|
134
174
|
});
|
135
175
|
AccordionHeader.displayName = "AccordionHeader";
|
136
|
-
var AccordionContent = /*#__PURE__*/(0, _react.forwardRef)(function (
|
137
|
-
var children =
|
138
|
-
className =
|
176
|
+
var AccordionContent = /*#__PURE__*/(0, _react.forwardRef)(function (_ref5, ref) {
|
177
|
+
var children = _ref5.children,
|
178
|
+
className = _ref5.className;
|
179
|
+
var _useAccordionVariant4 = useAccordionVariant(),
|
180
|
+
variant = _useAccordionVariant4.variant;
|
181
|
+
var styles = (0, _Accordion.accordionStyles)({
|
182
|
+
variant: variant
|
183
|
+
});
|
139
184
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RadixAccordion.Content, {
|
140
185
|
ref: ref,
|
141
|
-
className: (
|
186
|
+
className: styles.content({
|
187
|
+
className: className
|
188
|
+
}),
|
142
189
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
143
|
-
className: (
|
190
|
+
className: styles.contentInner(),
|
144
191
|
children: children
|
145
192
|
})
|
146
193
|
});
|
@@ -0,0 +1,170 @@
|
|
1
|
+
export declare const accordionStyles: import("tailwind-variants").TVReturnType<{
|
2
|
+
variant: {
|
3
|
+
normal: {
|
4
|
+
trigger: string;
|
5
|
+
titleWrapper: string;
|
6
|
+
iconBg: string;
|
7
|
+
triggerIcon: string;
|
8
|
+
contentInner: string;
|
9
|
+
};
|
10
|
+
compact: {
|
11
|
+
trigger: string;
|
12
|
+
titleWrapper: string;
|
13
|
+
iconBg: string;
|
14
|
+
title: string;
|
15
|
+
description: string;
|
16
|
+
metaWrapper: string;
|
17
|
+
meta: string;
|
18
|
+
triggerIcon: string;
|
19
|
+
content: string;
|
20
|
+
contentInner: string;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
}, {
|
24
|
+
base: string;
|
25
|
+
item: string;
|
26
|
+
header: string;
|
27
|
+
trigger: string;
|
28
|
+
titleWrapper: string;
|
29
|
+
iconBg: string;
|
30
|
+
icon: string;
|
31
|
+
titleCol: string;
|
32
|
+
title: string;
|
33
|
+
description: string;
|
34
|
+
metaWrapper: string;
|
35
|
+
meta: string;
|
36
|
+
triggerIcon: string;
|
37
|
+
triggerIconChevron: string;
|
38
|
+
content: string;
|
39
|
+
contentInner: string;
|
40
|
+
}, undefined, {
|
41
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
42
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
43
|
+
} | undefined;
|
44
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
45
|
+
twMergeConfig: {
|
46
|
+
prefix: string;
|
47
|
+
};
|
48
|
+
}, {
|
49
|
+
variant: {
|
50
|
+
normal: {
|
51
|
+
trigger: string;
|
52
|
+
titleWrapper: string;
|
53
|
+
iconBg: string;
|
54
|
+
triggerIcon: string;
|
55
|
+
contentInner: string;
|
56
|
+
};
|
57
|
+
compact: {
|
58
|
+
trigger: string;
|
59
|
+
titleWrapper: string;
|
60
|
+
iconBg: string;
|
61
|
+
title: string;
|
62
|
+
description: string;
|
63
|
+
metaWrapper: string;
|
64
|
+
meta: string;
|
65
|
+
triggerIcon: string;
|
66
|
+
content: string;
|
67
|
+
contentInner: string;
|
68
|
+
};
|
69
|
+
};
|
70
|
+
}, {
|
71
|
+
base: string;
|
72
|
+
item: string;
|
73
|
+
header: string;
|
74
|
+
trigger: string;
|
75
|
+
titleWrapper: string;
|
76
|
+
iconBg: string;
|
77
|
+
icon: string;
|
78
|
+
titleCol: string;
|
79
|
+
title: string;
|
80
|
+
description: string;
|
81
|
+
metaWrapper: string;
|
82
|
+
meta: string;
|
83
|
+
triggerIcon: string;
|
84
|
+
triggerIconChevron: string;
|
85
|
+
content: string;
|
86
|
+
contentInner: string;
|
87
|
+
}, import("tailwind-variants").TVReturnType<{
|
88
|
+
variant: {
|
89
|
+
normal: {
|
90
|
+
trigger: string;
|
91
|
+
titleWrapper: string;
|
92
|
+
iconBg: string;
|
93
|
+
triggerIcon: string;
|
94
|
+
contentInner: string;
|
95
|
+
};
|
96
|
+
compact: {
|
97
|
+
trigger: string;
|
98
|
+
titleWrapper: string;
|
99
|
+
iconBg: string;
|
100
|
+
title: string;
|
101
|
+
description: string;
|
102
|
+
metaWrapper: string;
|
103
|
+
meta: string;
|
104
|
+
triggerIcon: string;
|
105
|
+
content: string;
|
106
|
+
contentInner: string;
|
107
|
+
};
|
108
|
+
};
|
109
|
+
}, {
|
110
|
+
base: string;
|
111
|
+
item: string;
|
112
|
+
header: string;
|
113
|
+
trigger: string;
|
114
|
+
titleWrapper: string;
|
115
|
+
iconBg: string;
|
116
|
+
icon: string;
|
117
|
+
titleCol: string;
|
118
|
+
title: string;
|
119
|
+
description: string;
|
120
|
+
metaWrapper: string;
|
121
|
+
meta: string;
|
122
|
+
triggerIcon: string;
|
123
|
+
triggerIconChevron: string;
|
124
|
+
content: string;
|
125
|
+
contentInner: string;
|
126
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
127
|
+
variant: {
|
128
|
+
normal: {
|
129
|
+
trigger: string;
|
130
|
+
titleWrapper: string;
|
131
|
+
iconBg: string;
|
132
|
+
triggerIcon: string;
|
133
|
+
contentInner: string;
|
134
|
+
};
|
135
|
+
compact: {
|
136
|
+
trigger: string;
|
137
|
+
titleWrapper: string;
|
138
|
+
iconBg: string;
|
139
|
+
title: string;
|
140
|
+
description: string;
|
141
|
+
metaWrapper: string;
|
142
|
+
meta: string;
|
143
|
+
triggerIcon: string;
|
144
|
+
content: string;
|
145
|
+
contentInner: string;
|
146
|
+
};
|
147
|
+
};
|
148
|
+
}, {
|
149
|
+
variant: {
|
150
|
+
normal: {
|
151
|
+
trigger: string;
|
152
|
+
titleWrapper: string;
|
153
|
+
iconBg: string;
|
154
|
+
triggerIcon: string;
|
155
|
+
contentInner: string;
|
156
|
+
};
|
157
|
+
compact: {
|
158
|
+
trigger: string;
|
159
|
+
titleWrapper: string;
|
160
|
+
iconBg: string;
|
161
|
+
title: string;
|
162
|
+
description: string;
|
163
|
+
metaWrapper: string;
|
164
|
+
meta: string;
|
165
|
+
triggerIcon: string;
|
166
|
+
content: string;
|
167
|
+
contentInner: string;
|
168
|
+
};
|
169
|
+
};
|
170
|
+
}>, unknown, unknown, undefined>>;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.accordionStyles = void 0;
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
9
|
+
var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
|
10
|
+
var _tv = require("./../../styles/helpers/tv");
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31;
|
12
|
+
var accordionStyles = exports.accordionStyles = (0, _tv.tv)({
|
13
|
+
slots: {
|
14
|
+
base: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["flex flex-col"]))),
|
15
|
+
item: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["group/accordion-item flex flex-col"]))),
|
16
|
+
header: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])([""]))),
|
17
|
+
trigger: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["group/accordion-trigger flex items-center justify-between"]))),
|
18
|
+
titleWrapper: (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["flex items-center grow"]))),
|
19
|
+
iconBg: (0, _satellitePrefixer["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["flex items-center justify-center shrink-0"]))),
|
20
|
+
icon: (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["size-4 text-grey-600 group-disabled/accordion-trigger:text-grey-300"]))),
|
21
|
+
titleCol: (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["flex flex-col gap-y-1 text-left grow"]))),
|
22
|
+
title: (0, _satellitePrefixer["default"])(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["typo-display-heading line-clamp-2 group-disabled/accordion-trigger:text-grey-300"]))),
|
23
|
+
description: (0, _satellitePrefixer["default"])(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["typo-display-body text-grey-600 line-clamp-3 group-disabled/accordion-trigger:text-grey-300"]))),
|
24
|
+
metaWrapper: (0, _satellitePrefixer["default"])(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["flex items-center gap-x-2"]))),
|
25
|
+
meta: (0, _satellitePrefixer["default"])(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["typo-display-caption group-disabled/accordion-trigger:text-grey-300"]))),
|
26
|
+
triggerIcon: (0, _satellitePrefixer["default"])(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["shrink-0 text-grey-600 group-disabled/accordion-trigger:text-grey-300"]))),
|
27
|
+
triggerIconChevron: (0, _satellitePrefixer["default"])(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["group-data-[state=open]/accordion-trigger:rotate-180 motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out"]))),
|
28
|
+
content: (0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["typo-display-body text-grey-600 overflow-hidden accordion-content"]))),
|
29
|
+
contentInner: (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])([""])))
|
30
|
+
},
|
31
|
+
variants: {
|
32
|
+
variant: {
|
33
|
+
normal: {
|
34
|
+
trigger: (0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["w-full gap-x-3 px-3.5 py-2.5 group-first/accordion-item:rounded-t group-last/accordion-item:rounded-b bg-white border-2 border-transparent focus-visible:outline-none focus-visible:border-accent-600 enabled:hover:bg-grey-50 motion-safe:transition-colors"]))),
|
35
|
+
titleWrapper: (0, _satellitePrefixer["default"])(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["gap-x-3"]))),
|
36
|
+
iconBg: (0, _satellitePrefixer["default"])(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2["default"])(["rounded-full w-8 h-8 bg-grey-100"]))),
|
37
|
+
triggerIcon: (0, _satellitePrefixer["default"])(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2["default"])(["size-5"]))),
|
38
|
+
contentInner: (0, _satellitePrefixer["default"])(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2["default"])(["px-4 pt-2 pb-4"])))
|
39
|
+
},
|
40
|
+
compact: {
|
41
|
+
trigger: (0, _satellitePrefixer["default"])(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2["default"])(["min-h-0 gap-x-2 bg-transparent border-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent-600"]))),
|
42
|
+
titleWrapper: (0, _satellitePrefixer["default"])(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2["default"])(["gap-x-1"]))),
|
43
|
+
iconBg: (0, _satellitePrefixer["default"])(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2["default"])(["h-6 bg-transparent"]))),
|
44
|
+
title: (0, _satellitePrefixer["default"])(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteral2["default"])(["typo-display-body"]))),
|
45
|
+
description: (0, _satellitePrefixer["default"])(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteral2["default"])(["hidden"]))),
|
46
|
+
metaWrapper: (0, _satellitePrefixer["default"])(_templateObject27 || (_templateObject27 = (0, _taggedTemplateLiteral2["default"])([""]))),
|
47
|
+
meta: (0, _satellitePrefixer["default"])(_templateObject28 || (_templateObject28 = (0, _taggedTemplateLiteral2["default"])(["hidden"]))),
|
48
|
+
triggerIcon: (0, _satellitePrefixer["default"])(_templateObject29 || (_templateObject29 = (0, _taggedTemplateLiteral2["default"])(["size-4"]))),
|
49
|
+
content: (0, _satellitePrefixer["default"])(_templateObject30 || (_templateObject30 = (0, _taggedTemplateLiteral2["default"])(["py-0"]))),
|
50
|
+
contentInner: (0, _satellitePrefixer["default"])(_templateObject31 || (_templateObject31 = (0, _taggedTemplateLiteral2["default"])(["py-1"])))
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
defaultVariants: {
|
55
|
+
variant: "normal"
|
56
|
+
}
|
57
|
+
});
|
@@ -7,8 +7,8 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
|
|
7
7
|
content?: import("tailwind-merge").ClassNameValue;
|
8
8
|
item?: import("tailwind-merge").ClassNameValue;
|
9
9
|
trigger?: import("tailwind-merge").ClassNameValue;
|
10
|
-
iconBg?: import("tailwind-merge").ClassNameValue;
|
11
10
|
titleWrapper?: import("tailwind-merge").ClassNameValue;
|
11
|
+
iconBg?: import("tailwind-merge").ClassNameValue;
|
12
12
|
};
|
13
13
|
};
|
14
14
|
} | {
|
@@ -20,8 +20,8 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
|
|
20
20
|
content?: import("tailwind-merge").ClassNameValue;
|
21
21
|
item?: import("tailwind-merge").ClassNameValue;
|
22
22
|
trigger?: import("tailwind-merge").ClassNameValue;
|
23
|
-
iconBg?: import("tailwind-merge").ClassNameValue;
|
24
23
|
titleWrapper?: import("tailwind-merge").ClassNameValue;
|
24
|
+
iconBg?: import("tailwind-merge").ClassNameValue;
|
25
25
|
};
|
26
26
|
};
|
27
27
|
} | {}, {
|
@@ -48,8 +48,8 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
|
|
48
48
|
content?: import("tailwind-merge").ClassNameValue;
|
49
49
|
item?: import("tailwind-merge").ClassNameValue;
|
50
50
|
trigger?: import("tailwind-merge").ClassNameValue;
|
51
|
-
iconBg?: import("tailwind-merge").ClassNameValue;
|
52
51
|
titleWrapper?: import("tailwind-merge").ClassNameValue;
|
52
|
+
iconBg?: import("tailwind-merge").ClassNameValue;
|
53
53
|
};
|
54
54
|
};
|
55
55
|
} | {}, {
|
@@ -79,8 +79,8 @@ export declare const chatContextAccordionStyles: import("tailwind-variants").TVR
|
|
79
79
|
content?: import("tailwind-merge").ClassNameValue;
|
80
80
|
item?: import("tailwind-merge").ClassNameValue;
|
81
81
|
trigger?: import("tailwind-merge").ClassNameValue;
|
82
|
-
iconBg?: import("tailwind-merge").ClassNameValue;
|
83
82
|
titleWrapper?: import("tailwind-merge").ClassNameValue;
|
83
|
+
iconBg?: import("tailwind-merge").ClassNameValue;
|
84
84
|
};
|
85
85
|
};
|
86
86
|
} | {}>, unknown, unknown, undefined>>;
|
@@ -62,7 +62,7 @@ export declare type ChatMessageProps<ActionsExtraData extends Record<string, any
|
|
62
62
|
*
|
63
63
|
* See the [ChatMessage documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-message) for more information.
|
64
64
|
*/
|
65
|
-
export declare const ChatMessage: <ActionsExtraData extends Record<string, any> = Record<string, any>>(props: Omit<HTMLAttributes<HTMLElement>, "
|
65
|
+
export declare const ChatMessage: <ActionsExtraData extends Record<string, any> = Record<string, any>>(props: Omit<HTMLAttributes<HTMLElement>, "content" | "children"> & {
|
66
66
|
/**
|
67
67
|
* The content of the message.
|
68
68
|
*/
|
@@ -34,8 +34,8 @@ export declare const chatMessageStyles: import("tailwind-variants").TVReturnType
|
|
34
34
|
footer: string;
|
35
35
|
}, undefined, {
|
36
36
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
37
|
-
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
38
37
|
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
38
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
39
39
|
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
40
40
|
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
41
41
|
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
@@ -40,8 +40,8 @@ export declare const chatMessageErrorStyles: import("tailwind-variants").TVRetur
|
|
40
40
|
content: string;
|
41
41
|
}, undefined, {
|
42
42
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
43
|
-
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
44
43
|
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
44
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
45
45
|
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
46
46
|
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
47
47
|
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
@@ -120,8 +120,8 @@ export declare const chatMessageErrorStyles: import("tailwind-variants").TVRetur
|
|
120
120
|
footer: string;
|
121
121
|
}, undefined, {
|
122
122
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
123
|
-
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
124
123
|
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
124
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
125
125
|
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
126
126
|
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
127
127
|
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
@@ -67,8 +67,8 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
67
67
|
skeleton: string;
|
68
68
|
}, undefined, {
|
69
69
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
70
|
-
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
71
70
|
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
71
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
72
72
|
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
73
73
|
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
74
74
|
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
@@ -147,8 +147,8 @@ export declare const chatMessageLoaderStyles: import("tailwind-variants").TVRetu
|
|
147
147
|
footer: string;
|
148
148
|
}, undefined, {
|
149
149
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
150
|
-
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
151
150
|
leading?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
151
|
+
variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
152
152
|
side?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
153
153
|
actions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
154
154
|
autoHideActions?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
@@ -16,9 +16,6 @@ var textAreaPlugin = plugin(function (_ref) {
|
|
16
16
|
transition: "all 100ms ease-in-out",
|
17
17
|
fontSize: theme("fontSize.base"),
|
18
18
|
lineHeight: theme("lineHeight.base"),
|
19
|
-
"&::placeholder": {
|
20
|
-
color: theme("colors.grey.600")
|
21
|
-
},
|
22
19
|
"&:hover": {
|
23
20
|
borderColor: theme("colors.grey.600")
|
24
21
|
},
|
@@ -50,6 +47,9 @@ var textAreaPlugin = plugin(function (_ref) {
|
|
50
47
|
color: theme("colors.grey.900"),
|
51
48
|
background: "transparent",
|
52
49
|
padding: theme("spacing.4"),
|
50
|
+
"&::placeholder": {
|
51
|
+
color: theme("colors.grey.600")
|
52
|
+
},
|
53
53
|
"&:focus": {
|
54
54
|
outline: "none"
|
55
55
|
},
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { FC } from "react";
|
2
|
+
import type { Components } from "react-markdown";
|
2
3
|
export interface MarkdownContentProps {
|
3
4
|
/**
|
4
5
|
* Additional classes to apply to the `MarkdownContent`.
|
@@ -8,8 +9,14 @@ export interface MarkdownContentProps {
|
|
8
9
|
* The content of the `MarkdownContent`.
|
9
10
|
*/
|
10
11
|
content?: string;
|
12
|
+
/**
|
13
|
+
* Custom components to override the default rendering of markdown elements.
|
14
|
+
*/
|
15
|
+
components?: Partial<Components>;
|
11
16
|
}
|
12
17
|
/**
|
13
18
|
* The `MarkdownContent` component is used to style user generated content that comes as Markdown.
|
19
|
+
*
|
20
|
+
* See the [Markdown Content documentation page](https://satellite.algolia.com/8261d6576/p/784293-markdown-content) for more information.
|
14
21
|
*/
|
15
22
|
export declare const MarkdownContent: FC<MarkdownContentProps>;
|