@alfalab/core-components-modal 6.1.12 → 7.0.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 (123) hide show
  1. package/Component.desktop.d.ts +1 -1
  2. package/Component.desktop.js +2 -5
  3. package/Component.js +3 -3
  4. package/Component.mobile.d.ts +1 -1
  5. package/Component.mobile.js +2 -5
  6. package/Component.responsive.d.ts +1 -1
  7. package/Component.responsive.js +2 -5
  8. package/components/content/Component.js +6 -5
  9. package/components/content/desktop.css +12 -13
  10. package/components/content/index.css +8 -4
  11. package/components/content/mobile.css +6 -4
  12. package/components/footer/Component.js +4 -4
  13. package/components/footer/desktop.css +12 -13
  14. package/components/footer/index.css +8 -6
  15. package/components/footer/layout.css +27 -25
  16. package/components/footer/mobile.css +5 -3
  17. package/components/header/Component.d.ts +3 -47
  18. package/components/header/Component.js +15 -29
  19. package/components/header/desktop.css +23 -27
  20. package/components/header/index.css +8 -42
  21. package/components/header/mobile.css +10 -5
  22. package/cssm/Component.desktop.d.ts +1 -1
  23. package/cssm/Component.desktop.js +2 -6
  24. package/cssm/Component.mobile.d.ts +1 -1
  25. package/cssm/Component.mobile.js +2 -6
  26. package/cssm/Component.responsive.d.ts +1 -1
  27. package/cssm/Component.responsive.js +2 -6
  28. package/cssm/components/content/Component.js +3 -2
  29. package/cssm/components/content/desktop.module.css +10 -11
  30. package/cssm/components/content/index.module.css +6 -2
  31. package/cssm/components/content/mobile.module.css +3 -1
  32. package/cssm/components/footer/desktop.module.css +6 -7
  33. package/cssm/components/footer/index.module.css +4 -2
  34. package/cssm/components/footer/layout.module.css +2 -0
  35. package/cssm/components/footer/mobile.module.css +2 -0
  36. package/cssm/components/header/Component.d.ts +3 -47
  37. package/cssm/components/header/Component.js +12 -27
  38. package/cssm/components/header/desktop.module.css +11 -15
  39. package/cssm/components/header/index.module.css +5 -39
  40. package/cssm/components/header/mobile.module.css +7 -2
  41. package/cssm/desktop.js +2 -6
  42. package/cssm/desktop.module.css +2 -0
  43. package/cssm/index.js +3 -7
  44. package/cssm/mobile.js +2 -6
  45. package/cssm/mobile.module.css +2 -0
  46. package/cssm/responsive.js +2 -6
  47. package/cssm/vars.css +2 -0
  48. package/desktop.css +11 -9
  49. package/desktop.js +2 -5
  50. package/esm/Component.desktop.d.ts +1 -1
  51. package/esm/Component.desktop.js +1 -4
  52. package/esm/Component.js +3 -3
  53. package/esm/Component.mobile.d.ts +1 -1
  54. package/esm/Component.mobile.js +1 -4
  55. package/esm/Component.responsive.d.ts +1 -1
  56. package/esm/Component.responsive.js +1 -4
  57. package/esm/components/content/Component.js +6 -5
  58. package/esm/components/content/desktop.css +12 -13
  59. package/esm/components/content/index.css +8 -4
  60. package/esm/components/content/mobile.css +6 -4
  61. package/esm/components/footer/Component.js +4 -4
  62. package/esm/components/footer/desktop.css +12 -13
  63. package/esm/components/footer/index.css +8 -6
  64. package/esm/components/footer/layout.css +27 -25
  65. package/esm/components/footer/mobile.css +5 -3
  66. package/esm/components/header/Component.d.ts +3 -47
  67. package/esm/components/header/Component.js +15 -29
  68. package/esm/components/header/desktop.css +23 -27
  69. package/esm/components/header/index.css +8 -42
  70. package/esm/components/header/mobile.css +10 -5
  71. package/esm/desktop.css +11 -9
  72. package/esm/desktop.js +2 -5
  73. package/esm/index.js +3 -6
  74. package/esm/mobile.css +4 -2
  75. package/esm/mobile.js +2 -5
  76. package/esm/responsive.js +2 -5
  77. package/esm/transitions.css +8 -8
  78. package/index.js +3 -6
  79. package/mobile.css +4 -2
  80. package/mobile.js +2 -5
  81. package/modern/Component.desktop.d.ts +1 -1
  82. package/modern/Component.desktop.js +1 -4
  83. package/modern/Component.js +3 -3
  84. package/modern/Component.mobile.d.ts +1 -1
  85. package/modern/Component.mobile.js +1 -4
  86. package/modern/Component.responsive.d.ts +1 -1
  87. package/modern/Component.responsive.js +1 -4
  88. package/modern/components/content/Component.js +5 -4
  89. package/modern/components/content/desktop.css +12 -13
  90. package/modern/components/content/index.css +8 -4
  91. package/modern/components/content/mobile.css +6 -4
  92. package/modern/components/footer/Component.js +4 -4
  93. package/modern/components/footer/desktop.css +12 -13
  94. package/modern/components/footer/index.css +8 -6
  95. package/modern/components/footer/layout.css +27 -25
  96. package/modern/components/footer/mobile.css +5 -3
  97. package/modern/components/header/Component.d.ts +3 -47
  98. package/modern/components/header/Component.js +14 -28
  99. package/modern/components/header/desktop.css +23 -27
  100. package/modern/components/header/index.css +8 -42
  101. package/modern/components/header/mobile.css +10 -5
  102. package/modern/desktop.css +11 -9
  103. package/modern/desktop.js +2 -5
  104. package/modern/index.js +3 -6
  105. package/modern/mobile.css +4 -2
  106. package/modern/mobile.js +2 -5
  107. package/modern/responsive.js +2 -5
  108. package/modern/transitions.css +8 -8
  109. package/package.json +3 -2
  110. package/responsive.js +2 -5
  111. package/transitions.css +8 -8
  112. package/components/closer/Component.d.ts +0 -33
  113. package/components/closer/Component.js +0 -35
  114. package/components/closer/index.css +0 -49
  115. package/cssm/components/closer/Component.d.ts +0 -33
  116. package/cssm/components/closer/Component.js +0 -34
  117. package/cssm/components/closer/index.module.css +0 -48
  118. package/esm/components/closer/Component.d.ts +0 -33
  119. package/esm/components/closer/Component.js +0 -28
  120. package/esm/components/closer/index.css +0 -49
  121. package/modern/components/closer/Component.d.ts +0 -33
  122. package/modern/components/closer/Component.js +0 -25
  123. package/modern/components/closer/index.css +0 -49
