@astral/ui 4.91.2 → 4.92.1

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 (187) hide show
  1. package/components/Alert/Alert.js +2 -2
  2. package/components/Autocomplete/Autocomplete.js +2 -2
  3. package/components/Autocomplete/useLogic/useLogic.js +2 -2
  4. package/components/Badge/Badge.js +2 -2
  5. package/components/BulletList/BulletList.js +2 -2
  6. package/components/BulletListItem/BulletListItem.js +2 -2
  7. package/components/Button/useLogic/useLogic.js +2 -2
  8. package/components/Checkbox/Icon/Icon.js +2 -2
  9. package/components/Checkbox/useLogic/useLogic.js +2 -2
  10. package/components/Chip/ChipStatusIcon/ChipStatusIcon.js +2 -2
  11. package/components/Chip/useLogic/useLogic.js +2 -2
  12. package/components/ConfirmDialog/ConfirmDialog.js +2 -2
  13. package/components/CopyTypography/CopyTypography.js +3 -3
  14. package/components/DashboardAlert/DashboardAlert.js +2 -2
  15. package/components/DashboardLayout/DashboardSidebar/useLogic/useLogic.js +2 -2
  16. package/components/DashboardLayout/Header/styles.js +8 -0
  17. package/components/DashboardLayout/Main/styles.js +8 -0
  18. package/components/DashboardSidebarSkeleton/DashboardSidebarSkeleton.js +2 -2
  19. package/components/DataGrid/Body/Body.js +2 -2
  20. package/components/DataGrid/Cell/Cell.js +2 -2
  21. package/components/DataGrid/DataGrid.js +2 -2
  22. package/components/DataGrid/HeadCell/HeadCell.js +2 -2
  23. package/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +2 -2
  24. package/components/DataGrid/Row/Row.js +3 -3
  25. package/components/DataGrid/RowBase/RowBase.js +2 -2
  26. package/components/DataGridInfinite/DataGridInfinite.js +2 -2
  27. package/components/DataGridPaginationContainer/DataGridPaginationContainer.js +2 -2
  28. package/components/DescriptionCell/useLogic/useLogic.js +2 -2
  29. package/components/Dialog/Dialog.js +2 -2
  30. package/components/Dialog/useLogic/useLogic.js +2 -2
  31. package/components/DialogActions/DialogActions.js +2 -2
  32. package/components/DialogContent/DialogContent.js +2 -2
  33. package/components/DonutChart/DonutChart.js +2 -2
  34. package/components/EmailField/EmailField.js +2 -2
  35. package/components/EmailOrPhoneField/EmailOrPhoneField.js +2 -2
  36. package/components/Filename/Filename.js +2 -2
  37. package/components/GuidTypography/GuidTypography.js +5 -5
  38. package/components/HintPopover/HintPopover.js +2 -2
  39. package/components/IconButton/IconButton.js +2 -2
  40. package/components/Loader/Loader.js +2 -2
  41. package/components/MenuItem/MenuItem.js +2 -2
  42. package/components/MinimalisticPagination/MinimalisticPagination.js +2 -2
  43. package/components/NewPopover/NewPopover.js +2 -2
  44. package/components/NewStepper/NewStepper.js +2 -2
  45. package/components/NewStepper/Step/Step.js +3 -3
  46. package/components/Notification/NotificationStackContainer/NotificationStackContainer.js +3 -3
  47. package/components/PageAside/PageAside.js +2 -2
  48. package/components/PageAsideNavigation/PageAsideNavigation.js +2 -2
  49. package/components/PageContent/PageContent.js +2 -2
  50. package/components/PageContent/styles.js +1 -1
  51. package/components/PageHeader/HeaderContent/HeaderContent.js +2 -2
  52. package/components/PageHeader/HeaderContent/styles.js +12 -0
  53. package/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
  54. package/components/PageHeader/PageHeader.js +3 -3
  55. package/components/PageHeader/styles.js +16 -4
  56. package/components/PageLayout/PageLayout.js +2 -2
  57. package/components/PageLayout/styles.js +14 -2
  58. package/components/PageLayoutContainer/PageLayoutContainer.js +2 -2
  59. package/components/PageLayoutSection/PageLayoutSection.js +2 -2
  60. package/components/PageLayoutSection/PageLayoutSectionContainer/PageLayoutSectionContainer.js +2 -2
  61. package/components/PagePinnableAside/PagePinnableAside.js +2 -2
  62. package/components/PasswordField/PasswordField.js +2 -2
  63. package/components/PdfViewer/PdfDocument/PdfDocument.js +2 -2
  64. package/components/PinButton/PinButton.js +2 -2
  65. package/components/Radio/useLogic/useLogic.js +2 -2
  66. package/components/RadioCard/RadioCard.js +2 -2
  67. package/components/SearchField/SearchField.js +2 -2
  68. package/components/StaticCalendar/StaticDaysCalendar/StaticDaysCalendar.js +2 -2
  69. package/components/SvgIcon/SvgIcon.js +2 -2
  70. package/components/Tabs/Tabs.js +2 -2
  71. package/components/Tag/useLogic/useLogic.js +2 -2
  72. package/components/TagBadge/TagBadge.js +2 -2
  73. package/components/TextField/TextField.js +2 -2
  74. package/components/Tooltip/Tooltip.js +2 -2
  75. package/components/Tooltip/useLogic/useLogic.js +2 -2
  76. package/components/Tree/TreeList/TreeList.js +2 -2
  77. package/components/TreeLikeList/TreeLikeList.js +2 -2
  78. package/components/Typography/Typography.js +2 -2
  79. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -4
  80. package/components/utils/classNames/classNames.d.ts +1 -1
  81. package/components/utils/classNames/classNames.js +1 -1
  82. package/components/utils/cn/cn.d.ts +1 -0
  83. package/components/utils/cn/cn.js +1 -0
  84. package/components/utils/cn/index.d.ts +1 -0
  85. package/components/utils/cn/index.js +1 -0
  86. package/components/utils/cn/public.d.ts +1 -0
  87. package/components/utils/cn/public.js +1 -0
  88. package/hook-form/EditableText/EditableText.js +2 -2
  89. package/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +2 -2
  90. package/hook-form/FormMobilePhoneField/FormMobilePhoneField.js +2 -2
  91. package/hook-form/FormPageLayout/FormPageLayout.js +2 -2
  92. package/hook-form/FormPageLayoutBase/FormPageLayoutBase.js +2 -2
  93. package/hook-form/FormWizardPageLayout/FormWizardPageLayout.js +2 -2
  94. package/node/components/Alert/Alert.js +2 -2
  95. package/node/components/Autocomplete/Autocomplete.js +2 -2
  96. package/node/components/Autocomplete/useLogic/useLogic.js +2 -2
  97. package/node/components/Badge/Badge.js +2 -2
  98. package/node/components/BulletList/BulletList.js +2 -2
  99. package/node/components/BulletListItem/BulletListItem.js +2 -2
  100. package/node/components/Button/useLogic/useLogic.js +2 -2
  101. package/node/components/Checkbox/Icon/Icon.js +2 -2
  102. package/node/components/Checkbox/useLogic/useLogic.js +2 -2
  103. package/node/components/Chip/ChipStatusIcon/ChipStatusIcon.js +2 -2
  104. package/node/components/Chip/useLogic/useLogic.js +2 -2
  105. package/node/components/ConfirmDialog/ConfirmDialog.js +2 -2
  106. package/node/components/CopyTypography/CopyTypography.js +3 -3
  107. package/node/components/DashboardAlert/DashboardAlert.js +2 -2
  108. package/node/components/DashboardLayout/DashboardSidebar/useLogic/useLogic.js +2 -2
  109. package/node/components/DashboardLayout/Header/styles.js +8 -0
  110. package/node/components/DashboardLayout/Main/styles.js +8 -0
  111. package/node/components/DashboardSidebarSkeleton/DashboardSidebarSkeleton.js +2 -2
  112. package/node/components/DataGrid/Body/Body.js +2 -2
  113. package/node/components/DataGrid/Cell/Cell.js +2 -2
  114. package/node/components/DataGrid/DataGrid.js +2 -2
  115. package/node/components/DataGrid/HeadCell/HeadCell.js +2 -2
  116. package/node/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +2 -2
  117. package/node/components/DataGrid/Row/Row.js +3 -3
  118. package/node/components/DataGrid/RowBase/RowBase.js +2 -2
  119. package/node/components/DataGridInfinite/DataGridInfinite.js +2 -2
  120. package/node/components/DataGridPaginationContainer/DataGridPaginationContainer.js +2 -2
  121. package/node/components/DescriptionCell/useLogic/useLogic.js +2 -2
  122. package/node/components/Dialog/Dialog.js +2 -2
  123. package/node/components/Dialog/useLogic/useLogic.js +2 -2
  124. package/node/components/DialogActions/DialogActions.js +2 -2
  125. package/node/components/DialogContent/DialogContent.js +2 -2
  126. package/node/components/DonutChart/DonutChart.js +2 -2
  127. package/node/components/EmailField/EmailField.js +2 -2
  128. package/node/components/EmailOrPhoneField/EmailOrPhoneField.js +2 -2
  129. package/node/components/Filename/Filename.js +2 -2
  130. package/node/components/GuidTypography/GuidTypography.js +5 -5
  131. package/node/components/HintPopover/HintPopover.js +2 -2
  132. package/node/components/IconButton/IconButton.js +2 -2
  133. package/node/components/Loader/Loader.js +2 -2
  134. package/node/components/MenuItem/MenuItem.js +2 -2
  135. package/node/components/MinimalisticPagination/MinimalisticPagination.js +2 -2
  136. package/node/components/NewPopover/NewPopover.js +2 -2
  137. package/node/components/NewStepper/NewStepper.js +2 -2
  138. package/node/components/NewStepper/Step/Step.js +3 -3
  139. package/node/components/Notification/NotificationStackContainer/NotificationStackContainer.js +3 -3
  140. package/node/components/PageAside/PageAside.js +2 -2
  141. package/node/components/PageAsideNavigation/PageAsideNavigation.js +2 -2
  142. package/node/components/PageContent/PageContent.js +2 -2
  143. package/node/components/PageContent/styles.js +11 -11
  144. package/node/components/PageHeader/HeaderContent/HeaderContent.js +2 -2
  145. package/node/components/PageHeader/HeaderContent/styles.js +12 -0
  146. package/node/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
  147. package/node/components/PageHeader/PageHeader.js +3 -3
  148. package/node/components/PageHeader/styles.js +16 -4
  149. package/node/components/PageLayout/PageLayout.js +2 -2
  150. package/node/components/PageLayout/styles.js +14 -2
  151. package/node/components/PageLayoutContainer/PageLayoutContainer.js +2 -2
  152. package/node/components/PageLayoutSection/PageLayoutSection.js +2 -2
  153. package/node/components/PageLayoutSection/PageLayoutSectionContainer/PageLayoutSectionContainer.js +2 -2
  154. package/node/components/PagePinnableAside/PagePinnableAside.js +2 -2
  155. package/node/components/PasswordField/PasswordField.js +2 -2
  156. package/node/components/PdfViewer/PdfDocument/PdfDocument.js +2 -2
  157. package/node/components/PinButton/PinButton.js +2 -2
  158. package/node/components/Radio/useLogic/useLogic.js +2 -2
  159. package/node/components/RadioCard/RadioCard.js +2 -2
  160. package/node/components/SearchField/SearchField.js +2 -2
  161. package/node/components/StaticCalendar/StaticDaysCalendar/StaticDaysCalendar.js +2 -2
  162. package/node/components/SvgIcon/SvgIcon.js +2 -2
  163. package/node/components/Tabs/Tabs.js +2 -2
  164. package/node/components/Tag/useLogic/useLogic.js +2 -2
  165. package/node/components/TagBadge/TagBadge.js +2 -2
  166. package/node/components/TextField/TextField.js +2 -2
  167. package/node/components/Tooltip/Tooltip.js +2 -2
  168. package/node/components/Tooltip/useLogic/useLogic.js +2 -2
  169. package/node/components/Tree/TreeList/TreeList.js +2 -2
  170. package/node/components/TreeLikeList/TreeLikeList.js +2 -2
  171. package/node/components/Typography/Typography.js +2 -2
  172. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -4
  173. package/node/components/utils/classNames/classNames.d.ts +1 -1
  174. package/node/components/utils/classNames/classNames.js +2 -2
  175. package/node/components/utils/cn/cn.d.ts +1 -0
  176. package/node/components/utils/cn/cn.js +8 -0
  177. package/node/components/utils/cn/index.d.ts +1 -0
  178. package/node/components/utils/cn/index.js +17 -0
  179. package/node/components/utils/cn/public.d.ts +1 -0
  180. package/node/components/utils/cn/public.js +17 -0
  181. package/node/hook-form/EditableText/EditableText.js +2 -2
  182. package/node/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +2 -2
  183. package/node/hook-form/FormMobilePhoneField/FormMobilePhoneField.js +2 -2
  184. package/node/hook-form/FormPageLayout/FormPageLayout.js +2 -2
  185. package/node/hook-form/FormPageLayoutBase/FormPageLayoutBase.js +2 -2
  186. package/node/hook-form/FormWizardPageLayout/FormWizardPageLayout.js +2 -2
  187. package/package.json +2 -2
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Tabs = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const useScrollToActiveElement_1 = require("../useScrollToActiveElement");
6
- const classNames_1 = require("../utils/classNames");
6
+ const cn_1 = require("../utils/cn");
7
7
  const constants_1 = require("./constants");
