@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/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Hooks for your own components: `useControllableState`, `useFloating` (top-layer
|
|
|
71
71
|
|
|
72
72
|
## Blocks as components
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Every block is also a component in its own package, `@openwarelabs/blocks`, that takes its content as props, so you don't copy its code: all 95, from `Header01` and `Hero01` to `Settings03` and `Chat03` ([the list](blocks/README.md#blocks)).
|
|
75
75
|
|
|
76
76
|
```sh
|
|
77
77
|
npm install @openwarelabs/blocks
|
|
@@ -125,13 +125,17 @@ The docs' header has a colour picker that does this live, and the Theming page s
|
|
|
125
125
|
|
|
126
126
|
`main` takes changes only through pull requests, squash-merged, so each one lands as a single commit named after the PR. The PR title follows [Conventional Commits](https://www.conventionalcommits.org) because `npm run release` reads it: `feat: add a date range picker`, `fix(Menu): close on Escape`, `feat!: rename Stack's gap sizes`. Put `BREAKING CHANGE: …` in the PR description for a breaking change.
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Five checks have to pass to merge:
|
|
129
129
|
|
|
130
|
-
- **Checks**: types, contrast, blocks, the library, the MCP server and the docs.
|
|
130
|
+
- **Checks**: types, contrast, blocks, the library, the MCP server and the docs, and the bundle size: what an app pays, minified and gzipped, for each package and for one piece of it imported alone, against the limits in `size-limits.json` (`npm run size` after a build). Raise a limit in the PR that needs it, so the growth is seen in review. It also lints for React's hooks rules (`npm run lint`; `eslint-suppressions.json` lists the problems there already were), and packs both packages as `npm publish` would, installs them in a new app and imports, requires, bundles and type-checks them there (`npm run smoke`).
|
|
131
131
|
- **PR title**: the title follows the convention (`npm run commits:check -- --title "feat: …"` locally).
|
|
132
132
|
- **Cleaner**: [openwarelabs/cleaner](https://github.com/openwarelabs/cleaner) on the `.ts` and `.tsx` files the PR changes. Types go in a `<name>.types.ts` beside the component, and imports from another folder use the aliases instead of `../`: `@/…` for `src/` (in the library and the docs), `@docs/…` for `docs/` (`?highlight` imports too) and `@build/…` in `mcp/`. Files that haven't been touched yet don't follow it; they catch up as they change.
|
|
133
|
+
- **Visual**: every block (desktop and phone width) and every component example, in light and dark, rendered from the PR and from `main` and compared pixel by pixel. If something looks different, the run's summary lists it and the `visual-report` artifact shows each one before, after and with the changed pixels marked. When the change is meant, add the **visual change** label and the check passes. `npm run visual` runs the same comparison locally against `main` (`-- --filter Hero` for a few).
|
|
134
|
+
- **Accessibility**: axe over every block (desktop and phone width) and every component example, in light and dark, against WCAG 2.2 A and AA. The run's summary lists each problem with the element and how to fix it. `a11y-known.json` lists the problems there already were, which don't fail it; fixing one means lowering its count. `npm run a11y` runs it locally (`-- --filter Hero` for a few).
|
|
133
135
|
|
|
134
|
-
|
|
136
|
+
Dependabot opens a pull request each Monday with the week's npm and GitHub Actions updates, minor and patch ones grouped; every check above runs on it.
|
|
137
|
+
|
|
138
|
+
`scripts/setup-github.sh` sets this up on GitHub (squash merges only, the PR title as the commit, the ruleset for `main`, the visual change label). Repository admins can bypass the ruleset, which `npm run release` uses to push its version commit and tag.
|
|
135
139
|
|
|
136
140
|
## Releasing
|
|
137
141
|
|
package/dist/index.cjs
CHANGED
|
@@ -262,7 +262,7 @@ function buttonClassName({
|
|
|
262
262
|
iconOnly && "ow-button--icon-only"
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
|
-
var Button = (0, import_react.forwardRef)(function Button2({
|
|
265
|
+
var Button = /* @__PURE__ */ (0, import_react.forwardRef)(function Button2({
|
|
266
266
|
children,
|
|
267
267
|
className,
|
|
268
268
|
disabled,
|
|
@@ -354,33 +354,33 @@ function icon(paths) {
|
|
|
354
354
|
);
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
var CheckIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M20 6 9 17l-5-5" }));
|
|
358
|
-
var ChevronDownIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m6 9 6 6 6-6" }));
|
|
359
|
-
var SearchIcon = icon(
|
|
357
|
+
var CheckIcon = /* @__PURE__ */ icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M20 6 9 17l-5-5" }));
|
|
358
|
+
var ChevronDownIcon = /* @__PURE__ */ icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m6 9 6 6 6-6" }));
|
|
359
|
+
var SearchIcon = /* @__PURE__ */ icon(
|
|
360
360
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
361
361
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
|
|
362
362
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m21 21-4.3-4.3" })
|
|
363
363
|
] })
|
|
364
364
|
);
|
|
365
|
-
var CornerDownLeftIcon = icon(
|
|
365
|
+
var CornerDownLeftIcon = /* @__PURE__ */ icon(
|
|
366
366
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
367
367
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "9 10 4 15 9 20" }),
|
|
368
368
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M20 4v7a4 4 0 0 1-4 4H4" })
|
|
369
369
|
] })
|
|
370
370
|
);
|
|
371
|
-
var XIcon = icon(
|
|
371
|
+
var XIcon = /* @__PURE__ */ icon(
|
|
372
372
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
373
373
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M18 6 6 18" }),
|
|
374
374
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m6 6 12 12" })
|
|
375
375
|
] })
|
|
376
376
|
);
|
|
377
|
-
var UserIcon = icon(
|
|
377
|
+
var UserIcon = /* @__PURE__ */ icon(
|
|
378
378
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
379
379
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
|
|
380
380
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "7", r: "4" })
|
|
381
381
|
] })
|
|
382
382
|
);
|
|
383
|
-
var TrashIcon = icon(
|
|
383
|
+
var TrashIcon = /* @__PURE__ */ icon(
|
|
384
384
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
385
385
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 6h18" }),
|
|
386
386
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
@@ -389,57 +389,56 @@ var TrashIcon = icon(
|
|
|
389
389
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "14", x2: "14", y1: "11", y2: "17" })
|
|
390
390
|
] })
|
|
391
391
|
);
|
|
392
|
-
var CircleCheckIcon = icon(
|
|
392
|
+
var CircleCheckIcon = /* @__PURE__ */ icon(
|
|
393
393
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
394
394
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
395
395
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m9 12 2 2 4-4" })
|
|
396
396
|
] })
|
|
397
397
|
);
|
|
398
|
-
var CircleAlertIcon = icon(
|
|
398
|
+
var CircleAlertIcon = /* @__PURE__ */ icon(
|
|
399
399
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
400
400
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
401
401
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
|
|
402
402
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
|
|
403
403
|
] })
|
|
404
404
|
);
|
|
405
|
-
var ChevronRightIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m9 18 6-6-6-6" }));
|
|
406
|
-
var ChevronLeftIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m15 18-6-6 6-6" }));
|
|
407
|
-
var
|
|
408
|
-
var
|
|
409
|
-
var PlusIcon = icon(
|
|
405
|
+
var ChevronRightIcon = /* @__PURE__ */ icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m9 18 6-6-6-6" }));
|
|
406
|
+
var ChevronLeftIcon = /* @__PURE__ */ icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m15 18-6-6 6-6" }));
|
|
407
|
+
var MinusIcon = /* @__PURE__ */ icon(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M5 12h14" }));
|
|
408
|
+
var PlusIcon = /* @__PURE__ */ icon(
|
|
410
409
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
411
410
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M5 12h14" }),
|
|
412
411
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 5v14" })
|
|
413
412
|
] })
|
|
414
413
|
);
|
|
415
|
-
var InfoIcon = icon(
|
|
414
|
+
var InfoIcon = /* @__PURE__ */ icon(
|
|
416
415
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
417
416
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
418
417
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 16v-4" }),
|
|
419
418
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 8h.01" })
|
|
420
419
|
] })
|
|
421
420
|
);
|
|
422
|
-
var TriangleAlertIcon = icon(
|
|
421
|
+
var TriangleAlertIcon = /* @__PURE__ */ icon(
|
|
423
422
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
424
423
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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" }),
|
|
425
424
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 9v4" }),
|
|
426
425
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 17h.01" })
|
|
427
426
|
] })
|
|
428
427
|
);
|
|
429
|
-
var PipetteIcon = icon(
|
|
428
|
+
var PipetteIcon = /* @__PURE__ */ icon(
|
|
430
429
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
431
430
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m2 22 1-1h3l9-9" }),
|
|
432
431
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 21v-3l9-9" }),
|
|
433
432
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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" })
|
|
434
433
|
] })
|
|
435
434
|
);
|
|
436
|
-
var CopyIcon = icon(
|
|
435
|
+
var CopyIcon = /* @__PURE__ */ icon(
|
|
437
436
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
438
437
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
439
438
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
440
439
|
] })
|
|
441
440
|
);
|
|
442
|
-
var CalendarIcon = icon(
|
|
441
|
+
var CalendarIcon = /* @__PURE__ */ icon(
|
|
443
442
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
444
443
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8 2v4" }),
|
|
445
444
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M16 2v4" }),
|
|
@@ -447,62 +446,55 @@ var CalendarIcon = icon(
|
|
|
447
446
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 10h18" })
|
|
448
447
|
] })
|
|
449
448
|
);
|
|
450
|
-
var FileIcon = icon(
|
|
449
|
+
var FileIcon = /* @__PURE__ */ icon(
|
|
451
450
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
452
451
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
453
452
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
454
453
|
] })
|
|
455
454
|
);
|
|
456
|
-
var FolderIcon = icon(
|
|
455
|
+
var FolderIcon = /* @__PURE__ */ icon(
|
|
457
456
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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" })
|
|
458
457
|
);
|
|
459
|
-
var FolderOpenIcon = icon(
|
|
458
|
+
var FolderOpenIcon = /* @__PURE__ */ icon(
|
|
460
459
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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" })
|
|
461
460
|
);
|
|
462
|
-
var UploadIcon = icon(
|
|
461
|
+
var UploadIcon = /* @__PURE__ */ icon(
|
|
463
462
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
464
463
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
465
464
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "17 8 12 3 7 8" }),
|
|
466
465
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
467
466
|
] })
|
|
468
467
|
);
|
|
469
|
-
var ArrowUpRightIcon = icon(
|
|
468
|
+
var ArrowUpRightIcon = /* @__PURE__ */ icon(
|
|
470
469
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
471
470
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M7 7h10v10" }),
|
|
472
471
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M7 17 17 7" })
|
|
473
472
|
] })
|
|
474
473
|
);
|
|
475
|
-
var ArrowUpIcon = icon(
|
|
474
|
+
var ArrowUpIcon = /* @__PURE__ */ icon(
|
|
476
475
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
477
476
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m5 12 7-7 7 7" }),
|
|
478
477
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 19V5" })
|
|
479
478
|
] })
|
|
480
479
|
);
|
|
481
|
-
var ArrowDownIcon = icon(
|
|
480
|
+
var ArrowDownIcon = /* @__PURE__ */ icon(
|
|
482
481
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
483
482
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 5v14" }),
|
|
484
483
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m19 12-7 7-7-7" })
|
|
485
484
|
] })
|
|
486
485
|
);
|
|
487
|
-
var ChevronsUpDownIcon = icon(
|
|
486
|
+
var ChevronsUpDownIcon = /* @__PURE__ */ icon(
|
|
488
487
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
489
488
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m7 15 5 5 5-5" }),
|
|
490
489
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m7 9 5-5 5 5" })
|
|
491
490
|
] })
|
|
492
491
|
);
|
|
493
|
-
var InboxIcon = icon(
|
|
492
|
+
var InboxIcon = /* @__PURE__ */ icon(
|
|
494
493
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
495
494
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12" }),
|
|
496
495
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("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" })
|
|
497
496
|
] })
|
|
498
497
|
);
|
|
499
|
-
var EllipsisIcon = icon(
|
|
500
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
501
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
|
502
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "19", cy: "12", r: "1" }),
|
|
503
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "5", cy: "12", r: "1" })
|
|
504
|
-
] })
|
|
505
|
-
);
|
|
506
498
|
|
|
507
499
|
// src/components/Button/ButtonGroup.tsx
|
|
508
500
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
@@ -521,7 +513,7 @@ function ButtonGroup({ attached = true, orientation = "horizontal", className, .
|
|
|
521
513
|
}
|
|
522
514
|
);
|
|
523
515
|
}
|
|
524
|
-
var CloseButton = (0, import_react3.forwardRef)(function CloseButton2({ size: size2 = "md", label = "Close", className, type = "button", ...buttonProps }, ref) {
|
|
516
|
+
var CloseButton = /* @__PURE__ */ (0, import_react3.forwardRef)(function CloseButton2({ size: size2 = "md", label = "Close", className, type = "button", ...buttonProps }, ref) {
|
|
525
517
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
526
518
|
"button",
|
|
527
519
|
{
|
|
@@ -534,7 +526,7 @@ var CloseButton = (0, import_react3.forwardRef)(function CloseButton2({ size: si
|
|
|
534
526
|
}
|
|
535
527
|
);
|
|
536
528
|
});
|
|
537
|
-
var ToggleButton = (0, import_react3.forwardRef)(function ToggleButton2({ pressed, defaultPressed = false, onPressedChange, onClick, className, variant = "secondary", ...buttonProps }, ref) {
|
|
529
|
+
var ToggleButton = /* @__PURE__ */ (0, import_react3.forwardRef)(function ToggleButton2({ pressed, defaultPressed = false, onPressedChange, onClick, className, variant = "secondary", ...buttonProps }, ref) {
|
|
538
530
|
const [isPressed, setPressed] = useControllableState(pressed, defaultPressed, onPressedChange);
|
|
539
531
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
540
532
|
Button,
|
|
@@ -667,7 +659,7 @@ function SegmentedControl({
|
|
|
667
659
|
// src/components/ChoiceCard/ChoiceCard.tsx
|
|
668
660
|
var import_react6 = require("react");
|
|
669
661
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
670
|
-
var ChoiceCard = (0, import_react6.forwardRef)(function ChoiceCard2({ className, description, icon: icon2, recommended = false, shortcut, title, type = "button", ...buttonProps }, ref) {
|
|
662
|
+
var ChoiceCard = /* @__PURE__ */ (0, import_react6.forwardRef)(function ChoiceCard2({ className, description, icon: icon2, recommended = false, shortcut, title, type = "button", ...buttonProps }, ref) {
|
|
671
663
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
672
664
|
"button",
|
|
673
665
|
{
|
|
@@ -785,7 +777,7 @@ var import_react12 = require("react");
|
|
|
785
777
|
// src/components/Toolbar/Toolbar.tsx
|
|
786
778
|
var import_react8 = require("react");
|
|
787
779
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
788
|
-
var ToolbarContext = (0, import_react8.createContext)(null);
|
|
780
|
+
var ToolbarContext = /* @__PURE__ */ (0, import_react8.createContext)(null);
|
|
789
781
|
var candidates = 'button, a[href], input:not([type="hidden"]), select, textarea, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"], [tabindex]';
|
|
790
782
|
var textTypes = ["text", "search", "url", "tel", "password", "email"];
|
|
791
783
|
var pressTypes = ["button", "checkbox", "submit", "reset", "image", "file", "color"];
|
|
@@ -817,7 +809,7 @@ function keepsKey(element, key, forward) {
|
|
|
817
809
|
if (selectionStart === null || selectionEnd === null || selectionStart !== selectionEnd) return true;
|
|
818
810
|
return forward ? selectionEnd < value.length : selectionStart > 0;
|
|
819
811
|
}
|
|
820
|
-
var Toolbar = (0, import_react8.forwardRef)(function Toolbar2({ orientation = "horizontal", variant = "raised", size: size2 = "md", className, children, onKeyDown, onFocus, ...props }, forwardedRef) {
|
|
812
|
+
var Toolbar = /* @__PURE__ */ (0, import_react8.forwardRef)(function Toolbar2({ orientation = "horizontal", variant = "raised", size: size2 = "md", className, children, onKeyDown, onFocus, ...props }, forwardedRef) {
|
|
821
813
|
const rootRef = (0, import_react8.useRef)(null);
|
|
822
814
|
const activeRef = (0, import_react8.useRef)(null);
|
|
823
815
|
const activeIndex = (0, import_react8.useRef)(0);
|
|
@@ -1220,12 +1212,12 @@ var import_react15 = require("react");
|
|
|
1220
1212
|
// src/components/Checkbox/Checkbox.tsx
|
|
1221
1213
|
var import_react13 = require("react");
|
|
1222
1214
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1223
|
-
var CheckboxGroupContext = (0, import_react13.createContext)(null);
|
|
1215
|
+
var CheckboxGroupContext = /* @__PURE__ */ (0, import_react13.createContext)(null);
|
|
1224
1216
|
function assignRef(ref, value) {
|
|
1225
1217
|
if (typeof ref === "function") ref(value);
|
|
1226
1218
|
else if (ref) ref.current = value;
|
|
1227
1219
|
}
|
|
1228
|
-
var Checkbox = (0, import_react13.forwardRef)(function Checkbox2({
|
|
1220
|
+
var Checkbox = /* @__PURE__ */ (0, import_react13.forwardRef)(function Checkbox2({
|
|
1229
1221
|
className,
|
|
1230
1222
|
size: size2 = "md",
|
|
1231
1223
|
tone = "primary",
|
|
@@ -1396,7 +1388,7 @@ function Alert({
|
|
|
1396
1388
|
|
|
1397
1389
|
// src/components/Form/Form.tsx
|
|
1398
1390
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1399
|
-
var FormContext = (0, import_react14.createContext)(null);
|
|
1391
|
+
var FormContext = /* @__PURE__ */ (0, import_react14.createContext)(null);
|
|
1400
1392
|
var checks = [
|
|
1401
1393
|
"valueMissing",
|
|
1402
1394
|
"typeMismatch",
|
|
@@ -1441,7 +1433,7 @@ function sameErrors(a, b) {
|
|
|
1441
1433
|
const keys = Object.keys(a);
|
|
1442
1434
|
return keys.length === Object.keys(b).length && keys.every((key) => a[key] === b[key]);
|
|
1443
1435
|
}
|
|
1444
|
-
var Form = (0, import_react14.forwardRef)(function Form2({ onSubmit, validate, validationErrors, children, className, onChange, onBlur, onReset, ...formProps }, ref) {
|
|
1436
|
+
var Form = /* @__PURE__ */ (0, import_react14.forwardRef)(function Form2({ onSubmit, validate, validationErrors, children, className, onChange, onBlur, onReset, ...formProps }, ref) {
|
|
1445
1437
|
const formRef = (0, import_react14.useRef)(null);
|
|
1446
1438
|
const fields = (0, import_react14.useRef)(/* @__PURE__ */ new Set());
|
|
1447
1439
|
const [local, setLocal] = (0, import_react14.useState)({});
|
|
@@ -1722,7 +1714,7 @@ function Field({ label, children, hint, error, name: nameProp, errorMessages, cl
|
|
|
1722
1714
|
// src/components/Input/Input.tsx
|
|
1723
1715
|
var import_react16 = require("react");
|
|
1724
1716
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1725
|
-
var Input = (0, import_react16.forwardRef)(function Input2({ className, isInvalid = false, size: size2 = "md", startContent, endContent, ...inputProps }, ref) {
|
|
1717
|
+
var Input = /* @__PURE__ */ (0, import_react16.forwardRef)(function Input2({ className, isInvalid = false, size: size2 = "md", startContent, endContent, ...inputProps }, ref) {
|
|
1726
1718
|
const invalid = isInvalid || void 0;
|
|
1727
1719
|
if (startContent === void 0 && endContent === void 0) {
|
|
1728
1720
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -1761,7 +1753,7 @@ function assignRef2(ref, value) {
|
|
|
1761
1753
|
if (typeof ref === "function") ref(value);
|
|
1762
1754
|
else if (ref) ref.current = value;
|
|
1763
1755
|
}
|
|
1764
|
-
var SearchField = (0, import_react17.forwardRef)(function SearchField2({
|
|
1756
|
+
var SearchField = /* @__PURE__ */ (0, import_react17.forwardRef)(function SearchField2({
|
|
1765
1757
|
value,
|
|
1766
1758
|
defaultValue = "",
|
|
1767
1759
|
onChange,
|
|
@@ -1821,7 +1813,7 @@ var SearchField = (0, import_react17.forwardRef)(function SearchField2({
|
|
|
1821
1813
|
var import_react18 = require("react");
|
|
1822
1814
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1823
1815
|
var decimals = (step) => (String(step).split(".")[1] ?? "").length;
|
|
1824
|
-
var NumberField = (0, import_react18.forwardRef)(function NumberField2({
|
|
1816
|
+
var NumberField = /* @__PURE__ */ (0, import_react18.forwardRef)(function NumberField2({
|
|
1825
1817
|
value,
|
|
1826
1818
|
defaultValue = null,
|
|
1827
1819
|
onChange,
|
|
@@ -2532,7 +2524,7 @@ function dateLayout(locale) {
|
|
|
2532
2524
|
}
|
|
2533
2525
|
return layout;
|
|
2534
2526
|
}
|
|
2535
|
-
var DateField = (0, import_react21.forwardRef)(function DateField2({
|
|
2527
|
+
var DateField = /* @__PURE__ */ (0, import_react21.forwardRef)(function DateField2({
|
|
2536
2528
|
value,
|
|
2537
2529
|
defaultValue = "",
|
|
2538
2530
|
onChange,
|
|
@@ -2695,7 +2687,7 @@ function timeLayout(locale, twelve, seconds) {
|
|
|
2695
2687
|
if (twelve && !layout.some((part) => part.type === "dayPeriod")) layout.push({ type: "literal", text: " " }, { type: "dayPeriod" });
|
|
2696
2688
|
return { layout, am: periodOf(1) ?? "AM", pm: periodOf(13) ?? "PM" };
|
|
2697
2689
|
}
|
|
2698
|
-
var TimeField = (0, import_react22.forwardRef)(function TimeField2({
|
|
2690
|
+
var TimeField = /* @__PURE__ */ (0, import_react22.forwardRef)(function TimeField2({
|
|
2699
2691
|
value,
|
|
2700
2692
|
defaultValue = "",
|
|
2701
2693
|
onChange,
|
|
@@ -2878,7 +2870,7 @@ function assignRef3(ref, element) {
|
|
|
2878
2870
|
if (typeof ref === "function") ref(element);
|
|
2879
2871
|
else if (ref) ref.current = element;
|
|
2880
2872
|
}
|
|
2881
|
-
var Textarea = (0, import_react23.forwardRef)(function Textarea2({
|
|
2873
|
+
var Textarea = /* @__PURE__ */ (0, import_react23.forwardRef)(function Textarea2({
|
|
2882
2874
|
autoGrow = false,
|
|
2883
2875
|
autoGrowMaxHeight = defaultAutoGrowMaxHeight,
|
|
2884
2876
|
bare = false,
|
|
@@ -3487,8 +3479,7 @@ function ListBoxWithRef({
|
|
|
3487
3479
|
}
|
|
3488
3480
|
);
|
|
3489
3481
|
}
|
|
3490
|
-
var ForwardedListBox = (0, import_react25.forwardRef)(ListBoxWithRef);
|
|
3491
|
-
ForwardedListBox.displayName = "ListBox";
|
|
3482
|
+
var ForwardedListBox = /* @__PURE__ */ Object.assign(/* @__PURE__ */ (0, import_react25.forwardRef)(ListBoxWithRef), { displayName: "ListBox" });
|
|
3492
3483
|
var ListBox = ForwardedListBox;
|
|
3493
3484
|
|
|
3494
3485
|
// src/components/Combobox/Combobox.tsx
|
|
@@ -3498,7 +3489,7 @@ function assignRef4(ref, value) {
|
|
|
3498
3489
|
if (typeof ref === "function") ref(value);
|
|
3499
3490
|
else if (ref) ref.current = value;
|
|
3500
3491
|
}
|
|
3501
|
-
var Combobox = (0, import_react26.forwardRef)(function Combobox2({
|
|
3492
|
+
var Combobox = /* @__PURE__ */ (0, import_react26.forwardRef)(function Combobox2({
|
|
3502
3493
|
options,
|
|
3503
3494
|
value,
|
|
3504
3495
|
defaultValue = "",
|
|
@@ -3724,7 +3715,7 @@ var Combobox = (0, import_react26.forwardRef)(function Combobox2({
|
|
|
3724
3715
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
3725
3716
|
var import_react27 = require("react");
|
|
3726
3717
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3727
|
-
var RadioGroupContext = (0, import_react27.createContext)(null);
|
|
3718
|
+
var RadioGroupContext = /* @__PURE__ */ (0, import_react27.createContext)(null);
|
|
3728
3719
|
function RadioGroup({
|
|
3729
3720
|
label,
|
|
3730
3721
|
description,
|
|
@@ -3787,7 +3778,7 @@ function Radio({ value, children, description, disabled, className, ...inputProp
|
|
|
3787
3778
|
// src/components/Switch/Switch.tsx
|
|
3788
3779
|
var import_react28 = require("react");
|
|
3789
3780
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3790
|
-
var Switch = (0, import_react28.forwardRef)(function Switch2({ checked, onChange, label, className, disabled, ...buttonProps }, ref) {
|
|
3781
|
+
var Switch = /* @__PURE__ */ (0, import_react28.forwardRef)(function Switch2({ checked, onChange, label, className, disabled, ...buttonProps }, ref) {
|
|
3791
3782
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3792
3783
|
"button",
|
|
3793
3784
|
{
|
|
@@ -4007,7 +3998,7 @@ function FileDropZone({
|
|
|
4007
3998
|
// src/components/Calendar/Calendar.tsx
|
|
4008
3999
|
var import_react31 = require("react");
|
|
4009
4000
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4010
|
-
var Calendar = (0, import_react31.forwardRef)(function Calendar2({ value, defaultValue = "", onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, autoFocus = false, className }, ref) {
|
|
4001
|
+
var Calendar = /* @__PURE__ */ (0, import_react31.forwardRef)(function Calendar2({ value, defaultValue = "", onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, autoFocus = false, className }, ref) {
|
|
4011
4002
|
const [selected, setSelected] = useControllableState(value, defaultValue, onChange);
|
|
4012
4003
|
const today = todayISO();
|
|
4013
4004
|
const [focused, setFocused] = (0, import_react31.useState)(() => selected || clampDate(today, min, max));
|
|
@@ -4201,7 +4192,7 @@ function assignRef5(ref, value) {
|
|
|
4201
4192
|
if (typeof ref === "function") ref(value);
|
|
4202
4193
|
else if (ref) ref.current = value;
|
|
4203
4194
|
}
|
|
4204
|
-
var DatePicker = (0, import_react32.forwardRef)(function DatePicker2({
|
|
4195
|
+
var DatePicker = /* @__PURE__ */ (0, import_react32.forwardRef)(function DatePicker2({
|
|
4205
4196
|
value,
|
|
4206
4197
|
defaultValue = "",
|
|
4207
4198
|
onChange,
|
|
@@ -4301,7 +4292,7 @@ var DatePicker = (0, import_react32.forwardRef)(function DatePicker2({
|
|
|
4301
4292
|
// src/components/Calendar/RangeCalendar.tsx
|
|
4302
4293
|
var import_react33 = require("react");
|
|
4303
4294
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4304
|
-
var RangeCalendar = (0, import_react33.forwardRef)(function RangeCalendar2({ value, defaultValue = null, onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, visibleMonths = 1, autoFocus = false, className }, ref) {
|
|
4295
|
+
var RangeCalendar = /* @__PURE__ */ (0, import_react33.forwardRef)(function RangeCalendar2({ value, defaultValue = null, onChange, min, max, isDateDisabled, locale, weekStartsOn = 1, visibleMonths = 1, autoFocus = false, className }, ref) {
|
|
4305
4296
|
const months = visibleMonths;
|
|
4306
4297
|
const [range, setRange] = useControllableState(value, defaultValue, onChange);
|
|
4307
4298
|
const today = todayISO();
|
|
@@ -4484,7 +4475,7 @@ function useMediaQuery(query) {
|
|
|
4484
4475
|
}, [query]);
|
|
4485
4476
|
return matches2;
|
|
4486
4477
|
}
|
|
4487
|
-
var DateRangePicker = (0, import_react34.forwardRef)(function DateRangePicker2({
|
|
4478
|
+
var DateRangePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(function DateRangePicker2({
|
|
4488
4479
|
value,
|
|
4489
4480
|
defaultValue = null,
|
|
4490
4481
|
onChange,
|
|
@@ -5276,7 +5267,7 @@ function useMenuKeyboard({
|
|
|
5276
5267
|
|
|
5277
5268
|
// src/components/Menu/Menu.tsx
|
|
5278
5269
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5279
|
-
var MenuContext = (0, import_react44.createContext)(null);
|
|
5270
|
+
var MenuContext = /* @__PURE__ */ (0, import_react44.createContext)(null);
|
|
5280
5271
|
function Menu({ trigger, children, label, align = "start", above = false, width, defaultOpen = false, className }) {
|
|
5281
5272
|
const [open, setOpen] = (0, import_react44.useState)(defaultOpen);
|
|
5282
5273
|
const rootRef = (0, import_react44.useRef)(null);
|
|
@@ -5343,7 +5334,7 @@ function Menu({ trigger, children, label, align = "start", above = false, width,
|
|
|
5343
5334
|
) : null
|
|
5344
5335
|
] });
|
|
5345
5336
|
}
|
|
5346
|
-
var MenuItem = (0, import_react44.forwardRef)(function MenuItem2({ icon: icon2, onSelect, destructive = false, shortcut, className, children, onClick, ...buttonProps }, ref) {
|
|
5337
|
+
var MenuItem = /* @__PURE__ */ (0, import_react44.forwardRef)(function MenuItem2({ icon: icon2, onSelect, destructive = false, shortcut, className, children, onClick, ...buttonProps }, ref) {
|
|
5347
5338
|
const menu = (0, import_react44.useContext)(MenuContext);
|
|
5348
5339
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5349
5340
|
"button",
|
|
@@ -5511,7 +5502,7 @@ function CommandPalette({ open, onClose, commands, placeholder = "Search command
|
|
|
5511
5502
|
// src/components/Tabs/Tabs.tsx
|
|
5512
5503
|
var import_react46 = require("react");
|
|
5513
5504
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5514
|
-
var TabsContext = (0, import_react46.createContext)(null);
|
|
5505
|
+
var TabsContext = /* @__PURE__ */ (0, import_react46.createContext)(null);
|
|
5515
5506
|
function useTabs(component) {
|
|
5516
5507
|
const context = (0, import_react46.useContext)(TabsContext);
|
|
5517
5508
|
if (!context) throw new Error(`${component} must be inside <Tabs>.`);
|
|
@@ -5676,7 +5667,7 @@ function Disclosure({
|
|
|
5676
5667
|
}
|
|
5677
5668
|
);
|
|
5678
5669
|
}
|
|
5679
|
-
var AccordionContext = (0, import_react47.createContext)(null);
|
|
5670
|
+
var AccordionContext = /* @__PURE__ */ (0, import_react47.createContext)(null);
|
|
5680
5671
|
function Accordion({
|
|
5681
5672
|
type = "single",
|
|
5682
5673
|
value,
|
|
@@ -5739,7 +5730,7 @@ function Breadcrumbs({ items: items2, separator = "chevron", label = "Breadcrumb
|
|
|
5739
5730
|
function linkClassName({ variant = "default" } = {}) {
|
|
5740
5731
|
return cx("ow-link", `ow-link--${variant}`);
|
|
5741
5732
|
}
|
|
5742
|
-
var Link = (0, import_react48.forwardRef)(function Link2({ variant = "default", external = false, className, children, target, rel, ...props }, ref) {
|
|
5733
|
+
var Link = /* @__PURE__ */ (0, import_react48.forwardRef)(function Link2({ variant = "default", external = false, className, children, target, rel, ...props }, ref) {
|
|
5743
5734
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5744
5735
|
"a",
|
|
5745
5736
|
{
|
|
@@ -5892,7 +5883,7 @@ function NavList({ label, heading, orientation = "vertical", children, className
|
|
|
5892
5883
|
children
|
|
5893
5884
|
] });
|
|
5894
5885
|
}
|
|
5895
|
-
var NavItem = (0, import_react50.forwardRef)(function NavItem2({ icon: icon2, active = false, className, children, type = "button", href, end, ...buttonProps }, ref) {
|
|
5886
|
+
var NavItem = /* @__PURE__ */ (0, import_react50.forwardRef)(function NavItem2({ icon: icon2, active = false, className, children, type = "button", href, end, ...buttonProps }, ref) {
|
|
5896
5887
|
const content = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
5897
5888
|
icon2 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "ow-nav__icon", children: icon2 }) : null,
|
|
5898
5889
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "ow-nav__label", children }),
|
|
@@ -6491,7 +6482,7 @@ function DotGrid({ fade = false, interactive = false, className, children, onPoi
|
|
|
6491
6482
|
// src/components/Prose/Prose.tsx
|
|
6492
6483
|
var import_react57 = require("react");
|
|
6493
6484
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
6494
|
-
var Prose = (0, import_react57.forwardRef)(function Prose2({ size: size2 = "md", fullWidth = false, as = "div", className, children, ...props }, ref) {
|
|
6485
|
+
var Prose = /* @__PURE__ */ (0, import_react57.forwardRef)(function Prose2({ size: size2 = "md", fullWidth = false, as = "div", className, children, ...props }, ref) {
|
|
6495
6486
|
const Element2 = as;
|
|
6496
6487
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
6497
6488
|
Element2,
|
|
@@ -6607,7 +6598,7 @@ function accepts(file, accept) {
|
|
|
6607
6598
|
});
|
|
6608
6599
|
}
|
|
6609
6600
|
var hasFiles = (event) => Array.from(event.dataTransfer.types).includes("Files");
|
|
6610
|
-
var PromptInput = (0, import_react58.forwardRef)(function PromptInput2({
|
|
6601
|
+
var PromptInput = /* @__PURE__ */ (0, import_react58.forwardRef)(function PromptInput2({
|
|
6611
6602
|
value,
|
|
6612
6603
|
defaultValue = "",
|
|
6613
6604
|
onChange,
|
|
@@ -6958,7 +6949,7 @@ var PromptInput = (0, import_react58.forwardRef)(function PromptInput2({
|
|
|
6958
6949
|
// src/components/PromptInput/PromptSuggestion.tsx
|
|
6959
6950
|
var import_react59 = require("react");
|
|
6960
6951
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6961
|
-
var PromptSuggestion = (0, import_react59.forwardRef)(function PromptSuggestion2({ children, icon: icon2, description, variant = description ? "card" : "pill", type = "button", className, ...buttonProps }, ref) {
|
|
6952
|
+
var PromptSuggestion = /* @__PURE__ */ (0, import_react59.forwardRef)(function PromptSuggestion2({ children, icon: icon2, description, variant = description ? "card" : "pill", type = "button", className, ...buttonProps }, ref) {
|
|
6962
6953
|
if (variant === "card") {
|
|
6963
6954
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("button", { ref, type, className: cx("ow-prompt-suggestion", "ow-prompt-suggestion--card", className), ...buttonProps, children: [
|
|
6964
6955
|
icon2 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "ow-prompt-suggestion__icon", children: icon2 }) : null,
|
|
@@ -7013,11 +7004,11 @@ function PromptSuggestions({
|
|
|
7013
7004
|
// src/components/Chat/ChatConversation.tsx
|
|
7014
7005
|
var import_react60 = require("react");
|
|
7015
7006
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
7016
|
-
var ChatConversationContext = (0, import_react60.createContext)(null);
|
|
7007
|
+
var ChatConversationContext = /* @__PURE__ */ (0, import_react60.createContext)(null);
|
|
7017
7008
|
var stickyDistance = 32;
|
|
7018
7009
|
var defaultCount = (count) => `${count} new`;
|
|
7019
7010
|
var prefersReducedMotion = () => typeof window !== "undefined" && Boolean(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);
|
|
7020
|
-
var ChatConversation = (0, import_react60.forwardRef)(function ChatConversation2({
|
|
7011
|
+
var ChatConversation = /* @__PURE__ */ (0, import_react60.forwardRef)(function ChatConversation2({
|
|
7021
7012
|
children,
|
|
7022
7013
|
empty,
|
|
7023
7014
|
footer,
|
|
@@ -7174,7 +7165,7 @@ function lucide(paths) {
|
|
|
7174
7165
|
);
|
|
7175
7166
|
};
|
|
7176
7167
|
}
|
|
7177
|
-
var BotIcon = lucide(
|
|
7168
|
+
var BotIcon = /* @__PURE__ */ lucide(
|
|
7178
7169
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
7179
7170
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M12 8V4H8" }),
|
|
7180
7171
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
@@ -7184,25 +7175,25 @@ var BotIcon = lucide(
|
|
|
7184
7175
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M9 13v2" })
|
|
7185
7176
|
] })
|
|
7186
7177
|
);
|
|
7187
|
-
var RotateCcwIcon = lucide(
|
|
7178
|
+
var RotateCcwIcon = /* @__PURE__ */ lucide(
|
|
7188
7179
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
7189
7180
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
7190
7181
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M3 3v5h5" })
|
|
7191
7182
|
] })
|
|
7192
7183
|
);
|
|
7193
|
-
var ThumbsUpIcon = lucide(
|
|
7184
|
+
var ThumbsUpIcon = /* @__PURE__ */ lucide(
|
|
7194
7185
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
7195
7186
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("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" }),
|
|
7196
7187
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M7 10v12" })
|
|
7197
7188
|
] })
|
|
7198
7189
|
);
|
|
7199
|
-
var ThumbsDownIcon = lucide(
|
|
7190
|
+
var ThumbsDownIcon = /* @__PURE__ */ lucide(
|
|
7200
7191
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
7201
7192
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("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" }),
|
|
7202
7193
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M17 14V2" })
|
|
7203
7194
|
] })
|
|
7204
7195
|
);
|
|
7205
|
-
var PencilIcon = lucide(
|
|
7196
|
+
var PencilIcon = /* @__PURE__ */ lucide(
|
|
7206
7197
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
7207
7198
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("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" }),
|
|
7208
7199
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "m15 5 4 4" })
|
|
@@ -7294,7 +7285,7 @@ function useStreamingCaret(bodyRef, contentRef, caretRef, active) {
|
|
|
7294
7285
|
};
|
|
7295
7286
|
}, [active, bodyRef, contentRef, caretRef]);
|
|
7296
7287
|
}
|
|
7297
|
-
var ChatMessage = (0, import_react61.forwardRef)(function ChatMessage2({ from, children, name, avatar, time, locale, status = "done", error, onRetry, retryLabel = "Retry", actions, showActions = "hover", className, ...props }, ref) {
|
|
7288
|
+
var ChatMessage = /* @__PURE__ */ (0, import_react61.forwardRef)(function ChatMessage2({ from, children, name, avatar, time, locale, status = "done", error, onRetry, retryLabel = "Retry", actions, showActions = "hover", className, ...props }, ref) {
|
|
7298
7289
|
const conversation = (0, import_react61.useContext)(ChatConversationContext);
|
|
7299
7290
|
const entering = useChatEntrance();
|
|
7300
7291
|
const id = (0, import_react61.useId)();
|
|
@@ -7588,7 +7579,7 @@ function formatInput(input) {
|
|
|
7588
7579
|
return String(input);
|
|
7589
7580
|
}
|
|
7590
7581
|
}
|
|
7591
|
-
var ChatTool = (0, import_react62.forwardRef)(function ChatTool2({
|
|
7582
|
+
var ChatTool = /* @__PURE__ */ (0, import_react62.forwardRef)(function ChatTool2({
|
|
7592
7583
|
title,
|
|
7593
7584
|
name,
|
|
7594
7585
|
icon: icon2,
|
|
@@ -7745,7 +7736,7 @@ var ChatTool = (0, import_react62.forwardRef)(function ChatTool2({
|
|
|
7745
7736
|
var import_react63 = require("react");
|
|
7746
7737
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7747
7738
|
var plural = (count, word) => `${count} ${word}${count === 1 ? "" : "s"}`;
|
|
7748
|
-
var ChainOfThought = (0, import_react63.forwardRef)(function ChainOfThought2({
|
|
7739
|
+
var ChainOfThought = /* @__PURE__ */ (0, import_react63.forwardRef)(function ChainOfThought2({
|
|
7749
7740
|
steps = [],
|
|
7750
7741
|
status = "success",
|
|
7751
7742
|
duration,
|
|
@@ -7810,7 +7801,7 @@ var import_react64 = require("react");
|
|
|
7810
7801
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
7811
7802
|
var openDelay = 250;
|
|
7812
7803
|
var closeDelay = 150;
|
|
7813
|
-
var ChatSource = (0, import_react64.forwardRef)(function ChatSource2({
|
|
7804
|
+
var ChatSource = /* @__PURE__ */ (0, import_react64.forwardRef)(function ChatSource2({
|
|
7814
7805
|
title,
|
|
7815
7806
|
source,
|
|
7816
7807
|
snippet,
|
|
@@ -7909,7 +7900,7 @@ var ChatSource = (0, import_react64.forwardRef)(function ChatSource2({
|
|
|
7909
7900
|
}
|
|
7910
7901
|
);
|
|
7911
7902
|
});
|
|
7912
|
-
var ChatSources = (0, import_react64.forwardRef)(function ChatSources2({ sources, label, expanded, defaultExpanded = false, onExpandedChange, className, ...props }, ref) {
|
|
7903
|
+
var ChatSources = /* @__PURE__ */ (0, import_react64.forwardRef)(function ChatSources2({ sources, label, expanded, defaultExpanded = false, onExpandedChange, className, ...props }, ref) {
|
|
7913
7904
|
const id = (0, import_react64.useId)();
|
|
7914
7905
|
const [isOpen, setOpen] = useControllableState(expanded, defaultExpanded, onExpandedChange);
|
|
7915
7906
|
if (sources.length === 0) return null;
|
|
@@ -8029,7 +8020,7 @@ function assignRef7(ref, value) {
|
|
|
8029
8020
|
if (typeof ref === "function") ref(value);
|
|
8030
8021
|
else if (ref) ref.current = value;
|
|
8031
8022
|
}
|
|
8032
|
-
var ColorField = (0, import_react65.forwardRef)(function ColorField2({
|
|
8023
|
+
var ColorField = /* @__PURE__ */ (0, import_react65.forwardRef)(function ColorField2({
|
|
8033
8024
|
value,
|
|
8034
8025
|
defaultValue = "#312c7e",
|
|
8035
8026
|
onChange,
|
|
@@ -8311,7 +8302,7 @@ function assignRef8(ref, value) {
|
|
|
8311
8302
|
if (typeof ref === "function") ref(value);
|
|
8312
8303
|
else if (ref) ref.current = value;
|
|
8313
8304
|
}
|
|
8314
|
-
var ColorArea = (0, import_react67.forwardRef)(function ColorArea2({
|
|
8305
|
+
var ColorArea = /* @__PURE__ */ (0, import_react67.forwardRef)(function ColorArea2({
|
|
8315
8306
|
value,
|
|
8316
8307
|
defaultValue = "#312c7e",
|
|
8317
8308
|
onChange,
|
|
@@ -8500,7 +8491,7 @@ function assignRef9(ref, value) {
|
|
|
8500
8491
|
if (typeof ref === "function") ref(value);
|
|
8501
8492
|
else if (ref) ref.current = value;
|
|
8502
8493
|
}
|
|
8503
|
-
var ColorSlider = (0, import_react68.forwardRef)(function ColorSlider2({
|
|
8494
|
+
var ColorSlider = /* @__PURE__ */ (0, import_react68.forwardRef)(function ColorSlider2({
|
|
8504
8495
|
channel,
|
|
8505
8496
|
value,
|
|
8506
8497
|
defaultValue = "#312c7e",
|
|
@@ -8642,7 +8633,7 @@ var ColorSlider = (0, import_react68.forwardRef)(function ColorSlider2({
|
|
|
8642
8633
|
// src/components/ColorPicker/ColorSwatchPicker.tsx
|
|
8643
8634
|
var import_react69 = require("react");
|
|
8644
8635
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8645
|
-
var ColorSwatchPicker = (0, import_react69.forwardRef)(function ColorSwatchPicker2({ options, value, defaultValue, onChange, size: size2 = "md", shape = "square", disabled = false, name, className, ...aria }, ref) {
|
|
8636
|
+
var ColorSwatchPicker = /* @__PURE__ */ (0, import_react69.forwardRef)(function ColorSwatchPicker2({ options, value, defaultValue, onChange, size: size2 = "md", shape = "square", disabled = false, name, className, ...aria }, ref) {
|
|
8646
8637
|
const [current, setCurrent] = useControllableState(value, defaultValue ?? "", onChange);
|
|
8647
8638
|
const refs = (0, import_react69.useRef)([]);
|
|
8648
8639
|
const items2 = options.map((option) => {
|