@cognite/aura 0.3.2 → 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 +134 -5
- package/README.md +24 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +58 -327
- 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 -72
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +36 -51
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -87
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +60 -68
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -174
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +104 -145
- package/dist/components/ui/core/date-time-pickers/index.js +5 -10
- 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.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.js +23 -23
- 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/time-picker-panel.js +40 -40
- 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/time-picker.js +78 -99
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +41 -63
- 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 +2 -2
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -248
- 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,65 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { IconExclamationCircle as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
ref: p,
|
|
41
|
-
"data-slot": "helper-text",
|
|
42
|
-
className: n(v({ size: t }), o),
|
|
43
|
-
...x,
|
|
44
|
-
children: [
|
|
45
|
-
d ? /* @__PURE__ */ e(
|
|
46
|
-
"span",
|
|
47
|
-
{
|
|
48
|
-
className: n(
|
|
49
|
-
V({ size: t }),
|
|
50
|
-
t === "sm" && "mt-0.25",
|
|
51
|
-
r
|
|
52
|
-
),
|
|
53
|
-
children: a
|
|
54
|
-
}
|
|
55
|
-
) : null,
|
|
56
|
-
/* @__PURE__ */ e("span", { className: r, children: c })
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
z.displayName = "HelperText";
|
|
63
|
-
export {
|
|
64
|
-
z as HelperText
|
|
65
|
-
};
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as t, isValidElement as n } from "react";
|
|
3
|
+
import { IconExclamationCircle as r } from "@tabler/icons-react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { cva as o } from "class-variance-authority";
|
|
6
|
+
//#region libs/aura/src/components/ui/core/helper-text/helper-text.tsx
|
|
7
|
+
var s = o("flex flex-row justify-start items-start pt-2", {
|
|
8
|
+
variants: { size: {
|
|
9
|
+
xs: "gap-1 text-xs leading-3.5 tracking-tightest",
|
|
10
|
+
sm: "gap-1 text-sm leading-4.5 tracking-tight"
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { size: "sm" }
|
|
13
|
+
}), c = o("shrink-0", {
|
|
14
|
+
variants: { size: {
|
|
15
|
+
xs: "[&_svg]:size-3.5",
|
|
16
|
+
sm: "[&_svg]:size-4"
|
|
17
|
+
} },
|
|
18
|
+
defaultVariants: { size: "sm" }
|
|
19
|
+
}), l = t(({ className: t, size: o = "sm", isError: l = !1, isSuccess: u = !1, icon: d, children: f, ...p }, m) => {
|
|
20
|
+
let h = d ?? (l ? /* @__PURE__ */ i(r, {}) : null), g = n(h), _ = l ? "text-destructive-foreground" : u ? "text-success-foreground" : "text-muted-foreground";
|
|
21
|
+
return /* @__PURE__ */ a("div", {
|
|
22
|
+
ref: m,
|
|
23
|
+
"data-slot": "helper-text",
|
|
24
|
+
className: e(s({ size: o }), t),
|
|
25
|
+
...p,
|
|
26
|
+
children: [g ? /* @__PURE__ */ i("span", {
|
|
27
|
+
className: e(c({ size: o }), o === "sm" && "mt-0.25", _),
|
|
28
|
+
children: h
|
|
29
|
+
}) : null, /* @__PURE__ */ i("span", {
|
|
30
|
+
className: _,
|
|
31
|
+
children: f
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
l.displayName = "HelperText";
|
|
36
|
+
//#endregion
|
|
37
|
+
export { l as HelperText };
|
|
@@ -1,81 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { usePortalContainer as t } from "../../../../lib/portal-container-context.js";
|
|
3
|
+
import { createContext as n, forwardRef as r, useContext as i, useMemo as a } from "react";
|
|
4
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
+
import { PreviewCard as s } from "@base-ui/react/preview-card";
|
|
6
|
+
//#region libs/aura/src/components/ui/core/hover-card/hover-card.tsx
|
|
7
|
+
var c = n(null);
|
|
8
|
+
function l({ openDelay: e, closeDelay: t, ...n }) {
|
|
9
|
+
let r = a(() => ({
|
|
10
|
+
openDelay: e,
|
|
11
|
+
closeDelay: t
|
|
12
|
+
}), [e, t]);
|
|
13
|
+
return /* @__PURE__ */ o(c.Provider, {
|
|
14
|
+
value: r,
|
|
15
|
+
children: /* @__PURE__ */ o(s.Root, {
|
|
16
|
+
"data-slot": "hover-card",
|
|
17
|
+
...n
|
|
18
|
+
})
|
|
19
|
+
});
|
|
17
20
|
}
|
|
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
|
-
align: r,
|
|
54
|
-
alignOffset: n,
|
|
55
|
-
side: e,
|
|
56
|
-
sideOffset: a,
|
|
57
|
-
className: "isolate z-50",
|
|
58
|
-
children: /* @__PURE__ */ t(
|
|
59
|
-
d.Popup,
|
|
60
|
-
{
|
|
61
|
-
ref: s,
|
|
62
|
-
"data-slot": "hover-card-content",
|
|
63
|
-
className: v(
|
|
64
|
-
"bg-popover-background text-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-[var(--transform-origin)] rounded-md border p-4 shadow-md outline-none",
|
|
65
|
-
o
|
|
66
|
-
),
|
|
67
|
-
...i
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
h.displayName = "HoverCardContent";
|
|
77
|
-
export {
|
|
78
|
-
w as HoverCard,
|
|
79
|
-
h as HoverCardContent,
|
|
80
|
-
C as HoverCardTrigger
|
|
81
|
-
};
|
|
21
|
+
var u = r(({ children: e, ...t }, n) => {
|
|
22
|
+
let r = i(c), { delay: a, closeDelay: l, ...u } = t;
|
|
23
|
+
return /* @__PURE__ */ o(s.Trigger, {
|
|
24
|
+
ref: n,
|
|
25
|
+
"data-slot": "hover-card-trigger",
|
|
26
|
+
delay: a ?? r?.openDelay,
|
|
27
|
+
closeDelay: l ?? r?.closeDelay,
|
|
28
|
+
...u,
|
|
29
|
+
children: e
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
u.displayName = "HoverCardTrigger";
|
|
33
|
+
var d = r(({ className: n, side: r = "bottom", sideOffset: i = 4, align: a = "center", alignOffset: c = 4, ...l }, u) => {
|
|
34
|
+
let d = t();
|
|
35
|
+
return /* @__PURE__ */ o(s.Portal, {
|
|
36
|
+
"data-slot": "hover-card-portal",
|
|
37
|
+
container: d,
|
|
38
|
+
children: /* @__PURE__ */ o(s.Positioner, {
|
|
39
|
+
align: a,
|
|
40
|
+
alignOffset: c,
|
|
41
|
+
side: r,
|
|
42
|
+
sideOffset: i,
|
|
43
|
+
className: "isolate z-50",
|
|
44
|
+
children: /* @__PURE__ */ o(s.Popup, {
|
|
45
|
+
ref: u,
|
|
46
|
+
"data-slot": "hover-card-content",
|
|
47
|
+
className: e("bg-popover-background text-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-[var(--transform-origin)] rounded-md border p-4 shadow-md outline-none", n),
|
|
48
|
+
...l
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
d.displayName = "HoverCardContent";
|
|
54
|
+
//#endregion
|
|
55
|
+
export { l as HoverCard, d as HoverCardContent, u as HoverCardTrigger };
|
|
@@ -1,181 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
...s,
|
|
100
|
-
children: [
|
|
101
|
-
e && /* @__PURE__ */ i("h4", { className: "truncate font-medium text-sm leading-tight", children: e }),
|
|
102
|
-
n && /* @__PURE__ */ i("p", { className: "truncate break-all text-muted-foreground text-xs", children: n }),
|
|
103
|
-
t && /* @__PURE__ */ i("p", { className: "line-clamp-3 text-muted-foreground text-sm leading-relaxed", children: t }),
|
|
104
|
-
l
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
);
|
|
109
|
-
k.displayName = "InlineCitationSource";
|
|
110
|
-
const y = r(
|
|
111
|
-
({ children: e, className: n, ...t }, a) => /* @__PURE__ */ i(
|
|
112
|
-
"blockquote",
|
|
113
|
-
{
|
|
114
|
-
ref: a,
|
|
115
|
-
"data-slot": "inline-citation-quote",
|
|
116
|
-
className: o(
|
|
117
|
-
"border-muted-background border-l-2 pl-3 text-muted-foreground text-sm italic",
|
|
118
|
-
n
|
|
119
|
-
),
|
|
120
|
-
...t,
|
|
121
|
-
children: e
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
);
|
|
125
|
-
y.displayName = "InlineCitationQuote";
|
|
126
|
-
const I = r(
|
|
127
|
-
({
|
|
128
|
-
href: e,
|
|
129
|
-
target: n = "_self",
|
|
130
|
-
icon: t,
|
|
131
|
-
variant: a = "mountain",
|
|
132
|
-
className: l,
|
|
133
|
-
children: s,
|
|
134
|
-
...c
|
|
135
|
-
}, u) => {
|
|
136
|
-
const p = m(e);
|
|
137
|
-
return /* @__PURE__ */ i(
|
|
138
|
-
"a",
|
|
139
|
-
{
|
|
140
|
-
ref: u,
|
|
141
|
-
href: e,
|
|
142
|
-
target: n,
|
|
143
|
-
rel: n === "_blank" ? "noopener noreferrer" : void 0,
|
|
144
|
-
className: "inline-flex items-stretch",
|
|
145
|
-
...c,
|
|
146
|
-
children: /* @__PURE__ */ d(
|
|
147
|
-
g,
|
|
148
|
-
{
|
|
149
|
-
"data-slot": "inline-citation-link",
|
|
150
|
-
className: o(
|
|
151
|
-
"inline-flex items-center justify-center rounded-md border border-transparent px-1 text-sm leading-4.5 font-medium whitespace-nowrap gap-1 transition-colors",
|
|
152
|
-
"[&>svg]:size-3 [&>svg]:pointer-events-none",
|
|
153
|
-
{
|
|
154
|
-
mountain: "bg-decorative-background-mountain hover:bg-decorative-background-mountain-hover text-decorative-foreground-mountain",
|
|
155
|
-
nordic: "bg-decorative-background-nordic hover:bg-decorative-background-nordic-hover text-decorative-foreground-nordic",
|
|
156
|
-
fjord: "bg-decorative-background-fjord hover:bg-decorative-background-fjord-hover text-decorative-foreground-fjord"
|
|
157
|
-
}[a],
|
|
158
|
-
l
|
|
159
|
-
),
|
|
160
|
-
children: [
|
|
161
|
-
t && /* @__PURE__ */ i(t, { className: "size-3" }),
|
|
162
|
-
s ?? p
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
)
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
I.displayName = "InlineCitationLink";
|
|
171
|
-
export {
|
|
172
|
-
h as InlineCitation,
|
|
173
|
-
q as InlineCitationCard,
|
|
174
|
-
D as InlineCitationCardBody,
|
|
175
|
-
B as InlineCitationCardTrigger,
|
|
176
|
-
C as InlineCitationGroup,
|
|
177
|
-
I as InlineCitationLink,
|
|
178
|
-
y as InlineCitationQuote,
|
|
179
|
-
k as InlineCitationSource,
|
|
180
|
-
N as InlineCitationText
|
|
181
|
-
};
|
|
1
|
+
import { cn as e, getHostname as t } from "../../../../lib/utils.js";
|
|
2
|
+
import { Badge as n } from "../badge/badge.js";
|
|
3
|
+
import { HoverCard as r, HoverCardContent as i, HoverCardTrigger as a } from "../hover-card/hover-card.js";
|
|
4
|
+
import { forwardRef as o } from "react";
|
|
5
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
//#region libs/aura/src/components/ui/core/inline-citation/inline-citation.tsx
|
|
7
|
+
var u = o(({ className: t, ...n }, r) => /* @__PURE__ */ c("span", {
|
|
8
|
+
ref: r,
|
|
9
|
+
"data-slot": "inline-citation",
|
|
10
|
+
className: e("group inline-flex items-center gap-1", t),
|
|
11
|
+
...n
|
|
12
|
+
}));
|
|
13
|
+
u.displayName = "InlineCitation";
|
|
14
|
+
var d = o(({ className: t, ...n }, r) => /* @__PURE__ */ c("div", {
|
|
15
|
+
ref: r,
|
|
16
|
+
"data-slot": "inline-citation-group",
|
|
17
|
+
className: e("flex flex-wrap gap-2", t),
|
|
18
|
+
...n
|
|
19
|
+
}));
|
|
20
|
+
d.displayName = "InlineCitationGroup";
|
|
21
|
+
var f = o(({ className: t, ...n }, r) => /* @__PURE__ */ c("span", {
|
|
22
|
+
ref: r,
|
|
23
|
+
"data-slot": "inline-citation-text",
|
|
24
|
+
className: e("transition-colors group-hover:bg-accent-background", t),
|
|
25
|
+
...n
|
|
26
|
+
}));
|
|
27
|
+
f.displayName = "InlineCitationText";
|
|
28
|
+
var p = (e) => /* @__PURE__ */ c(r, {
|
|
29
|
+
"data-slot": "inline-citation-card",
|
|
30
|
+
closeDelay: 0,
|
|
31
|
+
openDelay: 0,
|
|
32
|
+
...e
|
|
33
|
+
}), m = ({ sources: r, icon: i, className: o, ...u }) => /* @__PURE__ */ c(a, { render: /* @__PURE__ */ l(n, {
|
|
34
|
+
"data-slot": "inline-citation-card-trigger",
|
|
35
|
+
className: e("ml-1 inline-flex items-center justify-center rounded-md border border-transparent bg-decorative-background-fjord px-1 text-sm leading-4.5 font-medium text-decorative-foreground-fjord whitespace-nowrap gap-1 transition-[color,box-shadow]", "[&>svg]:size-3 [&>svg]:pointer-events-none", o),
|
|
36
|
+
...u,
|
|
37
|
+
children: [i && /* @__PURE__ */ c(i, { className: "size-3" }), r[0] ? /* @__PURE__ */ l(s, { children: [
|
|
38
|
+
t(r[0]),
|
|
39
|
+
" ",
|
|
40
|
+
r.length > 1 && `+${r.length - 1}`
|
|
41
|
+
] }) : "unknown"]
|
|
42
|
+
}) }), h = ({ className: t, ...n }) => /* @__PURE__ */ c(i, {
|
|
43
|
+
"data-slot": "inline-citation-card-body",
|
|
44
|
+
className: e("relative w-80 p-0", t),
|
|
45
|
+
...n
|
|
46
|
+
}), g = o(({ title: t, url: n, description: r, className: i, children: a, ...o }, s) => /* @__PURE__ */ l("div", {
|
|
47
|
+
ref: s,
|
|
48
|
+
"data-slot": "inline-citation-source",
|
|
49
|
+
className: e("space-y-1", i),
|
|
50
|
+
...o,
|
|
51
|
+
children: [
|
|
52
|
+
t && /* @__PURE__ */ c("h4", {
|
|
53
|
+
className: "truncate font-medium text-sm leading-tight",
|
|
54
|
+
children: t
|
|
55
|
+
}),
|
|
56
|
+
n && /* @__PURE__ */ c("p", {
|
|
57
|
+
className: "truncate break-all text-muted-foreground text-xs",
|
|
58
|
+
children: n
|
|
59
|
+
}),
|
|
60
|
+
r && /* @__PURE__ */ c("p", {
|
|
61
|
+
className: "line-clamp-3 text-muted-foreground text-sm leading-relaxed",
|
|
62
|
+
children: r
|
|
63
|
+
}),
|
|
64
|
+
a
|
|
65
|
+
]
|
|
66
|
+
}));
|
|
67
|
+
g.displayName = "InlineCitationSource";
|
|
68
|
+
var _ = o(({ children: t, className: n, ...r }, i) => /* @__PURE__ */ c("blockquote", {
|
|
69
|
+
ref: i,
|
|
70
|
+
"data-slot": "inline-citation-quote",
|
|
71
|
+
className: e("border-muted-background border-l-2 pl-3 text-muted-foreground text-sm italic", n),
|
|
72
|
+
...r,
|
|
73
|
+
children: t
|
|
74
|
+
}));
|
|
75
|
+
_.displayName = "InlineCitationQuote";
|
|
76
|
+
var v = o(({ href: r, target: i = "_self", icon: a, variant: o = "mountain", className: s, children: u, ...d }, f) => {
|
|
77
|
+
let p = t(r), m = {
|
|
78
|
+
mountain: "bg-decorative-background-mountain hover:bg-decorative-background-mountain-hover text-decorative-foreground-mountain",
|
|
79
|
+
nordic: "bg-decorative-background-nordic hover:bg-decorative-background-nordic-hover text-decorative-foreground-nordic",
|
|
80
|
+
fjord: "bg-decorative-background-fjord hover:bg-decorative-background-fjord-hover text-decorative-foreground-fjord"
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ c("a", {
|
|
83
|
+
ref: f,
|
|
84
|
+
href: r,
|
|
85
|
+
target: i,
|
|
86
|
+
rel: i === "_blank" ? "noopener noreferrer" : void 0,
|
|
87
|
+
className: "inline-flex items-stretch",
|
|
88
|
+
...d,
|
|
89
|
+
children: /* @__PURE__ */ l(n, {
|
|
90
|
+
"data-slot": "inline-citation-link",
|
|
91
|
+
className: e("inline-flex items-center justify-center rounded-md border border-transparent px-1 text-sm leading-4.5 font-medium whitespace-nowrap gap-1 transition-colors", "[&>svg]:size-3 [&>svg]:pointer-events-none", m[o], s),
|
|
92
|
+
children: [a && /* @__PURE__ */ c(a, { className: "size-3" }), u ?? p]
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
v.displayName = "InlineCitationLink";
|
|
97
|
+
//#endregion
|
|
98
|
+
export { u as InlineCitation, p as InlineCitationCard, h as InlineCitationCardBody, m as InlineCitationCardTrigger, d as InlineCitationGroup, v as InlineCitationLink, _ as InlineCitationQuote, g as InlineCitationSource, f as InlineCitationText };
|
|
@@ -1,28 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"w-full h-9",
|
|
12
|
-
d,
|
|
13
|
-
s,
|
|
14
|
-
p,
|
|
15
|
-
f,
|
|
16
|
-
n,
|
|
17
|
-
m,
|
|
18
|
-
i,
|
|
19
|
-
t
|
|
20
|
-
),
|
|
21
|
-
...e
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
);
|
|
1
|
+
import { cn as e, disabledState as t, filledState as n, focusState as r, formElementBase as i, hoverState as a, invalidState as o, readOnlyState as s } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
4
|
+
//#region libs/aura/src/components/ui/core/input/input.tsx
|
|
5
|
+
var u = c(({ className: c, ...u }, d) => /* @__PURE__ */ l("input", {
|
|
6
|
+
ref: d,
|
|
7
|
+
"data-slot": "input",
|
|
8
|
+
className: e("w-full h-9", i, a, n, r, o, t, s, c),
|
|
9
|
+
...u
|
|
10
|
+
}));
|
|
25
11
|
u.displayName = "Input";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { u as Input };
|