@cognite/aura 0.3.2 → 0.3.4
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 +5 -1
- package/dist/components/index.js +59 -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/calendar/calendar-header.js +63 -0
- package/dist/components/ui/core/calendar/calendar-utils.js +39 -0
- package/dist/components/ui/core/calendar/calendar.js +68 -0
- package/dist/components/ui/core/calendar/constants.d.ts +1 -0
- 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/data-grid/data-grid-cell.d.ts +10 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +13 -0
- package/dist/components/ui/core/data-grid/data-grid-row.d.ts +18 -0
- package/dist/components/ui/core/data-grid/data-grid.d.ts +43 -0
- package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +12 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +9 -0
- 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/types.d.ts +2 -1
- 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/types.d.ts +2 -1
- 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-picker/index.d.ts +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +36 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +3 -0
- 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/types.d.ts +7 -6
- 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.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/index.js +6 -10
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +3 -2
- 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/constants.d.ts +3 -8
- 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.d.ts +3 -3
- 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.d.ts +3 -2
- 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.d.ts +3 -2
- 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/types.d.ts +5 -4
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +41 -63
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +40 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +3 -3
- 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/overflow-list/overflow-list.utils.d.ts +52 -0
- 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/slider/slider.d.ts +9 -0
- package/dist/components/ui/core/slider/slider.js +40 -0
- 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/index.d.ts +1 -1
- 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 +26 -0
- package/package.json +42 -8
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +0 -119
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +0 -93
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +0 -52
- /package/dist/components/ui/core/{date-time-pickers/shared/calendar-header → calendar}/calendar-header.d.ts +0 -0
- /package/dist/components/ui/core/{date-time-pickers/utils → calendar}/calendar-utils.d.ts +0 -0
- /package/dist/components/ui/core/{date-time-pickers/shared/calendar → calendar}/calendar.d.ts +0 -0
|
@@ -1,304 +1,179 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { cn as e, disabledState as t, filledState as n, focusState as r, formElementBase as i, hoverState as a, invalidState as o } from "../../../../lib/utils.js";
|
|
2
|
+
import { usePortalContainer as s } from "../../../../lib/portal-container-context.js";
|
|
3
|
+
import { useControllableState as c } from "../../../../lib/use-controllable-state.js";
|
|
4
|
+
import { createContext as l, forwardRef as u, useContext as d, useId as f, useMemo as p } from "react";
|
|
5
|
+
import { IconCheck as m, IconChevronDown as h, IconChevronUp as g, IconExclamationCircle as _ } from "@tabler/icons-react";
|
|
6
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
7
|
+
import { Select as x } from "@base-ui/react/select";
|
|
8
|
+
//#region libs/aura/src/components/ui/core/select/select.tsx
|
|
9
|
+
var S = l(null), C = () => {
|
|
10
|
+
let e = d(S);
|
|
11
|
+
if (!e) throw Error("Select components must be used within Select");
|
|
12
|
+
return e;
|
|
13
13
|
};
|
|
14
|
-
function
|
|
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
|
-
onValueChange: (f, h) => {
|
|
54
|
-
c?.(typeof f == "string" ? f : "");
|
|
55
|
-
},
|
|
56
|
-
...d
|
|
57
|
-
}
|
|
58
|
-
) });
|
|
14
|
+
function w(e) {
|
|
15
|
+
let [t, n] = c({
|
|
16
|
+
prop: e.open,
|
|
17
|
+
defaultProp: e.defaultOpen ?? !1,
|
|
18
|
+
onChange: e.onOpenChange
|
|
19
|
+
}), r = p(() => ({ isOpen: t ?? !1 }), [t]);
|
|
20
|
+
if (e.multiple) {
|
|
21
|
+
let { multiple: i, value: a, defaultValue: o, onValueChange: s, ...c } = e;
|
|
22
|
+
return /* @__PURE__ */ y(S.Provider, {
|
|
23
|
+
value: r,
|
|
24
|
+
children: /* @__PURE__ */ y(x.Root, {
|
|
25
|
+
"data-slot": "select",
|
|
26
|
+
open: t,
|
|
27
|
+
onOpenChange: (e) => n(e),
|
|
28
|
+
value: a,
|
|
29
|
+
defaultValue: o,
|
|
30
|
+
onValueChange: (e, t) => {
|
|
31
|
+
s?.(e ?? []);
|
|
32
|
+
},
|
|
33
|
+
multiple: !0,
|
|
34
|
+
...c
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
let { value: i, defaultValue: a, onValueChange: o, ...s } = e, l = i === void 0 ? void 0 : i === "" ? null : i, u = a === void 0 ? void 0 : a === "" ? null : a;
|
|
39
|
+
return /* @__PURE__ */ y(S.Provider, {
|
|
40
|
+
value: r,
|
|
41
|
+
children: /* @__PURE__ */ y(x.Root, {
|
|
42
|
+
"data-slot": "select",
|
|
43
|
+
open: t,
|
|
44
|
+
onOpenChange: (e) => n(e),
|
|
45
|
+
value: l,
|
|
46
|
+
defaultValue: u,
|
|
47
|
+
onValueChange: (e, t) => {
|
|
48
|
+
o?.(typeof e == "string" ? e : "");
|
|
49
|
+
},
|
|
50
|
+
...s
|
|
51
|
+
})
|
|
52
|
+
});
|
|
59
53
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
"data-slot": "select-group",
|
|
68
|
-
className: i("scroll-my-1 p-1", e),
|
|
69
|
-
...o
|
|
70
|
-
}
|
|
71
|
-
);
|
|
54
|
+
function T({ className: t, ...n }) {
|
|
55
|
+
return /* @__PURE__ */ y(x.Group, {
|
|
56
|
+
"data-slot": "select-group",
|
|
57
|
+
className: e("scroll-my-1 p-1", t),
|
|
58
|
+
...n
|
|
59
|
+
});
|
|
72
60
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
)
|
|
87
|
-
] }) : /* @__PURE__ */ t(
|
|
88
|
-
a.Value,
|
|
89
|
-
{
|
|
90
|
-
"data-slot": "select-value",
|
|
91
|
-
className: "flex-1 truncate min-w-0",
|
|
92
|
-
...o
|
|
93
|
-
}
|
|
94
|
-
);
|
|
61
|
+
function E({ icon: e, ...t }) {
|
|
62
|
+
return e ? /* @__PURE__ */ b("span", {
|
|
63
|
+
className: "flex flex-1 items-center gap-2 min-w-0 overflow-hidden",
|
|
64
|
+
children: [e, /* @__PURE__ */ y(x.Value, {
|
|
65
|
+
"data-slot": "select-value",
|
|
66
|
+
className: "flex-1 truncate min-w-0",
|
|
67
|
+
...t
|
|
68
|
+
})]
|
|
69
|
+
}) : /* @__PURE__ */ y(x.Value, {
|
|
70
|
+
"data-slot": "select-value",
|
|
71
|
+
className: "flex-1 truncate min-w-0",
|
|
72
|
+
...t
|
|
73
|
+
});
|
|
95
74
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
T,
|
|
116
|
-
"dark:bg-muted-background/30 dark:text-muted-foreground dark:hover:bg-accent-background",
|
|
117
|
-
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
118
|
-
e
|
|
119
|
-
),
|
|
120
|
-
...l,
|
|
121
|
-
children: [
|
|
122
|
-
r,
|
|
123
|
-
/* @__PURE__ */ t(
|
|
124
|
-
a.Icon,
|
|
125
|
-
{
|
|
126
|
-
render: /* @__PURE__ */ t(
|
|
127
|
-
v,
|
|
128
|
-
{
|
|
129
|
-
className: i(
|
|
130
|
-
"size-4 opacity-50 transition-transform",
|
|
131
|
-
c ? "rotate-180" : "rotate-0"
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
),
|
|
140
|
-
n && /* @__PURE__ */ m(
|
|
141
|
-
"div",
|
|
142
|
-
{
|
|
143
|
-
id: u,
|
|
144
|
-
className: "flex flex-row gap-1 justify-start items-center p-1",
|
|
145
|
-
children: [
|
|
146
|
-
/* @__PURE__ */ t(V, { className: "text-destructive-foreground text-sm size-4" }),
|
|
147
|
-
/* @__PURE__ */ t("span", { className: "text-destructive-foreground text-sm", children: n })
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
] });
|
|
75
|
+
var D = u(({ className: s, size: c = "default", children: l, errorMessage: u, ...d }, p) => {
|
|
76
|
+
let { isOpen: m } = C(), g = !!u, S = f();
|
|
77
|
+
return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b(x.Trigger, {
|
|
78
|
+
ref: p,
|
|
79
|
+
"data-slot": "select-trigger",
|
|
80
|
+
"data-size": c,
|
|
81
|
+
"aria-invalid": g ? !0 : void 0,
|
|
82
|
+
"aria-describedby": g ? S : void 0,
|
|
83
|
+
className: e("w-full min-w-50 h-9 max-w-[min(100%,420px)] flex items-center justify-between gap-2 text-left overflow-hidden transition-[color,box-shadow] cursor-pointer", i, a, n, r, m && "shadow-focus-ring bg-background border-transparent focus:border-transparent hover:border-transparent text-foreground", o, t, "dark:bg-muted-background/30 dark:text-muted-foreground dark:hover:bg-accent-background", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", s),
|
|
84
|
+
...d,
|
|
85
|
+
children: [l, /* @__PURE__ */ y(x.Icon, { render: /* @__PURE__ */ y(h, { className: e("size-4 opacity-50 transition-transform", m ? "rotate-180" : "rotate-0") }) })]
|
|
86
|
+
}), u && /* @__PURE__ */ b("div", {
|
|
87
|
+
id: S,
|
|
88
|
+
className: "flex flex-row gap-1 justify-start items-center p-1",
|
|
89
|
+
children: [/* @__PURE__ */ y(_, { className: "text-destructive-foreground text-sm size-4" }), /* @__PURE__ */ y("span", {
|
|
90
|
+
className: "text-destructive-foreground text-sm",
|
|
91
|
+
children: u
|
|
92
|
+
})]
|
|
93
|
+
})] });
|
|
152
94
|
});
|
|
153
|
-
|
|
154
|
-
function
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
"data-slot": "select-content",
|
|
179
|
-
className: i(
|
|
180
|
-
"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 relative z-50 max-h-(--available-height) max-w-[min(100%,420px)] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-none",
|
|
181
|
-
r === "popper" && "data-[side=bottom]:translate-y-1",
|
|
182
|
-
e
|
|
183
|
-
),
|
|
184
|
-
...d,
|
|
185
|
-
children: [
|
|
186
|
-
/* @__PURE__ */ t(A, {}),
|
|
187
|
-
/* @__PURE__ */ t(a.List, { children: o }),
|
|
188
|
-
/* @__PURE__ */ t(F, {})
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
)
|
|
192
|
-
}
|
|
193
|
-
) });
|
|
95
|
+
D.displayName = "SelectTrigger";
|
|
96
|
+
function O({ className: t, children: n, position: r = "popper", align: i = "start", alignOffset: a = 0, side: o = "bottom", sideOffset: c = 4, ...l }) {
|
|
97
|
+
let u = s();
|
|
98
|
+
return /* @__PURE__ */ y(x.Portal, {
|
|
99
|
+
container: u,
|
|
100
|
+
children: /* @__PURE__ */ y(x.Positioner, {
|
|
101
|
+
alignItemWithTrigger: !1,
|
|
102
|
+
align: i,
|
|
103
|
+
alignOffset: a,
|
|
104
|
+
side: o,
|
|
105
|
+
sideOffset: c,
|
|
106
|
+
collisionPadding: 10,
|
|
107
|
+
className: "isolate z-50",
|
|
108
|
+
children: /* @__PURE__ */ b(x.Popup, {
|
|
109
|
+
"data-slot": "select-content",
|
|
110
|
+
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 relative z-50 max-h-(--available-height) max-w-[min(100%,420px)] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-none", r === "popper" && "data-[side=bottom]:translate-y-1", t),
|
|
111
|
+
...l,
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ y(M, {}),
|
|
114
|
+
/* @__PURE__ */ y(x.List, { children: n }),
|
|
115
|
+
/* @__PURE__ */ y(N, {})
|
|
116
|
+
]
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
});
|
|
194
120
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
{
|
|
202
|
-
"data-slot": "select-label",
|
|
203
|
-
className: i("text-muted-foreground px-2 py-1.5 text-xs", e),
|
|
204
|
-
...o
|
|
205
|
-
}
|
|
206
|
-
);
|
|
121
|
+
function k({ className: t, ...n }) {
|
|
122
|
+
return /* @__PURE__ */ y(x.GroupLabel, {
|
|
123
|
+
"data-slot": "select-label",
|
|
124
|
+
className: e("text-muted-foreground px-2 py-1.5 text-xs", t),
|
|
125
|
+
...n
|
|
126
|
+
});
|
|
207
127
|
}
|
|
208
|
-
function
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
a.ItemText,
|
|
235
|
-
{
|
|
236
|
-
className: "flex-1 truncate min-w-0",
|
|
237
|
-
title: s,
|
|
238
|
-
children: o
|
|
239
|
-
}
|
|
240
|
-
),
|
|
241
|
-
n && /* @__PURE__ */ t("span", { className: "shrink-0 ml-auto", children: n })
|
|
242
|
-
]
|
|
243
|
-
}
|
|
244
|
-
);
|
|
128
|
+
function A({ className: t, children: n, icon: r, suffix: i, ...a }) {
|
|
129
|
+
let o = typeof n == "string" ? n : void 0;
|
|
130
|
+
return /* @__PURE__ */ b(x.Item, {
|
|
131
|
+
"data-slot": "select-item",
|
|
132
|
+
className: e("relative flex w-full min-h-9 cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-base leading-5 tracking-tightest outline-hidden select-none focus:bg-accent-background focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", t),
|
|
133
|
+
...a,
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ y(x.ItemIndicator, { render: /* @__PURE__ */ y("span", {
|
|
136
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
137
|
+
children: /* @__PURE__ */ y(m, { className: "size-4 text-foreground" })
|
|
138
|
+
}) }),
|
|
139
|
+
r && /* @__PURE__ */ y("span", {
|
|
140
|
+
className: "flex items-center gap-2 mr-1",
|
|
141
|
+
children: r
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ y(x.ItemText, {
|
|
144
|
+
className: "flex-1 truncate min-w-0",
|
|
145
|
+
title: o,
|
|
146
|
+
children: n
|
|
147
|
+
}),
|
|
148
|
+
i && /* @__PURE__ */ y("span", {
|
|
149
|
+
className: "shrink-0 ml-auto",
|
|
150
|
+
children: i
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
});
|
|
245
154
|
}
|
|
246
|
-
function
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
{
|
|
253
|
-
"data-slot": "select-separator",
|
|
254
|
-
className: i("bg-border pointer-events-none -mx-1 my-1 h-px", e),
|
|
255
|
-
...o
|
|
256
|
-
}
|
|
257
|
-
);
|
|
155
|
+
function j({ className: t, ...n }) {
|
|
156
|
+
return /* @__PURE__ */ y(x.Separator, {
|
|
157
|
+
"data-slot": "select-separator",
|
|
158
|
+
className: e("bg-border pointer-events-none -mx-1 my-1 h-px", t),
|
|
159
|
+
...n
|
|
160
|
+
});
|
|
258
161
|
}
|
|
259
|
-
function
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
"data-slot": "select-scroll-up-button",
|
|
267
|
-
className: i(
|
|
268
|
-
"bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full",
|
|
269
|
-
e
|
|
270
|
-
),
|
|
271
|
-
...o,
|
|
272
|
-
children: /* @__PURE__ */ t(O, { className: "size-4" })
|
|
273
|
-
}
|
|
274
|
-
);
|
|
162
|
+
function M({ className: t, ...n }) {
|
|
163
|
+
return /* @__PURE__ */ y(x.ScrollUpArrow, {
|
|
164
|
+
"data-slot": "select-scroll-up-button",
|
|
165
|
+
className: e("bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full", t),
|
|
166
|
+
...n,
|
|
167
|
+
children: /* @__PURE__ */ y(g, { className: "size-4" })
|
|
168
|
+
});
|
|
275
169
|
}
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
"data-slot": "select-scroll-down-button",
|
|
284
|
-
className: i(
|
|
285
|
-
"bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full",
|
|
286
|
-
e
|
|
287
|
-
),
|
|
288
|
-
...o,
|
|
289
|
-
children: /* @__PURE__ */ t(v, { className: "size-4" })
|
|
290
|
-
}
|
|
291
|
-
);
|
|
170
|
+
function N({ className: t, ...n }) {
|
|
171
|
+
return /* @__PURE__ */ y(x.ScrollDownArrow, {
|
|
172
|
+
"data-slot": "select-scroll-down-button",
|
|
173
|
+
className: e("bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full", t),
|
|
174
|
+
...n,
|
|
175
|
+
children: /* @__PURE__ */ y(h, { className: "size-4" })
|
|
176
|
+
});
|
|
292
177
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
ee as SelectContent,
|
|
296
|
-
Z as SelectGroup,
|
|
297
|
-
oe as SelectItem,
|
|
298
|
-
te as SelectLabel,
|
|
299
|
-
F as SelectScrollDownButton,
|
|
300
|
-
A as SelectScrollUpButton,
|
|
301
|
-
ae as SelectSeparator,
|
|
302
|
-
U as SelectTrigger,
|
|
303
|
-
M as SelectValue
|
|
304
|
-
};
|
|
178
|
+
//#endregion
|
|
179
|
+
export { w as Select, O as SelectContent, T as SelectGroup, A as SelectItem, k as SelectLabel, N as SelectScrollDownButton, M as SelectScrollUpButton, j as SelectSeparator, D as SelectTrigger, E as SelectValue };
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"data-slot": "separator",
|
|
13
|
-
orientation: r,
|
|
14
|
-
className: n(
|
|
15
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
16
|
-
a
|
|
17
|
-
),
|
|
18
|
-
...t
|
|
19
|
-
}
|
|
20
|
-
);
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Separator as n } from "@base-ui/react/separator";
|
|
4
|
+
//#region libs/aura/src/components/ui/core/separator/separator.tsx
|
|
5
|
+
function r({ className: r, orientation: i = "horizontal", ...a }) {
|
|
6
|
+
return /* @__PURE__ */ t(n, {
|
|
7
|
+
"data-slot": "separator",
|
|
8
|
+
orientation: i,
|
|
9
|
+
className: e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", r),
|
|
10
|
+
...a
|
|
11
|
+
});
|
|
21
12
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as Separator };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { MemoExoticComponent, ReactNode } from 'react';
|
|
2
2
|
type TextShimmerProps = {
|
|
3
3
|
children: string;
|
|
4
|
-
/** SVG URL or data URI used as a CSS mask. Not a React component which would require runtime SVG serialization. */
|
|
5
|
-
iconUrl?: string;
|
|
6
4
|
as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3';
|
|
7
5
|
className?: string;
|
|
8
6
|
duration?: number;
|
|
9
7
|
spread?: number;
|
|
10
|
-
variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall';
|
|
8
|
+
variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall' | 'active';
|
|
11
9
|
};
|
|
12
|
-
declare function ShimmerComponent({ children,
|
|
10
|
+
declare function ShimmerComponent({ children, as: Tag, className, duration, spread, variant, }: TextShimmerProps): ReactNode;
|
|
13
11
|
declare const MemoizedShimmer: MemoExoticComponent<typeof ShimmerComponent>;
|
|
14
12
|
export { MemoizedShimmer as Shimmer };
|