fit2cloud-ui-plus 0.0.1-beta.9 → 1.0.0-beta.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 (203) hide show
  1. package/README.md +61 -9
  2. package/lib/fit2cloud-ui-plus.es.js +1847 -370
  3. package/lib/fit2cloud-ui-plus.umd.js +1 -1
  4. package/package.json +8 -5
  5. package/src/components/filter-bar/FuFilter.vue +40 -31
  6. package/src/components/filter-bar/FuFilterBar.vue +27 -16
  7. package/src/components/filter-bar/FuFilterInput.vue +48 -0
  8. package/src/components/filter-bar/filter-components/FuFilterDate.vue +17 -13
  9. package/src/components/filter-bar/filter-components/FuFilterDateTime.vue +4 -4
  10. package/src/components/filter-bar/filter-components/FuFilterSelect.vue +5 -4
  11. package/src/components/filter-bar/index.ts +4 -4
  12. package/src/components/icon-button/FuIconButton.vue +54 -0
  13. package/src/components/icon-button/index.ts +9 -0
  14. package/src/components/read-write-switch/FuSelectRwSwitch.vue +23 -10
  15. package/src/components/search-bar/FuComplexSearch.vue +104 -0
  16. package/src/components/search-bar/FuQuickSearch.vue +64 -0
  17. package/src/components/search-bar/FuSearchBar.vue +153 -0
  18. package/src/components/search-bar/FuSearchBarButton.vue +23 -0
  19. package/src/components/search-bar/FuSearchContions.vue +40 -0
  20. package/src/components/search-bar/complex-components/FuComplexDate.vue +70 -0
  21. package/src/components/search-bar/complex-components/FuComplexDateTime.vue +74 -0
  22. package/src/components/search-bar/complex-components/FuComplexInput.vue +57 -0
  23. package/src/components/search-bar/complex-components/FuComplexSelect.vue +93 -0
  24. package/src/components/search-bar/index.ts +20 -0
  25. package/src/components/search-bar/types.ts +23 -0
  26. package/src/components/speed-dial/FuSpeedDial.vue +289 -0
  27. package/src/components/speed-dial/FuSpeedDialActionButton.vue +88 -0
  28. package/src/components/speed-dial/FuSpeedDialButton.vue +45 -0
  29. package/src/components/speed-dial/FuSpeedDialItem.vue +82 -0
  30. package/src/components/speed-dial/index.ts +11 -0
  31. package/src/components/speed-dial/types.ts +12 -0
  32. package/src/components/table/FuTable.vue +3 -3
  33. package/src/components/table/table-column-select/FuTableColumnSelectPopover.vue +22 -24
  34. package/src/components/tabs/FuTabs.vue +4 -3
  35. package/src/hooks/index.ts +0 -1
  36. package/src/hooks/use-global-config/index.ts +26 -8
  37. package/src/hooks/use-locale/index.ts +1 -1
  38. package/src/hooks/use-size/index.ts +11 -5
  39. package/src/index.ts +5 -2
  40. package/src/styles/common/function.scss +14 -4
  41. package/src/styles/common/mixins.scss +9 -4
  42. package/src/styles/common/variables.scss +55 -18
  43. package/src/styles/components/filter-bar.scss +16 -16
  44. package/src/styles/components/icon-button.scss +66 -0
  45. package/src/styles/components/search-bar.scss +240 -0
  46. package/src/styles/components/speed-dial.scss +1 -51
  47. package/src/styles/components/table.scss +7 -9
  48. package/src/styles/index.scss +2 -0
  49. package/src/styles/themes/default.scss +91 -0
  50. package/types/examples/App.vue.d.ts +2 -0
  51. package/types/examples/components/CodeExample.vue.d.ts +29 -0
  52. package/types/examples/components/DocumentTable.vue.d.ts +14 -0
  53. package/types/examples/components/Markdown.vue.d.ts +12 -0
  54. package/types/examples/layout/components/AppHeader.vue.d.ts +2 -0
  55. package/types/examples/layout/components/Sidebar.vue.d.ts +2 -0
  56. package/types/examples/layout/index.vue.d.ts +2 -0
  57. package/types/examples/main.d.ts +2 -0
  58. package/types/examples/pages/filter-bar/attributes.d.ts +63 -0
  59. package/types/examples/pages/filter-bar/demo/BaseFilterBar.vue.d.ts +2 -0
  60. package/types/examples/pages/filter-bar/demo/SetConditionsDemo.vue.d.ts +2 -0
  61. package/types/examples/pages/filter-bar/demo/SlotDemo.vue.d.ts +2 -0
  62. package/types/examples/pages/filter-bar/index.vue.d.ts +2 -0
  63. package/types/examples/pages/icon-button/attributes.d.ts +45 -0
  64. package/types/examples/pages/icon-button/demo/BaseIconButton.vue.d.ts +2 -0
  65. package/types/examples/pages/icon-button/demo/SlotDemo.vue.d.ts +2 -0
  66. package/types/examples/pages/icon-button/index.vue.d.ts +2 -0
  67. package/types/examples/pages/index.d.ts +3 -0
  68. package/types/examples/pages/read-write-switch/attributes.d.ts +63 -0
  69. package/types/examples/pages/read-write-switch/demo/BaseDemo.vue.d.ts +2 -0
  70. package/types/examples/pages/read-write-switch/demo/CustomContentDemo.vue.d.ts +2 -0
  71. package/types/examples/pages/read-write-switch/demo/InputRwSwitchDemo.vue.d.ts +2 -0
  72. package/types/examples/pages/read-write-switch/demo/ReadSwitchDemo.vue.d.ts +2 -0
  73. package/types/examples/pages/read-write-switch/demo/SelectRwSwitchDemo.vue.d.ts +2 -0
  74. package/types/examples/pages/read-write-switch/demo/TableInnerEditDemo.vue.d.ts +2 -0
  75. package/types/examples/pages/read-write-switch/demo/WriteSwitchDemo.vue.d.ts +2 -0
  76. package/types/examples/pages/read-write-switch/index.vue.d.ts +2 -0
  77. package/types/examples/pages/search/attributes.d.ts +57 -0
  78. package/types/examples/pages/search/demo/BaseSearchbar.vue.d.ts +66 -0
  79. package/types/examples/pages/search/demo/ComplexComponentsDemo.vue.d.ts +60 -0
  80. package/types/examples/pages/search/demo/ComplexSearchDemo.vue.d.ts +84 -0
  81. package/types/examples/pages/search/demo/CustomComponentsDemo.vue.d.ts +50 -0
  82. package/types/examples/pages/search/demo/EchoConditionsDemo.vue.d.ts +52 -0
  83. package/types/examples/pages/search/demo/QuickSearchDemo.vue.d.ts +18 -0
  84. package/types/examples/pages/search/demo/SearchBarButtonDemo.vue.d.ts +54 -0
  85. package/types/examples/pages/search/index.vue.d.ts +150 -0
  86. package/types/examples/pages/search-bar/attributes.d.ts +63 -0
  87. package/types/examples/pages/search-bar/demo/BaseSearchbar.vue.d.ts +31 -0
  88. package/types/examples/pages/search-bar/demo/ComplexSearchDemo.vue.d.ts +40 -0
  89. package/types/examples/pages/search-bar/demo/EchoConditionsDemo.vue.d.ts +32 -0
  90. package/types/examples/pages/search-bar/demo/QuickSearchDemo.vue.d.ts +7 -0
  91. package/types/examples/pages/search-bar/demo/SearchBarButtonDemo.vue.d.ts +32 -0
  92. package/types/examples/pages/search-bar/index.vue.d.ts +2 -0
  93. package/types/examples/pages/speed-dial/attributes.d.ts +63 -0
  94. package/types/examples/pages/speed-dial/demo/BaseSpeedDial.vue.d.ts +2 -0
  95. package/types/examples/pages/speed-dial/demo/SpeedDialCustom.vue.d.ts +2 -0
  96. package/types/examples/pages/speed-dial/demo/SpeedDialPosition.vue.d.ts +2 -0
  97. package/types/examples/pages/speed-dial/demo/SpeedDialTrigger.vue.d.ts +2 -0
  98. package/types/examples/pages/speed-dial/index.vue.d.ts +2 -0
  99. package/types/examples/pages/split-pane/attributes.d.ts +63 -0
  100. package/types/examples/pages/split-pane/demo/BaseSplit.vue.d.ts +2 -0
  101. package/types/examples/pages/split-pane/demo/CustomResizer.vue.d.ts +2 -0
  102. package/types/examples/pages/split-pane/demo/NestSplit.vue.d.ts +2 -0
  103. package/types/examples/pages/split-pane/demo/ResizerType.vue.d.ts +2 -0
  104. package/types/examples/pages/split-pane/index.vue.d.ts +2 -0
  105. package/types/examples/pages/table/attributes.d.ts +121 -0
  106. package/types/examples/pages/table/demo/BaseTable.vue.d.ts +2 -0
  107. package/types/examples/pages/table/demo/DropdownColumn.vue.d.ts +2 -0
  108. package/types/examples/pages/table/demo/DropdownColumnSlot.vue.d.ts +2 -0
  109. package/types/examples/pages/table/demo/SaveSelectColumn.vue.d.ts +2 -0
  110. package/types/examples/pages/table/demo/SelectColumn.vue.d.ts +2 -0
  111. package/types/examples/pages/table/demo/TableOperations.vue.d.ts +2 -0
  112. package/types/examples/pages/table/demo/TablePagination.vue.d.ts +2 -0
  113. package/types/examples/pages/table/index.vue.d.ts +2 -0
  114. package/types/examples/pages/tabs/attributes.d.ts +63 -0
  115. package/types/examples/pages/tabs/demo/AddCloseTab.vue.d.ts +2 -0
  116. package/types/examples/pages/tabs/index.vue.d.ts +2 -0
  117. package/types/examples/router/doc-routes.d.ts +12 -0
  118. package/types/examples/router/index.d.ts +4 -0
  119. package/types/examples/router/styles-routes.d.ts +12 -0
  120. package/types/examples/style-guide/button/BaseButton.vue.d.ts +2 -0
  121. package/types/examples/style-guide/button/IconButton.vue.d.ts +2 -0
  122. package/types/examples/style-guide/button/PlainButton.vue.d.ts +2 -0
  123. package/types/examples/style-guide/button/TextButton.vue.d.ts +2 -0
  124. package/types/examples/style-guide/button/index.vue.d.ts +2 -0
  125. package/types/examples/style-guide/input/BaseInput.vue.d.ts +2 -0
  126. package/types/examples/style-guide/input/SearchInput.vue.d.ts +2 -0
  127. package/types/examples/style-guide/input/Textarea.vue.d.ts +2 -0
  128. package/types/examples/style-guide/input/index.vue.d.ts +2 -0
  129. package/types/examples/style-guide/select/BaseSelect.vue.d.ts +2 -0
  130. package/types/examples/style-guide/select/index.vue.d.ts +2 -0
  131. package/types/plugins/example-transform.d.ts +5 -0
  132. package/types/src/components/filter-bar/FuFilter.vue.d.ts +42 -0
  133. package/types/src/components/filter-bar/FuFilterBar.vue.d.ts +33 -0
  134. package/types/src/components/filter-bar/FuFilterConditions.vue.d.ts +8 -0
  135. package/types/src/components/filter-bar/FuFilterInput.vue.d.ts +17 -0
  136. package/types/src/components/filter-bar/FuSearchInput.vue.d.ts +17 -0
  137. package/types/src/components/filter-bar/filter-components/FuFilterDate.vue.d.ts +36 -0
  138. package/types/src/components/filter-bar/filter-components/FuFilterDateTime.vue.d.ts +36 -0
  139. package/types/src/components/filter-bar/filter-components/FuFilterOption.vue.d.ts +24 -0
  140. package/types/src/components/filter-bar/filter-components/FuFilterSelect.vue.d.ts +66 -0
  141. package/types/src/components/filter-bar/index.d.ts +2 -0
  142. package/types/src/components/filter-bar/types.d.ts +22 -0
  143. package/types/src/components/icon-button/FuIconButton.vue.d.ts +43 -0
  144. package/types/src/components/icon-button/index.d.ts +2 -0
  145. package/types/src/components/read-write-switch/FuInputRwSwitch.vue.d.ts +21 -0
  146. package/types/src/components/read-write-switch/FuReadWriteSwitch.vue.d.ts +23 -0
  147. package/types/src/components/read-write-switch/FuSelectRwSwitch.vue.d.ts +43 -0
  148. package/types/src/components/read-write-switch/index.d.ts +2 -0
  149. package/types/src/components/read-write-switch/types.d.ts +4 -0
  150. package/types/src/components/search-bar/FuComplexSearch.vue.d.ts +22 -0
  151. package/types/src/components/search-bar/FuQuickSearch.vue.d.ts +29 -0
  152. package/types/src/components/search-bar/FuSearchBar.vue.d.ts +58 -0
  153. package/types/src/components/search-bar/FuSearchBarButton.vue.d.ts +14 -0
  154. package/types/src/components/search-bar/FuSearchContions.vue.d.ts +26 -0
  155. package/types/src/components/search-bar/complex-components/FuComplexDate.vue.d.ts +36 -0
  156. package/types/src/components/search-bar/complex-components/FuComplexDateTime.vue.d.ts +36 -0
  157. package/types/src/components/search-bar/complex-components/FuComplexInput.vue.d.ts +26 -0
  158. package/types/src/components/search-bar/complex-components/FuComplexSelect.vue.d.ts +50 -0
  159. package/types/src/components/search-bar/complex-components/index.d.ts +0 -0
  160. package/types/src/components/search-bar/complex-components/mixins.d.ts +6 -0
  161. package/types/src/components/search-bar/index.d.ts +2 -0
  162. package/types/src/components/search-bar/types.d.ts +17 -0
  163. package/types/src/components/speed-dial/FuSpeedDial.vue.d.ts +218 -0
  164. package/types/src/components/speed-dial/FuSpeedDialActionButton.vue.d.ts +32 -0
  165. package/types/src/components/speed-dial/FuSpeedDialButton.vue.d.ts +42 -0
  166. package/types/src/components/speed-dial/FuSpeedDialItem.vue.d.ts +12 -0
  167. package/types/src/components/speed-dial/index.d.ts +2 -0
  168. package/types/src/components/speed-dial/types.d.ts +8 -0
  169. package/types/src/components/split-pane/FuSplitPane.vue.d.ts +59 -0
  170. package/types/src/components/split-pane/index.d.ts +2 -0
  171. package/types/src/components/table/FuTable.vue.d.ts +18 -0
  172. package/types/src/components/table/FuTableBody.d.ts +3 -0
  173. package/types/src/components/table/FuTableColumnDropdown.vue.d.ts +50 -0
  174. package/types/src/components/table/FuTablePagination.vue.d.ts +47 -0
  175. package/types/src/components/table/index.d.ts +2 -0
  176. package/types/src/components/table/table-column-select/FuTableColumnSelect.vue.d.ts +10 -0
  177. package/types/src/components/table/table-column-select/FuTableColumnSelectDialog.vue.d.ts +23 -0
  178. package/types/src/components/table/table-column-select/FuTableColumnSelectPopover.vue.d.ts +34 -0
  179. package/types/src/components/table/table-column-select/utils.d.ts +8 -0
  180. package/types/src/components/table/table-operations/FuTableButton.vue.d.ts +13 -0
  181. package/types/src/components/table/table-operations/FuTableMoreButton.vue.d.ts +37 -0
  182. package/types/src/components/table/table-operations/FuTableOperations.vue.d.ts +46 -0
  183. package/types/src/components/table/types.d.ts +2 -0
  184. package/types/src/components/tabs/FuTabs.vue.d.ts +54 -0
  185. package/types/src/components/tabs/index.d.ts +2 -0
  186. package/types/src/hooks/index.d.ts +3 -0
  187. package/types/src/hooks/use-global-config/index.d.ts +9 -0
  188. package/types/src/hooks/use-locale/index.d.ts +14 -0
  189. package/types/src/hooks/use-size/index.d.ts +9 -0
  190. package/types/src/index.d.ts +8 -0
  191. package/types/src/locale/index.d.ts +10 -0
  192. package/types/src/locale/lang/en.d.ts +59 -0
  193. package/types/src/locale/lang/zh-cn.d.ts +59 -0
  194. package/types/src/locale/lang/zh-tw.d.ts +59 -0
  195. package/types/src/tools/size.d.ts +4 -0
  196. package/types/src/tools/theme.d.ts +1 -0
  197. package/types/src/tools/time.d.ts +2 -0
  198. package/types/src/tools/types.d.ts +8 -0
  199. package/types/src/tools/utils.d.ts +2 -0
  200. package/types/src/tools/vnode.d.ts +9 -0
  201. package/src/.DS_Store +0 -0
  202. package/src/components/.DS_Store +0 -0
  203. package/src/components/filter-bar/FuSearchInput.vue +0 -37
