@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
@@ -0,0 +1,11 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from 'react';
2
+ import './Switch.css';
3
+ export type SwitchSize = 's' | 'm';
4
+ export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
5
+ size?: SwitchSize;
6
+ label?: ReactNode;
7
+ description?: ReactNode;
8
+ }
9
+ /** Switch — on/off toggle. Semantically a `role="switch"` checkbox, not a checkbox skin. */
10
+ export declare function Switch({ checked, defaultChecked, disabled, size, label, description, onChange, id, className, ...rest }: SwitchProps): import("react").JSX.Element;
11
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/F,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,4FAA4F;AAC5F,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,cAAc,EACd,QAAgB,EAChB,IAAU,EACV,KAAK,EACL,WAAW,EACX,QAAQ,EACR,EAAE,EACF,SAAS,EACT,GAAG,IAAI,EACR,EAAE,WAAW,+BA8Bb"}
@@ -0,0 +1,3 @@
1
+ export { Switch } from './Switch.js';
2
+ export type { SwitchProps, SwitchSize } from './Switch.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { type ReactNode } from 'react';
2
+ import './Table.css';
3
+ export type TableDensity = 'regular' | 'compact';
4
+ export type TableAlign = 'left' | 'right' | 'center';
5
+ export interface TableColumn<T> {
6
+ /** Unique column key; also used to read `row[key]` when no `render` is given. */
7
+ key: string;
8
+ header: ReactNode;
9
+ render?: (row: T, index: number) => ReactNode;
10
+ align?: TableAlign;
11
+ width?: number | string;
12
+ }
13
+ export interface TableProps<T> {
14
+ columns: TableColumn<T>[];
15
+ data: T[];
16
+ /** Stable row id; defaults to the row index. */
17
+ getRowId?: (row: T, index: number) => string | number;
18
+ density?: TableDensity;
19
+ stickyHeader?: boolean;
20
+ loading?: boolean;
21
+ /** Number of skeleton rows while loading. */
22
+ loadingRows?: number;
23
+ /** Shown when `data` is empty and not loading. */
24
+ empty?: ReactNode;
25
+ onRowClick?: (row: T, index: number) => void;
26
+ selectedRowId?: string | number;
27
+ /** Visually-hidden caption for screen readers. */
28
+ caption?: string;
29
+ className?: string;
30
+ }
31
+ /** Table — foundational data table. Not a virtualized data-grid; see roadmap. */
32
+ export declare function Table<T>({ columns, data, getRowId, density, stickyHeader, loading, loadingRows, empty, onRowClick, selectedRowId, caption, className, }: TableProps<T>): import("react").JSX.Element;
33
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,iFAAiF;IACjF,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,gDAAgD;IAChD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC;IACtD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,iFAAiF;AACjF,wBAAgB,KAAK,CAAC,CAAC,EAAE,EACvB,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAmB,EACnB,YAAoB,EACpB,OAAe,EACf,WAAe,EACf,KAAK,EACL,UAAU,EACV,aAAa,EACb,OAAO,EACP,SAAS,GACV,EAAE,UAAU,CAAC,CAAC,CAAC,+BA0Ef"}
@@ -0,0 +1,3 @@
1
+ export { Table } from './Table.js';
2
+ export type { TableProps, TableColumn, TableDensity, TableAlign } from './Table.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { type ReactNode } from 'react';
2
+ import './Tabs.css';
3
+ export interface TabItem {
4
+ value: string;
5
+ label: ReactNode;
6
+ content: ReactNode;
7
+ disabled?: boolean;
8
+ }
9
+ export interface TabsProps {
10
+ items: TabItem[];
11
+ value?: string;
12
+ defaultValue?: string;
13
+ onValueChange?: (value: string) => void;
14
+ className?: string;
15
+ 'aria-label'?: string;
16
+ }
17
+ /**
18
+ * Tabs — WAI-ARIA Tabs pattern. Roving tabindex on the tablist with
19
+ * Left/Right/Home/End navigation; only the active tab is in the tab order.
20
+ */
21
+ export declare function Tabs({ items, value, defaultValue, onValueChange, className, 'aria-label': ariaLabel, }: TabsProps): import("react").JSX.Element;
22
+ //# sourceMappingURL=Tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpF,OAAO,YAAY,CAAC;AAEpB,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,KAAK,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,YAAY,EAAE,SAAS,GACxB,EAAE,SAAS,+BAgEX"}
@@ -0,0 +1,3 @@
1
+ export { Tabs } from './Tabs.js';
2
+ export type { TabsProps, TabItem } from './Tabs.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from 'react';
2
+ import './TextField.css';
3
+ export type TextFieldSize = 's' | 'm' | 'l';
4
+ export interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
5
+ size?: TextFieldSize;
6
+ label?: ReactNode;
7
+ hint?: ReactNode;
8
+ /** Error message (string) or boolean error state. */
9
+ error?: ReactNode | boolean;
10
+ required?: boolean;
11
+ iconBefore?: ReactNode;
12
+ clearable?: boolean;
13
+ onClear?: () => void;
14
+ clearLabel?: string;
15
+ wrapClassName?: string;
16
+ }
17
+ /**
18
+ * TextField — single-line text input with label, hint, error, leading icon and
19
+ * an optional clear button. Controlled or uncontrolled. Wires `aria-describedby`
20
+ * / `aria-invalid` for screen readers.
21
+ */
22
+ export declare function TextField({ size, label, hint, error, required, iconBefore, clearable, onClear, disabled, value, defaultValue, onChange, id, className, wrapClassName, clearLabel, ...rest }: TextFieldProps): import("react").JSX.Element;
23
+ //# sourceMappingURL=TextField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1F,OAAO,iBAAiB,CAAC;AAEzB,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE5C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,QAAQ,CAClB;IACC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAU,EACV,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAgB,EAChB,UAAU,EACV,SAAiB,EACjB,OAAO,EACP,QAAgB,EAChB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,EAAE,EACF,SAAS,EACT,aAAa,EACb,UAAuB,EACvB,GAAG,IAAI,EACR,EAAE,cAAc,+BAkGhB"}
@@ -0,0 +1,3 @@
1
+ export { TextField } from './TextField.js';
2
+ export type { TextFieldProps, TextFieldSize } from './TextField.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type ReactNode, type TextareaHTMLAttributes } from 'react';
2
+ import './Textarea.css';
3
+ export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'style'> {
4
+ label?: ReactNode;
5
+ hint?: ReactNode;
6
+ error?: ReactNode | boolean;
7
+ required?: boolean;
8
+ resize?: 'none' | 'vertical';
9
+ /** Show a `value.length / maxLength` counter (requires maxLength). */
10
+ showCount?: boolean;
11
+ wrapClassName?: string;
12
+ }
13
+ /** Textarea — multi-line text input with label, hint, error and optional counter. */
14
+ export declare function Textarea({ label, hint, error, required, resize, showCount, rows, maxLength, value, defaultValue, onChange, id, className, wrapClassName, ...rest }: TextareaProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=Textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,gBAAgB,CAAC;AAExB,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC/F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAgB,EAChB,MAAmB,EACnB,SAAiB,EACjB,IAAQ,EACR,SAAS,EACT,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,EAAE,EACF,SAAS,EACT,aAAa,EACb,GAAG,IAAI,EACR,EAAE,aAAa,+BAyDf"}
@@ -0,0 +1,3 @@
1
+ export { Textarea } from './Textarea.js';
2
+ export type { TextareaProps } from './Textarea.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type ReactNode } from 'react';
2
+ import './Toast.css';
3
+ export type ToastVariant = 'info' | 'success' | 'warning' | 'error';
4
+ export interface ToastOptions {
5
+ title?: ReactNode;
6
+ description?: ReactNode;
7
+ variant?: ToastVariant;
8
+ /** Auto-dismiss delay in ms. 0 keeps it until dismissed. Default 5000. */
9
+ duration?: number;
10
+ action?: ReactNode;
11
+ closeLabel?: string;
12
+ }
13
+ interface ToastContextValue {
14
+ toast: (opts: ToastOptions) => string;
15
+ dismiss: (id: string) => void;
16
+ }
17
+ /** ToastProvider — owns the toast queue and renders the viewport. Wrap your app once. */
18
+ export declare function ToastProvider({ children }: {
19
+ children: ReactNode;
20
+ }): import("react").JSX.Element;
21
+ /** useToast — imperative API: `const { toast, dismiss } = useToast()`. */
22
+ export declare function useToast(): ToastContextValue;
23
+ export {};
24
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD,UAAU,iBAAiB;IACzB,KAAK,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,MAAM,CAAC;IACtC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAMD,yFAAyF;AACzF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAiDlE;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,IAAI,iBAAiB,CAI5C"}
@@ -0,0 +1,3 @@
1
+ export { ToastProvider, useToast } from './Toast.js';
2
+ export type { ToastOptions, ToastVariant } from './Toast.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime"),n=require("react-dom");var r={"chevron-down":`<polyline points="4,6 8,10 12,6"/>`,"chevron-up":`<polyline points="4,10 8,6 12,10"/>`,"chevron-left":`<polyline points="10,4 6,8 10,12"/>`,"chevron-right":`<polyline points="6,4 10,8 6,12"/>`,"chevrons-left":`<polyline points="7.5,4 3.5,8 7.5,12"/><polyline points="12,4 8,8 12,12"/>`,"chevrons-right":`<polyline points="8.5,4 12.5,8 8.5,12"/><polyline points="4,4 8,8 4,12"/>`,"arrow-up":`<line x1="8" y1="13.5" x2="8" y2="3"/><polyline points="4,7 8,3 12,7"/>`,"arrow-down":`<line x1="8" y1="2.5" x2="8" y2="13"/><polyline points="4,9 8,13 12,9"/>`,"arrow-left":`<line x1="13.5" y1="8" x2="3" y2="8"/><polyline points="7,4 3,8 7,12"/>`,"arrow-right":`<line x1="2.5" y1="8" x2="13" y2="8"/><polyline points="9,4 13,8 9,12"/>`,"arrow-up-right":`<line x1="4" y1="12" x2="12" y2="4"/><polyline points="5.5,4 12,4 12,10.5"/>`,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"/>`,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"/>`,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"/>`,"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"/>`,check:`<polyline points="3.5,8.5 6.5,11.5 12.5,4.5"/>`,close:`<line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/>`,plus:`<line x1="8" y1="3" x2="8" y2="13"/><line x1="3" y1="8" x2="13" y2="8"/>`,minus:`<line x1="3" y1="8" x2="13" y2="8"/>`,"check-circle":`<circle cx="8" cy="8" r="6"/><polyline points="5.3,8.2 7,10 10.7,5.8"/>`,"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"/>`,"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"/>`,"minus-circle":`<circle cx="8" cy="8" r="6"/><line x1="5.3" y1="8" x2="10.7" y2="8"/>`,success:`<circle cx="8" cy="8" r="6"/><polyline points="5.3,8.2 7,10 10.7,5.8"/>`,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"/>`,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"/>`,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"/>`,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"/>`,search:`<circle cx="7" cy="7" r="4.5"/><line x1="10.5" y1="10.5" x2="14.5" y2="14.5"/>`,filter:`<path d="M2.5 4h11l-4.2 5v3.8l-2.6-1.3V9z"/>`,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)"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,"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"/>`,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"/>`,"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"/>`,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"/>`,"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"/>`,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"/>`,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"/>`,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"/>`,"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"/>`,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"/>`,zap:`<polygon points="8.5,1.8 3.5,9 7.5,9 7,14.2 12.5,7 8.5,7"/>`,activity:`<polyline points="1.5,8 5,8 7,3 9.5,13 11.5,8 14.5,8"/>`,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"/>`,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"/>`,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"/>`,"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"/>`,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"/>`,clock:`<circle cx="8" cy="8" r="6"/><polyline points="8,4.5 8,8 10.5,9.5"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,code:`<polyline points="6,5 2.5,8 6,11"/><polyline points="10,5 13.5,8 10,11"/>`,"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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,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"/>`,power:`<line x1="8" y1="2" x2="8" y2="8"/><path d="M5 4.2a5 5 0 1 0 6 0"/>`,"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"/>`,"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"/>`},i=Object.keys(r);function a({name:e,size:n=`1em`,strokeWidth:i=1.5,title:a,className:o,style:s,...c}){let l=r[e],u=typeof n==`number`?`${n}px`:n;return(0,t.jsx)(`svg`,{className:(`iskra-icon `+(o??``)).trim(),width:u,height:u,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:i,strokeLinecap:`round`,strokeLinejoin:`round`,role:a?`img`:void 0,"aria-hidden":a?void 0:`true`,"aria-label":a||void 0,style:{display:`inline-block`,flexShrink:0,verticalAlign:`middle`,...s},dangerouslySetInnerHTML:{__html:(a?`<title>${a}</title>`:``)+l},...c})}function o(...e){return e.filter(Boolean).join(` `)}var s=(0,e.forwardRef)(function({variant:e=`primary`,size:n=`m`,iconBefore:r,iconAfter:i,iconOnly:a=!1,loading:s=!1,disabled:c=!1,fullWidth:l=!1,type:u=`button`,className:d,children:f,...p},m){return(0,t.jsxs)(`button`,{ref:m,type:u,className:o(`ik-btn`,`ik-btn-${e}`,`ik-btn-${n}`,a&&`ik-btn-io`,l&&`ik-btn-fw`,s&&`ik-btn-loading`,d),disabled:c||s,...p,children:[s&&(0,t.jsx)(`span`,{className:`ik-btn-spinner`,"aria-hidden":`true`}),(0,t.jsxs)(`span`,{className:`ik-btn-content`,children:[r,!a&&f!=null&&(0,t.jsx)(`span`,{children:f}),a&&f,i]})]})}),c=(0,e.forwardRef)(function({icon:e,...n},r){return(0,t.jsx)(s,{ref:r,iconOnly:!0,...n,children:e})});function l({size:n=`m`,label:r,hint:i,error:a,required:s=!1,iconBefore:c,clearable:l=!1,onClear:u,disabled:d=!1,value:f,defaultValue:p,onChange:m,id:h,className:g,wrapClassName:_,clearLabel:v=`Очистить`,...y}){let b=(0,e.useId)(),x=h??`ik-tf-${b}`,S=(0,e.useRef)(null),C=f!=null,[w,T]=(0,e.useState)(C?String(f).length>0:String(p??``).length>0),E=l&&!d&&(C?String(f).length>0:w),D=e=>{C||T(e.target.value.length>0),m?.(e)},O=()=>{let e=S.current;e&&((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus()),C||T(!1),u?.()},k=typeof a==`string`?a:null,A=!!a;return(0,t.jsxs)(`div`,{className:o(`ik-tf-wrap`,_),children:[r&&(0,t.jsxs)(`label`,{className:`ik-tf-label`,htmlFor:x,children:[r,s&&(0,t.jsx)(`span`,{className:`ik-tf-req`,"aria-hidden":`true`,children:`*`})]}),(0,t.jsxs)(`div`,{className:o(`ik-tf-field`,`ik-tf-${n}`,A&&`is-error`,d&&`is-disabled`,g),children:[c&&(0,t.jsx)(`span`,{className:`ik-tf-ico`,children:c}),(0,t.jsx)(`input`,{ref:S,id:x,className:`ik-tf-input`,disabled:d,value:f,defaultValue:p,onChange:D,"aria-invalid":A||void 0,"aria-describedby":k||i?`${x}-msg`:void 0,...y}),E&&(0,t.jsx)(`button`,{type:`button`,className:`ik-tf-clear`,onClick:O,"aria-label":v,children:(0,t.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,t.jsx)(`line`,{x1:`4`,y1:`4`,x2:`12`,y2:`12`}),(0,t.jsx)(`line`,{x1:`12`,y1:`4`,x2:`4`,y2:`12`})]})})]}),(k||i)&&(0,t.jsx)(`div`,{id:`${x}-msg`,className:o(`ik-tf-msg`,A&&`is-error`),children:k||i})]})}function u({label:n,hint:r,error:i,required:a=!1,resize:s=`vertical`,showCount:c=!1,rows:l=4,maxLength:u,value:d,defaultValue:f,onChange:p,id:m,className:h,wrapClassName:g,..._}){let v=(0,e.useId)(),y=m??`ik-ta-${v}`,b=d!=null,[x,S]=(0,e.useState)(b?String(d).length:String(f??``).length),C=e=>{b||S(e.target.value.length),p?.(e)},w=typeof i==`string`?i:null,T=!!i,E=b?String(d).length:x;return(0,t.jsxs)(`div`,{className:o(`ik-ta-wrap`,g),children:[n&&(0,t.jsxs)(`label`,{className:`ik-ta-label`,htmlFor:y,children:[n,a&&(0,t.jsx)(`span`,{className:`ik-ta-req`,"aria-hidden":`true`,children:`*`})]}),(0,t.jsx)(`textarea`,{id:y,className:o(`ik-ta-field`,`ik-ta-resize-${s}`,T&&`is-error`,h),rows:l,maxLength:u,value:d,defaultValue:f,onChange:C,"aria-invalid":T||void 0,"aria-describedby":w||r?`${y}-msg`:void 0,..._}),(w||r||c&&u)&&(0,t.jsxs)(`div`,{className:`ik-ta-foot`,children:[(w||r)&&(0,t.jsx)(`span`,{id:`${y}-msg`,className:o(`ik-ta-msg`,T&&`is-error`),children:w||r}),c&&u!=null&&(0,t.jsxs)(`span`,{className:`ik-ta-count`,children:[E,`/`,u]})]})]})}function d({checked:n,defaultChecked:r,indeterminate:i=!1,disabled:a=!1,size:s=`m`,label:c,description:l,onChange:u,id:d,className:f,...p}){let m=(0,e.useId)(),h=d??`ik-cb-${m}`,g=(0,e.useRef)(null);return(0,e.useEffect)(()=>{g.current&&(g.current.indeterminate=i)},[i,n]),(0,t.jsxs)(`label`,{className:o(`ik-cb`,`ik-cb-${s}`,a&&`is-disabled`,f),htmlFor:h,children:[(0,t.jsx)(`input`,{ref:g,id:h,type:`checkbox`,className:`ik-cb-input`,checked:n,defaultChecked:r,disabled:a,onChange:u,...p}),(0,t.jsxs)(`span`,{className:`ik-cb-box`,"aria-hidden":`true`,children:[(0,t.jsx)(`svg`,{className:`ik-cb-check`,width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`polyline`,{points:`3.5,8.5 6.5,11.5 12.5,4.5`})}),(0,t.jsx)(`svg`,{className:`ik-cb-dash`,width:`11`,height:`11`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,children:(0,t.jsx)(`line`,{x1:`3.5`,y1:`8`,x2:`12.5`,y2:`8`})})]}),(c||l)&&(0,t.jsxs)(`span`,{className:`ik-cb-textwrap`,children:[c&&(0,t.jsx)(`span`,{className:`ik-cb-text`,children:c}),l&&(0,t.jsx)(`span`,{className:`ik-cb-desc`,children:l})]})]})}function f({value:n,checked:r,defaultChecked:i,name:a,disabled:s=!1,size:c=`m`,label:l,description:u,onChange:d,id:f,className:p,...m}){let h=(0,e.useId)(),g=f??`ik-rd-${h}`;return(0,t.jsxs)(`label`,{className:o(`ik-rd`,`ik-rd-${c}`,s&&`is-disabled`,p),htmlFor:g,children:[(0,t.jsx)(`input`,{id:g,type:`radio`,className:`ik-rd-input`,value:n,name:a,checked:r,defaultChecked:i,disabled:s,onChange:d,...m}),(0,t.jsx)(`span`,{className:`ik-rd-circle`,"aria-hidden":`true`,children:(0,t.jsx)(`span`,{className:`ik-rd-dot`})}),(l||u)&&(0,t.jsxs)(`span`,{className:`ik-rd-textwrap`,children:[l&&(0,t.jsx)(`span`,{className:`ik-rd-text`,children:l}),u&&(0,t.jsx)(`span`,{className:`ik-rd-desc`,children:u})]})]})}function p({name:n,value:r,defaultValue:i,onChange:a,options:s,size:c=`m`,orientation:l=`vertical`,disabled:u=!1,className:d,children:p}){let m=(0,e.useId)(),h=n??`ik-rdg-${m}`,g=r!=null,[_,v]=(0,e.useState)(i),y=g?r:_,b=e=>{g||v(e),a?.(e)};return(0,t.jsx)(`div`,{className:o(`ik-rdg`,`ik-rdg-${l}`,d),role:`radiogroup`,children:s?s.map(e=>(0,t.jsx)(f,{name:h,size:c,value:e.value,label:e.label,description:e.description,disabled:u||e.disabled,checked:y===e.value,onChange:()=>b(e.value)},e.value)):e.Children.map(p,t=>(0,e.isValidElement)(t)?(0,e.cloneElement)(t,{name:h,size:t.props.size??c,checked:y===t.props.value,disabled:u||t.props.disabled,onChange:()=>b(t.props.value)}):t)})}function m({checked:n,defaultChecked:r,disabled:i=!1,size:a=`m`,label:s,description:c,onChange:l,id:u,className:d,...f}){let p=(0,e.useId)(),m=u??`ik-sw-${p}`;return(0,t.jsxs)(`label`,{className:o(`ik-sw`,`ik-sw-${a}`,i&&`is-disabled`,d),htmlFor:m,children:[(0,t.jsx)(`input`,{id:m,type:`checkbox`,role:`switch`,className:`ik-sw-input`,checked:n,defaultChecked:r,disabled:i,onChange:l,...f}),(0,t.jsx)(`span`,{className:`ik-sw-track`,"aria-hidden":`true`,children:(0,t.jsx)(`span`,{className:`ik-sw-knob`})}),(s||c)&&(0,t.jsxs)(`span`,{className:`ik-sw-textwrap`,children:[s&&(0,t.jsx)(`span`,{className:`ik-sw-text`,children:s}),c&&(0,t.jsx)(`span`,{className:`ik-sw-desc`,children:c})]})]})}function h({variant:e=`neutral`,size:n=`m`,dot:r=!1,icon:i,children:a,className:s,...c}){return(0,t.jsxs)(`span`,{className:o(`ik-bdg`,`ik-bdg-${n}`,`ik-bdg-${e}`,s),...c,children:[r&&(0,t.jsx)(`span`,{className:`ik-bdg-dot`,"aria-hidden":`true`}),i,a]})}function g({accent:e=!1,onRemove:n,removeLabel:r=`Удалить`,children:i,className:a,...s}){return(0,t.jsxs)(`span`,{className:o(`ik-tag`,e&&`ik-tag-accent`,a),...s,children:[i,n&&(0,t.jsx)(`button`,{type:`button`,className:`ik-tag-x`,onClick:n,"aria-label":r,children:(0,t.jsxs)(`svg`,{width:`9`,height:`9`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,t.jsx)(`line`,{x1:`4`,y1:`4`,x2:`12`,y2:`12`}),(0,t.jsx)(`line`,{x1:`12`,y1:`4`,x2:`4`,y2:`12`})]})})]})}function _(e){return e&&e.trim().split(/\s+/).slice(0,2).map(e=>e[0]??``).join(``)||`?`}function v({name:n,src:r,size:i=`md`,shape:a=`circle`,status:s,className:c,...l}){let[u,d]=(0,e.useState)(!1),f=r&&!u;return(0,t.jsxs)(`span`,{className:o(`ik-av`,`ik-av-${i}`,`ik-av-${a}`,c),role:`img`,"aria-label":n,...l,children:[f?(0,t.jsx)(`img`,{className:`ik-av-img`,src:r,alt:``,onError:()=>d(!0)}):(0,t.jsx)(`span`,{"aria-hidden":`true`,children:_(n)}),s&&(0,t.jsx)(`span`,{className:o(`ik-av-status`,`ik-av-status-${s}`),"aria-hidden":`true`})]})}var y=(0,e.forwardRef)(function({padding:e=`m`,elevated:n=!1,interactive:r=!1,selected:i=!1,className:a,...s},c){return(0,t.jsx)(`div`,{ref:c,className:o(`ik-card`,`ik-card-pad-${e}`,n&&`ik-card-elevated`,r&&`ik-card-interactive`,i&&`ik-card-selected`,a),tabIndex:r?0:void 0,...s})});function b({className:e,...n}){return(0,t.jsx)(`div`,{className:o(`ik-card-header`,e),...n})}function x({className:e,...n}){return(0,t.jsx)(`div`,{className:o(`ik-card-body`,e),...n})}function S({className:e,...n}){return(0,t.jsx)(`div`,{className:o(`ik-card-footer`,e),...n})}y.Header=b,y.Body=x,y.Footer=S;var C=e=>e==null?void 0:typeof e==`number`?`${e}px`:e;function w({variant:e=`text`,width:n,height:r,lines:i=1,animated:a=!0,className:s,style:c,...l}){let u=o(`ik-sk`,`ik-sk-${e}`,a&&`ik-sk-animated`,s);return e===`text`&&i>1?(0,t.jsx)(`div`,{className:`ik-sk-lines`,"aria-hidden":`true`,...l,children:Array.from({length:i}).map((e,r)=>(0,t.jsx)(`span`,{className:u,style:{width:r===i-1?`60%`:C(n)??`100%`,...c}},r))}):(0,t.jsx)(`div`,{className:u,style:{width:C(n),height:C(r),...c},"aria-hidden":`true`,...l})}function T({size:e=`m`,label:n=`Загрузка…`,className:r,...i}){return(0,t.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:o(`ik-spinner-wrap`,r),...i,children:[(0,t.jsx)(`span`,{className:o(`ik-spinner`,`ik-spinner-${e}`),"aria-hidden":`true`}),(0,t.jsx)(`span`,{className:`ik-spinner-label`,children:n})]})}function E({label:n,hint:r,error:i,required:a=!1,id:s,children:c,className:l}){let u=(0,e.useId)(),d=s??c.props.id??`ik-ff-${u}`,f=`${d}-msg`,p=typeof i==`string`?i:null,m=!!i,h=!!(p||r),g=(0,e.cloneElement)(c,{id:d,"aria-describedby":h?f:c.props[`aria-describedby`],"aria-invalid":m||c.props[`aria-invalid`],"aria-required":a||c.props[`aria-required`]});return(0,t.jsxs)(`div`,{className:o(`ik-ff`,l),children:[n&&(0,t.jsxs)(`label`,{className:`ik-ff-label`,htmlFor:d,children:[n,a&&(0,t.jsx)(`span`,{className:`ik-ff-req`,"aria-hidden":`true`,children:`*`})]}),g,h&&(0,t.jsx)(`div`,{id:f,className:o(`ik-ff-msg`,m&&`is-error`),children:p||r})]})}var D={info:`info`,success:`check-circle`,warning:`warning`,error:`x-circle`};function O({variant:e=`info`,title:n,icon:r,closable:i=!1,onClose:s,closeLabel:c=`Закрыть`,children:l,className:u,...d}){let f=e===`error`||e===`warning`?`alert`:`status`,p=r!==null;return(0,t.jsxs)(`div`,{className:o(`ik-alert`,`ik-alert-${e}`,u),role:f,...d,children:[p&&(0,t.jsx)(`span`,{className:`ik-alert-ico`,"aria-hidden":`true`,children:r??(0,t.jsx)(a,{name:D[e],size:16})}),(0,t.jsxs)(`div`,{className:`ik-alert-body`,children:[n&&(0,t.jsx)(`div`,{className:`ik-alert-title`,children:n}),l]}),i&&(0,t.jsx)(`button`,{type:`button`,className:`ik-alert-close`,onClick:s,"aria-label":c,children:(0,t.jsx)(a,{name:`close`,size:14})})]})}function k({icon:e,title:n,description:r,action:i,className:a,...s}){return(0,t.jsxs)(`div`,{className:o(`ik-empty`,a),...s,children:[e&&(0,t.jsx)(`span`,{className:`ik-empty-ico`,"aria-hidden":`true`,children:e}),(0,t.jsx)(`div`,{className:`ik-empty-title`,children:n}),r&&(0,t.jsx)(`div`,{className:`ik-empty-desc`,children:r}),i&&(0,t.jsx)(`div`,{className:`ik-empty-action`,children:i})]})}var A=`a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])`;function j(t,n){(0,e.useEffect)(()=>{if(!n||!t.current)return;let e=t.current,r=document.activeElement,i=()=>Array.from(e.querySelectorAll(A));(i()[0]??e).focus();let a=e=>{if(e.key!==`Tab`)return;let t=i();if(t.length===0){e.preventDefault();return}let n=t[0],r=t[t.length-1],a=document.activeElement;e.shiftKey&&a===n?(e.preventDefault(),r.focus()):!e.shiftKey&&a===r&&(e.preventDefault(),n.focus())};return e.addEventListener(`keydown`,a),()=>{e.removeEventListener(`keydown`,a),r?.focus?.()}},[n,t])}function M({open:r,onClose:i,title:a,description:s,children:c,footer:l,size:u=`m`,closeOnEsc:d=!0,closeOnOverlayClick:f=!0,showClose:p=!0,closeLabel:m=`Закрыть`,className:h}){let g=(0,e.useRef)(null);if(j(g,r),(0,e.useEffect)(()=>{if(!r||!d)return;let e=e=>{e.key===`Escape`&&i()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r,d,i]),(0,e.useEffect)(()=>{if(!r)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[r]),!r||typeof document>`u`)return null;let _=a?`ik-modal-title`:void 0,v=s?`ik-modal-desc`:void 0;return(0,n.createPortal)((0,t.jsx)(`div`,{className:`ik-modal-overlay`,onMouseDown:e=>{f&&e.target===e.currentTarget&&i()},children:(0,t.jsxs)(`div`,{ref:g,className:o(`ik-modal`,`ik-modal-${u}`,h),role:`dialog`,"aria-modal":`true`,"aria-labelledby":_,"aria-describedby":v,tabIndex:-1,children:[(a||p)&&(0,t.jsxs)(`div`,{className:`ik-modal-header`,children:[(0,t.jsxs)(`div`,{className:`ik-modal-titles`,children:[a&&(0,t.jsx)(`div`,{id:_,className:`ik-modal-title`,children:a}),s&&(0,t.jsx)(`div`,{id:v,className:`ik-modal-desc`,children:s})]}),p&&(0,t.jsx)(`button`,{type:`button`,className:`ik-modal-close`,onClick:i,"aria-label":m,children:(0,t.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,t.jsx)(`line`,{x1:`4`,y1:`4`,x2:`12`,y2:`12`}),(0,t.jsx)(`line`,{x1:`12`,y1:`4`,x2:`4`,y2:`12`})]})})]}),c!=null&&(0,t.jsx)(`div`,{className:`ik-modal-body`,children:c}),l&&(0,t.jsx)(`div`,{className:`ik-modal-footer`,children:l})]})}),document.body)}var N={Enter:`Enter`,Space:` `,Escape:`Escape`,Tab:`Tab`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`};function P(e){return{tab:t=>`${e}-tab-${t}`,panel:t=>`${e}-panel-${t}`}}function F(e){return e.find(e=>!e.disabled)?.value}function I(e,t,n,r=`horizontal`){let i=e.filter(e=>!e.disabled);if(i.length===0)return;let a=r===`horizontal`?N.ArrowRight:N.ArrowDown,o=r===`horizontal`?N.ArrowLeft:N.ArrowUp,s=i.findIndex(e=>e.value===t),c=s===-1?0:s;switch(n){case a:return i[(c+1)%i.length].value;case o:return i[(c-1+i.length)%i.length].value;case N.Home:return i[0].value;case N.End:return i[i.length-1].value;default:return}}function L({items:n,value:r,defaultValue:i,onValueChange:a,className:s,"aria-label":c}){let l=P((0,e.useId)()),u=r!=null,[d,f]=(0,e.useState)(i??F(n)),p=u?r:d,m=(0,e.useRef)({}),h=e=>{u||f(e),a?.(e)},g=(e,t)=>{let r=I(n,n[t].value,e.key);r&&(e.preventDefault(),h(r),m.current[r]?.focus())};return(0,t.jsxs)(`div`,{className:o(`ik-tabs`,s),children:[(0,t.jsx)(`div`,{className:`ik-tabs-list`,role:`tablist`,"aria-label":c,children:n.map((e,n)=>{let r=e.value===p;return(0,t.jsx)(`button`,{ref:t=>{m.current[e.value]=t},type:`button`,role:`tab`,id:l.tab(e.value),"aria-selected":r,"aria-controls":l.panel(e.value),tabIndex:r?0:-1,disabled:e.disabled,className:`ik-tabs-tab`,onClick:()=>h(e.value),onKeyDown:e=>g(e,n),children:e.label},e.value)})}),n.map(e=>(0,t.jsx)(`div`,{role:`tabpanel`,id:l.panel(e.value),"aria-labelledby":l.tab(e.value),hidden:e.value!==p,tabIndex:0,className:`ik-tabs-panel`,children:e.value===p&&e.content},e.value))]})}var R=e=>e===`right`?`ik-table-align-right`:e===`center`?`ik-table-align-center`:void 0;function z({columns:e,data:n,getRowId:r,density:i=`regular`,stickyHeader:a=!1,loading:s=!1,loadingRows:c=5,empty:l,onRowClick:u,selectedRowId:d,caption:f,className:p}){let m=e.length,h=(e,t)=>r?.(e,t)??t;return(0,t.jsx)(`div`,{className:`ik-table-wrap`,children:(0,t.jsxs)(`table`,{className:o(`ik-table`,`ik-table-${i}`,a&&`ik-table-sticky`,p),children:[f&&(0,t.jsx)(`caption`,{children:f}),(0,t.jsx)(`thead`,{children:(0,t.jsx)(`tr`,{children:e.map(e=>(0,t.jsx)(`th`,{scope:`col`,className:R(e.align),style:{width:e.width},children:e.header},e.key))})}),(0,t.jsx)(`tbody`,{children:s?Array.from({length:c}).map((n,r)=>(0,t.jsx)(`tr`,{children:e.map(e=>(0,t.jsx)(`td`,{className:R(e.align),children:(0,t.jsx)(w,{variant:`text`})},e.key))},`sk-${r}`)):n.length===0?(0,t.jsx)(`tr`,{children:(0,t.jsx)(`td`,{className:`ik-table-state`,colSpan:m,children:l})}):n.map((n,r)=>{let i=h(n,r);return(0,t.jsx)(`tr`,{className:o(u&&`ik-table-row-clickable`,d!=null&&d===i&&`ik-table-row-selected`),"aria-selected":d==null?void 0:d===i,onClick:u?()=>u(n,r):void 0,children:e.map(e=>(0,t.jsx)(`td`,{className:R(e.align),children:e.render?e.render(n,r):n[e.key]??null},e.key))},i)})})]})})}var B=(0,e.createContext)(null),V=0;function H({children:r}){let[i,a]=(0,e.useState)([]),o=(0,e.useRef)({}),s=(0,e.useCallback)(e=>{a(t=>t.filter(t=>t.id!==e));let t=o.current[e];t&&(clearTimeout(t),delete o.current[e])},[]),c=(0,e.useCallback)(e=>{let t=`ik-toast-${++V}`,n=e.duration??5e3;return a(n=>[...n,{...e,id:t}]),n>0&&(o.current[t]=setTimeout(()=>s(t),n)),t},[s]);(0,e.useEffect)(()=>{let e=o.current;return()=>{Object.values(e).forEach(clearTimeout)}},[]);let l=(0,e.useMemo)(()=>({toast:c,dismiss:s}),[c,s]);return(0,t.jsxs)(B.Provider,{value:l,children:[r,typeof document<`u`&&(0,n.createPortal)((0,t.jsx)(`div`,{className:`ik-toast-viewport`,role:`region`,"aria-label":`Уведомления`,children:i.map(e=>(0,t.jsx)(W,{toast:e,onClose:()=>s(e.id)},e.id))}),document.body)]})}function U(){let t=(0,e.useContext)(B);if(!t)throw Error(`useToast must be used within a <ToastProvider>`);return t}function W({toast:e,onClose:n}){let{title:r,description:i,variant:a=`info`,action:s,closeLabel:c=`Закрыть`}=e,l=a===`error`||a===`warning`?`alert`:`status`;return(0,t.jsxs)(`div`,{className:o(`ik-toast`,`ik-toast-${a}`),role:l,children:[(0,t.jsxs)(`div`,{className:`ik-toast-body`,children:[r&&(0,t.jsx)(`div`,{className:`ik-toast-title`,children:r}),i&&(0,t.jsx)(`div`,{className:`ik-toast-desc`,children:i}),s&&(0,t.jsx)(`div`,{className:`ik-toast-action`,children:s})]}),(0,t.jsx)(`button`,{type:`button`,className:`ik-toast-close`,onClick:n,"aria-label":c,children:(0,t.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,t.jsx)(`line`,{x1:`4`,y1:`4`,x2:`12`,y2:`12`}),(0,t.jsx)(`line`,{x1:`12`,y1:`4`,x2:`4`,y2:`12`})]})})]})}var G={fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,height:16,"aria-hidden":!0};function K({id:e}){let n=G;switch(e){case`overview`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`rect`,{x:`2`,y:`2`,width:`5`,height:`5`,rx:`1`}),(0,t.jsx)(`rect`,{x:`9`,y:`2`,width:`5`,height:`5`,rx:`1`}),(0,t.jsx)(`rect`,{x:`2`,y:`9`,width:`5`,height:`5`,rx:`1`}),(0,t.jsx)(`rect`,{x:`9`,y:`9`,width:`5`,height:`5`,rx:`1`})]});case`devices`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`rect`,{x:`1.5`,y:`3`,width:`13`,height:`4`,rx:`1`}),(0,t.jsx)(`rect`,{x:`1.5`,y:`9`,width:`13`,height:`4`,rx:`1`}),(0,t.jsx)(`circle`,{cx:`12.5`,cy:`5`,r:`.85`,fill:`currentColor`,stroke:`none`}),(0,t.jsx)(`circle`,{cx:`12.5`,cy:`11`,r:`.85`,fill:`currentColor`,stroke:`none`})]});case`topology`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`circle`,{cx:`8`,cy:`3`,r:`1.5`}),(0,t.jsx)(`circle`,{cx:`2.5`,cy:`12.5`,r:`1.5`}),(0,t.jsx)(`circle`,{cx:`13.5`,cy:`12.5`,r:`1.5`}),(0,t.jsx)(`line`,{x1:`8`,y1:`4.5`,x2:`3.3`,y2:`11.2`}),(0,t.jsx)(`line`,{x1:`8`,y1:`4.5`,x2:`12.7`,y2:`11.2`}),(0,t.jsx)(`line`,{x1:`4`,y1:`12.5`,x2:`12`,y2:`12.5`})]});case`alerts`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`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`}),(0,t.jsx)(`path`,{d:`M6.5 9.5a1.5 1.5 0 0 0 3 0`})]});case`apikeys`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`circle`,{cx:`5.5`,cy:`8`,r:`3`}),(0,t.jsx)(`path`,{d:`M8.5 8h5.5m-2.5-1.5v3`})]});case`log`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`line`,{x1:`3`,y1:`4.5`,x2:`13`,y2:`4.5`}),(0,t.jsx)(`line`,{x1:`3`,y1:`8`,x2:`13`,y2:`8`}),(0,t.jsx)(`line`,{x1:`3`,y1:`11.5`,x2:`9`,y2:`11.5`})]});case`settings`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`line`,{x1:`3`,y1:`4`,x2:`13`,y2:`4`}),(0,t.jsx)(`line`,{x1:`3`,y1:`8`,x2:`13`,y2:`8`}),(0,t.jsx)(`line`,{x1:`3`,y1:`12`,x2:`13`,y2:`12`}),(0,t.jsx)(`circle`,{cx:`6`,cy:`4`,r:`1.5`,fill:`currentColor`}),(0,t.jsx)(`circle`,{cx:`10`,cy:`8`,r:`1.5`,fill:`currentColor`}),(0,t.jsx)(`circle`,{cx:`7`,cy:`12`,r:`1.5`,fill:`currentColor`})]});case`users`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.5`}),(0,t.jsx)(`path`,{d:`M1 14c0-3 2.5-4.5 5-4.5s5 1.5 5 4.5`}),(0,t.jsx)(`path`,{d:`M11 4.5a2 2 0 0 1 0 3.5`}),(0,t.jsx)(`path`,{d:`M13.5 14c0-2-1.2-3.5-2.5-4`})]});case`audit`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`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`}),(0,t.jsx)(`polyline`,{points:`5.5,8 7,9.5 10.5,6`})]});case`system`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`rect`,{x:`1.5`,y:`2.5`,width:`13`,height:`11`,rx:`1.5`}),(0,t.jsx)(`polyline`,{points:`4.5,6.5 7,9 4.5,11.5`}),(0,t.jsx)(`line`,{x1:`8.5`,y1:`11.5`,x2:`11.5`,y2:`11.5`})]});case`logout`:return(0,t.jsxs)(`svg`,{...n,children:[(0,t.jsx)(`path`,{d:`M6 3H3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h3`}),(0,t.jsx)(`polyline`,{points:`10,5.5 13.5,8 10,10.5`}),(0,t.jsx)(`line`,{x1:`6`,y1:`8`,x2:`13.5`,y2:`8`})]});default:return(0,t.jsx)(`svg`,{...n,children:(0,t.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5`})})}}function q(){return(0,t.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,width:`20`,height:`20`,children:(0,t.jsx)(`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`})})}var J=[{id:`monitoring`,lbl:`Мониторинг`,items:[{id:`overview`,lbl:`Обзор`,ico:`overview`},{id:`devices`,lbl:`Устройства`,ico:`devices`},{id:`topology`,lbl:`Топология`,ico:`topology`}]},{id:`management`,lbl:`Управление`,items:[{id:`alerts`,lbl:`Оповещения`,ico:`alerts`},{id:`apikeys`,lbl:`API-ключи`,ico:`apikeys`},{id:`log`,lbl:`Журнал`,ico:`log`}]}],Y=[...J,{id:`admin`,lbl:`Администрирование`,items:[{id:`users`,lbl:`Пользователи`,ico:`users`},{id:`audit`,lbl:`Аудит`,ico:`audit`},{id:`system`,lbl:`Система`,ico:`system`}]}],X=[{id:`settings`,lbl:`Настройки`,ico:`settings`},{id:`logout`,lbl:`Выход`,ico:`logout`}];function Z({item:e,active:n,badge:r,onHover:i,onLeave:a,onClick:s}){return(0,t.jsxs)(`button`,{className:o(`isb-item`,n&&`isb-on`),title:e.lbl,onMouseEnter:i?t=>i(t,e.lbl):void 0,onMouseLeave:a,onClick:s,type:`button`,"aria-current":n?`page`:void 0,children:[(0,t.jsx)(`span`,{className:`isb-ico`,children:(0,t.jsx)(K,{id:e.ico})}),(0,t.jsx)(`span`,{className:`isb-lbl`,children:e.lbl}),r!=null&&r>0&&(0,t.jsx)(`span`,{className:`isb-bdg`,"aria-label":`${e.lbl}: ${r} уведомлений`,children:r})]})}function Q({collapsed:n=!1,onToggle:r,activeItem:i=`overview`,onNavigate:a,variant:s=`operator`,theme:c=``,badges:l={},className:u=``}){let[d,f]=(0,e.useState)(null),[p,m]=(0,e.useState)(!1),[h,g]=(0,e.useState)(n),_=(0,e.useRef)(null);n!==h&&(g(n),m(!1),f(null)),(0,e.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>m(!0),210);return()=>clearTimeout(e)},[n]);let v=(0,e.useCallback)((e,t)=>{if(!p||!_.current)return;let n=e.currentTarget.getBoundingClientRect(),r=_.current.getBoundingClientRect();f({lbl:t,top:n.top-r.top+n.height/2})},[p]),y=(0,e.useCallback)(()=>f(null),[]),b=s===`admin`?Y:J,x=n?{onHover:v,onLeave:y}:{};return(0,t.jsxs)(`aside`,{className:o(`iskra-sb`,n&&`isb-c`,n&&p&&`isb-tip-rdy`,c,u),ref:_,role:`navigation`,"aria-label":`Навигация платформы`,children:[(0,t.jsxs)(`div`,{className:`isb-logo`,children:[(0,t.jsx)(`span`,{className:`isb-spark`,children:(0,t.jsx)(q,{})}),(0,t.jsx)(`span`,{className:`isb-wmark`,children:`ИСКРА.DCI`}),(0,t.jsx)(`button`,{className:`isb-collapser`,type:`button`,onClick:r,"aria-expanded":!n,"aria-label":n?`Развернуть боковую панель`:`Свернуть боковую панель`,children:(0,t.jsx)(`svg`,{viewBox:`0 0 10 10`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,t.jsx)(`polyline`,{points:`7,2 4,5 7,8`})})})]}),(0,t.jsx)(`div`,{className:`isb-scroll`,children:b.map(({id:e,lbl:n,items:r})=>(0,t.jsxs)(`div`,{className:`isb-grp`,children:[(0,t.jsx)(`div`,{className:`isb-sec`,"aria-hidden":`true`,children:n}),r.map(e=>(0,t.jsx)(Z,{item:e,active:i===e.id,badge:l[e.id],onClick:()=>a?.(e.id),...x},e.id))]},e))}),(0,t.jsx)(`div`,{className:`isb-foot`,children:X.map(e=>(0,t.jsx)(Z,{item:e,active:i===e.id,badge:l[e.id],onClick:()=>a?.(e.id),...x},e.id))}),d&&(0,t.jsx)(`div`,{className:`isb-floatip`,style:{top:d.top},children:d.lbl})]})}exports.Alert=O,exports.Avatar=v,exports.Badge=h,exports.Button=s,exports.Card=y,exports.Checkbox=d,exports.EmptyState=k,exports.FormField=E,exports.ICON_NAMES=i,exports.Icon=a,exports.IconButton=c,exports.Modal=M,exports.Radio=f,exports.RadioGroup=p,exports.Sidebar=Q,exports.Skeleton=w,exports.Spinner=T,exports.Switch=m,exports.Table=z,exports.Tabs=L,exports.Tag=g,exports.TextField=l,exports.Textarea=u,exports.ToastProvider=H,exports.cx=o,exports.useToast=U;
2
+ //# sourceMappingURL=index.cjs.map