8
8
  const styles_1 = require("./styles");
9
9
  const Tabs = ({ className, ...tabsProps }) => {
10
10
  const { containerRef } = (0, useScrollToActiveElement_1.useScrollToActiveElement)();
11
- return ((0, jsx_runtime_1.jsx)(styles_1.Container, { children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledTabs, { ...tabsProps, ref: containerRef, className: (0, classNames_1.classNames)(className, constants_1.tabsClassnames.root) }), (0, jsx_runtime_1.jsx)(styles_1.Divider, {})] }) }));
11
+ return ((0, jsx_runtime_1.jsx)(styles_1.Container, { children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledTabs, { ...tabsProps, ref: containerRef, className: (0, cn_1.cn)(className, constants_1.tabsClassnames.root) }), (0, jsx_runtime_1.jsx)(styles_1.Divider, {})] }) }));
12
12
  };
13
13
  exports.Tabs = Tabs;
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useLogic = void 0;
4
4
  const react_1 = require("react");
5
- const classNames_1 = require("../../utils/classNames");
5
+ const cn_1 = require("../../utils/cn");
6
6
  const constants_1 = require("../constants");
7
7
  const useLogic = ({ onDelete, variant, disabled, size, className, }) => {
8
8
  const handleDelete = (event) => {
9
9
  event.stopPropagation();
10
10
  onDelete?.(event);
11
11
  };
12
- const classnames = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(constants_1.tagClassnames.root, {
12
+ const classnames = (0, react_1.useMemo)(() => (0, cn_1.cn)(constants_1.tagClassnames.root, {
13
13
  [constants_1.tagClassnames.variantText]: variant === 'text',
14
14
  [constants_1.tagClassnames.variantContained]: variant === 'contained',
15
15
  [constants_1.tagClassnames.variantLight]: variant === 'light',
@@ -5,13 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Tag_1 = require("../Tag");
7
7
  const TagContext_1 = require("../Tag/TagContext");
8
- const classNames_1 = require("../utils/classNames");
8
+ const cn_1 = require("../utils/cn");
9
9
  const styles_1 = require("./styles");
10
10
  /**
11
11
  * Badge для использования внутри компонента Tag
12
12
  */
13
13
  const TagBadge = ({ color = 'primary', checked, disabled, checkedColor, className, ...props }) => {
14
14
  const { variant } = (0, react_1.useContext)(TagContext_1.TagContext);
15
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledBadge, { withBorder: false, color: "white", "$color": color, "$variant": variant, "$isChecked": checked, "$isDisabled": disabled, className: (0, classNames_1.classNames)(className, Tag_1.tagClassnames.badge), ...props }));
15
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledBadge, { withBorder: false, color: "white", "$color": color, "$variant": variant, "$isChecked": checked, "$isDisabled": disabled, className: (0, cn_1.cn)(className, Tag_1.tagClassnames.badge), ...props }));
16
16
  };
17
17
  exports.TagBadge = TagBadge;
@@ -4,7 +4,7 @@ exports.TextField = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const FormHelperText_1 = require("../FormHelperText");
7
- const classNames_1 = require("../utils/classNames");
7
+ const cn_1 = require("../utils/cn");
8
8
  const constants_1 = require("./constants");
9
9
  const styles_1 = require("./styles");
10
10
  exports.TextField = (0, react_1.forwardRef)(({ success, error, helperText: helperTextProp, fullWidth = false, startAdornment, endAdornment, inputProps, InputProps, maxLength, trimmed = true, onBlur, hideHelperText = false, className, disabled, ...props }, ref) => {
@@ -40,7 +40,7 @@ exports.TextField = (0, react_1.forwardRef)(({ success, error, helperText: helpe
40
40
  }
41
41
  onBlur?.(event);
42
42
  };
43
- const classnames = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(className, {
43
+ const classnames = (0, react_1.useMemo)(() => (0, cn_1.cn)(className, {
44
44
  [constants_1.textFieldClassnames.hideHelperText]: hideHelperText,
45
45
  [constants_1.textFieldClassnames.disabled]: disabled,
46
46
  }), [className, hideHelperText, disabled]);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Tooltip = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const classNames_1 = require("../utils/classNames");
6
+ const cn_1 = require("../utils/cn");
7
7
  const cva_1 = require("../utils/cva");
8
8
  const constants_1 = require("./constants");
9
9
  const styles_1 = require("./styles");
@@ -17,5 +17,5 @@ const tooltipCva = (0, cva_1.cva)(constants_1.tooltipClassnames.root, {
17
17
  });
18
18
  exports.Tooltip = (0, react_1.forwardRef)((props, ref) => {
19
19
  const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, tooltipStyle, width, ...restProps } = (0, useLogic_1.useLogic)(props);
20
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: (0, classNames_1.classNames)(className, tooltipCva({ withoutMaxWidth: Boolean(width) })), style: tooltipStyle, ...restProps, children: withoutContainer ? (children) : ((0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { className: constants_1.tooltipClassnames.contentWrapper, children: children })) }));
20
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: (0, cn_1.cn)(className, tooltipCva({ withoutMaxWidth: Boolean(width) })), style: tooltipStyle, ...restProps, children: withoutContainer ? (children) : ((0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { className: constants_1.tooltipClassnames.contentWrapper, children: children })) }));
21
21
  });
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useLogic = void 0;
4
4
  const personalDataSecurity_1 = require("../../personalDataSecurity");