@@ -1,53 +1,39 @@
1
1
  import React, { useContext, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
- import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
3
+ import { NavigationBar } from '@alfalab/core-components-navigation-bar/modern';
4
4
  import { ModalContext } from '../../Context.js';
5
5
  import { ResponsiveContext } from '../../ResponsiveContext.js';
6
- import { Closer } from '../closer/Component.js';
7
6
  import '@alfalab/core-components-base-modal/modern';
8
- import '@alfalab/core-components-icon-button/modern';
9
- import '@alfalab/icons-glyph/CrossHeavyMIcon';
10
7
 
11
- const getDataTestId = (dataTestId, element) => {
12
- const elementPart = element ? `-${element.toLowerCase()}` : '';
13
- return dataTestId ? `${dataTestId}${elementPart}` : undefined;
14
- };
15
-
16
- const desktopStyles = {"header":"modal__header_1sbjx","content":"modal__content_1sbjx","s":"modal__s_1sbjx","m":"modal__m_1sbjx","l":"modal__l_1sbjx","xl":"modal__xl_1sbjx","fullscreen":"modal__fullscreen_1sbjx","hasContent":"modal__hasContent_1sbjx","sticky":"modal__sticky_1sbjx"};
8
+ const desktopStyles = {"header":"modal__header_z1sf9","content":"modal__content_z1sf9","s":"modal__s_z1sf9","m":"modal__m_z1sf9","l":"modal__l_z1sf9","xl":"modal__xl_z1sf9","fullscreen":"modal__fullscreen_z1sf9","sticky":"modal__sticky_z1sf9"};
17
9
  require('./desktop.css')
18
10
 
19
- const styles = {"header":"modal__header_fyqm8","hasContent":"modal__hasContent_fyqm8","highlighted":"modal__highlighted_fyqm8","sticky":"modal__sticky_fyqm8","content":"modal__content_fyqm8","title":"modal__title_fyqm8","addon":"modal__addon_fyqm8","closer":"modal__closer_fyqm8","left":"modal__left_fyqm8","center":"modal__center_fyqm8","right":"modal__right_fyqm8","trim":"modal__trim_fyqm8"};
11
+ const styles = {"highlighted":"modal__highlighted_ppblj","sticky":"modal__sticky_ppblj","hasContent":"modal__hasContent_ppblj"};
20
12
  require('./index.css')
21
13
 
22
- const mobileStyles = {"sticky":"modal__sticky_1tlb4","content":"modal__content_1tlb4"};
14
+ const mobileStyles = {"header":"modal__header_ye58l","sticky":"modal__sticky_ye58l","content":"modal__content_ye58l"};
23
15
  require('./mobile.css')
24
16
 
25
- const Header = ({ className, addonClassName, contentClassName, leftAddons, children, align = 'left', trim = true, title, hasCloser = true, sticky, dataTestId, }) => {
26
- const { headerHighlighted, setHasHeader } = useContext(ModalContext);
27
- const { size, view } = useContext(ResponsiveContext);
28
- const hasContent = title || Boolean(children);
17
+ const Header = ({ className, sticky, title, children, contentClassName, hasCloser = true, ...restProps }) => {
18
+ const { setHasHeader, headerHighlighted, parentRef, onClose } = useContext(ModalContext);
19
+ const { view, size } = useContext(ResponsiveContext);
29
20
  useEffect(() => {
30
21
  setHasHeader(true);
31
22
  }, [setHasHeader]);
32
- return (React.createElement("div", { className: cn(styles.header, className, {
23
+ const hasContent = Boolean(title || children);
24
+ return (React.createElement(NavigationBar, { ...restProps, parentRef: parentRef, hasCloser: hasCloser, sticky: sticky, view: view, title: title, onClose: onClose, className: cn(className, {
33
25
  [styles.highlighted]: hasContent && sticky && headerHighlighted,
34
26
  [styles.sticky]: sticky,
35
27
  [styles.hasContent]: hasContent,
36
28
  [desktopStyles.header]: view === 'desktop',
37
- [desktopStyles.hasContent]: view === 'desktop' && hasContent,
38
29
  [desktopStyles.sticky]: view === 'desktop' && sticky,
39
30
  [desktopStyles[size]]: view === 'desktop',
31
+ [mobileStyles.header]: view === 'mobile',
40
32
  [mobileStyles.sticky]: view === 'mobile' && sticky,
41
- }), "data-test-id": getDataTestId(dataTestId) },
42
- (leftAddons || view === 'desktop') && (React.createElement("div", { className: cn(styles.addon, addonClassName) }, leftAddons)),
43
- hasContent && (React.createElement("div", { className: cn(styles.content, contentClassName, styles[align], {
44
- [styles.trim]: trim,
45
- [desktopStyles.content]: view === 'desktop',
46
- [mobileStyles.content]: view === 'mobile',
47
- }) },
48
- children,
49
- title && (React.createElement("div", { className: styles.title, "data-test-id": getDataTestId(dataTestId, 'title') }, title)))),
50
- hasCloser && (React.createElement("div", { className: cn(styles.addon, styles.closer, addonClassName) }, view === 'desktop' ? (React.createElement(Closer, { dataTestId: getDataTestId(dataTestId, 'closer') })) : (React.createElement(Closer, { icon: CrossMIcon, size: 'xs', dataTestId: getDataTestId(dataTestId, 'closer') }))))));
33
+ }), contentClassName: cn(contentClassName, {
34
+ [desktopStyles.content]: view === 'desktop',
35
+ [mobileStyles.content]: view === 'mobile',
36
+ }) }, children));
51
37
  };
52
38
 
53
39
  export { Header };
@@ -1,4 +1,4 @@
1
- /* hash: nv248 */
1
+ /* hash: 18toj */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  } :root {
@@ -13,9 +13,8 @@
13
13
  } :root {
14
14
  --border-radius-l: 12px;
15
15
  } :root {
16
- --gap-xs: 8px;
16
+ --gap-s: 12px;
17
17
  --gap-m: 16px;
18
- --gap-xl: 24px;
19
18
  --gap-3xl: 40px;
20
19
  } :root {
21
20
  --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
@@ -28,51 +27,48 @@
28
27
  /* sizes */
29
28
 
30
29
  /* paddings */
31
- --modal-s-header-paddings: var(--gap-xs) var(--gap-xs) var(--gap-m);
30
+ --modal-s-header-paddings: 28px 28px 0;
32
31
 
33
32
  /* scroll */
34
33
 
35
34
  /* desktop */
36
- --modal-s-header-desktop-content-paddings: var(--gap-3xl) var(--gap-m) 0 0;
37
- --modal-s-header-desktop-font-size: 22px;
35
+ --modal-s-header-desktop-content-paddings: var(--gap-s);
36
+ --modal-s-header-desktop-font-size: 20px;
38
37
  --modal-s-header-desktop-line-height: 26px;
39
- --modal-l-header-desktop-content-paddings: var(--gap-3xl) var(--gap-m) 0 0;
38
+ --modal-l-header-desktop-content-paddings: 6px var(--gap-s) var(--gap-m);
40
39
  --modal-l-header-desktop-font-size: 30px;
41
40
  --modal-l-header-desktop-line-height: 36px;
42
41
  --modal-header-desktop-font-weight: bold;
43
42
  --modal-header-desktop-font-family: var(--font-family-system);
44
43
 
45
44
  /* mobile */
46
- } .modal__header_1sbjx {
45
+
46
+ /* paddings */
47
+ } .modal__header_z1sf9 {
47
48
  border-top-left-radius: var(--modal-border-radius);
48
49
  border-top-right-radius: var(--modal-border-radius);
49
- } .modal__content_1sbjx {
50
+ } .modal__content_z1sf9 {
50
51
  font-weight: var(--modal-header-desktop-font-weight);
51
52
  font-family: var(--modal-header-desktop-font-family);
52
- } .modal__s_1sbjx .modal__content_1sbjx,
53
- .modal__m_1sbjx .modal__content_1sbjx {
53
+ } .modal__s_z1sf9 .modal__content_z1sf9,
54
+ .modal__m_z1sf9 .modal__content_z1sf9 {
54
55
  padding: var(--modal-s-header-desktop-content-paddings);
55
56
  font-size: var(--modal-s-header-desktop-font-size);
56
57
  line-height: var(--modal-s-header-desktop-line-height);
57
- } .modal__l_1sbjx .modal__content_1sbjx,
58
- .modal__xl_1sbjx .modal__content_1sbjx,
59
- .modal__fullscreen_1sbjx .modal__content_1sbjx {
58
+ } .modal__l_z1sf9 .modal__content_z1sf9,
59
+ .modal__xl_z1sf9 .modal__content_z1sf9,
60
+ .modal__fullscreen_z1sf9 .modal__content_z1sf9 {
60
61
  padding: var(--modal-l-header-desktop-content-paddings);
61
62
  font-size: var(--modal-l-header-desktop-font-size);
62
63
  line-height: var(--modal-l-header-desktop-line-height);
63
- } .modal__s_1sbjx,
64
- .modal__m_1sbjx {
65
- padding: var(--modal-s-header-paddings)
66
- } .modal__s_1sbjx:not(.modal__hasContent_1sbjx), .modal__m_1sbjx:not(.modal__hasContent_1sbjx) {
67
- padding-bottom: 0;
68
- } .modal__l_1sbjx,
69
- .modal__xl_1sbjx,
70
- .modal__fullscreen_1sbjx {
71
- padding: var(--gap-xl) var(--gap-xl) var(--gap-m)
72
- } .modal__l_1sbjx:not(.modal__hasContent_1sbjx), .modal__xl_1sbjx:not(.modal__hasContent_1sbjx), .modal__fullscreen_1sbjx:not(.modal__hasContent_1sbjx) {
73
- padding-bottom: var(--gap-m);
74
- } .modal__sticky_1sbjx {
64
+ } .modal__s_z1sf9,
65
+ .modal__m_z1sf9,
66
+ .modal__l_z1sf9,
67
+ .modal__xl_z1sf9,
68
+ .modal__fullscreen_z1sf9 {
69
+ padding: var(--modal-s-header-paddings);
70
+ } .modal__sticky_z1sf9 {
75
71
  top: calc(var(--modal-vertical-padding) * -1)
76
- } .modal__sticky_1sbjx.modal__fullscreen_1sbjx {
72
+ } .modal__sticky_z1sf9.modal__fullscreen_z1sf9 {
77
73
  top: 0;
78
74
  }
@@ -1,7 +1,8 @@
1
- /* hash: wor7n */
1
+ /* hash: 1hndm */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
5
+ --color-light-border-secondary: #e7e9eb;
5
6
  } :root {
6
7
  } :root {
7
8
  } :root {
@@ -24,54 +25,19 @@
24
25
 
25
26
  /* scroll */
26
27
  --modal-header-highlight-background: var(--color-light-bg-primary);
27
- --modal-header-highlight-box-shadow: none;
28
+ --modal-header-highlight-box-shadow: 0 1px 0 0 var(--color-light-border-secondary);
28
29
 
29
30
  /* desktop */
30
31
 
31
32
  /* mobile */
32
- } .modal__header_fyqm8 {
33
- width: 100%;
34
- box-sizing: border-box;
35
- display: flex;
36
- align-items: stretch;
37
- justify-content: space-between;
38
- transition: box-shadow 0.2s ease, background 0.2s ease
39
- } .modal__header_fyqm8:not(.modal__hasContent_fyqm8) {
40
- pointer-events: none;
41
- } .modal__highlighted_fyqm8 {
33
+
34
+ /* paddings */
35
+ } .modal__highlighted_ppblj {
42
36
  background: var(--modal-header-highlight-background);
43
37
  box-shadow: var(--modal-header-highlight-box-shadow);
44
- } .modal__sticky_fyqm8 {
38
+ } .modal__sticky_ppblj {
45
39
  position: sticky;
46
40
  z-index: 1
47
- } .modal__sticky_fyqm8.modal__hasContent_fyqm8 {
41
+ } .modal__sticky_ppblj.modal__hasContent_ppblj {
48
42
  background: var(--modal-header-background);
49
- } .modal__content_fyqm8 {
50
- flex-grow: 1;
51
- } .modal__title_fyqm8 {
52
- word-break: break-word;
53
- } .modal__addon_fyqm8 {
54
- min-width: 48px;
55
- height: 48px;
56
- display: flex;
57
- justify-content: center;
58
- align-items: center;
59
- pointer-events: all;
60
- } .modal__closer_fyqm8 {
61
- margin-left: auto;
62
- } .modal__left_fyqm8 {
63
- justify-content: flex-start;
64
- text-align: left;
65
- } .modal__center_fyqm8 {
66
- justify-content: center;
67
- text-align: center;
68
- } .modal__right_fyqm8 {
69
- justify-content: flex-end;
70
- text-align: right;
71
- } .modal__trim_fyqm8 {
72
- overflow: hidden
73
- } .modal__trim_fyqm8 .modal__title_fyqm8 {
74
- overflow: hidden;
75
- white-space: nowrap;
76
- text-overflow: ellipsis;
77
43
  }
