@openwarelabs/ui 0.9.0 → 0.10.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 +8 -4
- package/dist/index.cjs +76 -85
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +76 -85
- package/dist/index.js.map +3 -3
- package/package.json +16 -2
package/dist/index.js
CHANGED
|
@@ -97,7 +97,7 @@ function buttonClassName({
|
|
|
97
97
|
iconOnly && "ow-button--icon-only"
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
-
var Button = forwardRef(function Button2({
|
|
100
|
+
var Button = /* @__PURE__ */ forwardRef(function Button2({
|
|
101
101
|
children,
|
|
102
102
|
className,
|
|
103
103
|
disabled,
|
|
@@ -189,33 +189,33 @@ function icon(paths) {
|
|
|
189
189
|
);
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
var CheckIcon = icon(/* @__PURE__ */ jsx4("path", { d: "M20 6 9 17l-5-5" }));
|
|
193
|
-
var ChevronDownIcon = icon(/* @__PURE__ */ jsx4("path", { d: "m6 9 6 6 6-6" }));
|
|
194
|
-
var SearchIcon = icon(
|
|
192
|
+
var CheckIcon = /* @__PURE__ */ icon(/* @__PURE__ */ jsx4("path", { d: "M20 6 9 17l-5-5" }));
|
|
193
|
+
var ChevronDownIcon = /* @__PURE__ */ icon(/* @__PURE__ */ jsx4("path", { d: "m6 9 6 6 6-6" }));
|
|
194
|
+
var SearchIcon = /* @__PURE__ */ icon(
|
|
195
195
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
196
196
|
/* @__PURE__ */ jsx4("circle", { cx: "11", cy: "11", r: "8" }),
|
|
197
197
|
/* @__PURE__ */ jsx4("path", { d: "m21 21-4.3-4.3" })
|
|
198
198
|
] })
|
|
199
199
|
);
|
|
200
|
-
var CornerDownLeftIcon = icon(
|
|
200
|
+
var CornerDownLeftIcon = /* @__PURE__ */ icon(
|
|
201
201
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
202
202
|
/* @__PURE__ */ jsx4("polyline", { points: "9 10 4 15 9 20" }),
|
|
203
203
|
/* @__PURE__ */ jsx4("path", { d: "M20 4v7a4 4 0 0 1-4 4H4" })
|
|
204
204
|
] })
|
|
205
205
|
);
|
|
206
|
-
var XIcon = icon(
|
|
206
|
+
var XIcon = /* @__PURE__ */ icon(
|
|
207
207
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
208
208
|
/* @__PURE__ */ jsx4("path", { d: "M18 6 6 18" }),
|
|
209
209
|
/* @__PURE__ */ jsx4("path", { d: "m6 6 12 12" })
|
|
210
210
|
] })
|
|
211
211
|
);
|
|
212
|
-
var UserIcon = icon(
|
|
212
|
+
var UserIcon = /* @__PURE__ */ icon(
|
|
213
213
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
214
214
|
/* @__PURE__ */ jsx4("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
|
|
215
215
|
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "7", r: "4" })
|
|
216
216
|
] })
|
|
217
217
|
);
|
|
218
|
-
var TrashIcon = icon(
|
|
218
|
+
var TrashIcon = /* @__PURE__ */ icon(
|
|
219
219
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
220
220
|
/* @__PURE__ */ jsx4("path", { d: "M3 6h18" }),
|
|
221
221
|
/* @__PURE__ */ jsx4("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
@@ -224,57 +224,56 @@ var TrashIcon = icon(
|
|
|
224
224
|
/* @__PURE__ */ jsx4("line", { x1: "14", x2: "14", y1: "11", y2: "17" })
|
|
225
225
|
] })
|
|
226
226
|
);
|
|
227
|
-
var CircleCheckIcon = icon(
|
|
227
|
+
var CircleCheckIcon = /* @__PURE__ */ icon(
|
|
228
228
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
229
229
|
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" }),
|
|
230
230
|
/* @__PURE__ */ jsx4("path", { d: "m9 12 2 2 4-4" })
|
|
231
231
|
] })
|
|
232
232
|
);
|
|
233
|
-
var CircleAlertIcon = icon(
|
|
233
|
+
var CircleAlertIcon = /* @__PURE__ */ icon(
|
|
234
234
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
235
235
|
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" }),
|
|
236
236
|
/* @__PURE__ */ jsx4("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
|
|
237
237
|
/* @__PURE__ */ jsx4("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
|
|
238
238
|
] })
|
|
239
239
|
);
|
|
240
|
-
var ChevronRightIcon = icon(/* @__PURE__ */ jsx4("path", { d: "m9 18 6-6-6-6" }));
|
|
241
|
-
var ChevronLeftIcon = icon(/* @__PURE__ */ jsx4("path", { d: "m15 18-6-6 6-6" }));
|
|
242
|
-
var
|
|
243
|
-
var
|
|
244
|
-
var PlusIcon = icon(
|
|
240
|
+
var ChevronRightIcon = /* @__PURE__ */ icon(/* @__PURE__ */ jsx4("path", { d: "m9 18 6-6-6-6" }));
|
|
241
|
+
var ChevronLeftIcon = /* @__PURE__ */ icon(/* @__PURE__ */ jsx4("path", { d: "m15 18-6-6 6-6" }));
|
|
242
|
+
var MinusIcon = /* @__PURE__ */ icon(/* @__PURE__ */ jsx4("path", { d: "M5 12h14" }));
|
|
243
|
+
var PlusIcon = /* @__PURE__ */ icon(
|
|
245
244
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
246
245
|
/* @__PURE__ */ jsx4("path", { d: "M5 12h14" }),
|
|
247
246
|
/* @__PURE__ */ jsx4("path", { d: "M12 5v14" })
|
|
248
247
|
] })
|
|
249
248
|
);
|
|
250
|
-
var InfoIcon = icon(
|
|
249
|
+
var InfoIcon = /* @__PURE__ */ icon(
|
|
251
250
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
252
251
|
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" }),
|
|
253
252
|
/* @__PURE__ */ jsx4("path", { d: "M12 16v-4" }),
|
|
254
253
|
/* @__PURE__ */ jsx4("path", { d: "M12 8h.01" })
|
|
255
254
|
] })
|
|
256
255
|
);
|
|
257
|
-
var TriangleAlertIcon = icon(
|
|
256
|
+
var TriangleAlertIcon = /* @__PURE__ */ icon(
|
|
258
257
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
259
258
|
/* @__PURE__ */ jsx4("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
260
259
|
/* @__PURE__ */ jsx4("path", { d: "M12 9v4" }),
|
|
261
260
|
/* @__PURE__ */ jsx4("path", { d: "M12 17h.01" })
|
|
262
261
|
] })
|
|
263
262
|
);
|
|
264
|
-
var PipetteIcon = icon(
|
|
263
|
+
var PipetteIcon = /* @__PURE__ */ icon(
|
|
265
264
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
266
265
|
/* @__PURE__ */ jsx4("path", { d: "m2 22 1-1h3l9-9" }),
|
|
267
266
|
/* @__PURE__ */ jsx4("path", { d: "M3 21v-3l9-9" }),
|
|
268
267
|
/* @__PURE__ */ jsx4("path", { d: "m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" })
|
|
269
268
|
] })
|
|
270
269
|
);
|
|
271
|
-
var CopyIcon = icon(
|
|
270
|
+
var CopyIcon = /* @__PURE__ */ icon(
|
|
272
271
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
273
272
|
/* @__PURE__ */ jsx4("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
274
273
|
/* @__PURE__ */ jsx4("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
275
274
|
] })
|
|
276
275
|
);
|
|
277
|
-
var CalendarIcon = icon(
|
|
276
|
+
var CalendarIcon = /* @__PURE__ */ icon(
|
|
278
277
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
279
278
|
/* @__PURE__ */ jsx4("path", { d: "M8 2v4" }),
|
|
280
279
|
/* @__PURE__ */ jsx4("path", { d: "M16 2v4" }),
|
|
@@ -282,62 +281,55 @@ var CalendarIcon = icon(
|
|
|
282
281
|
/* @__PURE__ */ jsx4("path", { d: "M3 10h18" })
|
|
283
282
|
] })
|
|
284
283
|
);
|
|
285
|
-
var FileIcon = icon(
|
|
284
|
+
var FileIcon = /* @__PURE__ */ icon(
|
|
286
285
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
287
286
|
/* @__PURE__ */ jsx4("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
288
287
|
/* @__PURE__ */ jsx4("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
289
288
|
] })
|
|
290
289
|
);
|
|
291
|
-
var FolderIcon = icon(
|
|
290
|
+
var FolderIcon = /* @__PURE__ */ icon(
|
|
292
291
|
/* @__PURE__ */ jsx4("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" })
|
|
293
292
|
);
|
|
294
|
-
var FolderOpenIcon = icon(
|
|
293
|
+
var FolderOpenIcon = /* @__PURE__ */ icon(
|
|
295
294
|
/* @__PURE__ */ jsx4("path", { d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" })
|
|
296
295
|
);
|
|
297
|
-
var UploadIcon = icon(
|
|
296
|
+
var UploadIcon = /* @__PURE__ */ icon(
|
|
298
297
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
299
298
|
/* @__PURE__ */ jsx4("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
300
299
|
/* @__PURE__ */ jsx4("polyline", { points: "17 8 12 3 7 8" }),
|
|
301
300
|
/* @__PURE__ */ jsx4("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
302
301
|
] })
|
|
303
302
|
);
|
|
304
|
-
var ArrowUpRightIcon = icon(
|
|
303
|
+
var ArrowUpRightIcon = /* @__PURE__ */ icon(
|
|
305
304
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
306
305
|
/* @__PURE__ */ jsx4("path", { d: "M7 7h10v10" }),
|
|
307
306
|
/* @__PURE__ */ jsx4("path", { d: "M7 17 17 7" })
|
|
308
307
|
] })
|
|
309
308
|
);
|
|
310
|
-
var ArrowUpIcon = icon(
|
|
309
|
+
var ArrowUpIcon = /* @__PURE__ */ icon(
|
|
311
310
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
312
311
|
/* @__PURE__ */ jsx4("path", { d: "m5 12 7-7 7 7" }),
|
|
313
312
|
/* @__PURE__ */ jsx4("path", { d: "M12 19V5" })
|
|
314
313
|
] })
|
|
315
314
|
);
|
|
316
|
-
var ArrowDownIcon = icon(
|
|
315
|
+
var ArrowDownIcon = /* @__PURE__ */ icon(
|
|
317
316
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
318
317
|
/* @__PURE__ */ jsx4("path", { d: "M12 5v14" }),
|
|
319
318
|
/* @__PURE__ */ jsx4("path", { d: "m19 12-7 7-7-7" })
|
|
320
319
|
] })
|
|
321
320
|
);
|
|
322
|
-
var ChevronsUpDownIcon = icon(
|
|
321
|
+
var ChevronsUpDownIcon = /* @__PURE__ */ icon(
|
|
323
322
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
324
323
|
/* @__PURE__ */ jsx4("path", { d: "m7 15 5 5 5-5" }),
|
|
325
324
|
/* @__PURE__ */ jsx4("path", { d: "m7 9 5-5 5 5" })
|
|
326
325
|
] })
|
|
327
326
|
);
|
|
328
|
-
var InboxIcon = icon(
|
|
327
|
+
var InboxIcon = /* @__PURE__ */ icon(
|
|
329
328
|
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
330
329
|
/* @__PURE__ */ jsx4("polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12" }),
|
|
331
330
|
/* @__PURE__ */ jsx4("path", { d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" })
|
|
332
331
|
] })
|
|
333
332
|
);
|
|
334
|
-
var EllipsisIcon = icon(
|
|
335
|
-
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
336
|
-
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "1" }),
|
|
337
|
-
/* @__PURE__ */ jsx4("circle", { cx: "19", cy: "12", r: "1" }),
|
|
338
|
-
/* @__PURE__ */ jsx4("circle", { cx: "5", cy: "12", r: "1" })
|
|
339
|
-
] })
|
|
340
|
-
);
|
|
341
333
|
|
|
342
334
|
// src/components/Button/ButtonGroup.tsx
|
|
343
335
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
@@ -356,7 +348,7 @@ function ButtonGroup({ attached = true, orientation = "horizontal", className, .
|
|
|
356
348
|
}
|
|
357
349
|
);
|
|
358
350
|
}
|
|
359
|
-
var CloseButton = forwardRef2(function CloseButton2({ size: size2 = "md", label = "Close", className, type = "button", ...buttonProps }, ref) {
|
|
351
|
+
var CloseButton = /* @__PURE__ */ forwardRef2(function CloseButton2({ size: size2 = "md", label = "Close", className, type = "button", ...buttonProps }, ref) {
|
|
360
352
|
return /* @__PURE__ */ jsx5(
|
|
361
353
|
"button",
|
|
362
354
|
{
|
|
@@ -369,7 +361,7 @@ var CloseButton = forwardRef2(function CloseButton2({ size: size2 = "md", label
|
|
|
369
361
|
}
|
|
370
362
|
);
|
|
371
363
|
});
|
|
372
|
-
var ToggleButton = forwardRef2(function ToggleButton2({ pressed, defaultPressed = false, onPressedChange, onClick, className, variant = "secondary", ...buttonProps }, ref) {
|
|
364
|
+
var ToggleButton = /* @__PURE__ */ forwardRef2(function ToggleButton2({ pressed, defaultPressed = false, onPressedChange, onClick, className, variant = "secondary", ...buttonProps }, ref) {
|
|
373
365
|
const [isPressed, setPressed] = useControllableState(pressed, defaultPressed, onPressedChange);
|
|
374
366
|
return /* @__PURE__ */ jsx5(
|
|
375
367
|
Button,
|
|
@@ -502,7 +494,7 @@ function SegmentedControl({
|
|
|
502
494
|
// src/components/ChoiceCard/ChoiceCard.tsx
|
|
503
495
|
import { forwardRef as forwardRef3 } from "react";
|
|
504
496
|
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
505
|
-
var ChoiceCard = forwardRef3(function ChoiceCard2({ className, description, icon: icon2, recommended = false, shortcut, title, type = "button", ...buttonProps }, ref) {
|
|
497
|
+
var ChoiceCard = /* @__PURE__ */ forwardRef3(function ChoiceCard2({ className, description, icon: icon2, recommended = false, shortcut, title, type = "button", ...buttonProps }, ref) {
|
|
506
498
|
return /* @__PURE__ */ jsxs4(
|
|
507
499
|
"button",
|
|
508
500
|
{
|
|
@@ -629,7 +621,7 @@ import {
|
|
|
629
621
|
useRef as useRef4
|
|
630
622
|
} from "react";
|
|
631
623
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
632
|
-
var ToolbarContext = createContext(null);
|
|
624
|
+
var ToolbarContext = /* @__PURE__ */ createContext(null);
|
|
633
625
|
var candidates = 'button, a[href], input:not([type="hidden"]), select, textarea, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"], [tabindex]';
|
|
634
626
|
var textTypes = ["text", "search", "url", "tel", "password", "email"];
|
|
635
627
|
var pressTypes = ["button", "checkbox", "submit", "reset", "image", "file", "color"];
|
|
@@ -661,7 +653,7 @@ function keepsKey(element, key, forward) {
|
|
|
661
653
|
if (selectionStart === null || selectionEnd === null || selectionStart !== selectionEnd) return true;
|
|
662
654
|
return forward ? selectionEnd < value.length : selectionStart > 0;
|
|
663
655
|
}
|
|
664
|
-
var Toolbar = forwardRef4(function Toolbar2({ orientation = "horizontal", variant = "raised", size: size2 = "md", className, children, onKeyDown, onFocus, ...props }, forwardedRef) {
|
|
656
|
+
var Toolbar = /* @__PURE__ */ forwardRef4(function Toolbar2({ orientation = "horizontal", variant = "raised", size: size2 = "md", className, children, onKeyDown, onFocus, ...props }, forwardedRef) {
|
|
665
657
|
const rootRef = useRef4(null);
|
|
666
658
|
const activeRef = useRef4(null);
|
|
667
659
|
const activeIndex = useRef4(0);
|
|
@@ -1071,12 +1063,12 @@ import {
|
|
|
1071
1063
|
useRef as useRef7
|
|
1072
1064
|
} from "react";
|
|
1073
1065
|
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1074
|
-
var CheckboxGroupContext = createContext2(null);
|
|
1066
|
+
var CheckboxGroupContext = /* @__PURE__ */ createContext2(null);
|
|
1075
1067
|
function assignRef(ref, value) {
|
|
1076
1068
|
if (typeof ref === "function") ref(value);
|
|
1077
1069
|
else if (ref) ref.current = value;
|
|
1078
1070
|
}
|
|
1079
|
-
var Checkbox = forwardRef5(function Checkbox2({
|
|
1071
|
+
var Checkbox = /* @__PURE__ */ forwardRef5(function Checkbox2({
|
|
1080
1072
|
className,
|
|
1081
1073
|
size: size2 = "md",
|
|
1082
1074
|
tone = "primary",
|
|
@@ -1256,7 +1248,7 @@ function Alert({
|
|
|
1256
1248
|
|
|
1257
1249
|
// src/components/Form/Form.tsx
|
|
1258
1250
|
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1259
|
-
var FormContext = createContext3(null);
|
|
1251
|
+
var FormContext = /* @__PURE__ */ createContext3(null);
|
|
1260
1252
|
var checks = [
|
|
1261
1253
|
"valueMissing",
|
|
1262
1254
|
"typeMismatch",
|
|
@@ -1301,7 +1293,7 @@ function sameErrors(a, b) {
|
|
|
1301
1293
|
const keys = Object.keys(a);
|
|
1302
1294
|
return keys.length === Object.keys(b).length && keys.every((key) => a[key] === b[key]);
|
|
1303
1295
|
}
|
|
1304
|
-
var Form = forwardRef6(function Form2({ onSubmit, validate, validationErrors, children, className, onChange, onBlur, onReset, ...formProps }, ref) {
|
|
1296
|
+
var Form = /* @__PURE__ */ forwardRef6(function Form2({ onSubmit, validate, validationErrors, children, className, onChange, onBlur, onReset, ...formProps }, ref) {
|
|
1305
1297
|
const formRef = useRef8(null);
|
|
1306
1298
|
const fields = useRef8(/* @__PURE__ */ new Set());
|
|
1307
1299
|
const [local, setLocal] = useState7({});
|
|
@@ -1582,7 +1574,7 @@ function Field({ label, children, hint, error, name: nameProp, errorMessages, cl
|
|
|
1582
1574
|
// src/components/Input/Input.tsx
|
|
1583
1575
|
import { forwardRef as forwardRef7 } from "react";
|
|
1584
1576
|
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1585
|
-
var Input = forwardRef7(function Input2({ className, isInvalid = false, size: size2 = "md", startContent, endContent, ...inputProps }, ref) {
|
|
1577
|
+
var Input = /* @__PURE__ */ forwardRef7(function Input2({ className, isInvalid = false, size: size2 = "md", startContent, endContent, ...inputProps }, ref) {
|
|
1586
1578
|
const invalid = isInvalid || void 0;
|
|
1587
1579
|
if (startContent === void 0 && endContent === void 0) {
|
|
1588
1580
|
return /* @__PURE__ */ jsx16(
|
|
@@ -1621,7 +1613,7 @@ function assignRef2(ref, value) {
|
|
|
1621
1613
|
if (typeof ref === "function") ref(value);
|
|
1622
1614
|
else if (ref) ref.current = value;
|
|
1623
1615
|
}
|
|
1624
|
-
var SearchField = forwardRef8(function SearchField2({
|
|
1616
|
+
var SearchField = /* @__PURE__ */ forwardRef8(function SearchField2({
|
|
1625
1617
|
value,
|
|
1626
1618
|
defaultValue = "",
|
|
1627
1619
|
onChange,
|
|
@@ -1681,7 +1673,7 @@ var SearchField = forwardRef8(function SearchField2({
|
|
|
1681
1673
|
import { forwardRef as forwardRef9, useState as useState9 } from "react";
|
|
1682
1674
|
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1683
1675
|
var decimals = (step) => (String(step).split(".")[1] ?? "").length;
|
|
1684
|
-
var NumberField = forwardRef9(function NumberField2({
|
|
1676
|
+
var NumberField = /* @__PURE__ */ forwardRef9(function NumberField2({
|
|
1685
1677
|
value,
|
|
1686
1678
|
defaultValue = null,
|
|
1687
1679
|
onChange,
|
|
@@ -2392,7 +2384,7 @@ function dateLayout(locale) {
|
|
|
2392
2384
|
}
|
|
2393
2385
|
return layout;
|
|
2394
2386
|
}
|
|
2395
|
-
var DateField = forwardRef10(function DateField2({
|
|
2387
|
+
var DateField = /* @__PURE__ */ forwardRef10(function DateField2({
|
|
2396
2388
|
value,
|
|
2397
2389
|
defaultValue = "",
|
|
2398
2390
|
onChange,
|
|
@@ -2555,7 +2547,7 @@ function timeLayout(locale, twelve, seconds) {
|
|
|
2555
2547
|
if (twelve && !layout.some((part) => part.type === "dayPeriod")) layout.push({ type: "literal", text: " " }, { type: "dayPeriod" });
|
|
2556
2548
|
return { layout, am: periodOf(1) ?? "AM", pm: periodOf(13) ?? "PM" };
|
|
2557
2549
|
}
|
|
2558
|
-
var TimeField = forwardRef11(function TimeField2({
|
|
2550
|
+
var TimeField = /* @__PURE__ */ forwardRef11(function TimeField2({
|
|
2559
2551
|
value,
|
|
2560
2552
|
defaultValue = "",
|
|
2561
2553
|
onChange,
|
|
@@ -2742,7 +2734,7 @@ function assignRef3(ref, element) {
|
|
|
2742
2734
|
if (typeof ref === "function") ref(element);
|
|
2743
2735
|
else if (ref) ref.current = element;
|
|
2744
2736
|
}
|
|
2745
|
-
var Textarea = forwardRef12(function Textarea2({
|
|
2737
|
+
var Textarea = /* @__PURE__ */ forwardRef12(function Textarea2({
|
|
2746
2738
|
autoGrow = false,
|
|
2747
2739
|
autoGrowMaxHeight = defaultAutoGrowMaxHeight,
|
|
2748
2740
|
bare = false,
|
|
@@ -3359,8 +3351,7 @@ function ListBoxWithRef({
|
|
|
3359
3351
|
}
|
|
3360
3352
|
);
|
|
3361
3353
|
}
|
|
3362
|
-
var ForwardedListBox = forwardRef13(ListBoxWithRef);
|
|
3363
|
-
ForwardedListBox.displayName = "ListBox";
|
|
3354
|
+
var ForwardedListBox = /* @__PURE__ */ Object.assign(/* @__PURE__ */ forwardRef13(ListBoxWithRef), { displayName: "ListBox" });
|
|
3364
3355
|
var ListBox = ForwardedListBox;
|
|
3365
3356
|
|
|
3366
3357
|
// src/components/Combobox/Combobox.tsx
|
|
@@ -3377,7 +3368,7 @@ function assignRef4(ref, value) {
|
|
|
3377
3368
|
if (typeof ref === "function") ref(value);
|
|
3378
3369
|
else if (ref) ref.current = value;
|
|
3379
3370
|
}
|
|
3380
|
-
var Combobox = forwardRef14(function Combobox2({
|
|
3371
|
+
var Combobox = /* @__PURE__ */ forwardRef14(function Combobox2({
|
|
3381
3372
|
options,
|
|
3382
3373
|
value,
|
|
3383
3374
|
defaultValue = "",
|
|
@@ -3603,7 +3594,7 @@ var Combobox = forwardRef14(function Combobox2({
|
|
|
3603
3594
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
3604
3595
|
import { createContext as createContext4, useContext as useContext6, useId as useId6 } from "react";
|
|
3605
3596
|
import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3606
|
-
var RadioGroupContext = createContext4(null);
|
|
3597
|
+
var RadioGroupContext = /* @__PURE__ */ createContext4(null);
|
|
3607
3598
|
function RadioGroup({
|
|
3608
3599
|
label,
|
|
3609
3600
|
description,
|
|
@@ -3666,7 +3657,7 @@ function Radio({ value, children, description, disabled, className, ...inputProp
|
|
|
3666
3657
|
// src/components/Switch/Switch.tsx
|
|
3667
3658
|
import { forwardRef as forwardRef15 } from "react";
|
|
3668
3659
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3669
|
-
var Switch = forwardRef15(function Switch2({ checked, onChange, label, className, disabled, ...buttonProps }, ref) {
|
|
3660
|
+
var Switch = /* @__PURE__ */ forwardRef15(function Switch2({ checked, onChange, label, className, disabled, ...buttonProps }, ref) {
|
|
3670
3661
|
return /* @__PURE__ */ jsx28(
|
|
3671
3662
|
"button",
|
|
3672
3663
|
{
|
|
@@ -3886,7 +3877,7 @@ function FileDropZone({
|
|
|
3886
3877
|
// src/components/Calendar/Calendar.tsx
|
|
3887
3878
|
import { forwardRef as forwardRef16, useEffect as useEffect14, useImperativeHandle, useMemo as useMemo8, useRef as useRef20, useState as useState17 } from "react";
|
|
3888
3879
|
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3889
|
-
var Calendar = forwardRef16(function Calendar2({ value, defaultValue = "", onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, autoFocus = false, className }, ref) {
|
|
3880
|
+
var Calendar = /* @__PURE__ */ forwardRef16(function Calendar2({ value, defaultValue = "", onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, autoFocus = false, className }, ref) {
|
|
3890
3881
|
const [selected, setSelected] = useControllableState(value, defaultValue, onChange);
|
|
3891
3882
|
const today = todayISO();
|
|
3892
3883
|
const [focused, setFocused] = useState17(() => selected || clampDate(today, min, max));
|
|
@@ -4080,7 +4071,7 @@ function assignRef5(ref, value) {
|
|
|
4080
4071
|
if (typeof ref === "function") ref(value);
|
|
4081
4072
|
else if (ref) ref.current = value;
|
|
4082
4073
|
}
|
|
4083
|
-
var DatePicker = forwardRef17(function DatePicker2({
|
|
4074
|
+
var DatePicker = /* @__PURE__ */ forwardRef17(function DatePicker2({
|
|
4084
4075
|
value,
|
|
4085
4076
|
defaultValue = "",
|
|
4086
4077
|
onChange,
|
|
@@ -4180,7 +4171,7 @@ var DatePicker = forwardRef17(function DatePicker2({
|
|
|
4180
4171
|
// src/components/Calendar/RangeCalendar.tsx
|
|
4181
4172
|
import { forwardRef as forwardRef18, useEffect as useEffect15, useId as useId10, useImperativeHandle as useImperativeHandle2, useRef as useRef22, useState as useState19 } from "react";
|
|
4182
4173
|
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4183
|
-
var RangeCalendar = forwardRef18(function RangeCalendar2({ value, defaultValue = null, onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, visibleMonths = 1, autoFocus = false, className }, ref) {
|
|
4174
|
+
var RangeCalendar = /* @__PURE__ */ forwardRef18(function RangeCalendar2({ value, defaultValue = null, onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, visibleMonths = 1, autoFocus = false, className }, ref) {
|
|
4184
4175
|
const months = visibleMonths;
|
|
4185
4176
|
const [range, setRange] = useControllableState(value, defaultValue, onChange);
|
|
4186
4177
|
const today = todayISO();
|
|
@@ -4363,7 +4354,7 @@ function useMediaQuery(query) {
|
|
|
4363
4354
|
}, [query]);
|
|
4364
4355
|
return matches2;
|
|
4365
4356
|
}
|
|
4366
|
-
var DateRangePicker = forwardRef19(function DateRangePicker2({
|
|
4357
|
+
var DateRangePicker = /* @__PURE__ */ forwardRef19(function DateRangePicker2({
|
|
4367
4358
|
value,
|
|
4368
4359
|
defaultValue = null,
|
|
4369
4360
|
onChange,
|
|
@@ -5172,7 +5163,7 @@ function useMenuKeyboard({
|
|
|
5172
5163
|
|
|
5173
5164
|
// src/components/Menu/Menu.tsx
|
|
5174
5165
|
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5175
|
-
var MenuContext = createContext5(null);
|
|
5166
|
+
var MenuContext = /* @__PURE__ */ createContext5(null);
|
|
5176
5167
|
function Menu({ trigger, children, label, align = "start", above = false, width, defaultOpen = false, className }) {
|
|
5177
5168
|
const [open, setOpen] = useState24(defaultOpen);
|
|
5178
5169
|
const rootRef = useRef27(null);
|
|
@@ -5239,7 +5230,7 @@ function Menu({ trigger, children, label, align = "start", above = false, width,
|
|
|
5239
5230
|
) : null
|
|
5240
5231
|
] });
|
|
5241
5232
|
}
|
|
5242
|
-
var MenuItem = forwardRef20(function MenuItem2({ icon: icon2, onSelect, destructive = false, shortcut, className, children, onClick, ...buttonProps }, ref) {
|
|
5233
|
+
var MenuItem = /* @__PURE__ */ forwardRef20(function MenuItem2({ icon: icon2, onSelect, destructive = false, shortcut, className, children, onClick, ...buttonProps }, ref) {
|
|
5243
5234
|
const menu = useContext7(MenuContext);
|
|
5244
5235
|
return /* @__PURE__ */ jsxs32(
|
|
5245
5236
|
"button",
|
|
@@ -5413,7 +5404,7 @@ import {
|
|
|
5413
5404
|
useRef as useRef29
|
|
5414
5405
|
} from "react";
|
|
5415
5406
|
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5416
|
-
var TabsContext = createContext6(null);
|
|
5407
|
+
var TabsContext = /* @__PURE__ */ createContext6(null);
|
|
5417
5408
|
function useTabs(component) {
|
|
5418
5409
|
const context = useContext8(TabsContext);
|
|
5419
5410
|
if (!context) throw new Error(`${component} must be inside <Tabs>.`);
|
|
@@ -5584,7 +5575,7 @@ function Disclosure({
|
|
|
5584
5575
|
}
|
|
5585
5576
|
);
|
|
5586
5577
|
}
|
|
5587
|
-
var AccordionContext = createContext7(null);
|
|
5578
|
+
var AccordionContext = /* @__PURE__ */ createContext7(null);
|
|
5588
5579
|
function Accordion({
|
|
5589
5580
|
type = "single",
|
|
5590
5581
|
value,
|
|
@@ -5647,7 +5638,7 @@ function Breadcrumbs({ items: items2, separator = "chevron", label = "Breadcrumb
|
|
|
5647
5638
|
function linkClassName({ variant = "default" } = {}) {
|
|
5648
5639
|
return cx("ow-link", `ow-link--${variant}`);
|
|
5649
5640
|
}
|
|
5650
|
-
var Link = forwardRef21(function Link2({ variant = "default", external = false, className, children, target, rel, ...props }, ref) {
|
|
5641
|
+
var Link = /* @__PURE__ */ forwardRef21(function Link2({ variant = "default", external = false, className, children, target, rel, ...props }, ref) {
|
|
5651
5642
|
return /* @__PURE__ */ jsxs36(
|
|
5652
5643
|
"a",
|
|
5653
5644
|
{
|
|
@@ -5800,7 +5791,7 @@ function NavList({ label, heading, orientation = "vertical", children, className
|
|
|
5800
5791
|
children
|
|
5801
5792
|
] });
|
|
5802
5793
|
}
|
|
5803
|
-
var NavItem = forwardRef22(function NavItem2({ icon: icon2, active = false, className, children, type = "button", href, end, ...buttonProps }, ref) {
|
|
5794
|
+
var NavItem = /* @__PURE__ */ forwardRef22(function NavItem2({ icon: icon2, active = false, className, children, type = "button", href, end, ...buttonProps }, ref) {
|
|
5804
5795
|
const content = /* @__PURE__ */ jsxs39(Fragment9, { children: [
|
|
5805
5796
|
icon2 ? /* @__PURE__ */ jsx50("span", { className: "ow-nav__icon", children: icon2 }) : null,
|
|
5806
5797
|
/* @__PURE__ */ jsx50("span", { className: "ow-nav__label", children }),
|
|
@@ -6403,7 +6394,7 @@ function DotGrid({ fade = false, interactive = false, className, children, onPoi
|
|
|
6403
6394
|
// src/components/Prose/Prose.tsx
|
|
6404
6395
|
import { forwardRef as forwardRef23 } from "react";
|
|
6405
6396
|
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
6406
|
-
var Prose = forwardRef23(function Prose2({ size: size2 = "md", fullWidth = false, as = "div", className, children, ...props }, ref) {
|
|
6397
|
+
var Prose = /* @__PURE__ */ forwardRef23(function Prose2({ size: size2 = "md", fullWidth = false, as = "div", className, children, ...props }, ref) {
|
|
6407
6398
|
const Element2 = as;
|
|
6408
6399
|
return /* @__PURE__ */ jsx62(
|
|
6409
6400
|
Element2,
|
|
@@ -6526,7 +6517,7 @@ function accepts(file, accept) {
|
|
|
6526
6517
|
});
|
|
6527
6518
|
}
|
|
6528
6519
|
var hasFiles = (event) => Array.from(event.dataTransfer.types).includes("Files");
|
|
6529
|
-
var PromptInput = forwardRef24(function PromptInput2({
|
|
6520
|
+
var PromptInput = /* @__PURE__ */ forwardRef24(function PromptInput2({
|
|
6530
6521
|
value,
|
|
6531
6522
|
defaultValue = "",
|
|
6532
6523
|
onChange,
|
|
@@ -6877,7 +6868,7 @@ var PromptInput = forwardRef24(function PromptInput2({
|
|
|
6877
6868
|
// src/components/PromptInput/PromptSuggestion.tsx
|
|
6878
6869
|
import { forwardRef as forwardRef25 } from "react";
|
|
6879
6870
|
import { jsx as jsx65, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6880
|
-
var PromptSuggestion = forwardRef25(function PromptSuggestion2({ children, icon: icon2, description, variant = description ? "card" : "pill", type = "button", className, ...buttonProps }, ref) {
|
|
6871
|
+
var PromptSuggestion = /* @__PURE__ */ forwardRef25(function PromptSuggestion2({ children, icon: icon2, description, variant = description ? "card" : "pill", type = "button", className, ...buttonProps }, ref) {
|
|
6881
6872
|
if (variant === "card") {
|
|
6882
6873
|
return /* @__PURE__ */ jsxs49("button", { ref, type, className: cx("ow-prompt-suggestion", "ow-prompt-suggestion--card", className), ...buttonProps, children: [
|
|
6883
6874
|
icon2 ? /* @__PURE__ */ jsx65("span", { className: "ow-prompt-suggestion__icon", children: icon2 }) : null,
|
|
@@ -6943,11 +6934,11 @@ import {
|
|
|
6943
6934
|
useState as useState30
|
|
6944
6935
|
} from "react";
|
|
6945
6936
|
import { jsx as jsx66, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
6946
|
-
var ChatConversationContext = createContext8(null);
|
|
6937
|
+
var ChatConversationContext = /* @__PURE__ */ createContext8(null);
|
|
6947
6938
|
var stickyDistance = 32;
|
|
6948
6939
|
var defaultCount = (count) => `${count} new`;
|
|
6949
6940
|
var prefersReducedMotion = () => typeof window !== "undefined" && Boolean(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);
|
|
6950
|
-
var ChatConversation = forwardRef26(function ChatConversation2({
|
|
6941
|
+
var ChatConversation = /* @__PURE__ */ forwardRef26(function ChatConversation2({
|
|
6951
6942
|
children,
|
|
6952
6943
|
empty,
|
|
6953
6944
|
footer,
|
|
@@ -7112,7 +7103,7 @@ function lucide(paths) {
|
|
|
7112
7103
|
);
|
|
7113
7104
|
};
|
|
7114
7105
|
}
|
|
7115
|
-
var BotIcon = lucide(
|
|
7106
|
+
var BotIcon = /* @__PURE__ */ lucide(
|
|
7116
7107
|
/* @__PURE__ */ jsxs51(Fragment10, { children: [
|
|
7117
7108
|
/* @__PURE__ */ jsx67("path", { d: "M12 8V4H8" }),
|
|
7118
7109
|
/* @__PURE__ */ jsx67("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
@@ -7122,25 +7113,25 @@ var BotIcon = lucide(
|
|
|
7122
7113
|
/* @__PURE__ */ jsx67("path", { d: "M9 13v2" })
|
|
7123
7114
|
] })
|
|
7124
7115
|
);
|
|
7125
|
-
var RotateCcwIcon = lucide(
|
|
7116
|
+
var RotateCcwIcon = /* @__PURE__ */ lucide(
|
|
7126
7117
|
/* @__PURE__ */ jsxs51(Fragment10, { children: [
|
|
7127
7118
|
/* @__PURE__ */ jsx67("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
7128
7119
|
/* @__PURE__ */ jsx67("path", { d: "M3 3v5h5" })
|
|
7129
7120
|
] })
|
|
7130
7121
|
);
|
|
7131
|
-
var ThumbsUpIcon = lucide(
|
|
7122
|
+
var ThumbsUpIcon = /* @__PURE__ */ lucide(
|
|
7132
7123
|
/* @__PURE__ */ jsxs51(Fragment10, { children: [
|
|
7133
7124
|
/* @__PURE__ */ jsx67("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }),
|
|
7134
7125
|
/* @__PURE__ */ jsx67("path", { d: "M7 10v12" })
|
|
7135
7126
|
] })
|
|
7136
7127
|
);
|
|
7137
|
-
var ThumbsDownIcon = lucide(
|
|
7128
|
+
var ThumbsDownIcon = /* @__PURE__ */ lucide(
|
|
7138
7129
|
/* @__PURE__ */ jsxs51(Fragment10, { children: [
|
|
7139
7130
|
/* @__PURE__ */ jsx67("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" }),
|
|
7140
7131
|
/* @__PURE__ */ jsx67("path", { d: "M17 14V2" })
|
|
7141
7132
|
] })
|
|
7142
7133
|
);
|
|
7143
|
-
var PencilIcon = lucide(
|
|
7134
|
+
var PencilIcon = /* @__PURE__ */ lucide(
|
|
7144
7135
|
/* @__PURE__ */ jsxs51(Fragment10, { children: [
|
|
7145
7136
|
/* @__PURE__ */ jsx67("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }),
|
|
7146
7137
|
/* @__PURE__ */ jsx67("path", { d: "m15 5 4 4" })
|
|
@@ -7232,7 +7223,7 @@ function useStreamingCaret(bodyRef, contentRef, caretRef, active) {
|
|
|
7232
7223
|
};
|
|
7233
7224
|
}, [active, bodyRef, contentRef, caretRef]);
|
|
7234
7225
|
}
|
|
7235
|
-
var ChatMessage = forwardRef27(function ChatMessage2({ from, children, name, avatar, time, locale, status = "done", error, onRetry, retryLabel = "Retry", actions, showActions = "hover", className, ...props }, ref) {
|
|
7226
|
+
var ChatMessage = /* @__PURE__ */ forwardRef27(function ChatMessage2({ from, children, name, avatar, time, locale, status = "done", error, onRetry, retryLabel = "Retry", actions, showActions = "hover", className, ...props }, ref) {
|
|
7236
7227
|
const conversation = useContext10(ChatConversationContext);
|
|
7237
7228
|
const entering = useChatEntrance();
|
|
7238
7229
|
const id = useId23();
|
|
@@ -7526,7 +7517,7 @@ function formatInput(input) {
|
|
|
7526
7517
|
return String(input);
|
|
7527
7518
|
}
|
|
7528
7519
|
}
|
|
7529
|
-
var ChatTool = forwardRef28(function ChatTool2({
|
|
7520
|
+
var ChatTool = /* @__PURE__ */ forwardRef28(function ChatTool2({
|
|
7530
7521
|
title,
|
|
7531
7522
|
name,
|
|
7532
7523
|
icon: icon2,
|
|
@@ -7683,7 +7674,7 @@ var ChatTool = forwardRef28(function ChatTool2({
|
|
|
7683
7674
|
import { forwardRef as forwardRef29, useId as useId25 } from "react";
|
|
7684
7675
|
import { jsx as jsx70, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
7685
7676
|
var plural = (count, word) => `${count} ${word}${count === 1 ? "" : "s"}`;
|
|
7686
|
-
var ChainOfThought = forwardRef29(function ChainOfThought2({
|
|
7677
|
+
var ChainOfThought = /* @__PURE__ */ forwardRef29(function ChainOfThought2({
|
|
7687
7678
|
steps = [],
|
|
7688
7679
|
status = "success",
|
|
7689
7680
|
duration,
|
|
@@ -7748,7 +7739,7 @@ import { forwardRef as forwardRef30, useCallback as useCallback11, useEffect as
|
|
|
7748
7739
|
import { Fragment as Fragment12, jsx as jsx71, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
7749
7740
|
var openDelay = 250;
|
|
7750
7741
|
var closeDelay = 150;
|
|
7751
|
-
var ChatSource = forwardRef30(function ChatSource2({
|
|
7742
|
+
var ChatSource = /* @__PURE__ */ forwardRef30(function ChatSource2({
|
|
7752
7743
|
title,
|
|
7753
7744
|
source,
|
|
7754
7745
|
snippet,
|
|
@@ -7847,7 +7838,7 @@ var ChatSource = forwardRef30(function ChatSource2({
|
|
|
7847
7838
|
}
|
|
7848
7839
|
);
|
|
7849
7840
|
});
|
|
7850
|
-
var ChatSources = forwardRef30(function ChatSources2({ sources, label, expanded, defaultExpanded = false, onExpandedChange, className, ...props }, ref) {
|
|
7841
|
+
var ChatSources = /* @__PURE__ */ forwardRef30(function ChatSources2({ sources, label, expanded, defaultExpanded = false, onExpandedChange, className, ...props }, ref) {
|
|
7851
7842
|
const id = useId26();
|
|
7852
7843
|
const [isOpen, setOpen] = useControllableState(expanded, defaultExpanded, onExpandedChange);
|
|
7853
7844
|
if (sources.length === 0) return null;
|
|
@@ -7967,7 +7958,7 @@ function assignRef7(ref, value) {
|
|
|
7967
7958
|
if (typeof ref === "function") ref(value);
|
|
7968
7959
|
else if (ref) ref.current = value;
|
|
7969
7960
|
}
|
|
7970
|
-
var ColorField = forwardRef31(function ColorField2({
|
|
7961
|
+
var ColorField = /* @__PURE__ */ forwardRef31(function ColorField2({
|
|
7971
7962
|
value,
|
|
7972
7963
|
defaultValue = "#312c7e",
|
|
7973
7964
|
onChange,
|
|
@@ -8249,7 +8240,7 @@ function assignRef8(ref, value) {
|
|
|
8249
8240
|
if (typeof ref === "function") ref(value);
|
|
8250
8241
|
else if (ref) ref.current = value;
|
|
8251
8242
|
}
|
|
8252
|
-
var ColorArea = forwardRef32(function ColorArea2({
|
|
8243
|
+
var ColorArea = /* @__PURE__ */ forwardRef32(function ColorArea2({
|
|
8253
8244
|
value,
|
|
8254
8245
|
defaultValue = "#312c7e",
|
|
8255
8246
|
onChange,
|
|
@@ -8438,7 +8429,7 @@ function assignRef9(ref, value) {
|
|
|
8438
8429
|
if (typeof ref === "function") ref(value);
|
|
8439
8430
|
else if (ref) ref.current = value;
|
|
8440
8431
|
}
|
|
8441
|
-
var ColorSlider = forwardRef33(function ColorSlider2({
|
|
8432
|
+
var ColorSlider = /* @__PURE__ */ forwardRef33(function ColorSlider2({
|
|
8442
8433
|
channel,
|
|
8443
8434
|
value,
|
|
8444
8435
|
defaultValue = "#312c7e",
|
|
@@ -8580,7 +8571,7 @@ var ColorSlider = forwardRef33(function ColorSlider2({
|
|
|
8580
8571
|
// src/components/ColorPicker/ColorSwatchPicker.tsx
|
|
8581
8572
|
import { forwardRef as forwardRef34, useRef as useRef43 } from "react";
|
|
8582
8573
|
import { jsx as jsx75, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
8583
|
-
var ColorSwatchPicker = forwardRef34(function ColorSwatchPicker2({ options, value, defaultValue, onChange, size: size2 = "md", shape = "square", disabled = false, name, className, ...aria }, ref) {
|
|
8574
|
+
var ColorSwatchPicker = /* @__PURE__ */ forwardRef34(function ColorSwatchPicker2({ options, value, defaultValue, onChange, size: size2 = "md", shape = "square", disabled = false, name, className, ...aria }, ref) {
|
|
8584
8575
|
const [current, setCurrent] = useControllableState(value, defaultValue ?? "", onChange);
|
|
8585
8576
|
const refs = useRef43([]);
|
|
8586
8577
|
const items2 = options.map((option) => {
|