@@ -1,8 +1,9 @@
1
- import { computed, ref, unref, getCurrentInstance } from 'vue'
2
- import { useGlobalConfig } from '../use-global-config'
3
- import type { ComputedRef } from 'vue'
4
- import type { ComponentSize } from '@/tools/size'
5
- import type { MaybeRef } from '@vueuse/core'
1
+ import {computed, getCurrentInstance, ref, unref} from 'vue'
2
+ import {useGlobalConfig} from '@/hooks'
3
+ import type {ComputedRef} from 'vue'
4
+ import type {ComponentSize} from '@/tools/size'
5
+ import {validateSize} from "@/tools/size";
6
+ import {MaybeRef} from "@vueuse/core";
6
7
 
7
8
  export const useProp = <T>(name: string): ComputedRef<T | undefined> => {
8
9
  const vm = getCurrentInstance()!
@@ -27,3 +28,8 @@ export const useSize = (
27
28
  )
28
29
  }
29
30
 
31
+ export const useSizeProp = {
32
+ type: String,
33
+ validator: validateSize,
34
+ }
35
+
package/src/index.ts CHANGED
@@ -1,13 +1,16 @@
1
1
  import PackageJSON from "../package.json"
2
2
 
3
- import type { App } from 'vue'
3
+ import type {App} from 'vue'
4
+ import {GlobalConfig, provideGlobalConfig} from "@/hooks";
5
+
4
6
  const components = import.meta.globEager('@/components/*/index.ts');
