@alixpartners/ui-components 2.4.4 → 2.5.0

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.
@@ -0,0 +1,40 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { d as s, i as r, r as l, s as t, g as e } from "../../vi.bdSIJ99Y-017e_Pkz.js";
3
+ import a from "./Illustration.js";
4
+ s("Illustration", () => {
5
+ s("Levels 1 and 2", () => {
6
+ s("Rendering", () => {
7
+ r("should render an image for a valid level 2 illustration", () => {
8
+ l(/* @__PURE__ */ o(a, { level: 2, category: "empty", name: "folder" }));
9
+ const n = t.getByTestId("illustration-image");
10
+ e(n).toBeInTheDocument(), e(n).toHaveAttribute("src"), e(n.getAttribute("src")).toBeTruthy();
11
+ }), r("should apply clamped square dimensions from size prop", () => {
12
+ l(/* @__PURE__ */ o(a, { level: 2, category: "empty", name: "folder", size: 100 }));
13
+ const n = t.getByTestId("illustration-image");
14
+ e(n).toHaveAttribute("width", "100"), e(n).toHaveAttribute("height", "100");
15
+ }), r("should use custom alt when provided", () => {
16
+ l(/* @__PURE__ */ o(a, { level: 1, category: "empty", name: "folder", alt: "Custom alt" })), e(t.getByTestId("illustration-image")).toHaveAttribute("alt", "Custom alt");
17
+ }), r("should not render when name is not in the catalog", () => {
18
+ l(/* @__PURE__ */ o(a, { level: 2, category: "empty", name: "not-a-real-illustration" })), e(t.queryByTestId("illustration-image")).not.toBeInTheDocument();
19
+ });
20
+ });
21
+ }), s("Level 3", () => {
22
+ s("Rendering", () => {
23
+ r("should render message and error tag for a mapped error code", () => {
24
+ l(/* @__PURE__ */ o(a, { level: 3, errorCode: 404 })), e(t.getByTestId("illustration")).toBeInTheDocument(), e(t.getByTestId("illustration-image")).toBeInTheDocument(), e(t.getByTestId("illustration-text")).toHaveTextContent("Page not found"), e(t.getByTestId("tag-label")).toHaveTextContent("Error 404");
25
+ }), r("should fall back to 500 content for unknown codes but keep the real code in the tag", () => {
26
+ l(/* @__PURE__ */ o(a, { level: 3, errorCode: 999 })), e(t.getByTestId("illustration-text")).toHaveTextContent("Something went wrong"), e(t.getByTestId("tag-label")).toHaveTextContent("Error 999");
27
+ }), r("should use mapped alt from message when alt is omitted", () => {
28
+ l(/* @__PURE__ */ o(a, { level: 3, errorCode: 500 })), e(t.getByTestId("illustration-image")).toHaveAttribute("alt", "Something went wrong");
29
+ }), r("should apply a custom text container offset for planets illustration", () => {
30
+ l(/* @__PURE__ */ o(a, { level: 3, errorCode: 404 })), e(t.getByTestId("illustration-text").parentElement).toHaveStyle({
31
+ bottom: "40px"
32
+ });
33
+ }), r("should apply a custom text container offset for overload illustration", () => {
34
+ l(/* @__PURE__ */ o(a, { level: 3, errorCode: 500 })), e(t.getByTestId("illustration-text").parentElement).toHaveStyle({
35
+ bottom: "24px"
36
+ });
37
+ });
38
+ });
39
+ });
40
+ });
@@ -0,0 +1,34 @@
1
+ export declare const LEVEL_3_CATEGORY: "error";
2
+ export declare const LEVEL_3_ERROR_MAP: Record<number, {
3
+ name: 'error-barrier' | 'error-overload' | 'error-planets' | 'error-plug' | 'error-time';
4
+ message: string;
5
+ }>;
6
+ export declare const LEVEL_3_FALLBACK: {
7
+ name: "error-barrier" | "error-overload" | "error-planets" | "error-plug" | "error-time";
8
+ message: string;
9
+ };
10
+ export declare const LEVEL_3_TEXT_BOTTOM_BY_NAME: Record<(typeof LEVEL_3_ERROR_MAP)[number]['name'], number>;
11
+ export declare const LEVEL_DIMENSIONS: {
12
+ readonly 1: {
13
+ readonly minSize: 54;
14
+ readonly maxSize: 72;
15
+ };
16
+ readonly 2: {
17
+ readonly minSize: 73;
18
+ readonly maxSize: 260;
19
+ };
20
+ readonly 3: {
21
+ readonly width: 600;
22
+ readonly height: 360;
23
+ };
24
+ };
25
+ export declare const RANGE_DIMENSIONS: {
26
+ readonly 1: {
27
+ readonly minSize: 54;
28
+ readonly maxSize: 72;
29
+ };
30
+ readonly 2: {
31
+ readonly minSize: 73;
32
+ readonly maxSize: 260;
33
+ };
34
+ };
@@ -0,0 +1,22 @@
1
+ import { ImgHTMLAttributes } from 'react';
2
+ import { ILLUSTRATIONS_BY_LEVEL } from '../../assets/illustrations-map';
3
+ import { DataAttributes } from '../../types/data-attributes';
4
+ export type IllustrationLevel = keyof typeof ILLUSTRATIONS_BY_LEVEL;
5
+ export type IllustrationCategory<L extends IllustrationLevel> = Extract<keyof (typeof ILLUSTRATIONS_BY_LEVEL)[L], string>;
6
+ export type IllustrationName<L extends IllustrationLevel, C extends IllustrationCategory<L>> = (typeof ILLUSTRATIONS_BY_LEVEL)[L][C] extends readonly (infer N)[] ? Extract<N, string> : never;
7
+ type ImgRest = Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'width' | 'height'> & DataAttributes;
8
+ export type IllustrationProps = ({
9
+ level: 1;
10
+ category: IllustrationCategory<1>;
11
+ name: IllustrationName<1, IllustrationCategory<1>>;
12
+ size?: number;
13
+ } & ImgRest) | ({
14
+ level: 2;
15
+ category: IllustrationCategory<2>;
16
+ name: IllustrationName<2, IllustrationCategory<2>>;
17
+ size?: number;
18
+ } & ImgRest) | ({
19
+ level: 3;
20
+ errorCode: number;
21
+ } & ImgRest);
22
+ export {};
@@ -0,0 +1,11 @@
1
+ import { IllustrationLevel } from './types';
2
+ export declare function resolveLevel3Content(errorCode: number): {
3
+ name: "error-barrier" | "error-overload" | "error-planets" | "error-plug" | "error-time";
4
+ message: string;
5
+ };
6
+ export declare function hasIllustration(level: IllustrationLevel, category: string, name: string): boolean;
7
+ export declare function toNumericDimension(value: number | string | undefined): number | undefined;
8
+ export declare function resolveDimensions(level: IllustrationLevel, requestedSize: number | undefined): {
9
+ width: number;
10
+ height: number;
11
+ };
@@ -1,63 +1,63 @@
1
1
  import { jsx as e, jsxs as C } from "react/jsx-runtime";
