@cognite/aura 0.3.1 → 0.3.2
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 +1517 -2
- package/README.md +21 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +37 -35
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +64 -75
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +1 -2
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +38 -49
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +64 -75
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +1 -2
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +51 -64
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +146 -161
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +1 -2
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +124 -137
- package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
- package/dist/components/ui/core/date-time-pickers/index.js +6 -4
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +8 -8
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +1 -1
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +1 -1
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +0 -2
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +18 -34
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +41 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +16 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +100 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +23 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +64 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +17 -15
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +83 -85
- package/dist/lib/use-controllable-state.js +17 -17
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,6 +138,27 @@ Some Aura entry points require optional peer dependencies that consumers must in
|
|
|
138
138
|
</ChartContainer>
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
+
## Versioning
|
|
142
|
+
|
|
143
|
+
### Before releasing
|
|
144
|
+
|
|
145
|
+
Ensure all documentation is up to date before bumping the version:
|
|
146
|
+
|
|
147
|
+
- [`CHANGELOG.md`](./CHANGELOG.md) — summarise all consumer-facing changes since the last release.
|
|
148
|
+
- [`DESIGN.md`](./DESIGN.md) — reflect any new or updated components, tokens, or visual behaviour.
|
|
149
|
+
- Any agent skills in `.cursor/skills/` or `.claude/skills/` that reference Aura components or APIs.
|
|
150
|
+
|
|
151
|
+
### Release process
|
|
152
|
+
|
|
153
|
+
1. Create a release branch off the latest `master`.
|
|
154
|
+
2. Bump the version in `libs/aura/package.json` and prepend a new section to `CHANGELOG.md`.
|
|
155
|
+
3. Commit with `release(aura): <version>` and open a PR into `master`.
|
|
156
|
+
4. Once merged, CI publishes the package to the registry automatically.
|
|
157
|
+
|
|
158
|
+
### After publishing
|
|
159
|
+
|
|
160
|
+
Consumers can adopt the new version by updating their `package.json` manually, or by letting Renovate/Dependabot open a bump PR in their repo automatically. [The Custom Apps repo](https://github.com/cognitedata/dune) has this configured and is the primary critical consumer.
|
|
161
|
+
|
|
141
162
|
## DESIGN.md
|
|
142
163
|
|
|
143
164
|
[`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.
|
|
@@ -47,7 +47,7 @@ export { Search } from './ui/core/search/search';
|
|
|
47
47
|
export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger, } from './ui/core/popover/popover';
|
|
48
48
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationResultsPerPage, PaginationResultsPerPageLabel, PaginationSelectTrigger, PaginationStatus, PaginationTeleport, } from './ui/core/pagination/pagination';
|
|
49
49
|
export { Sources, SourcesTitle, Source } from './ui/core/sources/sources';
|
|
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';
|
|
50
|
+
export { DatePicker, DateRangePicker, DateTimeRangePicker, TimePicker, } from './ui/core/date-time-pickers';
|
|
51
|
+
export type { DatePickerProps, DateRangePickerProps, DateTimeRangePickerProps, ShortcutItem, TimeFormat, TimePickerProps, } from './ui/core/date-time-pickers';
|
|
52
52
|
export { PortalContainerContext } from '../lib/portal-container-context';
|
|
53
53
|
export type { ComponentMeta, ComponentStatusType } from '../lib/types';
|
package/dist/components/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Accordion as r, AccordionContent as e, AccordionItem as n, AccordionTrigger as a } from "./ui/core/accordion/accordion.js";
|
|
2
|
-
import { ActionToolbar as i, ActionToolbarAction as m, ActionToolbarActionClear as l, ActionToolbarActions as u, ActionToolbarPrimaryAction as d, ActionToolbarSelection as
|
|
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
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
|
-
import { ButtonGroup as
|
|
5
|
+
import { ButtonGroup as w, 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";
|
|
7
7
|
import { Label as N } from "./ui/core/label/label.js";
|
|
8
8
|
import { CheckboxGroup as U, CheckboxItem as j, CheckboxItemControl as q, CheckboxItemDescription as z, CheckboxItemLabel as J } from "./ui/core/checkbox/checkbox.js";
|
|
@@ -12,17 +12,17 @@ import { Loader as $ } from "./ui/core/loader/loader.js";
|
|
|
12
12
|
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
|
-
import { Tooltip as uo, TooltipContent as
|
|
15
|
+
import { Tooltip as uo, TooltipContent as co, TooltipProvider as Co, TooltipTrigger as so } from "./ui/core/tooltip/tooltip.js";
|
|
16
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
|
|
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 ko, DropdownMenuRadioItem as wo, 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
|
|
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
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
|
-
import { Select as
|
|
25
|
+
import { Select as wt, 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";
|
|
27
27
|
import { Skeleton as Xt } from "./ui/core/skeleton/skeleton.js";
|
|
28
28
|
import { Toaster as Zt } from "./ui/core/sonner-toast/sonner-toast.js";
|
|
@@ -30,29 +30,30 @@ import { Input as $t } from "./ui/core/input/input.js";
|
|
|
30
30
|
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
|
-
import { Tabs as mr, TabsLabel as lr, TabsList as ur, TabsPanel as dr, TabsTrigger as
|
|
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
34
|
import { Toggle as Ir, toggleVariants as Pr } from "./ui/core/toggle/toggle.js";
|
|
35
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
|
|
36
|
+
import { Alert as Mr, AlertActions as vr, AlertButton as Gr, AlertClose as Lr, AlertDescription as kr, AlertTitle as wr } from "./ui/core/alert/alert.js";
|
|
37
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
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
|
|
40
|
-
import { Dialog as Me, DialogClose as ve, DialogContent as Ge, DialogDescription as Le, DialogFooter as
|
|
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 ke, DialogHeader as we, DialogOverlay as He, DialogPortal as Re, DialogTitle as he, DialogTrigger as ye } from "./ui/core/dialog/dialog.js";
|
|
41
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
42
|
import { Count as Je, countVariants as We } from "./ui/core/count/count.js";
|
|
43
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
44
|
import { Reasoning as pn, ReasoningContent as mn, ReasoningHeader as ln, ReasoningItem as un } from "./ui/core/reasoning/reasoning.js";
|
|
45
|
-
import { ScrollArea as
|
|
45
|
+
import { ScrollArea as cn, ScrollBar as Cn } from "./ui/core/scroll-area/scroll-area.js";
|
|
46
46
|
import { Search as gn } from "./ui/core/search/search.js";
|
|
47
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
|
|
48
|
+
import { Pagination as vn, PaginationContent as Gn, PaginationEllipsis as Ln, PaginationFirst as kn, PaginationItem as wn, 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
49
|
import { Source as Nn, Sources as Qn, SourcesTitle as Un } from "./ui/core/sources/sources.js";
|
|
50
50
|
import { PortalContainerContext as qn } from "../lib/portal-container-context.js";
|
|
51
51
|
import { DatePicker as Jn } from "./ui/core/date-time-pickers/date-picker/date-picker.js";
|
|
52
52
|
import { DateRangePicker as Xn } from "./ui/core/date-time-pickers/date-range-picker/date-range-picker.js";
|
|
53
53
|
import { DateTimeRangePicker as Zn } from "./ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js";
|
|
54
54
|
import { PaginationTeleport as $n } from "./ui/core/pagination/pagination-teleport.js";
|
|
55
|
-
import {
|
|
55
|
+
import { TimePicker as ta } from "./ui/core/date-time-pickers/time-picker/time-picker.js";
|
|
56
|
+
import { toast as ea } from "sonner";
|
|
56
57
|
export {
|
|
57
58
|
r as Accordion,
|
|
58
59
|
e as AccordionContent,
|
|
@@ -63,14 +64,14 @@ export {
|
|
|
63
64
|
l as ActionToolbarActionClear,
|
|
64
65
|
u as ActionToolbarActions,
|
|
65
66
|
d as ActionToolbarPrimaryAction,
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
c as ActionToolbarSelection,
|
|
68
|
+
C as ActionToolbarSelectionSummary,
|
|
68
69
|
Mr as Alert,
|
|
69
70
|
vr as AlertActions,
|
|
70
71
|
Gr as AlertButton,
|
|
71
72
|
Lr as AlertClose,
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
kr as AlertDescription,
|
|
74
|
+
wr as AlertTitle,
|
|
74
75
|
E as Avatar,
|
|
75
76
|
V as AvatarFallback,
|
|
76
77
|
F as AvatarIcon,
|
|
@@ -93,7 +94,7 @@ export {
|
|
|
93
94
|
ut as BreadcrumbPageButton,
|
|
94
95
|
dt as BreadcrumbSeparator,
|
|
95
96
|
G as Button,
|
|
96
|
-
|
|
97
|
+
w as ButtonGroup,
|
|
97
98
|
H as ButtonGroupSeparator,
|
|
98
99
|
R as ButtonGroupText,
|
|
99
100
|
g as Card,
|
|
@@ -138,8 +139,8 @@ export {
|
|
|
138
139
|
ve as DialogClose,
|
|
139
140
|
Ge as DialogContent,
|
|
140
141
|
Le as DialogDescription,
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
ke as DialogFooter,
|
|
143
|
+
we as DialogHeader,
|
|
143
144
|
He as DialogOverlay,
|
|
144
145
|
Re as DialogPortal,
|
|
145
146
|
he as DialogTitle,
|
|
@@ -152,8 +153,8 @@ export {
|
|
|
152
153
|
vo as DropdownMenuItem,
|
|
153
154
|
Go as DropdownMenuLabel,
|
|
154
155
|
Lo as DropdownMenuPortal,
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
ko as DropdownMenuRadioGroup,
|
|
157
|
+
wo as DropdownMenuRadioItem,
|
|
157
158
|
Ho as DropdownMenuSectionLabel,
|
|
158
159
|
Ro as DropdownMenuSeparator,
|
|
159
160
|
ho as DropdownMenuShortcut,
|
|
@@ -198,8 +199,8 @@ export {
|
|
|
198
199
|
vn as Pagination,
|
|
199
200
|
Gn as PaginationContent,
|
|
200
201
|
Ln as PaginationEllipsis,
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
kn as PaginationFirst,
|
|
203
|
+
wn as PaginationItem,
|
|
203
204
|
Hn as PaginationLast,
|
|
204
205
|
Rn as PaginationLink,
|
|
205
206
|
hn as PaginationNext,
|
|
@@ -241,8 +242,8 @@ export {
|
|
|
241
242
|
le as PromptInputHoverCardTrigger,
|
|
242
243
|
ue as PromptInputModelSelect,
|
|
243
244
|
de as PromptInputModelSelectContent,
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
ce as PromptInputModelSelectItem,
|
|
246
|
+
Ce as PromptInputModelSelectTrigger,
|
|
246
247
|
se as PromptInputModelSelectValue,
|
|
247
248
|
ge as PromptInputProvider,
|
|
248
249
|
Ie as PromptInputSubmit,
|
|
@@ -262,14 +263,14 @@ export {
|
|
|
262
263
|
mn as ReasoningContent,
|
|
263
264
|
ln as ReasoningHeader,
|
|
264
265
|
un as ReasoningItem,
|
|
265
|
-
|
|
266
|
-
|
|
266
|
+
cn as ScrollArea,
|
|
267
|
+
Cn as ScrollBar,
|
|
267
268
|
gn as Search,
|
|
268
269
|
Qt as SegmentedControl,
|
|
269
270
|
Ut as SegmentedControlButton,
|
|
270
271
|
jt as SegmentedControlContent,
|
|
271
272
|
qt as SegmentedControlList,
|
|
272
|
-
|
|
273
|
+
wt as Select,
|
|
273
274
|
Ht as SelectContent,
|
|
274
275
|
Rt as SelectGroup,
|
|
275
276
|
ht as SelectItem,
|
|
@@ -289,8 +290,9 @@ export {
|
|
|
289
290
|
lr as TabsLabel,
|
|
290
291
|
ur as TabsList,
|
|
291
292
|
dr as TabsPanel,
|
|
292
|
-
|
|
293
|
+
cr as TabsTrigger,
|
|
293
294
|
pr as Textarea,
|
|
295
|
+
ta as TimePicker,
|
|
294
296
|
Zt as Toaster,
|
|
295
297
|
Ir as Toggle,
|
|
296
298
|
Io as Tool,
|
|
@@ -299,10 +301,10 @@ export {
|
|
|
299
301
|
To as ToolInput,
|
|
300
302
|
bo as ToolOutput,
|
|
301
303
|
uo as Tooltip,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
+
co as TooltipContent,
|
|
305
|
+
Co as TooltipProvider,
|
|
304
306
|
so as TooltipTrigger,
|
|
305
|
-
|
|
307
|
+
Ct as Topbar,
|
|
306
308
|
st as TopbarAction,
|
|
307
309
|
gt as TopbarBreadcrumbs,
|
|
308
310
|
It as TopbarCenter,
|
|
@@ -317,9 +319,9 @@ export {
|
|
|
317
319
|
We as countVariants,
|
|
318
320
|
zt as segmentedControlButtonVariants,
|
|
319
321
|
Jt as segmentedControlListVariants,
|
|
320
|
-
|
|
322
|
+
Cr as tabsListVariants,
|
|
321
323
|
sr as tabsTriggerVariants,
|
|
322
|
-
|
|
324
|
+
ea as toast,
|
|
323
325
|
Pr as toggleVariants,
|
|
324
326
|
De as usePromptInputController
|
|
325
327
|
};
|
|
@@ -1,84 +1,73 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { Popover as
|
|
4
|
-
import { Calendar as
|
|
5
|
-
import { DateTimeInput as
|
|
6
|
-
import { ShortcutsPanel as
|
|
7
|
-
import { useDatePicker as
|
|
8
|
-
const
|
|
9
|
-
value:
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { cn as k } from "../../../../../lib/utils.js";
|
|
3
|
+
import { Popover as x, PopoverTrigger as P, PopoverContent as M } from "../../popover/popover.js";
|
|
4
|
+
import { Calendar as N } from "../shared/calendar/calendar.js";
|
|
5
|
+
import { DateTimeInput as w } from "../shared/date-time-input/date-time-input.js";
|
|
6
|
+
import { ShortcutsPanel as R } from "../shared/shortcuts-panel/shortcuts-panel.js";
|
|
7
|
+
import { useDatePicker as S } from "./use-date-picker.js";
|
|
8
|
+
const Y = (n) => n ? [n, n] : [null, null], V = ({
|
|
9
|
+
value: n,
|
|
10
10
|
onChange: r,
|
|
11
11
|
format: i = "DD/MM/YYYY",
|
|
12
|
-
placeholder:
|
|
13
|
-
displayWeekNumber:
|
|
14
|
-
shortcuts:
|
|
15
|
-
defaultDate:
|
|
12
|
+
placeholder: p,
|
|
13
|
+
displayWeekNumber: c = !1,
|
|
14
|
+
shortcuts: t,
|
|
15
|
+
defaultDate: d,
|
|
16
16
|
className: s
|
|
17
17
|
}) => {
|
|
18
18
|
const {
|
|
19
|
-
isOpen:
|
|
19
|
+
isOpen: o,
|
|
20
20
|
displayedMonth: m,
|
|
21
|
-
tempDate:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
displayWeekNumber: d,
|
|
71
|
-
onDateClick: u,
|
|
72
|
-
onMonthChange: v
|
|
73
|
-
}
|
|
74
|
-
) })
|
|
75
|
-
] })
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
) });
|
|
21
|
+
tempDate: a,
|
|
22
|
+
handleOpenChange: h,
|
|
23
|
+
handleDateClick: f,
|
|
24
|
+
handleMonthChange: u,
|
|
25
|
+
handleApplyShortcut: v,
|
|
26
|
+
inputRef: g,
|
|
27
|
+
popoverRef: C
|
|
28
|
+
} = S({ value: n, onChange: r, defaultDate: d }), D = o ? a : n;
|
|
29
|
+
return /* @__PURE__ */ e("div", { "data-slot": "date-picker", className: k("relative w-full", s), children: /* @__PURE__ */ l(x, { open: o, onOpenChange: h, children: [
|
|
30
|
+
/* @__PURE__ */ e(P, { render: /* @__PURE__ */ e("div", { ref: g, className: "w-full" }), children: /* @__PURE__ */ e(
|
|
31
|
+
w,
|
|
32
|
+
{
|
|
33
|
+
value: D,
|
|
34
|
+
format: i,
|
|
35
|
+
placeholder: p,
|
|
36
|
+
isOpen: o,
|
|
37
|
+
variant: "date"
|
|
38
|
+
}
|
|
39
|
+
) }),
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
M,
|
|
42
|
+
{
|
|
43
|
+
ref: C,
|
|
44
|
+
className: "rounded-xl w-auto p-0",
|
|
45
|
+
side: "bottom",
|
|
46
|
+
align: "start",
|
|
47
|
+
children: /* @__PURE__ */ l("div", { "data-slot": "date-picker-content", className: "flex flex-row", children: [
|
|
48
|
+
t && t.length > 0 && /* @__PURE__ */ e(
|
|
49
|
+
R,
|
|
50
|
+
{
|
|
51
|
+
shortcuts: t,
|
|
52
|
+
onShortcutClick: v
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e(
|
|
56
|
+
N,
|
|
57
|
+
{
|
|
58
|
+
displayedMonth: m,
|
|
59
|
+
selectedRange: Y(a),
|
|
60
|
+
hoverDate: null,
|
|
61
|
+
displayWeekNumber: c,
|
|
62
|
+
onDateClick: f,
|
|
63
|
+
onMonthChange: u
|
|
64
|
+
}
|
|
65
|
+
) })
|
|
66
|
+
] })
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] }) });
|
|
81
70
|
};
|
|
82
71
|
export {
|
|
83
|
-
|
|
72
|
+
V as DatePicker
|
|
84
73
|
};
|
|
@@ -8,8 +8,7 @@ export interface UseDatePickerReturn {
|
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
displayedMonth: Dayjs;
|
|
10
10
|
tempDate: Dayjs | null;
|
|
11
|
-
|
|
12
|
-
handleCancel: () => void;
|
|
11
|
+
handleOpenChange: (open: boolean) => void;
|
|
13
12
|
handleDateClick: (date: Dayjs) => void;
|
|
14
13
|
handleMonthChange: (month: Dayjs) => void;
|
|
15
14
|
handleApplyShortcut: (shortcutValue: Dayjs | [Dayjs, Dayjs] | [Dayjs | null, Dayjs | null]) => void;
|
|
@@ -1,63 +1,52 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import
|
|
3
|
-
import { usePopoverState as
|
|
4
|
-
import { useSingleDateState as
|
|
5
|
-
const
|
|
6
|
-
value:
|
|
1
|
+
import { useRef as y, useCallback as A, useEffect as O } from "react";
|
|
2
|
+
import R from "dayjs";
|
|
3
|
+
import { usePopoverState as B } from "../shared/hooks/use-popover-state.js";
|
|
4
|
+
import { useSingleDateState as C } from "../shared/hooks/use-single-date-state.js";
|
|
5
|
+
const x = ({
|
|
6
|
+
value: n,
|
|
7
7
|
onChange: t,
|
|
8
|
-
defaultDate:
|
|
8
|
+
defaultDate: o = R()
|
|
9
9
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
}),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
inputRef: i,
|
|
17
|
-
handleTogglePopover: h
|
|
18
|
-
} = R({
|
|
19
|
-
onClose: p(() => r.current(), []),
|
|
20
|
-
onBackspace: p(() => s.current(), [])
|
|
21
|
-
}), u = B({
|
|
22
|
-
value: a,
|
|
23
|
-
defaultDate: d,
|
|
10
|
+
const s = y(() => {
|
|
11
|
+
}), { isOpen: r, setIsOpen: a, popoverRef: c, inputRef: p } = B({
|
|
12
|
+
onBackspace: A(() => s.current(), [])
|
|
13
|
+
}), l = C({
|
|
14
|
+
value: n,
|
|
15
|
+
defaultDate: o,
|
|
24
16
|
onDateSelected: (e) => {
|
|
25
|
-
t(e),
|
|
17
|
+
t(e), a(!1);
|
|
26
18
|
}
|
|
27
19
|
}), {
|
|
28
|
-
tempDate:
|
|
29
|
-
displayedMonth:
|
|
30
|
-
handleDateClick:
|
|
31
|
-
handleMonthChange:
|
|
32
|
-
clearDate:
|
|
33
|
-
resetDate:
|
|
34
|
-
} =
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
20
|
+
tempDate: d,
|
|
21
|
+
displayedMonth: f,
|
|
22
|
+
handleDateClick: i,
|
|
23
|
+
handleMonthChange: h,
|
|
24
|
+
clearDate: m,
|
|
25
|
+
resetDate: u
|
|
26
|
+
} = l, D = () => {
|
|
27
|
+
u(n);
|
|
28
|
+
}, S = () => {
|
|
29
|
+
m() && t(null);
|
|
38
30
|
};
|
|
39
|
-
return
|
|
40
|
-
|
|
31
|
+
return O(() => {
|
|
32
|
+
s.current = S;
|
|
41
33
|
}), {
|
|
42
|
-
isOpen:
|
|
43
|
-
displayedMonth:
|
|
44
|
-
tempDate:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
handleCancel: () => {
|
|
49
|
-
n(), o(!1);
|
|
34
|
+
isOpen: r,
|
|
35
|
+
displayedMonth: f,
|
|
36
|
+
tempDate: d,
|
|
37
|
+
handleOpenChange: (e) => {
|
|
38
|
+
D(), a(e);
|
|
50
39
|
},
|
|
51
|
-
handleDateClick:
|
|
52
|
-
handleMonthChange:
|
|
40
|
+
handleDateClick: i,
|
|
41
|
+
handleMonthChange: h,
|
|
53
42
|
handleApplyShortcut: (e) => {
|
|
54
|
-
const
|
|
55
|
-
t(
|
|
43
|
+
const k = Array.isArray(e) ? e[0] : e;
|
|
44
|
+
t(k), a(!1);
|
|
56
45
|
},
|
|
57
|
-
inputRef:
|
|
58
|
-
popoverRef:
|
|
46
|
+
inputRef: p,
|
|
47
|
+
popoverRef: c
|
|
59
48
|
};
|
|
60
49
|
};
|
|
61
50
|
export {
|
|
62
|
-
|
|
51
|
+
x as useDatePicker
|
|
63
52
|
};
|