best-react-pagination 0.1.1 → 0.1.2

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.
Files changed (47) hide show
  1. package/.idea/best-react-pagination.iml +9 -0
  2. package/.idea/codeStyles/Project.xml +58 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/discord.xml +7 -0
  5. package/.idea/git_toolbox_prj.xml +15 -0
  6. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  7. package/.idea/misc.xml +6 -0
  8. package/.idea/modules.xml +8 -0
  9. package/.idea/prettier.xml +6 -0
  10. package/.idea/vcs.xml +6 -0
  11. package/package.json +1 -1
  12. package/demo/.babelrc +0 -14
  13. package/demo/public/index.html +0 -17
  14. package/demo/src/App.tsx +0 -24
  15. package/demo/src/Pagination/components/Item/Item.tsx +0 -19
  16. package/demo/src/Pagination/components/Item/index.ts +0 -1
  17. package/demo/src/Pagination/components/ItemList/ItemList.tsx +0 -17
  18. package/demo/src/Pagination/components/ItemList/index.ts +0 -1
  19. package/demo/src/Pagination/components/Wrapper/Wrapper.tsx +0 -17
  20. package/demo/src/Pagination/components/Wrapper/index.ts +0 -1
  21. package/demo/src/Pagination/components/constants.ts +0 -49
  22. package/demo/src/Pagination/components/index.ts +0 -3
  23. package/demo/src/Pagination/components/utils.ts +0 -3
  24. package/demo/src/Pagination/index.tsx +0 -356
  25. package/demo/src/index.html +0 -11
  26. package/demo/src/index.tsx +0 -7
  27. package/demo/tsconfig.json +0 -18
  28. package/demo/webpack.config.js +0 -50
  29. package/dist/components/Item/Item.d.ts +0 -10
  30. package/dist/components/Item/index.d.ts +0 -1
  31. package/dist/components/ItemList/ItemList.d.ts +0 -7
  32. package/dist/components/ItemList/index.d.ts +0 -1
  33. package/dist/components/Wrapper/Wrapper.d.ts +0 -7
  34. package/dist/components/Wrapper/index.d.ts +0 -1
  35. package/dist/components/constants.d.ts +0 -9
  36. package/dist/components/index.d.ts +0 -3
  37. package/dist/components/utils.d.ts +0 -1
  38. package/lib/components/Item/Item.tsx +0 -19
  39. package/lib/components/Item/index.ts +0 -1
  40. package/lib/components/ItemList/ItemList.tsx +0 -17
  41. package/lib/components/ItemList/index.ts +0 -1
  42. package/lib/components/Wrapper/Wrapper.tsx +0 -17
  43. package/lib/components/Wrapper/index.ts +0 -1
  44. package/lib/components/constants.ts +0 -49
  45. package/lib/components/index.ts +0 -3
  46. package/lib/components/utils.ts +0 -3
  47. package/lib/index.tsx +0 -356
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>
@@ -0,0 +1,58 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <code_scheme name="Project" version="173">
3
+ <HTMLCodeStyleSettings>
4
+ <option name="HTML_UNIFORM_INDENT" value="true" />
5
+ <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
6
+ <option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html" />
7
+ <option name="HTML_ENFORCE_QUOTES" value="true" />
8
+ </HTMLCodeStyleSettings>
9
+ <JSCodeStyleSettings version="0">
10
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
11
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
12
+ <option name="FORCE_QUOTE_STYlE" value="true" />
13
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
14
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
15
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
16
+ </JSCodeStyleSettings>
17
+ <TypeScriptCodeStyleSettings version="0">
18
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
19
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
20
+ <option name="FORCE_QUOTE_STYlE" value="true" />
21
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
22
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
23
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
24
+ <option name="SPACE_WITHIN_TYPE_ASSERTION" value="true" />
25
+ <option name="BLACKLIST_IMPORTS" value="rxjs/Rx" />
26
+ </TypeScriptCodeStyleSettings>
27
+ <codeStyleSettings language="HTML">
28
+ <option name="SOFT_MARGINS" value="80" />
29
+ <indentOptions>
30
+ <option name="INDENT_SIZE" value="2" />
31
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
32
+ <option name="TAB_SIZE" value="2" />
33
+ <option name="SMART_TABS" value="true" />
34
+ </indentOptions>
35
+ </codeStyleSettings>
36
+ <codeStyleSettings language="JavaScript">
37
+ <option name="SOFT_MARGINS" value="80" />
38
+ <indentOptions>
39
+ <option name="INDENT_SIZE" value="2" />
40
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
41
+ <option name="TAB_SIZE" value="2" />
42
+ </indentOptions>
43
+ </codeStyleSettings>
44
+ <codeStyleSettings language="TypeScript">
45
+ <option name="RIGHT_MARGIN" value="100" />
46
+ <option name="IF_BRACE_FORCE" value="3" />
47
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
48
+ <option name="WHILE_BRACE_FORCE" value="3" />
49
+ <option name="FOR_BRACE_FORCE" value="3" />
50
+ <option name="SOFT_MARGINS" value="80" />
51
+ <indentOptions>
52
+ <option name="INDENT_SIZE" value="2" />
53
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
54
+ <option name="TAB_SIZE" value="2" />
55
+ </indentOptions>
56
+ </codeStyleSettings>
57
+ </code_scheme>
58
+ </component>
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="DiscordProjectSettings">
4
+ <option name="show" value="PROJECT_FILES" />
5
+ <option name="description" value="" />
6
+ </component>
7
+ </project>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GitToolBoxProjectSettings">
4
+ <option name="commitMessageIssueKeyValidationOverride">
5
+ <BoolValueOverride>
6
+ <option name="enabled" value="true" />
7
+ </BoolValueOverride>
8
+ </option>
9
+ <option name="commitMessageValidationConfigOverride">
10
+ <CommitMessageValidationOverride>
11
+ <option name="enabled" value="true" />
12
+ </CommitMessageValidationOverride>
13
+ </option>
14
+ </component>
15
+ </project>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ </profile>
6
+ </component>
package/.idea/misc.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager">
4
+ <output url="file://$PROJECT_DIR$/out" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/best-react-pagination.iml" filepath="$PROJECT_DIR$/.idea/best-react-pagination.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="PrettierConfiguration">
4
+ <option name="myRunOnSave" value="true" />
5
+ </component>
6
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "best-react-pagination",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Pagination for work with React",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/demo/.babelrc DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "@babel/preset-env",
5
- {
6
- "modules": false
7
- }
8
- ],
9
- "@babel/preset-react"
10
- ],
11
- "plugins": [
12
- "react-hot-loader/babel"
13
- ]
14
- }
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <meta name="theme-color" content="#000000" />
7
- <meta
8
- name="description"
9
- content="Web site created using create-react-app"
10
- />
11
- <title>React App</title>
12
- </head>
13
- <body>
14
- <noscript>You need to enable JavaScript to run this app.</noscript>
15
- <div id="root"></div>
16
- </body>
17
- </html>
package/demo/src/App.tsx DELETED
@@ -1,24 +0,0 @@
1
- import React, { FC, useState } from "react";
2
- import { hot } from "react-hot-loader/root";
3
- import Pagination from "./Pagination";
4
-
5
- const App: FC = () => {
6
- const [index, setIndex] = useState(1);
7
- const totalPages = 10;
8
-
9
- console.log(`Current: ${index}. Total: ${totalPages}`);
10
-
11
- return (
12
- <>
13
- <Pagination
14
- paginationStart={1}
15
- currentIndex={index}
16
- setIndex={setIndex}
17
- totalPages={totalPages}
18
- isDefaultStyles={true}
19
- />
20
- </>
21
- );
22
- };
23
-
24
- export default hot(App);
@@ -1,19 +0,0 @@
1
- import React, { FC } from "react";
2
- import { defaultStyles, defaultStylesEnum } from "../constants";
3
-
4
- interface ItemProps {
5
- isDefaultStyles: boolean | undefined;
6
- itemClass: string;
7
- itemStyle: defaultStylesEnum;
8
- onClick?: () => void;
9
- }
10
-
11
- const Item: FC<ItemProps> = ({ isDefaultStyles, itemClass, itemStyle, onClick, children }) => {
12
- return (
13
- <li className={itemClass} style={isDefaultStyles ? defaultStyles[itemStyle] : undefined} onClick={onClick}>
14
- {children}
15
- </li>
16
- );
17
- };
18
-
19
- export default Item;
@@ -1 +0,0 @@
1
- export { default } from "./Item";
@@ -1,17 +0,0 @@
1
- import React, { FC } from "react";
2
- import { defaultStyles } from "../constants";
3
-
4
- interface ItemListProps {
5
- isDefaultStyles: boolean | undefined;
6
- itemListClass: string;
7
- }
8
-
9
- const ItemList: FC<ItemListProps> = ({ isDefaultStyles, itemListClass, children }) => {
10
- return (
11
- <ul className={itemListClass} style={isDefaultStyles ? defaultStyles.itemListClass : undefined}>
12
- {children}
13
- </ul>
14
- );
15
- };
16
-
17
- export default ItemList;
@@ -1 +0,0 @@
1
- export { default } from "./ItemList";
@@ -1,17 +0,0 @@
1
- import React, { FC } from "react";
2
- import { defaultStyles } from "../constants";
3
-
4
- interface WrapperProps {
5
- isDefaultStyles: boolean | undefined;
6
- wrapperClass: string;
7
- }
8
-
9
- const Wrapper: FC<WrapperProps> = ({ isDefaultStyles, wrapperClass, children }) => {
10
- return (
11
- <div className={wrapperClass} style={isDefaultStyles ? defaultStyles.wrapperClass : undefined}>
12
- {children}
13
- </div>
14
- );
15
- };
16
-
17
- export default Wrapper;
@@ -1 +0,0 @@
1
- export { default } from "./Wrapper";
@@ -1,49 +0,0 @@
1
- import React from "react";
2
-
3
- export enum defaultStylesEnum {
4
- wrapperClass = "wrapperClass",
5
- itemListClass = "itemListClass",
6
- itemClass = "itemClass",
7
- selectedItemClass = "selectedItemClass",
8
- disableItemClass = "disableItemClass",
9
- }
10
-
11
- export const defaultStyles: Record<defaultStylesEnum, React.CSSProperties> = {
12
- wrapperClass: {
13
- position: "sticky",
14
- display: "flex",
15
- justifyContent: "center",
16
- alignItems: "center",
17
- width: "100%",
18
- bottom: 0,
19
- },
20
- itemListClass: {
21
- padding: "10px 0",
22
- },
23
- itemClass: {
24
- display: "inline",
25
- cursor: "pointer",
26
- padding: "6px 12px",
27
- borderRadius: "4px",
28
- margin: "0 2px",
29
- backgroundColor: "#45c954",
30
- userSelect: "none",
31
- },
32
- selectedItemClass: {
33
- display: "inline",
34
- cursor: "pointer",
35
- padding: "6px 12px",
36
- borderRadius: "4px",
37
- margin: "0 2px",
38
- backgroundColor: "#48bbff",
39
- userSelect: "none",
40
- },
41
- disableItemClass: {
42
- display: "inline",
43
- cursor: "not-allowed",
44
- padding: "6px 12px",
45
- borderRadius: "4px",
46
- margin: "0 2px",
47
- userSelect: "none",
48
- },
49
- };
@@ -1,3 +0,0 @@
1
- export { default as Wrapper } from "./Wrapper";
2
- export { default as ItemList } from "./ItemList";
3
- export { default as Item } from "./Item";
@@ -1,3 +0,0 @@
1
- export const range = (count: number): Array<number> => {
2
- return [...Array(count).keys()].map((i) => i);
3
- };