@max-ts/kit 1.5.3 → 1.7.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 (55) hide show
  1. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  2. package/lib/components/Checkbox/checkbox.css.d.ts +2 -1
  3. package/lib/components/Checkbox/checkbox.css.d.ts.map +1 -1
  4. package/lib/components/ContentState/ContentState.d.ts +3 -34
  5. package/lib/components/ContentState/ContentState.d.ts.map +1 -1
  6. package/lib/components/ContentState/styles.css.d.ts +2 -1
  7. package/lib/components/ContentState/styles.css.d.ts.map +1 -1
  8. package/lib/components/ContentState/types.d.ts +14 -23
  9. package/lib/components/ContentState/types.d.ts.map +1 -1
  10. package/lib/components/DataGrid/Body/Body.d.ts +5 -2
  11. package/lib/components/DataGrid/Body/Body.d.ts.map +1 -1
  12. package/lib/components/DataGrid/DataGrid.d.ts +13 -6
  13. package/lib/components/DataGrid/DataGrid.d.ts.map +1 -1
  14. package/lib/components/DataGrid/Header/Header.d.ts +9 -2
  15. package/lib/components/DataGrid/Header/Header.d.ts.map +1 -1
  16. package/lib/components/DataGrid/Header/styles.css.d.ts +1 -0
  17. package/lib/components/DataGrid/Header/styles.css.d.ts.map +1 -1
  18. package/lib/components/DataGrid/HeaderCell/HeaderCell.d.ts +4 -2
  19. package/lib/components/DataGrid/HeaderCell/HeaderCell.d.ts.map +1 -1
  20. package/lib/components/DataGrid/Row/Row.d.ts +6 -3
  21. package/lib/components/DataGrid/Row/Row.d.ts.map +1 -1
  22. package/lib/components/DataGrid/Row/styles.css.d.ts +1 -0
  23. package/lib/components/DataGrid/Row/styles.css.d.ts.map +1 -1
  24. package/lib/components/DataGrid/State/State.d.ts +5 -5
  25. package/lib/components/DataGrid/State/State.d.ts.map +1 -1
  26. package/lib/components/DataGrid/State/styles.css.d.ts +2 -1
  27. package/lib/components/DataGrid/State/styles.css.d.ts.map +1 -1
  28. package/lib/components/DataGrid/types.d.ts +13 -5
  29. package/lib/components/DataGrid/types.d.ts.map +1 -1
  30. package/lib/components/DataGridSortHeader/DataGridSortHeader.d.ts +3 -2
  31. package/lib/components/DataGridSortHeader/DataGridSortHeader.d.ts.map +1 -1
  32. package/lib/components/DataGridSortHeader/types.d.ts +1 -4
  33. package/lib/components/DataGridSortHeader/types.d.ts.map +1 -1
  34. package/lib/components/DataList/DataList.d.ts +3 -3
  35. package/lib/components/DataList/DataList.d.ts.map +1 -1
  36. package/lib/components/Spinner/Spinner.d.ts +6 -0
  37. package/lib/components/Spinner/Spinner.d.ts.map +1 -0
  38. package/lib/components/Spinner/index.d.ts +2 -0
  39. package/lib/components/Spinner/index.d.ts.map +1 -0
  40. package/lib/components/Spinner/styles.css.d.ts +2 -0
  41. package/lib/components/Spinner/styles.css.d.ts.map +1 -0
  42. package/lib/components/index.d.ts +1 -0
  43. package/lib/components/index.d.ts.map +1 -1
  44. package/lib/index.mjs +492 -279
  45. package/lib/stories/Checkbox.stories.d.ts +3 -0
  46. package/lib/stories/Checkbox.stories.d.ts.map +1 -1
  47. package/lib/stories/ContentState.stories.d.ts +14 -0
  48. package/lib/stories/ContentState.stories.d.ts.map +1 -0
  49. package/lib/stories/DataGrid.stories.d.ts +1 -0
  50. package/lib/stories/DataGrid.stories.d.ts.map +1 -1
  51. package/lib/stories/DataList.stories.d.ts +1 -1
  52. package/lib/stories/Spinner.stories.d.ts +13 -0
  53. package/lib/stories/Spinner.stories.d.ts.map +1 -0
  54. package/lib/styles.css +235 -180
  55. package/package.json +1 -1
package/lib/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Accordion, Checkbox } from "@base-ui/react";
3
3
  import clsx_0, { clsx } from "clsx";
4
- import { ArrowDownNarrowWide, ArrowDownUp, ArrowDownWideNarrow, ArrowLeft, ArrowRight, Calendar1, Check, CheckIcon, ChevronDown, ChevronDownIcon, ChevronLeft, ChevronRight, ChevronRightIcon, ChevronUp, CircleCheck, CircleIcon, Copy, Ellipsis as external_lucide_react_Ellipsis, EllipsisVertical, Info, MoreHorizontalIcon, OctagonAlert, PanelLeftIcon, TriangleAlert, XIcon } from "lucide-react";
4
+ import { ArrowDownNarrowWide, ArrowDownUp, ArrowDownWideNarrow, ArrowLeft, ArrowRight, Calendar1, Check, CheckIcon, ChevronDown, ChevronDownIcon, ChevronLeft, ChevronRight, ChevronRightIcon, ChevronUp, CircleCheck, CircleIcon, Copy, Ellipsis as external_lucide_react_Ellipsis, EllipsisVertical, Info, Loader, Minus, MoreHorizontalIcon, OctagonAlert, PanelLeftIcon, TriangleAlert, XIcon } from "lucide-react";
5
5
  import { AlertDialog } from "@base-ui/react/alert-dialog";
6
6
  import { Button } from "@base-ui/react/button";