@@ -1,4 +1,4 @@
1
- /* hash: 9tx7t */
1
+ /* hash: 1ilyy */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  } :root {
@@ -12,9 +12,9 @@
12
12
  /* Hard up */
13
13
  } :root {
14
14
  } :root {
15
+ --gap-2xs: 4px;
15
16
  --gap-xs: 8px;
16
17
  --gap-s: 12px;
17
- --gap-m: 16px;
18
18
  } :root {
19
19
  --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
20
20
  sans-serif;
@@ -30,14 +30,19 @@
30
30
  /* desktop */
31
31
 
32
32
  /* mobile */
33
- --modal-header-mobile-content-paddings: var(--gap-s) var(--gap-xs) var(--gap-s) var(--gap-m);
33
+ --modal-header-mobile-content-paddings: var(--gap-s) var(--gap-xs);
34
34
  --modal-header-mobile-font-size: 18px;
35
35
  --modal-header-mobile-line-height: 24px;
36
36
  --modal-header-mobile-font-family: var(--font-family-system);
37
37
  --modal-header-mobile-font-weight: bold;
38
- } .modal__sticky_1tlb4 {
38
+
39
+ /* paddings */
40
+ --modal-header-mobile-paddings: var(--gap-2xs) var(--gap-xs);
41
+ } .modal__header_ye58l {
42
+ padding: var(--modal-header-mobile-paddings);
43
+ } .modal__sticky_ye58l {
39
44
  top: 0;
40
- } .modal__content_1tlb4 {
45
+ } .modal__content_ye58l {
41
46
  font-size: var(--modal-header-mobile-font-size);
42
47
  line-height: var(--modal-header-mobile-line-height);
43
48
  font-family: var(--modal-header-mobile-font-family);
@@ -1,4 +1,4 @@
1
- /* hash: zfev5 */
1
+ /* hash: nxjpz */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  } :root {
@@ -33,25 +33,27 @@
33
33
  /* desktop */
34
34
 
35
35
  /* mobile */
36
- } .modal__wrapper_1qc7d {
36
+
37
+ /* paddings */
38
+ } .modal__wrapper_1h080 {
37
39
  padding-top: var(--modal-vertical-padding);
38
40
  padding-bottom: var(--modal-vertical-padding);
39
- } .modal__component_1qc7d {
41
+ } .modal__component_1h080 {
40
42
  width: 100%;
41
43
  max-width: 100%;
42
44
  border-radius: var(--modal-border-radius);
43
- } .modal__fullscreen_1qc7d {
45
+ } .modal__fullscreen_1h080 {
44
46
  padding-top: 0;
45
47
  padding-bottom: 0
46
- } .modal__fullscreen_1qc7d .modal__component_1qc7d {
48
+ } .modal__fullscreen_1h080 .modal__component_1h080 {
47
49
  flex: 1;
48
50
  border-radius: 0;
49
- } .modal__s_1qc7d {
51
+ } .modal__s_1h080 {
50
52
  width: var(--modal-s-width);
51
- } .modal__m_1qc7d {
53
+ } .modal__m_1h080 {
52
54
  width: var(--modal-m-width);
53
- } .modal__l_1qc7d {
55
+ } .modal__l_1h080 {
54
56
  width: var(--modal-l-width);
55
- } .modal__xl_1qc7d {
57
+ } .modal__xl_1h080 {
56
58
  width: var(--modal-xl-width);
57
59
  }
