@sqlrooms/ui 0.29.0-rc.2 → 0.29.0-rc.3
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/resizable.d.ts +302 -20
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +12 -5
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/tab-strip.d.ts +12 -5
- package/dist/components/tab-strip.d.ts.map +1 -1
- package/dist/components/tab-strip.js +27 -11
- package/dist/components/tab-strip.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/tailwind-preset.css +3 -1
- package/dist/components/toast.d.ts +0 -16
- package/dist/components/toast.d.ts.map +0 -1
- package/dist/components/toast.js +0 -35
- package/dist/components/toast.js.map +0 -1
- package/dist/components/toaster.d.ts +0 -3
- package/dist/components/toaster.d.ts.map +0 -1
- package/dist/components/toaster.js +0 -24
- package/dist/components/toaster.js.map +0 -1
- package/dist/hooks/use-toast.d.ts +0 -45
- package/dist/hooks/use-toast.d.ts.map +0 -1
- package/dist/hooks/use-toast.js +0 -129
- package/dist/hooks/use-toast.js.map +0 -1
- package/dist/tailwind-preset.d.ts +0 -3
- package/dist/tailwind-preset.d.ts.map +0 -1
- package/dist/tailwind-preset.js +0 -152
- package/dist/tailwind-preset.js.map +0 -1
|
@@ -1,24 +1,306 @@
|
|
|
1
1
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
2
|
-
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
type ResizablePanelOrientation = Exclude<ResizablePrimitive.GroupProps['orientation'], undefined>;
|
|
3
|
+
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const ResizablePanel: import("react").ForwardRefExoticComponent<{
|
|
5
|
+
slot?: string | undefined | undefined;
|
|
6
|
+
style?: import("react").CSSProperties | undefined;
|
|
7
|
+
title?: string | undefined | undefined;
|
|
8
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
9
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
10
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
11
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
12
|
+
accessKey?: string | undefined | undefined;
|
|
13
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
14
|
+
autoFocus?: boolean | undefined | undefined;
|
|
15
|
+
className?: string | undefined | undefined;
|
|
16
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
17
|
+
contextMenu?: string | undefined | undefined;
|
|
18
|
+
dir?: string | undefined | undefined;
|
|
19
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
20
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
21
|
+
hidden?: boolean | undefined | undefined;
|
|
22
|
+
id?: string | undefined | undefined;
|
|
23
|
+
lang?: string | undefined | undefined;
|
|
24
|
+
nonce?: string | undefined | undefined;
|
|
25
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
26
|
+
tabIndex?: number | undefined | undefined;
|
|
27
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
28
|
+
radioGroup?: string | undefined | undefined;
|
|
29
|
+
role?: import("react").AriaRole | undefined;
|
|
30
|
+
about?: string | undefined | undefined;
|
|
31
|
+
content?: string | undefined | undefined;
|
|
32
|
+
datatype?: string | undefined | undefined;
|
|
33
|
+
inlist?: any;
|
|
34
|
+
prefix?: string | undefined | undefined;
|
|
35
|
+
property?: string | undefined | undefined;
|
|
36
|
+
rel?: string | undefined | undefined;
|
|
37
|
+
resource?: string | undefined | undefined;
|
|
38
|
+
rev?: string | undefined | undefined;
|
|
39
|
+
typeof?: string | undefined | undefined;
|
|
40
|
+
vocab?: string | undefined | undefined;
|
|
41
|
+
autoCorrect?: string | undefined | undefined;
|
|
42
|
+
autoSave?: string | undefined | undefined;
|
|
43
|
+
color?: string | undefined | undefined;
|
|
44
|
+
itemProp?: string | undefined | undefined;
|
|
45
|
+
itemScope?: boolean | undefined | undefined;
|
|
46
|
+
itemType?: string | undefined | undefined;
|
|
47
|
+
itemID?: string | undefined | undefined;
|
|
48
|
+
itemRef?: string | undefined | undefined;
|
|
49
|
+
results?: number | undefined | undefined;
|
|
50
|
+
security?: string | undefined | undefined;
|
|
51
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
52
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
53
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
54
|
+
popoverTarget?: string | undefined | undefined;
|
|
55
|
+
inert?: boolean | undefined | undefined;
|
|
56
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
57
|
+
is?: string | undefined | undefined;
|
|
58
|
+
exportparts?: string | undefined | undefined;
|
|
59
|
+
part?: string | undefined | undefined;
|
|
60
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
61
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
62
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
63
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
64
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
65
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
66
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
67
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
68
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
69
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
70
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
71
|
+
"aria-controls"?: string | undefined | undefined;
|
|
72
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
73
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
74
|
+
"aria-description"?: string | undefined | undefined;
|
|
75
|
+
"aria-details"?: string | undefined | undefined;
|
|
76
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
77
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
78
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
79
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
80
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
81
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
82
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
83
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
84
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
85
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
86
|
+
"aria-label"?: string | undefined | undefined;
|
|
87
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
88
|
+
"aria-level"?: number | undefined | undefined;
|
|
89
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
90
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
91
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
92
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
93
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
94
|
+
"aria-owns"?: string | undefined | undefined;
|
|
95
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
96
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
97
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
98
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
100
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
102
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
103
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
104
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
105
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
106
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
107
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
108
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
109
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
110
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
111
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
112
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
113
|
+
children?: import("react").ReactNode;
|
|
114
|
+
dangerouslySetInnerHTML?: {
|
|
115
|
+
__html: string | TrustedHTML;
|
|
116
|
+
} | undefined | undefined;
|
|
117
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
118
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
119
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
120
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
121
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
122
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
123
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
124
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
125
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
126
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
127
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
128
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
129
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
130
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
131
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
132
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
133
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
134
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
135
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLDivElement> | undefined;
|
|
136
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
137
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
138
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
139
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
140
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
141
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
142
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
143
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
144
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
145
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
146
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
147
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
148
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
149
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
150
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
151
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
152
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
153
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
154
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
155
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
156
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
157
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
158
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
159
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
160
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
161
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
162
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
163
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
164
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
165
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
170
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
171
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
172
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
173
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
174
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
175
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
195
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
196
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
197
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
198
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
199
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
200
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
201
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
202
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
203
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
204
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
205
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
206
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
207
|
+
onDrag?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
208
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
209
|
+
onDragEnd?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
210
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
211
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
212
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
213
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
214
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
215
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
216
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
217
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
218
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
219
|
+
onDragStart?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
220
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
221
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
222
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
223
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
224
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
225
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
226
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
227
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
228
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
230
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
231
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
234
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
235
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
236
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
237
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
238
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
239
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
241
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
242
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
243
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
244
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
245
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
253
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
254
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
256
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
258
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
259
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
260
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
261
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
262
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
264
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
265
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
266
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
267
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
268
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
269
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
270
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
271
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
272
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
273
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
274
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
275
|
+
onToggle?: import("react").ToggleEventHandler<HTMLDivElement> | undefined;
|
|
276
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLDivElement> | undefined;
|
|
277
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
278
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
279
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
280
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
281
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
282
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
283
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
284
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
17
285
|
} & {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
286
|
+
className?: string | undefined;
|
|
287
|
+
collapsedSize?: number | string | undefined;
|
|
288
|
+
collapsible?: boolean | undefined;
|
|
289
|
+
defaultSize?: number | string | undefined;
|
|
290
|
+
disabled?: boolean | undefined;
|
|
291
|
+
elementRef?: import("react").Ref<HTMLDivElement | null> | undefined;
|
|
292
|
+
groupResizeBehavior?: "preserve-relative-size" | "preserve-pixel-size" | undefined;
|
|
293
|
+
id?: string | number | undefined;
|
|
294
|
+
maxSize?: number | string | undefined;
|
|
295
|
+
minSize?: number | string | undefined;
|
|
296
|
+
onResize?: ((panelSize: ResizablePrimitive.PanelSize, id: string | number | undefined, prevPanelSize: ResizablePrimitive.PanelSize | undefined) => void) | undefined;
|
|
297
|
+
panelRef?: import("react").Ref<ResizablePrimitive.PanelImperativeHandle | null> | undefined;
|
|
298
|
+
style?: import("react").CSSProperties | undefined;
|
|
299
|
+
} & import("react").RefAttributes<ResizablePrimitive.PanelImperativeHandle>>;
|
|
300
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
|
|
21
301
|
withHandle?: boolean;
|
|
22
|
-
})
|
|
23
|
-
export {
|
|
302
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
303
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
304
|
+
export type { ResizablePanelOrientation };
|
|
305
|
+
export type { PanelImperativeHandle as ResizablePanelHandle } from 'react-resizable-panels';
|
|
24
306
|
//# sourceMappingURL=resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAK7D,KAAK,yBAAyB,GAAG,OAAO,CACtC,kBAAkB,CAAC,UAAU,CAAC,aAAa,CAAC,EAC5C,SAAS,CACV,CAAC;AAEF,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,UAAU,2CAW/B;AAED,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAWlB,CAAC;AAIH,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,cAAc,GAAG;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,2CAeA;AAED,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAC,CAAC;AAC9D,YAAY,EAAC,yBAAyB,EAAC,CAAC;AACxC,YAAY,EAAC,qBAAqB,IAAI,oBAAoB,EAAC,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { GripVertical } from 'lucide-react';
|
|
4
3
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
5
4
|
import { cn } from '../lib/utils';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
const ResizablePanel = forwardRef(({ ...props }, ref) => {
|
|
10
|
+
return (_jsx(ResizablePrimitive.Panel, { panelRef: ref, "data-slot": "resizable-panel", ...props }));
|
|
11
|
+
});
|
|
12
|
+
ResizablePanel.displayName = 'ResizablePanel';
|
|
13
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
14
|
+
return (_jsx(ResizablePrimitive.Separator, { "data-slot": "resizable-handle", className: cn('bg-border ring-offset-background focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90', className), ...props, children: withHandle && (_jsx("div", { className: "bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg" })) }));
|
|
15
|
+
}
|
|
16
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
10
17
|
//# sourceMappingURL=resizable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.js","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,
|
|
1
|
+
{"version":3,"file":"resizable.js","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAChC,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AAOjC,SAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACsB;IAC9B,OAAO,CACL,KAAC,kBAAkB,CAAC,KAAK,iBACb,uBAAuB,EACjC,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,MAAM,cAAc,GAAG,UAAU,CAG/B,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,GAAG,EAAE,EAAE;IACpB,OAAO,CACL,KAAC,kBAAkB,CAAC,KAAK,IACvB,QAAQ,EAAE,GAAG,eACH,iBAAiB,KACvB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,SAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EAGT;IACC,OAAO,CACL,KAAC,kBAAkB,CAAC,SAAS,iBACjB,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CACX,skBAAskB,EACtkB,SAAS,CACV,KACG,KAAK,YAER,UAAU,IAAI,CACb,cAAK,SAAS,EAAC,iDAAiD,GAAG,CACpE,GAC4B,CAChC,CAAC;AACJ,CAAC;AAED,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAC,CAAC","sourcesContent":["'use client';\n\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport {cn} from '../lib/utils';\nimport {forwardRef} from 'react';\n\ntype ResizablePanelOrientation = Exclude<\n ResizablePrimitive.GroupProps['orientation'],\n undefined\n>;\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn(\n 'flex h-full w-full aria-[orientation=vertical]:flex-col',\n className,\n )}\n {...props}\n />\n );\n}\n\nconst ResizablePanel = forwardRef<\n ResizablePrimitive.PanelImperativeHandle,\n ResizablePrimitive.PanelProps\n>(({...props}, ref) => {\n return (\n <ResizablePrimitive.Panel\n panelRef={ref}\n data-slot=\"resizable-panel\"\n {...props}\n />\n );\n});\n\nResizablePanel.displayName = 'ResizablePanel';\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n 'bg-border ring-offset-background focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg\" />\n )}\n </ResizablePrimitive.Separator>\n );\n}\n\nexport {ResizableHandle, ResizablePanel, ResizablePanelGroup};\nexport type {ResizablePanelOrientation};\nexport type {PanelImperativeHandle as ResizablePanelHandle} from 'react-resizable-panels';\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
2
3
|
export interface TabDescriptor {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
|
@@ -66,15 +67,18 @@ interface TabStripSearchDropdownProps {
|
|
|
66
67
|
* Shows open tabs first and closed tabs second (dimmed). When searching, shows all matching tabs.
|
|
67
68
|
*/
|
|
68
69
|
declare function TabStripSearchDropdown({ className, triggerClassName, autoFocus, tooltip, triggerIcon, emptyMessage, searchEmptyMessage, closedTabsLabel, sortSearchItems, getTabLastOpenedAt, }: TabStripSearchDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
/**
|
|
71
|
+
* A general-purpose button for the tab strip.
|
|
72
|
+
*/
|
|
73
|
+
declare function TabStripButton({ className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
type TabStripNewButtonProps = ButtonProps & {
|
|
71
75
|
/** Optional tooltip content for the button. */
|
|
72
76
|
tooltip?: React.ReactNode;
|
|
73
|
-
}
|
|
77
|
+
};
|
|
74
78
|
/**
|
|
75
79
|
* Renders a button to create a new tab.
|
|
76
80
|
*/
|
|
77
|
-
declare function TabStripNewButton({
|
|
81
|
+
declare function TabStripNewButton({ tooltip, ...props }: TabStripNewButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
78
82
|
export interface TabStripProps {
|
|
79
83
|
className?: string;
|
|
80
84
|
tabsListClassName?: string;
|
|
@@ -87,6 +91,8 @@ export interface TabStripProps {
|
|
|
87
91
|
selectedTabId?: string | null;
|
|
88
92
|
/** If true, hides the close button when only one tab remains open. */
|
|
89
93
|
preventCloseLastTab?: boolean;
|
|
94
|
+
/** Whether tabs can be closed. Defaults to true. */
|
|
95
|
+
closeable?: boolean;
|
|
90
96
|
/** Called when a tab is closed (hidden, can be reopened). */
|
|
91
97
|
onClose?: (tabId: string) => void;
|
|
92
98
|
/** Called when the list of open tabs changes (open from dropdown or reorder). */
|
|
@@ -127,10 +133,11 @@ export interface TabStripProps {
|
|
|
127
133
|
* <TabStrip.NewButton />
|
|
128
134
|
* </TabStrip>
|
|
129
135
|
*/
|
|
130
|
-
declare function TabStripRoot({ className, tabsListClassName, children, tabs, openTabs, selectedTabId, preventCloseLastTab, onClose, onOpenTabsChange, onSelect, onCreate, onRename, renderTabTitle, renderTabMenu, renderSearchItemActions, renderTabLabel, }: TabStripProps): import("react/jsx-runtime").JSX.Element;
|
|
136
|
+
declare function TabStripRoot({ className, tabsListClassName, children, tabs, openTabs, selectedTabId, preventCloseLastTab, closeable, onClose, onOpenTabsChange, onSelect, onCreate, onRename, renderTabTitle, renderTabMenu, renderSearchItemActions, renderTabLabel, }: TabStripProps): import("react/jsx-runtime").JSX.Element;
|
|
131
137
|
export declare const TabStrip: typeof TabStripRoot & {
|
|
132
138
|
Tabs: typeof TabStripTabs;
|
|
133
139
|
SearchDropdown: typeof TabStripSearchDropdown;
|
|
140
|
+
Button: typeof TabStripButton;
|
|
134
141
|
NewButton: typeof TabStripNewButton;
|
|
135
142
|
MenuItem: typeof TabStripMenuItem;
|
|
136
143
|
MenuSeparator: typeof TabStripMenuSeparator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-strip.d.ts","sourceRoot":"","sources":["../../src/components/tab-strip.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAQN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"tab-strip.d.ts","sourceRoot":"","sources":["../../src/components/tab-strip.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAQN,MAAM,OAAO,CAAC;AAKf,OAAO,EAAS,WAAW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C3B,SAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,cAAc,GACf,EAAE,aAAa,2CAyNf;AAGD,eAAO,MAAM,QAAQ;;;;;;;;CAQnB,CAAC;AAEH,YAAY,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,iBAAiB,GAClB,CAAC"}
|
|
@@ -21,10 +21,15 @@ function useTabStripContext() {
|
|
|
21
21
|
}
|
|
22
22
|
return context;
|
|
23
23
|
}
|
|
24
|
+
const TAB_STRIP_BUTTON_CLASSNAMES = [
|
|
25
|
+
'flex h-full min-w-0 min-h-7 items-center',
|
|
26
|
+
'hover:bg-primary/10 overflow-hidden px-6 py-1 font-normal',
|
|
27
|
+
'focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-inset',
|
|
28
|
+
];
|
|
24
29
|
/**
|
|
25
30
|
* A single sortable tab item.
|
|
26
31
|
*/
|
|
27
|
-
function SortableTab({ tab, tabClassName, editingTabId,
|
|
32
|
+
function SortableTab({ tab, tabClassName, editingTabId, closeable = true, onClose, onStartEditing, onStopEditing, onInlineRename, renderTabTitle, renderTabMenu, renderTabLabel, }) {
|
|
28
33
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: tab.id });
|
|
29
34
|
const style = {
|
|
30
35
|
// Use Translate instead of Transform to avoid scale changes that squeeze the tab
|
|
@@ -35,16 +40,16 @@ function SortableTab({ tab, tabClassName, editingTabId, hideCloseButton, onClose
|
|
|
35
40
|
opacity: isDragging ? 0.5 : 1,
|
|
36
41
|
};
|
|
37
42
|
const menuContent = renderTabMenu?.(tab);
|
|
38
|
-
return (_jsx("div", { ref: setNodeRef, className: "h-full shrink-0", style: style, "data-tab-id": tab.id, ...attributes, ...listeners, tabIndex: -1, children: _jsx("div", { "data-state": editingTabId === tab.id ? 'editing' : undefined, className: cn('data-[state=inactive]:hover:bg-primary/5', 'group flex h-full max-w-[200px] min-w-[100px] shrink-0 cursor-grab', 'items-center justify-between gap-1 overflow-hidden rounded-b-none', 'py-0 pr-1 pl-4 font-normal data-[state=active]:shadow-none', tabClassName, editingTabId === tab.id && 'focus-visible:ring-0'), children: _jsxs("div", { className: "relative flex h-full min-w-0 flex-1 items-center", children: [_jsx(TabsTrigger, { value: tab.id, tabIndex: editingTabId === tab.id ? -1 : undefined, "data-editing": editingTabId === tab.id ? '' : undefined, className: cn('flex
|
|
43
|
+
return (_jsx("div", { ref: setNodeRef, className: "h-full shrink-0", style: style, "data-tab-id": tab.id, ...attributes, ...listeners, tabIndex: -1, children: _jsx("div", { "data-state": editingTabId === tab.id ? 'editing' : undefined, className: cn('data-[state=inactive]:hover:bg-primary/5', 'group flex h-full max-w-[200px] min-w-[100px] shrink-0 cursor-grab', 'items-center justify-between gap-1 overflow-hidden rounded-b-none', 'py-0 pr-1 pl-4 font-normal data-[state=active]:shadow-none', tabClassName, editingTabId === tab.id && 'focus-visible:ring-0'), children: _jsxs("div", { className: "relative flex h-full min-w-0 flex-1 items-center", children: [_jsx(TabsTrigger, { value: tab.id, tabIndex: editingTabId === tab.id ? -1 : undefined, "data-editing": editingTabId === tab.id ? '' : undefined, className: cn(...TAB_STRIP_BUTTON_CLASSNAMES, 'flex-1 justify-start gap-1', 'data-[state=active]:bg-primary/10 data-[state=active]:text-foreground data-[state=active]:shadow-none', editingTabId === tab.id && 'focus-visible:ring-0'), onDoubleClick: () => onStartEditing(tab.id), children: editingTabId !== tab.id ? (_jsx("div", { className: "truncate text-sm", children: renderTabLabel ? renderTabLabel(tab) : tab.name })) : (_jsx(EditableText, { value: tab.name, onChange: (newName) => onInlineRename(tab.id, newName), className: "h-6 min-w-0 flex-1 truncate text-sm shadow-none", isEditing: true, autoFocus: true, selectOnFocus: true, allowTabFocusWhenNotEditing: false, onEditingChange: (isEditing) => {
|
|
39
44
|
if (!isEditing) {
|
|
40
45
|
onStopEditing();
|
|
41
46
|
}
|
|
42
|
-
} })) }), _jsxs("div", { className: "flex shrink-0 items-center", children: [menuContent && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": "Tab options", className: "hover:bg-primary/10 focus-visible:bg-primary/10 focus-visible:ring-
|
|
47
|
+
} })) }), _jsxs("div", { className: "flex shrink-0 items-center", children: [menuContent && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": "Tab options", className: "hover:bg-primary/10 focus-visible:bg-primary/10 focus-visible:ring-ring absolute top-1/2 left-1 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded p-1 opacity-0 outline-hidden group-hover:opacity-100 focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-0 data-[state=open]:opacity-100", onMouseDown: (event) => {
|
|
43
48
|
event.stopPropagation();
|
|
44
49
|
event.preventDefault();
|
|
45
50
|
}, onClick: (event) => {
|
|
46
51
|
event.stopPropagation();
|
|
47
|
-
}, children: _jsx(EllipsisVerticalIcon, { className: "h-3 w-3" }) }) }), _jsx(DropdownMenuContent, { align: "start", children: menuContent })] })),
|
|
52
|
+
}, children: _jsx(EllipsisVerticalIcon, { className: "h-3 w-3" }) }) }), _jsx(DropdownMenuContent, { align: "start", children: menuContent })] })), closeable && (_jsx("button", { type: "button", "aria-label": "Close tab", className: "hover:bg-primary/10 focus-visible:bg-primary/10 focus-visible:ring-ring absolute top-1/2 right-1 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded p-1 opacity-0 outline-hidden group-hover:opacity-100 focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-0", onMouseDown: (event) => {
|
|
48
53
|
event.stopPropagation();
|
|
49
54
|
event.preventDefault();
|
|
50
55
|
}, onClick: (event) => {
|
|
@@ -81,7 +86,7 @@ function TabStripSearchItemAction({ icon, onClick, 'aria-label': ariaLabel, clas
|
|
|
81
86
|
* Renders the scrollable row of open tabs with drag-to-reorder support.
|
|
82
87
|
*/
|
|
83
88
|
function TabStripTabs({ className, tabClassName }) {
|
|
84
|
-
const { openTabItems, editingTabId, scrollContainerRef, onOpenTabsChange, renderTabTitle, renderTabMenu, renderTabLabel, preventCloseLastTab, handleStartEditing, handleStopEditing, handleInlineRename, handleClose, } = useTabStripContext();
|
|
89
|
+
const { openTabItems, editingTabId, scrollContainerRef, onOpenTabsChange, renderTabTitle, renderTabMenu, renderTabLabel, preventCloseLastTab, closeable, handleStartEditing, handleStopEditing, handleInlineRename, handleClose, } = useTabStripContext();
|
|
85
90
|
const sensors = useSensors(useSensor(PointerSensor, {
|
|
86
91
|
activationConstraint: {
|
|
87
92
|
distance: 5, // 5px movement before drag starts (allows clicks)
|
|
@@ -99,7 +104,7 @@ function TabStripTabs({ className, tabClassName }) {
|
|
|
99
104
|
}
|
|
100
105
|
};
|
|
101
106
|
const tabIds = useMemo(() => openTabItems.map((t) => t.id), [openTabItems]);
|
|
102
|
-
return (_jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, modifiers: DRAG_MODIFIERS, autoScroll: true, onDragEnd: handleDragEnd, children: _jsx(SortableContext, { items: tabIds, strategy: horizontalListSortingStrategy, children: _jsx(ScrollableRow, { className: "h-full min-w-0
|
|
107
|
+
return (_jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, modifiers: DRAG_MODIFIERS, autoScroll: true, onDragEnd: handleDragEnd, children: _jsx(SortableContext, { items: tabIds, strategy: horizontalListSortingStrategy, children: _jsx(ScrollableRow, { className: "h-full min-w-0 shrink overflow-hidden", scrollRef: scrollContainerRef, scrollClassName: cn('flex h-full min-w-0 items-center gap-1 overflow-x-auto overflow-y-visible', 'pl-1 pr-1 scroll-pl-7 scroll-pr-7 [&::-webkit-scrollbar]:hidden', className), arrowVisibility: "always", arrowClassName: "w-7", arrowIconClassName: "h-4 w-4 opacity-60", children: openTabItems.map((tab) => (_jsx(SortableTab, { tab: tab, tabClassName: tabClassName, editingTabId: editingTabId, closeable: closeable && !(preventCloseLastTab && openTabItems.length === 1), onClose: handleClose, onStartEditing: handleStartEditing, onStopEditing: handleStopEditing, onInlineRename: handleInlineRename, renderTabTitle: renderTabTitle, renderTabMenu: renderTabMenu, renderTabLabel: renderTabLabel }, tab.id))) }) }) }));
|
|
103
108
|
}
|
|
104
109
|
/**
|
|
105
110
|
* Renders the dropdown with search for browsing tabs.
|
|
@@ -157,7 +162,7 @@ function TabStripSearchDropdown({ className, triggerClassName, autoFocus = true,
|
|
|
157
162
|
const disableClose = preventCloseLastTab && (openTabsList.length ?? 0) <= 1;
|
|
158
163
|
return (_jsxs(_Fragment, { children: [renderSearchItemActions?.(tab), _jsx(TabStripSearchItemAction, { icon: _jsx(XIcon, { className: "h-3 w-3" }), "aria-label": `Close ${tab.name}`, onClick: disableClose ? undefined : () => handleClose(tab.id), className: cn(disableClose && 'pointer-events-none opacity-40') })] }));
|
|
159
164
|
};
|
|
160
|
-
const triggerButton = (_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", "aria-label": "Browse tabs", className: cn(
|
|
165
|
+
const triggerButton = (_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", "aria-label": "Browse tabs", size: "icon", className: cn(...TAB_STRIP_BUTTON_CLASSNAMES, triggerClassName), children: triggerIcon ?? _jsx(ListCollapseIcon, { className: "h-4 w-4" }) }) }));
|
|
161
166
|
return (_jsxs(DropdownMenu, { open: isOpen, onOpenChange: handleOpenChange, children: [tooltip ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: triggerButton }), _jsx(TooltipContent, { children: tooltip })] }) })) : (triggerButton), _jsxs(DropdownMenuContent, { align: "start", onCloseAutoFocus: (event) => event.preventDefault(), className: cn('flex max-h-[400px] max-w-[240px] flex-col overflow-x-hidden', className), children: [_jsxs("div", { className: "flex shrink-0 items-center gap-1 px-2", children: [_jsx(SearchIcon, { className: "text-muted-foreground", size: 14 }), _jsx(Input, { value: search, onChange: (event) => setSearch(event.target.value), onKeyDown: (event) => {
|
|
162
167
|
if (event.key === 'ArrowDown' || event.key === 'Tab') {
|
|
163
168
|
event.preventDefault();
|
|
@@ -179,15 +184,24 @@ function DropdownTabItems({ tabs, emptyMessage, onTabClick, renderActions, getIt
|
|
|
179
184
|
}
|
|
180
185
|
return (_jsx(_Fragment, { children: tabs.map((tab) => (_jsxs(DropdownMenuItem, { onClick: () => onTabClick?.(tab.id), className: cn('flex h-7 cursor-pointer items-center justify-between truncate', getItemClassName?.(tab)), children: [_jsx("span", { className: "xs truncate pl-1", children: tab.name }), renderActions && (_jsx("div", { className: "flex items-center gap-2", children: renderActions(tab) }))] }, tab.id))) }));
|
|
181
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* A general-purpose button for the tab strip.
|
|
189
|
+
*/
|
|
190
|
+
function TabStripButton({ className, ...props }) {
|
|
191
|
+
return (_jsx(Button, { size: "icon", variant: "ghost", className: cn(...TAB_STRIP_BUTTON_CLASSNAMES, 'h-full shrink-0', className), ...props }));
|
|
192
|
+
}
|
|
182
193
|
/**
|
|
183
194
|
* Renders a button to create a new tab.
|
|
184
195
|
*/
|
|
185
|
-
function TabStripNewButton({
|
|
196
|
+
function TabStripNewButton({ tooltip, ...props }) {
|
|
186
197
|
const { onCreate } = useTabStripContext();
|
|
187
198
|
if (!onCreate) {
|
|
188
199
|
return null;
|
|
189
200
|
}
|
|
190
|
-
const button = (_jsx(
|
|
201
|
+
const button = (_jsx(TabStripButton, { ...props, "aria-label": props['aria-label'] || 'Create new tab', onClick: (e) => {
|
|
202
|
+
onCreate();
|
|
203
|
+
props.onClick?.(e);
|
|
204
|
+
}, children: _jsx(PlusIcon, { className: "h-4 w-4" }) }));
|
|
191
205
|
if (tooltip) {
|
|
192
206
|
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: button }), _jsx(TooltipContent, { children: tooltip })] }) }));
|
|
193
207
|
}
|
|
@@ -214,7 +228,7 @@ function TabStripNewButton({ className, tooltip }) {
|
|
|
214
228
|
* <TabStrip.NewButton />
|
|
215
229
|
* </TabStrip>
|
|
216
230
|
*/
|
|
217
|
-
function TabStripRoot({ className, tabsListClassName, children, tabs, openTabs, selectedTabId, preventCloseLastTab = false, onClose, onOpenTabsChange, onSelect, onCreate, onRename, renderTabTitle, renderTabMenu, renderSearchItemActions, renderTabLabel, }) {
|
|
231
|
+
function TabStripRoot({ className, tabsListClassName, children, tabs, openTabs, selectedTabId, preventCloseLastTab = false, closeable = true, onClose, onOpenTabsChange, onSelect, onCreate, onRename, renderTabTitle, renderTabMenu, renderSearchItemActions, renderTabLabel, }) {
|
|
218
232
|
const [search, setSearch] = useState('');
|
|
219
233
|
const [editingTabId, setEditingTabId] = useState(null);
|
|
220
234
|
const scrollContainerRef = useRef(null);
|
|
@@ -355,6 +369,7 @@ function TabStripRoot({ className, tabsListClassName, children, tabs, openTabs,
|
|
|
355
369
|
selectedTabId,
|
|
356
370
|
openTabs,
|
|
357
371
|
preventCloseLastTab,
|
|
372
|
+
closeable,
|
|
358
373
|
getLastOpenedAt: (tabId) => lastOpenedAtRef.current.get(tabId),
|
|
359
374
|
onOpenTabsChange,
|
|
360
375
|
onSelect,
|
|
@@ -373,12 +388,13 @@ function TabStripRoot({ className, tabsListClassName, children, tabs, openTabs,
|
|
|
373
388
|
const handleValueChange = (value) => {
|
|
374
389
|
onSelect?.(value);
|
|
375
390
|
};
|
|
376
|
-
return (_jsx(Tabs, { value: selectedTabId ?? undefined, onValueChange: handleValueChange, activationMode: "manual", className: cn('bg-muted w-full min-w-0', className), children: _jsx(TabStripContext.Provider, { value: contextValue, children: _jsx(TabsList, { className: cn('flex h-9 w-full min-w-0 items-center justify-start gap-2 overflow-visible bg-transparent p-
|
|
391
|
+
return (_jsx(Tabs, { value: selectedTabId ?? undefined, onValueChange: handleValueChange, activationMode: "manual", className: cn('bg-muted w-full min-w-0', className), children: _jsx(TabStripContext.Provider, { value: contextValue, children: _jsx(TabsList, { className: cn('flex h-9 w-full min-w-0 items-center justify-start gap-2 overflow-visible bg-transparent p-1', tabsListClassName), children: children ?? (_jsxs(_Fragment, { children: [_jsx(TabStripSearchDropdown, {}), _jsx(TabStripTabs, {}), _jsx(TabStripNewButton, {})] })) }) }) }));
|
|
377
392
|
}
|
|
378
393
|
// Attach subcomponents
|
|
379
394
|
export const TabStrip = Object.assign(TabStripRoot, {
|
|
380
395
|
Tabs: TabStripTabs,
|
|
381
396
|
SearchDropdown: TabStripSearchDropdown,
|
|
397
|
+
Button: TabStripButton,
|
|
382
398
|
NewButton: TabStripNewButton,
|
|
383
399
|
MenuItem: TabStripMenuItem,
|
|
384
400
|
MenuSeparator: TabStripMenuSeparator,
|