react-miui 0.4.3 → 0.5.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/CHANGELOG.md +5 -0
- package/dist/components/layout/card/Card.d.ts +8 -0
- package/dist/components/layout/card/Card.d.ts.map +1 -0
- package/dist/components/layout/card/Card.js +19 -0
- package/dist/components/layout/card/Card.js.map +1 -0
- package/dist/components/layout/card/Card.module.scss +15 -0
- package/dist/components/layout/section/Section.d.ts +12 -0
- package/dist/components/layout/section/Section.d.ts.map +1 -0
- package/dist/components/layout/section/Section.js +22 -0
- package/dist/components/layout/section/Section.js.map +1 -0
- package/dist/components/layout/section/Section.module.scss +17 -0
- package/dist/components/layout/section/SectionContainer.d.ts +4 -0
- package/dist/components/layout/section/SectionContainer.d.ts.map +1 -0
- package/dist/components/layout/section/SectionContainer.js +13 -0
- package/dist/components/layout/section/SectionContainer.js.map +1 -0
- package/dist/components/layout/section/SectionContainer.module.scss +4 -0
- package/dist/global.scss +2 -0
- package/docs/enums/ICON.html +6 -6
- package/docs/index.html +4 -4
- package/docs/modules/Item.html +3 -3
- package/docs/modules/List.html +3 -3
- package/docs/modules/StickyHeader.html +4 -4
- package/docs/modules.html +16 -16
- package/docs/pages/Tutorials/Test.html +3 -3
- package/esm/components/layout/card/Card.d.ts +8 -0
- package/esm/components/layout/card/Card.d.ts.map +1 -0
- package/esm/components/layout/card/Card.js +13 -0
- package/esm/components/layout/card/Card.js.map +1 -0
- package/esm/components/layout/card/Card.module.scss +15 -0
- package/esm/components/layout/section/Section.d.ts +12 -0
- package/esm/components/layout/section/Section.d.ts.map +1 -0
- package/esm/components/layout/section/Section.js +16 -0
- package/esm/components/layout/section/Section.js.map +1 -0
- package/esm/components/layout/section/Section.module.scss +17 -0
- package/esm/components/layout/section/SectionContainer.d.ts +4 -0
- package/esm/components/layout/section/SectionContainer.d.ts.map +1 -0
- package/esm/components/layout/section/SectionContainer.js +7 -0
- package/esm/components/layout/section/SectionContainer.js.map +1 -0
- package/esm/components/layout/section/SectionContainer.module.scss +4 -0
- package/esm/global.scss +2 -0
- package/package.json +2 -2
- package/src/components/layout/card/Card.module.scss +15 -0
- package/src/components/layout/card/Card.tsx +26 -0
- package/src/components/layout/section/Section.module.scss +17 -0
- package/src/components/layout/section/Section.tsx +34 -0
- package/src/components/layout/section/SectionContainer.module.scss +4 -0
- package/src/components/layout/section/SectionContainer.tsx +11 -0
- package/src/demo/Main.module.scss +2 -0
- package/src/demo/components/layout/card/Card.tsx +21 -0
- package/src/demo/components/layout/section/Section.tsx +34 -0
- package/src/demo/componentsMap.ts +10 -0
- package/src/global.scss +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
6
6
|
## [UNRELEASED]
|
|
7
7
|
(nothing yet)
|
|
8
8
|
|
|
9
|
+
## [0.5.0] - 2021-12-17
|
|
10
|
+
### Added
|
|
11
|
+
- Section component + container
|
|
12
|
+
- Card component
|
|
13
|
+
|
|
9
14
|
## [0.4.3] - 2021-11-27
|
|
10
15
|
### Fixed
|
|
11
16
|
- Button component crashing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,aAAK,QAAQ,GAAG,QAAQ,CAAC;AAEzB,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,QAAQ,CAAC;CACtB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAWzB,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Card = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
+
const makeVariants_js_1 = require("../../../utils/makeVariants.js");
|
|
10
|
+
const Card_module_scss_1 = __importDefault(require("./Card.module.scss"));
|
|
11
|
+
const Card = (props) => {
|
|
12
|
+
const v = makeVariants_js_1.makeVariants(props.variant);
|
|
13
|
+
const cls = classnames_1.default(Card_module_scss_1.default.card, {
|
|
14
|
+
[Card_module_scss_1.default.margin]: v.includes("margin"),
|
|
15
|
+
});
|
|
16
|
+
return (react_1.default.createElement("div", { className: cls }, props.children));
|
|
17
|
+
};
|
|
18
|
+
exports.Card = Card;
|
|
19
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,oEAA8D;AAC9D,0EAAwC;AAQxC,MAAM,IAAI,GAAoB,CAAC,KAAK,EAAE,EAAE;IACpC,MAAM,CAAC,GAAG,8BAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,GAAG,GAAG,oBAAU,CAAC,0BAAM,CAAC,IAAI,EAAE;QAChC,CAAC,0BAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;KACxC,CAAC,CAAC;IAIH,OAAO,CACH,uCAAK,SAAS,EAAE,GAAG,IAAG,KAAK,CAAC,QAAQ,CAAO,CAC9C,CAAC;AACN,CAAC,CAAC;AAEO,oBAAI"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SectionContainer } from "./SectionContainer.js";
|
|
3
|
+
interface SubComponents {
|
|
4
|
+
Container: typeof SectionContainer;
|
|
5
|
+
}
|
|
6
|
+
declare type Variant = "horizontal" | "vertical";
|
|
7
|
+
interface Props {
|
|
8
|
+
variant?: Variant | Variant[];
|
|
9
|
+
}
|
|
10
|
+
declare const Section: React.FC<Props> & SubComponents;
|
|
11
|
+
export { Section };
|
|
12
|
+
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/section/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,UAAU,aAAa;IACnB,SAAS,EAAE,OAAO,gBAAgB,CAAC;CACtC;AAED,aAAK,OAAO,GAAG,YAAY,GAAG,UAAU,CAAC;AAEzC,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;CACjC;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,aAYhC,CAAC;AAIF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Section = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
+
const SectionContainer_js_1 = require("./SectionContainer.js");
|
|
10
|
+
const makeVariants_js_1 = require("../../../utils/makeVariants.js");
|
|
11
|
+
const Section_module_scss_1 = __importDefault(require("./Section.module.scss"));
|
|
12
|
+
const Section = (props) => {
|
|
13
|
+
const v = makeVariants_js_1.makeVariants(props.variant);
|
|
14
|
+
const cls = classnames_1.default(Section_module_scss_1.default.section, {
|
|
15
|
+
[Section_module_scss_1.default.vertical]: v.includes("vertical"),
|
|
16
|
+
[Section_module_scss_1.default.horizontal]: v.includes("horizontal"),
|
|
17
|
+
});
|
|
18
|
+
return (react_1.default.createElement("section", { className: cls }, props.children));
|
|
19
|
+
};
|
|
20
|
+
exports.Section = Section;
|
|
21
|
+
Section.Container = SectionContainer_js_1.SectionContainer;
|
|
22
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../src/components/layout/section/Section.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,+DAAyD;AACzD,oEAA8D;AAC9D,gFAA2C;AAY3C,MAAM,OAAO,GAAoC,CAAC,KAAK,EAAE,EAAE;IACvD,MAAM,CAAC,GAAG,8BAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtC,MAAM,GAAG,GAAG,oBAAU,CAAC,6BAAM,CAAC,OAAO,EAAE;QACnC,CAAC,6BAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QACzC,CAAC,6BAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;KAChD,CAAC,CAAC;IACH,OAAO,CACH,2CAAS,SAAS,EAAE,GAAG,IAClB,KAAK,CAAC,QAAQ,CACT,CACb,CAAC;AACN,CAAC,CAAC;AAIO,0BAAO;AAFhB,OAAO,CAAC,SAAS,GAAG,sCAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/section/SectionContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAI7B,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SectionContainer = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const SectionContainer_module_scss_1 = __importDefault(require("./SectionContainer.module.scss"));
|
|
9
|
+
const SectionContainer = (props) => {
|
|
10
|
+
return (react_1.default.createElement("div", { className: SectionContainer_module_scss_1.default.container }, props.children));
|
|
11
|
+
};
|
|
12
|
+
exports.SectionContainer = SectionContainer;
|
|
13
|
+
//# sourceMappingURL=SectionContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionContainer.js","sourceRoot":"","sources":["../../../../src/components/layout/section/SectionContainer.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,kGAAoD;AAEpD,MAAM,gBAAgB,GAAa,CAAC,KAAK,EAAE,EAAE;IACzC,OAAO,CACH,uCAAK,SAAS,EAAE,sCAAM,CAAC,SAAS,IAAG,KAAK,CAAC,QAAQ,CAAO,CAC3D,CAAC;AACN,CAAC,CAAC;AAEO,4CAAgB"}
|
package/dist/global.scss
CHANGED
package/docs/enums/ICON.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>ICON | react-miui - v0.
|
|
7
|
-
<meta name="description" content="Documentation for react-miui - v0.
|
|
6
|
+
<title>ICON | react-miui - v0.5.0</title>
|
|
7
|
+
<meta name="description" content="Documentation for react-miui - v0.5.0">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
9
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
10
|
<link rel="stylesheet" href="../assets/css/pages.css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<li class="state loading">Preparing search index...</li>
|
|
24
24
|
<li class="state failure">The search index is not available</li>
|
|
25
25
|
</ul>
|
|
26
|
-
<a href="../index.html" class="title">react-miui - v0.
|
|
26
|
+
<a href="../index.html" class="title">react-miui - v0.5.0</a>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="table-cell" id="tsd-widgets">
|
|
29
29
|
<div id="tsd-filter">
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<div class="tsd-signature tsd-kind-icon">back<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = "back"</span></div>
|
|
91
91
|
<aside class="tsd-sources">
|
|
92
92
|
<ul>
|
|
93
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
93
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/icons/Icon.tsx#L10">src/components/icons/Icon.tsx:10</a></li>
|
|
94
94
|
</ul>
|
|
95
95
|
</aside>
|
|
96
96
|
</section>
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
<div class="tsd-signature tsd-kind-icon">checkmark<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = "checkmark"</span></div>
|
|
101
101
|
<aside class="tsd-sources">
|
|
102
102
|
<ul>
|
|
103
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
103
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/icons/Icon.tsx#L9">src/components/icons/Icon.tsx:9</a></li>
|
|
104
104
|
</ul>
|
|
105
105
|
</aside>
|
|
106
106
|
</section>
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
<div class="tsd-signature tsd-kind-icon">forward<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = "forward"</span></div>
|
|
111
111
|
<aside class="tsd-sources">
|
|
112
112
|
<ul>
|
|
113
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
113
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/icons/Icon.tsx#L11">src/components/icons/Icon.tsx:11</a></li>
|
|
114
114
|
</ul>
|
|
115
115
|
</aside>
|
|
116
116
|
</section>
|
package/docs/index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>react-miui - v0.
|
|
7
|
-
<meta name="description" content="Documentation for react-miui - v0.
|
|
6
|
+
<title>react-miui - v0.5.0</title>
|
|
7
|
+
<meta name="description" content="Documentation for react-miui - v0.5.0">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
9
|
<link rel="stylesheet" href="assets/css/main.css">
|
|
10
10
|
<link rel="stylesheet" href="assets/css/pages.css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<li class="state loading">Preparing search index...</li>
|
|
24
24
|
<li class="state failure">The search index is not available</li>
|
|
25
25
|
</ul>
|
|
26
|
-
<a href="index.html" class="title">react-miui - v0.
|
|
26
|
+
<a href="index.html" class="title">react-miui - v0.5.0</a>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="table-cell" id="tsd-widgets">
|
|
29
29
|
<div id="tsd-filter">
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<a href="modules.html">Globals</a>
|
|
58
58
|
</li>
|
|
59
59
|
</ul>
|
|
60
|
-
<h1>Project react-miui - v0.
|
|
60
|
+
<h1>Project react-miui - v0.5.0</h1>
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
63
|
</header>
|
package/docs/modules/Item.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>Item | react-miui - v0.
|
|
7
|
-
<meta name="description" content="Documentation for react-miui - v0.
|
|
6
|
+
<title>Item | react-miui - v0.5.0</title>
|
|
7
|
+
<meta name="description" content="Documentation for react-miui - v0.5.0">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
9
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
10
|
<link rel="stylesheet" href="../assets/css/pages.css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<li class="state loading">Preparing search index...</li>
|
|
24
24
|
<li class="state failure">The search index is not available</li>
|
|
25
25
|
</ul>
|
|
26
|
-
<a href="../index.html" class="title">react-miui - v0.
|
|
26
|
+
<a href="../index.html" class="title">react-miui - v0.5.0</a>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="table-cell" id="tsd-widgets">
|
|
29
29
|
<div id="tsd-filter">
|
package/docs/modules/List.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>List | react-miui - v0.
|
|
7
|
-
<meta name="description" content="Documentation for react-miui - v0.
|
|
6
|
+
<title>List | react-miui - v0.5.0</title>
|
|
7
|
+
<meta name="description" content="Documentation for react-miui - v0.5.0">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
9
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
10
|
<link rel="stylesheet" href="../assets/css/pages.css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<li class="state loading">Preparing search index...</li>
|
|
24
24
|
<li class="state failure">The search index is not available</li>
|
|
25
25
|
</ul>
|
|
26
|
-
<a href="../index.html" class="title">react-miui - v0.
|
|
26
|
+
<a href="../index.html" class="title">react-miui - v0.5.0</a>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="table-cell" id="tsd-widgets">
|
|
29
29
|
<div id="tsd-filter">
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>StickyHeader | react-miui - v0.
|
|
7
|
-
<meta name="description" content="Documentation for react-miui - v0.
|
|
6
|
+
<title>StickyHeader | react-miui - v0.5.0</title>
|
|
7
|
+
<meta name="description" content="Documentation for react-miui - v0.5.0">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
9
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
10
|
<link rel="stylesheet" href="../assets/css/pages.css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<li class="state loading">Preparing search index...</li>
|
|
24
24
|
<li class="state failure">The search index is not available</li>
|
|
25
25
|
</ul>
|
|
26
|
-
<a href="../index.html" class="title">react-miui - v0.
|
|
26
|
+
<a href="../index.html" class="title">react-miui - v0.5.0</a>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="table-cell" id="tsd-widgets">
|
|
29
29
|
<div id="tsd-filter">
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<li class="tsd-description">
|
|
93
93
|
<aside class="tsd-sources">
|
|
94
94
|
<ul>
|
|
95
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
95
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/layout/header/StickyHeader.tsx#L50">src/components/layout/header/StickyHeader.tsx:50</a></li>
|
|
96
96
|
</ul>
|
|
97
97
|
</aside>
|
|
98
98
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
package/docs/modules.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>react-miui - v0.
|
|
7
|
-
<meta name="description" content="Documentation for react-miui - v0.
|
|
6
|
+
<title>react-miui - v0.5.0</title>
|
|
7
|
+
<meta name="description" content="Documentation for react-miui - v0.5.0">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
9
|
<link rel="stylesheet" href="assets/css/main.css">
|
|
10
10
|
<link rel="stylesheet" href="assets/css/pages.css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<li class="state loading">Preparing search index...</li>
|
|
24
24
|
<li class="state failure">The search index is not available</li>
|
|
25
25
|
</ul>
|
|
26
|
-
<a href="index.html" class="title">react-miui - v0.
|
|
26
|
+
<a href="index.html" class="title">react-miui - v0.5.0</a>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="table-cell" id="tsd-widgets">
|
|
29
29
|
<div id="tsd-filter">
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<a href="modules.html">Globals</a>
|
|
58
58
|
</li>
|
|
59
59
|
</ul>
|
|
60
|
-
<h1>Project react-miui - v0.
|
|
60
|
+
<h1>Project react-miui - v0.5.0</h1>
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
63
|
</header>
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
<div class="tsd-signature tsd-kind-icon">Action<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.VFC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
111
111
|
<aside class="tsd-sources">
|
|
112
112
|
<ul>
|
|
113
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
113
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/ui/action/Action.tsx#L22">src/components/ui/action/Action.tsx:22</a></li>
|
|
114
114
|
</ul>
|
|
115
115
|
</aside>
|
|
116
116
|
</section>
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<div class="tsd-signature tsd-kind-icon">Button<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
121
121
|
<aside class="tsd-sources">
|
|
122
122
|
<ul>
|
|
123
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
123
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/ui/button/Button.tsx#L12">src/components/ui/button/Button.tsx:12</a></li>
|
|
124
124
|
</ul>
|
|
125
125
|
</aside>
|
|
126
126
|
</section>
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
<div class="tsd-signature tsd-kind-icon">Checkbox<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
131
131
|
<aside class="tsd-sources">
|
|
132
132
|
<ul>
|
|
133
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
133
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/form/Checkbox.tsx#L13">src/components/form/Checkbox.tsx:13</a></li>
|
|
134
134
|
</ul>
|
|
135
135
|
</aside>
|
|
136
136
|
</section>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
<div class="tsd-signature tsd-kind-icon">Direction<wbr>Pad<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
141
141
|
<aside class="tsd-sources">
|
|
142
142
|
<ul>
|
|
143
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
143
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/ui/directionPad/Pad.tsx#L17">src/components/ui/directionPad/Pad.tsx:17</a></li>
|
|
144
144
|
</ul>
|
|
145
145
|
</aside>
|
|
146
146
|
</section>
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
<div class="tsd-signature tsd-kind-icon">Equal<wbr>Actions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
151
151
|
<aside class="tsd-sources">
|
|
152
152
|
<ul>
|
|
153
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
153
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/ui/action/EqualActions.tsx#L11">src/components/ui/action/EqualActions.tsx:11</a></li>
|
|
154
154
|
</ul>
|
|
155
155
|
</aside>
|
|
156
156
|
</section>
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
<div class="tsd-signature tsd-kind-icon">Header<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
161
161
|
<aside class="tsd-sources">
|
|
162
162
|
<ul>
|
|
163
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
163
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/layout/header/Header.tsx#L23">src/components/layout/header/Header.tsx:23</a></li>
|
|
164
164
|
</ul>
|
|
165
165
|
</aside>
|
|
166
166
|
</section>
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
<div class="tsd-signature tsd-kind-icon">Header<wbr>Icon<wbr>Action<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.VFC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
171
171
|
<aside class="tsd-sources">
|
|
172
172
|
<ul>
|
|
173
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
173
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/layout/header/HeaderIconAction.tsx#L22">src/components/layout/header/HeaderIconAction.tsx:22</a></li>
|
|
174
174
|
</ul>
|
|
175
175
|
</aside>
|
|
176
176
|
</section>
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
<div class="tsd-signature tsd-kind-icon">Icon<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
181
181
|
<aside class="tsd-sources">
|
|
182
182
|
<ul>
|
|
183
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
183
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/icons/Icon.tsx#L25">src/components/icons/Icon.tsx:25</a></li>
|
|
184
184
|
</ul>
|
|
185
185
|
</aside>
|
|
186
186
|
</section>
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
<div class="tsd-signature tsd-kind-icon">Item<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">SubComponents</span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
191
191
|
<aside class="tsd-sources">
|
|
192
192
|
<ul>
|
|
193
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
193
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/layout/list/Item.tsx#L27">src/components/layout/list/Item.tsx:27</a></li>
|
|
194
194
|
</ul>
|
|
195
195
|
</aside>
|
|
196
196
|
</section>
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
<div class="tsd-signature tsd-kind-icon">List<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">SubComponents</span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
201
201
|
<aside class="tsd-sources">
|
|
202
202
|
<ul>
|
|
203
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
203
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/layout/list/List.tsx#L10">src/components/layout/list/List.tsx:10</a></li>
|
|
204
204
|
</ul>
|
|
205
205
|
</aside>
|
|
206
206
|
</section>
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
<div class="tsd-signature tsd-kind-icon">Sticky<wbr>Header<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">Content</span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
211
211
|
<aside class="tsd-sources">
|
|
212
212
|
<ul>
|
|
213
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
213
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/layout/header/StickyHeader.tsx#L17">src/components/layout/header/StickyHeader.tsx:17</a></li>
|
|
214
214
|
</ul>
|
|
215
215
|
</aside>
|
|
216
216
|
</section>
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
<div class="tsd-signature tsd-kind-icon">Toggle<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.VFC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Props</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
221
221
|
<aside class="tsd-sources">
|
|
222
222
|
<ul>
|
|
223
|
-
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/
|
|
223
|
+
<li>Defined in <a href="https://github.com/dzek69/react-miui/blob/c202cd3/src/components/form/Toggle.tsx#L11">src/components/form/Toggle.tsx:11</a></li>
|
|
224
224
|
</ul>
|
|
225
225
|
</aside>
|
|
226
226
|
</section>
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>Test | react-miui - v0.
|
|
7
|
-
<meta name="description" content="Documentation for react-miui - v0.
|
|
6
|
+
<title>Test | react-miui - v0.5.0</title>
|
|
7
|
+
<meta name="description" content="Documentation for react-miui - v0.5.0">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
9
|
<link rel="stylesheet" href="../../assets/css/main.css">
|
|
10
10
|
<link rel="stylesheet" href="../../assets/css/pages.css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<li class="state loading">Preparing search index...</li>
|
|
24
24
|
<li class="state failure">The search index is not available</li>
|
|
25
25
|
</ul>
|
|
26
|
-
<a href="../../index.html" class="title">react-miui - v0.
|
|
26
|
+
<a href="../../index.html" class="title">react-miui - v0.5.0</a>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="table-cell" id="tsd-widgets">
|
|
29
29
|
<div id="tsd-filter">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,aAAK,QAAQ,GAAG,QAAQ,CAAC;AAEzB,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,QAAQ,CAAC;CACtB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAWzB,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { makeVariants } from "../../../utils/makeVariants.js";
|
|
4
|
+
import styles from "./Card.module.scss";
|
|
5
|
+
const Card = (props) => {
|
|
6
|
+
const v = makeVariants(props.variant);
|
|
7
|
+
const cls = classnames(styles.card, {
|
|
8
|
+
[styles.margin]: v.includes("margin"),
|
|
9
|
+
});
|
|
10
|
+
return (React.createElement("div", { className: cls }, props.children));
|
|
11
|
+
};
|
|
12
|
+
export { Card };
|
|
13
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/layout/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAQxC,MAAM,IAAI,GAAoB,CAAC,KAAK,EAAE,EAAE;IACpC,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE;QAChC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;KACxC,CAAC,CAAC;IAIH,OAAO,CACH,6BAAK,SAAS,EAAE,GAAG,IAAG,KAAK,CAAC,QAAQ,CAAO,CAC9C,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SectionContainer } from "./SectionContainer.js";
|
|
3
|
+
interface SubComponents {
|
|
4
|
+
Container: typeof SectionContainer;
|
|
5
|
+
}
|
|
6
|
+
declare type Variant = "horizontal" | "vertical";
|
|
7
|
+
interface Props {
|
|
8
|
+
variant?: Variant | Variant[];
|
|
9
|
+
}
|
|
10
|
+
declare const Section: React.FC<Props> & SubComponents;
|
|
11
|
+
export { Section };
|
|
12
|
+
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/section/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,UAAU,aAAa;IACnB,SAAS,EAAE,OAAO,gBAAgB,CAAC;CACtC;AAED,aAAK,OAAO,GAAG,YAAY,GAAG,UAAU,CAAC;AAEzC,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;CACjC;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,aAYhC,CAAC;AAIF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { SectionContainer } from "./SectionContainer.js";
|
|
4
|
+
import { makeVariants } from "../../../utils/makeVariants.js";
|
|
5
|
+
import styles from "./Section.module.scss";
|
|
6
|
+
const Section = (props) => {
|
|
7
|
+
const v = makeVariants(props.variant);
|
|
8
|
+
const cls = classnames(styles.section, {
|
|
9
|
+
[styles.vertical]: v.includes("vertical"),
|
|
10
|
+
[styles.horizontal]: v.includes("horizontal"),
|
|
11
|
+
});
|
|
12
|
+
return (React.createElement("section", { className: cls }, props.children));
|
|
13
|
+
};
|
|
14
|
+
Section.Container = SectionContainer;
|
|
15
|
+
export { Section };
|
|
16
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../src/components/layout/section/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAY3C,MAAM,OAAO,GAAoC,CAAC,KAAK,EAAE,EAAE;IACvD,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtC,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE;QACnC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QACzC,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;KAChD,CAAC,CAAC;IACH,OAAO,CACH,iCAAS,SAAS,EAAE,GAAG,IAClB,KAAK,CAAC,QAAQ,CACT,CACb,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,CAAC,SAAS,GAAG,gBAAgB,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/section/SectionContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAI7B,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styles from "./SectionContainer.module.scss";
|
|
3
|
+
const SectionContainer = (props) => {
|
|
4
|
+
return (React.createElement("div", { className: styles.container }, props.children));
|
|
5
|
+
};
|
|
6
|
+
export { SectionContainer };
|
|
7
|
+
//# sourceMappingURL=SectionContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionContainer.js","sourceRoot":"","sources":["../../../../src/components/layout/section/SectionContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,gCAAgC,CAAC;AAEpD,MAAM,gBAAgB,GAAa,CAAC,KAAK,EAAE,EAAE;IACzC,OAAO,CACH,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS,IAAG,KAAK,CAAC,QAAQ,CAAO,CAC3D,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
package/esm/global.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-miui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"author": "Jacek Nowacki",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"husky": "^4.3.0",
|
|
52
52
|
"jest": "^27.0.6",
|
|
53
53
|
"must": "^0.13.4",
|
|
54
|
-
"next": "^11.1.
|
|
54
|
+
"next": "^11.1.3",
|
|
55
55
|
"react": "^17.0.2",
|
|
56
56
|
"react-dom": "^17.0.2",
|
|
57
57
|
"react-use": "^17.2.4",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
|
|
4
|
+
import { makeVariants } from "../../../utils/makeVariants.js";
|
|
5
|
+
import styles from "./Card.module.scss";
|
|
6
|
+
|
|
7
|
+
type Variants = "margin";
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
variant?: Variants;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const Card: React.FC<Props> = (props) => {
|
|
14
|
+
const v = makeVariants(props.variant);
|
|
15
|
+
const cls = classnames(styles.card, {
|
|
16
|
+
[styles.margin]: v.includes("margin"),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// @TODO auto wrap some children in Section
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div className={cls}>{props.children}</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { Card };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
|
|
4
|
+
import { SectionContainer } from "./SectionContainer.js";
|
|
5
|
+
import { makeVariants } from "../../../utils/makeVariants.js";
|
|
6
|
+
import styles from "./Section.module.scss";
|
|
7
|
+
|
|
8
|
+
interface SubComponents {
|
|
9
|
+
Container: typeof SectionContainer;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type Variant = "horizontal" | "vertical";
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
variant?: Variant | Variant[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Section: React.FC<Props> & SubComponents = (props) => {
|
|
19
|
+
const v = makeVariants(props.variant);
|
|
20
|
+
|
|
21
|
+
const cls = classnames(styles.section, {
|
|
22
|
+
[styles.vertical]: v.includes("vertical"),
|
|
23
|
+
[styles.horizontal]: v.includes("horizontal"),
|
|
24
|
+
});
|
|
25
|
+
return (
|
|
26
|
+
<section className={cls}>
|
|
27
|
+
{props.children}
|
|
28
|
+
</section>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
Section.Container = SectionContainer;
|
|
33
|
+
|
|
34
|
+
export { Section };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Card } from "../../../../components/layout/card/Card";
|
|
3
|
+
import { Section } from "../../../../components/layout/section/Section";
|
|
4
|
+
|
|
5
|
+
const CardDemo = () => {
|
|
6
|
+
return (
|
|
7
|
+
<Section.Container>
|
|
8
|
+
<Card>
|
|
9
|
+
<Section variant={["vertical", "horizontal"]}>Content</Section>
|
|
10
|
+
</Card>
|
|
11
|
+
<Card>
|
|
12
|
+
<Section variant={["vertical", "horizontal"]}>Content</Section>
|
|
13
|
+
</Card>
|
|
14
|
+
<Card variant={"margin"}>
|
|
15
|
+
<Section variant={["vertical", "horizontal"]}>Content</Section>
|
|
16
|
+
</Card>
|
|
17
|
+
</Section.Container>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { CardDemo };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Section } from "../../../../components/layout/section/Section.js";
|
|
3
|
+
import { List } from "../../../../components/layout/list/List";
|
|
4
|
+
import { Item } from "../../../../components/layout/list/Item";
|
|
5
|
+
|
|
6
|
+
const SectionDemo = () => {
|
|
7
|
+
return (
|
|
8
|
+
<Section.Container>
|
|
9
|
+
<Section>
|
|
10
|
+
<List>
|
|
11
|
+
<List.Header>Section name</List.Header>
|
|
12
|
+
<Item>Item</Item>
|
|
13
|
+
<Item>Item</Item>
|
|
14
|
+
</List>
|
|
15
|
+
</Section>
|
|
16
|
+
<Section>
|
|
17
|
+
<List>
|
|
18
|
+
<List.Header>Section name</List.Header>
|
|
19
|
+
<Item>Item</Item>
|
|
20
|
+
<Item>Item</Item>
|
|
21
|
+
</List>
|
|
22
|
+
</Section>
|
|
23
|
+
<Section>
|
|
24
|
+
<List>
|
|
25
|
+
<List.Header>Section name</List.Header>
|
|
26
|
+
<Item>Item</Item>
|
|
27
|
+
<Item>Item</Item>
|
|
28
|
+
</List>
|
|
29
|
+
</Section>
|
|
30
|
+
</Section.Container>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { SectionDemo };
|
|
@@ -27,6 +27,8 @@ import { ItemRatioDemo } from "./components/layout/list/ItemRatio";
|
|
|
27
27
|
import { ItemLabelDemo } from "./components/layout/list/Label";
|
|
28
28
|
import { ListHeaderDemo } from "./components/layout/list/Header";
|
|
29
29
|
import { ValueDemo } from "./components/layout/list/Value";
|
|
30
|
+
import { SectionDemo } from "./components/layout/section/Section";
|
|
31
|
+
import { CardDemo } from "./components/layout/card/Card";
|
|
30
32
|
|
|
31
33
|
interface TheMap {
|
|
32
34
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
@@ -146,6 +148,14 @@ const componentsMap: TheMap = {
|
|
|
146
148
|
},
|
|
147
149
|
},
|
|
148
150
|
},
|
|
151
|
+
Section: {
|
|
152
|
+
name: "Section",
|
|
153
|
+
Component: SectionDemo,
|
|
154
|
+
},
|
|
155
|
+
Card: {
|
|
156
|
+
name: "Card",
|
|
157
|
+
Component: CardDemo,
|
|
158
|
+
},
|
|
149
159
|
Pad: {
|
|
150
160
|
name: "Direction pad",
|
|
151
161
|
Component: DirectionPadDemo,
|