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
package/dist/demo/Menu.js
DELETED
|
@@ -1,31 +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.Menu = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Menu_module_scss_1 = __importDefault(require("./Menu.module.scss"));
|
|
9
|
-
const Menu = (props) => {
|
|
10
|
-
const cmp = Object.entries(props.list).map(([urlHash, component]) => {
|
|
11
|
-
const label = component.name;
|
|
12
|
-
const children = `children` in component && component.children
|
|
13
|
-
? react_1.default.createElement(Menu, { ancestors: [...props.ancestors, urlHash], list: component.children })
|
|
14
|
-
: null;
|
|
15
|
-
return (react_1.default.createElement("li", { key: urlHash },
|
|
16
|
-
react_1.default.createElement("a", { href: "#" + [...props.ancestors, urlHash].join("/") }, label),
|
|
17
|
-
children));
|
|
18
|
-
});
|
|
19
|
-
const contents = react_1.default.createElement("ul", null, cmp);
|
|
20
|
-
if (!props.ancestors.length) {
|
|
21
|
-
cmp.unshift(react_1.default.createElement("li", { key: "--main" },
|
|
22
|
-
react_1.default.createElement("a", { href: "#" }, "Main")));
|
|
23
|
-
return react_1.default.createElement("menu", { className: Menu_module_scss_1.default.menu }, contents);
|
|
24
|
-
}
|
|
25
|
-
return contents;
|
|
26
|
-
};
|
|
27
|
-
exports.Menu = Menu;
|
|
28
|
-
Menu.defaultProps = {
|
|
29
|
-
ancestors: [],
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=Menu.js.map
|
package/dist/demo/Menu.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../src/demo/Menu.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,0EAAwC;AAQxC,MAAM,IAAI,GAAoB,CAAC,KAAK,EAAE,EAAE;IACpC,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE;QAChE,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC;QAC7B,MAAM,QAAQ,GAAG,UAAU,IAAI,SAAS,IAAI,SAAS,CAAC,QAAQ;YAC1D,CAAC,CAAC,8BAAC,IAAI,IAAC,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,SAAU,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,QAAQ,GAAI;YAC/E,CAAC,CAAC,IAAI,CAAC;QAEX,OAAO,CACH,sCAAI,GAAG,EAAE,OAAO;YACZ,qCAAG,IAAI,EAAE,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,SAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAG,KAAK,CAAK;YACnE,QAAQ,CACR,CACR,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,0CAAK,GAAG,CAAM,CAAC;IAEhC,IAAI,CAAC,KAAK,CAAC,SAAU,CAAC,MAAM,EAAE;QAC1B,GAAG,CAAC,OAAO,CAAC,sCAAI,GAAG,EAAE,QAAQ;YAAE,qCAAG,IAAI,EAAE,GAAG,WAAU,CAAK,CAAC,CAAC;QAC5D,OAAO,wCAAM,SAAS,EAAE,0BAAM,CAAC,IAAI,IAAG,QAAQ,CAAQ,CAAC;KAC1D;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAC;AAMO,oBAAI;AAJb,IAAI,CAAC,YAAY,GAAG;IAChB,SAAS,EAAE,EAAE;CAChB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.menu {
|
|
2
|
-
margin: 0;
|
|
3
|
-
padding: 0;
|
|
4
|
-
border-right: 1px solid black;
|
|
5
|
-
|
|
6
|
-
ul {
|
|
7
|
-
margin: 0 0 0 15px;
|
|
8
|
-
padding: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
li {
|
|
12
|
-
padding: 0;
|
|
13
|
-
margin: 0;
|
|
14
|
-
list-style-type: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
> ul {
|
|
18
|
-
margin: 0;
|
|
19
|
-
display: block;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
> ul > li > a {
|
|
23
|
-
padding: 10px;
|
|
24
|
-
text-transform: uppercase;
|
|
25
|
-
font-size: 16px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
a {
|
|
29
|
-
padding: 5px 10px;
|
|
30
|
-
display: block;
|
|
31
|
-
color: black;
|
|
32
|
-
text-decoration: none;
|
|
33
|
-
font-size: 14px;
|
|
34
|
-
|
|
35
|
-
&:hover {
|
|
36
|
-
background: var(--active-bg);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/demo/components/form/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAQzB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/demo/components/form/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AAErD,gDAA6C;AAE7C,MAAM,YAAY,GAAa,CAAC,KAAK,EAAE,EAAE;IACrC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,gBAAQ,CAAC,KAAK,CAAC,CAAC;IAElC,MAAM,YAAY,GAAG,mBAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzE,OAAO,CACH,8BAAC,mBAAQ,IAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,iCAAuC,CACjG,CAAC;AACN,CAAC,CAAC;AAEO,oCAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../../src/demo/components/layout/header/Header.tsx"],"names":[],"mappings":";AAIA,QAAA,MAAM,UAAU,mBAUf,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,16 +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.HeaderDemo = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const index_js_1 = require("../../../../index.js");
|
|
9
|
-
const HeaderDemo = () => {
|
|
10
|
-
const longContent = new Array(1000).fill(null).map((_, key) => react_1.default.createElement("div", { key: key }, "content"));
|
|
11
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
12
|
-
react_1.default.createElement(index_js_1.Header, null, "Some place"),
|
|
13
|
-
longContent));
|
|
14
|
-
};
|
|
15
|
-
exports.HeaderDemo = HeaderDemo;
|
|
16
|
-
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../../src/demo/components/layout/header/Header.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,mDAA8C;AAE9C,MAAM,UAAU,GAAG,GAAG,EAAE;IAEpB,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,uCAAK,GAAG,EAAE,GAAG,cAAe,CAAC,CAAC;IAE7F,OAAO,CACH;QACI,8BAAC,iBAAM,qBAAoB;QAC1B,WAAW,CACb,CACN,CAAC;AACN,CAAC,CAAC;AAEO,gCAAU"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const StickyHeaderDemo: () => JSX.Element;
|
|
3
|
-
declare const StickyHeaderBottomDemo: () => JSX.Element;
|
|
4
|
-
declare const StickyHeaderTopBottomDemo: () => JSX.Element;
|
|
5
|
-
declare const StickyHeaderLeftDemo: () => JSX.Element;
|
|
6
|
-
declare const StickyHeaderRightDemo: () => JSX.Element;
|
|
7
|
-
declare const StickyHeaderLeftCenterDemo: () => JSX.Element;
|
|
8
|
-
export { StickyHeaderDemo, StickyHeaderBottomDemo, StickyHeaderTopBottomDemo, StickyHeaderLeftDemo, StickyHeaderRightDemo, StickyHeaderLeftCenterDemo, };
|
|
9
|
-
//# sourceMappingURL=StickyHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StickyHeader.d.ts","sourceRoot":"","sources":["../../../../../src/demo/components/layout/header/StickyHeader.tsx"],"names":[],"mappings":";AAUA,QAAA,MAAM,gBAAgB,mBASrB,CAAC;AAEF,QAAA,MAAM,sBAAsB,mBAS3B,CAAC;AAEF,QAAA,MAAM,yBAAyB,mBAc9B,CAAC;AAEF,QAAA,MAAM,oBAAoB,mBASzB,CAAC;AAEF,QAAA,MAAM,qBAAqB,mBAS1B,CAAC;AAEF,QAAA,MAAM,0BAA0B,mBAS/B,CAAC;AAEF,OAAO,EACH,gBAAgB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,qBAAqB,EAChH,0BAA0B,GAC7B,CAAC"}
|
|
@@ -1,73 +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.StickyHeaderLeftCenterDemo = exports.StickyHeaderRightDemo = exports.StickyHeaderLeftDemo = exports.StickyHeaderTopBottomDemo = exports.StickyHeaderBottomDemo = exports.StickyHeaderDemo = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const index_js_1 = require("../../../../index.js");
|
|
9
|
-
const LongContent = () => {
|
|
10
|
-
const longContent = new Array(1000).fill(null).map((_, key) => react_1.default.createElement("div", { key: key }, "content"));
|
|
11
|
-
return react_1.default.createElement(react_1.default.Fragment, null, longContent);
|
|
12
|
-
};
|
|
13
|
-
const StickyHeaderDemo = () => {
|
|
14
|
-
return (react_1.default.createElement(index_js_1.StickyHeader, null,
|
|
15
|
-
react_1.default.createElement(index_js_1.Header, null, "Some place"),
|
|
16
|
-
react_1.default.createElement(index_js_1.StickyHeader.Content, null,
|
|
17
|
-
react_1.default.createElement(LongContent, null))));
|
|
18
|
-
};
|
|
19
|
-
exports.StickyHeaderDemo = StickyHeaderDemo;
|
|
20
|
-
const StickyHeaderBottomDemo = () => {
|
|
21
|
-
return (react_1.default.createElement(index_js_1.StickyHeader, { position: "bottom" },
|
|
22
|
-
react_1.default.createElement(index_js_1.Header, null, "Some place"),
|
|
23
|
-
react_1.default.createElement(index_js_1.StickyHeader.Content, null,
|
|
24
|
-
react_1.default.createElement(LongContent, null))));
|
|
25
|
-
};
|
|
26
|
-
exports.StickyHeaderBottomDemo = StickyHeaderBottomDemo;
|
|
27
|
-
const StickyHeaderTopBottomDemo = () => {
|
|
28
|
-
return (react_1.default.createElement(index_js_1.StickyHeader, { position: "top" },
|
|
29
|
-
react_1.default.createElement(index_js_1.Header, null, "Some place"),
|
|
30
|
-
react_1.default.createElement(index_js_1.StickyHeader.Content, null,
|
|
31
|
-
react_1.default.createElement(index_js_1.StickyHeader, { position: "bottom" },
|
|
32
|
-
react_1.default.createElement(index_js_1.Header, null, "Some place"),
|
|
33
|
-
react_1.default.createElement(index_js_1.StickyHeader.Content, null,
|
|
34
|
-
react_1.default.createElement(LongContent, null))))));
|
|
35
|
-
};
|
|
36
|
-
exports.StickyHeaderTopBottomDemo = StickyHeaderTopBottomDemo;
|
|
37
|
-
const StickyHeaderLeftDemo = () => {
|
|
38
|
-
return (react_1.default.createElement(index_js_1.StickyHeader, { position: "left" },
|
|
39
|
-
react_1.default.createElement(index_js_1.Header, null,
|
|
40
|
-
"x",
|
|
41
|
-
react_1.default.createElement("br", null),
|
|
42
|
-
"x",
|
|
43
|
-
react_1.default.createElement("br", null),
|
|
44
|
-
"x"),
|
|
45
|
-
react_1.default.createElement(index_js_1.StickyHeader.Content, null,
|
|
46
|
-
react_1.default.createElement(LongContent, null))));
|
|
47
|
-
};
|
|
48
|
-
exports.StickyHeaderLeftDemo = StickyHeaderLeftDemo;
|
|
49
|
-
const StickyHeaderRightDemo = () => {
|
|
50
|
-
return (react_1.default.createElement(index_js_1.StickyHeader, { position: "right" },
|
|
51
|
-
react_1.default.createElement(index_js_1.Header, null,
|
|
52
|
-
"x",
|
|
53
|
-
react_1.default.createElement("br", null),
|
|
54
|
-
"x",
|
|
55
|
-
react_1.default.createElement("br", null),
|
|
56
|
-
"x"),
|
|
57
|
-
react_1.default.createElement(index_js_1.StickyHeader.Content, null,
|
|
58
|
-
react_1.default.createElement(LongContent, null))));
|
|
59
|
-
};
|
|
60
|
-
exports.StickyHeaderRightDemo = StickyHeaderRightDemo;
|
|
61
|
-
const StickyHeaderLeftCenterDemo = () => {
|
|
62
|
-
return (react_1.default.createElement(index_js_1.StickyHeader, { position: "left" },
|
|
63
|
-
react_1.default.createElement(index_js_1.Header, { center: true },
|
|
64
|
-
"x",
|
|
65
|
-
react_1.default.createElement("br", null),
|
|
66
|
-
"x",
|
|
67
|
-
react_1.default.createElement("br", null),
|
|
68
|
-
"x"),
|
|
69
|
-
react_1.default.createElement(index_js_1.StickyHeader.Content, null,
|
|
70
|
-
react_1.default.createElement(LongContent, null))));
|
|
71
|
-
};
|
|
72
|
-
exports.StickyHeaderLeftCenterDemo = StickyHeaderLeftCenterDemo;
|
|
73
|
-
//# sourceMappingURL=StickyHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StickyHeader.js","sourceRoot":"","sources":["../../../../../src/demo/components/layout/header/StickyHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,mDAA4D;AAE5D,MAAM,WAAW,GAAa,GAAG,EAAE;IAE/B,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,uCAAK,GAAG,EAAE,GAAG,cAAe,CAAC,CAAC;IAC7F,OAAO,8DAAG,WAAW,CAAI,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC1B,OAAO,CACH,8BAAC,uBAAY;QACT,8BAAC,iBAAM,qBAAoB;QAC3B,8BAAC,uBAAY,CAAC,OAAO;YACjB,8BAAC,WAAW,OAAG,CACI,CACZ,CAClB,CAAC;AACN,CAAC,CAAC;AA+DE,4CAAgB;AA7DpB,MAAM,sBAAsB,GAAG,GAAG,EAAE;IAChC,OAAO,CACH,8BAAC,uBAAY,IAAC,QAAQ,EAAE,QAAQ;QAC5B,8BAAC,iBAAM,qBAAoB;QAC3B,8BAAC,uBAAY,CAAC,OAAO;YACjB,8BAAC,WAAW,OAAG,CACI,CACZ,CAClB,CAAC;AACN,CAAC,CAAC;AAoDoB,wDAAsB;AAlD5C,MAAM,yBAAyB,GAAG,GAAG,EAAE;IACnC,OAAO,CACH,8BAAC,uBAAY,IAAC,QAAQ,EAAE,KAAK;QACzB,8BAAC,iBAAM,qBAAoB;QAC3B,8BAAC,uBAAY,CAAC,OAAO;YACjB,8BAAC,uBAAY,IAAC,QAAQ,EAAE,QAAQ;gBAC5B,8BAAC,iBAAM,qBAAoB;gBAC3B,8BAAC,uBAAY,CAAC,OAAO;oBACjB,8BAAC,WAAW,OAAG,CACI,CACZ,CACI,CACZ,CAClB,CAAC;AACN,CAAC,CAAC;AAoC4C,8DAAyB;AAlCvE,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAC9B,OAAO,CACH,8BAAC,uBAAY,IAAC,QAAQ,EAAE,MAAM;QAC1B,8BAAC,iBAAM;;YAAE,yCAAM;;YAAC,yCAAM;gBAAU;QAChC,8BAAC,uBAAY,CAAC,OAAO;YACjB,8BAAC,WAAW,OAAG,CACI,CACZ,CAClB,CAAC;AACN,CAAC,CAAC;AAyBuE,oDAAoB;AAvB7F,MAAM,qBAAqB,GAAG,GAAG,EAAE;IAC/B,OAAO,CACH,8BAAC,uBAAY,IAAC,QAAQ,EAAE,OAAO;QAC3B,8BAAC,iBAAM;;YAAE,yCAAM;;YAAC,yCAAM;gBAAU;QAChC,8BAAC,uBAAY,CAAC,OAAO;YACjB,8BAAC,WAAW,OAAG,CACI,CACZ,CAClB,CAAC;AACN,CAAC,CAAC;AAc6F,sDAAqB;AAZpH,MAAM,0BAA0B,GAAG,GAAG,EAAE;IACpC,OAAO,CACH,8BAAC,uBAAY,IAAC,QAAQ,EAAE,MAAM;QAC1B,8BAAC,iBAAM,IAAC,MAAM,EAAE,IAAI;;YAAG,yCAAM;;YAAC,yCAAM;gBAAU;QAC9C,8BAAC,uBAAY,CAAC,OAAO;YACjB,8BAAC,WAAW,OAAG,CACI,CACZ,CAClB,CAAC;AACN,CAAC,CAAC;AAIE,gEAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.Item.d.ts","sourceRoot":"","sources":["../../../../../src/demo/components/layout/list/List.Item.tsx"],"names":[],"mappings":";AAMA,QAAA,MAAM,YAAY,mBAcjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,42 +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.ListItemDemo = void 0;
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const link_1 = __importDefault(require("next/link"));
|
|
28
|
-
const index_js_1 = require("../../../../index.js");
|
|
29
|
-
const List_Item_module_scss_1 = __importDefault(require("./List.Item.module.scss"));
|
|
30
|
-
const ListItemDemo = () => {
|
|
31
|
-
const handleClick = react_1.useCallback(() => { window.alert("Clicked"); }, []);
|
|
32
|
-
return (react_1.default.createElement(index_js_1.List, null,
|
|
33
|
-
react_1.default.createElement(index_js_1.Item, null, "I am an item"),
|
|
34
|
-
react_1.default.createElement(index_js_1.Item, null, "I am an item"),
|
|
35
|
-
react_1.default.createElement(index_js_1.Item, { href: "https://www.npmjs.com/package/react-miui" }, "I am clickable item"),
|
|
36
|
-
react_1.default.createElement(index_js_1.Item, { to: "/react-miui", Link: link_1.default }, "I am local link item"),
|
|
37
|
-
react_1.default.createElement(index_js_1.Item, { onClick: handleClick }, "Click me to see my action"),
|
|
38
|
-
react_1.default.createElement(index_js_1.Item, { className: List_Item_module_scss_1.default.custom }, "I'm a custom item"),
|
|
39
|
-
react_1.default.createElement(index_js_1.Item, null, "I am an item")));
|
|
40
|
-
};
|
|
41
|
-
exports.ListItemDemo = ListItemDemo;
|
|
42
|
-
//# sourceMappingURL=List.Item.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.Item.js","sourceRoot":"","sources":["../../../../../src/demo/components/layout/list/List.Item.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAC3C,qDAA6B;AAE7B,mDAAkD;AAClD,oFAA6C;AAE7C,MAAM,YAAY,GAAG,GAAG,EAAE;IACtB,MAAM,WAAW,GAAG,mBAAW,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAExE,OAAO,CACH,8BAAC,eAAI;QACD,8BAAC,eAAI,uBAAoB;QACzB,8BAAC,eAAI,uBAAoB;QACzB,8BAAC,eAAI,IAAC,IAAI,EAAE,0CAA0C,0BAA4B;QAClF,8BAAC,eAAI,IAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,cAAI,2BAA6B;QAChE,8BAAC,eAAI,IAAC,OAAO,EAAE,WAAW,gCAAkC;QAC5D,8BAAC,eAAI,IAAC,SAAS,EAAE,+BAAM,CAAC,MAAM,wBAA0B;QACxD,8BAAC,eAAI,uBAAoB,CACtB,CACV,CAAC;AACN,CAAC,CAAC;AAEO,oCAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pad.d.ts","sourceRoot":"","sources":["../../../../../src/demo/components/ui/directionPad/Pad.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAkC7B,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,49 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.DirectionPadDemo = void 0;
|
|
23
|
-
const react_1 = __importStar(require("react"));
|
|
24
|
-
const __1 = require("../../../..");
|
|
25
|
-
const DirectionPadDemo = (props) => {
|
|
26
|
-
const [lastClick, setLastClick] = react_1.useState("<none>");
|
|
27
|
-
const handleLeftClick = react_1.useCallback(() => {
|
|
28
|
-
setLastClick("left");
|
|
29
|
-
}, []);
|
|
30
|
-
const handleRightClick = react_1.useCallback(() => {
|
|
31
|
-
setLastClick("right");
|
|
32
|
-
}, []);
|
|
33
|
-
const handleUpClick = react_1.useCallback(() => {
|
|
34
|
-
setLastClick("up");
|
|
35
|
-
}, []);
|
|
36
|
-
const handleDownClick = react_1.useCallback(() => {
|
|
37
|
-
setLastClick("down");
|
|
38
|
-
}, []);
|
|
39
|
-
const handleMiddleClick = react_1.useCallback(() => {
|
|
40
|
-
setLastClick("res");
|
|
41
|
-
}, []);
|
|
42
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
43
|
-
react_1.default.createElement(__1.DirectionPad, { onLeftPress: handleLeftClick, onRightPress: handleRightClick, onUpPress: handleUpClick, onDownPress: handleDownClick, onMiddlePress: handleMiddleClick, middleLabel: "RES" }),
|
|
44
|
-
react_1.default.createElement("div", null,
|
|
45
|
-
"Last clicked button: ",
|
|
46
|
-
lastClick)));
|
|
47
|
-
};
|
|
48
|
-
exports.DirectionPadDemo = DirectionPadDemo;
|
|
49
|
-
//# sourceMappingURL=Pad.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pad.js","sourceRoot":"","sources":["../../../../../src/demo/components/ui/directionPad/Pad.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,mCAA2C;AAE3C,MAAM,gBAAgB,GAAa,CAAC,KAAK,EAAE,EAAE;IACzC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,gBAAQ,CAAC,QAAQ,CAAC,CAAC;IAErD,MAAM,eAAe,GAAG,mBAAW,CAAC,GAAG,EAAE;QACrC,YAAY,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,gBAAgB,GAAG,mBAAW,CAAC,GAAG,EAAE;QACtC,YAAY,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,aAAa,GAAG,mBAAW,CAAC,GAAG,EAAE;QACnC,YAAY,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,eAAe,GAAG,mBAAW,CAAC,GAAG,EAAE;QACrC,YAAY,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,iBAAiB,GAAG,mBAAW,CAAC,GAAG,EAAE;QACvC,YAAY,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH;QACI,8BAAC,gBAAY,IACT,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EAAE,aAAa,EACxB,WAAW,EAAE,eAAe,EAC5B,aAAa,EAAE,iBAAiB,EAChC,WAAW,EAAE,KAAK,GACpB;QACF;;YAC0B,SAAS,CAC7B,CACP,CACN,CAAC;AACN,CAAC,CAAC;AAEO,4CAAgB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
declare type AnyComponent = React.ComponentClass | React.FC;
|
|
3
|
-
interface TheMap {
|
|
4
|
-
[key: string]: TheMapItem;
|
|
5
|
-
}
|
|
6
|
-
interface TheMapItem {
|
|
7
|
-
name: string;
|
|
8
|
-
Component: AnyComponent;
|
|
9
|
-
children?: TheMap;
|
|
10
|
-
}
|
|
11
|
-
declare const componentsMap: TheMap;
|
|
12
|
-
export { componentsMap, };
|
|
13
|
-
export type { TheMap, TheMapItem, };
|
|
14
|
-
//# sourceMappingURL=componentsMap.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"componentsMap.d.ts","sourceRoot":"","sources":["../../src/demo/componentsMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,aAAK,YAAY,GAAG,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC;AAEpD,UAAU,MAAM;IAEZ,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAC7B;AAED,UAAU,UAAU;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,QAAA,MAAM,aAAa,EAAE,MA2CpB,CAAC;AAEF,OAAO,EACH,aAAa,GAChB,CAAC;AAEF,YAAY,EACR,MAAM,EACN,UAAU,GACb,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.componentsMap = void 0;
|
|
4
|
-
const Checkbox_1 = require("./components/form/Checkbox");
|
|
5
|
-
const Header_1 = require("./components/layout/header/Header");
|
|
6
|
-
const StickyHeader_1 = require("./components/layout/header/StickyHeader");
|
|
7
|
-
const List_Item_1 = require("./components/layout/list/List.Item");
|
|
8
|
-
const Pad_1 = require("./components/ui/directionPad/Pad");
|
|
9
|
-
const componentsMap = {
|
|
10
|
-
Checkbox: {
|
|
11
|
-
name: "Checkbox",
|
|
12
|
-
Component: Checkbox_1.CheckboxDemo,
|
|
13
|
-
},
|
|
14
|
-
Header: {
|
|
15
|
-
name: "Header",
|
|
16
|
-
Component: Header_1.HeaderDemo,
|
|
17
|
-
children: {
|
|
18
|
-
Sticky: {
|
|
19
|
-
name: "Sticky header",
|
|
20
|
-
Component: StickyHeader_1.StickyHeaderDemo,
|
|
21
|
-
},
|
|
22
|
-
StickyBottom: {
|
|
23
|
-
name: "On bottom",
|
|
24
|
-
Component: StickyHeader_1.StickyHeaderBottomDemo,
|
|
25
|
-
},
|
|
26
|
-
StickyTopBottom: {
|
|
27
|
-
name: "On top & bottom",
|
|
28
|
-
Component: StickyHeader_1.StickyHeaderTopBottomDemo,
|
|
29
|
-
},
|
|
30
|
-
StickyLeft: {
|
|
31
|
-
name: "On left",
|
|
32
|
-
Component: StickyHeader_1.StickyHeaderLeftDemo,
|
|
33
|
-
},
|
|
34
|
-
StickyRight: {
|
|
35
|
-
name: "On right",
|
|
36
|
-
Component: StickyHeader_1.StickyHeaderRightDemo,
|
|
37
|
-
},
|
|
38
|
-
StickyLeftCentered: {
|
|
39
|
-
name: "On left centered",
|
|
40
|
-
Component: StickyHeader_1.StickyHeaderLeftCenterDemo,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
ListItem: {
|
|
45
|
-
name: "List & Item",
|
|
46
|
-
Component: List_Item_1.ListItemDemo,
|
|
47
|
-
},
|
|
48
|
-
Pad: {
|
|
49
|
-
name: "Direction pad",
|
|
50
|
-
Component: Pad_1.DirectionPadDemo,
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
exports.componentsMap = componentsMap;
|
|
54
|
-
//# sourceMappingURL=componentsMap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"componentsMap.js","sourceRoot":"","sources":["../../src/demo/componentsMap.ts"],"names":[],"mappings":";;;AACA,yDAA0D;AAC1D,8DAA+D;AAC/D,0EAIiD;AACjD,kEAAkE;AAClE,0DAAoE;AAepE,MAAM,aAAa,GAAW;IAC1B,QAAQ,EAAE;QACN,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,uBAAY;KAC1B;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,mBAAU;QACrB,QAAQ,EAAE;YACN,MAAM,EAAE;gBACJ,IAAI,EAAE,eAAe;gBACrB,SAAS,EAAE,+BAAgB;aAC9B;YACD,YAAY,EAAE;gBACV,IAAI,EAAE,WAAW;gBACjB,SAAS,EAAE,qCAAsB;aACpC;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,iBAAiB;gBACvB,SAAS,EAAE,wCAAyB;aACvC;YACD,UAAU,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,SAAS,EAAE,mCAAoB;aAClC;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,UAAU;gBAChB,SAAS,EAAE,oCAAqB;aACnC;YACD,kBAAkB,EAAE;gBAChB,IAAI,EAAE,kBAAkB;gBACxB,SAAS,EAAE,yCAA0B;aACxC;SACJ;KACJ;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,wBAAY;KAC1B;IACD,GAAG,EAAE;QACD,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,sBAAgB;KAC9B;CACJ,CAAC;AAGE,sCAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"safeUseHash.d.ts","sourceRoot":"","sources":["../../../src/demo/utils/safeUseHash.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,cAQhB,CAAC;AAEF,OAAO,EACH,WAAW,GACd,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.safeUseHash = void 0;
|
|
4
|
-
const react_use_1 = require("react-use");
|
|
5
|
-
const safeUseHash = () => {
|
|
6
|
-
if (typeof window === "undefined") {
|
|
7
|
-
return "";
|
|
8
|
-
}
|
|
9
|
-
const [hash] = react_use_1.useHash();
|
|
10
|
-
return hash;
|
|
11
|
-
};
|
|
12
|
-
exports.safeUseHash = safeUseHash;
|
|
13
|
-
//# sourceMappingURL=safeUseHash.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"safeUseHash.js","sourceRoot":"","sources":["../../../src/demo/utils/safeUseHash.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AAEpC,MAAM,WAAW,GAAG,GAAG,EAAE;IACrB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,OAAO,EAAE,CAAC;KACb;IAED,MAAM,CAAC,IAAI,CAAC,GAAG,mBAAO,EAAE,CAAC;IAEzB,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAGE,kCAAW"}
|
package/dist/demo-global.scss
DELETED
package/dist/pages/_app.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { AppProps } from "next/app";
|
|
3
|
-
import "../global.scss";
|
|
4
|
-
import "../demo-global.scss";
|
|
5
|
-
declare const MyApp: ({ Component, pageProps }: AppProps) => JSX.Element;
|
|
6
|
-
export default MyApp;
|
|
7
|
-
//# sourceMappingURL=_app.d.ts.map
|
package/dist/pages/_app.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_app.d.ts","sourceRoot":"","sources":["../../src/pages/_app.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,gBAAgB,CAAC;AACxB,OAAO,qBAAqB,CAAC;AAE7B,QAAA,MAAM,KAAK,6BAA8B,QAAQ,gBAOhD,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/dist/pages/_app.js
DELETED
|
@@ -1,15 +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
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const head_1 = __importDefault(require("next/head"));
|
|
8
|
-
require("../global.scss");
|
|
9
|
-
require("../demo-global.scss");
|
|
10
|
-
const MyApp = ({ Component, pageProps }) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
11
|
-
react_1.default.createElement(head_1.default, null,
|
|
12
|
-
react_1.default.createElement("title", null, "MIUI in React")),
|
|
13
|
-
react_1.default.createElement(Component, Object.assign({}, pageProps))));
|
|
14
|
-
exports.default = MyApp;
|
|
15
|
-
//# sourceMappingURL=_app.js.map
|
package/dist/pages/_app.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_app.js","sourceRoot":"","sources":["../../src/pages/_app.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,qDAA6B;AAG7B,0BAAwB;AACxB,+BAA6B;AAE7B,MAAM,KAAK,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAY,EAAE,EAAE,CAAC,CAClD;IACI,8BAAC,cAAI;QACD,6DAA4B,CACzB;IACP,8BAAC,SAAS,oBAAK,SAAS,EAAI,CAC7B,CACN,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
package/dist/pages/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pages/index.tsx"],"names":[],"mappings":";AAGA,QAAA,MAAM,SAAS,mBAEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/pages/index.js
DELETED
|
@@ -1,10 +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
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const Demo_1 = require("../demo/Demo");
|
|
8
|
-
const IndexComp = () => (react_1.default.createElement(Demo_1.Demo, null));
|
|
9
|
-
exports.default = IndexComp;
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/dist/pages/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pages/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,uCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACpB,8BAAC,WAAI,OAAG,CACX,CAAC;AAEF,kBAAe,SAAS,CAAC"}
|
package/esm/demo/Demo.d.ts
DELETED
package/esm/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/esm/demo/Demo.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styles from "./Demo.module.scss";
|
|
3
|
-
import { Menu } from "./Menu";
|
|
4
|
-
import { Main } from "./Main";
|
|
5
|
-
import { componentsMap } from "./componentsMap";
|
|
6
|
-
const Demo = (props) => {
|
|
7
|
-
return (React.createElement("div", { className: styles.container },
|
|
8
|
-
React.createElement(Menu, { list: componentsMap }),
|
|
9
|
-
React.createElement(Main, null)));
|
|
10
|
-
};
|
|
11
|
-
export { Demo };
|
|
12
|
-
//# sourceMappingURL=Demo.js.map
|
package/esm/demo/Demo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.js","sourceRoot":"","sources":["../../src/demo/Demo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,IAAI,GAAa,CAAC,KAAK,EAAE,EAAE;IAC7B,OAAO,CACH,6BAAK,SAAS,EAAE,MAAM,CAAC,SAAS;QAC5B,oBAAC,IAAI,IAAC,IAAI,EAAE,aAAa,GAAI;QAC7B,oBAAC,IAAI,OAAG,CACN,CACT,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/esm/demo/Main.d.ts
DELETED
package/esm/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/esm/demo/Main.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useState } from "react";
|
|
2
|
-
import classnames from "classnames";
|
|
3
|
-
import styles from "./Main.module.scss";
|
|
4
|
-
import { safeUseHash } from "./utils/safeUseHash";
|
|
5
|
-
import { componentsMap } from "./componentsMap";
|
|
6
|
-
const getComponentByHash = (hash) => {
|
|
7
|
-
const parts = hash.split("/");
|
|
8
|
-
let obj = componentsMap, objItem;
|
|
9
|
-
while (parts.length) {
|
|
10
|
-
const first = parts.shift();
|
|
11
|
-
objItem = obj === null || obj === void 0 ? void 0 : obj[first];
|
|
12
|
-
if (!objItem) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
obj = objItem.children;
|
|
16
|
-
}
|
|
17
|
-
if (objItem === null || objItem === void 0 ? void 0 : objItem.Component) {
|
|
18
|
-
return {
|
|
19
|
-
name: objItem.name,
|
|
20
|
-
Component: objItem.Component,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
return null;
|
|
24
|
-
};
|
|
25
|
-
const Main = (props) => {
|
|
26
|
-
const [bg, setBg] = useState("white");
|
|
27
|
-
const hash = safeUseHash();
|
|
28
|
-
const hashWithoutHash = hash.substr(1);
|
|
29
|
-
const info = getComponentByHash(hashWithoutHash);
|
|
30
|
-
const handleTransparentBg = useCallback(() => {
|
|
31
|
-
setBg("transparent");
|
|
32
|
-
}, []);
|
|
33
|
-
const handleWhiteBg = useCallback(() => {
|
|
34
|
-
setBg("white");
|
|
35
|
-
}, []);
|
|
36
|
-
const handleMobileBg = useCallback(() => {
|
|
37
|
-
setBg("mobile");
|
|
38
|
-
}, []);
|
|
39
|
-
if (!info) {
|
|
40
|
-
return (React.createElement("div", { className: styles.container },
|
|
41
|
-
React.createElement("h1", { className: styles.header }, "Hi there"),
|
|
42
|
-
"This is poor man's StoryBook."));
|
|
43
|
-
}
|
|
44
|
-
const Component = info.Component;
|
|
45
|
-
const componentCls = classnames(styles.component, {
|
|
46
|
-
[styles["component--transparent"]]: bg === "transparent",
|
|
47
|
-
[styles["component--mobile"]]: bg === "mobile",
|
|
48
|
-
});
|
|
49
|
-
return (React.createElement("div", { className: styles.container },
|
|
50
|
-
React.createElement("h1", { className: styles.header }, info.name),
|
|
51
|
-
React.createElement("button", { onClick: handleTransparentBg }, "Transparent"),
|
|
52
|
-
React.createElement("button", { onClick: handleWhiteBg }, "White"),
|
|
53
|
-
React.createElement("button", { onClick: handleMobileBg }, "Mobile"),
|
|
54
|
-
React.createElement("div", { className: componentCls },
|
|
55
|
-
React.createElement(Component, null))));
|
|
56
|
-
};
|
|
57
|
-
export { Main };
|
|
58
|
-
//# sourceMappingURL=Main.js.map
|