@dybo-ai/design 1.1.0 → 1.3.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.
package/dist/index.d.cts CHANGED
@@ -28,6 +28,59 @@ interface IBadgeProps extends HTMLAttributes<HTMLSpanElement> {
28
28
  }
29
29
  declare function Badge({ status, className, ...props }: IBadgeProps): react.JSX.Element;
30
30
 
31
+ interface IIconRailItemProps extends HTMLAttributes<HTMLAnchorElement> {
32
+ href?: string;
33
+ active?: boolean;
34
+ title?: string;
35
+ children: ReactNode;
36
+ }
37
+ interface IIconRailProps {
38
+ brand: ReactNode;
39
+ children?: ReactNode;
40
+ className?: string;
41
+ }
42
+ declare function IconRailItem({ active, className, children, ...props }: IIconRailItemProps): react.JSX.Element;
43
+ declare function IconRail({ brand, children, className }: IIconRailProps): react.JSX.Element;
44
+
45
+ interface INavTab {
46
+ key: string;
47
+ label: string;
48
+ disabled?: boolean;
49
+ }
50
+ interface INavTabsProps {
51
+ tabs: INavTab[];
52
+ active: string;
53
+ onChange: (key: string) => void;
54
+ className?: string;
55
+ }
56
+ declare function NavTabs({ tabs, active, onChange, className }: INavTabsProps): react.JSX.Element;
57
+
58
+ interface IScopeTab {
59
+ key: string;
60
+ label: string;
61
+ count?: number;
62
+ disabled?: boolean;
63
+ }
64
+ interface IScopeTabsProps {
65
+ tabs: IScopeTab[];
66
+ active: string;
67
+ onChange: (key: string) => void;
68
+ className?: string;
69
+ }
70
+ declare function ScopeTabs({ tabs, active, onChange, className }: IScopeTabsProps): react.JSX.Element;
71
+
72
+ type PriorityLevel = "urgent" | "high" | "medium" | "low" | "none";
73
+ interface IPriorityBadgeProps extends HTMLAttributes<HTMLSpanElement> {
74
+ priority: PriorityLevel;
75
+ }
76
+ declare function PriorityBadge({ priority, className, children, ...props }: IPriorityBadgeProps): react.JSX.Element;
77
+
78
+ type TicketStatus = "open" | "pending" | "snoozed" | "resolved";
79
+ interface ITicketStatusBadgeProps extends HTMLAttributes<HTMLSpanElement> {
80
+ status: TicketStatus;
81
+ }
82
+ declare function TicketStatusBadge({ status, className, children, ...props }: ITicketStatusBadgeProps): react.JSX.Element;
83
+
31
84
  interface IAppShellProps {
32
85
  sidebar: ReactNode;
33
86
  topBar?: ReactNode;
@@ -150,6 +203,19 @@ interface IModalProps {
150
203
  }
151
204
  declare function Modal({ open, onClose, title, children, footer, maxWidth, closeOnBackdrop, }: IModalProps): react.ReactPortal | null;
152
205
 
206
+ interface IDrawerProps {
207
+ open: boolean;
208
+ onClose: () => void;
209
+ title?: string;
210
+ children: ReactNode;
211
+ footer?: ReactNode;
212
+ side?: "left" | "right";
213
+ width?: number | string;
214
+ closeOnBackdrop?: boolean;
215
+ hideHeader?: boolean;
216
+ }
217
+ declare function Drawer({ open, onClose, title, children, footer, side, width, closeOnBackdrop, hideHeader, }: IDrawerProps): react.ReactPortal | null;
218
+
153
219
  interface ILoginCardProps {
154
220
  logo?: ReactNode;
155
221
  subtitle?: string;
@@ -158,4 +224,4 @@ interface ILoginCardProps {
158
224
  }
159
225
  declare function LoginCard({ logo, subtitle, children, className, }: ILoginCardProps): react.JSX.Element;
160
226
 
161
- export { Alert, type AlertVariant, AppShell, Badge, type BadgeStatus, Button, type ButtonSize, type ButtonVariant, Card, type ColumnAlign, DataTable, type IAlertProps, type IAppShellProps, type IBadgeProps, type IButtonProps, type ICardProps, type IColumn, type IDataTableProps, type IInputProps, type ILoginCardProps, type IModalProps, type INavItemProps, type INavSectionProps, type IOverviewField, type IOverviewFieldProps, type IOverviewGridProps, type ISelectOption, type ISelectProps, type ISidebarProps, type ISidebarUser, type ITab, type ITabsProps, type ITopBarProps, Input, LoginCard, Modal, NavItem, NavSection, OverviewField, OverviewGrid, Select, Sidebar, Tabs, TopBar };
227
+ export { Alert, type AlertVariant, AppShell, Badge, type BadgeStatus, Button, type ButtonSize, type ButtonVariant, Card, type ColumnAlign, DataTable, Drawer, type IAlertProps, type IAppShellProps, type IBadgeProps, type IButtonProps, type ICardProps, type IColumn, type IDataTableProps, type IDrawerProps, type IIconRailItemProps, type IIconRailProps, type IInputProps, type ILoginCardProps, type IModalProps, type INavItemProps, type INavSectionProps, type INavTab, type INavTabsProps, type IOverviewField, type IOverviewFieldProps, type IOverviewGridProps, type IPriorityBadgeProps, type IScopeTab, type IScopeTabsProps, type ISelectOption, type ISelectProps, type ISidebarProps, type ISidebarUser, type ITab, type ITabsProps, type ITicketStatusBadgeProps, type ITopBarProps, IconRail, IconRailItem, Input, LoginCard, Modal, NavItem, NavSection, NavTabs, OverviewField, OverviewGrid, PriorityBadge, type PriorityLevel, ScopeTabs, Select, Sidebar, Tabs, type TicketStatus, TicketStatusBadge, TopBar };
package/dist/index.d.ts CHANGED
@@ -28,6 +28,59 @@ interface IBadgeProps extends HTMLAttributes<HTMLSpanElement> {
28
28
  }
29
29
  declare function Badge({ status, className, ...props }: IBadgeProps): react.JSX.Element;
30
30
 
31
+ interface IIconRailItemProps extends HTMLAttributes<HTMLAnchorElement> {
32
+ href?: string;
33
+ active?: boolean;
34
+ title?: string;
35
+ children: ReactNode;
36
+ }
37
+ interface IIconRailProps {
38
+ brand: ReactNode;
39
+ children?: ReactNode;
40
+ className?: string;
41
+ }
42
+ declare function IconRailItem({ active, className, children, ...props }: IIconRailItemProps): react.JSX.Element;
43
+ declare function IconRail({ brand, children, className }: IIconRailProps): react.JSX.Element;
44
+
45
+ interface INavTab {
46
+ key: string;
47
+ label: string;
48
+ disabled?: boolean;
49
+ }
50
+ interface INavTabsProps {
51
+ tabs: INavTab[];
52
+ active: string;
53
+ onChange: (key: string) => void;
54
+ className?: string;
55
+ }
56
+ declare function NavTabs({ tabs, active, onChange, className }: INavTabsProps): react.JSX.Element;
57
+
58
+ interface IScopeTab {
59
+ key: string;
60
+ label: string;
61
+ count?: number;
62
+ disabled?: boolean;
63
+ }
64
+ interface IScopeTabsProps {
65
+ tabs: IScopeTab[];
66
+ active: string;
67
+ onChange: (key: string) => void;
68
+ className?: string;
69
+ }
70
+ declare function ScopeTabs({ tabs, active, onChange, className }: IScopeTabsProps): react.JSX.Element;
71
+
72
+ type PriorityLevel = "urgent" | "high" | "medium" | "low" | "none";
73
+ interface IPriorityBadgeProps extends HTMLAttributes<HTMLSpanElement> {
74
+ priority: PriorityLevel;
75
+ }
76
+ declare function PriorityBadge({ priority, className, children, ...props }: IPriorityBadgeProps): react.JSX.Element;
77
+
78
+ type TicketStatus = "open" | "pending" | "snoozed" | "resolved";
79
+ interface ITicketStatusBadgeProps extends HTMLAttributes<HTMLSpanElement> {
80
+ status: TicketStatus;
81
+ }
82
+ declare function TicketStatusBadge({ status, className, children, ...props }: ITicketStatusBadgeProps): react.JSX.Element;
83
+
31
84
  interface IAppShellProps {
32
85
  sidebar: ReactNode;
33
86
  topBar?: ReactNode;
@@ -150,6 +203,19 @@ interface IModalProps {
150
203
  }
151
204
  declare function Modal({ open, onClose, title, children, footer, maxWidth, closeOnBackdrop, }: IModalProps): react.ReactPortal | null;
152
205
 
206
+ interface IDrawerProps {
207
+ open: boolean;
208
+ onClose: () => void;
209
+ title?: string;
210
+ children: ReactNode;
211
+ footer?: ReactNode;
212
+ side?: "left" | "right";
213
+ width?: number | string;
214
+ closeOnBackdrop?: boolean;
215
+ hideHeader?: boolean;
216
+ }
217
+ declare function Drawer({ open, onClose, title, children, footer, side, width, closeOnBackdrop, hideHeader, }: IDrawerProps): react.ReactPortal | null;
218
+
153
219
  interface ILoginCardProps {
154
220
  logo?: ReactNode;
155
221
  subtitle?: string;
@@ -158,4 +224,4 @@ interface ILoginCardProps {
158
224
  }
159
225
  declare function LoginCard({ logo, subtitle, children, className, }: ILoginCardProps): react.JSX.Element;
160
226
 
161
- export { Alert, type AlertVariant, AppShell, Badge, type BadgeStatus, Button, type ButtonSize, type ButtonVariant, Card, type ColumnAlign, DataTable, type IAlertProps, type IAppShellProps, type IBadgeProps, type IButtonProps, type ICardProps, type IColumn, type IDataTableProps, type IInputProps, type ILoginCardProps, type IModalProps, type INavItemProps, type INavSectionProps, type IOverviewField, type IOverviewFieldProps, type IOverviewGridProps, type ISelectOption, type ISelectProps, type ISidebarProps, type ISidebarUser, type ITab, type ITabsProps, type ITopBarProps, Input, LoginCard, Modal, NavItem, NavSection, OverviewField, OverviewGrid, Select, Sidebar, Tabs, TopBar };
227
+ export { Alert, type AlertVariant, AppShell, Badge, type BadgeStatus, Button, type ButtonSize, type ButtonVariant, Card, type ColumnAlign, DataTable, Drawer, type IAlertProps, type IAppShellProps, type IBadgeProps, type IButtonProps, type ICardProps, type IColumn, type IDataTableProps, type IDrawerProps, type IIconRailItemProps, type IIconRailProps, type IInputProps, type ILoginCardProps, type IModalProps, type INavItemProps, type INavSectionProps, type INavTab, type INavTabsProps, type IOverviewField, type IOverviewFieldProps, type IOverviewGridProps, type IPriorityBadgeProps, type IScopeTab, type IScopeTabsProps, type ISelectOption, type ISelectProps, type ISidebarProps, type ISidebarUser, type ITab, type ITabsProps, type ITicketStatusBadgeProps, type ITopBarProps, IconRail, IconRailItem, Input, LoginCard, Modal, NavItem, NavSection, NavTabs, OverviewField, OverviewGrid, PriorityBadge, type PriorityLevel, ScopeTabs, Select, Sidebar, Tabs, type TicketStatus, TicketStatusBadge, TopBar };
package/dist/index.js CHANGED
@@ -110,13 +110,122 @@ function Badge({ status = "brand", className, ...props }) {
110
110
  );
111
111
  }
112
112
  var cx5 = (...c) => c.filter(Boolean).join(" ");
113
+ function IconRailItem({
114
+ active = false,
115
+ className,
116
+ children,
117
+ ...props
118
+ }) {
119
+ return /* @__PURE__ */ jsx(
120
+ "a",
121
+ {
122
+ className: cx5(
123
+ "dybo-icon-rail__item",
124
+ active ? "dybo-icon-rail__item--active" : void 0,
125
+ className
126
+ ),
127
+ ...props,
128
+ children
129
+ }
130
+ );
131
+ }
132
+ function IconRail({ brand, children, className }) {
133
+ return /* @__PURE__ */ jsxs("aside", { className: cx5("dybo-icon-rail", className), children: [
134
+ /* @__PURE__ */ jsx("div", { className: "dybo-icon-rail__brand", children: brand }),
135
+ /* @__PURE__ */ jsx("div", { className: "dybo-icon-rail__nav", children: /* @__PURE__ */ jsx("div", { className: "dybo-icon-rail__pill", children: /* @__PURE__ */ jsx("nav", { className: "dybo-icon-rail__items", children }) }) })
136
+ ] });
137
+ }
138
+ var cx6 = (...c) => c.filter(Boolean).join(" ");
139
+ function NavTabs({ tabs, active, onChange, className }) {
140
+ return /* @__PURE__ */ jsx("div", { className: cx6("dybo-navtabs", className), role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsx(
141
+ "button",
142
+ {
143
+ type: "button",
144
+ role: "tab",
145
+ "aria-selected": tab.key === active,
146
+ disabled: tab.disabled,
147
+ className: cx6(
148
+ "dybo-navtab",
149
+ tab.key === active ? "dybo-navtab--active" : void 0
150
+ ),
151
+ onClick: () => !tab.disabled && onChange(tab.key),
152
+ children: tab.label
153
+ },
154
+ tab.key
155
+ )) });
156
+ }
157
+ var cx7 = (...c) => c.filter(Boolean).join(" ");
158
+ function ScopeTabs({ tabs, active, onChange, className }) {
159
+ return /* @__PURE__ */ jsx("div", { className: cx7("dybo-scope", className), role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsxs(
160
+ "button",
161
+ {
162
+ type: "button",
163
+ role: "tab",
164
+ "aria-selected": tab.key === active,
165
+ disabled: tab.disabled,
166
+ className: cx7(
167
+ "dybo-scope-tab",
168
+ tab.key === active ? "dybo-scope-tab--active" : void 0
169
+ ),
170
+ onClick: () => !tab.disabled && onChange(tab.key),
171
+ children: [
172
+ tab.label,
173
+ tab.count !== void 0 && /* @__PURE__ */ jsx("span", { className: "dybo-scope-count", children: tab.count })
174
+ ]
175
+ },
176
+ tab.key
177
+ )) });
178
+ }
179
+ var cx8 = (...c) => c.filter(Boolean).join(" ");
180
+ function PriorityBadge({
181
+ priority,
182
+ className,
183
+ children,
184
+ ...props
185
+ }) {
186
+ return /* @__PURE__ */ jsx(
187
+ "span",
188
+ {
189
+ className: cx8("dybo-priority", `dybo-priority--${priority}`, className),
190
+ ...props,
191
+ children: children ?? priority
192
+ }
193
+ );
194
+ }
195
+ var cx9 = (...c) => c.filter(Boolean).join(" ");
196
+ var defaultLabels = {
197
+ open: "Open",
198
+ pending: "Pending",
199
+ snoozed: "Snoozed",
200
+ resolved: "Resolved"
201
+ };
202
+ function TicketStatusBadge({
203
+ status,
204
+ className,
205
+ children,
206
+ ...props
207
+ }) {
208
+ return /* @__PURE__ */ jsx(
209
+ "span",
210
+ {
211
+ className: cx9(
212
+ "dybo-ticket-status",
213
+ `dybo-ticket-status--${status}`,
214
+ className
215
+ ),
216
+ ...props,
217
+ children: children ?? defaultLabels[status]
218
+ }
219
+ );
220
+ }
221
+ var cx10 = (...c) => c.filter(Boolean).join(" ");
113
222
  function AppShell({
114
223
  sidebar,
115
224
  topBar,
116
225
  children,
117
226
  className
118
227
  }) {
119
- return /* @__PURE__ */ jsxs("div", { className: cx5("dybo-app-shell", className), children: [
228
+ return /* @__PURE__ */ jsxs("div", { className: cx10("dybo-app-shell", className), children: [
120
229
  sidebar,
121
230
  /* @__PURE__ */ jsxs("div", { className: "dybo-main", children: [
122
231
  topBar,
@@ -124,7 +233,7 @@ function AppShell({
124
233
  ] })
125
234
  ] });
126
235
  }
127
- var cx6 = (...c) => c.filter(Boolean).join(" ");
236
+ var cx11 = (...c) => c.filter(Boolean).join(" ");
128
237
  function Sidebar({
129
238
  brand,
130
239
  children,
@@ -133,7 +242,7 @@ function Sidebar({
133
242
  onLogout,
134
243
  className
135
244
  }) {
136
- return /* @__PURE__ */ jsxs("aside", { className: cx6("dybo-sidebar", className), children: [
245
+ return /* @__PURE__ */ jsxs("aside", { className: cx11("dybo-sidebar", className), children: [
137
246
  brand && /* @__PURE__ */ jsx("div", { className: "dybo-sidebar__brand", children: brand }),
138
247
  /* @__PURE__ */ jsx("nav", { className: "dybo-sidebar__nav", children }),
139
248
  /* @__PURE__ */ jsxs("div", { className: "dybo-sidebar__footer", children: [
@@ -174,14 +283,14 @@ function Sidebar({
174
283
  ] })
175
284
  ] });
176
285
  }
177
- var cx7 = (...c) => c.filter(Boolean).join(" ");
286
+ var cx12 = (...c) => c.filter(Boolean).join(" ");
178
287
  function TopBar({ title, children, className }) {
179
- return /* @__PURE__ */ jsxs("header", { className: cx7("dybo-topbar", className), children: [
288
+ return /* @__PURE__ */ jsxs("header", { className: cx12("dybo-topbar", className), children: [
180
289
  /* @__PURE__ */ jsx("span", { className: "dybo-topbar__title", children: title }),
181
290
  children
182
291
  ] });
183
292
  }
184
- var cx8 = (...c) => c.filter(Boolean).join(" ");
293
+ var cx13 = (...c) => c.filter(Boolean).join(" ");
185
294
  function NavItem({
186
295
  label,
187
296
  href,
@@ -190,7 +299,7 @@ function NavItem({
190
299
  onClick,
191
300
  className
192
301
  }) {
193
- const baseClass = cx8(
302
+ const baseClass = cx13(
194
303
  "dybo-nav-item",
195
304
  active ? "dybo-nav-item--active" : void 0,
196
305
  className
@@ -207,7 +316,7 @@ function NavItem({
207
316
  function NavSection({ label }) {
208
317
  return /* @__PURE__ */ jsx("div", { className: "dybo-sidebar__section", children: label });
209
318
  }
210
- var cx9 = (...c) => c.filter(Boolean).join(" ");
319
+ var cx14 = (...c) => c.filter(Boolean).join(" ");
211
320
  function DataTable({
212
321
  columns,
213
322
  rows,
@@ -221,11 +330,11 @@ function DataTable({
221
330
  if (typeof rowKey === "function") return rowKey(row, index);
222
331
  return row[rowKey];
223
332
  }
224
- return /* @__PURE__ */ jsx("div", { className: cx9("dybo-table-wrap", className), children: /* @__PURE__ */ jsxs("table", { className: "dybo-table", children: [
333
+ return /* @__PURE__ */ jsx("div", { className: cx14("dybo-table-wrap", className), children: /* @__PURE__ */ jsxs("table", { className: "dybo-table", children: [
225
334
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((col) => /* @__PURE__ */ jsx(
226
335
  "th",
227
336
  {
228
- className: cx9(
337
+ className: cx14(
229
338
  col.align === "left" ? "left" : void 0,
230
339
  col.className
231
340
  ),
@@ -247,7 +356,7 @@ function DataTable({
247
356
  ) }) : rows.map((row, index) => /* @__PURE__ */ jsx(
248
357
  "tr",
249
358
  {
250
- className: cx9(
359
+ className: cx14(
251
360
  onRowClick ? "dybo-table__row--clickable" : void 0
252
361
  ),
253
362
  onClick: onRowClick ? () => onRowClick(row) : void 0,
@@ -256,7 +365,7 @@ function DataTable({
256
365
  return /* @__PURE__ */ jsx(
257
366
  "td",
258
367
  {
259
- className: cx9(
368
+ className: cx14(
260
369
  col.align === "left" ? "left" : void 0,
261
370
  col.className
262
371
  ),
@@ -270,16 +379,16 @@ function DataTable({
270
379
  )) })
271
380
  ] }) });
272
381
  }
273
- var cx10 = (...c) => c.filter(Boolean).join(" ");
382
+ var cx15 = (...c) => c.filter(Boolean).join(" ");
274
383
  function Tabs({ tabs, active, onChange, className }) {
275
- return /* @__PURE__ */ jsx("div", { className: cx10("dybo-tabs", className), role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsx(
384
+ return /* @__PURE__ */ jsx("div", { className: cx15("dybo-tabs", className), role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsx(
276
385
  "button",
277
386
  {
278
387
  type: "button",
279
388
  role: "tab",
280
389
  "aria-selected": tab.key === active,
281
390
  disabled: tab.disabled,
282
- className: cx10(
391
+ className: cx15(
283
392
  "dybo-tab",
284
393
  tab.key === active ? "dybo-tab--active" : void 0
285
394
  ),
@@ -289,22 +398,22 @@ function Tabs({ tabs, active, onChange, className }) {
289
398
  tab.key
290
399
  )) });
291
400
  }
292
- var cx11 = (...c) => c.filter(Boolean).join(" ");
401
+ var cx16 = (...c) => c.filter(Boolean).join(" ");
293
402
  function OverviewField({
294
403
  label,
295
404
  value,
296
405
  className,
297
406
  style
298
407
  }) {
299
- return /* @__PURE__ */ jsxs("div", { className: cx11("dybo-overview-field", className), style, children: [
408
+ return /* @__PURE__ */ jsxs("div", { className: cx16("dybo-overview-field", className), style, children: [
300
409
  /* @__PURE__ */ jsx("span", { className: "dybo-overview-field__label", children: label }),
301
410
  /* @__PURE__ */ jsx("span", { className: "dybo-overview-field__value", children: value })
302
411
  ] });
303
412
  }
304
413
  function OverviewGrid({ fields, className }) {
305
- return /* @__PURE__ */ jsx("div", { className: cx11("dybo-overview-grid", className), children: fields.map((field, i) => /* @__PURE__ */ jsx(OverviewField, { ...field }, i)) });
414
+ return /* @__PURE__ */ jsx("div", { className: cx16("dybo-overview-grid", className), children: fields.map((field, i) => /* @__PURE__ */ jsx(OverviewField, { ...field }, i)) });
306
415
  }
307
- var cx12 = (...c) => c.filter(Boolean).join(" ");
416
+ var cx17 = (...c) => c.filter(Boolean).join(" ");
308
417
  function Select({
309
418
  label,
310
419
  error,
@@ -332,7 +441,7 @@ function Select({
332
441
  "select",
333
442
  {
334
443
  id: selectId,
335
- className: cx12("dybo-select", className),
444
+ className: cx17("dybo-select", className),
336
445
  style: error ? {
337
446
  borderColor: "var(--dybo-danger)",
338
447
  boxShadow: "0 0 0 3px rgba(162,26,23,0.12)"
@@ -363,7 +472,7 @@ var icons = {
363
472
  danger: "\u2715",
364
473
  info: "\u2139"
365
474
  };
366
- var cx13 = (...c) => c.filter(Boolean).join(" ");
475
+ var cx18 = (...c) => c.filter(Boolean).join(" ");
367
476
  function Alert({
368
477
  variant = "info",
369
478
  children,
@@ -373,7 +482,7 @@ function Alert({
373
482
  return /* @__PURE__ */ jsxs(
374
483
  "div",
375
484
  {
376
- className: cx13("dybo-alert", `dybo-alert--${variant}`, className),
485
+ className: cx18("dybo-alert", `dybo-alert--${variant}`, className),
377
486
  role: "alert",
378
487
  children: [
379
488
  /* @__PURE__ */ jsx("span", { style: { flexShrink: 0, fontWeight: 700 }, children: icons[variant] }),
@@ -468,14 +577,90 @@ function Modal({
468
577
  document.body
469
578
  );
470
579
  }
471
- var cx14 = (...c) => c.filter(Boolean).join(" ");
580
+ function Drawer({
581
+ open,
582
+ onClose,
583
+ title,
584
+ children,
585
+ footer,
586
+ side = "right",
587
+ width,
588
+ closeOnBackdrop = true,
589
+ hideHeader = false
590
+ }) {
591
+ useEffect(() => {
592
+ if (!open) return;
593
+ function onKeyDown(e) {
594
+ if (e.key === "Escape") onClose();
595
+ }
596
+ document.addEventListener("keydown", onKeyDown);
597
+ return () => document.removeEventListener("keydown", onKeyDown);
598
+ }, [open, onClose]);
599
+ if (!open) return null;
600
+ const panelClass = side === "left" ? "dybo-drawer-panel dybo-drawer-panel--left" : "dybo-drawer-panel dybo-drawer-panel--right";
601
+ return createPortal(
602
+ /* @__PURE__ */ jsxs(Fragment, { children: [
603
+ /* @__PURE__ */ jsx(
604
+ "div",
605
+ {
606
+ className: "dybo-drawer-backdrop",
607
+ onClick: closeOnBackdrop ? onClose : void 0,
608
+ "aria-hidden": true
609
+ }
610
+ ),
611
+ /* @__PURE__ */ jsxs(
612
+ "aside",
613
+ {
614
+ className: panelClass,
615
+ style: width !== void 0 ? { width, maxWidth: "100%" } : void 0,
616
+ "aria-modal": "true",
617
+ role: "dialog",
618
+ onClick: (e) => e.stopPropagation(),
619
+ children: [
620
+ !hideHeader && /* @__PURE__ */ jsxs("div", { className: "dybo-drawer-panel__header", children: [
621
+ title ? /* @__PURE__ */ jsx("h2", { className: "dybo-drawer-panel__title", children: title }) : /* @__PURE__ */ jsx("span", {}),
622
+ /* @__PURE__ */ jsx(
623
+ "button",
624
+ {
625
+ type: "button",
626
+ className: "dybo-drawer-panel__close",
627
+ onClick: onClose,
628
+ "aria-label": "Close",
629
+ children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
630
+ "path",
631
+ {
632
+ d: "M2 2l12 12M14 2L2 14",
633
+ stroke: "currentColor",
634
+ strokeWidth: "2",
635
+ strokeLinecap: "round"
636
+ }
637
+ ) })
638
+ }
639
+ )
640
+ ] }),
641
+ /* @__PURE__ */ jsx(
642
+ "div",
643
+ {
644
+ className: hideHeader ? "dybo-drawer-panel__body dybo-drawer-panel__body--flush" : "dybo-drawer-panel__body",
645
+ children
646
+ }
647
+ ),
648
+ footer && /* @__PURE__ */ jsx("div", { className: "dybo-drawer-panel__footer", children: footer })
649
+ ]
650
+ }
651
+ )
652
+ ] }),
653
+ document.body
654
+ );
655
+ }
656
+ var cx19 = (...c) => c.filter(Boolean).join(" ");
472
657
  function LoginCard({
473
658
  logo,
474
659
  subtitle,
475
660
  children,
476
661
  className
477
662
  }) {
478
- return /* @__PURE__ */ jsx("div", { className: "dybo-login-wrap", children: /* @__PURE__ */ jsxs("div", { className: cx14("dybo-login-card", className), children: [
663
+ return /* @__PURE__ */ jsx("div", { className: "dybo-login-wrap", children: /* @__PURE__ */ jsxs("div", { className: cx19("dybo-login-card", className), children: [
479
664
  logo && /* @__PURE__ */ jsx(
480
665
  "div",
481
666
  {
@@ -492,6 +677,6 @@ function LoginCard({
492
677
  ] }) });
493
678
  }
494
679
 
495
- export { Alert, AppShell, Badge, Button, Card, DataTable, Input, LoginCard, Modal, NavItem, NavSection, OverviewField, OverviewGrid, Select, Sidebar, Tabs, TopBar };
680
+ export { Alert, AppShell, Badge, Button, Card, DataTable, Drawer, IconRail, IconRailItem, Input, LoginCard, Modal, NavItem, NavSection, NavTabs, OverviewField, OverviewGrid, PriorityBadge, ScopeTabs, Select, Sidebar, Tabs, TicketStatusBadge, TopBar };
496
681
  //# sourceMappingURL=index.js.map
497
682
  //# sourceMappingURL=index.js.map