@douyinfe/semi-foundation 2.70.1 → 2.71.0-alpha.3

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 (58) hide show
  1. package/cascader/constants.ts +2 -0
  2. package/cascader/foundation.ts +49 -2
  3. package/dragMove/foundation.ts +194 -0
  4. package/highlight/foundation.ts +211 -0
  5. package/jsonViewer/constants.ts +7 -0
  6. package/jsonViewer/foundation.ts +72 -0
  7. package/jsonViewer/jsonViewer.scss +200 -0
  8. package/jsonViewer/script/build.js +51 -0
  9. package/jsonViewer/variables.scss +15 -0
  10. package/lib/cjs/cascader/constants.d.ts +2 -0
  11. package/lib/cjs/cascader/constants.js +3 -1
  12. package/lib/cjs/cascader/foundation.d.ts +3 -0
  13. package/lib/cjs/cascader/foundation.js +55 -3
  14. package/lib/cjs/dragMove/foundation.d.ts +45 -0
  15. package/lib/cjs/dragMove/foundation.js +162 -0
  16. package/lib/cjs/highlight/foundation.d.ts +84 -0
  17. package/lib/cjs/highlight/foundation.js +184 -0
  18. package/lib/cjs/jsonViewer/constants.d.ts +4 -0
  19. package/lib/cjs/jsonViewer/constants.js +10 -0
  20. package/lib/cjs/jsonViewer/foundation.d.ts +24 -0
  21. package/lib/cjs/jsonViewer/foundation.js +69 -0
  22. package/lib/cjs/jsonViewer/jsonViewer.css +168 -0
  23. package/lib/cjs/jsonViewer/jsonViewer.scss +200 -0
  24. package/lib/cjs/jsonViewer/variables.scss +15 -0
  25. package/lib/cjs/lottie/foundation.d.ts +1 -1
  26. package/lib/cjs/resizable/foundation.d.ts +6 -2
  27. package/lib/cjs/tree/tree.css +1 -0
  28. package/lib/cjs/tree/tree.scss +2 -0
  29. package/lib/es/cascader/constants.d.ts +2 -0
  30. package/lib/es/cascader/constants.js +3 -1
  31. package/lib/es/cascader/foundation.d.ts +3 -0
  32. package/lib/es/cascader/foundation.js +55 -3
  33. package/lib/es/dragMove/foundation.d.ts +45 -0
  34. package/lib/es/dragMove/foundation.js +153 -0
  35. package/lib/es/highlight/foundation.d.ts +84 -0
  36. package/lib/es/highlight/foundation.js +174 -0
  37. package/lib/es/jsonViewer/constants.d.ts +4 -0
  38. package/lib/es/jsonViewer/constants.js +5 -0
  39. package/lib/es/jsonViewer/foundation.d.ts +24 -0
  40. package/lib/es/jsonViewer/foundation.js +62 -0
  41. package/lib/es/jsonViewer/jsonViewer.css +168 -0
  42. package/lib/es/jsonViewer/jsonViewer.scss +200 -0
  43. package/lib/es/jsonViewer/variables.scss +15 -0
  44. package/lib/es/lottie/foundation.d.ts +1 -1
  45. package/lib/es/resizable/foundation.d.ts +6 -2
  46. package/lib/es/resizable/foundation.js +3 -2
  47. package/lib/es/tree/tree.css +1 -0
  48. package/lib/es/tree/tree.scss +2 -0
  49. package/lottie/foundation.ts +2 -2
  50. package/package.json +5 -3
  51. package/resizable/foundation.ts +19 -5
  52. package/tree/tree.scss +2 -0
  53. package/tsconfig.json +1 -1
  54. package/lib/cjs/utils/getHighlight.d.ts +0 -45
  55. package/lib/cjs/utils/getHighlight.js +0 -175
  56. package/lib/es/utils/getHighlight.d.ts +0 -45
  57. package/lib/es/utils/getHighlight.js +0 -166
  58. package/utils/getHighlight.ts +0 -178
