react-miui 0.7.0 → 0.8.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 +13 -0
- package/dist/components/layout/list/Header.d.ts +5 -1
- package/dist/components/layout/list/Header.d.ts.map +1 -1
- package/dist/components/layout/list/Header.js +6 -1
- package/dist/components/layout/list/Header.js.map +1 -1
- package/dist/components/layout/list/Item.d.ts +3 -0
- package/dist/components/layout/list/Item.d.ts.map +1 -1
- package/dist/components/layout/list/Item.js +20 -6
- package/dist/components/layout/list/Item.js.map +1 -1
- package/dist/components/layout/list/Item.module.scss +16 -1
- package/dist/components/layout/list/List.d.ts +6 -1
- package/dist/components/layout/list/List.d.ts.map +1 -1
- package/dist/components/layout/list/List.js +15 -1
- package/dist/components/layout/list/List.js.map +1 -1
- package/dist/components/layout/list/List.module.scss +4 -0
- package/dist/components/ui/button/Button.d.ts.map +1 -1
- package/dist/components/ui/button/Button.js +2 -2
- package/dist/components/ui/button/Button.js.map +1 -1
- package/dist/components/ui/modal/Modal.d.ts +18 -0
- package/dist/components/ui/modal/Modal.d.ts.map +1 -0
- package/dist/components/ui/modal/Modal.js +108 -0
- package/dist/components/ui/modal/Modal.js.map +1 -0
- package/dist/components/ui/modal/Modal.module.scss +92 -0
- package/dist/components/ui/modal/ModalButton.d.ts +8 -0
- package/dist/components/ui/modal/ModalButton.d.ts.map +1 -0
- package/dist/components/ui/modal/ModalButton.js +31 -0
- package/dist/components/ui/modal/ModalButton.js.map +1 -0
- package/dist/components/ui/modal/ModalButtons.d.ts +10 -0
- package/dist/components/ui/modal/ModalButtons.d.ts.map +1 -0
- package/dist/components/ui/modal/ModalButtons.js +15 -0
- package/dist/components/ui/modal/ModalButtons.js.map +1 -0
- package/dist/components/ui/modal/ModalButtons.module.scss +32 -0
- package/dist/components/ui/modal/ModalNoMargin.d.ts +6 -0
- package/dist/components/ui/modal/ModalNoMargin.d.ts.map +1 -0
- package/dist/components/ui/modal/ModalNoMargin.js +22 -0
- package/dist/components/ui/modal/ModalNoMargin.js.map +1 -0
- package/dist/components/ui/toaster/Notification.d.ts +9 -0
- package/dist/components/ui/toaster/Notification.d.ts.map +1 -0
- package/dist/components/ui/toaster/Notification.js +39 -0
- package/dist/components/ui/toaster/Notification.js.map +1 -0
- package/dist/components/ui/toaster/Toaster.d.ts +18 -0
- package/dist/components/ui/toaster/Toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster/Toaster.js +79 -0
- package/dist/components/ui/toaster/Toaster.js.map +1 -0
- package/dist/components/ui/toaster/Toaster.module.scss +32 -0
- package/dist/components/ui/toaster/types.d.ts +7 -0
- package/dist/components/ui/toaster/types.d.ts.map +1 -0
- package/dist/components/ui/toaster/types.js +3 -0
- package/dist/components/ui/toaster/types.js.map +1 -0
- package/dist/global.scss +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/docs/assets/js/search.js +1 -1
- package/docs/assets/js/search.json +1 -1
- package/docs/classes/ToasterProvider.html +1090 -0
- package/docs/enums/ICON.html +27 -8
- package/docs/index.html +29 -4
- package/docs/modules/Item.html +16 -3
- package/docs/modules/List.html +17 -4
- package/docs/modules/Modal.html +160 -0
- package/docs/modules/ModalButtons.html +160 -0
- package/docs/modules/Section.html +16 -3
- package/docs/modules/StickyHeader.html +17 -4
- package/docs/modules.html +104 -23
- package/docs/pages/Tutorials/Test.html +16 -3
- package/esm/components/layout/list/Header.d.ts +5 -1
- package/esm/components/layout/list/Header.d.ts.map +1 -1
- package/esm/components/layout/list/Header.js +6 -1
- package/esm/components/layout/list/Header.js.map +1 -1
- package/esm/components/layout/list/Item.d.ts +3 -0
- package/esm/components/layout/list/Item.d.ts.map +1 -1
- package/esm/components/layout/list/Item.js +20 -6
- package/esm/components/layout/list/Item.js.map +1 -1
- package/esm/components/layout/list/Item.module.scss +16 -1
- package/esm/components/layout/list/List.d.ts +6 -1
- package/esm/components/layout/list/List.d.ts.map +1 -1
- package/esm/components/layout/list/List.js +15 -1
- package/esm/components/layout/list/List.js.map +1 -1
- package/esm/components/layout/list/List.module.scss +4 -0
- package/esm/components/ui/button/Button.d.ts.map +1 -1
- package/esm/components/ui/button/Button.js +2 -2
- package/esm/components/ui/button/Button.js.map +1 -1
- package/esm/components/ui/modal/Modal.d.ts +18 -0
- package/esm/components/ui/modal/Modal.d.ts.map +1 -0
- package/esm/components/ui/modal/Modal.js +83 -0
- package/esm/components/ui/modal/Modal.js.map +1 -0
- package/esm/components/ui/modal/Modal.module.scss +92 -0
- package/esm/components/ui/modal/ModalButton.d.ts +8 -0
- package/esm/components/ui/modal/ModalButton.d.ts.map +1 -0
- package/esm/components/ui/modal/ModalButton.js +13 -0
- package/esm/components/ui/modal/ModalButton.js.map +1 -0
- package/esm/components/ui/modal/ModalButtons.d.ts +10 -0
- package/esm/components/ui/modal/ModalButtons.d.ts.map +1 -0
- package/esm/components/ui/modal/ModalButtons.js +9 -0
- package/esm/components/ui/modal/ModalButtons.js.map +1 -0
- package/esm/components/ui/modal/ModalButtons.module.scss +32 -0
- package/esm/components/ui/modal/ModalNoMargin.d.ts +6 -0
- package/esm/components/ui/modal/ModalNoMargin.d.ts.map +1 -0
- package/esm/components/ui/modal/ModalNoMargin.js +16 -0
- package/esm/components/ui/modal/ModalNoMargin.js.map +1 -0
- package/esm/components/ui/toaster/Notification.d.ts +9 -0
- package/esm/components/ui/toaster/Notification.d.ts.map +1 -0
- package/esm/components/ui/toaster/Notification.js +14 -0
- package/esm/components/ui/toaster/Notification.js.map +1 -0
- package/esm/components/ui/toaster/Toaster.d.ts +18 -0
- package/esm/components/ui/toaster/Toaster.d.ts.map +1 -0
- package/esm/components/ui/toaster/Toaster.js +74 -0
- package/esm/components/ui/toaster/Toaster.js.map +1 -0
- package/esm/components/ui/toaster/Toaster.module.scss +32 -0
- package/esm/components/ui/toaster/types.d.ts +7 -0
- package/esm/components/ui/toaster/types.d.ts.map +1 -0
- package/esm/components/ui/toaster/types.js +2 -0
- package/esm/components/ui/toaster/types.js.map +1 -0
- package/esm/global.scss +3 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -0
- package/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/layout/list/Header.tsx +15 -2
- package/src/components/layout/list/Item.module.scss +16 -1
- package/src/components/layout/list/Item.tsx +28 -7
- package/src/components/layout/list/List.module.scss +4 -0
- package/src/components/layout/list/List.tsx +29 -2
- package/src/components/ui/button/Button.tsx +4 -2
- package/src/components/ui/modal/Modal.module.scss +92 -0
- package/src/components/ui/modal/Modal.tsx +136 -0
- package/src/components/ui/modal/ModalButton.tsx +25 -0
- package/src/components/ui/modal/ModalButtons.module.scss +32 -0
- package/src/components/ui/modal/ModalButtons.tsx +17 -0
- package/src/components/ui/modal/ModalNoMargin.tsx +22 -0
- package/src/components/ui/toaster/Notification.tsx +31 -0
- package/src/components/ui/toaster/Toaster.module.scss +32 -0
- package/src/components/ui/toaster/Toaster.tsx +101 -0
- package/src/components/ui/toaster/types.ts +9 -0
- package/src/demo/Demo.tsx +7 -4
- package/src/demo/Menu.module.scss +1 -0
- package/src/demo/components/layout/list/Inset.tsx +24 -0
- package/src/demo/components/layout/list/Selection.tsx +17 -0
- package/src/demo/components/ui/modal/Modal.tsx +110 -0
- package/src/demo/components/ui/toaster/Toaster.tsx +28 -0
- package/src/demo/componentsMap.ts +31 -0
- package/src/global.scss +3 -0
- package/src/index.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,19 @@ 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.8.0] - 2022-01-27
|
|
10
|
+
### Added
|
|
11
|
+
- modal component
|
|
12
|
+
- toaster component
|
|
13
|
+
### Changed
|
|
14
|
+
- List, Item, Header components support inset variant
|
|
15
|
+
- Item has new prop - `selected` for marking current active item
|
|
16
|
+
### Fixed
|
|
17
|
+
- Item border is on the item itself, not on the child element (fixes some compatibility issues and 1px shorter button element)
|
|
18
|
+
- passing `variant` prop into button html element on Button component
|
|
19
|
+
### Dev
|
|
20
|
+
- fixed menu scrolling
|
|
21
|
+
|
|
9
22
|
## [0.7.0] - 2022-01-11
|
|
10
23
|
### Added
|
|
11
24
|
- textarea component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,aAAK,OAAO,GAAG,OAAO,CAAC;AAEvB,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;CACjC;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAa3B,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -8,8 +8,13 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const classnames_1 = __importDefault(require("classnames"));
|
|
9
9
|
const Item_module_scss_1 = __importDefault(require("./Item.module.scss"));
|
|
10
10
|
const Header_module_scss_1 = __importDefault(require("./Header.module.scss"));
|
|
11
|
+
const makeVariants_1 = require("../../../utils/makeVariants");
|
|
11
12
|
const Header = (props) => {
|
|
12
|
-
|
|
13
|
+
const v = makeVariants_1.makeVariants(props.variant);
|
|
14
|
+
const cls = classnames_1.default(Item_module_scss_1.default.item, Header_module_scss_1.default.header, {
|
|
15
|
+
[Item_module_scss_1.default.inset]: v.includes("inset"),
|
|
16
|
+
});
|
|
17
|
+
return (react_1.default.createElement("li", { className: cls },
|
|
13
18
|
react_1.default.createElement("div", null, props.children)));
|
|
14
19
|
};
|
|
15
20
|
exports.Header = Header;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/components/layout/list/Header.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,0EAAwC;AACxC,8EAAgD;
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/components/layout/list/Header.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,0EAAwC;AACxC,8EAAgD;AAChD,8DAA2D;AAQ3D,MAAM,MAAM,GAAoB,CAAC,KAAK,EAAE,EAAE;IACtC,MAAM,CAAC,GAAG,2BAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtC,MAAM,GAAG,GAAG,oBAAU,CAAC,0BAAM,CAAC,IAAI,EAAE,4BAAY,CAAC,MAAM,EAAE;QACrD,CAAC,0BAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;KACtC,CAAC,CAAC;IAGH,OAAO,CACH,sCAAI,SAAS,EAAE,GAAG;QACd,2CAAM,KAAK,CAAC,QAAQ,CAAO,CAC1B,CACR,CAAC;AACN,CAAC,CAAC;AAEO,wBAAM"}
|
|
@@ -4,6 +4,7 @@ import { Label } from "./Label.js";
|
|
|
4
4
|
interface LinkProps {
|
|
5
5
|
href: string;
|
|
6
6
|
}
|
|
7
|
+
declare type Variant = "inset";
|
|
7
8
|
interface Props {
|
|
8
9
|
href?: string;
|
|
9
10
|
to?: string;
|
|
@@ -11,6 +12,8 @@ interface Props {
|
|
|
11
12
|
className?: string;
|
|
12
13
|
Link?: React.ComponentClass<LinkProps> | React.FC<LinkProps>;
|
|
13
14
|
ratio?: string;
|
|
15
|
+
variant?: Variant | Variant[];
|
|
16
|
+
selected?: boolean | undefined;
|
|
14
17
|
}
|
|
15
18
|
interface SubComponents {
|
|
16
19
|
Label: typeof Label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAInC,UAAU,SAAS;IACf,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,aAAK,OAAO,GAAG,OAAO,CAAC;AAEvB,UAAU,KAAK;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,UAAU,aAAa;IACnB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC;CACvB;AAMD,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,aAyD7B,CAAC;AAKF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -20,9 +20,21 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
20
20
|
const Item_module_scss_1 = __importDefault(require("./Item.module.scss"));
|
|
21
21
|
const Value_js_1 = require("./Value.js");
|
|
22
22
|
const Label_js_1 = require("./Label.js");
|
|
23
|
+
const makeVariants_1 = require("../../../utils/makeVariants");
|
|
24
|
+
const Icon_1 = require("../../icons/Icon");
|
|
25
|
+
const icon = react_1.default.createElement(Icon_1.Icon, { className: Item_module_scss_1.default.icon, name: Icon_1.ICON.forward });
|
|
26
|
+
const noIcon = react_1.default.createElement("span", { className: Item_module_scss_1.default.icon });
|
|
23
27
|
const Item = (props) => {
|
|
24
|
-
const { className, children, href, to, onClick, Link, ratio } = props, restProps = __rest(props, ["className", "children", "href", "to", "onClick", "Link", "ratio"]);
|
|
28
|
+
const { className, children, href, to, onClick, Link, ratio, variant, selected } = props, restProps = __rest(props, ["className", "children", "href", "to", "onClick", "Link", "ratio", "variant", "selected"]);
|
|
29
|
+
const v = makeVariants_1.makeVariants(variant);
|
|
25
30
|
const cls = classnames_1.default(Item_module_scss_1.default.item, className);
|
|
31
|
+
const innerCls = classnames_1.default(Item_module_scss_1.default.content, {
|
|
32
|
+
[Item_module_scss_1.default.inset]: v.includes("inset"),
|
|
33
|
+
[Item_module_scss_1.default.selected]: selected,
|
|
34
|
+
});
|
|
35
|
+
const pre = typeof selected === "boolean"
|
|
36
|
+
? (selected ? icon : noIcon)
|
|
37
|
+
: null;
|
|
26
38
|
const liProps = {
|
|
27
39
|
className: cls,
|
|
28
40
|
};
|
|
@@ -35,7 +47,9 @@ const Item = (props) => {
|
|
|
35
47
|
if (index in r) {
|
|
36
48
|
flex = r[index];
|
|
37
49
|
}
|
|
38
|
-
return react_1.default.createElement("div", { style: { flex } },
|
|
50
|
+
return react_1.default.createElement("div", { style: { flex } },
|
|
51
|
+
pre,
|
|
52
|
+
child);
|
|
39
53
|
});
|
|
40
54
|
if (to) {
|
|
41
55
|
if (!Link) {
|
|
@@ -43,7 +57,7 @@ const Item = (props) => {
|
|
|
43
57
|
}
|
|
44
58
|
return react_1.default.createElement("li", Object.assign({}, liProps),
|
|
45
59
|
react_1.default.createElement(Link, Object.assign({ href: to }, restProps),
|
|
46
|
-
react_1.default.createElement("a", { className:
|
|
60
|
+
react_1.default.createElement("a", { className: innerCls }, ren)));
|
|
47
61
|
}
|
|
48
62
|
if (href) {
|
|
49
63
|
const aProps = Object.assign({}, restProps);
|
|
@@ -51,14 +65,14 @@ const Item = (props) => {
|
|
|
51
65
|
aProps.onClick = onClick;
|
|
52
66
|
}
|
|
53
67
|
return react_1.default.createElement("li", Object.assign({}, liProps),
|
|
54
|
-
react_1.default.createElement("a", Object.assign({ href: href }, aProps, { className:
|
|
68
|
+
react_1.default.createElement("a", Object.assign({ href: href }, aProps, { className: innerCls }), ren));
|
|
55
69
|
}
|
|
56
70
|
if (onClick) {
|
|
57
71
|
return (react_1.default.createElement("li", Object.assign({}, liProps),
|
|
58
|
-
react_1.default.createElement("button", Object.assign({ className: classnames_1.default(Item_module_scss_1.default.button,
|
|
72
|
+
react_1.default.createElement("button", Object.assign({ className: classnames_1.default(Item_module_scss_1.default.button, innerCls), onClick: props.onClick }, restProps), ren)));
|
|
59
73
|
}
|
|
60
74
|
return react_1.default.createElement("li", Object.assign({}, liProps),
|
|
61
|
-
react_1.default.createElement("div", Object.assign({}, restProps, { className:
|
|
75
|
+
react_1.default.createElement("div", Object.assign({}, restProps, { className: innerCls }), ren));
|
|
62
76
|
};
|
|
63
77
|
exports.Item = Item;
|
|
64
78
|
Item.Label = Label_js_1.Label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,0EAAwC;AACxC,yCAAmC;AACnC,yCAAmC;
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","s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AM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,IAAM,SAAS,GACxF,GAAG,CACC,CACR,CACR,CAAC;KACL;IACD,OAAO,sDAAQ,OAAO;QAAE,uDAAS,SAAS,IAAE,SAAS,EAAE,QAAQ,KAAG,GAAG,CAAO,CAAK,CAAC;AACtF,CAAC,CAAC;AAKO,oBAAI;AAHb,IAAI,CAAC,KAAK,GAAG,gBAAK,CAAC;AACnB,IAAI,CAAC,KAAK,GAAG,gBAAK,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
padding: 0;
|
|
5
5
|
font-size: calc(34px / var(--ratio-font));
|
|
6
6
|
|
|
7
|
-
&:not(:first-child)
|
|
7
|
+
&:not(:first-child) {
|
|
8
8
|
border-top: 0.37px solid var(--header-border);
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -29,3 +29,18 @@
|
|
|
29
29
|
min-height: calc(174px / var(--ratio-dimensions));
|
|
30
30
|
align-items: center;
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
.inset {
|
|
34
|
+
padding-left: calc(37px / var(--ratio-dimensions));
|
|
35
|
+
padding-right: calc(37px / var(--ratio-dimensions));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.icon {
|
|
39
|
+
width: 7px;
|
|
40
|
+
margin-right: 10px;
|
|
41
|
+
display: inline-block;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.selected {
|
|
45
|
+
color: var(--main-color);
|
|
46
|
+
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Header } from "./Header.js";
|
|
3
|
+
declare type Variant = "inset";
|
|
4
|
+
interface Props {
|
|
5
|
+
className?: string;
|
|
6
|
+
variant?: Variant | Variant[];
|
|
7
|
+
}
|
|
3
8
|
interface SubComponents {
|
|
4
9
|
Header: typeof Header;
|
|
5
10
|
}
|
|
6
|
-
declare const List: React.FC & SubComponents;
|
|
11
|
+
declare const List: React.FC<Props> & SubComponents;
|
|
7
12
|
export { List };
|
|
8
13
|
//# sourceMappingURL=List.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,aAAK,OAAO,GAAG,OAAO,CAAC;AAEvB,UAAU,KAAK;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;CACjC;AAED,UAAU,aAAa;IACnB,MAAM,EAAE,OAAO,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,aAqB7B,CAAC;AAIF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -5,10 +5,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.List = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
8
9
|
const Header_js_1 = require("./Header.js");
|
|
10
|
+
const makeVariants_1 = require("../../../utils/makeVariants");
|
|
11
|
+
const Item_1 = require("./Item");
|
|
9
12
|
const List_module_scss_1 = __importDefault(require("./List.module.scss"));
|
|
10
13
|
const List = (props) => {
|
|
11
|
-
|
|
14
|
+
const v = makeVariants_1.makeVariants(props.variant);
|
|
15
|
+
const chld = react_1.default.Children.map(props.children, (child) => {
|
|
16
|
+
if (child && typeof child === "object" && "type" in child && (child.type === Item_1.Item || child.type === Header_js_1.Header)) {
|
|
17
|
+
return react_1.default.cloneElement(child, {
|
|
18
|
+
variant: props.variant,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return child;
|
|
22
|
+
});
|
|
23
|
+
return (react_1.default.createElement("ul", { className: classnames_1.default(List_module_scss_1.default.list, {
|
|
24
|
+
[List_module_scss_1.default.inset]: v.includes("inset"),
|
|
25
|
+
}) }, chld));
|
|
12
26
|
};
|
|
13
27
|
exports.List = List;
|
|
14
28
|
List.Header = Header_js_1.Header;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../../src/components/layout/list/List.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../../src/components/layout/list/List.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,2CAAqC;AACrC,8DAA2D;AAC3D,iCAA8B;AAC9B,0EAAwC;AAaxC,MAAM,IAAI,GAAoC,CAAC,KAAK,EAAE,EAAE;IACpD,MAAM,CAAC,GAAG,2BAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtC,MAAM,IAAI,GAAG,eAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QACtD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,WAAI,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAM,CAAC,EAAE;YACzG,OAAO,eAAK,CAAC,YAAY,CAAC,KAAK,EAAE;gBAE7B,OAAO,EAAE,KAAK,CAAC,OAAO;aACzB,CAAC,CAAC;SACN;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,OAAO,CACH,sCACI,SAAS,EAAE,oBAAU,CAAC,0BAAM,CAAC,IAAI,EAAE;YAC/B,CAAC,0BAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;SACtC,CAAC,IACJ,IAAI,CACD,CACR,CAAC;AACN,CAAC,CAAC;AAIO,oBAAI;AAFb,IAAI,CAAC,MAAM,GAAG,kBAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAClC;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAClC;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAkB3E,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -20,8 +20,8 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
20
20
|
const Button_module_scss_1 = __importDefault(require("./Button.module.scss"));
|
|
21
21
|
const makeVariants_js_1 = require("../../../utils/makeVariants.js");
|
|
22
22
|
const Button = (_a) => {
|
|
23
|
-
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
24
|
-
const variants = makeVariants_js_1.makeVariants(
|
|
23
|
+
var { className, children, variant } = _a, props = __rest(_a, ["className", "children", "variant"]);
|
|
24
|
+
const variants = makeVariants_js_1.makeVariants(variant);
|
|
25
25
|
const cls = classnames_1.default(Button_module_scss_1.default.btn, {
|
|
26
26
|
[Button_module_scss_1.default["btn--inline"]]: variants.includes("inline"),
|
|
27
27
|
[Button_module_scss_1.default["btn--outline"]]: variants.includes("outline"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,8EAA0C;AAC1C,oEAA8D;AAM9D,MAAM,MAAM,GAAoE,CAAC,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAEpC,8EAA0C;AAC1C,oEAA8D;AAM9D,MAAM,MAAM,GAAoE,CAAC,EAEhF,EAAE,EAAE;QAF4E,EAC7E,SAAS,EAAE,QAAQ,EAAE,OAAO,OAC/B,EADoC,KAAK,cADuC,oCAEhF,CADyC;IAEtC,MAAM,QAAQ,GAAG,8BAAY,CAAC,OAAO,CAAC,CAAC;IAEvC,MAAM,GAAG,GAAG,oBAAU,CAAC,4BAAM,CAAC,GAAG,EAAE;QAC/B,CAAC,4BAAM,CAAC,aAAa,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACpD,CAAC,4BAAM,CAAC,cAAc,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;KACzD,EAAE,SAAS,CAAC,CAAC;IAEd,OAAO,CACH,0DACQ,KAAK,IACT,SAAS,EAAE,GAAG,EACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,KAC1B,QAAQ,CACD,CACZ,CAAC;AACN,CAAC,CAAC;AAEO,wBAAM"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ModalNegateMargin } from "./ModalNoMargin";
|
|
3
|
+
declare type Variant = "bottom" | "full";
|
|
4
|
+
interface Props {
|
|
5
|
+
onOverlayClick?: (() => void) | "close" | null;
|
|
6
|
+
closeOnEsc?: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
variant?: Variant | Variant[];
|
|
12
|
+
}
|
|
13
|
+
interface SubComponents {
|
|
14
|
+
NegateMargin: typeof ModalNegateMargin;
|
|
15
|
+
}
|
|
16
|
+
declare const Modal: React.FC<Props> & SubComponents;
|
|
17
|
+
export { Modal };
|
|
18
|
+
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,aAAK,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjC,UAAU,KAAK;IACX,cAAc,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;CACjC;AAED,UAAU,aAAa;IACnB,YAAY,EAAE,OAAO,iBAAiB,CAAC;CAC1C;AAGD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,aA4G9B,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Modal = void 0;
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
27
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
28
|
+
const Modal_module_scss_1 = __importDefault(require("./Modal.module.scss"));
|
|
29
|
+
const makeVariants_1 = require("../../../utils/makeVariants");
|
|
30
|
+
const ModalNoMargin_1 = require("./ModalNoMargin");
|
|
31
|
+
const Modal = ({ children, onClose, isOpen, title, className, onOverlayClick = "close", closeOnEsc = true, variant, }) => {
|
|
32
|
+
const [isClosing, setIsClosing] = react_1.useState(false);
|
|
33
|
+
const [isRendered, setIsRendered] = react_1.useState(false);
|
|
34
|
+
const overlayRef = react_1.useRef(null);
|
|
35
|
+
const containerRef = react_1.useRef(null);
|
|
36
|
+
const v = makeVariants_1.makeVariants(variant);
|
|
37
|
+
react_1.useEffect(() => {
|
|
38
|
+
if (!isOpen || !closeOnEsc) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const onKeyDown = (e) => {
|
|
42
|
+
if (e.key === "Escape") {
|
|
43
|
+
onClose();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
document.addEventListener("keydown", onKeyDown);
|
|
47
|
+
return () => {
|
|
48
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
49
|
+
};
|
|
50
|
+
}, [isOpen, closeOnEsc]);
|
|
51
|
+
react_1.useEffect(() => {
|
|
52
|
+
if (!isOpen) {
|
|
53
|
+
setIsClosing(true);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
setIsRendered(true);
|
|
57
|
+
setIsClosing(false);
|
|
58
|
+
}, [isOpen]);
|
|
59
|
+
react_1.useEffect(() => {
|
|
60
|
+
if (!isClosing) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (!overlayRef.current || !containerRef.current) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
overlayRef.current.style.animation = "none";
|
|
67
|
+
containerRef.current.style.animation = "none";
|
|
68
|
+
overlayRef.current.offsetHeight;
|
|
69
|
+
overlayRef.current.style.removeProperty("animation");
|
|
70
|
+
containerRef.current.style.removeProperty("animation");
|
|
71
|
+
}, [isClosing]);
|
|
72
|
+
const titleElem = title && react_1.default.createElement("div", { className: Modal_module_scss_1.default.title }, title);
|
|
73
|
+
const handleOverlayClick = react_1.useCallback((e) => {
|
|
74
|
+
if (e.target !== e.currentTarget) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (onOverlayClick === "close") {
|
|
78
|
+
onClose();
|
|
79
|
+
}
|
|
80
|
+
if (typeof onOverlayClick === "function") {
|
|
81
|
+
onOverlayClick();
|
|
82
|
+
}
|
|
83
|
+
}, [onOverlayClick, onClose]);
|
|
84
|
+
const handleAnimationEnd = react_1.useCallback(() => {
|
|
85
|
+
if (isOpen) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setIsRendered(false);
|
|
89
|
+
}, [isOpen]);
|
|
90
|
+
if (!isRendered) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
const overlayCls = classnames_1.default(Modal_module_scss_1.default.overlay, {
|
|
94
|
+
[Modal_module_scss_1.default.isClosing]: isClosing,
|
|
95
|
+
[Modal_module_scss_1.default.overlayOnBottom]: v.includes("bottom"),
|
|
96
|
+
});
|
|
97
|
+
const containerCls = classnames_1.default(Modal_module_scss_1.default.container, className, {
|
|
98
|
+
[Modal_module_scss_1.default.isClosing]: isClosing,
|
|
99
|
+
[Modal_module_scss_1.default.full]: v.includes("full"),
|
|
100
|
+
});
|
|
101
|
+
return (react_1.default.createElement("div", { className: overlayCls, onClick: handleOverlayClick, ref: overlayRef, onAnimationEnd: handleAnimationEnd },
|
|
102
|
+
react_1.default.createElement("div", { className: containerCls, ref: containerRef },
|
|
103
|
+
titleElem,
|
|
104
|
+
children)));
|
|
105
|
+
};
|
|
106
|
+
exports.Modal = Modal;
|
|
107
|
+
Modal.NegateMargin = ModalNoMargin_1.ModalNegateMargin;
|
|
108
|
+
//# sourceMappingURL=Modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../../src/components/ui/modal/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwE;AACxE,4DAAoC;AAEpC,4EAAyC;AACzC,8DAA2D;AAC3D,mDAAoD;AAmBpD,MAAM,KAAK,GAAoC,CAAC,EAC5C,QAAQ,EACR,OAAO,EACP,MAAM,EACN,KAAK,E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CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;KACjD,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,oBAAU,CAAC,2BAAM,CAAC,SAAS,EAAE,SAAS,EAAE;QACzD,CAAC,2BAAM,CAAC,SAAS,CAAC,EAAE,SAAS;QAC7B,CAAC,2BAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;KACpC,CAAC,CAAC;IAEH,OAAO,CACH,uCACI,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,UAAU,EACf,cAAc,EAAE,kBAAkB;QAElC,uCAAK,SAAS,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY;YAC1C,SAAS;YACT,QAAQ,CACP,CACJ,CACT,CAAC;AACN,CAAC,CAAC;AAGO,sBAAK;AAFd,KAAK,CAAC,YAAY,GAAG,iCAAiB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@keyframes overlay {
|
|
2
|
+
from {
|
|
3
|
+
background: #00000000;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
to {
|
|
7
|
+
background: #0000004c;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.overlay {
|
|
12
|
+
position: fixed;
|
|
13
|
+
z-index: 4;
|
|
14
|
+
top: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
animation: overlay 300ms;
|
|
22
|
+
animation-fill-mode: forwards;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.overlayOnBottom {
|
|
26
|
+
align-items: flex-end;
|
|
27
|
+
padding-bottom: calc(24px / var(--ratio-dimensions));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes container {
|
|
31
|
+
from {
|
|
32
|
+
transform: translateY(30px);
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
to {
|
|
37
|
+
transform: translateY(0);
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.container {
|
|
43
|
+
background: var(--modal-bg);
|
|
44
|
+
border-radius: calc(12px / var(--ratio-dimensions));
|
|
45
|
+
max-width: 333px;
|
|
46
|
+
width: calc(100% - 30px);
|
|
47
|
+
padding: 20px;
|
|
48
|
+
position: relative;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
animation: container 300ms;
|
|
51
|
+
animation-fill-mode: forwards;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.full {
|
|
55
|
+
width: calc(100vw - 30px);
|
|
56
|
+
max-width: 1000px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.isClosing {
|
|
60
|
+
// keep this after .overlay .container to prevent overwriting
|
|
61
|
+
animation-direction: reverse;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.close {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 20px;
|
|
67
|
+
right: 20px;
|
|
68
|
+
background: none;
|
|
69
|
+
border: none;
|
|
70
|
+
padding: 0;
|
|
71
|
+
margin: 0;
|
|
72
|
+
|
|
73
|
+
+ .title {
|
|
74
|
+
margin-right: 40px;
|
|
75
|
+
margin-top: -4px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.title {
|
|
80
|
+
font-size: calc(40px / var(--ratio-font));
|
|
81
|
+
text-align: center;
|
|
82
|
+
color: black;
|
|
83
|
+
margin: calc(90px / var(--ratio-dimensions)) 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.negateMargin {
|
|
87
|
+
margin: 0 -20px -20px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.removeMargin {
|
|
91
|
+
margin: 0;
|
|
92
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type Variant = "main";
|
|
3
|
+
interface Props {
|
|
4
|
+
variant?: Variant | Variant[];
|
|
5
|
+
}
|
|
6
|
+
declare const ModalButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & Props>;
|
|
7
|
+
export { ModalButton };
|
|
8
|
+
//# sourceMappingURL=ModalButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/ModalButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,aAAK,OAAO,GAAG,MAAM,CAAC;AAEtB,UAAU,KAAK;IACX,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;CACjC;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAUhF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ModalButton = void 0;
|
|
18
|
+
const react_1 = __importDefault(require("react"));
|
|
19
|
+
const ModalButtons_module_scss_1 = __importDefault(require("./ModalButtons.module.scss"));
|
|
20
|
+
const makeVariants_1 = require("../../../utils/makeVariants");
|
|
21
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
22
|
+
const ModalButton = (_a) => {
|
|
23
|
+
var { className, children, variant } = _a, props = __rest(_a, ["className", "children", "variant"]);
|
|
24
|
+
const v = makeVariants_1.makeVariants(variant);
|
|
25
|
+
const cls = classnames_1.default(ModalButtons_module_scss_1.default.button, {
|
|
26
|
+
[ModalButtons_module_scss_1.default.buttonMain]: v.includes("main"),
|
|
27
|
+
}, className);
|
|
28
|
+
return react_1.default.createElement("button", Object.assign({}, props, { className: cls }), children);
|
|
29
|
+
};
|
|
30
|
+
exports.ModalButton = ModalButton;
|
|
31
|
+
//# sourceMappingURL=ModalButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalButton.js","sourceRoot":"","sources":["../../../../src/components/ui/modal/ModalButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,0FAAgD;AAChD,8DAA2D;AAC3D,4DAAoC;AAQpC,MAAM,WAAW,GAAoE,CAAC,EAErF,EAAE,EAAE;QAFiF,EAClF,SAAS,EAAE,QAAQ,EAAE,OAAO,OAC/B,EADoC,KAAK,cAD4C,oCAErF,CADyC;IAEtC,MAAM,CAAC,GAAG,2BAAY,CAAC,OAAO,CAAC,CAAC;IAEhC,MAAM,GAAG,GAAG,oBAAU,CAAC,kCAAM,CAAC,MAAM,EAAE;QAClC,CAAC,kCAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;KAC1C,EAAE,SAAS,CAAC,CAAC;IAEd,OAAO,0DAAY,KAAK,IAAE,SAAS,EAAE,GAAG,KAAG,QAAQ,CAAU,CAAC;AAClE,CAAC,CAAC;AAEO,kCAAW"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ModalButton } from "./ModalButton";
|
|
3
|
+
interface Props {
|
|
4
|
+
}
|
|
5
|
+
interface SubComponents {
|
|
6
|
+
Button: typeof ModalButton;
|
|
7
|
+
}
|
|
8
|
+
declare const ModalButtons: React.FC<Props> & SubComponents;
|
|
9
|
+
export { ModalButtons };
|
|
10
|
+
//# sourceMappingURL=ModalButtons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/ModalButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,UAAU,KAAK;CAAG;AAElB,UAAU,aAAa;IACnB,MAAM,EAAE,OAAO,WAAW,CAAC;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,aAErC,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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.ModalButtons = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ModalButton_1 = require("./ModalButton");
|
|
9
|
+
const ModalButtons_module_scss_1 = __importDefault(require("./ModalButtons.module.scss"));
|
|
10
|
+
const ModalButtons = (props) => {
|
|
11
|
+
return react_1.default.createElement("div", { className: ModalButtons_module_scss_1.default.container }, props.children);
|
|
12
|
+
};
|
|
13
|
+
exports.ModalButtons = ModalButtons;
|
|
14
|
+
ModalButtons.Button = ModalButton_1.ModalButton;
|
|
15
|
+
//# sourceMappingURL=ModalButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalButtons.js","sourceRoot":"","sources":["../../../../src/components/ui/modal/ModalButtons.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAA4C;AAE5C,0FAAgD;AAQhD,MAAM,YAAY,GAAoC,CAAC,KAAK,EAAE,EAAE;IAC5D,OAAO,uCAAK,SAAS,EAAE,kCAAM,CAAC,SAAS,IAAG,KAAK,CAAC,QAAQ,CAAO,CAAC;AACpE,CAAC,CAAC;AAGO,oCAAY;AAFrB,YAAY,CAAC,MAAM,GAAG,yBAAW,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
margin-top: calc(100px / var(--ratio-dimensions));
|
|
4
|
+
margin-left: -20px;
|
|
5
|
+
margin-right: -20px;
|
|
6
|
+
margin-bottom: -20px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.button {
|
|
10
|
+
border: none;
|
|
11
|
+
border-top: 1px solid var(--modal-button-border);
|
|
12
|
+
background: var(--modal-button-bg);
|
|
13
|
+
flex: 1;
|
|
14
|
+
height: calc(156px / var(--ratio-dimensions));
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
|
|
17
|
+
&:not(:first-child) {
|
|
18
|
+
border-left: 1px solid var(--modal-button-border);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:first-child {
|
|
22
|
+
border-bottom-left-radius: calc(12px / var(--ratio-dimensions));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:last-child {
|
|
26
|
+
border-bottom-right-radius: calc(12px / var(--ratio-dimensions));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.buttonMain {
|
|
31
|
+
color: var(--main-color);
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalNoMargin.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/ModalNoMargin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,KAAK;CAAG;AAElB,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAYtC,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|