@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.
Files changed (47) hide show
  1. package/DESIGN.md +869 -870
  2. package/README.md +112 -11
  3. package/dist/components/index.d.ts +3 -2
  4. package/dist/components/index.js +165 -160
  5. package/dist/components/ui/core/action-toolbar/action-toolbar.js +4 -4
  6. package/dist/components/ui/core/alert/alert.js +3 -3
  7. package/dist/components/ui/core/banner/banner.js +6 -6
  8. package/dist/components/ui/core/button/button.js +4 -4
  9. package/dist/components/ui/core/checkbox/checkbox.js +8 -8
  10. package/dist/components/ui/core/code-block/code-block.js +6 -6
  11. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +15 -0
  12. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
  13. package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
  14. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
  15. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
  16. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
  17. package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
  18. package/dist/components/ui/core/date-time-pickers/index.js +8 -0
  19. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +23 -0
  20. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -0
  21. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +3 -3
  22. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +1 -1
  23. package/dist/components/ui/core/hover-card/hover-card.js +3 -3
  24. package/dist/components/ui/core/input/input.js +1 -1
  25. package/dist/components/ui/core/message/message.js +387 -101
  26. package/dist/components/ui/core/pagination/pagination.js +9 -7
  27. package/dist/components/ui/core/prompt-input/prompt-input.js +16 -16
  28. package/dist/components/ui/core/radio-group/radio-group.js +7 -7
  29. package/dist/components/ui/core/reasoning/reasoning.js +1 -1
  30. package/dist/components/ui/core/segmented-control/segmented-control.js +3 -3
  31. package/dist/components/ui/core/select/select.d.ts +2 -1
  32. package/dist/components/ui/core/select/select.js +134 -110
  33. package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -1
  34. package/dist/components/ui/core/shimmer/shimmer.js +89 -49
  35. package/dist/components/ui/core/tabs/tabs.js +3 -3
  36. package/dist/components/ui/core/textarea/textarea.js +1 -1
  37. package/dist/components/ui/core/toggle/toggle.d.ts +15 -0
  38. package/dist/components/ui/core/toggle/toggle.js +74 -0
  39. package/dist/components/ui/core/tool/tool.js +3 -3
  40. package/dist/index.d.ts +1 -1
  41. package/dist/lib/portal-container-context.js +3 -3
  42. package/dist/lib/utils.d.ts +1 -1
  43. package/dist/lib/utils.js +7 -7
  44. package/dist/styles.css +1 -1
  45. package/dist/styles.source.css +3 -0
  46. package/package.json +200 -18
  47. 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 (Google design.md linter)
141
+ ## DESIGN.md
39
142
 