5
- const classNames_1 = require("../../utils/classNames");
5
+ const cn_1 = require("../../utils/cn");
6
6
  const useLogic = (props) => {
7
7
  const { children, className: propClassName, width, style, ...restProps } = props;
8
8
  const hidePersonalDataClassName = (0, personalDataSecurity_1.useHidePersonalData)({
9
9
  type: 'container',
10
10
  });
11
- const className = (0, classNames_1.classNames)(propClassName, {
11
+ const className = (0, cn_1.cn)(propClassName, {
12
12
  [hidePersonalDataClassName]: children.props.className?.includes(hidePersonalDataClassName),
13
13
  });
14
14
  const tooltipStyle = {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TreeList = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const classNames_1 = require("../../utils/classNames");
5
+ const cn_1 = require("../../utils/cn");
6
6
  const constants_1 = require("./constants");
7
7
  const styles_1 = require("./styles");
8
8
  const TreeItem_1 = require("./TreeItem");
@@ -11,6 +11,6 @@ const INITIAL_LEVEL = 0;
11
11
  const TreeList = (props) => {
12
12
  const { listProps, itemProps } = (0, useLogic_1.useLogic)(props);
13
13
  const { data, className, expandedLevel = 10, disabledItems, ...restProps } = props;
14
- return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0, classNames_1.classNames)(className, constants_1.treeListClassnames.list), ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
14
+ return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0, cn_1.cn)(className, constants_1.treeListClassnames.list), ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
15
15
  };
16
16
  exports.TreeList = TreeList;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TreeLikeList = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const Tree_1 = require("../Tree");
6
- const classNames_1 = require("../utils/classNames");
6
+ const cn_1 = require("../utils/cn");
7
7
  const styles_1 = require("./styles");
8
8
  const TreeItem_1 = require("./TreeItem");
9
9
  const useLogic_1 = require("./useLogic");
@@ -11,6 +11,6 @@ const INITIAL_LEVEL = 0;
11
11
  const TreeLikeList = (props) => {
12
12
  const { listProps, itemProps } = (0, useLogic_1.useLogic)(props);
13
13
  const { data, className, expandedLevel = 10, disabledItems, ...restProps } = props;
14
- return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0, classNames_1.classNames)(className, Tree_1.treeListClassnames.list), ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
14
+ return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0, cn_1.cn)(className, Tree_1.treeListClassnames.list), ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
15
15
  };