package/modern/desktop.js CHANGED
@@ -1,15 +1,12 @@
1
1
  export { ModalDesktop } from './Component.desktop.js';
2
2
  import 'react';
3
- import './components/closer/Component.js';
3
+ import '@alfalab/core-components-navigation-bar/modern';
4
+ import './components/content/Component.js';
4
5
  import 'classnames';
5
- import '@alfalab/core-components-icon-button/modern';
6
- import '@alfalab/icons-glyph/CrossHeavyMIcon';
7
6
  import './Context.js';
8
7
  import '@alfalab/core-components-base-modal/modern';
9
- import './components/content/Component.js';
10
8
  import './ResponsiveContext.js';
11
9
  import './components/footer/Component.js';
12
10
  import './components/header/Component.js';
13
- import '@alfalab/icons-glyph/CrossMIcon';
14
11
  import './Component.js';
15
12
  import 'react-merge-refs';
package/modern/index.js CHANGED
@@ -1,16 +1,13 @@
1
1
  export { ModalResponsive } from './Component.responsive.js';
2
2
  export { ModalContext } from './Context.js';
3
3
  import 'react';
4
+ import '@alfalab/core-components-navigation-bar/modern';
4
5
  import '@alfalab/hooks';
5
- import './components/closer/Component.js';
6
- import 'classnames';
7
- import '@alfalab/core-components-icon-button/modern';
8
- import '@alfalab/icons-glyph/CrossHeavyMIcon';
9
- import '@alfalab/core-components-base-modal/modern';
10
6
  import './components/content/Component.js';
