@cognite/aura 0.1.5 → 0.1.7

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 (74) hide show
  1. package/DESIGN.md +1269 -0
  2. package/README.md +24 -0
  3. package/dist/colors.css +824 -0
  4. package/dist/components/index.d.ts +11 -2
  5. package/dist/components/index.js +284 -249
  6. package/dist/components/ui/core/accordion/accordion.d.ts +24 -0
  7. package/dist/components/ui/core/accordion/accordion.js +113 -0
  8. package/dist/components/ui/core/accordion/accordion.metadata.d.ts +2 -0
  9. package/dist/components/ui/core/accordion/accordion.metadata.js +9 -0
  10. package/dist/components/ui/core/alert/alert.d.ts +2 -1
  11. package/dist/components/ui/core/alert/alert.js +120 -96
  12. package/dist/components/ui/core/alert/alert.metadata.js +1 -1
  13. package/dist/components/ui/core/avatar/avatar.js +29 -32
  14. package/dist/components/ui/core/badge/badge.d.ts +1 -1
  15. package/dist/components/ui/core/badge/badge.js +44 -52
  16. package/dist/components/ui/core/banner/banner.d.ts +40 -0
  17. package/dist/components/ui/core/banner/banner.js +218 -0
  18. package/dist/components/ui/core/banner/banner.metadata.d.ts +2 -0
  19. package/dist/components/ui/core/banner/banner.metadata.js +9 -0
  20. package/dist/components/ui/core/button/button.d.ts +2 -2
  21. package/dist/components/ui/core/button/button.js +19 -20
  22. package/dist/components/ui/core/button-group/button-group.js +10 -10
  23. package/dist/components/ui/core/card/card.js +1 -1
  24. package/dist/components/ui/core/code-block/code-block.d.ts +14 -3
  25. package/dist/components/ui/core/code-block/code-block.js +218 -97
  26. package/dist/components/ui/core/code-block/code-block.metadata.js +1 -1
  27. package/dist/components/ui/core/collapsible/collapsible.js +30 -24
  28. package/dist/components/ui/core/command/command.d.ts +2 -2
  29. package/dist/components/ui/core/command/command.js +30 -30
  30. package/dist/components/ui/core/dialog/dialog.js +8 -8
  31. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +1 -1
  32. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +65 -62
  33. package/dist/components/ui/core/helper-text/helper-text.js +8 -8
  34. package/dist/components/ui/core/hover-card/hover-card.js +5 -5
  35. package/dist/components/ui/core/inline-citation/inline-citation.js +19 -16
  36. package/dist/components/ui/core/input/input.d.ts +1 -5
  37. package/dist/components/ui/core/input/input.js +24 -30
  38. package/dist/components/ui/core/input-group/input-group.d.ts +2 -2
  39. package/dist/components/ui/core/input-group/input-group.js +104 -74
  40. package/dist/components/ui/core/label/label.d.ts +3 -1
  41. package/dist/components/ui/core/label/label.js +39 -16
  42. package/dist/components/ui/core/label/label.metadata.js +2 -2
  43. package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +11 -0
  44. package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +13 -0
  45. package/dist/components/ui/core/message/message.d.ts +1 -1
  46. package/dist/components/ui/core/message/message.js +62 -44
  47. package/dist/components/ui/core/popover/popover.d.ts +10 -1
  48. package/dist/components/ui/core/popover/popover.js +137 -34
  49. package/dist/components/ui/core/popover/popover.metadata.js +9 -0
  50. package/dist/components/ui/core/progress/progress.d.ts +10 -0
  51. package/dist/components/ui/core/progress/progress.js +61 -0
  52. package/dist/components/ui/core/progress/progress.metadata.d.ts +2 -0
  53. package/dist/components/ui/core/progress/progress.metadata.js +9 -0
  54. package/dist/components/ui/core/prompt-input/prompt-input.d.ts +2 -2
  55. package/dist/components/ui/core/prompt-input/prompt-input.js +100 -100
  56. package/dist/components/ui/core/scroll-area/scroll-area.d.ts +3 -0
  57. package/dist/components/ui/core/scroll-area/scroll-area.js +71 -0
  58. package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +2 -0
  59. package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +9 -0
  60. package/dist/components/ui/core/select/select.d.ts +3 -3
  61. package/dist/components/ui/core/select/select.js +69 -73
  62. package/dist/components/ui/core/skeleton/skeleton.js +6 -6
  63. package/dist/components/ui/core/sources/sources.js +8 -1
  64. package/dist/components/ui/core/textarea/textarea.d.ts +1 -8
  65. package/dist/components/ui/core/textarea/textarea.js +21 -45
  66. package/dist/components/ui/core/tool/tool.js +58 -50
  67. package/dist/components/ui/core/tooltip/tooltip.js +10 -10
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.js +281 -249
  70. package/dist/lib/utils.d.ts +6 -6
  71. package/dist/lib/utils.js +26 -26
  72. package/dist/styles.css +1 -1
  73. package/dist/styles.source.css +3 -812
  74. package/package.json +28 -9
