@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.
Files changed (120) hide show
  1. package/DESIGN.md +1651 -7
  2. package/README.md +45 -3
  3. package/dist/components/index.d.ts +4 -2
  4. package/dist/components/index.js +58 -325
  5. package/dist/components/ui/core/accordion/accordion.js +79 -114
  6. package/dist/components/ui/core/action-toolbar/action-toolbar.js +108 -176
  7. package/dist/components/ui/core/alert/alert.js +158 -206
  8. package/dist/components/ui/core/avatar/avatar.js +64 -90
  9. package/dist/components/ui/core/badge/badge.js +73 -108
  10. package/dist/components/ui/core/banner/banner.js +146 -215
  11. package/dist/components/ui/core/breadcrumb/breadcrumb.js +105 -200
  12. package/dist/components/ui/core/button/button.js +47 -52
  13. package/dist/components/ui/core/button-group/button-group.js +40 -79
  14. package/dist/components/ui/core/card/card.js +102 -185
  15. package/dist/components/ui/core/chart/chart.js +116 -206
  16. package/dist/components/ui/core/chart/index.js +2 -8
  17. package/dist/components/ui/core/checkbox/checkbox.js +67 -132
  18. package/dist/components/ui/core/checkbox/checkbox.metadata.js +7 -7
  19. package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
  20. package/dist/components/ui/core/code-block/code-block.js +179 -267
  21. package/dist/components/ui/core/collapsible/collapsible.js +29 -49
  22. package/dist/components/ui/core/combobox/combobox.js +41 -0
  23. package/dist/components/ui/core/command/command.js +85 -150
  24. package/dist/components/ui/core/count/count.js +21 -32
  25. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +60 -83
  26. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +1 -2
  27. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +36 -62
  28. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -98
  29. package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +1 -2
  30. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +60 -81
  31. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -189
  32. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +1 -2
  33. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +104 -158
  34. package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
  35. package/dist/components/ui/core/date-time-pickers/index.js +5 -8
  36. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +42 -56
  37. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +66 -117
  38. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +63 -93
  39. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +1 -1
  40. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +64 -98
  41. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +38 -67
  42. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +0 -2
  43. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +23 -39
  44. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +52 -62
  45. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +18 -18
  46. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +24 -31
  47. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +24 -33
  48. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +4 -7
  49. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +17 -31
  50. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -0
  51. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +19 -0
  52. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +41 -0
  53. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +33 -50
  54. package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -0
  55. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +16 -0
  56. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +79 -0
  57. package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +23 -0
  58. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +3 -0
  59. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +42 -0
  60. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +39 -52
  61. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +7 -15
  62. package/dist/components/ui/core/dialog/dialog.js +82 -155
  63. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +19 -17
  64. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -250
  65. package/dist/components/ui/core/empty-state/empty-state.context.js +5 -8
  66. package/dist/components/ui/core/empty-state/empty-state.js +86 -138
  67. package/dist/components/ui/core/helper-text/helper-text.js +37 -65
  68. package/dist/components/ui/core/hover-card/hover-card.js +54 -80
  69. package/dist/components/ui/core/inline-citation/inline-citation.js +98 -181
  70. package/dist/components/ui/core/input/input.js +12 -27
  71. package/dist/components/ui/core/input-group/input-group.js +76 -173
  72. package/dist/components/ui/core/kbd/kbd.js +20 -36
  73. package/dist/components/ui/core/label/label.js +26 -43
  74. package/dist/components/ui/core/loader/loader.js +80 -117
  75. package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +12 -12
  76. package/dist/components/ui/core/message/message.d.ts +2 -2
  77. package/dist/components/ui/core/message/message.js +316 -542
  78. package/dist/components/ui/core/pagination/pagination-size-context.js +5 -6
  79. package/dist/components/ui/core/pagination/pagination-teleport.js +86 -106
  80. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
  81. package/dist/components/ui/core/pagination/pagination.js +231 -334
  82. package/dist/components/ui/core/popover/popover.js +90 -157
  83. package/dist/components/ui/core/progress/progress.js +36 -61
  84. package/dist/components/ui/core/prompt-input/prompt-input.js +274 -413
  85. package/dist/components/ui/core/radio-group/radio-group.js +58 -113
  86. package/dist/components/ui/core/reasoning/reasoning.js +55 -86
  87. package/dist/components/ui/core/scroll-area/scroll-area.js +41 -71
  88. package/dist/components/ui/core/search/search.js +77 -99
  89. package/dist/components/ui/core/segmented-control/segmented-control.js +110 -167
  90. package/dist/components/ui/core/select/select.js +168 -293
  91. package/dist/components/ui/core/separator/separator.js +13 -23
  92. package/dist/components/ui/core/shimmer/shimmer.d.ts +2 -4
  93. package/dist/components/ui/core/shimmer/shimmer.js +40 -107
  94. package/dist/components/ui/core/skeleton/skeleton.js +13 -18
  95. package/dist/components/ui/core/sonner-toast/sonner-toast.js +54 -47
  96. package/dist/components/ui/core/sources/sources.d.ts +5 -1
  97. package/dist/components/ui/core/sources/sources.js +58 -79
  98. package/dist/components/ui/core/switch/switch.js +62 -0
  99. package/dist/components/ui/core/tabs/tabs.js +149 -223
  100. package/dist/components/ui/core/tabs/tabs.utils.js +6 -8
  101. package/dist/components/ui/core/textarea/textarea.js +13 -27
  102. package/dist/components/ui/core/toggle/toggle.js +55 -74
  103. package/dist/components/ui/core/tool/tool.js +127 -163
  104. package/dist/components/ui/core/tooltip/tooltip.js +47 -86
  105. package/dist/components/ui/core/topbar/topbar.js +106 -190
  106. package/dist/eslint/index.js +5 -10
  107. package/dist/eslint/no-overriding-styles.js +178 -237
  108. package/dist/icons/index.d.ts +1 -0
  109. package/dist/icons/index.js +1 -0
  110. package/dist/lib/highlight-code.d.ts +9 -0
  111. package/dist/lib/highlight-code.js +42 -0
  112. package/dist/lib/portal-container-context.js +8 -9
  113. package/dist/lib/style-scope.js +6 -6
  114. package/dist/lib/use-controllable-state.js +21 -30
  115. package/dist/lib/utils.d.ts +0 -2
  116. package/dist/lib/utils.js +32 -112
  117. package/dist/styles.css +1 -1
  118. package/dist/styles.source.css +23 -0
  119. package/package.json +23 -7
  120. package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
