@cognite/aura 0.3.0 → 0.3.1

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 (47) hide show
  1. package/DESIGN.md +869 -870
  2. package/README.md +112 -11
  3. package/dist/components/index.d.ts +3 -2
  4. package/dist/components/index.js +165 -160
  5. package/dist/components/ui/core/action-toolbar/action-toolbar.js +4 -4
  6. package/dist/components/ui/core/alert/alert.js +3 -3
  7. package/dist/components/ui/core/banner/banner.js +6 -6
  8. package/dist/components/ui/core/button/button.js +4 -4
  9. package/dist/components/ui/core/checkbox/checkbox.js +8 -8
  10. package/dist/components/ui/core/code-block/code-block.js +6 -6
  11. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +15 -0
  12. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
  13. package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
  14. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
  15. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
  16. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
  17. package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
  18. package/dist/components/ui/core/date-time-pickers/index.js +8 -0
  19. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +23 -0
  20. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -0
  21. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +3 -3
  22. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +1 -1
  23. package/dist/components/ui/core/hover-card/hover-card.js +3 -3
  24. package/dist/components/ui/core/input/input.js +1 -1
  25. package/dist/components/ui/core/message/message.js +387 -101
  26. package/dist/components/ui/core/pagination/pagination.js +9 -7
  27. package/dist/components/ui/core/prompt-input/prompt-input.js +16 -16
  28. package/dist/components/ui/core/radio-group/radio-group.js +7 -7
  29. package/dist/components/ui/core/reasoning/reasoning.js +1 -1
  30. package/dist/components/ui/core/segmented-control/segmented-control.js +3 -3
  31. package/dist/components/ui/core/select/select.d.ts +2 -1
  32. package/dist/components/ui/core/select/select.js +134 -110
  33. package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -1
  34. package/dist/components/ui/core/shimmer/shimmer.js +89 -49
  35. package/dist/components/ui/core/tabs/tabs.js +3 -3
  36. package/dist/components/ui/core/textarea/textarea.js +1 -1
  37. package/dist/components/ui/core/toggle/toggle.d.ts +15 -0
  38. package/dist/components/ui/core/toggle/toggle.js +74 -0
  39. package/dist/components/ui/core/tool/tool.js +3 -3
  40. package/dist/index.d.ts +1 -1
  41. package/dist/lib/portal-container-context.js +3 -3
  42. package/dist/lib/utils.d.ts +1 -1
  43. package/dist/lib/utils.js +7 -7
  44. package/dist/styles.css +1 -1
  45. package/dist/styles.source.css +3 -0
  46. package/package.json +200 -18
  47. package/dist/index.js +0 -308
@@ -1,14 +1,14 @@
1
- import { jsxs as w, jsx as o } from "react/jsx-runtime";
2
- import { useState as y, forwardRef as s, useCallback as H, useMemo as k, useContext as C, createContext as A } from "react";
3
- import { IconPlus as E, IconInfoCircle as D, IconSend as z, IconLoader2 as B, IconSquare as L, IconX as G } from "@tabler/icons-react";
1
+ import { jsx as o, jsxs as w } from "react/jsx-runtime";
2
+ import { createContext as H, forwardRef as s, useState as y, useContext as C, useCallback as k, useMemo as A } from "react";
3
+ import { IconSend as E, IconLoader2 as D, IconSquare as z, IconX as B, IconPlus as L, IconInfoCircle as G } from "@tabler/icons-react";
4
4
  import { cn as r } from "../../../../lib/utils.js";
5
5
  import { Command as F, CommandEmpty as j, CommandGroup as K, CommandInput as V, CommandItem as q, CommandList as R, CommandSeparator as O } from "../command/command.js";
6
6
  import { DropdownMenu as W, DropdownMenuContent as X, DropdownMenuItem as J, DropdownMenuTrigger as Q } from "../dropdown-menu/dropdown-menu.js";
7
7
  import { HelperText as f } from "../helper-text/helper-text.js";
8
8
  import { HoverCard as U, HoverCardContent as Y, HoverCardTrigger as Z } from "../hover-card/hover-card.js";
9
- import { InputGroup as _, InputGroupButton as x, InputGroupAddon as h, InputGroupTextarea as $ } from "../input-group/input-group.js";
9
+ import { InputGroupTextarea as _, InputGroupAddon as x, InputGroupButton as h, InputGroup as $ } from "../input-group/input-group.js";
10
10
  import { Select as tt, SelectContent as et, SelectItem as ot, SelectTrigger as nt, SelectValue as rt } from "../select/select.js";
