@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,257 +1,157 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { IconCheck as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { usePortalContainer as t } from "../../../../lib/portal-container-context.js";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { IconCheck as r, IconChevronRight as i } from "@tabler/icons-react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { cva as s } from "class-variance-authority";
|
|
7
|
+
import { Menu as c } from "@base-ui/react/menu";
|
|
8
|
+
//#region libs/aura/src/components/ui/core/dropdown-menu/dropdown-menu.tsx
|
|
9
|
+
var l = s("relative flex min-h-9 cursor-default items-center gap-2 rounded-md p-2 text-sm leading-4.5 font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
10
|
+
variants: {
|
|
11
|
+
inset: { true: "pl-8" },
|
|
12
|
+
variant: {
|
|
13
|
+
default: "focus:bg-accent-background focus:text-foreground [&_svg:not([class*='text-'])]:text-foreground",
|
|
14
|
+
destructive: "text-destructive-foreground focus:bg-destructive-background-hover hover:bg-destructive-background-hover focus:text-destructive-foreground [&_svg]:text-destructive-foreground"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
inset: !1,
|
|
19
|
+
variant: "default"
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
function u({ ...e }) {
|
|
23
|
+
return /* @__PURE__ */ a(c.Root, {
|
|
24
|
+
"data-slot": "dropdown-menu",
|
|
25
|
+
...e
|
|
26
|
+
});
|
|
9
27
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
"data-slot": "dropdown-menu-portal",
|
|
19
|
-
container: e ?? o,
|
|
20
|
-
...t
|
|
21
|
-
}
|
|
22
|
-
);
|
|
28
|
+
function d({ container: e, ...n }) {
|
|
29
|
+
let r = t();
|
|
30
|
+
return /* @__PURE__ */ a(c.Portal, {
|
|
31
|
+
"data-slot": "dropdown-menu-portal",
|
|
32
|
+
container: e ?? r,
|
|
33
|
+
...n
|
|
34
|
+
});
|
|
23
35
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
var f = n(({ children: e, ...t }, n) => /* @__PURE__ */ a(c.Trigger, {
|
|
37
|
+
ref: n,
|
|
38
|
+
"data-slot": "dropdown-menu-trigger",
|
|
39
|
+
...t,
|
|
40
|
+
children: e
|
|
41
|
+
}));
|
|
42
|
+
f.displayName = "DropdownMenuTrigger";
|
|
43
|
+
function p({ align: t = "start", alignOffset: n = 0, side: r = "bottom", sideOffset: i = 4, className: o, container: s, ...l }) {
|
|
44
|
+
return /* @__PURE__ */ a(d, {
|
|
45
|
+
container: s,
|
|
46
|
+
children: /* @__PURE__ */ a(c.Positioner, {
|
|
47
|
+
className: "isolate z-50 outline-none",
|
|
48
|
+
align: t,
|
|
49
|
+
alignOffset: n,
|
|
50
|
+
side: r,
|
|
51
|
+
sideOffset: i,
|
|
52
|
+
children: /* @__PURE__ */ a(c.Popup, {
|
|
53
|
+
"data-slot": "dropdown-menu-content",
|
|
54
|
+
className: e("bg-popover-background text-foreground p-1 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 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border border-border shadow-md outline-none", o),
|
|
55
|
+
...l
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
});
|
|
29
59
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
className: s,
|
|
36
|
-
container: u,
|
|
37
|
-
...p
|
|
38
|
-
}) {
|
|
39
|
-
return /* @__PURE__ */ n(f, { container: u, children: /* @__PURE__ */ n(
|
|
40
|
-
r.Positioner,
|
|
41
|
-
{
|
|
42
|
-
className: "isolate z-50 outline-none",
|
|
43
|
-
align: e,
|
|
44
|
-
alignOffset: t,
|
|
45
|
-
side: o,
|
|
46
|
-
sideOffset: a,
|
|
47
|
-
children: /* @__PURE__ */ n(
|
|
48
|
-
r.Popup,
|
|
49
|
-
{
|
|
50
|
-
"data-slot": "dropdown-menu-content",
|
|
51
|
-
className: d(
|
|
52
|
-
"bg-popover-background text-foreground p-1 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 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md outline-none",
|
|
53
|
-
s
|
|
54
|
-
),
|
|
55
|
-
...p
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
) });
|
|
60
|
+
function m({ ...e }) {
|
|
61
|
+
return /* @__PURE__ */ a(c.Group, {
|
|
62
|
+
"data-slot": "dropdown-menu-group",
|
|
63
|
+
...e
|
|
64
|
+
});
|
|
60
65
|
}
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
var h = n(({ className: t, inset: n, variant: r = "default", children: i, ...o }, s) => /* @__PURE__ */ a(c.Item, {
|
|
67
|
+
ref: s,
|
|
68
|
+
"data-slot": "dropdown-menu-item",
|
|
69
|
+
"data-inset": n,
|
|
70
|
+
"data-variant": r,
|
|
71
|
+
className: e(l({
|
|
72
|
+
inset: n,
|
|
73
|
+
variant: r
|
|
74
|
+
}), t),
|
|
75
|
+
...o,
|
|
76
|
+
children: i
|
|
77
|
+
})), g = n(({ className: t, children: n, checked: i, ...s }, u) => /* @__PURE__ */ o(c.CheckboxItem, {
|
|
78
|
+
ref: u,
|
|
79
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
80
|
+
className: e(l({ inset: !0 }), t),
|
|
81
|
+
checked: i,
|
|
82
|
+
...s,
|
|
83
|
+
children: [/* @__PURE__ */ a("span", {
|
|
84
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
85
|
+
children: /* @__PURE__ */ a(c.CheckboxItemIndicator, { children: /* @__PURE__ */ a(r, { className: "size-4 text-foreground" }) })
|
|
86
|
+
}), n]
|
|
87
|
+
}));
|
|
88
|
+
function _({ ...e }) {
|
|
89
|
+
return /* @__PURE__ */ a(c.RadioGroup, {
|
|
90
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
91
|
+
...e
|
|
92
|
+
});
|
|
63
93
|
}
|
|
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
|
-
|
|
100
|
-
}) {
|
|
101
|
-
return /* @__PURE__ */ n(
|
|
102
|
-
r.RadioGroup,
|
|
103
|
-
{
|
|
104
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
105
|
-
...e
|
|
106
|
-
}
|
|
107
|
-
);
|
|
94
|
+
var v = n(({ className: t, children: n, ...i }, s) => /* @__PURE__ */ o(c.RadioItem, {
|
|
95
|
+
ref: s,
|
|
96
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
97
|
+
className: e(l({ inset: !0 }), t),
|
|
98
|
+
...i,
|
|
99
|
+
children: [/* @__PURE__ */ a("span", {
|
|
100
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
101
|
+
children: /* @__PURE__ */ a(c.RadioItemIndicator, { children: /* @__PURE__ */ a(r, { className: "size-4 text-foreground" }) })
|
|
102
|
+
}), n]
|
|
103
|
+
})), y = n(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ a(c.GroupLabel, {
|
|
104
|
+
ref: i,
|
|
105
|
+
"data-slot": "dropdown-menu-label",
|
|
106
|
+
"data-inset": n,
|
|
107
|
+
className: e("-mx-1 -mt-1 mb-1 px-3 pt-2 text-sm leading-4.5 border-b border-border font-medium data-inset:pl-8 text-muted-foreground", t),
|
|
108
|
+
...r
|
|
109
|
+
})), b = n(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
|
|
110
|
+
ref: r,
|
|
111
|
+
"data-slot": "dropdown-menu-header",
|
|
112
|
+
className: e("-mx-1 -mt-1 mb-1 flex flex-row items-center gap-2 border-b border-border p-3 pointer-events-none", t),
|
|
113
|
+
...n
|
|
114
|
+
})), x = n(({ className: t, ...n }, r) => /* @__PURE__ */ a(c.Separator, {
|
|
115
|
+
ref: r,
|
|
116
|
+
"data-slot": "dropdown-menu-separator",
|
|
117
|
+
className: e("bg-border -mx-1 my-1 h-px", t),
|
|
118
|
+
...n
|
|
119
|
+
})), S = n(({ className: t, ...n }, r) => /* @__PURE__ */ a("span", {
|
|
120
|
+
ref: r,
|
|
121
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
122
|
+
className: e("text-muted-foreground ml-auto text-xs tracking-widest", t),
|
|
123
|
+
...n
|
|
124
|
+
}));
|
|
125
|
+
function C({ ...e }) {
|
|
126
|
+
return /* @__PURE__ */ a(c.SubmenuRoot, {
|
|
127
|
+
"data-slot": "dropdown-menu-sub",
|
|
128
|
+
...e
|
|
129
|
+
});
|
|
108
130
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
r.GroupLabel,
|
|
128
|
-
{
|
|
129
|
-
ref: a,
|
|
130
|
-
"data-slot": "dropdown-menu-label",
|
|
131
|
-
"data-inset": t,
|
|
132
|
-
className: d(
|
|
133
|
-
"-mx-1 -mt-1 mb-1 px-2 py-1.5 text-sm border-b border-border font-medium data-inset:pl-8 text-foreground dark:text-foreground",
|
|
134
|
-
e
|
|
135
|
-
),
|
|
136
|
-
...o
|
|
137
|
-
}
|
|
138
|
-
));
|
|
139
|
-
h.displayName = "DropdownMenuLabel";
|
|
140
|
-
const M = i(
|
|
141
|
-
({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
142
|
-
"div",
|
|
143
|
-
{
|
|
144
|
-
ref: o,
|
|
145
|
-
"data-slot": "dropdown-menu-header",
|
|
146
|
-
className: d(
|
|
147
|
-
"-mx-1 -mt-1 mb-1 flex flex-row items-center gap-2 border-b border-border px-2 py-2 pointer-events-none",
|
|
148
|
-
e
|
|
149
|
-
),
|
|
150
|
-
...t
|
|
151
|
-
}
|
|
152
|
-
)
|
|
153
|
-
);
|
|
154
|
-
M.displayName = "DropdownMenuHeader";
|
|
155
|
-
const D = i(({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
156
|
-
r.Separator,
|
|
157
|
-
{
|
|
158
|
-
ref: o,
|
|
159
|
-
"data-slot": "dropdown-menu-separator",
|
|
160
|
-
className: d("bg-border -mx-1 my-1 h-px", e),
|
|
161
|
-
...t
|
|
162
|
-
}
|
|
163
|
-
));
|
|
164
|
-
D.displayName = "DropdownMenuSeparator";
|
|
165
|
-
const N = i(
|
|
166
|
-
({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
167
|
-
"span",
|
|
168
|
-
{
|
|
169
|
-
ref: o,
|
|
170
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
171
|
-
className: d(
|
|
172
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
173
|
-
e
|
|
174
|
-
),
|
|
175
|
-
...t
|
|
176
|
-
}
|
|
177
|
-
)
|
|
178
|
-
);
|
|
179
|
-
N.displayName = "DropdownMenuShortcut";
|
|
180
|
-
function j({
|
|
181
|
-
...e
|
|
182
|
-
}) {
|
|
183
|
-
return /* @__PURE__ */ n(r.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...e });
|
|
131
|
+
var w = n(({ className: t, inset: n, children: r, ...s }, l) => /* @__PURE__ */ o(c.SubmenuTrigger, {
|
|
132
|
+
ref: l,
|
|
133
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
134
|
+
"data-inset": n,
|
|
135
|
+
className: e("focus:bg-accent-background focus:text-foreground data-open:bg-accent-background data-open:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex min-h-9 cursor-default items-center gap-2 rounded-md px-2 text-sm leading-4.5 font-medium outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
136
|
+
...s,
|
|
137
|
+
children: [r, /* @__PURE__ */ a(i, { className: "ml-auto size-4" })]
|
|
138
|
+
}));
|
|
139
|
+
function T({ align: t = "start", alignOffset: n = -3, side: r = "right", sideOffset: i = 0, className: o, ...s }) {
|
|
140
|
+
return /* @__PURE__ */ a(p, {
|
|
141
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
142
|
+
className: e("min-w-32 w-auto", o),
|
|
143
|
+
align: t,
|
|
144
|
+
alignOffset: n,
|
|
145
|
+
side: r,
|
|
146
|
+
sideOffset: i,
|
|
147
|
+
...s
|
|
148
|
+
});
|
|
184
149
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
e
|
|
194
|
-
),
|
|
195
|
-
...a,
|
|
196
|
-
children: [
|
|
197
|
-
o,
|
|
198
|
-
/* @__PURE__ */ n(m, { className: "ml-auto size-4" })
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
));
|
|
202
|
-
k.displayName = "DropdownMenuSubTrigger";
|
|
203
|
-
function H({
|
|
204
|
-
align: e = "start",
|
|
205
|
-
alignOffset: t = -3,
|
|
206
|
-
side: o = "right",
|
|
207
|
-
sideOffset: a = 0,
|
|
208
|
-
className: s,
|
|
209
|
-
...u
|
|
210
|
-
}) {
|
|
211
|
-
return /* @__PURE__ */ n(
|
|
212
|
-
b,
|
|
213
|
-
{
|
|
214
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
215
|
-
className: d("min-w-32 w-auto", s),
|
|
216
|
-
align: e,
|
|
217
|
-
alignOffset: t,
|
|
218
|
-
side: o,
|
|
219
|
-
sideOffset: a,
|
|
220
|
-
...u
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
const y = i(
|
|
225
|
-
({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
226
|
-
"div",
|
|
227
|
-
{
|
|
228
|
-
ref: o,
|
|
229
|
-
"data-slot": "dropdown-menu-section-label",
|
|
230
|
-
className: d(
|
|
231
|
-
"px-2 py-1 text-sm text-muted-foreground dark:text-muted-foreground",
|
|
232
|
-
e
|
|
233
|
-
),
|
|
234
|
-
...t
|
|
235
|
-
}
|
|
236
|
-
)
|
|
237
|
-
);
|
|
238
|
-
y.displayName = "DropdownMenuSectionLabel";
|
|
239
|
-
export {
|
|
240
|
-
G as DropdownMenu,
|
|
241
|
-
x as DropdownMenuCheckboxItem,
|
|
242
|
-
b as DropdownMenuContent,
|
|
243
|
-
P as DropdownMenuGroup,
|
|
244
|
-
M as DropdownMenuHeader,
|
|
245
|
-
v as DropdownMenuItem,
|
|
246
|
-
h as DropdownMenuLabel,
|
|
247
|
-
f as DropdownMenuPortal,
|
|
248
|
-
T as DropdownMenuRadioGroup,
|
|
249
|
-
w as DropdownMenuRadioItem,
|
|
250
|
-
y as DropdownMenuSectionLabel,
|
|
251
|
-
D as DropdownMenuSeparator,
|
|
252
|
-
N as DropdownMenuShortcut,
|
|
253
|
-
j as DropdownMenuSub,
|
|
254
|
-
H as DropdownMenuSubContent,
|
|
255
|
-
k as DropdownMenuSubTrigger,
|
|
256
|
-
L as DropdownMenuTrigger
|
|
257
|
-
};
|
|
150
|
+
var E = n(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
|
|
151
|
+
ref: r,
|
|
152
|
+
"data-slot": "dropdown-menu-section-label",
|
|
153
|
+
className: e("px-3 pt-2 pb-0 text-sm font-medium text-muted-foreground", t),
|
|
154
|
+
...n
|
|
155
|
+
}));
|
|
156
|
+
//#endregion
|
|
157
|
+
export { u as DropdownMenu, g as DropdownMenuCheckboxItem, p as DropdownMenuContent, m as DropdownMenuGroup, b as DropdownMenuHeader, h as DropdownMenuItem, y as DropdownMenuLabel, d as DropdownMenuPortal, _ as DropdownMenuRadioGroup, v as DropdownMenuRadioItem, E as DropdownMenuSectionLabel, x as DropdownMenuSeparator, S as DropdownMenuShortcut, C as DropdownMenuSub, T as DropdownMenuSubContent, w as DropdownMenuSubTrigger, f as DropdownMenuTrigger };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { createContext as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
o as EmptyStateContext,
|
|
7
|
-
n as useEmptyState
|
|
8
|
-
};
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
//#region libs/aura/src/components/ui/core/empty-state/empty-state.context.tsx
|
|
3
|
+
var n = e({ variant: "compact" }), r = () => t(n);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { n as EmptyStateContext, r as useEmptyState };
|
|
@@ -1,139 +1,87 @@
|
|
|
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
|
-
className: s(
|
|
66
|
-
"flex size-6 shrink-0 items-center justify-center text-muted-foreground [&_svg]:size-6 [&_svg]:stroke-[1.75]",
|
|
67
|
-
n
|
|
68
|
-
),
|
|
69
|
-
...a,
|
|
70
|
-
children: l
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
E.displayName = "EmptyStateIcon";
|
|
76
|
-
function A({
|
|
77
|
-
className: n,
|
|
78
|
-
as: e = "h2",
|
|
79
|
-
...a
|
|
80
|
-
}) {
|
|
81
|
-
const { variant: o } = m();
|
|
82
|
-
return /* @__PURE__ */ t(
|
|
83
|
-
e,
|
|
84
|
-
{
|
|
85
|
-
"data-slot": "empty-state-title",
|
|
86
|
-
className: s(
|
|
87
|
-
"max-w-100 break-words font-medium text-foreground",
|
|
88
|
-
o === "full" ? "text-xl leading-6 tracking-tightest" : "text-base leading-5 tracking-tighter",
|
|
89
|
-
n
|
|
90
|
-
),
|
|
91
|
-
...a
|
|
92
|
-
}
|
|
93
|
-
);
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { EmptyStateContext as t, useEmptyState as n } from "./empty-state.context.js";
|
|
3
|
+
import { forwardRef as r, useMemo as i } from "react";
|
|
4
|
+
import { IconAlertOctagon as a, IconLock as o, IconMessageDots as s, IconPlus as c, IconQuestionMark as l, IconSearchOff as u, IconZoomQuestion as d } from "@tabler/icons-react";
|
|
5
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
6
|
+
//#region libs/aura/src/components/ui/core/empty-state/empty-state.tsx
|
|
7
|
+
var p = {
|
|
8
|
+
"error-generic": "[background-image:var(--gradient-fall)]",
|
|
9
|
+
"new-object": "[background-image:var(--gradient-spring)]",
|
|
10
|
+
"no-access": "[background-image:var(--gradient-fall)]",
|
|
11
|
+
"no-results": "[background-image:var(--gradient-spring)]",
|
|
12
|
+
"not-found": "[background-image:var(--gradient-spring)]",
|
|
13
|
+
"new-chat": "[background-image:var(--gradient-summer)]",
|
|
14
|
+
unknown: "[background-image:var(--gradient-spring)]"
|
|
15
|
+
}, m = {
|
|
16
|
+
"error-generic": /* @__PURE__ */ f(a, {}),
|
|
17
|
+
"new-object": /* @__PURE__ */ f(c, {}),
|
|
18
|
+
"no-access": /* @__PURE__ */ f(o, {}),
|
|
19
|
+
"no-results": /* @__PURE__ */ f(u, {}),
|
|
20
|
+
"not-found": /* @__PURE__ */ f(d, {}),
|
|
21
|
+
"new-chat": /* @__PURE__ */ f(s, {}),
|
|
22
|
+
unknown: /* @__PURE__ */ f(l, {})
|
|
23
|
+
}, h = r(({ className: n, variant: r = "compact", type: a, children: o, ...s }, c) => {
|
|
24
|
+
let l = r === "full", u = i(() => ({
|
|
25
|
+
variant: r,
|
|
26
|
+
type: a
|
|
27
|
+
}), [r, a]);
|
|
28
|
+
return /* @__PURE__ */ f(t.Provider, {
|
|
29
|
+
value: u,
|
|
30
|
+
children: /* @__PURE__ */ f("div", {
|
|
31
|
+
ref: c,
|
|
32
|
+
"data-slot": "empty-state",
|
|
33
|
+
"data-variant": r,
|
|
34
|
+
className: e("flex min-w-0 flex-col items-center text-center text-foreground", l ? "gap-8 p-10" : "gap-2", !l && "w-full max-w-100", n),
|
|
35
|
+
...s,
|
|
36
|
+
children: o
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
h.displayName = "EmptyState";
|
|
41
|
+
var g = r(({ className: t, children: r, ...i }, a) => {
|
|
42
|
+
let { variant: o, type: s } = n(), c = o === "full", l = r ?? (s ? m[s] : null);
|
|
43
|
+
return c ? /* @__PURE__ */ f("div", {
|
|
44
|
+
ref: a,
|
|
45
|
+
"data-slot": "empty-state-icon",
|
|
46
|
+
className: e("flex size-20 shrink-0 items-center justify-center rounded-2xl p-5 text-foreground [&_svg]:size-10 [&_svg]:stroke-[1.75]", s && p[s], t),
|
|
47
|
+
...i,
|
|
48
|
+
children: l
|
|
49
|
+
}) : /* @__PURE__ */ f("div", {
|
|
50
|
+
ref: a,
|
|
51
|
+
"data-slot": "empty-state-icon",
|
|
52
|
+
className: e("flex size-6 shrink-0 items-center justify-center text-muted-foreground [&_svg]:size-6 [&_svg]:stroke-[1.75]", t),
|
|
53
|
+
...i,
|
|
54
|
+
children: l
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
g.displayName = "EmptyStateIcon";
|
|
58
|
+
function _({ className: t, as: r = "h2", ...i }) {
|
|
59
|
+
let { variant: a } = n();
|
|
60
|
+
return /* @__PURE__ */ f(r, {
|
|
61
|
+
"data-slot": "empty-state-title",
|
|
62
|
+
className: e("max-w-100 break-words font-medium text-foreground", a === "full" ? "text-xl leading-6 tracking-tightest" : "text-base leading-5 tracking-tighter", t),
|
|
63
|
+
...i
|
|
64
|
+
});
|
|
94
65
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return /* @__PURE__ */ t(
|
|
118
|
-
"div",
|
|
119
|
-
{
|
|
120
|
-
ref: a,
|
|
121
|
-
"data-slot": "empty-state-actions",
|
|
122
|
-
className: s(
|
|
123
|
-
"flex flex-col items-center",
|
|
124
|
-
o === "compact" ? "gap-2" : "gap-4",
|
|
125
|
-
n
|
|
126
|
-
),
|
|
127
|
-
...e
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
N.displayName = "EmptyStateActions";
|
|
133
|
-
export {
|
|
134
|
-
S as EmptyState,
|
|
135
|
-
N as EmptyStateActions,
|
|
136
|
-
I as EmptyStateDescription,
|
|
137
|
-
E as EmptyStateIcon,
|
|
138
|
-
A as EmptyStateTitle
|
|
139
|
-
};
|
|
66
|
+
var v = r(({ className: t, ...r }, i) => {
|
|
67
|
+
let { variant: a } = n();
|
|
68
|
+
return /* @__PURE__ */ f("p", {
|
|
69
|
+
ref: i,
|
|
70
|
+
"data-slot": "empty-state-description",
|
|
71
|
+
className: e("max-w-100 break-words text-muted-foreground", a === "full" ? "text-lg leading-6 tracking-tightest" : "text-sm leading-4.5 tracking-tight", t),
|
|
72
|
+
...r
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
v.displayName = "EmptyStateDescription";
|
|
76
|
+
var y = r(({ className: t, ...r }, i) => {
|
|
77
|
+
let { variant: a } = n();
|
|
78
|
+
return /* @__PURE__ */ f("div", {
|
|
79
|
+
ref: i,
|
|
80
|
+
"data-slot": "empty-state-actions",
|
|
81
|
+
className: e("flex flex-col items-center", a === "compact" ? "gap-2" : "gap-4", t),
|
|
82
|
+
...r
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
y.displayName = "EmptyStateActions";
|
|
86
|
+
//#endregion
|
|
87
|
+
export { h as EmptyState, y as EmptyStateActions, v as EmptyStateDescription, g as EmptyStateIcon, _ as EmptyStateTitle };
|