7
+ import 'classnames';
11
8
  import './ResponsiveContext.js';
9
+ import '@alfalab/core-components-base-modal/modern';
12
10
  import './components/footer/Component.js';
13
11
  import './components/header/Component.js';
14
- import '@alfalab/icons-glyph/CrossMIcon';
15
12
  import './Component.js';
16
13
  import 'react-merge-refs';
package/modern/mobile.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1eajj */
1
+ /* hash: 1eoe5 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  } :root {
@@ -25,7 +25,9 @@
25
25
  /* desktop */
26
26
 
27
27
  /* mobile */
28
- } .modal__component_1ouph {
28
+
29
+ /* paddings */
30
+ } .modal__component_gwnha {
29
31
  flex: 1;
30
32
  width: 100%;
31
33
  }
package/modern/mobile.js CHANGED
@@ -1,15 +1,12 @@
1
1
  export { ModalMobile } from './Component.mobile.js';
2
2
  import 'react';
3
- import './components/closer/Component.js';
3
+ import '@alfalab/core-components-navigation-bar/modern';
4
+ import './components/content/Component.js';
4
5
  import 'classnames';
5
- import '@alfalab/core-components-icon-button/modern';
6
- import '@alfalab/icons-glyph/CrossHeavyMIcon';
7
6
  import './Context.js';
