@camtomlabs/malix-design-system 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/LICENSE +19 -5
  2. package/README.md +141 -10
  3. package/dist/index.cjs +2456 -0
  4. package/dist/index.d.cts +562 -0
  5. package/dist/index.d.ts +562 -0
  6. package/dist/index.js +2367 -0
  7. package/package.json +21 -8
  8. package/src/styles.css +186 -0
  9. package/src/components/Accordion.tsx +0 -52
  10. package/src/components/Avatar.tsx +0 -18
  11. package/src/components/Badge.tsx +0 -27
  12. package/src/components/Banner.tsx +0 -75
  13. package/src/components/Breadcrumb.tsx +0 -58
  14. package/src/components/Button.tsx +0 -47
  15. package/src/components/Card.tsx +0 -34
  16. package/src/components/ChatInput.tsx +0 -53
  17. package/src/components/Checkbox.tsx +0 -85
  18. package/src/components/CreditsIndicator.tsx +0 -41
  19. package/src/components/DataTable.tsx +0 -75
  20. package/src/components/DateInput.tsx +0 -57
  21. package/src/components/Divider.tsx +0 -12
  22. package/src/components/Dropzone.tsx +0 -94
  23. package/src/components/EmptyState.tsx +0 -65
  24. package/src/components/FileCard.tsx +0 -78
  25. package/src/components/FilterTabs.tsx +0 -49
  26. package/src/components/FlyoutMenu.tsx +0 -36
  27. package/src/components/GlassPopover.tsx +0 -38
  28. package/src/components/Header.tsx +0 -22
  29. package/src/components/Input.tsx +0 -18
  30. package/src/components/InputGroup.tsx +0 -37
  31. package/src/components/LanguageSelector.tsx +0 -81
  32. package/src/components/Modal.tsx +0 -104
  33. package/src/components/OnboardingPopover.tsx +0 -61
  34. package/src/components/OperationStatus.tsx +0 -73
  35. package/src/components/Overlay.tsx +0 -66
  36. package/src/components/Pagination.tsx +0 -89
  37. package/src/components/Pill.tsx +0 -19
  38. package/src/components/PricingCard.tsx +0 -74
  39. package/src/components/ProgressBar.tsx +0 -47
  40. package/src/components/Radio.tsx +0 -56
  41. package/src/components/SectionHeader.tsx +0 -32
  42. package/src/components/SegmentedControl.tsx +0 -42
  43. package/src/components/Select.tsx +0 -62
  44. package/src/components/SelectGroup.tsx +0 -32
  45. package/src/components/SelectionCard.tsx +0 -47
  46. package/src/components/SidebarItem.tsx +0 -27
  47. package/src/components/SidebarPanel.tsx +0 -84
  48. package/src/components/SplitPane.tsx +0 -85
  49. package/src/components/StatCard.tsx +0 -64
  50. package/src/components/StatusDot.tsx +0 -26
  51. package/src/components/Stepper.tsx +0 -40
  52. package/src/components/TabBar.tsx +0 -45
  53. package/src/components/Textarea.tsx +0 -43
  54. package/src/components/Toggle.tsx +0 -50
  55. package/src/components/Tooltip.tsx +0 -33
  56. package/src/components/UserProfilePopover.tsx +0 -100
  57. package/src/components/ValidationAlert.tsx +0 -72
  58. package/src/index.ts +0 -177
