@uipath/apollo-wind 2.66.0 → 2.67.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/components/ui/attachment.cjs +174 -0
- package/dist/components/ui/attachment.d.ts +39 -0
- package/dist/components/ui/attachment.js +113 -0
- package/dist/components/ui/bubble.cjs +123 -0
- package/dist/components/ui/bubble.d.ts +28 -0
- package/dist/components/ui/bubble.js +77 -0
- package/dist/components/ui/combobox.cjs +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/index.cjs +274 -219
- package/dist/components/ui/index.d.ts +6 -1
- package/dist/components/ui/index.js +6 -1
- package/dist/components/ui/input-group.cjs +8 -4
- package/dist/components/ui/input-group.js +8 -4
- package/dist/components/ui/input.cjs +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/marker.cjs +89 -0
- package/dist/components/ui/marker.d.ts +16 -0
- package/dist/components/ui/marker.js +46 -0
- package/dist/components/ui/message-scroller/index.cjs +58 -0
- package/dist/components/ui/message-scroller/index.d.ts +1 -0
- package/dist/components/ui/message-scroller/index.js +1 -0
- package/dist/components/ui/message-scroller/message-scroller.cjs +137 -0
- package/dist/components/ui/message-scroller/message-scroller.d.ts +60 -0
- package/dist/components/ui/message-scroller/message-scroller.js +73 -0
- package/dist/components/ui/message-scroller/primitive/components.cjs +357 -0
- package/dist/components/ui/message-scroller/primitive/components.d.ts +28 -0
- package/dist/components/ui/message-scroller/primitive/components.js +299 -0
- package/dist/components/ui/message-scroller/primitive/geometry.cjs +232 -0
- package/dist/components/ui/message-scroller/primitive/geometry.d.ts +54 -0
- package/dist/components/ui/message-scroller/primitive/geometry.js +153 -0
- package/dist/components/ui/message-scroller/primitive/index.cjs +53 -0
- package/dist/components/ui/message-scroller/primitive/index.d.ts +23 -0
- package/dist/components/ui/message-scroller/primitive/index.js +10 -0
- package/dist/components/ui/message-scroller/primitive/stores.cjs +81 -0
- package/dist/components/ui/message-scroller/primitive/stores.d.ts +6 -0
- package/dist/components/ui/message-scroller/primitive/stores.js +38 -0
- package/dist/components/ui/message-scroller/primitive/types.cjs +82 -0
- package/dist/components/ui/message-scroller/primitive/types.d.ts +89 -0
- package/dist/components/ui/message-scroller/primitive/types.js +24 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-commands.cjs +213 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-commands.d.ts +18 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-commands.js +179 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-controller.cjs +474 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-controller.d.ts +6 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-controller.js +440 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-refs.cjs +124 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-refs.d.ts +52 -0
- package/dist/components/ui/message-scroller/primitive/use-message-scroller-refs.js +84 -0
- package/dist/components/ui/message-scroller/primitive/use-render.cjs +116 -0
- package/dist/components/ui/message-scroller/primitive/use-render.d.ts +21 -0
- package/dist/components/ui/message-scroller/primitive/use-render.js +76 -0
- package/dist/components/ui/message-scroller/primitive/utils.cjs +41 -0
- package/dist/components/ui/message-scroller/primitive/utils.d.ts +3 -0
- package/dist/components/ui/message-scroller/primitive/utils.js +7 -0
- package/dist/components/ui/message.cjs +96 -0
- package/dist/components/ui/message.d.ts +17 -0
- package/dist/components/ui/message.js +47 -0
- package/dist/components/ui/multi-select.cjs +3 -3
- package/dist/components/ui/multi-select.d.ts +10 -0
- package/dist/components/ui/multi-select.js +3 -3
- package/dist/components/ui/select.cjs +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/index.cjs +164 -51
- package/dist/index.d.ts +10 -0
- package/dist/index.js +6 -1
- package/dist/styles.css +773 -0
- package/dist/tailwind.utilities.css +223 -0
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { areScrollStatesEqual, createMessageScrollerStore, createMessageScrollerVisibilityStore } from "./stores.js";
|
|
3
|
+
import { EMPTY_MESSAGE_SCROLLER_SCROLLABLE } from "./types.js";
|
|
4
|
+
function useMessageScrollerRefs({ autoScroll, defaultScrollPosition, scrollEdgeThreshold, scrollMargin, scrollPreviousItemPeek }) {
|
|
5
|
+
const autoScrollRef = useRef(autoScroll);
|
|
6
|
+
const autoscrollingRef = useRef(false);
|
|
7
|
+
const contentRef = useRef(null);
|
|
8
|
+
const defaultScrollPositionAppliedRef = useRef(false);
|
|
9
|
+
const scrollEdgeThresholdRef = useRef(scrollEdgeThreshold);
|
|
10
|
+
const itemCountRef = useRef(0);
|
|
11
|
+
const firstItemRef = useRef(null);
|
|
12
|
+
const lastScrollTopRef = useRef(0);
|
|
13
|
+
const modeRef = useRef(autoScroll ? 'following-bottom' : 'free-scrolling');
|
|
14
|
+
const messageElementsRef = useRef(new Map());
|
|
15
|
+
const pendingScrollToMessageRef = useRef(null);
|
|
16
|
+
const prependRestoreRef = useRef(null);
|
|
17
|
+
const streamingTurnRef = useRef(null);
|
|
18
|
+
const scrollPreviousItemPeekRef = useRef(scrollPreviousItemPeek);
|
|
19
|
+
const preserveScrollOnPrependRef = useRef(true);
|
|
20
|
+
const rootRef = useRef(null);
|
|
21
|
+
const scrollMarginRef = useRef(scrollMargin);
|
|
22
|
+
const pendingScrollFrameRef = useRef(null);
|
|
23
|
+
const spacerGapRef = useRef(0);
|
|
24
|
+
const spacerHeightRef = useRef(0);
|
|
25
|
+
const spacerRef = useRef(null);
|
|
26
|
+
const stateFrameRef = useRef(null);
|
|
27
|
+
const pendingDefaultScrollStoreRef = useRef(null);
|
|
28
|
+
const stateStoreRef = useRef(null);
|
|
29
|
+
const autoscrollingTimeoutRef = useRef(null);
|
|
30
|
+
const viewportRef = useRef(null);
|
|
31
|
+
const visibilityFrameRef = useRef(null);
|
|
32
|
+
const visibilityObserverRef = useRef(null);
|
|
33
|
+
const visibilityStoreRef = useRef(null);
|
|
34
|
+
const visibleMessageIdsRef = useRef(new Set());
|
|
35
|
+
const handledScrollAnchorsRef = useRef(new WeakSet());
|
|
36
|
+
if (null === pendingDefaultScrollStoreRef.current) pendingDefaultScrollStoreRef.current = createMessageScrollerStore('end' === defaultScrollPosition || 'last-anchor' === defaultScrollPosition, (current, next)=>current === next);
|
|
37
|
+
if (null === stateStoreRef.current) stateStoreRef.current = createMessageScrollerStore(EMPTY_MESSAGE_SCROLLER_SCROLLABLE, areScrollStatesEqual);
|
|
38
|
+
if (null === visibilityStoreRef.current) visibilityStoreRef.current = createMessageScrollerVisibilityStore();
|
|
39
|
+
autoScrollRef.current = autoScroll;
|
|
40
|
+
scrollEdgeThresholdRef.current = scrollEdgeThreshold;
|
|
41
|
+
scrollMarginRef.current = scrollMargin;
|
|
42
|
+
scrollPreviousItemPeekRef.current = scrollPreviousItemPeek;
|
|
43
|
+
return {
|
|
44
|
+
autoScrollRef,
|
|
45
|
+
autoscrollingRef,
|
|
46
|
+
autoscrollingTimeoutRef,
|
|
47
|
+
streamingTurnRef,
|
|
48
|
+
contentRef,
|
|
49
|
+
defaultScrollPositionAppliedRef,
|
|
50
|
+
firstItemRef,
|
|
51
|
+
itemCountRef,
|
|
52
|
+
lastScrollTopRef,
|
|
53
|
+
messageElementsRef,
|
|
54
|
+
modeRef,
|
|
55
|
+
pendingScrollFrameRef,
|
|
56
|
+
pendingScrollToMessageRef,
|
|
57
|
+
prependRestoreRef,
|
|
58
|
+
preserveScrollOnPrependRef,
|
|
59
|
+
pendingDefaultScrollStore: pendingDefaultScrollStoreRef.current,
|
|
60
|
+
rootRef,
|
|
61
|
+
scrollEdgeThresholdRef,
|
|
62
|
+
scrollMarginRef,
|
|
63
|
+
scrollPreviousItemPeekRef,
|
|
64
|
+
spacerGapRef,
|
|
65
|
+
spacerHeightRef,
|
|
66
|
+
spacerRef,
|
|
67
|
+
stateFrameRef,
|
|
68
|
+
stateStore: stateStoreRef.current,
|
|
69
|
+
viewportRef,
|
|
70
|
+
visibilityFrameRef,
|
|
71
|
+
visibilityObserverRef,
|
|
72
|
+
visibilityStore: visibilityStoreRef.current,
|
|
73
|
+
visibleMessageIdsRef,
|
|
74
|
+
handledScrollAnchorsRef
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function clearPendingDefaultScroll(refs) {
|
|
78
|
+
refs.pendingDefaultScrollStore.setSnapshot(false);
|
|
79
|
+
}
|
|
80
|
+
function markDefaultScrollPositionApplied(refs) {
|
|
81
|
+
refs.defaultScrollPositionAppliedRef.current = true;
|
|
82
|
+
clearPendingDefaultScroll(refs);
|
|
83
|
+
}
|
|
84
|
+
export { clearPendingDefaultScroll, markDefaultScrollPositionApplied, useMessageScrollerRefs };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
composeRefs: ()=>composeRefs,
|
|
28
|
+
mergeProps: ()=>mergeProps,
|
|
29
|
+
useRender: ()=>useRender
|
|
30
|
+
});
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
function useRender({ defaultTagName, props, render, state = {}, stateAttributesMapping }) {
|
|
33
|
+
const elementProps = mergeProps(getStateAttributes(state, stateAttributesMapping), props);
|
|
34
|
+
if (!render) return external_react_namespaceObject.createElement(defaultTagName, elementProps);
|
|
35
|
+
if ('function' == typeof render) return render(elementProps, state);
|
|
36
|
+
if (!external_react_namespaceObject.isValidElement(render)) return null;
|
|
37
|
+
const renderProps = render.props;
|
|
38
|
+
const renderRef = renderProps.ref ?? render.ref;
|
|
39
|
+
const propsWithRenderProps = mergeProps(elementProps, renderProps);
|
|
40
|
+
const propsWithRef = {
|
|
41
|
+
...propsWithRenderProps,
|
|
42
|
+
ref: composeRefs(elementProps.ref, renderRef)
|
|
43
|
+
};
|
|
44
|
+
return external_react_namespaceObject.cloneElement(render, propsWithRef);
|
|
45
|
+
}
|
|
46
|
+
function mergeProps(...sources) {
|
|
47
|
+
const result = {};
|
|
48
|
+
for (const source of sources){
|
|
49
|
+
if (!source) continue;
|
|
50
|
+
const sourceProps = source;
|
|
51
|
+
for (const key of Object.keys(sourceProps)){
|
|
52
|
+
const value = sourceProps[key];
|
|
53
|
+
if (void 0 === value) continue;
|
|
54
|
+
const current = result[key];
|
|
55
|
+
if ('className' === key) result[key] = [
|
|
56
|
+
current,
|
|
57
|
+
value
|
|
58
|
+
].filter(Boolean).join(' ');
|
|
59
|
+
else if ('style' === key) result[key] = {
|
|
60
|
+
...current,
|
|
61
|
+
...value
|
|
62
|
+
};
|
|
63
|
+
else if ('ref' === key) result[key] = composeRefs(current, value);
|
|
64
|
+
else if (isEventHandler(key) && 'function' == typeof current && 'function' == typeof value) result[key] = composeEventHandlers(value, current);
|
|
65
|
+
else result[key] = value;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
function getStateAttributes(state, mapping) {
|
|
71
|
+
const props = {};
|
|
72
|
+
for (const key of Object.keys(state)){
|
|
73
|
+
const value = state[key];
|
|
74
|
+
const attributes = mapping?.[key]?.(value);
|
|
75
|
+
if (attributes) {
|
|
76
|
+
Object.assign(props, attributes);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if ('slot' === key) {
|
|
80
|
+
props['data-slot'] = value;
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const attribute = `data-${String(key).replace(/[A-Z]/g, (letter)=>`-${letter.toLowerCase()}`)}`;
|
|
84
|
+
if ('boolean' == typeof value) props[attribute] = value ? '' : void 0;
|
|
85
|
+
else if (null != value) props[attribute] = String(value);
|
|
86
|
+
}
|
|
87
|
+
return props;
|
|
88
|
+
}
|
|
89
|
+
function composeEventHandlers(theirs, ours) {
|
|
90
|
+
return function(event) {
|
|
91
|
+
theirs(event);
|
|
92
|
+
if (!event.defaultPrevented) ours(event);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function isEventHandler(key) {
|
|
96
|
+
return /^on[A-Z]/.test(key);
|
|
97
|
+
}
|
|
98
|
+
function composeRefs(...refs) {
|
|
99
|
+
const validRefs = refs.filter(Boolean);
|
|
100
|
+
if (0 === validRefs.length) return;
|
|
101
|
+
return (value)=>{
|
|
102
|
+
for (const ref of validRefs)if ('function' == typeof ref) ref(value);
|
|
103
|
+
else if (ref) ref.current = value;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
exports.composeRefs = __webpack_exports__.composeRefs;
|
|
107
|
+
exports.mergeProps = __webpack_exports__.mergeProps;
|
|
108
|
+
exports.useRender = __webpack_exports__.useRender;
|
|
109
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
110
|
+
"composeRefs",
|
|
111
|
+
"mergeProps",
|
|
112
|
+
"useRender"
|
|
113
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
114
|
+
Object.defineProperty(exports, '__esModule', {
|
|
115
|
+
value: true
|
|
116
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type RenderState = Record<string, unknown>;
|
|
3
|
+
type RenderFunction<TState extends RenderState> = (props: Record<string, unknown>, state: TState) => React.ReactElement | null;
|
|
4
|
+
type RenderProp<TState extends RenderState> = React.ReactElement | RenderFunction<TState>;
|
|
5
|
+
type StateAttributesMapping<TState extends RenderState> = Partial<{
|
|
6
|
+
[K in keyof TState]: (value: TState[K]) => Record<string, string | undefined> | null | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
type UseRenderComponentProps<TElement extends React.ElementType, TState extends RenderState = RenderState> = React.ComponentPropsWithoutRef<TElement> & {
|
|
9
|
+
render?: RenderProp<TState>;
|
|
10
|
+
};
|
|
11
|
+
type UseRenderOptions<TElement extends React.ElementType, TState extends RenderState> = {
|
|
12
|
+
defaultTagName: TElement;
|
|
13
|
+
props?: React.ComponentPropsWithRef<TElement>;
|
|
14
|
+
render?: RenderProp<TState>;
|
|
15
|
+
state?: TState;
|
|
16
|
+
stateAttributesMapping?: StateAttributesMapping<TState>;
|
|
17
|
+
};
|
|
18
|
+
declare function useRender<TElement extends React.ElementType, TState extends RenderState = RenderState>({ defaultTagName, props, render, state, stateAttributesMapping, }: UseRenderOptions<TElement, TState>): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
19
|
+
declare function mergeProps<TElement extends React.ElementType>(...sources: Array<React.ComponentPropsWithRef<TElement> | Record<string, unknown> | undefined>): React.ComponentPropsWithRef<TElement>;
|
|
20
|
+
declare function composeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T> | undefined;
|
|
21
|
+
export { composeRefs, mergeProps, useRender, type UseRenderComponentProps };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { cloneElement, createElement, isValidElement } from "react";
|
|
2
|
+
function useRender({ defaultTagName, props, render, state = {}, stateAttributesMapping }) {
|
|
3
|
+
const elementProps = mergeProps(getStateAttributes(state, stateAttributesMapping), props);
|
|
4
|
+
if (!render) return createElement(defaultTagName, elementProps);
|
|
5
|
+
if ('function' == typeof render) return render(elementProps, state);
|
|
6
|
+
if (!isValidElement(render)) return null;
|
|
7
|
+
const renderProps = render.props;
|
|
8
|
+
const renderRef = renderProps.ref ?? render.ref;
|
|
9
|
+
const propsWithRenderProps = mergeProps(elementProps, renderProps);
|
|
10
|
+
const propsWithRef = {
|
|
11
|
+
...propsWithRenderProps,
|
|
12
|
+
ref: composeRefs(elementProps.ref, renderRef)
|
|
13
|
+
};
|
|
14
|
+
return cloneElement(render, propsWithRef);
|
|
15
|
+
}
|
|
16
|
+
function mergeProps(...sources) {
|
|
17
|
+
const result = {};
|
|
18
|
+
for (const source of sources){
|
|
19
|
+
if (!source) continue;
|
|
20
|
+
const sourceProps = source;
|
|
21
|
+
for (const key of Object.keys(sourceProps)){
|
|
22
|
+
const value = sourceProps[key];
|
|
23
|
+
if (void 0 === value) continue;
|
|
24
|
+
const current = result[key];
|
|
25
|
+
if ('className' === key) result[key] = [
|
|
26
|
+
current,
|
|
27
|
+
value
|
|
28
|
+
].filter(Boolean).join(' ');
|
|
29
|
+
else if ('style' === key) result[key] = {
|
|
30
|
+
...current,
|
|
31
|
+
...value
|
|
32
|
+
};
|
|
33
|
+
else if ('ref' === key) result[key] = composeRefs(current, value);
|
|
34
|
+
else if (isEventHandler(key) && 'function' == typeof current && 'function' == typeof value) result[key] = composeEventHandlers(value, current);
|
|
35
|
+
else result[key] = value;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
function getStateAttributes(state, mapping) {
|
|
41
|
+
const props = {};
|
|
42
|
+
for (const key of Object.keys(state)){
|
|
43
|
+
const value = state[key];
|
|
44
|
+
const attributes = mapping?.[key]?.(value);
|
|
45
|
+
if (attributes) {
|
|
46
|
+
Object.assign(props, attributes);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if ('slot' === key) {
|
|
50
|
+
props['data-slot'] = value;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const attribute = `data-${String(key).replace(/[A-Z]/g, (letter)=>`-${letter.toLowerCase()}`)}`;
|
|
54
|
+
if ('boolean' == typeof value) props[attribute] = value ? '' : void 0;
|
|
55
|
+
else if (null != value) props[attribute] = String(value);
|
|
56
|
+
}
|
|
57
|
+
return props;
|
|
58
|
+
}
|
|
59
|
+
function composeEventHandlers(theirs, ours) {
|
|
60
|
+
return function(event) {
|
|
61
|
+
theirs(event);
|
|
62
|
+
if (!event.defaultPrevented) ours(event);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function isEventHandler(key) {
|
|
66
|
+
return /^on[A-Z]/.test(key);
|
|
67
|
+
}
|
|
68
|
+
function composeRefs(...refs) {
|
|
69
|
+
const validRefs = refs.filter(Boolean);
|
|
70
|
+
if (0 === validRefs.length) return;
|
|
71
|
+
return (value)=>{
|
|
72
|
+
for (const ref of validRefs)if ('function' == typeof ref) ref(value);
|
|
73
|
+
else if (ref) ref.current = value;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export { composeRefs, mergeProps, useRender };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
useLatest: ()=>useLatest
|
|
28
|
+
});
|
|
29
|
+
const external_react_namespaceObject = require("react");
|
|
30
|
+
function useLatest(value) {
|
|
31
|
+
const ref = external_react_namespaceObject.useRef(value);
|
|
32
|
+
ref.current = value;
|
|
33
|
+
return ref;
|
|
34
|
+
}
|
|
35
|
+
exports.useLatest = __webpack_exports__.useLatest;
|
|
36
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
37
|
+
"useLatest"
|
|
38
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
39
|
+
Object.defineProperty(exports, '__esModule', {
|
|
40
|
+
value: true
|
|
41
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
MessageContent: ()=>MessageContent,
|
|
28
|
+
MessageAvatar: ()=>MessageAvatar,
|
|
29
|
+
MessageFooter: ()=>MessageFooter,
|
|
30
|
+
MessageGroup: ()=>MessageGroup,
|
|
31
|
+
Message: ()=>Message,
|
|
32
|
+
MessageHeader: ()=>MessageHeader
|
|
33
|
+
});
|
|
34
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
35
|
+
const external_react_namespaceObject = require("react");
|
|
36
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
37
|
+
const MessageGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
38
|
+
ref: ref,
|
|
39
|
+
"data-slot": "message-group",
|
|
40
|
+
className: (0, index_cjs_namespaceObject.cn)('flex min-w-0 flex-col gap-2', className),
|
|
41
|
+
...props
|
|
42
|
+
}));
|
|
43
|
+
MessageGroup.displayName = 'MessageGroup';
|
|
44
|
+
const Message = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, align = 'start', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
45
|
+
ref: ref,
|
|
46
|
+
"data-slot": "message",
|
|
47
|
+
"data-align": align,
|
|
48
|
+
className: (0, index_cjs_namespaceObject.cn)('group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse', className),
|
|
49
|
+
...props
|
|
50
|
+
}));
|
|
51
|
+
Message.displayName = 'Message';
|
|
52
|
+
const MessageAvatar = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
53
|
+
ref: ref,
|
|
54
|
+
"data-slot": "message-avatar",
|
|
55
|
+
className: (0, index_cjs_namespaceObject.cn)('flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-[[data-slot=message-footer]]/message:-translate-y-8', className),
|
|
56
|
+
...props
|
|
57
|
+
}));
|
|
58
|
+
MessageAvatar.displayName = 'MessageAvatar';
|
|
59
|
+
const MessageContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
60
|
+
ref: ref,
|
|
61
|
+
"data-slot": "message-content",
|
|
62
|
+
className: (0, index_cjs_namespaceObject.cn)('flex w-full min-w-0 flex-col gap-2.5 break-words group-data-[align=end]/message:*:self-end', className),
|
|
63
|
+
...props
|
|
64
|
+
}));
|
|
65
|
+
MessageContent.displayName = 'MessageContent';
|
|
66
|
+
const MessageHeader = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
67
|
+
ref: ref,
|
|
68
|
+
"data-slot": "message-header",
|
|
69
|
+
className: (0, index_cjs_namespaceObject.cn)('flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground', className),
|
|
70
|
+
...props
|
|
71
|
+
}));
|
|
72
|
+
MessageHeader.displayName = 'MessageHeader';
|
|
73
|
+
const MessageFooter = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
74
|
+
ref: ref,
|
|
75
|
+
"data-slot": "message-footer",
|
|
76
|
+
className: (0, index_cjs_namespaceObject.cn)('flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end', className),
|
|
77
|
+
...props
|
|
78
|
+
}));
|
|
79
|
+
MessageFooter.displayName = 'MessageFooter';
|
|
80
|
+
exports.Message = __webpack_exports__.Message;
|
|
81
|
+
exports.MessageAvatar = __webpack_exports__.MessageAvatar;
|
|
82
|
+
exports.MessageContent = __webpack_exports__.MessageContent;
|
|
83
|
+
exports.MessageFooter = __webpack_exports__.MessageFooter;
|
|
84
|
+
exports.MessageGroup = __webpack_exports__.MessageGroup;
|
|
85
|
+
exports.MessageHeader = __webpack_exports__.MessageHeader;
|
|
86
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
87
|
+
"Message",
|
|
88
|
+
"MessageAvatar",
|
|
89
|
+
"MessageContent",
|
|
90
|
+
"MessageFooter",
|
|
91
|
+
"MessageGroup",
|
|
92
|
+
"MessageHeader"
|
|
93
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
94
|
+
Object.defineProperty(exports, '__esModule', {
|
|
95
|
+
value: true
|
|
96
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Chat conversation row primitives, ported from shadcn/ui's chat components. A `Message` lays out
|
|
4
|
+
* one turn: an optional `MessageAvatar`, then `MessageContent` holding a `MessageHeader`, the body
|
|
5
|
+
* (usually a `Bubble`) and a `MessageFooter`. `align="end"` mirrors the row for the current user.
|
|
6
|
+
*/
|
|
7
|
+
declare const MessageGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export interface MessageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/** `end` mirrors the row so the avatar and bubble sit on the trailing edge. */
|
|
10
|
+
align?: 'start' | 'end';
|
|
11
|
+
}
|
|
12
|
+
declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const MessageAvatar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const MessageContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const MessageHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const MessageFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export { MessageGroup, Message, MessageAvatar, MessageContent, MessageHeader, MessageFooter };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../lib/index.js";
|
|
4
|
+
const MessageGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
5
|
+
ref: ref,
|
|
6
|
+
"data-slot": "message-group",
|
|
7
|
+
className: cn('flex min-w-0 flex-col gap-2', className),
|
|
8
|
+
...props
|
|
9
|
+
}));
|
|
10
|
+
MessageGroup.displayName = 'MessageGroup';
|
|
11
|
+
const Message = /*#__PURE__*/ forwardRef(({ className, align = 'start', ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
12
|
+
ref: ref,
|
|
13
|
+
"data-slot": "message",
|
|
14
|
+
"data-align": align,
|
|
15
|
+
className: cn('group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse', className),
|
|
16
|
+
...props
|
|
17
|
+
}));
|
|
18
|
+
Message.displayName = 'Message';
|
|
19
|
+
const MessageAvatar = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
20
|
+
ref: ref,
|
|
21
|
+
"data-slot": "message-avatar",
|
|
22
|
+
className: cn('flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-[[data-slot=message-footer]]/message:-translate-y-8', className),
|
|
23
|
+
...props
|
|
24
|
+
}));
|
|
25
|
+
MessageAvatar.displayName = 'MessageAvatar';
|
|
26
|
+
const MessageContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
27
|
+
ref: ref,
|
|
28
|
+
"data-slot": "message-content",
|
|
29
|
+
className: cn('flex w-full min-w-0 flex-col gap-2.5 break-words group-data-[align=end]/message:*:self-end', className),
|
|
30
|
+
...props
|
|
31
|
+
}));
|
|
32
|
+
MessageContent.displayName = 'MessageContent';
|
|
33
|
+
const MessageHeader = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
34
|
+
ref: ref,
|
|
35
|
+
"data-slot": "message-header",
|
|
36
|
+
className: cn('flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground', className),
|
|
37
|
+
...props
|
|
38
|
+
}));
|
|
39
|
+
MessageHeader.displayName = 'MessageHeader';
|
|
40
|
+
const MessageFooter = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
41
|
+
ref: ref,
|
|
42
|
+
"data-slot": "message-footer",
|
|
43
|
+
className: cn('flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end', className),
|
|
44
|
+
...props
|
|
45
|
+
}));
|
|
46
|
+
MessageFooter.displayName = 'MessageFooter';
|
|
47
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|
|
@@ -76,7 +76,7 @@ function CreateOption({ query, disabled, onCreate, label }) {
|
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
const MultiSelect = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ id, options, selected, onChange, placeholder = 'Select items...', emptyMessage = 'No items found.', className, maxSelected, disabled = false, searchPlaceholder = 'Search...', clearAllText, overflow = 'wrap', onCreate, strings, onBlur, error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }, ref)=>{
|
|
79
|
+
const MultiSelect = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ id, options, selected, onChange, placeholder = 'Select items...', emptyMessage = 'No items found.', className, triggerClassName, maxSelected, disabled = false, searchPlaceholder = 'Search...', clearAllText, overflow = 'wrap', onCreate, strings, onBlur, error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }, ref)=>{
|
|
80
80
|
const text = {
|
|
81
81
|
...DEFAULT_MULTI_SELECT_STRINGS,
|
|
82
82
|
...strings
|
|
@@ -246,12 +246,12 @@ const MultiSelect = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ i
|
|
|
246
246
|
asChild: true,
|
|
247
247
|
children: grouped ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupTrigger, {
|
|
248
248
|
...triggerProps,
|
|
249
|
-
className: (0, index_cjs_namespaceObject.cn)('items-start', selected.length > 0 && !collapse && 'h-auto'),
|
|
249
|
+
className: (0, index_cjs_namespaceObject.cn)('items-start', selected.length > 0 && !collapse && 'h-auto', triggerClassName),
|
|
250
250
|
children: triggerContent
|
|
251
251
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
252
252
|
variant: "outline",
|
|
253
253
|
...triggerProps,
|
|
254
|
-
className: (0, index_cjs_namespaceObject.cn)('w-full justify-between future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:hover:bg-surface-overlay future:[&:hover:not(:has([data-slot=badge]:hover))]:bg-surface-hover future:font-normal future:text-foreground future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', selected.length > 0 && !collapse ? 'h-auto min-h-10' : 'h-10'),
|
|
254
|
+
className: (0, index_cjs_namespaceObject.cn)('w-full justify-between future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:hover:bg-surface-overlay future:[&:hover:not(:has([data-slot=badge]:hover))]:bg-surface-hover future:font-normal future:text-foreground future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background future:focus-visible:ring-primary future:aria-invalid:focus-visible:ring-error', selected.length > 0 && !collapse ? 'h-auto min-h-10' : 'h-10', triggerClassName),
|
|
255
255
|
children: triggerContent
|
|
256
256
|
})
|
|
257
257
|
}),
|
|
@@ -30,7 +30,17 @@ export interface MultiSelectProps {
|
|
|
30
30
|
onChange: (selected: string[]) => void;
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
emptyMessage?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Applied to the outer wrapper `div`, not the trigger button. To restyle the trigger, such as
|
|
35
|
+
* overriding the Future focus ring, use `triggerClassName`.
|
|
36
|
+
*/
|
|
33
37
|
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Applied to the trigger button, merged after its own classes, e.g.
|
|
40
|
+
* `future:focus-visible:ring-foreground` to replace the Future primary focus ring. Inside an
|
|
41
|
+
* InputGroup the group draws the ring, so set it there.
|
|
42
|
+
*/
|
|
43
|
+
triggerClassName?: string;
|
|
34
44
|
maxSelected?: number;
|
|
35
45
|
disabled?: boolean;
|
|
36
46
|
searchPlaceholder?: string;
|
|
@@ -47,7 +47,7 @@ function CreateOption({ query, disabled, onCreate, label }) {
|
|
|
47
47
|
})
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
const MultiSelect = /*#__PURE__*/ forwardRef(({ id, options, selected, onChange, placeholder = 'Select items...', emptyMessage = 'No items found.', className, maxSelected, disabled = false, searchPlaceholder = 'Search...', clearAllText, overflow = 'wrap', onCreate, strings, onBlur, error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }, ref)=>{
|
|
50
|
+
const MultiSelect = /*#__PURE__*/ forwardRef(({ id, options, selected, onChange, placeholder = 'Select items...', emptyMessage = 'No items found.', className, triggerClassName, maxSelected, disabled = false, searchPlaceholder = 'Search...', clearAllText, overflow = 'wrap', onCreate, strings, onBlur, error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }, ref)=>{
|
|
51
51
|
const text = {
|
|
52
52
|
...DEFAULT_MULTI_SELECT_STRINGS,
|
|
53
53
|
...strings
|
|
@@ -217,12 +217,12 @@ const MultiSelect = /*#__PURE__*/ forwardRef(({ id, options, selected, onChange,
|
|
|
217
217
|
asChild: true,
|
|
218
218
|
children: grouped ? /*#__PURE__*/ jsx(InputGroupTrigger, {
|
|
219
219
|
...triggerProps,
|
|
220
|
-
className: cn('items-start', selected.length > 0 && !collapse && 'h-auto'),
|
|
220
|
+
className: cn('items-start', selected.length > 0 && !collapse && 'h-auto', triggerClassName),
|
|
221
221
|
children: triggerContent
|
|
222
222
|
}) : /*#__PURE__*/ jsx(Button, {
|
|
223
223
|
variant: "outline",
|
|
224
224
|
...triggerProps,
|
|
225
|
-
className: cn('w-full justify-between future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:hover:bg-surface-overlay future:[&:hover:not(:has([data-slot=badge]:hover))]:bg-surface-hover future:font-normal future:text-foreground future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', selected.length > 0 && !collapse ? 'h-auto min-h-10' : 'h-10'),
|
|
225
|
+
className: cn('w-full justify-between future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:hover:bg-surface-overlay future:[&:hover:not(:has([data-slot=badge]:hover))]:bg-surface-hover future:font-normal future:text-foreground future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background future:focus-visible:ring-primary future:aria-invalid:focus-visible:ring-error', selected.length > 0 && !collapse ? 'h-auto min-h-10' : 'h-10', triggerClassName),
|
|
226
226
|
children: triggerContent
|
|
227
227
|
})
|
|
228
228
|
}),
|
|
@@ -65,7 +65,7 @@ SelectValue.displayName = react_select_namespaceObject.Value.displayName;
|
|
|
65
65
|
const selectTriggerVariants = (0, external_class_variance_authority_namespaceObject.cva)('flex w-full cursor-pointer items-center justify-between bg-transparent text-base transition-colors data-[placeholder]:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1 future:font-normal', {
|
|
66
66
|
variants: {
|
|
67
67
|
grouped: {
|
|
68
|
-
false: 'h-9 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40',
|
|
68
|
+
false: 'h-9 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 future:focus:ring-primary future:focus-visible:ring-primary future:aria-invalid:focus:ring-error future:aria-invalid:focus-visible:ring-error',
|
|
69
69
|
true: 'h-full min-h-5 min-w-0 flex-1 gap-2 p-0'
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -28,7 +28,7 @@ SelectValue.displayName = Value.displayName;
|
|
|
28
28
|
const selectTriggerVariants = cva('flex w-full cursor-pointer items-center justify-between bg-transparent text-base transition-colors data-[placeholder]:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1 future:font-normal', {
|
|
29
29
|
variants: {
|
|
30
30
|
grouped: {
|
|
31
|
-
false: 'h-9 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40',
|
|
31
|
+
false: 'h-9 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 future:focus:ring-primary future:focus-visible:ring-primary future:aria-invalid:focus:ring-error future:aria-invalid:focus-visible:ring-error',
|
|
32
32
|
true: 'h-full min-h-5 min-w-0 flex-1 gap-2 p-0'
|
|
33
33
|
}
|
|
34
34
|
},
|
|
@@ -166,7 +166,7 @@ const Textarea = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ 'ari
|
|
|
166
166
|
"data-slot": group.inGroup ? 'input-group-control' : 'textarea',
|
|
167
167
|
id: id,
|
|
168
168
|
...validation.aria,
|
|
169
|
-
className: (0, index_cjs_namespaceObject.cn)('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 aria-invalid:focus-visible:ring-error md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', !managed && 'min-h-[80px]', managed && 'resize-y', group.inGroup && IN_GROUP_CLASS, className),
|
|
169
|
+
className: (0, index_cjs_namespaceObject.cn)('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 aria-invalid:focus-visible:ring-error md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background future:focus-visible:ring-primary future:aria-invalid:focus-visible:ring-error', !managed && 'min-h-[80px]', managed && 'resize-y', group.inGroup && IN_GROUP_CLASS, className),
|
|
170
170
|
ref: setRef,
|
|
171
171
|
style: style,
|
|
172
172
|
onChange: (event)=>{
|
|
@@ -138,7 +138,7 @@ const Textarea = /*#__PURE__*/ forwardRef(({ 'aria-describedby': ariaDescribedBy
|
|
|
138
138
|
"data-slot": group.inGroup ? 'input-group-control' : 'textarea',
|
|
139
139
|
id: id,
|
|
140
140
|
...validation.aria,
|
|
141
|
-
className: cn('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 aria-invalid:focus-visible:ring-error md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', !managed && 'min-h-[80px]', managed && 'resize-y', group.inGroup && IN_GROUP_CLASS, className),
|
|
141
|
+
className: cn('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 aria-invalid:focus-visible:ring-error md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background future:focus-visible:ring-primary future:aria-invalid:focus-visible:ring-error', !managed && 'min-h-[80px]', managed && 'resize-y', group.inGroup && IN_GROUP_CLASS, className),
|
|
142
142
|
ref: setRef,
|
|
143
143
|
style: style,
|
|
144
144
|
onChange: (event)=>{
|