@zkwq/business 0.0.1

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 (231) hide show
  1. package/dist/index.css +1 -0
  2. package/dist/index.js +21861 -0
  3. package/dist/index.umd.cjs +46 -0
  4. package/package.json +27 -0
  5. package/src/components/base/ui/alert/Alert.vue +94 -0
  6. package/src/components/base/ui/autocomplete/autocomplete-suggestions.vue +77 -0
  7. package/src/components/base/ui/autocomplete/autocomplete.vue +305 -0
  8. package/src/components/base/ui/backtop/main.vue +112 -0
  9. package/src/components/base/ui/button/Button.vue +84 -0
  10. package/src/components/base/ui/button/ButtonGroup.vue +10 -0
  11. package/src/components/base/ui/carousel/Carousel.vue +304 -0
  12. package/src/components/base/ui/carousel/CarouselItem.vue +137 -0
  13. package/src/components/base/ui/cascader/cascader.vue +650 -0
  14. package/src/components/base/ui/cascader-panel/cascader-menu.vue +138 -0
  15. package/src/components/base/ui/cascader-panel/cascader-node.vue +246 -0
  16. package/src/components/base/ui/cascader-panel/cascader-panel.vue +382 -0
  17. package/src/components/base/ui/cascader-panel/node.js +166 -0
  18. package/src/components/base/ui/cascader-panel/store.js +62 -0
  19. package/src/components/base/ui/checkbox/checkbox-button.vue +199 -0
  20. package/src/components/base/ui/checkbox/checkbox-group.vue +48 -0
  21. package/src/components/base/ui/checkbox/checkbox.vue +222 -0
  22. package/src/components/base/ui/col/col.js +71 -0
  23. package/src/components/base/ui/collapse/collapse-item.vue +180 -0
  24. package/src/components/base/ui/collapse/collapse.vue +73 -0
  25. package/src/components/base/ui/color-picker/color.js +317 -0
  26. package/src/components/base/ui/color-picker/components/alpha-slider.vue +132 -0
  27. package/src/components/base/ui/color-picker/components/hue-slider.vue +123 -0
  28. package/src/components/base/ui/color-picker/components/picker-dropdown.vue +119 -0
  29. package/src/components/base/ui/color-picker/components/predefine.vue +61 -0
  30. package/src/components/base/ui/color-picker/components/sv-panel.vue +100 -0
  31. package/src/components/base/ui/color-picker/draggable.js +36 -0
  32. package/src/components/base/ui/color-picker/index.js +2 -0
  33. package/src/components/base/ui/color-picker/main.vue +188 -0
  34. package/src/components/base/ui/date-picker/basic/date-table.vue +441 -0
  35. package/src/components/base/ui/date-picker/basic/month-table.vue +254 -0
  36. package/src/components/base/ui/date-picker/basic/time-spinner.vue +304 -0
  37. package/src/components/base/ui/date-picker/basic/year-table.vue +101 -0
  38. package/src/components/base/ui/date-picker/panel/date-range.vue +680 -0
  39. package/src/components/base/ui/date-picker/panel/date.vue +597 -0
  40. package/src/components/base/ui/date-picker/panel/month-range.vue +289 -0
  41. package/src/components/base/ui/date-picker/panel/time-range.vue +248 -0
  42. package/src/components/base/ui/date-picker/panel/time-select.vue +178 -0
  43. package/src/components/base/ui/date-picker/panel/time.vue +186 -0
  44. package/src/components/base/ui/date-picker/picker/date-picker.js +43 -0
  45. package/src/components/base/ui/date-picker/picker/time-picker.js +39 -0
  46. package/src/components/base/ui/date-picker/picker/time-select.js +21 -0
  47. package/src/components/base/ui/date-picker/picker.vue +942 -0
  48. package/src/components/base/ui/dialog/Index.vue +212 -0
  49. package/src/components/base/ui/directive/repeat-click.js +24 -0
  50. package/src/components/base/ui/directive/ripple.js +303 -0
  51. package/src/components/base/ui/divider/Divider.vue +37 -0
  52. package/src/components/base/ui/drawer/Drawer.vue +202 -0
  53. package/src/components/base/ui/dropdown/dropdown-item.vue +39 -0
  54. package/src/components/base/ui/dropdown/dropdown-menu.vue +63 -0
  55. package/src/components/base/ui/dropdown/dropdown.vue +308 -0
  56. package/src/components/base/ui/form/Form.vue +167 -0
  57. package/src/components/base/ui/form/FormItem.vue +334 -0
  58. package/src/components/base/ui/form/LabelWrap.vue +69 -0
  59. package/src/components/base/ui/icon/icon.vue +13 -0
  60. package/src/components/base/ui/image/image-viewer.vue +302 -0
  61. package/src/components/base/ui/image/main.vue +248 -0
  62. package/src/components/base/ui/index.js +189 -0
  63. package/src/components/base/ui/input/Input.vue +438 -0
  64. package/src/components/base/ui/input/calcTextareaHeight.js +104 -0
  65. package/src/components/base/ui/input-number/input-number.vue +285 -0
  66. package/src/components/base/ui/locale/format.js +32 -0
  67. package/src/components/base/ui/locale/index.js +48 -0
  68. package/src/components/base/ui/locale/lang/zh-CN.js +120 -0
  69. package/src/components/base/ui/menu/menu-item-group.vue +45 -0
  70. package/src/components/base/ui/menu/menu-item.vue +112 -0
  71. package/src/components/base/ui/menu/menu-mixin.js +44 -0
  72. package/src/components/base/ui/menu/menu.vue +312 -0
  73. package/src/components/base/ui/menu/submenu.vue +408 -0
  74. package/src/components/base/ui/message/index.js +2 -0
  75. package/src/components/base/ui/message/main.js +87 -0
  76. package/src/components/base/ui/message/main.vue +110 -0
  77. package/src/components/base/ui/message-box/main.js +216 -0
  78. package/src/components/base/ui/message-box/main.vue +323 -0
  79. package/src/components/base/ui/mixin/emitter.js +31 -0
  80. package/src/components/base/ui/mixin/focus.js +9 -0
  81. package/src/components/base/ui/mixin/locale.js +9 -0
  82. package/src/components/base/ui/mixin/migrating.js +33 -0
  83. package/src/components/base/ui/pagination/pager.vue +163 -0
  84. package/src/components/base/ui/pagination/pagination.jsx +391 -0
  85. package/src/components/base/ui/popover/directive.js +20 -0
  86. package/src/components/base/ui/popover/index.js +14 -0
  87. package/src/components/base/ui/popover/main.vue +236 -0
  88. package/src/components/base/ui/progress/Progress.vue +227 -0
  89. package/src/components/base/ui/radio/radio-button.vue +114 -0
  90. package/src/components/base/ui/radio/radio-group.vue +111 -0
  91. package/src/components/base/ui/radio/radio.vue +134 -0
  92. package/src/components/base/ui/row/row.js +47 -0
  93. package/src/components/base/ui/scrollbar/bar.jsx +91 -0
  94. package/src/components/base/ui/scrollbar/index.jsx +203 -0
  95. package/src/components/base/ui/scrollbar/util.js +32 -0
  96. package/src/components/base/ui/select/Option.vue +168 -0
  97. package/src/components/base/ui/select/OptionGroup.vue +60 -0
  98. package/src/components/base/ui/select/Select.vue +920 -0
  99. package/src/components/base/ui/select/SelectDropdown.vue +74 -0
  100. package/src/components/base/ui/select/navigation-mixin.js +54 -0
  101. package/src/components/base/ui/skeleton/index.js +8 -0
  102. package/src/components/base/ui/skeleton/src/img-placeholder.vue +16 -0
  103. package/src/components/base/ui/skeleton/src/index.vue +80 -0
  104. package/src/components/base/ui/skeleton/src/item.vue +22 -0
  105. package/src/components/base/ui/skeleton-item/index.js +8 -0
  106. package/src/components/base/ui/slider/button.vue +238 -0
  107. package/src/components/base/ui/slider/main.vue +427 -0
  108. package/src/components/base/ui/slider/marker.js +18 -0
  109. package/src/components/base/ui/style/alert.scss +147 -0
  110. package/src/components/base/ui/style/animations.scss +65 -0
  111. package/src/components/base/ui/style/autocomplete.scss +81 -0
  112. package/src/components/base/ui/style/backtop.scss +20 -0
  113. package/src/components/base/ui/style/button-group.scss +0 -0
  114. package/src/components/base/ui/style/button.scss +380 -0
  115. package/src/components/base/ui/style/carousel-item.scss +50 -0
  116. package/src/components/base/ui/style/carousel.scss +161 -0
  117. package/src/components/base/ui/style/cascader-panel.scss +120 -0
  118. package/src/components/base/ui/style/cascader.scss +185 -0
  119. package/src/components/base/ui/style/checkbox-button.scss +0 -0
  120. package/src/components/base/ui/style/checkbox-group.scss +0 -0
  121. package/src/components/base/ui/style/checkbox.scss +360 -0
  122. package/src/components/base/ui/style/col.scss +156 -0
  123. package/src/components/base/ui/style/collapse-item.scss +0 -0
  124. package/src/components/base/ui/style/collapse.scss +114 -0
  125. package/src/components/base/ui/style/color-picker.scss +387 -0
  126. package/src/components/base/ui/style/config.scss +4 -0
  127. package/src/components/base/ui/style/date-picker/date-picker.scss +97 -0
  128. package/src/components/base/ui/style/date-picker/date-range-picker.scss +101 -0
  129. package/src/components/base/ui/style/date-picker/date-table.scss +151 -0
  130. package/src/components/base/ui/style/date-picker/month-table.scss +82 -0
  131. package/src/components/base/ui/style/date-picker/picker-panel.scss +117 -0
  132. package/src/components/base/ui/style/date-picker/picker.scss +197 -0
  133. package/src/components/base/ui/style/date-picker/time-picker.scss +85 -0
  134. package/src/components/base/ui/style/date-picker/time-range-picker.scss +31 -0
  135. package/src/components/base/ui/style/date-picker/time-spinner.scss +110 -0
  136. package/src/components/base/ui/style/date-picker/year-table.scss +51 -0
  137. package/src/components/base/ui/style/date-picker.scss +12 -0
  138. package/src/components/base/ui/style/dialog.scss +123 -0
  139. package/src/components/base/ui/style/divider.scss +47 -0
  140. package/src/components/base/ui/style/drawer.scss +218 -0
  141. package/src/components/base/ui/style/dropdown-item.scss +0 -0
  142. package/src/components/base/ui/style/dropdown-menu.scss +0 -0
  143. package/src/components/base/ui/style/dropdown.scss +185 -0
  144. package/src/components/base/ui/style/form-item.scss +0 -0
  145. package/src/components/base/ui/style/form.scss +203 -0
  146. package/src/components/base/ui/style/function.scss +43 -0
  147. package/src/components/base/ui/style/icon.scss +1167 -0
  148. package/src/components/base/ui/style/image.scss +184 -0
  149. package/src/components/base/ui/style/index.scss +57 -0
  150. package/src/components/base/ui/style/input-number.scss +187 -0
  151. package/src/components/base/ui/style/input.scss +477 -0
  152. package/src/components/base/ui/style/menu-item-group.scss +0 -0
  153. package/src/components/base/ui/style/menu-item.scss +0 -0
  154. package/src/components/base/ui/style/menu.scss +294 -0
  155. package/src/components/base/ui/style/message-box.scss +231 -0
  156. package/src/components/base/ui/style/message.scss +120 -0
  157. package/src/components/base/ui/style/mixins.scss +196 -0
  158. package/src/components/base/ui/style/option-group.scss +42 -0
  159. package/src/components/base/ui/style/option.scss +36 -0
  160. package/src/components/base/ui/style/pagination.scss +295 -0
  161. package/src/components/base/ui/style/popover.scss +40 -0
  162. package/src/components/base/ui/style/popper.scss +102 -0
  163. package/src/components/base/ui/style/popup.scss +42 -0
  164. package/src/components/base/ui/style/progress.scss +141 -0
  165. package/src/components/base/ui/style/radio-button.scss +113 -0
  166. package/src/components/base/ui/style/radio-group.scss +9 -0
  167. package/src/components/base/ui/style/radio.scss +203 -0
  168. package/src/components/base/ui/style/ripple.scss +35 -0
  169. package/src/components/base/ui/style/row.scss +39 -0
  170. package/src/components/base/ui/style/scrollbar.scss +75 -0
  171. package/src/components/base/ui/style/select-dropdown.scss +59 -0
  172. package/src/components/base/ui/style/select.scss +154 -0
  173. package/src/components/base/ui/style/skeleton-item.scss +84 -0
  174. package/src/components/base/ui/style/skeleton.scss +40 -0
  175. package/src/components/base/ui/style/slider.scss +250 -0
  176. package/src/components/base/ui/style/switch.scss +116 -0
  177. package/src/components/base/ui/style/tabs.scss +602 -0
  178. package/src/components/base/ui/style/tag.scss +174 -0
  179. package/src/components/base/ui/style/tooltip.scss +146 -0
  180. package/src/components/base/ui/style/transition.scss +138 -0
  181. package/src/components/base/ui/style/upload.scss +603 -0
  182. package/src/components/base/ui/style/utils.scss +39 -0
  183. package/src/components/base/ui/style/var.scss +1007 -0
  184. package/src/components/base/ui/switch/index.vue +174 -0
  185. package/src/components/base/ui/tabs/tab-bar.vue +57 -0
  186. package/src/components/base/ui/tabs/tab-nav.vue +294 -0
  187. package/src/components/base/ui/tabs/tab-pane.vue +56 -0
  188. package/src/components/base/ui/tabs/tabs.vue +191 -0
  189. package/src/components/base/ui/tag/Tag.vue +60 -0
  190. package/src/components/base/ui/tooltip/tooltip.jsx +234 -0
  191. package/src/components/base/ui/upload/Index.vue +340 -0
  192. package/src/components/base/ui/upload/Upload.vue +216 -0
  193. package/src/components/base/ui/upload/UploadDragger.vue +70 -0
  194. package/src/components/base/ui/upload/UploadList.vue +100 -0
  195. package/src/components/base/ui/upload/ajax.js +85 -0
  196. package/src/components/base/ui/util/aria-dialog.js +90 -0
  197. package/src/components/base/ui/util/aria-utils.js +122 -0
  198. package/src/components/base/ui/util/clickoutside.js +76 -0
  199. package/src/components/base/ui/util/date-util.js +292 -0
  200. package/src/components/base/ui/util/date.js +370 -0
  201. package/src/components/base/ui/util/debounce.js +21 -0
  202. package/src/components/base/ui/util/deepmerge.js +100 -0
  203. package/src/components/base/ui/util/dom.js +215 -0
  204. package/src/components/base/ui/util/index.js +262 -0
  205. package/src/components/base/ui/util/menu/aria-menubar.js +14 -0
  206. package/src/components/base/ui/util/menu/aria-menuitem.js +49 -0
  207. package/src/components/base/ui/util/menu/aria-submenu.js +59 -0
  208. package/src/components/base/ui/util/merge.js +14 -0
  209. package/src/components/base/ui/util/popper.js +1235 -0
  210. package/src/components/base/ui/util/popup/index.js +218 -0
  211. package/src/components/base/ui/util/popup/popup-manager.js +194 -0
  212. package/src/components/base/ui/util/resize-events.js +32 -0
  213. package/src/components/base/ui/util/scroll-into-view.js +27 -0
  214. package/src/components/base/ui/util/scrollbar-width.js +29 -0
  215. package/src/components/base/ui/util/shared.js +7 -0
  216. package/src/components/base/ui/util/throttle.js +91 -0
  217. package/src/components/base/ui/util/types.js +24 -0
  218. package/src/components/base/ui/util/vdom.js +5 -0
  219. package/src/components/base/ui/util/vue-popper.js +188 -0
  220. package/src/components/normal/AggsItemH.vue +139 -0
  221. package/src/index.js +10 -0
  222. package/src/static/base-icons.ttf +0 -0
  223. package/src/static/base-icons.woff +0 -0
  224. package/src/static/label_bg.png +0 -0
  225. package/src/static/term-label-bg.png +0 -0
  226. package/src/style/app-article.scss +698 -0
  227. package/src/style/app-comment.scss +259 -0
  228. package/src/style/app-recommend.scss +48 -0
  229. package/src/style/app-richtext.scss +176 -0
  230. package/src/style/index.scss +523 -0
  231. package/vite.config.js +38 -0