16
16
  exports.TreeLikeList = TreeLikeList;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Typography = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const classNames_1 = require("../utils/classNames");
6
+ const cn_1 = require("../utils/cn");
7
7
  const cva_1 = require("../utils/cva");
8
8
  const constants_1 = require("./constants");
9
9
  const hooks_1 = require("./hooks");
@@ -20,5 +20,5 @@ const typographyCva = (0, cva_1.cva)(constants_1.typographyClassnames.root, {
20
20
  });
21
21
  exports.Typography = (0, react_1.forwardRef)(({ children, color, colorIntensity = '800', component, withoutCalt, className, isTabularNums, ...props }, ref) => {
22
22
  const typographyColor = (0, hooks_1.useTypographyColor)({ color, colorIntensity });
23
- return ((0, jsx_runtime_1.jsx)(styles_1.TypographyWrapper, { ref: ref, ...props, component: component, color: typographyColor, className: (0, classNames_1.classNames)(typographyCva({ isTabularNums, withoutCalt }), className), children: children }));
23
+ return ((0, jsx_runtime_1.jsx)(styles_1.TypographyWrapper, { ref: ref, ...props, component: component, color: typographyColor, className: (0, cn_1.cn)(typographyCva({ isTabularNums, withoutCalt }), className), children: children }));
24
24
  });
