@quen-ui/components 1.0.1 → 1.2.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 (114) hide show
  1. package/dist/Banner/Banner.cjs.js +96 -0
  2. package/dist/Banner/Banner.d.ts +4 -0
  3. package/dist/Banner/Banner.es.js +96 -0
  4. package/dist/Banner/index.d.ts +2 -0
  5. package/dist/Banner/styles.cjs.js +113 -0
  6. package/dist/Banner/styles.d.ts +12 -0
  7. package/dist/Banner/styles.es.js +113 -0
  8. package/dist/Banner/types.d.ts +40 -0
  9. package/dist/Button/styles.cjs.js +6 -10
  10. package/dist/Button/styles.es.js +6 -10
  11. package/dist/Calendar/Calendar.cjs.js +5 -3
  12. package/dist/Calendar/Calendar.es.js +5 -3
  13. package/dist/Calendar/styles.cjs.js +0 -1
  14. package/dist/Calendar/styles.es.js +0 -1
  15. package/dist/Card/Card.cjs.js +8 -4
  16. package/dist/Card/Card.d.ts +1 -1
  17. package/dist/Card/Card.es.js +8 -4
  18. package/dist/Card/styles.cjs.js +9 -3
  19. package/dist/Card/styles.d.ts +3 -1
  20. package/dist/Card/styles.es.js +9 -3
  21. package/dist/Card/types.d.ts +2 -0
  22. package/dist/Dropdown/Dropdown.cjs.js +47 -43
  23. package/dist/Dropdown/Dropdown.d.ts +1 -1
  24. package/dist/Dropdown/Dropdown.es.js +48 -44
  25. package/dist/Dropdown/DropdownItem.cjs.js +10 -13
  26. package/dist/Dropdown/DropdownItem.es.js +10 -13
  27. package/dist/Dropdown/DropdownList.cjs.js +0 -2
  28. package/dist/Dropdown/DropdownList.es.js +0 -2
  29. package/dist/Form/Form.cjs.js +1 -1
  30. package/dist/Form/Form.es.js +1 -1
  31. package/dist/Image/styles.cjs.js +3 -1
  32. package/dist/Image/styles.es.js +3 -1
  33. package/dist/InputBase/InputBase.cjs.js +55 -12
  34. package/dist/InputBase/InputBase.d.ts +1 -1
  35. package/dist/InputBase/InputBase.es.js +57 -14
  36. package/dist/InputBase/styles.cjs.js +44 -4
  37. package/dist/InputBase/styles.d.ts +7 -1
  38. package/dist/InputBase/styles.es.js +45 -5
  39. package/dist/InputBase/types.d.ts +5 -1
  40. package/dist/InputDate/styles.d.ts +1 -1
  41. package/dist/InputNumber/styles.d.ts +1 -1
  42. package/dist/Layout/Footer.cjs.js +9 -0
  43. package/dist/Layout/Footer.d.ts +1 -2
  44. package/dist/Layout/Footer.es.js +9 -0
  45. package/dist/Layout/Header.cjs.js +12 -4
  46. package/dist/Layout/Header.es.js +12 -4
  47. package/dist/Layout/Layout.cjs.js +8 -3
  48. package/dist/Layout/Layout.d.ts +1 -1
  49. package/dist/Layout/Layout.es.js +8 -3
  50. package/dist/Layout/Sidebar.cjs.js +2 -1
  51. package/dist/Layout/Sidebar.es.js +2 -1
  52. package/dist/Layout/styles.cjs.js +6 -4
  53. package/dist/Layout/styles.d.ts +2 -0
  54. package/dist/Layout/styles.es.js +6 -4
  55. package/dist/Layout/types.d.ts +6 -0
  56. package/dist/Menu/MenuItem.cjs.js +9 -1
  57. package/dist/Menu/MenuItem.es.js +9 -1
  58. package/dist/Menu/styles.cjs.js +3 -1
  59. package/dist/Menu/styles.es.js +3 -1
  60. package/dist/Menu/types.d.ts +4 -1
  61. package/dist/Modal/Modal.cjs.js +2 -2
  62. package/dist/Modal/Modal.es.js +2 -2
  63. package/dist/Modal/styles.cjs.js +3 -1
  64. package/dist/Modal/styles.es.js +3 -1
  65. package/dist/Select/Select.cjs.js +2 -5
  66. package/dist/Select/Select.es.js +2 -5
  67. package/dist/Select/helpers.d.ts +8 -0
  68. package/dist/Select/styles.d.ts +1 -1
  69. package/dist/Select/useSelect.d.ts +8 -0
  70. package/dist/Slider/Slider.cjs.js +122 -224
  71. package/dist/Slider/Slider.d.ts +1 -1
  72. package/dist/Slider/Slider.es.js +125 -227
  73. package/dist/Slider/styles.cjs.js +49 -32
  74. package/dist/Slider/styles.d.ts +1 -1
  75. package/dist/Slider/styles.es.js +49 -32
  76. package/dist/Slider/useSlider.cjs.js +194 -0
  77. package/dist/Slider/useSlider.d.ts +11 -0
  78. package/dist/Slider/useSlider.es.js +194 -0
  79. package/dist/Stepper/Step.cjs.js +114 -0
  80. package/dist/Stepper/Step.d.ts +2 -0
  81. package/dist/Stepper/Step.es.js +114 -0
  82. package/dist/Stepper/StepContent.cjs.js +10 -0
  83. package/dist/Stepper/StepContent.d.ts +4 -0
  84. package/dist/Stepper/StepContent.es.js +10 -0
  85. package/dist/Stepper/StepLabel.cjs.js +28 -0
  86. package/dist/Stepper/StepLabel.d.ts +2 -0
  87. package/dist/Stepper/StepLabel.es.js +28 -0
  88. package/dist/Stepper/Stepper.cjs.js +54 -0
  89. package/dist/Stepper/Stepper.d.ts +2 -0
  90. package/dist/Stepper/Stepper.es.js +54 -0
  91. package/dist/Stepper/StepperContext.cjs.js +13 -0
  92. package/dist/Stepper/StepperContext.d.ts +3 -0
  93. package/dist/Stepper/StepperContext.es.js +13 -0
  94. package/dist/Stepper/index.cjs.js +10 -0
  95. package/dist/Stepper/index.d.ts +12 -0
  96. package/dist/Stepper/index.es.js +11 -0
  97. package/dist/Stepper/styles.cjs.js +149 -0
  98. package/dist/Stepper/styles.d.ts +44 -0
  99. package/dist/Stepper/styles.es.js +149 -0
  100. package/dist/Stepper/types.d.ts +70 -0
  101. package/dist/TextField/TextField.cjs.js +4 -0
  102. package/dist/TextField/TextField.d.ts +1 -1
  103. package/dist/TextField/TextField.es.js +4 -0
  104. package/dist/TextField/styles.d.ts +1 -1
  105. package/dist/Textarea/styles.d.ts +1 -1
  106. package/dist/Tooltip/Tooltip.cjs.js +3 -1
  107. package/dist/Tooltip/Tooltip.es.js +4 -2
  108. package/dist/index.cjs.js +4 -0
  109. package/dist/index.d.ts +2 -0
  110. package/dist/index.es.js +4 -0
  111. package/dist/typography/Text/Text.cjs.js +2 -2
  112. package/dist/typography/Text/Text.es.js +2 -2
  113. package/dist/typography/Text/types.d.ts +1 -1
  114. package/package.json +1 -1
