@quen-ui/components 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/Button/styles.cjs.js +6 -10
  2. package/dist/Button/styles.es.js +6 -10
  3. package/dist/Calendar/Calendar.cjs.js +5 -3
  4. package/dist/Calendar/Calendar.es.js +5 -3
  5. package/dist/Calendar/styles.cjs.js +0 -1
  6. package/dist/Calendar/styles.es.js +0 -1
  7. package/dist/Card/Card.cjs.js +8 -4
  8. package/dist/Card/Card.d.ts +1 -1
  9. package/dist/Card/Card.es.js +8 -4
  10. package/dist/Card/styles.cjs.js +9 -3
  11. package/dist/Card/styles.d.ts +3 -1
  12. package/dist/Card/styles.es.js +9 -3
  13. package/dist/Card/types.d.ts +2 -0
  14. package/dist/Drawer/Drawer.cjs.js +2 -2
  15. package/dist/Dropdown/Dropdown.cjs.js +2 -2
  16. package/dist/Form/Form.cjs.js +1 -1
  17. package/dist/Form/Form.es.js +1 -1
  18. package/dist/Image/styles.cjs.js +3 -1
  19. package/dist/Image/styles.es.js +3 -1
  20. package/dist/Layout/Footer.cjs.js +9 -0
  21. package/dist/Layout/Footer.d.ts +1 -2
  22. package/dist/Layout/Footer.es.js +9 -0
  23. package/dist/Layout/Header.cjs.js +12 -4
  24. package/dist/Layout/Header.es.js +12 -4
  25. package/dist/Layout/Layout.cjs.js +8 -3
  26. package/dist/Layout/Layout.d.ts +1 -1
  27. package/dist/Layout/Layout.es.js +8 -3
  28. package/dist/Layout/Sidebar.cjs.js +2 -1
  29. package/dist/Layout/Sidebar.es.js +2 -1
  30. package/dist/Layout/styles.cjs.js +6 -4
  31. package/dist/Layout/styles.d.ts +2 -0
  32. package/dist/Layout/styles.es.js +6 -4
  33. package/dist/Layout/types.d.ts +6 -0
  34. package/dist/Menu/MenuItem.cjs.js +9 -1
  35. package/dist/Menu/MenuItem.es.js +9 -1
  36. package/dist/Menu/styles.cjs.js +3 -1
  37. package/dist/Menu/styles.es.js +3 -1
  38. package/dist/Menu/types.d.ts +4 -1
  39. package/dist/Modal/Modal.cjs.js +4 -4
  40. package/dist/Modal/Modal.es.js +2 -2
  41. package/dist/Modal/styles.cjs.js +3 -1
  42. package/dist/Modal/styles.es.js +3 -1
  43. package/dist/Notification/NotificationInstance.cjs.js +2 -2
  44. package/dist/RichTextEditor/plugins.cjs.js +28 -51
  45. package/dist/RichTextEditor/plugins.es.js +4 -27
  46. package/dist/index.cjs.js +93 -0
  47. package/dist/index.d.ts +65 -1
  48. package/dist/index.es.js +93 -0
  49. package/dist/typography/Text/Text.cjs.js +2 -2
  50. package/dist/typography/Text/Text.es.js +2 -2
  51. package/dist/typography/Text/types.d.ts +1 -1
  52. package/package.json +3 -2
  53. package/dist/_virtual/client.cjs.js +0 -5
  54. package/dist/_virtual/client.cjs2.js +0 -4
  55. package/dist/_virtual/client.es.js +0 -5
  56. package/dist/_virtual/client.es2.js +0 -4
  57. package/dist/_virtual/index.cjs.js +0 -4
  58. package/dist/_virtual/index.es.js +0 -4
  59. package/dist/_virtual/react-dom-client.development.cjs.js +0 -4
  60. package/dist/_virtual/react-dom-client.development.es.js +0 -4
  61. package/dist/_virtual/react-dom-client.production.cjs.js +0 -4
  62. package/dist/_virtual/react-dom-client.production.es.js +0 -4
  63. package/dist/_virtual/scheduler.development.cjs.js +0 -4
  64. package/dist/_virtual/scheduler.development.es.js +0 -4
  65. package/dist/_virtual/scheduler.production.cjs.js +0 -4
  66. package/dist/_virtual/scheduler.production.es.js +0 -4
  67. package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.cjs.js +0 -30
  68. package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.es.js +0 -31
  69. package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.cjs.js +0 -23
  70. package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.es.js +0 -24
  71. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignCenter.cjs.js +0 -7
  72. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignCenter.es.js +0 -7
  73. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignJustified.cjs.js +0 -7
  74. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignJustified.es.js +0 -7
  75. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignLeft.cjs.js +0 -7
  76. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignLeft.es.js +0 -7
  77. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignRight.cjs.js +0 -7
  78. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlignRight.es.js +0 -7
  79. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowBackUp.cjs.js +0 -7
  80. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowBackUp.es.js +0 -7
  81. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowForwardUp.cjs.js +0 -7
  82. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowForwardUp.es.js +0 -7
  83. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBlockquote.cjs.js +0 -7
  84. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBlockquote.es.js +0 -7
  85. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBold.cjs.js +0 -7
  86. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBold.es.js +0 -7
  87. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.cjs.js +0 -7
  88. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheckbox.es.js +0 -7
  89. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClearFormatting.cjs.js +0 -7
  90. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClearFormatting.es.js +0 -7
  91. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH1.cjs.js +0 -7
  92. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH1.es.js +0 -7
  93. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH2.cjs.js +0 -7
  94. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconH2.es.js +0 -7
  95. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHighlight.cjs.js +0 -7
  96. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHighlight.es.js +0 -7
  97. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconImageInPicture.cjs.js +0 -7
  98. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconImageInPicture.es.js +0 -7
  99. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconItalic.cjs.js +0 -7
  100. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconItalic.es.js +0 -7
  101. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.cjs.js +0 -7
  102. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.es.js +0 -7
  103. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconList.cjs.js +0 -7
  104. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconList.es.js +0 -7
  105. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconListNumbers.cjs.js +0 -7
  106. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconListNumbers.es.js +0 -7
  107. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStrikethrough.cjs.js +0 -7
  108. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStrikethrough.es.js +0 -7
  109. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSubscript.cjs.js +0 -7
  110. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSubscript.es.js +0 -7
  111. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSuperscript.cjs.js +0 -7
  112. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSuperscript.es.js +0 -7
  113. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.cjs.js +0 -7
  114. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.es.js +0 -7
  115. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTextColor.cjs.js +0 -7
  116. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTextColor.es.js +0 -7
  117. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUnderline.cjs.js +0 -7
  118. package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUnderline.es.js +0 -7
  119. package/dist/node_modules/react-dom/cjs/react-dom-client.development.cjs.js +0 -19870
  120. package/dist/node_modules/react-dom/cjs/react-dom-client.development.es.js +0 -19870
  121. package/dist/node_modules/react-dom/cjs/react-dom-client.production.cjs.js +0 -11524
  122. package/dist/node_modules/react-dom/cjs/react-dom-client.production.es.js +0 -11524
  123. package/dist/node_modules/react-dom/client.cjs.js +0 -31
  124. package/dist/node_modules/react-dom/client.es.js +0 -31
  125. package/dist/node_modules/scheduler/cjs/scheduler.development.cjs.js +0 -264
  126. package/dist/node_modules/scheduler/cjs/scheduler.development.es.js +0 -264
  127. package/dist/node_modules/scheduler/cjs/scheduler.production.cjs.js +0 -259
  128. package/dist/node_modules/scheduler/cjs/scheduler.production.es.js +0 -259
  129. package/dist/node_modules/scheduler/index.cjs.js +0 -17
  130. package/dist/node_modules/scheduler/index.es.js +0 -17
  131. package/dist/packages/components/index.cjs.js +0 -93
  132. package/dist/packages/components/index.es.js +0 -93
