react-miui 0.0.3 → 0.4.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 +41 -0
- package/assets/back.svg +1 -0
- package/assets/forward.svg +1 -0
- package/assets/sources/back.fla +0 -0
- package/dist/components/form/Checkbox.module.scss +13 -6
- package/dist/components/form/Toggle.d.ts +8 -0
- package/dist/components/form/Toggle.d.ts.map +1 -0
- package/dist/{demo/components/form/Checkbox.js → components/form/Toggle.js} +17 -8
- package/dist/components/form/Toggle.js.map +1 -0
- package/dist/components/form/Toggle.module.scss +46 -0
- package/dist/components/icons/Back.d.ts +7 -0
- package/dist/components/icons/Back.d.ts.map +1 -0
- package/dist/components/icons/Back.js +13 -0
- package/dist/components/icons/Back.js.map +1 -0
- package/dist/components/icons/Forward.d.ts +7 -0
- package/dist/components/icons/Forward.d.ts.map +1 -0
- package/dist/components/icons/Forward.js +13 -0
- package/dist/components/icons/Forward.js.map +1 -0
- package/dist/components/icons/Icon.d.ts +13 -0
- package/dist/components/icons/Icon.d.ts.map +1 -0
- package/dist/components/icons/Icon.js +43 -0
- package/dist/components/icons/Icon.js.map +1 -0
- package/dist/components/layout/header/Header.d.ts +4 -0
- package/dist/components/layout/header/Header.d.ts.map +1 -1
- package/dist/components/layout/header/Header.js +26 -2
- package/dist/components/layout/header/Header.js.map +1 -1
- package/dist/components/layout/header/Header.module.scss +46 -2
- package/dist/components/layout/header/HeaderIconAction.d.ts +17 -0
- package/dist/components/layout/header/HeaderIconAction.d.ts.map +1 -0
- package/dist/components/layout/header/HeaderIconAction.js +40 -0
- package/dist/components/layout/header/HeaderIconAction.js.map +1 -0
- package/dist/components/layout/header/HeaderIconAction.module.scss +22 -0
- package/dist/components/layout/header/StickyHeader.js +1 -1
- package/dist/components/layout/header/StickyHeader.js.map +1 -1
- package/dist/components/layout/list/Header.d.ts +4 -0
- package/dist/components/layout/list/Header.d.ts.map +1 -0
- package/dist/components/layout/list/Header.js +16 -0
- package/dist/components/layout/list/Header.js.map +1 -0
- package/dist/components/layout/list/Header.module.scss +8 -0
- package/dist/components/layout/list/Item.d.ts +1 -0
- package/dist/components/layout/list/Item.d.ts.map +1 -1
- package/dist/components/layout/list/Item.js +18 -5
- package/dist/components/layout/list/Item.js.map +1 -1
- package/dist/components/layout/list/Item.module.scss +10 -2
- package/dist/components/layout/list/Label.d.ts +8 -0
- package/dist/components/layout/list/Label.d.ts.map +1 -0
- package/dist/components/layout/list/Label.js +16 -0
- package/dist/components/layout/list/Label.js.map +1 -0
- package/dist/components/layout/list/Label.module.scss +9 -0
- package/dist/components/layout/list/Value.d.ts +4 -0
- package/dist/components/layout/list/Value.d.ts.map +1 -0
- package/dist/components/layout/list/Value.js +13 -0
- package/dist/components/layout/list/Value.js.map +1 -0
- package/dist/components/layout/list/Value.module.scss +7 -0
- package/dist/components/ui/action/Action.d.ts +17 -0
- package/dist/components/ui/action/Action.d.ts.map +1 -0
- package/dist/components/ui/action/Action.js +44 -0
- package/dist/components/ui/action/Action.js.map +1 -0
- package/dist/components/ui/action/Action.module.scss +26 -0
- package/dist/components/ui/action/EqualActions.d.ts +7 -0
- package/dist/components/ui/action/EqualActions.d.ts.map +1 -0
- package/dist/components/ui/action/EqualActions.js +23 -0
- package/dist/components/ui/action/EqualActions.js.map +1 -0
- package/dist/components/ui/action/EqualActions.module.scss +6 -0
- package/dist/components/ui/button/Button.d.ts +8 -0
- package/dist/components/ui/button/Button.d.ts.map +1 -0
- package/dist/components/ui/button/Button.js +20 -0
- package/dist/components/ui/button/Button.js.map +1 -0
- package/dist/components/ui/button/Button.module.scss +25 -0
- package/dist/global.scss +35 -11
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/docs/assets/js/search.js +1 -1
- package/docs/assets/js/search.json +1 -1
- package/docs/enums/ICON.html +196 -0
- package/docs/index.html +13 -4
- package/docs/modules/StickyHeader.html +4 -4
- package/docs/modules.html +47 -10
- package/docs/pages/Tutorials/Test.html +3 -3
- package/esm/components/form/Checkbox.module.scss +13 -6
- package/esm/components/form/Toggle.d.ts +8 -0
- package/esm/components/form/Toggle.d.ts.map +1 -0
- package/esm/components/form/Toggle.js +15 -0
- package/esm/components/form/Toggle.js.map +1 -0
- package/esm/components/form/Toggle.module.scss +46 -0
- package/esm/components/icons/Back.d.ts +7 -0
- package/esm/components/icons/Back.d.ts.map +1 -0
- package/esm/components/icons/Back.js +7 -0
- package/esm/components/icons/Back.js.map +1 -0
- package/esm/components/icons/Forward.d.ts +7 -0
- package/esm/components/icons/Forward.d.ts.map +1 -0
- package/esm/components/icons/Forward.js +7 -0
- package/esm/components/icons/Forward.js.map +1 -0
- package/esm/components/icons/Icon.d.ts +13 -0
- package/esm/components/icons/Icon.d.ts.map +1 -0
- package/esm/components/icons/Icon.js +24 -0
- package/esm/components/icons/Icon.js.map +1 -0
- package/esm/components/layout/header/Header.d.ts +4 -0
- package/esm/components/layout/header/Header.d.ts.map +1 -1
- package/esm/components/layout/header/Header.js +26 -2
- package/esm/components/layout/header/Header.js.map +1 -1
- package/esm/components/layout/header/Header.module.scss +46 -2
- package/esm/components/layout/header/HeaderIconAction.d.ts +17 -0
- package/esm/components/layout/header/HeaderIconAction.d.ts.map +1 -0
- package/esm/components/layout/header/HeaderIconAction.js +23 -0
- package/esm/components/layout/header/HeaderIconAction.js.map +1 -0
- package/esm/components/layout/header/HeaderIconAction.module.scss +22 -0
- package/esm/components/layout/header/StickyHeader.js +1 -1
- package/esm/components/layout/header/StickyHeader.js.map +1 -1
- package/esm/components/layout/list/Header.d.ts +4 -0
- package/esm/components/layout/list/Header.d.ts.map +1 -0
- package/esm/components/layout/list/Header.js +10 -0
- package/esm/components/layout/list/Header.js.map +1 -0
- package/esm/components/layout/list/Header.module.scss +8 -0
- package/esm/components/layout/list/Item.d.ts +1 -0
- package/esm/components/layout/list/Item.d.ts.map +1 -1
- package/esm/components/layout/list/Item.js +18 -5
- package/esm/components/layout/list/Item.js.map +1 -1
- package/esm/components/layout/list/Item.module.scss +10 -2
- package/esm/components/layout/list/Label.d.ts +8 -0
- package/esm/components/layout/list/Label.d.ts.map +1 -0
- package/esm/components/layout/list/Label.js +10 -0
- package/esm/components/layout/list/Label.js.map +1 -0
- package/esm/components/layout/list/Label.module.scss +9 -0
- package/esm/components/layout/list/Value.d.ts +4 -0
- package/esm/components/layout/list/Value.d.ts.map +1 -0
- package/esm/components/layout/list/Value.js +7 -0
- package/esm/components/layout/list/Value.js.map +1 -0
- package/esm/components/layout/list/Value.module.scss +7 -0
- package/esm/components/ui/action/Action.d.ts +17 -0
- package/esm/components/ui/action/Action.d.ts.map +1 -0
- package/esm/components/ui/action/Action.js +27 -0
- package/esm/components/ui/action/Action.js.map +1 -0
- package/esm/components/ui/action/Action.module.scss +26 -0
- package/esm/components/ui/action/EqualActions.d.ts +7 -0
- package/esm/components/ui/action/EqualActions.d.ts.map +1 -0
- package/esm/components/ui/action/EqualActions.js +17 -0
- package/esm/components/ui/action/EqualActions.js.map +1 -0
- package/esm/components/ui/action/EqualActions.module.scss +6 -0
- package/esm/components/ui/button/Button.d.ts +8 -0
- package/esm/components/ui/button/Button.d.ts.map +1 -0
- package/esm/components/ui/button/Button.js +14 -0
- package/esm/components/ui/button/Button.js.map +1 -0
- package/esm/components/ui/button/Button.module.scss +25 -0
- package/esm/global.scss +35 -11
- package/esm/index.d.ts +2 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/esm/types.d.ts +4 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/types.js +2 -0
- package/esm/types.js.map +1 -0
- package/package.json +6 -6
- package/src/components/form/Checkbox.module.scss +13 -6
- package/src/components/form/Toggle.module.scss +46 -0
- package/src/components/form/Toggle.tsx +33 -0
- package/src/components/icons/Back.tsx +21 -0
- package/src/components/icons/Forward.tsx +21 -0
- package/src/components/icons/Icon.tsx +33 -0
- package/src/components/layout/header/Header.module.scss +46 -2
- package/src/components/layout/header/Header.tsx +41 -3
- package/src/components/layout/header/HeaderIconAction.module.scss +22 -0
- package/src/components/layout/header/HeaderIconAction.tsx +49 -0
- package/src/components/layout/header/StickyHeader.tsx +1 -1
- package/src/components/layout/list/Header.module.scss +8 -0
- package/src/components/layout/list/Header.tsx +16 -0
- package/src/components/layout/list/Item.module.scss +10 -2
- package/src/components/layout/list/Item.tsx +23 -5
- package/src/components/layout/list/Label.module.scss +9 -0
- package/src/components/layout/list/Label.tsx +21 -0
- package/src/components/layout/list/Value.module.scss +7 -0
- package/src/components/layout/list/Value.tsx +11 -0
- package/src/components/ui/action/Action.module.scss +26 -0
- package/src/components/ui/action/Action.tsx +58 -0
- package/src/components/ui/action/EqualActions.module.scss +6 -0
- package/src/components/ui/action/EqualActions.tsx +30 -0
- package/src/components/ui/button/Button.module.scss +25 -0
- package/src/components/ui/button/Button.tsx +25 -0
- package/src/demo/Main.tsx +3 -2
- package/src/demo/Menu.module.scss +2 -0
- package/src/demo/components/form/Toggle.tsx +49 -0
- package/src/demo/components/layout/header/Header.tsx +104 -2
- package/src/demo/components/layout/list/Header.tsx +24 -0
- package/src/demo/components/layout/list/ItemRatio.tsx +21 -0
- package/src/demo/components/layout/list/Label.tsx +30 -0
- package/src/demo/components/layout/list/List.Item.module.scss +4 -0
- package/src/demo/components/layout/list/Value.module.scss +4 -0
- package/src/demo/components/layout/list/Value.tsx +26 -0
- package/src/demo/components/ui/action/Action.tsx +112 -0
- package/src/demo/components/ui/action/ActionDemo.module.scss +3 -0
- package/src/demo/components/ui/button/ButtonDemo.tsx +18 -0
- package/src/demo/components/ui/icons/Icons.tsx +21 -0
- package/src/demo/componentsMap.ts +110 -21
- package/src/demo/utils/makeVariants.ts +13 -0
- package/src/global.scss +35 -11
- package/src/index.ts +5 -0
- package/src/pages/react-miui.tsx +12 -0
- package/src/types.ts +7 -0
- package/.postcssrc +0 -9
- package/dist/demo/Demo.d.ts +0 -4
- package/dist/demo/Demo.d.ts.map +0 -1
- package/dist/demo/Demo.js +0 -18
- package/dist/demo/Demo.js.map +0 -1
- package/dist/demo/Demo.module.scss +0 -4
- package/dist/demo/Main.d.ts +0 -4
- package/dist/demo/Main.d.ts.map +0 -1
- package/dist/demo/Main.js +0 -83
- package/dist/demo/Main.js.map +0 -1
- package/dist/demo/Main.module.scss +0 -30
- package/dist/demo/Menu.d.ts +0 -9
- package/dist/demo/Menu.d.ts.map +0 -1
- package/dist/demo/Menu.js +0 -31
- package/dist/demo/Menu.js.map +0 -1
- package/dist/demo/Menu.module.scss +0 -39
- package/dist/demo/components/form/Checkbox.d.ts +0 -4
- package/dist/demo/components/form/Checkbox.d.ts.map +0 -1
- package/dist/demo/components/form/Checkbox.js.map +0 -1
- package/dist/demo/components/layout/header/Header.d.ts +0 -4
- package/dist/demo/components/layout/header/Header.d.ts.map +0 -1
- package/dist/demo/components/layout/header/Header.js +0 -16
- package/dist/demo/components/layout/header/Header.js.map +0 -1
- package/dist/demo/components/layout/header/StickyHeader.d.ts +0 -9
- package/dist/demo/components/layout/header/StickyHeader.d.ts.map +0 -1
- package/dist/demo/components/layout/header/StickyHeader.js +0 -73
- package/dist/demo/components/layout/header/StickyHeader.js.map +0 -1
- package/dist/demo/components/layout/list/List.Item.d.ts +0 -4
- package/dist/demo/components/layout/list/List.Item.d.ts.map +0 -1
- package/dist/demo/components/layout/list/List.Item.js +0 -42
- package/dist/demo/components/layout/list/List.Item.js.map +0 -1
- package/dist/demo/components/layout/list/List.Item.module.scss +0 -3
- package/dist/demo/components/ui/directionPad/Pad.d.ts +0 -4
- package/dist/demo/components/ui/directionPad/Pad.d.ts.map +0 -1
- package/dist/demo/components/ui/directionPad/Pad.js +0 -49
- package/dist/demo/components/ui/directionPad/Pad.js.map +0 -1
- package/dist/demo/componentsMap.d.ts +0 -14
- package/dist/demo/componentsMap.d.ts.map +0 -1
- package/dist/demo/componentsMap.js +0 -54
- package/dist/demo/componentsMap.js.map +0 -1
- package/dist/demo/utils/safeUseHash.d.ts +0 -3
- package/dist/demo/utils/safeUseHash.d.ts.map +0 -1
- package/dist/demo/utils/safeUseHash.js +0 -13
- package/dist/demo/utils/safeUseHash.js.map +0 -1
- package/dist/demo-global.scss +0 -9
- package/dist/pages/_app.d.ts +0 -7
- package/dist/pages/_app.d.ts.map +0 -1
- package/dist/pages/_app.js +0 -15
- package/dist/pages/_app.js.map +0 -1
- package/dist/pages/index.d.ts +0 -4
- package/dist/pages/index.d.ts.map +0 -1
- package/dist/pages/index.js +0 -10
- package/dist/pages/index.js.map +0 -1
- package/esm/demo/Demo.d.ts +0 -4
- package/esm/demo/Demo.d.ts.map +0 -1
- package/esm/demo/Demo.js +0 -12
- package/esm/demo/Demo.js.map +0 -1
- package/esm/demo/Demo.module.scss +0 -4
- package/esm/demo/Main.d.ts +0 -4
- package/esm/demo/Main.d.ts.map +0 -1
- package/esm/demo/Main.js +0 -58
- package/esm/demo/Main.js.map +0 -1
- package/esm/demo/Main.module.scss +0 -30
- package/esm/demo/Menu.d.ts +0 -9
- package/esm/demo/Menu.d.ts.map +0 -1
- package/esm/demo/Menu.js +0 -25
- package/esm/demo/Menu.js.map +0 -1
- package/esm/demo/Menu.module.scss +0 -39
- package/esm/demo/components/form/Checkbox.d.ts +0 -4
- package/esm/demo/components/form/Checkbox.d.ts.map +0 -1
- package/esm/demo/components/form/Checkbox.js +0 -9
- package/esm/demo/components/form/Checkbox.js.map +0 -1
- package/esm/demo/components/layout/header/Header.d.ts +0 -4
- package/esm/demo/components/layout/header/Header.d.ts.map +0 -1
- package/esm/demo/components/layout/header/Header.js +0 -10
- package/esm/demo/components/layout/header/Header.js.map +0 -1
- package/esm/demo/components/layout/header/StickyHeader.d.ts +0 -9
- package/esm/demo/components/layout/header/StickyHeader.d.ts.map +0 -1
- package/esm/demo/components/layout/header/StickyHeader.js +0 -62
- package/esm/demo/components/layout/header/StickyHeader.js.map +0 -1
- package/esm/demo/components/layout/list/List.Item.d.ts +0 -4
- package/esm/demo/components/layout/list/List.Item.d.ts.map +0 -1
- package/esm/demo/components/layout/list/List.Item.js +0 -17
- package/esm/demo/components/layout/list/List.Item.js.map +0 -1
- package/esm/demo/components/layout/list/List.Item.module.scss +0 -3
- package/esm/demo/components/ui/directionPad/Pad.d.ts +0 -4
- package/esm/demo/components/ui/directionPad/Pad.d.ts.map +0 -1
- package/esm/demo/components/ui/directionPad/Pad.js +0 -27
- package/esm/demo/components/ui/directionPad/Pad.js.map +0 -1
- package/esm/demo/componentsMap.d.ts +0 -14
- package/esm/demo/componentsMap.d.ts.map +0 -1
- package/esm/demo/componentsMap.js +0 -51
- package/esm/demo/componentsMap.js.map +0 -1
- package/esm/demo/utils/safeUseHash.d.ts +0 -3
- package/esm/demo/utils/safeUseHash.d.ts.map +0 -1
- package/esm/demo/utils/safeUseHash.js +0 -10
- package/esm/demo/utils/safeUseHash.js.map +0 -1
- package/esm/demo-global.scss +0 -9
- package/esm/pages/_app.d.ts +0 -7
- package/esm/pages/_app.d.ts.map +0 -1
- package/esm/pages/_app.js +0 -10
- package/esm/pages/_app.js.map +0 -1
- package/esm/pages/index.d.ts +0 -4
- package/esm/pages/index.d.ts.map +0 -1
- package/esm/pages/index.js +0 -5
- package/esm/pages/index.js.map +0 -1
- package/src/pages/index.html +0 -14
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
import { Action } from "../../../../components/ui/action/Action";
|
|
4
|
+
import { ICON } from "../../../../components/icons/Icon";
|
|
5
|
+
import { StickyHeader } from "../../../../components/layout/header/StickyHeader";
|
|
6
|
+
import { Header } from "../../../../components/layout/header/Header";
|
|
7
|
+
|
|
8
|
+
import styles from "./ActionDemo.module.scss";
|
|
9
|
+
import { EqualActions } from "../../../../components/ui/action/EqualActions";
|
|
10
|
+
|
|
11
|
+
const handleClick = () => { alert(1); };
|
|
12
|
+
|
|
13
|
+
const ActionDemo: React.FC = () => {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<div>
|
|
17
|
+
<Action icon={ICON.checkmark} /> - action without action
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<Action icon={ICON.checkmark} Link={Link} to={"react-miui"} /> - internal link action
|
|
21
|
+
</div>
|
|
22
|
+
<div>
|
|
23
|
+
<Action icon={ICON.checkmark} href={"https://www.npmjs.com/package/react-miui"} /> - external link action
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<Action icon={ICON.checkmark} onClick={handleClick} /> - onClick action
|
|
27
|
+
</div>
|
|
28
|
+
<div>
|
|
29
|
+
<Action icon={ICON.checkmark} onClick={handleClick} label={"Pineapple"} /> - onClick action with label
|
|
30
|
+
</div>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const ActionsOnLeft = () => {
|
|
36
|
+
return (
|
|
37
|
+
<StickyHeader position={"left"}>
|
|
38
|
+
<Header center={true} className={styles.header}>
|
|
39
|
+
<Action icon={ICON.checkmark} />
|
|
40
|
+
<Action icon={ICON.checkmark} />
|
|
41
|
+
<Action icon={ICON.checkmark} />
|
|
42
|
+
</Header>
|
|
43
|
+
<StickyHeader.Content>
|
|
44
|
+
content
|
|
45
|
+
</StickyHeader.Content>
|
|
46
|
+
</StickyHeader>
|
|
47
|
+
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const ActionsOnBottom = () => {
|
|
52
|
+
return (
|
|
53
|
+
<StickyHeader position={"bottom"}>
|
|
54
|
+
<Header center={true} className={styles.header}>
|
|
55
|
+
<Action icon={ICON.checkmark} />
|
|
56
|
+
<Action icon={ICON.checkmark} />
|
|
57
|
+
<Action icon={ICON.checkmark} />
|
|
58
|
+
</Header>
|
|
59
|
+
<StickyHeader.Content>
|
|
60
|
+
content
|
|
61
|
+
</StickyHeader.Content>
|
|
62
|
+
</StickyHeader>
|
|
63
|
+
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const ActionLabelsOnBottom = () => {
|
|
68
|
+
return (
|
|
69
|
+
<StickyHeader position={"bottom"}>
|
|
70
|
+
<Header center={true} className={styles.header}>
|
|
71
|
+
<Action icon={ICON.checkmark} label={"Add"} />
|
|
72
|
+
<Action icon={ICON.checkmark} label={"Delete"} />
|
|
73
|
+
<Action icon={ICON.checkmark} label={"Share on Web"} />
|
|
74
|
+
</Header>
|
|
75
|
+
<StickyHeader.Content>
|
|
76
|
+
<StickyHeader position={"top"}>
|
|
77
|
+
<Header center={true} className={styles.header}>
|
|
78
|
+
<Action icon={ICON.checkmark} label={"Add"} />
|
|
79
|
+
<Action icon={ICON.checkmark} label={"Delete"} />
|
|
80
|
+
<Action icon={ICON.checkmark} label={"Share"} />
|
|
81
|
+
</Header>
|
|
82
|
+
<StickyHeader.Content>
|
|
83
|
+
When you put just `Action`s into Header it will be automatically wrapped with EqualActions so if
|
|
84
|
+
labels width are not equal each action will take the same space as the most wide item.
|
|
85
|
+
If you don't like this behavior - wrap your actions into React.Fragment {"<></>"} or pass extra
|
|
86
|
+
{"<span />"}.
|
|
87
|
+
</StickyHeader.Content>
|
|
88
|
+
</StickyHeader>
|
|
89
|
+
</StickyHeader.Content>
|
|
90
|
+
</StickyHeader>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const ActionsDemo = () => {
|
|
95
|
+
return (
|
|
96
|
+
<div>
|
|
97
|
+
To make every action take the same amount of horizontal space you need to wrap every Action with
|
|
98
|
+
EqualActions wrapper. Some components (like Header) will do that automatically for you. If you need to use
|
|
99
|
+
Actions outside of such components - manually wrap them with EqualActions.
|
|
100
|
+
|
|
101
|
+
<div>
|
|
102
|
+
<EqualActions>
|
|
103
|
+
<Action icon={ICON.checkmark} label={"Add"} />
|
|
104
|
+
<Action icon={ICON.checkmark} label={"Delete"} />
|
|
105
|
+
<Action icon={ICON.checkmark} label={"Share on Web"} />
|
|
106
|
+
</EqualActions>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { ActionDemo, ActionsOnLeft, ActionsOnBottom, ActionLabelsOnBottom, ActionsDemo };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "../../../../index.js";
|
|
3
|
+
|
|
4
|
+
const ButtonDemo = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div>
|
|
7
|
+
<Button>Basic button</Button>
|
|
8
|
+
<br />
|
|
9
|
+
<Button disabled={true}>Disabled button</Button>
|
|
10
|
+
<br />
|
|
11
|
+
<Button variant={"inline"}>Inline button</Button>
|
|
12
|
+
<br />
|
|
13
|
+
<Button variant={"outline"}>Outline button</Button>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { ButtonDemo };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Icon, ICON, Item, List } from "../../../../index.js";
|
|
3
|
+
|
|
4
|
+
const IconsDemo: React.FC = () => {
|
|
5
|
+
const icons = Object.values(ICON).map((value) => {
|
|
6
|
+
return (
|
|
7
|
+
<Item key={value} ratio={"1/"}>
|
|
8
|
+
{value}
|
|
9
|
+
<Icon name={value} />
|
|
10
|
+
</Item>
|
|
11
|
+
);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<List>
|
|
16
|
+
{icons}
|
|
17
|
+
</List>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { IconsDemo };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type { AnyComponent } from "../types";
|
|
2
2
|
import { CheckboxDemo } from "./components/form/Checkbox";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CenteredHeaderDemo,
|
|
5
|
+
HeaderDemo,
|
|
6
|
+
HeaderWithButtonsDemo,
|
|
7
|
+
HeaderWithButtonsOnSideDemo, ToolbarVariantDemo,
|
|
8
|
+
} from "./components/layout/header/Header";
|
|
4
9
|
import {
|
|
5
10
|
StickyHeaderBottomDemo,
|
|
6
11
|
StickyHeaderDemo, StickyHeaderLeftCenterDemo, StickyHeaderLeftDemo, StickyHeaderRightDemo,
|
|
@@ -8,8 +13,20 @@ import {
|
|
|
8
13
|
} from "./components/layout/header/StickyHeader";
|
|
9
14
|
import { ListItemDemo } from "./components/layout/list/List.Item";
|
|
10
15
|
import { DirectionPadDemo } from "./components/ui/directionPad/Pad";
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
import { IconsDemo } from "./components/ui/icons/Icons";
|
|
17
|
+
import { ButtonDemo } from "./components/ui/button/ButtonDemo";
|
|
18
|
+
import {
|
|
19
|
+
ActionDemo,
|
|
20
|
+
ActionLabelsOnBottom,
|
|
21
|
+
ActionsDemo,
|
|
22
|
+
ActionsOnBottom,
|
|
23
|
+
ActionsOnLeft,
|
|
24
|
+
} from "./components/ui/action/Action";
|
|
25
|
+
import { ToggleDemo } from "./components/form/Toggle";
|
|
26
|
+
import { ItemRatioDemo } from "./components/layout/list/ItemRatio";
|
|
27
|
+
import { ItemLabelDemo } from "./components/layout/list/Label";
|
|
28
|
+
import { ListHeaderDemo } from "./components/layout/list/Header";
|
|
29
|
+
import { ValueDemo } from "./components/layout/list/Value";
|
|
13
30
|
|
|
14
31
|
interface TheMap {
|
|
15
32
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
@@ -23,48 +40,120 @@ interface TheMapItem {
|
|
|
23
40
|
}
|
|
24
41
|
|
|
25
42
|
const componentsMap: TheMap = {
|
|
43
|
+
Button: {
|
|
44
|
+
name: "Button",
|
|
45
|
+
Component: ButtonDemo,
|
|
46
|
+
},
|
|
26
47
|
Checkbox: {
|
|
27
48
|
name: "Checkbox",
|
|
28
49
|
Component: CheckboxDemo,
|
|
29
50
|
},
|
|
51
|
+
Toggle: {
|
|
52
|
+
name: "Toggle",
|
|
53
|
+
Component: ToggleDemo,
|
|
54
|
+
},
|
|
30
55
|
Header: {
|
|
31
56
|
name: "Header",
|
|
32
57
|
Component: HeaderDemo,
|
|
33
58
|
children: {
|
|
59
|
+
Centered: {
|
|
60
|
+
name: "Centered",
|
|
61
|
+
Component: CenteredHeaderDemo,
|
|
62
|
+
},
|
|
63
|
+
Toolbar: {
|
|
64
|
+
name: "Toolbar",
|
|
65
|
+
Component: ToolbarVariantDemo,
|
|
66
|
+
},
|
|
67
|
+
WithButtons: {
|
|
68
|
+
name: "With buttons",
|
|
69
|
+
Component: HeaderWithButtonsDemo,
|
|
70
|
+
children: {
|
|
71
|
+
OnLeft: {
|
|
72
|
+
name: "On the side",
|
|
73
|
+
Component: HeaderWithButtonsOnSideDemo,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
34
77
|
Sticky: {
|
|
35
|
-
name: "Sticky
|
|
78
|
+
name: "Sticky",
|
|
36
79
|
Component: StickyHeaderDemo,
|
|
80
|
+
children: {
|
|
81
|
+
StickyBottom: {
|
|
82
|
+
name: "On bottom",
|
|
83
|
+
Component: StickyHeaderBottomDemo,
|
|
84
|
+
},
|
|
85
|
+
StickyTopBottom: {
|
|
86
|
+
name: "On top & bottom",
|
|
87
|
+
Component: StickyHeaderTopBottomDemo,
|
|
88
|
+
},
|
|
89
|
+
StickyLeft: {
|
|
90
|
+
name: "On left",
|
|
91
|
+
Component: StickyHeaderLeftDemo,
|
|
92
|
+
},
|
|
93
|
+
StickyRight: {
|
|
94
|
+
name: "On right",
|
|
95
|
+
Component: StickyHeaderRightDemo,
|
|
96
|
+
},
|
|
97
|
+
StickyLeftCentered: {
|
|
98
|
+
name: "On left centered",
|
|
99
|
+
Component: StickyHeaderLeftCenterDemo,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
37
102
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
Action: {
|
|
106
|
+
name: "Action",
|
|
107
|
+
Component: ActionDemo,
|
|
108
|
+
children: {
|
|
109
|
+
ActionOnBottom: {
|
|
110
|
+
name: "Actions on header",
|
|
111
|
+
Component: ActionsOnBottom,
|
|
45
112
|
},
|
|
46
|
-
|
|
47
|
-
name: "
|
|
48
|
-
Component:
|
|
113
|
+
ActionLabelsOnBottom: {
|
|
114
|
+
name: "Actions with labels on header",
|
|
115
|
+
Component: ActionLabelsOnBottom,
|
|
49
116
|
},
|
|
50
|
-
|
|
51
|
-
name: "
|
|
52
|
-
Component:
|
|
117
|
+
ActionOnLeft: {
|
|
118
|
+
name: "Actions on left header",
|
|
119
|
+
Component: ActionsOnLeft,
|
|
53
120
|
},
|
|
54
|
-
|
|
55
|
-
name: "
|
|
56
|
-
Component:
|
|
121
|
+
EqualActions: {
|
|
122
|
+
name: "EqualActions (wrapper)",
|
|
123
|
+
Component: ActionsDemo,
|
|
57
124
|
},
|
|
58
125
|
},
|
|
59
126
|
},
|
|
60
127
|
ListItem: {
|
|
61
128
|
name: "List & Item",
|
|
62
129
|
Component: ListItemDemo,
|
|
130
|
+
children: {
|
|
131
|
+
Ratio: {
|
|
132
|
+
name: "Alignment",
|
|
133
|
+
Component: ItemRatioDemo,
|
|
134
|
+
},
|
|
135
|
+
Header: {
|
|
136
|
+
name: "Header",
|
|
137
|
+
Component: ListHeaderDemo,
|
|
138
|
+
},
|
|
139
|
+
Label: {
|
|
140
|
+
name: "Label",
|
|
141
|
+
Component: ItemLabelDemo,
|
|
142
|
+
},
|
|
143
|
+
Value: {
|
|
144
|
+
name: "Value",
|
|
145
|
+
Component: ValueDemo,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
63
148
|
},
|
|
64
149
|
Pad: {
|
|
65
150
|
name: "Direction pad",
|
|
66
151
|
Component: DirectionPadDemo,
|
|
67
152
|
},
|
|
153
|
+
Icons: {
|
|
154
|
+
name: "Icons",
|
|
155
|
+
Component: IconsDemo,
|
|
156
|
+
},
|
|
68
157
|
};
|
|
69
158
|
|
|
70
159
|
export {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const makeVariants = <T extends string>(variants: T | T[] | undefined): T[] => {
|
|
2
|
+
if (!variants) {
|
|
3
|
+
return [];
|
|
4
|
+
}
|
|
5
|
+
if (typeof variants === "string") {
|
|
6
|
+
return variants.split(" ").filter(Boolean) as T[];
|
|
7
|
+
}
|
|
8
|
+
return variants;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
makeVariants,
|
|
13
|
+
};
|
package/src/global.scss
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
// Font-size ratio: 1,6 (666?)
|
|
2
|
-
// Border ratio: 2,6666
|
|
3
|
-
// Dimensions ratio: 3
|
|
4
|
-
|
|
5
1
|
// @TODO prefix variable names
|
|
6
2
|
:root {
|
|
3
|
+
--ratio-dimensions: 3;
|
|
4
|
+
--ratio-border: 2.666666;
|
|
5
|
+
--ratio-font: 1.666666;
|
|
6
|
+
|
|
7
7
|
--main-color: #008ad2; // used
|
|
8
8
|
--main-color-alt: #006AA9;
|
|
9
9
|
|
|
10
10
|
--active-bg: #d3d3d3;
|
|
11
11
|
--inactive-bg: #d3d3d3; // used
|
|
12
12
|
|
|
13
|
+
--toggle-handle-bg: #e0e0e0;
|
|
14
|
+
--toggle-handle-border: #cdcdcd;
|
|
15
|
+
|
|
13
16
|
--icon: #636363;
|
|
14
17
|
--border: #d5d5d5;
|
|
15
18
|
--button-border: #bababa;
|
|
@@ -17,18 +20,39 @@
|
|
|
17
20
|
--header-border: #c8c8c9;
|
|
18
21
|
--header-bg: #efeff0;
|
|
19
22
|
--header-text: #484848;
|
|
23
|
+
--text: #323232;
|
|
24
|
+
--sub: #959595;
|
|
20
25
|
|
|
21
26
|
--toolbar-border: #ababab;
|
|
22
27
|
--toolbar-bg: #f8f8f8;
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--
|
|
29
|
+
// Shades: https://maketintsandshades.com/#038bf4,ff7200,7357e8,3ec234,3ec234,ff388f,ea2700
|
|
30
|
+
--blue1: #038bf4;
|
|
31
|
+
--orange1: #ff7200;
|
|
32
|
+
--orange1-darker: #cc5b00;
|
|
33
|
+
--purple1: #7357e8;
|
|
34
|
+
--green1: #3ec234;
|
|
35
|
+
--green1-darker: #38af2f;
|
|
36
|
+
--pink1: #ff388f;
|
|
37
|
+
--red1: #ea2700;
|
|
38
|
+
|
|
39
|
+
--grey1: #737373;
|
|
40
|
+
|
|
41
|
+
--focus-color: #dcaf00;
|
|
30
42
|
}
|
|
31
43
|
|
|
32
|
-
*:focus {
|
|
44
|
+
*:focus {
|
|
33
45
|
outline: none!important;
|
|
34
46
|
}
|
|
47
|
+
|
|
48
|
+
*:focus-visible:focus-visible {
|
|
49
|
+
outline: none!important;
|
|
50
|
+
border-color: var(--focus-color);
|
|
51
|
+
background-color: var(--focus-bg-set);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
body {
|
|
56
|
+
font-size: 15px;
|
|
57
|
+
color: var(--text);
|
|
58
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export * from "./components/form/Checkbox.js";
|
|
2
|
+
|
|
3
|
+
export * from "./components/icons/Icon.js";
|
|
4
|
+
|
|
2
5
|
export * from "./components/layout/header/Header.js";
|
|
3
6
|
export * from "./components/layout/header/StickyHeader.js";
|
|
4
7
|
export * from "./components/layout/list/List.js";
|
|
5
8
|
export * from "./components/layout/list/Item.js";
|
|
9
|
+
|
|
10
|
+
export * from "./components/ui/button/Button.js";
|
|
6
11
|
export * from "./components/ui/directionPad/Pad.js";
|
package/src/types.ts
ADDED
package/.postcssrc
DELETED
package/dist/demo/Demo.d.ts
DELETED
package/dist/demo/Demo.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.d.ts","sourceRoot":"","sources":["../../src/demo/Demo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAOjB,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/demo/Demo.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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.Demo = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Demo_module_scss_1 = __importDefault(require("./Demo.module.scss"));
|
|
9
|
-
const Menu_1 = require("./Menu");
|
|
10
|
-
const Main_1 = require("./Main");
|
|
11
|
-
const componentsMap_1 = require("./componentsMap");
|
|
12
|
-
const Demo = (props) => {
|
|
13
|
-
return (react_1.default.createElement("div", { className: Demo_module_scss_1.default.container },
|
|
14
|
-
react_1.default.createElement(Menu_1.Menu, { list: componentsMap_1.componentsMap }),
|
|
15
|
-
react_1.default.createElement(Main_1.Main, null)));
|
|
16
|
-
};
|
|
17
|
-
exports.Demo = Demo;
|
|
18
|
-
//# sourceMappingURL=Demo.js.map
|
package/dist/demo/Demo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.js","sourceRoot":"","sources":["../../src/demo/Demo.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,0EAAwC;AACxC,iCAA8B;AAC9B,iCAA8B;AAC9B,mDAAgD;AAEhD,MAAM,IAAI,GAAa,CAAC,KAAK,EAAE,EAAE;IAC7B,OAAO,CACH,uCAAK,SAAS,EAAE,0BAAM,CAAC,SAAS;QAC5B,8BAAC,WAAI,IAAC,IAAI,EAAE,6BAAa,GAAI;QAC7B,8BAAC,WAAI,OAAG,CACN,CACT,CAAC;AACN,CAAC,CAAC;AAEO,oBAAI"}
|
package/dist/demo/Main.d.ts
DELETED
package/dist/demo/Main.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../src/demo/Main.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AA0CrD,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EA6CjB,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/demo/Main.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
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.Main = void 0;
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
28
|
-
const Main_module_scss_1 = __importDefault(require("./Main.module.scss"));
|
|
29
|
-
const safeUseHash_1 = require("./utils/safeUseHash");
|
|
30
|
-
const componentsMap_1 = require("./componentsMap");
|
|
31
|
-
const getComponentByHash = (hash) => {
|
|
32
|
-
const parts = hash.split("/");
|
|
33
|
-
let obj = componentsMap_1.componentsMap, objItem;
|
|
34
|
-
while (parts.length) {
|
|
35
|
-
const first = parts.shift();
|
|
36
|
-
objItem = obj === null || obj === void 0 ? void 0 : obj[first];
|
|
37
|
-
if (!objItem) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
obj = objItem.children;
|
|
41
|
-
}
|
|
42
|
-
if (objItem === null || objItem === void 0 ? void 0 : objItem.Component) {
|
|
43
|
-
return {
|
|
44
|
-
name: objItem.name,
|
|
45
|
-
Component: objItem.Component,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
};
|
|
50
|
-
const Main = (props) => {
|
|
51
|
-
const [bg, setBg] = react_1.useState("white");
|
|
52
|
-
const hash = safeUseHash_1.safeUseHash();
|
|
53
|
-
const hashWithoutHash = hash.substr(1);
|
|
54
|
-
const info = getComponentByHash(hashWithoutHash);
|
|
55
|
-
const handleTransparentBg = react_1.useCallback(() => {
|
|
56
|
-
setBg("transparent");
|
|
57
|
-
}, []);
|
|
58
|
-
const handleWhiteBg = react_1.useCallback(() => {
|
|
59
|
-
setBg("white");
|
|
60
|
-
}, []);
|
|
61
|
-
const handleMobileBg = react_1.useCallback(() => {
|
|
62
|
-
setBg("mobile");
|
|
63
|
-
}, []);
|
|
64
|
-
if (!info) {
|
|
65
|
-
return (react_1.default.createElement("div", { className: Main_module_scss_1.default.container },
|
|
66
|
-
react_1.default.createElement("h1", { className: Main_module_scss_1.default.header }, "Hi there"),
|
|
67
|
-
"This is poor man's StoryBook."));
|
|
68
|
-
}
|
|
69
|
-
const Component = info.Component;
|
|
70
|
-
const componentCls = classnames_1.default(Main_module_scss_1.default.component, {
|
|
71
|
-
[Main_module_scss_1.default["component--transparent"]]: bg === "transparent",
|
|
72
|
-
[Main_module_scss_1.default["component--mobile"]]: bg === "mobile",
|
|
73
|
-
});
|
|
74
|
-
return (react_1.default.createElement("div", { className: Main_module_scss_1.default.container },
|
|
75
|
-
react_1.default.createElement("h1", { className: Main_module_scss_1.default.header }, info.name),
|
|
76
|
-
react_1.default.createElement("button", { onClick: handleTransparentBg }, "Transparent"),
|
|
77
|
-
react_1.default.createElement("button", { onClick: handleWhiteBg }, "White"),
|
|
78
|
-
react_1.default.createElement("button", { onClick: handleMobileBg }, "Mobile"),
|
|
79
|
-
react_1.default.createElement("div", { className: componentCls },
|
|
80
|
-
react_1.default.createElement(Component, null))));
|
|
81
|
-
};
|
|
82
|
-
exports.Main = Main;
|
|
83
|
-
//# sourceMappingURL=Main.js.map
|
package/dist/demo/Main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Main.js","sourceRoot":"","sources":["../../src/demo/Main.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,4DAAoC;AAEpC,0EAAwC;AAExC,qDAAkD;AAElD,mDAAgD;AAUhD,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAwB,EAAE;IAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,GAAG,GAAuB,6BAAa,EACvC,OAA+B,CAAC;IAEpC,OAAO,KAAK,CAAC,MAAM,EAAE;QACjB,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,EAAG,CAAC;QAC7B,OAAO,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,KAAK,CAAC,CAAC;QAEvB,IAAI,CAAC,OAAO,EAAE;YACV,OAAO,IAAI,CAAC;SACf;QACD,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;KAC1B;IAED,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAE;QACpB,OAAO;YACH,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC/B,CAAC;KACL;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,IAAI,GAAa,CAAC,KAAK,EAAE,EAAE;IAC7B,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,gBAAQ,CAAK,OAAO,CAAC,CAAC;IAE1C,MAAM,IAAI,GAAG,yBAAW,EAAE,CAAC;IAC3B,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAEjD,MAAM,mBAAmB,GAAG,mBAAW,CAAC,GAAG,EAAE;QACzC,KAAK,CAAC,aAAa,CAAC,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,aAAa,GAAG,mBAAW,CAAC,GAAG,EAAE;QACnC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,cAAc,GAAG,mBAAW,CAAC,GAAG,EAAE;QACpC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,IAAI,EAAE;QACP,OAAO,CACH,uCAAK,SAAS,EAAE,0BAAM,CAAC,SAAS;YAC5B,sCAAI,SAAS,EAAE,0BAAM,CAAC,MAAM,eAAe;4CAEzC,CACT,CAAC;KACL;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;IAEjC,MAAM,YAAY,GAAG,oBAAU,CAAC,0BAAM,CAAC,SAAS,EAAE;QAC9C,CAAC,0BAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,EAAE,KAAK,aAAa;QACxD,CAAC,0BAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,EAAE,KAAK,QAAQ;KACjD,CAAC,CAAC;IAEH,OAAO,CACH,uCAAK,SAAS,EAAE,0BAAM,CAAC,SAAS;QAC5B,sCAAI,SAAS,EAAE,0BAAM,CAAC,MAAM,IAAG,IAAI,CAAC,IAAI,CAAM;QAC9C,0CAAQ,OAAO,EAAE,mBAAmB,kBAAsB;QAC1D,0CAAQ,OAAO,EAAE,aAAa,YAAgB;QAC9C,0CAAQ,OAAO,EAAE,cAAc,aAAiB;QAEhD,uCAAK,SAAS,EAAE,YAAY;YACxB,8BAAC,SAAS,OAAG,CACX,CACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEO,oBAAI"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
flex: 1;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.component {
|
|
9
|
-
padding: 20px;
|
|
10
|
-
flex: 1;
|
|
11
|
-
overflow: auto;
|
|
12
|
-
|
|
13
|
-
&--transparent {
|
|
14
|
-
background-position: 0px 0px, 10px 10px;
|
|
15
|
-
background-size: 20px 20px;
|
|
16
|
-
background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%),linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&--mobile {
|
|
20
|
-
border-radius: 20px;
|
|
21
|
-
max-width: 400px;
|
|
22
|
-
width: 100%;
|
|
23
|
-
padding: 0;
|
|
24
|
-
margin: 20px 0;
|
|
25
|
-
align-self: center;
|
|
26
|
-
border: 10px solid black;
|
|
27
|
-
border-top-width: 30px;
|
|
28
|
-
position: relative;
|
|
29
|
-
}
|
|
30
|
-
}
|
package/dist/demo/Menu.d.ts
DELETED
package/dist/demo/Menu.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/demo/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,UAAU,KAAK;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,OAAO,aAAa,CAAC;CAC9B;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAuBzB,CAAC;AAMF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|