@iskra-ui/react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/LICENCE.md +79 -0
  2. package/dist/components/Alert/Alert.d.ts +18 -0
  3. package/dist/components/Alert/Alert.d.ts.map +1 -0
  4. package/dist/components/Alert/index.d.ts +3 -0
  5. package/dist/components/Alert/index.d.ts.map +1 -0
  6. package/dist/components/Avatar/Avatar.d.ts +16 -0
  7. package/dist/components/Avatar/Avatar.d.ts.map +1 -0
  8. package/dist/components/Avatar/index.d.ts +3 -0
  9. package/dist/components/Avatar/index.d.ts.map +1 -0
  10. package/dist/components/Badge/Badge.d.ts +21 -0
  11. package/dist/components/Badge/Badge.d.ts.map +1 -0
  12. package/dist/components/Badge/index.d.ts +3 -0
  13. package/dist/components/Badge/index.d.ts.map +1 -0
  14. package/dist/components/Button/Button.d.ts +26 -0
  15. package/dist/components/Button/Button.d.ts.map +1 -0
  16. package/dist/components/Button/index.d.ts +3 -0
  17. package/dist/components/Button/index.d.ts.map +1 -0
  18. package/dist/components/Card/Card.d.ts +21 -0
  19. package/dist/components/Card/Card.d.ts.map +1 -0
  20. package/dist/components/Card/index.d.ts +3 -0
  21. package/dist/components/Card/index.d.ts.map +1 -0
  22. package/dist/components/Checkbox/Checkbox.d.ts +12 -0
  23. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  24. package/dist/components/Checkbox/index.d.ts +3 -0
  25. package/dist/components/Checkbox/index.d.ts.map +1 -0
  26. package/dist/components/EmptyState/EmptyState.d.ts +12 -0
  27. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -0
  28. package/dist/components/EmptyState/index.d.ts +3 -0
  29. package/dist/components/EmptyState/index.d.ts.map +1 -0
  30. package/dist/components/FormField/FormField.d.ts +27 -0
  31. package/dist/components/FormField/FormField.d.ts.map +1 -0
  32. package/dist/components/FormField/index.d.ts +3 -0
  33. package/dist/components/FormField/index.d.ts.map +1 -0
  34. package/dist/components/Icon/Icon.d.ts +21 -0
  35. package/dist/components/Icon/Icon.d.ts.map +1 -0
  36. package/dist/components/Icon/index.d.ts +3 -0
  37. package/dist/components/Icon/index.d.ts.map +1 -0
  38. package/dist/components/IconButton/IconButton.d.ts +11 -0
  39. package/dist/components/IconButton/IconButton.d.ts.map +1 -0
  40. package/dist/components/IconButton/index.d.ts +3 -0
  41. package/dist/components/IconButton/index.d.ts.map +1 -0
  42. package/dist/components/Modal/Modal.d.ts +24 -0
  43. package/dist/components/Modal/Modal.d.ts.map +1 -0
  44. package/dist/components/Modal/index.d.ts +3 -0
  45. package/dist/components/Modal/index.d.ts.map +1 -0
  46. package/dist/components/Radio/Radio.d.ts +32 -0
  47. package/dist/components/Radio/Radio.d.ts.map +1 -0
  48. package/dist/components/Radio/index.d.ts +3 -0
  49. package/dist/components/Radio/index.d.ts.map +1 -0
  50. package/dist/components/Sidebar/Sidebar.d.ts +23 -0
  51. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
  52. package/dist/components/Sidebar/index.d.ts +3 -0
  53. package/dist/components/Sidebar/index.d.ts.map +1 -0
  54. package/dist/components/Skeleton/Skeleton.d.ts +14 -0
  55. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
  56. package/dist/components/Skeleton/index.d.ts +3 -0
  57. package/dist/components/Skeleton/index.d.ts.map +1 -0
  58. package/dist/components/Spinner/Spinner.d.ts +11 -0
  59. package/dist/components/Spinner/Spinner.d.ts.map +1 -0
  60. package/dist/components/Spinner/index.d.ts +3 -0
  61. package/dist/components/Spinner/index.d.ts.map +1 -0
  62. package/dist/components/Switch/Switch.d.ts +11 -0
  63. package/dist/components/Switch/Switch.d.ts.map +1 -0
  64. package/dist/components/Switch/index.d.ts +3 -0
  65. package/dist/components/Switch/index.d.ts.map +1 -0
  66. package/dist/components/Table/Table.d.ts +33 -0
  67. package/dist/components/Table/Table.d.ts.map +1 -0
  68. package/dist/components/Table/index.d.ts +3 -0
  69. package/dist/components/Table/index.d.ts.map +1 -0
  70. package/dist/components/Tabs/Tabs.d.ts +22 -0
  71. package/dist/components/Tabs/Tabs.d.ts.map +1 -0
  72. package/dist/components/Tabs/index.d.ts +3 -0
  73. package/dist/components/Tabs/index.d.ts.map +1 -0
  74. package/dist/components/TextField/TextField.d.ts +23 -0
  75. package/dist/components/TextField/TextField.d.ts.map +1 -0
  76. package/dist/components/TextField/index.d.ts +3 -0
  77. package/dist/components/TextField/index.d.ts.map +1 -0
  78. package/dist/components/Textarea/Textarea.d.ts +15 -0
  79. package/dist/components/Textarea/Textarea.d.ts.map +1 -0
  80. package/dist/components/Textarea/index.d.ts +3 -0
  81. package/dist/components/Textarea/index.d.ts.map +1 -0
  82. package/dist/components/Toast/Toast.d.ts +24 -0
  83. package/dist/components/Toast/Toast.d.ts.map +1 -0
  84. package/dist/components/Toast/index.d.ts +3 -0
  85. package/dist/components/Toast/index.d.ts.map +1 -0
  86. package/dist/index.cjs +2 -0
  87. package/dist/index.cjs.map +1 -0
  88. package/dist/index.d.ts +23 -0
  89. package/dist/index.d.ts.map +1 -0
  90. package/dist/index.js +1472 -0
  91. package/dist/index.js.map +1 -0
  92. package/dist/styles.css +2 -0
  93. package/dist/utils/cx.d.ts +3 -0
  94. package/dist/utils/cx.d.ts.map +1 -0
  95. package/dist/utils/useFocusTrap.d.ts +8 -0
  96. package/dist/utils/useFocusTrap.d.ts.map +1 -0
  97. package/package.json +60 -0