8
7
  import '@alfalab/core-components-base-modal/modern';
9
- import './components/content/Component.js';
10
8
  import './ResponsiveContext.js';
11
9
  import './components/footer/Component.js';
12
10
  import './components/header/Component.js';
13
- import '@alfalab/icons-glyph/CrossMIcon';
14
11
  import './Component.js';
15
12
  import 'react-merge-refs';
@@ -1,16 +1,13 @@
1
1
  export { ModalResponsive } from './Component.responsive.js';
2
2
  import 'react';
3
+ import '@alfalab/core-components-navigation-bar/modern';
3
4
  import '@alfalab/hooks';
4
- import './components/closer/Component.js';
5
+ import './components/content/Component.js';
5
6
  import 'classnames';
6
- import '@alfalab/core-components-icon-button/modern';
7
- import '@alfalab/icons-glyph/CrossHeavyMIcon';
8
7
  import './Context.js';
9
8
  import '@alfalab/core-components-base-modal/modern';
10
- import './components/content/Component.js';
11
9
  import './ResponsiveContext.js';
12
10
  import './components/footer/Component.js';
13
11
  import './components/header/Component.js';
14
- import '@alfalab/icons-glyph/CrossMIcon';
15
12
  import './Component.js';
16
13
  import 'react-merge-refs';
