@cognite/aura 0.3.0 → 0.3.1
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/DESIGN.md +869 -870
- package/README.md +112 -11
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +165 -160
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +4 -4
- package/dist/components/ui/core/alert/alert.js +3 -3
- package/dist/components/ui/core/banner/banner.js +6 -6
- package/dist/components/ui/core/button/button.js +4 -4
- package/dist/components/ui/core/checkbox/checkbox.js +8 -8
- package/dist/components/ui/core/code-block/code-block.js +6 -6
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
- package/dist/components/ui/core/date-time-pickers/index.js +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +3 -3
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +1 -1
- package/dist/components/ui/core/hover-card/hover-card.js +3 -3
- package/dist/components/ui/core/input/input.js +1 -1
- package/dist/components/ui/core/message/message.js +387 -101
- package/dist/components/ui/core/pagination/pagination.js +9 -7
- package/dist/components/ui/core/prompt-input/prompt-input.js +16 -16
- package/dist/components/ui/core/radio-group/radio-group.js +7 -7
- package/dist/components/ui/core/reasoning/reasoning.js +1 -1
- package/dist/components/ui/core/segmented-control/segmented-control.js +3 -3
- package/dist/components/ui/core/select/select.d.ts +2 -1
- package/dist/components/ui/core/select/select.js +134 -110
- package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -1
- package/dist/components/ui/core/shimmer/shimmer.js +89 -49
- package/dist/components/ui/core/tabs/tabs.js +3 -3
- package/dist/components/ui/core/textarea/textarea.js +1 -1
- package/dist/components/ui/core/toggle/toggle.d.ts +15 -0
- package/dist/components/ui/core/toggle/toggle.js +74 -0
- package/dist/components/ui/core/tool/tool.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/lib/portal-container-context.js +3 -3
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +3 -0
- package/package.json +200 -18
- package/dist/index.js +0 -308
package/README.md
CHANGED
|
@@ -2,6 +2,109 @@
|
|
|
2
2
|
|
|
3
3
|
Aura exports Cognite's UI components, styles, utilities, and ESLint guidance for preserving the design system in downstream apps.
|
|
4
4
|
|
|
5
|
+
## Using Aura in Fusion
|
|
6
|
+
|
|
7
|
+
[`DESIGN.md`](./DESIGN.md) describes visual identity, critical interaction rules, and UX guidance for feedback, disclosure, errors, layout, and accessibility. This section covers *how to use the package* in the Fusion monorepo and host shell.
|
|
8
|
+
|
|
9
|
+
### Package imports
|
|
10
|
+
|
|
11
|
+
Aura ships two flavours of component import. Both resolve through the package's `exports` map — never reach into `src/`.
|
|
12
|
+
|
|
13
|
+
**Per-component subpath (preferred for app code)** keeps bundles small by only pulling in what each module actually needs:
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Button } from '@cognite/aura/components/button';
|
|
17
|
+
import { Card } from '@cognite/aura/components/card';
|
|
18
|
+
import { DatePicker } from '@cognite/aura/components/date-time-pickers';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Aggregate barrel** is convenient for stories, prototypes, and code that already pulls in many components. The barrel is side-effect-free (`*.css` aside) and tree-shakes well in modern bundlers, so prefer whichever style reads better at the call site:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Button, Card } from '@cognite/aura/components';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Stylesheets and tokens are imported the same way regardless of which component-import style you use:
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import '@cognite/aura/colors.css';
|
|
31
|
+
import '@cognite/aura/styles.css';
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Canonical token sources in this repo: `src/colors.css` and `src/styles.source.css`. In consuming apps, import from the published package paths above — not from `src/` next to your app code.
|
|
35
|
+
|
|
36
|
+
Do not import Aura through relative paths from another project, such as `../../../libs/aura/src/components`. Fusion resolves Aura through its package exports, so use `@cognite/aura/components` (or a per-component subpath), `@cognite/aura/colors.css`, and `@cognite/aura/styles.css`.
|
|
37
|
+
|
|
38
|
+
#### Adding a new component
|
|
39
|
+
|
|
40
|
+
Every Aura component must support **both** import styles. When you add a new component:
|
|
41
|
+
|
|
42
|
+
1. Place its source under `src/components/ui/core/<name>/<name>.tsx`, matching the kebab-case directory used by existing components.
|
|
43
|
+
2. Re-export it from the aggregate barrel in `src/components/index.ts` so `@cognite/aura/components` keeps working.
|
|
44
|
+
3. Register a per-component subpath export in `libs/aura/package.json` (alphabetical order):
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
"./components/<name>": {
|
|
48
|
+
"@fusion/source": "./src/components/ui/core/<name>/<name>.tsx",
|
|
49
|
+
"import": "./dist/components/ui/core/<name>/<name>.js",
|
|
50
|
+
"types": "./dist/components/ui/core/<name>/<name>.d.ts"
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Composite components that ship as a folder (such as `date-time-pickers`) point at the folder's `index.ts` instead.
|
|
55
|
+
|
|
56
|
+
The Vite build derives library entries directly from `package.json` (`entriesFromPackageJson: true`), so once both entry points are wired the dist output and types appear automatically. The two surfaces must stay in sync — consumers should be able to choose either style without missing exports.
|
|
57
|
+
|
|
58
|
+
Aura uses Tailwind v4 package CSS entry points. Consuming Fusion apps should not add a `tailwind.config.js` just to wire Aura tokens or content paths; import `@cognite/aura/styles.css` and let Aura's exported CSS carry the theme and source directives. `styles.css` is the public stylesheet entry point for product consumers; in published external packages it resolves to the built Tailwind CSS output produced by Aura's build.
|
|
59
|
+
|
|
60
|
+
When another Fusion library exposes Aura-styled components, give that library the same self-sourcing setup instead of pushing scan rules into every consumer:
|
|
61
|
+
|
|
62
|
+
- Export a package stylesheet, for example `@cognite/example-ui/styles.css`.
|
|
63
|
+
- In that stylesheet, import `@cognite/aura/styles.source.css` and source the library itself. `styles.source.css` is for package stylesheets that compose Aura's Tailwind theme/source directives before adding their own `@source` rules:
|
|
64
|
+
|
|
65
|
+
```css
|
|
66
|
+
@import '@cognite/aura/styles.source.css';
|
|
67
|
+
@source './';
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- If the target app already relies on `!important` style precedence, for example through styled-components overrides or existing Cogs components, add Tailwind's import modifier so Aura utilities can match that setup when necessary:
|
|
71
|
+
|
|
72
|
+
```css
|
|
73
|
+
@import '@cognite/aura/styles.source.css' important;
|
|
74
|
+
@source './';
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
- If the library builds or previews that stylesheet directly, include `@tailwindcss/vite` in its Vite and Storybook setup.
|
|
78
|
+
- Consumers should import the library stylesheet, not Aura internals. For example, an app using `@cognite/atlas-ai-react-ui` should import `@cognite/atlas-ai-react-ui/styles.css`, which can pull in Aura internally.
|
|
79
|
+
- Do not add cross-project `@source "../../../libs/..."` directives or `tailwind.config.js` `content` entries for other Fusion libraries. In Tailwind v4 these app-level content arrays do not replace package-owned `@source` directives.
|
|
80
|
+
|
|
81
|
+
Prefer **CVA** variants and component APIs over overriding primitive styles. Prop names, `size` values, and subcomponents are defined in:
|
|
82
|
+
|
|
83
|
+
- [Aura Storybook](https://storybook-aura-23638.fusion-preview.preview.cogniteapp.com)
|
|
84
|
+
- [Aura design system docs](https://docs.cognite.com/aura-design-system/get-started)
|
|
85
|
+
- TypeScript types from `@cognite/aura/components`
|
|
86
|
+
|
|
87
|
+
### Fusion shell integration
|
|
88
|
+
|
|
89
|
+
The Fusion host shell owns global chrome that Aura does not ship: **Topbar**, **Sonner** toasts, **AlertDialog**, **Sheet** / **Drawer**, **Tabs**, **SegmentedControl**, and some patterns like **EmptyState**. These **must** still follow Aura tokens, [Interaction states](./DESIGN.md#interaction-states), and [Heuristics](./DESIGN.md#heuristics).
|
|
90
|
+
|
|
91
|
+
| Concern | Fusion convention |
|
|
92
|
+
| ------- | ----------------- |
|
|
93
|
+
| Primary navigation | One **Topbar**; avoid duplicating global nav in content |
|
|
94
|
+
| View switching | Shell **Tabs** / **SegmentedControl** when the product uses that pattern |
|
|
95
|
+
| Toasts | **Sonner**, bottom-right, ~4s auto-dismiss, themed with Aura tokens |
|
|
96
|
+
| Confirm destructive work | Shell **AlertDialog** or Aura **Dialog** with explicit copy |
|
|
97
|
+
| Narrow viewports | Prefer shell **Drawer** / **Dialog** over compressed multi-column chrome |
|
|
98
|
+
|
|
99
|
+
For local sub-app development against the live shell, use import map overrides — see the Fusion [subapp manual testing guide](../../.cursor/rules/subapp-manual-testing.mdc).
|
|
100
|
+
|
|
101
|
+
### Serve and test locally
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
pnpm nx serve aura # Storybook
|
|
105
|
+
pnpm nx run aura:design-md-lint
|
|
106
|
+
```
|
|
107
|
+
|
|
5
108
|
## Optional peer dependencies
|
|
6
109
|
|
|
7
110
|
Some Aura entry points require optional peer dependencies that consumers must install themselves:
|
|
@@ -35,29 +138,27 @@ Some Aura entry points require optional peer dependencies that consumers must in
|
|
|
35
138
|
</ChartContainer>
|
|
36
139
|
```
|
|
37
140
|
|
|
38
|
-
## DESIGN.md
|
|
141
|
+
## DESIGN.md
|
|
39
142
|
|
|
40
|
-
[`DESIGN.md`](./DESIGN.md)
|
|
143
|
+
[`DESIGN.md`](./DESIGN.md) describes Aura's visual identity in the [Google design.md](https://github.com/google-labs-code/design.md) format — YAML design tokens in front matter plus markdown rationale for coding agents.
|
|
41
144
|
|
|
42
|
-
|
|
145
|
+
Validate structure, token references, and section order with [`@google/design.md`](https://www.npmjs.com/package/@google/design.md):
|
|
43
146
|
|
|
44
|
-
|
|
147
|
+
**Recommended (from the Fusion workspace root):**
|
|
45
148
|
|
|
46
149
|
```sh
|
|
47
|
-
pnpm
|
|
150
|
+
pnpm nx run aura:design-md-lint
|
|
48
151
|
```
|
|
49
152
|
|
|
50
|
-
|
|
153
|
+
**Direct CLI (from `libs/aura`):**
|
|
51
154
|
|
|
52
155
|
```sh
|
|
53
|
-
|
|
156
|
+
npx --yes @google/design.md lint ./DESIGN.md
|
|
54
157
|
```
|
|
55
158
|
|
|
56
|
-
|
|
159
|
+
Exit code `0` means the file passed (no errors). Warnings surface issues such as orphaned tokens or out-of-order sections.
|
|
57
160
|
|
|
58
|
-
|
|
59
|
-
nx run aura:design-md-lint
|
|
60
|
-
```
|
|
161
|
+
Published installs ship this spec at the package root; resolve it as `@cognite/aura/DESIGN.md` (for example with `import.meta.resolve` or your bundler's raw import).
|
|
61
162
|
|
|
62
163
|
## ESLint
|
|
63
164
|
|
|
@@ -31,6 +31,7 @@ export { Kbd, KbdGroup } from './ui/core/kbd/kbd';
|
|
|
31
31
|
export { Progress } from './ui/core/progress/progress';
|
|
32
32
|
export { Textarea } from './ui/core/textarea/textarea';
|
|
33
33
|
export { Tabs, TabsLabel, TabsList, TabsPanel, TabsTrigger, tabsListVariants, tabsTriggerVariants, } from './ui/core/tabs/tabs';
|
|
34
|
+
export { Toggle, toggleVariants } from './ui/core/toggle/toggle';
|
|
34
35
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, } from './ui/core/input-group/input-group';
|
|
35
36
|
export { Alert, AlertTitle, AlertDescription, AlertActions, AlertButton, AlertClose, } from './ui/core/alert/alert';
|
|
36
37
|
export { EmptyState, EmptyStateIcon, EmptyStateTitle, EmptyStateDescription, EmptyStateActions, } from './ui/core/empty-state/empty-state';
|
|
@@ -46,7 +47,7 @@ export { Search } from './ui/core/search/search';
|
|
|
46
47
|
export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger, } from './ui/core/popover/popover';
|
|
47
48
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationResultsPerPage, PaginationResultsPerPageLabel, PaginationSelectTrigger, PaginationStatus, PaginationTeleport, } from './ui/core/pagination/pagination';
|
|
48
49
|
export { Sources, SourcesTitle, Source } from './ui/core/sources/sources';
|
|
49
|
-
export { DateRangePicker, DateTimeRangePicker, } from './ui/core/date-time-pickers';
|
|
50
|
-
export type { DateRangePickerProps, DateTimeRangePickerProps, ShortcutItem, TimeFormat, } from './ui/core/date-time-pickers';
|
|
50
|
+
export { DatePicker, DateRangePicker, DateTimeRangePicker, } from './ui/core/date-time-pickers';
|
|
51
|
+
export type { DatePickerProps, DateRangePickerProps, DateTimeRangePickerProps, ShortcutItem, TimeFormat, } from './ui/core/date-time-pickers';
|
|
51
52
|
export { PortalContainerContext } from '../lib/portal-container-context';
|
|
52
53
|
export type { ComponentMeta, ComponentStatusType } from '../lib/types';
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accordion as r, AccordionContent as e, AccordionItem as n, AccordionTrigger as a } from "./ui/core/accordion/accordion.js";
|
|
2
2
|
import { ActionToolbar as i, ActionToolbarAction as m, ActionToolbarActionClear as l, ActionToolbarActions as u, ActionToolbarPrimaryAction as d, ActionToolbarSelection as C, ActionToolbarSelectionSummary as c } from "./ui/core/action-toolbar/action-toolbar.js";
|
|
3
|
-
import { Card as g, CardActions as I, CardContent as P, CardDescription as
|
|
3
|
+
import { Card as g, CardActions as I, CardContent as P, CardDescription as x, CardFooter as T, CardFooterEnd as b, CardFooterStart as S, CardHeader as f, CardHeaderCenter as B, CardHeaderEnd as D, CardHeaderStart as A, CardTitle as M } from "./ui/core/card/card.js";
|
|
4
4
|
import { Button as G, buttonVariants as L } from "./ui/core/button/button.js";
|
|
5
5
|
import { ButtonGroup as k, ButtonGroupSeparator as H, ButtonGroupText as R, buttonGroupVariants as h } from "./ui/core/button-group/button-group.js";
|
|
6
6
|
import { Avatar as E, AvatarFallback as V, AvatarIcon as F, AvatarImage as K } from "./ui/core/avatar/avatar.js";
|
|
@@ -13,14 +13,14 @@ import { Shimmer as to } from "./ui/core/shimmer/shimmer.js";
|
|
|
13
13
|
import { CodeBlock as eo, CodeBlockCollapseButton as no, CodeBlockCopyButton as ao, CodeBlockDownloadButton as po } from "./ui/core/code-block/code-block.js";
|
|
14
14
|
import { Separator as mo } from "./ui/core/separator/separator.js";
|
|
15
15
|
import { Tooltip as uo, TooltipContent as Co, TooltipProvider as co, TooltipTrigger as so } from "./ui/core/tooltip/tooltip.js";
|
|
16
|
-
import { Tool as Io, ToolContent as Po, ToolHeader as
|
|
17
|
-
import { DropdownMenu as fo, DropdownMenuCheckboxItem as Bo, DropdownMenuContent as
|
|
16
|
+
import { Tool as Io, ToolContent as Po, ToolHeader as xo, ToolInput as To, ToolOutput as bo } from "./ui/core/tool/tool.js";
|
|
17
|
+
import { DropdownMenu as fo, DropdownMenuCheckboxItem as Bo, DropdownMenuContent as Do, DropdownMenuGroup as Ao, DropdownMenuHeader as Mo, DropdownMenuItem as vo, DropdownMenuLabel as Go, DropdownMenuPortal as Lo, DropdownMenuRadioGroup as wo, DropdownMenuRadioItem as ko, DropdownMenuSectionLabel as Ho, DropdownMenuSeparator as Ro, DropdownMenuShortcut as ho, DropdownMenuSub as yo, DropdownMenuSubContent as Eo, DropdownMenuSubTrigger as Vo, DropdownMenuTrigger as Fo } from "./ui/core/dropdown-menu/dropdown-menu.js";
|
|
18
18
|
import { RadioGroup as Oo, RadioGroupItem as No, RadioGroupItemControl as Qo, RadioGroupItemDescription as Uo, RadioGroupItemLabel as jo } from "./ui/core/radio-group/radio-group.js";
|
|
19
19
|
import { Badge as zo, badgeVariants as Jo } from "./ui/core/badge/badge.js";
|
|
20
20
|
import { Banner as Xo, BannerAction as Yo, BannerActions as Zo, BannerClose as _o, BannerIcon as $o, BannerStatus as ot, BannerTitle as tt } from "./ui/core/banner/banner.js";
|
|
21
21
|
import { Breadcrumb as et, BreadcrumbEllipsis as nt, BreadcrumbEllipsisButton as at, BreadcrumbItem as pt, BreadcrumbLink as it, BreadcrumbList as mt, BreadcrumbPage as lt, BreadcrumbPageButton as ut, BreadcrumbSeparator as dt } from "./ui/core/breadcrumb/breadcrumb.js";
|
|
22
|
-
import { Topbar as ct, TopbarAction as st, TopbarBreadcrumbs as gt, TopbarCenter as It, TopbarIcon as Pt, TopbarLeft as
|
|
23
|
-
import { Collapsible as Bt, CollapsibleContent as
|
|
22
|
+
import { Topbar as ct, TopbarAction as st, TopbarBreadcrumbs as gt, TopbarCenter as It, TopbarIcon as Pt, TopbarLeft as xt, TopbarMetadata as Tt, TopbarRight as bt, TopbarThemeSwitcher as St } from "./ui/core/topbar/topbar.js";
|
|
23
|
+
import { Collapsible as Bt, CollapsibleContent as Dt, CollapsibleTrigger as At } from "./ui/core/collapsible/collapsible.js";
|
|
24
24
|
import { HoverCard as vt, HoverCardContent as Gt, HoverCardTrigger as Lt } from "./ui/core/hover-card/hover-card.js";
|
|
25
25
|
import { Select as kt, SelectContent as Ht, SelectGroup as Rt, SelectItem as ht, SelectLabel as yt, SelectScrollDownButton as Et, SelectScrollUpButton as Vt, SelectSeparator as Ft, SelectTrigger as Kt, SelectValue as Ot } from "./ui/core/select/select.js";
|
|
26
26
|
import { SegmentedControl as Qt, SegmentedControlButton as Ut, SegmentedControlContent as jt, SegmentedControlList as qt, segmentedControlButtonVariants as zt, segmentedControlListVariants as Jt } from "./ui/core/segmented-control/segmented-control.js";
|
|
@@ -31,26 +31,28 @@ import { Kbd as tr, KbdGroup as rr } from "./ui/core/kbd/kbd.js";
|
|
|
31
31
|
import { Progress as nr } from "./ui/core/progress/progress.js";
|
|
32
32
|
import { Textarea as pr } from "./ui/core/textarea/textarea.js";
|
|
33
33
|
import { Tabs as mr, TabsLabel as lr, TabsList as ur, TabsPanel as dr, TabsTrigger as Cr, tabsListVariants as cr, tabsTriggerVariants as sr } from "./ui/core/tabs/tabs.js";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
34
|
+
import { Toggle as Ir, toggleVariants as Pr } from "./ui/core/toggle/toggle.js";
|
|
35
|
+
import { InputGroup as Tr, InputGroupAddon as br, InputGroupButton as Sr, InputGroupInput as fr, InputGroupText as Br, InputGroupTextarea as Dr } from "./ui/core/input-group/input-group.js";
|
|
36
|
+
import { Alert as Mr, AlertActions as vr, AlertButton as Gr, AlertClose as Lr, AlertDescription as wr, AlertTitle as kr } from "./ui/core/alert/alert.js";
|
|
37
|
+
import { EmptyState as Rr, EmptyStateActions as hr, EmptyStateDescription as yr, EmptyStateIcon as Er, EmptyStateTitle as Vr } from "./ui/core/empty-state/empty-state.js";
|
|
38
|
+
import { Message as Kr, MessageAction as Or, MessageActions as Nr, MessageContent as Qr, MessageResponse as Ur } from "./ui/core/message/message.js";
|
|
39
|
+
import { PromptInput as qr, PromptInputActionMenu as zr, PromptInputActionMenuContent as Jr, PromptInputActionMenuItem as Wr, PromptInputActionMenuTrigger as Xr, PromptInputBody as Yr, PromptInputButton as Zr, PromptInputCommand as _r, PromptInputCommandEmpty as $r, PromptInputCommandGroup as oe, PromptInputCommandInput as te, PromptInputCommandItem as re, PromptInputCommandList as ee, PromptInputCommandSeparator as ne, PromptInputFooter as ae, PromptInputHeader as pe, PromptInputHoverCard as ie, PromptInputHoverCardContent as me, PromptInputHoverCardTrigger as le, PromptInputModelSelect as ue, PromptInputModelSelectContent as de, PromptInputModelSelectItem as Ce, PromptInputModelSelectTrigger as ce, PromptInputModelSelectValue as se, PromptInputProvider as ge, PromptInputSubmit as Ie, PromptInputTab as Pe, PromptInputTabBody as xe, PromptInputTabItem as Te, PromptInputTabLabel as be, PromptInputTabsList as Se, PromptInputTextarea as fe, PromptInputTools as Be, usePromptInputController as De } from "./ui/core/prompt-input/prompt-input.js";
|
|
40
|
+
import { Dialog as Me, DialogClose as ve, DialogContent as Ge, DialogDescription as Le, DialogFooter as we, DialogHeader as ke, DialogOverlay as He, DialogPortal as Re, DialogTitle as he, DialogTrigger as ye } from "./ui/core/dialog/dialog.js";
|
|
41
|
+
import { Command as Ve, CommandDialog as Fe, CommandEmpty as Ke, CommandGroup as Oe, CommandInput as Ne, CommandItem as Qe, CommandList as Ue, CommandSeparator as je, CommandShortcut as qe } from "./ui/core/command/command.js";
|
|
42
|
+
import { Count as Je, countVariants as We } from "./ui/core/count/count.js";
|
|
43
|
+
import { InlineCitation as Ye, InlineCitationCard as Ze, InlineCitationCardBody as _e, InlineCitationCardTrigger as $e, InlineCitationGroup as on, InlineCitationLink as tn, InlineCitationQuote as rn, InlineCitationSource as en, InlineCitationText as nn } from "./ui/core/inline-citation/inline-citation.js";
|
|
44
|
+
import { Reasoning as pn, ReasoningContent as mn, ReasoningHeader as ln, ReasoningItem as un } from "./ui/core/reasoning/reasoning.js";
|
|
45
|
+
import { ScrollArea as Cn, ScrollBar as cn } from "./ui/core/scroll-area/scroll-area.js";
|
|
46
|
+
import { Search as gn } from "./ui/core/search/search.js";
|
|
47
|
+
import { Popover as Pn, PopoverClose as xn, PopoverContent as Tn, PopoverDescription as bn, PopoverHeader as Sn, PopoverHeaderContent as fn, PopoverSlot as Bn, PopoverTitle as Dn, PopoverTrigger as An } from "./ui/core/popover/popover.js";
|
|
48
|
+
import { Pagination as vn, PaginationContent as Gn, PaginationEllipsis as Ln, PaginationFirst as wn, PaginationItem as kn, PaginationLast as Hn, PaginationLink as Rn, PaginationNext as hn, PaginationPrevious as yn, PaginationResultsPerPage as En, PaginationResultsPerPageLabel as Vn, PaginationSelectTrigger as Fn, PaginationStatus as Kn } from "./ui/core/pagination/pagination.js";
|
|
49
|
+
import { Source as Nn, Sources as Qn, SourcesTitle as Un } from "./ui/core/sources/sources.js";
|
|
50
|
+
import { PortalContainerContext as qn } from "../lib/portal-container-context.js";
|
|
51
|
+
import { DatePicker as Jn } from "./ui/core/date-time-pickers/date-picker/date-picker.js";
|
|
52
|
+
import { DateRangePicker as Xn } from "./ui/core/date-time-pickers/date-range-picker/date-range-picker.js";
|
|
53
|
+
import { DateTimeRangePicker as Zn } from "./ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js";
|
|
54
|
+
import { PaginationTeleport as $n } from "./ui/core/pagination/pagination-teleport.js";
|
|
55
|
+
import { toast as ta } from "sonner";
|
|
54
56
|
export {
|
|
55
57
|
r as Accordion,
|
|
56
58
|
e as AccordionContent,
|
|
@@ -63,12 +65,12 @@ export {
|
|
|
63
65
|
d as ActionToolbarPrimaryAction,
|
|
64
66
|
C as ActionToolbarSelection,
|
|
65
67
|
c as ActionToolbarSelectionSummary,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
Mr as Alert,
|
|
69
|
+
vr as AlertActions,
|
|
70
|
+
Gr as AlertButton,
|
|
71
|
+
Lr as AlertClose,
|
|
72
|
+
wr as AlertDescription,
|
|
73
|
+
kr as AlertTitle,
|
|
72
74
|
E as Avatar,
|
|
73
75
|
V as AvatarFallback,
|
|
74
76
|
F as AvatarIcon,
|
|
@@ -97,14 +99,14 @@ export {
|
|
|
97
99
|
g as Card,
|
|
98
100
|
I as CardActions,
|
|
99
101
|
P as CardContent,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
x as CardDescription,
|
|
103
|
+
T as CardFooter,
|
|
102
104
|
b as CardFooterEnd,
|
|
103
105
|
S as CardFooterStart,
|
|
104
106
|
f as CardHeader,
|
|
105
107
|
B as CardHeaderCenter,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
D as CardHeaderEnd,
|
|
109
|
+
A as CardHeaderStart,
|
|
108
110
|
M as CardTitle,
|
|
109
111
|
U as CheckboxGroup,
|
|
110
112
|
j as CheckboxItem,
|
|
@@ -117,34 +119,35 @@ export {
|
|
|
117
119
|
ao as CodeBlockCopyButton,
|
|
118
120
|
po as CodeBlockDownloadButton,
|
|
119
121
|
Bt as Collapsible,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
122
|
+
Dt as CollapsibleContent,
|
|
123
|
+
At as CollapsibleTrigger,
|
|
124
|
+
Ve as Command,
|
|
125
|
+
Fe as CommandDialog,
|
|
126
|
+
Ke as CommandEmpty,
|
|
127
|
+
Oe as CommandGroup,
|
|
128
|
+
Ne as CommandInput,
|
|
129
|
+
Qe as CommandItem,
|
|
130
|
+
Ue as CommandList,
|
|
131
|
+
je as CommandSeparator,
|
|
132
|
+
qe as CommandShortcut,
|
|
133
|
+
Je as Count,
|
|
134
|
+
Jn as DatePicker,
|
|
135
|
+
Xn as DateRangePicker,
|
|
136
|
+
Zn as DateTimeRangePicker,
|
|
137
|
+
Me as Dialog,
|
|
138
|
+
ve as DialogClose,
|
|
139
|
+
Ge as DialogContent,
|
|
140
|
+
Le as DialogDescription,
|
|
141
|
+
we as DialogFooter,
|
|
142
|
+
ke as DialogHeader,
|
|
143
|
+
He as DialogOverlay,
|
|
144
|
+
Re as DialogPortal,
|
|
145
|
+
he as DialogTitle,
|
|
146
|
+
ye as DialogTrigger,
|
|
144
147
|
fo as DropdownMenu,
|
|
145
148
|
Bo as DropdownMenuCheckboxItem,
|
|
146
|
-
|
|
147
|
-
|
|
149
|
+
Do as DropdownMenuContent,
|
|
150
|
+
Ao as DropdownMenuGroup,
|
|
148
151
|
Mo as DropdownMenuHeader,
|
|
149
152
|
vo as DropdownMenuItem,
|
|
150
153
|
Go as DropdownMenuLabel,
|
|
@@ -158,110 +161,110 @@ export {
|
|
|
158
161
|
Eo as DropdownMenuSubContent,
|
|
159
162
|
Vo as DropdownMenuSubTrigger,
|
|
160
163
|
Fo as DropdownMenuTrigger,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
Rr as EmptyState,
|
|
165
|
+
hr as EmptyStateActions,
|
|
166
|
+
yr as EmptyStateDescription,
|
|
167
|
+
Er as EmptyStateIcon,
|
|
168
|
+
Vr as EmptyStateTitle,
|
|
166
169
|
Z as HelperText,
|
|
167
170
|
vt as HoverCard,
|
|
168
171
|
Gt as HoverCardContent,
|
|
169
172
|
Lt as HoverCardTrigger,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
173
|
+
Ye as InlineCitation,
|
|
174
|
+
Ze as InlineCitationCard,
|
|
175
|
+
_e as InlineCitationCardBody,
|
|
176
|
+
$e as InlineCitationCardTrigger,
|
|
177
|
+
on as InlineCitationGroup,
|
|
178
|
+
tn as InlineCitationLink,
|
|
179
|
+
rn as InlineCitationQuote,
|
|
180
|
+
en as InlineCitationSource,
|
|
181
|
+
nn as InlineCitationText,
|
|
179
182
|
$t as Input,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
Tr as InputGroup,
|
|
184
|
+
br as InputGroupAddon,
|
|
185
|
+
Sr as InputGroupButton,
|
|
186
|
+
fr as InputGroupInput,
|
|
187
|
+
Br as InputGroupText,
|
|
188
|
+
Dr as InputGroupTextarea,
|
|
186
189
|
tr as Kbd,
|
|
187
190
|
rr as KbdGroup,
|
|
188
191
|
N as Label,
|
|
189
192
|
$ as Loader,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
193
|
+
Kr as Message,
|
|
194
|
+
Or as MessageAction,
|
|
195
|
+
Nr as MessageActions,
|
|
196
|
+
Qr as MessageContent,
|
|
197
|
+
Ur as MessageResponse,
|
|
198
|
+
vn as Pagination,
|
|
199
|
+
Gn as PaginationContent,
|
|
200
|
+
Ln as PaginationEllipsis,
|
|
201
|
+
wn as PaginationFirst,
|
|
202
|
+
kn as PaginationItem,
|
|
203
|
+
Hn as PaginationLast,
|
|
204
|
+
Rn as PaginationLink,
|
|
205
|
+
hn as PaginationNext,
|
|
206
|
+
yn as PaginationPrevious,
|
|
207
|
+
En as PaginationResultsPerPage,
|
|
208
|
+
Vn as PaginationResultsPerPageLabel,
|
|
209
|
+
Fn as PaginationSelectTrigger,
|
|
210
|
+
Kn as PaginationStatus,
|
|
211
|
+
$n as PaginationTeleport,
|
|
212
|
+
Pn as Popover,
|
|
213
|
+
xn as PopoverClose,
|
|
214
|
+
Tn as PopoverContent,
|
|
215
|
+
bn as PopoverDescription,
|
|
216
|
+
Sn as PopoverHeader,
|
|
217
|
+
fn as PopoverHeaderContent,
|
|
218
|
+
Bn as PopoverSlot,
|
|
219
|
+
Dn as PopoverTitle,
|
|
220
|
+
An as PopoverTrigger,
|
|
221
|
+
qn as PortalContainerContext,
|
|
219
222
|
nr as Progress,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
223
|
+
qr as PromptInput,
|
|
224
|
+
zr as PromptInputActionMenu,
|
|
225
|
+
Jr as PromptInputActionMenuContent,
|
|
226
|
+
Wr as PromptInputActionMenuItem,
|
|
227
|
+
Xr as PromptInputActionMenuTrigger,
|
|
228
|
+
Yr as PromptInputBody,
|
|
229
|
+
Zr as PromptInputButton,
|
|
230
|
+
_r as PromptInputCommand,
|
|
231
|
+
$r as PromptInputCommandEmpty,
|
|
232
|
+
oe as PromptInputCommandGroup,
|
|
233
|
+
te as PromptInputCommandInput,
|
|
234
|
+
re as PromptInputCommandItem,
|
|
235
|
+
ee as PromptInputCommandList,
|
|
236
|
+
ne as PromptInputCommandSeparator,
|
|
237
|
+
ae as PromptInputFooter,
|
|
238
|
+
pe as PromptInputHeader,
|
|
239
|
+
ie as PromptInputHoverCard,
|
|
240
|
+
me as PromptInputHoverCardContent,
|
|
241
|
+
le as PromptInputHoverCardTrigger,
|
|
242
|
+
ue as PromptInputModelSelect,
|
|
243
|
+
de as PromptInputModelSelectContent,
|
|
244
|
+
Ce as PromptInputModelSelectItem,
|
|
245
|
+
ce as PromptInputModelSelectTrigger,
|
|
246
|
+
se as PromptInputModelSelectValue,
|
|
247
|
+
ge as PromptInputProvider,
|
|
248
|
+
Ie as PromptInputSubmit,
|
|
249
|
+
Pe as PromptInputTab,
|
|
250
|
+
xe as PromptInputTabBody,
|
|
251
|
+
Te as PromptInputTabItem,
|
|
252
|
+
be as PromptInputTabLabel,
|
|
253
|
+
Se as PromptInputTabsList,
|
|
254
|
+
fe as PromptInputTextarea,
|
|
255
|
+
Be as PromptInputTools,
|
|
253
256
|
Oo as RadioGroup,
|
|
254
257
|
No as RadioGroupItem,
|
|
255
258
|
Qo as RadioGroupItemControl,
|
|
256
259
|
Uo as RadioGroupItemDescription,
|
|
257
260
|
jo as RadioGroupItemLabel,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
pn as Reasoning,
|
|
262
|
+
mn as ReasoningContent,
|
|
263
|
+
ln as ReasoningHeader,
|
|
264
|
+
un as ReasoningItem,
|
|
265
|
+
Cn as ScrollArea,
|
|
266
|
+
cn as ScrollBar,
|
|
267
|
+
gn as Search,
|
|
265
268
|
Qt as SegmentedControl,
|
|
266
269
|
Ut as SegmentedControlButton,
|
|
267
270
|
jt as SegmentedControlContent,
|
|
@@ -279,9 +282,9 @@ export {
|
|
|
279
282
|
mo as Separator,
|
|
280
283
|
to as Shimmer,
|
|
281
284
|
Xt as Skeleton,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
+
Nn as Source,
|
|
286
|
+
Qn as Sources,
|
|
287
|
+
Un as SourcesTitle,
|
|
285
288
|
mr as Tabs,
|
|
286
289
|
lr as TabsLabel,
|
|
287
290
|
ur as TabsList,
|
|
@@ -289,10 +292,11 @@ export {
|
|
|
289
292
|
Cr as TabsTrigger,
|
|
290
293
|
pr as Textarea,
|
|
291
294
|
Zt as Toaster,
|
|
295
|
+
Ir as Toggle,
|
|
292
296
|
Io as Tool,
|
|
293
297
|
Po as ToolContent,
|
|
294
|
-
|
|
295
|
-
|
|
298
|
+
xo as ToolHeader,
|
|
299
|
+
To as ToolInput,
|
|
296
300
|
bo as ToolOutput,
|
|
297
301
|
uo as Tooltip,
|
|
298
302
|
Co as TooltipContent,
|
|
@@ -303,18 +307,19 @@ export {
|
|
|
303
307
|
gt as TopbarBreadcrumbs,
|
|
304
308
|
It as TopbarCenter,
|
|
305
309
|
Pt as TopbarIcon,
|
|
306
|
-
|
|
307
|
-
|
|
310
|
+
xt as TopbarLeft,
|
|
311
|
+
Tt as TopbarMetadata,
|
|
308
312
|
bt as TopbarRight,
|
|
309
313
|
St as TopbarThemeSwitcher,
|
|
310
314
|
Jo as badgeVariants,
|
|
311
315
|
h as buttonGroupVariants,
|
|
312
316
|
L as buttonVariants,
|
|
313
|
-
|
|
317
|
+
We as countVariants,
|
|
314
318
|
zt as segmentedControlButtonVariants,
|
|
315
319
|
Jt as segmentedControlListVariants,
|
|
316
320
|
cr as tabsListVariants,
|
|
317
321
|
sr as tabsTriggerVariants,
|
|
318
|
-
|
|
319
|
-
|
|
322
|
+
ta as toast,
|
|
323
|
+
Pr as toggleVariants,
|
|
324
|
+
De as usePromptInputController
|
|
320
325
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { createContext as b, forwardRef as e, useMemo as A, useContext as x } from "react";
|
|
3
3
|
import { IconX as T } from "@tabler/icons-react";
|
|
4
4
|
import { cva as y } from "class-variance-authority";
|
|
5
5
|
import { cn as s } from "../../../../lib/utils.js";
|
|
@@ -18,11 +18,11 @@ const v = y(
|
|
|
18
18
|
width: "full"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
), p =
|
|
21
|
+
), p = b({
|
|
22
22
|
selectedCount: void 0
|
|
23
23
|
}), k = e(
|
|
24
24
|
({ className: t, width: a, role: n = "toolbar", selectedCount: o, ...r }, l) => {
|
|
25
|
-
const c = typeof o == "number" && o === 0, d =
|
|
25
|
+
const c = typeof o == "number" && o === 0, d = A(() => ({ selectedCount: o }), [o]);
|
|
26
26
|
return c ? null : /* @__PURE__ */ i(g, { delayDuration: 0, children: /* @__PURE__ */ i(p.Provider, { value: d, children: /* @__PURE__ */ i(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
@@ -51,7 +51,7 @@ const C = e(
|
|
|
51
51
|
C.displayName = "ActionToolbarSelection";
|
|
52
52
|
const S = e(
|
|
53
53
|
({ className: t, count: a, label: n = "selected", children: o, ...r }, l) => {
|
|
54
|
-
const { selectedCount: c } =
|
|
54
|
+
const { selectedCount: c } = x(p), d = a ?? c;
|
|
55
55
|
return /* @__PURE__ */ i(
|
|
56
56
|
"div",
|
|
57
57
|
{
|