@evergis/uilib-gl 1.0.1 → 1.0.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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Kirill Protasov
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Kirill Protasov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,98 +1,98 @@
1
- # 🛴 Evergis UI
2
- ## Contributing
3
-
4
- 🏆 **Before start:**
5
-
6
- ```
7
- yarn
8
- ```
9
- Update webstorm to >2017.3.3
10
-
11
- Install Styled Components plugin [Jetbrains plugins](https://plugins.jetbrains.com/plugin/9997-styled-components)
12
-
13
- 🛠️ **Start dev:**
14
-
15
- ```
16
- yarn storybook
17
- ```
18
-
19
- Open in browser localhost:6006
20
-
21
- ✅ **Start tests:**
22
-
23
- ```
24
- yarn test
25
- ```
26
-
27
- ## How to release
28
-
29
- 1. Создать временную ветку (например, `publish`)
30
- 2. Изменить версию пакета в `package.json`
31
- 3. `yarn` - освежить все зависимости
32
- 4. `yarn lint:fix` - автопоправка eslint ошибок
33
- 5. `yarn build` - сборка
34
- 6. `npm publish` - паблиш
35
- 7. Создать МР из временной ветки в `master`
36
-
37
- ## How to link
38
-
39
- For testing uilib locally in client (or other projects)
40
- without rebuilding after every update use linking:
41
-
42
- 1. `yarn build` - сборка
43
- 2. `yarn link` - создаём глобальную ссылку на uilib
44
- 3. Открываем client или другой проект
45
- 4. `yarn link "@evergis/uilib-gl"` - привязываем uilib к проекту
46
- 5. `yarn start` - запускаем проект с привязанной uilib
47
- 6. `yarn build` - после изменений в uilib делаем его пересборку
48
-
49
- ### How to manage icons
50
-
51
- 1. https://icomoon.io/app/#/projects
52
- 2. Import Project из `src/fonts/selection.json`
53
- 3. Load
54
- 4. Клик по гамбургер набора EverCloud в правом верхнем углу Import to Set
55
- 5. Generate Font в правом нижнем углу
56
- 6. Замена файлов `src/fonts` на загруженные из архива (папка fonts и selection.json)
57
-
58
- ## Used libraries, languages and tools
59
-
60
- 1. Typescript [Docs](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
61
- 2. React [Docs](https://reactjs.org/docs/hello-world.html)
62
- 3. Styled-components [Docs](https://www.styled-components.com/docs)
63
- 4. Jest [Docs](https://facebook.github.io/jest/docs/en/using-matchers.html)
64
- 6. Storybook [Docs](https://storybook.js.org/basics/writing-stories/)
65
-
66
- ## Style Guide
67
- 1. Every component in separate directory
68
- 2. Test file in same directory, with name *.test.tsx
69
- 3. Do not write snapshot tests for components, for snapshot testing used stories, test only specific behavior and functions
70
- 4. Story file in same directory, with name *.story.tsx
71
- 5. Write stories for every possible component state
72
- 6. Every component must be working without any props
73
- 7. Do not create pull request with any linters or ts errors
74
- 8. File naming convention:
75
-
76
- 1. PascalCase for file exporting classes and Components
77
- 2. camelCase for file exporting objects and functions
78
- 3. kebab-case for module replacements
79
- 9. Do not use default exports
80
- 10. Write component description in source file
81
-
82
- ### Completed Component must include the following:
83
- 1. Stories for every possible component state
84
- 2. Tests for specific behaviors and functions
85
- 3. Declared Theme variables
86
- 4. Props type
87
- 5. Component description
88
-
89
- ## Project structure
90
- 1. Import "styled-components" maps to styled-with-theme.ts
91
- 2. theme is theme folder 🚢
92
- 3. Simple reusable styled components and html tags with style are located in atoms folder
93
- 4. Groups of atoms are located in molecules folder
94
- 5. Groups of atoms, molecules and other are located in organisms folder
95
-
96
- ## Todo
97
- 1. Upgrade tippy (tooltip) package version
98
- 2. Upgrade imask & react-imask packages version
1
+ # 🛴 Evergis UI
2
+ ## Contributing
3
+
4
+ 🏆 **Before start:**
5
+
6
+ ```
7
+ yarn
8
+ ```
9
+ Update webstorm to >2017.3.3
10
+
11
+ Install Styled Components plugin [Jetbrains plugins](https://plugins.jetbrains.com/plugin/9997-styled-components)
12
+
13
+ 🛠️ **Start dev:**
14
+
15
+ ```
16
+ yarn storybook
17
+ ```
18
+
19
+ Open in browser localhost:6006
20
+
21
+ ✅ **Start tests:**
22
+
23
+ ```
24
+ yarn test
25
+ ```
26
+
27
+ ## How to release
28
+
29
+ 1. Создать временную ветку (например, `publish`)
30
+ 2. Изменить версию пакета в `package.json`
31
+ 3. `yarn` - освежить все зависимости
32
+ 4. `yarn lint:fix` - автопоправка eslint ошибок
33
+ 5. `yarn build` - сборка
34
+ 6. `npm publish` - паблиш
35
+ 7. Создать МР из временной ветки в `master`
36
+
37
+ ## How to link
38
+
39
+ For testing uilib locally in client (or other projects)
40
+ without rebuilding after every update use linking:
41
+
42
+ 1. `yarn build` - сборка
43
+ 2. `yarn link` - создаём глобальную ссылку на uilib
44
+ 3. Открываем client или другой проект
45
+ 4. `yarn link "@evergis/uilib-gl"` - привязываем uilib к проекту
46
+ 5. `yarn start` - запускаем проект с привязанной uilib
47
+ 6. `yarn build` - после изменений в uilib делаем его пересборку
48
+
49
+ ### How to manage icons
50
+
51
+ 1. https://icomoon.io/app/#/projects
52
+ 2. Import Project из `src/fonts/selection.json`
53
+ 3. Load
54
+ 4. Клик по гамбургер набора EverCloud в правом верхнем углу Import to Set
55
+ 5. Generate Font в правом нижнем углу
56
+ 6. Замена файлов `src/fonts` на загруженные из архива (папка fonts и selection.json)
57
+
58
+ ## Used libraries, languages and tools
59
+
60
+ 1. Typescript [Docs](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
61
+ 2. React [Docs](https://reactjs.org/docs/hello-world.html)
62
+ 3. Styled-components [Docs](https://www.styled-components.com/docs)
63
+ 4. Jest [Docs](https://facebook.github.io/jest/docs/en/using-matchers.html)
64
+ 6. Storybook [Docs](https://storybook.js.org/basics/writing-stories/)
65
+
66
+ ## Style Guide
67
+ 1. Every component in separate directory
68
+ 2. Test file in same directory, with name *.test.tsx
69
+ 3. Do not write snapshot tests for components, for snapshot testing used stories, test only specific behavior and functions
70
+ 4. Story file in same directory, with name *.story.tsx
71
+ 5. Write stories for every possible component state
72
+ 6. Every component must be working without any props
73
+ 7. Do not create pull request with any linters or ts errors
74
+ 8. File naming convention:
75
+
76
+ 1. PascalCase for file exporting classes and Components
77
+ 2. camelCase for file exporting objects and functions
78
+ 3. kebab-case for module replacements
79
+ 9. Do not use default exports
80
+ 10. Write component description in source file
81
+
82
+ ### Completed Component must include the following:
83
+ 1. Stories for every possible component state
84
+ 2. Tests for specific behaviors and functions
85
+ 3. Declared Theme variables
86
+ 4. Props type
87
+ 5. Component description
88
+
89
+ ## Project structure
90
+ 1. Import "styled-components" maps to styled-with-theme.ts
91
+ 2. theme is theme folder 🚢
92
+ 3. Simple reusable styled components and html tags with style are located in atoms folder
93
+ 4. Groups of atoms are located in molecules folder
94
+ 5. Groups of atoms, molecules and other are located in organisms folder
95
+
96
+ ## Todo
97
+ 1. Upgrade tippy (tooltip) package version
98
+ 2. Upgrade imask & react-imask packages version
@@ -10,6 +10,7 @@ export interface IIconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement
10
10
  onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
11
11
  icon?: ReactNode;
12
12
  iconRight?: boolean;
13
+ active?: boolean;
13
14
  }
14
15
  export interface IconButtonProps {
15
16
  disabled?: boolean;
@@ -19,4 +20,5 @@ export interface IconButtonProps {
19
20
  error?: boolean;
20
21
  notFixedWidth?: boolean;
21
22
  iconRight?: boolean;
23
+ active?: boolean;
22
24
  }