5
7
 
6
- const install = (app: App): void => {
8
+ const install = (app: App, config: GlobalConfig): void => {
7
9
  Object.keys(components).forEach(key => {
8
10
  let component = components[key].default;
9
11
  app.use(component)
10
12
  })
13
+ provideGlobalConfig(config)
11
14
  }
12
15
 
13
16
  const plugin = {
@@ -43,7 +43,7 @@
43
43
  }
44
44
 
45
45
  // join var name
46
- // joinVarName(('button', 'text-color')) => '--el-button-text-color'
46
+ // joinVarName(('button', 'text-color')) => '--fu-button-text-color'
47
47
  @function joinVarName($list) {
48
48
  $name: '--' + config.$namespace;
49
49
  @each $item in $list {
@@ -54,17 +54,17 @@
54
54
  @return $name;
55
55
  }
56
56
 
57
- // getCssVarName('button', 'text-color') => '--el-button-text-color'
57
+ // getCssVarName('button', 'text-color') => '--fu-button-text-color'
58
58
  @function getCssVarName($args...) {
59
59
  @return joinVarName($args);
60
60
  }
61
61
 
62
- // getCssVar('button', 'text-color') => var(--el-button-text-color)
62
+ // getCssVar('button', 'text-color') => var(--fu-button-text-color)
63
63
  @function getCssVar($args...) {
64
64
  @return var(#{joinVarName($args)});
65
65
  }
66
66
 
67
- // bem('block', 'element', 'modifier') => 'el-block__element--modifier'
67
+ // bem('block', 'element', 'modifier') => 'fu-block__element--modifier'
68
68
  @function bem($block, $element: '', $modifier: '') {
69
69
  $name: config.$namespace + config.$common-separator + $block;
70
70
 
@@ -79,3 +79,13 @@
79
79
  // @debug $name;
80
80
  @return $name;
81
81
  }
82
+
83
+ @function str-replace($string, $search, $replace: '') {
84
+ $index: str-index($string, $search);
85
+
86
+ @if $index {
87
+ @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
88
+ }
89
+
90
+ @return $string;
91
+ }
@@ -1,8 +1,4 @@
1
1
  @use 'function' as *;
2
- @use 'variables' as *;
3
- // forward mixins
4
- @forward 'config';
5
- @forward 'function';
6
2
  @use 'config' as *;
7
3
 
8
4
  // BEM
@@ -83,3 +79,12 @@
83
79
  }
84
80
  }
85
81
 
82
+ @mixin set-css-var($name, $value) {
83
+ #{joinVarName($name)}: #{$value};
84
+ }
85
+
86
+ @mixin set-component-css-var($name, $variables) {
87
+ @each $attribute, $value in $variables {
88
+ #{getCssVarName($name, $attribute)}: #{$value};
89
+ }
90
+ }
@@ -1,24 +1,61 @@
1
+ @use 'sass:map';
2
+ @use "./mixins" as *;
3
+ @use 'element-plus/theme-chalk/src/common/var.scss' as *;
1
4
 
2
- @forward 'element-plus/theme-chalk/src/common/var.scss' with (
3
- $colors: (
4
- 'primary': (
5
- 'base': #004A71,
5
+ // fit2cloud ui variables
6
+ $condition: () !default;
7
+ $condition: map.deep-merge(
8
+ (
9
+ 'color': #646A73,
10
+ 'bgColor': #F5F6F7,
6
11
  ),
7
- ),
8
- $table: (
9
- 'border-color' : #dddddd,
10
- 'header-text-color': '#646A73',
11
- 'text-color': '#1F2329',
12
+ $condition
13
+ );
12
14
 
13
- )
15
+ $fu-search-bar: () !default;
16
+ $fu-search-bar: map.deep-merge(
17
+ (
18
+ 'width': 100%,
19
+ 'height': 48px,
20
+ 'condition-color': map-get($condition, "color"),
21
+ 'condition-bgColor': map-get($condition, "bgColor"),
22
+ ),
23
+ $fu-search-bar
14
24
  );
15
25
 
16
- // fit2cloud ui variables
17
- $table-header-bgColor: #F5F6F7 !default;
26
+ $fu-filter-bar: () !default;
27
+ $fu-filter-bar: map.deep-merge(
28
+ (
29
+ 'color': map-get($condition, "color"),
30
+ 'drawer-color': map-get($condition, "color"),
31
+ 'condition-color': map-get($condition, "color"),
32
+ 'condition-bgColor': map-get($condition, "bgColor"),
33
+ 'option-bgColor': map-get($condition, "bgColor"),
34
+ 'option-hover-bgColor': rgba($color-primary, 10%),
35
+ 'scroll-bgColor': mix(#000, map-get($condition, "bgColor"), 15%),
36
+ ),
37
+ $fu-filter-bar
38
+ );
39
+
40
+ $fu-icon-button: () !default;
41
+ $fu-icon-button: map.deep-merge(
42
+ (
43
+ 'color': map-get($text-color, "primary"),
44
+ 'bgColor': transparent,
45
+ 'hover-color': map-get($fu-icon-button, "color"),
46
+ 'hover-bgColor': rgba(map-get($fu-icon-button, "color"), 0.1),
47
+ 'active-color': map-get($fu-icon-button, "color"),
48
+ 'active-bgColor': rgba(map-get($fu-icon-button, "color"), 0.2),
49
+ 'disabled-color': #BBBFC4,
50
+ 'disabled-bgColor': transparent,
51
+ 'gap': 12px,
52
+ ),
53
+ $fu-icon-button
54
+ );
18
55
 
19
- $filter-color: #646A73 !default;
20
- $filter-drawer-color: #646A73 !default;
21
- $filter-condition-color: #0C296E !default;
22
- $filter-condition-bgColor: rgba(51, 112, 255, 0.1) !default;
23
- $filter-option-bgColor: #F5F6F7 !default;
24
- $filter-scroll-bgColor: rgba(31, 35, 41, 0.1) !default;
56
+ :root {
57
+ // 遍历组件变量,例如: --fu-search-bar-{key}: {value}
58
+ @include set-component-css-var('search-bar', $fu-search-bar);
59
+ @include set-component-css-var('filter-bar', $fu-filter-bar);
60
+ @include set-component-css-var('icon-button', $fu-icon-button);
61
+ }
@@ -1,5 +1,4 @@
1
1
  @use "../common/mixins.scss" as *;
2
- @use "../common/variables.scss" as *;
3
2
 
4
3
  @include b(filter-bar) {
5
4
  border-radius: 4px;
@@ -19,19 +18,18 @@
19
18
  }
20
19
  }
21
20
 
22
- @include b(search-input) {
21
+ @include b(filter-input) {
23
22
  width: 240px;
24
- margin-right: 10px;
25
23
  .el-input__prefix, .el-input__suffix {
26
24
  .el-input__icon {
27
- color: $filter-color;
25
+ color: var(--fu-filter-bar-color);
28
26
  font-size: 14px
29
27
  }
30
28
  }
29
+ }
31
30
 
32
- // .el-icon-circle-close:before {
33
- // content: "\e79d"
34
- // }
31
+ @include b(filter-button) {
32
+ margin-left: 12px;
35
33
  }
36
34
 
37
35
  @include b(filter) {
@@ -48,7 +46,7 @@
48
46
  }
49
47
 
50
48
  @include e(split) {
51
- background-color: $filter-color;
49
+ background-color: var(--fu-filter-bar-color);
52
50
  height: 16px;
53
51
  width: 1px;
54
52
  margin: 2px 8px;
@@ -63,7 +61,7 @@
63
61
  margin: 0 2px;
64
62
 
65
63
  &:hover {
66
- background: $filter-scroll-bgColor;
64
+ background: var(--fu-filter-bar-scroll-bgColor);
67
65
  border-radius: 4px;
68
66
  }
69
67
 
@@ -80,7 +78,7 @@
80
78
  height: 22px;
81
79
  min-width: 76px;
82
80
  max-width: 76px;
83
- color: $filter-color;
81
+ color: var(--fu-filter-bar-color);
84
82
  cursor: pointer;
85
83
  margin-left: 6px;
86
84
  }
@@ -111,7 +109,7 @@
111
109
  bottom: 0;
112
110
  width: 100%;
113
111
  height: 72px;
114
- padding: 0 24px;
112
+ right: 20px;
115
113
  display: flex;
116
114
  justify-content: flex-end;
117
115
  align-items: center;
@@ -136,9 +134,9 @@
136
134
  padding: 1px 6px;
137
135
  box-sizing: border-box;
138
136
  height: 24px;
139
- background-color: $filter-condition-bgColor;
137
+ background-color: var(--fu-filter-bar-condition-bgColor);
140
138
  border-radius: 2px;
141
- color: $filter-condition-color;
139
+ color: var(--fu-filter-bar-condition-color);
142
140
 
143
141
  & + & {
144
142
  margin-left: 8px;
@@ -197,14 +195,13 @@
197
195
  padding: 1px 6px;
198
196
  font-size: 14px;
199
197
  line-height: 22px;
200
- background-color: $filter-option-bgColor;
198
+ background-color: var(--fu-filter-bar-option-bgColor);
201
199
  border-radius: 2px;
202
200
  cursor: pointer;
203
201
  margin: 6px;
204
202
 
205
203
  &.is-selected, &:hover {
206
- background: $filter-condition-bgColor;
207
- color: $filter-condition-color;
204
+ background-color: var(--fu-filter-bar-option-hover-bgColor);
208
205
  }
209
206
 
210
207
  &:active {
@@ -221,6 +218,9 @@
221
218
 
222
219
  @include b(scale-click) {
223
220
  cursor: pointer;
221
+ &:hover, &:focus {
222
+ opacity: 0.8;
223
+ }
224
224
  &:active {
225
225
  transform: scale(0.9)
226
226
  }
@@ -0,0 +1,66 @@
1
+ @use "../common/mixins.scss" as *;
2
+ @use 'element-plus/theme-chalk/src/common/var.scss' as *;
3
+
4
+ @mixin set-type-css-var($color) {
5
+ @include set-component-css-var('icon-button', (
6
+ 'color': $color,
7
+ 'bgColor': transparent,
8
+ 'hover-color': $color,
9
+ 'hover-bgColor': rgba($color, 0.1),
10
+ 'active-color': $color,
11
+ 'active-bgColor': rgba($color, 0.2),
12
+ ));
13
+ }
14
+
15
+ @include b(icon-button) {
16
+ @include flex-row(center, center);
17
+ cursor: pointer;
18
+ width: 32px;
19
+ height: 32px;
20
+ border-radius: 4px;
21
+ color: var(--fu-icon-button-color);
22
+ background-color: var(--fu-icon-button-bgColor);
23
+
24
+ &:not(.is-disabled) {
25
+ &:hover, &:focus {
26
+ color: var(--fu-icon-button-hover-color);
27
+ background-color: var(--fu-icon-button-hover-bgColor);
28
+ }
29
+
30
+ &:active {
31
+ color: var(--fu-icon-button-active-color);
32
+ background-color: var(--fu-icon-button-active-bgColor);
33
+ }
34
+ }
35
+
36
+ &.is-disabled {
37
+ color: var(--fu-icon-button-disabled-color);
38
+ background-color: var(--fu-icon-button-disabled-bgColor);
39
+ cursor: not-allowed;
40
+ pointer-events: none;
41
+
42
+ .el-icon {
43
+ color: var(--fu-icon-button-disabled-color);
44
+ }
45
+ }
46
+
47
+ @include m(primary) {
48
+ @include set-type-css-var($color-primary);
49
+ }
50
+ @include m(success) {
51
+ @include set-type-css-var($color-success);
52
+ }
53
+ @include m(warning) {
54
+ @include set-type-css-var($color-warning);
55
+ }
56
+ @include m(danger) {
57
+ @include set-type-css-var($color-danger);
58
+ }
59
+ @include m(info) {
60
+ @include set-type-css-var($color-info);
61
+ }
62
+
63
+ & + & {
64
+ margin-left: var(--fu-icon-button-gap);
65
+ }
66
+ }
@@ -0,0 +1,240 @@
1
+ @use "../common/mixins.scss" as *;
2
+
3
+ @include b(search-bar) {
4
+ @include flex-row(flex-start, center);
5
+ position: relative;
6
+ width: var(--fu-search-bar-width);
7
+ height: var(--fu-search-bar-height);
8
+
9
+ &:after {
10
+ content: "";
11
+ position: absolute;
12
+ bottom: 0;
13
+ left: 0;
14
+ height: 1px;
15
+ width: 100%;
16
+ background-color: #D5D5D5;
17
+ }
18
+
19
+ @include e(content) {
20
+ @include flex-row(flex-start, center);
21
+ margin-right: 10px;
22
+ height: 100%;
23
+ }
24
+
25
+ @include e(buttons) {
26
+ @include flex-row(flex-end, center);
27
+ flex: auto;
28
+ height: 100%;
29
+ }
30
+
31
+ @include b(quick-search) {
32
+ &:after {
33
+ content: none;
34
+ }
35
+ }
36
+ }
37
+
38
+ @include b(search-bar-button) {
39
+ &.el-button {
40
+ @include active-scale(0.9);
41
+ }
42
+ }
43
+
44
+ @include b(search-conditions) {
45
+ @include flex-row(flex-start, center);
46
+ overflow-x: auto;
47
+ overflow-y: hidden;
48
+ height: calc(100% - 2px);
49
+
50
+ &::-webkit-scrollbar {
51
+ height: 6px;
52
+ }
53
+
54
+ &::-webkit-scrollbar-thumb {
55
+ border-radius: 5px;
56
+ }
57
+
58
+ &::-webkit-scrollbar-track {
59
+ border-radius: 5px;
60
+ }
61
+
62
+ @include m(large) {
63
+ font-size: 16px;
64
+
65
+ @include e(item) {
66
+ height: 32px;
67
+ }
68
+ }
69
+
70
+ @include m(small) {
71
+ font-size: 13px;
72
+
73
+ @include e(item) {
74
+ height: 26px;
75
+ }
76
+ }
77
+
78
+ @include e(item) {
79
+ @include flex-row(flex-start, center);
80
+ flex-shrink: 0;
81
+ position: relative;
82
+ box-sizing: border-box;
83
+ padding: 0 10px;
84
+ border-radius: 50px;
85
+ color: var(--fu-search-bar-condition-color);
86
+ background-color: var(--fu-search-bar-condition-bgColor);
87
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 2px 1px -1px rgba(0, 0, 0, .12);
88
+ margin-left: 10px;
89
+ font-size: inherit;
90
+
91
+ &:last-child {
92
+ margin-right: 10px;
93
+ }
94
+
95
+ div + div {
96
+ margin-left: 4px;
97
+ }
98
+
99
+ .condition-value {
100
+ font-style: italic;
101
+ }
102
+
103
+ .condition-remove {
104
+ @include active-scale(0.9);
105
+ margin-left: 6px;
106
+ margin-right: -6px;
107
+ cursor: pointer;
108
+
109
+ &:hover {
110
+ color: var(--el-color-primary);
111
+ }
112
+ }
113
+ }
114
+ }
115
+
116
+ @include b(quick-search) {
117
+ @include flex-row(flex-start, center);
118
+ min-width: 200px;
119
+ position: relative;
120
+
121
+ @include m(large) {
122
+ font-size: 16px;
123
+ }
124
+
125
+ @include m(small) {
126
+ font-size: 12px;
127
+ }
128
+
129
+ &:after {
130
+ content: "";
131
+ position: absolute;
132
+ bottom: 0;
133
+ left: 0;
134
+ height: 1px;
135
+ width: 100%;
136
+ background-color: #D5D5D5;
137
+ }
138
+
139
+ input {
140
+ border: none;
141
+ position: relative;
142
+ font-size: inherit;
143
+ padding: 10px;
144
+ width: 200px;
145
+ box-sizing: border-box;
146
+ color: var(--el-input-text-color);
147
+ background-color: var(--el-input-bg-color);
148
+
149
+ &:focus {
150
+ outline: none;
151
+ }
152
+
153
+ &::placeholder {
154
+ color: var(--el-text-color-placeholder);
155
+ }
156
+ }
157
+
158
+ .clean-button {
159
+ @include active-scale;
160
+ cursor: pointer;
161
+
162
+ &:hover {
163
+ color: var(--el-color-primary);
164
+ }
165
+ }
166
+ }
167
+
168
+ @include b(complex-components-trigger) {
169
+ i {
170
+ transition: transform 0.2s;
171
+ }
172
+
173
+ @include when(active) {
174
+ i {
175
+ transform: rotate(90deg);
176
+ }
177
+ }
178
+ }
179
+
180
+ @include b(complex-components) {
181
+ @include e(body) {
182
+ width: 100%;
183
+ margin: 5px;
184
+ min-width: 200px;
185
+ }
186
+
187
+ @include e(footer) {
188
+ width: 100%;
189
+ text-align: center;
190
+ margin: 5px 0;
191
+ }
192
+ }
193
+
194
+ @include b(complex-component) {
195
+ @include flex-row(space-between, center);
196
+ gap: 20px;
197
+ padding: 5px;
198
+
199
+ @include e(content) {
200
+ flex: 1;
201
+ }
202
+
203
+ @include e(label) {
204
+ width: 80px;
205
+ padding: 0 5px;
206
+ flex-grow: 0;
207
+ flex-shrink: 0;
208
+ font-size: inherit;
209
+
210
+ @include m(large) {
211
+ font-size: 14px;
212
+ }
213
+ }
214
+
215
+ @include e(value) {
216
+ padding: 0 5px;
217
+ flex-grow: 1;
218
+ min-width: 240px;
219
+ }
220
+ }
221
+
222
+ @include b(complex-select) {
223
+ &.el-select {
224
+ width: 100%;
225
+ }
226
+ }
227
+
228
+ @include b(complex-date) {
229
+ &.el-date-editor {
230
+ width: 100% !important;
231
+ box-sizing: border-box;
232
+ }
233
+ }
234
+
235
+ @include b(complex-date-time) {
236
+ &.el-date-editor {
237
+ width: 100% !important;
238
+ box-sizing: border-box;
239
+ }
240
+ }
@@ -1,38 +1,6 @@
1
1
  @use "../common/mixins.scss" as *;
2
2
  @use "../common/variables.scss" as *;
3
3
 
4
- // @mixin speed-dial-button-variant($color, $background-color) {
5
- // color: $color;
6
- // background-color: $background-color;
7
-
8
- // &:hover,
9
- // &:focus {
10
- // background: mix($--color-white, $background-color, $--button-hover-tint-percent);
11
- // color: $color;
12
- // }
13
-
14
- // &:active {
15
- // background: mix($--color-black, $background-color, $--button-active-shade-percent);
16
- // color: $color;
17
- // outline: none;
18
- // }
19
-
20
- // &.is-active {
21
- // background: mix($--color-black, $background-color, $--button-active-shade-percent);
22
- // color: $color;
23
- // }
24
-
25
- // &.is-disabled {
26
- // &,
27
- // &:hover,
28
- // &:focus,
29
- // &:active {
30
- // color: $--color-white;
31
- // background-color: mix($background-color, $--color-white);
32
- // }
33
- // }
34
- // }
35
-
36
4
  @include b(speed-dial) {
37
5
  width: 0;
38
6
 
@@ -47,6 +15,7 @@
47
15
  box-sizing: border-box;
48
16
  cursor: pointer;
49
17
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
18
+ padding: 0;
50
19
  @include active-scale(0.9);
51
20
 
52
21
  @include m(rotate) {
@@ -60,25 +29,6 @@
60
29
  }
61
30
  }
62
31
  }
63
-
64
- // @include m(default) {
65
- // @include speed-dial-button-variant($--button-default-font-color, $--button-default-background-color);
66
- // }
67
- // @include m(primary) {
68
- // @include speed-dial-button-variant($--button-primary-font-color, $--button-primary-background-color);
69
- // }
70
- // @include m(success) {
71
- // @include speed-dial-button-variant($--button-success-font-color, $--button-success-background-color);
72
- // }
73
- // @include m(warning) {
74
- // @include speed-dial-button-variant($--button-warning-font-color, $--button-warning-background-color);
75
- // }
76
- // @include m(danger) {
77
- // @include speed-dial-button-variant($--button-danger-font-color, $--button-danger-background-color);
78
- // }
79
- // @include m(info) {
80
- // @include speed-dial-button-variant($--button-info-font-color, $--button-info-background-color);
81
- // }
82
32
  }
83
33
 
84
34
  @include b(speed-dial-item) {