package/dist/index.cjs ADDED
@@ -0,0 +1,2456 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ AIAssistantPanel: () => AIAssistantPanel,
34
+ Accordion: () => Accordion,
35
+ Avatar: () => Avatar,
36
+ Badge: () => Badge,
37
+ Banner: () => Banner,
38
+ Breadcrumb: () => Breadcrumb,
39
+ Button: () => Button,
40
+ Card: () => Card,
41
+ ChatBubble: () => ChatBubble,
42
+ ChatInput: () => ChatInput,
43
+ Checkbox: () => Checkbox,
44
+ CreditsIndicator: () => CreditsIndicator,
45
+ DataTable: () => DataTable,
46
+ DateInput: () => DateInput,
47
+ Divider: () => Divider,
48
+ Dropzone: () => Dropzone,
49
+ EmptyState: () => EmptyState,
50
+ FileCard: () => FileCard,
51
+ FilterTabs: () => FilterTabs,
52
+ FlyoutMenu: () => FlyoutMenu,
53
+ GlassPopover: () => GlassPopover,
54
+ Header: () => Header,
55
+ Input: () => Input,
56
+ InputGroup: () => InputGroup,
57
+ LanguageSelector: () => LanguageSelector,
58
+ Modal: () => Modal,
59
+ OnboardingPopover: () => OnboardingPopover,
60
+ OperationStatus: () => OperationStatus,
61
+ Overlay: () => Overlay,
62
+ Pagination: () => Pagination,
63
+ Pill: () => Pill,
64
+ PricingCard: () => PricingCard,
65
+ ProgressBar: () => ProgressBar,
66
+ Radio: () => Radio,
67
+ SearchInput: () => SearchInput,
68
+ SectionHeader: () => SectionHeader,
69
+ SegmentedControl: () => SegmentedControl,
70
+ Select: () => Select,
71
+ SelectGroup: () => SelectGroup,
72
+ SelectionCard: () => SelectionCard,
73
+ SidebarItem: () => SidebarItem,
74
+ SidebarPanel: () => SidebarPanel,
75
+ SplitPane: () => SplitPane,
76
+ StatCard: () => StatCard,
77
+ StatusDot: () => StatusDot,
78
+ Stepper: () => Stepper,
79
+ TabBar: () => TabBar,
80
+ Textarea: () => Textarea,
81
+ Toggle: () => Toggle,
82
+ Tooltip: () => Tooltip,
83
+ UserProfilePopover: () => UserProfilePopover,
84
+ ValidationAlert: () => ValidationAlert,
85
+ tokenRegistry: () => tokens_registry_default
86
+ });
87
+ module.exports = __toCommonJS(index_exports);
88
+
89
+ // src/tokens.registry.json
90
+ var tokens_registry_default = {
91
+ version: 1,
92
+ tokens: [
93
+ "--malix-background-main",
94
+ "--malix-surface",
95
+ "--malix-surface-secondary",
96
+ "--malix-surface-hover",
97
+ "--malix-foreground",
98
+ "--malix-foreground-secondary",
99
+ "--malix-foreground-tertiary",
100
+ "--malix-foreground-disabled",
101
+ "--malix-border",
102
+ "--malix-border-strong",
103
+ "--malix-border-focus",
104
+ "--malix-overlay",
105
+ "--malix-cta-primary-bg",
106
+ "--malix-primary-hover",
107
+ "--malix-primary-active",
108
+ "--malix-primary-foreground",
109
+ "--malix-primary-light",
110
+ "--malix-success",
111
+ "--malix-success-light",
112
+ "--malix-success-foreground",
113
+ "--malix-warning",
114
+ "--malix-warning-light",
115
+ "--malix-warning-foreground",
116
+ "--malix-error",
117
+ "--malix-error-light",
118
+ "--malix-error-foreground",
119
+ "--malix-info",
120
+ "--malix-info-light",
121
+ "--malix-info-foreground",
122
+ "--malix-glass-bg",
123
+ "--malix-glass-border",
124
+ "--malix-glass-blur",
125
+ "--malix-sidebar-bg",
126
+ "--malix-sidebar-hover-bg",
127
+ "--malix-sidebar-active-bg",
128
+ "--malix-space-xs",
129
+ "--malix-space-sm",
130
+ "--malix-space-md",
131
+ "--malix-space-lg",
132
+ "--malix-space-xl",
133
+ "--malix-space-2xl",
134
+ "--malix-space-3xl",
135
+ "--malix-radius-sm",
136
+ "--malix-radius-md",
137
+ "--malix-radius-lg",
138
+ "--malix-radius-xl",
139
+ "--malix-radius-pill",
140
+ "--malix-text-xs",
141
+ "--malix-text-sm",
142
+ "--malix-text-base",
143
+ "--malix-text-lg",
144
+ "--malix-text-xl",
145
+ "--malix-text-2xl",
146
+ "--malix-font-body",
147
+ "--malix-font-heading",
148
+ "--malix-weight-normal",
149
+ "--malix-weight-medium",
150
+ "--malix-weight-semibold",
151
+ "--malix-weight-bold",
152
+ "--malix-shadow-btn-primary",
153
+ "--malix-shadow-btn-secondary",
154
+ "--malix-shadow-input",
155
+ "--malix-shadow-depth",
156
+ "--malix-shadow-card-l1",
157
+ "--malix-shadow-card-l2",
158
+ "--malix-shadow-card-l3",
159
+ "--malix-shadow-overlay",
160
+ "--malix-shadow-tooltip",
161
+ "--malix-shadow-sidebar",
162
+ "--malix-shadow-header"
163
+ ]
164
+ };
165
+
166
+ // src/components/Divider.tsx
167
+ var import_jsx_runtime = require("react/jsx-runtime");
168
+ function Divider({ className, ...props }) {
169
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
170
+ "hr",
171
+ {
172
+ className: `malix-divider${className ? ` ${className}` : ""}`,
173
+ ...props
174
+ }
175
+ );
176
+ }
177
+
178
+ // src/components/Avatar.tsx
179
+ var import_jsx_runtime2 = require("react/jsx-runtime");
180
+ function Avatar({ initials, size = 40, className, style, ...props }) {
181
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
182
+ "span",
183
+ {
184
+ className: `malix-avatar${className ? ` ${className}` : ""}`,
185
+ style: { width: size, height: size, borderRadius: size * 0.35, ...style },
186
+ ...props,
187
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "malix-avatar__text", children: initials })
188
+ }
189
+ );
190
+ }
191
+
192
+ // src/components/Pill.tsx
193
+ var import_jsx_runtime3 = require("react/jsx-runtime");
194
+ function Pill({ variant = "default", children, className, ...props }) {
195
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
196
+ "span",
197
+ {
198
+ className: `malix-pill${className ? ` ${className}` : ""}`,
199
+ "data-variant": variant,
200
+ ...props,
201
+ children
202
+ }
203
+ );
204
+ }
205
+
206
+ // src/components/Button.tsx
207
+ var import_jsx_runtime4 = require("react/jsx-runtime");
208
+ function Button({
209
+ hierarchy = "primary",
210
+ variant = "text",
211
+ icon,
212
+ badge,
213
+ loading = false,
214
+ disabled,
215
+ children,
216
+ label,
217
+ ...props
218
+ }) {
219
+ const isDisabled = disabled || loading;
220
+ const isIconOnly = variant === "icon-only";
221
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
222
+ "button",
223
+ {
224
+ type: "button",
225
+ className: "malix-button",
226
+ "data-hierarchy": hierarchy,
227
+ "data-variant": variant,
228
+ "data-loading": loading,
229
+ disabled: isDisabled,
230
+ "aria-busy": loading || void 0,
231
+ "aria-label": isIconOnly ? label : props["aria-label"],
232
+ ...props,
233
+ children: [
234
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "malix-button__icon", children: icon }) : null,
235
+ !isIconOnly ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: loading ? "Loading..." : children }) : null,
236
+ variant === "icon-badge" && badge ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "malix-button__badge", children: badge }) : null,
237
+ isIconOnly && !icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: loading ? "..." : label }) : null
238
+ ]
239
+ }
240
+ );
241
+ }
242
+
243
+ // src/components/Input.tsx
244
+ var import_jsx_runtime5 = require("react/jsx-runtime");
245
+ function Input({ leadingIcon, ...props }) {
246
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "malix-input-wrap", children: [
247
+ leadingIcon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "malix-button__icon", children: leadingIcon }) : null,
248
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("input", { className: "malix-input", ...props })
249
+ ] });
250
+ }
251
+ function SearchInput(props) {
252
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input, { type: "search", placeholder: "Search", ...props });
253
+ }
254
+
255
+ // src/components/InputGroup.tsx
256
+ var import_react = __toESM(require("react"), 1);
257
+ var import_jsx_runtime6 = require("react/jsx-runtime");
258
+ function InputGroup({
259
+ label,
260
+ helperText,
261
+ leadingIcon,
262
+ error,
263
+ id,
264
+ className,
265
+ ...props
266
+ }) {
267
+ const inputId = id || `input-${import_react.default.useId()}`;
268
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: `malix-input-group${className ? ` ${className}` : ""}`, "data-error": error || void 0, children: [
269
+ label ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { htmlFor: inputId, className: "malix-input-group__label", children: label }) : null,
270
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "malix-input-group__field", children: [
271
+ leadingIcon ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "malix-input-group__icon", children: leadingIcon }) : null,
272
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", { id: inputId, className: "malix-input", ...props })
273
+ ] }),
274
+ helperText ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "malix-input-group__helper", children: helperText }) : null
275
+ ] });
276
+ }
277
+
278
+ // src/components/Tooltip.tsx
279
+ var import_react2 = __toESM(require("react"), 1);
280
+ var import_jsx_runtime7 = require("react/jsx-runtime");
281
+ function Tooltip({ content, children, placement = "top" }) {
282
+ const [open, setOpen] = (0, import_react2.useState)(false);
283
+ const tooltipId = (0, import_react2.useId)();
284
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
285
+ "span",
286
+ {
287
+ className: "malix-tooltip-wrap",
288
+ onMouseEnter: () => setOpen(true),
289
+ onMouseLeave: () => setOpen(false),
290
+ onFocus: () => setOpen(true),
291
+ onBlur: () => setOpen(false),
292
+ children: [
293
+ import_react2.default.cloneElement(children, {
294
+ "aria-describedby": open ? tooltipId : void 0
295
+ }),
296
+ open ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { role: "tooltip", id: tooltipId, className: "malix-tooltip", "data-placement": placement, children: content }) : null
297
+ ]
298
+ }
299
+ );
300
+ }
301
+
302
+ // src/components/SidebarItem.tsx
303
+ var import_jsx_runtime8 = require("react/jsx-runtime");
304
+ function SidebarItem({
305
+ icon,
306
+ active = false,
307
+ children,
308
+ className,
309
+ ...props
310
+ }) {
311
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
312
+ "button",
313
+ {
314
+ type: "button",
315
+ className: `malix-sidebar-item${className ? ` ${className}` : ""}`,
316
+ "data-active": active || void 0,
317
+ "aria-current": active ? "page" : void 0,
318
+ ...props,
319
+ children: [
320
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "malix-sidebar-item__icon", children: icon }) : null,
321
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "malix-sidebar-item__label", children })
322
+ ]
323
+ }
324
+ );
325
+ }
326
+
327
+ // src/components/FlyoutMenu.tsx
328
+ var import_jsx_runtime9 = require("react/jsx-runtime");
329
+ function FlyoutMenu({ items, className, ...props }) {
330
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
331
+ "nav",
332
+ {
333
+ className: `malix-flyout-menu${className ? ` ${className}` : ""}`,
334
+ role: "menu",
335
+ ...props,
336
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
337
+ "button",
338
+ {
339
+ type: "button",
340
+ className: "malix-flyout-menu__item",
341
+ "data-active": item.active || void 0,
342
+ role: "menuitem",
343
+ onClick: item.onClick,
344
+ children: [
345
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "malix-flyout-menu__icon", children: item.icon }) : null,
346
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "malix-flyout-menu__label", children: item.label })
347
+ ]
348
+ },
349
+ i
350
+ ))
351
+ }
352
+ );
353
+ }
354
+
355
+ // src/components/SidebarPanel.tsx
356
+ var import_react3 = require("react");
357
+ var import_jsx_runtime10 = require("react/jsx-runtime");
358
+ function SidebarPanel({
359
+ collapsed = false,
360
+ logo,
361
+ collapsedLogo,
362
+ navigation,
363
+ footer,
364
+ onToggleCollapse,
365
+ className,
366
+ ...props
367
+ }) {
368
+ const [hovered, setHovered] = (0, import_react3.useState)(false);
369
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
370
+ "aside",
371
+ {
372
+ className: `malix-sidebar-panel${className ? ` ${className}` : ""}`,
373
+ "data-collapsed": collapsed || void 0,
374
+ onMouseEnter: collapsed ? () => setHovered(true) : void 0,
375
+ onMouseLeave: collapsed ? () => setHovered(false) : void 0,
376
+ ...props,
377
+ children: [
378
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "malix-sidebar-panel__top", children: [
379
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "malix-sidebar-panel__brand", children: collapsed ? (
380
+ /* Collapsed: show isotype by default, toggle button on hover */
381
+ hovered && onToggleCollapse ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
382
+ "button",
383
+ {
384
+ type: "button",
385
+ className: "malix-sidebar-panel__toggle",
386
+ onClick: onToggleCollapse,
387
+ "aria-label": "Expand sidebar",
388
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
389
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
390
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M9 3v18" }),
391
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "m14 9 3 3-3 3" })
392
+ ] })
393
+ }
394
+ ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "malix-sidebar-panel__collapsed-logo", children: collapsedLogo ?? logo })
395
+ ) : (
396
+ /* Expanded: logo + toggle button */
397
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
398
+ logo,
399
+ onToggleCollapse ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
400
+ "button",
401
+ {
402
+ type: "button",
403
+ className: "malix-sidebar-panel__toggle",
404
+ onClick: onToggleCollapse,
405
+ "aria-label": "Collapse sidebar",
406
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
407
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
408
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M9 3v18" }),
409
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "m16 15-3-3 3-3" })
410
+ ] })
411
+ }
412
+ ) : null
413
+ ] })
414
+ ) }),
415
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("nav", { className: "malix-sidebar-panel__nav", children: navigation })
416
+ ] }),
417
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "malix-sidebar-panel__bottom", children: footer }) : null
418
+ ]
419
+ }
420
+ );
421
+ }
422
+
423
+ // src/components/Header.tsx
424
+ var import_jsx_runtime11 = require("react/jsx-runtime");
425
+ function Header({ pageTitle, actions, className, ...props }) {
426
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
427
+ "header",
428
+ {
429
+ className: `malix-header${className ? ` ${className}` : ""}`,
430
+ ...props,
431
+ children: [
432
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "malix-header__left", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "malix-header__title", children: pageTitle }) }),
433
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "malix-header__right", children: actions }) : null
434
+ ]
435
+ }
436
+ );
437
+ }
438
+
439
+ // src/components/Card.tsx
440
+ var import_jsx_runtime12 = require("react/jsx-runtime");
441
+ function Card({
442
+ level = 1,
443
+ title,
444
+ description,
445
+ children,
446
+ className,
447
+ ...props
448
+ }) {
449
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
450
+ "div",
451
+ {
452
+ className: `malix-card${className ? ` ${className}` : ""}`,
453
+ "data-level": level,
454
+ ...props,
455
+ children: [
456
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "malix-card__header", children: [
457
+ title ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "malix-card__title", children: title }) : null,
458
+ description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "malix-card__desc", children: description }) : null
459
+ ] }) : null,
460
+ children ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "malix-card__body", children }) : null
461
+ ]
462
+ }
463
+ );
464
+ }
465
+
466
+ // src/components/StatCard.tsx
467
+ var import_jsx_runtime13 = require("react/jsx-runtime");
468
+ function ChangeIcon({ type }) {
469
+ const shared = { width: 12, height: 12, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" };
470
+ switch (type) {
471
+ case "positive":
472
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { ...shared, children: [
473
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }),
474
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "16 7 22 7 22 13" })
475
+ ] });
476
+ case "negative":
477
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { ...shared, children: [
478
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }),
479
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "16 17 22 17 22 11" })
480
+ ] });
481
+ case "neutral":
482
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { ...shared, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
483
+ }
484
+ }
485
+ function StatCard({
486
+ label,
487
+ value,
488
+ change,
489
+ changeType = "neutral",
490
+ className,
491
+ ...props
492
+ }) {
493
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
494
+ "div",
495
+ {
496
+ className: `malix-stat-card${className ? ` ${className}` : ""}`,
497
+ ...props,
498
+ children: [
499
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "malix-stat-card__label", children: label }),
500
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "malix-stat-card__value", children: value }),
501
+ change ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "malix-stat-card__change", "data-type": changeType, children: [
502
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "malix-stat-card__change-icon", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ChangeIcon, { type: changeType }) }),
503
+ change
504
+ ] }) : null
505
+ ]
506
+ }
507
+ );
508
+ }
509
+
510
+ // src/components/DateInput.tsx
511
+ var import_react4 = __toESM(require("react"), 1);
512
+ var import_jsx_runtime14 = require("react/jsx-runtime");
513
+ function DateInput({
514
+ value,
515
+ placeholder = "dd/mm/yyyy",
516
+ onChange,
517
+ disabled,
518
+ className,
519
+ id,
520
+ ...props
521
+ }) {
522
+ const inputId = id || `date-input-${import_react4.default.useId()}`;
523
+ const handleChange = (e) => {
524
+ onChange?.(e.target.value);
525
+ };
526
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
527
+ "div",
528
+ {
529
+ className: `malix-date-input${className ? ` ${className}` : ""}`,
530
+ "data-filled": value ? true : void 0,
531
+ "data-disabled": disabled || void 0,
532
+ children: [
533
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
534
+ "input",
535
+ {
536
+ id: inputId,
537
+ type: "date",
538
+ className: "malix-date-input__native",
539
+ value,
540
+ onChange: handleChange,
541
+ disabled,
542
+ "aria-label": placeholder,
543
+ ...props
544
+ }
545
+ ),
546
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "malix-date-input__value", children: value || placeholder }),
547
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "malix-date-input__icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
548
+ "path",
549
+ {
550
+ d: "M12.667 2.667H3.333C2.597 2.667 2 3.264 2 4v9.333c0 .737.597 1.334 1.333 1.334h9.334c.736 0 1.333-.597 1.333-1.334V4c0-.736-.597-1.333-1.333-1.333ZM10.667 1.333V4M5.333 1.333V4M2 6.667h12",
551
+ stroke: "currentColor",
552
+ strokeWidth: "1.33",
553
+ strokeLinecap: "round",
554
+ strokeLinejoin: "round"
555
+ }
556
+ ) }) })
557
+ ]
558
+ }
559
+ );
560
+ }
561
+
562
+ // src/components/FilterTabs.tsx
563
+ var import_jsx_runtime15 = require("react/jsx-runtime");
564
+ function FilterTabs({
565
+ items,
566
+ value,
567
+ onChange,
568
+ className,
569
+ ...props
570
+ }) {
571
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
572
+ "div",
573
+ {
574
+ className: `malix-filter-tabs${className ? ` ${className}` : ""}`,
575
+ role: "tablist",
576
+ ...props,
577
+ children: items.map((item) => {
578
+ const isActive = item.value === value;
579
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
580
+ "button",
581
+ {
582
+ type: "button",
583
+ role: "tab",
584
+ className: "malix-filter-tabs__tab",
585
+ "data-active": isActive || void 0,
586
+ "aria-selected": isActive,
587
+ onClick: () => onChange(item.value),
588
+ children: [
589
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "malix-filter-tabs__tab-label", children: item.label }),
590
+ item.count != null ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "malix-filter-tabs__tab-count", children: item.count }) : null
591
+ ]
592
+ },
593
+ item.value
594
+ );
595
+ })
596
+ }
597
+ );
598
+ }
599
+
600
+ // src/components/Breadcrumb.tsx
601
+ var import_react5 = __toESM(require("react"), 1);
602
+ var import_jsx_runtime16 = require("react/jsx-runtime");
603
+ var DefaultSeparator = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M6 3L11 8L6 13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
604
+ function Breadcrumb({ items, separator, className, ...props }) {
605
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
606
+ "nav",
607
+ {
608
+ className: `malix-breadcrumb${className ? ` ${className}` : ""}`,
609
+ "aria-label": "Breadcrumb",
610
+ ...props,
611
+ children: items.map((item, index) => {
612
+ const isLast = index === items.length - 1;
613
+ const isActive = item.active ?? isLast;
614
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react5.default.Fragment, { children: [
615
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "malix-breadcrumb__item", "data-active": isActive || void 0, children: [
616
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "malix-breadcrumb__icon", children: item.icon }) : null,
617
+ isActive || !item.href ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "malix-breadcrumb__label", "aria-current": isActive ? "page" : void 0, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("a", { className: "malix-breadcrumb__label", href: item.href, children: item.label })
618
+ ] }),
619
+ !isLast ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "malix-breadcrumb__separator", "aria-hidden": "true", children: separator ?? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DefaultSeparator, {}) }) : null
620
+ ] }, index);
621
+ })
622
+ }
623
+ );
624
+ }
625
+
626
+ // src/components/ProgressBar.tsx
627
+ var import_jsx_runtime17 = require("react/jsx-runtime");
628
+ function ProgressBar({
629
+ value,
630
+ label,
631
+ showPercent = true,
632
+ variant = "default",
633
+ className,
634
+ ...props
635
+ }) {
636
+ const clampedValue = Math.max(0, Math.min(100, value));
637
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
638
+ "div",
639
+ {
640
+ className: `malix-progress-bar${className ? ` ${className}` : ""}`,
641
+ "data-variant": variant,
642
+ role: "progressbar",
643
+ "aria-valuenow": clampedValue,
644
+ "aria-valuemin": 0,
645
+ "aria-valuemax": 100,
646
+ "aria-label": label,
647
+ ...props,
648
+ children: [
649
+ label || showPercent ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "malix-progress-bar__label-row", children: [
650
+ label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "malix-progress-bar__label", children: label }) : null,
651
+ showPercent ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "malix-progress-bar__percent", children: [
652
+ clampedValue,
653
+ "%"
654
+ ] }) : null
655
+ ] }) : null,
656
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "malix-progress-bar__track", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
657
+ "div",
658
+ {
659
+ className: "malix-progress-bar__fill",
660
+ style: { width: `${clampedValue}%` }
661
+ }
662
+ ) })
663
+ ]
664
+ }
665
+ );
666
+ }
667
+
668
+ // src/components/EmptyState.tsx
669
+ var import_jsx_runtime18 = require("react/jsx-runtime");
670
+ var DefaultIcon = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
671
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
672
+ "path",
673
+ {
674
+ d: "M3 7V5C3 3.895 3.895 3 5 3H9L11 5H19C20.105 5 21 5.895 21 7V9",
675
+ stroke: "currentColor",
676
+ strokeWidth: "1.5",
677
+ strokeLinecap: "round",
678
+ strokeLinejoin: "round"
679
+ }
680
+ ),
681
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
682
+ "rect",
683
+ {
684
+ x: "2",
685
+ y: "9",
686
+ width: "20",
687
+ height: "12",
688
+ rx: "2",
689
+ stroke: "currentColor",
690
+ strokeWidth: "1.5",
691
+ strokeLinecap: "round",
692
+ strokeLinejoin: "round"
693
+ }
694
+ ),
695
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
696
+ "path",
697
+ {
698
+ d: "M9 15H15",
699
+ stroke: "currentColor",
700
+ strokeWidth: "1.5",
701
+ strokeLinecap: "round",
702
+ strokeLinejoin: "round"
703
+ }
704
+ )
705
+ ] });
706
+ function EmptyState({
707
+ icon,
708
+ title,
709
+ description,
710
+ action,
711
+ className,
712
+ ...props
713
+ }) {
714
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
715
+ "div",
716
+ {
717
+ className: `malix-empty-state${className ? ` ${className}` : ""}`,
718
+ ...props,
719
+ children: [
720
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "malix-empty-state__icon-wrap", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DefaultIcon, {}) }),
721
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "malix-empty-state__title", children: title }),
722
+ description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "malix-empty-state__description", children: description }) : null,
723
+ action ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "malix-empty-state__action", children: action }) : null
724
+ ]
725
+ }
726
+ );
727
+ }
728
+
729
+ // src/components/Stepper.tsx
730
+ var import_react6 = __toESM(require("react"), 1);
731
+ var import_jsx_runtime19 = require("react/jsx-runtime");
732
+ function Stepper({ steps, className }) {
733
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: `malix-stepper${className ? ` ${className}` : ""}`, children: steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react6.default.Fragment, { children: [
734
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "malix-stepper__step", "data-status": step.status, children: [
735
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "malix-stepper__step-icon", children: step.status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M11.5 3.5L5.5 10L2.5 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : step.icon ?? null }),
736
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "malix-stepper__step-label", children: step.label })
737
+ ] }),
738
+ index < steps.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "malix-stepper__connector" }) : null
739
+ ] }, index)) });
740
+ }
741
+
742
+ // src/components/Textarea.tsx
743
+ var import_react7 = __toESM(require("react"), 1);
744
+ var import_jsx_runtime20 = require("react/jsx-runtime");
745
+ function Textarea({
746
+ label,
747
+ helperText,
748
+ error,
749
+ errorMessage,
750
+ id,
751
+ className,
752
+ ...props
753
+ }) {
754
+ const textareaId = id || `textarea-${import_react7.default.useId()}`;
755
+ const displayHelper = error && errorMessage ? errorMessage : helperText;
756
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
757
+ "div",
758
+ {
759
+ className: `malix-textarea-group${className ? ` ${className}` : ""}`,
760
+ "data-error": error || void 0,
761
+ children: [
762
+ label ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: textareaId, className: "malix-textarea-group__label", children: label }) : null,
763
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
764
+ "textarea",
765
+ {
766
+ id: textareaId,
767
+ className: "malix-textarea-group__field",
768
+ "aria-invalid": error || void 0,
769
+ ...props
770
+ }
771
+ ),
772
+ displayHelper ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "malix-textarea-group__helper", children: displayHelper }) : null
773
+ ]
774
+ }
775
+ );
776
+ }
777
+
778
+ // src/components/ChatInput.tsx
779
+ var import_jsx_runtime21 = require("react/jsx-runtime");
780
+ function ChatInput({
781
+ value,
782
+ onChange,
783
+ onSend,
784
+ placeholder = "Type a message...",
785
+ disabled,
786
+ className
787
+ }) {
788
+ const handleKeyDown = (e) => {
789
+ if (e.key === "Enter" && !e.shiftKey && value.trim()) {
790
+ e.preventDefault();
791
+ onSend();
792
+ }
793
+ };
794
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `malix-chat-input${className ? ` ${className}` : ""}`, children: [
795
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
796
+ "input",
797
+ {
798
+ type: "text",
799
+ className: "malix-chat-input__field",
800
+ value,
801
+ onChange: (e) => onChange(e.target.value),
802
+ onKeyDown: handleKeyDown,
803
+ placeholder,
804
+ disabled,
805
+ "aria-label": placeholder
806
+ }
807
+ ),
808
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
809
+ "button",
810
+ {
811
+ type: "button",
812
+ className: "malix-chat-input__send-btn",
813
+ onClick: onSend,
814
+ disabled: disabled || !value.trim(),
815
+ "aria-label": "Send message",
816
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
817
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M12 19V5" }),
818
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "m5 12 7-7 7 7" })
819
+ ] })
820
+ }
821
+ )
822
+ ] });
823
+ }
824
+
825
+ // src/components/SectionHeader.tsx
826
+ var import_jsx_runtime22 = require("react/jsx-runtime");
827
+ function SectionHeader({
828
+ title,
829
+ description,
830
+ actions,
831
+ className,
832
+ ...props
833
+ }) {
834
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
835
+ "div",
836
+ {
837
+ className: `malix-section-header${className ? ` ${className}` : ""}`,
838
+ ...props,
839
+ children: [
840
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "malix-section-header__left", children: [
841
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { className: "malix-section-header__title", children: title }),
842
+ description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "malix-section-header__description", children: description }) : null
843
+ ] }),
844
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "malix-section-header__actions", children: actions }) : null
845
+ ]
846
+ }
847
+ );
848
+ }
849
+
850
+ // src/components/FileCard.tsx
851
+ var import_jsx_runtime23 = require("react/jsx-runtime");
852
+ var DefaultFileIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
853
+ "svg",
854
+ {
855
+ width: "20",
856
+ height: "20",
857
+ viewBox: "0 0 24 24",
858
+ fill: "none",
859
+ stroke: "currentColor",
860
+ strokeWidth: "2",
861
+ strokeLinecap: "round",
862
+ strokeLinejoin: "round",
863
+ children: [
864
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
865
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("polyline", { points: "14 2 14 8 20 8" }),
866
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
867
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
868
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("polyline", { points: "10 9 9 9 8 9" })
869
+ ]
870
+ }
871
+ );
872
+ var MoreVerticalIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
873
+ "svg",
874
+ {
875
+ width: "16",
876
+ height: "16",
877
+ viewBox: "0 0 24 24",
878
+ fill: "currentColor",
879
+ children: [
880
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "5", r: "1.5" }),
881
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "1.5" }),
882
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "19", r: "1.5" })
883
+ ]
884
+ }
885
+ );
886
+ function FileCard({
887
+ fileName,
888
+ meta,
889
+ icon,
890
+ onAction,
891
+ className,
892
+ ...props
893
+ }) {
894
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
895
+ "div",
896
+ {
897
+ className: `malix-file-card${className ? ` ${className}` : ""}`,
898
+ ...props,
899
+ children: [
900
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "malix-file-card__icon-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "malix-file-card__icon", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DefaultFileIcon, {}) }) }),
901
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "malix-file-card__info", children: [
902
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "malix-file-card__name", children: fileName }),
903
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "malix-file-card__meta", children: meta }) : null
904
+ ] }),
905
+ onAction ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
906
+ "button",
907
+ {
908
+ type: "button",
909
+ className: "malix-file-card__action",
910
+ onClick: onAction,
911
+ "aria-label": "More actions",
912
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MoreVerticalIcon, {})
913
+ }
914
+ ) : null
915
+ ]
916
+ }
917
+ );
918
+ }
919
+
920
+ // src/components/TabBar.tsx
921
+ var import_jsx_runtime24 = require("react/jsx-runtime");
922
+ function TabBar({
923
+ items,
924
+ value,
925
+ onChange,
926
+ className,
927
+ ...props
928
+ }) {
929
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
930
+ "div",
931
+ {
932
+ className: `malix-tab-bar${className ? ` ${className}` : ""}`,
933
+ role: "tablist",
934
+ ...props,
935
+ children: items.map((item) => {
936
+ const isActive = item.value === value;
937
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
938
+ "button",
939
+ {
940
+ type: "button",
941
+ role: "tab",
942
+ className: "malix-tab-bar__tab",
943
+ "data-active": isActive || void 0,
944
+ "aria-selected": isActive,
945
+ onClick: () => onChange(item.value),
946
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "malix-tab-bar__tab-label", children: item.label })
947
+ },
948
+ item.value
949
+ );
950
+ })
951
+ }
952
+ );
953
+ }
954
+
955
+ // src/components/OperationStatus.tsx
956
+ var import_jsx_runtime25 = require("react/jsx-runtime");
957
+ var DEFAULT_LABELS = {
958
+ active: "Active",
959
+ completed: "Completed",
960
+ failed: "Failed",
961
+ pending: "Pending"
962
+ };
963
+ function StatusIcon({ status }) {
964
+ const shared = { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" };
965
+ switch (status) {
966
+ case "active":
967
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: "7", cy: "7", r: "4" }) });
968
+ case "completed":
969
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { ...shared, children: [
970
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
971
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "m9 12 2 2 4-4" })
972
+ ] });
973
+ case "failed":
974
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { ...shared, children: [
975
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
976
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "m15 9-6 6" }),
977
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "m9 9 6 6" })
978
+ ] });
979
+ case "pending":
980
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { ...shared, children: [
981
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
982
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("polyline", { points: "12 6 12 12 16 14" })
983
+ ] });
984
+ }
985
+ }
986
+ function OperationStatus({
987
+ status,
988
+ label,
989
+ className,
990
+ ...props
991
+ }) {
992
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
993
+ "span",
994
+ {
995
+ className: `malix-op-status${className ? ` ${className}` : ""}`,
996
+ "data-status": status,
997
+ ...props,
998
+ children: [
999
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "malix-op-status__icon", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StatusIcon, { status }) }),
1000
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "malix-op-status__label", children: label ?? DEFAULT_LABELS[status] })
1001
+ ]
1002
+ }
1003
+ );
1004
+ }
1005
+
1006
+ // src/components/ValidationAlert.tsx
1007
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1008
+ function AlertIcon({ variant }) {
1009
+ const shared = { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" };
1010
+ switch (variant) {
1011
+ case "error":
1012
+ case "warning":
1013
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...shared, children: [
1014
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
1015
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
1016
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
1017
+ ] });
1018
+ case "info":
1019
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...shared, children: [
1020
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
1021
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
1022
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
1023
+ ] });
1024
+ }
1025
+ }
1026
+ function ValidationAlert({
1027
+ title,
1028
+ message,
1029
+ onClose,
1030
+ variant = "error",
1031
+ className
1032
+ }) {
1033
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1034
+ "div",
1035
+ {
1036
+ className: `malix-validation-alert${className ? ` ${className}` : ""}`,
1037
+ "data-variant": variant,
1038
+ role: "alert",
1039
+ children: [
1040
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "malix-validation-alert__icon", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AlertIcon, { variant }) }),
1041
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "malix-validation-alert__content", children: [
1042
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "malix-validation-alert__title", children: title }),
1043
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "malix-validation-alert__message", children: message })
1044
+ ] }),
1045
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1046
+ "button",
1047
+ {
1048
+ type: "button",
1049
+ className: "malix-validation-alert__close",
1050
+ onClick: onClose,
1051
+ "aria-label": "Close",
1052
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1053
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1054
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1055
+ ] })
1056
+ }
1057
+ ) : null
1058
+ ]
1059
+ }
1060
+ );
1061
+ }
1062
+
1063
+ // src/components/SelectionCard.tsx
1064
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1065
+ function SelectionCard({
1066
+ title,
1067
+ description,
1068
+ icon,
1069
+ active = false,
1070
+ onClick,
1071
+ className
1072
+ }) {
1073
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1074
+ "div",
1075
+ {
1076
+ className: `malix-selection-card${className ? ` ${className}` : ""}`,
1077
+ "data-active": active || void 0,
1078
+ onClick,
1079
+ role: onClick ? "button" : void 0,
1080
+ tabIndex: onClick ? 0 : void 0,
1081
+ onKeyDown: onClick ? (e) => {
1082
+ if (e.key === "Enter" || e.key === " ") {
1083
+ e.preventDefault();
1084
+ onClick();
1085
+ }
1086
+ } : void 0,
1087
+ children: [
1088
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "malix-selection-card__icon-wrap", children: icon }) : null,
1089
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "malix-selection-card__title", children: title }),
1090
+ description ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "malix-selection-card__description", children: description }) : null
1091
+ ]
1092
+ }
1093
+ );
1094
+ }
1095
+
1096
+ // src/components/Overlay.tsx
1097
+ var import_react8 = require("react");
1098
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1099
+ var FOCUSABLE_SELECTOR = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
1100
+ function Overlay({ open, title, onClose, children }) {
1101
+ const panelRef = (0, import_react8.useRef)(null);
1102
+ (0, import_react8.useEffect)(() => {
1103
+ if (!open || !panelRef.current) return;
1104
+ const panel = panelRef.current;
1105
+ const focusables = Array.from(panel.querySelectorAll(FOCUSABLE_SELECTOR));
1106
+ const first = focusables[0];
1107
+ const last = focusables[focusables.length - 1];
1108
+ first?.focus();
1109
+ function onKeyDown(event) {
1110
+ if (event.key === "Escape") {
1111
+ event.preventDefault();
1112
+ onClose();
1113
+ }
1114
+ if (event.key === "Tab" && focusables.length > 0) {
1115
+ if (event.shiftKey && document.activeElement === first) {
1116
+ event.preventDefault();
1117
+ last?.focus();
1118
+ } else if (!event.shiftKey && document.activeElement === last) {
1119
+ event.preventDefault();
1120
+ first?.focus();
1121
+ }
1122
+ }
1123
+ }
1124
+ document.addEventListener("keydown", onKeyDown);
1125
+ return () => document.removeEventListener("keydown", onKeyDown);
1126
+ }, [open, onClose]);
1127
+ if (!open) return null;
1128
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "malix-overlay-backdrop", onMouseDown: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1129
+ "div",
1130
+ {
1131
+ ref: panelRef,
1132
+ className: "malix-overlay-panel",
1133
+ role: "dialog",
1134
+ "aria-modal": "true",
1135
+ "aria-label": title,
1136
+ onMouseDown: (event) => event.stopPropagation(),
1137
+ children: [
1138
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "malix-overlay-title", children: title }),
1139
+ children,
1140
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { type: "button", className: "malix-button malix-overlay-close", "data-hierarchy": "secondary", onClick: onClose, children: "Close" })
1141
+ ]
1142
+ }
1143
+ ) });
1144
+ }
1145
+
1146
+ // src/components/Modal.tsx
1147
+ var import_react9 = require("react");
1148
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1149
+ var FOCUSABLE_SELECTOR2 = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
1150
+ function Modal({
1151
+ open,
1152
+ title,
1153
+ onClose,
1154
+ onConfirm,
1155
+ confirmLabel = "Confirm",
1156
+ cancelLabel = "Cancel",
1157
+ children
1158
+ }) {
1159
+ const panelRef = (0, import_react9.useRef)(null);
1160
+ (0, import_react9.useEffect)(() => {
1161
+ if (!open || !panelRef.current) return;
1162
+ const panel = panelRef.current;
1163
+ const focusables = Array.from(panel.querySelectorAll(FOCUSABLE_SELECTOR2));
1164
+ const first = focusables[0];
1165
+ const last = focusables[focusables.length - 1];
1166
+ first?.focus();
1167
+ function onKeyDown(event) {
1168
+ if (event.key === "Escape") {
1169
+ event.preventDefault();
1170
+ onClose();
1171
+ }
1172
+ if (event.key === "Tab" && focusables.length > 0) {
1173
+ if (event.shiftKey && document.activeElement === first) {
1174
+ event.preventDefault();
1175
+ last?.focus();
1176
+ } else if (!event.shiftKey && document.activeElement === last) {
1177
+ event.preventDefault();
1178
+ first?.focus();
1179
+ }
1180
+ }
1181
+ }
1182
+ document.addEventListener("keydown", onKeyDown);
1183
+ return () => document.removeEventListener("keydown", onKeyDown);
1184
+ }, [open, onClose]);
1185
+ if (!open) return null;
1186
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "malix-overlay-backdrop", onMouseDown: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1187
+ "div",
1188
+ {
1189
+ ref: panelRef,
1190
+ className: "malix-modal",
1191
+ role: "dialog",
1192
+ "aria-modal": "true",
1193
+ "aria-label": title,
1194
+ onMouseDown: (event) => event.stopPropagation(),
1195
+ children: [
1196
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "malix-modal__header", children: [
1197
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { className: "malix-modal__title", children: title }),
1198
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1199
+ "button",
1200
+ {
1201
+ type: "button",
1202
+ className: "malix-modal__close",
1203
+ onClick: onClose,
1204
+ "aria-label": "Close",
1205
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1206
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1207
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1208
+ ] })
1209
+ }
1210
+ )
1211
+ ] }),
1212
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "malix-modal__body", children }),
1213
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "malix-modal__footer", children: [
1214
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1215
+ "button",
1216
+ {
1217
+ type: "button",
1218
+ className: "malix-button",
1219
+ "data-hierarchy": "secondary",
1220
+ onClick: onClose,
1221
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: cancelLabel })
1222
+ }
1223
+ ),
1224
+ onConfirm ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1225
+ "button",
1226
+ {
1227
+ type: "button",
1228
+ className: "malix-button",
1229
+ "data-hierarchy": "primary",
1230
+ onClick: onConfirm,
1231
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: confirmLabel })
1232
+ }
1233
+ ) : null
1234
+ ] })
1235
+ ]
1236
+ }
1237
+ ) });
1238
+ }
1239
+
1240
+ // src/components/GlassPopover.tsx
1241
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1242
+ function GlassPopover({
1243
+ title,
1244
+ onClose,
1245
+ children,
1246
+ className,
1247
+ ...props
1248
+ }) {
1249
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1250
+ "div",
1251
+ {
1252
+ className: `malix-glass-popover${className ? ` ${className}` : ""}`,
1253
+ ...props,
1254
+ children: [
1255
+ title || onClose ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "malix-glass-popover__header", children: [
1256
+ title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "malix-glass-popover__title", children: title }) : null,
1257
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1258
+ "button",
1259
+ {
1260
+ type: "button",
1261
+ className: "malix-glass-popover__close",
1262
+ onClick: onClose,
1263
+ "aria-label": "Close",
1264
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1265
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1266
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1267
+ ] })
1268
+ }
1269
+ ) : null
1270
+ ] }) : null,
1271
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "malix-glass-popover__body", children })
1272
+ ]
1273
+ }
1274
+ );
1275
+ }
1276
+
1277
+ // src/components/Accordion.tsx
1278
+ var import_react10 = require("react");
1279
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1280
+ function Accordion({
1281
+ title,
1282
+ children,
1283
+ defaultOpen = false,
1284
+ icon,
1285
+ className,
1286
+ ...props
1287
+ }) {
1288
+ const [open, setOpen] = (0, import_react10.useState)(defaultOpen);
1289
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1290
+ "div",
1291
+ {
1292
+ className: `malix-accordion${className ? ` ${className}` : ""}`,
1293
+ "data-open": open,
1294
+ ...props,
1295
+ children: [
1296
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1297
+ "button",
1298
+ {
1299
+ type: "button",
1300
+ className: "malix-accordion__header",
1301
+ onClick: () => setOpen((prev) => !prev),
1302
+ "aria-expanded": open,
1303
+ children: [
1304
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "malix-accordion__icon", children: icon }) : null,
1305
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "malix-accordion__title", children: title }),
1306
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1307
+ "svg",
1308
+ {
1309
+ className: "malix-accordion__chevron",
1310
+ width: "16",
1311
+ height: "16",
1312
+ viewBox: "0 0 24 24",
1313
+ fill: "none",
1314
+ stroke: "currentColor",
1315
+ strokeWidth: "2",
1316
+ strokeLinecap: "round",
1317
+ strokeLinejoin: "round",
1318
+ "aria-hidden": "true",
1319
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("polyline", { points: "6 9 12 15 18 9" })
1320
+ }
1321
+ )
1322
+ ]
1323
+ }
1324
+ ),
1325
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "malix-accordion__body", children })
1326
+ ]
1327
+ }
1328
+ );
1329
+ }
1330
+
1331
+ // src/components/Badge.tsx
1332
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1333
+ function Badge({
1334
+ variant = "default",
1335
+ dot = false,
1336
+ children,
1337
+ className,
1338
+ ...props
1339
+ }) {
1340
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1341
+ "span",
1342
+ {
1343
+ className: `malix-badge${className ? ` ${className}` : ""}`,
1344
+ "data-variant": variant,
1345
+ ...props,
1346
+ children: [
1347
+ dot ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "malix-badge__dot" }) : null,
1348
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "malix-badge__label", children })
1349
+ ]
1350
+ }
1351
+ );
1352
+ }
1353
+
1354
+ // src/components/Banner.tsx
1355
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1356
+ var defaultIcons = {
1357
+ info: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1358
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
1359
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
1360
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
1361
+ ] }),
1362
+ success: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1363
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
1364
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("polyline", { points: "22 4 12 14.01 9 11.01" })
1365
+ ] }),
1366
+ warning: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1367
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
1368
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
1369
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
1370
+ ] }),
1371
+ error: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1372
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
1373
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
1374
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
1375
+ ] })
1376
+ };
1377
+ function Banner({
1378
+ variant = "info",
1379
+ onClose,
1380
+ icon,
1381
+ children,
1382
+ className,
1383
+ ...props
1384
+ }) {
1385
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1386
+ "div",
1387
+ {
1388
+ className: `malix-banner${className ? ` ${className}` : ""}`,
1389
+ "data-variant": variant,
1390
+ role: "alert",
1391
+ ...props,
1392
+ children: [
1393
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "malix-banner__icon", children: icon ?? defaultIcons[variant] }),
1394
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "malix-banner__content", children }),
1395
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1396
+ "button",
1397
+ {
1398
+ type: "button",
1399
+ className: "malix-banner__close",
1400
+ onClick: onClose,
1401
+ "aria-label": "Dismiss",
1402
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1403
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1404
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1405
+ ] })
1406
+ }
1407
+ ) : null
1408
+ ]
1409
+ }
1410
+ );
1411
+ }
1412
+
1413
+ // src/components/Checkbox.tsx
1414
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1415
+ function Checkbox({
1416
+ checked = false,
1417
+ onChange,
1418
+ disabled = false,
1419
+ label,
1420
+ indeterminate = false,
1421
+ className,
1422
+ ...props
1423
+ }) {
1424
+ const handleClick = () => {
1425
+ if (!disabled && onChange) {
1426
+ onChange(!checked);
1427
+ }
1428
+ };
1429
+ const checkbox = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
1430
+ "button",
1431
+ {
1432
+ type: "button",
1433
+ role: "checkbox",
1434
+ className: `malix-checkbox${className ? ` ${className}` : ""}`,
1435
+ "data-checked": checked,
1436
+ "data-disabled": disabled,
1437
+ "data-indeterminate": indeterminate,
1438
+ "aria-checked": indeterminate ? "mixed" : checked,
1439
+ disabled,
1440
+ onClick: handleClick,
1441
+ ...props,
1442
+ children: [
1443
+ checked && !indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1444
+ "svg",
1445
+ {
1446
+ className: "malix-checkbox__icon",
1447
+ viewBox: "0 0 12 12",
1448
+ fill: "none",
1449
+ xmlns: "http://www.w3.org/2000/svg",
1450
+ "aria-hidden": "true",
1451
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1452
+ "path",
1453
+ {
1454
+ d: "M2 6l3 3 5-5",
1455
+ stroke: "currentColor",
1456
+ strokeWidth: "2",
1457
+ strokeLinecap: "round",
1458
+ strokeLinejoin: "round"
1459
+ }
1460
+ )
1461
+ }
1462
+ ) : null,
1463
+ indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1464
+ "svg",
1465
+ {
1466
+ className: "malix-checkbox__icon",
1467
+ viewBox: "0 0 12 12",
1468
+ fill: "none",
1469
+ xmlns: "http://www.w3.org/2000/svg",
1470
+ "aria-hidden": "true",
1471
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1472
+ "path",
1473
+ {
1474
+ d: "M2 6h8",
1475
+ stroke: "currentColor",
1476
+ strokeWidth: "2",
1477
+ strokeLinecap: "round"
1478
+ }
1479
+ )
1480
+ }
1481
+ ) : null
1482
+ ]
1483
+ }
1484
+ );
1485
+ if (label) {
1486
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "malix-checkbox-row", children: [
1487
+ checkbox,
1488
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "malix-checkbox-row__label", children: label })
1489
+ ] });
1490
+ }
1491
+ return checkbox;
1492
+ }
1493
+
1494
+ // src/components/Radio.tsx
1495
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1496
+ function Radio({
1497
+ checked = false,
1498
+ onChange,
1499
+ disabled = false,
1500
+ label,
1501
+ name,
1502
+ value,
1503
+ className,
1504
+ ...props
1505
+ }) {
1506
+ const handleClick = () => {
1507
+ if (!disabled && onChange) {
1508
+ onChange(value);
1509
+ }
1510
+ };
1511
+ const radio = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1512
+ "button",
1513
+ {
1514
+ type: "button",
1515
+ role: "radio",
1516
+ className: `malix-radio${className ? ` ${className}` : ""}`,
1517
+ "data-checked": checked,
1518
+ "data-disabled": disabled,
1519
+ "aria-checked": checked,
1520
+ disabled,
1521
+ "data-name": name,
1522
+ "data-value": value,
1523
+ onClick: handleClick,
1524
+ ...props,
1525
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "malix-radio__dot" })
1526
+ }
1527
+ );
1528
+ if (label) {
1529
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "malix-radio-row", children: [
1530
+ radio,
1531
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "malix-radio-row__label", children: label })
1532
+ ] });
1533
+ }
1534
+ return radio;
1535
+ }
1536
+
1537
+ // src/components/Toggle.tsx
1538
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1539
+ function Toggle({
1540
+ checked = false,
1541
+ onChange,
1542
+ disabled = false,
1543
+ label,
1544
+ className,
1545
+ ...props
1546
+ }) {
1547
+ const handleClick = () => {
1548
+ if (!disabled && onChange) {
1549
+ onChange(!checked);
1550
+ }
1551
+ };
1552
+ const toggle = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1553
+ "button",
1554
+ {
1555
+ type: "button",
1556
+ role: "switch",
1557
+ className: `malix-toggle${className ? ` ${className}` : ""}`,
1558
+ "data-checked": checked,
1559
+ "data-disabled": disabled,
1560
+ "aria-checked": checked,
1561
+ disabled,
1562
+ onClick: handleClick,
1563
+ ...props,
1564
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "malix-toggle__knob" })
1565
+ }
1566
+ );
1567
+ if (label) {
1568
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "malix-toggle-row", children: [
1569
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "malix-toggle-row__label", children: label }),
1570
+ toggle
1571
+ ] });
1572
+ }
1573
+ return toggle;
1574
+ }
1575
+
1576
+ // src/components/Select.tsx
1577
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1578
+ function Select({
1579
+ value,
1580
+ placeholder,
1581
+ options = [],
1582
+ onChange,
1583
+ disabled,
1584
+ filled,
1585
+ className,
1586
+ ...props
1587
+ }) {
1588
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
1589
+ "div",
1590
+ {
1591
+ className: `malix-select${className ? ` ${className}` : ""}`,
1592
+ "data-filled": filled || void 0,
1593
+ "data-disabled": disabled || void 0,
1594
+ children: [
1595
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
1596
+ "select",
1597
+ {
1598
+ className: "malix-select__native",
1599
+ value,
1600
+ disabled,
1601
+ onChange: (e) => onChange?.(e.target.value),
1602
+ ...props,
1603
+ children: [
1604
+ placeholder ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("option", { value: "", disabled: true, children: placeholder }) : null,
1605
+ options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
1606
+ ]
1607
+ }
1608
+ ),
1609
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "malix-select__icon", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1610
+ "path",
1611
+ {
1612
+ d: "M4 6L8 10L12 6",
1613
+ stroke: "currentColor",
1614
+ strokeWidth: "1.5",
1615
+ strokeLinecap: "round",
1616
+ strokeLinejoin: "round"
1617
+ }
1618
+ ) }) })
1619
+ ]
1620
+ }
1621
+ );
1622
+ }
1623
+
1624
+ // src/components/SelectGroup.tsx
1625
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1626
+ function SelectGroup({
1627
+ label,
1628
+ helperText,
1629
+ error,
1630
+ children,
1631
+ className,
1632
+ ...props
1633
+ }) {
1634
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
1635
+ "div",
1636
+ {
1637
+ className: `malix-select-group${className ? ` ${className}` : ""}`,
1638
+ "data-error": error || void 0,
1639
+ ...props,
1640
+ children: [
1641
+ label ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "malix-select-group__label", children: label }) : null,
1642
+ children,
1643
+ helperText ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "malix-select-group__helper", children: helperText }) : null
1644
+ ]
1645
+ }
1646
+ );
1647
+ }
1648
+
1649
+ // src/components/SegmentedControl.tsx
1650
+ var import_jsx_runtime39 = require("react/jsx-runtime");
1651
+ function SegmentedControl({
1652
+ items,
1653
+ value,
1654
+ onChange,
1655
+ className,
1656
+ ...props
1657
+ }) {
1658
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1659
+ "div",
1660
+ {
1661
+ className: `malix-segmented-control${className ? ` ${className}` : ""}`,
1662
+ role: "radiogroup",
1663
+ ...props,
1664
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1665
+ "button",
1666
+ {
1667
+ type: "button",
1668
+ className: "malix-segmented-control__item",
1669
+ role: "radio",
1670
+ "aria-checked": item.value === value,
1671
+ "data-active": item.value === value || void 0,
1672
+ onClick: () => onChange(item.value),
1673
+ children: item.label
1674
+ },
1675
+ item.value
1676
+ ))
1677
+ }
1678
+ );
1679
+ }
1680
+
1681
+ // src/components/DataTable.tsx
1682
+ var import_jsx_runtime40 = require("react/jsx-runtime");
1683
+ function DataTable({
1684
+ columns,
1685
+ data,
1686
+ onRowClick,
1687
+ emptyMessage,
1688
+ className,
1689
+ ...props
1690
+ }) {
1691
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
1692
+ "table",
1693
+ {
1694
+ className: `malix-data-table${className ? ` ${className}` : ""}`,
1695
+ ...props,
1696
+ children: [
1697
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { className: "malix-data-table__header-row", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
1698
+ "th",
1699
+ {
1700
+ className: "malix-data-table__header-cell",
1701
+ style: col.width ? { width: col.width } : void 0,
1702
+ children: col.header
1703
+ },
1704
+ col.key
1705
+ )) }) }),
1706
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tbody", { className: "malix-data-table__body", children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
1707
+ "tr",
1708
+ {
1709
+ className: "malix-data-table__data-row",
1710
+ "data-clickable": onRowClick ? true : void 0,
1711
+ onClick: onRowClick ? () => onRowClick(row) : void 0,
1712
+ children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "malix-data-table__cell", children: col.render ? col.render(row[col.key], row) : row[col.key] }, col.key))
1713
+ },
1714
+ rowIndex
1715
+ )) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { className: "malix-data-table__data-row", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
1716
+ "td",
1717
+ {
1718
+ className: "malix-data-table__cell",
1719
+ colSpan: columns.length,
1720
+ children: emptyMessage || "No data available"
1721
+ }
1722
+ ) }) })
1723
+ ]
1724
+ }
1725
+ );
1726
+ }
1727
+
1728
+ // src/components/Pagination.tsx
1729
+ var import_jsx_runtime41 = require("react/jsx-runtime");
1730
+ function ChevronLeft() {
1731
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1732
+ }
1733
+ function ChevronRight() {
1734
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M6 4L10 8L6 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1735
+ }
1736
+ function Pagination({
1737
+ currentPage,
1738
+ totalPages,
1739
+ onPageChange,
1740
+ variant = "full",
1741
+ className
1742
+ }) {
1743
+ const isFirstPage = currentPage <= 1;
1744
+ const isLastPage = currentPage >= totalPages;
1745
+ const pages = Array.from({ length: totalPages }, (_, i) => i + 1);
1746
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
1747
+ "nav",
1748
+ {
1749
+ className: `malix-pagination${className ? ` ${className}` : ""}`,
1750
+ "data-variant": variant,
1751
+ "aria-label": "Pagination",
1752
+ children: [
1753
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
1754
+ "button",
1755
+ {
1756
+ type: "button",
1757
+ className: "malix-pagination__arrow",
1758
+ "data-disabled": isFirstPage || void 0,
1759
+ disabled: isFirstPage,
1760
+ onClick: () => onPageChange(currentPage - 1),
1761
+ "aria-label": "Previous page",
1762
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ChevronLeft, {})
1763
+ }
1764
+ ),
1765
+ variant === "full" ? pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
1766
+ "button",
1767
+ {
1768
+ type: "button",
1769
+ className: "malix-pagination__item",
1770
+ "data-active": page === currentPage || void 0,
1771
+ "aria-current": page === currentPage ? "page" : void 0,
1772
+ onClick: () => onPageChange(page),
1773
+ children: page
1774
+ },
1775
+ page
1776
+ )) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "malix-pagination__label", children: [
1777
+ currentPage,
1778
+ " of ",
1779
+ totalPages
1780
+ ] }),
1781
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
1782
+ "button",
1783
+ {
1784
+ type: "button",
1785
+ className: "malix-pagination__arrow",
1786
+ "data-disabled": isLastPage || void 0,
1787
+ disabled: isLastPage,
1788
+ onClick: () => onPageChange(currentPage + 1),
1789
+ "aria-label": "Next page",
1790
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ChevronRight, {})
1791
+ }
1792
+ )
1793
+ ]
1794
+ }
1795
+ );
1796
+ }
1797
+
1798
+ // src/components/StatusDot.tsx
1799
+ var import_jsx_runtime42 = require("react/jsx-runtime");
1800
+ function StatusDot({
1801
+ variant = "default",
1802
+ label,
1803
+ className,
1804
+ ...props
1805
+ }) {
1806
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
1807
+ "span",
1808
+ {
1809
+ className: `malix-status-dot${className ? ` ${className}` : ""}`,
1810
+ "data-variant": variant,
1811
+ ...props,
1812
+ children: [
1813
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "malix-status-dot__dot", "aria-hidden": "true" }),
1814
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "malix-status-dot__label", children: label })
1815
+ ]
1816
+ }
1817
+ );
1818
+ }
1819
+
1820
+ // src/components/Dropzone.tsx
1821
+ var import_react11 = require("react");
1822
+ var import_jsx_runtime43 = require("react/jsx-runtime");
1823
+ function Dropzone({
1824
+ onDrop,
1825
+ accept,
1826
+ title = "Drop files here",
1827
+ hint = "or click to browse",
1828
+ disabled = false,
1829
+ className,
1830
+ ...props
1831
+ }) {
1832
+ const [dragging, setDragging] = (0, import_react11.useState)(false);
1833
+ const inputRef = (0, import_react11.useRef)(null);
1834
+ function handleDragOver(event) {
1835
+ event.preventDefault();
1836
+ if (!disabled) setDragging(true);
1837
+ }
1838
+ function handleDragLeave(event) {
1839
+ event.preventDefault();
1840
+ setDragging(false);
1841
+ }
1842
+ function handleDrop(event) {
1843
+ event.preventDefault();
1844
+ setDragging(false);
1845
+ if (disabled) return;
1846
+ const files = Array.from(event.dataTransfer.files);
1847
+ onDrop?.(files);
1848
+ }
1849
+ function handleInputChange(event) {
1850
+ const files = event.target.files ? Array.from(event.target.files) : [];
1851
+ if (files.length > 0) onDrop?.(files);
1852
+ event.target.value = "";
1853
+ }
1854
+ function handleClick() {
1855
+ if (!disabled) inputRef.current?.click();
1856
+ }
1857
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
1858
+ "div",
1859
+ {
1860
+ className: `malix-dropzone${className ? ` ${className}` : ""}`,
1861
+ "data-dragging": dragging,
1862
+ "data-disabled": disabled,
1863
+ onDragOver: handleDragOver,
1864
+ onDragLeave: handleDragLeave,
1865
+ onDrop: handleDrop,
1866
+ onClick: handleClick,
1867
+ role: "button",
1868
+ tabIndex: disabled ? -1 : 0,
1869
+ "aria-disabled": disabled || void 0,
1870
+ ...props,
1871
+ children: [
1872
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1873
+ "input",
1874
+ {
1875
+ ref: inputRef,
1876
+ type: "file",
1877
+ accept,
1878
+ onChange: handleInputChange,
1879
+ hidden: true,
1880
+ "aria-hidden": "true"
1881
+ }
1882
+ ),
1883
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
1884
+ "svg",
1885
+ {
1886
+ className: "malix-dropzone__icon",
1887
+ width: "32",
1888
+ height: "32",
1889
+ viewBox: "0 0 24 24",
1890
+ fill: "none",
1891
+ stroke: "currentColor",
1892
+ strokeWidth: "1.5",
1893
+ strokeLinecap: "round",
1894
+ strokeLinejoin: "round",
1895
+ "aria-hidden": "true",
1896
+ children: [
1897
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }),
1898
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M12 12v9" }),
1899
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "m16 16-4-4-4 4" })
1900
+ ]
1901
+ }
1902
+ ),
1903
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "malix-dropzone__title", children: title }),
1904
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "malix-dropzone__hint", children: hint }),
1905
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "malix-dropzone__browse-btn", children: "Browse files" })
1906
+ ]
1907
+ }
1908
+ );
1909
+ }
1910
+
1911
+ // src/components/SplitPane.tsx
1912
+ var import_react12 = require("react");
1913
+ var import_jsx_runtime44 = require("react/jsx-runtime");
1914
+ function SplitPane({
1915
+ leftPanel,
1916
+ rightPanel,
1917
+ leftTitle,
1918
+ rightTitle,
1919
+ defaultSplit = 50,
1920
+ className,
1921
+ ...props
1922
+ }) {
1923
+ const [split, setSplit] = (0, import_react12.useState)(defaultSplit);
1924
+ const containerRef = (0, import_react12.useRef)(null);
1925
+ const dragging = (0, import_react12.useRef)(false);
1926
+ const onMouseDown = (0, import_react12.useCallback)((e) => {
1927
+ e.preventDefault();
1928
+ dragging.current = true;
1929
+ }, []);
1930
+ (0, import_react12.useEffect)(() => {
1931
+ function onMouseMove(e) {
1932
+ if (!dragging.current || !containerRef.current) return;
1933
+ const rect = containerRef.current.getBoundingClientRect();
1934
+ const x = e.clientX - rect.left;
1935
+ const pct = Math.min(Math.max(x / rect.width * 100, 5), 95);
1936
+ setSplit(pct);
1937
+ }
1938
+ function onMouseUp() {
1939
+ dragging.current = false;
1940
+ }
1941
+ document.addEventListener("mousemove", onMouseMove);
1942
+ document.addEventListener("mouseup", onMouseUp);
1943
+ return () => {
1944
+ document.removeEventListener("mousemove", onMouseMove);
1945
+ document.removeEventListener("mouseup", onMouseUp);
1946
+ };
1947
+ }, []);
1948
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
1949
+ "div",
1950
+ {
1951
+ ref: containerRef,
1952
+ className: `malix-split-pane${className ? ` ${className}` : ""}`,
1953
+ ...props,
1954
+ children: [
1955
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "malix-split-pane__left", style: { width: `${split}%` }, children: [
1956
+ leftTitle ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "malix-split-pane__panel-title", children: leftTitle }) : null,
1957
+ leftPanel
1958
+ ] }),
1959
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
1960
+ "div",
1961
+ {
1962
+ className: "malix-split-pane__handle",
1963
+ role: "separator",
1964
+ "aria-valuenow": Math.round(split),
1965
+ "aria-valuemin": 5,
1966
+ "aria-valuemax": 95,
1967
+ "aria-label": "Resize panels",
1968
+ onMouseDown,
1969
+ children: [
1970
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "malix-split-pane__handle-dot", "aria-hidden": "true" }),
1971
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "malix-split-pane__handle-dot", "aria-hidden": "true" }),
1972
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "malix-split-pane__handle-dot", "aria-hidden": "true" })
1973
+ ]
1974
+ }
1975
+ ),
1976
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "malix-split-pane__right", style: { width: `${100 - split}%` }, children: [
1977
+ rightTitle ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "malix-split-pane__panel-title", children: rightTitle }) : null,
1978
+ rightPanel
1979
+ ] })
1980
+ ]
1981
+ }
1982
+ );
1983
+ }
1984
+
1985
+ // src/components/PricingCard.tsx
1986
+ var import_jsx_runtime45 = require("react/jsx-runtime");
1987
+ function PricingCard({
1988
+ planName,
1989
+ price,
1990
+ period = "/month",
1991
+ description,
1992
+ features,
1993
+ ctaLabel = "Get Started",
1994
+ onCtaClick,
1995
+ highlighted = false,
1996
+ className,
1997
+ ...props
1998
+ }) {
1999
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
2000
+ "div",
2001
+ {
2002
+ className: `malix-pricing-card${className ? ` ${className}` : ""}`,
2003
+ "data-highlighted": highlighted || void 0,
2004
+ ...props,
2005
+ children: [
2006
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "malix-pricing-card__badge", children: planName }),
2007
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "malix-pricing-card__price-row", children: [
2008
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "malix-pricing-card__price", children: price }),
2009
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "malix-pricing-card__period", children: period })
2010
+ ] }),
2011
+ description ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "malix-pricing-card__description", children: description }) : null,
2012
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("ul", { className: "malix-pricing-card__features", children: features.map((feature, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("li", { className: "malix-pricing-card__feature-item", children: [
2013
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2014
+ "svg",
2015
+ {
2016
+ className: "malix-pricing-card__check-icon",
2017
+ width: "16",
2018
+ height: "16",
2019
+ viewBox: "0 0 24 24",
2020
+ fill: "none",
2021
+ stroke: "currentColor",
2022
+ strokeWidth: "2",
2023
+ strokeLinecap: "round",
2024
+ strokeLinejoin: "round",
2025
+ "aria-hidden": "true",
2026
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("polyline", { points: "20 6 9 17 4 12" })
2027
+ }
2028
+ ),
2029
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: feature })
2030
+ ] }, i)) }),
2031
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2032
+ "button",
2033
+ {
2034
+ type: "button",
2035
+ className: "malix-pricing-card__cta",
2036
+ onClick: onCtaClick,
2037
+ children: ctaLabel
2038
+ }
2039
+ )
2040
+ ]
2041
+ }
2042
+ );
2043
+ }
2044
+
2045
+ // src/components/OnboardingPopover.tsx
2046
+ var import_jsx_runtime46 = require("react/jsx-runtime");
2047
+ function OnboardingPopover({
2048
+ step,
2049
+ totalSteps,
2050
+ title,
2051
+ description,
2052
+ onNext,
2053
+ onSkip,
2054
+ nextLabel = "Next",
2055
+ className,
2056
+ ...props
2057
+ }) {
2058
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
2059
+ "div",
2060
+ {
2061
+ className: `malix-onboarding-popover${className ? ` ${className}` : ""}`,
2062
+ role: "dialog",
2063
+ "aria-label": `Step ${step} of ${totalSteps}: ${title}`,
2064
+ ...props,
2065
+ children: [
2066
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "malix-onboarding-popover__step", children: [
2067
+ "Step ",
2068
+ step,
2069
+ " of ",
2070
+ totalSteps
2071
+ ] }),
2072
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h3", { className: "malix-onboarding-popover__title", children: title }),
2073
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "malix-onboarding-popover__description", children: description }),
2074
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "malix-onboarding-popover__actions", children: [
2075
+ onSkip ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2076
+ "button",
2077
+ {
2078
+ type: "button",
2079
+ className: "malix-onboarding-popover__skip",
2080
+ onClick: onSkip,
2081
+ children: "Skip"
2082
+ }
2083
+ ) : null,
2084
+ onNext ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2085
+ "button",
2086
+ {
2087
+ type: "button",
2088
+ className: "malix-onboarding-popover__next-btn",
2089
+ onClick: onNext,
2090
+ children: nextLabel
2091
+ }
2092
+ ) : null
2093
+ ] })
2094
+ ]
2095
+ }
2096
+ );
2097
+ }
2098
+
2099
+ // src/components/CreditsIndicator.tsx
2100
+ var import_jsx_runtime47 = require("react/jsx-runtime");
2101
+ function CreditsIndicator({
2102
+ remaining,
2103
+ label = "Credits Remaining",
2104
+ className,
2105
+ ...props
2106
+ }) {
2107
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
2108
+ "div",
2109
+ {
2110
+ className: `malix-credits-indicator${className ? ` ${className}` : ""}`,
2111
+ ...props,
2112
+ children: [
2113
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "malix-credits-indicator__icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
2114
+ "svg",
2115
+ {
2116
+ width: "20",
2117
+ height: "20",
2118
+ viewBox: "0 0 24 24",
2119
+ fill: "none",
2120
+ stroke: "currentColor",
2121
+ strokeWidth: "2",
2122
+ strokeLinecap: "round",
2123
+ strokeLinejoin: "round",
2124
+ children: [
2125
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ellipse", { cx: "12", cy: "6", rx: "8", ry: "3" }),
2126
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { d: "M4 6v6c0 1.66 3.58 3 8 3s8-1.34 8-3V6" }),
2127
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { d: "M4 12v6c0 1.66 3.58 3 8 3s8-1.34 8-3v-6" })
2128
+ ]
2129
+ }
2130
+ ) }),
2131
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "malix-credits-indicator__info", children: [
2132
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "malix-credits-indicator__label", children: label }),
2133
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "malix-credits-indicator__value", children: remaining })
2134
+ ] })
2135
+ ]
2136
+ }
2137
+ );
2138
+ }
2139
+
2140
+ // src/components/LanguageSelector.tsx
2141
+ var import_jsx_runtime48 = require("react/jsx-runtime");
2142
+ function LanguageSelector({
2143
+ value,
2144
+ options,
2145
+ onChange,
2146
+ className,
2147
+ ...props
2148
+ }) {
2149
+ const selectedOption = options?.find((opt) => opt.value === value);
2150
+ const displayLabel = selectedOption?.label ?? value;
2151
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
2152
+ "div",
2153
+ {
2154
+ className: `malix-language-selector${className ? ` ${className}` : ""}`,
2155
+ ...props,
2156
+ children: [
2157
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "malix-language-selector__icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
2158
+ "svg",
2159
+ {
2160
+ width: "16",
2161
+ height: "16",
2162
+ viewBox: "0 0 24 24",
2163
+ fill: "none",
2164
+ stroke: "currentColor",
2165
+ strokeWidth: "2",
2166
+ strokeLinecap: "round",
2167
+ strokeLinejoin: "round",
2168
+ children: [
2169
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
2170
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("line", { x1: "2", y1: "12", x2: "22", y2: "12" }),
2171
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10A15.3 15.3 0 0 1 12 2z" })
2172
+ ]
2173
+ }
2174
+ ) }),
2175
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2176
+ "select",
2177
+ {
2178
+ className: "malix-language-selector__select",
2179
+ value,
2180
+ onChange: (e) => onChange?.(e.target.value),
2181
+ "aria-label": "Select language",
2182
+ children: options ? options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("option", { value: opt.value, children: opt.label }, opt.value)) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("option", { value, children: displayLabel })
2183
+ }
2184
+ ),
2185
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "malix-language-selector__label", children: displayLabel }),
2186
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "malix-language-selector__chevron", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2187
+ "svg",
2188
+ {
2189
+ width: "14",
2190
+ height: "14",
2191
+ viewBox: "0 0 24 24",
2192
+ fill: "none",
2193
+ stroke: "currentColor",
2194
+ strokeWidth: "2",
2195
+ strokeLinecap: "round",
2196
+ strokeLinejoin: "round",
2197
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("polyline", { points: "6 9 12 15 18 9" })
2198
+ }
2199
+ ) })
2200
+ ]
2201
+ }
2202
+ );
2203
+ }
2204
+
2205
+ // src/components/UserProfilePopover.tsx
2206
+ var import_jsx_runtime49 = require("react/jsx-runtime");
2207
+ function UserProfilePopover({
2208
+ name,
2209
+ email,
2210
+ avatar,
2211
+ menuItems,
2212
+ onLogout,
2213
+ credits,
2214
+ className,
2215
+ ...props
2216
+ }) {
2217
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
2218
+ "div",
2219
+ {
2220
+ className: `malix-user-profile${className ? ` ${className}` : ""}`,
2221
+ ...props,
2222
+ children: [
2223
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "malix-user-profile__header", children: [
2224
+ avatar ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "malix-user-profile__avatar", children: avatar }) : null,
2225
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "malix-user-profile__info", children: [
2226
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "malix-user-profile__name", children: name }),
2227
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "malix-user-profile__email", children: email })
2228
+ ] })
2229
+ ] }),
2230
+ credits !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "malix-user-profile__credits", children: [
2231
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "malix-user-profile__credits-label", children: "Credits" }),
2232
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "malix-user-profile__credits-value", children: credits })
2233
+ ] }) : null,
2234
+ menuItems && menuItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
2235
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("hr", { className: "malix-user-profile__divider" }),
2236
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("nav", { className: "malix-user-profile__menu", role: "menu", children: menuItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
2237
+ "button",
2238
+ {
2239
+ type: "button",
2240
+ className: "malix-user-profile__menu-item",
2241
+ role: "menuitem",
2242
+ onClick: item.onClick,
2243
+ children: [
2244
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "malix-user-profile__menu-item-icon", children: item.icon }) : null,
2245
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "malix-user-profile__menu-item-label", children: item.label })
2246
+ ]
2247
+ },
2248
+ i
2249
+ )) })
2250
+ ] }) : null,
2251
+ onLogout ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
2252
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("hr", { className: "malix-user-profile__divider" }),
2253
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
2254
+ "button",
2255
+ {
2256
+ type: "button",
2257
+ className: "malix-user-profile__logout",
2258
+ onClick: onLogout,
2259
+ children: [
2260
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
2261
+ "svg",
2262
+ {
2263
+ width: "16",
2264
+ height: "16",
2265
+ viewBox: "0 0 24 24",
2266
+ fill: "none",
2267
+ stroke: "currentColor",
2268
+ strokeWidth: "2",
2269
+ strokeLinecap: "round",
2270
+ strokeLinejoin: "round",
2271
+ children: [
2272
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
2273
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("polyline", { points: "16 17 21 12 16 7" }),
2274
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
2275
+ ]
2276
+ }
2277
+ ),
2278
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: "Log out" })
2279
+ ]
2280
+ }
2281
+ )
2282
+ ] }) : null
2283
+ ]
2284
+ }
2285
+ );
2286
+ }
2287
+
2288
+ // src/components/ChatBubble.tsx
2289
+ var import_jsx_runtime50 = require("react/jsx-runtime");
2290
+ function ChatBubble({
2291
+ variant,
2292
+ message,
2293
+ avatarInitials,
2294
+ children,
2295
+ className
2296
+ }) {
2297
+ const content = children ?? message;
2298
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
2299
+ "div",
2300
+ {
2301
+ className: `malix-chat-bubble-row${className ? ` ${className}` : ""}`,
2302
+ "data-variant": variant,
2303
+ children: [
2304
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "malix-chat-bubble", "data-variant": variant, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "malix-chat-bubble__text", children: content }) }),
2305
+ variant === "user" && avatarInitials ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "malix-chat-bubble__avatar", children: avatarInitials }) : null
2306
+ ]
2307
+ }
2308
+ );
2309
+ }
2310
+
2311
+ // src/components/AIAssistantPanel.tsx
2312
+ var import_react13 = require("react");
2313
+ var import_jsx_runtime51 = require("react/jsx-runtime");
2314
+ function AIAssistantPanel({
2315
+ title = "AI Assistant",
2316
+ messages,
2317
+ onSend,
2318
+ onClose,
2319
+ placeholder = "Ask the AI assistant...",
2320
+ userInitials,
2321
+ disabled,
2322
+ className
2323
+ }) {
2324
+ const [draft, setDraft] = (0, import_react13.useState)("");
2325
+ const bodyRef = (0, import_react13.useRef)(null);
2326
+ (0, import_react13.useEffect)(() => {
2327
+ if (bodyRef.current) {
2328
+ bodyRef.current.scrollTop = bodyRef.current.scrollHeight;
2329
+ }
2330
+ }, [messages]);
2331
+ const handleSend = () => {
2332
+ const text = draft.trim();
2333
+ if (!text) return;
2334
+ onSend(text);
2335
+ setDraft("");
2336
+ };
2337
+ const handleKeyDown = (e) => {
2338
+ if (e.key === "Enter" && !e.shiftKey && draft.trim()) {
2339
+ e.preventDefault();
2340
+ handleSend();
2341
+ }
2342
+ };
2343
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `malix-ai-panel${className ? ` ${className}` : ""}`, children: [
2344
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "malix-ai-panel__header", children: [
2345
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "malix-ai-panel__logo", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { d: "M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z" }) }) }),
2346
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "malix-ai-panel__title", children: title }),
2347
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2348
+ "button",
2349
+ {
2350
+ type: "button",
2351
+ className: "malix-ai-panel__close",
2352
+ onClick: onClose,
2353
+ "aria-label": "Close assistant",
2354
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2355
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { d: "M18 6 6 18" }),
2356
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { d: "m6 6 12 12" })
2357
+ ] })
2358
+ }
2359
+ ) : null
2360
+ ] }),
2361
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "malix-ai-panel__body", ref: bodyRef, children: messages.map((msg) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2362
+ ChatBubble,
2363
+ {
2364
+ variant: msg.variant,
2365
+ message: msg.content,
2366
+ avatarInitials: msg.variant === "user" ? userInitials : void 0
2367
+ },
2368
+ msg.id
2369
+ )) }),
2370
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "malix-ai-panel__footer", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "malix-ai-panel__input-row", children: [
2371
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2372
+ "input",
2373
+ {
2374
+ type: "text",
2375
+ className: "malix-ai-panel__input",
2376
+ value: draft,
2377
+ onChange: (e) => setDraft(e.target.value),
2378
+ onKeyDown: handleKeyDown,
2379
+ placeholder,
2380
+ disabled,
2381
+ "aria-label": placeholder
2382
+ }
2383
+ ),
2384
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2385
+ "button",
2386
+ {
2387
+ type: "button",
2388
+ className: "malix-ai-panel__send",
2389
+ onClick: handleSend,
2390
+ disabled: disabled || !draft.trim(),
2391
+ "aria-label": "Send message",
2392
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2393
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { d: "M12 19V5" }),
2394
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { d: "m5 12 7-7 7 7" })
2395
+ ] })
2396
+ }
2397
+ )
2398
+ ] }) })
2399
+ ] });
2400
+ }
2401
+ // Annotate the CommonJS export names for ESM import in node:
2402
+ 0 && (module.exports = {
2403
+ AIAssistantPanel,
2404
+ Accordion,
2405
+ Avatar,
2406
+ Badge,
2407
+ Banner,
2408
+ Breadcrumb,
2409
+ Button,
2410
+ Card,
2411
+ ChatBubble,
2412
+ ChatInput,
2413
+ Checkbox,
2414
+ CreditsIndicator,
2415
+ DataTable,
2416
+ DateInput,
2417
+ Divider,
2418
+ Dropzone,
2419
+ EmptyState,
2420
+ FileCard,
2421
+ FilterTabs,
2422
+ FlyoutMenu,
2423
+ GlassPopover,
2424
+ Header,
2425
+ Input,
2426
+ InputGroup,
2427
+ LanguageSelector,
2428
+ Modal,
2429
+ OnboardingPopover,
2430
+ OperationStatus,
2431
+ Overlay,
2432
+ Pagination,
2433
+ Pill,
2434
+ PricingCard,
2435
+ ProgressBar,
2436
+ Radio,
2437
+ SearchInput,
2438
+ SectionHeader,
2439
+ SegmentedControl,
2440
+ Select,
2441
+ SelectGroup,
2442
+ SelectionCard,
2443
+ SidebarItem,
2444
+ SidebarPanel,
2445
+ SplitPane,
2446
+ StatCard,
2447
+ StatusDot,
2448
+ Stepper,
2449
+ TabBar,
2450
+ Textarea,
2451
+ Toggle,
2452
+ Tooltip,
2453
+ UserProfilePopover,
2454
+ ValidationAlert,
2455
+ tokenRegistry
2456
+ });