@@ -4,7 +4,7 @@ exports.LoadingPlaceholder = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const Loader_1 = require("../../Loader");
6
6
  const Typography_1 = require("../../Typography");
7
- const classNames_1 = require("../../utils/classNames");
7
+ const cn_1 = require("../../utils/cn");
8
8
  const constants_1 = require("./constants");
9
9
  const styles_1 = require("./styles");
10
10
  /**
@@ -12,11 +12,11 @@ const styles_1 = require("./styles");
12
12
  */
13
13
  const LoadingPlaceholder = ({ title, content, isShowLoader = true, className, }) => {
14
14
  if (!isShowLoader) {
15
- return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, classNames_1.classNames)(constants_1.loadingPlaceholderClassnames.root, className) }));
15
+ return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, cn_1.cn)(constants_1.loadingPlaceholderClassnames.root, className) }));
16
16
  }
17
17
  if (content) {
18
- return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, classNames_1.classNames)(constants_1.loadingPlaceholderClassnames.root, className), children: content }));
18
+ return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, cn_1.cn)(constants_1.loadingPlaceholderClassnames.root, className), children: content }));
19
19
  }
20
- return ((0, jsx_runtime_1.jsxs)(styles_1.LoadingContainer, { className: (0, classNames_1.classNames)(constants_1.loadingPlaceholderClassnames.root, className), children: [(0, jsx_runtime_1.jsx)(Loader_1.Loader, {}), title && (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "h4", children: title })] }));
20
+ return ((0, jsx_runtime_1.jsxs)(styles_1.LoadingContainer, { className: (0, cn_1.cn)(constants_1.loadingPlaceholderClassnames.root, className), children: [(0, jsx_runtime_1.jsx)(Loader_1.Loader, {}), title && (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "h4", children: title })] }));
21
21
  };