@@ -2,17 +2,26 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const styled = require("styled-components");
4
4
  const polished = require("polished");
5
+ const Text = require("../typography/Text/Text.cjs.js");
6
+ const InputBaseAddonWrapper = styled.div`
7
+ margin-inline-start: -0.0625rem;
8
+ `;
9
+ const InputBaseRightAddonWrapper = styled.div`
10
+ margin-inline-end: -0.75rem;
11
+ `;
5
12
  const InputBaseContainer = styled.div.attrs({
6
13
  className: "quen-ui__input-base__container"
7
14
  }).withConfig({
8
- shouldForwardProp: (prop) => !["size", "error", "disabled"].includes(prop)
15
+ shouldForwardProp: (prop) => !["size", "error", "disabled", "leftContent"].includes(prop)
9
16
  })`
10
17
  height: ${({ size, theme }) => theme.control.height[size]};
11
18
  border-radius: ${({ theme }) => theme.control.radius};
12
19
  border: ${({ theme }) => `${theme.control.borderWidth} solid ${theme.colors.grayViolet[9]}`};
13
20
  display: flex;
14
21
  align-items: center;
15
- padding-left: ${({ size }) => size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
22
+ ${({ size, leftContent }) => !leftContent && styled.css`
23
+ padding-left: ${size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
24
+ `};
16
25
  gap: 0.5rem;
17
26
 
18
27
  svg {
@@ -21,9 +30,18 @@ const InputBaseContainer = styled.div.attrs({
21
30
 
22
31
  &:hover {
23
32
  ${({ theme }) => styled.css`
33
+ border-bottom: ${theme.control.borderWidth} solid
34
+ ${theme.colors[theme.primaryColor][9]};
35
+ `};
36
+
37
+ ${InputBaseAddonWrapper} {
38
+ ${({ theme, size }) => styled.css`
39
+ height: ${polished.math(`${theme.control.height[size]} - 0.0625rem`)};
40
+ border-bottom-left-radius: ${theme.control.radius};
24
41
  border-bottom: ${theme.control.borderWidth} solid
25
42
  ${theme.colors[theme.primaryColor][9]};
26
- `}
43
+ `};
44
+ }
27
45
  }
28
46
 
