@usefragments/ui 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/assets/ui.css +1261 -849
- package/dist/chart.cjs +60 -24
- package/dist/chart.js +38 -24
- package/dist/codeblock.cjs +14 -6
- package/dist/codeblock.js +14 -6
- package/dist/colorpicker.cjs +56 -9
- package/dist/colorpicker.js +34 -9
- package/dist/components/Badge/Badge.module.scss.cjs +23 -16
- package/dist/components/Badge/Badge.module.scss.js +23 -16
- package/dist/components/Badge/index.cjs +8 -1
- package/dist/components/Badge/index.d.ts +3 -0
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +8 -1
- package/dist/components/Button/Button.module.scss.cjs +16 -13
- package/dist/components/Button/Button.module.scss.js +16 -13
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Chart/index.d.ts +3 -0
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +21 -21
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +21 -21
- package/dist/components/CodeBlock/index.d.ts.map +1 -1
- package/dist/components/ColorPicker/index.d.ts +4 -0
- package/dist/components/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.module.scss.cjs +23 -23
- package/dist/components/Combobox/Combobox.module.scss.js +23 -23
- package/dist/components/Command/Command.module.scss.cjs +11 -11
- package/dist/components/Command/Command.module.scss.js +11 -11
- package/dist/components/ConversationList/ConversationList.module.scss.cjs +13 -10
- package/dist/components/ConversationList/ConversationList.module.scss.js +14 -11
- package/dist/components/ConversationList/index.cjs +26 -22
- package/dist/components/ConversationList/index.d.ts +5 -1
- package/dist/components/ConversationList/index.d.ts.map +1 -1
- package/dist/components/ConversationList/index.js +27 -23
- package/dist/components/DataTable/DataTable.module.scss.cjs +35 -35
- package/dist/components/DataTable/DataTable.module.scss.js +35 -35
- package/dist/components/DataTable/index.d.ts +4 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/Editor/index.d.ts +4 -1
- package/dist/components/Editor/index.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
- package/dist/components/Listbox/Listbox.module.scss.js +8 -8
- package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
- package/dist/components/Markdown/Markdown.module.scss.js +1 -1
- package/dist/components/Markdown/index.d.ts +16 -0
- package/dist/components/Markdown/index.d.ts.map +1 -1
- package/dist/components/Menu/Menu.module.scss.cjs +14 -14
- package/dist/components/Menu/Menu.module.scss.js +14 -14
- package/dist/components/Message/Message.module.scss.cjs +23 -20
- package/dist/components/Message/Message.module.scss.js +24 -21
- package/dist/components/Message/index.cjs +5 -1
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +5 -1
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +28 -28
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +28 -28
- package/dist/components/Pagination/Pagination.module.scss.cjs +7 -7
- package/dist/components/Pagination/Pagination.module.scss.js +7 -7
- package/dist/components/Prompt/Prompt.module.scss.cjs +52 -22
- package/dist/components/Prompt/Prompt.module.scss.js +52 -22
- package/dist/components/Prompt/index.cjs +197 -2
- package/dist/components/Prompt/index.d.ts +98 -3
- package/dist/components/Prompt/index.d.ts.map +1 -1
- package/dist/components/Prompt/index.js +198 -3
- package/dist/components/Select/Select.module.scss.cjs +29 -17
- package/dist/components/Select/Select.module.scss.js +30 -18
- package/dist/components/Select/index.cjs +45 -8
- package/dist/components/Select/index.d.ts +17 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +45 -8
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +45 -42
- package/dist/components/Sidebar/Sidebar.module.scss.js +45 -42
- package/dist/components/Sidebar/index.cjs +2 -0
- package/dist/components/Sidebar/index.d.ts +6 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +2 -0
- package/dist/components/Text/Text.module.scss.cjs +63 -51
- package/dist/components/Text/Text.module.scss.js +63 -51
- package/dist/components/Text/index.d.ts +4 -2
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/data-table.cjs +210 -28
- package/dist/data-table.js +189 -29
- package/dist/datepicker.cjs +63 -14
- package/dist/datepicker.js +41 -14
- package/dist/editor.cjs +67 -16
- package/dist/editor.js +45 -16
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/markdown.cjs +63 -19
- package/dist/markdown.js +41 -19
- package/fragments.json +1 -1
- package/package.json +2 -2
- package/src/components/Badge/Badge.contract.json +28 -5
- package/src/components/Badge/Badge.module.scss +21 -0
- package/src/components/Badge/index.tsx +10 -1
- package/src/components/Button/Button.contract.json +9 -3
- package/src/components/Button/Button.module.scss +34 -0
- package/src/components/Button/index.tsx +11 -1
- package/src/components/Chart/Chart.contract.json +7 -0
- package/src/components/Chart/index.tsx +44 -27
- package/src/components/CodeBlock/CodeBlock.contract.json +7 -0
- package/src/components/CodeBlock/CodeBlock.module.scss +7 -2
- package/src/components/CodeBlock/index.tsx +38 -6
- package/src/components/ColorPicker/ColorPicker.contract.json +9 -1
- package/src/components/ColorPicker/index.tsx +42 -12
- package/src/components/Combobox/Combobox.module.scss +4 -13
- package/src/components/ConversationList/ConversationList.contract.json +16 -1
- package/src/components/ConversationList/ConversationList.module.scss +12 -0
- package/src/components/ConversationList/index.tsx +40 -26
- package/src/components/DataTable/DataTable.contract.json +8 -1
- package/src/components/DataTable/DataTable.module.scss +5 -0
- package/src/components/DataTable/index.tsx +282 -51
- package/src/components/DatePicker/DatePicker.contract.json +8 -1
- package/src/components/DatePicker/index.tsx +51 -22
- package/src/components/Editor/Editor.contract.json +19 -1
- package/src/components/Editor/index.tsx +67 -23
- package/src/components/Listbox/Listbox.module.scss +3 -11
- package/src/components/Markdown/Markdown.contract.json +15 -1
- package/src/components/Markdown/Markdown.module.scss +18 -1
- package/src/components/Markdown/index.tsx +58 -24
- package/src/components/Menu/Menu.module.scss +12 -2
- package/src/components/Message/Message.contract.json +3 -0
- package/src/components/Message/Message.module.scss +33 -4
- package/src/components/Message/index.tsx +7 -1
- package/src/components/Pagination/Pagination.contract.json +1 -0
- package/src/components/Pagination/Pagination.module.scss +5 -4
- package/src/components/Prompt/Prompt.contract.json +40 -1
- package/src/components/Prompt/Prompt.module.scss +351 -4
- package/src/components/Prompt/index.tsx +324 -0
- package/src/components/Select/Select.contract.json +11 -1
- package/src/components/Select/Select.module.scss +80 -13
- package/src/components/Select/index.tsx +73 -7
- package/src/components/Sidebar/Sidebar.contract.json +1 -0
- package/src/components/Sidebar/Sidebar.module.scss +10 -0
- package/src/components/Sidebar/index.tsx +7 -0
- package/src/components/Text/Text.contract.json +7 -4
- package/src/components/Text/Text.module.scss +18 -0
- package/src/components/Text/index.tsx +4 -2
- package/src/index.ts +1 -0
- package/src/tokens/_mixins.scss +39 -4
- package/src/tokens/_variables.scss +30 -0
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import styles from "./Prompt.module.scss.js";
|
|
5
5
|
import { Loading } from "../Loading/index.js";
|
|
6
|
+
import { Select } from "../Select/index.js";
|
|
7
|
+
function PlusIcon() {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"svg",
|
|
10
|
+
{
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
width: "16",
|
|
13
|
+
height: "16",
|
|
14
|
+
viewBox: "0 0 256 256",
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
children: /* @__PURE__ */ jsx("path", { d: "M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z" })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function CloseIcon() {
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
"svg",
|
|
24
|
+
{
|
|
25
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
+
width: "16",
|
|
27
|
+
height: "16",
|
|
28
|
+
viewBox: "0 0 256 256",
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: /* @__PURE__ */ jsx("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
6
35
|
function ArrowUpIcon() {
|
|
7
36
|
return /* @__PURE__ */ jsx(
|
|
8
37
|
"svg",
|
|
@@ -54,10 +83,15 @@ function PromptRoot({
|
|
|
54
83
|
autoResize = true,
|
|
55
84
|
submitOnEnter = true,
|
|
56
85
|
variant = "default",
|
|
86
|
+
appearance = "panel",
|
|
87
|
+
onFiles,
|
|
88
|
+
accept,
|
|
57
89
|
className,
|
|
58
90
|
...htmlProps
|
|
59
91
|
}) {
|
|
60
92
|
const textareaRef = React.useRef(null);
|
|
93
|
+
const [dragging, setDragging] = React.useState(false);
|
|
94
|
+
const dragDepth = React.useRef(0);
|
|
61
95
|
const [value, setValue] = useControllableState(
|
|
62
96
|
controlledValue,
|
|
63
97
|
defaultValue,
|
|
@@ -67,6 +101,13 @@ function PromptRoot({
|
|
|
67
101
|
if (disabled || loading || !value.trim()) return;
|
|
68
102
|
onSubmit == null ? void 0 : onSubmit(value);
|
|
69
103
|
}, [disabled, loading, value, onSubmit]);
|
|
104
|
+
const acceptFiles = React.useCallback(
|
|
105
|
+
(files) => {
|
|
106
|
+
if (!onFiles || disabled || loading || files.length === 0) return;
|
|
107
|
+
onFiles(files);
|
|
108
|
+
},
|
|
109
|
+
[onFiles, disabled, loading]
|
|
110
|
+
);
|
|
70
111
|
const contextValue = {
|
|
71
112
|
value,
|
|
72
113
|
setValue,
|
|
@@ -78,12 +119,39 @@ function PromptRoot({
|
|
|
78
119
|
autoResize,
|
|
79
120
|
submitOnEnter,
|
|
80
121
|
handleSubmit,
|
|
81
|
-
textareaRef
|
|
122
|
+
textareaRef,
|
|
123
|
+
accept,
|
|
124
|
+
onFiles: onFiles ? acceptFiles : void 0
|
|
82
125
|
};
|
|
126
|
+
const dropHandlers = onFiles ? {
|
|
127
|
+
onDragEnter: (event) => {
|
|
128
|
+
if (!event.dataTransfer.types.includes("Files")) return;
|
|
129
|
+
dragDepth.current += 1;
|
|
130
|
+
setDragging(true);
|
|
131
|
+
},
|
|
132
|
+
onDragOver: (event) => {
|
|
133
|
+
if (!event.dataTransfer.types.includes("Files")) return;
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
event.dataTransfer.dropEffect = "copy";
|
|
136
|
+
},
|
|
137
|
+
onDragLeave: () => {
|
|
138
|
+
dragDepth.current = Math.max(0, dragDepth.current - 1);
|
|
139
|
+
if (dragDepth.current === 0) setDragging(false);
|
|
140
|
+
},
|
|
141
|
+
onDrop: (event) => {
|
|
142
|
+
if (!event.dataTransfer.types.includes("Files")) return;
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
dragDepth.current = 0;
|
|
145
|
+
setDragging(false);
|
|
146
|
+
acceptFiles(Array.from(event.dataTransfer.files));
|
|
147
|
+
}
|
|
148
|
+
} : null;
|
|
83
149
|
const classes = [
|
|
84
150
|
styles.prompt,
|
|
85
151
|
variant === "fixed" && styles.fixed,
|
|
86
152
|
variant === "sticky" && styles.sticky,
|
|
153
|
+
appearance === "seamless" && styles.seamless,
|
|
154
|
+
dragging && styles.dragging,
|
|
87
155
|
disabled && styles.disabled,
|
|
88
156
|
loading && styles.loading,
|
|
89
157
|
className
|
|
@@ -92,10 +160,13 @@ function PromptRoot({
|
|
|
92
160
|
"div",
|
|
93
161
|
{
|
|
94
162
|
...htmlProps,
|
|
163
|
+
...dropHandlers,
|
|
95
164
|
className: classes,
|
|
96
165
|
"data-disabled": disabled || void 0,
|
|
97
166
|
"data-loading": loading || void 0,
|
|
98
167
|
"data-variant": variant,
|
|
168
|
+
"data-appearance": appearance,
|
|
169
|
+
"data-dragging": dragging || void 0,
|
|
99
170
|
children
|
|
100
171
|
}
|
|
101
172
|
) });
|
|
@@ -105,6 +176,7 @@ function PromptTextarea({
|
|
|
105
176
|
className,
|
|
106
177
|
onChange,
|
|
107
178
|
onKeyDown,
|
|
179
|
+
onPaste,
|
|
108
180
|
"aria-label": ariaLabel,
|
|
109
181
|
...htmlProps
|
|
110
182
|
}) {
|
|
@@ -119,7 +191,8 @@ function PromptTextarea({
|
|
|
119
191
|
autoResize,
|
|
120
192
|
submitOnEnter,
|
|
121
193
|
handleSubmit,
|
|
122
|
-
textareaRef
|
|
194
|
+
textareaRef,
|
|
195
|
+
onFiles
|
|
123
196
|
} = usePromptContext();
|
|
124
197
|
const lineHeight = 1.5;
|
|
125
198
|
const padding = 12;
|
|
@@ -150,6 +223,20 @@ function PromptTextarea({
|
|
|
150
223
|
handleSubmit();
|
|
151
224
|
}
|
|
152
225
|
};
|
|
226
|
+
const handlePaste = (e) => {
|
|
227
|
+
onPaste == null ? void 0 : onPaste(e);
|
|
228
|
+
if (e.defaultPrevented || !onFiles) return;
|
|
229
|
+
const files = Array.from(e.clipboardData.files);
|
|
230
|
+
if (files.length === 0) return;
|
|
231
|
+
e.preventDefault();
|
|
232
|
+
onFiles(
|
|
233
|
+
files.map(
|
|
234
|
+
(file, index) => file.name && file.name !== "image.png" ? file : new File([file], `pasted-${index + 1}.${file.type.split("/")[1] || "png"}`, {
|
|
235
|
+
type: file.type
|
|
236
|
+
})
|
|
237
|
+
)
|
|
238
|
+
);
|
|
239
|
+
};
|
|
153
240
|
const classes = [styles.textarea, className].filter(Boolean).join(" ");
|
|
154
241
|
return /* @__PURE__ */ jsx(
|
|
155
242
|
"textarea",
|
|
@@ -160,6 +247,7 @@ function PromptTextarea({
|
|
|
160
247
|
value,
|
|
161
248
|
onChange: handleChange,
|
|
162
249
|
onKeyDown: handleKeyDown,
|
|
250
|
+
onPaste: handlePaste,
|
|
163
251
|
placeholder: overridePlaceholder ?? placeholder,
|
|
164
252
|
disabled: disabled || loading,
|
|
165
253
|
rows: minRows,
|
|
@@ -240,6 +328,107 @@ function PromptModeButton({
|
|
|
240
328
|
}
|
|
241
329
|
);
|
|
242
330
|
}
|
|
331
|
+
function formatSize(bytes) {
|
|
332
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
333
|
+
const kb = bytes / 1024;
|
|
334
|
+
if (kb < 1024) return `${Math.round(kb)} KB`;
|
|
335
|
+
return `${(kb / 1024).toFixed(kb / 1024 < 10 ? 1 : 0)} MB`;
|
|
336
|
+
}
|
|
337
|
+
function PromptAttachments({ items, onRemove, className }) {
|
|
338
|
+
if (items.length === 0) return null;
|
|
339
|
+
const classes = [styles.attachments, className].filter(Boolean).join(" ");
|
|
340
|
+
return /* @__PURE__ */ jsx("ul", { className: classes, "aria-label": "Attachments", children: items.map((item) => /* @__PURE__ */ jsxs("li", { className: styles.attachment, children: [
|
|
341
|
+
item.previewUrl ? (
|
|
342
|
+
// Decorative: the filename beside it is the accessible name, and a
|
|
343
|
+
// thumbnail of a screenshot has no description worth inventing.
|
|
344
|
+
/* @__PURE__ */ jsx("img", { src: item.previewUrl, alt: "", className: styles.attachmentThumb })
|
|
345
|
+
) : null,
|
|
346
|
+
/* @__PURE__ */ jsx("span", { className: styles.attachmentName, title: item.name, children: item.name }),
|
|
347
|
+
item.size != null && /* @__PURE__ */ jsx("span", { className: styles.attachmentSize, children: formatSize(item.size) }),
|
|
348
|
+
onRemove && /* @__PURE__ */ jsx(
|
|
349
|
+
"button",
|
|
350
|
+
{
|
|
351
|
+
type: "button",
|
|
352
|
+
className: styles.attachmentRemove,
|
|
353
|
+
onClick: () => onRemove(item.id),
|
|
354
|
+
"aria-label": `Remove ${item.name}`,
|
|
355
|
+
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
356
|
+
}
|
|
357
|
+
)
|
|
358
|
+
] }, item.id)) });
|
|
359
|
+
}
|
|
360
|
+
function PromptAttach({
|
|
361
|
+
"aria-label": ariaLabel = "Attach files",
|
|
362
|
+
children,
|
|
363
|
+
accept: acceptOverride,
|
|
364
|
+
multiple = true,
|
|
365
|
+
disabled: buttonDisabled,
|
|
366
|
+
className
|
|
367
|
+
}) {
|
|
368
|
+
const { disabled, loading, accept, onFiles } = usePromptContext();
|
|
369
|
+
const inputRef = React.useRef(null);
|
|
370
|
+
const isDisabled = disabled || loading || buttonDisabled || !onFiles;
|
|
371
|
+
const classes = [styles.attach, className].filter(Boolean).join(" ");
|
|
372
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
373
|
+
/* @__PURE__ */ jsx(
|
|
374
|
+
"button",
|
|
375
|
+
{
|
|
376
|
+
type: "button",
|
|
377
|
+
className: classes,
|
|
378
|
+
onClick: () => {
|
|
379
|
+
var _a;
|
|
380
|
+
return (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
381
|
+
},
|
|
382
|
+
disabled: isDisabled,
|
|
383
|
+
"aria-label": ariaLabel,
|
|
384
|
+
children: children ?? /* @__PURE__ */ jsx(PlusIcon, {})
|
|
385
|
+
}
|
|
386
|
+
),
|
|
387
|
+
/* @__PURE__ */ jsx(
|
|
388
|
+
"input",
|
|
389
|
+
{
|
|
390
|
+
ref: inputRef,
|
|
391
|
+
type: "file",
|
|
392
|
+
hidden: true,
|
|
393
|
+
accept: acceptOverride ?? accept,
|
|
394
|
+
multiple,
|
|
395
|
+
onChange: (event) => {
|
|
396
|
+
const files = Array.from(event.target.files ?? []);
|
|
397
|
+
event.target.value = "";
|
|
398
|
+
onFiles == null ? void 0 : onFiles(files);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
)
|
|
402
|
+
] });
|
|
403
|
+
}
|
|
404
|
+
function PromptSelect({
|
|
405
|
+
icon,
|
|
406
|
+
"aria-label": ariaLabel,
|
|
407
|
+
options,
|
|
408
|
+
children,
|
|
409
|
+
placeholder,
|
|
410
|
+
disabled: selectDisabled,
|
|
411
|
+
className,
|
|
412
|
+
...selectProps
|
|
413
|
+
}) {
|
|
414
|
+
const { disabled, loading } = usePromptContext();
|
|
415
|
+
const classes = [styles.select, className].filter(Boolean).join(" ");
|
|
416
|
+
return /* @__PURE__ */ jsxs(
|
|
417
|
+
Select,
|
|
418
|
+
{
|
|
419
|
+
...selectProps,
|
|
420
|
+
size: "sm",
|
|
421
|
+
variant: "ghost",
|
|
422
|
+
options,
|
|
423
|
+
placeholder,
|
|
424
|
+
disabled: disabled || loading || selectDisabled,
|
|
425
|
+
children: [
|
|
426
|
+
/* @__PURE__ */ jsx(Select.Trigger, { className: classes, icon, "aria-label": ariaLabel }),
|
|
427
|
+
/* @__PURE__ */ jsx(Select.Content, { children })
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
}
|
|
243
432
|
function PromptUsage({ children, className }) {
|
|
244
433
|
const classes = [styles.usage, className].filter(Boolean).join(" ");
|
|
245
434
|
return /* @__PURE__ */ jsx("span", { className: classes, children });
|
|
@@ -286,6 +475,9 @@ const Prompt = Object.assign(PromptRoot, {
|
|
|
286
475
|
Info: PromptInfo,
|
|
287
476
|
ActionButton: PromptActionButton,
|
|
288
477
|
ModeButton: PromptModeButton,
|
|
478
|
+
Select: PromptSelect,
|
|
479
|
+
Attach: PromptAttach,
|
|
480
|
+
Attachments: PromptAttachments,
|
|
289
481
|
Usage: PromptUsage,
|
|
290
482
|
Submit: PromptSubmit
|
|
291
483
|
});
|
|
@@ -293,9 +485,12 @@ export {
|
|
|
293
485
|
Prompt,
|
|
294
486
|
PromptActionButton,
|
|
295
487
|
PromptActions,
|
|
488
|
+
PromptAttach,
|
|
489
|
+
PromptAttachments,
|
|
296
490
|
PromptInfo,
|
|
297
491
|
PromptModeButton,
|
|
298
492
|
PromptRoot,
|
|
493
|
+
PromptSelect,
|
|
299
494
|
PromptSubmit,
|
|
300
495
|
PromptTab,
|
|
301
496
|
PromptTabs,
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const wrapper = "
|
|
4
|
-
const label = "
|
|
5
|
-
const helper = "
|
|
6
|
-
const helperError = "
|
|
7
|
-
const errorMessage = "
|
|
8
|
-
const trigger = "
|
|
9
|
-
const triggerSm = "
|
|
10
|
-
const triggerLg = "
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
3
|
+
const wrapper = "_wrapper_9zaqb_1";
|
|
4
|
+
const label = "_label_9zaqb_6";
|
|
5
|
+
const helper = "_helper_9zaqb_19";
|
|
6
|
+
const helperError = "_helperError_9zaqb_26";
|
|
7
|
+
const errorMessage = "_errorMessage_9zaqb_30";
|
|
8
|
+
const trigger = "_trigger_9zaqb_36";
|
|
9
|
+
const triggerSm = "_triggerSm_9zaqb_99";
|
|
10
|
+
const triggerLg = "_triggerLg_9zaqb_106";
|
|
11
|
+
const triggerGhost = "_triggerGhost_9zaqb_113";
|
|
12
|
+
const wrapperGhost = "_wrapperGhost_9zaqb_144";
|
|
13
|
+
const triggerIcon = "_triggerIcon_9zaqb_149";
|
|
14
|
+
const value = "_value_9zaqb_157";
|
|
15
|
+
const placeholder = "_placeholder_9zaqb_170";
|
|
16
|
+
const hint = "_hint_9zaqb_174";
|
|
17
|
+
const icon = "_icon_9zaqb_180";
|
|
18
|
+
const positioner = "_positioner_9zaqb_195";
|
|
19
|
+
const popup = "_popup_9zaqb_200";
|
|
20
|
+
const item = "_item_9zaqb_238";
|
|
21
|
+
const itemIndicator = "_itemIndicator_9zaqb_287";
|
|
22
|
+
const group = "_group_9zaqb_301";
|
|
23
|
+
const groupLabel = "_groupLabel_9zaqb_307";
|
|
20
24
|
const styles = {
|
|
21
25
|
wrapper,
|
|
22
26
|
label,
|
|
@@ -26,8 +30,12 @@ const styles = {
|
|
|
26
30
|
trigger,
|
|
27
31
|
triggerSm,
|
|
28
32
|
triggerLg,
|
|
33
|
+
triggerGhost,
|
|
34
|
+
wrapperGhost,
|
|
35
|
+
triggerIcon,
|
|
29
36
|
value,
|
|
30
37
|
placeholder,
|
|
38
|
+
hint,
|
|
31
39
|
icon,
|
|
32
40
|
positioner,
|
|
33
41
|
popup,
|
|
@@ -42,6 +50,7 @@ exports.group = group;
|
|
|
42
50
|
exports.groupLabel = groupLabel;
|
|
43
51
|
exports.helper = helper;
|
|
44
52
|
exports.helperError = helperError;
|
|
53
|
+
exports.hint = hint;
|
|
45
54
|
exports.icon = icon;
|
|
46
55
|
exports.item = item;
|
|
47
56
|
exports.itemIndicator = itemIndicator;
|
|
@@ -50,7 +59,10 @@ exports.placeholder = placeholder;
|
|
|
50
59
|
exports.popup = popup;
|
|
51
60
|
exports.positioner = positioner;
|
|
52
61
|
exports.trigger = trigger;
|
|
62
|
+
exports.triggerGhost = triggerGhost;
|
|
63
|
+
exports.triggerIcon = triggerIcon;
|
|
53
64
|
exports.triggerLg = triggerLg;
|
|
54
65
|
exports.triggerSm = triggerSm;
|
|
55
66
|
exports.value = value;
|
|
56
67
|
exports.wrapper = wrapper;
|
|
68
|
+
exports.wrapperGhost = wrapperGhost;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
const wrapper = "
|
|
2
|
-
const label = "
|
|
3
|
-
const helper = "
|
|
4
|
-
const helperError = "
|
|
5
|
-
const errorMessage = "
|
|
6
|
-
const trigger = "
|
|
7
|
-
const triggerSm = "
|
|
8
|
-
const triggerLg = "
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
1
|
+
const wrapper = "_wrapper_9zaqb_1";
|
|
2
|
+
const label = "_label_9zaqb_6";
|
|
3
|
+
const helper = "_helper_9zaqb_19";
|
|
4
|
+
const helperError = "_helperError_9zaqb_26";
|
|
5
|
+
const errorMessage = "_errorMessage_9zaqb_30";
|
|
6
|
+
const trigger = "_trigger_9zaqb_36";
|
|
7
|
+
const triggerSm = "_triggerSm_9zaqb_99";
|
|
8
|
+
const triggerLg = "_triggerLg_9zaqb_106";
|
|
9
|
+
const triggerGhost = "_triggerGhost_9zaqb_113";
|
|
10
|
+
const wrapperGhost = "_wrapperGhost_9zaqb_144";
|
|
11
|
+
const triggerIcon = "_triggerIcon_9zaqb_149";
|
|
12
|
+
const value = "_value_9zaqb_157";
|
|
13
|
+
const placeholder = "_placeholder_9zaqb_170";
|
|
14
|
+
const hint = "_hint_9zaqb_174";
|
|
15
|
+
const icon = "_icon_9zaqb_180";
|
|
16
|
+
const positioner = "_positioner_9zaqb_195";
|
|
17
|
+
const popup = "_popup_9zaqb_200";
|
|
18
|
+
const item = "_item_9zaqb_238";
|
|
19
|
+
const itemIndicator = "_itemIndicator_9zaqb_287";
|
|
20
|
+
const group = "_group_9zaqb_301";
|
|
21
|
+
const groupLabel = "_groupLabel_9zaqb_307";
|
|
18
22
|
const styles = {
|
|
19
23
|
wrapper,
|
|
20
24
|
label,
|
|
@@ -24,8 +28,12 @@ const styles = {
|
|
|
24
28
|
trigger,
|
|
25
29
|
triggerSm,
|
|
26
30
|
triggerLg,
|
|
31
|
+
triggerGhost,
|
|
32
|
+
wrapperGhost,
|
|
33
|
+
triggerIcon,
|
|
27
34
|
value,
|
|
28
35
|
placeholder,
|
|
36
|
+
hint,
|
|
29
37
|
icon,
|
|
30
38
|
positioner,
|
|
31
39
|
popup,
|
|
@@ -41,6 +49,7 @@ export {
|
|
|
41
49
|
groupLabel,
|
|
42
50
|
helper,
|
|
43
51
|
helperError,
|
|
52
|
+
hint,
|
|
44
53
|
icon,
|
|
45
54
|
item,
|
|
46
55
|
itemIndicator,
|
|
@@ -49,8 +58,11 @@ export {
|
|
|
49
58
|
popup,
|
|
50
59
|
positioner,
|
|
51
60
|
trigger,
|
|
61
|
+
triggerGhost,
|
|
62
|
+
triggerIcon,
|
|
52
63
|
triggerLg,
|
|
53
64
|
triggerSm,
|
|
54
65
|
value,
|
|
55
|
-
wrapper
|
|
66
|
+
wrapper,
|
|
67
|
+
wrapperGhost
|
|
56
68
|
};
|
|
@@ -66,8 +66,17 @@ const SelectContext = React__namespace.createContext({
|
|
|
66
66
|
},
|
|
67
67
|
unregisterItem: () => {
|
|
68
68
|
},
|
|
69
|
-
size: "md"
|
|
69
|
+
size: "md",
|
|
70
|
+
variant: "field",
|
|
71
|
+
optionItems: null
|
|
70
72
|
});
|
|
73
|
+
function renderOptionLabel(option) {
|
|
74
|
+
if (!option.hint) return option.label;
|
|
75
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
76
|
+
option.label,
|
|
77
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: Select_module.default.hint, children: option.hint })
|
|
78
|
+
] });
|
|
79
|
+
}
|
|
71
80
|
function collectDeclaredItems(children, map) {
|
|
72
81
|
React__namespace.Children.forEach(children, (child) => {
|
|
73
82
|
var _a;
|
|
@@ -103,6 +112,7 @@ const SelectRoot = React__namespace.forwardRef(function SelectRoot2({
|
|
|
103
112
|
helperText,
|
|
104
113
|
error,
|
|
105
114
|
size: sizeProp,
|
|
115
|
+
variant = "field",
|
|
106
116
|
className
|
|
107
117
|
}, ref) {
|
|
108
118
|
const size = index.useResolvedControlSize(sizeProp);
|
|
@@ -132,7 +142,7 @@ const SelectRoot = React__namespace.forwardRef(function SelectRoot2({
|
|
|
132
142
|
}, [value]);
|
|
133
143
|
const selectedValue = value !== void 0 ? value : internalValue;
|
|
134
144
|
const optionItems = React__namespace.useMemo(
|
|
135
|
-
() => (options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: option.value, disabled: option.disabled, children: option
|
|
145
|
+
() => (options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: option.value, disabled: option.disabled, children: renderOptionLabel(option) }, option.value))) ?? null,
|
|
136
146
|
[options]
|
|
137
147
|
);
|
|
138
148
|
const resolvedChildren = children ?? (optionItems ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -152,7 +162,7 @@ const SelectRoot = React__namespace.forwardRef(function SelectRoot2({
|
|
|
152
162
|
);
|
|
153
163
|
const declaredItems = React__namespace.useMemo(() => {
|
|
154
164
|
const map = /* @__PURE__ */ new Map();
|
|
155
|
-
options == null ? void 0 : options.forEach((option) => map.set(option.value, option
|
|
165
|
+
options == null ? void 0 : options.forEach((option) => map.set(option.value, renderOptionLabel(option)));
|
|
156
166
|
collectDeclaredItems(children, map);
|
|
157
167
|
return map;
|
|
158
168
|
}, [children, options]);
|
|
@@ -169,16 +179,31 @@ const SelectRoot = React__namespace.forwardRef(function SelectRoot2({
|
|
|
169
179
|
items: resolvedItems,
|
|
170
180
|
registerItem,
|
|
171
181
|
unregisterItem,
|
|
172
|
-
size
|
|
182
|
+
size,
|
|
183
|
+
variant,
|
|
184
|
+
optionItems
|
|
173
185
|
}),
|
|
174
|
-
[
|
|
186
|
+
[
|
|
187
|
+
placeholder,
|
|
188
|
+
selectedValue,
|
|
189
|
+
resolvedItems,
|
|
190
|
+
registerItem,
|
|
191
|
+
unregisterItem,
|
|
192
|
+
size,
|
|
193
|
+
variant,
|
|
194
|
+
optionItems
|
|
195
|
+
]
|
|
175
196
|
);
|
|
176
197
|
const { helperId, errorId, hasError, errorMessage } = aria.useFormFieldIds("select", {
|
|
177
198
|
label,
|
|
178
199
|
helperText,
|
|
179
200
|
error
|
|
180
201
|
});
|
|
181
|
-
const wrapperClasses = [
|
|
202
|
+
const wrapperClasses = [
|
|
203
|
+
Select_module.default.wrapper,
|
|
204
|
+
variant === "ghost" && Select_module.default.wrapperGhost,
|
|
205
|
+
className
|
|
206
|
+
].filter(Boolean).join(" ");
|
|
182
207
|
const helperClasses = [Select_module.default.helper, hasError && Select_module.default.helperError].filter(Boolean).join(" ");
|
|
183
208
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: wrapperClasses, children: [
|
|
184
209
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -208,18 +233,29 @@ const SelectRoot = React__namespace.forwardRef(function SelectRoot2({
|
|
|
208
233
|
errorMessage && /* @__PURE__ */ jsxRuntime.jsx("span", { id: errorId, className: Select_module.default.errorMessage, children: errorMessage })
|
|
209
234
|
] }) });
|
|
210
235
|
});
|
|
211
|
-
function SelectTrigger({
|
|
236
|
+
function SelectTrigger({
|
|
237
|
+
children,
|
|
238
|
+
placeholder,
|
|
239
|
+
icon,
|
|
240
|
+
className,
|
|
241
|
+
...htmlProps
|
|
242
|
+
}) {
|
|
212
243
|
const context = React__namespace.useContext(SelectContext);
|
|
213
244
|
const placeholderText = placeholder ?? context.placeholder;
|
|
214
245
|
const classes = [
|
|
215
246
|
Select_module.default.trigger,
|
|
216
247
|
context.size === "sm" && Select_module.default.triggerSm,
|
|
217
248
|
context.size === "lg" && Select_module.default.triggerLg,
|
|
249
|
+
// Ghost unsets the field shell and the size mixin's box. Both are single
|
|
250
|
+
// classes like this one, so it wins on being declared after them in
|
|
251
|
+
// Select.module.scss — the one place that ordering is guaranteed.
|
|
252
|
+
context.variant === "ghost" && Select_module.default.triggerGhost,
|
|
218
253
|
className
|
|
219
254
|
].filter(Boolean).join(" ");
|
|
220
255
|
const selectedContent = context.value != null ? context.items.get(context.value) : null;
|
|
221
256
|
const displayContent = selectedContent ?? (placeholderText ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: Select_module.default.placeholder, children: placeholderText }) : null);
|
|
222
257
|
return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Trigger, { ...htmlProps, className: classes, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
258
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Select_module.default.triggerIcon, children: icon }),
|
|
223
259
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: Select_module.default.value, children: displayContent }),
|
|
224
260
|
/* @__PURE__ */ jsxRuntime.jsx(select.Select.Icon, { className: Select_module.default.icon, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon, {}) })
|
|
225
261
|
] }) });
|
|
@@ -232,12 +268,13 @@ function SelectContent({
|
|
|
232
268
|
maxVisibleItems,
|
|
233
269
|
...htmlProps
|
|
234
270
|
}) {
|
|
271
|
+
const { optionItems } = React__namespace.useContext(SelectContext);
|
|
235
272
|
const popupClasses = [Select_module.default.popup, className].filter(Boolean).join(" ");
|
|
236
273
|
const popupStyle = maxVisibleItems != null ? {
|
|
237
274
|
"--fui-select-max-items": maxVisibleItems + 0.5,
|
|
238
275
|
...htmlProps.style
|
|
239
276
|
} : htmlProps.style;
|
|
240
|
-
return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Positioner, { sideOffset, align, className: Select_module.default.positioner, children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Popup, { ...htmlProps, className: popupClasses, style: popupStyle, children }) }) });
|
|
277
|
+
return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Positioner, { sideOffset, align, className: Select_module.default.positioner, children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Popup, { ...htmlProps, className: popupClasses, style: popupStyle, children: children ?? optionItems }) }) });
|
|
241
278
|
}
|
|
242
279
|
function SelectItem({ children, value, disabled, className, ...htmlProps }) {
|
|
243
280
|
const { registerItem, unregisterItem } = React__namespace.useContext(SelectContext);
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type FormFieldProps } from "../../utils/aria";
|
|
3
3
|
export type SelectValue = string;
|
|
4
|
+
export type SelectVariant = "field" | "ghost";
|
|
4
5
|
export interface SelectOption {
|
|
5
6
|
value: SelectValue;
|
|
6
7
|
label: string;
|
|
8
|
+
/** A dimmed qualifier after the label, in the trigger as well as the list —
|
|
9
|
+
* a tier beside a model, a path beside a filename. Use it when the label
|
|
10
|
+
* alone is ambiguous but the qualifier is not what you are choosing by. */
|
|
11
|
+
hint?: string;
|
|
7
12
|
disabled?: boolean;
|
|
8
13
|
}
|
|
9
14
|
/**
|
|
@@ -45,15 +50,25 @@ export interface SelectProps extends FormFieldProps {
|
|
|
45
50
|
/** Size variant.
|
|
46
51
|
* @default "md" */
|
|
47
52
|
size?: "sm" | "md" | "lg";
|
|
53
|
+
/** Visual treatment. `ghost` drops the field shell for a compact, borderless
|
|
54
|
+
* control — for toolbars and dense rows, where a bordered field reads as a
|
|
55
|
+
* form. Pair with `size="sm"`.
|
|
56
|
+
* @default "field" */
|
|
57
|
+
variant?: SelectVariant;
|
|
48
58
|
/** Wrapper class name */
|
|
49
59
|
className?: string;
|
|
50
60
|
}
|
|
51
61
|
export interface SelectTriggerProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
52
62
|
children?: React.ReactNode;
|
|
53
63
|
placeholder?: string;
|
|
64
|
+
/** Leading adornment shown before the value — usually says what the choice is
|
|
65
|
+
* about, so the visible text can be the choice itself. Ignored when you pass
|
|
66
|
+
* your own `children`. */
|
|
67
|
+
icon?: React.ReactNode;
|
|
54
68
|
}
|
|
55
69
|
export interface SelectContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
56
|
-
|
|
70
|
+
/** Omit to render the items the root's `options` prop describes. */
|
|
71
|
+
children?: React.ReactNode;
|
|
57
72
|
sideOffset?: number;
|
|
58
73
|
align?: "start" | "center" | "end";
|
|
59
74
|
/** Maximum number of visible options before scrolling. Shows half of the next item as a scroll hint. @default 4 */
|
|
@@ -71,7 +86,7 @@ export interface SelectGroupLabelProps extends React.HTMLAttributes<HTMLElement>
|
|
|
71
86
|
children: React.ReactNode;
|
|
72
87
|
}
|
|
73
88
|
declare const SelectRoot: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
-
declare function SelectTrigger({ children, placeholder, className, ...htmlProps }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
declare function SelectTrigger({ children, placeholder, icon, className, ...htmlProps }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
75
90
|
declare function SelectContent({ children, className, sideOffset, align, maxVisibleItems, ...htmlProps }: SelectContentProps): import("react/jsx-runtime").JSX.Element;
|
|
76
91
|
declare function SelectItem({ children, value, disabled, className, ...htmlProps }: SelectItemProps): import("react/jsx-runtime").JSX.Element;
|
|
77
92
|
declare function SelectGroup({ children, className, ...htmlProps }: SelectGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,MAAM,CA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