22
22
  exports.LoadingPlaceholder = LoadingPlaceholder;
@@ -1 +1 @@
1
- export { default as classNames } from 'classnames';
1
+ export { default as classNames } from 'clsx';
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.classNames = void 0;
7
- var classnames_1 = require("classnames");
8
- Object.defineProperty(exports, "classNames", { enumerable: true, get: function () { return __importDefault(classnames_1).default; } });
7
+ var clsx_1 = require("clsx");
8
+ Object.defineProperty(exports, "classNames", { enumerable: true, get: function () { return __importDefault(clsx_1).default; } });
@@ -0,0 +1 @@
1
+ export { default as cn } from 'clsx';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.cn = void 0;
7
+ var clsx_1 = require("clsx");
8
+ Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return __importDefault(clsx_1).default; } });
@@ -0,0 +1 @@
1
+ export * from './cn';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./cn"), exports);
@@ -0,0 +1 @@
1
+ export * from './cn';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./cn"), exports);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EditableText = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const Tooltip_1 = require("../../components/Tooltip");
6
- const classNames_1 = require("../../components/utils/classNames");
6
+ const cn_1 = require("../../components/utils/cn");
7
7
  const constants_1 = require("./constants");
8
8
  const EditingForm_1 = require("./EditingForm");
9
9
  const styles_1 = require("./styles");