29
47
  ${({ error, theme }) => error && styled.css`
@@ -37,7 +55,18 @@ const InputBaseContainer = styled.div.attrs({
37
55
  ${theme.components.Input.disabledColor}!important;
38
56
  `};
39
57
  `;
40
- const InputBaseWrapper = styled.div`
58
+ const InputContentText = styled(Text)`
59
+ background: ${({ theme }) => theme.components.Input.borderColor};
60
+ border-right: 1px solid ${({ theme }) => theme.components.Input.disabledColor};
61
+ height: ${({ theme, size = "m" }) => polished.math(`${theme.control.height[size]} - 0.0625rem`)};
62
+ display: flex;
63
+ align-items: center;
64
+ padding-left: ${({ size }) => size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
65
+ padding-right: ${({ size }) => size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
66
+ `;
67
+ const InputBaseWrapper = styled.div.withConfig({
68
+ shouldForwardProp: (prop) => !["size"].includes(prop)
69
+ })`
41
70
  display: flex;
42
71
  flex-direction: column;
43
72
  gap: 0.5rem;
@@ -52,10 +81,21 @@ const InputBaseWrapper = styled.div`
52
81
  }
53
82
 
54
83
  &.quen-ui__input-base--focus-input {
84
+ ${InputContentText} {
85
+ height: ${({ theme, size = "m" }) => polished.math(`${theme.control.height[size]} - 0.125rem`)};
86
+ }
87
+
88
+ ${InputBaseAddonWrapper} {
89
+ height: ${({ theme, size = "m" }) => polished.math(`${theme.control.height[size]} - 0.125rem`)};
90
+ }
91
+
55
92
  ${InputBaseContainer} {
56
93
  border-bottom: ${({ theme }) => `${polished.math(`${theme.control.borderWidth} * 2`)} solid ${theme.colors[theme.primaryColor][9]}`};
57
94
  }
58
95
  }
59
96
  `;
97
+ exports.InputBaseAddonWrapper = InputBaseAddonWrapper;
60
98
  exports.InputBaseContainer = InputBaseContainer;
99
+ exports.InputBaseRightAddonWrapper = InputBaseRightAddonWrapper;
61
100
  exports.InputBaseWrapper = InputBaseWrapper;
101
+ exports.InputContentText = InputContentText;
@@ -1,7 +1,13 @@
1
1
  import { TQuenSize } from '../types/size';
2
+ export declare const InputBaseAddonWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const InputBaseRightAddonWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
4
  export declare const InputBaseContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, {
3
5
  size: TQuenSize;
4
6
  error?: string | boolean;
5
7
  disabled?: boolean;
8
+ leftContent?: boolean;
9
+ }>> & string;
10
+ export declare const InputContentText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('..').ITextProps, never>> & string & Omit<import('react').FC<import('..').ITextProps>, keyof import('react').Component<any, {}, any>>;
11
+ export declare const InputBaseWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
12
+ size: TQuenSize;
6
13
  }>> & string;
7
- export declare const InputBaseWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,16 +1,25 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { math } from "polished";
3
+ import Text from "../typography/Text/Text.es.js";
4
+ const InputBaseAddonWrapper = styled.div`
5
+ margin-inline-start: -0.0625rem;
6
+ `;
7
+ const InputBaseRightAddonWrapper = styled.div`
8
+ margin-inline-end: -0.75rem;
9
+ `;
3
10
  const InputBaseContainer = styled.div.attrs({
4
11
  className: "quen-ui__input-base__container"
5
12
  }).withConfig({
6
- shouldForwardProp: (prop) => !["size", "error", "disabled"].includes(prop)
13
+ shouldForwardProp: (prop) => !["size", "error", "disabled", "leftContent"].includes(prop)
7
14
  })`
8
15
  height: ${({ size, theme }) => theme.control.height[size]};
9
16
  border-radius: ${({ theme }) => theme.control.radius};
10
17
  border: ${({ theme }) => `${theme.control.borderWidth} solid ${theme.colors.grayViolet[9]}`};
11
18
  display: flex;
12
19
  align-items: center;