@@ -1,65 +1,37 @@
1
- import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as g, isValidElement as u } from "react";
3
- import { IconExclamationCircle as h } from "@tabler/icons-react";
4
- import { cva as i } from "class-variance-authority";
5
- import { cn as n } from "../../../../lib/utils.js";
6
- const v = i("flex flex-row justify-start items-start pt-2", {
7
- variants: {
8
- 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
- },
13
- defaultVariants: {
14
- size: "sm"
15
- }
16
- }), V = i("shrink-0", {
17
- variants: {
18
- size: {
19
- xs: "[&_svg]:size-3.5",
20
- sm: "[&_svg]:size-4"
21
- }
22
- },
23
- defaultVariants: {
24
- size: "sm"
25
- }
26
- }), z = g(
27
- ({
28
- className: o,
29
- size: t = "sm",
30
- isError: s = !1,
31
- isSuccess: l = !1,
32
- icon: m,
33
- children: c,
34
- ...x
35
- }, p) => {
36
- const a = m ?? (s ? /* @__PURE__ */ e(h, {}) : null), d = u(a), r = s ? "text-destructive-foreground" : l ? "text-success-foreground" : "text-muted-foreground";
37
- return /* @__PURE__ */ f(
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 { jsx as t } from "react/jsx-runtime";
2
- import { createContext as p, forwardRef as l, useContext as f, useMemo as u } from "react";
3
- import { PreviewCard as d } from "@base-ui/react/preview-card";
4
- import { usePortalContainer as g } from "../../../../lib/portal-container-context.js";
5
- import { cn as v } from "../../../../lib/utils.js";
6
- const m = p(null);
7
- function w({
8
- openDelay: o,
9
- closeDelay: e,
10
- ...a
11
- }) {
12
- const r = u(
13
- () => ({ openDelay: o, closeDelay: e }),
14
- [o, e]
15
- );
16
- return /* @__PURE__ */ t(m.Provider, { value: r, children: /* @__PURE__ */ t(d.Root, { "data-slot": "hover-card", ...a }) });
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
- const C = l(
19
- ({ children: o, ...e }, a) => {
20
- const r = f(m), { delay: n, closeDelay: i, ...s } = e;
21
- return /* @__PURE__ */ t(
22
- d.Trigger,
23
- {
24
- ref: a,
25
- "data-slot": "hover-card-trigger",
26
- delay: n ?? r?.openDelay,
27
- closeDelay: i ?? r?.closeDelay,
28
- ...s,
29
- children: o
30
- }
31
- );
32
- }
33
- );
34
- C.displayName = "HoverCardTrigger";
35
- const h = l(
36
- ({
37
- className: o,
38
- side: e = "bottom",
39
- sideOffset: a = 4,
40
- align: r = "center",
41
- alignOffset: n = 4,
42
- ...i
43
- }, s) => {
44
- const c = g();
45
- return /* @__PURE__ */ t(
46
- d.Portal,
47
- {
48
- "data-slot": "hover-card-portal",
49
- container: c,
50
- children: /* @__PURE__ */ t(
51
- d.Positioner,
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 { jsx as i, jsxs as d, Fragment as v } from "react/jsx-runtime";
2
- import { forwardRef as r } from "react";
3
- import { cn as o, getHostname as m } from "../../../../lib/utils.js";
4
- import { Badge as g } from "../badge/badge.js";
5
- import { HoverCard as f, HoverCardContent as x, HoverCardTrigger as b } from "../hover-card/hover-card.js";
6
- const h = r(
7
- ({ className: e, ...n }, t) => /* @__PURE__ */ i(
8
- "span",
9
- {
10
- ref: t,
11
- "data-slot": "inline-citation",
12
- className: o("group inline-flex items-center gap-1", e),
13
- ...n
14
- }
15
- )
16
- );
17
- h.displayName = "InlineCitation";
18
- const C = r(
19
- ({ className: e, ...n }, t) => /* @__PURE__ */ i(
20
- "div",
21
- {
22
- ref: t,
23
- "data-slot": "inline-citation-group",
24
- className: o("flex flex-wrap gap-2", e),
25
- ...n
26
- }
27
- )
28
- );
29
- C.displayName = "InlineCitationGroup";
30
- const N = r(
31
- ({ className: e, ...n }, t) => /* @__PURE__ */ i(
32
- "span",
33
- {
34
- ref: t,
35
- "data-slot": "inline-citation-text",
36
- className: o(
37
- "transition-colors group-hover:bg-accent-background",
38
- e
39
- ),
40
- ...n
41
- }
42
- )
43
- );
44
- N.displayName = "InlineCitationText";
45
- const q = (e) => /* @__PURE__ */ i(
46
- f,
47
- {
48
- "data-slot": "inline-citation-card",
49
- closeDelay: 0,
50
- openDelay: 0,
51
- ...e
52
- }
53
- ), B = ({
54
- sources: e,
55
- icon: n,
56
- className: t,
57
- ...a
58
- }) => /* @__PURE__ */ i(
59
- b,
60
- {
61
- render: /* @__PURE__ */ d(
62
- g,
63
- {
64
- "data-slot": "inline-citation-card-trigger",
65
- className: o(
66
- "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]",
67
- "[&>svg]:size-3 [&>svg]:pointer-events-none",
68
- t
69
- ),
70
- ...a,
71
- children: [
72
- n && /* @__PURE__ */ i(n, { className: "size-3" }),
73
- e[0] ? /* @__PURE__ */ d(v, { children: [
74
- m(e[0]),
75
- " ",
76
- e.length > 1 && `+${e.length - 1}`
77
- ] }) : "unknown"
78
- ]
79
- }
80
- )
81
- }
82
- ), D = ({
83
- className: e,
84
- ...n
85
- }) => /* @__PURE__ */ i(
86
- x,
87
- {
88
- "data-slot": "inline-citation-card-body",
89
- className: o("relative w-80 p-0", e),
90
- ...n
91
- }
92
- ), k = r(
93
- ({ title: e, url: n, description: t, className: a, children: l, ...s }, c) => /* @__PURE__ */ d(
94
- "div",
95
- {
96
- ref: c,
97
- "data-slot": "inline-citation-source",
98
- className: o("space-y-1", a),
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 { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as o } from "react";
3
- import { cn as l, readOnlyState as i, disabledState as m, invalidState as n, focusState as f, filledState as p, hoverState as s, formElementBase as d } from "../../../../lib/utils.js";
4
- const u = o(
5
- ({ className: t, ...e }, a) => /* @__PURE__ */ r(
6
- "input",
7
- {
8
- ref: a,
9
- "data-slot": "input",
10
- className: l(
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
- export {
27
- u as Input
28
- };
12
+ //#endregion
13
+ export { u as Input };