11
- const N = A(
11
+ const N = H(
12
12
  null
13
13
  ), Xt = () => {
14
14
  const t = C(N);
@@ -22,7 +22,7 @@ function Jt({
22
22
  initialInput: t = "",
23
23
  children: e
24
24
  }) {
25
- const [n, a] = y(t), l = H(() => a(""), []), p = k(
25
+ const [n, a] = y(t), l = k(() => a(""), []), p = A(
26
26
  () => ({
27
27
  textInput: {
28
28
  value: n,
@@ -63,7 +63,7 @@ const at = ({
63
63
  d instanceof Error ? d.message : "Failed to submit. Please try again."
64
64
  );
65
65
  }
66
- }, S = n === !1 ? null : n ?? /* @__PURE__ */ o(f, { size: "xs", icon: /* @__PURE__ */ o(D, {}), children: "AI doesn't always get it right. Be sure to check results" });
66
+ }, S = n === !1 ? null : n ?? /* @__PURE__ */ o(f, { size: "xs", icon: /* @__PURE__ */ o(G, {}), children: "AI doesn't always get it right. Be sure to check results" });
67
67
  return /* @__PURE__ */ w("div", { className: "w-full flex flex-col gap-2", children: [
68
68
  /* @__PURE__ */ o(
69
69
  "form",
@@ -72,7 +72,7 @@ const at = ({
72
72
  className: r("w-full", t),
73
73
  onSubmit: P,
74
74
  ...p,
75
- children: /* @__PURE__ */ o(_, { className: "shadow-none rounded-xl has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:border-muted-background has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:bg-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:border-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:bg-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:text-muted-foreground", children: l })
75
+ children: /* @__PURE__ */ o($, { className: "shadow-none rounded-xl has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:border-muted-background has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:bg-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:border-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:bg-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:text-muted-foreground", children: l })
76
76
  }
77
77
  ),
78
78
  a || u ? /* @__PURE__ */ o(f, { size: "xs", isError: !0, children: a || u }) : S
@@ -108,7 +108,7 @@ const pt = s(
108
108
  onChange: t
109
109
  };
110
110
  return /* @__PURE__ */ o(
111
- $,
111
+ _,
112
112
  {
113
113
  ref: l,
114
114
  className: r(
@@ -129,7 +129,7 @@ const pt = s(
129
129
  pt.displayName = "PromptInputTextarea";
130
130
  const mt = s(
131
131
  ({ className: t, ...e }, n) => /* @__PURE__ */ o(
132
- h,
132
+ x,
133
133
  {
134
134
  ref: n,
135
135
  align: "block-end",
@@ -141,7 +141,7 @@ const mt = s(
141
141
  mt.displayName = "PromptInputHeader";
142
142
  const lt = s(
143
143
  ({ className: t, ...e }, n) => /* @__PURE__ */ o(
144
- h,
144
+ x,
145
145
  {
146
146
  ref: n,
147
147
  align: "block-end",
@@ -167,7 +167,7 @@ const T = s(
167
167
  ({ variant: t = "ghost", className: e, size: n, ...a }, l) => {
168
168
  const p = a.children === void 0 || a.children === null ? 0 : Array.isArray(a.children) ? a.children.length : 1, m = n ?? (p > 1 ? "sm" : "icon-sm");
169
169
  return /* @__PURE__ */ o(
170
- x,
170
+ h,
171
171
  {
172
172
  ref: l,
173
173
  className: r(e),
@@ -189,7 +189,7 @@ const dt = ({
189
189
  }) => /* @__PURE__ */ o(
190
190
  Q,
191
191
  {
192
- render: /* @__PURE__ */ o(T, { className: t, ...n, children: e ?? /* @__PURE__ */ o(E, { className: "size-4" }) })
192
+ render: /* @__PURE__ */ o(T, { className: t, ...n, children: e ?? /* @__PURE__ */ o(L, { className: "size-4" }) })
193
193
  }
194
194
  );
195
195
  dt.displayName = "PromptInputActionMenuTrigger";
@@ -212,9 +212,9 @@ const Pt = s(
212
212
  children: l,
213
213
  ...p
214
214
  }, m) => {
215
- let u = /* @__PURE__ */ o(z, { className: "size-4" });
216
- return a === "submitted" ? u = /* @__PURE__ */ o(B, { className: "size-4 animate-spin" }) : a === "streaming" ? u = /* @__PURE__ */ o(L, { className: "size-4" }) : a === "error" && (u = /* @__PURE__ */ o(G, { className: "size-4" })), /* @__PURE__ */ o(
217
- x,
215
+ let u = /* @__PURE__ */ o(E, { className: "size-4" });
216
+ return a === "submitted" ? u = /* @__PURE__ */ o(D, { className: "size-4 animate-spin" }) : a === "streaming" ? u = /* @__PURE__ */ o(z, { className: "size-4" }) : a === "error" && (u = /* @__PURE__ */ o(B, { className: "size-4" })), /* @__PURE__ */ o(
217
+ h,
218
218
  {
219
219
  ref: m,
220
220
  "aria-label": "Submit",
@@ -3,7 +3,7 @@ import { forwardRef as t } from "react";
3
3
  import { Radio as s } from "@base-ui/react/radio";
4
4
  import { RadioGroup as n } from "@base-ui/react/radio-group";
5
5
  import { cva as u } from "class-variance-authority";
6
- import { cn as d, focusState as b, selectionItemDescription as l, selectionItemLabel as c, selectionItemBase as p, selectionItemCard as f, selectionItemDefault as g } from "../../../../lib/utils.js";
6
+ import { cn as d, selectionItemBase as b, selectionItemCard as l, selectionItemDefault as c, focusState as p, selectionItemLabel as f, selectionItemDescription as g } from "../../../../lib/utils.js";
7
7
  const m = t(
8
8
  ({ className: r, orientation: e = "vertical", ...o }, i) => /* @__PURE__ */ a(
9
9
  n,
@@ -21,11 +21,11 @@ const m = t(
21
21
  )
22
22
  );
23
23
  m.displayName = "RadioGroup";
24
- const h = u(d("group/radio-group-item", p), {
24
+ const h = u(d("group/radio-group-item", b), {
25
25
  variants: {
26
26
  variant: {
27
- default: g,
28
- card: f
27
+ default: c,
28
+ card: l
29
29
  }
30
30
  },
31
31
  defaultVariants: {
@@ -56,7 +56,7 @@ const I = t(({ className: r, ...e }, o) => /* @__PURE__ */ a(
56
56
  "data-[checked]:hover:before:border-border-active data-[checked]:hover:before:bg-accent-background",
57
57
  "data-[checked]:group-hover/radio-group-item:before:border-border-active data-[checked]:group-hover/radio-group-item:before:bg-accent-background",
58
58
  "data-[disabled]:before:border-disabled-foreground data-[disabled]:before:bg-disabled-background data-[disabled]:hover:before:border-disabled-foreground data-[disabled]:group-hover/radio-group-item:before:border-disabled-foreground data-[disabled]:group-hover/radio-group-item:before:bg-disabled-background",
59
- b,
59
+ p,
60
60
  r
61
61
  ),
62
62
  ...e,
@@ -78,7 +78,7 @@ const R = t(
78
78
  ref: o,
79
79
  "data-slot": "radio-group-item-label",
80
80
  className: d(
81
- c,
81
+ f,
82
82
  "group-has-[[data-checked]]/radio-group-item:text-foreground",
83
83
  "group-has-[[data-disabled]]/radio-group-item:text-disabled-foreground",
84
84
  r
@@ -95,7 +95,7 @@ const k = t(
95
95
  ref: o,
96
96
  "data-slot": "radio-group-item-description",
97
97
  className: d(
98
- l,
98
+ g,
99
99
  "group-has-[[data-disabled]]/radio-group-item:text-disabled-foreground",
100
100
  r
101
101
  ),
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as d } from "react/jsx-runtime";
2
- import { forwardRef as s, createContext as g, useContext as c } from "react";
2
+ import { createContext as g, forwardRef as s, useContext as c } from "react";
3
3
  import { IconBrain as m } from "@tabler/icons-react";
4
4
  import { cn as i } from "../../../../lib/utils.js";
5
5
  const l = g(!0), p = () => c(l), b = s(
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
- import { useContext as m, createContext as f } from "react";
2
+ import { createContext as m, useContext as f } from "react";
3
3
  import { Tabs as a } from "@base-ui/react/tabs";
4
4
  import { cva as l } from "class-variance-authority";
5
5
  import { cn as i } from "../../../../lib/utils.js";
@@ -29,7 +29,7 @@ const g = l(
29
29
  size: "default"
30
30
  }
31
31
  }
32
- ), d = f(void 0);
32
+ ), d = m(void 0);
33
33
  function S({
34
34
  className: t,
35
35
  size: e,
@@ -136,7 +136,7 @@ function w({
136
136
  tabContent: o,
137
137
  ...r
138
138
  }) {
139
- const s = m(d), c = e ?? s;
139
+ const s = f(d), c = e ?? s;
140
140
  return /* @__PURE__ */ n(
141
141
  a.Tab,
142
142
  {
@@ -35,8 +35,9 @@ declare function SelectContent({ className, children, position: _position, align
35
35
  sideOffset?: SelectPrimitive.Positioner.Props['sideOffset'];
36
36
  }): ReactNode;
37
37
  declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): ReactNode;
38
- declare function SelectItem({ className, children, icon, ...props }: SelectPrimitive.Item.Props & {
38
+ declare function SelectItem({ className, children, icon, suffix, ...props }: SelectPrimitive.Item.Props & {
39
39
  icon?: ReactNode;
40
+ suffix?: ReactNode;
40
41
  }): ReactNode;
41
42
  declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): ReactNode;
42
43
  declare function SelectScrollUpButton({ className, ...props }: SelectPrimitive.ScrollUpArrow.Props): ReactNode;
@@ -1,120 +1,134 @@
1
- import { jsx as t, jsxs as u, Fragment as C } from "react/jsx-runtime";
2
- import { useMemo as N, forwardRef as y, useId as z, createContext as I, useContext as V } from "react";
3
- import { Select as o } from "@base-ui/react/select";
4
- import { IconCheck as k, IconChevronDown as h, IconChevronUp as _, IconExclamationCircle as O } from "@tabler/icons-react";
1
+ import { jsxs as m, Fragment as N, jsx as t } from "react/jsx-runtime";
2
+ import { createContext as C, forwardRef as y, useId as z, useContext as k, useMemo as I } from "react";
3
+ import { Select as a } from "@base-ui/react/select";
4
+ import { IconChevronDown as v, IconExclamationCircle as V, IconCheck as _, IconChevronUp as O } from "@tabler/icons-react";
5
5
  import { usePortalContainer as P } from "../../../../lib/portal-container-context.js";
6
6
  import { useControllableState as j } from "../../../../lib/use-controllable-state.js";
7
- import { cn as r, disabledState as T, invalidState as D, focusState as B, filledState as E, hoverState as G, formElementBase as L } from "../../../../lib/utils.js";
8
- const g = I(null), R = () => {
9
- const e = V(g);
7
+ import { cn as i, disabledState as T, invalidState as D, focusState as B, filledState as E, hoverState as G, formElementBase as L } from "../../../../lib/utils.js";
8
+ const g = C(null), R = () => {
9
+ const e = k(g);
10
10
  if (!e)
11
11
  throw new Error("Select components must be used within Select");
12
12
  return e;
13
13
  };
14
14
  function Y(e) {
15
- const [a, l] = j({
15
+ const [o, r] = j({
16
16
  prop: e.open,
17
17
  defaultProp: e.defaultOpen ?? !1,
18
18
  onChange: e.onOpenChange
19
- }), n = N(() => ({ isOpen: a ?? !1 }), [a]);
19
+ }), n = I(() => ({ isOpen: o ?? !1 }), [o]);
20
20
  if (e.multiple) {
21
21
  const {
22
- multiple: p,
23
- value: v,
22
+ multiple: f,
23
+ value: h,
24
24
  defaultValue: b,
25
- onValueChange: S,
26
- ...w
25
+ onValueChange: w,
26
+ ...S
27
27
  } = e;
28
28
  return /* @__PURE__ */ t(g.Provider, { value: n, children: /* @__PURE__ */ t(
29
- o.Root,
29
+ a.Root,
30
30
  {
31
31
  "data-slot": "select",
32
- open: a,
33
- onOpenChange: (f) => l(f),
34
- value: v,
32
+ open: o,
33
+ onOpenChange: (p) => r(p),
34
+ value: h,
35
35
  defaultValue: b,
36
- onValueChange: (f, W) => {
37
- S?.(f ?? []);
36
+ onValueChange: (p, W) => {
37
+ w?.(p ?? []);
38
38
  },
39
39
  multiple: !0,
40
- ...w
40
+ ...S
41
41
  }
42
42
  ) });
43
43
  }
44
- const { value: s, defaultValue: i, onValueChange: m, ...c } = e, d = s === void 0 ? void 0 : s === "" ? null : s, x = i === void 0 ? void 0 : i === "" ? null : i;
44
+ const { value: l, defaultValue: s, onValueChange: c, ...d } = e, u = l === void 0 ? void 0 : l === "" ? null : l, x = s === void 0 ? void 0 : s === "" ? null : s;
45
45
  return /* @__PURE__ */ t(g.Provider, { value: n, children: /* @__PURE__ */ t(
46
- o.Root,
46
+ a.Root,
47
47
  {
48
48
  "data-slot": "select",
49
- open: a,
50
- onOpenChange: (p) => l(p),
51
- value: d,
49
+ open: o,
50
+ onOpenChange: (f) => r(f),
51
+ value: u,
52
52
  defaultValue: x,
53
- onValueChange: (p, v) => {
54
- m?.(typeof p == "string" ? p : "");
53
+ onValueChange: (f, h) => {
54
+ c?.(typeof f == "string" ? f : "");
55
55
  },
56
- ...c
56
+ ...d
57
57
  }
58
58
  ) });
59
59
  }
60
60
  function Z({
61
61
  className: e,
62
- ...a
62
+ ...o
63
63
  }) {
64
64
  return /* @__PURE__ */ t(
65
- o.Group,
65
+ a.Group,
66
66
  {
67
67
  "data-slot": "select-group",
68
- className: r("scroll-my-1 p-1", e),
69
- ...a
68
+ className: i("scroll-my-1 p-1", e),
69
+ ...o
70
70
  }
71
71
  );
72
72
  }
73
73
  function M({
74
74
  icon: e,
75
- ...a
75
+ ...o
76
76
  }) {
77
- return e ? /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
77
+ return e ? /* @__PURE__ */ m("span", { className: "flex flex-1 items-center gap-2 min-w-0 overflow-hidden", children: [
78
78
  e,
79
- /* @__PURE__ */ t(o.Value, { "data-slot": "select-value", ...a })
80
- ] }) : /* @__PURE__ */ t(o.Value, { "data-slot": "select-value", ...a });
79
+ /* @__PURE__ */ t(
80
+ a.Value,
81
+ {
82
+ "data-slot": "select-value",
83
+ className: "flex-1 truncate min-w-0",
84
+ ...o
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
+ );
81
95
  }
82
- const U = y(({ className: e, size: a = "default", children: l, errorMessage: n, ...s }, i) => {
83
- const { isOpen: m } = R(), c = !!n, d = z();
84
- return /* @__PURE__ */ u(C, { children: [
85
- /* @__PURE__ */ u(
86
- o.Trigger,
96
+ const U = y(({ className: e, size: o = "default", children: r, errorMessage: n, ...l }, s) => {
97
+ const { isOpen: c } = R(), d = !!n, u = z();
98
+ return /* @__PURE__ */ m(N, { children: [
99
+ /* @__PURE__ */ m(
100
+ a.Trigger,
87
101
  {
88
- ref: i,
102
+ ref: s,
89
103
  "data-slot": "select-trigger",
90
- "data-size": a,
91
- "aria-invalid": c ? !0 : void 0,
92
- "aria-describedby": c ? d : void 0,
93
- className: r(
94
- "w-fit min-w-50 min-h-9 flex items-center justify-between gap-2 whitespace-nowrap transition-[color,box-shadow] cursor-pointer",
104
+ "data-size": o,
105
+ "aria-invalid": d ? !0 : void 0,
106
+ "aria-describedby": d ? u : void 0,
107
+ className: i(
108
+ "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",
95
109
  L,
96
110
  G,
97
111
  E,
98
112
  B,
113
+ c && "shadow-focus-ring bg-background border-transparent focus:border-transparent hover:border-transparent text-foreground",
99
114
  D,
100
115
  T,
101
116
  "dark:bg-muted-background/30 dark:text-muted-foreground dark:hover:bg-accent-background",
102
117
  "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
103
- "*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
104
118
  e
105
119
  ),
106
- ...s,
120
+ ...l,
107
121
  children: [
108
- l,
122
+ r,
109
123
  /* @__PURE__ */ t(
110
- o.Icon,
124
+ a.Icon,
111
125
  {
112
126
  render: /* @__PURE__ */ t(
113
- h,
127
+ v,
114
128
  {
115
- className: r(
129
+ className: i(
116
130
  "size-4 opacity-50 transition-transform",
117
- m ? "rotate-180" : "rotate-0"
131
+ c ? "rotate-180" : "rotate-0"
118
132
  )
119
133
  }
120
134
  )
@@ -123,13 +137,13 @@ const U = y(({ className: e, size: a = "default", children: l, errorMessage: n,
123
137
  ]
124
138
  }
125
139
  ),
126
- n && /* @__PURE__ */ u(
140
+ n && /* @__PURE__ */ m(
127
141
  "div",
128
142
  {
129
- id: d,
143
+ id: u,
130
144
  className: "flex flex-row gap-1 justify-start items-center p-1",
131
145
  children: [
132
- /* @__PURE__ */ t(O, { className: "text-destructive-foreground text-sm size-4" }),
146
+ /* @__PURE__ */ t(V, { className: "text-destructive-foreground text-sm size-4" }),
133
147
  /* @__PURE__ */ t("span", { className: "text-destructive-foreground text-sm", children: n })
134
148
  ]
135
149
  }
@@ -139,38 +153,38 @@ const U = y(({ className: e, size: a = "default", children: l, errorMessage: n,
139
153
  U.displayName = "SelectTrigger";
140
154
  function ee({
141
155
  className: e,
142
- children: a,
143
- position: l = "popper",
156
+ children: o,
157
+ position: r = "popper",
144
158
  align: n = "start",
145
- alignOffset: s = 0,
146
- side: i = "bottom",
147
- sideOffset: m = 4,
148
- ...c
159
+ alignOffset: l = 0,
160
+ side: s = "bottom",
161
+ sideOffset: c = 4,
162
+ ...d
149
163
  }) {
150
- const d = P();
151
- return /* @__PURE__ */ t(o.Portal, { container: d, children: /* @__PURE__ */ t(
152
- o.Positioner,
164
+ const u = P();
165
+ return /* @__PURE__ */ t(a.Portal, { container: u, children: /* @__PURE__ */ t(
166
+ a.Positioner,
153
167
  {
154
168
  alignItemWithTrigger: !1,
155
169
  align: n,
156
- alignOffset: s,
157
- side: i,
158
- sideOffset: m,
170
+ alignOffset: l,
171
+ side: s,
172
+ sideOffset: c,
159
173
  collisionPadding: 10,
160
174
  className: "isolate z-50",
161
- children: /* @__PURE__ */ u(
162
- o.Popup,
175
+ children: /* @__PURE__ */ m(
176
+ a.Popup,
163
177
  {
164
178
  "data-slot": "select-content",
165
- className: r(
166
- "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) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-none",
167
- l === "popper" && "data-[side=bottom]:translate-y-1",
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",
168
182
  e
169
183
  ),
170
- ...c,
184
+ ...d,
171
185
  children: [
172
186
  /* @__PURE__ */ t(A, {}),
173
- /* @__PURE__ */ t(o.List, { children: a }),
187
+ /* @__PURE__ */ t(a.List, { children: o }),
174
188
  /* @__PURE__ */ t(F, {})
175
189
  ]
176
190
  }
@@ -180,89 +194,99 @@ function ee({
180
194
  }
181
195
  function te({
182
196
  className: e,
183
- ...a
197
+ ...o
184
198
  }) {
185
199
  return /* @__PURE__ */ t(
186
- o.GroupLabel,
200
+ a.GroupLabel,
187
201
  {
188
202
  "data-slot": "select-label",
189
- className: r("text-muted-foreground px-2 py-1.5 text-xs", e),
190
- ...a
203
+ className: i("text-muted-foreground px-2 py-1.5 text-xs", e),
204
+ ...o
191
205
  }
192
206
  );
193
207
  }
194
- function ae({
208
+ function oe({
195
209
  className: e,
196
- children: a,
197
- icon: l,
198
- ...n
210
+ children: o,
211
+ icon: r,
212
+ suffix: n,
213
+ ...l
199
214
  }) {
200
- return /* @__PURE__ */ u(
201
- o.Item,
215
+ const s = typeof o == "string" ? o : void 0;
216
+ return /* @__PURE__ */ m(
217
+ a.Item,
202
218
  {
203
219
  "data-slot": "select-item",
204
- className: r(
205
- "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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
220
+ className: i(
221
+ "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",
206
222
  e
207
223
  ),
208
- ...n,
224
+ ...l,
209
225
  children: [
210
226
  /* @__PURE__ */ t(
211
- o.ItemIndicator,
227
+ a.ItemIndicator,
212
228
  {
213
- render: /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(k, { className: "size-4 text-foreground" }) })
229
+ render: /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(_, { className: "size-4 text-foreground" }) })
214
230
  }
215
231
  ),
216
- l && /* @__PURE__ */ t("span", { className: "flex items-center gap-2 mr-1", children: l }),
217
- /* @__PURE__ */ t(o.ItemText, { children: a })
232
+ r && /* @__PURE__ */ t("span", { className: "flex items-center gap-2 mr-1", children: r }),
233
+ /* @__PURE__ */ t(
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 })
218
242
  ]
219
243
  }
220
244
  );
221
245
  }
222
- function oe({
246
+ function ae({
223
247
  className: e,
224
- ...a
248
+ ...o
225
249
  }) {
226
250
  return /* @__PURE__ */ t(
227
- o.Separator,
251
+ a.Separator,
228
252
  {
229
253
  "data-slot": "select-separator",
230
- className: r("bg-border pointer-events-none -mx-1 my-1 h-px", e),
231
- ...a
254
+ className: i("bg-border pointer-events-none -mx-1 my-1 h-px", e),
255
+ ...o
232
256
  }
233
257
  );
234
258
  }
235
259
  function A({
236
260
  className: e,
237
- ...a
261
+ ...o
238
262
  }) {
239
263
  return /* @__PURE__ */ t(
240
- o.ScrollUpArrow,
264
+ a.ScrollUpArrow,
241
265
  {
242
266
  "data-slot": "select-scroll-up-button",
243
- className: r(
267
+ className: i(
244
268
  "bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full",
245
269
  e
246
270
  ),
247
- ...a,
248
- children: /* @__PURE__ */ t(_, { className: "size-4" })
271
+ ...o,
272
+ children: /* @__PURE__ */ t(O, { className: "size-4" })
249
273
  }
250
274
  );
251
275
  }
252
276
  function F({
253
277
  className: e,
254
- ...a
278
+ ...o
255
279
  }) {
256
280
  return /* @__PURE__ */ t(
257
- o.ScrollDownArrow,
281
+ a.ScrollDownArrow,
258
282
  {
259
283
  "data-slot": "select-scroll-down-button",
260
- className: r(
284
+ className: i(
261
285
  "bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full",
262
286
  e
263
287
  ),
264
- ...a,
265
- children: /* @__PURE__ */ t(h, { className: "size-4" })
288
+ ...o,
289
+ children: /* @__PURE__ */ t(v, { className: "size-4" })
266
290
  }
267
291
  );
268
292
  }
@@ -270,11 +294,11 @@ export {
270
294
  Y as Select,
271
295
  ee as SelectContent,
272
296
  Z as SelectGroup,
273
- ae as SelectItem,
297
+ oe as SelectItem,
274
298
  te as SelectLabel,
275
299
  F as SelectScrollDownButton,
276
300
  A as SelectScrollUpButton,
277
- oe as SelectSeparator,
301
+ ae as SelectSeparator,
278
302
  U as SelectTrigger,
279
303
  M as SelectValue
280
304
  };
@@ -1,12 +1,14 @@
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;
4
6
  as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3';
5
7
  className?: string;
6
8
  duration?: number;
7
9
  spread?: number;
8
10
  variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall';
9
11
  };
10
- declare function ShimmerComponent({ children, as: Component, className, duration, spread, variant, }: TextShimmerProps): ReactNode;
12
+ declare function ShimmerComponent({ children, iconUrl, as: Tag, className, duration, spread, variant, }: TextShimmerProps): ReactNode;
11
13
  declare const MemoizedShimmer: MemoExoticComponent<typeof ShimmerComponent>;
12
14
  export { MemoizedShimmer as Shimmer };