;
+ } else {
+ let icon = this.props.icon || kindIcons[this.props.kind];
+ return
+ {!!this.props.url
+ ?

this.setState({imageLoaded: true})}/>
+ : null}
+ {!!icon
+ ?
+ : null}
+
;
+ }
+ }
+}
+
+export default Thumbnail;
diff --git a/lib/components/Thumbnail/index.ts b/src/components/Thumbnail/index.ts
similarity index 96%
rename from lib/components/Thumbnail/index.ts
rename to src/components/Thumbnail/index.ts
index 6180c1d..ae7a4b4 100644
--- a/lib/components/Thumbnail/index.ts
+++ b/src/components/Thumbnail/index.ts
@@ -1 +1 @@
-export * from './Thumbnail';
+export * from './Thumbnail';
diff --git a/lib/components/Toggle/Toggle.md b/src/components/Toggle/Toggle.md
similarity index 100%
rename from lib/components/Toggle/Toggle.md
rename to src/components/Toggle/Toggle.md
diff --git a/lib/components/Toggle/Toggle.scss b/src/components/Toggle/Toggle.scss
similarity index 96%
rename from lib/components/Toggle/Toggle.scss
rename to src/components/Toggle/Toggle.scss
index 6aa0839..8d28c8d 100644
--- a/lib/components/Toggle/Toggle.scss
+++ b/src/components/Toggle/Toggle.scss
@@ -1,141 +1,141 @@
-@import '../../common/constants';
-@import '../../common/mixins';
-@import '../../common/color.controls';
-
-$toggle-switch-transition: 75ms ease-in-out;
-
-$toggle-width: 10*$grid-size;
-$toggle-height: 5*$grid-size;
-$border-toggle-radius: $toggle-height / 2;
-$toggle-switch-border-radius: 5px;
-
-$line-height: 3.5*$grid-size;
-
-.toggle {
- @include md-box(inline-block, relative);
- line-height: $line-height;
-
- .toggle-button {
- @include md-box(inline-block, relative, fill-parent);
- vertical-align: middle;
- outline: none;
- @include themify{
- border: 1px solid themed('color-border-toggle-btn-rest-off');
- background-color: themed('color-bg-toggle-btn-rest-off');
- }
- border-radius: $border-toggle-radius;
- width: $toggle-width;
- height: $toggle-height;
- }
-
- &:not(.disabled) .toggle-button {
- &:focus {
- @include themify{
- outline: 1px dashed themed('color-border-focus');
- }
- outline-offset: 1px;
- }
-
- &:hover {
- @include themify{
- border: 1px solid themed('color-border-toggle-btn-hover-off');
- }
- cursor: pointer;
- + .toggle-switch {
- @include themify{
- background-color: themed('color-circle-toggle-btn-hover-off');
- }
- }
- }
- }
-
- .toggle-switch {
- @include md-box(block, absolute);
- left: 1.25*$grid-size;
- top: 1.25*$grid-size;
-
- width: 2.5*$grid-size;
- height: 2.5*$grid-size;
- border-radius: $toggle-switch-border-radius;
- @include themify{
- background-color: themed('color-circle-toggle-btn-rest-off');
- }
- transition: $toggle-switch-transition;
-
- pointer-events: none;
- }
-
- .toggle-label {
- @include md-box(inline-block, relative);
- margin-left: 2*$grid-size;
-
- font-family: $font-family-default;
- font-size: $font-size-default;
-
- vertical-align: middle;
- }
-
- &.toggle-on {
- &:not(.disabled) .toggle-button {
- @include themify{
- border: 1px solid themed('color-border-toggle-btn-rest-on');
- background-color: themed('color-bg-toggle-btn-rest-on');
- }
- &:hover {
- @include themify{
- border: 1px solid themed('color-border-toggle-btn-hover-on');
- background-color: themed('color-bg-toggle-btn-hover-on');
- }
- + .toggle-switch {
- @include themify{
- background-color: themed('color-circle-toggle-btn-hover-on');
- }
- }
- }
- }
-
- .toggle-switch {
- left: 25px;
- @include themify{
- background-color: themed('color-circle-toggle-btn-rest-on');
- }
- }
-
- &.disabled {
- .toggle-button {
- @include themify{
- border: 1px solid themed('color-border-toggle-btn-disabled-on');
- background-color: themed('color-bg-toggle-btn-disabled-on');
- }
- }
-
- .toggle-switch {
- @include themify{
- background-color: themed('color-circle-toggle-btn-disabled-on');
- }
- }
- }
- }
-
- &.disabled {
- .toggle-button {
- @include themify{
- border: 1px solid themed('color-border-toggle-btn-disabled-off');
- background-color: themed('color-bg-toggle-btn-disabled-off');
- }
- cursor: default;
- }
-
- .toggle-switch {
- @include themify{
- background-color: themed('color-circle-toggle-btn-disabled-off');
- }
- }
-
- .toggle-label {
- @include themify{
- color: themed('color-text-disabled');
- }
- }
- }
+@import '../../common/constants';
+@import '../../common/mixins';
+@import '../../common/color.controls';
+
+$toggle-switch-transition: 75ms ease-in-out;
+
+$toggle-width: 10*$grid-size;
+$toggle-height: 5*$grid-size;
+$border-toggle-radius: $toggle-height / 2;
+$toggle-switch-border-radius: 5px;
+
+$line-height: 3.5*$grid-size;
+
+.toggle {
+ @include md-box(inline-block, relative);
+ line-height: $line-height;
+
+ .toggle-button {
+ @include md-box(inline-block, relative, fill-parent);
+ vertical-align: middle;
+ outline: none;
+ @include themify{
+ border: 1px solid themed('color-border-toggle-btn-rest-off');
+ background-color: themed('color-bg-toggle-btn-rest-off');
+ }
+ border-radius: $border-toggle-radius;
+ width: $toggle-width;
+ height: $toggle-height;
+ }
+
+ &:not(.disabled) .toggle-button {
+ &:focus {
+ @include themify{
+ outline: 1px dashed themed('color-border-focus');
+ }
+ outline-offset: 1px;
+ }
+
+ &:hover {
+ @include themify{
+ border: 1px solid themed('color-border-toggle-btn-hover-off');
+ }
+ cursor: pointer;
+ + .toggle-switch {
+ @include themify{
+ background-color: themed('color-circle-toggle-btn-hover-off');
+ }
+ }
+ }
+ }
+
+ .toggle-switch {
+ @include md-box(block, absolute);
+ left: 1.25*$grid-size;
+ top: 1.25*$grid-size;
+
+ width: 2.5*$grid-size;
+ height: 2.5*$grid-size;
+ border-radius: $toggle-switch-border-radius;
+ @include themify{
+ background-color: themed('color-circle-toggle-btn-rest-off');
+ }
+ transition: $toggle-switch-transition;
+
+ pointer-events: none;
+ }
+
+ .toggle-label {
+ @include md-box(inline-block, relative);
+ margin-left: 2*$grid-size;
+
+ font-family: $font-family-default;
+ font-size: $font-size-default;
+
+ vertical-align: middle;
+ }
+
+ &.toggle-on {
+ &:not(.disabled) .toggle-button {
+ @include themify{
+ border: 1px solid themed('color-border-toggle-btn-rest-on');
+ background-color: themed('color-bg-toggle-btn-rest-on');
+ }
+ &:hover {
+ @include themify{
+ border: 1px solid themed('color-border-toggle-btn-hover-on');
+ background-color: themed('color-bg-toggle-btn-hover-on');
+ }
+ + .toggle-switch {
+ @include themify{
+ background-color: themed('color-circle-toggle-btn-hover-on');
+ }
+ }
+ }
+ }
+
+ .toggle-switch {
+ left: 25px;
+ @include themify{
+ background-color: themed('color-circle-toggle-btn-rest-on');
+ }
+ }
+
+ &.disabled {
+ .toggle-button {
+ @include themify{
+ border: 1px solid themed('color-border-toggle-btn-disabled-on');
+ background-color: themed('color-bg-toggle-btn-disabled-on');
+ }
+ }
+
+ .toggle-switch {
+ @include themify{
+ background-color: themed('color-circle-toggle-btn-disabled-on');
+ }
+ }
+ }
+ }
+
+ &.disabled {
+ .toggle-button {
+ @include themify{
+ border: 1px solid themed('color-border-toggle-btn-disabled-off');
+ background-color: themed('color-bg-toggle-btn-disabled-off');
+ }
+ cursor: default;
+ }
+
+ .toggle-switch {
+ @include themify{
+ background-color: themed('color-circle-toggle-btn-disabled-off');
+ }
+ }
+
+ .toggle-label {
+ @include themify{
+ color: themed('color-text-disabled');
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/lib/components/Toggle/Toggle.tsx b/src/components/Toggle/Toggle.tsx
similarity index 100%
rename from lib/components/Toggle/Toggle.tsx
rename to src/components/Toggle/Toggle.tsx
diff --git a/lib/components/Toggle/index.ts b/src/components/Toggle/index.ts
similarity index 100%
rename from lib/components/Toggle/index.ts
rename to src/components/Toggle/index.ts
diff --git a/lib/index.ts b/src/index.ts
similarity index 97%
rename from lib/index.ts
rename to src/index.ts
index 2732171..2be95c7 100644
--- a/lib/index.ts
+++ b/src/index.ts
@@ -1,21 +1,21 @@
-export * from './components/Accordion';
-export * from './components/ActionTrigger';
-export * from './components/Alert';
-export * from './components/Balloon';
-export * from './components/Button';
-export * from './components/DateTime';
-export * from './components/Dropdown';
-export * from './components/Field';
-export * from './components/GalleryCard';
-export * from './components/Icon';
-export * from './components/InlinePopup';
-export * from './components/Input';
-export * from './components/List';
-export * from './components/Loader';
-export * from './components/Masthead';
-export * from './components/Navigation';
-export * from './components/Pivot';
-export * from './components/Shell';
-export * from './components/Thumbnail';
-export * from './components/Toggle';
+export * from './components/Accordion';
+export * from './components/ActionTrigger';
+export * from './components/Alert';
+export * from './components/Balloon';
+export * from './components/Button';
+export * from './components/DateTime';
+export * from './components/Dropdown';
+export * from './components/Field';
+export * from './components/GalleryCard';
+export * from './components/Icon';
+export * from './components/InlinePopup';
+export * from './components/Input';
+export * from './components/List';
+export * from './components/Loader';
+export * from './components/Masthead';
+export * from './components/Navigation';
+export * from './components/Pivot';
+export * from './components/Shell';
+export * from './components/Thumbnail';
+export * from './components/Toggle';
export * from './Common';
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index 1f521cf..fe9f254 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,13 +1,15 @@
{
"compilerOptions": {
+ "outDir": "lib",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"jsx": "react",
+ "allowJs": false,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": false,
- "rootDir": "lib",
+ "rootDir": "src",
"sourceMap": false,
"declaration": true,
"types": [
@@ -17,7 +19,7 @@
]
},
"include": [
- "lib/**/*"
+ "src/**/*"
],
"exclude": [
"node_modules",