@@ -1,24 +1,24 @@
1
- /* hash: jx97z */
2
- .modal__appear_19gn2,
3
- .modal__enter_19gn2 {
1
+ /* hash: kb3u0 */
2
+ .modal__appear_14ixj,
3
+ .modal__enter_14ixj {
4
4
  opacity: 0;
5
5
  transform: translateY(15px);
6
6
  }
7
7
 
8
- .modal__appearActive_19gn2,
9
- .modal__enterActive_19gn2 {
8
+ .modal__appearActive_14ixj,
9
+ .modal__enterActive_14ixj {
10
10
  opacity: 1;
11
11
  transform: translateY(0);
12
12
  transition: opacity 200ms ease-in, transform 200ms ease-in;
13
13
  }
14
14
 
15
- .modal__exit_19gn2 {
15
+ .modal__exit_14ixj {
16
16
  opacity: 1;
17
17
  transform: translateY(0);
18
18
  }
19
19
 
20
- .modal__exitActive_19gn2,
21
- .modal__exitDone_19gn2 {
20
+ .modal__exitActive_14ixj,
21
+ .modal__exitDone_14ixj {
22
22
  opacity: 0;
23
23
  transform: translateY(15px);
24
24
  transition: opacity 200ms ease-out, transform 200ms ease-out;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-modal",
3
- "version": "6.1.12",
3
+ "version": "7.0.0",
4
4
  "description": "Modal component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -13,10 +13,11 @@
13
13
  "directory": "dist"
14
14
  },
15
15
  "dependencies": {
16
- "@alfalab/core-components-base-modal": "^5.0.10",
16
+ "@alfalab/core-components-base-modal": "^5.1.0",
17
17
  "@alfalab/core-components-button": "^7.1.0",
18
18
  "@alfalab/core-components-icon-button": "^6.0.7",
19
19
  "@alfalab/core-components-mq": "^4.1.3",
20
+ "@alfalab/core-components-navigation-bar": "^0.1.0",
20
21
  "@alfalab/icons-glyph": "^2.89.0",
21
22
  "classnames": "^2.3.1",
22
23
  "react-transition-group": "^4.4.5",
package/responsive.js CHANGED
@@ -3,18 +3,15 @@
3
3
  var Component_responsive = require('./Component.responsive.js');
4
4
  require('tslib');
5
5
  require('react');
6
+ require('@alfalab/core-components-navigation-bar');
6
7
  require('@alfalab/hooks');
7
- require('./components/closer/Component.js');
8
+ require('./components/content/Component.js');
8
9
  require('classnames');
9
- require('@alfalab/core-components-icon-button');
10
- require('@alfalab/icons-glyph/CrossHeavyMIcon');
11
10
  require('./Context.js');
12
11
  require('@alfalab/core-components-base-modal');
13
- require('./components/content/Component.js');
14
12
  require('./ResponsiveContext.js');
15
13
  require('./components/footer/Component.js');
16
14
  require('./components/header/Component.js');
17
- require('@alfalab/icons-glyph/CrossMIcon');
18
15
  require('./Component.js');
19
16
  require('react-merge-refs');
20
17
 
package/transitions.css CHANGED
@@ -1,24 +1,24 @@
1
- /* hash: jx97z */
2
- .modal__appear_19gn2,
3
- .modal__enter_19gn2 {
1
+ /* hash: kb3u0 */
2
+ .modal__appear_14ixj,
3
+ .modal__enter_14ixj {
4
4
  opacity: 0;
5
5
  transform: translateY(15px);
6
6
  }
7
7
 
8
- .modal__appearActive_19gn2,
9
- .modal__enterActive_19gn2 {
8
+ .modal__appearActive_14ixj,
9
+ .modal__enterActive_14ixj {
10
10
  opacity: 1;
11
11
  transform: translateY(0);
12
12
  transition: opacity 200ms ease-in, transform 200ms ease-in;
13
13
  }
14
14
 
15
- .modal__exit_19gn2 {
15
+ .modal__exit_14ixj {
16
16
  opacity: 1;
17
17
  transform: translateY(0);
18
18
  }
19
19
 
20
- .modal__exitActive_19gn2,
21
- .modal__exitDone_19gn2 {
20
+ .modal__exitActive_14ixj,
21
+ .modal__exitDone_14ixj {
22
22
  opacity: 0;
23
23
  transform: translateY(15px);
24
24
  transition: opacity 200ms ease-out, transform 200ms ease-out;
@@ -1,33 +0,0 @@
1
- import { ButtonHTMLAttributes, ElementType, FC } from 'react';
2
- import { IconButtonProps } from "@alfalab/core-components-icon-button";
3
- type CloserProps = ButtonHTMLAttributes<HTMLButtonElement> & {
4
- /**
5
- * Дополнительный класс
6
- */
7
- className?: string;
8
- /**
9
- * Позиция крестика
10
- */
11
- align?: 'left' | 'right';
12
- /**
13
- * Размер кнопки
14
- */
15
- size?: IconButtonProps['size'];
16
- /**
17
- * Фиксирует крестик
18
- */
19
- sticky?: boolean;
20
- /**
21
- * Иконка
22
- */
23
- icon?: ElementType;
24
- /**
25
- * Идентификатор для систем автоматизированного тестирования
26
- */
27
- dataTestId?: string;
28
- };
29
- /**
30
- * @deprecated Компонент только для внутреннего использования. Используйте <Header />
31
- */
32
- declare const Closer: FC<CloserProps>;
33
- export { CloserProps, Closer };
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- var tslib = require('tslib');
4
- var React = require('react');
5
- var cn = require('classnames');
6
- var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
7
- var CrossHeavyMIcon = require('@alfalab/icons-glyph/CrossHeavyMIcon');
8
- var Context = require('../../Context.js');
9
- require('@alfalab/core-components-base-modal');
10
-
11
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
-
13
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
- var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
15
-
16
- var styles = {"closer":"modal__closer_554js","button":"modal__button_554js","sticky":"modal__sticky_554js"};
17
- require('./index.css')
18
-
19
- /**
20
- * @deprecated Компонент только для внутреннего использования. Используйте <Header />
21
- */
22
- var Closer = function (_a) {
23
- var _b;
24
- var className = _a.className, _c = _a.size, size = _c === void 0 ? 's' : _c, sticky = _a.sticky, _d = _a.icon, icon = _d === void 0 ? CrossHeavyMIcon.CrossHeavyMIcon : _d, dataTestId = _a.dataTestId, restProps = tslib.__rest(_a, ["className", "size", "sticky", "icon", "dataTestId"]);
25
- var onClose = React.useContext(Context.ModalContext).onClose;
26
- var handleClick = React.useCallback(function (event) {
27
- onClose(event, 'closerClick');
28
- }, [onClose]);
29
- return (React__default.default.createElement("div", { className: cn__default.default(styles.closer, className, (_b = {},
30
- _b[styles.sticky] = sticky,
31
- _b)) },
32
- React__default.default.createElement(coreComponentsIconButton.IconButton, tslib.__assign({ size: size, className: styles.button, "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon, dataTestId: dataTestId }, restProps))));
33
- };
34
-
35
- exports.Closer = Closer;
@@ -1,49 +0,0 @@
1
- /* hash: 1b13p */
2
- :root {
3
- } /* deprecated */ :root {
4
- --color-light-bg-primary-alpha-40: rgba(255, 255, 255, 0.4);
5
- } :root {
6
- } :root {
7
- } :root {
8
-
9
- /* Hard */
10
-
11
- /* Up */
12
-
13
- /* Hard up */
14
- } :root {
15
- } :root {
16
- --gap-3xl: 40px;
17
- } :root {
18
- } :root {
19
- } :root {
20
- --modal-vertical-padding: var(--gap-3xl);
21
-
22
- /* sizes */
23
-
24
- /* paddings */
25
-
26
- /* scroll */
27
-
28
- /* desktop */
29
-
30
- /* mobile */
31
- } :root {
32
- --modal-closer-bg-color: var(--color-light-bg-primary-alpha-40);
33
- } .modal__closer_554js {
34
- flex-shrink: 0;
35
- width: 48px;
36
- height: 48px;
37
- margin-left: auto;
38
- display: flex;
39
- align-items: center;
40
- justify-content: center;
41
- } .modal__button_554js {
42
- background: var(--modal-closer-bg-color);
43
- -webkit-backdrop-filter: blur(10px);
44
- backdrop-filter: blur(10px);
45
- border-radius: 50px;
46
- } .modal__sticky_554js {
47
- position: sticky;
48
- top: calc(var(--modal-vertical-padding) * -1);
49
- }