2
2
  import ae from "../Tag/Tag.js";
3
- import D from "../Icon/Icon.js";
4
- import { c as G } from "../../clsx-OuTLNxxd.js";
5
- import re from "../Logo/Logo.js";
3
+ import G from "../Icon/Icon.js";
4
+ import { c as x } from "../../clsx-OuTLNxxd.js";
5
+ import ne from "../Logo/Logo.js";
6
6
  import * as s from "react";
7
- import { useState as S } from "react";
8
- import { u as ne, R as oe, I as te, c as H, a as ie } from "../../index-DEphED6n.js";
9
- import { u as ue, P as z, d as se, c as R, b as ce } from "../../index-DM51yNMI.js";
7
+ import { useState as y } from "react";
8
+ import { u as re, R as oe, I as te, c as H, a as ie } from "../../index-DEphED6n.js";
9
+ import { u as ue, P as z, d as se, c as R, b as le } from "../../index-DM51yNMI.js";
10
10
  import { u as K } from "../../index-7CBv-Jx6.js";
11
- import { R as le, A as de, P as me, C as be, I as ve, c as pe, G as _e, L as fe, a as ge, b as he, d as Me, e as Ne, S as Ce, f as Re, g as Pe, h as we } from "../../index-D_3jWVyV.js";
12
- import '../../assets/NavBar.css';var x = "Menubar", [L, xe, Se] = ie(x), [Y] = ce(x, [
11
+ import { R as ce, A as de, P as me, C as be, I as ve, c as pe, G as _e, L as fe, a as ge, b as he, d as Me, e as Ne, S as Ce, f as Re, g as Pe, h as we } from "../../index-D_3jWVyV.js";
12
+ import '../../assets/NavBar.css';var S = "Menubar", [L, xe, Se] = ie(S), [Y] = le(S, [
13
13
  Se,
14
14
  H
15
- ]), p = pe(), Q = H(), [Ae, V] = Y(x), X = s.forwardRef(
15
+ ]), p = pe(), Q = H(), [ye, V] = Y(S), X = s.forwardRef(
16
16
  (a, o) => {
17
17
  const {
18
- __scopeMenubar: r,
19
- value: n,
20
- onValueChange: i,
18
+ __scopeMenubar: n,
19
+ value: r,
20
+ onValueChange: u,
21
21
  defaultValue: M,
22
22
  loop: v = !0,
23
23
  dir: t,
24
24
  ...d
25
- } = a, _ = ne(t), l = Q(r), [g, m] = ue({
26
- prop: n,
27
- onChange: i,
25
+ } = a, _ = re(t), c = Q(n), [g, m] = ue({
26
+ prop: r,
27
+ onChange: u,
28
28
  defaultProp: M ?? "",
29
- caller: x
30
- }), [h, c] = s.useState(null);
29
+ caller: S
30
+ }), [h, l] = s.useState(null);
31
31
  return /* @__PURE__ */ e(
32
- Ae,
32
+ ye,
33
33
  {
34
- scope: r,
34
+ scope: n,
35
35
  value: g,
36
36
  onMenuOpen: s.useCallback(
37
37
  (f) => {
38
- m(f), c(f);
38
+ m(f), l(f);
39
39
  },
40
40
  [m]
41
41
  ),
42
42
  onMenuClose: s.useCallback(() => m(""), [m]),
43
43
  onMenuToggle: s.useCallback(
44
44
  (f) => {
45
- m((w) => w ? "" : f), c(f);
45
+ m((w) => w ? "" : f), l(f);
46
46
  },
47
47
  [m]
48
48
  ),
49
49
  dir: _,
50
50
  loop: v,
51
- children: /* @__PURE__ */ e(L.Provider, { scope: r, children: /* @__PURE__ */ e(L.Slot, { scope: r, children: /* @__PURE__ */ e(
51
+ children: /* @__PURE__ */ e(L.Provider, { scope: n, children: /* @__PURE__ */ e(L.Slot, { scope: n, children: /* @__PURE__ */ e(
52
52
  oe,
53
53
  {
54
54
  asChild: !0,
55
- ...l,
55
+ ...c,
56
56
  orientation: "horizontal",
57
57
  loop: v,
58
58
  dir: _,
59
59
  currentTabStopId: h,
60
- onCurrentTabStopIdChange: c,
60
+ onCurrentTabStopIdChange: l,
61
61
  children: /* @__PURE__ */ e(z.div, { role: "menubar", ...d, ref: o })
62
62
  }
63
63
  ) }) })
@@ -65,13 +65,13 @@ import '../../assets/NavBar.css';var x = "Menubar", [L, xe, Se] = ie(x), [Y] = c
65
65
  );
66
66
  }
67
67
  );
68
- X.displayName = x;
69
- var j = "MenubarMenu", [ye, J] = Y(j), W = (a) => {
70
- const { __scopeMenubar: o, value: r, ...n } = a, i = K(), M = r || i || "LEGACY_REACT_AUTO_VALUE", v = V(j, o), t = p(o), d = s.useRef(null), _ = s.useRef(!1), l = v.value === M;
68
+ X.displayName = S;
69
+ var j = "MenubarMenu", [Ae, J] = Y(j), W = (a) => {
70
+ const { __scopeMenubar: o, value: n, ...r } = a, u = K(), M = n || u || "LEGACY_REACT_AUTO_VALUE", v = V(j, o), t = p(o), d = s.useRef(null), _ = s.useRef(!1), c = v.value === M;
71
71
  return s.useEffect(() => {
72
- l || (_.current = !1);
73
- }, [l]), /* @__PURE__ */ e(
74
- ye,
72
+ c || (_.current = !1);
73
+ }, [c]), /* @__PURE__ */ e(
74
+ Ae,
75
75
  {
76
76
  scope: o,
77
77
  value: M,
@@ -80,16 +80,16 @@ var j = "MenubarMenu", [ye, J] = Y(j), W = (a) => {
80
80
  contentId: K(),
81
81
  wasKeyboardTriggerOpenRef: _,
82
82
  children: /* @__PURE__ */ e(
83
- le,
83
+ ce,
84
84
  {
85
85
  ...t,
86
- open: l,
86
+ open: c,
87
87
  onOpenChange: (g) => {
88
88
  g || v.onMenuClose();
89
89
  },
90
90
  modal: !1,
91
91
  dir: v.dir,
92
- ...n
92
+ ...r
93
93
  }
94
94
  )
95
95
  }
@@ -98,13 +98,13 @@ var j = "MenubarMenu", [ye, J] = Y(j), W = (a) => {
98
98
  W.displayName = j;
99
99
  var F = "MenubarTrigger", Z = s.forwardRef(
100
100
  (a, o) => {
101
- const { __scopeMenubar: r, disabled: n = !1, ...i } = a, M = Q(r), v = p(r), t = V(F, r), d = J(F, r), _ = s.useRef(null), l = se(o, _, d.triggerRef), [g, m] = s.useState(!1), h = t.value === d.value;
102
- return /* @__PURE__ */ e(L.ItemSlot, { scope: r, value: d.value, disabled: n, children: /* @__PURE__ */ e(
101
+ const { __scopeMenubar: n, disabled: r = !1, ...u } = a, M = Q(n), v = p(n), t = V(F, n), d = J(F, n), _ = s.useRef(null), c = se(o, _, d.triggerRef), [g, m] = s.useState(!1), h = t.value === d.value;
102
+ return /* @__PURE__ */ e(L.ItemSlot, { scope: n, value: d.value, disabled: r, children: /* @__PURE__ */ e(
103
103
  te,
104
104
  {
105
105
  asChild: !0,
106
106
  ...M,
107
- focusable: !n,
107
+ focusable: !r,
108
108
  tabStopId: d.value,
109
109
  children: /* @__PURE__ */ e(de, { asChild: !0, ...v, children: /* @__PURE__ */ e(
110
110
  z.button,
@@ -117,19 +117,19 @@ var F = "MenubarTrigger", Z = s.forwardRef(
117
117
  "aria-controls": h ? d.contentId : void 0,
118
118
  "data-highlighted": g ? "" : void 0,
119
119
  "data-state": h ? "open" : "closed",
120
- "data-disabled": n ? "" : void 0,
121
- disabled: n,
122
- ...i,
123
- ref: l,
124
- onPointerDown: R(a.onPointerDown, (c) => {
125
- !n && c.button === 0 && c.ctrlKey === !1 && (t.onMenuOpen(d.value), h || c.preventDefault());
120
+ "data-disabled": r ? "" : void 0,
121
+ disabled: r,
122
+ ...u,
123
+ ref: c,
124
+ onPointerDown: R(a.onPointerDown, (l) => {
125
+ !r && l.button === 0 && l.ctrlKey === !1 && (t.onMenuOpen(d.value), h || l.preventDefault());
126
126
  }),
127
127
  onPointerEnter: R(a.onPointerEnter, () => {
128
128
  var f;
129
129
  !!t.value && !h && (t.onMenuOpen(d.value), (f = _.current) == null || f.focus());
130
130
  }),
131
- onKeyDown: R(a.onKeyDown, (c) => {
132
- n || (["Enter", " "].includes(c.key) && t.onMenuToggle(d.value), c.key === "ArrowDown" && t.onMenuOpen(d.value), ["Enter", " ", "ArrowDown"].includes(c.key) && (d.wasKeyboardTriggerOpenRef.current = !0, c.preventDefault()));
131
+ onKeyDown: R(a.onKeyDown, (l) => {
132
+ r || (["Enter", " "].includes(l.key) && t.onMenuToggle(d.value), l.key === "ArrowDown" && t.onMenuOpen(d.value), ["Enter", " ", "ArrowDown"].includes(l.key) && (d.wasKeyboardTriggerOpenRef.current = !0, l.preventDefault()));
133
133
  }),
134
134
  onFocus: R(a.onFocus, () => m(!0)),
135
135
  onBlur: R(a.onBlur, () => m(!1))
@@ -141,13 +141,13 @@ var F = "MenubarTrigger", Z = s.forwardRef(
141
141
  );
142
142
  Z.displayName = F;
143
143
  var Oe = "MenubarPortal", $ = (a) => {
144
- const { __scopeMenubar: o, ...r } = a, n = p(o);
145
- return /* @__PURE__ */ e(me, { ...n, ...r });
144
+ const { __scopeMenubar: o, ...n } = a, r = p(o);
145
+ return /* @__PURE__ */ e(me, { ...r, ...n });
146
146
  };
147
147
  $.displayName = Oe;
148
148
  var U = "MenubarContent", q = s.forwardRef(
149
149
  (a, o) => {
150
- const { __scopeMenubar: r, align: n = "start", ...i } = a, M = p(r), v = V(U, r), t = J(U, r), d = xe(r), _ = s.useRef(!1);
150
+ const { __scopeMenubar: n, align: r = "start", ...u } = a, M = p(n), v = V(U, n), t = J(U, n), d = xe(n), _ = s.useRef(!1);
151
151
  return /* @__PURE__ */ e(
152
152
  be,
153
153
  {
@@ -155,33 +155,33 @@ var U = "MenubarContent", q = s.forwardRef(
155
155
  "aria-labelledby": t.triggerId,
156
156
  "data-radix-menubar-content": "",
157
157
  ...M,
158
- ...i,
158
+ ...u,
159
159
  ref: o,
160
- align: n,
161
- onCloseAutoFocus: R(a.onCloseAutoFocus, (l) => {
160
+ align: r,
161
+ onCloseAutoFocus: R(a.onCloseAutoFocus, (c) => {
162
162
  var m;
163
- !!!v.value && !_.current && ((m = t.triggerRef.current) == null || m.focus()), _.current = !1, l.preventDefault();
163
+ !!!v.value && !_.current && ((m = t.triggerRef.current) == null || m.focus()), _.current = !1, c.preventDefault();
164
164
  }),
165
- onFocusOutside: R(a.onFocusOutside, (l) => {
166
- const g = l.target;
165
+ onFocusOutside: R(a.onFocusOutside, (c) => {
166
+ const g = c.target;
167
167
  d().some((h) => {
168
- var c;
169
- return (c = h.ref.current) == null ? void 0 : c.contains(g);
170
- }) && l.preventDefault();
168
+ var l;
169
+ return (l = h.ref.current) == null ? void 0 : l.contains(g);
170
+ }) && c.preventDefault();
171
171
  }),
172
172
  onInteractOutside: R(a.onInteractOutside, () => {
173
173
  _.current = !0;
174
174
  }),
175
- onEntryFocus: (l) => {
176
- t.wasKeyboardTriggerOpenRef.current || l.preventDefault();
175
+ onEntryFocus: (c) => {
176
+ t.wasKeyboardTriggerOpenRef.current || c.preventDefault();
177
177
  },
178
178
  onKeyDown: R(
179
179
  a.onKeyDown,
180
- (l) => {
181
- if (["ArrowRight", "ArrowLeft"].includes(l.key)) {
182
- const g = l.target, m = g.hasAttribute("data-radix-menubar-subtrigger"), h = g.closest("[data-radix-menubar-content]") !== l.currentTarget, f = (v.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === l.key;
180
+ (c) => {
181
+ if (["ArrowRight", "ArrowLeft"].includes(c.key)) {
182
+ const g = c.target, m = g.hasAttribute("data-radix-menubar-subtrigger"), h = g.closest("[data-radix-menubar-content]") !== c.currentTarget, f = (v.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === c.key;
183
183
  if (!f && m || h && f) return;
184
- let N = d().filter((k) => !k.disabled).map((k) => k.value);
184
+ let N = d().filter((D) => !D.disabled).map((D) => D.value);
185
185
  f && N.reverse();
186
186
  const b = N.indexOf(t.value);
187
187
  N = v.loop ? $e(N, b + 1) : N.slice(b + 1);
@@ -206,74 +206,74 @@ var U = "MenubarContent", q = s.forwardRef(
206
206
  q.displayName = U;
207
207
  var Ee = "MenubarGroup", Be = s.forwardRef(
208
208
  (a, o) => {
209
- const { __scopeMenubar: r, ...n } = a, i = p(r);
210
- return /* @__PURE__ */ e(_e, { ...i, ...n, ref: o });
209
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
210
+ return /* @__PURE__ */ e(_e, { ...u, ...r, ref: o });
211
211
  }
212
212
  );
213
213
  Be.displayName = Ee;
214
214
  var Te = "MenubarLabel", Ie = s.forwardRef(
215
215
  (a, o) => {
216
- const { __scopeMenubar: r, ...n } = a, i = p(r);
217
- return /* @__PURE__ */ e(fe, { ...i, ...n, ref: o });
216
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
217
+ return /* @__PURE__ */ e(fe, { ...u, ...r, ref: o });
218
218
  }
219
219
  );
220
220
  Ie.displayName = Te;
221
221
  var ke = "MenubarItem", ee = s.forwardRef(
222
222
  (a, o) => {
223
- const { __scopeMenubar: r, ...n } = a, i = p(r);
224
- return /* @__PURE__ */ e(ve, { ...i, ...n, ref: o });
223
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
224
+ return /* @__PURE__ */ e(ve, { ...u, ...r, ref: o });
225
225
  }
226
226
  );
227
227
  ee.displayName = ke;
228
228
  var De = "MenubarCheckboxItem", Ge = s.forwardRef(
229
229
  (a, o) => {
230
- const { __scopeMenubar: r, ...n } = a, i = p(r);
231
- return /* @__PURE__ */ e(ge, { ...i, ...n, ref: o });
230
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
231
+ return /* @__PURE__ */ e(ge, { ...u, ...r, ref: o });
232
232
  }
233
233
  );
234
234
  Ge.displayName = De;
235
235
  var Ke = "MenubarRadioGroup", Le = s.forwardRef(
236
236
  (a, o) => {
237
- const { __scopeMenubar: r, ...n } = a, i = p(r);
238
- return /* @__PURE__ */ e(he, { ...i, ...n, ref: o });
237
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
238
+ return /* @__PURE__ */ e(he, { ...u, ...r, ref: o });
239
239
  }
240
240
  );
241
241
  Le.displayName = Ke;
242
242
  var Fe = "MenubarRadioItem", Ue = s.forwardRef(
243
243
  (a, o) => {
244
- const { __scopeMenubar: r, ...n } = a, i = p(r);
245
- return /* @__PURE__ */ e(Me, { ...i, ...n, ref: o });
244
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
245
+ return /* @__PURE__ */ e(Me, { ...u, ...r, ref: o });
246
246
  }
247
247
  );
248
248
  Ue.displayName = Fe;
249
249
  var Ve = "MenubarItemIndicator", je = s.forwardRef((a, o) => {
250
- const { __scopeMenubar: r, ...n } = a, i = p(r);
251
- return /* @__PURE__ */ e(Ne, { ...i, ...n, ref: o });
250
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
251
+ return /* @__PURE__ */ e(Ne, { ...u, ...r, ref: o });
252
252
  });
253
253
  je.displayName = Ve;
254
254
  var He = "MenubarSeparator", ze = s.forwardRef(
255
255
  (a, o) => {
256
- const { __scopeMenubar: r, ...n } = a, i = p(r);
257
- return /* @__PURE__ */ e(Ce, { ...i, ...n, ref: o });
256
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
257
+ return /* @__PURE__ */ e(Ce, { ...u, ...r, ref: o });
258
258
  }
259
259
  );
260
260
  ze.displayName = He;
261
261
  var Ye = "MenubarArrow", Qe = s.forwardRef(
262
262
  (a, o) => {
263
- const { __scopeMenubar: r, ...n } = a, i = p(r);
264
- return /* @__PURE__ */ e(Re, { ...i, ...n, ref: o });
263
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
264
+ return /* @__PURE__ */ e(Re, { ...u, ...r, ref: o });
265
265
  }
266
266
  );
267
267
  Qe.displayName = Ye;
268
268
  var Xe = "MenubarSubTrigger", Je = s.forwardRef(
269
269
  (a, o) => {
270
- const { __scopeMenubar: r, ...n } = a, i = p(r);
270
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
271
271
  return /* @__PURE__ */ e(
272
272
  Pe,
273
273
  {
274
274
  "data-radix-menubar-subtrigger": "",
275
- ...i,
276
- ...n,
275
+ ...u,
276
+ ...r,
277
277
  ref: o
278
278
  }
279
279
  );
@@ -282,13 +282,13 @@ var Xe = "MenubarSubTrigger", Je = s.forwardRef(
282
282
  Je.displayName = Xe;
283
283
  var We = "MenubarSubContent", Ze = s.forwardRef(
284
284
  (a, o) => {
285
- const { __scopeMenubar: r, ...n } = a, i = p(r);
285
+ const { __scopeMenubar: n, ...r } = a, u = p(n);
286
286
  return /* @__PURE__ */ e(
287
287
  we,
288
288
  {
289
- ...i,
289
+ ...u,
290
290
  "data-radix-menubar-content": "",
291
- ...n,
291
+ ...r,
292
292
  ref: o,
293
293
  style: {
294
294
  ...a.style,
@@ -304,10 +304,10 @@ var We = "MenubarSubContent", Ze = s.forwardRef(
304
304
  );
305
305
  Ze.displayName = We;
306
306
  function $e(a, o) {
307
- return a.map((r, n) => a[(o + n) % a.length]);
307
+ return a.map((n, r) => a[(o + r) % a.length]);
308
308
  }
309
- var A = X, y = W, O = Z, E = $, B = q, T = ee;
310
- const u = {
309
+ var A = X, O = W, E = Z, B = $, T = q, I = ee;
310
+ const i = {
311
311
  "navbar-wrapper": "NavBar-module__navbar-wrapper___e-f8y",
312
312
  "navbar-container": "NavBar-module__navbar-container___KnbUz",
313
313
  "navbar-logo-container": "NavBar-module__navbar-logo-container___VXWAo",
@@ -328,62 +328,64 @@ const u = {
328
328
  "navbar-menu-additional": "NavBar-module__navbar-menu-additional___B8kH-",
329
329
  "navbar-menu-additional-trigger": "NavBar-module__navbar-menu-additional-trigger___IpMHL",
330
330
  "navbar-menu-additional-icon": "NavBar-module__navbar-menu-additional-icon___jhULk",
331
+ "navbar-menu-additional-icon-notification": "NavBar-module__navbar-menu-additional-icon-notification___RH-yL",
332
+ "navbar-menu-additional-icon-help": "NavBar-module__navbar-menu-additional-icon-help___5sqmP",
331
333
  "navbar-menu-additional-user-profile": "NavBar-module__navbar-menu-additional-user-profile___ujsEv",
332
334
  "navbar-notification-container": "NavBar-module__navbar-notification-container___K2YeD",
333
335
  "navbar-notification-badge": "NavBar-module__navbar-notification-badge___vp5bK"
334
336
  };
335
- function ca({
337
+ function la({
336
338
  activeMenuItemHref: a,
337
339
  projectName: o,
338
- projectLogoIcon: r,
339
- projectLogoOnClick: n,
340
- projectTag: i,
340
+ projectLogoIcon: n,
341
+ projectLogoOnClick: r,
342
+ projectTag: u,
341
343
  menuItems: M,
342
344
  menuButton: v,
343
345
  additionalItems: t,
344
346
  className: d,
345
347
  maxWidth: _
346
348
  }) {
347
- const l = (b) => b ? a === b : !1, [g, m] = S(!1), [h, c] = S(!1), [f, w] = S(!1), [I, N] = S(null);
348
- return /* @__PURE__ */ e("div", { className: G(u["navbar-wrapper"], d), children: /* @__PURE__ */ C("div", { className: u["navbar-container"], style: {
349
+ const c = (b) => b ? a === b : !1, [g, m] = y(!1), [h, l] = y(!1), [f, w] = y(!1), [k, N] = y(null);
350
+ return /* @__PURE__ */ e("div", { className: x(i["navbar-wrapper"], d), children: /* @__PURE__ */ C("div", { className: i["navbar-container"], style: {
349
351
  maxWidth: _
350
352
  }, children: [
351
- /* @__PURE__ */ C("div", { className: u["navbar-logo-container"], children: [
352
- /* @__PURE__ */ e("a", { onClick: n, className: u["navbar-logo-link"], children: /* @__PURE__ */ e(re, { logo: r, color: "white" }) }),
353
- /* @__PURE__ */ e("span", { className: u["navbar-project-name-separator"] }),
354
- /* @__PURE__ */ e("span", { className: u["navbar-project-name"], children: o }),
355
- i && /* @__PURE__ */ e(ae, { type: "basic", color: "green", size: "md", structure: "border", label: i })
353
+ /* @__PURE__ */ C("div", { className: i["navbar-logo-container"], children: [
354
+ /* @__PURE__ */ e("a", { onClick: r, className: i["navbar-logo-link"], children: /* @__PURE__ */ e(ne, { logo: n, color: "white" }) }),
355
+ /* @__PURE__ */ e("span", { className: i["navbar-project-name-separator"] }),
356
+ /* @__PURE__ */ e("span", { className: i["navbar-project-name"], children: o }),
357
+ u && /* @__PURE__ */ e(ae, { type: "basic", color: "green", size: "md", structure: "border", label: u })
356
358
  ] }),
357
- /* @__PURE__ */ C("div", { className: u["navbar-menu"], children: [
358
- /* @__PURE__ */ e("div", { className: u["navbar-menu-button"], children: v }),
359
- /* @__PURE__ */ e(A, { className: u["navbar-menu-list"], children: M == null ? void 0 : M.map((b) => /* @__PURE__ */ e("div", { onPointerLeave: () => N(null), children: /* @__PURE__ */ C(y, { open: I === b.label, onOpenChange: (P) => N(P ? b.label : null), children: [
360
- /* @__PURE__ */ e(O, { "data-state": I === b.label ? "open" : "closed", onClick: () => N(b.label), onPointerMove: () => N(b.label), className: u["navbar-menu-list-item"], children: b.menuItems ? /* @__PURE__ */ C("span", { className: u["navbar-menu-list-item-trigger-container"], children: [
359
+ /* @__PURE__ */ C("div", { className: i["navbar-menu"], children: [
360
+ /* @__PURE__ */ e("div", { className: i["navbar-menu-button"], children: v }),
361
+ /* @__PURE__ */ e(A, { className: i["navbar-menu-list"], children: M == null ? void 0 : M.map((b) => /* @__PURE__ */ e("div", { onPointerLeave: () => N(null), children: /* @__PURE__ */ C(O, { open: k === b.label, onOpenChange: (P) => N(P ? b.label : null), children: [
362
+ /* @__PURE__ */ e(E, { "data-state": k === b.label ? "open" : "closed", onClick: () => N(b.label), onPointerMove: () => N(b.label), className: i["navbar-menu-list-item"], children: b.menuItems ? /* @__PURE__ */ C("span", { className: i["navbar-menu-list-item-trigger-container"], children: [
361
363
  /* @__PURE__ */ e("span", { children: b.label }),
362
- /* @__PURE__ */ e(D, { icon: "ap-icon-expand-more", className: G(u["navbar-menu-list-item-arrow"]) })
363
- ] }) : /* @__PURE__ */ e("a", { className: G(u["navbar-menu-list-item-action"], l(b.href) && u["navbar-menu-list-item-action-active"]), onClick: b.onClick, children: b.label }) }),
364
- b.menuItems && /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { className: u["navbar-menu-list-item-submenu"], children: b.menuItems.map((P) => /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: /* @__PURE__ */ e("a", { onClick: P.onClick, children: P.label }) }, P.label)) }) })
364
+ /* @__PURE__ */ e(G, { icon: "ap-icon-expand-more", className: x(i["navbar-menu-list-item-arrow"]) })
365
+ ] }) : /* @__PURE__ */ e("a", { className: x(i["navbar-menu-list-item-action"], c(b.href) && i["navbar-menu-list-item-action-active"]), onClick: b.onClick, children: b.label }) }),
366
+ b.menuItems && /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(T, { className: i["navbar-menu-list-item-submenu"], children: b.menuItems.map((P) => /* @__PURE__ */ e(I, { className: i["navbar-menu-list-item-submenu-item"], children: /* @__PURE__ */ e("a", { onClick: P.onClick, children: P.label }) }, P.label)) }) })
365
367
  ] }) }, b.label)) }),
366
- t && /* @__PURE__ */ e("span", { className: u["navbar-menu-additional-separator"] }),
367
- /* @__PURE__ */ C("div", { className: u["navbar-menu-additional"], children: [
368
- (t == null ? void 0 : t.notifications) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => m(!1), children: /* @__PURE__ */ C(y, { open: g, onOpenChange: m, children: [
369
- /* @__PURE__ */ e(O, { onClick: () => m(!0), onPointerMove: () => m(!0), className: u["navbar-menu-additional-trigger"], children: /* @__PURE__ */ C("div", { className: u["navbar-notification-container"], children: [
370
- /* @__PURE__ */ e(D, { icon: "ap-icon-notification-filled", className: u["navbar-menu-additional-icon"] }),
371
- t.notifications.count > 0 && /* @__PURE__ */ e("span", { className: u["navbar-notification-badge"], children: t.notifications.count > 99 ? "99+" : t.notifications.count })
368
+ t && /* @__PURE__ */ e("span", { className: i["navbar-menu-additional-separator"] }),
369
+ /* @__PURE__ */ C("div", { className: i["navbar-menu-additional"], children: [
370
+ (t == null ? void 0 : t.notifications) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => m(!1), children: /* @__PURE__ */ C(O, { open: g, onOpenChange: m, children: [
371
+ /* @__PURE__ */ e(E, { onClick: () => m(!0), onPointerMove: () => m(!0), className: i["navbar-menu-additional-trigger"], children: /* @__PURE__ */ C("div", { className: i["navbar-notification-container"], children: [
372
+ /* @__PURE__ */ e(G, { icon: "ap-icon-notification-filled", className: x(i["navbar-menu-additional-icon"], i["navbar-menu-additional-icon-notification"]) }),
373
+ t.notifications.count > 0 && /* @__PURE__ */ e("span", { className: i["navbar-notification-badge"], children: t.notifications.count > 99 ? "99+" : t.notifications.count })
372
374
  ] }) }),
373
- /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { align: "end", className: u["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: t.notifications.content }) }) })
375
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(T, { align: "end", className: i["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(I, { className: i["navbar-menu-list-item-submenu-item"], children: t.notifications.content }) }) })
374
376
  ] }) }) }),
375
- (t == null ? void 0 : t.help) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => c(!1), children: /* @__PURE__ */ C(y, { open: h, onOpenChange: c, children: [
376
- /* @__PURE__ */ e(O, { onClick: () => c(!0), onPointerMove: () => c(!0), className: u["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e(D, { icon: "ap-icon-help-filled", className: u["navbar-menu-additional-icon"] }) }),
377
- /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { align: "end", className: u["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: t.help }) }) })
377
+ (t == null ? void 0 : t.help) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => l(!1), children: /* @__PURE__ */ C(O, { open: h, onOpenChange: l, children: [
378
+ /* @__PURE__ */ e(E, { onClick: () => l(!0), onPointerMove: () => l(!0), className: i["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e(G, { icon: "ap-icon-help-filled", className: x(i["navbar-menu-additional-icon"], i["navbar-menu-additional-icon-help"]) }) }),
379
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(T, { align: "end", className: i["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(I, { className: i["navbar-menu-list-item-submenu-item"], children: t.help }) }) })
378
380
  ] }) }) }),
379
- (t == null ? void 0 : t.userProfile) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => w(!1), children: /* @__PURE__ */ C(y, { open: f, onOpenChange: w, children: [
380
- /* @__PURE__ */ e(O, { onClick: () => w(!0), onPointerMove: () => w(!0), className: u["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e("span", { className: u["navbar-menu-additional-user-profile"], children: t.userProfile.initials }) }),
381
- /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { align: "end", className: u["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: t.userProfile.content }) }) })
381
+ (t == null ? void 0 : t.userProfile) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => w(!1), children: /* @__PURE__ */ C(O, { open: f, onOpenChange: w, children: [
382
+ /* @__PURE__ */ e(E, { onClick: () => w(!0), onPointerMove: () => w(!0), className: i["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e("span", { className: i["navbar-menu-additional-user-profile"], children: t.userProfile.initials }) }),
383
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(T, { align: "end", className: i["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(I, { className: i["navbar-menu-list-item-submenu-item"], children: t.userProfile.content }) }) })
382
384
  ] }) }) })
383
385
  ] })
384
386
  ] })
385
387
  ] }) });
386
388
  }
387
389
  export {
388
- ca as default
390
+ la as default
389
391
  };
@@ -4,6 +4,7 @@ type TabNavigationProps = {
4
4
  className?: string;
5
5
  children?: ReactNode;
6
6
  align?: 'left' | 'center' | 'right';
7
+ noUnderline?: boolean;
7
8
  } & DataAttributes;
8
- export default function TabNavigation({ children, align, className, ...props }: TabNavigationProps): import("react/jsx-runtime").JSX.Element;
9
+ export default function TabNavigation({ children, align, className, noUnderline, ...props }: TabNavigationProps): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -10,10 +10,11 @@ import '../../assets/TabNavigation.css';const a = {
10
10
  function b({
11
11
  children: _,
12
12
  align: i = "center",
13
- className: o,
14
- ...e
13
+ className: e,
14
+ noUnderline: o = !1,
15
+ ...g
15
16
  }) {
16
- return /* @__PURE__ */ t("div", { className: n(a["tab-navigation"]), ...e, children: /* @__PURE__ */ t("div", { className: n(a["tab-navigation-items"], i && a[`align-${i}`], o), children: _ }) });
17
+ return /* @__PURE__ */ t("div", { className: o ? "" : n(a["tab-navigation"]), ...g, children: /* @__PURE__ */ t("div", { className: n(a["tab-navigation-items"], i && a[`align-${i}`], e), children: _ }) });
17
18
  }
18
19
  export {
19
20
  b as default
package/dist/main.d.ts CHANGED
@@ -27,5 +27,6 @@ export { default as NavBar, type MenuItem, type Notifications, type UserProfile,
27
27
  export { default as Tag, type TagColors } from './components/Tag/Tag.tsx';
28
28
  export { default as Tooltip, type TooltipProps } from './components/Tooltip/Tooltip.tsx';
29
29
  export { default as Spinner } from './components/Spinner/Spinner.tsx';
30
+ export { default as Illustration, type IllustrationCategory, type IllustrationLevel, type IllustrationName, type IllustrationProps, } from './components/Illustration/Illustration.tsx';
30
31
  export { apLogos } from './assets/ap-logos';
31
32
  export type { ApIcon } from './assets/ap-icons-types';