@alfalab/core-components-pure-cell 4.8.1 → 4.10.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.
- package/{esm/component-6a644022.d.ts → component-1b03bea6.d.ts} +12 -0
- package/{component-81e75437.js → component-1b03bea6.js} +134 -28
- package/{component-21d7b687.d.ts → component-6a954af1.d.ts} +4 -0
- package/component.js +1 -1
- package/components/addon/component.js +2 -1
- package/components/addon/index.css +35 -10
- package/components/addon/index.d.ts +1 -1
- package/components/addon/index.js +1 -1
- package/components/amount/component.js +1 -1
- package/components/amount/index.css +2 -2
- package/components/amount/index.d.ts +1 -1
- package/components/amount/index.js +1 -1
- package/components/amount-title/component.js +1 -1
- package/components/amount-title/index.css +3 -3
- package/components/amount-title/index.d.ts +1 -1
- package/components/amount-title/index.js +1 -1
- package/components/category/component.js +1 -1
- package/components/category/index.css +5 -5
- package/components/category/index.d.ts +1 -1
- package/components/category/index.js +1 -1
- package/components/content/component.js +1 -1
- package/components/content/index.css +3 -3
- package/components/content/index.d.ts +1 -1
- package/components/content/index.js +1 -1
- package/components/footer/component.js +1 -1
- package/components/footer/index.css +4 -4
- package/components/footer/index.d.ts +1 -1
- package/components/footer/index.js +1 -1
- package/components/footer-button/component.js +1 -1
- package/components/footer-button/index.css +2 -2
- package/components/footer-button/index.d.ts +1 -1
- package/components/footer-button/index.js +1 -1
- package/components/footer-text/component.js +1 -1
- package/components/footer-text/index.d.ts +1 -1
- package/components/footer-text/index.js +1 -1
- package/components/graphics/component.js +2 -1
- package/components/graphics/index.css +41 -15
- package/components/graphics/index.d.ts +1 -1
- package/components/graphics/index.js +1 -1
- package/components/main/component.js +2 -1
- package/components/main/index.css +31 -5
- package/components/main/index.d.ts +1 -1
- package/components/main/index.js +1 -1
- package/components/text/component.js +1 -1
- package/components/text/index.css +7 -7
- package/components/text/index.d.ts +1 -1
- package/components/text/index.js +1 -1
- package/{esm/component-21d7b687.d.ts → cssm/component-6a954af1.d.ts} +4 -0
- package/{component-81e75437.d.ts → cssm/component-e3105fca.d.ts} +12 -0
- package/cssm/{component-063660c0.js → component-e3105fca.js} +123 -17
- package/cssm/component.js +1 -1
- package/cssm/components/addon/component.js +2 -1
- package/cssm/components/addon/index.d.ts +1 -1
- package/cssm/components/addon/index.js +1 -1
- package/cssm/components/addon/index.module.css +25 -0
- package/cssm/components/amount/component.js +1 -1
- package/cssm/components/amount/index.d.ts +1 -1
- package/cssm/components/amount/index.js +1 -1
- package/cssm/components/amount-title/component.js +1 -1
- package/cssm/components/amount-title/index.d.ts +1 -1
- package/cssm/components/amount-title/index.js +1 -1
- package/cssm/components/category/component.js +1 -1
- package/cssm/components/category/index.d.ts +1 -1
- package/cssm/components/category/index.js +1 -1
- package/cssm/components/content/component.js +1 -1
- package/cssm/components/content/index.d.ts +1 -1
- package/cssm/components/content/index.js +1 -1
- package/cssm/components/footer/component.js +1 -1
- package/cssm/components/footer/index.d.ts +1 -1
- package/cssm/components/footer/index.js +1 -1
- package/cssm/components/footer-button/component.js +1 -1
- package/cssm/components/footer-button/index.d.ts +1 -1
- package/cssm/components/footer-button/index.js +1 -1
- package/cssm/components/footer-text/component.js +1 -1
- package/cssm/components/footer-text/index.d.ts +1 -1
- package/cssm/components/footer-text/index.js +1 -1
- package/cssm/components/graphics/component.js +2 -1
- package/cssm/components/graphics/index.d.ts +1 -1
- package/cssm/components/graphics/index.js +1 -1
- package/cssm/components/graphics/index.module.css +26 -0
- package/cssm/components/main/component.js +2 -1
- package/cssm/components/main/index.d.ts +1 -1
- package/cssm/components/main/index.js +1 -1
- package/cssm/components/main/index.module.css +27 -1
- package/cssm/components/text/component.js +1 -1
- package/cssm/components/text/index.d.ts +1 -1
- package/cssm/components/text/index.js +1 -1
- package/cssm/index.d.ts +2 -2
- package/cssm/index.js +1 -1
- package/cssm/index.module.css +4 -4
- package/cssm/vars.css +17 -0
- package/{modern/component-ef65ce67.d.ts → esm/component-02d56ae7.d.ts} +12 -0
- package/esm/{component-6a644022.js → component-02d56ae7.js} +136 -30
- package/{cssm/component-21d7b687.d.ts → esm/component-6a954af1.d.ts} +4 -0
- package/esm/component.js +1 -1
- package/esm/components/addon/component.js +2 -1
- package/esm/components/addon/index.css +35 -10
- package/esm/components/addon/index.d.ts +1 -1
- package/esm/components/addon/index.js +1 -1
- package/esm/components/amount/component.js +1 -1
- package/esm/components/amount/index.css +2 -2
- package/esm/components/amount/index.d.ts +1 -1
- package/esm/components/amount/index.js +1 -1
- package/esm/components/amount-title/component.js +1 -1
- package/esm/components/amount-title/index.css +3 -3
- package/esm/components/amount-title/index.d.ts +1 -1
- package/esm/components/amount-title/index.js +1 -1
- package/esm/components/category/component.js +1 -1
- package/esm/components/category/index.css +5 -5
- package/esm/components/category/index.d.ts +1 -1
- package/esm/components/category/index.js +1 -1
- package/esm/components/content/component.js +1 -1
- package/esm/components/content/index.css +3 -3
- package/esm/components/content/index.d.ts +1 -1
- package/esm/components/content/index.js +1 -1
- package/esm/components/footer/component.js +1 -1
- package/esm/components/footer/index.css +4 -4
- package/esm/components/footer/index.d.ts +1 -1
- package/esm/components/footer/index.js +1 -1
- package/esm/components/footer-button/component.js +1 -1
- package/esm/components/footer-button/index.css +2 -2
- package/esm/components/footer-button/index.d.ts +1 -1
- package/esm/components/footer-button/index.js +1 -1
- package/esm/components/footer-text/component.js +1 -1
- package/esm/components/footer-text/index.d.ts +1 -1
- package/esm/components/footer-text/index.js +1 -1
- package/esm/components/graphics/component.js +2 -1
- package/esm/components/graphics/index.css +41 -15
- package/esm/components/graphics/index.d.ts +1 -1
- package/esm/components/graphics/index.js +1 -1
- package/esm/components/main/component.js +2 -1
- package/esm/components/main/index.css +31 -5
- package/esm/components/main/index.d.ts +1 -1
- package/esm/components/main/index.js +1 -1
- package/esm/components/text/component.js +1 -1
- package/esm/components/text/index.css +7 -7
- package/esm/components/text/index.d.ts +1 -1
- package/esm/components/text/index.js +1 -1
- package/esm/index.css +29 -29
- package/esm/index.d.ts +2 -2
- package/esm/index.js +1 -1
- package/index.css +29 -29
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/modern/{component-21d7b687.d.ts → component-6a954af1.d.ts} +4 -0
- package/{cssm/component-063660c0.d.ts → modern/component-766c0ee4.d.ts} +12 -0
- package/modern/{component-ef65ce67.js → component-766c0ee4.js} +126 -28
- package/modern/component.js +1 -1
- package/modern/components/addon/component.js +1 -1
- package/modern/components/addon/index.css +35 -10
- package/modern/components/addon/index.d.ts +1 -1
- package/modern/components/addon/index.js +1 -1
- package/modern/components/amount/component.js +1 -1
- package/modern/components/amount/index.css +2 -2
- package/modern/components/amount/index.d.ts +1 -1
- package/modern/components/amount/index.js +1 -1
- package/modern/components/amount-title/component.js +1 -1
- package/modern/components/amount-title/index.css +3 -3
- package/modern/components/amount-title/index.d.ts +1 -1
- package/modern/components/amount-title/index.js +1 -1
- package/modern/components/category/component.js +1 -1
- package/modern/components/category/index.css +5 -5
- package/modern/components/category/index.d.ts +1 -1
- package/modern/components/category/index.js +1 -1
- package/modern/components/content/component.js +1 -1
- package/modern/components/content/index.css +3 -3
- package/modern/components/content/index.d.ts +1 -1
- package/modern/components/content/index.js +1 -1
- package/modern/components/footer/component.js +1 -1
- package/modern/components/footer/index.css +4 -4
- package/modern/components/footer/index.d.ts +1 -1
- package/modern/components/footer/index.js +1 -1
- package/modern/components/footer-button/component.js +1 -1
- package/modern/components/footer-button/index.css +2 -2
- package/modern/components/footer-button/index.d.ts +1 -1
- package/modern/components/footer-button/index.js +1 -1
- package/modern/components/footer-text/component.js +1 -1
- package/modern/components/footer-text/index.d.ts +1 -1
- package/modern/components/footer-text/index.js +1 -1
- package/modern/components/graphics/component.js +1 -1
- package/modern/components/graphics/index.css +41 -15
- package/modern/components/graphics/index.d.ts +1 -1
- package/modern/components/graphics/index.js +1 -1
- package/modern/components/main/component.js +1 -1
- package/modern/components/main/index.css +31 -5
- package/modern/components/main/index.d.ts +1 -1
- package/modern/components/main/index.js +1 -1
- package/modern/components/text/component.js +1 -1
- package/modern/components/text/index.css +7 -7
- package/modern/components/text/index.d.ts +1 -1
- package/modern/components/text/index.js +1 -1
- package/modern/index.css +29 -29
- package/modern/index.d.ts +2 -2
- package/modern/index.js +1 -1
- package/package.json +3 -3
- package/src/component.tsx +33 -5
- package/src/components/addon/component.tsx +35 -3
- package/src/components/addon/index.module.css +15 -1
- package/src/components/amount-title/component.tsx +2 -2
- package/src/components/footer-button/component.tsx +32 -1
- package/src/components/graphics/component.tsx +33 -2
- package/src/components/graphics/index.module.css +16 -1
- package/src/components/main/component.tsx +39 -4
- package/src/components/main/index.module.css +16 -1
- package/src/index.module.css +4 -4
- package/src/vars.css +6 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1egfp */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
--gap-xs: 8px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .pure-
|
|
18
|
+
} .pure-cell__component_uyhv6 {
|
|
19
19
|
grid-column: 1/3;
|
|
20
20
|
display: grid;
|
|
21
21
|
grid-row-gap: var(--gap-xs)
|
|
22
|
-
} .pure-
|
|
22
|
+
} .pure-cell__component_uyhv6.pure-cell__none_uyhv6 {
|
|
23
23
|
margin-top: 0;
|
|
24
|
-
} .pure-
|
|
24
|
+
} .pure-cell__component_uyhv6.pure-cell__default_uyhv6 {
|
|
25
25
|
margin-top: var(--gap-xs);
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-766c0ee4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Footer } from '../../component-
|
|
1
|
+
export { F as Footer } from '../../component-766c0ee4.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1v7rb */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .pure-
|
|
17
|
+
} .pure-cell__component_1l487 {
|
|
18
18
|
justify-self: start;
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-766c0ee4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as FooterButton } from '../../component-
|
|
1
|
+
export { d as FooterButton } from '../../component-766c0ee4.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-766c0ee4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { e as FooterText } from '../../component-
|
|
1
|
+
export { e as FooterText } from '../../component-766c0ee4.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 11fg6 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -18,33 +18,59 @@
|
|
|
18
18
|
--gap-m: 16px;
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
}
|
|
21
|
+
} :root {
|
|
22
|
+
--pure-cell-clickable-area-hover-opacity: 1;
|
|
23
|
+
--pure-cell-clickable-area-active-opacity: 1;
|
|
24
|
+
} .pure-cell__component_1ywkt {
|
|
22
25
|
display: inline-flex;
|
|
23
26
|
flex-basis: auto;
|
|
24
|
-
} .pure-
|
|
27
|
+
} .pure-cell__top_1ywkt {
|
|
25
28
|
align-self: flex-start;
|
|
26
|
-
} .pure-
|
|
29
|
+
} .pure-cell__center_1ywkt {
|
|
27
30
|
align-self: center;
|
|
28
|
-
} .pure-
|
|
31
|
+
} .pure-cell__bottom_1ywkt {
|
|
29
32
|
align-self: flex-end;
|
|
30
|
-
} .pure-
|
|
33
|
+
} .pure-cell__horizontal_1ywkt:not(:last-child).pure-cell__none_1ywkt {
|
|
31
34
|
margin-right: 0;
|
|
32
|
-
} .pure-
|
|
35
|
+
} .pure-cell__horizontal_1ywkt:not(:last-child).pure-cell__airy_1ywkt {
|
|
33
36
|
margin-right: var(--gap-m);
|
|
34
|
-
} .pure-
|
|
37
|
+
} .pure-cell__horizontal_1ywkt:not(:last-child).pure-cell__default_1ywkt {
|
|
35
38
|
margin-right: var(--gap-s);
|
|
36
|
-
} .pure-
|
|
39
|
+
} .pure-cell__horizontal_1ywkt:not(:last-child).pure-cell__compact_1ywkt {
|
|
37
40
|
margin-right: var(--gap-xs);
|
|
38
|
-
} .pure-
|
|
41
|
+
} .pure-cell__horizontal_1ywkt:not(:last-child).pure-cell__tiny_1ywkt {
|
|
39
42
|
margin-right: var(--gap-2xs);
|
|
40
|
-
} .pure-
|
|
43
|
+
} .pure-cell__vertical_1ywkt:not(:last-child).pure-cell__none_1ywkt {
|
|
41
44
|
margin-bottom: 0;
|
|
42
|
-
} .pure-
|
|
45
|
+
} .pure-cell__vertical_1ywkt:not(:last-child).pure-cell__airy_1ywkt {
|
|
43
46
|
margin-bottom: var(--gap-m);
|
|
44
|
-
} .pure-
|
|
47
|
+
} .pure-cell__vertical_1ywkt:not(:last-child).pure-cell__default_1ywkt {
|
|
45
48
|
margin-bottom: var(--gap-s);
|
|
46
|
-
} .pure-
|
|
49
|
+
} .pure-cell__vertical_1ywkt:not(:last-child).pure-cell__compact_1ywkt {
|
|
47
50
|
margin-bottom: var(--gap-xs);
|
|
48
|
-
} .pure-
|
|
51
|
+
} .pure-cell__vertical_1ywkt:not(:last-child).pure-cell__tiny_1ywkt {
|
|
49
52
|
margin-bottom: var(--gap-2xs);
|
|
53
|
+
} .pure-cell__button_1ywkt {
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
background-color: transparent;
|
|
56
|
+
-webkit-tap-highlight-color: transparent;
|
|
57
|
+
outline: none;
|
|
58
|
+
border: 0;
|
|
59
|
+
margin: 0;
|
|
60
|
+
box-shadow: none;
|
|
61
|
+
border-radius: 0;
|
|
62
|
+
-webkit-user-select: none;
|
|
63
|
+
user-select: none;
|
|
64
|
+
vertical-align: middle;
|
|
65
|
+
appearance: none;
|
|
66
|
+
text-decoration: none;
|
|
67
|
+
min-width: 0;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
padding: 0;
|
|
70
|
+
transition: opacity 0.15s ease-in-out;
|
|
71
|
+
min-width: auto
|
|
72
|
+
} .pure-cell__button_1ywkt:hover {
|
|
73
|
+
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
74
|
+
} .pure-cell__button_1ywkt:active {
|
|
75
|
+
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
50
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-766c0ee4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { G as Graphics } from '../../component-
|
|
1
|
+
export { G as Graphics } from '../../component-766c0ee4.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7e2o7 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,20 +15,46 @@
|
|
|
15
15
|
--gap-3xs: 2px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
}
|
|
18
|
+
} :root {
|
|
19
|
+
--pure-cell-clickable-area-hover-opacity: 1;
|
|
20
|
+
--pure-cell-clickable-area-active-opacity: 1;
|
|
21
|
+
} .pure-cell__component_351av {
|
|
19
22
|
display: flex;
|
|
20
23
|
flex-direction: column;
|
|
21
24
|
align-self: center;
|
|
22
25
|
|
|
23
26
|
/* can use /r/n */
|
|
24
27
|
white-space: pre-line
|
|
25
|
-
} .pure-
|
|
28
|
+
} .pure-cell__component_351av.pure-cell__vertical_351av {
|
|
26
29
|
grid-row-gap: var(--gap-3xs);
|
|
27
30
|
justify-content: center;
|
|
28
31
|
align-items: center;
|
|
29
32
|
|
|
30
33
|
/* for button */
|
|
31
34
|
text-align: center;
|
|
32
|
-
} .pure-
|
|
35
|
+
} .pure-cell__component_351av.pure-cell__reverse_351av {
|
|
33
36
|
flex-direction: column-reverse;
|
|
34
|
-
}
|
|
37
|
+
} .pure-cell__component_351av.pure-cell__button_351av {
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
-webkit-tap-highlight-color: transparent;
|
|
41
|
+
outline: none;
|
|
42
|
+
border: 0;
|
|
43
|
+
margin: 0;
|
|
44
|
+
box-shadow: none;
|
|
45
|
+
border-radius: 0;
|
|
46
|
+
-webkit-user-select: none;
|
|
47
|
+
user-select: none;
|
|
48
|
+
vertical-align: middle;
|
|
49
|
+
appearance: none;
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
padding: 0;
|
|
54
|
+
transition: opacity 0.15s ease-in-out;
|
|
55
|
+
min-width: auto
|
|
56
|
+
} .pure-cell__component_351av.pure-cell__button_351av:hover {
|
|
57
|
+
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
58
|
+
} .pure-cell__component_351av.pure-cell__button_351av:active {
|
|
59
|
+
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
60
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-766c0ee4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { M as Main } from '../../component-
|
|
1
|
+
export { M as Main } from '../../component-766c0ee4.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 18xrx */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .pure-
|
|
19
|
+
} .pure-cell__horizontal_g10oe {
|
|
20
20
|
padding: var(--gap-3xs) 0;
|
|
21
|
-
} .pure-
|
|
21
|
+
} .pure-cell__rowLimit1_g10oe {
|
|
22
22
|
-webkit-line-clamp: 1;
|
|
23
23
|
display: -webkit-box;
|
|
24
24
|
-webkit-box-orient: vertical;
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
word-break: break-all;
|
|
27
|
-
} .pure-
|
|
27
|
+
} .pure-cell__rowLimit2_g10oe {
|
|
28
28
|
-webkit-line-clamp: 2;
|
|
29
29
|
display: -webkit-box;
|
|
30
30
|
-webkit-box-orient: vertical;
|
|
31
31
|
overflow: hidden;
|
|
32
|
-
} .pure-
|
|
32
|
+
} .pure-cell__component_g10oe {
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-direction: row;
|
|
35
35
|
flex-wrap: nowrap;
|
|
36
36
|
justify-content: space-between;
|
|
37
37
|
margin: var(--gap-3xs) 0;
|
|
38
38
|
word-break: break-word;
|
|
39
|
-
} .pure-
|
|
39
|
+
} .pure-cell__component_g10oe .pure-cell__vertical_g10oe {
|
|
40
40
|
justify-content: center;
|
|
41
|
-
} .pure-
|
|
41
|
+
} .pure-cell__title_g10oe + .pure-cell__value_g10oe {
|
|
42
42
|
margin-left: var(--gap-m);
|
|
43
43
|
flex-shrink: 0;
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../component-
|
|
1
|
+
export * from "../../component-766c0ee4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { T as Text } from '../../component-
|
|
1
|
+
export { T as Text } from '../../component-766c0ee4.js';
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 16a88 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #2288fa; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
} :root {
|
|
21
21
|
} :root {
|
|
22
22
|
--focus-color: var(--color-light-border-link);
|
|
23
|
-
} .pure-
|
|
23
|
+
} .pure-cell__component_8dxyc {
|
|
24
24
|
text-align: unset;
|
|
25
25
|
box-sizing: border-box;
|
|
26
|
-
} .pure-
|
|
26
|
+
} .pure-cell__horizontal_8dxyc {
|
|
27
27
|
display: flex;
|
|
28
28
|
width: 100%;
|
|
29
|
-
} .pure-
|
|
29
|
+
} .pure-cell__vertical_8dxyc {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
} .pure-
|
|
33
|
+
} .pure-cell__button_8dxyc {
|
|
34
34
|
font-family: inherit;
|
|
35
35
|
background: none;
|
|
36
36
|
border: 0;
|
|
@@ -38,57 +38,57 @@
|
|
|
38
38
|
cursor: pointer;
|
|
39
39
|
transition: opacity 0.15s ease-in-out;
|
|
40
40
|
padding: 0
|
|
41
|
-
} .pure-
|
|
41
|
+
} .pure-cell__button_8dxyc.pure-cell__hover_8dxyc {
|
|
42
42
|
opacity: 0.8;
|
|
43
|
-
} .pure-
|
|
43
|
+
} .pure-cell__button_8dxyc.pure-cell__active_8dxyc {
|
|
44
44
|
opacity: 0.6;
|
|
45
|
-
} .pure-
|
|
45
|
+
} .pure-cell__link_8dxyc {
|
|
46
46
|
text-decoration: none;
|
|
47
47
|
color: inherit;
|
|
48
48
|
cursor: pointer;
|
|
49
49
|
transition: opacity 0.15s ease-in-out
|
|
50
|
-
} .pure-
|
|
50
|
+
} .pure-cell__link_8dxyc.pure-cell__hover_8dxyc {
|
|
51
51
|
opacity: 0.8;
|
|
52
|
-
} .pure-
|
|
52
|
+
} .pure-cell__link_8dxyc.pure-cell__active_8dxyc {
|
|
53
53
|
opacity: 0.6;
|
|
54
|
-
} .pure-
|
|
54
|
+
} .pure-cell__none_8dxyc {
|
|
55
55
|
padding: 0;
|
|
56
|
-
} .pure-
|
|
56
|
+
} .pure-cell__airy_8dxyc {
|
|
57
57
|
padding: var(--gap-m) 0;
|
|
58
|
-
} .pure-
|
|
58
|
+
} .pure-cell__default_8dxyc {
|
|
59
59
|
padding: var(--gap-s) 0;
|
|
60
|
-
} .pure-
|
|
60
|
+
} .pure-cell__compact_8dxyc {
|
|
61
61
|
padding: var(--gap-xs) 0;
|
|
62
|
-
} .pure-
|
|
62
|
+
} .pure-cell__tiny_8dxyc {
|
|
63
63
|
padding: var(--gap-2xs) 0;
|
|
64
|
-
} .pure-
|
|
64
|
+
} .pure-cell__noneTop_8dxyc {
|
|
65
65
|
padding-top: 0;
|
|
66
|
-
} .pure-
|
|
66
|
+
} .pure-cell__airyTop_8dxyc {
|
|
67
67
|
padding-top: var(--gap-m);
|
|
68
|
-
} .pure-
|
|
68
|
+
} .pure-cell__defaultTop_8dxyc {
|
|
69
69
|
padding-top: var(--gap-s);
|
|
70
|
-
} .pure-
|
|
70
|
+
} .pure-cell__compactTop_8dxyc {
|
|
71
71
|
padding-top: var(--gap-xs);
|
|
72
|
-
} .pure-
|
|
72
|
+
} .pure-cell__tinyTop_8dxyc {
|
|
73
73
|
padding-top: var(--gap-2xs);
|
|
74
|
-
} .pure-
|
|
74
|
+
} .pure-cell__noneBottom_8dxyc {
|
|
75
75
|
padding-bottom: 0;
|
|
76
|
-
} .pure-
|
|
76
|
+
} .pure-cell__airyBottom_8dxyc {
|
|
77
77
|
padding-bottom: var(--gap-m);
|
|
78
|
-
} .pure-
|
|
78
|
+
} .pure-cell__defaultBottom_8dxyc {
|
|
79
79
|
padding-bottom: var(--gap-s);
|
|
80
|
-
} .pure-
|
|
80
|
+
} .pure-cell__compactBottom_8dxyc {
|
|
81
81
|
padding-bottom: var(--gap-xs);
|
|
82
|
-
} .pure-
|
|
82
|
+
} .pure-cell__tinyBottom_8dxyc {
|
|
83
83
|
padding-bottom: var(--gap-2xs);
|
|
84
|
-
} .pure-
|
|
84
|
+
} .pure-cell__left_8dxyc {
|
|
85
85
|
padding-left: var(--gap-m);
|
|
86
|
-
} .pure-
|
|
86
|
+
} .pure-cell__right_8dxyc {
|
|
87
87
|
padding-right: var(--gap-m);
|
|
88
|
-
} .pure-
|
|
88
|
+
} .pure-cell__both_8dxyc {
|
|
89
89
|
padding-right: var(--gap-m);
|
|
90
90
|
padding-left: var(--gap-m);
|
|
91
|
-
} .pure-
|
|
91
|
+
} .pure-cell__focused_8dxyc {
|
|
92
92
|
outline: 2px solid var(--focus-color);
|
|
93
93
|
outline-offset: 2px;
|
|
94
94
|
}
|
package/modern/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { PureCell } from "./component-
|
|
2
|
-
export type { PureCellProps } from "./component-
|
|
1
|
+
export { PureCell } from "./component-6a954af1";
|
|
2
|
+
export type { PureCellProps } from "./component-6a954af1";
|
package/modern/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { P as PureCell } from './component-
|
|
1
|
+
export { P as PureCell } from './component-766c0ee4.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-pure-cell",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-amount": "^3.5.
|
|
19
|
-
"@alfalab/core-components-button": "^11.4.
|
|
18
|
+
"@alfalab/core-components-amount": "^3.5.1",
|
|
19
|
+
"@alfalab/core-components-button": "^11.4.2",
|
|
20
20
|
"@alfalab/core-components-typography": "^4.5.0",
|
|
21
21
|
"@alfalab/core-components-comment": "^2.3.3",
|
|
22
22
|
"@alfalab/core-components-shared": "^0.9.1",
|
package/src/component.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import React, {
|
|
|
6
6
|
forwardRef,
|
|
7
7
|
HTMLAttributes,
|
|
8
8
|
useRef,
|
|
9
|
+
useState,
|
|
9
10
|
} from 'react';
|
|
10
11
|
import mergeRefs from 'react-merge-refs';
|
|
11
12
|
import cn from 'classnames';
|
|
@@ -34,6 +35,8 @@ export type PureCellContext = {
|
|
|
34
35
|
/** Направление */
|
|
35
36
|
direction?: 'horizontal' | 'vertical';
|
|
36
37
|
dataTestId?: string;
|
|
38
|
+
setMainHover?: () => void;
|
|
39
|
+
unsetMainHover?: () => void;
|
|
37
40
|
};
|
|
38
41
|
|
|
39
42
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
@@ -120,11 +123,36 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
|
|
|
120
123
|
) => {
|
|
121
124
|
const cellRef = useRef<HTMLDivElement>(null);
|
|
122
125
|
const [focused] = useFocus(cellRef, 'keyboard');
|
|
126
|
+
const [hoverState, setHoverState] = useState<boolean>(false);
|
|
127
|
+
const [activeState, setActiveState] = useState<boolean>(false);
|
|
128
|
+
|
|
129
|
+
const setHover = () => setHoverState(true);
|
|
130
|
+
const unsetHover = () => setHoverState(false);
|
|
131
|
+
const setActive = () => setActiveState(true);
|
|
132
|
+
|
|
133
|
+
const unsetActive = () => setActiveState(false);
|
|
134
|
+
|
|
135
|
+
const mouseEvents = {
|
|
136
|
+
onMouseEnter: setHover,
|
|
137
|
+
onMouseLeave: unsetHover,
|
|
138
|
+
onMouseDown: setActive,
|
|
139
|
+
onMouseUp: unsetActive,
|
|
140
|
+
};
|
|
141
|
+
|
|
123
142
|
const addClasses = {
|
|
124
143
|
[styles.component]: true,
|
|
125
144
|
[styles.focused]: focused,
|
|
126
145
|
[styles[direction]]: true,
|
|
127
146
|
[styles[horizontalPadding]]: true,
|
|
147
|
+
[styles.hover]: hoverState,
|
|
148
|
+
[styles.active]: activeState,
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const contextState: PureCellContext = {
|
|
152
|
+
direction,
|
|
153
|
+
dataTestId,
|
|
154
|
+
setMainHover: setHover,
|
|
155
|
+
unsetMainHover: unsetHover,
|
|
128
156
|
};
|
|
129
157
|
|
|
130
158
|
if (typeof verticalPadding === 'string') {
|
|
@@ -151,8 +179,9 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
|
|
|
151
179
|
className={cn(styles.link, addClasses, className)}
|
|
152
180
|
data-test-id={dataTestId}
|
|
153
181
|
onClick={onClick}
|
|
182
|
+
{...mouseEvents}
|
|
154
183
|
>
|
|
155
|
-
<PureCellContext.Provider value={
|
|
184
|
+
<PureCellContext.Provider value={contextState}>
|
|
156
185
|
{children}
|
|
157
186
|
</PureCellContext.Provider>
|
|
158
187
|
</Component>
|
|
@@ -167,8 +196,9 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
|
|
|
167
196
|
className={cn(styles.button, addClasses, className)}
|
|
168
197
|
data-test-id={dataTestId}
|
|
169
198
|
onClick={onClick}
|
|
199
|
+
{...mouseEvents}
|
|
170
200
|
>
|
|
171
|
-
<PureCellContext.Provider value={
|
|
201
|
+
<PureCellContext.Provider value={contextState}>
|
|
172
202
|
{children}
|
|
173
203
|
</PureCellContext.Provider>
|
|
174
204
|
</Component>
|
|
@@ -183,9 +213,7 @@ const PureCellComponent = forwardRef<HTMLElement, PureCellProps>(
|
|
|
183
213
|
className={cn(addClasses, className)}
|
|
184
214
|
data-test-id={dataTestId}
|
|
185
215
|
>
|
|
186
|
-
<PureCellContext.Provider value={{
|
|
187
|
-
{children}
|
|
188
|
-
</PureCellContext.Provider>
|
|
216
|
+
<PureCellContext.Provider value={contextState}>{children}</PureCellContext.Provider>
|
|
189
217
|
</Component>
|
|
190
218
|
);
|
|
191
219
|
},
|
|
@@ -29,6 +29,16 @@ type Props = {
|
|
|
29
29
|
* Используется модификатор -addon
|
|
30
30
|
*/
|
|
31
31
|
dataTestId?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Клик по контенту аддона.
|
|
35
|
+
*/
|
|
36
|
+
onClick?: () => void;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const ADDON_COMPONENT: Record<string, keyof Pick<React.ReactHTML, 'button' | 'section'>> = {
|
|
40
|
+
button: 'button',
|
|
41
|
+
section: 'section',
|
|
32
42
|
};
|
|
33
43
|
|
|
34
44
|
export const Addon: React.FC<Props> = ({
|
|
@@ -36,15 +46,37 @@ export const Addon: React.FC<Props> = ({
|
|
|
36
46
|
verticalAlign = 'top',
|
|
37
47
|
addonPadding = 'default',
|
|
38
48
|
dataTestId,
|
|
49
|
+
onClick,
|
|
39
50
|
}) => {
|
|
40
51
|
const pureCellContext = useContext(PureCellContext);
|
|
41
52
|
|
|
53
|
+
const Component = onClick ? ADDON_COMPONENT.button : ADDON_COMPONENT.section;
|
|
54
|
+
|
|
55
|
+
const onMouseEvents = {
|
|
56
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
onClick?.();
|
|
59
|
+
},
|
|
60
|
+
onMouseEnter: () => {
|
|
61
|
+
pureCellContext.unsetMainHover?.();
|
|
62
|
+
},
|
|
63
|
+
onMouseLeave: () => {
|
|
64
|
+
pureCellContext.setMainHover?.();
|
|
65
|
+
},
|
|
66
|
+
onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
67
|
+
e.stopPropagation();
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
|
|
42
71
|
return (
|
|
43
|
-
<
|
|
44
|
-
className={cn(styles.component, styles[addonPadding], styles[verticalAlign]
|
|
72
|
+
<Component
|
|
73
|
+
className={cn(styles.component, styles[addonPadding], styles[verticalAlign], {
|
|
74
|
+
[styles.button]: onClick,
|
|
75
|
+
})}
|
|
45
76
|
data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'addon')}
|
|
77
|
+
{...(onClick && onMouseEvents)}
|
|
46
78
|
>
|
|
47
79
|
{children}
|
|
48
|
-
</
|
|
80
|
+
</Component>
|
|
49
81
|
);
|
|
50
82
|
};
|