7
- import react, { createContext, createElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
7
+ import react, { Component as external_react_Component, createContext, createElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
8
8
  import { Combobox } from "@base-ui/react/combobox";
9
9
  import { Avatar } from "@base-ui/react/avatar";
10
10
  import { mergeProps } from "@base-ui/react/merge-props";
@@ -1610,18 +1610,24 @@ Carousel.Content = Content_Content;
1610
1610
  Carousel.Item = Item_Item;
1611
1611
  Carousel.Arrows = Arrows;
1612
1612
  Carousel.Dots = Dots;
1613
- var checkbox_css_icon = 'style__b7yo4k2';
1613
+ var checkIcon = 'style__b7yo4k2';
1614
1614
  var indicator = 'style__b7yo4k1';
1615
+ var minusIcon = 'style__b7yo4k3';
1615
1616
  var checkbox_css_root = 'style__b7yo4k0';
1616
1617
  const Checkbox_Checkbox = ({ className, ...props })=>/*#__PURE__*/ jsx(Checkbox.Root, {
1617
1618
  "data-slot": "checkbox",
1618
1619
  className: clsx(checkbox_css_root, className),
1619
1620
  ...props,
1620
- children: /*#__PURE__*/ jsx(Checkbox.Indicator, {
1621
+ children: /*#__PURE__*/ jsxs(Checkbox.Indicator, {
1621
1622
  className: indicator,
1622
- children: /*#__PURE__*/ jsx(Check, {
1623
- className: checkbox_css_icon
1624
- })
1623
+ children: [
1624
+ /*#__PURE__*/ jsx(Check, {
1625
+ className: checkIcon
1626
+ }),
1627
+ /*#__PURE__*/ jsx(Minus, {
1628
+ className: minusIcon
1629
+ })
1630
+ ]
1625
1631
  })
1626
1632
  });
1627
1633
  function Collapsible_Collapsible({ ...props }) {
@@ -1752,124 +1758,153 @@ const ConfirmAction = (props)=>{
1752
1758
  ]
1753
1759
  });
1754
1760
  };
1755
- var sizes = {
1756
- small: 'small__1o97kvm1',
1757
- medium: 'medium__1o97kvm2',
1758
- large: 'large__1o97kvm3'
1761
+ var Empty_styles_css_content = 'style__e4li7y7';
1762
+ var Empty_styles_css_description = 'style__e4li7y6';
1763
+ var Empty_styles_css_header = 'style__e4li7y1';
1764
+ var styles_css_media = 'style__e4li7y2';
1765
+ var mediaVariants = {
1766
+ default: 'default__e4li7y3',
1767
+ icon: 'icon__e4li7y4'
1759
1768
  };
1760
- var styles_css_wrapper = 'style__1o97kvm0';
1761
- const Image_Image = (props)=>/*#__PURE__*/ jsx("img", {
1762
- alt: props.alt,
1763
- src: props.src,
1764
- className: clsx_0(styles_css_wrapper, sizes[props.size || 'medium'], props.className),
1765
- width: props.width,
1766
- height: props.height
1769
+ var Empty_styles_css_root = 'style__e4li7y0';
1770
+ var Empty_styles_css_title = 'style__e4li7y5';
1771
+ function Empty_Empty({ className, ...props }) {
1772
+ return /*#__PURE__*/ jsx("div", {
1773
+ "data-slot": "empty",
1774
+ className: clsx(Empty_styles_css_root, className),
1775
+ ...props
1767
1776
  });
1768
- const SIZE = {
1769
- small: 'small',
1770
- medium: 'medium',
1771
- large: 'large'
1772
- };
1773
- const IMAGE_WIDTH = {
1774
- [SIZE.small]: '239px',
1775
- [SIZE.medium]: '323px',
1776
- [SIZE.large]: '458px'
1777
- };
1778
- const IMAGE_HEIGHT = {
1779
- [SIZE.small]: '119px',
1780
- [SIZE.medium]: '161px',
1781
- [SIZE.large]: '229px'
1782
- };
1783
- const MAX_INNER_WIDTH = {
1784
- [SIZE.small]: '384px',
1785
- [SIZE.medium]: '400px',
1786
- [SIZE.large]: '460px'
1787
- };
1788
- const TITLE_HEADER_LEVEL = {
1789
- [SIZE.small]: 'subtitle1',
1790
- [SIZE.medium]: 'h6',
1791
- [SIZE.large]: 'h5'
1792
- };
1793
- var descriptionClass = 'style__1nenzg05';
1794
- var footerClass = 'style__1nenzg06';
1795
- var innerContainer = 'style__1nenzg04';
1796
- var styles_css_sizes = {
1797
- small: 'small__1nenzg01',
1798
- medium: 'medium__1nenzg02',
1799
- large: 'large__1nenzg03'
1800
- };
1801
- var Placeholder_styles_css_wrapper = 'style__1nenzg00';
1802
- const Placeholder = ({ className, title, imgSrc, imgAlt, description, actions, size = 'small', renderImage })=>{
1803
- const RenderImage = useMemo(()=>renderImage || Image_Image, [
1804
- renderImage
1805
- ]);
1806
- return /*#__PURE__*/ jsxs("div", {
1807
- className: clsx_0(Placeholder_styles_css_wrapper, styles_css_sizes[size], className),
1808
- children: [
1809
- /*#__PURE__*/ jsxs("div", {
1810
- className: innerContainer,
1811
- style: {
1812
- maxWidth: MAX_INNER_WIDTH[size]
1813
- },
1814
- children: [
1815
- imgSrc && /*#__PURE__*/ jsx(RenderImage, {
1816
- src: imgSrc,
1817
- alt: imgAlt,
1818
- width: IMAGE_WIDTH[size],
1819
- height: IMAGE_HEIGHT[size],
1820
- size: size
1821
- }),
1822
- /*#__PURE__*/ jsx(Typography, {
1823
- align: "center",
1824
- color: "secondary",
1825
- variant: TITLE_HEADER_LEVEL[size],
1826
- children: title
1827
- }),
1828
- description && /*#__PURE__*/ jsx(Typography, {
1829
- className: descriptionClass,
1830
- component: "div",
1831
- variant: "body1",
1832
- children: description
1833
- })
1834
- ]
1835
- }),
1836
- actions && /*#__PURE__*/ jsx("footer", {
1837
- className: footerClass,
1838
- children: actions
1839
- })
1840
- ]
1777
+ }
1778
+ function Empty_Header({ className, ...props }) {
1779
+ return /*#__PURE__*/ jsx("div", {
1780
+ "data-slot": "empty-header",
1781
+ className: clsx(Empty_styles_css_header, className),
1782
+ ...props
1841
1783
  });
1784
+ }
1785
+ function Empty_Media({ className, variant = 'default', ...props }) {
1786
+ return /*#__PURE__*/ jsx("div", {
1787
+ "data-slot": "empty-media",
1788
+ "data-variant": variant,
1789
+ className: clsx(styles_css_media, mediaVariants[variant], className),
1790
+ ...props
1791
+ });
1792
+ }
1793
+ function Empty_Title({ className, ...props }) {
1794
+ return /*#__PURE__*/ jsx("div", {
1795
+ "data-slot": "empty-title",
1796
+ className: clsx(Empty_styles_css_title, className),
1797
+ ...props
1798
+ });
1799
+ }
1800
+ function Empty_Description({ className, ...props }) {
1801
+ return /*#__PURE__*/ jsx("div", {
1802
+ "data-slot": "empty-description",
1803
+ className: clsx(Empty_styles_css_description, className),
1804
+ ...props
1805
+ });
1806
+ }
1807
+ function Empty_Content({ className, ...props }) {
1808
+ return /*#__PURE__*/ jsx("div", {
1809
+ "data-slot": "empty-content",
1810
+ className: clsx(Empty_styles_css_content, className),
1811
+ ...props
1812
+ });
1813
+ }
1814
+ Empty_Empty.Header = Empty_Header;
1815
+ Empty_Empty.Media = Empty_Media;
1816
+ Empty_Empty.Title = Empty_Title;
1817
+ Empty_Empty.Description = Empty_Description;
1818
+ Empty_Empty.Content = Empty_Content;
1819
+ var Spinner_styles_css_root = 'style__1dbefg91';
1820
+ function Spinner({ className, role = 'status', 'aria-label': ariaLabel = 'Loading', ...props }) {
1821
+ return /*#__PURE__*/ jsx(Loader, {
1822
+ role: role,
1823
+ "aria-label": ariaLabel,
1824
+ className: clsx(Spinner_styles_css_root, className),
1825
+ ...props
1826
+ });
1827
+ }
1828
+ var errorImage = 'style__nan0ao1';
1829
+ var styles_css_state = 'style__nan0ao0';
1830
+ const DEFAULT_ERROR_STATE = {
1831
+ title: 'Произошла ошибка',
1832
+ message: 'Не удалось загрузить данные.'
1842
1833
  };
1843
- var loadingContainer = 'style__nan0ao0';
1844
- const ContentState = ({ isLoading, isError, isCustom, errorState, customState, children, loadingContent: LoadingContent = /*#__PURE__*/ jsx(CircularProgress, {
1845
- color: "primary"
1846
- }) })=>{
1847
- if (isLoading) return /*#__PURE__*/ jsx("div", {
1848
- className: loadingContainer,
1849
- children: LoadingContent
1850
- });
1851
- if (isCustom && customState) return /*#__PURE__*/ jsx(Placeholder, {
1852
- ...customState
1853
- });
1854
- if (isError && errorState) {
1855
- const { title = 'Произошла ошибка', imgAlt, imgSrc, errorList, onRetry, actions = /*#__PURE__*/ jsx(Button_Button, {
1856
- onClick: onRetry,
1857
- children: "Попробовать снова"
1858
- }) } = errorState;
1859
- const description = errorList.map((errorMessage)=>/*#__PURE__*/ jsx(Typography, {
1860
- component: "p",
1861
- children: errorMessage
1862
- }, errorMessage));
1863
- return /*#__PURE__*/ jsx(Placeholder, {
1864
- title: title,
1865
- description: description,
1866
- imgAlt: imgAlt,
1867
- imgSrc: imgSrc,
1868
- actions: actions
1834
+ class ErrorBoundary extends external_react_Component {
1835
+ state = {
1836
+ hasError: false
1837
+ };
1838
+ static getDerivedStateFromError() {
1839
+ return {
1840
+ hasError: true
1841
+ };
1842
+ }
1843
+ reset = ()=>{
1844
+ this.setState({
1845
+ hasError: false
1869
1846
  });
1847
+ };
1848
+ render() {
1849
+ if (this.state.hasError) return this.props.fallback(this.reset);
1850
+ return this.props.children;
1870
1851
  }
1871
- return children;
1872
- };
1852
+ }
1853
+ function ErrorView({ errorState, onReset }) {
1854
+ const { title = DEFAULT_ERROR_STATE.title, message, imgSrc, onRetry } = errorState ?? DEFAULT_ERROR_STATE;
1855
+ const handleRetry = ()=>{
1856
+ onReset?.();
1857
+ onRetry?.();
1858
+ };
1859
+ return /*#__PURE__*/ jsx("div", {
1860
+ "data-slot": "content-state-error",
1861
+ className: styles_css_state,
1862
+ children: /*#__PURE__*/ jsxs(Empty_Empty, {
1863
+ children: [
1864
+ /*#__PURE__*/ jsxs(Empty_Empty.Header, {
1865
+ children: [
1866
+ imgSrc && /*#__PURE__*/ jsx(Empty_Empty.Media, {
1867
+ children: /*#__PURE__*/ jsx("img", {
1868
+ className: errorImage,
1869
+ src: imgSrc,
1870
+ alt: ""
1871
+ })
1872
+ }),
1873
+ /*#__PURE__*/ jsx(Empty_Empty.Title, {
1874
+ children: title
1875
+ }),
1876
+ /*#__PURE__*/ jsx(Empty_Empty.Description, {
1877
+ children: message
1878
+ })
1879
+ ]
1880
+ }),
1881
+ onRetry && /*#__PURE__*/ jsx(Empty_Empty.Content, {
1882
+ children: /*#__PURE__*/ jsx(Button_Button, {
1883
+ onClick: handleRetry,
1884
+ children: "Попробовать снова"
1885
+ })
1886
+ })
1887
+ ]
1888
+ })
1889
+ });
1890
+ }
1891
+ function ContentState({ isLoading, isError, errorState, children }) {
1892
+ if (isLoading) return /*#__PURE__*/ jsx("div", {
1893
+ "data-slot": "content-state-loading",
1894
+ className: styles_css_state,
1895
+ children: /*#__PURE__*/ jsx(Spinner, {})
1896
+ });
1897
+ if (isError) return /*#__PURE__*/ jsx(ErrorView, {
1898
+ errorState: errorState
1899
+ });
1900
+ return /*#__PURE__*/ jsx(ErrorBoundary, {
1901
+ fallback: (reset)=>/*#__PURE__*/ jsx(ErrorView, {
1902
+ errorState: errorState,
1903
+ onReset: reset
1904
+ }),
1905
+ children: children
1906
+ });
1907
+ }
1873
1908
  var arrowClass = 'style__izacrl5';
1874
1909
  var contentClass = 'style__izacrl3';
1875
1910
  var positionerClass = 'style__izacrl2';
@@ -1912,7 +1947,7 @@ const Tooltip_Tooltip = ({ text, content, children, side = 'top', sideOffset = 1
1912
1947
  })
1913
1948
  });
1914
1949
  var copyIconClass = 'style__1wpx85c1';
1915
- var CopyTypography_styles_css_wrapper = 'style__1wpx85c0';
1950
+ var styles_css_wrapper = 'style__1wpx85c0';
1916
1951
  const useLogic_useLogic_useLogic = ({ children, copyText, isShowCopyText, copyPosition })=>{
1917
1952
  const [status, setStatus] = useState("Скопировать");
1918
1953
  const [tooltipOpen, setTooltipOpen] = useState(false);
@@ -1957,7 +1992,7 @@ const CopyTypography = (props)=>{
1957
1992
  onClick: handleClick,
1958
1993
  component: "div",
1959
1994
  color: color,
1960
- className: clsx(CopyTypography_styles_css_wrapper, className),
1995
+ className: clsx(styles_css_wrapper, className),
1961
1996
  ...restProps,
1962
1997
  children: [
1963
1998
  isIconOnLeft && renderIcon(),
@@ -1991,7 +2026,7 @@ const Main = ({ children, className })=>/*#__PURE__*/ jsx("main", {
1991
2026
  children: children
1992
2027
  });
1993
2028
  var styles_css_contentClass = 'SidebarContent__1low90p6';
1994
- var styles_css_footerClass = 'SidebarFooter__1low90p5';
2029
+ var footerClass = 'SidebarFooter__1low90p5';
1995
2030
  var headerClass = 'SidebarHeader__1low90p4';
1996
2031
  var Sidebar_styles_css_rootClass = 'SidebarContainer__1low90p2';
1997
2032
  var triggerClass = 'SidebarTrigger__1low90p1';
@@ -2025,7 +2060,7 @@ const Sidebar = ({ width = "16rem", header, footer, content, className })=>{
2025
2060
  children: content
2026
2061
  }),
2027
2062
  footer && /*#__PURE__*/ jsx("footer", {
2028
- className: styles_css_footerClass,
2063
+ className: footerClass,
2029
2064
  children: footer
2030
2065
  })
2031
2066
  ]
@@ -2074,82 +2109,109 @@ function Cell({ row, column, rowIndex, height }) {
2074
2109
  }
2075
2110
  var rowClass = 'style__gsm9mv0';
2076
2111
  var selectableClass = 'style__gsm9mv1';
2077
- function Row({ row, rowHeight, onRowClick, columns, rowIndex, rowId }) {
2112
+ var selectionCellClass = 'style__gsm9mv2';
2113
+ function Row({ row, rowHeight, onRowClick, columns, rowIndex, rowId, isSelectionEnabled, isSelected, onSelectionChange }) {
2078
2114
  const handleSelect = useCallback(()=>{
2079
2115
  onRowClick?.(row);
2080
2116
  }, [
2081
2117
  onRowClick,
2082
2118
  row
2083
2119
  ]);
2084
- return /*#__PURE__*/ jsx("tr", {
2120
+ return /*#__PURE__*/ jsxs("tr", {
2085
2121
  onClick: handleSelect,
2086
2122
  onKeyDown: handleSelect,
2087
2123
  className: clsx(rowClass, {
2088
2124
  [selectableClass]: Boolean(onRowClick)
2089
2125
  }),
2090
- children: columns.map((column, index)=>{
2091
- const cellId = `${rowId}-${index}`;
2092
- return /*#__PURE__*/ jsx(Cell, {
2093
- row: row,
2094
- rowIndex: rowIndex,
2095
- column: column,
2096
- height: rowHeight
2097
- }, cellId);
2098
- })
2126
+ children: [
2127
+ isSelectionEnabled && /*#__PURE__*/ jsx("td", {
2128
+ className: selectionCellClass,
2129
+ style: {
2130
+ height: rowHeight,
2131
+ width: rowHeight
2132
+ },
2133
+ children: /*#__PURE__*/ jsx(Checkbox_Checkbox, {
2134
+ checked: isSelected,
2135
+ "aria-label": "Select row",
2136
+ onClick: (event)=>event.stopPropagation(),
2137
+ onKeyDown: (event)=>event.stopPropagation(),
2138
+ onCheckedChange: (checked)=>onSelectionChange?.(rowId, checked)
2139
+ })
2140
+ }),
2141
+ columns.map((column, index)=>{
2142
+ const cellId = `${rowId}-${index}`;
2143
+ return /*#__PURE__*/ jsx(Cell, {
2144
+ row: row,
2145
+ rowIndex: rowIndex,
2146
+ column: column,
2147
+ height: rowHeight
2148
+ }, cellId);
2149
+ })
2150
+ ]
2099
2151
  });
2100
2152
  }
2153
+ var cell = 'style__15m2ib82';
2101
2154
  var styles_css_container = 'style__15m2ib80';
2102
- var loader = 'style__15m2ib81';
2155
+ var stateImage = 'style__15m2ib81';
2103
2156
  function State({ isLoading, isEmpty, columnsLength, emptyState = {
2104
2157
  text: 'Нет данных'
2105
2158
  }, errorState = {
2106
- text: 'Произошла ошибка'
2107
- }, isError, onRetry }) {
2159
+ message: 'Произошла ошибка'
2160
+ }, isError }) {
2108
2161
  const Container = ({ children })=>/*#__PURE__*/ jsx("tr", {
2109
2162
  className: styles_css_container,
2110
2163
  children: /*#__PURE__*/ jsx("td", {
2164
+ className: cell,
2111
2165
  colSpan: columnsLength,
2112
- align: "center",
2113
2166
  children: children
2114
2167
  })
2115
2168
  });
2116
2169
  if (isLoading) return /*#__PURE__*/ jsx(Container, {
2117
- children: /*#__PURE__*/ jsx("span", {
2118
- className: loader,
2119
- children: /*#__PURE__*/ jsx(CircularProgress, {})
2170
+ children: /*#__PURE__*/ jsx(ContentState, {
2171
+ isLoading: true,
2172
+ children: null
2120
2173
  })
2121
2174
  });
2122
2175
  if (isEmpty) {
2123
- const { imgSrc, imgAlt, text } = emptyState;
2176
+ const { imgSrc, imgAlt, text, actions } = emptyState;
2124
2177
  return /*#__PURE__*/ jsx(Container, {
2125
- children: /*#__PURE__*/ jsx(Placeholder, {
2126
- title: text,
2127
- imgSrc: imgSrc,
2128
- imgAlt: imgAlt
2129
- })
2130
- });
2131
- }
2132
- if (isError) {
2133
- const { imgSrc, imgAlt, text } = errorState;
2134
- return /*#__PURE__*/ jsx(Container, {
2135
- children: /*#__PURE__*/ jsx(Placeholder, {
2136
- title: text,
2137
- imgSrc: imgSrc,
2138
- imgAlt: imgAlt,
2139
- actions: onRetry ? /*#__PURE__*/ jsx(Button_Button, {
2140
- variant: "outline",
2141
- onClick: onRetry,
2142
- children: "Попробовать снова"
2143
- }) : void 0
2178
+ children: /*#__PURE__*/ jsxs(Empty_Empty, {
2179
+ children: [
2180
+ /*#__PURE__*/ jsxs(Empty_Empty.Header, {
2181
+ children: [
2182
+ imgSrc && /*#__PURE__*/ jsx(Empty_Empty.Media, {
2183
+ children: /*#__PURE__*/ jsx("img", {
2184
+ className: stateImage,
2185
+ src: imgSrc,
2186
+ alt: imgAlt ?? ''
2187
+ })
2188
+ }),
2189
+ /*#__PURE__*/ jsx(Empty_Empty.Title, {
2190
+ children: text
2191
+ })
2192
+ ]
2193
+ }),
2194
+ actions && /*#__PURE__*/ jsx(Empty_Empty.Content, {
2195
+ children: actions
2196
+ })
2197
+ ]
2144
2198
  })
2145
2199
  });
2146
2200
  }
2201
+ if (isError) return /*#__PURE__*/ jsx(Container, {
2202
+ children: /*#__PURE__*/ jsx(ContentState, {
2203
+ isError: true,
2204
+ errorState: errorState,
2205
+ children: null
2206
+ })
2207
+ });
2147
2208
  return null;
2148
2209
  }
2149
2210
  var Body_styles_css_container = 'style__82af400';
2150
- function Body({ isError, isLoading, emptyState, errorState, columns, rows, rowHeight, keyId, onRowClick }) {
2211
+ function Body({ isError, isLoading, emptyState, errorState, columns, rows, rowHeight, keyId, onRowClick, isRowSelectionEnabled, selectedRowIdSet, onRowSelectionChange }) {
2151
2212
  const isEmpty = 0 === rows.length;
2152
2213
  const isStateVisible = isError || isLoading || isEmpty;
2214
+ const columnsLength = columns.length + (isRowSelectionEnabled ? 1 : 0);
2153
2215
  return isStateVisible ? /*#__PURE__*/ jsx("tbody", {
2154
2216
  className: Body_styles_css_container,
2155
2217
  children: /*#__PURE__*/ jsx(State, {
@@ -2158,32 +2220,84 @@ function Body({ isError, isLoading, emptyState, errorState, columns, rows, rowHe
2158
2220
  isEmpty: isEmpty,
2159
2221
  isError: isError,
2160
2222
  isLoading: isLoading,
2161
- columnsLength: columns.length
2223
+ columnsLength: columnsLength
2162
2224
  })
2163
2225
  }) : /*#__PURE__*/ jsx("tbody", {
2164
2226
  className: Body_styles_css_container,
2165
2227
  children: rows.map((row, index)=>{
2166
- const rowId = String(row[keyId]);
2228
+ const rowId = getRowId(row[keyId]);
2167
2229
  return /*#__PURE__*/ jsx(Row, {
2168
2230
  row: row,
2169
2231
  rowId: rowId,
2170
2232
  rowHeight: rowHeight,
2171
2233
  columns: columns,
2172
2234
  onRowClick: onRowClick,
2173
- rowIndex: index
2174
- }, row[keyId]);
2235
+ rowIndex: index,
2236
+ isSelectionEnabled: isRowSelectionEnabled,
2237
+ isSelected: selectedRowIdSet.has(rowId),
2238
+ onSelectionChange: onRowSelectionChange
2239
+ }, rowId);
2175
2240
  })
2176
2241
  });
2177
2242
  }
2178
- var Footer_styles_css_footerClass = 'style__2s55b60';
2243
+ function getRowId(value) {
2244
+ if ('string' == typeof value || 'number' == typeof value) return value;
2245
+ return String(value);
2246
+ }
2247
+ var styles_css_footerClass = 'style__2s55b60';
2179
2248
  function Footer_Footer({ children, className }) {
2180
2249
  return /*#__PURE__*/ jsx("footer", {
2181
- className: clsx(Footer_styles_css_footerClass, className),
2250
+ className: clsx(styles_css_footerClass, className),
2182
2251
  children: children
2183
2252
  });
2184
2253
  }
2254
+ var styles_css_alignments = {
2255
+ left: 'left__o752f01',
2256
+ center: 'center__o752f02',
2257
+ right: 'right__o752f03',
2258
+ justify: 'justify__o752f04'
2259
+ };
2260
+ var DataGridSortHeader_styles_css_wrapper = 'style__o752f00';
2261
+ function DataGridSortHeader({ sorting, onSortingChange, setSorting, column: { label, field, align = 'left' }, className }) {
2262
+ if (!field) return null;
2263
+ const handleSortingChange = onSortingChange ?? setSorting;
2264
+ const activeOrder = sorting?.key === field ? sorting.order : void 0;
2265
+ const isActive = Boolean(activeOrder);
2266
+ const handleClick = ()=>{
2267
+ if (!handleSortingChange) return;
2268
+ if ('asc' === activeOrder) handleSortingChange({
2269
+ key: field,
2270
+ order: 'desc'
2271
+ });
2272
+ else isActive ? handleSortingChange(null) : handleSortingChange({
2273
+ key: field,
2274
+ order: 'asc'
2275
+ });
2276
+ };
2277
+ return /*#__PURE__*/ jsxs("button", {
2278
+ type: "button",
2279
+ className: clsx(DataGridSortHeader_styles_css_wrapper, styles_css_alignments[align], className),
2280
+ onClick: handleClick,
2281
+ disabled: !handleSortingChange,
2282
+ children: [
2283
+ label,
2284
+ isActive ? 'asc' === activeOrder ? /*#__PURE__*/ jsx(ArrowDownNarrowWide, {
2285
+ size: 16
2286
+ }) : /*#__PURE__*/ jsx(ArrowDownWideNarrow, {
2287
+ size: 16
2288
+ }) : /*#__PURE__*/ jsx(ArrowDownUp, {
2289
+ size: 16
2290
+ })
2291
+ ]
2292
+ });
2293
+ }
2185
2294
  var headerCellClass = 'style__uma6hu0';
2186
- function HeaderCell({ column, height, width }) {
2295
+ function HeaderCell({ column, height, width, sorting, onSortingChange }) {
2296
+ const content = column.renderHeaderCell?.(column) || (column.sortable ? /*#__PURE__*/ jsx(DataGridSortHeader, {
2297
+ column: column,
2298
+ sorting: sorting ?? null,
2299
+ onSortingChange: onSortingChange
2300
+ }) : column.label);
2187
2301
  return /*#__PURE__*/ jsx("th", {
2188
2302
  style: {
2189
2303
  color: column.color,
@@ -2193,19 +2307,39 @@ function HeaderCell({ column, height, width }) {
2193
2307
  align: column.align ?? 'left',
2194
2308
  title: column.label,
2195
2309
  className: headerCellClass,
2196
- children: column.renderHeaderCell?.(column) || column.label
2310
+ children: content
2197
2311
  });
2198
2312
  }
2199
2313
  var headerRow = 'style__fkgoub0';
2200
- function Header_Header({ columns, height }) {
2314
+ var selectionHeaderCell = 'style__fkgoub1';
2315
+ function Header_Header({ columns, height, sorting, onSortingChange, isSelectionEnabled, isAllRowsSelected, isSomeRowsSelected, isSelectionDisabled, onAllRowsSelectionChange }) {
2201
2316
  return /*#__PURE__*/ jsx("thead", {
2202
- children: /*#__PURE__*/ jsx("tr", {
2317
+ children: /*#__PURE__*/ jsxs("tr", {
2203
2318
  className: clsx(headerRow),
2204
- children: columns.map((col)=>/*#__PURE__*/ jsx(HeaderCell, {
2205
- column: col,
2206
- height: height,
2207
- width: col.width
2208
- }, col.label))
2319
+ children: [
2320
+ isSelectionEnabled && /*#__PURE__*/ jsx("th", {
2321
+ className: selectionHeaderCell,
2322
+ style: {
2323
+ height,
2324
+ width: height
2325
+ },
2326
+ "aria-label": "Select all rows",
2327
+ children: /*#__PURE__*/ jsx(Checkbox_Checkbox, {
2328
+ checked: isAllRowsSelected,
2329
+ indeterminate: !isAllRowsSelected && isSomeRowsSelected,
2330
+ disabled: isSelectionDisabled,
2331
+ "aria-label": "Select all rows",
2332
+ onCheckedChange: onAllRowsSelectionChange
2333
+ })
2334
+ }),
2335
+ columns.map((col)=>/*#__PURE__*/ jsx(HeaderCell, {
2336
+ column: col,
2337
+ height: height,
2338
+ width: col.width,
2339
+ sorting: sorting,
2340
+ onSortingChange: onSortingChange
2341
+ }, col.label))
2342
+ ]
2209
2343
  })
2210
2344
  });
2211
2345
  }
@@ -2215,7 +2349,68 @@ var fullHeight = 'style__1gqvluf2';
2215
2349
  var DataGrid_styles_css_loading = 'style__1gqvluf4';
2216
2350
  var table = 'style__1gqvluf1';
2217
2351
  var titleClass = 'style__1gqvluf5';
2218
- function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, headerHeight = 40, keyId, onRowClick, isLoading, isDisabled, isError, emptyState, errorState, footer, title, onRetry }) {
2352
+ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, headerHeight = 40, keyId, onRowClick, isLoading, isDisabled, isError, emptyState, errorState, sorting, onSortingChange, sortMode = 'client', isRowSelectionEnabled, selectedRowIds, defaultSelectedRowIds = [], onSelectedRowIdsChange, onSelectRow, footer, title }) {
2353
+ const [uncontrolledSelectedRowIds, setUncontrolledSelectedRowIds] = useState(defaultSelectedRowIds);
2354
+ const sortedRows = useMemo(()=>{
2355
+ if (!sorting || 'manual' === sortMode) return rows;
2356
+ const column = columns.find(({ field })=>field === sorting.key);
2357
+ const sortDirection = 'asc' === sorting.order ? 1 : -1;
2358
+ return rows.map((row, index)=>({
2359
+ row,
2360
+ index
2361
+ })).sort((a, b)=>{
2362
+ const result = column?.sortComparator?.(a.row, b.row) ?? compareValues(column?.sortAccessor ? column.sortAccessor(a.row) : a.row[sorting.key], column?.sortAccessor ? column.sortAccessor(b.row) : b.row[sorting.key]);
2363
+ return 0 === result ? a.index - b.index : result * sortDirection;
2364
+ }).map(({ row })=>row);
2365
+ }, [
2366
+ columns,
2367
+ rows,
2368
+ sortMode,
2369
+ sorting
2370
+ ]);
2371
+ const activeSelectedRowIds = selectedRowIds ?? uncontrolledSelectedRowIds;
2372
+ const selectedRowIdSet = useMemo(()=>new Set(activeSelectedRowIds), [
2373
+ activeSelectedRowIds
2374
+ ]);
2375
+ const visibleRowIds = useMemo(()=>sortedRows.map((row)=>DataGrid_getRowId(row[keyId])), [
2376
+ keyId,
2377
+ sortedRows
2378
+ ]);
2379
+ const isAllRowsSelected = visibleRowIds.length > 0 && visibleRowIds.every((rowId)=>selectedRowIdSet.has(rowId));
2380
+ const isSomeRowsSelected = visibleRowIds.some((rowId)=>selectedRowIdSet.has(rowId));
2381
+ const handleSelectedRowIdsChange = useCallback((nextSelectedRowIds)=>{
2382
+ if (!selectedRowIds) setUncontrolledSelectedRowIds(nextSelectedRowIds);
2383
+ onSelectedRowIdsChange?.(nextSelectedRowIds);
2384
+ if (onSelectRow) {
2385
+ const nextSelectedRowIdSet = new Set(nextSelectedRowIds);
2386
+ onSelectRow(rows.filter((row)=>nextSelectedRowIdSet.has(DataGrid_getRowId(row[keyId]))));
2387
+ }
2388
+ }, [
2389
+ keyId,
2390
+ onSelectRow,
2391
+ onSelectedRowIdsChange,
2392
+ rows,
2393
+ selectedRowIds
2394
+ ]);
2395
+ const handleRowSelectionChange = useCallback((rowId, isSelected)=>{
2396
+ const nextSelectedRowIdSet = new Set(activeSelectedRowIds);
2397
+ if (isSelected) nextSelectedRowIdSet.add(rowId);
2398
+ else nextSelectedRowIdSet.delete(rowId);
2399
+ handleSelectedRowIdsChange(Array.from(nextSelectedRowIdSet));
2400
+ }, [
2401
+ activeSelectedRowIds,
2402
+ handleSelectedRowIdsChange
2403
+ ]);
2404
+ const handleAllRowsSelectionChange = useCallback((isSelected)=>{
2405
+ const nextSelectedRowIdSet = new Set(activeSelectedRowIds);
2406
+ for (const rowId of visibleRowIds)if (isSelected) nextSelectedRowIdSet.add(rowId);
2407
+ else nextSelectedRowIdSet.delete(rowId);
2408
+ handleSelectedRowIdsChange(Array.from(nextSelectedRowIdSet));
2409
+ }, [
2410
+ activeSelectedRowIds,
2411
+ handleSelectedRowIdsChange,
2412
+ visibleRowIds
2413
+ ]);
2219
2414
  const isFullHeight = isLoading || isError || 0 === rows.length;
2220
2415
  return /*#__PURE__*/ jsxs("div", {
2221
2416
  "data-slot": "data-grid",
@@ -2237,10 +2432,17 @@ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, h
2237
2432
  }),
2238
2433
  /*#__PURE__*/ jsx(Header_Header, {
2239
2434
  columns: columns,
2240
- height: headerHeight
2435
+ height: headerHeight,
2436
+ sorting: sorting,
2437
+ onSortingChange: onSortingChange,
2438
+ isSelectionEnabled: isRowSelectionEnabled,
2439
+ isAllRowsSelected: isAllRowsSelected,
2440
+ isSomeRowsSelected: isSomeRowsSelected,
2441
+ isSelectionDisabled: 0 === visibleRowIds.length,
2442
+ onAllRowsSelectionChange: handleAllRowsSelectionChange
2241
2443
  }),
2242
2444
  /*#__PURE__*/ jsx(Body, {
2243
- rows: rows,
2445
+ rows: sortedRows,
2244
2446
  columns: columns,
2245
2447
  rowHeight: rowHeight,
2246
2448
  keyId: keyId,
@@ -2249,7 +2451,9 @@ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, h
2249
2451
  emptyState: emptyState,
2250
2452
  errorState: errorState,
2251
2453
  isError: isError,
2252
- onRetry: onRetry
2454
+ isRowSelectionEnabled: isRowSelectionEnabled,
2455
+ selectedRowIdSet: selectedRowIdSet,
2456
+ onRowSelectionChange: handleRowSelectionChange
2253
2457
  })
2254
2458
  ]
2255
2459
  }),
@@ -2259,6 +2463,21 @@ function DataGrid({ rows, columns, height = '100%', className, rowHeight = 40, h
2259
2463
  ]
2260
2464
  });
2261
2465
  }
2466
+ function DataGrid_getRowId(value) {
2467
+ if ('string' == typeof value || 'number' == typeof value) return value;
2468
+ return String(value);
2469
+ }
2470
+ function compareValues(a, b) {
2471
+ if (null == a && null == b) return 0;
2472
+ if (null == a) return -1;
2473
+ if (null == b) return 1;
2474
+ if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
2475
+ if ('number' == typeof a && 'number' == typeof b) return a - b;
2476
+ return String(a).localeCompare(String(b), void 0, {
2477
+ numeric: true,
2478
+ sensitivity: 'base'
2479
+ });
2480
+ }
2262
2481
  var checkboxItem = 'style__1ib8wktd style__1ib8wkta';
2263
2482
  var DropdownMenu_styles_css_content = 'style__1ib8wkt7';
2264
2483
  var styles_css_icon = 'style__1ib8wkth';
@@ -2603,40 +2822,6 @@ const DataGridActionCell = (props)=>{
2603
2822
  ]
2604
2823
  });
2605
2824
  };
2606
- var styles_css_alignments = {
2607
- left: 'left__o752f01',
2608
- center: 'center__o752f02',
2609
- right: 'right__o752f03',
2610
- justify: 'justify__o752f04'
2611
- };
2612
- var DataGridSortHeader_styles_css_wrapper = 'style__o752f00';
2613
- function DataGridSortHeader({ sorting, setSorting, column: { label, field, align = 'left' }, className }) {
2614
- if (!field) return null;
2615
- const handleClick = ()=>{
2616
- sorting.key === field ? setSorting({
2617
- key: field,
2618
- order: 'asc' === sorting.order ? 'desc' : 'asc'
2619
- }) : setSorting({
2620
- key: field,
2621
- order: 'asc'
2622
- });
2623
- };
2624
- return /*#__PURE__*/ jsxs("button", {
2625
- type: "button",
2626
- className: clsx(DataGridSortHeader_styles_css_wrapper, styles_css_alignments[align], className),
2627
- onClick: handleClick,
2628
- children: [
2629
- label,
2630
- sorting.key === field ? 'asc' === sorting.order ? /*#__PURE__*/ jsx(ArrowDownNarrowWide, {
2631
- size: 16
2632
- }) : /*#__PURE__*/ jsx(ArrowDownWideNarrow, {
2633
- size: 16
2634
- }) : /*#__PURE__*/ jsx(ArrowDownUp, {
2635
- size: 16
2636
- })
2637
- ]
2638
- });
2639
- }
2640
2825
  const ITEM_CLASSNAME = 'datalist_item';
2641
2826
  const END_OF_SCROLL_MESSAGE = 'Вы достигли конца списка';
2642
2827
  var EndData_styles_css_item = 'style__1syvw5e0';
@@ -2663,12 +2848,100 @@ const ErrorState = ({ onRetry })=>/*#__PURE__*/ jsxs("li", {
2663
2848
  ]
2664
2849
  });
2665
2850
  var Loader_styles_css_item = 'style__111czea0';
2666
- const Loader = ()=>/*#__PURE__*/ jsx("li", {
2851
+ const Loader_Loader = ()=>/*#__PURE__*/ jsx("li", {
2667
2852
  className: Loader_styles_css_item,
2668
2853
  children: /*#__PURE__*/ jsx(CircularProgress, {
2669
2854
  color: "primary"
2670
2855
  })
2671
2856
  });
2857
+ var sizes = {
2858
+ small: 'small__1o97kvm1',
2859
+ medium: 'medium__1o97kvm2',
2860
+ large: 'large__1o97kvm3'
2861
+ };
2862
+ var Image_styles_css_wrapper = 'style__1o97kvm0';
2863
+ const Image_Image = (props)=>/*#__PURE__*/ jsx("img", {
2864
+ alt: props.alt,
2865
+ src: props.src,
2866
+ className: clsx_0(Image_styles_css_wrapper, sizes[props.size || 'medium'], props.className),
2867
+ width: props.width,
2868
+ height: props.height
2869
+ });
2870
+ const SIZE = {
2871
+ small: 'small',
2872
+ medium: 'medium',
2873
+ large: 'large'
2874
+ };
2875
+ const IMAGE_WIDTH = {
2876
+ [SIZE.small]: '239px',
2877
+ [SIZE.medium]: '323px',
2878
+ [SIZE.large]: '458px'
2879
+ };
2880
+ const IMAGE_HEIGHT = {
2881
+ [SIZE.small]: '119px',
2882
+ [SIZE.medium]: '161px',
2883
+ [SIZE.large]: '229px'
2884
+ };
2885
+ const MAX_INNER_WIDTH = {
2886
+ [SIZE.small]: '384px',
2887
+ [SIZE.medium]: '400px',
2888
+ [SIZE.large]: '460px'
2889
+ };
2890
+ const TITLE_HEADER_LEVEL = {
2891
+ [SIZE.small]: 'subtitle1',
2892
+ [SIZE.medium]: 'h6',
2893
+ [SIZE.large]: 'h5'
2894
+ };
2895
+ var descriptionClass = 'style__1nenzg05';
2896
+ var Placeholder_styles_css_footerClass = 'style__1nenzg06';
2897
+ var innerContainer = 'style__1nenzg04';
2898
+ var styles_css_sizes = {
2899
+ small: 'small__1nenzg01',
2900
+ medium: 'medium__1nenzg02',
2901
+ large: 'large__1nenzg03'
2902
+ };
2903
+ var Placeholder_styles_css_wrapper = 'style__1nenzg00';
2904
+ const Placeholder = ({ className, title, imgSrc, imgAlt, description, actions, size = 'small', renderImage })=>{
2905
+ const RenderImage = useMemo(()=>renderImage || Image_Image, [
2906
+ renderImage
2907
+ ]);
2908
+ return /*#__PURE__*/ jsxs("div", {
2909
+ className: clsx_0(Placeholder_styles_css_wrapper, styles_css_sizes[size], className),
2910
+ children: [
2911
+ /*#__PURE__*/ jsxs("div", {
2912
+ className: innerContainer,
2913
+ style: {
2914
+ maxWidth: MAX_INNER_WIDTH[size]
2915
+ },
2916
+ children: [
2917
+ imgSrc && /*#__PURE__*/ jsx(RenderImage, {
2918
+ src: imgSrc,
2919
+ alt: imgAlt,
2920
+ width: IMAGE_WIDTH[size],
2921
+ height: IMAGE_HEIGHT[size],
2922
+ size: size
2923
+ }),
2924
+ /*#__PURE__*/ jsx(Typography, {
2925
+ align: "center",
2926
+ color: "secondary",
2927
+ variant: TITLE_HEADER_LEVEL[size],
2928
+ children: title
2929
+ }),
2930
+ description && /*#__PURE__*/ jsx(Typography, {
2931
+ className: descriptionClass,
2932
+ component: "div",
2933
+ variant: "body1",
2934
+ children: description
2935
+ })
2936
+ ]
2937
+ }),
2938
+ actions && /*#__PURE__*/ jsx("footer", {
2939
+ className: Placeholder_styles_css_footerClass,
2940
+ children: actions
2941
+ })
2942
+ ]
2943
+ });
2944
+ };
2672
2945
  const NO_DATA_TEXT = 'Нет данных';
2673
2946
  const NoData = ({ noDataImgSrc })=>/*#__PURE__*/ jsx(Placeholder, {
2674
2947
  title: NO_DATA_TEXT,
@@ -2708,9 +2981,7 @@ const DataList = ({ data, keyId, className, itemContent, noDataPlaceholder, endO
2708
2981
  onEndReached
2709
2982
  ]);
2710
2983
  const isDataExist = Boolean(data?.length);
2711
- if (!isDataExist && !isLoading && !isError) return noDataPlaceholder ? /*#__PURE__*/ jsx(Fragment, {
2712
- children: noDataPlaceholder
2713
- }) : /*#__PURE__*/ jsx(NoData, {});
2984
+ if (!isDataExist && !isLoading && !isError) return noDataPlaceholder ? noDataPlaceholder : /*#__PURE__*/ jsx(NoData, {});
2714
2985
  return /*#__PURE__*/ jsxs(ContentState, {
2715
2986
  isLoading: isLoading && !isDataExist,
2716
2987
  isError: isError && !isDataExist,
@@ -2735,7 +3006,7 @@ const DataList = ({ data, keyId, className, itemContent, noDataPlaceholder, endO
2735
3006
  components: {
2736
3007
  Footer: ()=>/*#__PURE__*/ jsxs(Fragment, {
2737
3008
  children: [
2738
- isLoading && /*#__PURE__*/ jsx(Loader, {}),
3009
+ isLoading && /*#__PURE__*/ jsx(Loader_Loader, {}),
2739
3010
  isError && /*#__PURE__*/ jsx(ErrorState, {
2740
3011
  onRetry: onRetry
2741
3012
  }),
@@ -3254,64 +3525,6 @@ const Drawer_Drawer = ({ children, trigger, className, title, description = '',
3254
3525
  })
3255
3526
  ]
3256
3527
  });
3257
- var Empty_styles_css_content = 'style__e4li7y7';
3258
- var Empty_styles_css_description = 'style__e4li7y6';
3259
- var Empty_styles_css_header = 'style__e4li7y1';
3260
- var styles_css_media = 'style__e4li7y2';
3261
- var mediaVariants = {
3262
- default: 'default__e4li7y3',
3263
- icon: 'icon__e4li7y4'
3264
- };
3265
- var Empty_styles_css_root = 'style__e4li7y0';
3266
- var Empty_styles_css_title = 'style__e4li7y5';
3267
- function Empty_Empty({ className, ...props }) {
3268
- return /*#__PURE__*/ jsx("div", {
3269
- "data-slot": "empty",
3270
- className: clsx(Empty_styles_css_root, className),
3271
- ...props
3272
- });
3273
- }
3274
- function Empty_Header({ className, ...props }) {
3275
- return /*#__PURE__*/ jsx("div", {
3276
- "data-slot": "empty-header",
3277
- className: clsx(Empty_styles_css_header, className),
3278
- ...props
3279
- });
3280
- }
3281
- function Empty_Media({ className, variant = 'default', ...props }) {
3282
- return /*#__PURE__*/ jsx("div", {
3283
- "data-slot": "empty-media",
3284
- "data-variant": variant,
3285
- className: clsx(styles_css_media, mediaVariants[variant], className),
3286
- ...props
3287
- });
3288
- }
3289
- function Empty_Title({ className, ...props }) {
3290
- return /*#__PURE__*/ jsx("div", {
3291
- "data-slot": "empty-title",
3292
- className: clsx(Empty_styles_css_title, className),
3293
- ...props
3294
- });
3295
- }
3296
- function Empty_Description({ className, ...props }) {
3297
- return /*#__PURE__*/ jsx("div", {
3298
- "data-slot": "empty-description",
3299
- className: clsx(Empty_styles_css_description, className),
3300
- ...props
3301
- });
3302
- }
3303
- function Empty_Content({ className, ...props }) {
3304
- return /*#__PURE__*/ jsx("div", {
3305
- "data-slot": "empty-content",
3306
- className: clsx(Empty_styles_css_content, className),
3307
- ...props
3308
- });
3309
- }
3310
- Empty_Empty.Header = Empty_Header;
3311
- Empty_Empty.Media = Empty_Media;
3312
- Empty_Empty.Title = Empty_Title;
3313
- Empty_Empty.Description = Empty_Description;
3314
- Empty_Empty.Content = Empty_Content;
3315
3528
  var styles_css_arrow = 'style__a5l83v4';
3316
3529
  var arrowLeft = 'style__a5l83v5';
3317
3530
  var arrowRight = 'style__a5l83v6';
@@ -5296,4 +5509,4 @@ const ToggleGroup = ({ value, onChange, options, size, className, label, multipl
5296
5509
  ]
5297
5510
  });
5298
5511
  };
5299
- export { Accordion_Accordion as Accordion, AlertDialog_AlertDialog as AlertDialog, Autocomplete, Avatar_Avatar as Avatar, Badge_Badge as Badge, Breadcrumb, ButtonGroup, Button_Button as Button, Button_buttonSizes as buttonSizes, Button_buttonVariants as buttonVariants, Calendar, Card, Carousel, Checkbox_Checkbox as Checkbox, CircularProgress, Collapsible_Collapsible as Collapsible, Combobox_Combobox as Combobox, ConfirmAction, ContentState, CopyTypography, DEFAULT_SEPARATOR, DEFAULT_SYMBOL, DESCRIPTION_ROOT_CLASSNAME, DashboardLayout, DataGrid, DataGridActionCell, DataGridSortHeader, DataList, DatePicker, Description_Description as Description, Dialog_Dialog as Dialog, Drawer_Drawer as Drawer, DropdownMenu, Empty_Empty as Empty, ImageCarousel, Image_Image as Image, InputGroup, InputOTP, Input_Input as Input, Label, MaskField, NOTIFICATION_POSITIONS, NOTIFY_CLASSNAME, Notification, NotificationContainer, OverflowTypography, PageLayout, Pagination, PeriodPicker, Placeholder, Popover_Popover as Popover, RadioGroupItem, RadioGroup_RadioGroup as RadioGroup, RangeInput, ScrollTopButton, Select_Select as Select, Sheet, Sidebar_Sidebar as Sidebar, Slider_Slider as Slider, Tabs_Tabs as Tabs, TextField, Textarea_Textarea as Textarea, ToggleGroup, Tooltip_Tooltip as Tooltip, Typography, alignments, badgeVariants, calculateSize, constants_NotificationVariantTypes as NotificationVariantTypes, createHandle, displays, negativeSpacing, notification, spacing, styles_css_colors as colors, styles_css_variants as variants, theme, transforms, useComboboxAnchor, useDashboard, useIsMobile, useOverflowed, useSidebar, weights };
5512
+ export { Accordion_Accordion as Accordion, AlertDialog_AlertDialog as AlertDialog, Autocomplete, Avatar_Avatar as Avatar, Badge_Badge as Badge, Breadcrumb, ButtonGroup, Button_Button as Button, Button_buttonSizes as buttonSizes, Button_buttonVariants as buttonVariants, Calendar, Card, Carousel, Checkbox_Checkbox as Checkbox, CircularProgress, Collapsible_Collapsible as Collapsible, Combobox_Combobox as Combobox, ConfirmAction, ContentState, CopyTypography, DEFAULT_SEPARATOR, DEFAULT_SYMBOL, DESCRIPTION_ROOT_CLASSNAME, DashboardLayout, DataGrid, DataGridActionCell, DataGridSortHeader, DataList, DatePicker, Description_Description as Description, Dialog_Dialog as Dialog, Drawer_Drawer as Drawer, DropdownMenu, Empty_Empty as Empty, ImageCarousel, Image_Image as Image, InputGroup, InputOTP, Input_Input as Input, Label, MaskField, NOTIFICATION_POSITIONS, NOTIFY_CLASSNAME, Notification, NotificationContainer, OverflowTypography, PageLayout, Pagination, PeriodPicker, Placeholder, Popover_Popover as Popover, RadioGroupItem, RadioGroup_RadioGroup as RadioGroup, RangeInput, ScrollTopButton, Select_Select as Select, Sheet, Sidebar_Sidebar as Sidebar, Slider_Slider as Slider, Spinner, Tabs_Tabs as Tabs, TextField, Textarea_Textarea as Textarea, ToggleGroup, Tooltip_Tooltip as Tooltip, Typography, alignments, badgeVariants, calculateSize, constants_NotificationVariantTypes as NotificationVariantTypes, createHandle, displays, negativeSpacing, notification, spacing, styles_css_colors as colors, styles_css_variants as variants, theme, transforms, useComboboxAnchor, useDashboard, useIsMobile, useOverflowed, useSidebar, weights };