@moosend/mooskin 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.
Files changed (146) hide show
  1. package/README-legacy.md +212 -0
  2. package/lib/Description/model.d.ts +4 -0
  3. package/lib/Drawer/styles.d.ts +1 -1
  4. package/lib/Styled/model.d.ts +12 -0
  5. package/lib/assets/font-awesome/webfonts/fa-duotone-900.ttf +0 -0
  6. package/lib/assets/font-awesome/webfonts/fa-light-300.ttf +0 -0
  7. package/lib/assets/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  8. package/lib/assets/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  9. package/lib/assets/font-awesome/webfonts/fa-thin-100.ttf +0 -0
  10. package/lib/components/Styled/model.d.ts +0 -15
  11. package/lib/index/index.js +6 -6
  12. package/package.json +1 -1
  13. package/lib/Button/index.d.ts +0 -2
  14. package/lib/Button/index.js +0 -1
  15. package/lib/Button/style.css +0 -1
  16. package/lib/Carousel/index.d.ts +0 -2
  17. package/lib/Carousel/index.js +0 -12
  18. package/lib/Carousel/style.css +0 -326
  19. package/lib/CheckListItem/CheckListItem.d.ts +0 -24
  20. package/lib/CheckListItem/index.d.ts +0 -2
  21. package/lib/CheckListItem/index.js +0 -1
  22. package/lib/CheckListItem/style.css +0 -5
  23. package/lib/Checkbox/index.d.ts +0 -3
  24. package/lib/Checkbox/index.js +0 -1
  25. package/lib/Checkbox/style.css +0 -14
  26. package/lib/ClipboardButton/ClipboardButton.d.ts +0 -19
  27. package/lib/ClipboardButton/index.d.ts +0 -2
  28. package/lib/ClipboardButton/index.js +0 -1
  29. package/lib/ClipboardButton/style.css +0 -1
  30. package/lib/DatePicker/index.d.ts +0 -3
  31. package/lib/DatePicker/index.js +0 -12
  32. package/lib/DatePicker/style.css +0 -7
  33. package/lib/DateRange/index.d.ts +0 -2
  34. package/lib/DateRange/index.js +0 -12
  35. package/lib/DateRange/style.css +0 -19
  36. package/lib/Fieldset/Fieldset.d.ts +0 -16
  37. package/lib/Fieldset/index.d.ts +0 -2
  38. package/lib/Fieldset/index.js +0 -1
  39. package/lib/Fieldset/style.css +0 -2
  40. package/lib/File/FileUpload.d.ts +0 -43
  41. package/lib/File/index.d.ts +0 -2
  42. package/lib/File/index.js +0 -1
  43. package/lib/File/style.css +0 -1
  44. package/lib/Form/Form.d.ts +0 -36
  45. package/lib/Form/index.d.ts +0 -3
  46. package/lib/Form/index.js +0 -1
  47. package/lib/Form/style.css +0 -1
  48. package/lib/Grid/index.d.ts +0 -4
  49. package/lib/Grid/index.js +0 -1
  50. package/lib/Grid/style.css +0 -1
  51. package/lib/Headings/H1/H1.d.ts +0 -11
  52. package/lib/Headings/H2/H2.d.ts +0 -11
  53. package/lib/Headings/H3/H3.d.ts +0 -11
  54. package/lib/Headings/H4/H4.d.ts +0 -11
  55. package/lib/Headings/H5/H5.d.ts +0 -11
  56. package/lib/Headings/H6/H6.d.ts +0 -11
  57. package/lib/Headings/index.d.ts +0 -6
  58. package/lib/Headings/index.js +0 -1
  59. package/lib/Headings/props.d.ts +0 -7
  60. package/lib/Headings/style.css +0 -12
  61. package/lib/HorizontalRangeBar/HorizontalRangeBar.d.ts +0 -25
  62. package/lib/HorizontalRangeBar/index.d.ts +0 -2
  63. package/lib/HorizontalRangeBar/index.js +0 -1
  64. package/lib/HorizontalRangeBar/style.css +0 -1
  65. package/lib/Input/index.d.ts +0 -2
  66. package/lib/Input/index.js +0 -1
  67. package/lib/Input/style.css +0 -465
  68. package/lib/Label/index.d.ts +0 -2
  69. package/lib/Label/index.js +0 -1
  70. package/lib/Label/style.css +0 -2
  71. package/lib/List/index.d.ts +0 -3
  72. package/lib/List/index.js +0 -1
  73. package/lib/List/style.css +0 -2
  74. package/lib/Loader/index.d.ts +0 -2
  75. package/lib/Loader/index.js +0 -1
  76. package/lib/Loader/style.css +0 -1
  77. package/lib/LoadingBar/index.d.ts +0 -2
  78. package/lib/LoadingBar/index.js +0 -1
  79. package/lib/LoadingBar/style.css +0 -1
  80. package/lib/Modal/index.d.ts +0 -2
  81. package/lib/Modal/index.js +0 -1
  82. package/lib/Modal/style.css +0 -15
  83. package/lib/Pagination/index.d.ts +0 -2
  84. package/lib/Pagination/index.js +0 -1
  85. package/lib/Pagination/style.css +0 -1
  86. package/lib/Radio/index.d.ts +0 -3
  87. package/lib/Radio/index.js +0 -1
  88. package/lib/Radio/style.css +0 -13
  89. package/lib/RadioAccordion/RadioAccordion.d.ts +0 -49
  90. package/lib/RadioAccordion/index.d.ts +0 -3
  91. package/lib/RadioAccordion/index.js +0 -1
  92. package/lib/RadioAccordion/style.css +0 -1
  93. package/lib/Select/index.d.ts +0 -3
  94. package/lib/Select/index.js +0 -1
  95. package/lib/Select/style.css +0 -2
  96. package/lib/SideBar/SideBar.d.ts +0 -79
  97. package/lib/SideBar/index.d.ts +0 -3
  98. package/lib/SideBar/index.js +0 -1
  99. package/lib/SideBar/style.css +0 -3
  100. package/lib/Slider/index.d.ts +0 -3
  101. package/lib/Slider/index.js +0 -1
  102. package/lib/Slider/style.css +0 -2
  103. package/lib/SmallIconButton/SmallIconButton.d.ts +0 -23
  104. package/lib/SmallIconButton/index.d.ts +0 -2
  105. package/lib/SmallIconButton/index.js +0 -1
  106. package/lib/SmallIconButton/style.css +0 -2
  107. package/lib/StatsBox/StatsBox.d.ts +0 -16
  108. package/lib/StatsBox/index.d.ts +0 -2
  109. package/lib/StatsBox/index.js +0 -1
  110. package/lib/StatsBox/style.css +0 -2
  111. package/lib/Steps/index.d.ts +0 -3
  112. package/lib/Steps/index.js +0 -1
  113. package/lib/Steps/style.css +0 -1
  114. package/lib/Switch/index.d.ts +0 -2
  115. package/lib/Switch/index.js +0 -1
  116. package/lib/Switch/style.css +0 -1
  117. package/lib/TabbedContent/TabbedContent.d.ts +0 -72
  118. package/lib/TabbedContent/index.d.ts +0 -3
  119. package/lib/TabbedContent/index.js +0 -1
  120. package/lib/TabbedContent/style.css +0 -4
  121. package/lib/Table/index.d.ts +0 -3
  122. package/lib/Table/index.js +0 -1
  123. package/lib/Table/style.css +0 -6
  124. package/lib/Tags/index.d.ts +0 -2
  125. package/lib/Tags/index.js +0 -1
  126. package/lib/Tags/style.css +0 -3
  127. package/lib/TextArea/index.d.ts +0 -2
  128. package/lib/TextArea/index.js +0 -1
  129. package/lib/TextArea/style.css +0 -1
  130. package/lib/TextEditor/index.d.ts +0 -2
  131. package/lib/TextEditor/index.js +0 -28
  132. package/lib/TextEditor/style.css +0 -852
  133. package/lib/TopNotification/TopNotification.d.ts +0 -27
  134. package/lib/TopNotification/index.d.ts +0 -2
  135. package/lib/TopNotification/index.js +0 -1
  136. package/lib/TopNotification/style.css +0 -2
  137. package/lib/Topbar/Topbar.d.ts +0 -23
  138. package/lib/Topbar/index.d.ts +0 -2
  139. package/lib/Topbar/index.js +0 -1
  140. package/lib/Topbar/style.css +0 -1
  141. package/lib/_utils/index.js +0 -1
  142. package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-brands-400.svg +0 -3717
  143. package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-duotone-900.svg +0 -15326
  144. package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-light-300.svg +0 -12420
  145. package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-regular-400.svg +0 -11323
  146. package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-solid-900.svg +0 -9653
