diff --git a/src/assets/fonts/soramitsu-icons.woff b/src/assets/fonts/soramitsu-icons.woff
new file mode 100644
index 00000000..d7fe06f0
Binary files /dev/null and b/src/assets/fonts/soramitsu-icons.woff differ
diff --git a/src/assets/icons/activity.svg b/src/assets/icons/activity.svg
deleted file mode 100644
index f0c76a4a..00000000
--- a/src/assets/icons/activity.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/src/assets/icons/arrow-left.svg b/src/assets/icons/arrow-left.svg
deleted file mode 100644
index 13216e69..00000000
--- a/src/assets/icons/arrow-left.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/src/assets/icons/arrow-top.svg b/src/assets/icons/arrow-top.svg
deleted file mode 100644
index 2436d0c7..00000000
--- a/src/assets/icons/arrow-top.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/create.svg b/src/assets/icons/create.svg
deleted file mode 100644
index 0ef0864d..00000000
--- a/src/assets/icons/create.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/src/assets/icons/email.svg b/src/assets/icons/email.svg
deleted file mode 100644
index eb67d2e9..00000000
--- a/src/assets/icons/email.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/file-upload.svg b/src/assets/icons/file-upload.svg
deleted file mode 100644
index 60eac80c..00000000
--- a/src/assets/icons/file-upload.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/globe.svg b/src/assets/icons/globe.svg
deleted file mode 100644
index bdaaf594..00000000
--- a/src/assets/icons/globe.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/src/assets/icons/link-off.svg b/src/assets/icons/link-off.svg
deleted file mode 100644
index c9aebc1f..00000000
--- a/src/assets/icons/link-off.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/link-on.svg b/src/assets/icons/link-on.svg
deleted file mode 100644
index bd161522..00000000
--- a/src/assets/icons/link-on.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/log-out.svg b/src/assets/icons/log-out.svg
deleted file mode 100644
index 98cfd13c..00000000
--- a/src/assets/icons/log-out.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/src/assets/icons/more-horizontal.svg b/src/assets/icons/more-horizontal.svg
deleted file mode 100644
index dc1ec966..00000000
--- a/src/assets/icons/more-horizontal.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/play.svg b/src/assets/icons/play.svg
deleted file mode 100644
index 6d53a8df..00000000
--- a/src/assets/icons/play.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/plus.svg b/src/assets/icons/plus.svg
deleted file mode 100644
index 4977f632..00000000
--- a/src/assets/icons/plus.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/refresh-red.svg b/src/assets/icons/refresh-red.svg
deleted file mode 100644
index d4db0de1..00000000
--- a/src/assets/icons/refresh-red.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/src/assets/icons/refresh.svg b/src/assets/icons/refresh.svg
deleted file mode 100644
index 3c460cf8..00000000
--- a/src/assets/icons/refresh.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/src/assets/icons/stop.svg b/src/assets/icons/stop.svg
deleted file mode 100644
index 44135c3e..00000000
--- a/src/assets/icons/stop.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/assets/icons/warning.svg b/src/assets/icons/warning.svg
deleted file mode 100644
index e8a57025..00000000
--- a/src/assets/icons/warning.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/src/components/Button/SButton.vue b/src/components/Button/SButton.vue
index 5622b21b..37513e00 100644
--- a/src/components/Button/SButton.vue
+++ b/src/components/Button/SButton.vue
@@ -13,7 +13,7 @@
:icon="elementIcon"
@click="handleClick"
>
-
+
@@ -24,11 +24,12 @@ import { Vue, Component, Prop, Inject } from 'vue-property-decorator'
import { ElForm } from 'element-ui/types/form'
import { ElFormItem } from 'element-ui/types/form-item'
+import { SIcon } from '../Icon'
import { STooltip } from '../Tooltip'
import { ButtonTypes, ButtonSize, ButtonNativeTypes } from './consts'
@Component({
- components: { STooltip }
+ components: { SIcon, STooltip }
})
export default class SButton extends Vue {
readonly ButtonTypes = ButtonTypes
@@ -138,9 +139,8 @@ export default class SButton extends Vue {
this.elementIcon = this.icon
return ''
}
- // TODO: add checks for invalid icons
this.elementIcon = ''
- return `s-icon-${this.icon}`
+ return this.icon
}
get isLoading (): boolean {
@@ -235,31 +235,60 @@ export default class SButton extends Vue {
.action {
&.big {
width: $size-big;
+ i {
+ font-size: 20px;
+ }
}
&.medium {
width: $size-medium;
+ i {
+ font-size: 18px;
+ }
}
&.small {
width: $size-small;
+ i {
+ font-size: 16px;
+ margin-left: -2px;
+ margin-top: -2px;
+ }
}
+ color: $color-basic-black;
background-color: $color-neutral-placeholder;
border-color: $color-neutral-placeholder;
&:hover, &:active, &:focus, &:disabled, &:disabled:hover {
+ color: $color-basic-black;
background-color: $color-neutral-hover;
border-color: $color-neutral-hover;
}
+ &:disabled, &:disabled:hover {
+ color: $color-neutral-inactive;
+ }
&.alternative {
background-color: $color-basic-white;
border-color: $color-neutral-border;
&:hover, &:active, &:focus, &:disabled, &:disabled:hover {
+ color: $color-basic-black;
background-color: $color-neutral-placeholder;
border-color: $color-neutral-placeholder;
}
+ &:disabled, &:disabled:hover {
+ color: $color-neutral-inactive;
+ }
}
}
-button > span > i {
- top: -10px;
- left: -10px;
+button {
+ > span > i {
+ &[class^=s-icon-], &[class^=el-icon-] {
+ display: inline-block;
+ color: inherit;
+ }
+ }
+ &:not(.action) > span > i {
+ &[class^=s-icon-], &[class^=el-icon-] {
+ margin-right: 6px;
+ }
+ }
}
diff --git a/src/components/Collapse/SCollapseItem.vue b/src/components/Collapse/SCollapseItem.vue
index bc1ad26f..d6d2d96a 100644
--- a/src/components/Collapse/SCollapseItem.vue
+++ b/src/components/Collapse/SCollapseItem.vue
@@ -53,7 +53,7 @@ export default class SCollapseItem extends Vue {
diff --git a/src/components/Form/SFormItem.vue b/src/components/Form/SFormItem.vue
index 1c286c97..7fc292a5 100644
--- a/src/components/Form/SFormItem.vue
+++ b/src/components/Form/SFormItem.vue
@@ -179,9 +179,10 @@ export default class SFormItem extends Vue {
}
.s-icon-error {
position: absolute;
- width: 21px;
- height: 21px;
- background-position: 4px bottom;
+ bottom: 0;
+ left: 4px;
+ font-size: 16px;
+ color: $color-error;
}
}
}
diff --git a/src/components/Icon/SIcon.vue b/src/components/Icon/SIcon.vue
new file mode 100644
index 00000000..67103ad3
--- /dev/null
+++ b/src/components/Icon/SIcon.vue
@@ -0,0 +1,50 @@
+
+
+
+
+
diff --git a/src/components/Icon/consts.ts b/src/components/Icon/consts.ts
new file mode 100644
index 00000000..c8537cb3
--- /dev/null
+++ b/src/components/Icon/consts.ts
@@ -0,0 +1,155 @@
+export enum Icons {
+ Back = 'back',
+ Warning = 'warning',
+ Error = 'error',
+ Logout = 'logout',
+ Create = 'create',
+ Refresh = 'refresh',
+ Activity = 'activity',
+ Play = 'play',
+ Stop = 'stop',
+ BarChart = 'bar-chart',
+ Book = 'book',
+ BookmarkAdd = 'bookmark-add',
+ BookmarkNo = 'bookmark-no',
+ Bookmark = 'bookmark',
+ Bookmarks = 'bookmarks',
+ Box = 'box',
+ BrowserNo = 'browser-no',
+ Browser = 'browser',
+ Brush = 'brush',
+ Calculator = 'calculator',
+ CameraCreate = 'camera-create',
+ CameraNo = 'camera-no',
+ Camera = 'camera',
+ Case = 'case',
+ CheckMark = 'check-mark',
+ CheckMarks = 'check-marks',
+ CircleBlock = 'circle-block',
+ CircleChecked = 'circle-checked',
+ CircleMenu = 'circle-menu',
+ CircleMinus = 'circle-minus',
+ CircleMoreHorizontal = 'circle-more-horizontal',
+ CircleMoreVertical = 'circle-more-vertical',
+ CirclePlus = 'circle-plus',
+ CircleStar = 'circle-star',
+ CircleX = 'circle-x',
+ Circle = 'circle',
+ ClearStyle = 'clear-style',
+ Copy = 'copy',
+ Cut = 'cut',
+ Dashboard = 'dashboard',
+ Delete = 'delete',
+ DownloadBold = 'download-bold',
+ Download = 'download',
+ Drop = 'drop',
+ ExternalLink = 'external-link',
+ EyeNo = 'eye-no',
+ Eye = 'eye',
+ Flag = 'flag',
+ Flame = 'flame',
+ Glasses = 'glasses',
+ GlobeNo = 'globe-no',
+ Globe = 'globe',
+ HeartNo = 'heart-no',
+ Heart = 'heart',
+ Home = 'home',
+ Image = 'image',
+ Inbox = 'inbox',
+ Layers = 'layers',
+ LightningNo = 'lightning-no',
+ Lightning = 'lightning',
+ LinkNo = 'link-no',
+ Link = 'link',
+ List = 'list',
+ Mail = 'mail',
+ Maximize = 'maximize',
+ MenuDots = 'menu-dots',
+ Menu = 'menu',
+ MicNo = 'mic-no',
+ Mic = 'mic',
+ Minimize = 'minimize',
+ Minus = 'minus',
+ MoreHorizontal = 'more-horizontal',
+ MoreVertical = 'more-vertical',
+ Newspaper = 'newspaper',
+ Options = 'options',
+ PaperclipNo = 'paperclip-no',
+ Paperclip = 'paperclip',
+ PencilCreate = 'pencil-create',
+ PencilEdit = 'pencil-edit',
+ Plus = 'plus',
+ Presentation = 'presentation',
+ Printer = 'printer',
+ Pulse = 'pulse',
+ Scan = 'scan',
+ Screenshot = 'screenshot',
+ Search = 'search',
+ Send = 'send',
+ Settings = 'settings',
+ ShareArrow = 'share-arrow',
+ Share = 'share',
+ StarNo = 'star-no',
+ Star = 'star',
+ Sticker = 'sticker',
+ table = 'table',
+ TextAlignCenter = 'text-align-center',
+ TextAlignJustify = 'text-align-justify',
+ TextAlignLeft = 'text-align-left',
+ TextAlignRight = 'text-align-right',
+ TextBgcolor = 'text-bgcolor',
+ TextBold = 'text-bold',
+ TextColor = 'text-color',
+ TextItalic = 'text-italic',
+ TextUnderline = 'text-underline',
+ ThumbsDown = 'thumbs-down',
+ ThumbsUp = 'thumbs-up',
+ ToggleLeft = 'toggle-left',
+ ToggleRight = 'toggle-right',
+ TrashEmpty = 'trash-empty',
+ Trash = 'trash',
+ User = 'user',
+ VideoNo = 'video-no',
+ Video = 'video',
+ ZoomIn = 'zoom-in',
+ ZoomOut = 'zoom-out',
+ ArrowBottomLeft = 'arrow-bottom-left',
+ ArrowBottomRight = 'arrow-bottom-right',
+ ArrowBottom = 'arrow-bottom',
+ ArrowLeft = 'arrow-left',
+ ArrowRight = 'arrow-right',
+ ArrowTopLeft = 'arrow-top-left',
+ ArrowTopRight = 'arrow-top-right',
+ ArrowTop = 'arrow-top',
+ Calendar = 'calendar',
+ CallPhone = 'call-phone',
+ ChevronBottom = 'chevron-bottom',
+ ChevronLeft = 'chevron-left',
+ ChevronRight = 'chevron-right',
+ ChevronTop = 'chevron-top',
+ ChevronsBottom = 'chevrons-bottom',
+ ChevronsLeft = 'chevrons-left',
+ ChevronsRight = 'chevrons-right',
+ CircleArrowBottom = 'circle-arrow-bottom',
+ CircleArrowLeft = 'circle-arrow-left',
+ CircleArrowRight = 'circle-arrow-right',
+ CircleArrowTop = 'circle-arrow-top',
+ CircleChevronBottom = 'circle-chevron-bottom',
+ CircleChevronLeft = 'circle-chevron-left',
+ CircleChevronRight = 'circle-chevron-right',
+ CircleChevronTop = 'circle-chevron-top',
+ CircleChevronsTop = 'circle-chevrons-top',
+ File = 'file',
+ FileUpload = 'file-upload',
+ Folder = 'folder',
+ Info = 'info',
+ Lock = 'lock',
+ PaperclipVertical = 'paperclip-vertical',
+ Pencil = 'pencil',
+ Pin = 'pin',
+ QuestionCircle = 'question-circle',
+ Target = 'target',
+ Time = 'time',
+ WiFi = 'wi-fi',
+ X = 'x'
+}
diff --git a/src/components/Icon/index.ts b/src/components/Icon/index.ts
new file mode 100644
index 00000000..03323d1c
--- /dev/null
+++ b/src/components/Icon/index.ts
@@ -0,0 +1,4 @@
+import SIcon from './SIcon.vue'
+import { Icons } from './consts'
+
+export { SIcon, Icons }
diff --git a/src/components/Input/SInput.vue b/src/components/Input/SInput.vue
index 8cf14ce6..aa0ba0a3 100644
--- a/src/components/Input/SInput.vue
+++ b/src/components/Input/SInput.vue
@@ -29,7 +29,7 @@
@focus="handleFocus"
/>
-
+
@@ -313,10 +313,12 @@ export default class SInput extends Vue {
.el-input > input {
padding-right: 56px;
}
- .s-icon-file {
+ .s-icon-file-upload {
top: 16px;
right: 16px;
+ font-size: 24px;
z-index: 1;
+ position: absolute;
+ input {
cursor: pointer;
position: absolute;
diff --git a/src/components/Menu/SMenu.vue b/src/components/Menu/SMenu.vue
index 802a8e64..fa76ffaf 100644
--- a/src/components/Menu/SMenu.vue
+++ b/src/components/Menu/SMenu.vue
@@ -2,6 +2,7 @@