@@ -0,0 +1,81 @@
1
+ @import "mixins";
2
+ @import "utils";
3
+ @import "var";
4
+ @import "./input.scss";
5
+ @import "./scrollbar.scss";
6
+ @import "./popper";
7
+
8
+ @include b(autocomplete) {
9
+ position: relative;
10
+ display: inline-block;
11
+ width: 100%;
12
+ }
13
+
14
+ @include b(autocomplete-suggestion) {
15
+ margin: 5px 0;
16
+ box-shadow: $--box-shadow-light;
17
+ border-radius: $--border-radius-base;
18
+ border: 1px solid $--border-color-light;
19
+ box-sizing: border-box;
20
+ background-color: $--color-white;
21
+
22
+ @include e(wrap) {
23
+ max-height: 280px;
24
+ padding: 10px 0;
25
+ box-sizing: border-box;
26
+ }
27
+
28
+ @include e(list) {
29
+ margin: 0;
30
+ padding: 0;
31
+ }
32
+
33
+ & li {
34
+ padding: 0 20px;
35
+ margin: 0;
36
+ line-height: 34px;
37
+ cursor: pointer;
38
+ color: $--color-text-regular;
39
+ font-size: $--font-size-base;
40
+ list-style: none;
41
+ white-space: nowrap;
42
+ overflow: hidden;
43
+ text-overflow: ellipsis;
44
+
45
+ &:hover {
46
+ background-color: $--select-option-hover-background;
47
+ }
48
+
49
+ &.highlighted {
50
+ background-color: $--select-option-hover-background;
51
+ }
52
+
53
+ &.divider {
54
+ margin-top: 6px;
55
+ border-top: 1px solid $--color-black;
56
+ }
57
+
58
+ &.divider:last-child {
59
+ margin-bottom: -6px;
60
+ }
61
+ }
62
+
63
+ @include when(loading) {
64
+ li {
65
+ text-align: center;
66
+ height: 100px;
67
+ line-height: 100px;
68
+ font-size: 20px;
69
+ color: #999;
70
+ @include utils-vertical-center;
71
+
72
+ &:hover {
73
+ background-color: $--color-white;
74
+ }
75
+ }
76
+
77
+ & .base-icon-loading {
78
+ vertical-align: middle;
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,20 @@
1
+ @import "mixins";
2
+ @import "var";
3
+
4
+ @include b(backtop) {
5
+ position: fixed;
6
+ background-color: $--backtop-background-color;
7
+ width: 40px;
8
+ height: 40px;
9
+ color: $--backtop-font-color;
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ font-size: 20px;
14
+ box-shadow: 0 0 6px rgba(0,0,0, .12);
15
+ cursor: pointer;
16
+ z-index: 5;
17
+ &:hover {
18
+ background-color: $--color-primary-light-9
19
+ }
20
+ }
File without changes
@@ -0,0 +1,380 @@
1
+ @charset "UTF-8";
2
+ @import "var";
3
+ @import "mixins";
4
+ @import "utils";
5
+
6
+ @mixin button-plain($color) {
7
+ color: $color;
8
+ background: mix($--color-white, $color, 90%);
9
+ border-color: mix($--color-white, $color, 60%);
10
+
11
+ &:hover,
12
+ &:focus {
13
+ background: $color;
14
+ border-color: $color;
15
+ color: $--color-white;
16
+ }
17
+
18
+ &:active {
19
+ background: mix($--color-black, $color, $--button-active-shade-percent);
20
+ border-color: mix($--color-black, $color, $--button-active-shade-percent);
21
+ color: $--color-white;
22
+ outline: none;
23
+ }
24
+
25
+ &.is-disabled {
26
+ &,
27
+ &:hover,
28
+ &:focus,
29
+ &:active {
30
+ color: mix($--color-white, $color, 40%);
31
+ background-color: mix($--color-white, $color, 90%);
32
+ border-color: mix($--color-white, $color, 80%);
33
+ }
34
+ }
35
+ }
36
+
37
+ @mixin button-variant($color, $background-color, $border-color) {
38
+ color: $color;
39
+ background-color: $background-color;
40
+ border-color: $border-color;
41
+
42
+ &:hover,
43
+ &:focus {
44
+ background: mix($--color-white, $background-color, $--button-hover-tint-percent)!important;
45
+ border-color: mix($--color-white, $border-color, $--button-hover-tint-percent)!important;
46
+ color: $color!important;
47
+ }
48
+
49
+ &:active {
50
+ background: mix($--color-black, $background-color, $--button-active-shade-percent)!important;
51
+ border-color: mix($--color-black, $border-color, $--button-active-shade-percent)!important;
52
+ color: $color!important;
53
+ outline: none!important;
54
+ }
55
+
56
+ &.is-active {
57
+ background: mix($--color-black, $background-color, $--button-active-shade-percent)!important;
58
+ border-color: mix($--color-black, $border-color, $--button-active-shade-percent)!important;
59
+ color: $color!important;
60
+ }
61
+
62
+ &.is-disabled {
63
+ &,
64
+ &:hover,
65
+ &:focus,
66
+ &:active {
67
+ color: $--color-white!important;
68
+ background-color: mix($background-color, $--color-white)!important;
69
+ border-color: mix($border-color, $--color-white)!important;
70
+ }
71
+ }
72
+
73
+ &.is-plain {
74
+ @include button-plain($background-color);
75
+ }
76
+ }
77
+
78
+ @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
79
+ padding: $padding-vertical $padding-horizontal;
80
+ font-size: $font-size;
81
+ border-radius: $border-radius;
82
+ &.is-round {
83
+ padding: $padding-vertical $padding-horizontal;
84
+ }
85
+ }
86
+
87
+ @include b(button) {
88
+ display: inline-block;
89
+ line-height: 1;
90
+ white-space: nowrap;
91
+ cursor: pointer;
92
+ background: $--button-default-background-color;
93
+ // border: thin solid $--button-default-border-color;
94
+ height: 40px;
95
+ color: $--button-default-font-color;
96
+ -webkit-appearance: none;
97
+ text-align: center;
98
+ box-sizing: border-box;
99
+ outline: none;
100
+ margin: 0;
101
+ transition: .1s;
102
+ font-weight: $--button-font-weight;
103
+ @include utils-user-select(none);
104
+ & + & {
105
+ margin-left: 10px;
106
+ }
107
+
108
+ @include button-size($--button-padding-vertical, $--button-padding-horizontal, $--button-font-size, $--button-border-radius);
109
+
110
+ &:hover,
111
+ &:focus {
112
+ color: $--color-primary;
113
+ border-color: $--color-primary-light-7;
114
+ background-color: $--color-primary-light-9;
115
+ }
116
+
117
+ &:active {
118
+ color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
119
+ border-color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
120
+ outline: none;
121
+ }
122
+
123
+ &::-moz-focus-inner {
124
+ border: 0;
125
+ }
126
+
127
+ & [class*="base-icon-"] {
128
+ & + span {
129
+ margin-left: 5px;
130
+ }
131
+ }
132
+
133
+ @include when(light) {
134
+ border: thin solid $--color-text-secondary;
135
+ color: $--color-text-secondary;
136
+ &:hover {
137
+ background: rgba(133,144,166,.06)!important;
138
+ border-color: $--color-text-secondary!important;
139
+ color: $--color-text-secondary!important;
140
+ }
141
+ &:focus, &:active {
142
+ background: rgba(133,144,166,.06)!important;
143
+ border-color: $--color-text-secondary!important;
144
+ color: $--color-text-secondary!important;
145
+ outline: none;
146
+ }
147
+ }
148
+
149
+ @include when(plain) {
150
+ &:hover {
151
+ background: $--background-color-base;
152
+ border-color:$--background-color-base;
153
+ color: $--button-default-font-color;
154
+ }
155
+
156
+ &:focus, &:active {
157
+ background: rgba(0,0,0,.06);
158
+ border-color: rgba(0,0,0,.06);
159
+ color: $--color-text-primary;
160
+ outline: none;
161
+ }
162
+
163
+ i {
164
+ font-weight: 600;
165
+ }
166
+ }
167
+
168
+ @include when(active) {
169
+ color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
170
+ border-color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
171
+ }
172
+
173
+ @include when(disabled) {
174
+ &,
175
+ &:hover,
176
+ &:focus {
177
+ color: $--button-disabled-font-color;
178
+ cursor: not-allowed;
179
+ background-image: none;
180
+ background-color: $--button-disabled-background-color;
181
+ border-color: $--button-disabled-border-color;
182
+ }
183
+
184
+ &.base-button--text {
185
+ background-color: transparent;
186
+ }
187
+
188
+ &.is-plain {
189
+ &,
190
+ &:hover,
191
+ &:focus {
192
+ background-color: $--color-white;
193
+ border-color: $--button-disabled-border-color;
194
+ color: $--button-disabled-font-color;
195
+ }
196
+ }
197
+ }
198
+
199
+ @include when(loading) {
200
+ position: relative;
201
+ pointer-events: none;
202
+
203
+ &:before {
204
+ pointer-events: none;
205
+ content: '';
206
+ position: absolute;
207
+ left: -1px;
208
+ top: -1px;
209
+ right: -1px;
210
+ bottom: -1px;
211
+ border-radius: inherit;
212
+ background-color: rgba(255,255,255,.35);
213
+ }
214
+ }
215
+
216
+ @include when(round) {
217
+ border-radius: 20px;
218
+ padding: 12px 23px;
219
+ }
220
+
221
+ @include when(circle) {
222
+ border-radius: 50%;
223
+ padding: $--button-padding-vertical;
224
+ }
225
+
226
+ @include m(primary) {
227
+ @include button-variant($--button-primary-font-color, $--button-primary-background-color, $--button-primary-border-color);
228
+ @include when(light) {
229
+ border-color: $--color-primary;
230
+ color: $--color-primary;
231
+ background-color: $--color-white;
232
+ &:hover {
233
+ border-color: $--color-primary!important;
234
+ color: $--color-primary!important;
235
+ background: $--color-primary-light-9!important;
236
+ }
237
+ &:focus, &:active {
238
+ border-color: $--color-primary!important;
239
+ color: $--color-primary!important;
240
+ background: $--color-primary-light-9!important;
241
+ }
242
+ }
243
+ }
244
+ @include m(success) {
245
+ @include button-variant($--button-success-font-color, $--button-success-background-color, $--button-success-border-color);
246
+ }
247
+ @include m(warning) {
248
+ @include button-variant($--button-warning-font-color, $--button-warning-background-color, $--button-warning-border-color);
249
+ }
250
+ @include m(danger) {
251
+ @include button-variant($--button-danger-font-color, $--button-danger-background-color, $--button-danger-border-color);
252
+ }
253
+ @include m(info) {
254
+ @include button-variant($--button-info-font-color, $--button-info-background-color, $--button-info-border-color);
255
+ }
256
+ @include m(medium) {
257
+ height: 36px;
258
+ @include button-size($--button-medium-padding-vertical, $--button-medium-padding-horizontal, $--button-medium-font-size, $--button-medium-border-radius);
259
+ @include when(circle) {
260
+ padding: $--button-medium-padding-vertical;
261
+ }
262
+ }
263
+ @include m(small) {
264
+ height: 32px;
265
+ @include button-size($--button-small-padding-vertical, $--button-small-padding-horizontal, $--button-small-font-size, $--button-small-border-radius);
266
+ @include when(circle) {
267
+ padding: $--button-small-padding-vertical;
268
+ }
269
+ }
270
+ @include m(mini) {
271
+ height: 28px;
272
+ @include button-size(0, $--button-mini-padding-horizontal, $--button-mini-font-size, $--button-mini-border-radius);
273
+ @include when(circle) {
274
+ padding: $--button-mini-padding-vertical;
275
+ }
276
+ }
277
+ @include m(text) {
278
+ border-color: transparent;
279
+ color: $--color-primary;
280
+ background: transparent;
281
+ padding-left: 0;
282
+ padding-right: 0;
283
+
284
+ &:hover,
285
+ &:focus {
286
+ color: mix($--color-white, $--color-primary, $--button-hover-tint-percent);
287
+ border-color: transparent;
288
+ background-color: transparent;
289
+ }
290
+ &:active {
291
+ color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
292
+ border-color: transparent;
293
+ background-color: transparent;
294
+ }
295
+
296
+ &.is-disabled,
297
+ &.is-disabled:hover,
298
+ &.is-disabled:focus {
299
+ border-color: transparent;
300
+ }
301
+ }
302
+ }
303
+
304
+ @include b(button-group) {
305
+ @include utils-clearfix;
306
+ display: inline-block;
307
+ vertical-align: middle;
308
+
309
+ & > .base-button {
310
+ float: left;
311
+ position: relative;
312
+ & + .base-button {
313
+ margin-left: 0;
314
+ }
315
+ &.is-disabled {
316
+ z-index: 1;
317
+ }
318
+ &:first-child {
319
+ border-top-right-radius: 0;
320
+ border-bottom-right-radius: 0;
321
+ }
322
+ &:last-child {
323
+ border-top-left-radius: 0;
324
+ border-bottom-left-radius: 0;
325
+ }
326
+ &:first-child:last-child {
327
+ border-top-right-radius: $--button-border-radius;
328
+ border-bottom-right-radius: $--button-border-radius;
329
+ border-top-left-radius: $--button-border-radius;
330
+ border-bottom-left-radius: $--button-border-radius;
331
+
332
+ &.is-round {
333
+ border-radius: 20px;
334
+ }
335
+
336
+ &.is-circle {
337
+ border-radius: 50%;
338
+ }
339
+ }
340
+ &:not(:first-child):not(:last-child) {
341
+ border-radius: 0;
342
+ }
343
+ &:not(:last-child) {
344
+ margin-right: -1px;
345
+ }
346
+
347
+ &:hover,
348
+ &:focus,
349
+ &:active {
350
+ z-index: 1;
351
+ }
352
+
353
+ @include when(active) {
354
+ z-index: 1;
355
+ }
356
+ }
357
+
358
+ & > .base-dropdown {
359
+ & > .base-button {
360
+ border-top-left-radius: 0;
361
+ border-bottom-left-radius: 0;
362
+ border-left-color: rgba($--color-white, 0.5);
363
+ }
364
+ }
365
+
366
+ @each $type in (primary, success, warning, danger, info) {
367
+ .base-button--#{$type} {
368
+ &:first-child {
369
+ border-right-color: rgba($--color-white, 0.5);
370
+ }
371
+ &:last-child {
372
+ border-left-color: rgba($--color-white, 0.5);
373
+ }
374
+ &:not(:first-child):not(:last-child) {
375
+ border-left-color: rgba($--color-white, 0.5);
376
+ border-right-color: rgba($--color-white, 0.5);
377
+ }
378
+ }
379
+ }
380
+ }
@@ -0,0 +1,50 @@
1
+ @import "mixins";
2
+ @import "var";
3
+
4
+ @include b(carousel) {
5
+ @include e(item) {
6
+ position: absolute;
7
+ top: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ height: 100%;
11
+ display: inline-block;
12
+ overflow: hidden;
13
+ z-index: #{$--index-normal - 1};
14
+
15
+ @include when(active) {
16
+ z-index: #{$--index-normal + 1};
17
+ }
18
+
19
+ @include when(animating) {
20
+ transition: transform .4s ease-in-out;
21
+ }
22
+
23
+ @include m(card) {
24
+ width: 50%;
25
+ transition: transform .4s ease-in-out;
26
+ &.is-in-stage {
27
+ cursor: pointer;
28
+ z-index: $--index-normal;
29
+ &:hover .base-carousel__mask,
30
+ &.is-hover .base-carousel__mask {
31
+ opacity: 0.12;
32
+ }
33
+ }
34
+ &.is-active {
35
+ z-index: #{$--index-normal + 1};
36
+ }
37
+ }
38
+ }
39
+
40
+ @include e(mask) {
41
+ position: absolute;
42
+ width: 100%;
43
+ height: 100%;
44
+ top: 0;
45
+ left: 0;
46
+ background-color: $--color-white;
47
+ opacity: 0.24;
48
+ transition: .2s;
49
+ }
50
+ }
@@ -0,0 +1,161 @@
1
+ @import "mixins";
2
+ @import "var";
3
+
4
+ @include b(carousel) {
5
+ position: relative;
6
+
7
+ @include m(horizontal) {
8
+ overflow-x: hidden;
9
+ }
10
+
11
+ @include m(vertical) {
12
+ overflow-y: hidden;
13
+ }
14
+
15
+ @include e(container) {
16
+ position: relative;
17
+ height: 300px;
18
+ }
19
+
20
+ @include e(arrow) {
21
+ border: none;
22
+ outline: none;
23
+ padding: 0;
24
+ margin: 0;
25
+ height: $--carousel-arrow-size;
26
+ width: $--carousel-arrow-size;
27
+ cursor: pointer;
28
+ transition: .3s;
29
+ border-radius: 50%;
30
+ background-color: $--carousel-arrow-background;
31
+ color: $--color-white;
32
+ position: absolute;
33
+ top: 50%;
34
+ z-index: 10;
35
+ transform: translateY(-50%);
36
+ text-align: center;
37
+ font-size: $--carousel-arrow-font-size;
38
+
39
+ @include m(left) {
40
+ left: 16px;
41
+ }
42
+
43
+ @include m(right) {
44
+ right: 16px;
45
+ }
46
+
47
+ &:hover {
48
+ background-color: $--carousel-arrow-hover-background;
49
+ }
50
+
51
+ & i {
52
+ cursor: pointer;
53
+ }
54
+ }
55
+
56
+ @include e(indicators) {
57
+ position: absolute;
58
+ list-style: none;
59
+ margin: 0;
60
+ padding: 0;
61
+ z-index: #{$--index-normal + 1};
62
+
63
+ @include m(horizontal) {
64
+ bottom: 0;
65
+ left: 50%;
66
+ transform: translateX(-50%);
67
+ }
68
+
69
+ @include m(vertical) {
70
+ right: 0;
71
+ top: 50%;
72
+ transform: translateY(-50%);
73
+ }
74
+
75
+ @include m(outside) {
76
+ bottom: #{$--carousel-indicator-height + $--carousel-indicator-padding-vertical * 2};
77
+ text-align: center;
78
+ position: static;
79
+ transform: none;
80
+ .base-carousel__indicator:hover button {
81
+ opacity: 0.64;
82
+ }
83
+ button {
84
+ background-color: $--carousel-indicator-out-color;
85
+ opacity: 0.24;
86
+ }
87
+ }
88
+
89
+ @include m(labels) {
90
+ left: 0;
91
+ right: 0;
92
+ transform: none;
93
+ text-align: center;
94
+
95
+ .base-carousel__button {
96
+ height: auto;
97
+ width: auto;
98
+ padding: 2px 18px;
99
+ font-size: 12px;
100
+ }
101
+
102
+ .base-carousel__indicator {
103
+ padding: 6px 4px;
104
+ }
105
+ }
106
+ }
107
+
108
+ @include e(indicator) {
109
+ background-color: transparent;
110
+ cursor: pointer;
111
+
112
+ &:hover button {
113
+ opacity: 0.72;
114
+ }
115
+
116
+ @include m(horizontal) {
117
+ display: inline-block;
118
+ padding: $--carousel-indicator-padding-vertical $--carousel-indicator-padding-horizontal;
119
+ }
120
+
121
+ @include m(vertical) {
122
+ padding: $--carousel-indicator-padding-horizontal $--carousel-indicator-padding-vertical;
123
+ .base-carousel__button {
124
+ width: $--carousel-indicator-height;
125
+ height: #{$--carousel-indicator-width / 2};
126
+ }
127
+ }
128
+
129
+ @include when(active) {
130
+ button {
131
+ opacity: 1;
132
+ }
133
+ }
134
+ }
135
+
136
+ @include e(button) {
137
+ display: block;
138
+ opacity: 0.48;
139
+ width: $--carousel-indicator-width;
140
+ height: $--carousel-indicator-height;
141
+ background-color: $--color-white;
142
+ border: none;
143
+ outline: none;
144
+ padding: 0;
145
+ margin: 0;
146
+ cursor: pointer;
147
+ transition: .3s;
148
+ }
149
+ }
150
+
151
+ .carousel-arrow-left-enter,
152
+ .carousel-arrow-left-leave-active {
153
+ transform: translateY(-50%) translateX(-10px);
154
+ opacity: 0;
155
+ }
156
+
157
+ .carousel-arrow-right-enter,
158
+ .carousel-arrow-right-leave-active {
159
+ transform: translateY(-50%) translateX(10px);
160
+ opacity: 0;
161
+ }