react-miui 0.23.6 → 0.23.7-beta.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/.storybook/preview.tsx +1 -0
- package/CHANGELOG.md +8 -0
- package/dist/components/icons/Icon.d.ts +1 -0
- package/dist/components/icons/Icon.d.ts.map +1 -1
- package/dist/components/layout/header/Header.d.ts +1 -1
- package/dist/components/layout/header/Header.d.ts.map +1 -1
- package/dist/components/layout/header/Header.js +7 -14
- package/dist/components/layout/header/Header.js.map +1 -1
- package/dist/components/layout/header/Header.stories.d.ts +11 -0
- package/dist/components/layout/header/Header.stories.d.ts.map +1 -0
- package/dist/components/layout/header/Header.stories.js +65 -0
- package/dist/components/layout/header/Header.stories.js.map +1 -0
- package/dist/components/layout/header/Header.styled.d.ts +326 -0
- package/dist/components/layout/header/Header.styled.d.ts.map +1 -0
- package/dist/components/layout/header/Header.styled.js +98 -0
- package/dist/components/layout/header/Header.styled.js.map +1 -0
- package/dist/components/layout/header/HeaderIconAction.d.ts +1 -2
- package/dist/components/layout/header/HeaderIconAction.d.ts.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.js +6 -11
- package/dist/components/layout/header/HeaderIconAction.js.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.stories.d.ts +9 -0
- package/dist/components/layout/header/HeaderIconAction.stories.d.ts.map +1 -0
- package/dist/components/layout/header/HeaderIconAction.stories.js +43 -0
- package/dist/components/layout/header/HeaderIconAction.stories.js.map +1 -0
- package/dist/components/layout/header/HeaderIconAction.styled.d.ts +243 -0
- package/dist/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -0
- package/dist/components/layout/header/HeaderIconAction.styled.js +35 -0
- package/dist/components/layout/header/HeaderIconAction.styled.js.map +1 -0
- package/dist/components/layout/header/StickyHeader.d.ts +2 -2
- package/dist/components/layout/header/StickyHeader.d.ts.map +1 -1
- package/dist/components/layout/header/StickyHeader.js +17 -8
- package/dist/components/layout/header/StickyHeader.js.map +1 -1
- package/dist/components/layout/header/StickyHeader.stories.d.ts +8 -0
- package/dist/components/layout/header/StickyHeader.stories.d.ts.map +1 -0
- package/dist/components/layout/header/StickyHeader.stories.js +30 -0
- package/dist/components/layout/header/StickyHeader.stories.js.map +1 -0
- package/dist/components/layout/header/StickyHeader.styled.d.ts +166 -0
- package/dist/components/layout/header/StickyHeader.styled.d.ts.map +1 -0
- package/dist/components/layout/header/StickyHeader.styled.js +40 -0
- package/dist/components/layout/header/StickyHeader.styled.js.map +1 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/Drawer.html +14 -14
- package/docs/classes/Pop.html +14 -14
- package/docs/classes/ToasterProvider.html +10 -10
- package/docs/enums/ICON.html +14 -14
- package/docs/functions/Action.html +5 -4
- package/docs/functions/Button.html +5 -4
- package/docs/functions/Card.html +5 -4
- package/docs/functions/Checkbox.html +5 -4
- package/docs/functions/Choice.html +6 -5
- package/docs/functions/CoveringLoader.html +5 -4
- package/docs/functions/DirectionPad.html +5 -4
- package/docs/functions/EqualActions.html +5 -4
- package/docs/functions/FullLoader.html +5 -4
- package/docs/functions/HandleEsc.html +5 -4
- package/docs/functions/Header.html +5 -4
- package/docs/functions/HeaderIconAction.html +8 -4
- package/docs/functions/Icon-1.html +7 -6
- package/docs/functions/If.html +5 -4
- package/docs/functions/Input.html +6 -5
- package/docs/functions/KeyValue.html +5 -4
- package/docs/functions/Label.html +5 -4
- package/docs/functions/List-1.html +5 -4
- package/docs/functions/Loader.html +5 -4
- package/docs/functions/Loading.html +5 -4
- package/docs/functions/Message.html +5 -4
- package/docs/functions/Modal-1.html +5 -4
- package/docs/functions/ModalButtons.html +5 -4
- package/docs/functions/PopLoader.html +5 -4
- package/docs/functions/PopOption.html +5 -4
- package/docs/functions/SearchContainer.html +5 -4
- package/docs/functions/Section.html +5 -4
- package/docs/functions/Select.html +5 -4
- package/docs/functions/Selector.html +6 -5
- package/docs/functions/Spacer.html +5 -4
- package/docs/functions/Stats.html +5 -4
- package/docs/functions/StickyHeader-1.html +5 -4
- package/docs/functions/StickyHeader.Content.html +5 -5
- package/docs/functions/Table.html +5 -4
- package/docs/functions/TextArea.html +5 -4
- package/docs/functions/Toggle.html +5 -4
- package/docs/functions/getCssText.html +5 -4
- package/docs/functions/styled.html +5 -4
- package/docs/functions/useToaster.html +6 -5
- package/docs/index.html +5 -4
- package/docs/interfaces/ActionProps.html +13 -13
- package/docs/interfaces/ChoiceProps.html +11 -11
- package/docs/interfaces/IconProps.html +79 -0
- package/docs/interfaces/InputCustomProps.html +10 -10
- package/docs/modules/List.html +7 -7
- package/docs/modules/Modal.html +6 -6
- package/docs/modules/StickyHeader.html +6 -6
- package/docs/modules.html +6 -4
- package/docs/pages/tutorials/Test.html +5 -4
- package/docs/types/InputProps.html +6 -5
- package/docs/types/ThemeCSS.html +6 -5
- package/docs/variables/List.Header.html +5 -5
- package/docs/variables/List.Item.html +5 -5
- package/docs/variables/Modal.RemovePadding.html +5 -5
- package/docs/variables/cssReset.html +6 -5
- package/docs/variables/miuiScrollbars.html +6 -5
- package/esm/components/icons/Icon.d.ts +1 -0
- package/esm/components/icons/Icon.d.ts.map +1 -1
- package/esm/components/layout/header/Header.d.ts +1 -1
- package/esm/components/layout/header/Header.d.ts.map +1 -1
- package/esm/components/layout/header/Header.js +7 -14
- package/esm/components/layout/header/Header.js.map +1 -1
- package/esm/components/layout/header/Header.stories.d.ts +11 -0
- package/esm/components/layout/header/Header.stories.d.ts.map +1 -0
- package/esm/components/layout/header/Header.stories.js +56 -0
- package/esm/components/layout/header/Header.stories.js.map +1 -0
- package/esm/components/layout/header/Header.styled.d.ts +326 -0
- package/esm/components/layout/header/Header.styled.d.ts.map +1 -0
- package/esm/components/layout/header/Header.styled.js +112 -0
- package/esm/components/layout/header/Header.styled.js.map +1 -0
- package/esm/components/layout/header/HeaderIconAction.d.ts +1 -2
- package/esm/components/layout/header/HeaderIconAction.d.ts.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.js +6 -11
- package/esm/components/layout/header/HeaderIconAction.js.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.stories.d.ts +9 -0
- package/esm/components/layout/header/HeaderIconAction.stories.d.ts.map +1 -0
- package/esm/components/layout/header/HeaderIconAction.stories.js +24 -0
- package/esm/components/layout/header/HeaderIconAction.stories.js.map +1 -0
- package/esm/components/layout/header/HeaderIconAction.styled.d.ts +243 -0
- package/esm/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -0
- package/esm/components/layout/header/HeaderIconAction.styled.js +30 -0
- package/esm/components/layout/header/HeaderIconAction.styled.js.map +1 -0
- package/esm/components/layout/header/StickyHeader.d.ts +2 -2
- package/esm/components/layout/header/StickyHeader.d.ts.map +1 -1
- package/esm/components/layout/header/StickyHeader.js +6 -8
- package/esm/components/layout/header/StickyHeader.js.map +1 -1
- package/esm/components/layout/header/StickyHeader.stories.d.ts +8 -0
- package/esm/components/layout/header/StickyHeader.stories.d.ts.map +1 -0
- package/esm/components/layout/header/StickyHeader.stories.js +24 -0
- package/esm/components/layout/header/StickyHeader.stories.js.map +1 -0
- package/esm/components/layout/header/StickyHeader.styled.d.ts +166 -0
- package/esm/components/layout/header/StickyHeader.styled.d.ts.map +1 -0
- package/esm/components/layout/header/StickyHeader.styled.js +36 -0
- package/esm/components/layout/header/StickyHeader.styled.js.map +1 -0
- package/package.json +3 -3
- package/src/components/icons/Icon.tsx +4 -0
- package/src/components/layout/header/Header.stories.tsx +86 -0
- package/src/components/layout/header/Header.styled.ts +134 -0
- package/src/components/layout/header/Header.tsx +22 -19
- package/src/components/layout/header/HeaderIconAction.stories.tsx +47 -0
- package/src/components/layout/header/HeaderIconAction.styled.ts +40 -0
- package/src/components/layout/header/HeaderIconAction.tsx +30 -16
- package/src/components/layout/header/StickyHeader.stories.tsx +34 -0
- package/src/components/layout/header/StickyHeader.styled.ts +43 -0
- package/src/components/layout/header/StickyHeader.tsx +10 -19
- package/src/demo/componentsMap.ts +1 -67
- package/dist/components/layout/header/Header.module.scss +0 -108
- package/dist/components/layout/header/HeaderIconAction.module.scss +0 -26
- package/dist/components/layout/header/StickyHeader.module.scss +0 -18
- package/esm/components/layout/header/Header.module.scss +0 -108
- package/esm/components/layout/header/HeaderIconAction.module.scss +0 -26
- package/esm/components/layout/header/StickyHeader.module.scss +0 -18
- package/src/components/layout/header/Header.module.scss +0 -108
- package/src/components/layout/header/HeaderIconAction.module.scss +0 -26
- package/src/components/layout/header/StickyHeader.module.scss +0 -18
- package/src/demo/components/layout/header/Header.tsx +0 -118
- package/src/demo/components/layout/header/StickyHeader.module.scss +0 -14
- package/src/demo/components/layout/header/StickyHeader.tsx +0 -112
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
/* eslint-disable
|
|
1
|
+
/* eslint-disable import/max-dependencies */
|
|
2
2
|
import type { AnyComponent } from "../types";
|
|
3
3
|
|
|
4
4
|
import { CheckboxDemo } from "./components/form/Checkbox";
|
|
5
|
-
import {
|
|
6
|
-
CenteredHeaderDemo,
|
|
7
|
-
HeaderDemo,
|
|
8
|
-
HeaderWithButtonsDemo,
|
|
9
|
-
HeaderWithButtonsOnSideDemo, ToolbarVariantDemo,
|
|
10
|
-
} from "./components/layout/header/Header";
|
|
11
|
-
import {
|
|
12
|
-
StickyColoredBg,
|
|
13
|
-
StickyHeaderBottomDemo,
|
|
14
|
-
StickyHeaderDemo, StickyHeaderLeftCenterDemo, StickyHeaderLeftDemo, StickyHeaderRightDemo,
|
|
15
|
-
StickyHeaderTopBottomDemo,
|
|
16
|
-
} from "./components/layout/header/StickyHeader";
|
|
17
5
|
import { DirectionPadDemo } from "./components/ui/directionPad/Pad";
|
|
18
6
|
import { IconsDemo } from "./components/ui/icons/Icons";
|
|
19
7
|
import {
|
|
@@ -81,60 +69,6 @@ const componentsMap: TheMap = {
|
|
|
81
69
|
},
|
|
82
70
|
},
|
|
83
71
|
},
|
|
84
|
-
Header: {
|
|
85
|
-
name: "Header",
|
|
86
|
-
Component: HeaderDemo,
|
|
87
|
-
children: {
|
|
88
|
-
Centered: {
|
|
89
|
-
name: "Centered",
|
|
90
|
-
Component: CenteredHeaderDemo,
|
|
91
|
-
},
|
|
92
|
-
Toolbar: {
|
|
93
|
-
name: "Toolbar",
|
|
94
|
-
Component: ToolbarVariantDemo,
|
|
95
|
-
},
|
|
96
|
-
WithButtons: {
|
|
97
|
-
name: "With buttons",
|
|
98
|
-
Component: HeaderWithButtonsDemo,
|
|
99
|
-
children: {
|
|
100
|
-
OnLeft: {
|
|
101
|
-
name: "On the side",
|
|
102
|
-
Component: HeaderWithButtonsOnSideDemo,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
Sticky: {
|
|
107
|
-
name: "Sticky",
|
|
108
|
-
Component: StickyHeaderDemo,
|
|
109
|
-
children: {
|
|
110
|
-
StickyBottom: {
|
|
111
|
-
name: "On bottom",
|
|
112
|
-
Component: StickyHeaderBottomDemo,
|
|
113
|
-
},
|
|
114
|
-
StickyTopBottom: {
|
|
115
|
-
name: "On top & bottom",
|
|
116
|
-
Component: StickyHeaderTopBottomDemo,
|
|
117
|
-
},
|
|
118
|
-
StickyLeft: {
|
|
119
|
-
name: "On left",
|
|
120
|
-
Component: StickyHeaderLeftDemo,
|
|
121
|
-
},
|
|
122
|
-
StickyRight: {
|
|
123
|
-
name: "On right",
|
|
124
|
-
Component: StickyHeaderRightDemo,
|
|
125
|
-
},
|
|
126
|
-
StickyLeftCentered: {
|
|
127
|
-
name: "On left centered",
|
|
128
|
-
Component: StickyHeaderLeftCenterDemo,
|
|
129
|
-
},
|
|
130
|
-
StickyColoredBg: {
|
|
131
|
-
name: "With colored background",
|
|
132
|
-
Component: StickyColoredBg,
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
72
|
Action: {
|
|
139
73
|
name: "Action", // TODO move all action demos to storybook
|
|
140
74
|
Component: ActionDemo,
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
.header {
|
|
2
|
-
--border-color: var(--header-border);
|
|
3
|
-
--background-color: var(--header-bg);
|
|
4
|
-
background-clip: padding-box;
|
|
5
|
-
background: var(--background-color);
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
font-size: 15px;
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
color: var(--header-text);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.header--toolbar {
|
|
15
|
-
--border-color: var(--toolbar-border);
|
|
16
|
-
--background-color: var(--toolbar-bg);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.header--colored {
|
|
20
|
-
--border-color: var(--custom-header-color);
|
|
21
|
-
--background-color: var(--custom-header-color);
|
|
22
|
-
color: var(--custom-text-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.header--top, .header--bottom {
|
|
26
|
-
padding: 0 16.666px;
|
|
27
|
-
min-height: 44px;
|
|
28
|
-
}
|
|
29
|
-
.header--left, .header--right {
|
|
30
|
-
padding: 16.666px 0;
|
|
31
|
-
min-width: 44px;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
|
|
34
|
-
> .contents {
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
align-items: center;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.header--top {
|
|
41
|
-
border-bottom: 0.37px solid var(--border-color);
|
|
42
|
-
}
|
|
43
|
-
.header--bottom {
|
|
44
|
-
border-top: 0.37px solid var(--border-color);
|
|
45
|
-
order: 2;
|
|
46
|
-
}
|
|
47
|
-
.header--left {
|
|
48
|
-
border-right: 0.37px solid var(--border-color);
|
|
49
|
-
}
|
|
50
|
-
.header--right {
|
|
51
|
-
border-left: 0.37px solid var(--border-color);
|
|
52
|
-
order: 2;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.contents {
|
|
56
|
-
flex: 1;
|
|
57
|
-
display: flex;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.header--center > .contents {
|
|
61
|
-
justify-content: center;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.header--top, .header--bottom {
|
|
65
|
-
.before {
|
|
66
|
-
margin-right: calc(50px / var(--ratio-dimensions));
|
|
67
|
-
height: 100%;
|
|
68
|
-
padding: 7px 0;
|
|
69
|
-
box-sizing: border-box;
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.after {
|
|
76
|
-
margin-left: calc(50px / var(--ratio-dimensions));
|
|
77
|
-
height: 100%;
|
|
78
|
-
padding: 7px 0;
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.actions {
|
|
86
|
-
margin: calc(56px / var(--ratio-dimensions)) 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.header--left, .header--right {
|
|
91
|
-
.before {
|
|
92
|
-
margin-bottom: calc(50px / var(--ratio-dimensions));
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.after {
|
|
97
|
-
margin-top: calc(50px / var(--ratio-dimensions));
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.actions {
|
|
102
|
-
margin: 0 calc(56px / var(--ratio-dimensions));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.before, .after {
|
|
107
|
-
display: flex;
|
|
108
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.btn, .a {
|
|
2
|
-
height: 100%;
|
|
3
|
-
aspect-ratio: 1;
|
|
4
|
-
background: none;
|
|
5
|
-
border-radius: 666px;
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
border: calc(2px / var(--ratio-border)) solid transparent;
|
|
10
|
-
color: currentColor;
|
|
11
|
-
|
|
12
|
-
&:hover {
|
|
13
|
-
background: #00000022;
|
|
14
|
-
}
|
|
15
|
-
&:active {
|
|
16
|
-
background: #00000011;
|
|
17
|
-
color: currentColor;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.icon {
|
|
22
|
-
width: 16px;
|
|
23
|
-
height: 16px;
|
|
24
|
-
display: block;
|
|
25
|
-
fill: currentColor;
|
|
26
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.stickyHeader {
|
|
2
|
-
height: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
|
|
6
|
-
&__content {
|
|
7
|
-
flex: 1;
|
|
8
|
-
overflow: auto;
|
|
9
|
-
|
|
10
|
-
&--bottom, &--right {
|
|
11
|
-
order: 1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.stickyHeader--left, .stickyHeader--right {
|
|
17
|
-
flex-direction: row;
|
|
18
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
.header {
|
|
2
|
-
--border-color: var(--header-border);
|
|
3
|
-
--background-color: var(--header-bg);
|
|
4
|
-
background-clip: padding-box;
|
|
5
|
-
background: var(--background-color);
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
font-size: 15px;
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
color: var(--header-text);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.header--toolbar {
|
|
15
|
-
--border-color: var(--toolbar-border);
|
|
16
|
-
--background-color: var(--toolbar-bg);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.header--colored {
|
|
20
|
-
--border-color: var(--custom-header-color);
|
|
21
|
-
--background-color: var(--custom-header-color);
|
|
22
|
-
color: var(--custom-text-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.header--top, .header--bottom {
|
|
26
|
-
padding: 0 16.666px;
|
|
27
|
-
min-height: 44px;
|
|
28
|
-
}
|
|
29
|
-
.header--left, .header--right {
|
|
30
|
-
padding: 16.666px 0;
|
|
31
|
-
min-width: 44px;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
|
|
34
|
-
> .contents {
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
align-items: center;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.header--top {
|
|
41
|
-
border-bottom: 0.37px solid var(--border-color);
|
|
42
|
-
}
|
|
43
|
-
.header--bottom {
|
|
44
|
-
border-top: 0.37px solid var(--border-color);
|
|
45
|
-
order: 2;
|
|
46
|
-
}
|
|
47
|
-
.header--left {
|
|
48
|
-
border-right: 0.37px solid var(--border-color);
|
|
49
|
-
}
|
|
50
|
-
.header--right {
|
|
51
|
-
border-left: 0.37px solid var(--border-color);
|
|
52
|
-
order: 2;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.contents {
|
|
56
|
-
flex: 1;
|
|
57
|
-
display: flex;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.header--center > .contents {
|
|
61
|
-
justify-content: center;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.header--top, .header--bottom {
|
|
65
|
-
.before {
|
|
66
|
-
margin-right: calc(50px / var(--ratio-dimensions));
|
|
67
|
-
height: 100%;
|
|
68
|
-
padding: 7px 0;
|
|
69
|
-
box-sizing: border-box;
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.after {
|
|
76
|
-
margin-left: calc(50px / var(--ratio-dimensions));
|
|
77
|
-
height: 100%;
|
|
78
|
-
padding: 7px 0;
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.actions {
|
|
86
|
-
margin: calc(56px / var(--ratio-dimensions)) 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.header--left, .header--right {
|
|
91
|
-
.before {
|
|
92
|
-
margin-bottom: calc(50px / var(--ratio-dimensions));
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.after {
|
|
97
|
-
margin-top: calc(50px / var(--ratio-dimensions));
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.actions {
|
|
102
|
-
margin: 0 calc(56px / var(--ratio-dimensions));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.before, .after {
|
|
107
|
-
display: flex;
|
|
108
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.btn, .a {
|
|
2
|
-
height: 100%;
|
|
3
|
-
aspect-ratio: 1;
|
|
4
|
-
background: none;
|
|
5
|
-
border-radius: 666px;
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
border: calc(2px / var(--ratio-border)) solid transparent;
|
|
10
|
-
color: currentColor;
|
|
11
|
-
|
|
12
|
-
&:hover {
|
|
13
|
-
background: #00000022;
|
|
14
|
-
}
|
|
15
|
-
&:active {
|
|
16
|
-
background: #00000011;
|
|
17
|
-
color: currentColor;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.icon {
|
|
22
|
-
width: 16px;
|
|
23
|
-
height: 16px;
|
|
24
|
-
display: block;
|
|
25
|
-
fill: currentColor;
|
|
26
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.stickyHeader {
|
|
2
|
-
height: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
|
|
6
|
-
&__content {
|
|
7
|
-
flex: 1;
|
|
8
|
-
overflow: auto;
|
|
9
|
-
|
|
10
|
-
&--bottom, &--right {
|
|
11
|
-
order: 1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.stickyHeader--left, .stickyHeader--right {
|
|
17
|
-
flex-direction: row;
|
|
18
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
.header {
|
|
2
|
-
--border-color: var(--header-border);
|
|
3
|
-
--background-color: var(--header-bg);
|
|
4
|
-
background-clip: padding-box;
|
|
5
|
-
background: var(--background-color);
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
font-size: 15px;
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
color: var(--header-text);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.header--toolbar {
|
|
15
|
-
--border-color: var(--toolbar-border);
|
|
16
|
-
--background-color: var(--toolbar-bg);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.header--colored {
|
|
20
|
-
--border-color: var(--custom-header-color);
|
|
21
|
-
--background-color: var(--custom-header-color);
|
|
22
|
-
color: var(--custom-text-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.header--top, .header--bottom {
|
|
26
|
-
padding: 0 16.666px;
|
|
27
|
-
min-height: 44px;
|
|
28
|
-
}
|
|
29
|
-
.header--left, .header--right {
|
|
30
|
-
padding: 16.666px 0;
|
|
31
|
-
min-width: 44px;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
|
|
34
|
-
> .contents {
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
align-items: center;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.header--top {
|
|
41
|
-
border-bottom: 0.37px solid var(--border-color);
|
|
42
|
-
}
|
|
43
|
-
.header--bottom {
|
|
44
|
-
border-top: 0.37px solid var(--border-color);
|
|
45
|
-
order: 2;
|
|
46
|
-
}
|
|
47
|
-
.header--left {
|
|
48
|
-
border-right: 0.37px solid var(--border-color);
|
|
49
|
-
}
|
|
50
|
-
.header--right {
|
|
51
|
-
border-left: 0.37px solid var(--border-color);
|
|
52
|
-
order: 2;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.contents {
|
|
56
|
-
flex: 1;
|
|
57
|
-
display: flex;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.header--center > .contents {
|
|
61
|
-
justify-content: center;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.header--top, .header--bottom {
|
|
65
|
-
.before {
|
|
66
|
-
margin-right: calc(50px / var(--ratio-dimensions));
|
|
67
|
-
height: 100%;
|
|
68
|
-
padding: 7px 0;
|
|
69
|
-
box-sizing: border-box;
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.after {
|
|
76
|
-
margin-left: calc(50px / var(--ratio-dimensions));
|
|
77
|
-
height: 100%;
|
|
78
|
-
padding: 7px 0;
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.actions {
|
|
86
|
-
margin: calc(56px / var(--ratio-dimensions)) 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.header--left, .header--right {
|
|
91
|
-
.before {
|
|
92
|
-
margin-bottom: calc(50px / var(--ratio-dimensions));
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.after {
|
|
97
|
-
margin-top: calc(50px / var(--ratio-dimensions));
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.actions {
|
|
102
|
-
margin: 0 calc(56px / var(--ratio-dimensions));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.before, .after {
|
|
107
|
-
display: flex;
|
|
108
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.btn, .a {
|
|
2
|
-
height: 100%;
|
|
3
|
-
aspect-ratio: 1;
|
|
4
|
-
background: none;
|
|
5
|
-
border-radius: 666px;
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
border: calc(2px / var(--ratio-border)) solid transparent;
|
|
10
|
-
color: currentColor;
|
|
11
|
-
|
|
12
|
-
&:hover {
|
|
13
|
-
background: #00000022;
|
|
14
|
-
}
|
|
15
|
-
&:active {
|
|
16
|
-
background: #00000011;
|
|
17
|
-
color: currentColor;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.icon {
|
|
22
|
-
width: 16px;
|
|
23
|
-
height: 16px;
|
|
24
|
-
display: block;
|
|
25
|
-
fill: currentColor;
|
|
26
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.stickyHeader {
|
|
2
|
-
height: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
|
|
6
|
-
&__content {
|
|
7
|
-
flex: 1;
|
|
8
|
-
overflow: auto;
|
|
9
|
-
|
|
10
|
-
&--bottom, &--right {
|
|
11
|
-
order: 1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.stickyHeader--left, .stickyHeader--right {
|
|
17
|
-
flex-direction: row;
|
|
18
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { Header, ICON, StickyHeader, HeaderIconAction } from "../../../../index";
|
|
4
|
-
import { NextLink } from "../../../NextLink";
|
|
5
|
-
|
|
6
|
-
const HeaderDemo = () => {
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-magic-numbers,react/no-array-index-key
|
|
8
|
-
const longContent = new Array(1000).fill(null).map((_, key) => <div key={key}>content</div>);
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<Header>Some place</Header>
|
|
13
|
-
{longContent}
|
|
14
|
-
</>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const CenteredHeaderDemo = () => {
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
21
|
-
<Header center={true}>Messages</Header>
|
|
22
|
-
<div>
|
|
23
|
-
Header text is centered
|
|
24
|
-
</div>
|
|
25
|
-
</>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const ToolbarVariantDemo = () => {
|
|
30
|
-
return (
|
|
31
|
-
<>
|
|
32
|
-
<Header center={true} variant={"toolbar"}>Toolbar version</Header>
|
|
33
|
-
</>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const handleClick = () => { alert(1); };
|
|
38
|
-
|
|
39
|
-
// eslint-disable-next-line max-lines-per-function
|
|
40
|
-
const HeaderWithButtonsDemo = () => {
|
|
41
|
-
const demo = (
|
|
42
|
-
<>
|
|
43
|
-
<HeaderIconAction icon={ICON.back} onClick={handleClick} />
|
|
44
|
-
<HeaderIconAction icon={ICON.checkmark} onClick={handleClick} />
|
|
45
|
-
</>
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<>
|
|
50
|
-
<Header center={true} before={"A text"}>Messages</Header>
|
|
51
|
-
<div>
|
|
52
|
-
Header text is centered
|
|
53
|
-
</div>
|
|
54
|
-
<Header before={"A text"}>Messages</Header>
|
|
55
|
-
<div>
|
|
56
|
-
Header text is start aligned
|
|
57
|
-
</div>
|
|
58
|
-
<Header before={demo}>Messages</Header>
|
|
59
|
-
<div>
|
|
60
|
-
Some button icons are added on the left to left aligned title
|
|
61
|
-
</div>
|
|
62
|
-
<Header before={demo} center={true}>Messages</Header>
|
|
63
|
-
<div>
|
|
64
|
-
Some button icons are added on the left to centered aligned title
|
|
65
|
-
</div>
|
|
66
|
-
<Header
|
|
67
|
-
before={<HeaderIconAction icon={ICON.back} to={"/react-miui"} Link={NextLink} />}
|
|
68
|
-
center={true}
|
|
69
|
-
>Messages
|
|
70
|
-
</Header>
|
|
71
|
-
<div>
|
|
72
|
-
Some internal link icons are added on the left to centered aligned title
|
|
73
|
-
</div>
|
|
74
|
-
<Header
|
|
75
|
-
before={<HeaderIconAction icon={ICON.back} href={"https://www.npmjs.com/package/react-miui"} />}
|
|
76
|
-
center={true}
|
|
77
|
-
>Messages
|
|
78
|
-
</Header>
|
|
79
|
-
<div>
|
|
80
|
-
Some external link icons are added on the left to centered aligned title
|
|
81
|
-
</div>
|
|
82
|
-
<Header
|
|
83
|
-
before={<HeaderIconAction icon={ICON.back} href={"https://www.npmjs.com/package/react-miui"} />}
|
|
84
|
-
after={<HeaderIconAction icon={ICON.checkmark} href={"https://www.npmjs.com/package/react-miui"} />}
|
|
85
|
-
center={true}
|
|
86
|
-
>Messages
|
|
87
|
-
</Header>
|
|
88
|
-
<div>
|
|
89
|
-
Some external link icons are added on both sides to centered aligned title
|
|
90
|
-
</div>
|
|
91
|
-
</>
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
const HeaderWithButtonsOnSideDemo = () => {
|
|
96
|
-
const demo = (
|
|
97
|
-
<>
|
|
98
|
-
<HeaderIconAction icon={ICON.back} onClick={handleClick} />
|
|
99
|
-
<HeaderIconAction icon={ICON.checkmark} onClick={handleClick} />
|
|
100
|
-
</>
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<StickyHeader position={"left"}>
|
|
105
|
-
<Header
|
|
106
|
-
center={true}
|
|
107
|
-
before={demo}
|
|
108
|
-
after={demo}
|
|
109
|
-
>M
|
|
110
|
-
</Header>
|
|
111
|
-
<StickyHeader.Content>
|
|
112
|
-
Header is on the side
|
|
113
|
-
</StickyHeader.Content>
|
|
114
|
-
</StickyHeader>
|
|
115
|
-
);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export { HeaderDemo, CenteredHeaderDemo, ToolbarVariantDemo, HeaderWithButtonsDemo, HeaderWithButtonsOnSideDemo };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
.coloredBox {
|
|
2
|
-
height: 300px;
|
|
3
|
-
background: var(--green1-darker);
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
color: white;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.header {
|
|
12
|
-
--custom-header-color: var(--green1-darker);
|
|
13
|
-
--custom-text-color: white;
|
|
14
|
-
}
|