@@ -0,0 +1,24 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
3
+ import { Icon } from '@tabler/icons-react';
4
+ type AccordionCommonProps = Omit<ComponentProps<typeof AccordionPrimitive.Root>, 'multiple' | 'value' | 'defaultValue' | 'onValueChange'>;
5
+ type AccordionSingleProps = {
6
+ type?: 'single';
7
+ collapsible?: boolean;
8
+ value?: string;
9
+ defaultValue?: string;
10
+ onValueChange?: (value: string) => void;
11
+ };
12
+ type AccordionMultipleProps = {
13
+ type: 'multiple';
14
+ value?: string[];
15
+ defaultValue?: string[];
16
+ onValueChange?: (value: string[]) => void;
17
+ };
18
+ declare const Accordion: import('react').ForwardRefExoticComponent<(Omit<AccordionCommonProps & AccordionSingleProps, "ref"> | Omit<AccordionCommonProps & AccordionMultipleProps, "ref">) & import('react').RefAttributes<HTMLDivElement>>;
19
+ declare const AccordionItem: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AccordionItemProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
20
+ declare const AccordionTrigger: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AccordionTriggerProps & {
21
+ icon?: Icon;
22
+ }, "ref"> & import('react').RefAttributes<HTMLElement>>;
23
+ declare const AccordionContent: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AccordionPanelProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
24
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,113 @@
1
+ import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
+ import { forwardRef as d } from "react";
3
+ import { Accordion as r } from "@base-ui/react/accordion";
4
+ import { IconChevronDown as A } from "@tabler/icons-react";
5
+ import { cn as u } from "../../../../lib/utils.js";
6
+ const w = d((e, t) => {
7
+ if (e.type === "multiple") {
8
+ const {
9
+ type: s,
10
+ value: c,
11
+ defaultValue: b,
12
+ onValueChange: f,
13
+ ...x
14
+ } = e;
15
+ return /* @__PURE__ */ o(
16
+ r.Root,
17
+ {
18
+ ref: t,
19
+ "data-slot": "accordion",
20
+ multiple: !0,
21
+ value: c,
22
+ defaultValue: b,
23
+ onValueChange: (y) => {
24
+ if (!f) return;
25
+ const N = y.filter(
26
+ (V) => V != null
27
+ );
28
+ f(N);
29
+ },
30
+ ...x
31
+ }
32
+ );
33
+ }
34
+ const {
35
+ type: a,
36
+ collapsible: i = !1,
37
+ value: l,
38
+ defaultValue: n,
39
+ onValueChange: g,
40
+ ...p
41
+ } = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v = n === void 0 ? void 0 : n === "" ? [] : [n];
42
+ return /* @__PURE__ */ o(
43
+ r.Root,
44
+ {
45
+ ref: t,
46
+ "data-slot": "accordion",
47
+ multiple: !1,
48
+ value: h,
49
+ defaultValue: v,
50
+ onValueChange: (s, c) => {
51
+ if (g) {
52
+ if (!i && s.length === 0) {
53
+ c.cancel();
54
+ return;
55
+ }
56
+ g(s[0] ?? "");
57
+ }
58
+ },
59
+ ...p
60
+ }
61
+ );
62
+ });
63
+ w.displayName = "Accordion";
64
+ const C = d(({ className: e, ...t }, a) => /* @__PURE__ */ o(
65
+ r.Item,
66
+ {
67
+ ref: a,
68
+ "data-slot": "accordion-item",
69
+ className: u("mt-2 first:mt-0 rounded-md", e),
70
+ ...t
71
+ }
72
+ ));
73
+ C.displayName = "AccordionItem";
74
+ const k = d(({ className: e, children: t, icon: a, ...i }, l) => {
75
+ const n = a;
76
+ return /* @__PURE__ */ o(r.Header, { className: "flex", children: /* @__PURE__ */ m(
77
+ r.Trigger,
78
+ {
79
+ ref: l,
80
+ "data-slot": "accordion-trigger",
81
+ className: u(
82
+ "focus-visible:border-ring focus-visible:ring-ring-shadow group/accordion-trigger flex flex-1 items-center justify-between gap-4.5 rounded-lg px-3 py-2 text-left hover:bg-muted-background hover:text-foreground focus-visible:ring text-base font-normal tracking-tightest transition-all outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-disabled-foreground aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:text-disabled-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled-foreground",
83
+ e
84
+ ),
85
+ ...i,
86
+ children: [
87
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
88
+ n && /* @__PURE__ */ o(n, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200" }),
89
+ /* @__PURE__ */ o("span", { children: t })
90
+ ] }),
91
+ /* @__PURE__ */ o(A, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180" })
92
+ ]
93
+ }
94
+ ) });
95
+ });
96
+ k.displayName = "AccordionTrigger";
97
+ const I = d(({ className: e, children: t, ...a }, i) => /* @__PURE__ */ o(
98
+ r.Panel,
99
+ {
100
+ ref: i,
101
+ "data-slot": "accordion-content",
102
+ className: "h-(--accordion-panel-height) overflow-hidden text-sm font-normal tracking-tightest text-secondary-foreground transition-all duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0",
103
+ ...a,
104
+ children: /* @__PURE__ */ o("div", { className: u("px-3 pb-3 pt-2", e), children: t })
105
+ }
106
+ ));
107
+ I.displayName = "AccordionContent";
108
+ export {
109
+ w as Accordion,
110
+ I as AccordionContent,
111
+ C as AccordionItem,
112
+ k as AccordionTrigger
113
+ };
@@ -0,0 +1,2 @@
1
+ import { ComponentMeta } from '../../../../lib/types';
2
+ export declare const AccordionMetadata: ComponentMeta;
@@ -0,0 +1,9 @@
1
+ const o = {
2
+ name: "Accordion",
3
+ status: "experimental",
4
+ description: "An accessible accordion with smooth expand/collapse built on Base UI primitives.",
5
+ llmUsage: "Use `<Accordion>` with `<AccordionItem>`, `<AccordionTrigger>`, and `<AccordionContent>` for collapsible sections."
6
+ };
7
+ export {
8
+ o as AccordionMetadata
9
+ };
@@ -1,4 +1,4 @@
1
- import { ComponentProps } from 'react';
1
+ import { ComponentProps, ReactNode } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  type AlertVariant = 'default' | 'secondary' | 'warning' | 'error';
4
4
  declare const alertVariants: (props?: ({
@@ -9,6 +9,7 @@ type AlertProps = ComponentProps<'div'> & Omit<VariantProps<typeof alertVariants
9
9
  visible?: boolean;
10
10
  defaultVisible?: boolean;
11
11
  onClose?: () => void;
12
+ icon?: ReactNode;
12
13
  };
13
14
  declare const Alert: import('react').ForwardRefExoticComponent<Omit<AlertProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
14
15
  declare const AlertTitle: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,180 +1,204 @@
1
- import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
- import { createContext as y, forwardRef as n, useMemo as A, useContext as d } from "react";
3
- import { IconX as b } from "@tabler/icons-react";
4
- import { cva as N } from "class-variance-authority";
5
- import { useControllableState as C } from "../../../../lib/use-controllable-state.js";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import { createContext as N, forwardRef as n, useMemo as k, useContext as u } from "react";
3
+ import { IconX as C, IconInfoCircle as I, IconAlertHexagon as V, IconAlertTriangle as _ } from "@tabler/icons-react";
4
+ import { cva as h } from "class-variance-authority";
5
+ import { useControllableState as z } from "../../../../lib/use-controllable-state.js";
6
6
  import { cn as s } from "../../../../lib/utils.js";
7
- import { Button as p } from "../button/button.js";
8
- const i = y({
7
+ import { Button as x } from "../button/button.js";
8
+ const i = N({
9
9
  show: !0,
10
10
  setShow: () => {
11
11
  },
12
12
  variant: "default"
13
- }), V = N(
14
- "relative w-full rounded-md pt-2.5 pr-3 has-[>button[data-slot=alert-close]]:pr-12 pb-2 pl-3 text-sm grid has-[>svg]:grid-cols-[auto_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-2 has-[>svg]:gap-y-1 items-start [&>svg]:size-4 [&>svg]:translate-y-0.65 [&>svg]:shrink-0",
13
+ }), j = h(
14
+ [
15
+ "[&_svg]:shrink-0",
16
+ "[&_svg:not([class*='size-']):not([class*='w-'])]:w-3.5",
17
+ "[&_svg:not([class*='size-']):not([class*='h-'])]:h-3.5",
18
+ "[&_svg:not([class*='mt-'])]:mt-0.5"
19
+ ].join(" ")
20
+ ), D = h(
21
+ "relative w-full rounded-md pt-2.5 pr-3 has-[>button[data-slot=alert-close]]:pr-12 pb-2 pl-3 text-sm grid has-[>[data-slot=alert-icon]]:grid-cols-[auto_1fr] grid-cols-[0_1fr] has-[>[data-slot=alert-icon]]:gap-x-2 has-[>[data-slot=alert-icon]]:gap-y-1 items-start",
15
22
  {
16
23
  variants: {
17
24
  variant: {
18
- default: "bg-undefined-alternative text-card-foreground [&>svg]:text-undefined-foreground",
19
- secondary: "bg-neutral-alternative text-foreground [&>svg]:text-neutral-foreground",
20
- warning: "bg-warning-alternative [&>svg]:text-warning-foreground",
21
- error: "bg-destructive-alternative text-foreground [&>svg]:text-destructive-foreground"
25
+ default: "bg-neutral-muted-background text-foreground [&>[data-slot=alert-icon]]:text-info-foreground",
26
+ secondary: "bg-info-muted-background text-foreground [&>[data-slot=alert-icon]]:text-info-foreground",
27
+ warning: "bg-warning-muted-background [&>[data-slot=alert-icon]]:text-warning-foreground",
28
+ error: "bg-destructive-muted-background text-foreground [&>[data-slot=alert-icon]]:text-destructive-foreground"
22
29
  }
23
30
  },
24
31
  defaultVariants: {
25
32
  variant: "default"
26
33
  }
27
34
  }
28
- ), k = n(
35
+ );
36
+ function S(r) {
37
+ const t = { "aria-hidden": !0 };
38
+ switch (r) {
39
+ case "warning":
40
+ return /* @__PURE__ */ e(_, { ...t });
41
+ case "error":
42
+ return /* @__PURE__ */ e(V, { ...t });
43
+ default:
44
+ return /* @__PURE__ */ e(I, { ...t });
45
+ }
46
+ }
47
+ const T = n(
29
48
  ({
30
- className: t,
31
- variant: e = "default",
32
- visible: r,
33
- defaultVisible: a = !0,
49
+ className: r,
50
+ variant: t = "default",
51
+ visible: a,
52
+ defaultVisible: o = !0,
34
53
  onClose: l,
35
- children: c,
36
- ...u
37
- }, x) => {
38
- const [g, v] = C({
39
- defaultProp: a,
40
- prop: r,
54
+ icon: c,
55
+ children: g,
56
+ ...w
57
+ }, A) => {
58
+ const [f, m] = z({
59
+ defaultProp: o,
60
+ prop: a,
41
61
  onChange: l
42
- }), f = e ?? "default", w = A(
43
- () => ({ show: g, setShow: v, variant: f }),
44
- [g, v, f]
62
+ }), d = t ?? "default", y = k(
63
+ () => ({ show: f, setShow: m, variant: d }),
64
+ [f, m, d]
45
65
  );
46
- return g ? /* @__PURE__ */ o(i.Provider, { value: w, children: /* @__PURE__ */ m(
66
+ if (!f)
67
+ return null;
68
+ const v = c !== void 0 ? c : S(d);
69
+ return /* @__PURE__ */ e(i.Provider, { value: y, children: /* @__PURE__ */ p(
47
70
  "div",
48
71
  {
49
- ref: x,
72
+ ref: A,
50
73
  "data-slot": "alert",
51
74
  role: "alert",
52
- className: s(V({ variant: f }), t),
53
- ...u,
75
+ className: s(D({ variant: d }), r),
76
+ ...w,
54
77
  children: [
55
- l && /* @__PURE__ */ o(h, {}),
56
- c
78
+ l && /* @__PURE__ */ e(b, {}),
79
+ v && /* @__PURE__ */ e("span", { "data-slot": "alert-icon", className: j(), children: v }),
80
+ g
57
81
  ]
58
82
  }
59
- ) }) : null;
83
+ ) });
60
84
  }
61
85
  );
62
- k.displayName = "Alert";
63
- const z = {
64
- default: "text-undefined-foreground",
65
- secondary: "text-neutral-foreground",
86
+ T.displayName = "Alert";
87
+ const B = {
88
+ default: "text-info-foreground",
89
+ secondary: "text-info-foreground",
66
90
  warning: "text-warning-foreground",
67
91
  error: "text-destructive-foreground"
68
- }, S = n(
69
- ({ className: t, ...e }, r) => {
70
- const { variant: a } = d(i);
71
- return /* @__PURE__ */ o(
92
+ }, P = n(
93
+ ({ className: r, ...t }, a) => {
94
+ const { variant: o } = u(i);
95
+ return /* @__PURE__ */ e(
72
96
  "div",
73
97
  {
74
- ref: r,
98
+ ref: a,
75
99
  "data-slot": "alert-title",
76
100
  className: s(
77
- "text-base font-medium leading-5 tracking-tightest",
78
- z[a],
79
- t
101
+ "col-start-2 text-base font-medium leading-5 tracking-tightest",
102
+ B[o],
103
+ r
80
104
  ),
81
- ...e
105
+ ...t
82
106
  }
83
107
  );
84
108
  }
85
109
  );
86
- S.displayName = "AlertTitle";
87
- const j = {
88
- default: "text-card-foreground",
110
+ P.displayName = "AlertTitle";
111
+ const H = {
112
+ default: "text-foreground",
89
113
  secondary: "text-foreground",
90
- warning: "text-card-foreground",
114
+ warning: "text-foreground",
91
115
  error: "text-foreground"
92
- }, B = n(
93
- ({ className: t, ...e }, r) => {
94
- const { variant: a } = d(i);
95
- return /* @__PURE__ */ o(
116
+ }, M = n(
117
+ ({ className: r, ...t }, a) => {
118
+ const { variant: o } = u(i);
119
+ return /* @__PURE__ */ e(
96
120
  "div",
97
121
  {
98
- ref: r,
122
+ ref: a,
99
123
  "data-slot": "alert-description",
100
124
  className: s(
101
125
  "col-start-2 grid justify-items-start gap-1 text-sm font-normal leading-4.5 tracking-tight items-center",
102
- j[a],
103
- t
126
+ H[o],
127
+ r
104
128
  ),
105
- ...e
129
+ ...t
106
130
  }
107
131
  );
108
132
  }
109
133
  );
110
- B.displayName = "AlertDescription";
111
- const D = n(
112
- ({ className: t, ...e }, r) => /* @__PURE__ */ o(
134
+ M.displayName = "AlertDescription";
135
+ const R = n(
136
+ ({ className: r, ...t }, a) => /* @__PURE__ */ e(
113
137
  "div",
114
138
  {
115
- ref: r,
139
+ ref: a,
116
140
  "data-slot": "alert-actions",
117
141
  className: s(
118
142
  "col-start-2 flex flex-wrap items-start gap-2 pt-1",
119
- t
143
+ r
120
144
  ),
121
- ...e
145
+ ...t
122
146
  }
123
147
  )
124
148
  );
125
- D.displayName = "AlertActions";
126
- const T = n(({ className: t, ...e }, r) => {
127
- const { variant: a } = d(i);
128
- return /* @__PURE__ */ o(
129
- p,
149
+ R.displayName = "AlertActions";
150
+ const X = n(({ className: r, ...t }, a) => {
151
+ const { variant: o } = u(i);
152
+ return /* @__PURE__ */ e(
153
+ x,
130
154
  {
131
- ref: r,
155
+ ref: a,
132
156
  "data-slot": "alert-button",
133
157
  variant: "ghost",
134
158
  size: "sm",
135
159
  className: s("text-foreground", {
136
- default: "hover:bg-undefined-hover",
137
- secondary: "hover:bg-neutral-hover",
138
- warning: "hover:bg-warning-hover",
139
- error: "hover:bg-destructive-hover"
140
- }[a], t),
141
- ...e
160
+ default: "hover:bg-neutral-background-hover",
161
+ secondary: "hover:bg-info-background-hover",
162
+ warning: "hover:bg-warning-background-hover",
163
+ error: "hover:bg-destructive-background-hover"
164
+ }[o], r),
165
+ ...t
142
166
  }
143
167
  );
144
168
  });
145
- T.displayName = "AlertButton";
146
- const h = n(
147
- ({ className: t, onClick: e, ...r }, a) => {
148
- const { setShow: l } = d(i), c = (u) => {
149
- l(!1), e?.(u);
169
+ X.displayName = "AlertButton";
170
+ const b = n(
171
+ ({ className: r, onClick: t, ...a }, o) => {
172
+ const { setShow: l } = u(i), c = (g) => {
173
+ l(!1), t?.(g);
150
174
  };
151
- return /* @__PURE__ */ m(
152
- p,
175
+ return /* @__PURE__ */ p(
176
+ x,
153
177
  {
154
- ref: a,
178
+ ref: o,
155
179
  "data-slot": "alert-close",
156
180
  variant: "ghost",
157
181
  size: "icon-sm",
158
182
  className: s(
159
183
  "absolute top-3 right-4 h-3.5 w-3.5 p-0 opacity-70 hover:opacity-100 text-foreground",
160
- t
184
+ r
161
185
  ),
162
186
  onClick: c,
163
- ...r,
187
+ ...a,
164
188
  children: [
165
- /* @__PURE__ */ o(b, { size: 14 }),
166
- /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
189
+ /* @__PURE__ */ e(C, { size: 14 }),
190
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
167
191
  ]
168
192
  }
169
193
  );
170
194
  }
171
195
  );
172
- h.displayName = "AlertClose";
196
+ b.displayName = "AlertClose";
173
197
  export {
174
- k as Alert,
175
- D as AlertActions,
176
- T as AlertButton,
177
- h as AlertClose,
178
- B as AlertDescription,
179
- S as AlertTitle
198
+ T as Alert,
199
+ R as AlertActions,
200
+ X as AlertButton,
201
+ b as AlertClose,
202
+ M as AlertDescription,
203
+ P as AlertTitle
180
204
  };
@@ -2,7 +2,7 @@ const e = {
2
2
  name: "Alert",
3
3
  status: "in-progress-code-review",
4
4
  description: "A dismissible alert component with multiple variants for displaying messages.",
5
- llmUsage: "Use `<Alert>` with `<AlertTitle>` and `<AlertDescription>` for informational messages."
5
+ llmUsage: "Use `<Alert>` with optional `icon` prop (defaults to a variant-appropriate icon), plus `<AlertTitle>` and `<AlertDescription>`, for informational messages. Pass `icon={null}` to suppress the icon."
6
6
  };
7
7
  export {
8
8
  e as AlertMetadata
@@ -1,26 +1,26 @@
1
- import { jsx as o, jsxs as c, Fragment as v } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as i, Fragment as v } from "react/jsx-runtime";
2
2
  import { forwardRef as t } from "react";
3
3
  import { Avatar as n } from "@base-ui/react/avatar";
4
4
  import { cva as g } from "class-variance-authority";
5
5
  import { cn as d } from "../../../../lib/utils.js";
6
6
  const u = g(
7
- "group/avatar relative inline-flex text-base font-medium leading-5 shrink-0 overflow-hidden rounded-md flex-col justify-center items-center hover:cursor-pointer box-border",
7
+ "group/avatar relative inline-flex text-base font-medium leading-5 shrink-0 overflow-hidden flex-col justify-center items-center box-border",
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
- default: "bg-decorative-background-mountain text-decorative-foreground-mountain hover:bg-decorative-background-hover-mountain",
12
- nordic: "bg-decorative-background-nordic text-decorative-foreground-nordic hover:bg-decorative-background-hover-nordic",
13
- aurora: "bg-decorative-background-aurora text-decorative-foreground-aurora hover:bg-decorative-background-hover-aurora",
14
- fjord: "bg-decorative-background-fjord text-decorative-foreground-fjord hover:bg-decorative-background-hover-fjord",
15
- dusk: "bg-decorative-background-dusk text-decorative-foreground-dusk hover:bg-decorative-background-hover-dusk",
16
- orange: "bg-decorative-background-orange text-decorative-foreground-orange hover:bg-decorative-background-hover-orange",
17
- sky: "bg-decorative-background-sky text-decorative-foreground-sky hover:bg-decorative-background-hover-sky",
18
- overflow: "bg-secondary text-secondary-foreground hover:bg-secondary-hover"
11
+ default: "bg-decorative-mountain-background text-decorative-mountain-foreground hover:bg-decorative-mountain-background-hover",
12
+ nordic: "bg-decorative-nordic-background text-decorative-nordic-foreground hover:bg-background-hover",
13
+ aurora: "bg-decorative-aurora-background text-decorative-aurora-foreground hover:bg-decorative-aurora-background-hover",
14
+ fjord: "bg-decorative-fjord-background text-decorative-fjord-foreground hover:bg-decorative-fjord-background-hover",
15
+ dusk: "bg-decorative-dusk-background text-decorative-dusk-foreground hover:bg-decorative-dusk-background-hover",
16
+ orange: "bg-decorative-orange-background text-decorative-orange-foreground hover:bg-decorative-orange-background-hover",
17
+ sky: "bg-decorative-sky-background text-decorative-sky-foreground hover:bg-decorative-sky-background-hover",
18
+ overflow: "bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover"
19
19
  },
20
20
  sizes: {
21
- default: "size-9 text-sm [&_svg]:w-5 [&_svg]:h-5",
22
- xsm: "size-7 text-xs [&_svg]:w-4 [&_svg]:h-4",
23
- xxsm: "size-5 text-2xs [&_svg]:w-3 [&_svg]:h-3"
21
+ default: "size-9 rounded-lg text-sm [&_svg]:w-5 [&_svg]:h-5",
22
+ xsm: "size-7 rounded-md text-xs [&_svg]:w-4 [&_svg]:h-4",
23
+ xxsm: "size-5 rounded-sm text-2xs [&_svg]:w-3 [&_svg]:h-3"
24
24
  }
25
25
  },
26
26
  defaultVariants: {
@@ -28,23 +28,26 @@ const u = g(
28
28
  sizes: "default"
29
29
  }
30
30
  }
31
- ), l = t(({ className: a, variant: e, sizes: r, ...s }, i) => /* @__PURE__ */ o(
31
+ ), l = t(({ className: a, variant: e, sizes: r, ...s }, c) => /* @__PURE__ */ o(
32
32
  n.Root,
33
33
  {
34
- ref: i,
34
+ ref: c,
35
35
  "data-slot": "avatar",
36
36
  className: d(u({ variant: e, sizes: r }), a),
37
37
  ...s
38
38
  }
39
39
  ));
40
40
  l.displayName = "Avatar";
41
- const b = t(({ className: a, ...e }, r) => /* @__PURE__ */ c(v, { children: [
41
+ const b = t(({ className: a, ...e }, r) => /* @__PURE__ */ i(v, { children: [
42
42
  /* @__PURE__ */ o(
43
43
  n.Image,
44
44
  {
45
45
  ref: r,
46
46
  "data-slot": "avatar-image",
47
- className: d("aspect-square size-full", a),
47
+ className: d(
48
+ "aspect-square size-full object-cover object-center",
49
+ a
50
+ ),
48
51
  ...e
49
52
  }
50
53
  ),
@@ -52,43 +55,37 @@ const b = t(({ className: a, ...e }, r) => /* @__PURE__ */ c(v, { children: [
52
55
  "span",
53
56
  {
54
57
  "data-slot": "avatar-image-backdrop",
55
- className: "absolute inset-0 bg-backdrop opacity-0 transition-opacity group-hover/avatar:opacity-100 pointer-events-none",
58
+ className: "absolute inset-0 bg-overlay-background opacity-0 transition-opacity group-hover/avatar:opacity-100 pointer-events-none",
56
59
  "aria-hidden": "true"
57
60
  }
58
61
  )
59
62
  ] }));
60
63
  b.displayName = "AvatarImage";
61
- const m = t(({ className: a, ...e }, r) => /* @__PURE__ */ o(
64
+ const f = t(({ className: a, ...e }, r) => /* @__PURE__ */ o(
62
65
  n.Fallback,
63
66
  {
64
67
  ref: r,
65
68
  "data-slot": "avatar-fallback",
66
- className: d(
67
- " flex size-full items-center justify-center rounded-md",
68
- a
69
- ),
69
+ className: d(" flex size-full items-center justify-center", a),
70
70
  ...e
71
71
  }
72
72
  ));
73
- m.displayName = "AvatarFallback";
74
- const f = t(
73
+ f.displayName = "AvatarFallback";
74
+ const m = t(
75
75
  ({ className: a, ...e }, r) => /* @__PURE__ */ o(
76
76
  "span",
77
77
  {
78
78
  ref: r,
79
79
  "data-slot": "avatar-icon",
80
- className: d(
81
- "flex size-full items-center justify-center rounded-md",
82
- a
83
- ),
80
+ className: d("flex size-full items-center justify-center", a),
84
81
  ...e
85
82
  }
86
83
  )
87
84
  );
88
- f.displayName = "AvatarIcon";
85
+ m.displayName = "AvatarIcon";
89
86
  export {
90
87
  l as Avatar,
91
- m as AvatarFallback,
92
- f as AvatarIcon,
88
+ f as AvatarFallback,
89
+ m as AvatarIcon,
93
90
  b as AvatarImage
94
91
  };
@@ -2,7 +2,7 @@ import { useRender } from '@base-ui/react/use-render';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  declare const badgeVariants: (props?: ({
4
4
  variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "mountain" | "error" | "warning" | "success" | "inProgress" | "archived" | "closable" | null | undefined;
5
- size?: "default" | "icon" | null | undefined;
5
+ size?: "icon" | "default" | null | undefined;
6
6
  outline?: boolean | null | undefined;
7
7
  background?: boolean | null | undefined;
8
8
  dot?: boolean | null | undefined;