package/dist/index.js ADDED
@@ -0,0 +1,1472 @@
1
+ import { Children as e, cloneElement as t, createContext as n, forwardRef as r, isValidElement as i, useCallback as a, useContext as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
2
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
3
+ import { createPortal as m } from "react-dom";
4
+ //#region ../icons/dist/icons.js
5
+ var h = {
6
+ "chevron-down": "<polyline points=\"4,6 8,10 12,6\"/>",
7
+ "chevron-up": "<polyline points=\"4,10 8,6 12,10\"/>",
8
+ "chevron-left": "<polyline points=\"10,4 6,8 10,12\"/>",
9
+ "chevron-right": "<polyline points=\"6,4 10,8 6,12\"/>",
10
+ "chevrons-left": "<polyline points=\"7.5,4 3.5,8 7.5,12\"/><polyline points=\"12,4 8,8 12,12\"/>",
11
+ "chevrons-right": "<polyline points=\"8.5,4 12.5,8 8.5,12\"/><polyline points=\"4,4 8,8 4,12\"/>",
12
+ "arrow-up": "<line x1=\"8\" y1=\"13.5\" x2=\"8\" y2=\"3\"/><polyline points=\"4,7 8,3 12,7\"/>",
13
+ "arrow-down": "<line x1=\"8\" y1=\"2.5\" x2=\"8\" y2=\"13\"/><polyline points=\"4,9 8,13 12,9\"/>",
14
+ "arrow-left": "<line x1=\"13.5\" y1=\"8\" x2=\"3\" y2=\"8\"/><polyline points=\"7,4 3,8 7,12\"/>",
15
+ "arrow-right": "<line x1=\"2.5\" y1=\"8\" x2=\"13\" y2=\"8\"/><polyline points=\"9,4 13,8 9,12\"/>",
16
+ "arrow-up-right": "<line x1=\"4\" y1=\"12\" x2=\"12\" y2=\"4\"/><polyline points=\"5.5,4 12,4 12,10.5\"/>",
17
+ external: "<path d=\"M8.5 3H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V7.5\"/><polyline points=\"9.5,2.5 13.5,2.5 13.5,6.5\"/><line x1=\"13.5\" y1=\"2.5\" x2=\"7.5\" y2=\"8.5\"/>",
18
+ menu: "<line x1=\"2.5\" y1=\"4.5\" x2=\"13.5\" y2=\"4.5\"/><line x1=\"2.5\" y1=\"8\" x2=\"13.5\" y2=\"8\"/><line x1=\"2.5\" y1=\"11.5\" x2=\"13.5\" y2=\"11.5\"/>",
19
+ more: "<circle cx=\"3.5\" cy=\"8\" r=\"1.1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"8\" cy=\"8\" r=\"1.1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12.5\" cy=\"8\" r=\"1.1\" fill=\"currentColor\" stroke=\"none\"/>",
20
+ "more-vertical": "<circle cx=\"8\" cy=\"3.5\" r=\"1.1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"8\" cy=\"8\" r=\"1.1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"8\" cy=\"12.5\" r=\"1.1\" fill=\"currentColor\" stroke=\"none\"/>",
21
+ check: "<polyline points=\"3.5,8.5 6.5,11.5 12.5,4.5\"/>",
22
+ close: "<line x1=\"4\" y1=\"4\" x2=\"12\" y2=\"12\"/><line x1=\"12\" y1=\"4\" x2=\"4\" y2=\"12\"/>",
23
+ plus: "<line x1=\"8\" y1=\"3\" x2=\"8\" y2=\"13\"/><line x1=\"3\" y1=\"8\" x2=\"13\" y2=\"8\"/>",
24
+ minus: "<line x1=\"3\" y1=\"8\" x2=\"13\" y2=\"8\"/>",
25
+ "check-circle": "<circle cx=\"8\" cy=\"8\" r=\"6\"/><polyline points=\"5.3,8.2 7,10 10.7,5.8\"/>",
26
+ "x-circle": "<circle cx=\"8\" cy=\"8\" r=\"6\"/><line x1=\"5.7\" y1=\"5.7\" x2=\"10.3\" y2=\"10.3\"/><line x1=\"10.3\" y1=\"5.7\" x2=\"5.7\" y2=\"10.3\"/>",
27
+ "plus-circle": "<circle cx=\"8\" cy=\"8\" r=\"6\"/><line x1=\"8\" y1=\"5.3\" x2=\"8\" y2=\"10.7\"/><line x1=\"5.3\" y1=\"8\" x2=\"10.7\" y2=\"8\"/>",
28
+ "minus-circle": "<circle cx=\"8\" cy=\"8\" r=\"6\"/><line x1=\"5.3\" y1=\"8\" x2=\"10.7\" y2=\"8\"/>",
29
+ success: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><polyline points=\"5.3,8.2 7,10 10.7,5.8\"/>",
30
+ warning: "<path d=\"M8 2.2 14.3 13.2a.6.6 0 0 1-.52.9H2.22a.6.6 0 0 1-.52-.9Z\"/><line x1=\"8\" y1=\"6.4\" x2=\"8\" y2=\"9.6\"/><circle cx=\"8\" cy=\"11.6\" r=\".55\" fill=\"currentColor\" stroke=\"none\"/>",
31
+ error: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><line x1=\"5.7\" y1=\"5.7\" x2=\"10.3\" y2=\"10.3\"/><line x1=\"10.3\" y1=\"5.7\" x2=\"5.7\" y2=\"10.3\"/>",
32
+ info: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><line x1=\"8\" y1=\"7.4\" x2=\"8\" y2=\"11\"/><circle cx=\"8\" cy=\"5\" r=\".55\" fill=\"currentColor\" stroke=\"none\"/>",
33
+ help: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><path d=\"M6.2 6.3a1.85 1.85 0 0 1 3.6.6c0 1.25-1.8 1.55-1.8 2.7\"/><circle cx=\"8\" cy=\"11.5\" r=\".55\" fill=\"currentColor\" stroke=\"none\"/>",
34
+ search: "<circle cx=\"7\" cy=\"7\" r=\"4.5\"/><line x1=\"10.5\" y1=\"10.5\" x2=\"14.5\" y2=\"14.5\"/>",
35
+ filter: "<path d=\"M2.5 4h11l-4.2 5v3.8l-2.6-1.3V9z\"/>",
36
+ sliders: "<line x1=\"2.5\" y1=\"5\" x2=\"13.5\" y2=\"5\"/><line x1=\"2.5\" y1=\"11\" x2=\"13.5\" y2=\"11\"/><circle cx=\"6\" cy=\"5\" r=\"1.8\" fill=\"var(--bg,#0D1117)\"/><circle cx=\"10.5\" cy=\"11\" r=\"1.8\" fill=\"var(--bg,#0D1117)\"/>",
37
+ refresh: "<path d=\"M2.7 8a5.3 5.3 0 0 1 9-3.8l1.6 1.5\"/><polyline points=\"13.3,2.3 13.3,5.7 9.9,5.7\"/><path d=\"M13.3 8a5.3 5.3 0 0 1-9 3.8l-1.6-1.5\"/><polyline points=\"2.7,13.7 2.7,10.3 6.1,10.3\"/>",
38
+ sync: "<path d=\"M3.5 6.5A5 5 0 0 1 12.8 6\"/><polyline points=\"12.5,2.6 13,6 9.6,6.4\"/><path d=\"M12.5 9.5A5 5 0 0 1 3.2 10\"/><polyline points=\"3.5,13.4 3,10 6.4,9.6\"/>",
39
+ undo: "<polyline points=\"5.5,4 2.5,7 5.5,10\"/><path d=\"M2.5 7h6.5a3.5 3.5 0 0 1 0 7H6\"/>",
40
+ redo: "<polyline points=\"10.5,4 13.5,7 10.5,10\"/><path d=\"M13.5 7H7a3.5 3.5 0 0 0 0 7h3\"/>",
41
+ trash: "<polyline points=\"3,4.5 13,4.5\"/><path d=\"M5.5 4.5V3.2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1V4.5\"/><path d=\"M4.3 4.5 5 13a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1l.7-8.5\"/>",
42
+ edit: "<path d=\"M11 2.5 13.5 5 6 12.5 3 13.5 4 10.5Z\"/><line x1=\"9.5\" y1=\"4\" x2=\"12\" y2=\"6.5\"/>",
43
+ copy: "<rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8\" rx=\"1.2\"/><path d=\"M3.5 10.5a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1\"/>",
44
+ save: "<path d=\"M3 2.5h8L13.5 5v8.5a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1v-10a1 1 0 0 1 1-1Z\"/><path d=\"M5 2.5v3h5v-3\"/><rect x=\"5\" y=\"8.5\" width=\"6\" height=\"4\"/>",
45
+ download: "<line x1=\"8\" y1=\"2.5\" x2=\"8\" y2=\"10\"/><polyline points=\"5,7 8,10 11,7\"/><path d=\"M3 11.5v1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1\"/>",
46
+ upload: "<line x1=\"8\" y1=\"10.5\" x2=\"8\" y2=\"3\"/><polyline points=\"5,6 8,3 11,6\"/><path d=\"M3 11.5v1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1\"/>",
47
+ share: "<circle cx=\"12\" cy=\"4\" r=\"2\"/><circle cx=\"4\" cy=\"8\" r=\"2\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/><line x1=\"5.7\" y1=\"7\" x2=\"10.3\" y2=\"5\"/><line x1=\"5.7\" y1=\"9\" x2=\"10.3\" y2=\"11\"/>",
48
+ link: "<path d=\"M6.8 9.2a2.6 2.6 0 0 0 3.7 0l2.1-2.1a2.6 2.6 0 0 0-3.7-3.7l-1 1\"/><path d=\"M9.2 6.8a2.6 2.6 0 0 0-3.7 0L3.4 8.9a2.6 2.6 0 0 0 3.7 3.7l1-1\"/>",
49
+ clipboard: "<rect x=\"3.5\" y=\"3\" width=\"9\" height=\"11\" rx=\"1.2\"/><rect x=\"6\" y=\"1.8\" width=\"4\" height=\"2.4\" rx=\"0.7\"/>",
50
+ folder: "<path d=\"M2.5 4.5a1 1 0 0 1 1-1h2.6l1.2 1.4h4.7a1 1 0 0 1 1 1v6.1a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1Z\"/>",
51
+ file: "<path d=\"M4 2.5h5L12.5 6v7a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1Z\"/><polyline points=\"9,2.5 9,6 12.5,6\"/>",
52
+ "file-text": "<path d=\"M4 2.5h5L12.5 6v7a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1Z\"/><polyline points=\"9,2.5 9,6 12.5,6\"/><line x1=\"5.5\" y1=\"8.5\" x2=\"10\" y2=\"8.5\"/><line x1=\"5.5\" y1=\"11\" x2=\"10\" y2=\"11\"/>",
53
+ eye: "<path d=\"M1.5 8S3.5 3.5 8 3.5 14.5 8 14.5 8 12.5 12.5 8 12.5 1.5 8 1.5 8Z\"/><circle cx=\"8\" cy=\"8\" r=\"2\"/>",
54
+ "eye-off": "<path d=\"M3 3l10 10\"/><path d=\"M6.5 6.6A2 2 0 0 0 8 10a2 2 0 0 0 1.4-.6\"/><path d=\"M4.2 4.7C2.6 5.8 1.5 8 1.5 8s2 4.5 6.5 4.5c1 0 1.9-.2 2.7-.6\"/><path d=\"M7 3.6A6 6 0 0 1 8 3.5C12.5 3.5 14.5 8 14.5 8a12 12 0 0 1-1.7 2.3\"/>",
55
+ bell: "<path d=\"M8 2a4 4 0 0 1 4 4c0 3 1.2 4 1.2 4H2.8S4 9 4 6a4 4 0 0 1 4-4z\"/><path d=\"M6.4 12.5a1.7 1.7 0 0 0 3.2 0\"/>",
56
+ "bell-off": "<path d=\"M5 4.2A4 4 0 0 1 12 6c0 2.2.7 3.4 1 3.8M4.2 6.7C4.1 8.7 3 10 3 10h7.5\"/><path d=\"M6.4 12.5a1.7 1.7 0 0 0 3.2 0\"/><line x1=\"2.5\" y1=\"2.5\" x2=\"13.5\" y2=\"13.5\"/>",
57
+ lock: "<rect x=\"3.5\" y=\"7\" width=\"9\" height=\"6.5\" rx=\"1.2\"/><path d=\"M5.5 7V5.2a2.5 2.5 0 0 1 5 0V7\"/>",
58
+ unlock: "<rect x=\"3.5\" y=\"7\" width=\"9\" height=\"6.5\" rx=\"1.2\"/><path d=\"M5.5 7V5.2a2.5 2.5 0 0 1 4.8-.9\"/>",
59
+ shield: "<path d=\"M8 1.7 13 3.5v4.2c0 3.3-2.3 5.6-5 6.6-2.7-1-5-3.3-5-6.6V3.5Z\"/>",
60
+ "shield-check": "<path d=\"M8 1.7 13 3.5v4.2c0 3.3-2.3 5.6-5 6.6-2.7-1-5-3.3-5-6.6V3.5Z\"/><polyline points=\"5.7,7.8 7.3,9.4 10.4,5.9\"/>",
61
+ key: "<circle cx=\"5.5\" cy=\"10.5\" r=\"2.6\"/><line x1=\"7.4\" y1=\"8.6\" x2=\"13\" y2=\"3\"/><line x1=\"11\" y1=\"5\" x2=\"12.6\" y2=\"6.6\"/><line x1=\"9.4\" y1=\"6.6\" x2=\"11\" y2=\"8.2\"/>",
62
+ zap: "<polygon points=\"8.5,1.8 3.5,9 7.5,9 7,14.2 12.5,7 8.5,7\"/>",
63
+ activity: "<polyline points=\"1.5,8 5,8 7,3 9.5,13 11.5,8 14.5,8\"/>",
64
+ settings: "<circle cx=\"8\" cy=\"8\" r=\"2.3\"/><path d=\"M12.6 9.5a1 1 0 0 0 .2 1.1l.05.05a1.2 1.2 0 1 1-1.7 1.7l-.05-.05a1 1 0 0 0-1.1-.2 1 1 0 0 0-.6.9v.15a1.2 1.2 0 1 1-2.4 0v-.08a1 1 0 0 0-.66-.92 1 1 0 0 0-1.1.2l-.05.05a1.2 1.2 0 1 1-1.7-1.7l.05-.05a1 1 0 0 0 .2-1.1 1 1 0 0 0-.9-.6h-.15a1.2 1.2 0 1 1 0-2.4h.08a1 1 0 0 0 .92-.66 1 1 0 0 0-.2-1.1l-.05-.05a1.2 1.2 0 1 1 1.7-1.7l.05.05a1 1 0 0 0 1.1.2H7a1 1 0 0 0 .6-.9v-.15a1.2 1.2 0 1 1 2.4 0v.08a1 1 0 0 0 .6.92 1 1 0 0 0 1.1-.2l.05-.05a1.2 1.2 0 1 1 1.7 1.7l-.05.05a1 1 0 0 0-.2 1.1V7a1 1 0 0 0 .9.6h.15a1.2 1.2 0 1 1 0 2.4h-.08a1 1 0 0 0-.92.6Z\"/>",
65
+ user: "<circle cx=\"8\" cy=\"5.5\" r=\"2.8\"/><path d=\"M2.5 14c0-3 2.4-4.8 5.5-4.8s5.5 1.8 5.5 4.8\"/>",
66
+ users: "<circle cx=\"6\" cy=\"5.5\" r=\"2.4\"/><path d=\"M1.5 13.5c0-2.6 2-4.2 4.5-4.2s4.5 1.6 4.5 4.2\"/><path d=\"M11 3.4a2.4 2.4 0 0 1 0 4.6M14.5 13.5c0-2-1.1-3.4-2.8-4\"/>",
67
+ "user-plus": "<circle cx=\"6.5\" cy=\"5.5\" r=\"2.8\"/><path d=\"M1.5 14c0-3 2.2-4.8 5-4.8 1 0 1.9.2 2.6.6\"/><line x1=\"12.5\" y1=\"9.5\" x2=\"12.5\" y2=\"13.5\"/><line x1=\"10.5\" y1=\"11.5\" x2=\"14.5\" y2=\"11.5\"/>",
68
+ calendar: "<rect x=\"2.5\" y=\"3.5\" width=\"11\" height=\"10\" rx=\"1.2\"/><line x1=\"2.5\" y1=\"6.5\" x2=\"13.5\" y2=\"6.5\"/><line x1=\"5.5\" y1=\"2\" x2=\"5.5\" y2=\"4.5\"/><line x1=\"10.5\" y1=\"2\" x2=\"10.5\" y2=\"4.5\"/>",
69
+ clock: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><polyline points=\"8,4.5 8,8 10.5,9.5\"/>",
70
+ history: "<path d=\"M2.7 8a5.3 5.3 0 1 0 1.6-3.8\"/><polyline points=\"2.4,2.5 2.4,5.7 5.6,5.7\"/><polyline points=\"8,5.2 8,8 10.4,9.4\"/>",
71
+ server: "<rect x=\"2.5\" y=\"3\" width=\"11\" height=\"4.2\" rx=\"1\"/><rect x=\"2.5\" y=\"8.8\" width=\"11\" height=\"4.2\" rx=\"1\"/><line x1=\"4.5\" y1=\"5.1\" x2=\"4.55\" y2=\"5.1\"/><line x1=\"4.5\" y1=\"10.9\" x2=\"4.55\" y2=\"10.9\"/>",
72
+ database: "<ellipse cx=\"8\" cy=\"4\" rx=\"5\" ry=\"2\"/><path d=\"M3 4v8c0 1.1 2.2 2 5 2s5-.9 5-2V4\"/><path d=\"M3 8c0 1.1 2.2 2 5 2s5-.9 5-2\"/>",
73
+ cloud: "<path d=\"M4.5 12.5a3 3 0 0 1-.3-6A4 4 0 0 1 12 7a2.8 2.8 0 0 1-.3 5.5Z\"/>",
74
+ cpu: "<rect x=\"4.5\" y=\"4.5\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"6.7\" y=\"6.7\" width=\"2.6\" height=\"2.6\"/><line x1=\"6.5\" y1=\"2.5\" x2=\"6.5\" y2=\"4.5\"/><line x1=\"9.5\" y1=\"2.5\" x2=\"9.5\" y2=\"4.5\"/><line x1=\"6.5\" y1=\"11.5\" x2=\"6.5\" y2=\"13.5\"/><line x1=\"9.5\" y1=\"11.5\" x2=\"9.5\" y2=\"13.5\"/><line x1=\"2.5\" y1=\"6.5\" x2=\"4.5\" y2=\"6.5\"/><line x1=\"2.5\" y1=\"9.5\" x2=\"4.5\" y2=\"9.5\"/><line x1=\"11.5\" y1=\"6.5\" x2=\"13.5\" y2=\"6.5\"/><line x1=\"11.5\" y1=\"9.5\" x2=\"13.5\" y2=\"9.5\"/>",
75
+ globe: "<circle cx=\"8\" cy=\"8\" r=\"6\"/><line x1=\"2\" y1=\"8\" x2=\"14\" y2=\"8\"/><path d=\"M8 2c1.8 1.6 2.8 3.8 2.8 6S9.8 12.4 8 14c-1.8-1.6-2.8-3.8-2.8-6S6.2 3.6 8 2Z\"/>",
76
+ wifi: "<path d=\"M2 6.2a9 9 0 0 1 12 0\"/><path d=\"M4.2 8.6a6 6 0 0 1 7.6 0\"/><path d=\"M6.4 11a3 3 0 0 1 3.2 0\"/><circle cx=\"8\" cy=\"13\" r=\".7\" fill=\"currentColor\" stroke=\"none\"/>",
77
+ terminal: "<rect x=\"2.5\" y=\"3\" width=\"11\" height=\"10\" rx=\"1.2\"/><polyline points=\"5,7 7,8.5 5,10\"/><line x1=\"8.5\" y1=\"10.5\" x2=\"11\" y2=\"10.5\"/>",
78
+ code: "<polyline points=\"6,5 2.5,8 6,11\"/><polyline points=\"10,5 13.5,8 10,11\"/>",
79
+ "git-branch": "<line x1=\"4.5\" y1=\"3\" x2=\"4.5\" y2=\"13\"/><circle cx=\"4.5\" cy=\"3\" r=\"1.7\"/><circle cx=\"4.5\" cy=\"13\" r=\"1.7\"/><circle cx=\"11.5\" cy=\"5\" r=\"1.7\"/><path d=\"M11.5 6.7v.8a3 3 0 0 1-3 3H4.5\"/>",
80
+ layers: "<polygon points=\"8,2 14,5 8,8 2,5\"/><polyline points=\"2,8 8,11 14,8\"/><polyline points=\"2,11 8,14 14,11\"/>",
81
+ grid: "<rect x=\"2.5\" y=\"2.5\" width=\"4.5\" height=\"4.5\" rx=\"1\"/><rect x=\"9\" y=\"2.5\" width=\"4.5\" height=\"4.5\" rx=\"1\"/><rect x=\"2.5\" y=\"9\" width=\"4.5\" height=\"4.5\" rx=\"1\"/><rect x=\"9\" y=\"9\" width=\"4.5\" height=\"4.5\" rx=\"1\"/>",
82
+ list: "<line x1=\"5.5\" y1=\"4\" x2=\"13.5\" y2=\"4\"/><line x1=\"5.5\" y1=\"8\" x2=\"13.5\" y2=\"8\"/><line x1=\"5.5\" y1=\"12\" x2=\"13.5\" y2=\"12\"/><circle cx=\"2.8\" cy=\"4\" r=\".8\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"2.8\" cy=\"8\" r=\".8\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"2.8\" cy=\"12\" r=\".8\" fill=\"currentColor\" stroke=\"none\"/>",
83
+ tag: "<path d=\"M2.6 7.4 7.4 2.6a1 1 0 0 1 .7-.3h4.1a1 1 0 0 1 1 1V7.4a1 1 0 0 1-.3.7l-4.8 4.8a1 1 0 0 1-1.4 0L2.6 8.8a1 1 0 0 1 0-1.4Z\"/><circle cx=\"10.2\" cy=\"5.8\" r=\".9\" fill=\"currentColor\" stroke=\"none\"/>",
84
+ bookmark: "<path d=\"M4 2.5h8a.5.5 0 0 1 .5.5v10.5L8 11l-4.5 2.5V3a.5.5 0 0 1 .5-.5Z\"/>",
85
+ star: "<polygon points=\"8,2 9.85,5.75 14,6.35 11,9.25 11.7,13.35 8,11.4 4.3,13.35 5,9.25 2,6.35 6.15,5.75\"/>",
86
+ pin: "<path d=\"M8 14s4.5-4 4.5-7.5a4.5 4.5 0 0 0-9 0C3.5 10 8 14 8 14Z\"/><circle cx=\"8\" cy=\"6.5\" r=\"1.7\"/>",
87
+ mail: "<rect x=\"2\" y=\"3.5\" width=\"12\" height=\"9\" rx=\"1.2\"/><polyline points=\"2.5,4.5 8,8.5 13.5,4.5\"/>",
88
+ message: "<path d=\"M2.5 4a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H6l-3 2.5V11H3.5a1 1 0 0 1-1-1Z\"/>",
89
+ sun: "<circle cx=\"8\" cy=\"8\" r=\"3\"/><path d=\"M8 1v1.6M8 13.4V15M15 8h-1.6M2.6 8H1M12.95 3.05l-1.13 1.13M4.18 11.82l-1.13 1.13M12.95 12.95l-1.13-1.13M4.18 4.18 3.05 3.05\"/>",
90
+ moon: "<path d=\"M13 9.2A5.5 5.5 0 0 1 6.8 3 5.5 5.5 0 1 0 13 9.2Z\"/>",
91
+ power: "<line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"8\"/><path d=\"M5 4.2a5 5 0 1 0 6 0\"/>",
92
+ "log-out": "<path d=\"M6 13.5H3.5a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1H6\"/><polyline points=\"10,11 13.5,8 10,5\"/><line x1=\"13.5\" y1=\"8\" x2=\"6\" y2=\"8\"/>",
93
+ "log-in": "<path d=\"M10 2.5h2.5a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H10\"/><polyline points=\"6,11 9.5,8 6,5\"/><line x1=\"9.5\" y1=\"8\" x2=\"2\" y2=\"8\"/>"
94
+ }, g = Object.keys(h);
95
+ function _({ name: e, size: t = "1em", strokeWidth: n = 1.5, title: r, className: i, style: a, ...o }) {
96
+ let s = h[e], c = typeof t == "number" ? `${t}px` : t;
97
+ return /* @__PURE__ */ f("svg", {
98
+ className: ("iskra-icon " + (i ?? "")).trim(),
99
+ width: c,
100
+ height: c,
101
+ viewBox: "0 0 16 16",
102
+ fill: "none",
103
+ stroke: "currentColor",
104
+ strokeWidth: n,
105
+ strokeLinecap: "round",
106
+ strokeLinejoin: "round",
107
+ role: r ? "img" : void 0,
108
+ "aria-hidden": r ? void 0 : "true",
109
+ "aria-label": r || void 0,
110
+ style: {
111
+ display: "inline-block",
112
+ flexShrink: 0,
113
+ verticalAlign: "middle",
114
+ ...a
115
+ },
116
+ dangerouslySetInnerHTML: { __html: (r ? `<title>${r}</title>` : "") + s },
117
+ ...o
118
+ });
119
+ }
120
+ //#endregion
121
+ //#region src/utils/cx.ts
122
+ function v(...e) {
123
+ return e.filter(Boolean).join(" ");
124
+ }
125
+ //#endregion
126
+ //#region src/components/Button/Button.tsx
127
+ var y = r(function({ variant: e = "primary", size: t = "m", iconBefore: n, iconAfter: r, iconOnly: i = !1, loading: a = !1, disabled: o = !1, fullWidth: s = !1, type: c = "button", className: l, children: u, ...d }, m) {
128
+ return /* @__PURE__ */ p("button", {
129
+ ref: m,
130
+ type: c,
131
+ className: v("ik-btn", `ik-btn-${e}`, `ik-btn-${t}`, i && "ik-btn-io", s && "ik-btn-fw", a && "ik-btn-loading", l),
132
+ disabled: o || a,
133
+ ...d,
134
+ children: [a && /* @__PURE__ */ f("span", {
135
+ className: "ik-btn-spinner",
136
+ "aria-hidden": "true"
137
+ }), /* @__PURE__ */ p("span", {
138
+ className: "ik-btn-content",
139
+ children: [
140
+ n,
141
+ !i && u != null && /* @__PURE__ */ f("span", { children: u }),
142
+ i && u,
143
+ r
144
+ ]
145
+ })]
146
+ });
147
+ }), b = r(function({ icon: e, ...t }, n) {
148
+ return /* @__PURE__ */ f(y, {
149
+ ref: n,
150
+ iconOnly: !0,
151
+ ...t,
152
+ children: e
153
+ });
154
+ });
155
+ //#endregion
156
+ //#region src/components/TextField/TextField.tsx
157
+ function x({ size: e = "m", label: t, hint: n, error: r, required: i = !1, iconBefore: a, clearable: o = !1, onClear: s, disabled: l = !1, value: m, defaultValue: h, onChange: g, id: _, className: y, wrapClassName: b, clearLabel: x = "Очистить", ...S }) {
158
+ let C = c(), w = _ ?? `ik-tf-${C}`, T = u(null), E = m != null, [D, O] = d(E ? String(m).length > 0 : String(h ?? "").length > 0), k = o && !l && (E ? String(m).length > 0 : D), A = (e) => {
159
+ E || O(e.target.value.length > 0), g?.(e);
160
+ }, j = () => {
161
+ let e = T.current;
162
+ e && ((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus()), E || O(!1), s?.();
163
+ }, M = typeof r == "string" ? r : null, N = !!r;
164
+ return /* @__PURE__ */ p("div", {
165
+ className: v("ik-tf-wrap", b),
166
+ children: [
167
+ t && /* @__PURE__ */ p("label", {
168
+ className: "ik-tf-label",
169
+ htmlFor: w,
170
+ children: [t, i && /* @__PURE__ */ f("span", {
171
+ className: "ik-tf-req",
172
+ "aria-hidden": "true",
173
+ children: "*"
174
+ })]
175
+ }),
176
+ /* @__PURE__ */ p("div", {
177
+ className: v("ik-tf-field", `ik-tf-${e}`, N && "is-error", l && "is-disabled", y),
178
+ children: [
179
+ a && /* @__PURE__ */ f("span", {
180
+ className: "ik-tf-ico",
181
+ children: a
182
+ }),
183
+ /* @__PURE__ */ f("input", {
184
+ ref: T,
185
+ id: w,
186
+ className: "ik-tf-input",
187
+ disabled: l,
188
+ value: m,
189
+ defaultValue: h,
190
+ onChange: A,
191
+ "aria-invalid": N || void 0,
192
+ "aria-describedby": M || n ? `${w}-msg` : void 0,
193
+ ...S
194
+ }),
195
+ k && /* @__PURE__ */ f("button", {
196
+ type: "button",
197
+ className: "ik-tf-clear",
198
+ onClick: j,
199
+ "aria-label": x,
200
+ children: /* @__PURE__ */ p("svg", {
201
+ width: "13",
202
+ height: "13",
203
+ viewBox: "0 0 16 16",
204
+ fill: "none",
205
+ stroke: "currentColor",
206
+ strokeWidth: "1.6",
207
+ strokeLinecap: "round",
208
+ "aria-hidden": "true",
209
+ children: [/* @__PURE__ */ f("line", {
210
+ x1: "4",
211
+ y1: "4",
212
+ x2: "12",
213
+ y2: "12"
214
+ }), /* @__PURE__ */ f("line", {
215
+ x1: "12",
216
+ y1: "4",
217
+ x2: "4",
218
+ y2: "12"
219
+ })]
220
+ })
221
+ })
222
+ ]
223
+ }),
224
+ (M || n) && /* @__PURE__ */ f("div", {
225
+ id: `${w}-msg`,
226
+ className: v("ik-tf-msg", N && "is-error"),
227
+ children: M || n
228
+ })
229
+ ]
230
+ });
231
+ }
232
+ //#endregion
233
+ //#region src/components/Textarea/Textarea.tsx
234
+ function S({ label: e, hint: t, error: n, required: r = !1, resize: i = "vertical", showCount: a = !1, rows: o = 4, maxLength: s, value: l, defaultValue: u, onChange: m, id: h, className: g, wrapClassName: _, ...y }) {
235
+ let b = c(), x = h ?? `ik-ta-${b}`, S = l != null, [C, w] = d(S ? String(l).length : String(u ?? "").length), T = (e) => {
236
+ S || w(e.target.value.length), m?.(e);
237
+ }, E = typeof n == "string" ? n : null, D = !!n, O = S ? String(l).length : C;
238
+ return /* @__PURE__ */ p("div", {
239
+ className: v("ik-ta-wrap", _),
240
+ children: [
241
+ e && /* @__PURE__ */ p("label", {
242
+ className: "ik-ta-label",
243
+ htmlFor: x,
244
+ children: [e, r && /* @__PURE__ */ f("span", {
245
+ className: "ik-ta-req",
246
+ "aria-hidden": "true",
247
+ children: "*"
248
+ })]
249
+ }),
250
+ /* @__PURE__ */ f("textarea", {
251
+ id: x,
252
+ className: v("ik-ta-field", `ik-ta-resize-${i}`, D && "is-error", g),
253
+ rows: o,
254
+ maxLength: s,
255
+ value: l,
256
+ defaultValue: u,
257
+ onChange: T,
258
+ "aria-invalid": D || void 0,
259
+ "aria-describedby": E || t ? `${x}-msg` : void 0,
260
+ ...y
261
+ }),
262
+ (E || t || a && s) && /* @__PURE__ */ p("div", {
263
+ className: "ik-ta-foot",
264
+ children: [(E || t) && /* @__PURE__ */ f("span", {
265
+ id: `${x}-msg`,
266
+ className: v("ik-ta-msg", D && "is-error"),
267
+ children: E || t
268
+ }), a && s != null && /* @__PURE__ */ p("span", {
269
+ className: "ik-ta-count",
270
+ children: [
271
+ O,
272
+ "/",
273
+ s
274
+ ]
275
+ })]
276
+ })
277
+ ]
278
+ });
279
+ }
280
+ //#endregion
281
+ //#region src/components/Checkbox/Checkbox.tsx
282
+ function C({ checked: e, defaultChecked: t, indeterminate: n = !1, disabled: r = !1, size: i = "m", label: a, description: o, onChange: l, id: d, className: m, ...h }) {
283
+ let g = c(), _ = d ?? `ik-cb-${g}`, y = u(null);
284
+ return s(() => {
285
+ y.current && (y.current.indeterminate = n);
286
+ }, [n, e]), /* @__PURE__ */ p("label", {
287
+ className: v("ik-cb", `ik-cb-${i}`, r && "is-disabled", m),
288
+ htmlFor: _,
289
+ children: [
290
+ /* @__PURE__ */ f("input", {
291
+ ref: y,
292
+ id: _,
293
+ type: "checkbox",
294
+ className: "ik-cb-input",
295
+ checked: e,
296
+ defaultChecked: t,
297
+ disabled: r,
298
+ onChange: l,
299
+ ...h
300
+ }),
301
+ /* @__PURE__ */ p("span", {
302
+ className: "ik-cb-box",
303
+ "aria-hidden": "true",
304
+ children: [/* @__PURE__ */ f("svg", {
305
+ className: "ik-cb-check",
306
+ width: "11",
307
+ height: "11",
308
+ viewBox: "0 0 16 16",
309
+ fill: "none",
310
+ stroke: "currentColor",
311
+ strokeWidth: "2.2",
312
+ strokeLinecap: "round",
313
+ strokeLinejoin: "round",
314
+ children: /* @__PURE__ */ f("polyline", { points: "3.5,8.5 6.5,11.5 12.5,4.5" })
315
+ }), /* @__PURE__ */ f("svg", {
316
+ className: "ik-cb-dash",
317
+ width: "11",
318
+ height: "11",
319
+ viewBox: "0 0 16 16",
320
+ fill: "none",
321
+ stroke: "currentColor",
322
+ strokeWidth: "2.2",
323
+ strokeLinecap: "round",
324
+ children: /* @__PURE__ */ f("line", {
325
+ x1: "3.5",
326
+ y1: "8",
327
+ x2: "12.5",
328
+ y2: "8"
329
+ })
330
+ })]
331
+ }),
332
+ (a || o) && /* @__PURE__ */ p("span", {
333
+ className: "ik-cb-textwrap",
334
+ children: [a && /* @__PURE__ */ f("span", {
335
+ className: "ik-cb-text",
336
+ children: a
337
+ }), o && /* @__PURE__ */ f("span", {
338
+ className: "ik-cb-desc",
339
+ children: o
340
+ })]
341
+ })
342
+ ]
343
+ });
344
+ }
345
+ //#endregion
346
+ //#region src/components/Radio/Radio.tsx
347
+ function w({ value: e, checked: t, defaultChecked: n, name: r, disabled: i = !1, size: a = "m", label: o, description: s, onChange: l, id: u, className: d, ...m }) {
348
+ let h = c(), g = u ?? `ik-rd-${h}`;
349
+ return /* @__PURE__ */ p("label", {
350
+ className: v("ik-rd", `ik-rd-${a}`, i && "is-disabled", d),
351
+ htmlFor: g,
352
+ children: [
353
+ /* @__PURE__ */ f("input", {
354
+ id: g,
355
+ type: "radio",
356
+ className: "ik-rd-input",
357
+ value: e,
358
+ name: r,
359
+ checked: t,
360
+ defaultChecked: n,
361
+ disabled: i,
362
+ onChange: l,
363
+ ...m
364
+ }),
365
+ /* @__PURE__ */ f("span", {
366
+ className: "ik-rd-circle",
367
+ "aria-hidden": "true",
368
+ children: /* @__PURE__ */ f("span", { className: "ik-rd-dot" })
369
+ }),
370
+ (o || s) && /* @__PURE__ */ p("span", {
371
+ className: "ik-rd-textwrap",
372
+ children: [o && /* @__PURE__ */ f("span", {
373
+ className: "ik-rd-text",
374
+ children: o
375
+ }), s && /* @__PURE__ */ f("span", {
376
+ className: "ik-rd-desc",
377
+ children: s
378
+ })]
379
+ })
380
+ ]
381
+ });
382
+ }
383
+ function T({ name: n, value: r, defaultValue: a, onChange: o, options: s, size: l = "m", orientation: u = "vertical", disabled: p = !1, className: m, children: h }) {
384
+ let g = c(), _ = n ?? `ik-rdg-${g}`, y = r != null, [b, x] = d(a), S = y ? r : b, C = (e) => {
385
+ y || x(e), o?.(e);
386
+ };
387
+ return /* @__PURE__ */ f("div", {
388
+ className: v("ik-rdg", `ik-rdg-${u}`, m),
389
+ role: "radiogroup",
390
+ children: s ? s.map((e) => /* @__PURE__ */ f(w, {
391
+ name: _,
392
+ size: l,
393
+ value: e.value,
394
+ label: e.label,
395
+ description: e.description,
396
+ disabled: p || e.disabled,
397
+ checked: S === e.value,
398
+ onChange: () => C(e.value)
399
+ }, e.value)) : e.map(h, (e) => i(e) ? t(e, {
400
+ name: _,
401
+ size: e.props.size ?? l,
402
+ checked: S === e.props.value,
403
+ disabled: p || e.props.disabled,
404
+ onChange: () => C(e.props.value)
405
+ }) : e)
406
+ });
407
+ }
408
+ //#endregion
409
+ //#region src/components/Switch/Switch.tsx
410
+ function E({ checked: e, defaultChecked: t, disabled: n = !1, size: r = "m", label: i, description: a, onChange: o, id: s, className: l, ...u }) {
411
+ let d = c(), m = s ?? `ik-sw-${d}`;
412
+ return /* @__PURE__ */ p("label", {
413
+ className: v("ik-sw", `ik-sw-${r}`, n && "is-disabled", l),
414
+ htmlFor: m,
415
+ children: [
416
+ /* @__PURE__ */ f("input", {
417
+ id: m,
418
+ type: "checkbox",
419
+ role: "switch",
420
+ className: "ik-sw-input",
421
+ checked: e,
422
+ defaultChecked: t,
423
+ disabled: n,
424
+ onChange: o,
425
+ ...u
426
+ }),
427
+ /* @__PURE__ */ f("span", {
428
+ className: "ik-sw-track",
429
+ "aria-hidden": "true",
430
+ children: /* @__PURE__ */ f("span", { className: "ik-sw-knob" })
431
+ }),
432
+ (i || a) && /* @__PURE__ */ p("span", {
433
+ className: "ik-sw-textwrap",
434
+ children: [i && /* @__PURE__ */ f("span", {
435
+ className: "ik-sw-text",
436
+ children: i
437
+ }), a && /* @__PURE__ */ f("span", {
438
+ className: "ik-sw-desc",
439
+ children: a
440
+ })]
441
+ })
442
+ ]
443
+ });
444
+ }
445
+ //#endregion
446
+ //#region src/components/Badge/Badge.tsx
447
+ function D({ variant: e = "neutral", size: t = "m", dot: n = !1, icon: r, children: i, className: a, ...o }) {
448
+ return /* @__PURE__ */ p("span", {
449
+ className: v("ik-bdg", `ik-bdg-${t}`, `ik-bdg-${e}`, a),
450
+ ...o,
451
+ children: [
452
+ n && /* @__PURE__ */ f("span", {
453
+ className: "ik-bdg-dot",
454
+ "aria-hidden": "true"
455
+ }),
456
+ r,
457
+ i
458
+ ]
459
+ });
460
+ }
461
+ function O({ accent: e = !1, onRemove: t, removeLabel: n = "Удалить", children: r, className: i, ...a }) {
462
+ return /* @__PURE__ */ p("span", {
463
+ className: v("ik-tag", e && "ik-tag-accent", i),
464
+ ...a,
465
+ children: [r, t && /* @__PURE__ */ f("button", {
466
+ type: "button",
467
+ className: "ik-tag-x",
468
+ onClick: t,
469
+ "aria-label": n,
470
+ children: /* @__PURE__ */ p("svg", {
471
+ width: "9",
472
+ height: "9",
473
+ viewBox: "0 0 16 16",
474
+ fill: "none",
475
+ stroke: "currentColor",
476
+ strokeWidth: "2",
477
+ strokeLinecap: "round",
478
+ "aria-hidden": "true",
479
+ children: [/* @__PURE__ */ f("line", {
480
+ x1: "4",
481
+ y1: "4",
482
+ x2: "12",
483
+ y2: "12"
484
+ }), /* @__PURE__ */ f("line", {
485
+ x1: "12",
486
+ y1: "4",
487
+ x2: "4",
488
+ y2: "12"
489
+ })]
490
+ })
491
+ })]
492
+ });
493
+ }
494
+ //#endregion
495
+ //#region src/components/Avatar/Avatar.tsx
496
+ function k(e) {
497
+ return e && e.trim().split(/\s+/).slice(0, 2).map((e) => e[0] ?? "").join("") || "?";
498
+ }
499
+ function A({ name: e, src: t, size: n = "md", shape: r = "circle", status: i, className: a, ...o }) {
500
+ let [s, c] = d(!1), l = t && !s;
501
+ return /* @__PURE__ */ p("span", {
502
+ className: v("ik-av", `ik-av-${n}`, `ik-av-${r}`, a),
503
+ role: "img",
504
+ "aria-label": e,
505
+ ...o,
506
+ children: [l ? /* @__PURE__ */ f("img", {
507
+ className: "ik-av-img",
508
+ src: t,
509
+ alt: "",
510
+ onError: () => c(!0)
511
+ }) : /* @__PURE__ */ f("span", {
512
+ "aria-hidden": "true",
513
+ children: k(e)
514
+ }), i && /* @__PURE__ */ f("span", {
515
+ className: v("ik-av-status", `ik-av-status-${i}`),
516
+ "aria-hidden": "true"
517
+ })]
518
+ });
519
+ }
520
+ //#endregion
521
+ //#region src/components/Card/Card.tsx
522
+ var j = r(function({ padding: e = "m", elevated: t = !1, interactive: n = !1, selected: r = !1, className: i, ...a }, o) {
523
+ return /* @__PURE__ */ f("div", {
524
+ ref: o,
525
+ className: v("ik-card", `ik-card-pad-${e}`, t && "ik-card-elevated", n && "ik-card-interactive", r && "ik-card-selected", i),
526
+ tabIndex: n ? 0 : void 0,
527
+ ...a
528
+ });
529
+ });
530
+ function M({ className: e, ...t }) {
531
+ return /* @__PURE__ */ f("div", {
532
+ className: v("ik-card-header", e),
533
+ ...t
534
+ });
535
+ }
536
+ function N({ className: e, ...t }) {
537
+ return /* @__PURE__ */ f("div", {
538
+ className: v("ik-card-body", e),
539
+ ...t
540
+ });
541
+ }
542
+ function P({ className: e, ...t }) {
543
+ return /* @__PURE__ */ f("div", {
544
+ className: v("ik-card-footer", e),
545
+ ...t
546
+ });
547
+ }
548
+ j.Header = M, j.Body = N, j.Footer = P;
549
+ //#endregion
550
+ //#region src/components/Skeleton/Skeleton.tsx
551
+ var F = (e) => e == null ? void 0 : typeof e == "number" ? `${e}px` : e;
552
+ function I({ variant: e = "text", width: t, height: n, lines: r = 1, animated: i = !0, className: a, style: o, ...s }) {
553
+ let c = v("ik-sk", `ik-sk-${e}`, i && "ik-sk-animated", a);
554
+ return e === "text" && r > 1 ? /* @__PURE__ */ f("div", {
555
+ className: "ik-sk-lines",
556
+ "aria-hidden": "true",
557
+ ...s,
558
+ children: Array.from({ length: r }).map((e, n) => /* @__PURE__ */ f("span", {
559
+ className: c,
560
+ style: {
561
+ width: n === r - 1 ? "60%" : F(t) ?? "100%",
562
+ ...o
563
+ }
564
+ }, n))
565
+ }) : /* @__PURE__ */ f("div", {
566
+ className: c,
567
+ style: {
568
+ width: F(t),
569
+ height: F(n),
570
+ ...o
571
+ },
572
+ "aria-hidden": "true",
573
+ ...s
574
+ });
575
+ }
576
+ //#endregion
577
+ //#region src/components/Spinner/Spinner.tsx
578
+ function L({ size: e = "m", label: t = "Загрузка…", className: n, ...r }) {
579
+ return /* @__PURE__ */ p("div", {
580
+ role: "status",
581
+ "aria-live": "polite",
582
+ className: v("ik-spinner-wrap", n),
583
+ ...r,
584
+ children: [/* @__PURE__ */ f("span", {
585
+ className: v("ik-spinner", `ik-spinner-${e}`),
586
+ "aria-hidden": "true"
587
+ }), /* @__PURE__ */ f("span", {
588
+ className: "ik-spinner-label",
589
+ children: t
590
+ })]
591
+ });
592
+ }
593
+ //#endregion
594
+ //#region src/components/FormField/FormField.tsx
595
+ function R({ label: e, hint: n, error: r, required: i = !1, id: a, children: o, className: s }) {
596
+ let l = c(), u = a ?? o.props.id ?? `ik-ff-${l}`, d = `${u}-msg`, m = typeof r == "string" ? r : null, h = !!r, g = !!(m || n), _ = t(o, {
597
+ id: u,
598
+ "aria-describedby": g ? d : o.props["aria-describedby"],
599
+ "aria-invalid": h || o.props["aria-invalid"],
600
+ "aria-required": i || o.props["aria-required"]
601
+ });
602
+ return /* @__PURE__ */ p("div", {
603
+ className: v("ik-ff", s),
604
+ children: [
605
+ e && /* @__PURE__ */ p("label", {
606
+ className: "ik-ff-label",
607
+ htmlFor: u,
608
+ children: [e, i && /* @__PURE__ */ f("span", {
609
+ className: "ik-ff-req",
610
+ "aria-hidden": "true",
611
+ children: "*"
612
+ })]
613
+ }),
614
+ _,
615
+ g && /* @__PURE__ */ f("div", {
616
+ id: d,
617
+ className: v("ik-ff-msg", h && "is-error"),
618
+ children: m || n
619
+ })
620
+ ]
621
+ });
622
+ }
623
+ //#endregion
624
+ //#region src/components/Alert/Alert.tsx
625
+ var z = {
626
+ info: "info",
627
+ success: "check-circle",
628
+ warning: "warning",
629
+ error: "x-circle"
630
+ };
631
+ function B({ variant: e = "info", title: t, icon: n, closable: r = !1, onClose: i, closeLabel: a = "Закрыть", children: o, className: s, ...c }) {
632
+ let l = e === "error" || e === "warning" ? "alert" : "status", u = n !== null;
633
+ return /* @__PURE__ */ p("div", {
634
+ className: v("ik-alert", `ik-alert-${e}`, s),
635
+ role: l,
636
+ ...c,
637
+ children: [
638
+ u && /* @__PURE__ */ f("span", {
639
+ className: "ik-alert-ico",
640
+ "aria-hidden": "true",
641
+ children: n ?? /* @__PURE__ */ f(_, {
642
+ name: z[e],
643
+ size: 16
644
+ })
645
+ }),
646
+ /* @__PURE__ */ p("div", {
647
+ className: "ik-alert-body",
648
+ children: [t && /* @__PURE__ */ f("div", {
649
+ className: "ik-alert-title",
650
+ children: t
651
+ }), o]
652
+ }),
653
+ r && /* @__PURE__ */ f("button", {
654
+ type: "button",
655
+ className: "ik-alert-close",
656
+ onClick: i,
657
+ "aria-label": a,
658
+ children: /* @__PURE__ */ f(_, {
659
+ name: "close",
660
+ size: 14
661
+ })
662
+ })
663
+ ]
664
+ });
665
+ }
666
+ //#endregion
667
+ //#region src/components/EmptyState/EmptyState.tsx
668
+ function V({ icon: e, title: t, description: n, action: r, className: i, ...a }) {
669
+ return /* @__PURE__ */ p("div", {
670
+ className: v("ik-empty", i),
671
+ ...a,
672
+ children: [
673
+ e && /* @__PURE__ */ f("span", {
674
+ className: "ik-empty-ico",
675
+ "aria-hidden": "true",
676
+ children: e
677
+ }),
678
+ /* @__PURE__ */ f("div", {
679
+ className: "ik-empty-title",
680
+ children: t
681
+ }),
682
+ n && /* @__PURE__ */ f("div", {
683
+ className: "ik-empty-desc",
684
+ children: n
685
+ }),
686
+ r && /* @__PURE__ */ f("div", {
687
+ className: "ik-empty-action",
688
+ children: r
689
+ })
690
+ ]
691
+ });
692
+ }
693
+ //#endregion
694
+ //#region src/utils/useFocusTrap.ts
695
+ var H = "a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
696
+ function U(e, t) {
697
+ s(() => {
698
+ if (!t || !e.current) return;
699
+ let n = e.current, r = document.activeElement, i = () => Array.from(n.querySelectorAll(H));
700
+ (i()[0] ?? n).focus();
701
+ let a = (e) => {
702
+ if (e.key !== "Tab") return;
703
+ let t = i();
704
+ if (t.length === 0) {
705
+ e.preventDefault();
706
+ return;
707
+ }
708
+ let n = t[0], r = t[t.length - 1], a = document.activeElement;
709
+ e.shiftKey && a === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && a === r && (e.preventDefault(), n.focus());
710
+ };
711
+ return n.addEventListener("keydown", a), () => {
712
+ n.removeEventListener("keydown", a), r?.focus?.();
713
+ };
714
+ }, [t, e]);
715
+ }
716
+ //#endregion
717
+ //#region src/components/Modal/Modal.tsx
718
+ function W({ open: e, onClose: t, title: n, description: r, children: i, footer: a, size: o = "m", closeOnEsc: c = !0, closeOnOverlayClick: l = !0, showClose: d = !0, closeLabel: h = "Закрыть", className: g }) {
719
+ let _ = u(null);
720
+ if (U(_, e), s(() => {
721
+ if (!e || !c) return;
722
+ let n = (e) => {
723
+ e.key === "Escape" && t();
724
+ };
725
+ return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
726
+ }, [
727
+ e,
728
+ c,
729
+ t
730
+ ]), s(() => {
731
+ if (!e) return;
732
+ let t = document.body.style.overflow;
733
+ return document.body.style.overflow = "hidden", () => {
734
+ document.body.style.overflow = t;
735
+ };
736
+ }, [e]), !e || typeof document > "u") return null;
737
+ let y = n ? "ik-modal-title" : void 0, b = r ? "ik-modal-desc" : void 0;
738
+ return m(/* @__PURE__ */ f("div", {
739
+ className: "ik-modal-overlay",
740
+ onMouseDown: (e) => {
741
+ l && e.target === e.currentTarget && t();
742
+ },
743
+ children: /* @__PURE__ */ p("div", {
744
+ ref: _,
745
+ className: v("ik-modal", `ik-modal-${o}`, g),
746
+ role: "dialog",
747
+ "aria-modal": "true",
748
+ "aria-labelledby": y,
749
+ "aria-describedby": b,
750
+ tabIndex: -1,
751
+ children: [
752
+ (n || d) && /* @__PURE__ */ p("div", {
753
+ className: "ik-modal-header",
754
+ children: [/* @__PURE__ */ p("div", {
755
+ className: "ik-modal-titles",
756
+ children: [n && /* @__PURE__ */ f("div", {
757
+ id: y,
758
+ className: "ik-modal-title",
759
+ children: n
760
+ }), r && /* @__PURE__ */ f("div", {
761
+ id: b,
762
+ className: "ik-modal-desc",
763
+ children: r
764
+ })]
765
+ }), d && /* @__PURE__ */ f("button", {
766
+ type: "button",
767
+ className: "ik-modal-close",
768
+ onClick: t,
769
+ "aria-label": h,
770
+ children: /* @__PURE__ */ p("svg", {
771
+ width: "13",
772
+ height: "13",
773
+ viewBox: "0 0 16 16",
774
+ fill: "none",
775
+ stroke: "currentColor",
776
+ strokeWidth: "1.6",
777
+ strokeLinecap: "round",
778
+ "aria-hidden": "true",
779
+ children: [/* @__PURE__ */ f("line", {
780
+ x1: "4",
781
+ y1: "4",
782
+ x2: "12",
783
+ y2: "12"
784
+ }), /* @__PURE__ */ f("line", {
785
+ x1: "12",
786
+ y1: "4",
787
+ x2: "4",
788
+ y2: "12"
789
+ })]
790
+ })
791
+ })]
792
+ }),
793
+ i != null && /* @__PURE__ */ f("div", {
794
+ className: "ik-modal-body",
795
+ children: i
796
+ }),
797
+ a && /* @__PURE__ */ f("div", {
798
+ className: "ik-modal-footer",
799
+ children: a
800
+ })
801
+ ]
802
+ })
803
+ }), document.body);
804
+ }
805
+ //#endregion
806
+ //#region ../core/dist/keyboard.js
807
+ var G = {
808
+ Enter: "Enter",
809
+ Space: " ",
810
+ Escape: "Escape",
811
+ Tab: "Tab",
812
+ ArrowUp: "ArrowUp",
813
+ ArrowDown: "ArrowDown",
814
+ ArrowLeft: "ArrowLeft",
815
+ ArrowRight: "ArrowRight",
816
+ Home: "Home",
817
+ End: "End"
818
+ };
819
+ //#endregion
820
+ //#region ../core/dist/tabs.js
821
+ function K(e) {
822
+ return {
823
+ tab: (t) => `${e}-tab-${t}`,
824
+ panel: (t) => `${e}-panel-${t}`
825
+ };
826
+ }
827
+ function q(e) {
828
+ return e.find((e) => !e.disabled)?.value;
829
+ }
830
+ function J(e, t, n, r = "horizontal") {
831
+ let i = e.filter((e) => !e.disabled);
832
+ if (i.length === 0) return;
833
+ let a = r === "horizontal" ? G.ArrowRight : G.ArrowDown, o = r === "horizontal" ? G.ArrowLeft : G.ArrowUp, s = i.findIndex((e) => e.value === t), c = s === -1 ? 0 : s;
834
+ switch (n) {
835
+ case a: return i[(c + 1) % i.length].value;
836
+ case o: return i[(c - 1 + i.length) % i.length].value;
837
+ case G.Home: return i[0].value;
838
+ case G.End: return i[i.length - 1].value;
839
+ default: return;
840
+ }
841
+ }
842
+ //#endregion
843
+ //#region src/components/Tabs/Tabs.tsx
844
+ function Y({ items: e, value: t, defaultValue: n, onValueChange: r, className: i, "aria-label": a }) {
845
+ let o = K(c()), s = t != null, [l, m] = d(n ?? q(e)), h = s ? t : l, g = u({}), _ = (e) => {
846
+ s || m(e), r?.(e);
847
+ }, y = (t, n) => {
848
+ let r = J(e, e[n].value, t.key);
849
+ r && (t.preventDefault(), _(r), g.current[r]?.focus());
850
+ };
851
+ return /* @__PURE__ */ p("div", {
852
+ className: v("ik-tabs", i),
853
+ children: [/* @__PURE__ */ f("div", {
854
+ className: "ik-tabs-list",
855
+ role: "tablist",
856
+ "aria-label": a,
857
+ children: e.map((e, t) => {
858
+ let n = e.value === h;
859
+ return /* @__PURE__ */ f("button", {
860
+ ref: (t) => {
861
+ g.current[e.value] = t;
862
+ },
863
+ type: "button",
864
+ role: "tab",
865
+ id: o.tab(e.value),
866
+ "aria-selected": n,
867
+ "aria-controls": o.panel(e.value),
868
+ tabIndex: n ? 0 : -1,
869
+ disabled: e.disabled,
870
+ className: "ik-tabs-tab",
871
+ onClick: () => _(e.value),
872
+ onKeyDown: (e) => y(e, t),
873
+ children: e.label
874
+ }, e.value);
875
+ })
876
+ }), e.map((e) => /* @__PURE__ */ f("div", {
877
+ role: "tabpanel",
878
+ id: o.panel(e.value),
879
+ "aria-labelledby": o.tab(e.value),
880
+ hidden: e.value !== h,
881
+ tabIndex: 0,
882
+ className: "ik-tabs-panel",
883
+ children: e.value === h && e.content
884
+ }, e.value))]
885
+ });
886
+ }
887
+ //#endregion
888
+ //#region src/components/Table/Table.tsx
889
+ var X = (e) => e === "right" ? "ik-table-align-right" : e === "center" ? "ik-table-align-center" : void 0;
890
+ function ee({ columns: e, data: t, getRowId: n, density: r = "regular", stickyHeader: i = !1, loading: a = !1, loadingRows: o = 5, empty: s, onRowClick: c, selectedRowId: l, caption: u, className: d }) {
891
+ let m = e.length, h = (e, t) => n?.(e, t) ?? t;
892
+ return /* @__PURE__ */ f("div", {
893
+ className: "ik-table-wrap",
894
+ children: /* @__PURE__ */ p("table", {
895
+ className: v("ik-table", `ik-table-${r}`, i && "ik-table-sticky", d),
896
+ children: [
897
+ u && /* @__PURE__ */ f("caption", { children: u }),
898
+ /* @__PURE__ */ f("thead", { children: /* @__PURE__ */ f("tr", { children: e.map((e) => /* @__PURE__ */ f("th", {
899
+ scope: "col",
900
+ className: X(e.align),
901
+ style: { width: e.width },
902
+ children: e.header
903
+ }, e.key)) }) }),
904
+ /* @__PURE__ */ f("tbody", { children: a ? Array.from({ length: o }).map((t, n) => /* @__PURE__ */ f("tr", { children: e.map((e) => /* @__PURE__ */ f("td", {
905
+ className: X(e.align),
906
+ children: /* @__PURE__ */ f(I, { variant: "text" })
907
+ }, e.key)) }, `sk-${n}`)) : t.length === 0 ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", {
908
+ className: "ik-table-state",
909
+ colSpan: m,
910
+ children: s
911
+ }) }) : t.map((t, n) => {
912
+ let r = h(t, n);
913
+ return /* @__PURE__ */ f("tr", {
914
+ className: v(c && "ik-table-row-clickable", l != null && l === r && "ik-table-row-selected"),
915
+ "aria-selected": l == null ? void 0 : l === r,
916
+ onClick: c ? () => c(t, n) : void 0,
917
+ children: e.map((e) => /* @__PURE__ */ f("td", {
918
+ className: X(e.align),
919
+ children: e.render ? e.render(t, n) : t[e.key] ?? null
920
+ }, e.key))
921
+ }, r);
922
+ }) })
923
+ ]
924
+ })
925
+ });
926
+ }
927
+ //#endregion
928
+ //#region src/components/Toast/Toast.tsx
929
+ var Z = n(null), te = 0;
930
+ function ne({ children: e }) {
931
+ let [t, n] = d([]), r = u({}), i = a((e) => {
932
+ n((t) => t.filter((t) => t.id !== e));
933
+ let t = r.current[e];
934
+ t && (clearTimeout(t), delete r.current[e]);
935
+ }, []), o = a((e) => {
936
+ let t = `ik-toast-${++te}`, a = e.duration ?? 5e3;
937
+ return n((n) => [...n, {
938
+ ...e,
939
+ id: t
940
+ }]), a > 0 && (r.current[t] = setTimeout(() => i(t), a)), t;
941
+ }, [i]);
942
+ s(() => {
943
+ let e = r.current;
944
+ return () => {
945
+ Object.values(e).forEach(clearTimeout);
946
+ };
947
+ }, []);
948
+ let c = l(() => ({
949
+ toast: o,
950
+ dismiss: i
951
+ }), [o, i]);
952
+ return /* @__PURE__ */ p(Z.Provider, {
953
+ value: c,
954
+ children: [e, typeof document < "u" && m(/* @__PURE__ */ f("div", {
955
+ className: "ik-toast-viewport",
956
+ role: "region",
957
+ "aria-label": "Уведомления",
958
+ children: t.map((e) => /* @__PURE__ */ f(ie, {
959
+ toast: e,
960
+ onClose: () => i(e.id)
961
+ }, e.id))
962
+ }), document.body)]
963
+ });
964
+ }
965
+ function re() {
966
+ let e = o(Z);
967
+ if (!e) throw Error("useToast must be used within a <ToastProvider>");
968
+ return e;
969
+ }
970
+ function ie({ toast: e, onClose: t }) {
971
+ let { title: n, description: r, variant: i = "info", action: a, closeLabel: o = "Закрыть" } = e, s = i === "error" || i === "warning" ? "alert" : "status";
972
+ return /* @__PURE__ */ p("div", {
973
+ className: v("ik-toast", `ik-toast-${i}`),
974
+ role: s,
975
+ children: [/* @__PURE__ */ p("div", {
976
+ className: "ik-toast-body",
977
+ children: [
978
+ n && /* @__PURE__ */ f("div", {
979
+ className: "ik-toast-title",
980
+ children: n
981
+ }),
982
+ r && /* @__PURE__ */ f("div", {
983
+ className: "ik-toast-desc",
984
+ children: r
985
+ }),
986
+ a && /* @__PURE__ */ f("div", {
987
+ className: "ik-toast-action",
988
+ children: a
989
+ })
990
+ ]
991
+ }), /* @__PURE__ */ f("button", {
992
+ type: "button",
993
+ className: "ik-toast-close",
994
+ onClick: t,
995
+ "aria-label": o,
996
+ children: /* @__PURE__ */ p("svg", {
997
+ width: "12",
998
+ height: "12",
999
+ viewBox: "0 0 16 16",
1000
+ fill: "none",
1001
+ stroke: "currentColor",
1002
+ strokeWidth: "1.8",
1003
+ strokeLinecap: "round",
1004
+ "aria-hidden": "true",
1005
+ children: [/* @__PURE__ */ f("line", {
1006
+ x1: "4",
1007
+ y1: "4",
1008
+ x2: "12",
1009
+ y2: "12"
1010
+ }), /* @__PURE__ */ f("line", {
1011
+ x1: "12",
1012
+ y1: "4",
1013
+ x2: "4",
1014
+ y2: "12"
1015
+ })]
1016
+ })
1017
+ })]
1018
+ });
1019
+ }
1020
+ //#endregion
1021
+ //#region src/components/Sidebar/Sidebar.tsx
1022
+ var ae = {
1023
+ fill: "none",
1024
+ stroke: "currentColor",
1025
+ strokeWidth: 1.5,
1026
+ strokeLinecap: "round",
1027
+ strokeLinejoin: "round",
1028
+ viewBox: "0 0 16 16",
1029
+ width: 16,
1030
+ height: 16,
1031
+ "aria-hidden": !0
1032
+ };
1033
+ function oe({ id: e }) {
1034
+ let t = ae;
1035
+ switch (e) {
1036
+ case "overview": return /* @__PURE__ */ p("svg", {
1037
+ ...t,
1038
+ children: [
1039
+ /* @__PURE__ */ f("rect", {
1040
+ x: "2",
1041
+ y: "2",
1042
+ width: "5",
1043
+ height: "5",
1044
+ rx: "1"
1045
+ }),
1046
+ /* @__PURE__ */ f("rect", {
1047
+ x: "9",
1048
+ y: "2",
1049
+ width: "5",
1050
+ height: "5",
1051
+ rx: "1"
1052
+ }),
1053
+ /* @__PURE__ */ f("rect", {
1054
+ x: "2",
1055
+ y: "9",
1056
+ width: "5",
1057
+ height: "5",
1058
+ rx: "1"
1059
+ }),
1060
+ /* @__PURE__ */ f("rect", {
1061
+ x: "9",
1062
+ y: "9",
1063
+ width: "5",
1064
+ height: "5",
1065
+ rx: "1"
1066
+ })
1067
+ ]
1068
+ });
1069
+ case "devices": return /* @__PURE__ */ p("svg", {
1070
+ ...t,
1071
+ children: [
1072
+ /* @__PURE__ */ f("rect", {
1073
+ x: "1.5",
1074
+ y: "3",
1075
+ width: "13",
1076
+ height: "4",
1077
+ rx: "1"
1078
+ }),
1079
+ /* @__PURE__ */ f("rect", {
1080
+ x: "1.5",
1081
+ y: "9",
1082
+ width: "13",
1083
+ height: "4",
1084
+ rx: "1"
1085
+ }),
1086
+ /* @__PURE__ */ f("circle", {
1087
+ cx: "12.5",
1088
+ cy: "5",
1089
+ r: ".85",
1090
+ fill: "currentColor",
1091
+ stroke: "none"
1092
+ }),
1093
+ /* @__PURE__ */ f("circle", {
1094
+ cx: "12.5",
1095
+ cy: "11",
1096
+ r: ".85",
1097
+ fill: "currentColor",
1098
+ stroke: "none"
1099
+ })
1100
+ ]
1101
+ });
1102
+ case "topology": return /* @__PURE__ */ p("svg", {
1103
+ ...t,
1104
+ children: [
1105
+ /* @__PURE__ */ f("circle", {
1106
+ cx: "8",
1107
+ cy: "3",
1108
+ r: "1.5"
1109
+ }),
1110
+ /* @__PURE__ */ f("circle", {
1111
+ cx: "2.5",
1112
+ cy: "12.5",
1113
+ r: "1.5"
1114
+ }),
1115
+ /* @__PURE__ */ f("circle", {
1116
+ cx: "13.5",
1117
+ cy: "12.5",
1118
+ r: "1.5"
1119
+ }),
1120
+ /* @__PURE__ */ f("line", {
1121
+ x1: "8",
1122
+ y1: "4.5",
1123
+ x2: "3.3",
1124
+ y2: "11.2"
1125
+ }),
1126
+ /* @__PURE__ */ f("line", {
1127
+ x1: "8",
1128
+ y1: "4.5",
1129
+ x2: "12.7",
1130
+ y2: "11.2"
1131
+ }),
1132
+ /* @__PURE__ */ f("line", {
1133
+ x1: "4",
1134
+ y1: "12.5",
1135
+ x2: "12",
1136
+ y2: "12.5"
1137
+ })
1138
+ ]
1139
+ });
1140
+ case "alerts": return /* @__PURE__ */ p("svg", {
1141
+ ...t,
1142
+ children: [/* @__PURE__ */ f("path", { d: "M8 2a4 4 0 0 1 4 4c0 2.5 1 3.5 1 3.5H3S4 9.5 4 6a4 4 0 0 1 4-4z" }), /* @__PURE__ */ f("path", { d: "M6.5 9.5a1.5 1.5 0 0 0 3 0" })]
1143
+ });
1144
+ case "apikeys": return /* @__PURE__ */ p("svg", {
1145
+ ...t,
1146
+ children: [/* @__PURE__ */ f("circle", {
1147
+ cx: "5.5",
1148
+ cy: "8",
1149
+ r: "3"
1150
+ }), /* @__PURE__ */ f("path", { d: "M8.5 8h5.5m-2.5-1.5v3" })]
1151
+ });
1152
+ case "log": return /* @__PURE__ */ p("svg", {
1153
+ ...t,
1154
+ children: [
1155
+ /* @__PURE__ */ f("line", {
1156
+ x1: "3",
1157
+ y1: "4.5",
1158
+ x2: "13",
1159
+ y2: "4.5"
1160
+ }),
1161
+ /* @__PURE__ */ f("line", {
1162
+ x1: "3",
1163
+ y1: "8",
1164
+ x2: "13",
1165
+ y2: "8"
1166
+ }),
1167
+ /* @__PURE__ */ f("line", {
1168
+ x1: "3",
1169
+ y1: "11.5",
1170
+ x2: "9",
1171
+ y2: "11.5"
1172
+ })
1173
+ ]
1174
+ });
1175
+ case "settings": return /* @__PURE__ */ p("svg", {
1176
+ ...t,
1177
+ children: [
1178
+ /* @__PURE__ */ f("line", {
1179
+ x1: "3",
1180
+ y1: "4",
1181
+ x2: "13",
1182
+ y2: "4"
1183
+ }),
1184
+ /* @__PURE__ */ f("line", {
1185
+ x1: "3",
1186
+ y1: "8",
1187
+ x2: "13",
1188
+ y2: "8"
1189
+ }),
1190
+ /* @__PURE__ */ f("line", {
1191
+ x1: "3",
1192
+ y1: "12",
1193
+ x2: "13",
1194
+ y2: "12"
1195
+ }),
1196
+ /* @__PURE__ */ f("circle", {
1197
+ cx: "6",
1198
+ cy: "4",
1199
+ r: "1.5",
1200
+ fill: "currentColor"
1201
+ }),
1202
+ /* @__PURE__ */ f("circle", {
1203
+ cx: "10",
1204
+ cy: "8",
1205
+ r: "1.5",
1206
+ fill: "currentColor"
1207
+ }),
1208
+ /* @__PURE__ */ f("circle", {
1209
+ cx: "7",
1210
+ cy: "12",
1211
+ r: "1.5",
1212
+ fill: "currentColor"
1213
+ })
1214
+ ]
1215
+ });
1216
+ case "users": return /* @__PURE__ */ p("svg", {
1217
+ ...t,
1218
+ children: [
1219
+ /* @__PURE__ */ f("circle", {
1220
+ cx: "6",
1221
+ cy: "6",
1222
+ r: "2.5"
1223
+ }),
1224
+ /* @__PURE__ */ f("path", { d: "M1 14c0-3 2.5-4.5 5-4.5s5 1.5 5 4.5" }),
1225
+ /* @__PURE__ */ f("path", { d: "M11 4.5a2 2 0 0 1 0 3.5" }),
1226
+ /* @__PURE__ */ f("path", { d: "M13.5 14c0-2-1.2-3.5-2.5-4" })
1227
+ ]
1228
+ });
1229
+ case "audit": return /* @__PURE__ */ p("svg", {
1230
+ ...t,
1231
+ children: [/* @__PURE__ */ f("path", { d: "M8 1.5 13.5 3.5V8c0 3.5-2.5 5.5-5.5 6.5-3-1-5.5-3-5.5-6.5V3.5Z" }), /* @__PURE__ */ f("polyline", { points: "5.5,8 7,9.5 10.5,6" })]
1232
+ });
1233
+ case "system": return /* @__PURE__ */ p("svg", {
1234
+ ...t,
1235
+ children: [
1236
+ /* @__PURE__ */ f("rect", {
1237
+ x: "1.5",
1238
+ y: "2.5",
1239
+ width: "13",
1240
+ height: "11",
1241
+ rx: "1.5"
1242
+ }),
1243
+ /* @__PURE__ */ f("polyline", { points: "4.5,6.5 7,9 4.5,11.5" }),
1244
+ /* @__PURE__ */ f("line", {
1245
+ x1: "8.5",
1246
+ y1: "11.5",
1247
+ x2: "11.5",
1248
+ y2: "11.5"
1249
+ })
1250
+ ]
1251
+ });
1252
+ case "logout": return /* @__PURE__ */ p("svg", {
1253
+ ...t,
1254
+ children: [
1255
+ /* @__PURE__ */ f("path", { d: "M6 3H3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h3" }),
1256
+ /* @__PURE__ */ f("polyline", { points: "10,5.5 13.5,8 10,10.5" }),
1257
+ /* @__PURE__ */ f("line", {
1258
+ x1: "6",
1259
+ y1: "8",
1260
+ x2: "13.5",
1261
+ y2: "8"
1262
+ })
1263
+ ]
1264
+ });
1265
+ default: return /* @__PURE__ */ f("svg", {
1266
+ ...t,
1267
+ children: /* @__PURE__ */ f("circle", {
1268
+ cx: "8",
1269
+ cy: "8",
1270
+ r: "5"
1271
+ })
1272
+ });
1273
+ }
1274
+ }
1275
+ function se() {
1276
+ return /* @__PURE__ */ f("svg", {
1277
+ viewBox: "0 0 20 20",
1278
+ fill: "currentColor",
1279
+ "aria-hidden": "true",
1280
+ width: "20",
1281
+ height: "20",
1282
+ children: /* @__PURE__ */ f("path", { d: "M10 1 12.6 7.8 19.5 9.8 12.6 11.9 10 18.7 7.4 11.9.5 9.8 7.4 7.8Z" })
1283
+ });
1284
+ }
1285
+ var Q = [{
1286
+ id: "monitoring",
1287
+ lbl: "Мониторинг",
1288
+ items: [
1289
+ {
1290
+ id: "overview",
1291
+ lbl: "Обзор",
1292
+ ico: "overview"
1293
+ },
1294
+ {
1295
+ id: "devices",
1296
+ lbl: "Устройства",
1297
+ ico: "devices"
1298
+ },
1299
+ {
1300
+ id: "topology",
1301
+ lbl: "Топология",
1302
+ ico: "topology"
1303
+ }
1304
+ ]
1305
+ }, {
1306
+ id: "management",
1307
+ lbl: "Управление",
1308
+ items: [
1309
+ {
1310
+ id: "alerts",
1311
+ lbl: "Оповещения",
1312
+ ico: "alerts"
1313
+ },
1314
+ {
1315
+ id: "apikeys",
1316
+ lbl: "API-ключи",
1317
+ ico: "apikeys"
1318
+ },
1319
+ {
1320
+ id: "log",
1321
+ lbl: "Журнал",
1322
+ ico: "log"
1323
+ }
1324
+ ]
1325
+ }], ce = [...Q, {
1326
+ id: "admin",
1327
+ lbl: "Администрирование",
1328
+ items: [
1329
+ {
1330
+ id: "users",
1331
+ lbl: "Пользователи",
1332
+ ico: "users"
1333
+ },
1334
+ {
1335
+ id: "audit",
1336
+ lbl: "Аудит",
1337
+ ico: "audit"
1338
+ },
1339
+ {
1340
+ id: "system",
1341
+ lbl: "Система",
1342
+ ico: "system"
1343
+ }
1344
+ ]
1345
+ }], le = [{
1346
+ id: "settings",
1347
+ lbl: "Настройки",
1348
+ ico: "settings"
1349
+ }, {
1350
+ id: "logout",
1351
+ lbl: "Выход",
1352
+ ico: "logout"
1353
+ }];
1354
+ function $({ item: e, active: t, badge: n, onHover: r, onLeave: i, onClick: a }) {
1355
+ return /* @__PURE__ */ p("button", {
1356
+ className: v("isb-item", t && "isb-on"),
1357
+ title: e.lbl,
1358
+ onMouseEnter: r ? (t) => r(t, e.lbl) : void 0,
1359
+ onMouseLeave: i,
1360
+ onClick: a,
1361
+ type: "button",
1362
+ "aria-current": t ? "page" : void 0,
1363
+ children: [
1364
+ /* @__PURE__ */ f("span", {
1365
+ className: "isb-ico",
1366
+ children: /* @__PURE__ */ f(oe, { id: e.ico })
1367
+ }),
1368
+ /* @__PURE__ */ f("span", {
1369
+ className: "isb-lbl",
1370
+ children: e.lbl
1371
+ }),
1372
+ n != null && n > 0 && /* @__PURE__ */ f("span", {
1373
+ className: "isb-bdg",
1374
+ "aria-label": `${e.lbl}: ${n} уведомлений`,
1375
+ children: n
1376
+ })
1377
+ ]
1378
+ });
1379
+ }
1380
+ function ue({ collapsed: e = !1, onToggle: t, activeItem: n = "overview", onNavigate: r, variant: i = "operator", theme: o = "", badges: c = {}, className: l = "" }) {
1381
+ let [m, h] = d(null), [g, _] = d(!1), [y, b] = d(e), x = u(null);
1382
+ e !== y && (b(e), _(!1), h(null)), s(() => {
1383
+ if (!e) return;
1384
+ let t = setTimeout(() => _(!0), 210);
1385
+ return () => clearTimeout(t);
1386
+ }, [e]);
1387
+ let S = a((e, t) => {
1388
+ if (!g || !x.current) return;
1389
+ let n = e.currentTarget.getBoundingClientRect(), r = x.current.getBoundingClientRect();
1390
+ h({
1391
+ lbl: t,
1392
+ top: n.top - r.top + n.height / 2
1393
+ });
1394
+ }, [g]), C = a(() => h(null), []), w = i === "admin" ? ce : Q, T = e ? {
1395
+ onHover: S,
1396
+ onLeave: C
1397
+ } : {};
1398
+ return /* @__PURE__ */ p("aside", {
1399
+ className: v("iskra-sb", e && "isb-c", e && g && "isb-tip-rdy", o, l),
1400
+ ref: x,
1401
+ role: "navigation",
1402
+ "aria-label": "Навигация платформы",
1403
+ children: [
1404
+ /* @__PURE__ */ p("div", {
1405
+ className: "isb-logo",
1406
+ children: [
1407
+ /* @__PURE__ */ f("span", {
1408
+ className: "isb-spark",
1409
+ children: /* @__PURE__ */ f(se, {})
1410
+ }),
1411
+ /* @__PURE__ */ f("span", {
1412
+ className: "isb-wmark",
1413
+ children: "ИСКРА.DCI"
1414
+ }),
1415
+ /* @__PURE__ */ f("button", {
1416
+ className: "isb-collapser",
1417
+ type: "button",
1418
+ onClick: t,
1419
+ "aria-expanded": !e,
1420
+ "aria-label": e ? "Развернуть боковую панель" : "Свернуть боковую панель",
1421
+ children: /* @__PURE__ */ f("svg", {
1422
+ viewBox: "0 0 10 10",
1423
+ fill: "none",
1424
+ stroke: "currentColor",
1425
+ strokeWidth: "1.5",
1426
+ strokeLinecap: "round",
1427
+ strokeLinejoin: "round",
1428
+ "aria-hidden": "true",
1429
+ children: /* @__PURE__ */ f("polyline", { points: "7,2 4,5 7,8" })
1430
+ })
1431
+ })
1432
+ ]
1433
+ }),
1434
+ /* @__PURE__ */ f("div", {
1435
+ className: "isb-scroll",
1436
+ children: w.map(({ id: e, lbl: t, items: i }) => /* @__PURE__ */ p("div", {
1437
+ className: "isb-grp",
1438
+ children: [/* @__PURE__ */ f("div", {
1439
+ className: "isb-sec",
1440
+ "aria-hidden": "true",
1441
+ children: t
1442
+ }), i.map((e) => /* @__PURE__ */ f($, {
1443
+ item: e,
1444
+ active: n === e.id,
1445
+ badge: c[e.id],
1446
+ onClick: () => r?.(e.id),
1447
+ ...T
1448
+ }, e.id))]
1449
+ }, e))
1450
+ }),
1451
+ /* @__PURE__ */ f("div", {
1452
+ className: "isb-foot",
1453
+ children: le.map((e) => /* @__PURE__ */ f($, {
1454
+ item: e,
1455
+ active: n === e.id,
1456
+ badge: c[e.id],
1457
+ onClick: () => r?.(e.id),
1458
+ ...T
1459
+ }, e.id))
1460
+ }),
1461
+ m && /* @__PURE__ */ f("div", {
1462
+ className: "isb-floatip",
1463
+ style: { top: m.top },
1464
+ children: m.lbl
1465
+ })
1466
+ ]
1467
+ });
1468
+ }
1469
+ //#endregion
1470
+ export { B as Alert, A as Avatar, D as Badge, y as Button, j as Card, C as Checkbox, V as EmptyState, R as FormField, g as ICON_NAMES, _ as Icon, b as IconButton, W as Modal, w as Radio, T as RadioGroup, ue as Sidebar, I as Skeleton, L as Spinner, E as Switch, ee as Table, Y as Tabs, O as Tag, x as TextField, S as Textarea, ne as ToastProvider, v as cx, re as useToast };
1471
+
1472
+ //# sourceMappingURL=index.js.map