@veltra/sheet 2.0.1 → 2.2.0
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.
- package/dist/components/report/binding-badge.js +76 -0
- package/dist/components/report/designer/cell-coords.js +46 -0
- package/dist/components/report/designer/col-widths.js +15 -0
- package/dist/components/report/designer/conditional-rules/helpers.js +139 -0
- package/dist/components/report/designer/drop-highlight-overlay.js +76 -0
- package/dist/components/report/designer/float-panel.js +385 -0
- package/dist/components/report/designer/role.js +17 -0
- package/dist/components/report/designer/rule-preview.js +33 -0
- package/dist/components/report/designer/rule-row.js +269 -0
- package/dist/components/report/designer/rules-dialog.js +135 -0
- package/dist/components/report/designer/topology-overlay.js +122 -0
- package/dist/components/report/designer/topology.js +64 -0
- package/dist/components/report/designer/use-grid-overlay.js +75 -0
- package/dist/components/report/designer-hub.js +177 -0
- package/dist/components/report/field-panel-helpers.js +33 -0
- package/dist/components/report/field-panel.js +132 -0
- package/dist/components/report/filter-bar.js +74 -0
- package/dist/components/report/hub-connection-form.js +145 -0
- package/dist/components/report/hub-dataset-editor.js +394 -0
- package/dist/components/report/report-designer.js +343 -0
- package/dist/components/report/report-viewer.js +111 -0
- package/dist/components/report/style.d.ts +17 -0
- package/dist/components/report/style.js +18 -0
- package/dist/components/report/style2.css +869 -0
- package/dist/components/report/use-report-designer.js +360 -0
- package/dist/components/report/use-report-viewer.js +50 -0
- package/dist/components/sheet/formula-bar.js +393 -0
- package/dist/components/sheet/formula-suggest-list.js +66 -0
- package/dist/components/sheet/import-file.js +140 -0
- package/dist/components/sheet/insert-count-menu-item.js +68 -0
- package/dist/components/sheet/insert-image.js +79 -0
- package/dist/components/sheet/popup-helpers.js +73 -0
- package/dist/components/sheet/popups/border-popup.js +75 -0
- package/dist/components/sheet/popups/border-preset-glyph.js +106 -0
- package/dist/components/sheet/popups/export-popup.js +51 -0
- package/dist/components/sheet/popups/fill-color-popup.js +37 -0
- package/dist/components/sheet/popups/find-popup.js +113 -0
- package/dist/components/sheet/popups/font-color-popup.js +37 -0
- package/dist/components/sheet/popups/font-size-popup.js +63 -0
- package/dist/components/sheet/popups/import.worker.d.ts +21 -0
- package/dist/components/sheet/popups/import.worker.js +41 -0
- package/dist/components/sheet/popups/insert-image-popup.js +38 -0
- package/dist/components/sheet/sheet-context-menu.js +200 -0
- package/dist/components/sheet/sheet-tabs.js +162 -0
- package/dist/components/sheet/sheet-toolbar.js +106 -0
- package/dist/components/sheet/sheet.js +198 -0
- package/dist/components/sheet/style.d.ts +11 -0
- package/dist/components/sheet/style.js +12 -0
- package/dist/components/sheet/style2.css +654 -0
- package/dist/components/sheet/use-find-replace.js +161 -0
- package/dist/components/sheet/use-formula-ref-select.js +37 -0
- package/dist/components/sheet/use-formula-suggest.js +126 -0
- package/dist/components/sheet/use-sheet-grid.js +188 -0
- package/dist/components/sheet/use-sheet-state.js +122 -0
- package/dist/components/sheet/use-sheet-tabs-bar.js +90 -0
- package/dist/components/sheet/use-tool-groups.js +42 -0
- package/dist/components/sheet/use-tool-popup.js +123 -0
- package/dist/components/sheet/use-toolbar-scroll.js +72 -0
- package/dist/index.d.ts +18 -26
- package/dist/index.js +14 -24
- package/dist/report/binding.d.ts +45 -0
- package/dist/report/binding.js +175 -0
- package/dist/report/connector.d.ts +66 -0
- package/dist/report/connector.js +159 -0
- package/dist/report/export-xlsx.d.ts +19 -0
- package/dist/report/export-xlsx.js +95 -0
- package/dist/report/filter-bar.d.ts +10 -0
- package/dist/report/filter-bar.js +31 -0
- package/dist/report/index.d.ts +12 -0
- package/dist/report/params.d.ts +13 -0
- package/dist/report/params.js +61 -0
- package/dist/report/render/aggregate.js +157 -0
- package/dist/report/render/builder.d.ts +12 -0
- package/dist/report/render/builder.js +139 -0
- package/dist/report/render/coordinate.d.ts +25 -0
- package/dist/report/render/coordinate.js +733 -0
- package/dist/report/render/index.d.ts +14 -0
- package/dist/report/render/index.js +21 -0
- package/dist/report/render/style-resolver.js +50 -0
- package/dist/report/render/template-index.d.ts +24 -0
- package/dist/report/render/template-index.js +137 -0
- package/dist/report/rules/evaluate.d.ts +25 -0
- package/dist/report/rules/evaluate.js +82 -0
- package/dist/report/rules/index.d.ts +2 -0
- package/dist/report/template.d.ts +59 -0
- package/dist/report/template.js +80 -0
- package/dist/report/types.d.ts +85 -0
- package/dist/tools/builtin.js +279 -8
- package/dist/tools/context.d.ts +54 -11
- package/dist/tools/context.js +28 -5
- package/dist/tools/download.js +68 -0
- package/dist/tools/export.worker.d.ts +16 -0
- package/dist/tools/export.worker.js +29 -0
- package/dist/tools/registry.d.ts +7 -4
- package/dist/tools/registry.js +1 -3
- package/dist/types/index.d.ts +3 -1
- package/dist/types/report-designer.d.ts +36 -0
- package/dist/types/report-viewer.d.ts +38 -0
- package/dist/types/sheet.d.ts +22 -5
- package/package.json +10 -7
- package/src/components/report/__test__/conditional-rules-helpers.test.ts +87 -0
- package/src/components/report/__test__/field-panel-helpers.test.ts +65 -0
- package/src/components/report/__test__/float-panel-position.test.ts +45 -0
- package/src/components/report/__test__/report-designer.test.ts +388 -0
- package/src/components/report/__test__/report-viewer.test.ts +334 -0
- package/src/components/report/__test__/topology.test.ts +143 -0
- package/src/components/report/__test__/use-report-designer.test.ts +565 -0
- package/src/components/report/binding-badge.ts +73 -0
- package/src/components/report/designer/cell-coords.ts +94 -0
- package/src/components/report/designer/col-widths.ts +33 -0
- package/src/components/report/designer/conditional-rules/helpers.ts +186 -0
- package/src/components/report/designer/drop-highlight-overlay.vue +74 -0
- package/src/components/report/designer/float-panel.vue +387 -0
- package/src/components/report/designer/role.ts +32 -0
- package/src/components/report/designer/rule-preview.vue +40 -0
- package/src/components/report/designer/rule-row.vue +252 -0
- package/src/components/report/designer/rules-dialog.vue +126 -0
- package/src/components/report/designer/topology-overlay.vue +127 -0
- package/src/components/report/designer/topology.ts +124 -0
- package/src/components/report/designer/use-grid-overlay.ts +113 -0
- package/src/components/report/designer-hub.vue +198 -0
- package/src/components/report/field-panel-helpers.ts +44 -0
- package/src/components/report/field-panel.vue +136 -0
- package/src/components/report/filter-bar.vue +77 -0
- package/src/components/report/hub-connection-form.vue +124 -0
- package/src/components/report/hub-dataset-editor.vue +369 -0
- package/src/components/report/index.ts +2 -0
- package/src/components/report/report-designer.vue +356 -0
- package/src/components/report/report-viewer.vue +128 -0
- package/src/components/report/style-designer.scss +583 -0
- package/src/components/report/style-hub.scss +292 -0
- package/src/components/report/style-viewer.scss +104 -0
- package/src/components/report/style.scss +3 -0
- package/src/components/report/style.ts +20 -0
- package/src/components/report/use-report-designer.ts +547 -0
- package/src/components/report/use-report-viewer.ts +79 -0
- package/src/components/sheet/__test__/formula-bar.test.ts +474 -0
- package/src/components/sheet/__test__/import-file.test.ts +183 -0
- package/src/components/sheet/__test__/insert-count-menu-item.test.ts +123 -0
- package/src/components/sheet/__test__/insert-image-popup.test.ts +89 -0
- package/src/components/sheet/__test__/insert-image.test.ts +100 -0
- package/src/components/sheet/__test__/sheet-component.test.ts +993 -0
- package/src/components/sheet/__test__/sheet-context-menu.test.ts +206 -0
- package/src/components/sheet/__test__/use-formula-ref-select.test.ts +35 -0
- package/src/components/sheet/__test__/use-formula-suggest.test.ts +83 -0
- package/src/components/sheet/formula-bar.vue +473 -0
- package/src/components/sheet/formula-suggest-list.vue +64 -0
- package/src/components/sheet/import-file.ts +173 -0
- package/src/components/sheet/insert-count-menu-item.vue +69 -0
- package/src/components/sheet/insert-image.ts +90 -0
- package/src/components/sheet/parsing.ts +11 -0
- package/src/components/sheet/popup-helpers.ts +50 -0
- package/src/components/sheet/popups/border-popup.vue +93 -0
- package/src/components/sheet/popups/border-preset-glyph.vue +111 -0
- package/src/components/sheet/popups/export-popup.vue +52 -0
- package/src/components/sheet/popups/fill-color-popup.vue +39 -0
- package/src/components/sheet/popups/find-popup.vue +111 -0
- package/src/components/sheet/popups/font-color-popup.vue +39 -0
- package/src/components/sheet/popups/font-size-popup.vue +52 -0
- package/src/components/sheet/popups/import.worker.ts +66 -0
- package/src/components/sheet/popups/insert-image-popup.vue +39 -0
- package/src/components/sheet/sheet-context-menu.ts +229 -0
- package/src/components/sheet/sheet-tabs.vue +162 -0
- package/src/components/sheet/sheet-toolbar.vue +91 -0
- package/src/components/sheet/sheet.vue +211 -0
- package/src/components/sheet/style.scss +737 -0
- package/src/components/sheet/style.ts +13 -0
- package/src/components/sheet/use-find-replace.ts +200 -0
- package/src/components/sheet/use-formula-ref-select.ts +34 -0
- package/src/components/sheet/use-formula-suggest.ts +150 -0
- package/src/components/sheet/use-sheet-grid.ts +247 -0
- package/src/components/sheet/use-sheet-state.ts +161 -0
- package/src/components/sheet/use-sheet-tabs-bar.ts +115 -0
- package/src/components/sheet/use-tool-groups.ts +61 -0
- package/src/components/sheet/use-tool-popup.ts +150 -0
- package/src/components/sheet/use-toolbar-scroll.ts +95 -0
- package/src/env.d.ts +11 -0
- package/src/index.ts +39 -14
- package/src/report/__test__/binding.test.ts +218 -0
- package/src/report/__test__/connector.test.ts +218 -0
- package/src/report/__test__/export-xlsx.test.ts +118 -0
- package/src/report/__test__/filter-bar.test.ts +58 -0
- package/src/report/__test__/params.test.ts +156 -0
- package/src/report/__test__/render.test.ts +728 -0
- package/src/report/__test__/rules.test.ts +131 -0
- package/src/report/__test__/template.test.ts +355 -0
- package/src/report/binding.ts +243 -0
- package/src/report/connector.ts +205 -0
- package/src/report/export-xlsx.ts +118 -0
- package/src/report/filter-bar.ts +36 -0
- package/src/report/index.ts +13 -0
- package/src/report/params.ts +96 -0
- package/src/report/render/__test__/aggregate.test.ts +16 -0
- package/src/report/render/__test__/coordinate.test.ts +405 -0
- package/src/report/render/aggregate.ts +240 -0
- package/src/report/render/builder.ts +211 -0
- package/src/report/render/coordinate.ts +1239 -0
- package/src/report/render/index.ts +30 -0
- package/src/report/render/style-resolver.ts +68 -0
- package/src/report/render/template-index.ts +200 -0
- package/src/report/rules/evaluate.ts +113 -0
- package/src/report/rules/index.ts +7 -0
- package/src/report/template.ts +141 -0
- package/src/report/types.ts +96 -0
- package/src/tools/__test__/builtin.test.ts +208 -66
- package/src/tools/__test__/context.test.ts +62 -2
- package/src/tools/builtin.ts +350 -6
- package/src/tools/context.ts +89 -11
- package/src/tools/download.ts +82 -0
- package/src/tools/export.worker.ts +61 -0
- package/src/tools/registry.ts +16 -1
- package/src/types/index.ts +2 -0
- package/src/types/report-designer.ts +36 -0
- package/src/types/report-viewer.ts +37 -0
- package/src/types/sheet.ts +26 -3
- package/dist/core/address.d.ts +0 -60
- package/dist/core/address.js +0 -142
- package/dist/core/address.js.map +0 -1
- package/dist/core/cell-store.d.ts +0 -61
- package/dist/core/cell-store.js +0 -135
- package/dist/core/cell-store.js.map +0 -1
- package/dist/core/command/default-registry.d.ts +0 -10
- package/dist/core/command/default-registry.js +0 -18
- package/dist/core/command/default-registry.js.map +0 -1
- package/dist/core/command/history.d.ts +0 -64
- package/dist/core/command/history.js +0 -127
- package/dist/core/command/history.js.map +0 -1
- package/dist/core/command/merge-cells.d.ts +0 -21
- package/dist/core/command/merge-cells.js +0 -74
- package/dist/core/command/merge-cells.js.map +0 -1
- package/dist/core/command/registry.d.ts +0 -17
- package/dist/core/command/registry.js +0 -26
- package/dist/core/command/registry.js.map +0 -1
- package/dist/core/command/set-cell-formula.d.ts +0 -17
- package/dist/core/command/set-cell-formula.js +0 -29
- package/dist/core/command/set-cell-formula.js.map +0 -1
- package/dist/core/command/set-cell-value.d.ts +0 -22
- package/dist/core/command/set-cell-value.js +0 -35
- package/dist/core/command/set-cell-value.js.map +0 -1
- package/dist/core/command/types.d.ts +0 -68
- package/dist/core/events.js +0 -29
- package/dist/core/events.js.map +0 -1
- package/dist/core/fill.d.ts +0 -34
- package/dist/core/fill.js +0 -320
- package/dist/core/fill.js.map +0 -1
- package/dist/core/formula/ast.d.ts +0 -58
- package/dist/core/formula/ast.js +0 -38
- package/dist/core/formula/ast.js.map +0 -1
- package/dist/core/formula/dependency-graph.d.ts +0 -70
- package/dist/core/formula/dependency-graph.js +0 -269
- package/dist/core/formula/dependency-graph.js.map +0 -1
- package/dist/core/formula/errors.d.ts +0 -25
- package/dist/core/formula/errors.js +0 -36
- package/dist/core/formula/errors.js.map +0 -1
- package/dist/core/formula/evaluator.d.ts +0 -41
- package/dist/core/formula/evaluator.js +0 -154
- package/dist/core/formula/evaluator.js.map +0 -1
- package/dist/core/formula/functions.d.ts +0 -30
- package/dist/core/formula/functions.js +0 -209
- package/dist/core/formula/functions.js.map +0 -1
- package/dist/core/formula/parser.d.ts +0 -7
- package/dist/core/formula/parser.js +0 -208
- package/dist/core/formula/parser.js.map +0 -1
- package/dist/core/formula/tokenizer.d.ts +0 -37
- package/dist/core/formula/tokenizer.js +0 -146
- package/dist/core/formula/tokenizer.js.map +0 -1
- package/dist/core/merge-manager.d.ts +0 -64
- package/dist/core/merge-manager.js +0 -111
- package/dist/core/merge-manager.js.map +0 -1
- package/dist/core/selection.d.ts +0 -31
- package/dist/core/selection.js +0 -62
- package/dist/core/selection.js.map +0 -1
- package/dist/core/sheet.d.ts +0 -116
- package/dist/core/sheet.js +0 -224
- package/dist/core/sheet.js.map +0 -1
- package/dist/core/workbook.d.ts +0 -43
- package/dist/core/workbook.js +0 -77
- package/dist/core/workbook.js.map +0 -1
- package/dist/grid/sheet-grid.d.ts +0 -81
- package/dist/grid/sheet-grid.js +0 -331
- package/dist/grid/sheet-grid.js.map +0 -1
- package/dist/grid/vtable-theme.js +0 -80
- package/dist/grid/vtable-theme.js.map +0 -1
- package/dist/tools/builtin.js.map +0 -1
- package/dist/tools/context.js.map +0 -1
- package/dist/tools/registry.js.map +0 -1
- package/dist/vue/index.d.ts +0 -2
- package/dist/vue/sheet.js +0 -211
- package/dist/vue/sheet.js.map +0 -1
- package/dist/vue/sheet.vue.d.ts +0 -24
- package/dist/vue/style.d.ts +0 -1
- package/dist/vue/style.js +0 -2
- package/dist/vue/style2.css +0 -93
- package/src/core/__test__/address.test.ts +0 -113
- package/src/core/__test__/cell-store.test.ts +0 -97
- package/src/core/__test__/command.test.ts +0 -377
- package/src/core/__test__/fill.test.ts +0 -140
- package/src/core/__test__/formula-adversarial.test.ts +0 -265
- package/src/core/__test__/formula-engine.test.ts +0 -470
- package/src/core/__test__/formula-functions.test.ts +0 -178
- package/src/core/__test__/formula-parser.test.ts +0 -160
- package/src/core/__test__/history.test.ts +0 -225
- package/src/core/__test__/merge-manager.test.ts +0 -106
- package/src/core/__test__/sheet.test.ts +0 -142
- package/src/core/address.ts +0 -166
- package/src/core/cell-store.ts +0 -173
- package/src/core/command/default-registry.ts +0 -15
- package/src/core/command/history.ts +0 -167
- package/src/core/command/index.ts +0 -7
- package/src/core/command/merge-cells.ts +0 -74
- package/src/core/command/registry.ts +0 -30
- package/src/core/command/set-cell-formula.ts +0 -29
- package/src/core/command/set-cell-value.ts +0 -38
- package/src/core/command/types.ts +0 -73
- package/src/core/events.ts +0 -37
- package/src/core/fill.ts +0 -314
- package/src/core/formula/ast.ts +0 -66
- package/src/core/formula/dependency-graph.ts +0 -329
- package/src/core/formula/errors.ts +0 -41
- package/src/core/formula/evaluator.ts +0 -219
- package/src/core/formula/functions.ts +0 -266
- package/src/core/formula/index.ts +0 -7
- package/src/core/formula/parser.ts +0 -198
- package/src/core/formula/tokenizer.ts +0 -160
- package/src/core/merge-manager.ts +0 -158
- package/src/core/selection.ts +0 -66
- package/src/core/sheet.ts +0 -282
- package/src/core/workbook.ts +0 -99
- package/src/grid/__test__/canvas-mock.ts +0 -49
- package/src/grid/__test__/setup.ts +0 -3
- package/src/grid/__test__/sheet-grid-formula.test.ts +0 -140
- package/src/grid/__test__/sheet-grid.test.ts +0 -275
- package/src/grid/sheet-grid.ts +0 -407
- package/src/grid/vtable-theme.ts +0 -61
- package/src/vue/__test__/sheet-component.test.ts +0 -267
- package/src/vue/sheet.vue +0 -235
- package/src/vue/style.scss +0 -94
- package/src/vue/style.ts +0 -2
- /package/src/{vue → components/sheet}/index.ts +0 -0
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
@use 'pkg:@veltra/styles/mixins' as m;
|
|
2
|
+
@use 'pkg:@veltra/styles/functions' as fn;
|
|
3
|
+
|
|
4
|
+
@include m.b(sheet) {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border: fn.use-var(border);
|
|
10
|
+
border-radius: fn.use-var(radius, default);
|
|
11
|
+
background-color: fn.use-var(bg-color, top);
|
|
12
|
+
|
|
13
|
+
@include m.e(toolbar-wrap) {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@include m.e(toolbar) {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: fn.use-var(gap, small);
|
|
21
|
+
padding: fn.use-var(gap, small);
|
|
22
|
+
border-bottom: 1px solid fn.use-var(border, muted-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* 单行滚动视口:工具超出视口时左右箭头导航(不再换行挤压 grid) */
|
|
26
|
+
@include m.e(toolbar-scroll) {
|
|
27
|
+
flex: 1;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
overflow-x: auto;
|
|
30
|
+
overscroll-behavior-x: contain;
|
|
31
|
+
scrollbar-width: none; /* Firefox */
|
|
32
|
+
|
|
33
|
+
&::-webkit-scrollbar {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include m.e(toolbar-list) {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: fn.use-var(gap, small);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include m.e(toolbar-nav) {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
width: fn.use-var(form-component-height, small);
|
|
50
|
+
height: fn.use-var(form-component-height, small);
|
|
51
|
+
padding: 0;
|
|
52
|
+
border: none;
|
|
53
|
+
border-radius: fn.use-var(radius, small);
|
|
54
|
+
background: transparent;
|
|
55
|
+
color: fn.use-var(text-color, second);
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
user-select: none;
|
|
58
|
+
transition:
|
|
59
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
60
|
+
color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
61
|
+
|
|
62
|
+
&:hover:not(:disabled) {
|
|
63
|
+
background-color: fn.use-var(bg-color, hover);
|
|
64
|
+
color: fn.use-var(color, primary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:disabled {
|
|
68
|
+
color: fn.use-var(text-color, disabled);
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include m.e(toolbar-divider) {
|
|
74
|
+
width: 1px;
|
|
75
|
+
align-self: stretch;
|
|
76
|
+
margin: 2px 0;
|
|
77
|
+
background-color: fn.use-var(border, muted-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@include m.e(tool) {
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
gap: 4px;
|
|
85
|
+
min-width: fn.use-var(form-component-height, small);
|
|
86
|
+
height: fn.use-var(form-component-height, small);
|
|
87
|
+
padding: 0 6px;
|
|
88
|
+
border: none;
|
|
89
|
+
border-radius: fn.use-var(radius, small);
|
|
90
|
+
background: transparent;
|
|
91
|
+
color: fn.use-var(text-color, main);
|
|
92
|
+
font-size: fn.use-var(font-size-main, small);
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
transition:
|
|
96
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
97
|
+
color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
98
|
+
|
|
99
|
+
&:hover:not(:disabled) {
|
|
100
|
+
background-color: fn.use-var(bg-color, hover);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include m.is(active) {
|
|
104
|
+
background-color: fn.use-var(bg-color, hover);
|
|
105
|
+
color: fn.use-var(color, primary);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:disabled {
|
|
109
|
+
color: fn.use-var(text-color, disabled);
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@include m.e(tool-icon) {
|
|
115
|
+
display: block;
|
|
116
|
+
width: 16px;
|
|
117
|
+
height: 16px;
|
|
118
|
+
font-size: 16px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@include m.e(export-menu) {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
min-width: 180px;
|
|
125
|
+
padding: 4px 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@include m.e(export-option) {
|
|
129
|
+
display: block;
|
|
130
|
+
width: 100%;
|
|
131
|
+
padding: 6px 12px;
|
|
132
|
+
border: none;
|
|
133
|
+
background: transparent;
|
|
134
|
+
color: fn.use-var(text-color, main);
|
|
135
|
+
font-size: fn.use-var(font-size-main, small);
|
|
136
|
+
text-align: left;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
|
|
139
|
+
&:hover {
|
|
140
|
+
background-color: fn.use-var(bg-color, hover);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@include m.e(formula-bar) {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: fn.use-var(gap, small);
|
|
148
|
+
padding: fn.use-var(gap, small);
|
|
149
|
+
border-bottom: 1px solid fn.use-var(border, muted-color);
|
|
150
|
+
// 浮起的 fx 输入面板 / 候选列表需盖住下方 grid 与浮动图片叠层(image-layer z-index:1)
|
|
151
|
+
position: relative;
|
|
152
|
+
z-index: 30;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// 文档流只占单行高度;真正的输入区在 fx-input-panel 内绝对定位浮出
|
|
156
|
+
@include m.e(fx-editor) {
|
|
157
|
+
position: relative;
|
|
158
|
+
flex: 1;
|
|
159
|
+
min-width: 0;
|
|
160
|
+
height: fn.use-var(form-component-height, small);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@include m.e(fx-input-panel) {
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 0;
|
|
166
|
+
right: 0;
|
|
167
|
+
left: 0;
|
|
168
|
+
z-index: 1;
|
|
169
|
+
// 高度随 textarea(suggest 绝对定位不撑高);浮出时投影盖住下方 grid
|
|
170
|
+
border-radius: fn.use-var(radius, small);
|
|
171
|
+
|
|
172
|
+
@include m.is(expanded) {
|
|
173
|
+
box-shadow: fn.use-var(shadow, sm);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@include m.e(fx-suggest) {
|
|
178
|
+
position: absolute;
|
|
179
|
+
top: calc(100% + 2px);
|
|
180
|
+
left: 0;
|
|
181
|
+
z-index: 20;
|
|
182
|
+
min-width: 280px;
|
|
183
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
184
|
+
border-radius: fn.use-var(radius, small);
|
|
185
|
+
background-color: fn.use-var(bg-color, top);
|
|
186
|
+
box-shadow: fn.use-var(shadow, sm);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* UScroll 容器:滚动条由 desktop scroll 承担(不再用原生 overflow) */
|
|
190
|
+
@include m.e(fx-suggest-scroll) {
|
|
191
|
+
width: 100%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@include m.e(fx-suggest-list) {
|
|
195
|
+
margin: 0;
|
|
196
|
+
padding: 4px 0;
|
|
197
|
+
list-style: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@include m.e(fx-suggest-item) {
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-direction: column;
|
|
203
|
+
gap: 2px;
|
|
204
|
+
padding: 6px 10px;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
|
|
207
|
+
&:hover {
|
|
208
|
+
background-color: fn.use-var(bg-color, hover);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@include m.is(active) {
|
|
212
|
+
background-color: fn.use-var(bg-color, hover);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@include m.e(fx-suggest-sig) {
|
|
217
|
+
color: fn.use-var(text-color, main);
|
|
218
|
+
font-size: fn.use-var(font-size-main, small);
|
|
219
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@include m.e(fx-suggest-desc) {
|
|
223
|
+
color: fn.use-var(text-color, second);
|
|
224
|
+
font-size: fn.use-var(font-size-main, small);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@include m.e(name-box) {
|
|
228
|
+
width: 110px;
|
|
229
|
+
height: fn.use-var(form-component-height, small);
|
|
230
|
+
flex-shrink: 0;
|
|
231
|
+
padding: 0 6px;
|
|
232
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
233
|
+
border-radius: fn.use-var(radius, small);
|
|
234
|
+
background: transparent;
|
|
235
|
+
color: fn.use-var(text-color, main);
|
|
236
|
+
font-size: fn.use-var(font-size-main, small);
|
|
237
|
+
outline: none;
|
|
238
|
+
|
|
239
|
+
&:focus {
|
|
240
|
+
border-color: fn.use-var(color, primary);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@include m.e(fx-label) {
|
|
245
|
+
display: inline-flex;
|
|
246
|
+
flex-shrink: 0;
|
|
247
|
+
align-items: center;
|
|
248
|
+
height: fn.use-var(form-component-height, small);
|
|
249
|
+
color: fn.use-var(text-color, second);
|
|
250
|
+
font-size: fn.use-var(font-size-main, small);
|
|
251
|
+
font-style: italic;
|
|
252
|
+
user-select: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@include m.e(fx-input) {
|
|
256
|
+
display: block;
|
|
257
|
+
box-sizing: border-box;
|
|
258
|
+
width: 100%;
|
|
259
|
+
min-height: fn.use-var(form-component-height, small);
|
|
260
|
+
// 浮出后可多展几行;再长在面板内滚动
|
|
261
|
+
max-height: calc(fn.use-var(form-component-height, small) * 8);
|
|
262
|
+
padding: 2px 6px;
|
|
263
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
264
|
+
border-radius: fn.use-var(radius, small);
|
|
265
|
+
// 必须不透明,否则浮在 grid 上会透出单元格
|
|
266
|
+
background-color: fn.use-var(bg-color, top);
|
|
267
|
+
color: fn.use-var(text-color, main);
|
|
268
|
+
font-size: fn.use-var(font-size-main, small);
|
|
269
|
+
line-height: 1.4;
|
|
270
|
+
resize: none;
|
|
271
|
+
overflow-x: hidden;
|
|
272
|
+
overflow-y: auto;
|
|
273
|
+
outline: none;
|
|
274
|
+
|
|
275
|
+
&:focus {
|
|
276
|
+
border-color: fn.use-var(color, primary);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&:disabled {
|
|
280
|
+
color: fn.use-var(text-color, disabled);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@include m.e(fx-btn) {
|
|
285
|
+
display: inline-flex;
|
|
286
|
+
align-items: center;
|
|
287
|
+
justify-content: center;
|
|
288
|
+
width: 22px;
|
|
289
|
+
height: 22px;
|
|
290
|
+
flex-shrink: 0;
|
|
291
|
+
padding: 0;
|
|
292
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
293
|
+
border-radius: fn.use-var(radius, small);
|
|
294
|
+
background: transparent;
|
|
295
|
+
color: fn.use-var(text-color, main);
|
|
296
|
+
font-size: fn.use-var(font-size-main, small);
|
|
297
|
+
line-height: 1;
|
|
298
|
+
cursor: pointer;
|
|
299
|
+
transition:
|
|
300
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
301
|
+
color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
302
|
+
|
|
303
|
+
&:hover {
|
|
304
|
+
background-color: fn.use-var(bg-color, hover);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@include m.e(popup) {
|
|
309
|
+
/* UDropdown content 内层内容容器:定位/边框/背景/阴影由 dropdown 弹层提供 */
|
|
310
|
+
display: flex;
|
|
311
|
+
flex-direction: column;
|
|
312
|
+
gap: fn.use-var(gap, small);
|
|
313
|
+
padding: fn.use-var(gap, small);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
@include m.e(popup-row) {
|
|
317
|
+
display: flex;
|
|
318
|
+
flex-wrap: wrap;
|
|
319
|
+
align-items: center;
|
|
320
|
+
gap: 6px;
|
|
321
|
+
max-width: 360px;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@include m.e(popup-label) {
|
|
325
|
+
color: fn.use-var(text-color, second);
|
|
326
|
+
font-size: fn.use-var(font-size-main, small);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@include m.e(popup-line) {
|
|
330
|
+
display: inline-flex;
|
|
331
|
+
align-items: center;
|
|
332
|
+
justify-content: center;
|
|
333
|
+
width: 24px;
|
|
334
|
+
height: 20px;
|
|
335
|
+
padding: 0 4px;
|
|
336
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
337
|
+
border-radius: fn.use-var(radius, small);
|
|
338
|
+
background: transparent;
|
|
339
|
+
cursor: pointer;
|
|
340
|
+
|
|
341
|
+
@include m.is(active) {
|
|
342
|
+
border-color: fn.use-var(color, primary);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@include m.e(popup-line-swatch) {
|
|
347
|
+
width: 100%;
|
|
348
|
+
height: 4px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@include m.e(popup-preset) {
|
|
352
|
+
display: inline-flex;
|
|
353
|
+
align-items: center;
|
|
354
|
+
justify-content: center;
|
|
355
|
+
width: 28px;
|
|
356
|
+
height: 28px;
|
|
357
|
+
padding: 0;
|
|
358
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
359
|
+
border-radius: fn.use-var(radius, small);
|
|
360
|
+
background: transparent;
|
|
361
|
+
color: fn.use-var(text-color, main);
|
|
362
|
+
cursor: pointer;
|
|
363
|
+
|
|
364
|
+
&:hover {
|
|
365
|
+
background-color: fn.use-var(bg-color, hover);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@include m.is(active) {
|
|
369
|
+
border-color: fn.use-var(color, primary);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
@include m.e(popup-preset-glyph) {
|
|
374
|
+
display: block;
|
|
375
|
+
flex-shrink: 0;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/* UScroll 容器:滚动条/滚动由 desktop scroll 组件承担(popup-size-list 不再自滚) */
|
|
379
|
+
@include m.e(popup-size-scroll) {
|
|
380
|
+
width: 48px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@include m.e(popup-size-list) {
|
|
384
|
+
display: flex;
|
|
385
|
+
flex-direction: column;
|
|
386
|
+
gap: 2px;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
@include m.e(popup-size-item) {
|
|
390
|
+
padding: 5px 12px;
|
|
391
|
+
border: none;
|
|
392
|
+
border-radius: fn.use-var(radius, small);
|
|
393
|
+
background: transparent;
|
|
394
|
+
color: fn.use-var(text-color, main);
|
|
395
|
+
font-size: fn.use-var(font-size-main, small);
|
|
396
|
+
text-align: left;
|
|
397
|
+
white-space: nowrap;
|
|
398
|
+
cursor: pointer;
|
|
399
|
+
|
|
400
|
+
&:hover {
|
|
401
|
+
background-color: fn.use-var(bg-color, hover);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
@include m.is(active) {
|
|
405
|
+
background-color: fn.use-var(bg-color, hover);
|
|
406
|
+
color: fn.use-var(color, primary);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
@include m.e(insert-count-menu) {
|
|
411
|
+
display: flex;
|
|
412
|
+
align-items: center;
|
|
413
|
+
gap: 4px;
|
|
414
|
+
// 菜单为 max-content 时由内容撑开,勿 width:100% 形成循环依赖
|
|
415
|
+
flex-shrink: 0;
|
|
416
|
+
user-select: none;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@include m.e(insert-count-prefix, insert-count-suffix) {
|
|
420
|
+
flex-shrink: 0;
|
|
421
|
+
white-space: nowrap;
|
|
422
|
+
font-size: fn.use-var(font-size-main, small);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
@include m.e(insert-count-input) {
|
|
426
|
+
width: 72px;
|
|
427
|
+
flex-shrink: 0;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
@include m.e(find-row) {
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
gap: 6px;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
@include m.e(find-input) {
|
|
437
|
+
width: 140px;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
@include m.e(find-count) {
|
|
441
|
+
min-width: 44px;
|
|
442
|
+
color: fn.use-var(text-color, second);
|
|
443
|
+
font-size: fn.use-var(font-size-main, small);
|
|
444
|
+
text-align: center;
|
|
445
|
+
white-space: nowrap;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
@include m.e(find-nav) {
|
|
449
|
+
width: 22px;
|
|
450
|
+
height: 22px;
|
|
451
|
+
padding: 0;
|
|
452
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
453
|
+
border-radius: fn.use-var(radius, small);
|
|
454
|
+
background: transparent;
|
|
455
|
+
color: fn.use-var(text-color, main);
|
|
456
|
+
line-height: 1;
|
|
457
|
+
cursor: pointer;
|
|
458
|
+
|
|
459
|
+
&:hover:not(:disabled) {
|
|
460
|
+
background-color: fn.use-var(bg-color, hover);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
&:disabled {
|
|
464
|
+
color: fn.use-var(text-color, disabled);
|
|
465
|
+
cursor: not-allowed;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
@include m.e(find-close) {
|
|
470
|
+
width: 22px;
|
|
471
|
+
height: 22px;
|
|
472
|
+
margin-left: auto;
|
|
473
|
+
padding: 0;
|
|
474
|
+
border: none;
|
|
475
|
+
border-radius: fn.use-var(radius, small);
|
|
476
|
+
background: transparent;
|
|
477
|
+
color: fn.use-var(text-color, second);
|
|
478
|
+
line-height: 1;
|
|
479
|
+
cursor: pointer;
|
|
480
|
+
|
|
481
|
+
&:hover {
|
|
482
|
+
background-color: fn.use-var(bg-color, hover);
|
|
483
|
+
color: fn.use-var(text-color, main);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
@include m.e(find-btn) {
|
|
488
|
+
padding: 3px 10px;
|
|
489
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
490
|
+
border-radius: fn.use-var(radius, small);
|
|
491
|
+
background: transparent;
|
|
492
|
+
color: fn.use-var(text-color, main);
|
|
493
|
+
font-size: fn.use-var(font-size-main, small);
|
|
494
|
+
white-space: nowrap;
|
|
495
|
+
cursor: pointer;
|
|
496
|
+
|
|
497
|
+
&:hover:not(:disabled) {
|
|
498
|
+
background-color: fn.use-var(bg-color, hover);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
&:disabled {
|
|
502
|
+
color: fn.use-var(text-color, disabled);
|
|
503
|
+
cursor: not-allowed;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
@include m.e(find-option) {
|
|
508
|
+
display: inline-flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
gap: 4px;
|
|
511
|
+
color: fn.use-var(text-color, second);
|
|
512
|
+
font-size: fn.use-var(font-size-main, small);
|
|
513
|
+
white-space: nowrap;
|
|
514
|
+
cursor: pointer;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
@include m.e(find-select) {
|
|
518
|
+
border: 1px solid fn.use-var(border, muted-color);
|
|
519
|
+
border-radius: fn.use-var(radius, small);
|
|
520
|
+
background: transparent;
|
|
521
|
+
color: fn.use-var(text-color, main);
|
|
522
|
+
font-size: fn.use-var(font-size-main, small);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
@include m.e(insert-image-picker) {
|
|
526
|
+
min-width: 220px;
|
|
527
|
+
cursor: pointer;
|
|
528
|
+
|
|
529
|
+
&:hover {
|
|
530
|
+
color: fn.use-var(color, primary);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
@include m.e(insert-image-hint) {
|
|
535
|
+
padding: 8px 10px;
|
|
536
|
+
border: 1px dashed fn.use-var(border, muted-color);
|
|
537
|
+
border-radius: fn.use-var(radius, small);
|
|
538
|
+
text-align: center;
|
|
539
|
+
font-size: fn.use-var(font-size-main, small);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
@include m.e(insert-image-sub) {
|
|
543
|
+
margin-top: 4px;
|
|
544
|
+
color: fn.use-var(text-color, second);
|
|
545
|
+
font-size: fn.use-var(font-size-assist, small);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
@include m.e(grid) {
|
|
549
|
+
position: relative;
|
|
550
|
+
flex: 1;
|
|
551
|
+
min-height: 0;
|
|
552
|
+
overflow: hidden;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/* 导入解析覆盖层(自绘:遮罩 + 动画 + 文字同一层,不依赖 desktop Loading 的
|
|
556
|
+
text 能力;层级高于 v-loading 遮罩与 grid 实例,文字不被掩盖) */
|
|
557
|
+
@include m.e(loading-mask) {
|
|
558
|
+
position: absolute;
|
|
559
|
+
inset: 0;
|
|
560
|
+
z-index: 10;
|
|
561
|
+
background-color: fn.use-var(bg-color, top, alpha);
|
|
562
|
+
@include m.flex($justify: center, $align: center);
|
|
563
|
+
flex-direction: column;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/* 旋转圈动画(与 desktop dual-ring 同风格:border 圆环 + 顶部高亮 + 旋转) */
|
|
567
|
+
@include m.e(loading-spinner) {
|
|
568
|
+
width: 36px;
|
|
569
|
+
aspect-ratio: 1;
|
|
570
|
+
border-radius: 50%;
|
|
571
|
+
border: 3px solid fn.color-a(color, 22, primary);
|
|
572
|
+
border-top-color: currentColor;
|
|
573
|
+
color: fn.use-var(color, primary);
|
|
574
|
+
animation: u-sheet-loading-spin 0.8s linear infinite;
|
|
575
|
+
|
|
576
|
+
&::after {
|
|
577
|
+
content: '';
|
|
578
|
+
position: absolute;
|
|
579
|
+
inset: 5px;
|
|
580
|
+
border-radius: 50%;
|
|
581
|
+
border: 2px solid fn.color-a(color, 22, primary);
|
|
582
|
+
border-bottom-color: currentColor;
|
|
583
|
+
animation: u-sheet-loading-spin 1.2s linear infinite reverse;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
@include m.e(loading-text) {
|
|
588
|
+
margin-top: fn.use-var(gap, small);
|
|
589
|
+
color: fn.use-var(text-color, secondary);
|
|
590
|
+
font-size: 12px;
|
|
591
|
+
line-height: 1.5;
|
|
592
|
+
text-align: center;
|
|
593
|
+
white-space: nowrap;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@keyframes u-sheet-loading-spin {
|
|
597
|
+
to {
|
|
598
|
+
transform: rotate(360deg);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/* LRU 缓存实例容器:absolute 堆叠于 grid 区,非激活实例 visibility:hidden
|
|
603
|
+
(保持尺寸不触发 VTable resize,切回仅翻转可见性 + 选区回驱) */
|
|
604
|
+
@include m.e(grid-instance) {
|
|
605
|
+
position: absolute;
|
|
606
|
+
inset: 0;
|
|
607
|
+
visibility: hidden;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
@include m.e(tabs) {
|
|
611
|
+
display: flex;
|
|
612
|
+
align-items: center;
|
|
613
|
+
gap: 2px;
|
|
614
|
+
min-width: 0;
|
|
615
|
+
padding: 2px fn.use-var(gap, small);
|
|
616
|
+
border-top: 1px solid fn.use-var(border, muted-color);
|
|
617
|
+
background-color: fn.use-var(bg-color, middle);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
@include m.e(tabs-nav) {
|
|
621
|
+
display: inline-flex;
|
|
622
|
+
flex: 0 0 auto;
|
|
623
|
+
align-items: center;
|
|
624
|
+
justify-content: center;
|
|
625
|
+
width: 22px;
|
|
626
|
+
height: 22px;
|
|
627
|
+
padding: 0;
|
|
628
|
+
border: none;
|
|
629
|
+
border-radius: fn.use-var(radius, small);
|
|
630
|
+
background: transparent;
|
|
631
|
+
color: fn.use-var(text-color, second);
|
|
632
|
+
cursor: pointer;
|
|
633
|
+
user-select: none;
|
|
634
|
+
transition:
|
|
635
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
636
|
+
color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
637
|
+
|
|
638
|
+
&:hover:not(:disabled) {
|
|
639
|
+
background-color: fn.use-var(bg-color, hover);
|
|
640
|
+
color: fn.use-var(color, primary);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
&:disabled {
|
|
644
|
+
color: fn.use-var(text-color, disabled);
|
|
645
|
+
cursor: not-allowed;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// grow:0 使少量 tab 时「+」紧跟内容;shrink + min-width:0 溢出时收缩横滚
|
|
650
|
+
// 隐藏原生滚动条:溢出靠左右 nav 步进,否则滚动条占高会把 tab 顶偏,与 nav 不对齐
|
|
651
|
+
@include m.e(tabs-viewport) {
|
|
652
|
+
flex: 0 1 auto;
|
|
653
|
+
min-width: 0;
|
|
654
|
+
max-width: 100%;
|
|
655
|
+
overflow-x: auto;
|
|
656
|
+
overflow-y: hidden;
|
|
657
|
+
overscroll-behavior-x: contain;
|
|
658
|
+
scrollbar-width: none; /* Firefox */
|
|
659
|
+
|
|
660
|
+
&::-webkit-scrollbar {
|
|
661
|
+
display: none;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
@include m.e(tabs-list) {
|
|
666
|
+
display: inline-flex;
|
|
667
|
+
flex-wrap: nowrap;
|
|
668
|
+
flex-shrink: 0;
|
|
669
|
+
align-items: center;
|
|
670
|
+
gap: 2px;
|
|
671
|
+
width: max-content;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
@include m.e(tab) {
|
|
675
|
+
display: inline-flex;
|
|
676
|
+
flex-shrink: 0;
|
|
677
|
+
align-items: center;
|
|
678
|
+
padding: 4px 12px;
|
|
679
|
+
border: none;
|
|
680
|
+
border-radius: fn.use-var(radius, small);
|
|
681
|
+
background: transparent;
|
|
682
|
+
color: fn.use-var(text-color, second);
|
|
683
|
+
font-size: fn.use-var(font-size-main, small);
|
|
684
|
+
white-space: nowrap;
|
|
685
|
+
cursor: pointer;
|
|
686
|
+
user-select: none;
|
|
687
|
+
transition:
|
|
688
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
689
|
+
color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
690
|
+
|
|
691
|
+
&:hover {
|
|
692
|
+
background-color: fn.use-var(bg-color, hover);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
@include m.is(active) {
|
|
696
|
+
background-color: fn.use-var(bg-color, top);
|
|
697
|
+
color: fn.use-var(color, primary);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
@include m.e(tab-rename-input) {
|
|
702
|
+
width: 96px;
|
|
703
|
+
height: 20px;
|
|
704
|
+
padding: 0 4px;
|
|
705
|
+
border: 1px solid fn.use-var(color, primary);
|
|
706
|
+
border-radius: fn.use-var(radius, small);
|
|
707
|
+
outline: none;
|
|
708
|
+
color: fn.use-var(text-color, main);
|
|
709
|
+
font-size: fn.use-var(font-size-main, small);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
@include m.e(tab-add) {
|
|
713
|
+
display: inline-flex;
|
|
714
|
+
flex: 0 0 auto;
|
|
715
|
+
align-items: center;
|
|
716
|
+
justify-content: center;
|
|
717
|
+
width: 24px;
|
|
718
|
+
height: 24px;
|
|
719
|
+
margin-left: 2px;
|
|
720
|
+
padding: 0;
|
|
721
|
+
border: none;
|
|
722
|
+
border-radius: fn.use-var(radius, small);
|
|
723
|
+
background: transparent;
|
|
724
|
+
color: fn.use-var(text-color, second);
|
|
725
|
+
font-size: fn.use-var(font-size-main, small);
|
|
726
|
+
line-height: 1;
|
|
727
|
+
cursor: pointer;
|
|
728
|
+
transition:
|
|
729
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
730
|
+
color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
731
|
+
|
|
732
|
+
&:hover {
|
|
733
|
+
background-color: fn.use-var(bg-color, hover);
|
|
734
|
+
color: fn.use-var(color, primary);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
}
|