@@ -0,0 +1,168 @@
1
+ /* shadow */
2
+ /* sizing */
3
+ /* spacing */
4
+ .semi-json-viewer-background {
5
+ background-color: var(--semi-color-default);
6
+ }
7
+ .semi-json-viewer-string-key {
8
+ color: rgba(var(--semi-red-5), 1);
9
+ }
10
+ .semi-json-viewer-string-value {
11
+ color: rgba(var(--semi-blue-5), 1);
12
+ }
13
+ .semi-json-viewer-keyword {
14
+ color: rgba(var(--semi-blue-5), 1);
15
+ }
16
+ .semi-json-viewer-number {
17
+ color: rgba(var(--semi-green-5), 1);
18
+ }
19
+ .semi-json-viewer-delimiter-comma {
20
+ color: rgba(var(--semi-blue-6), 1);
21
+ }
22
+ .semi-json-viewer-delimiter-bracket-0 {
23
+ color: rgba(var(--semi-blue-7), 1);
24
+ }
25
+ .semi-json-viewer-delimiter-bracket-1 {
26
+ color: rgba(var(--semi-green-7), 1);
27
+ }
28
+ .semi-json-viewer-delimiter-bracket-2 {
29
+ color: rgba(var(--semi-orange-7), 1);
30
+ }
31
+ .semi-json-viewer-delimiter-array-0 {
32
+ color: rgba(var(--semi-blue-7), 1);
33
+ }
34
+ .semi-json-viewer-delimiter-array-1 {
35
+ color: rgba(var(--semi-green-7), 1);
36
+ }
37
+ .semi-json-viewer-delimiter-array-2 {
38
+ color: rgba(var(--semi-orange-7), 1);
39
+ }
40
+ .semi-json-viewer-search-result {
41
+ background-color: rgba(var(--semi-green-2), 1);
42
+ }
43
+ .semi-json-viewer-current-search-result {
44
+ background-color: rgba(var(--semi-yellow-4), 1) !important;
45
+ }
46
+ .semi-json-viewer-folding-icon {
47
+ opacity: 0.7;
48
+ transition: opacity 0.8s;
49
+ color: rgba(var(--semi-blue-7), 1);
50
+ }
51
+ .semi-json-viewer-view-line {
52
+ font-family: Menlo, Firecode, Monaco, "Courier New", monospace;
53
+ font-weight: normal;
54
+ font-size: 12px;
55
+ font-feature-settings: "liga" 0, "calt" 0;
56
+ font-variation-settings: normal;
57
+ letter-spacing: 0px;
58
+ color: #237893;
59
+ word-wrap: break-word;
60
+ white-space: pre-wrap;
61
+ }
62
+ .semi-json-viewer-line-number {
63
+ font-family: Menlo, Firecode, Monaco, "Courier New", monospace;
64
+ font-weight: normal;
65
+ font-size: 12px;
66
+ font-feature-settings: "liga" 0, "calt" 0;
67
+ font-variation-settings: normal;
68
+ letter-spacing: 0px;
69
+ color: rgba(var(--semi-grey-5), 1);
70
+ text-align: center;
71
+ width: 50px;
72
+ }
73
+ .semi-json-viewer-content-container {
74
+ scrollbar-width: none; /* 隐藏滚动条(Firefox) */
75
+ -ms-overflow-style: none; /* 隐藏滚动条(IE 和 Edge) */
76
+ }
77
+ .semi-json-viewer-content-container::-webkit-scrollbar {
78
+ display: none; /* 隐藏滚动条(Webkit 浏览器) */
79
+ }
80
+ .semi-json-viewer-search-bar-container {
81
+ width: 458px;
82
+ box-sizing: border-box;
83
+ border: 1px solid var(--semi-color-border);
84
+ border-radius: var(--semi-border-radius-small);
85
+ display: flex;
86
+ flex-direction: column;
87
+ padding: 8px;
88
+ gap: 8px;
89
+ background-color: var(--semi-color-bg-0);
90
+ }
91
+ .semi-json-viewer-search-bar {
92
+ display: flex;
93
+ align-items: flex-start;
94
+ gap: 8px;
95
+ }
96
+ .semi-json-viewer-search-bar-input {
97
+ width: 200px;
98
+ flex-shrink: 0;
99
+ }
100
+ .semi-json-viewer-search-bar .semi-button-group {
101
+ flex-wrap: nowrap;
102
+ }
103
+ .semi-json-viewer-search-bar .semi-button:nth-of-type(1) {
104
+ width: 40px;
105
+ }
106
+ .semi-json-viewer-search-bar .semi-button:nth-of-type(2) {
107
+ width: 40px;
108
+ }
109
+ .semi-json-viewer-replace-bar {
110
+ display: flex;
111
+ align-items: flex-start;
112
+ gap: 8px;
113
+ }
114
+ .semi-json-viewer-replace-bar-input {
115
+ width: 261px;
116
+ }
117
+ .semi-json-viewer-replace-bar .semi-button:nth-of-type(1) {
118
+ width: 52px;
119
+ }
120
+ .semi-json-viewer-replace-bar .semi-button:nth-of-type(2) {
121
+ width: 80px;
122
+ }
123
+ .semi-json-viewer-search-options {
124
+ display: flex;
125
+ align-items: center;
126
+ justify-content: center;
127
+ list-style: none;
128
+ padding-inline-start: 0;
129
+ margin-block-start: 0;
130
+ margin-block-end: 0;
131
+ gap: 8px;
132
+ }
133
+ .semi-json-viewer-search-options-item {
134
+ min-width: 32px;
135
+ height: 32px;
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ cursor: pointer;
140
+ border-radius: var(--semi-border-radius-small);
141
+ color: var(--semi-color-text-2);
142
+ }
143
+ .semi-json-viewer-search-options-item:hover {
144
+ background-color: var(--semi-color-default);
145
+ }
146
+ .semi-json-viewer-search-options-item-active {
147
+ color: var(--semi-color-primary);
148
+ background-color: var(--semi-color-primary-light-default);
149
+ }
150
+ .semi-json-viewer-complete-suggestions-container {
151
+ border-radius: var(--semi-border-radius-medium);
152
+ background-color: var(--semi-color-bg-3);
153
+ box-shadow: var(--semi-shadow-elevated);
154
+ z-index: 1000;
155
+ min-width: 200px;
156
+ max-width: 400px;
157
+ list-style: none;
158
+ padding: 4px 0;
159
+ }
160
+ .semi-json-viewer-complete-container {
161
+ position: absolute;
162
+ z-index: 1000;
163
+ }
164
+ .semi-json-viewer-complete-suggestions-item {
165
+ padding: 8px 16px;
166
+ color: var(--semi-color-text-0);
167
+ cursor: pointer;
168
+ }
@@ -0,0 +1,200 @@
1
+ @import './variables.scss';
2
+
3
+ $module: #{$prefix}-json-viewer;
4
+
5
+ .#{$module} {
6
+ &-background {
7
+ background-color: $color-json-viewer-background;
8
+ }
9
+
10
+ &-string-key {
11
+ color: $color-json-viewer-key;
12
+ }
13
+
14
+ &-string-value {
15
+ color: $color-json-viewer-value;
16
+ }
17
+
18
+ &-keyword {
19
+ color: $color-json-viewer-keyword;
20
+ }
21
+
22
+ &-number {
23
+ color: $color-json-viewer-number;
24
+ }
25
+
26
+ &-delimiter-comma {
27
+ color: $color-json-viewer-delimiter-comma;
28
+ }
29
+
30
+ &-delimiter-bracket-0 {
31
+ color: rgba(var(--semi-blue-7), 1);
32
+ }
33
+ &-delimiter-bracket-1 {
34
+ color: rgba(var(--semi-green-7), 1);
35
+ }
36
+ &-delimiter-bracket-2 {
37
+ color: rgba(var(--semi-orange-7), 1);
38
+ }
39
+ &-delimiter-array-0 {
40
+ color: rgba(var(--semi-blue-7), 1);
41
+ }
42
+ &-delimiter-array-1 {
43
+ color: rgba(var(--semi-green-7), 1);
44
+ }
45
+ &-delimiter-array-2 {
46
+ color: rgba(var(--semi-orange-7), 1);
47
+ }
48
+
49
+ &-search-result {
50
+ background-color: $color-json-viewer-search-result-background;
51
+ }
52
+
53
+ &-current-search-result {
54
+ background-color: $color-json-viewer-current-search-result-background !important;
55
+ }
56
+
57
+ &-folding-icon {
58
+ opacity: 0.7;
59
+ transition: opacity 0.8s;
60
+ color: $color-json-viewer-folding-icon;
61
+ }
62
+
63
+ &-view-line {
64
+ font-family: Menlo, Firecode, Monaco, 'Courier New', monospace;
65
+ font-weight: normal;
66
+ font-size: 12px;
67
+ font-feature-settings: 'liga' 0, 'calt' 0;
68
+ font-variation-settings: normal;
69
+ letter-spacing: 0px;
70
+ color: #237893;
71
+ word-wrap: break-word;
72
+ white-space: pre-wrap;
73
+ }
74
+
75
+ &-line-number {
76
+ font-family: Menlo, Firecode, Monaco, 'Courier New', monospace;
77
+ font-weight: normal;
78
+ font-size: 12px;
79
+ font-feature-settings: 'liga' 0, 'calt' 0;
80
+ font-variation-settings: normal;
81
+ letter-spacing: 0px;
82
+ color: $color-json-viewer-line-number;
83
+ text-align: center;
84
+ width: 50px;
85
+ }
86
+
87
+ &-content-container {
88
+ scrollbar-width: none; /* 隐藏滚动条(Firefox) */
89
+ -ms-overflow-style: none; /* 隐藏滚动条(IE 和 Edge) */
90
+ }
91
+
92
+ &-content-container::-webkit-scrollbar {
93
+ display: none; /* 隐藏滚动条(Webkit 浏览器) */
94
+ }
95
+
96
+ &-search-bar-container {
97
+ width: 458px;
98
+ box-sizing: border-box;
99
+ border: 1px solid var(--semi-color-border);
100
+ border-radius: var(--semi-border-radius-small);
101
+ display: flex;
102
+ flex-direction: column;
103
+ padding: 8px;
104
+ gap: 8px;
105
+ background-color: var(--semi-color-bg-0);
106
+ }
107
+
108
+ &-search-bar {
109
+ display: flex;
110
+ align-items: flex-start;
111
+ gap: 8px;
112
+ &-input {
113
+ width: 200px;
114
+ flex-shrink: 0;
115
+ }
116
+ .#{$prefix}-button-group {
117
+ flex-wrap: nowrap;
118
+ }
119
+ // next icon btn
120
+ .#{$prefix}-button:nth-of-type(1) {
121
+ width: 40px;
122
+ }
123
+ // prev icon btn
124
+ .#{$prefix}-button:nth-of-type(2) {
125
+ width: 40px;
126
+ }
127
+ }
128
+
129
+ &-replace-bar {
130
+ display: flex;
131
+ align-items: flex-start;
132
+ gap: 8px;
133
+ &-input {
134
+ width: 261px;
135
+ }
136
+ // replace btn
137
+ .#{$prefix}-button:nth-of-type(1) {
138
+ width: 52px;
139
+ }
140
+ // all replace btn
141
+ .#{$prefix}-button:nth-of-type(2) {
142
+ width: 80px;
143
+ }
144
+ }
145
+
146
+ &-search-options {
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ list-style: none;
151
+ padding-inline-start: 0;
152
+ margin-block-start: 0;
153
+ margin-block-end: 0;
154
+ gap: 8px;
155
+ }
156
+
157
+ &-search-options-item {
158
+ min-width: 32px;
159
+ height: 32px;
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ cursor: pointer;
164
+ border-radius: var(--semi-border-radius-small);
165
+ color: var(--semi-color-text-2);
166
+ }
167
+
168
+ &-search-options-item:hover {
169
+ background-color: var(--semi-color-default);
170
+ }
171
+
172
+ &-search-options-item-active {
173
+ color: var(--semi-color-primary);
174
+ background-color: var(--semi-color-primary-light-default);
175
+ }
176
+
177
+ &-complete-suggestions-container {
178
+ border-radius: var(--semi-border-radius-medium);
179
+ background-color: var(--semi-color-bg-3);
180
+ box-shadow: var(--semi-shadow-elevated);
181
+ z-index: 1000;
182
+ min-width: 200px;
183
+ max-width: 400px;
184
+ list-style: none;
185
+ padding: 4px 0;
186
+ }
187
+
188
+ &-complete-container {
189
+ position: absolute;
190
+ z-index: 1000;
191
+ }
192
+
193
+ &-complete-suggestions-item {
194
+ padding: 8px 16px;
195
+ color: var(--semi-color-text-0);
196
+ cursor: pointer;
197
+ }
198
+
199
+
200
+ }
@@ -0,0 +1,15 @@
1
+ $color-json-viewer-background: var(--semi-color-default); // JSON背景颜色
2
+ $color-json-viewer-key: rgba(var(--semi-red-5), 1); // JSON key 颜色
3
+ $color-json-viewer-value: rgba(var(--semi-blue-5), 1);
4
+ $color-json-viewer-number: rgba(var(--semi-green-5), 1); // JSON number 颜色
5
+ $color-json-viewer-keyword: rgba(var(--semi-blue-5), 1); // JSON keyword 颜色
6
+ $color-json-viewer-delimiter-comma: rgba(var(--semi-blue-6), 1); // JSON delimiter comma 颜色
7
+
8
+
9
+ $color-json-viewer-search-result-background: rgba(var(--semi-green-2), 1); // JSON search result background 颜色
10
+ $color-json-viewer-current-search-result-background: rgba(var(--semi-yellow-4), 1); // JSON current search result background 颜色
11
+
12
+ $color-json-viewer-folding-icon: rgba(var(--semi-blue-7), 1); // JSON folding icon 颜色
13
+
14
+
15
+ $color-json-viewer-line-number: rgba(var(--semi-grey-5), 1); // JSON line number 颜色
@@ -8,7 +8,7 @@ export interface LottieAdapter<P = Record<string, any>, S = Record<string, any>>
8
8
  export interface LottieBaseProps {
9
9
  width?: string;
10
10
  height?: string;
11
- params: ArgsType<typeof lottie.loadAnimation>[0];
11
+ params: Partial<ArgsType<typeof lottie.loadAnimation>[0]>;
12
12
  getAnimationInstance?: (instance: AnimationItem | null) => void;
13
13
  getLottie?: (lottiePKG: typeof lottie) => void;
14
14
  }
