@globalbrain/sefirot 4.39.0 → 4.40.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.
- package/README.md +1 -1
- package/config/vite.js +1 -0
- package/lib/blocks/lens/components/LensCatalog.vue +52 -38
- package/lib/blocks/lens/components/LensCatalogControl.vue +5 -9
- package/lib/blocks/lens/components/LensCatalogFooter.vue +14 -14
- package/lib/blocks/lens/components/LensCatalogStateFilter.vue +3 -3
- package/lib/blocks/lens/components/LensCatalogStateFilterCondition.vue +1 -1
- package/lib/blocks/lens/components/LensCatalogStateFilterGroup.vue +1 -1
- package/lib/blocks/lens/components/LensCatalogStateSort.vue +3 -3
- package/lib/blocks/lens/components/LensFormFilter.vue +21 -22
- package/lib/blocks/lens/components/LensFormFilterCondition.vue +1 -1
- package/lib/blocks/lens/components/LensFormFilterGroup.vue +1 -1
- package/lib/blocks/lens/components/LensFormOverrideBase.vue +22 -21
- package/lib/blocks/lens/components/LensFormView.vue +25 -26
- package/lib/blocks/lens/components/LensTable.vue +1 -3
- package/lib/components/SCardBlock.vue +5 -5
- package/lib/components/SInputTextarea.vue +72 -80
- package/package.json +19 -19
package/README.md
CHANGED
package/config/vite.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useDebounceFn, useElementSize } from '@vueuse/core'
|
|
3
3
|
import { computed, ref, watch } from 'vue'
|
|
4
|
+
import SDivider from '../../../components/SDivider.vue'
|
|
4
5
|
import { useQuery } from '../../../composables/Api'
|
|
5
6
|
import { usePower } from '../../../composables/Power'
|
|
6
7
|
import { type FieldData } from '../FieldData'
|
|
@@ -67,7 +68,7 @@ export interface Props {
|
|
|
67
68
|
clickableFields?: string[]
|
|
68
69
|
|
|
69
70
|
// Whether to show border around the catalog.
|
|
70
|
-
|
|
71
|
+
showBorder?: boolean
|
|
71
72
|
|
|
72
73
|
// Padding to add around various blocks in the catalog. This padding only
|
|
73
74
|
// applies to the X axis (left and right). The default is `16px`.
|
|
@@ -180,14 +181,17 @@ const hasConditions = computed(() => {
|
|
|
180
181
|
return _filters.value.length > 0 || _sort.value.length > 0
|
|
181
182
|
})
|
|
182
183
|
|
|
183
|
-
const
|
|
184
|
-
return
|
|
184
|
+
const containerClasses = computed(() => {
|
|
185
|
+
return {
|
|
186
|
+
'show-empty-state': _showEmptyState.value,
|
|
187
|
+
'has-border': props.showBorder
|
|
188
|
+
}
|
|
185
189
|
})
|
|
186
190
|
|
|
187
191
|
const paddings = computed(() => ({
|
|
188
192
|
'--lens-catalog-control-padding': `0 ${props.padding ?? '16px'}`,
|
|
189
|
-
'--lens-catalog-filters-block-padding': `
|
|
190
|
-
'--lens-catalog-sorts-block-padding': `
|
|
193
|
+
'--lens-catalog-filters-block-padding': `8px ${props.padding ?? '16px'}`,
|
|
194
|
+
'--lens-catalog-sorts-block-padding': `8px ${props.padding ?? '16px'}`,
|
|
191
195
|
'--lens-catalog-footer-padding': `0 ${props.padding ?? '16px'}`,
|
|
192
196
|
'--table-padding-left': `calc(${props.padding ?? '16px'} - 16px)`
|
|
193
197
|
}))
|
|
@@ -195,7 +199,7 @@ const paddings = computed(() => ({
|
|
|
195
199
|
const conditionBlocksSize = useElementSize(conditionBlocksEl)
|
|
196
200
|
|
|
197
201
|
const headerHeight = 'var(--lens-catalog-global-height-offset)'
|
|
198
|
-
const controlHeight = '
|
|
202
|
+
const controlHeight = '56px - 1px'
|
|
199
203
|
const conditionBlocksHeight = computed(() => conditionBlocksSize.height.value > 0 ? `${conditionBlocksSize.height.value}px - 1px` : '0px')
|
|
200
204
|
const columnsHeight = '40px - 1px'
|
|
201
205
|
const footerHeight = '56px - 1px'
|
|
@@ -212,7 +216,6 @@ const containerMinHeight = computed(() => {
|
|
|
212
216
|
|
|
213
217
|
const containerStyles = computed(() => {
|
|
214
218
|
return {
|
|
215
|
-
borderWidth: borderWidth.value,
|
|
216
219
|
...paddings.value,
|
|
217
220
|
...(containerMinHeight.value ?? {})
|
|
218
221
|
}
|
|
@@ -364,7 +367,7 @@ defineExpose({
|
|
|
364
367
|
</script>
|
|
365
368
|
|
|
366
369
|
<template>
|
|
367
|
-
<
|
|
370
|
+
<div class="LensCatalog" :class="containerClasses" :style="containerStyles">
|
|
368
371
|
<template v-if="_showEmptyState">
|
|
369
372
|
<slot name="empty-state" />
|
|
370
373
|
</template>
|
|
@@ -397,20 +400,25 @@ defineExpose({
|
|
|
397
400
|
</LensCatalogControl>
|
|
398
401
|
<div v-else class="control-skeleton" />
|
|
399
402
|
<div v-if="!hideConditions && result && (_filters.length > 0 || _sort.length > 0)" ref="conditionBlocksEl" class="condition-blocks">
|
|
400
|
-
<
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
403
|
+
<template v-if="_filters.length > 0">
|
|
404
|
+
<SDivider />
|
|
405
|
+
<LensCatalogStateFilter
|
|
406
|
+
:filters="_filters"
|
|
407
|
+
:fields="result.fields"
|
|
408
|
+
@reset="onResetFilters"
|
|
409
|
+
/>
|
|
410
|
+
</template>
|
|
411
|
+
<template v-if="_sort.length > 0">
|
|
412
|
+
<SDivider />
|
|
413
|
+
<LensCatalogStateSort
|
|
414
|
+
:fields="result.fields"
|
|
415
|
+
:sorts="_sort"
|
|
416
|
+
@reset="onResetSorts"
|
|
417
|
+
/>
|
|
418
|
+
</template>
|
|
412
419
|
</div>
|
|
413
|
-
<
|
|
420
|
+
<SDivider />
|
|
421
|
+
<div class="list" :style="tableMaxHeight">
|
|
414
422
|
<LensTable
|
|
415
423
|
:result
|
|
416
424
|
:loading
|
|
@@ -430,7 +438,7 @@ defineExpose({
|
|
|
430
438
|
@prev="onPrev"
|
|
431
439
|
@next="onNext"
|
|
432
440
|
/>
|
|
433
|
-
</
|
|
441
|
+
</div>
|
|
434
442
|
</div>
|
|
435
443
|
|
|
436
444
|
<SModal :open="filterDialog.state.value" @close="filterDialog.off">
|
|
@@ -455,16 +463,15 @@ defineExpose({
|
|
|
455
463
|
@apply="onViewUpdated"
|
|
456
464
|
/>
|
|
457
465
|
</SModal>
|
|
458
|
-
</
|
|
466
|
+
</div>
|
|
459
467
|
</template>
|
|
460
468
|
|
|
461
|
-
<style scoped
|
|
469
|
+
<style scoped>
|
|
462
470
|
.LensCatalog {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
--c-bg-elv-4: var(--c-bg-2);
|
|
466
|
-
|
|
471
|
+
display: flex;
|
|
472
|
+
flex-direction: column;
|
|
467
473
|
flex-grow: 1;
|
|
474
|
+
background-color: var(--c-bg-1);
|
|
468
475
|
}
|
|
469
476
|
|
|
470
477
|
.LensCatalog.show-empty-state {
|
|
@@ -472,10 +479,25 @@ defineExpose({
|
|
|
472
479
|
background-color: var(--c-bg-1);
|
|
473
480
|
}
|
|
474
481
|
|
|
482
|
+
.LensCatalog.has-border {
|
|
483
|
+
.container {
|
|
484
|
+
border: 1px solid var(--c-border);
|
|
485
|
+
border-radius: 12px;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
:deep(.LensCatalogControl) {
|
|
489
|
+
border-radius: 11px 11px 0 0;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
:deep(.LensCatalogFooter) {
|
|
493
|
+
border-radius: 0 0 11px 11px;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
475
497
|
.container {
|
|
476
498
|
display: flex;
|
|
477
499
|
flex-direction: column;
|
|
478
|
-
|
|
500
|
+
flex-grow: 1;
|
|
479
501
|
min-height: 100%;
|
|
480
502
|
}
|
|
481
503
|
|
|
@@ -483,18 +505,10 @@ defineExpose({
|
|
|
483
505
|
display: flex;
|
|
484
506
|
flex-direction: column;
|
|
485
507
|
flex-grow: 1;
|
|
486
|
-
border-radius: 0 0 5px 5px;
|
|
487
508
|
}
|
|
488
509
|
|
|
489
510
|
.control-skeleton {
|
|
490
|
-
height:
|
|
511
|
+
height: 56px;
|
|
491
512
|
background-color: var(--c-bg-1);
|
|
492
513
|
}
|
|
493
|
-
|
|
494
|
-
.condition-blocks {
|
|
495
|
-
display: flex;
|
|
496
|
-
flex-direction: column;
|
|
497
|
-
gap: 1px;
|
|
498
|
-
background-color: var(--c-gutter);
|
|
499
|
-
}
|
|
500
514
|
</style>
|
|
@@ -81,7 +81,7 @@ function createFilterPresetOptions(): ActionList {
|
|
|
81
81
|
</script>
|
|
82
82
|
|
|
83
83
|
<template>
|
|
84
|
-
<
|
|
84
|
+
<div class="LensCatalogControl">
|
|
85
85
|
<template v-if="!selected || selected.length === 0">
|
|
86
86
|
<div class="main">
|
|
87
87
|
<SInputText
|
|
@@ -95,7 +95,6 @@ function createFilterPresetOptions(): ActionList {
|
|
|
95
95
|
/>
|
|
96
96
|
<SActionMenu
|
|
97
97
|
v-if="filterPresets?.length"
|
|
98
|
-
type="outline"
|
|
99
98
|
size="sm"
|
|
100
99
|
:icon="IconLightning"
|
|
101
100
|
:label="t.a_filter_preset"
|
|
@@ -103,14 +102,12 @@ function createFilterPresetOptions(): ActionList {
|
|
|
103
102
|
/>
|
|
104
103
|
<SButton
|
|
105
104
|
v-if="showFilters"
|
|
106
|
-
type="outline"
|
|
107
105
|
size="sm"
|
|
108
106
|
:icon="IconFunnelSimple"
|
|
109
107
|
:label="t.a_filter"
|
|
110
108
|
@click="$emit('filter')"
|
|
111
109
|
/>
|
|
112
110
|
<SButton
|
|
113
|
-
type="outline"
|
|
114
111
|
size="sm"
|
|
115
112
|
:icon="IconSlidersHorizontal"
|
|
116
113
|
:label="t.a_view"
|
|
@@ -120,7 +117,6 @@ function createFilterPresetOptions(): ActionList {
|
|
|
120
117
|
<div class="sub">
|
|
121
118
|
<slot name="sub-left" />
|
|
122
119
|
<SButton
|
|
123
|
-
type="outline"
|
|
124
120
|
size="sm"
|
|
125
121
|
:icon="isConditionActive ? IconBookOpenText : IconBook"
|
|
126
122
|
:disabled="isConditionDisabled"
|
|
@@ -142,16 +138,16 @@ function createFilterPresetOptions(): ActionList {
|
|
|
142
138
|
</div>
|
|
143
139
|
</div>
|
|
144
140
|
</template>
|
|
145
|
-
</
|
|
141
|
+
</div>
|
|
146
142
|
</template>
|
|
147
143
|
|
|
148
|
-
<style scoped
|
|
144
|
+
<style scoped>
|
|
149
145
|
.LensCatalogControl {
|
|
150
146
|
display: flex;
|
|
151
147
|
align-items: center;
|
|
152
|
-
border-radius: 5px 5px 0 0;
|
|
153
148
|
padding: var(--lens-catalog-control-padding, 0 12px);
|
|
154
|
-
height:
|
|
149
|
+
height: 56px;
|
|
150
|
+
background-color: var(--c-bg-1);
|
|
155
151
|
}
|
|
156
152
|
|
|
157
153
|
.main {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import SPagination from '../../../components/SPagination.vue'
|
|
2
3
|
import { type LensResult } from '../LensResult'
|
|
3
4
|
|
|
4
5
|
defineProps<{
|
|
@@ -14,28 +15,27 @@ defineEmits<{
|
|
|
14
15
|
|
|
15
16
|
<template>
|
|
16
17
|
<div class="LensCatalogFooter">
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</SControlRight>
|
|
28
|
-
</SControl>
|
|
18
|
+
<SPagination
|
|
19
|
+
size="small"
|
|
20
|
+
align="right"
|
|
21
|
+
:total="result.pagination.total"
|
|
22
|
+
:page="result.pagination.page"
|
|
23
|
+
:per-page="result.pagination.perPage"
|
|
24
|
+
:disabled="loading"
|
|
25
|
+
@prev="$emit('prev')"
|
|
26
|
+
@next="$emit('next')"
|
|
27
|
+
/>
|
|
29
28
|
</div>
|
|
30
29
|
</template>
|
|
31
30
|
|
|
32
|
-
<style scoped
|
|
31
|
+
<style scoped>
|
|
33
32
|
.LensCatalogFooter {
|
|
34
33
|
position: relative;
|
|
35
34
|
z-index: 10;
|
|
36
35
|
display: flex;
|
|
37
|
-
|
|
36
|
+
justify-content: flex-end;
|
|
38
37
|
align-items: center;
|
|
38
|
+
flex-shrink: 0;
|
|
39
39
|
margin-top: -1px;
|
|
40
40
|
border-top: 1px solid var(--c-gutter);
|
|
41
41
|
border-radius: 0 0 5px 5px;
|
|
@@ -88,7 +88,7 @@ function isConnector(value: any): value is '$and' | '$or' {
|
|
|
88
88
|
</script>
|
|
89
89
|
|
|
90
90
|
<template>
|
|
91
|
-
<
|
|
91
|
+
<div class="LensCatalogStateFilter">
|
|
92
92
|
<div v-if="!isOpen" class="closed">
|
|
93
93
|
<span class="filter-count">{{ t.filter_count(group.count) }}</span>
|
|
94
94
|
</div>
|
|
@@ -111,10 +111,10 @@ function isConnector(value: any): value is '$and' | '$or' {
|
|
|
111
111
|
</span>
|
|
112
112
|
</button>
|
|
113
113
|
</div>
|
|
114
|
-
</
|
|
114
|
+
</div>
|
|
115
115
|
</template>
|
|
116
116
|
|
|
117
|
-
<style scoped
|
|
117
|
+
<style scoped>
|
|
118
118
|
.LensCatalogStateFilter {
|
|
119
119
|
display: flex;
|
|
120
120
|
gap: 16px;
|
|
@@ -50,7 +50,7 @@ function getOrderText(sort: LensQuerySort): string {
|
|
|
50
50
|
</script>
|
|
51
51
|
|
|
52
52
|
<template>
|
|
53
|
-
<
|
|
53
|
+
<div class="LensCatalogStateSort">
|
|
54
54
|
<div v-if="!isOpen" class="closed">
|
|
55
55
|
<span class="sort-count">{{ t.sort_count(sorts.length) }}</span>
|
|
56
56
|
</div>
|
|
@@ -72,10 +72,10 @@ function getOrderText(sort: LensQuerySort): string {
|
|
|
72
72
|
</span>
|
|
73
73
|
</button>
|
|
74
74
|
</div>
|
|
75
|
-
</
|
|
75
|
+
</div>
|
|
76
76
|
</template>
|
|
77
77
|
|
|
78
|
-
<style scoped
|
|
78
|
+
<style scoped>
|
|
79
79
|
.LensCatalogStateSort {
|
|
80
80
|
display: flex;
|
|
81
81
|
gap: 16px;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
|
+
import SButton from '../../../components/SButton.vue'
|
|
4
|
+
import SCard from '../../../components/SCard.vue'
|
|
5
|
+
import SCardBlock from '../../../components/SCardBlock.vue'
|
|
6
|
+
import SCardClose from '../../../components/SCardClose.vue'
|
|
7
|
+
import SCardFooter from '../../../components/SCardFooter.vue'
|
|
8
|
+
import SContent from '../../../components/SContent.vue'
|
|
9
|
+
import SDoc from '../../../components/SDoc.vue'
|
|
3
10
|
import { useData } from '../../../composables/Data'
|
|
4
11
|
import { useLang, useTrans } from '../../../composables/Lang'
|
|
5
12
|
import { useValidation } from '../../../composables/Validation'
|
|
@@ -129,6 +136,7 @@ async function onApply() {
|
|
|
129
136
|
|
|
130
137
|
<template>
|
|
131
138
|
<SCard class="LensFormFilters" size="xlarge">
|
|
139
|
+
<SCardClose @click="$emit('cancel')" />
|
|
132
140
|
<SCardBlock class="s-p-32">
|
|
133
141
|
<SDoc>
|
|
134
142
|
<SContent>
|
|
@@ -143,27 +151,18 @@ async function onApply() {
|
|
|
143
151
|
/>
|
|
144
152
|
</SDoc>
|
|
145
153
|
</SCardBlock>
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
</SControl>
|
|
160
|
-
</SCardBlock>
|
|
154
|
+
<SCardFooter class="s-py-16 s-px-32">
|
|
155
|
+
<SButton
|
|
156
|
+
size="md"
|
|
157
|
+
:label="t.a_cancel"
|
|
158
|
+
@click="$emit('cancel')"
|
|
159
|
+
/>
|
|
160
|
+
<SButton
|
|
161
|
+
size="md"
|
|
162
|
+
mode="info"
|
|
163
|
+
:label="t.a_apply"
|
|
164
|
+
@click="onApply"
|
|
165
|
+
/>
|
|
166
|
+
</SCardFooter>
|
|
161
167
|
</SCard>
|
|
162
168
|
</template>
|
|
163
|
-
|
|
164
|
-
<style scoped lang="postcss">
|
|
165
|
-
.LensFormFilters {
|
|
166
|
-
--c-bg-elv-2: var(--c-bg-1);
|
|
167
|
-
--c-bg-elv-3: var(--c-bg-1);
|
|
168
|
-
}
|
|
169
|
-
</style>
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import SButton from '../../../components/SButton.vue'
|
|
3
|
+
import SCard from '../../../components/SCard.vue'
|
|
4
|
+
import SCardBlock from '../../../components/SCardBlock.vue'
|
|
5
|
+
import SCardClose from '../../../components/SCardClose.vue'
|
|
6
|
+
import SCardFooter from '../../../components/SCardFooter.vue'
|
|
7
|
+
import SContent from '../../../components/SContent.vue'
|
|
8
|
+
import SDoc from '../../../components/SDoc.vue'
|
|
2
9
|
import SInputCheckbox from '../../../components/SInputCheckbox.vue'
|
|
3
10
|
import SInputNumber from '../../../components/SInputNumber.vue'
|
|
4
11
|
import SInputText from '../../../components/SInputText.vue'
|
|
@@ -91,6 +98,7 @@ async function onSave() {
|
|
|
91
98
|
|
|
92
99
|
<template>
|
|
93
100
|
<SCard class="LensFormOverrideBase" size="large">
|
|
101
|
+
<SCardClose @click="$emit('cancel')" />
|
|
94
102
|
<SCardBlock class="s-p-32">
|
|
95
103
|
<SDoc>
|
|
96
104
|
<SContent>
|
|
@@ -147,30 +155,23 @@ async function onSave() {
|
|
|
147
155
|
</div>
|
|
148
156
|
</SDoc>
|
|
149
157
|
</SCardBlock>
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
</SControl>
|
|
164
|
-
</SCardBlock>
|
|
158
|
+
<SCardFooter class="s-py-16 s-px-32">
|
|
159
|
+
<SButton
|
|
160
|
+
size="md"
|
|
161
|
+
:label="t.a_cancel"
|
|
162
|
+
@click="$emit('cancel')"
|
|
163
|
+
/>
|
|
164
|
+
<SButton
|
|
165
|
+
size="md"
|
|
166
|
+
mode="info"
|
|
167
|
+
:label="t.a_apply"
|
|
168
|
+
@click="onSave"
|
|
169
|
+
/>
|
|
170
|
+
</SCardFooter>
|
|
165
171
|
</SCard>
|
|
166
172
|
</template>
|
|
167
173
|
|
|
168
|
-
<style scoped
|
|
169
|
-
.LensFormOverrideBase {
|
|
170
|
-
--c-bg-elv-2: var(--c-bg-1);
|
|
171
|
-
--c-bg-elv-3: var(--c-bg-1);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
+
<style scoped>
|
|
174
175
|
.fieldset {
|
|
175
176
|
display: flex;
|
|
176
177
|
flex-direction: column;
|
|
@@ -8,7 +8,14 @@ import { cloneDeep } from 'lodash-es'
|
|
|
8
8
|
import { computed, ref } from 'vue'
|
|
9
9
|
import { useDraggable } from 'vue-draggable-plus'
|
|
10
10
|
import SButton from '../../../components/SButton.vue'
|
|
11
|
+
import SCard from '../../../components/SCard.vue'
|
|
12
|
+
import SCardBlock from '../../../components/SCardBlock.vue'
|
|
13
|
+
import SCardClose from '../../../components/SCardClose.vue'
|
|
14
|
+
import SCardFooter from '../../../components/SCardFooter.vue'
|
|
15
|
+
import SContent from '../../../components/SContent.vue'
|
|
16
|
+
import SDoc from '../../../components/SDoc.vue'
|
|
11
17
|
import SInputCheckbox from '../../../components/SInputCheckbox.vue'
|
|
18
|
+
import SModal from '../../../components/SModal.vue'
|
|
12
19
|
import { useLang, useTrans } from '../../../composables/Lang'
|
|
13
20
|
import { usePower } from '../../../composables/Power'
|
|
14
21
|
import { type FieldData } from '../FieldData'
|
|
@@ -149,6 +156,7 @@ async function onApply() {
|
|
|
149
156
|
|
|
150
157
|
<template>
|
|
151
158
|
<SCard class="LensFormView" size="medium">
|
|
159
|
+
<SCardClose @click="$emit('cancel')" />
|
|
152
160
|
<SCardBlock class="s-p-32">
|
|
153
161
|
<SDoc>
|
|
154
162
|
<SContent>
|
|
@@ -217,21 +225,19 @@ async function onApply() {
|
|
|
217
225
|
</div>
|
|
218
226
|
</SDoc>
|
|
219
227
|
</SCardBlock>
|
|
220
|
-
<
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
</SControl>
|
|
234
|
-
</SCardBlock>
|
|
228
|
+
<SCardFooter class="s-py-16 s-px-32">
|
|
229
|
+
<SButton
|
|
230
|
+
size="md"
|
|
231
|
+
:label="t.a_cancel"
|
|
232
|
+
@click="$emit('cancel')"
|
|
233
|
+
/>
|
|
234
|
+
<SButton
|
|
235
|
+
size="md"
|
|
236
|
+
mode="info"
|
|
237
|
+
:label="t.a_apply"
|
|
238
|
+
@click="onApply"
|
|
239
|
+
/>
|
|
240
|
+
</SCardFooter>
|
|
235
241
|
|
|
236
242
|
<SModal :open="editDialog.state.value" @close="editDialog.off()">
|
|
237
243
|
<LensFormOverride
|
|
@@ -246,12 +252,7 @@ async function onApply() {
|
|
|
246
252
|
</SCard>
|
|
247
253
|
</template>
|
|
248
254
|
|
|
249
|
-
<style scoped
|
|
250
|
-
.LensFormView {
|
|
251
|
-
--c-bg-elv-2: var(--c-bg-1);
|
|
252
|
-
--c-bg-elv-3: var(--c-bg-1);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
+
<style scoped>
|
|
255
256
|
.main {
|
|
256
257
|
display: flex;
|
|
257
258
|
flex-direction: column;
|
|
@@ -286,15 +287,13 @@ async function onApply() {
|
|
|
286
287
|
.input {
|
|
287
288
|
display: flex;
|
|
288
289
|
flex-grow: 1;
|
|
289
|
-
|
|
290
|
-
border: 1px dashed var(--c-divider);
|
|
290
|
+
border: 1px dashed var(--input-border-color);
|
|
291
291
|
border-radius: 6px;
|
|
292
|
-
background-color: var(--c-gutter);
|
|
293
292
|
overflow: hidden;
|
|
294
293
|
transition: border-color 0.25s;
|
|
295
294
|
|
|
296
295
|
&:hover {
|
|
297
|
-
border-color: var(--
|
|
296
|
+
border-color: var(--input-hover-border-color);
|
|
298
297
|
}
|
|
299
298
|
}
|
|
300
299
|
|
|
@@ -318,7 +317,7 @@ async function onApply() {
|
|
|
318
317
|
display: flex;
|
|
319
318
|
align-items: center;
|
|
320
319
|
flex-grow: 1;
|
|
321
|
-
padding: 0 8px;
|
|
320
|
+
padding: 0 8px 0 0;
|
|
322
321
|
background-color: var(--c-bg-1);
|
|
323
322
|
}
|
|
324
323
|
|
|
@@ -117,7 +117,7 @@ function onSortUpdated(sort: LensQuerySort) {
|
|
|
117
117
|
</div>
|
|
118
118
|
</template>
|
|
119
119
|
|
|
120
|
-
<style scoped
|
|
120
|
+
<style scoped>
|
|
121
121
|
.LensTable {
|
|
122
122
|
display: flex;
|
|
123
123
|
flex-direction: column;
|
|
@@ -132,8 +132,6 @@ function onSortUpdated(sort: LensQuerySort) {
|
|
|
132
132
|
* but it is quite tricky to scope the desired field in CSS at the moment.
|
|
133
133
|
*/
|
|
134
134
|
font-feature-settings: "tnum";
|
|
135
|
-
|
|
136
|
-
--c-bg-elv-3: var(--c-bg-1);
|
|
137
135
|
}
|
|
138
136
|
|
|
139
137
|
.LensTable.is-loading,
|
|
@@ -51,9 +51,9 @@ provideCardBlockSize(computed(() => props.size ?? null))
|
|
|
51
51
|
width: 100%;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.SCardBlock.xsmall { height: 40px; }
|
|
55
|
-
.SCardBlock.small { height: 48px; }
|
|
56
|
-
.SCardBlock.medium { height: 56px; }
|
|
57
|
-
.SCardBlock.large { height: 64px; }
|
|
58
|
-
.SCardBlock.xlarge { height: 80px; }
|
|
54
|
+
.SCardBlock.xsmall { height: 40px; min-height: 40px; }
|
|
55
|
+
.SCardBlock.small { height: 48px; min-height: 48px; }
|
|
56
|
+
.SCardBlock.medium { height: 56px; min-height: 56px; }
|
|
57
|
+
.SCardBlock.large { height: 64px; min-height: 64px; }
|
|
58
|
+
.SCardBlock.xlarge { height: 80px; min-height: 80px; }
|
|
59
59
|
</style>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref } from 'vue'
|
|
3
|
+
import SDivider from './SDivider.vue'
|
|
3
4
|
import SInputBase, { type Props as BaseProps } from './SInputBase.vue'
|
|
4
5
|
import SInputSegments from './SInputSegments.vue'
|
|
5
6
|
|
|
6
7
|
export type { Color, Size } from './SInputBase.vue'
|
|
8
|
+
|
|
7
9
|
export interface Props extends BaseProps {
|
|
8
10
|
placeholder?: string
|
|
9
11
|
disabled?: boolean
|
|
@@ -29,10 +31,10 @@ const emit = defineEmits<{
|
|
|
29
31
|
}>()
|
|
30
32
|
|
|
31
33
|
const sizePaddingYDict = {
|
|
32
|
-
sm:
|
|
33
|
-
md:
|
|
34
|
-
mini:
|
|
35
|
-
small:
|
|
34
|
+
sm: 6,
|
|
35
|
+
md: 10,
|
|
36
|
+
mini: 6,
|
|
37
|
+
small: 10,
|
|
36
38
|
medium: 22
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -67,6 +69,8 @@ const style = computed(() => {
|
|
|
67
69
|
return `field-sizing:content;${minHeight}${maxHeight}`
|
|
68
70
|
})
|
|
69
71
|
|
|
72
|
+
const isPreview = ref(false)
|
|
73
|
+
|
|
70
74
|
function emitInput(e: Event): void {
|
|
71
75
|
const v = (e.target as HTMLInputElement).value || null
|
|
72
76
|
emit('update:model-value', v)
|
|
@@ -80,8 +84,6 @@ function emitBlur(e: FocusEvent): void {
|
|
|
80
84
|
emit('update:model-value', v)
|
|
81
85
|
emit('blur', v)
|
|
82
86
|
}
|
|
83
|
-
|
|
84
|
-
const isPreview = ref(false)
|
|
85
87
|
</script>
|
|
86
88
|
|
|
87
89
|
<template>
|
|
@@ -115,11 +117,11 @@ const isPreview = ref(false)
|
|
|
115
117
|
size="mini"
|
|
116
118
|
/>
|
|
117
119
|
</div>
|
|
118
|
-
|
|
119
120
|
<div v-if="$slots.actions && !isPreview" class="actions">
|
|
120
121
|
<slot name="actions" />
|
|
121
122
|
</div>
|
|
122
123
|
</div>
|
|
124
|
+
<SDivider v-if="preview !== undefined || $slots.actions" />
|
|
123
125
|
<textarea
|
|
124
126
|
v-show="!isPreview"
|
|
125
127
|
:id="name"
|
|
@@ -145,71 +147,6 @@ const isPreview = ref(false)
|
|
|
145
147
|
</template>
|
|
146
148
|
|
|
147
149
|
<style scoped lang="postcss">
|
|
148
|
-
.box {
|
|
149
|
-
display: flex;
|
|
150
|
-
flex-direction: column;
|
|
151
|
-
gap: 1px;
|
|
152
|
-
flex-grow: 1;
|
|
153
|
-
border: 1px solid var(--input-border-color);
|
|
154
|
-
border-radius: 8px;
|
|
155
|
-
width: 100%;
|
|
156
|
-
background-color: var(--c-gutter);
|
|
157
|
-
box-shadow: var(--input-box-shadow);
|
|
158
|
-
overflow: hidden;
|
|
159
|
-
transition: border-color 0.25s;
|
|
160
|
-
|
|
161
|
-
&:has(.input:hover) {
|
|
162
|
-
border-color: var(--input-hover-border-color);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&:has(.input:focus) {
|
|
166
|
-
border-color: var(--input-focus-border-color);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.control {
|
|
171
|
-
display: flex;
|
|
172
|
-
align-items: center;
|
|
173
|
-
flex-shrink: 0;
|
|
174
|
-
padding: 0 8px;
|
|
175
|
-
height: 48px;
|
|
176
|
-
background-color: var(--c-bg-1);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.preview {
|
|
180
|
-
flex-grow: 1;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.actions {
|
|
184
|
-
display: flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
flex-shrink: 0;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.input,
|
|
190
|
-
.prose {
|
|
191
|
-
display: block;
|
|
192
|
-
flex-grow: 1;
|
|
193
|
-
width: 100%;
|
|
194
|
-
font-family: var(--input-value-font-family);
|
|
195
|
-
font-weight: 400;
|
|
196
|
-
background-color: var(--input-bg-color);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.input {
|
|
200
|
-
&::placeholder {
|
|
201
|
-
color: var(--input-placeholder-color);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.prose {
|
|
206
|
-
background-color: var(--c-bg-elv-3);
|
|
207
|
-
|
|
208
|
-
&.empty {
|
|
209
|
-
color: var(--input-placeholder-color);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
150
|
.SInputTextarea.sm,
|
|
214
151
|
.SInputTextarea.mini {
|
|
215
152
|
.input,
|
|
@@ -261,7 +198,8 @@ const isPreview = ref(false)
|
|
|
261
198
|
flex-grow: 1;
|
|
262
199
|
}
|
|
263
200
|
|
|
264
|
-
.SInputTextarea.disabled
|
|
201
|
+
.SInputTextarea.disabled,
|
|
202
|
+
.SInputTextarea.disabled:hover {
|
|
265
203
|
.box {
|
|
266
204
|
border-color: var(--input-disabled-border-color);
|
|
267
205
|
}
|
|
@@ -273,15 +211,69 @@ const isPreview = ref(false)
|
|
|
273
211
|
}
|
|
274
212
|
}
|
|
275
213
|
|
|
276
|
-
.SInputTextarea.has-error {
|
|
277
|
-
|
|
278
|
-
border-color: var(--input-error-border-color);
|
|
279
|
-
}
|
|
214
|
+
.SInputTextarea.has-error .box {
|
|
215
|
+
border-color: var(--input-error-border-color);
|
|
280
216
|
}
|
|
281
217
|
|
|
282
|
-
.SInputTextarea.has-warning {
|
|
283
|
-
|
|
284
|
-
|
|
218
|
+
.SInputTextarea.has-warning .box {
|
|
219
|
+
border-color: var(--input-warning-border-color);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.box {
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
flex-grow: 1;
|
|
226
|
+
border: 1px solid var(--input-border-color);
|
|
227
|
+
border-radius: 8px;
|
|
228
|
+
width: 100%;
|
|
229
|
+
box-shadow: var(--input-box-shadow);
|
|
230
|
+
background-color: var(--input-bg-color);
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
transition: border-color 0.25s;
|
|
233
|
+
|
|
234
|
+
&:has(.input:hover) {
|
|
235
|
+
border-color: var(--input-hover-border-color);
|
|
285
236
|
}
|
|
237
|
+
|
|
238
|
+
&:has(.input:focus) {
|
|
239
|
+
border-color: var(--input-focus-border-color);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.control {
|
|
244
|
+
display: flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
flex-shrink: 0;
|
|
247
|
+
padding: 0 8px;
|
|
248
|
+
height: 48px;
|
|
249
|
+
background-color: var(--c-bg-1);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.preview {
|
|
253
|
+
flex-grow: 1;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.actions {
|
|
257
|
+
display: flex;
|
|
258
|
+
align-items: center;
|
|
259
|
+
flex-shrink: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.input,
|
|
263
|
+
.prose {
|
|
264
|
+
display: block;
|
|
265
|
+
flex-grow: 1;
|
|
266
|
+
width: 100%;
|
|
267
|
+
font-family: var(--input-value-font-family);
|
|
268
|
+
font-weight: 400;
|
|
269
|
+
background-color: transparent;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.input::placeholder {
|
|
273
|
+
color: var(--input-placeholder-color);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.prose.empty {
|
|
277
|
+
color: var(--input-placeholder-color);
|
|
286
278
|
}
|
|
287
279
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalbrain/sefirot",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.40.1",
|
|
4
4
|
"description": "Vue Components for Global Brain Design System.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"./*": "./*"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
|
-
"docs": "pnpm docs:dev",
|
|
40
|
+
"docs": "pnpm run docs:dev",
|
|
41
41
|
"docs:dev": "vitepress dev docs --port 4011",
|
|
42
42
|
"docs:build": "vitepress build docs",
|
|
43
43
|
"docs:preview": "vitepress serve docs --port 4011",
|
|
44
|
-
"story": "pnpm story:dev",
|
|
44
|
+
"story": "pnpm run story:dev",
|
|
45
45
|
"story:dev": "NODE_NO_WARNINGS=1 VITE_CJS_IGNORE_WARNING=1 histoire dev --port 4010",
|
|
46
46
|
"story:build": "NODE_NO_WARNINGS=1 VITE_CJS_IGNORE_WARNING=1 histoire build",
|
|
47
47
|
"story:preview": "NODE_NO_WARNINGS=1 VITE_CJS_IGNORE_WARNING=1 histoire preview --port 4010",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@iconify-json/ph": "^1.2.2",
|
|
60
60
|
"@iconify-json/ri": "^1.2.10",
|
|
61
61
|
"@popperjs/core": "^2.11.8",
|
|
62
|
-
"@sentry/browser": "^10.
|
|
63
|
-
"@sentry/vue": "^10.
|
|
62
|
+
"@sentry/browser": "^10.47.0",
|
|
63
|
+
"@sentry/vue": "^10.47.0",
|
|
64
64
|
"@tanstack/vue-virtual": "3.0.0-beta.62",
|
|
65
65
|
"@tinyhttp/content-disposition": "^2.2.4",
|
|
66
66
|
"@tinyhttp/cookie": "^2.1.1",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/markdown-it": "^14.1.2",
|
|
73
73
|
"@types/qs": "^6.15.0",
|
|
74
74
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
75
|
-
"@vue/reactivity": "^3.5.
|
|
75
|
+
"@vue/reactivity": "^3.5.32",
|
|
76
76
|
"@vuelidate/core": "^2.0.3",
|
|
77
77
|
"@vuelidate/validators": "^2.0.4",
|
|
78
78
|
"@vueuse/core": "^14.2.1",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"dayjs": "^1.11.20",
|
|
82
82
|
"dompurify": "^3.3.3",
|
|
83
83
|
"file-saver": "^2.0.5",
|
|
84
|
-
"fuse.js": "^7.
|
|
84
|
+
"fuse.js": "^7.2.0",
|
|
85
85
|
"html2canvas": "^1.4.1",
|
|
86
|
-
"jsdom": "^29.0.
|
|
87
|
-
"lodash-es": "^4.
|
|
86
|
+
"jsdom": "^29.0.1",
|
|
87
|
+
"lodash-es": "^4.18.1",
|
|
88
88
|
"magic-string": "^0.30.21",
|
|
89
89
|
"markdown-it": "^14.1.1",
|
|
90
90
|
"normalize.css": "^8.0.1",
|
|
@@ -97,27 +97,27 @@
|
|
|
97
97
|
"unplugin-icons": "^23.0.1",
|
|
98
98
|
"v-calendar": "3.0.1",
|
|
99
99
|
"vite": "^7.3.1",
|
|
100
|
-
"vue": "^3.5.
|
|
100
|
+
"vue": "^3.5.32",
|
|
101
101
|
"vue-draggable-plus": "^0.6.1",
|
|
102
|
-
"vue-router": "^
|
|
102
|
+
"vue-router": "^5.0.4"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@globalbrain/eslint-config": "^3.0.1",
|
|
106
106
|
"@histoire/plugin-vue": "1.0.0-beta.1",
|
|
107
107
|
"@release-it/conventional-changelog": "^10.0.6",
|
|
108
|
-
"@types/jsdom": "^28.0.
|
|
109
|
-
"@types/node": "^25.5.
|
|
110
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
111
|
-
"@vitest/coverage-v8": "^4.1.
|
|
108
|
+
"@types/jsdom": "^28.0.1",
|
|
109
|
+
"@types/node": "^25.5.1",
|
|
110
|
+
"@typescript-eslint/rule-tester": "^8.58.0",
|
|
111
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
112
112
|
"@vue/test-utils": "^2.4.6",
|
|
113
113
|
"eslint": "^9.39.4",
|
|
114
|
-
"happy-dom": "^20.8.
|
|
114
|
+
"happy-dom": "^20.8.9",
|
|
115
115
|
"histoire": "1.0.0-beta.1",
|
|
116
116
|
"release-it": "^19.2.4",
|
|
117
117
|
"typescript": "~5.9.3",
|
|
118
|
-
"vitepress": "^2.0.0-alpha.
|
|
119
|
-
"vitest": "^4.1.
|
|
118
|
+
"vitepress": "^2.0.0-alpha.17",
|
|
119
|
+
"vitest": "^4.1.2",
|
|
120
120
|
"vue-tsc": "^3.2.6"
|
|
121
121
|
},
|
|
122
|
-
"packageManager": "pnpm@10.
|
|
122
|
+
"packageManager": "pnpm@10.33.0"
|
|
123
123
|
}
|