@@ -6,21 +6,17 @@ const getBackground = (theme, view = "primary", isDisabled) => {
6
6
  switch (view) {
7
7
  case "secondary":
8
8
  return styled.css`
9
- background: ${theme.components.Button.secondaryBackground};
10
- color: ${theme.components.Button.color};
9
+ background: transparent;
10
+ border: 1px solid ${theme.components.Button.secondaryBackground};
11
11
 
12
12
  &:hover {
13
- background: ${polished.darken(
14
- 0.1,
15
- theme.components.Button.secondaryBackground
16
- )};
13
+ color: ${theme.colors[theme.primaryColor][7]};
14
+ border: 1px solid ${theme.colors[theme.primaryColor][7]};
17
15
  }
18
16
 
19
17
  &:active {
20
- background: ${polished.darken(
21
- 0.2,
22
- theme.components.Button.secondaryBackground
23
- )};
18
+ color: ${theme.colors[theme.primaryColor][9]};
19
+ border: 1px solid ${theme.colors[theme.primaryColor][9]};
24
20
  }
25
21
  `;
26
22
  case "danger":
@@ -4,21 +4,17 @@ const getBackground = (theme, view = "primary", isDisabled) => {
4
4
  switch (view) {
5
5
  case "secondary":
6
6
  return css`
7
- background: ${theme.components.Button.secondaryBackground};
8
- color: ${theme.components.Button.color};
7
+ background: transparent;
8
+ border: 1px solid ${theme.components.Button.secondaryBackground};
9
9
 
10
10
  &:hover {
11
- background: ${darken(
12
- 0.1,
13
- theme.components.Button.secondaryBackground
14
- )};
11
+ color: ${theme.colors[theme.primaryColor][7]};
12
+ border: 1px solid ${theme.colors[theme.primaryColor][7]};
15
13
  }
16
14
 
17
15
  &:active {
18
- background: ${darken(
19
- 0.2,
20
- theme.components.Button.secondaryBackground
21
- )};
16
+ color: ${theme.colors[theme.primaryColor][9]};
17
+ border: 1px solid ${theme.colors[theme.primaryColor][9]};
22
18
  }
23
19
  `;
24
20
  case "danger":
@@ -48,9 +48,11 @@ const Calendar = ({
48
48
  }
49
49
  }, [level]);
50
50
  React.useEffect(() => {
51
- setInternalSingleDate(null);
52
- setInternalEndDate(null);
53
- setInternalStartDate(null);
51
+ if (typeof range !== "undefined") {
52
+ setInternalSingleDate(null);
53
+ setInternalEndDate(null);
54
+ setInternalStartDate(null);
55
+ }
54
56
  }, [range]);
55
57
  const [currentMonth, setCurrentMonth] = React.useState(/* @__PURE__ */ new Date());
56
58
  const levelTitle = React.useMemo(() => {
@@ -47,9 +47,11 @@ const Calendar$1 = ({
47
47
  }
48
48
  }, [level]);
49
49
  useEffect(() => {
50
- setInternalSingleDate(null);
51
- setInternalEndDate(null);
52
- setInternalStartDate(null);
50
+ if (typeof range !== "undefined") {
51
+ setInternalSingleDate(null);
52
+ setInternalEndDate(null);
53
+ setInternalStartDate(null);
54
+ }
53
55
  }, [range]);
54
56
  const [currentMonth, setCurrentMonth] = useState(/* @__PURE__ */ new Date());
55
57
  const levelTitle = useMemo(() => {
@@ -59,7 +59,6 @@ const DayStyled = styled(Button).attrs({ view: "icon" }).withConfig({
59
59
 
60
60
  ${({ theme, isSelected, isCurrentMonth }) => {
61
61
  const { secondaryColor } = theme.components.Calendar;
62
- console.log(secondaryColor);
63
62
  return styled.css`
64
63
  color: ${isSelected ? "#fff" : isCurrentMonth ? theme.textColor : secondaryColor};
65
64
  `;
@@ -57,7 +57,6 @@ const DayStyled = styled(Button).attrs({ view: "icon" }).withConfig({
57
57
 
58
58
  ${({ theme, isSelected, isCurrentMonth }) => {
59
59
  const { secondaryColor } = theme.components.Calendar;
60
- console.log(secondaryColor);
61
60
  return css`
62
61
  color: ${isSelected ? "#fff" : isCurrentMonth ? theme.textColor : secondaryColor};
63
62
  `;
@@ -4,6 +4,7 @@ const Title = require("../typography/Title/Title.cjs.js");
4
4
  const styles = require("./styles.cjs.js");
5
5
  const Button = require("../Button/Button.cjs.js");
6
6
  const Divider = require("../Divider/Divider.cjs.js");
7
+ const Flex = require("../Flex/Flex.cjs.js");
7
8
  const Card = ({
8
9
  title,
9
10
  children,
@@ -18,14 +19,17 @@ const Card = ({
18
19
  leftContent,
19
20
  style,
20
21
  onClickExtra,
22
+ shadow,
21
23
  ...props
22
24
  }) => {
23
- return /* @__PURE__ */ jsxRuntime.jsxs(styles.CardStyled, { className, ...props, style, children: [
25
+ return /* @__PURE__ */ jsxRuntime.jsxs(styles.CardStyled, { className, ...props, style, shadow, children: [
24
26
  cover,
25
27
  title && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
26
- /* @__PURE__ */ jsxRuntime.jsxs(styles.CardHeaderStyled, { size, className: classNameHeader, children: [
27
- leftContent,
28
- /* @__PURE__ */ jsxRuntime.jsx(Title, { size, children: title }),
28
+ /* @__PURE__ */ jsxRuntime.jsxs(styles.CardHeaderStyled, { size, className: classNameHeader, "data-testid": "card-header", children: [
29
+ /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "m", align: "center", children: [
30
+ leftContent,
31
+ /* @__PURE__ */ jsxRuntime.jsx(Title, { size, children: title })
32
+ ] }),
29
33
  extra && /* @__PURE__ */ jsxRuntime.jsx(Button, { view: "link", size: "s", onClick: onClickExtra, children: extra })
30
34
  ] }),
31
35
  /* @__PURE__ */ jsxRuntime.jsx(Divider, { direction: "horizontal" })
@@ -1,3 +1,3 @@
1
1
  import { ICardProps } from './types';
2
- declare const Card: ({ title, children, size, extra, className, classNameHeader, classNameContent, classNameAction, actionContent, cover, leftContent, style, onClickExtra, ...props }: ICardProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Card: ({ title, children, size, extra, className, classNameHeader, classNameContent, classNameAction, actionContent, cover, leftContent, style, onClickExtra, shadow, ...props }: ICardProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Card;
@@ -3,6 +3,7 @@ import Title from "../typography/Title/Title.es.js";
3
3
  import { CardStyled, CardHeaderStyled, CardContentStyled, CardActionsStyled } from "./styles.es.js";
4
4
  import Button from "../Button/Button.es.js";
5
5
  import Divider from "../Divider/Divider.es.js";
6
+ import Flex from "../Flex/Flex.es.js";
6
7
  const Card = ({
7
8
  title,
8
9
  children,
@@ -17,14 +18,17 @@ const Card = ({
17
18
  leftContent,
18
19
  style,
19
20
  onClickExtra,
21
+ shadow,
20
22
  ...props
21
23
  }) => {
22
- return /* @__PURE__ */ jsxs(CardStyled, { className, ...props, style, children: [
24
+ return /* @__PURE__ */ jsxs(CardStyled, { className, ...props, style, shadow, children: [
23
25
  cover,
24
26
  title && /* @__PURE__ */ jsxs(Fragment, { children: [
25
- /* @__PURE__ */ jsxs(CardHeaderStyled, { size, className: classNameHeader, children: [
26
- leftContent,
27
- /* @__PURE__ */ jsx(Title, { size, children: title }),
27
+ /* @__PURE__ */ jsxs(CardHeaderStyled, { size, className: classNameHeader, "data-testid": "card-header", children: [
28
+ /* @__PURE__ */ jsxs(Flex, { gap: "m", align: "center", children: [
29
+ leftContent,
30
+ /* @__PURE__ */ jsx(Title, { size, children: title })
31
+ ] }),
28
32
  extra && /* @__PURE__ */ jsx(Button, { view: "link", size: "s", onClick: onClickExtra, children: extra })
29
33
  ] }),
30
34
  /* @__PURE__ */ jsx(Divider, { direction: "horizontal" })
@@ -26,10 +26,16 @@ const getSizing = (size) => {
26
26
  `;
27
27
  }
28
28
  };
29
- const CardStyled = styled.div.attrs({ className: "quen-ui__card" })`
29
+ const CardStyled = styled.div.withConfig({
30
+ shouldForwardProp: (prop) => !["shadow"].includes(prop)
31
+ }).attrs({ className: "quen-ui__card" })`
30
32
  border-radius: ${({ theme }) => theme.components.Card.radius};
31
33
  border: 1px solid ${({ theme }) => theme.components.Card.borderColor};
32
- max-width: 350px;
34
+ width: 350px;
35
+
36
+ ${({ shadow, theme }) => shadow && styled.css`
37
+ box-shadow: ${theme.components.Card.shadow};
38
+ `};
33
39
  `;
34
40
  const CardHeaderStyled = styled.div`
35
41
  ${({ size }) => getSizing(size)};
@@ -46,7 +52,7 @@ const CardContentStyled = styled.div`
46
52
  const CardActionsStyled = styled.div`
47
53
  ${({ size }) => getSizing(size)};
48
54
  display: flex;
49
- justify-content: space-between;
55
+ justify-content: flex-end;
50
56
  align-items: center;
51
57
  `;
52
58
  exports.CardActionsStyled = CardActionsStyled;
@@ -1,5 +1,7 @@
1
1
  import { TQuenSize } from '../types/size';
2
- export declare const CardStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<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>, never>> & string;
2
+ export declare const CardStyled: 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
+ shadow?: boolean;
4
+ }>> & string;
3
5
  export declare const CardHeaderStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
6
  size: TQuenSize;
5
7
  }>> & string;
@@ -24,10 +24,16 @@ const getSizing = (size) => {
24
24
  `;
25
25
  }
26
26
  };
27
- const CardStyled = styled.div.attrs({ className: "quen-ui__card" })`
27
+ const CardStyled = styled.div.withConfig({
28
+ shouldForwardProp: (prop) => !["shadow"].includes(prop)
29
+ }).attrs({ className: "quen-ui__card" })`
28
30
  border-radius: ${({ theme }) => theme.components.Card.radius};
29
31
  border: 1px solid ${({ theme }) => theme.components.Card.borderColor};
30
- max-width: 350px;
32
+ width: 350px;
33
+
34
+ ${({ shadow, theme }) => shadow && css`
35
+ box-shadow: ${theme.components.Card.shadow};
36
+ `};
31
37
  `;
32
38
  const CardHeaderStyled = styled.div`
33
39
  ${({ size }) => getSizing(size)};
@@ -44,7 +50,7 @@ const CardContentStyled = styled.div`
44
50
  const CardActionsStyled = styled.div`
45
51
  ${({ size }) => getSizing(size)};
46
52
  display: flex;
47
- justify-content: space-between;
53
+ justify-content: flex-end;
48
54
  align-items: center;
49
55
  `;
50
56
  export {
@@ -24,5 +24,7 @@ export interface ICardProps {
24
24
  leftContent?: React.ReactNode;
25
25
  style?: React.CSSProperties;
26
26
  onClickExtra?: () => void;
27
+ /** Show shadow */
28
+ shadow?: boolean;
27
29
  [key: string]: any;
28
30
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
- const require$$2 = require("react-dom");
4
+ const reactDom = require("react-dom");
5
5
  const reactTransitionState = require("react-transition-state");
6
6
  const hooks = require("@quen-ui/hooks");
7
7
  const styles = require("./styles.cjs.js");
@@ -41,7 +41,7 @@ const Drawer = ({
41
41
  setContainer(container2);
42
42
  }, []);
43
43
  if (state.isEnter && container) {
44
- return require$$2.createPortal(
44
+ return reactDom.createPortal(
45
45
  /* @__PURE__ */ jsxRuntime.jsx(styles.DrawerWrapper, { zIndex, children: /* @__PURE__ */ jsxRuntime.jsxs(
46
46
  styles.DrawerStyled,
47
47
  {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
- const require$$2 = require("react-dom");
4
+ const reactDom = require("react-dom");
5
5
  const reactTransitionState = require("react-transition-state");
6
6
  const hooks = require("@quen-ui/hooks");
7
7
  const styles = require("./styles.cjs.js");
@@ -75,7 +75,7 @@ const Dropdown = ({
75
75
  if (disabled) {
76
76
  return null;
77
77
  }
78
- return /* @__PURE__ */ jsxRuntime.jsx(styles.DropdownWrapper, { children: state.isEnter && containerDropdown && require$$2.createPortal(
78
+ return /* @__PURE__ */ jsxRuntime.jsx(styles.DropdownWrapper, { children: state.isEnter && containerDropdown && reactDom.createPortal(
79
79
  /* @__PURE__ */ jsxRuntime.jsx(
80
80
  DropdownPortal,
81
81
  {
@@ -40,7 +40,7 @@ const Form = ({
40
40
  };
41
41
  React.useEffect(() => {
42
42
  form.setSubmitCallback(() => handleSubmit);
43
- }, []);
43
+ }, [form.getFieldsValue, form.getFieldsError]);
44
44
  return /* @__PURE__ */ jsxRuntime.jsx(
45
45
  FormContext.Provider,
46
46
  {
@@ -38,7 +38,7 @@ const Form = ({
38
38
  };
39
39
  useEffect(() => {
40
40
  form.setSubmitCallback(() => handleSubmit);
41
- }, []);
41
+ }, [form.getFieldsValue, form.getFieldsError]);
42
42
  return /* @__PURE__ */ jsx(
43
43
  FormContext.Provider,
44
44
  {
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const styled = require("styled-components");
4
4
  const Button = require("../Button/Button.cjs.js");
5
- const ImageContainer = styled.div`
5
+ const ImageContainer = styled.div.withConfig({
6
+ shouldForwardProp: (prop) => !["width", "height", "preview"].includes(prop)
7
+ })`
6
8
  position: relative;
7
9
  width: ${({ width }) => typeof width === "number" ? `${width}px` : width || "auto"};
8
10
  height: ${({ height }) => typeof height === "number" ? `${height}px` : height || "auto"};
@@ -1,6 +1,8 @@
1
1
  import styled from "styled-components";
2
2
  import Button from "../Button/Button.es.js";
3
- const ImageContainer = styled.div`
3
+ const ImageContainer = styled.div.withConfig({
4
+ shouldForwardProp: (prop) => !["width", "height", "preview"].includes(prop)
5
+ })`
4
6
  position: relative;
5
7
  width: ${({ width }) => typeof width === "number" ? `${width}px` : width || "auto"};
6
8
  height: ${({ height }) => typeof height === "number" ? `${height}px` : height || "auto"};
@@ -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
  `;