13
- padding-left: ${({ size }) => size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
20
+ ${({ size, leftContent }) => !leftContent && css`
21
+ padding-left: ${size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
22
+ `};
14
23
  gap: 0.5rem;
15
24
 
16
25
  svg {
@@ -19,9 +28,18 @@ const InputBaseContainer = styled.div.attrs({
19
28
 
20
29
  &:hover {
21
30
  ${({ theme }) => css`
31
+ border-bottom: ${theme.control.borderWidth} solid
32
+ ${theme.colors[theme.primaryColor][9]};
33
+ `};
34
+
35
+ ${InputBaseAddonWrapper} {
36
+ ${({ theme, size }) => css`
37
+ height: ${math(`${theme.control.height[size]} - 0.0625rem`)};
38
+ border-bottom-left-radius: ${theme.control.radius};
22
39
  border-bottom: ${theme.control.borderWidth} solid
23
40
  ${theme.colors[theme.primaryColor][9]};
24
- `}
41
+ `};
42
+ }
25
43
  }
26
44
 
27
45
  ${({ error, theme }) => error && css`
@@ -35,7 +53,18 @@ const InputBaseContainer = styled.div.attrs({
35
53
  ${theme.components.Input.disabledColor}!important;
36
54
  `};
37
55
  `;
38
- const InputBaseWrapper = styled.div`
56
+ const InputContentText = styled(Text)`
57
+ background: ${({ theme }) => theme.components.Input.borderColor};
58
+ border-right: 1px solid ${({ theme }) => theme.components.Input.disabledColor};
59
+ height: ${({ theme, size = "m" }) => math(`${theme.control.height[size]} - 0.0625rem`)};
60
+ display: flex;
61
+ align-items: center;
62
+ padding-left: ${({ size }) => size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
63
+ padding-right: ${({ size }) => size === "xs" || size === "s" ? "0.385rem" : "0.75rem"};
64
+ `;
65
+ const InputBaseWrapper = styled.div.withConfig({
66
+ shouldForwardProp: (prop) => !["size"].includes(prop)
67
+ })`
39
68
  display: flex;
40
69
  flex-direction: column;
41
70
  gap: 0.5rem;
@@ -50,12 +79,23 @@ const InputBaseWrapper = styled.div`
50
79
  }
51
80
 
52
81
  &.quen-ui__input-base--focus-input {
82
+ ${InputContentText} {
83
+ height: ${({ theme, size = "m" }) => math(`${theme.control.height[size]} - 0.125rem`)};
84
+ }
85
+
86
+ ${InputBaseAddonWrapper} {
87
+ height: ${({ theme, size = "m" }) => math(`${theme.control.height[size]} - 0.125rem`)};
88
+ }
89
+
53
90
  ${InputBaseContainer} {
54
91
  border-bottom: ${({ theme }) => `${math(`${theme.control.borderWidth} * 2`)} solid ${theme.colors[theme.primaryColor][9]}`};
55
92
  }
56
93
  }
57
94
  `;
58
95
  export {
96
+ InputBaseAddonWrapper,
59
97
  InputBaseContainer,
60
- InputBaseWrapper
98
+ InputBaseRightAddonWrapper,
99
+ InputBaseWrapper,
100
+ InputContentText
61
101
  };
@@ -13,8 +13,12 @@ export interface IInputBaseProps {
13
13
  error?: string | boolean;
14
14
  /** Left adornment (icon/prefix) */
15
15
  leftContent?: ReactNode;
16
- /** Right adornment (icon/suffix) */
16
+ /** Determines the visual display mode of leftContent */
17
+ leftContentVariant?: "icon" | "text" | "addon";
18
+ /** Right adornment (icon/suffix) */
17
19
  rightContent?: ReactNode;
20
+ /** Determines the visual display mode of rightContent */
21
+ rightContentVariant?: "icon" | "text" | "addon";
18
22
  /** DOM ID for label association */
19
23
  id?: string;
20
24
  /** Container class name */
@@ -1,5 +1,5 @@
1
1
  import { IInputBaseProps } from '../InputBase';
2
2
  export declare const InputBaseStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<IInputBaseProps & {
3
3
  children?: import('react').ReactNode | undefined;
4
- }, IInputBaseProps>> & string & Omit<({ label, className, size, id, required, style, error, disabled, children, leftContent, rightContent, ...props }: import('react').PropsWithChildren<IInputBaseProps>) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
4
+ }, IInputBaseProps>> & string & Omit<({ label, className, size, id, required, style, error, disabled, children, leftContent, rightContent, leftContentVariant, rightContentVariant, ...props }: import('react').PropsWithChildren<IInputBaseProps>) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
5
5
  export declare const InputDateStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
@@ -1,7 +1,7 @@
1
1
  import { IInputBaseProps } from '../InputBase';
2
2
  export declare const InputBaseStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<IInputBaseProps & {
3
3
  children?: import('react').ReactNode | undefined;
4
- }, IInputBaseProps>> & string & Omit<({ label, className, size, id, required, style, error, disabled, children, leftContent, rightContent, ...props }: import('react').PropsWithChildren<IInputBaseProps>) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
4
+ }, IInputBaseProps>> & string & Omit<({ label, className, size, id, required, style, error, disabled, children, leftContent, rightContent, leftContentVariant, rightContentVariant, ...props }: import('react').PropsWithChildren<IInputBaseProps>) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
5
5
  export declare const InputNumberStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('rc-input-number').InputNumberProps<import('rc-input-number').ValueType> & {
6
6
  children?: React.ReactNode;
7
7
  } & {
@@ -1,7 +1,16 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
+ const React = require("react");
3
4
  const styles = require("./styles.cjs.js");
5
+ const Layout = require("./Layout.cjs.js");
4
6
  const Footer = ({ children }) => {
7
+ const { setIsFooter } = Layout.useLayout();
8
+ React.useEffect(() => {
9
+ setIsFooter(true);
10
+ return () => {
11
+ setIsFooter(false);
12
+ };
13
+ }, []);
5
14
  return /* @__PURE__ */ jsxRuntime.jsx(styles.FooterStyled, { children });
6
15
  };
7
16
  module.exports = Footer;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { ILayoutFooterProps } from './types';
3
- declare const Footer: ({ children }: ILayoutFooterProps) => React.ReactElement;
2
+ declare const Footer: ({ children }: ILayoutFooterProps) => import("react/jsx-runtime").JSX.Element;
4
3
  export default Footer;
@@ -1,6 +1,15 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
2
3
  import { FooterStyled } from "./styles.es.js";
4
+ import { useLayout } from "./Layout.es.js";
3
5
  const Footer = ({ children }) => {
6
+ const { setIsFooter } = useLayout();
7
+ useEffect(() => {
8
+ setIsFooter(true);
9
+ return () => {
10
+ setIsFooter(false);
11
+ };
12
+ }, []);
4
13
  return /* @__PURE__ */ jsx(FooterStyled, { children });
5
14
  };
6
15
  export {
@@ -19,10 +19,18 @@ const Header = ({
19
19
  }) => {
20
20
  const { mobile, toggleSidebar, sidebarOpen } = Layout.useLayout();
21
21
  return /* @__PURE__ */ jsxRuntime.jsxs(styles.HeaderStyled, { className, style, height, children: [
22
- /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "s", align: "center", className: "quen-ui__layout-header__logo-wrapper", children: [
23
- mobile && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: toggleSidebar, children: sidebarOpen ? /* @__PURE__ */ jsxRuntime.jsx(iconClose, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconLines, {}) }),
24
- logo
25
- ] }),
22
+ (logo || mobile) && /* @__PURE__ */ jsxRuntime.jsxs(
23
+ Flex,
24
+ {
25
+ gap: "s",
26
+ align: "center",
27
+ className: "quen-ui__layout-header__logo-wrapper",
28
+ children: [
29
+ mobile && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: toggleSidebar, children: sidebarOpen ? /* @__PURE__ */ jsxRuntime.jsx(iconClose, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconLines, {}) }),
30
+ logo
31
+ ]
32
+ }
33
+ ),
26
34
  /* @__PURE__ */ jsxRuntime.jsxs(
27
35
  Flex,
28
36
  {
@@ -18,10 +18,18 @@ const Header = ({
18
18
  }) => {
19
19
  const { mobile, toggleSidebar, sidebarOpen } = useLayout();
20
20
  return /* @__PURE__ */ jsxs(HeaderStyled, { className, style, height, children: [
21
- /* @__PURE__ */ jsxs(Flex, { gap: "s", align: "center", className: "quen-ui__layout-header__logo-wrapper", children: [
22
- mobile && /* @__PURE__ */ jsx(Button, { onClick: toggleSidebar, children: sidebarOpen ? /* @__PURE__ */ jsx(SvgIconClose, {}) : /* @__PURE__ */ jsx(SvgIconLines, {}) }),
23
- logo
24
- ] }),
21
+ (logo || mobile) && /* @__PURE__ */ jsxs(
22
+ Flex,
23
+ {
24
+ gap: "s",
25
+ align: "center",
26
+ className: "quen-ui__layout-header__logo-wrapper",
27
+ children: [
28
+ mobile && /* @__PURE__ */ jsx(Button, { onClick: toggleSidebar, children: sidebarOpen ? /* @__PURE__ */ jsx(SvgIconClose, {}) : /* @__PURE__ */ jsx(SvgIconLines, {}) }),
29
+ logo
30
+ ]
31
+ }
32
+ ),
25
33
  /* @__PURE__ */ jsxs(
26
34
  Flex,
27
35
  {
@@ -6,11 +6,14 @@ const styles = require("./styles.cjs.js");
6
6
  const LayoutContext = React.createContext(null);
7
7
  const Layout = ({
8
8
  children,
9
- breakpoint = 768
9
+ breakpoint = 768,
10
+ className,
11
+ style
10
12
  }) => {
11
13
  const [mobile, setMobile] = React.useState(false);
12
14
  const [sidebarOpen, setSidebarOpen] = React.useState(false);
13
15
  const [sliderCollapsed, setSliderCollapsed] = React.useState(false);
16
+ const [isFooter, setIsFooter] = React.useState(false);
14
17
  React.useEffect(() => {
15
18
  const checkScreenSize = () => {
16
19
  setMobile(window.innerWidth <= breakpoint);
@@ -32,9 +35,11 @@ const Layout = ({
32
35
  sidebarOpen,
33
36
  sliderCollapsed,
34
37
  toggleSidebar,
35
- toggleSliderCollapse
38
+ toggleSliderCollapse,
39
+ setIsFooter,
40
+ isFooter
36
41
  },
37
- children: /* @__PURE__ */ jsxRuntime.jsx(styles.LayoutStyled, { breakpoint, children })
42
+ children: /* @__PURE__ */ jsxRuntime.jsx(styles.LayoutStyled, { breakpoint, isFooter, className, style, children })
38
43
  }
39
44
  );
40
45
  };
@@ -1,5 +1,5 @@
1
1
  import { default as React, PropsWithChildren } from 'react';
2
2
  import { ILayoutProps, ILayoutContextProps } from './types';
3
- declare const Layout: ({ children, breakpoint }: PropsWithChildren<ILayoutProps>) => React.ReactNode;
3
+ declare const Layout: ({ children, breakpoint, className, style }: PropsWithChildren<ILayoutProps>) => React.ReactNode;
4
4
  export declare const useLayout: () => ILayoutContextProps;
5
5
  export default Layout;
@@ -4,11 +4,14 @@ import { LayoutStyled } from "./styles.es.js";
4
4
  const LayoutContext = createContext(null);
5
5
  const Layout = ({
6
6
  children,
7
- breakpoint = 768
7
+ breakpoint = 768,
8
+ className,
9
+ style
8
10
  }) => {
9
11
  const [mobile, setMobile] = useState(false);
10
12
  const [sidebarOpen, setSidebarOpen] = useState(false);
11
13
  const [sliderCollapsed, setSliderCollapsed] = useState(false);
14
+ const [isFooter, setIsFooter] = useState(false);
12
15
  useEffect(() => {
13
16
  const checkScreenSize = () => {
14
17
  setMobile(window.innerWidth <= breakpoint);
@@ -30,9 +33,11 @@ const Layout = ({
30
33
  sidebarOpen,
31
34
  sliderCollapsed,
32
35
  toggleSidebar,
33
- toggleSliderCollapse
36
+ toggleSliderCollapse,
37
+ setIsFooter,
38
+ isFooter
34
39
  },
35
- children: /* @__PURE__ */ jsx(LayoutStyled, { breakpoint, children })
40
+ children: /* @__PURE__ */ jsx(LayoutStyled, { breakpoint, isFooter, className, style, children })
36
41
  }
37
42
  );
38
43
  };
@@ -14,7 +14,7 @@ const Sidebar = ({
14
14
  classNameMenuItem,
15
15
  activeMenuKeys
16
16
  }) => {
17
- const { mobile, toggleSidebar, sidebarOpen } = Layout.useLayout();
17
+ const { mobile, toggleSidebar, sidebarOpen, isFooter } = Layout.useLayout();
18
18
  if (mobile) {
19
19
  return /* @__PURE__ */ jsxRuntime.jsxs(Drawer, { open: sidebarOpen, onClose: toggleSidebar, title: titleDrawer, children: [
20
20
  children,
@@ -33,6 +33,7 @@ const Sidebar = ({
33
33
  return /* @__PURE__ */ jsxRuntime.jsxs(
34
34
  styles.SidebarStyled,
35
35
  {
36
+ isFooter,
36
37
  collapsed,
37
38
  collapsible,
38
39
  className,
@@ -13,7 +13,7 @@ const Sidebar = ({
13
13
  classNameMenuItem,
14
14
  activeMenuKeys
15
15
  }) => {
16
- const { mobile, toggleSidebar, sidebarOpen } = useLayout();
16
+ const { mobile, toggleSidebar, sidebarOpen, isFooter } = useLayout();
17
17
  if (mobile) {
18
18
  return /* @__PURE__ */ jsxs(Drawer, { open: sidebarOpen, onClose: toggleSidebar, title: titleDrawer, children: [
19
19
  children,
@@ -32,6 +32,7 @@ const Sidebar = ({
32
32
  return /* @__PURE__ */ jsxs(
33
33
  SidebarStyled,
34
34
  {
35
+ isFooter,
35
36
  collapsed,
36
37
  collapsible,
37
38
  className,
@@ -18,6 +18,7 @@ const HeaderStyled = styled.styled.header.withConfig({
18
18
 
19
19
  display: flex;
20
20
  flex-wrap: wrap;
21
+ gap: 1rem;
21
22
 
22
23
  background: ${({ theme }) => theme.components.Layout.headerBackground};
23
24
 
@@ -34,18 +35,19 @@ const FooterStyled = styled.styled.footer`
34
35
  grid-area: footer;
35
36
  `;
36
37
  const SidebarStyled = styled.styled.aside.withConfig({
37
- shouldForwardProp: (prop) => !["isMobile", "isOpen", "isCollapsed", "collapsedWidth"].includes(prop)
38
+ shouldForwardProp: (prop) => !["isMobile", "isOpen", "isCollapsed", "collapsedWidth", "isFooter"].includes(prop)
38
39
  })`
39
40
  grid-area: slider;
40
41
  min-width: ${({ collapsible, collapsed, collapsedWidth }) => collapsible && collapsed ? collapsedWidth : "250px"};
41
42
  background: ${({ theme }) => theme.components.Layout.sidebarBackground};
42
43
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
44
+ border-right: 1px solid ${({ theme }) => theme.components.Layout.borderColor};
43
45
  position: relative;
44
46
  overflow: auto;
45
47
  padding: ${({ theme }) => theme.space.xs};
46
48
  flex-direction: column;
47
49
  display: flex;
48
- height: calc(100vh - 87px);
50
+ height: calc(100vh - ${({ isFooter }) => isFooter ? 87 : 53}px);
49
51
 
50
52
  ${({ mobile }) => mobile && styled.css`
51
53
  position: fixed;
@@ -68,7 +70,7 @@ const ContentStyled = styled.styled.main`
68
70
  height: 100vh;
69
71
  `;
70
72
  const LayoutStyled = styled.styled.div.withConfig({
71
- shouldForwardProp: (prop) => !["breakpoint"].includes(prop)
73
+ shouldForwardProp: (prop) => !["breakpoint", "isFooter"].includes(prop)
72
74
  })`
73
75
  display: grid;
74
76
  min-height: 100vh;
@@ -87,7 +89,7 @@ const LayoutStyled = styled.styled.div.withConfig({
87
89
 
88
90
  &:has(${HeaderStyled}) {
89
91
  ${ContentStyled} {
90
- height: calc(100vh - 71px);
92
+ height: calc(100vh - ${({ isFooter }) => isFooter ? 71 : 56}px);
91
93
  }
92
94
  }
93
95
  `;
@@ -10,10 +10,12 @@ export declare const SidebarStyled: import('styled-components/dist/types').IStyl
10
10
  collapsible?: boolean;
11
11
  collapsed?: boolean;
12
12
  collapsedWidth?: number;
13
+ isFooter: boolean;
13
14
  }>> & string;
14
15
  export declare const ContentStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
15
16
  export declare const LayoutStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
16
17
  breakpoint: number;
18
+ isFooter: boolean;
17
19
  }>> & string;
18
20
  export declare const OverlayStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
21
  export declare const SidebarMenuStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('..').IMenuProps<Record<string, any>>, never>> & string & Omit<(<Item extends Record<string, any> = import('..').IMenuDefaultItem>(props: import('..').IMenuProps<Item>) => import("react/jsx-runtime").JSX.Element), keyof import('react').Component<any, {}, any>>;
@@ -16,6 +16,7 @@ const HeaderStyled = styled.header.withConfig({
16
16
 
17
17
  display: flex;
18
18
  flex-wrap: wrap;
19
+ gap: 1rem;
19
20
 
20
21
  background: ${({ theme }) => theme.components.Layout.headerBackground};
21
22
 
@@ -32,18 +33,19 @@ const FooterStyled = styled.footer`
32
33
  grid-area: footer;
33
34
  `;
34
35
  const SidebarStyled = styled.aside.withConfig({
35
- shouldForwardProp: (prop) => !["isMobile", "isOpen", "isCollapsed", "collapsedWidth"].includes(prop)
36
+ shouldForwardProp: (prop) => !["isMobile", "isOpen", "isCollapsed", "collapsedWidth", "isFooter"].includes(prop)
36
37
  })`
37
38
  grid-area: slider;
38
39
  min-width: ${({ collapsible, collapsed, collapsedWidth }) => collapsible && collapsed ? collapsedWidth : "250px"};
39
40
  background: ${({ theme }) => theme.components.Layout.sidebarBackground};
40
41
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
42
+ border-right: 1px solid ${({ theme }) => theme.components.Layout.borderColor};
41
43
  position: relative;
42
44
  overflow: auto;
43
45
  padding: ${({ theme }) => theme.space.xs};
44
46
  flex-direction: column;
45
47
  display: flex;
46
- height: calc(100vh - 87px);
48
+ height: calc(100vh - ${({ isFooter }) => isFooter ? 87 : 53}px);
47
49
 
48
50
  ${({ mobile }) => mobile && css`
49
51
  position: fixed;
@@ -66,7 +68,7 @@ const ContentStyled = styled.main`
66
68
  height: 100vh;
67
69
  `;
68
70
  const LayoutStyled = styled.div.withConfig({
69
- shouldForwardProp: (prop) => !["breakpoint"].includes(prop)
71
+ shouldForwardProp: (prop) => !["breakpoint", "isFooter"].includes(prop)
70
72
  })`
71
73
  display: grid;
72
74
  min-height: 100vh;
@@ -85,7 +87,7 @@ const LayoutStyled = styled.div.withConfig({
85
87
 
86
88
  &:has(${HeaderStyled}) {
87
89
  ${ContentStyled} {
88
- height: calc(100vh - 71px);
90
+ height: calc(100vh - ${({ isFooter }) => isFooter ? 71 : 56}px);
89
91
  }
90
92
  }
91
93
  `;
@@ -11,6 +11,8 @@ export interface ILayoutContextProps {
11
11
  toggleSidebar: () => void;
12
12
  /** Toggles desktop sidebar collapse state */
13
13
  toggleSliderCollapse: () => void;
14
+ setIsFooter: (isFooter: boolean) => void;
15
+ isFooter: boolean;
14
16
  }
15
17
  export interface ILayoutHeaderProps {
16
18
  /** Custom CSS classes */
@@ -30,6 +32,10 @@ export interface ILayoutHeaderProps {
30
32
  export interface ILayoutProps {
31
33
  /** Viewport width (px) for mobile/desktop switch */
32
34
  breakpoint?: number;
35
+ /** Custom CSS classes */
36
+ className?: string;
37
+ /** Inline styles */
38
+ style?: React.CSSProperties;
33
39
  }
34
40
  export interface ILayoutSidebarProps {
35
41
  /** Desktop collapsed state */
@@ -24,6 +24,7 @@ const MenuItem = ({
24
24
  const refMenuItem = React.useRef(null);
25
25
  const hasChildren = !!item.children?.length;
26
26
  const [visible, setVisible] = React.useState(false);
27
+ const { key: _, ...otherProps } = item;
27
28
  const handleMouseEnter = () => {
28
29
  setVisible(true);
29
30
  };
@@ -42,13 +43,20 @@ const MenuItem = ({
42
43
  className: helpers.cnMerge(getItemClassName(item), className),
43
44
  active: activeKeys?.includes(getItemKey(item)),
44
45
  onClick: getItemOnClick(item),
46
+ as: item.as,
47
+ ...otherProps,
45
48
  children: [
46
49
  getItemLeftContent(item),
47
50
  /* @__PURE__ */ jsxRuntime.jsx(
48
51
  Text,
49
52
  {
50
53
  size,
51
- className: helpers.cnMerge({ "quen-ui--menu__item_group": hasChildren && direction === "vertical" }, "quen-ui--menu__item_label"),
54
+ className: helpers.cnMerge(
55
+ {
56
+ "quen-ui--menu__item_group": hasChildren && direction === "vertical"
57
+ },
58
+ "quen-ui--menu__item_label"
59
+ ),
52
60
  children: getItemLabel(item)
53
61
  }
54
62
  ),
@@ -23,6 +23,7 @@ const MenuItem = ({
23
23
  const refMenuItem = useRef(null);
24
24
  const hasChildren = !!item.children?.length;
25
25
  const [visible, setVisible] = useState(false);
26
+ const { key: _, ...otherProps } = item;
26
27
  const handleMouseEnter = () => {
27
28
  setVisible(true);
28
29
  };
@@ -41,13 +42,20 @@ const MenuItem = ({
41
42
  className: cnMerge(getItemClassName(item), className),
42
43
  active: activeKeys?.includes(getItemKey(item)),
43
44
  onClick: getItemOnClick(item),
45
+ as: item.as,
46
+ ...otherProps,
44
47
  children: [
45
48
  getItemLeftContent(item),
46
49
  /* @__PURE__ */ jsx(
47
50
  Text,
48
51
  {
49
52
  size,
50
- className: cnMerge({ "quen-ui--menu__item_group": hasChildren && direction === "vertical" }, "quen-ui--menu__item_label"),
53
+ className: cnMerge(
54
+ {
55
+ "quen-ui--menu__item_group": hasChildren && direction === "vertical"
56
+ },
57
+ "quen-ui--menu__item_label"
58
+ ),
51
59
  children: getItemLabel(item)
52
60
  }
53
61
  ),
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const styled = require("styled-components");
4
4
  const Flex = require("../Flex/Flex.cjs.js");
5
5
  const MenuItemStyled = styled.button.withConfig({
6
- shouldForwardProp: (prop) => !["disabled", "active", "hover"].includes(prop)
6
+ shouldForwardProp: (prop) => !["disabled", "active", "hover", "leftContent", "label"].includes(prop)
7
7
  }).attrs((props) => ({
8
8
  className: props.active ? "quen-ui__menu-item--active" : "quen-ui__menu-item"
9
9
  }))`
@@ -18,6 +18,7 @@ const MenuItemStyled = styled.button.withConfig({
18
18
  transition: background 0.2s ease;
19
19
  background: transparent;
20
20
  justify-content: flex-start;
21
+ text-decoration: none;
21
22
 
22
23
  color: ${({ theme, disabled }) => disabled ? theme.components.Menu.disabledColor : theme.components.Menu.color};
23
24
 
@@ -44,6 +45,7 @@ const MenuItemStyled = styled.button.withConfig({
44
45
 
45
46
  .quen-ui--menu__item_label {
46
47
  width: 100%;
48
+ text-align: left;
47
49
  }
48
50
 
49
51
  &:hover {