@@ -0,0 +1,212 @@
1
+ <p align="center">
2
+ <img src="https://cdn.stat-track.com/20170803-2017-0803-2017-080320170803/ca5ad9249d284435955b75e1a22aa15cmooskinLogo.png" width="100" />
3
+ <div align="center">
4
+ <img src="https://travis-ci.org/moosend/mooskin-ui.svg?branch=master">
5
+ </div>
6
+ <h3 align="center">MooSkin</h3>
7
+ <p align="center">
8
+ A collection of React components with pre-defined styles for Moosend UI, at the moment very much a work in progress and a lot of things are subject to change.
9
+ </p>
10
+ ___
11
+
12
+ ### Demo
13
+
14
+ **[Component Playground...](https://mooskin.herokuapp.com/)**
15
+
16
+ ### Prerequisites
17
+
18
+ Since it is a React Component Library, we recommend that you get to know [React](https://facebook.github.io/react/) before using MooSkin. [Webpack](https://webpack.github.io/) is recommended as well, but any build tool that can handle importing css will work too.
19
+
20
+
21
+ ### Installation
22
+
23
+ MooSkin-UI is available as an npm package.
24
+
25
+ ```
26
+ npm install @moosend/mooskin --save
27
+ ```
28
+
29
+ ### Usage
30
+
31
+ Apart from [React](https://facebook.github.io/react/) itself, you need to be able to import the CSS file for the library by using a loader or some plugin for your build tool of choice(css-loader if you re using webpack, which is recommended).
32
+
33
+ ```
34
+ import '@moosend/mooskin/lib/index/style.css'
35
+ ```
36
+ and then you can simply import the desired component and start using it
37
+ ```
38
+ import {Input} from '@moosend/mooskin';
39
+ ```
40
+ Modular usage is also possible for both css and js(components) files, if you just want to use a few components, you should not have to import the whole CSS file, but instead have just what you need.
41
+
42
+ ```
43
+ import '@moosend/mooskin/lib/Button/style.css';
44
+ import Button from '@moosend/mooskin/lib/Button';
45
+ // import {Button} from '@moosend/mooskin'; //this works as well
46
+ ```
47
+
48
+ ### Example
49
+ ```
50
+ import '@moosend/mooskin/lib/index/style.css'
51
+
52
+ import React, {Component} from 'react';
53
+ import ReactDOM from 'react-dom';
54
+
55
+ import {Button} from '@moosend/mooskin';
56
+
57
+ class App extends Component (
58
+ render(){
59
+ return (
60
+ <div>
61
+ <Button>Click me!</Button>
62
+ </div>
63
+ );
64
+ }
65
+ );
66
+
67
+ ReactDOM.render(
68
+ <App />,
69
+ document.getElementById('app')
70
+ );
71
+ ```
72
+
73
+ Please refer to each component's documentation page to see how they should be imported.
74
+
75
+
76
+ ### Usage with Typescript
77
+
78
+ Mooskin itself is written in Typescript, so it has type definitions out of the box, no need to install any. Just import stuff as usual. Static types should greatly help with potential bugs and autocompletion. Here is an example below.
79
+
80
+ ```
81
+ import '@moosend/mooskin/lib/index/style.css'
82
+
83
+ import * as React from 'react';
84
+ import * as ReactDOM from 'react-dom';
85
+
86
+ import {Button} from '@moosend/mooskin';
87
+
88
+ interface IProps {
89
+ //some prop types
90
+ }
91
+
92
+ interface IState {
93
+ //some state types
94
+ }
95
+
96
+ class App extends React.Component<IProps, IState> (
97
+ render(){
98
+ return (
99
+ <div>
100
+ <Button>Click me!</Button>
101
+ <Button value="asdads">Click me!</Button> //compiler error because attribute 'value' does not exist in Button component
102
+ </div>
103
+ );
104
+ }
105
+ );
106
+
107
+ ReactDOM.render(
108
+ <App />,
109
+ document.getElementById('app')
110
+ );
111
+ ```
112
+
113
+ If the compiler complains about the css file import, you can add a type declaration for the css import in a declaration file(.d.ts) .You can place this file in the root folder, newer versions of Typescript will pick it up automatically, otherwise you would need a `///<reference path="..."/>` statement at the top of your index file.
114
+
115
+ ```
116
+ declare module '*.css' {
117
+ const content: any;
118
+ export default content;
119
+ }
120
+
121
+ ```
122
+
123
+ ### Other Examples
124
+
125
+ As you may have noticed, for easy use, the components are named similar to normal HTML components but with a capital first letter.
126
+
127
+ Lets say we want to use the Select Component. First we have to import it
128
+
129
+ ```
130
+ import {Select, Option} from '@moosend/mooskin';
131
+ ```
132
+
133
+ And then you can simply start using it by typing
134
+
135
+ ```
136
+ <Select dataLabel="countries" onChange={callback}>
137
+ <Option whatever>England</Option> //<Select.Option whatever>England</Option> //this works too
138
+ <Option whatever>Germany</Option>
139
+ </Select>
140
+ ```
141
+
142
+ The components are built to support attributes like normal HTML elements. For example, an Input component with a placeholder:
143
+
144
+ ```
145
+ import {Input} from '@moosend/mooskin'
146
+
147
+ <Input placeholder="Your Name" />
148
+ ```
149
+
150
+ ## List of Components
151
+
152
+ * [Button](https://github.com/moosend/mooskin-ui/tree/master/components/Button)
153
+ * [Carousel](https://github.com/moosend/mooskin-ui/tree/master/components/Carousel)
154
+ * [CheckBox](https://github.com/moosend/mooskin-ui/tree/master/components/Checkbox)
155
+ * [CheckListItem](https://github.com/moosend/mooskin-ui/tree/master/components/CheckListItem)
156
+ * [ClipboardButton](https://github.com/moosend/mooskin-ui/tree/master/components/ClipboardButton)
157
+ * [DatePicker](https://github.com/moosend/mooskin-ui/tree/master/components/DatePicker)
158
+ * [Fieldset](https://github.com/moosend/mooskin-ui/tree/master/components/Fieldset)
159
+ * [File](https://github.com/moosend/mooskin-ui/tree/master/components/File)
160
+ * [Form](https://github.com/moosend/mooskin-ui/tree/master/components/Form)
161
+ * [Grid](https://github.com/moosend/mooskin-ui/tree/master/components/Grid)
162
+ * [Headings](https://github.com/moosend/mooskin-ui/tree/master/components/Headings)
163
+ * [HorizontalRangeBar](https://github.com/moosend/mooskin-ui/tree/master/components/HorizontalRangeBar)
164
+ * [Input](https://github.com/moosend/mooskin-ui/tree/master/components/Input)
165
+ * [Label](https://github.com/moosend/mooskin-ui/tree/master/components/Label)
166
+ * [List](https://github.com/moosend/mooskin-ui/tree/master/components/List)
167
+ * [Loader](https://github.com/moosend/mooskin-ui/tree/master/components/Loader)
168
+ * [LoadingBar](https://github.com/moosend/mooskin-ui/tree/master/components/LoadingBar)
169
+ * [Modal](https://github.com/moosend/mooskin-ui/tree/master/components/Modal)
170
+ * [Pagination](https://github.com/moosend/mooskin-ui/tree/master/components/Pagination)
171
+ * [Radio](https://github.com/moosend/mooskin-ui/tree/master/components/Radio)
172
+ * [RadioAccordion](https://github.com/moosend/mooskin-ui/tree/master/components/RadioAccordion)
173
+ * [Select](https://github.com/moosend/mooskin-ui/tree/master/components/Select)
174
+ * [Sidebar](https://github.com/moosend/mooskin-ui/tree/master/components/Sidebar)
175
+ * [Slider](https://github.com/moosend/mooskin-ui/tree/master/components/Slider)
176
+ * [SmallIconButton](https://github.com/moosend/mooskin-ui/tree/master/components/SmallIconButton)
177
+ * [StatsBox](https://github.com/moosend/mooskin-ui/tree/master/components/StatsBox)
178
+ * [Steps](https://github.com/moosend/mooskin-ui/tree/master/components/Steps)
179
+ * [Switch](https://github.com/moosend/mooskin-ui/tree/master/components/Switch)
180
+ * [TabbedContent](https://github.com/moosend/mooskin-ui/tree/master/components/TabbedContent)
181
+ * [Table](https://github.com/moosend/mooskin-ui/tree/master/components/Table)
182
+ * [Tags](https://github.com/moosend/mooskin-ui/tree/master/components/Tags)
183
+ * [TextArea](https://github.com/moosend/mooskin-ui/tree/master/components/TextArea)
184
+ * [TextEditor](https://github.com/moosend/mooskin-ui/tree/master/components/TextEditor)
185
+ * [Topbar](https://github.com/moosend/mooskin-ui/tree/master/components/Topbar)
186
+ * [TopNotification](https://github.com/moosend/mooskin-ui/tree/master/components/TopNotification)
187
+
188
+ ## Playground (development)
189
+
190
+ Clone the [Mooskin](https://github.com/moosend/mooskin-ui) repository first. Then install dependencies with
191
+
192
+ ```
193
+ npm install
194
+ ```
195
+ or
196
+
197
+ ```
198
+ yarn install
199
+ ```
200
+
201
+ After installation run `start-development.bat` on the Mooskin root folder, wait for build to complete then go to `http://localhost:8080/`. Have fun playing with the components.
202
+
203
+ If you want to add a new component that is in development to the playground, create an example component in `/playground/examples/` which returns a component in development. Add the example to `/playground/App.tsx` and you're good to go.
204
+
205
+ ### Contribute
206
+
207
+ MooSkin-UI came to life because of the love for [React](https://facebook.github.io/react/), and if you share the same love, we'd greatly appreciate any [contribution](https://github.com/moosend/mooskin-ui/blob/master/CONTRIBUTING.md) you make.
208
+
209
+
210
+ ### License
211
+
212
+ This project is licensed under the terms of the [MIT License](https://github.com/moosend/mooskin-ui/blob/master/LICENSE)
@@ -0,0 +1,4 @@
1
+ import { IBoxComponentProps } from '../Box/model';
2
+ export interface IDescriptionComponentProps extends IBoxComponentProps {
3
+ children: string;
4
+ }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { IBoxComponentProps } from '../Box/model';
3
3
  import { IDrawerComponentProps, IDrawerContentComponentProps, IDrawerOverlayComponentProps } from './model';
4
- export declare const getContentSize: (size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined) => "80%" | "100%" | "20%" | "35%" | "50%" | "65%" | undefined;
4
+ export declare const getContentSize: (size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined) => "20%" | "35%" | "50%" | "65%" | "80%" | "100%" | undefined;
5
5
  export declare const StyledDrawer: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IDrawerComponentProps, never>;
6
6
  export declare const StyledDrawerContent: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IDrawerContentComponentProps, never>;
7
7
  export declare const StyledDrawerContentRight: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IDrawerContentComponentProps, never>;
@@ -13,6 +13,10 @@ export interface IThemeFontColors {
13
13
  white: string;
14
14
  altWhite: string;
15
15
  background: string;
16
+ blue400: string;
17
+ teal400: string;
18
+ pink400: string;
19
+ orange400: string;
16
20
  grayAlpha: string;
17
21
  grayAlpha100: string;
18
22
  grayAlpha400: string;
@@ -50,6 +54,10 @@ export interface IThemeBackgroundColors {
50
54
  white: string;
51
55
  altWhite: string;
52
56
  background: string;
57
+ blue400: string;
58
+ teal400: string;
59
+ pink400: string;
60
+ orange400: string;
53
61
  grayAlpha: string;
54
62
  grayAlpha100: string;
55
63
  grayAlpha400: string;
@@ -87,6 +95,10 @@ export interface IThemeBorderColors {
87
95
  white: string;
88
96
  altWhite: string;
89
97
  background: string;
98
+ blue400: string;
99
+ teal400: string;
100
+ pink400: string;
101
+ orange400: string;
90
102
  grayAlpha: string;
91
103
  grayAlpha100: string;
92
104
  grayAlpha400: string;
@@ -29,11 +29,6 @@ export interface IThemeFontColors {
29
29
  black: string;
30
30
  checkboxUnselected: string;
31
31
  dropdown: string;
32
- accountNavigation: string;
33
- submenu: string;
34
- autosExpression: string;
35
- client: string;
36
- createNew: string;
37
32
  }
38
33
  export interface IThemeBackgroundColors {
39
34
  primary1: string;
@@ -66,11 +61,6 @@ export interface IThemeBackgroundColors {
66
61
  black: string;
67
62
  checkboxUnselected: string;
68
63
  dropdown: string;
69
- accountNavigation: string;
70
- submenu: string;
71
- autosExpression: string;
72
- client: string;
73
- createNew: string;
74
64
  }
75
65
  export interface IThemeBorderColors {
76
66
  primary1: string;
@@ -103,11 +93,6 @@ export interface IThemeBorderColors {
103
93
  black: string;
104
94
  checkboxUnselected: string;
105
95
  dropdown: string;
106
- accountNavigation: string;
107
- submenu: string;
108
- autosExpression: string;
109
- client: string;
110
- createNew: string;
111
96
  }
112
97
  export interface IStyledTheme {
113
98
  fontColors: IThemeFontColors;