@moosend/mooskin 1.1.2 → 1.1.4-beta
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 +21 -21
- package/README-legacy.md +212 -0
- package/README.md +1 -1
- package/lib/ActionsDropdown/ActionsDropdown.d.ts +6 -6
- package/lib/ActionsDropdown/model.d.ts +12 -12
- package/lib/ActionsDropdown/styles.d.ts +10 -10
- package/lib/Alert/Alert.d.ts +8 -8
- package/lib/Alert/model.d.ts +5 -5
- package/lib/Alert/styles.d.ts +8 -8
- package/lib/Anchor/Anchor.d.ts +3 -3
- package/lib/Anchor/model.d.ts +4 -4
- package/lib/Anchor/styles.d.ts +3 -3
- package/lib/Box/Box.d.ts +3 -3
- package/lib/Box/model.d.ts +120 -120
- package/lib/Box/resources.d.ts +9 -9
- package/lib/Box/styles.d.ts +8 -8
- package/lib/Button/Button.d.ts +7 -7
- package/lib/Button/model.d.ts +6 -6
- package/lib/Button/styles.d.ts +7 -7
- package/lib/Carousel/Carousel.d.ts +7 -7
- package/lib/Carousel/model.d.ts +33 -33
- package/lib/Carousel/styles.d.ts +4 -4
- package/lib/Checkbox/Checkbox.d.ts +8 -8
- package/lib/Checkbox/model.d.ts +13 -13
- package/lib/Checkbox/styles.d.ts +6 -6
- package/lib/DatePicker/DatePicker.d.ts +3 -3
- package/lib/DatePicker/model.d.ts +16 -18
- package/lib/DateRange/DateRange.d.ts +5 -5
- package/lib/DateRange/model.d.ts +17 -17
- package/lib/DateRange/styles.d.ts +3 -3
- package/lib/DateSelect/DateSelect.d.ts +3 -3
- package/lib/DateSelect/model.d.ts +7 -7
- package/lib/DateTimePicker/DateTimePicker.d.ts +3 -3
- package/lib/DateTimePicker/model.d.ts +11 -13
- package/lib/Description/Description.d.ts +3 -3
- package/lib/Description/styles.d.ts +3 -3
- package/lib/Drawer/Drawer.d.ts +10 -10
- package/lib/Drawer/model.d.ts +21 -21
- package/lib/Drawer/styles.d.ts +25 -25
- package/lib/Expandable/Expandable.d.ts +9 -9
- package/lib/Expandable/model.d.ts +13 -13
- package/lib/Expandable/styles.d.ts +9 -9
- package/lib/Footer/Footer.d.ts +6 -6
- package/lib/Footer/styles.d.ts +7 -7
- package/lib/Grid/Grid.d.ts +5 -5
- package/lib/Grid/model.d.ts +18 -18
- package/lib/Grid/styles.d.ts +5 -5
- package/lib/IconButton/IconButton.d.ts +3 -3
- package/lib/IconButton/model.d.ts +4 -4
- package/lib/IconButton/styles.d.ts +3 -3
- package/lib/Image/Image.d.ts +3 -3
- package/lib/Image/styles.d.ts +2 -2
- package/lib/Input/Input.d.ts +12 -12
- package/lib/Input/model.d.ts +30 -30
- package/lib/Input/styles.d.ts +13 -13
- package/lib/Label/Label.d.ts +3 -3
- package/lib/Label/{Model.d.ts → model.d.ts} +5 -5
- package/lib/Label/styles.d.ts +3 -3
- package/lib/Layout/Layout.d.ts +3 -3
- package/lib/Layout/model.d.ts +5 -5
- package/lib/Layout/styles.d.ts +3 -3
- package/lib/List/List.d.ts +8 -8
- package/lib/List/styles.d.ts +7 -7
- package/lib/Loader/Loader.d.ts +3 -3
- package/lib/Loader/model.d.ts +5 -5
- package/lib/Loader/styles.d.ts +4 -4
- package/lib/LoadingBar/LoadingBar.d.ts +3 -3
- package/lib/LoadingBar/model.d.ts +7 -7
- package/lib/LoadingBar/styles.d.ts +3 -3
- package/lib/Modal/Modal.d.ts +10 -10
- package/lib/Modal/model.d.ts +15 -15
- package/lib/Modal/styles.d.ts +14 -14
- package/lib/NumberLabel/NumberLabel.d.ts +3 -3
- package/lib/NumberLabel/model.d.ts +7 -7
- package/lib/Pagination/Pagination.d.ts +4 -4
- package/lib/Pagination/model.d.ts +12 -12
- package/lib/Pagination/styles.d.ts +6 -6
- package/lib/Radio/Radio.d.ts +8 -8
- package/lib/Radio/model.d.ts +14 -14
- package/lib/Radio/styles.d.ts +6 -6
- package/lib/Select/Select.d.ts +14 -14
- package/lib/Select/model.d.ts +25 -25
- package/lib/Select/styles.d.ts +17 -17
- package/lib/Selector/Selector.d.ts +4 -4
- package/lib/Selector/model.d.ts +10 -10
- package/lib/Selector/styles.d.ts +4 -4
- package/lib/Sidemenu/Sidemenu.d.ts +4 -4
- package/lib/Sidemenu/model.d.ts +10 -10
- package/lib/Sidemenu/styles.d.ts +4 -4
- package/lib/Skeleton/Skeleton.d.ts +5 -5
- package/lib/Skeleton/model.d.ts +14 -14
- package/lib/Skeleton/styles.d.ts +6 -6
- package/lib/Slider/{model.d.ts → Model.d.ts} +7 -7
- package/lib/Slider/Slider.d.ts +3 -3
- package/lib/Slider/styles.d.ts +3 -3
- package/lib/Stack/Stack.d.ts +5 -5
- package/lib/Stack/model.d.ts +6 -6
- package/lib/Stack/styles.d.ts +3 -3
- package/lib/Steps/Steps.d.ts +6 -6
- package/lib/Steps/model.d.ts +16 -16
- package/lib/Steps/styles.d.ts +7 -7
- package/lib/Styled/GlobalStyles.d.ts +1 -1
- package/lib/Styled/MooskinContextProvider.d.ts +6 -6
- package/lib/Styled/model.d.ts +193 -189
- package/lib/Switch/Switch.d.ts +4 -4
- package/lib/Switch/model.d.ts +16 -16
- package/lib/Switch/styles.d.ts +7 -7
- package/lib/Table/Table.d.ts +7 -7
- package/lib/Table/styles.d.ts +7 -7
- package/lib/Tabs/Tabs.d.ts +6 -6
- package/lib/Tabs/model.d.ts +13 -13
- package/lib/Tabs/styles.d.ts +6 -6
- package/lib/Tags/Tags.d.ts +8 -8
- package/lib/Tags/model.d.ts +20 -20
- package/lib/Tags/styles.d.ts +8 -8
- package/lib/Text/Text.d.ts +3 -3
- package/lib/Text/model.d.ts +4 -4
- package/lib/Text/styles.d.ts +3 -3
- package/lib/TextArea/TextArea.d.ts +3 -3
- package/lib/TextArea/model.d.ts +4 -4
- package/lib/TextArea/styles.d.ts +2 -2
- package/lib/TextEditor/TextEditor.d.ts +3 -3
- package/lib/TextEditor/model.d.ts +15 -15
- package/lib/_utils/adapter.d.ts +1 -1
- package/lib/_utils/globals/locales.d.ts +20 -0
- package/lib/_utils/globals/screens.d.ts +29 -29
- package/lib/_utils/globals/variables.d.ts +3 -3
- package/lib/_utils/helper.d.ts +103 -103
- package/lib/_utils/index.d.ts +3 -3
- package/lib/_utils/types/commonTypes.d.ts +4 -4
- package/lib/components/ActionsDropdown/ActionsDropdown.d.ts +6 -6
- package/lib/components/ActionsDropdown/model.d.ts +12 -12
- package/lib/components/ActionsDropdown/styles.d.ts +10 -10
- package/lib/components/Alert/Alert.d.ts +8 -8
- package/lib/components/Alert/model.d.ts +5 -5
- package/lib/components/Alert/styles.d.ts +8 -8
- package/lib/components/Anchor/Anchor.d.ts +3 -3
- package/lib/components/Anchor/model.d.ts +4 -4
- package/lib/components/Anchor/styles.d.ts +3 -3
- package/lib/components/Box/Box.d.ts +3 -3
- package/lib/components/Box/model.d.ts +120 -120
- package/lib/components/Box/resources.d.ts +9 -9
- package/lib/components/Box/styles.d.ts +8 -8
- package/lib/components/Button/Button.d.ts +7 -7
- package/lib/components/Button/model.d.ts +6 -6
- package/lib/components/Button/styles.d.ts +7 -7
- package/lib/components/Carousel/Carousel.d.ts +7 -7
- package/lib/components/Carousel/model.d.ts +33 -33
- package/lib/components/Carousel/styles.d.ts +4 -4
- package/lib/components/Checkbox/Checkbox.d.ts +8 -8
- package/lib/components/Checkbox/model.d.ts +13 -13
- package/lib/components/Checkbox/styles.d.ts +6 -6
- package/lib/components/DatePicker/DatePicker.d.ts +3 -3
- package/lib/components/DatePicker/model.d.ts +16 -18
- package/lib/components/DateRange/DateRange.d.ts +5 -5
- package/lib/components/DateRange/model.d.ts +17 -17
- package/lib/components/DateRange/styles.d.ts +3 -3
- package/lib/components/DateSelect/DateSelect.d.ts +3 -3
- package/lib/components/DateSelect/model.d.ts +7 -7
- package/lib/components/DateTimePicker/DateTimePicker.d.ts +3 -3
- package/lib/components/DateTimePicker/model.d.ts +11 -13
- package/lib/components/Description/Description.d.ts +3 -3
- package/lib/components/Description/styles.d.ts +3 -3
- package/lib/components/Drawer/Drawer.d.ts +10 -10
- package/lib/components/Drawer/model.d.ts +21 -21
- package/lib/components/Drawer/styles.d.ts +25 -25
- package/lib/components/Expandable/Expandable.d.ts +9 -9
- package/lib/components/Expandable/model.d.ts +13 -13
- package/lib/components/Expandable/styles.d.ts +9 -9
- package/lib/components/Footer/Footer.d.ts +6 -6
- package/lib/components/Footer/styles.d.ts +7 -7
- package/lib/components/Grid/Grid.d.ts +5 -5
- package/lib/components/Grid/model.d.ts +18 -18
- package/lib/components/Grid/styles.d.ts +5 -5
- package/lib/components/IconButton/IconButton.d.ts +3 -3
- package/lib/components/IconButton/model.d.ts +4 -4
- package/lib/components/IconButton/styles.d.ts +3 -3
- package/lib/components/Image/Image.d.ts +3 -3
- package/lib/components/Image/styles.d.ts +2 -2
- package/lib/components/Input/Input.d.ts +12 -12
- package/lib/components/Input/model.d.ts +30 -30
- package/lib/components/Input/styles.d.ts +13 -13
- package/lib/components/Label/Label.d.ts +3 -3
- package/lib/components/Label/model.d.ts +5 -5
- package/lib/components/Label/styles.d.ts +3 -3
- package/lib/components/Layout/Layout.d.ts +3 -3
- package/lib/components/Layout/model.d.ts +5 -5
- package/lib/components/Layout/styles.d.ts +3 -3
- package/lib/components/List/List.d.ts +8 -8
- package/lib/components/List/styles.d.ts +7 -7
- package/lib/components/Loader/Loader.d.ts +3 -3
- package/lib/components/Loader/model.d.ts +5 -5
- package/lib/components/Loader/styles.d.ts +4 -4
- package/lib/components/LoadingBar/LoadingBar.d.ts +3 -3
- package/lib/components/LoadingBar/model.d.ts +7 -7
- package/lib/components/LoadingBar/styles.d.ts +3 -3
- package/lib/components/Modal/Modal.d.ts +10 -10
- package/lib/components/Modal/model.d.ts +15 -15
- package/lib/components/Modal/styles.d.ts +14 -14
- package/lib/components/NumberLabel/NumberLabel.d.ts +3 -3
- package/lib/components/NumberLabel/model.d.ts +7 -7
- package/lib/components/Pagination/Pagination.d.ts +4 -4
- package/lib/components/Pagination/model.d.ts +12 -12
- package/lib/components/Pagination/styles.d.ts +6 -6
- package/lib/components/Radio/Radio.d.ts +8 -8
- package/lib/components/Radio/model.d.ts +14 -14
- package/lib/components/Radio/styles.d.ts +6 -6
- package/lib/components/Select/Select.d.ts +14 -14
- package/lib/components/Select/model.d.ts +25 -25
- package/lib/components/Select/styles.d.ts +17 -17
- package/lib/components/Selector/Selector.d.ts +4 -4
- package/lib/components/Selector/model.d.ts +10 -10
- package/lib/components/Selector/styles.d.ts +4 -4
- package/lib/components/Sidemenu/Sidemenu.d.ts +4 -4
- package/lib/components/Sidemenu/model.d.ts +10 -10
- package/lib/components/Sidemenu/styles.d.ts +4 -4
- package/lib/components/Skeleton/Skeleton.d.ts +5 -5
- package/lib/components/Skeleton/model.d.ts +14 -14
- package/lib/components/Skeleton/styles.d.ts +6 -6
- package/lib/components/Slider/Model.d.ts +7 -7
- package/lib/components/Slider/Slider.d.ts +3 -3
- package/lib/components/Slider/styles.d.ts +3 -3
- package/lib/components/Stack/Stack.d.ts +5 -5
- package/lib/components/Stack/model.d.ts +6 -6
- package/lib/components/Stack/styles.d.ts +3 -3
- package/lib/components/Steps/Steps.d.ts +6 -6
- package/lib/components/Steps/model.d.ts +16 -16
- package/lib/components/Steps/styles.d.ts +7 -7
- package/lib/components/Styled/GlobalStyles.d.ts +1 -1
- package/lib/components/Styled/MooskinContextProvider.d.ts +6 -6
- package/lib/components/Styled/model.d.ts +193 -189
- package/lib/components/Switch/Switch.d.ts +4 -4
- package/lib/components/Switch/model.d.ts +16 -16
- package/lib/components/Switch/styles.d.ts +7 -7
- package/lib/components/Table/Table.d.ts +7 -7
- package/lib/components/Table/styles.d.ts +7 -7
- package/lib/components/Tabs/Tabs.d.ts +6 -6
- package/lib/components/Tabs/model.d.ts +13 -13
- package/lib/components/Tabs/styles.d.ts +6 -6
- package/lib/components/Tags/Tags.d.ts +8 -8
- package/lib/components/Tags/model.d.ts +20 -20
- package/lib/components/Tags/styles.d.ts +8 -8
- package/lib/components/Text/Text.d.ts +3 -3
- package/lib/components/Text/model.d.ts +4 -4
- package/lib/components/Text/styles.d.ts +3 -3
- package/lib/components/TextArea/TextArea.d.ts +3 -3
- package/lib/components/TextArea/model.d.ts +4 -4
- package/lib/components/TextArea/styles.d.ts +2 -2
- package/lib/components/TextEditor/TextEditor.d.ts +3 -3
- package/lib/components/TextEditor/model.d.ts +15 -15
- package/lib/components/_utils/adapter.d.ts +1 -1
- package/lib/components/_utils/globals/locales.d.ts +20 -0
- package/lib/components/_utils/globals/screens.d.ts +29 -29
- package/lib/components/_utils/globals/variables.d.ts +3 -3
- package/lib/components/_utils/helper.d.ts +103 -103
- package/lib/components/_utils/index.d.ts +3 -3
- package/lib/components/_utils/types/commonTypes.d.ts +4 -4
- package/lib/components/index/index.d.ts +86 -86
- package/lib/index/index.d.ts +86 -86
- package/lib/index/index.js +9 -9
- package/lib/stories/ActionsDropdown.stories.d.ts +7 -7
- package/lib/stories/Alert.stories.d.ts +7 -7
- package/lib/stories/Anchor.stories.d.ts +6 -6
- package/lib/stories/Box.stories.d.ts +5 -5
- package/lib/stories/Button.stories.d.ts +8 -8
- package/lib/stories/Carousel.stories.d.ts +5 -5
- package/lib/stories/Checkbox.stories.d.ts +9 -9
- package/lib/stories/DatePicker.stories.d.ts +5 -5
- package/lib/stories/DateRange.stories.d.ts +5 -5
- package/lib/stories/DateSelect.stories.d.ts +10 -10
- package/lib/stories/DateTimePicker.stories.d.ts +5 -5
- package/lib/stories/Drawer.stories.d.ts +8 -8
- package/lib/stories/Expandable.stories.d.ts +5 -5
- package/lib/stories/Footer.stories.d.ts +5 -5
- package/lib/stories/Grid.stories.d.ts +5 -5
- package/lib/stories/IconButton.stories.d.ts +6 -6
- package/lib/stories/Input.stories.d.ts +7 -7
- package/lib/stories/Layout.stories.d.ts +5 -5
- package/lib/stories/List.stories.d.ts +6 -6
- package/lib/stories/Loader.stories.d.ts +5 -5
- package/lib/stories/LoadingBar.stories.d.ts +5 -5
- package/lib/stories/Modal.stories.d.ts +5 -5
- package/lib/stories/NumberLabel.stories.d.ts +11 -11
- package/lib/stories/Pagination.stories.d.ts +5 -5
- package/lib/stories/Radio.stories.d.ts +9 -9
- package/lib/stories/Select.stories.d.ts +8 -8
- package/lib/stories/Selector.stories.d.ts +5 -5
- package/lib/stories/Sidemenu.stories.d.ts +5 -5
- package/lib/stories/Skeleton.stories.d.ts +7 -7
- package/lib/stories/Slider.stories.d.ts +5 -5
- package/lib/stories/Stack.stories.d.ts +10 -10
- package/lib/stories/StackedTags.stories.d.ts +5 -5
- package/lib/stories/Steps.stories.d.ts +5 -5
- package/lib/stories/Switch.stories.d.ts +7 -7
- package/lib/stories/Table.stories.d.ts +5 -5
- package/lib/stories/Tabs.stories.d.ts +5 -5
- package/lib/stories/Tags.stories.d.ts +7 -7
- package/lib/stories/TextEditor.stories.d.ts +9 -9
- package/lib/stories/Textarea.stories.d.ts +6 -6
- package/package.json +126 -122
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Moosend
|
|
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
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Moosend
|
|
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
|
+
SOFTWARE.
|
package/README-legacy.md
ADDED
|
@@ -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)
|
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
WIP
|
|
1
|
+
WIP
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IBoxComponentProps } from '../Box/model';
|
|
3
|
-
import { IActionsDropdownComponentProps, IActionsDropdownItemComponentProps } from './model';
|
|
4
|
-
export declare const ActionsDropdown: React.FC<IActionsDropdownComponentProps>;
|
|
5
|
-
export declare const ActionsDropdownItem: React.FC<IActionsDropdownItemComponentProps>;
|
|
6
|
-
export declare const ActionsDropdownArrow: React.FC<IBoxComponentProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IBoxComponentProps } from '../Box/model';
|
|
3
|
+
import { IActionsDropdownComponentProps, IActionsDropdownItemComponentProps } from './model';
|
|
4
|
+
export declare const ActionsDropdown: React.FC<IActionsDropdownComponentProps>;
|
|
5
|
+
export declare const ActionsDropdownItem: React.FC<IActionsDropdownItemComponentProps>;
|
|
6
|
+
export declare const ActionsDropdownArrow: React.FC<IBoxComponentProps>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IInputCallbackData } from '../_utils/types/commonTypes';
|
|
3
|
-
import { IBoxComponentProps } from '../Box/model';
|
|
4
|
-
export interface IActionsDropdownComponentProps extends IBoxComponentProps {
|
|
5
|
-
isOpen?: boolean;
|
|
6
|
-
onClickItem?: (e: React.MouseEvent<HTMLElement>, data: IInputCallbackData) => void;
|
|
7
|
-
onClose?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
8
|
-
}
|
|
9
|
-
export interface IActionsDropdownItemComponentProps extends IBoxComponentProps {
|
|
10
|
-
dataLabel?: any;
|
|
11
|
-
value?: any;
|
|
12
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IInputCallbackData } from '../_utils/types/commonTypes';
|
|
3
|
+
import { IBoxComponentProps } from '../Box/model';
|
|
4
|
+
export interface IActionsDropdownComponentProps extends IBoxComponentProps {
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
onClickItem?: (e: React.MouseEvent<HTMLElement>, data: IInputCallbackData) => void;
|
|
7
|
+
onClose?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface IActionsDropdownItemComponentProps extends IBoxComponentProps {
|
|
10
|
+
dataLabel?: any;
|
|
11
|
+
value?: any;
|
|
12
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IBoxComponentProps } from '../index';
|
|
3
|
-
import { IActionsDropdownComponentProps, IActionsDropdownItemComponentProps } from './model';
|
|
4
|
-
export declare const StyledActionsDropdown: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownComponentProps, never>;
|
|
5
|
-
export declare const StyledActionsDropdownFadeIn: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownComponentProps, never>;
|
|
6
|
-
export declare const StyledActionsDropdownFadeOut: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownComponentProps, never>;
|
|
7
|
-
export declare const StyledActionsDropdownItem: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownItemComponentProps, never>;
|
|
8
|
-
export declare const StyledActionsDropdownArrow: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, import("../index").IBaseBoxComponentProps & import("react").HTMLAttributes<HTMLElement>, never>;
|
|
9
|
-
export declare const StyledActionsDropdownButtonClose: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, import("../index").IBaseBoxComponentProps & import("react").HTMLAttributes<HTMLElement>, never>;
|
|
10
|
-
export declare const StyledActionDropdownOverlay: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, import("../index").IBaseBoxComponentProps & import("react").HTMLAttributes<HTMLElement>, never>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IBoxComponentProps } from '../index';
|
|
3
|
+
import { IActionsDropdownComponentProps, IActionsDropdownItemComponentProps } from './model';
|
|
4
|
+
export declare const StyledActionsDropdown: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownComponentProps, never>;
|
|
5
|
+
export declare const StyledActionsDropdownFadeIn: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownComponentProps, never>;
|
|
6
|
+
export declare const StyledActionsDropdownFadeOut: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownComponentProps, never>;
|
|
7
|
+
export declare const StyledActionsDropdownItem: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, IActionsDropdownItemComponentProps, never>;
|
|
8
|
+
export declare const StyledActionsDropdownArrow: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, import("../index").IBaseBoxComponentProps & import("react").HTMLAttributes<HTMLElement>, never>;
|
|
9
|
+
export declare const StyledActionsDropdownButtonClose: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, import("../index").IBaseBoxComponentProps & import("react").HTMLAttributes<HTMLElement>, never>;
|
|
10
|
+
export declare const StyledActionDropdownOverlay: import("styled-components").StyledComponent<import("react").FC<IBoxComponentProps>, any, import("../index").IBaseBoxComponentProps & import("react").HTMLAttributes<HTMLElement>, never>;
|
package/lib/Alert/Alert.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IBaseAlertComponentProps } from './model';
|
|
3
|
-
export declare const Alert: React.FC<IBaseAlertComponentProps>;
|
|
4
|
-
export declare const AlertIcon: React.FC<IBaseAlertComponentProps>;
|
|
5
|
-
export declare const AlertTitle: React.FC<IBaseAlertComponentProps>;
|
|
6
|
-
export declare const AlertDescription: React.FC<IBaseAlertComponentProps>;
|
|
7
|
-
export declare const AlertCloseButton: React.FC<IBaseAlertComponentProps>;
|
|
8
|
-
export declare const AlertButton: React.FC<IBaseAlertComponentProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IBaseAlertComponentProps } from './model';
|
|
3
|
+
export declare const Alert: React.FC<IBaseAlertComponentProps>;
|
|
4
|
+
export declare const AlertIcon: React.FC<IBaseAlertComponentProps>;
|
|
5
|
+
export declare const AlertTitle: React.FC<IBaseAlertComponentProps>;
|
|
6
|
+
export declare const AlertDescription: React.FC<IBaseAlertComponentProps>;
|
|
7
|
+
export declare const AlertCloseButton: React.FC<IBaseAlertComponentProps>;
|
|
8
|
+
export declare const AlertButton: React.FC<IBaseAlertComponentProps>;
|
package/lib/Alert/model.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IBoxComponentProps } from '../Box/model';
|
|
2
|
-
export interface IBaseAlertComponentProps extends IBoxComponentProps {
|
|
3
|
-
status?: 'info' | 'warning' | 'success' | 'error';
|
|
4
|
-
variant?: 'subtle' | 'solid' | 'left-accent' | 'top-accent';
|
|
5
|
-
}
|
|
1
|
+
import { IBoxComponentProps } from '../Box/model';
|
|
2
|
+
export interface IBaseAlertComponentProps extends IBoxComponentProps {
|
|
3
|
+
status?: 'info' | 'warning' | 'success' | 'error';
|
|
4
|
+
variant?: 'subtle' | 'solid' | 'left-accent' | 'top-accent';
|
|
5
|
+
}
|
package/lib/Alert/styles.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IBaseAlertComponentProps } from './model';
|
|
3
|
-
export declare const StyledAlert: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
4
|
-
export declare const StyledAlertButton: import("styled-components").StyledComponent<import("react").FC<import("../index").IButtonComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
5
|
-
export declare const StyledAlertTitle: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
6
|
-
export declare const StyledAlertDescription: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
7
|
-
export declare const StyledAlertIcon: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
8
|
-
export declare const StyledAlertCloseButton: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IBaseAlertComponentProps } from './model';
|
|
3
|
+
export declare const StyledAlert: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
4
|
+
export declare const StyledAlertButton: import("styled-components").StyledComponent<import("react").FC<import("../index").IButtonComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
5
|
+
export declare const StyledAlertTitle: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
6
|
+
export declare const StyledAlertDescription: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
7
|
+
export declare const StyledAlertIcon: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
|
8
|
+
export declare const StyledAlertCloseButton: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IBaseAlertComponentProps, never>;
|
package/lib/Anchor/Anchor.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IAnchorComponentProps } from './model';
|
|
3
|
-
export declare const Anchor: React.FC<IAnchorComponentProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IAnchorComponentProps } from './model';
|
|
3
|
+
export declare const Anchor: React.FC<IAnchorComponentProps>;
|
package/lib/Anchor/model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAnchorBoxComponentProps } from '../Box/model';
|
|
2
|
-
export interface IAnchorComponentProps extends IAnchorBoxComponentProps {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
}
|
|
1
|
+
import { IAnchorBoxComponentProps } from '../Box/model';
|
|
2
|
+
export interface IAnchorComponentProps extends IAnchorBoxComponentProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
}
|
package/lib/Anchor/styles.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IAnchorComponentProps } from './model';
|
|
3
|
-
export declare const StyledAnchor: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IAnchorComponentProps, never>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IAnchorComponentProps } from './model';
|
|
3
|
+
export declare const StyledAnchor: import("styled-components").StyledComponent<import("react").FC<import("../index").IBoxComponentProps>, any, IAnchorComponentProps, never>;
|
package/lib/Box/Box.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IBoxComponentProps } from './model';
|
|
3
|
-
export declare const Box: React.FC<IBoxComponentProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IBoxComponentProps } from './model';
|
|
3
|
+
export declare const Box: React.FC<IBoxComponentProps>;
|