@moosend/mooskin 1.0.0-alpha.117 → 1.0.0-alpha.118
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/lib/Box/model.d.ts +2 -2
- package/lib/Box/styles.d.ts +1 -1
- package/lib/Description/model.d.ts +4 -0
- package/lib/Drawer/styles.d.ts +1 -1
- package/lib/Styled/model.d.ts +17 -0
- package/lib/assets/font-awesome/webfonts/fa-duotone-900.ttf +0 -0
- package/lib/assets/font-awesome/webfonts/fa-light-300.ttf +0 -0
- package/lib/assets/font-awesome/webfonts/fa-regular-400.ttf +0 -0
- package/lib/assets/font-awesome/webfonts/fa-solid-900.ttf +0 -0
- package/lib/assets/font-awesome/webfonts/fa-thin-100.ttf +0 -0
- package/lib/components/ActionsDropdown/ActionsDropdown.d.ts +1 -1
- package/lib/components/ActionsDropdown/model.d.ts +1 -0
- package/lib/components/ActionsDropdown/styles.d.ts +2 -0
- package/lib/components/Box/model.d.ts +5 -0
- package/lib/components/Box/resources.d.ts +9 -0
- package/lib/components/Button/Button.d.ts +1 -0
- package/lib/components/Button/model.d.ts +0 -1
- package/lib/components/Button/styles.d.ts +2 -2
- package/lib/components/Checkbox/model.d.ts +1 -0
- package/lib/components/Checkbox/styles.d.ts +2 -2
- package/lib/components/DateRange/styles.d.ts +3 -0
- package/lib/components/Drawer/styles.d.ts +1 -1
- package/lib/components/Pagination/model.d.ts +2 -0
- package/lib/components/Radio/model.d.ts +1 -0
- package/lib/components/Radio/styles.d.ts +2 -2
- package/lib/components/Select/Select.d.ts +2 -2
- package/lib/components/Select/model.d.ts +3 -1
- package/lib/components/Select/styles.d.ts +4 -2
- package/lib/components/Styled/model.d.ts +18 -0
- package/lib/components/Tags/Tags.d.ts +1 -0
- package/lib/components/index/index.d.ts +2 -2
- package/lib/index/index.js +6 -6
- package/lib/stories/Button.stories.d.ts +0 -1
- package/package.json +1 -1
- package/lib/Button/index.d.ts +0 -2
- package/lib/Button/index.js +0 -1
- package/lib/Button/style.css +0 -1
- package/lib/Carousel/index.d.ts +0 -2
- package/lib/Carousel/index.js +0 -12
- package/lib/Carousel/style.css +0 -326
- package/lib/CheckListItem/CheckListItem.d.ts +0 -24
- package/lib/CheckListItem/index.d.ts +0 -2
- package/lib/CheckListItem/index.js +0 -1
- package/lib/CheckListItem/style.css +0 -5
- package/lib/Checkbox/index.d.ts +0 -3
- package/lib/Checkbox/index.js +0 -1
- package/lib/Checkbox/style.css +0 -14
- package/lib/ClipboardButton/ClipboardButton.d.ts +0 -19
- package/lib/ClipboardButton/index.d.ts +0 -2
- package/lib/ClipboardButton/index.js +0 -1
- package/lib/ClipboardButton/style.css +0 -1
- package/lib/DatePicker/index.d.ts +0 -3
- package/lib/DatePicker/index.js +0 -12
- package/lib/DatePicker/style.css +0 -7
- package/lib/DateRange/index.d.ts +0 -2
- package/lib/DateRange/index.js +0 -12
- package/lib/DateRange/style.css +0 -19
- package/lib/Fieldset/Fieldset.d.ts +0 -16
- package/lib/Fieldset/index.d.ts +0 -2
- package/lib/Fieldset/index.js +0 -1
- package/lib/Fieldset/style.css +0 -2
- package/lib/File/FileUpload.d.ts +0 -43
- package/lib/File/index.d.ts +0 -2
- package/lib/File/index.js +0 -1
- package/lib/File/style.css +0 -1
- package/lib/Form/Form.d.ts +0 -36
- package/lib/Form/index.d.ts +0 -3
- package/lib/Form/index.js +0 -1
- package/lib/Form/style.css +0 -1
- package/lib/Grid/index.d.ts +0 -4
- package/lib/Grid/index.js +0 -1
- package/lib/Grid/style.css +0 -1
- package/lib/Headings/H1/H1.d.ts +0 -11
- package/lib/Headings/H2/H2.d.ts +0 -11
- package/lib/Headings/H3/H3.d.ts +0 -11
- package/lib/Headings/H4/H4.d.ts +0 -11
- package/lib/Headings/H5/H5.d.ts +0 -11
- package/lib/Headings/H6/H6.d.ts +0 -11
- package/lib/Headings/index.d.ts +0 -6
- package/lib/Headings/index.js +0 -1
- package/lib/Headings/props.d.ts +0 -7
- package/lib/Headings/style.css +0 -12
- package/lib/HorizontalRangeBar/HorizontalRangeBar.d.ts +0 -25
- package/lib/HorizontalRangeBar/index.d.ts +0 -2
- package/lib/HorizontalRangeBar/index.js +0 -1
- package/lib/HorizontalRangeBar/style.css +0 -1
- package/lib/Input/index.d.ts +0 -2
- package/lib/Input/index.js +0 -1
- package/lib/Input/style.css +0 -465
- package/lib/Label/index.d.ts +0 -2
- package/lib/Label/index.js +0 -1
- package/lib/Label/style.css +0 -2
- package/lib/List/index.d.ts +0 -3
- package/lib/List/index.js +0 -1
- package/lib/List/style.css +0 -2
- package/lib/Loader/index.d.ts +0 -2
- package/lib/Loader/index.js +0 -1
- package/lib/Loader/style.css +0 -1
- package/lib/LoadingBar/index.d.ts +0 -2
- package/lib/LoadingBar/index.js +0 -1
- package/lib/LoadingBar/style.css +0 -1
- package/lib/Modal/index.d.ts +0 -2
- package/lib/Modal/index.js +0 -1
- package/lib/Modal/style.css +0 -15
- package/lib/Pagination/index.d.ts +0 -2
- package/lib/Pagination/index.js +0 -1
- package/lib/Pagination/style.css +0 -1
- package/lib/Radio/index.d.ts +0 -3
- package/lib/Radio/index.js +0 -1
- package/lib/Radio/style.css +0 -13
- package/lib/RadioAccordion/RadioAccordion.d.ts +0 -49
- package/lib/RadioAccordion/index.d.ts +0 -3
- package/lib/RadioAccordion/index.js +0 -1
- package/lib/RadioAccordion/style.css +0 -1
- package/lib/Select/index.d.ts +0 -3
- package/lib/Select/index.js +0 -1
- package/lib/Select/style.css +0 -2
- package/lib/SideBar/SideBar.d.ts +0 -79
- package/lib/SideBar/index.d.ts +0 -3
- package/lib/SideBar/index.js +0 -1
- package/lib/SideBar/style.css +0 -3
- package/lib/Slider/index.d.ts +0 -3
- package/lib/Slider/index.js +0 -1
- package/lib/Slider/style.css +0 -2
- package/lib/SmallIconButton/SmallIconButton.d.ts +0 -23
- package/lib/SmallIconButton/index.d.ts +0 -2
- package/lib/SmallIconButton/index.js +0 -1
- package/lib/SmallIconButton/style.css +0 -2
- package/lib/StatsBox/StatsBox.d.ts +0 -16
- package/lib/StatsBox/index.d.ts +0 -2
- package/lib/StatsBox/index.js +0 -1
- package/lib/StatsBox/style.css +0 -2
- package/lib/Steps/index.d.ts +0 -3
- package/lib/Steps/index.js +0 -1
- package/lib/Steps/style.css +0 -1
- package/lib/Switch/index.d.ts +0 -2
- package/lib/Switch/index.js +0 -1
- package/lib/Switch/style.css +0 -1
- package/lib/TabbedContent/TabbedContent.d.ts +0 -72
- package/lib/TabbedContent/index.d.ts +0 -3
- package/lib/TabbedContent/index.js +0 -1
- package/lib/TabbedContent/style.css +0 -4
- package/lib/Table/index.d.ts +0 -3
- package/lib/Table/index.js +0 -1
- package/lib/Table/style.css +0 -6
- package/lib/Tags/index.d.ts +0 -2
- package/lib/Tags/index.js +0 -1
- package/lib/Tags/style.css +0 -3
- package/lib/TextArea/index.d.ts +0 -2
- package/lib/TextArea/index.js +0 -1
- package/lib/TextArea/style.css +0 -1
- package/lib/TextEditor/index.d.ts +0 -2
- package/lib/TextEditor/index.js +0 -28
- package/lib/TextEditor/style.css +0 -852
- package/lib/TopNotification/TopNotification.d.ts +0 -27
- package/lib/TopNotification/index.d.ts +0 -2
- package/lib/TopNotification/index.js +0 -1
- package/lib/TopNotification/style.css +0 -2
- package/lib/Topbar/Topbar.d.ts +0 -23
- package/lib/Topbar/index.d.ts +0 -2
- package/lib/Topbar/index.js +0 -1
- package/lib/Topbar/style.css +0 -1
- package/lib/_utils/index.js +0 -1
- package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-brands-400.svg +0 -3717
- package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-duotone-900.svg +0 -15326
- package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-light-300.svg +0 -12420
- package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-regular-400.svg +0 -11323
- package/lib/node_modules/@fortawesome/fontawesome-pro/webfonts/fa-solid-900.svg +0 -9653
package/lib/SideBar/SideBar.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IButtonProps } from '../Button/Button';
|
|
3
|
-
export interface ISideBarProps {
|
|
4
|
-
button?: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
buttonClass?: string;
|
|
7
|
-
buttonStyle?: React.CSSProperties;
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
|
-
hideClick?: boolean;
|
|
10
|
-
children?: Array<React.ReactElement<ISideBarItemProps>> | React.ReactElement<ISideBarItemProps> | Array<React.ReactElement<IButtonProps>> | React.ReactElement<IButtonProps>;
|
|
11
|
-
}
|
|
12
|
-
export interface ISideBarItemProps {
|
|
13
|
-
label?: string;
|
|
14
|
-
image?: string;
|
|
15
|
-
imageOn?: string;
|
|
16
|
-
active?: boolean;
|
|
17
|
-
activeSubMenu?: boolean;
|
|
18
|
-
className?: string;
|
|
19
|
-
style?: React.CSSProperties;
|
|
20
|
-
subMenuStyle?: React.CSSProperties;
|
|
21
|
-
subMenuClasses?: string;
|
|
22
|
-
subMenuFixed?: boolean;
|
|
23
|
-
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
24
|
-
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
25
|
-
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
26
|
-
children?: any;
|
|
27
|
-
}
|
|
28
|
-
export interface ISubMenuProps {
|
|
29
|
-
display?: boolean;
|
|
30
|
-
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
31
|
-
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
32
|
-
className?: string;
|
|
33
|
-
style?: React.CSSProperties;
|
|
34
|
-
children?: any;
|
|
35
|
-
}
|
|
36
|
-
export interface ISideBarState {
|
|
37
|
-
activeItem?: number;
|
|
38
|
-
display: boolean;
|
|
39
|
-
subMenuDisplay?: boolean;
|
|
40
|
-
smallDisplay?: boolean;
|
|
41
|
-
activeSecondary?: number;
|
|
42
|
-
activeSubMenu?: number;
|
|
43
|
-
smallActiveItem?: number;
|
|
44
|
-
}
|
|
45
|
-
export default class SideBar extends React.Component<ISideBarProps, ISideBarState> {
|
|
46
|
-
static defaultProps: {
|
|
47
|
-
className: string;
|
|
48
|
-
style: {};
|
|
49
|
-
};
|
|
50
|
-
static displayName: string;
|
|
51
|
-
static SidebarItem: React.StatelessComponent<ISideBarItemProps>;
|
|
52
|
-
static SubMenu: React.StatelessComponent<ISubMenuProps>;
|
|
53
|
-
constructor(props: ISideBarProps);
|
|
54
|
-
componentWillMount(): void;
|
|
55
|
-
render(): JSX.Element;
|
|
56
|
-
getInitialState: () => {
|
|
57
|
-
display: boolean;
|
|
58
|
-
smallDisplay: boolean;
|
|
59
|
-
};
|
|
60
|
-
getItems(): any;
|
|
61
|
-
checkChildrenType: (children: any) => boolean;
|
|
62
|
-
getNonSubMenuItems: (children: any) => any[];
|
|
63
|
-
initiateSubMenus: () => (JSX.Element | undefined)[];
|
|
64
|
-
getSubMenu: (item: React.ReactElement<ISideBarItemProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>, index: number) => JSX.Element | undefined;
|
|
65
|
-
displaySubMenu: (index: number) => boolean;
|
|
66
|
-
getSubMenuItems: (items: any) => JSX.Element | React.ReactElement<ISideBarItemProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[];
|
|
67
|
-
onClickButton: () => (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
68
|
-
onClickItem: (itemIndex: number, item: React.ReactElement<ISideBarItemProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>) => (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
69
|
-
onClickSecondary: (itemIndex: number, item: React.ReactElement<ISideBarItemProps, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>) => (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
70
|
-
getActiveItem(): number | undefined;
|
|
71
|
-
getCover: () => JSX.Element | undefined;
|
|
72
|
-
coverClasses: () => any;
|
|
73
|
-
getButton: () => JSX.Element;
|
|
74
|
-
toggle: () => void;
|
|
75
|
-
subMenuOn: (index?: number | undefined, subMenuFixed?: boolean | undefined) => ((e: React.MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
76
|
-
subMenuOff: () => void;
|
|
77
|
-
}
|
|
78
|
-
export declare const SidebarItem: React.StatelessComponent<ISideBarItemProps>;
|
|
79
|
-
export declare const SubMenu: React.StatelessComponent<ISubMenuProps>;
|
package/lib/SideBar/index.d.ts
DELETED
package/lib/SideBar/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("mooskin",["react"],t):"object"==typeof exports?exports.mooskin=t(require("react")):e.mooskin=t(e.react)}(this,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="../",n(n.s=311)}({0:function(t,n){t.exports=e},20:function(e,t,n){e.exports={sidebar:"sidebar___1SY4V",subMenu:"subMenu___2nAiz",subMenuFixed:"subMenuFixed___H7abC",subMenuOn:"subMenuOn___10Ypw",subMenuOff:"subMenuOff___3lI2w",sidebarOn:"sidebarOn___1rIan",sidebarOff:"sidebarOff___3jcIC",smallOn:"smallOn___9aM33",smallOff:"smallOff___nX-J6",smallSubOn:"smallSubOn___1Ww2L",smallSubOff:"smallSubOff___3142p",itemContainer:"itemContainer___UYyne",activeItem:"activeItem___2eKTg",image:"image___ZRtH8",button:"button___3eF9z",buttonOn:"buttonOn___33sgf",arrow:"arrow___16hSe",cover:"cover___1fKWy",coverOn:"coverOn___JANKh",coverSmall:"coverSmall___3t67d"}},311:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(20),a=n.n(r),s=n(49);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],o=!0,r=!1,a=void 0;try{for(var s,i=e[Symbol.iterator]();!(o=(s=i.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==i.return||i.return()}finally{if(r)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=u(this,p(t).call(this,e))).getInitialState=function(){return{display:!n.props.button,smallDisplay:!1}},n.checkChildrenType=function(e){var t=!1;return Array.isArray(e)?e.forEach(function(e){t=e.type===y||t}):t=e.type===y||t,t},n.getNonSubMenuItems=function(e){var t=[];return Array.isArray(e)&&e.forEach(function(e){e.type!==y&&t.push(e)}),t},n.initiateSubMenus=function(){return o.Children.map(n.props.children,function(e,t){if(o.isValidElement(e)&&e.props.children&&e.props.children.length>1&&e.type===y)return n.getSubMenu(e,t)})},n.getSubMenu=function(e,t){if(o.isValidElement(e)&&e.type===y){var r=e.props.children?e.props.children:[],s=!n.props.button&&e.props.subMenuFixed&&n.state.activeItem===t?a.a.subMenuFixed:"",i=n.state.smallDisplay&&n.state.smallActiveItem===t?a.a.smallSubOn:a.a.smallSubOff;return e.props.subMenuFixed?o.createElement(b,{className:"".concat(s," ").concat(i," ").concat(e.props.subMenuClasses),style:e.props.subMenuStyle,display:n.displaySubMenu(t),onMouseEnter:n.subMenuOn(t)},n.getSubMenuItems(r)):o.createElement(b,{className:"".concat(s," ").concat(i," ").concat(e.props.subMenuClasses),style:e.props.subMenuStyle,display:n.displaySubMenu(t),onMouseEnter:n.subMenuOn(t),onMouseLeave:n.subMenuOn()},n.getSubMenuItems(r))}},n.displaySubMenu=function(e){return!(!n.state.subMenuDisplay||n.state.activeSubMenu!==e)},n.getSubMenuItems=function(e){var t=[];if(Array.isArray(e))e.forEach(function(e,r){e.type===y&&(e.props.children?t.push(o.createElement("div",{key:r,onClick:n.onClickItem(r,e),style:e.props.style,className:e.props.className},e.props.children)):t.push(o.createElement(y,{key:r,label:e.props.label,onClick:n.onClickSecondary(r,e),style:e.props.style,className:e.props.className,active:n.state.activeSecondary===r})))});else if(e.type===y)return o.createElement(y,{label:e.props.label,onClick:n.onClickSecondary(0,e),style:e.props.style,className:e.props.className,active:0===n.state.activeSecondary});return t},n.onClickButton=function(){return function(e){n.setState({display:!0,smallDisplay:!0})}},n.onClickItem=function(e,t){return function(o){t.props.children&&t.props.children.length>1?(t.props.onClick&&t.props.onClick(o),n.setState({activeItem:e,smallActiveItem:e})):n.props.hideClick&&n.props.button?(t.props.onClick&&t.props.onClick(o),n.setState({activeItem:e,display:!1,smallActiveItem:e,smallDisplay:!1,subMenuDisplay:!1})):n.props.hideClick?(t.props.onClick&&t.props.onClick(o),n.setState({activeItem:e,smallActiveItem:e,smallDisplay:!1,subMenuDisplay:!1})):(t.props.onClick&&t.props.onClick(o),n.setState({activeItem:e,smallActiveItem:e}))}},n.onClickSecondary=function(e,t){return function(o){n.props.hideClick&&n.props.button?(t.props.onClick&&t.props.onClick(o),n.setState({activeSecondary:e,display:!1,subMenuDisplay:!1,smallDisplay:!1})):n.props.hideClick?(t.props.onClick&&t.props.onClick(o),n.setState({activeSecondary:e,subMenuDisplay:!1,smallDisplay:!1})):(t.props.onClick&&t.props.onClick(o),n.setState({activeSecondary:e}))}},n.getCover=function(){if(n.state.display){var e=n.coverClasses();return o.createElement("div",{className:"".concat(a.a.cover," ").concat(e),onClick:n.toggle})}},n.coverClasses=function(){return n.props.button&&n.state.display?a.a.coverOn:n.state.display&&n.state.smallDisplay?a.a.coverSmall:""},n.getButton=function(){var e=n.props.button?a.a.buttonOn:"";return o.createElement("div",null,o.createElement(s.default,{icon:"view headline",onClick:n.onClickButton(),className:"".concat(a.a.button," ").concat(e," ").concat(n.props.buttonClass),style:n.props.buttonStyle}))},n.toggle=function(){n.setState({display:!1,smallDisplay:!1,smallActiveItem:-1})},n.subMenuOn=function(e,t){if(!t||n.props.button)return function(t){n.setState({subMenuDisplay:!0,activeSubMenu:e})}},n.subMenuOff=function(){n.setState({subMenuDisplay:!1,activeSubMenu:-1})},n.state={activeItem:n.getActiveItem(),activeSecondary:-1,activeSubMenu:-1,display:!1,smallActiveItem:-1,smallDisplay:!1,subMenuDisplay:!1},n}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,o["Component"]),n=t,(r=[{key:"componentWillMount",value:function(){this.setState(this.getInitialState())}},{key:"render",value:function(){var e=this.getCover(),t=this.getButton(),n=this.initiateSubMenus(),r=this.state.smallDisplay?a.a.smallOn:a.a.smallOff,s=this.state.display?a.a.sidebarOn:a.a.sidebarOff,i=o.createElement("div",{className:"".concat(a.a.sidebar," ").concat(s," ").concat(r," ").concat(this.props.className),style:this.props.style},this.getItems());return o.createElement("div",{className:"sidebar-component"},t,i,n,e)}},{key:"getItems",value:function(){var e=this,t=[];return o.Children.forEach(this.props.children,function(n,r){if(!o.isValidElement(n))throw new Error("<SideBar> only accepts <Item> elements as children");n.props.children?e.checkChildrenType(n.props.children)?t.push(o.createElement(y,{key:r,image:n.props.image,imageOn:n.props.imageOn,label:n.props.label,active:e.state.activeItem===r,onClick:e.onClickItem(r,n),onMouseEnter:e.subMenuOn(r,n.props.subMenuFixed),onMouseLeave:e.subMenuOff,style:n.props.style,className:n.props.className,activeSubMenu:e.state.activeSubMenu===r},e.getNonSubMenuItems(n.props.children))):t.push(o.createElement(y,{key:r,active:e.state.activeItem===r,onClick:e.onClickItem(r,n),style:n.props.style,className:n.props.className},n.props.children)):t.push(o.createElement(y,{key:r,image:n.props.image,imageOn:n.props.imageOn,label:n.props.label,active:e.state.activeItem===r,onClick:e.onClickItem(r,n),style:n.props.style,className:n.props.className}))}),t}},{key:"getActiveItem",value:function(){var e=o.Children.toArray(this.props.children),t=!0,n=!1,r=void 0;try{for(var a,s=e.entries()[Symbol.iterator]();!(t=(a=s.next()).done);t=!0){var i=c(a.value,2),l=i[0],u=i[1];if(o.isValidElement(u)&&u.props.active)return l}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}])&&l(n.prototype,r),i&&l(n,i),t}();m.defaultProps={className:"",style:{}},m.displayName="SideBar";var y=function(e){var t=e.active?a.a.activeItem:"",n=e.activeSubMenu?a.a.arrow:"";return o.createElement("div",{onClick:e.onClick,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,className:"item-component ".concat(a.a.itemContainer," ").concat(e.className," ").concat(t),style:e.style},o.createElement("div",{className:"".concat(n)}),e.image&&o.createElement("img",{src:e.active?e.active?e.imageOn?e.imageOn:e.image:void 0:e.image,className:a.a.image}),e.label&&o.createElement("span",null,e.label),e.children)};y.defaultProps={className:"",style:{}},y.displayName="SidebarItem";var b=function e(t){e.defaultProps={className:"",style:{}};var n=t.display?a.a.subMenuOn:a.a.subMenuOff;return o.createElement("div",{className:"item-component ".concat(a.a.sidebar," ").concat(a.a.subMenu," ").concat(n," ").concat(t.className),style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave},t.children)};b.displayName="SubMenu",n.d(t,"SidebarItem",function(){return y}),m.SidebarItem=y;t.default=m},49:function(e,t,n){"use strict";n.r(t);var o=n(50);t.default=o.a},50:function(e,t,n){"use strict";n.d(t,"a",function(){return y});var o=n(0),r=n(7),a=n.n(r),s=n(9),i=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m={outlined:i.a.outlined,round:i.a.round,sharp:i.a.sharp,twotone:i.a.twoTone},y=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=u(this,p(t).apply(this,arguments))).onClick=function(t){!e.props.disabled&&e.props.onClick&&e.props.onClick(t)},e.getIcon=function(){return e.props.icon?e.props.icon.replace(/\s/g,"_"):""},e}var n,r,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,o["Component"]),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.style,n=e.transparent,r=e.disabled,s=e.className,c=e.id,l=e.type,u=n?i.a.transparent:i.a.normalButton,p=r?i.a.disabledButton:"",f=this.getIcon(),y=l&&m[l]?m[l]:"",b="button-icon-component\n ".concat(i.a.button,"\n ").concat(u,"\n ").concat(p,"\n ").concat(s);return o.createElement("button",{id:c,onClick:this.onClick,disabled:r,className:b,title:this.props.title,style:t},o.createElement("i",{className:"".concat(a.a.mooskinIcons," ").concat(i.a.icon," ").concat(y)},f))}}])&&l(n.prototype,r),s&&l(n,s),t}();y.defaultProps={className:"",style:{},type:""},y.displayName="SmallIconButton"},7:function(e,t,n){e.exports={mooskinIcons:"mooskinIcons___2i54i"}},9:function(e,t,n){e.exports={button:"button___2-L3K",disabledButton:"disabledButton___1e1jx",normalButton:"normalButton___2dyrQ",transparent:"transparent___10ND3",icon:"icon___oOv43",outlined:"outlined___1X5wR",round:"round___2udth",sharp:"sharp___156K3",twotone:"twotone___1FFZr"}}})});
|