@cognite/aura 0.3.1 → 0.3.3
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 +1651 -7
- package/README.md +45 -3
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +58 -325
- package/dist/components/ui/core/accordion/accordion.js +79 -114
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +108 -176
- package/dist/components/ui/core/alert/alert.js +158 -206
- package/dist/components/ui/core/avatar/avatar.js +64 -90
- package/dist/components/ui/core/badge/badge.js +73 -108
- package/dist/components/ui/core/banner/banner.js +146 -215
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +105 -200
- package/dist/components/ui/core/button/button.js +47 -52
- package/dist/components/ui/core/button-group/button-group.js +40 -79
- package/dist/components/ui/core/card/card.js +102 -185
- package/dist/components/ui/core/chart/chart.js +116 -206
- package/dist/components/ui/core/chart/index.js +2 -8
- package/dist/components/ui/core/checkbox/checkbox.js +67 -132
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +7 -7
- package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
- package/dist/components/ui/core/code-block/code-block.js +179 -267
- package/dist/components/ui/core/collapsible/collapsible.js +29 -49
- package/dist/components/ui/core/combobox/combobox.js +41 -0
- package/dist/components/ui/core/command/command.js +85 -150
- package/dist/components/ui/core/count/count.js +21 -32
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +60 -83
- 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 +36 -62
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -98
- 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 +60 -81
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -189
- 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 +104 -158
- package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
- package/dist/components/ui/core/date-time-pickers/index.js +5 -8
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +42 -56
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +66 -117
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +63 -93
- 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 +64 -98
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +38 -67
- 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 +23 -39
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +52 -62
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +18 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +24 -31
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +24 -33
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +4 -7
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +17 -31
- 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/shared/time-picker-scroll/time-picker-scroll.js +33 -50
- 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 +79 -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 +42 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +39 -52
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +7 -15
- package/dist/components/ui/core/dialog/dialog.js +82 -155
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +19 -17
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -250
- package/dist/components/ui/core/empty-state/empty-state.context.js +5 -8
- package/dist/components/ui/core/empty-state/empty-state.js +86 -138
- package/dist/components/ui/core/helper-text/helper-text.js +37 -65
- package/dist/components/ui/core/hover-card/hover-card.js +54 -80
- package/dist/components/ui/core/inline-citation/inline-citation.js +98 -181
- package/dist/components/ui/core/input/input.js +12 -27
- package/dist/components/ui/core/input-group/input-group.js +76 -173
- package/dist/components/ui/core/kbd/kbd.js +20 -36
- package/dist/components/ui/core/label/label.js +26 -43
- package/dist/components/ui/core/loader/loader.js +80 -117
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +12 -12
- package/dist/components/ui/core/message/message.d.ts +2 -2
- package/dist/components/ui/core/message/message.js +316 -542
- package/dist/components/ui/core/pagination/pagination-size-context.js +5 -6
- package/dist/components/ui/core/pagination/pagination-teleport.js +86 -106
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination.js +231 -334
- package/dist/components/ui/core/popover/popover.js +90 -157
- package/dist/components/ui/core/progress/progress.js +36 -61
- package/dist/components/ui/core/prompt-input/prompt-input.js +274 -413
- package/dist/components/ui/core/radio-group/radio-group.js +58 -113
- package/dist/components/ui/core/reasoning/reasoning.js +55 -86
- package/dist/components/ui/core/scroll-area/scroll-area.js +41 -71
- package/dist/components/ui/core/search/search.js +77 -99
- package/dist/components/ui/core/segmented-control/segmented-control.js +110 -167
- package/dist/components/ui/core/select/select.js +168 -293
- package/dist/components/ui/core/separator/separator.js +13 -23
- package/dist/components/ui/core/shimmer/shimmer.d.ts +2 -4
- package/dist/components/ui/core/shimmer/shimmer.js +40 -107
- package/dist/components/ui/core/skeleton/skeleton.js +13 -18
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +54 -47
- package/dist/components/ui/core/sources/sources.d.ts +5 -1
- package/dist/components/ui/core/sources/sources.js +58 -79
- package/dist/components/ui/core/switch/switch.js +62 -0
- package/dist/components/ui/core/tabs/tabs.js +149 -223
- package/dist/components/ui/core/tabs/tabs.utils.js +6 -8
- package/dist/components/ui/core/textarea/textarea.js +13 -27
- package/dist/components/ui/core/toggle/toggle.js +55 -74
- package/dist/components/ui/core/tool/tool.js +127 -163
- package/dist/components/ui/core/tooltip/tooltip.js +47 -86
- package/dist/components/ui/core/topbar/topbar.js +106 -190
- package/dist/eslint/index.js +5 -10
- package/dist/eslint/no-overriding-styles.js +178 -237
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/lib/highlight-code.d.ts +9 -0
- package/dist/lib/highlight-code.js +42 -0
- package/dist/lib/portal-container-context.js +8 -9
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/use-controllable-state.js +21 -30
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +32 -112
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +23 -0
- package/package.json +23 -7
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
|
@@ -1,173 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const m = l("text-sm shadow-none flex gap-2 items-center", {
|
|
78
|
-
variants: {
|
|
79
|
-
size: {
|
|
80
|
-
xs: "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
81
|
-
sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
82
|
-
"icon-xs": "size-6 rounded-xs p-0 has-[>svg]:p-0",
|
|
83
|
-
"icon-sm": "size-7 p-0 has-[>svg]:p-0"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
defaultVariants: {
|
|
87
|
-
size: "xs"
|
|
88
|
-
}
|
|
89
|
-
}), x = s(
|
|
90
|
-
({ className: t, type: o = "button", variant: r = "ghost", size: i = "xs", ...a }, p) => /* @__PURE__ */ e(
|
|
91
|
-
g,
|
|
92
|
-
{
|
|
93
|
-
ref: p,
|
|
94
|
-
type: o,
|
|
95
|
-
"data-size": i,
|
|
96
|
-
variant: r,
|
|
97
|
-
className: n(m({ size: i }), t),
|
|
98
|
-
...a
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
);
|
|
102
|
-
x.displayName = "InputGroupButton";
|
|
103
|
-
const y = s(
|
|
104
|
-
({ className: t, ...o }, r) => /* @__PURE__ */ e(
|
|
105
|
-
"span",
|
|
106
|
-
{
|
|
107
|
-
ref: r,
|
|
108
|
-
"data-slot": "input-group-text",
|
|
109
|
-
className: n(
|
|
110
|
-
"text-muted-foreground flex items-center gap-2 text-xs leading-[14px] tracking-[-0.00833em] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground",
|
|
111
|
-
t
|
|
112
|
-
),
|
|
113
|
-
...o
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
);
|
|
117
|
-
y.displayName = "InputGroupText";
|
|
118
|
-
const k = s(
|
|
119
|
-
({ className: t, ...o }, r) => /* @__PURE__ */ e(
|
|
120
|
-
c,
|
|
121
|
-
{
|
|
122
|
-
ref: r,
|
|
123
|
-
"data-slot": "input-group-control",
|
|
124
|
-
className: n(
|
|
125
|
-
"min-h-0 h-full min-w-0 flex-1 rounded-lg border-0 shadow-none hover:text-muted-foreground",
|
|
126
|
-
"tracking-[-0.04em]",
|
|
127
|
-
"focus-visible:not(:read-only):bg-background focus-visible:shadow-none focus-visible:border-transparent",
|
|
128
|
-
"read-only:focus-visible:bg-muted-background",
|
|
129
|
-
"aria-invalid:shadow-none aria-invalid:border-transparent",
|
|
130
|
-
"aria-invalid:[&:not(:placeholder-shown)]:border-transparent",
|
|
131
|
-
"aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent",
|
|
132
|
-
"read-only:aria-invalid:focus-visible:bg-muted-background",
|
|
133
|
-
"hover:border-0",
|
|
134
|
-
t
|
|
135
|
-
),
|
|
136
|
-
...o
|
|
137
|
-
}
|
|
138
|
-
)
|
|
139
|
-
);
|
|
140
|
-
k.displayName = "InputGroupInput";
|
|
141
|
-
const w = s(
|
|
142
|
-
({ className: t, ...o }, r) => /* @__PURE__ */ e(
|
|
143
|
-
b,
|
|
144
|
-
{
|
|
145
|
-
ref: r,
|
|
146
|
-
"data-slot": "input-group-control",
|
|
147
|
-
className: n(
|
|
148
|
-
"min-h-0 flex-1 resize-none rounded-lg border-0 bg-transparent py-3 shadow-none",
|
|
149
|
-
"tracking-[-0.04em]",
|
|
150
|
-
"hover:border-0 hover:bg-transparent hover:text-muted-foreground",
|
|
151
|
-
"filled:border-transparent",
|
|
152
|
-
"focus-visible:shadow-none focus-visible:border-transparent",
|
|
153
|
-
"read-only:focus-visible:bg-muted-background",
|
|
154
|
-
"aria-invalid:shadow-none aria-invalid:border-transparent",
|
|
155
|
-
"aria-invalid:[&:not(:placeholder-shown)]:border-transparent",
|
|
156
|
-
"aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent",
|
|
157
|
-
"read-only:aria-invalid:focus-visible:bg-muted-background",
|
|
158
|
-
"read-only:text-muted-foreground [&:read-only:not(:placeholder-shown)]:text-muted-foreground",
|
|
159
|
-
t
|
|
160
|
-
),
|
|
161
|
-
...o
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
);
|
|
165
|
-
w.displayName = "InputGroupTextarea";
|
|
166
|
-
export {
|
|
167
|
-
h as InputGroup,
|
|
168
|
-
f as InputGroupAddon,
|
|
169
|
-
x as InputGroupButton,
|
|
170
|
-
k as InputGroupInput,
|
|
171
|
-
y as InputGroupText,
|
|
172
|
-
w as InputGroupTextarea
|
|
173
|
-
};
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { Input as n } from "../input/input.js";
|
|
4
|
+
import { Textarea as r } from "../textarea/textarea.js";
|
|
5
|
+
import { forwardRef as i } from "react";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
import { cva as o } from "class-variance-authority";
|
|
8
|
+
//#region libs/aura/src/components/ui/core/input-group/input-group.tsx
|
|
9
|
+
var s = i(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
|
|
10
|
+
ref: r,
|
|
11
|
+
"data-slot": "input-group",
|
|
12
|
+
role: "group",
|
|
13
|
+
className: e("group/input-group bg-muted-background border border-transparent relative flex w-full items-stretch rounded-lg shadow-none transition-[color,box-shadow,border-color,background-color] outline-none", "hover:border-border-emphasized", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2 has-[>[data-align=inline-start]]:[&>input]:rounded-l-none has-[>[data-align=inline-start]]:[&>textarea]:rounded-l-none", "has-[>[data-align=inline-end]]:[&>input]:rounded-r-none has-[>[data-align=inline-end]]:[&>textarea]:rounded-r-none", "[&>input]:pr-2 [&>textarea]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:bg-background has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:shadow-focus-ring has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:border-transparent", "has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:shadow-focus-ring-destructive has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:border-transparent", "has-[[data-slot=input-group-control]:read-only]:border-transparent has-[[data-slot=input-group-control]:read-only]:shadow-none", "hover:has-[[data-slot=input-group-control]:read-only]:border-transparent hover:has-[[data-slot=input-group-control]:read-only]:bg-accent-background hover:has-[[data-slot=input-group-control]:read-only]:text-muted-foreground", t),
|
|
14
|
+
...n
|
|
15
|
+
}));
|
|
16
|
+
s.displayName = "InputGroup";
|
|
17
|
+
var c = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors group-hover/input-group:group-has-[[data-slot=input-group-control]:enabled:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:enabled:focus-visible:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:enabled:not(:placeholder-shown):not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control][aria-invalid=true]:enabled:not(:read-only)]/input-group:[&>svg]:text-foreground group-has-[[data-slot=input-group-control]:read-only:enabled]/input-group:[&>svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:disabled]/input-group:[&>svg]:text-disabled-foreground", l = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors", u = o("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-2 text-xs font-normal select-none [&>kbd]:rounded-sm", {
|
|
18
|
+
variants: { align: {
|
|
19
|
+
"inline-start": e("order-first min-h-0 rounded-l-lg pl-2", c),
|
|
20
|
+
"inline-end": e("order-last min-h-0 rounded-r-lg pr-2 has-[>button]:pr-1 has-[kbd]:pr-1 has-[[class*=stepper]]:pr-1", l),
|
|
21
|
+
"block-start": e("order-first w-full justify-start px-2 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5", c),
|
|
22
|
+
"block-end": e("order-last w-full justify-start px-2 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5", l)
|
|
23
|
+
} },
|
|
24
|
+
defaultVariants: { align: "inline-start" }
|
|
25
|
+
}), d = i(({ className: t, align: n = "inline-start", ...r }, i) => /* @__PURE__ */ a("div", {
|
|
26
|
+
ref: i,
|
|
27
|
+
role: "group",
|
|
28
|
+
"data-slot": "input-group-addon",
|
|
29
|
+
"data-align": n,
|
|
30
|
+
className: e(u({ align: n }), t),
|
|
31
|
+
onClick: (e) => {
|
|
32
|
+
e.target instanceof HTMLElement && e.target.closest("button") || e.target instanceof Node && !e.currentTarget.contains(e.target) || e.currentTarget.parentElement?.querySelector("[data-slot=\"input-group-control\"]")?.focus();
|
|
33
|
+
},
|
|
34
|
+
...r
|
|
35
|
+
}));
|
|
36
|
+
d.displayName = "InputGroupAddon";
|
|
37
|
+
var f = o("text-sm shadow-none flex gap-2 items-center", {
|
|
38
|
+
variants: { size: {
|
|
39
|
+
xs: "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
40
|
+
sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
41
|
+
"icon-xs": "size-6 rounded-xs p-0 has-[>svg]:p-0",
|
|
42
|
+
"icon-sm": "size-7 p-0 has-[>svg]:p-0"
|
|
43
|
+
} },
|
|
44
|
+
defaultVariants: { size: "xs" }
|
|
45
|
+
}), p = i(({ className: n, type: r = "button", variant: i = "ghost", size: o = "xs", ...s }, c) => /* @__PURE__ */ a(t, {
|
|
46
|
+
ref: c,
|
|
47
|
+
type: r,
|
|
48
|
+
"data-size": o,
|
|
49
|
+
variant: i,
|
|
50
|
+
className: e(f({ size: o }), n),
|
|
51
|
+
...s
|
|
52
|
+
}));
|
|
53
|
+
p.displayName = "InputGroupButton";
|
|
54
|
+
var m = i(({ className: t, ...n }, r) => /* @__PURE__ */ a("span", {
|
|
55
|
+
ref: r,
|
|
56
|
+
"data-slot": "input-group-text",
|
|
57
|
+
className: e("text-muted-foreground flex items-center gap-2 text-xs leading-[14px] tracking-[-0.00833em] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground", t),
|
|
58
|
+
...n
|
|
59
|
+
}));
|
|
60
|
+
m.displayName = "InputGroupText";
|
|
61
|
+
var h = i(({ className: t, ...r }, i) => /* @__PURE__ */ a(n, {
|
|
62
|
+
ref: i,
|
|
63
|
+
"data-slot": "input-group-control",
|
|
64
|
+
className: e("min-h-0 h-full min-w-0 flex-1 rounded-lg border-0 shadow-none hover:text-muted-foreground", "tracking-[-0.04em]", "focus-visible:not(:read-only):bg-background focus-visible:shadow-none focus-visible:border-transparent", "read-only:focus-visible:bg-muted-background", "aria-invalid:shadow-none aria-invalid:border-transparent", "aria-invalid:[&:not(:placeholder-shown)]:border-transparent", "aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent", "read-only:aria-invalid:focus-visible:bg-muted-background", "hover:border-0", t),
|
|
65
|
+
...r
|
|
66
|
+
}));
|
|
67
|
+
h.displayName = "InputGroupInput";
|
|
68
|
+
var g = i(({ className: t, ...n }, i) => /* @__PURE__ */ a(r, {
|
|
69
|
+
ref: i,
|
|
70
|
+
"data-slot": "input-group-control",
|
|
71
|
+
className: e("min-h-0 flex-1 resize-none rounded-lg border-0 bg-transparent py-3 shadow-none", "tracking-[-0.04em]", "hover:border-0 hover:bg-transparent hover:text-muted-foreground", "filled:border-transparent", "focus-visible:shadow-none focus-visible:border-transparent", "read-only:focus-visible:bg-muted-background", "aria-invalid:shadow-none aria-invalid:border-transparent", "aria-invalid:[&:not(:placeholder-shown)]:border-transparent", "aria-invalid:focus-visible:not(:read-only):bg-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent", "read-only:aria-invalid:focus-visible:bg-muted-background", "read-only:text-muted-foreground [&:read-only:not(:placeholder-shown)]:text-muted-foreground", t),
|
|
72
|
+
...n
|
|
73
|
+
}));
|
|
74
|
+
g.displayName = "InputGroupTextarea";
|
|
75
|
+
//#endregion
|
|
76
|
+
export { s as InputGroup, d as InputGroupAddon, p as InputGroupButton, h as InputGroupInput, m as InputGroupText, g as InputGroupTextarea };
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
i
|
|
21
|
-
const r = n(
|
|
22
|
-
({ className: t, ...e }, o) => /* @__PURE__ */ a(
|
|
23
|
-
"span",
|
|
24
|
-
{
|
|
25
|
-
ref: o,
|
|
26
|
-
"data-slot": "kbd-group",
|
|
27
|
-
className: d("inline-flex items-center gap-1", t),
|
|
28
|
-
...e
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
r.displayName = "KbdGroup";
|
|
33
|
-
export {
|
|
34
|
-
i as Kbd,
|
|
35
|
-
r as KbdGroup
|
|
36
|
-
};
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region libs/aura/src/components/ui/core/kbd/kbd.tsx
|
|
5
|
+
var r = t(({ className: t, ...r }, i) => /* @__PURE__ */ n("kbd", {
|
|
6
|
+
ref: i,
|
|
7
|
+
"data-slot": "kbd",
|
|
8
|
+
className: e("bg-muted-background text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-md px-1 font-sans text-xs font-medium leading-4 select-none aria-disabled:bg-disabled-background aria-disabled:text-disabled-foreground aria-disabled:opacity-100", "[&_svg:not([class*='size-'])]:size-3", "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10", t),
|
|
9
|
+
...r
|
|
10
|
+
}));
|
|
11
|
+
r.displayName = "Kbd";
|
|
12
|
+
var i = t(({ className: t, ...r }, i) => /* @__PURE__ */ n("span", {
|
|
13
|
+
ref: i,
|
|
14
|
+
"data-slot": "kbd-group",
|
|
15
|
+
className: e("inline-flex items-center gap-1", t),
|
|
16
|
+
...r
|
|
17
|
+
}));
|
|
18
|
+
i.displayName = "KbdGroup";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { r as Kbd, i as KbdGroup };
|
|
@@ -1,43 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
height: "8",
|
|
28
|
-
viewBox: "0 0 5 8",
|
|
29
|
-
fill: "currentColor",
|
|
30
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
-
children: /* @__PURE__ */ e("path", { d: "M2.01082 7.19387L2.09648 5.29125L0.491434 6.32372L0 5.46709L1.70424 4.59693L0 3.72678L0.491434 2.87015L2.09648 3.90261L2.01082 2H2.98918L2.90352 3.90261L4.50857 2.87015L5 3.72678L3.29576 4.59693L5 5.46709L4.50857 6.32372L2.90352 5.29125L2.98918 7.19387H2.01082Z" })
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
) : null
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
);
|
|
40
|
-
n.displayName = "Label";
|
|
41
|
-
export {
|
|
42
|
-
n as Label
|
|
43
|
-
};
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region libs/aura/src/components/ui/core/label/label.tsx
|
|
5
|
+
var i = t(({ className: t, children: i, required: a = !1, ...o }, s) => /* @__PURE__ */ r("label", {
|
|
6
|
+
ref: s,
|
|
7
|
+
"data-slot": "label",
|
|
8
|
+
className: e("flex items-center text-muted-foreground dark:text-muted-foreground text-sm font-medium leading-4.5 pb-2 select-none group-data-[disabled=true]:disabled-foreground group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:cursor-not-allowed group-data-[disabled=true]:opacity-50", t),
|
|
9
|
+
...o,
|
|
10
|
+
children: [i, a ? /* @__PURE__ */ n("span", {
|
|
11
|
+
"data-slot": "label-required-indicator",
|
|
12
|
+
className: "inline-block shrink-0 self-start pt-0.5",
|
|
13
|
+
children: /* @__PURE__ */ n("svg", {
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
width: "5",
|
|
16
|
+
height: "8",
|
|
17
|
+
viewBox: "0 0 5 8",
|
|
18
|
+
fill: "currentColor",
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
children: /* @__PURE__ */ n("path", { d: "M2.01082 7.19387L2.09648 5.29125L0.491434 6.32372L0 5.46709L1.70424 4.59693L0 3.72678L0.491434 2.87015L2.09648 3.90261L2.01082 2H2.98918L2.90352 3.90261L4.50857 2.87015L5 3.72678L3.29576 4.59693L5 5.46709L4.50857 6.32372L2.90352 5.29125L2.98918 7.19387H2.01082Z" })
|
|
21
|
+
})
|
|
22
|
+
}) : null]
|
|
23
|
+
}));
|
|
24
|
+
i.displayName = "Label";
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as Label };
|
|
@@ -1,118 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
variant: N,
|
|
79
|
-
className: v,
|
|
80
|
-
role: w,
|
|
81
|
-
"aria-label": p,
|
|
82
|
-
header: d,
|
|
83
|
-
description: c,
|
|
84
|
-
...m
|
|
85
|
-
} = e;
|
|
86
|
-
return /* @__PURE__ */ l(
|
|
87
|
-
"div",
|
|
88
|
-
{
|
|
89
|
-
ref: r,
|
|
90
|
-
"data-slot": "loader",
|
|
91
|
-
role: i,
|
|
92
|
-
"aria-label": o,
|
|
93
|
-
className: s(
|
|
94
|
-
"text-foreground flex h-[11.5rem] w-80 flex-col items-center justify-center gap-2",
|
|
95
|
-
t
|
|
96
|
-
),
|
|
97
|
-
...m,
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ a(
|
|
100
|
-
n,
|
|
101
|
-
{
|
|
102
|
-
size: 112,
|
|
103
|
-
className: "size-28",
|
|
104
|
-
strokeClassName: "text-current"
|
|
105
|
-
}
|
|
106
|
-
),
|
|
107
|
-
/* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center justify-center gap-1 text-center", children: [
|
|
108
|
-
/* @__PURE__ */ a("p", { className: "text-lg font-medium leading-6 tracking-tightest text-foreground", children: d }),
|
|
109
|
-
c && /* @__PURE__ */ a("p", { className: "w-full text-sm leading-[18px] tracking-tight text-secondary-foreground", children: c })
|
|
110
|
-
] })
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
);
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region libs/aura/src/components/ui/core/loader/loader.tsx
|
|
5
|
+
var i = ({ size: t = 16, className: i, strokeClassName: a }) => /* @__PURE__ */ r("svg", {
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
focusable: "false",
|
|
8
|
+
className: e("overflow-visible", a, i),
|
|
9
|
+
height: t,
|
|
10
|
+
viewBox: "0 0 167 216",
|
|
11
|
+
width: t,
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
children: [/* @__PURE__ */ n("rect", {
|
|
14
|
+
className: "aura-loader-rect aura-loader-rect-1",
|
|
15
|
+
"data-slot": "loader-rect",
|
|
16
|
+
x: "10",
|
|
17
|
+
y: "10",
|
|
18
|
+
width: "98",
|
|
19
|
+
height: "196",
|
|
20
|
+
rx: "49",
|
|
21
|
+
fill: "transparent",
|
|
22
|
+
stroke: "currentColor",
|
|
23
|
+
strokeWidth: "20",
|
|
24
|
+
strokeLinecap: "round"
|
|
25
|
+
}), /* @__PURE__ */ n("rect", {
|
|
26
|
+
className: "aura-loader-rect aura-loader-rect-2",
|
|
27
|
+
"data-slot": "loader-rect",
|
|
28
|
+
x: "59",
|
|
29
|
+
y: "10",
|
|
30
|
+
width: "98",
|
|
31
|
+
height: "196",
|
|
32
|
+
rx: "49",
|
|
33
|
+
fill: "transparent",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: "20",
|
|
36
|
+
strokeLinecap: "round"
|
|
37
|
+
})]
|
|
38
|
+
}), a = (e) => e.variant === "page", o = t((t, o) => {
|
|
39
|
+
let s = t.className, c = t.role ?? "status", l = t["aria-label"] ?? "Loading";
|
|
40
|
+
if (!a(t)) {
|
|
41
|
+
let { size: r = 16, variant: a, className: u, role: d, "aria-label": f, ...p } = t;
|
|
42
|
+
return /* @__PURE__ */ n("div", {
|
|
43
|
+
ref: o,
|
|
44
|
+
"data-slot": "loader",
|
|
45
|
+
role: c,
|
|
46
|
+
"aria-label": l,
|
|
47
|
+
className: e("inline-flex items-center justify-center", s),
|
|
48
|
+
...p,
|
|
49
|
+
children: /* @__PURE__ */ n(i, {
|
|
50
|
+
size: r,
|
|
51
|
+
strokeClassName: "text-current"
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
let { variant: u, className: d, role: f, "aria-label": p, header: m, description: h, ...g } = t;
|
|
56
|
+
return /* @__PURE__ */ r("div", {
|
|
57
|
+
ref: o,
|
|
58
|
+
"data-slot": "loader",
|
|
59
|
+
role: c,
|
|
60
|
+
"aria-label": l,
|
|
61
|
+
className: e("text-foreground flex h-[11.5rem] w-80 flex-col items-center justify-center gap-2", s),
|
|
62
|
+
...g,
|
|
63
|
+
children: [/* @__PURE__ */ n(i, {
|
|
64
|
+
size: 112,
|
|
65
|
+
className: "size-28",
|
|
66
|
+
strokeClassName: "text-current"
|
|
67
|
+
}), /* @__PURE__ */ r("div", {
|
|
68
|
+
className: "flex w-full flex-col items-center justify-center gap-1 text-center",
|
|
69
|
+
children: [/* @__PURE__ */ n("p", {
|
|
70
|
+
className: "text-lg font-medium leading-6 tracking-tightest text-foreground",
|
|
71
|
+
children: m
|
|
72
|
+
}), h && /* @__PURE__ */ n("p", {
|
|
73
|
+
className: "w-full text-sm leading-[18px] tracking-tight text-secondary-foreground",
|
|
74
|
+
children: h
|
|
75
|
+
})]
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
114
78
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
};
|
|
79
|
+
o.displayName = "Loader";
|
|
80
|
+
//#endregion
|
|
81
|
+
export { o as Loader };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
e as MESSAGE_RESPONSE_DEFAULT_STREAMDOWN_CONTROLS
|
|
1
|
+
//#region libs/aura/src/components/ui/core/message/message-response-default-streamdown-controls.ts
|
|
2
|
+
var e = {
|
|
3
|
+
code: !1,
|
|
4
|
+
table: !1,
|
|
5
|
+
mermaid: {
|
|
6
|
+
copy: !0,
|
|
7
|
+
download: !0,
|
|
8
|
+
fullscreen: !1,
|
|
9
|
+
panZoom: !0
|
|
10
|
+
}
|
|
13
11
|
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as MESSAGE_RESPONSE_DEFAULT_STREAMDOWN_CONTROLS };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, HTMLAttributes,
|
|
1
|
+
import { ComponentProps, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { JSX } from 'react/jsx-runtime';
|
|
3
3
|
import { Streamdown } from 'streamdown';
|
|
4
4
|
import { FileUIPart, UIMessage } from '../../../../lib/ai/types';
|
|
@@ -42,7 +42,7 @@ declare const MessageBranchNext: ({ children, ...props }: MessageBranchNextProps
|
|
|
42
42
|
type MessageBranchPageProps = HTMLAttributes<HTMLSpanElement>;
|
|
43
43
|
declare const MessageBranchPage: ({ className, ...props }: MessageBranchPageProps) => ReactNode;
|
|
44
44
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
45
|
-
declare const MessageResponse:
|
|
45
|
+
declare const MessageResponse: ({ className, components, plugins, controls, ...props }: MessageResponseProps) => JSX.Element;
|
|
46
46
|
type MessageAttachmentProps = HTMLAttributes<HTMLDivElement> & {
|
|
47
47
|
data: FileUIPart;
|
|
48
48
|
className?: string;
|