@@ -1,2 +1,6 @@
1
- export { ResizableHandlerAdapter, ResizableHandlerFoundation, ResizableFoundation, ResizableAdapter } from './single';
2
- export { ResizeGroupAdapter, ResizeItemAdapter, ResizeHandlerAdapter, ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
1
+ import { ResizableHandlerFoundation, ResizableFoundation } from './single';
2
+ import { ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
3
+ import type { ResizableHandlerAdapter, ResizableAdapter } from './single';
4
+ import type { ResizeGroupAdapter, ResizeItemAdapter, ResizeHandlerAdapter } from './group';
5
+ export type { ResizableHandlerAdapter, ResizableAdapter, ResizeGroupAdapter, ResizeItemAdapter, ResizeHandlerAdapter, };
6
+ export { ResizableHandlerFoundation, ResizableFoundation, ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation };
@@ -1,2 +1,3 @@
1
- export { ResizableHandlerFoundation, ResizableFoundation } from './single';
2
- export { ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
1
+ import { ResizableHandlerFoundation, ResizableFoundation } from './single';
2
+ import { ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
3
+ export { ResizableHandlerFoundation, ResizableFoundation, ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation };
@@ -107,6 +107,7 @@
107
107
  .semi-tree-option-list .semi-tree-option-highlight {
108
108
  font-weight: 600;
109
109
  color: var(--semi-color-primary);
110
+ background-color: inherit;
110
111
  }
111
112
  .semi-tree-option-list .semi-tree-option-hidden {
112
113
  display: none;
@@ -137,6 +137,8 @@ $module: #{$prefix}-tree;
137
137
  &-highlight {
138
138
  font-weight: $font-tree_option_hightlight-fontWeight;
139
139
  color: $color-tree_option_hightlight-text;
140
+ // set inherit to override highlight component default bgc
141
+ background-color: inherit;
140
142
  }
141
143
 
142
144
  &-hidden {
@@ -10,7 +10,7 @@ export interface LottieAdapter<P = Record<string, any>, S = Record<string, any>>
10
10
  export interface LottieBaseProps {
11
11
  width?: string;
12
12
  height?: string;
13
- params: ArgsType<typeof lottie.loadAnimation>[0];
13
+ params: Partial<ArgsType<typeof lottie.loadAnimation>[0]>;
14
14
  getAnimationInstance?: (instance: AnimationItem|null) => void;
15
15
  getLottie?: (lottiePKG: typeof lottie) => void
16
16
 
@@ -57,4 +57,4 @@ class LottieFoundation <P = Record<string, any>, S = Record<string, any>> extend
57
57
 
58
58
  }
59
59
 
60
- export default LottieFoundation;
60
+ export default LottieFoundation;
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.70.1",
3
+ "version": "2.71.0-alpha.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@douyinfe/semi-animation": "2.70.1",
10
+ "@douyinfe/semi-animation": "2.71.0-alpha.3",
11
+ "@douyinfe/semi-json-viewer-core": "2.71.0-alpha.3",
11
12
  "@mdx-js/mdx": "^3.0.1",
12
13
  "async-validator": "^3.5.0",
13
14
  "classnames": "^2.2.6",
@@ -28,7 +29,7 @@
28
29
  "*.scss",
29
30
  "*.css"
30
31
  ],
31
- "gitHead": "782c2fb120e3a72460408ba5e81271fdd8ce8238",
32
+ "gitHead": "156f6a12ab4c342a4807b6c55ce0f24a4a56d8e2",
32
33
  "devDependencies": {
33
34
  "@babel/plugin-transform-runtime": "^7.15.8",
34
35
  "@babel/preset-env": "^7.15.8",
@@ -37,6 +38,7 @@
37
38
  "@types/prismjs": "^1.26.3",
38
39
  "babel-plugin-lodash": "^3.3.4",
39
40
  "del": "^6.0.0",
41
+ "esbuild": "0.24.0",
40
42
  "gulp": "^4.0.2",
41
43
  "gulp-babel": "^8.0.0",
42
44
  "gulp-replace": "^1.1.3",
@@ -1,15 +1,29 @@
1
- export {
2
- ResizableHandlerAdapter,
1
+ import {
3
2
  ResizableHandlerFoundation,
4
3
  ResizableFoundation,
5
- ResizableAdapter
6
4
  } from './single';
7
5
 
8
- export {
6
+ import {
7
+ ResizeGroupFoundation,
8
+ ResizeItemFoundation,
9
+ ResizeHandlerFoundation
10
+ } from './group';
11
+
12
+ import type { ResizableHandlerAdapter, ResizableAdapter } from './single';
13
+ import type { ResizeGroupAdapter, ResizeItemAdapter, ResizeHandlerAdapter } from './group';
14
+
15
+ export type {
16
+ ResizableHandlerAdapter,
17
+ ResizableAdapter,
9
18
  ResizeGroupAdapter,
10
19
  ResizeItemAdapter,
11
20
  ResizeHandlerAdapter,
21
+ };
22
+
23
+ export {
24
+ ResizableHandlerFoundation,
25
+ ResizableFoundation,
12
26
  ResizeGroupFoundation,
13
27
  ResizeItemFoundation,
14
28
  ResizeHandlerFoundation
15
- } from './group';
29
+ };
package/tree/tree.scss CHANGED
@@ -137,6 +137,8 @@ $module: #{$prefix}-tree;
137
137
  &-highlight {
138
138
  font-weight: $font-tree_option_hightlight-fontWeight;
139
139
  color: $color-tree_option_hightlight-text;
140
+ // set inherit to override highlight component default bgc
141
+ background-color: inherit;
140
142
  }
141
143
 
142
144
  &-hidden {
package/tsconfig.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "sourceMap": true,
7
7
  "allowJs": true,
8
8
  "module": "es6",
9
- "lib": ["es7", "dom", "es2017"],
9
+ "lib": ["esnext", "dom"],
10
10
  "moduleResolution": "node",
11
11
  "noImplicitAny": false,
12
12
  "forceConsistentCasingInFileNames": true,
@@ -1,45 +0,0 @@
1
- interface ChunkQuery {
2
- autoEscape?: boolean;
3
- caseSensitive?: boolean;
4
- searchWords: string[];
5
- sourceString: string;
6
- }
7
- interface Chunk {
8
- start: number;
9
- end: number;
10
- highlight: boolean;
11
- }
12
- /**
13
- * Creates an array of chunk objects representing both higlightable and non highlightable pieces of text that match each search word.
14
- *
15
- findAll ['z'], 'aaazaaazaaa'
16
- result #=> [
17
- { start: 0, end: 3, highlight: false }
18
- { start: 3, end: 4, highlight: true }
19
- { start: 4, end: 7, highlight: false }
20
- { start: 7, end: 8, highlight: true }
21
- { start: 8, end: 11, highlight: false }
22
- ]
23
-
24
- findAll ['do', 'dollar'], 'aaa do dollar aaa'
25
- #=> chunks: [
26
- { start: 4, end: 6 },
27
- { start: 7, end: 9 },
28
- { start: 7, end: 13 },
29
- ]
30
- #=> chunksToHight: [
31
- { start: 4, end: 6 },
32
- { start: 7, end: 13 },
33
- ]
34
- #=> result: [
35
- { start: 0, end: 4, highlight: false },
36
- { start: 4, end: 6, highlight: true },
37
- { start: 6, end: 7, highlight: false },
38
- { start: 7, end: 13, highlight: true },
39
- { start: 13, end: 17, highlight: false },
40
- ]
41
-
42
- * @return Array of "chunks" (where a Chunk is { start:number, end:number, highlight:boolean })
43
- */
44
- declare const findAll: ({ autoEscape, caseSensitive, searchWords, sourceString }: ChunkQuery) => Chunk[];
45
- export { findAll };