40
- [`DESIGN.md`](./DESIGN.md) is linted with [`@google/design.md`](https://www.npmjs.com/package/@google/design.md) (listed in this package’s `devDependencies`). After `pnpm install` in the Fusion workspace, run the CLI’s `lint` subcommand—no `dlx` needed.
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
- Published installs ship this spec at the package root; you can resolve it as `@cognite/aura/DESIGN.md` (for example with `import.meta.resolve` or your bundler’s raw import).
145
+ Validate structure, token references, and section order with [`@google/design.md`](https://www.npmjs.com/package/@google/design.md):
43
146
 
44
- From `fusion/libs/aura`:
147
+ **Recommended (from the Fusion workspace root):**
45
148
 
46
149
  ```sh
47
- pnpm exec design.md lint ./DESIGN.md
150
+ pnpm nx run aura:design-md-lint
48
151
  ```
49
152
 
50
- From the Fusion workspace root:
153
+ **Direct CLI (from `libs/aura`):**
51
154
 
52
155
  ```sh
53
- pnpm --filter @cognite/aura exec design.md lint ./DESIGN.md
156
+ npx --yes @google/design.md lint ./DESIGN.md
54
157
  ```
55
158
 
56
- Or with Nx:
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
- ```sh
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';
@@ -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 T, CardFooter as x, CardFooterEnd as b, CardFooterStart as S, CardHeader as f, CardHeaderCenter as B, CardHeaderEnd as A, CardHeaderStart as D, CardTitle as M } from "./ui/core/card/card.js";
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 To, ToolInput as xo, ToolOutput as bo } from "./ui/core/tool/tool.js";
17
- import { DropdownMenu as fo, DropdownMenuCheckboxItem as Bo, DropdownMenuContent as Ao, DropdownMenuGroup as Do, 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";
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 Tt, TopbarMetadata as xt, TopbarRight as bt, TopbarThemeSwitcher as St } from "./ui/core/topbar/topbar.js";
23
- import { Collapsible as Bt, CollapsibleContent as At, CollapsibleTrigger as Dt } from "./ui/core/collapsible/collapsible.js";
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 { InputGroup as Ir, InputGroupAddon as Pr, InputGroupButton as Tr, InputGroupInput as xr, InputGroupText as br, InputGroupTextarea as Sr } from "./ui/core/input-group/input-group.js";
35
- import { Alert as Br, AlertActions as Ar, AlertButton as Dr, AlertClose as Mr, AlertDescription as vr, AlertTitle as Gr } from "./ui/core/alert/alert.js";
36
- import { EmptyState as wr, EmptyStateActions as kr, EmptyStateDescription as Hr, EmptyStateIcon as Rr, EmptyStateTitle as hr } from "./ui/core/empty-state/empty-state.js";
37
- import { Message as Er, MessageAction as Vr, MessageActions as Fr, MessageContent as Kr, MessageResponse as Or } from "./ui/core/message/message.js";
38
- import { PromptInput as Qr, PromptInputActionMenu as Ur, PromptInputActionMenuContent as jr, PromptInputActionMenuItem as qr, PromptInputActionMenuTrigger as zr, PromptInputBody as Jr, PromptInputButton as Wr, PromptInputCommand as Xr, PromptInputCommandEmpty as Yr, PromptInputCommandGroup as Zr, PromptInputCommandInput as _r, PromptInputCommandItem as $r, PromptInputCommandList as oe, PromptInputCommandSeparator as te, PromptInputFooter as re, PromptInputHeader as ee, PromptInputHoverCard as ne, PromptInputHoverCardContent as ae, PromptInputHoverCardTrigger as pe, PromptInputModelSelect as ie, PromptInputModelSelectContent as me, PromptInputModelSelectItem as le, PromptInputModelSelectTrigger as ue, PromptInputModelSelectValue as de, PromptInputProvider as Ce, PromptInputSubmit as ce, PromptInputTab as se, PromptInputTabBody as ge, PromptInputTabItem as Ie, PromptInputTabLabel as Pe, PromptInputTabsList as Te, PromptInputTextarea as xe, PromptInputTools as be, usePromptInputController as Se } from "./ui/core/prompt-input/prompt-input.js";
39
- import { Dialog as Be, DialogClose as Ae, DialogContent as De, DialogDescription as Me, DialogFooter as ve, DialogHeader as Ge, DialogOverlay as Le, DialogPortal as we, DialogTitle as ke, DialogTrigger as He } from "./ui/core/dialog/dialog.js";
40
- import { Command as he, CommandDialog as ye, CommandEmpty as Ee, CommandGroup as Ve, CommandInput as Fe, CommandItem as Ke, CommandList as Oe, CommandSeparator as Ne, CommandShortcut as Qe } from "./ui/core/command/command.js";
41
- import { Count as je, countVariants as qe } from "./ui/core/count/count.js";
42
- import { InlineCitation as Je, InlineCitationCard as We, InlineCitationCardBody as Xe, InlineCitationCardTrigger as Ye, InlineCitationGroup as Ze, InlineCitationLink as _e, InlineCitationQuote as $e, InlineCitationSource as on, InlineCitationText as tn } from "./ui/core/inline-citation/inline-citation.js";
43
- import { Reasoning as en, ReasoningContent as nn, ReasoningHeader as an, ReasoningItem as pn } from "./ui/core/reasoning/reasoning.js";
44
- import { ScrollArea as ln, ScrollBar as un } from "./ui/core/scroll-area/scroll-area.js";
45
- import { Search as Cn } from "./ui/core/search/search.js";
46
- import { Popover as sn, PopoverClose as gn, PopoverContent as In, PopoverDescription as Pn, PopoverHeader as Tn, PopoverHeaderContent as xn, PopoverSlot as bn, PopoverTitle as Sn, PopoverTrigger as fn } from "./ui/core/popover/popover.js";
47
- import { Pagination as An, PaginationContent as Dn, PaginationEllipsis as Mn, PaginationFirst as vn, PaginationItem as Gn, PaginationLast as Ln, PaginationLink as wn, PaginationNext as kn, PaginationPrevious as Hn, PaginationResultsPerPage as Rn, PaginationResultsPerPageLabel as hn, PaginationSelectTrigger as yn, PaginationStatus as En } from "./ui/core/pagination/pagination.js";
48
- import { Source as Fn, Sources as Kn, SourcesTitle as On } from "./ui/core/sources/sources.js";
49
- import { PortalContainerContext as Qn } from "../lib/portal-container-context.js";
50
- import { DateRangePicker as jn } from "./ui/core/date-time-pickers/date-range-picker/date-range-picker.js";
51
- import { DateTimeRangePicker as zn } from "./ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js";
52
- import { PaginationTeleport as Wn } from "./ui/core/pagination/pagination-teleport.js";
53
- import { toast as Yn } from "sonner";
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
- Br as Alert,
67
- Ar as AlertActions,
68
- Dr as AlertButton,
69
- Mr as AlertClose,
70
- vr as AlertDescription,
71
- Gr as AlertTitle,
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
- T as CardDescription,
101
- x as CardFooter,
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
- A as CardHeaderEnd,
107
- D as CardHeaderStart,
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
- At as CollapsibleContent,
121
- Dt as CollapsibleTrigger,
122
- he as Command,
123
- ye as CommandDialog,
124
- Ee as CommandEmpty,
125
- Ve as CommandGroup,
126
- Fe as CommandInput,
127
- Ke as CommandItem,
128
- Oe as CommandList,
129
- Ne as CommandSeparator,
130
- Qe as CommandShortcut,
131
- je as Count,
132
- jn as DateRangePicker,
133
- zn as DateTimeRangePicker,
134
- Be as Dialog,
135
- Ae as DialogClose,
136
- De as DialogContent,
137
- Me as DialogDescription,
138
- ve as DialogFooter,
139
- Ge as DialogHeader,
140
- Le as DialogOverlay,
141
- we as DialogPortal,
142
- ke as DialogTitle,
143
- He as DialogTrigger,
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
- Ao as DropdownMenuContent,
147
- Do as DropdownMenuGroup,
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
- wr as EmptyState,
162
- kr as EmptyStateActions,
163
- Hr as EmptyStateDescription,
164
- Rr as EmptyStateIcon,
165
- hr as EmptyStateTitle,
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
- Je as InlineCitation,
171
- We as InlineCitationCard,
172
- Xe as InlineCitationCardBody,
173
- Ye as InlineCitationCardTrigger,
174
- Ze as InlineCitationGroup,
175
- _e as InlineCitationLink,
176
- $e as InlineCitationQuote,
177
- on as InlineCitationSource,
178
- tn as InlineCitationText,
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
- Ir as InputGroup,
181
- Pr as InputGroupAddon,
182
- Tr as InputGroupButton,
183
- xr as InputGroupInput,
184
- br as InputGroupText,
185
- Sr as InputGroupTextarea,
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
- Er as Message,
191
- Vr as MessageAction,
192
- Fr as MessageActions,
193
- Kr as MessageContent,
194
- Or as MessageResponse,
195
- An as Pagination,
196
- Dn as PaginationContent,
197
- Mn as PaginationEllipsis,
198
- vn as PaginationFirst,
199
- Gn as PaginationItem,
200
- Ln as PaginationLast,
201
- wn as PaginationLink,
202
- kn as PaginationNext,
203
- Hn as PaginationPrevious,
204
- Rn as PaginationResultsPerPage,
205
- hn as PaginationResultsPerPageLabel,
206
- yn as PaginationSelectTrigger,
207
- En as PaginationStatus,
208
- Wn as PaginationTeleport,
209
- sn as Popover,
210
- gn as PopoverClose,
211
- In as PopoverContent,
212
- Pn as PopoverDescription,
213
- Tn as PopoverHeader,
214
- xn as PopoverHeaderContent,
215
- bn as PopoverSlot,
216
- Sn as PopoverTitle,
217
- fn as PopoverTrigger,
218
- Qn as PortalContainerContext,
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
- Qr as PromptInput,
221
- Ur as PromptInputActionMenu,
222
- jr as PromptInputActionMenuContent,
223
- qr as PromptInputActionMenuItem,
224
- zr as PromptInputActionMenuTrigger,
225
- Jr as PromptInputBody,
226
- Wr as PromptInputButton,
227
- Xr as PromptInputCommand,
228
- Yr as PromptInputCommandEmpty,
229
- Zr as PromptInputCommandGroup,
230
- _r as PromptInputCommandInput,
231
- $r as PromptInputCommandItem,
232
- oe as PromptInputCommandList,
233
- te as PromptInputCommandSeparator,
234
- re as PromptInputFooter,
235
- ee as PromptInputHeader,
236
- ne as PromptInputHoverCard,
237
- ae as PromptInputHoverCardContent,
238
- pe as PromptInputHoverCardTrigger,
239
- ie as PromptInputModelSelect,
240
- me as PromptInputModelSelectContent,
241
- le as PromptInputModelSelectItem,
242
- ue as PromptInputModelSelectTrigger,
243
- de as PromptInputModelSelectValue,
244
- Ce as PromptInputProvider,
245
- ce as PromptInputSubmit,
246
- se as PromptInputTab,
247
- ge as PromptInputTabBody,
248
- Ie as PromptInputTabItem,
249
- Pe as PromptInputTabLabel,
250
- Te as PromptInputTabsList,
251
- xe as PromptInputTextarea,
252
- be as PromptInputTools,
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
- en as Reasoning,
259
- nn as ReasoningContent,
260
- an as ReasoningHeader,
261
- pn as ReasoningItem,
262
- ln as ScrollArea,
263
- un as ScrollBar,
264
- Cn as Search,
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
- Fn as Source,
283
- Kn as Sources,
284
- On as SourcesTitle,
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
- To as ToolHeader,
295
- xo as ToolInput,
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
- Tt as TopbarLeft,
307
- xt as TopbarMetadata,
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
- qe as countVariants,
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
- Yn as toast,
319
- Se as usePromptInputController
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 { forwardRef as e, useMemo as b, useContext as A, createContext as x } from "react";
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 = x({
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 = b(() => ({ selectedCount: o }), [o]);
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 } = A(p), d = a ?? c;
54
+ const { selectedCount: c } = x(p), d = a ?? c;
55
55
  return /* @__PURE__ */ i(
56
56
  "div",
57
57
  {