@@ -26,7 +26,7 @@ const EditableText = (props) => {
26
26
  if (showEditIconMode === 'none') {
27
27
  return null;
28
28
  }
29
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledEditIcon, { "$iconPosition": iconPosition, className: (0, classNames_1.classNames)({
29
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledEditIcon, { "$iconPosition": iconPosition, className: (0, cn_1.cn)({
30
30
  [constants_1.editableTextClassnames.showIconOnHover]: showEditIconMode === 'onHover',
31
31
  }) }));
32
32
  };
@@ -4,7 +4,7 @@ exports.useLogic = void 0;
4
4
  const react_1 = require("react");
5
5
  const react_hook_form_1 = require("react-hook-form");
6
6
  const useViewportType_1 = require("../../../../components/useViewportType");
7
- const classNames_1 = require("../../../../components/utils/classNames");
7
+ const cn_1 = require("../../../../components/utils/cn");
8
8
  const constants_1 = require("../../../FormFiltersSearchField/constants");
9
9
  const constants_2 = require("../../../FormQuickFilters/constants");
10
10
  const constants_3 = require("../../constants");
@@ -37,7 +37,7 @@ const useLogic = ({ form, onOpenModal, hasMainFilters, hasSecondaryFilters, hasS
37
37
  return (filledValuesCount - (searchValue ? 1 : 0) - (quickFiltersValue ? 1 : 0));
38
38
  };
39
39
  const allFiltersButtonClassName = (0, react_1.useMemo)(() => {
40
- return (0, classNames_1.classNames)({
40
+ return (0, cn_1.cn)({
41
41
  [constants_3.formFiltersClassnames.showAllFiltersButtonOnDesktop]: hasSecondaryFilters,
42
42
  [constants_3.formFiltersClassnames.showAllFiltersButtonOnLaptop]: hasMainFilters || hasSecondaryFilters,
43
43
  [constants_3.formFiltersClassnames.showAllFiltersButtonOnMobile]: hasMainFilters || hasSecondaryFilters,
@@ -4,7 +4,7 @@ exports.FormMobilePhoneField = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const MaskField_1 = require("../../components/MaskField");
6
6
  const personalDataSecurity_1 = require("../../components/personalDataSecurity");
7
- const classNames_1 = require("../../components/utils/classNames");
7
+ const cn_1 = require("../../components/utils/cn");
8
8
  const useFormFieldProps_1 = require("../useFormFieldProps");
9
9
  const MOBILE_PHONE_MASK = '+{7} (000) 000-00-00';
10
10
  /**
@@ -21,7 +21,7 @@ const FormMobilePhoneField = ({ isHidePersonalData, inputProps, ...props }) => {
21
21
  });
22
22
  return ((0, jsx_runtime_1.jsx)(MaskField_1.MaskField, { inputProps: {
23
23
  ...inputProps,
24
- className: (0, classNames_1.classNames)(inputProps?.className, hidePersonalDataClassname),
24
+ className: (0, cn_1.cn)(inputProps?.className, hidePersonalDataClassname),
25
25
  }, placeholder: "+7 (9**) ***-**-**", ...fieldProps, mask: MOBILE_PHONE_MASK, autoComplete: "tel" }));
26
26
  };
27
27
  exports.FormMobilePhoneField = FormMobilePhoneField;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormPageLayout = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const classNames_1 = require("../../components/utils/classNames");
5
+ const cn_1 = require("../../components/utils/cn");
6
6
  const Form_1 = require("../Form");
7
7
  const FormPageLayoutBase_1 = require("../FormPageLayoutBase");
8
8
  const FormPageFooter_1 = require("./FormPageFooter");
@@ -13,7 +13,7 @@ const styles_1 = require("./styles");
13
13
  const FormPageLayout = (props) => {
14
14
  const { form, children, ...restProps } = props;
15
15
  const { secondaryActions, submitButtonText, ...restFormProps } = form;
16
- return ((0, jsx_runtime_1.jsx)(FormPageLayoutBase_1.FormPageLayoutBase, { ...restProps, formProps: { ...form, secondaryActions }, contentClassname: (0, classNames_1.classNames)({
16
+ return ((0, jsx_runtime_1.jsx)(FormPageLayoutBase_1.FormPageLayoutBase, { ...restProps, formProps: { ...form, secondaryActions }, contentClassname: (0, cn_1.cn)({
17
17
  [FormPageLayoutBase_1.formPageContentClassnames.formPageContentSecondaryActions]: Boolean(secondaryActions),
18
18
  }), children: ({ isDisabled }) => ((0, jsx_runtime_1.jsxs)(Form_1.Form, { ...restFormProps, isDisabled: isDisabled, children: [(0, jsx_runtime_1.jsx)(styles_1.FormContent, { children: children }), (0, jsx_runtime_1.jsx)(FormPageFooter_1.FormPageFooter, { isDisabled: isDisabled, submitButtonText: submitButtonText, secondaryActions: secondaryActions })] })) }));
19
19
  };
@@ -6,7 +6,7 @@ const react_1 = require("react");
6
6
  const PageAside_1 = require("../../components/PageAside");
7
7
  const PageContext_1 = require("../../components/PageContext");
8
8
  const PageLayoutContainer_1 = require("../../components/PageLayoutContainer");
9
- const classNames_1 = require("../../components/utils/classNames");
9
+ const cn_1 = require("../../components/utils/cn");
10
10
  const FormMobileActions_1 = require("./FormMobileActions");
11
11
  const styles_1 = require("./styles");
12
12
  const useLogic_1 = require("./useLogic");
@@ -16,6 +16,6 @@ const useLogic_1 = require("./useLogic");
16
16
  const FormPageLayoutBase = (props) => {
17
17
  const { pageContentProps, headerProps, renderChildrenProps, headerActions } = (0, useLogic_1.useLogic)(props);
18
18
  const { className, aside, children, alert, contentClassname, header } = props;
19
- return ((0, jsx_runtime_1.jsxs)(PageContext_1.PageContextProvider, { hasAside: Boolean(aside), mobileTitleActions: (0, jsx_runtime_1.jsx)(FormMobileActions_1.FormMobileActions, { actions: headerActions }), children: [alert && (0, jsx_runtime_1.jsx)(styles_1.DesktopAlertWrapper, { children: alert }), (0, jsx_runtime_1.jsxs)(PageLayoutContainer_1.PageLayoutContainer, { className: className, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.MobileAlertWrapper, { children: alert }), (0, react_1.isValidElement)(header) ? (header) : ((0, jsx_runtime_1.jsx)(styles_1.StyledPageHeader, { ...headerProps })), (0, jsx_runtime_1.jsx)(styles_1.StyledPageContent, { className: (0, classNames_1.classNames)(contentClassname), isFormPaddingDisable: true, ...pageContentProps, children: children(renderChildrenProps) }), aside && !(0, react_1.isValidElement)(aside) && ((0, jsx_runtime_1.jsx)(PageAside_1.PageAside, { ...aside })), (0, react_1.isValidElement)(aside) && aside] })] }));
19
+ return ((0, jsx_runtime_1.jsxs)(PageContext_1.PageContextProvider, { hasAside: Boolean(aside), mobileTitleActions: (0, jsx_runtime_1.jsx)(FormMobileActions_1.FormMobileActions, { actions: headerActions }), children: [alert && (0, jsx_runtime_1.jsx)(styles_1.DesktopAlertWrapper, { children: alert }), (0, jsx_runtime_1.jsxs)(PageLayoutContainer_1.PageLayoutContainer, { className: className, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.MobileAlertWrapper, { children: alert }), (0, react_1.isValidElement)(header) ? (header) : ((0, jsx_runtime_1.jsx)(styles_1.StyledPageHeader, { ...headerProps })), (0, jsx_runtime_1.jsx)(styles_1.StyledPageContent, { className: (0, cn_1.cn)(contentClassname), isFormPaddingDisable: true, ...pageContentProps, children: children(renderChildrenProps) }), aside && !(0, react_1.isValidElement)(aside) && ((0, jsx_runtime_1.jsx)(PageAside_1.PageAside, { ...aside })), (0, react_1.isValidElement)(aside) && aside] })] }));
20
20
  };
21
21
  exports.FormPageLayoutBase = FormPageLayoutBase;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormWizardPageLayout = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const classNames_1 = require("../../components/utils/classNames");
5
+ const cn_1 = require("../../components/utils/cn");
6
6
  const FormPageLayoutBase_1 = require("../FormPageLayoutBase");
7
7
  const FormWizard_1 = require("../FormWizard");
8
8
  const FormWizardFooter_1 = require("./FormWizardFooter");
@@ -14,7 +14,7 @@ const FormWizardPageLayout = (props) => {
14
14
  const { header, aside, formWizard, alert } = props;
15
15
  const { form, isDisabled: externalDisabled, secondaryActions } = formWizard;
16
16
  const { isShowFullActions, isShowNavigateButtons } = (0, useLogic_1.useLogic)(props);
17
- return ((0, jsx_runtime_1.jsx)(FormPageLayoutBase_1.FormPageLayoutBase, { header: header, aside: aside, formProps: { isDisabled: externalDisabled, form, secondaryActions }, contentClassname: (0, classNames_1.classNames)({
17
+ return ((0, jsx_runtime_1.jsx)(FormPageLayoutBase_1.FormPageLayoutBase, { header: header, aside: aside, formProps: { isDisabled: externalDisabled, form, secondaryActions }, contentClassname: (0, cn_1.cn)({
18
18
  [FormPageLayoutBase_1.formPageContentClassnames.formPageContentSecondaryActions]: isShowNavigateButtons,
19
19
  [FormPageLayoutBase_1.formPageContentClassnames.formWizardPageContentActions]: isShowFullActions,
20
20
  }), alert: alert, children: ({ isDisabled }) => ((0, jsx_runtime_1.jsx)(FormWizard_1.FormWizard, { isDisabled: isDisabled, ...formWizard, customFooter: (footerProps) => ((0, jsx_runtime_1.jsx)(FormWizardFooter_1.FormWizardFooter, { ...footerProps, secondaryActions: secondaryActions })) })) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.91.2",
3
+ "version": "4.92.1",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {
@@ -11,8 +11,8 @@
11
11
  "@emotion/server": "^11.11.0",
12
12
  "@emotion/styled": "^11.13.5",
13
13
  "@mui/material": "5.13.0",
14
- "classnames": "^2.5.1",
15
14
  "class-variance-authority": "^0.7.1",
15
+ "clsx": "^2.1.1",
16
16
  "colord": "^2.9.3",
17
17
  "dayjs": "^1.11.5",
18
18
  "react-imask": "6.4.2",