@globalbrain/sefirot 4.38.1 → 4.40.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/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/SAvatar.vue +7 -2
- package/lib/components/SAvatarStack.vue +5 -4
- package/lib/components/SButton.vue +3 -1
- package/lib/components/SCard.vue +35 -64
- package/lib/components/SCardBlock.vue +5 -12
- package/lib/components/SCardClose.vue +20 -0
- package/lib/components/SCardFooter.vue +15 -0
- package/lib/components/SContent.vue +25 -13
- package/lib/components/SInputCheckbox.vue +1 -0
- package/lib/components/SInputDate.vue +3 -2
- package/lib/components/SInputDropdown.vue +2 -1
- package/lib/components/SInputFile.vue +5 -4
- package/lib/components/SInputFileUpload.vue +1 -1
- package/lib/components/SInputHMS.vue +2 -1
- package/lib/components/SInputRadio.vue +1 -0
- package/lib/components/SInputSelect.vue +2 -1
- package/lib/components/SInputText.vue +3 -2
- package/lib/components/SInputTextarea.vue +72 -79
- package/lib/components/SInputYMD.vue +2 -1
- package/lib/components/SModal.vue +60 -1
- package/lib/components/SPagination.vue +0 -4
- package/lib/components/STable.vue +5 -5
- package/lib/components/STableCell.vue +4 -4
- package/lib/components/STableColumn.vue +4 -4
- package/lib/components/STableFooter.vue +3 -3
- package/lib/components/STableHeader.vue +1 -1
- package/lib/components/STableItem.vue +2 -2
- package/lib/styles/utilities.css +10 -0
- package/lib/styles/variables.css +115 -95
- package/package.json +20 -19
|
@@ -152,11 +152,12 @@ function onClick(): void {
|
|
|
152
152
|
letter-spacing: 0;
|
|
153
153
|
text-align: center;
|
|
154
154
|
border: 1px solid var(--button-border-color);
|
|
155
|
-
border-radius:
|
|
155
|
+
border-radius: 8px;
|
|
156
156
|
color: var(--button-text-color);
|
|
157
157
|
background-color: var(--button-bg-color);
|
|
158
158
|
overflow: hidden;
|
|
159
159
|
white-space: nowrap;
|
|
160
|
+
box-shadow: var(--button-box-shadow, none);
|
|
160
161
|
transition: color 0.25s, border-color 0.25s, background-color 0.25s;
|
|
161
162
|
|
|
162
163
|
&:hover {
|
|
@@ -356,6 +357,7 @@ function onClick(): void {
|
|
|
356
357
|
--button-text-color: var(--button-fill-default-text-color);
|
|
357
358
|
--button-bg-color: var(--button-fill-default-bg-color);
|
|
358
359
|
--button-count-bg-color: var(--button-fill-default-count-bg-color);
|
|
360
|
+
--button-box-shadow: var(--button-fill-default-box-shadow);
|
|
359
361
|
--button-hover-border-color: var(--button-fill-default-hover-border-color);
|
|
360
362
|
--button-hover-text-color: var(--button-fill-default-hover-text-color);
|
|
361
363
|
--button-hover-bg-color: var(--button-fill-default-hover-bg-color);
|
package/lib/components/SCard.vue
CHANGED
|
@@ -2,19 +2,26 @@
|
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
import { provideCardState } from '../composables/Card'
|
|
4
4
|
|
|
5
|
+
export interface Props {
|
|
6
|
+
size?: Size
|
|
7
|
+
mode?: Mode
|
|
8
|
+
muted?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
export type Size = 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge'
|
|
6
12
|
export type Mode = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
7
13
|
|
|
8
|
-
const props = defineProps<{
|
|
9
|
-
size
|
|
10
|
-
mode
|
|
11
|
-
}
|
|
14
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
+
size: 'medium',
|
|
16
|
+
mode: 'neutral'
|
|
17
|
+
})
|
|
12
18
|
|
|
13
19
|
const { isCollapsed } = provideCardState()
|
|
14
20
|
|
|
15
21
|
const classes = computed(() => [
|
|
16
22
|
props.size,
|
|
17
|
-
props.mode
|
|
23
|
+
props.mode,
|
|
24
|
+
{ muted: props.muted },
|
|
18
25
|
{ collapsed: isCollapsed.value }
|
|
19
26
|
])
|
|
20
27
|
</script>
|
|
@@ -25,17 +32,18 @@ const classes = computed(() => [
|
|
|
25
32
|
</div>
|
|
26
33
|
</template>
|
|
27
34
|
|
|
28
|
-
<style scoped
|
|
35
|
+
<style scoped>
|
|
29
36
|
.SCard {
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
position: relative;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
32
40
|
gap: 1px;
|
|
33
41
|
border: 1px solid transparent;
|
|
34
|
-
border-radius:
|
|
35
|
-
background-color: var(--c-
|
|
42
|
+
border-radius: 12px;
|
|
43
|
+
background-color: var(--c-divider);
|
|
36
44
|
}
|
|
37
45
|
|
|
38
|
-
.SCard.neutral { border-color: var(--c-
|
|
46
|
+
.SCard.neutral { border-color: var(--c-border); }
|
|
39
47
|
.SCard.info { border-color: var(--c-border-info-1); }
|
|
40
48
|
.SCard.success { border-color: var(--c-border-success-1); }
|
|
41
49
|
.SCard.warning { border-color: var(--c-border-warning-1); }
|
|
@@ -46,62 +54,25 @@ const classes = computed(() => [
|
|
|
46
54
|
overflow: hidden;
|
|
47
55
|
}
|
|
48
56
|
|
|
49
|
-
.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
@media (min-width: 512px) {
|
|
55
|
-
margin: 24px 24px 128px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@media (min-width: 768px) {
|
|
59
|
-
margin: 48px 48px 128px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&.small {
|
|
63
|
-
@media (min-width: 560px) {
|
|
64
|
-
margin: 24px auto 128px;
|
|
65
|
-
max-width: 512px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@media (min-width: 768px) {
|
|
69
|
-
margin: 48px auto 128px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&.medium {
|
|
74
|
-
@media (min-width: 736px) {
|
|
75
|
-
margin: 48px auto 128px;
|
|
76
|
-
max-width: 640px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.large {
|
|
81
|
-
@media (min-width: 864px) {
|
|
82
|
-
margin: 48px auto 128px;
|
|
83
|
-
max-width: 768px;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
57
|
+
.SCard :deep(> .SCardBlock:first-child),
|
|
58
|
+
.SCard :deep(> .SCardClose + .SCardBlock) {
|
|
59
|
+
border-top-left-radius: 11px;
|
|
60
|
+
border-top-right-radius: 11px;
|
|
61
|
+
}
|
|
86
62
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
}
|
|
63
|
+
.SCard :deep(> .SCardBlock:last-child) {
|
|
64
|
+
border-bottom-right-radius: 11px;
|
|
65
|
+
border-bottom-left-radius: 11px;
|
|
66
|
+
}
|
|
93
67
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
margin: 48px auto 128px;
|
|
97
|
-
max-width: 1152px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
68
|
+
.SCard.muted :deep(> .SCardBlock) {
|
|
69
|
+
background-color: var(--c-bg-2);
|
|
100
70
|
}
|
|
101
71
|
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
72
|
+
.SCard :deep(> .SCardClose) {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 8px;
|
|
75
|
+
right: 8px;
|
|
76
|
+
z-index: 10;
|
|
106
77
|
}
|
|
107
78
|
</style>
|
|
@@ -5,6 +5,9 @@ import { type CardBlockSize, provideCardBlockSize } from '../composables/Card'
|
|
|
5
5
|
export type { CardBlockSize as Size }
|
|
6
6
|
|
|
7
7
|
export type Bg =
|
|
8
|
+
| '1'
|
|
9
|
+
| '2'
|
|
10
|
+
| '3'
|
|
8
11
|
| 'elv-1'
|
|
9
12
|
| 'elv-2'
|
|
10
13
|
| 'elv-3'
|
|
@@ -15,7 +18,7 @@ const props = withDefaults(defineProps<{
|
|
|
15
18
|
size?: CardBlockSize
|
|
16
19
|
bg?: Bg
|
|
17
20
|
}>(), {
|
|
18
|
-
bg: '
|
|
21
|
+
bg: '1'
|
|
19
22
|
})
|
|
20
23
|
|
|
21
24
|
const _bg = computed(() => {
|
|
@@ -31,23 +34,13 @@ provideCardBlockSize(computed(() => props.size ?? null))
|
|
|
31
34
|
</div>
|
|
32
35
|
</template>
|
|
33
36
|
|
|
34
|
-
<style scoped
|
|
37
|
+
<style scoped>
|
|
35
38
|
.SCardBlock {
|
|
36
39
|
&.compact { padding: 12px; }
|
|
37
40
|
&.wide { padding: 16px; }
|
|
38
41
|
&.xwide { padding: 24px; }
|
|
39
42
|
}
|
|
40
43
|
|
|
41
|
-
.SCard > .SCardBlock:first-child {
|
|
42
|
-
border-top-left-radius: 5px;
|
|
43
|
-
border-top-right-radius: 5px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.SCard > .SCardBlock:last-child {
|
|
47
|
-
border-bottom-right-radius: 5px;
|
|
48
|
-
border-bottom-left-radius: 5px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
44
|
.SCardBlock.xsmall,
|
|
52
45
|
.SCardBlock.small,
|
|
53
46
|
.SCardBlock.medium,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import IconX from '~icons/ph/x'
|
|
3
|
+
import SButton from './SButton.vue'
|
|
4
|
+
|
|
5
|
+
defineEmits<{
|
|
6
|
+
click: []
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="SCardClose">
|
|
12
|
+
<SButton
|
|
13
|
+
size="sm"
|
|
14
|
+
type="text"
|
|
15
|
+
mode="mute"
|
|
16
|
+
:icon="IconX"
|
|
17
|
+
@click="$emit('click')"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="SCardFooter">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<style scoped>
|
|
8
|
+
.SCardFooter {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: flex-end;
|
|
11
|
+
gap: 12px;
|
|
12
|
+
border-radius: 0 0 11px 11px;
|
|
13
|
+
background-color: var(--c-bg-2);
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<style scoped
|
|
7
|
+
<style scoped>
|
|
8
8
|
.SContent {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
max-width: 720px;
|
|
19
19
|
line-height: 36px;
|
|
20
20
|
font-size: 24px;
|
|
21
|
-
font-weight:
|
|
21
|
+
font-weight: 600;
|
|
22
22
|
color: var(--c-text-1);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
margin: 16px 0 0;
|
|
28
28
|
padding: 0;
|
|
29
29
|
max-width: 720px;
|
|
30
|
-
line-height:
|
|
30
|
+
line-height: 28px;
|
|
31
31
|
font-size: 20px;
|
|
32
|
-
font-weight:
|
|
32
|
+
font-weight: 600;
|
|
33
33
|
color: var(--c-text-1);
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -38,9 +38,20 @@
|
|
|
38
38
|
margin: 16px 0 0;
|
|
39
39
|
padding: 0;
|
|
40
40
|
max-width: 720px;
|
|
41
|
-
line-height:
|
|
41
|
+
line-height: 30px;
|
|
42
42
|
font-size: 18px;
|
|
43
|
-
font-weight:
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
color: var(--c-text-1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.SContent :deep(h4),
|
|
48
|
+
.SContent :deep(.h4) {
|
|
49
|
+
margin: 16px 0 0;
|
|
50
|
+
padding: 0;
|
|
51
|
+
max-width: 720px;
|
|
52
|
+
line-height: 28px;
|
|
53
|
+
font-size: 16px;
|
|
54
|
+
font-weight: 600;
|
|
44
55
|
color: var(--c-text-1);
|
|
45
56
|
}
|
|
46
57
|
|
|
@@ -49,7 +60,9 @@
|
|
|
49
60
|
.SContent :deep(h2:first-child),
|
|
50
61
|
.SContent :deep(.h2:first-child),
|
|
51
62
|
.SContent :deep(h3:first-child),
|
|
52
|
-
.SContent :deep(.h3:first-child)
|
|
63
|
+
.SContent :deep(.h3:first-child),
|
|
64
|
+
.SContent :deep(h4:first-child),
|
|
65
|
+
.SContent :deep(.h4:first-child) {
|
|
53
66
|
margin-top: 0;
|
|
54
67
|
}
|
|
55
68
|
|
|
@@ -124,16 +137,16 @@
|
|
|
124
137
|
.SContent :deep(table) {
|
|
125
138
|
margin: 8px 0;
|
|
126
139
|
border-style: hidden;
|
|
127
|
-
border-radius:
|
|
140
|
+
border-radius: 8px;
|
|
128
141
|
text-align: left;
|
|
129
142
|
font-size: 14px;
|
|
130
143
|
color: var(--c-text-1);
|
|
131
144
|
overflow: clip;
|
|
132
|
-
box-shadow: 0 0 0 1px var(--c-
|
|
145
|
+
box-shadow: 0 0 0 1px var(--c-border);
|
|
133
146
|
}
|
|
134
147
|
|
|
135
148
|
.SContent :deep(table tr:hover td) {
|
|
136
|
-
background-color: var(--c-bg-
|
|
149
|
+
background-color: var(--c-bg-2);
|
|
137
150
|
}
|
|
138
151
|
|
|
139
152
|
.SContent :deep(table thead > tr > th) {
|
|
@@ -142,18 +155,17 @@
|
|
|
142
155
|
|
|
143
156
|
.SContent :deep(table th),
|
|
144
157
|
.SContent :deep(table td) {
|
|
145
|
-
border: 1px solid var(--c-
|
|
158
|
+
border: 1px solid var(--c-divider);
|
|
146
159
|
padding: 8px 16px;
|
|
147
160
|
height: 40px;
|
|
148
161
|
vertical-align: top;
|
|
149
162
|
text-wrap: pretty;
|
|
150
|
-
background-color: var(--c-bg-elv-3);
|
|
151
163
|
overflow-wrap: break-word;
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
.SContent :deep(table th) {
|
|
155
167
|
font-size: 12px;
|
|
156
|
-
font-weight:
|
|
168
|
+
font-weight: 500;
|
|
157
169
|
color: var(--c-text-2);
|
|
158
170
|
text-wrap: balance;
|
|
159
171
|
}
|
|
@@ -113,7 +113,7 @@ function onBlur() {
|
|
|
113
113
|
.SInputDate.md {
|
|
114
114
|
.input {
|
|
115
115
|
padding: 6px 10px;
|
|
116
|
-
max-width:
|
|
116
|
+
max-width: 128px;
|
|
117
117
|
height: 36px;
|
|
118
118
|
line-height: 24px;
|
|
119
119
|
font-size: var(--input-font-size, var(--input-small-font-size));
|
|
@@ -165,11 +165,12 @@ function onBlur() {
|
|
|
165
165
|
.input {
|
|
166
166
|
display: block;
|
|
167
167
|
border: 1px solid var(--input-border-color);
|
|
168
|
-
border-radius:
|
|
168
|
+
border-radius: 8px;
|
|
169
169
|
width: 100%;
|
|
170
170
|
font-weight: 400;
|
|
171
171
|
font-feature-settings: 'tnum';
|
|
172
172
|
background-color: var(--input-bg-color);
|
|
173
|
+
box-shadow: var(--input-box-shadow);
|
|
173
174
|
transition: border-color 0.25s, background-color 0.25s;
|
|
174
175
|
|
|
175
176
|
&::placeholder {
|
|
@@ -192,10 +192,11 @@ function onSelect(value: OptionValue) {
|
|
|
192
192
|
display: flex;
|
|
193
193
|
align-items: center;
|
|
194
194
|
border: 1px solid var(--input-border-color);
|
|
195
|
-
border-radius:
|
|
195
|
+
border-radius: 8px;
|
|
196
196
|
width: 100%;
|
|
197
197
|
color: var(--input-text);
|
|
198
198
|
background-color: var(--input-bg-color);
|
|
199
|
+
box-shadow: var(--input-box-shadow);
|
|
199
200
|
cursor: pointer;
|
|
200
201
|
transition: border-color 0.25s, background-color 0.25s;
|
|
201
202
|
|
|
@@ -203,6 +203,7 @@ function onChange(e: Event) {
|
|
|
203
203
|
border: 1px solid var(--input-border-color);
|
|
204
204
|
border-radius: 6px;
|
|
205
205
|
background-color: var(--input-bg-color);
|
|
206
|
+
box-shadow: var(--input-box-shadow);
|
|
206
207
|
cursor: pointer;
|
|
207
208
|
transition: border-color 0.25s;
|
|
208
209
|
|
|
@@ -211,8 +212,7 @@ function onChange(e: Event) {
|
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
&:hover .button {
|
|
214
|
-
|
|
215
|
-
background-color: var(--c-bg-mute-2);
|
|
215
|
+
background-color: var(--button-fill-default-hover-bg-color);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
|
|
@@ -221,10 +221,11 @@ function onChange(e: Event) {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
.button {
|
|
224
|
-
border: 1px solid var(--
|
|
224
|
+
border: 1px solid var(--button-fill-default-border-color);
|
|
225
225
|
border-radius: 3px;
|
|
226
226
|
color: var(--c-text-1);
|
|
227
|
-
background-color: var(--
|
|
227
|
+
background-color: var(--button-fill-default-bg-color);
|
|
228
|
+
box-shadow: var(--button-fill-default-box-shadow);
|
|
228
229
|
transition: border-color 0.25s, background-color 0.25s;
|
|
229
230
|
}
|
|
230
231
|
|
|
@@ -308,8 +308,9 @@ function createRequiredTouched(): boolean[] {
|
|
|
308
308
|
.container {
|
|
309
309
|
display: inline-flex;
|
|
310
310
|
border: 1px solid var(--input-border-color);
|
|
311
|
-
border-radius:
|
|
311
|
+
border-radius: 8px;
|
|
312
312
|
background-color: var(--input-bg-color);
|
|
313
|
+
box-shadow: var(--input-box-shadow);
|
|
313
314
|
transition: border-color 0.25s;
|
|
314
315
|
|
|
315
316
|
&:hover { border-color: var(--input-hover-border-color); }
|
|
@@ -186,10 +186,11 @@ function emitChange(e: any): void {
|
|
|
186
186
|
.box {
|
|
187
187
|
position: relative;
|
|
188
188
|
border: 1px solid var(--input-border-color);
|
|
189
|
-
border-radius:
|
|
189
|
+
border-radius: 8px;
|
|
190
190
|
width: 100%;
|
|
191
191
|
color: var(--input-value-color);
|
|
192
192
|
background-color: var(--input-bg-color);
|
|
193
|
+
box-shadow: var(--input-box-shadow);
|
|
193
194
|
cursor: pointer;
|
|
194
195
|
transition: border-color 0.25s, background-color 0.25s;
|
|
195
196
|
|
|
@@ -404,9 +404,10 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
404
404
|
flex-grow: 1;
|
|
405
405
|
max-width: 100%;
|
|
406
406
|
border: 1px solid var(--input-border-color);
|
|
407
|
-
border-radius:
|
|
407
|
+
border-radius: 8px;
|
|
408
408
|
background-color: var(--input-bg-color);
|
|
409
|
-
|
|
409
|
+
box-shadow: var(--input-box-shadow);
|
|
410
|
+
transition: border-color 0.25s, background-color 0.25s;
|
|
410
411
|
|
|
411
412
|
&:hover {
|
|
412
413
|
border-color: var(--input-hover-border-color);
|
|
@@ -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,70 +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: 6px;
|
|
155
|
-
width: 100%;
|
|
156
|
-
background-color: var(--c-gutter);
|
|
157
|
-
overflow: hidden;
|
|
158
|
-
transition: border-color 0.25s;
|
|
159
|
-
|
|
160
|
-
&:has(.input:hover) {
|
|
161
|
-
border-color: var(--input-hover-border-color);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&:has(.input:focus) {
|
|
165
|
-
border-color: var(--input-focus-border-color);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.control {
|
|
170
|
-
display: flex;
|
|
171
|
-
align-items: center;
|
|
172
|
-
flex-shrink: 0;
|
|
173
|
-
padding: 0 8px;
|
|
174
|
-
height: 48px;
|
|
175
|
-
background-color: var(--c-bg-1);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.preview {
|
|
179
|
-
flex-grow: 1;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.actions {
|
|
183
|
-
display: flex;
|
|
184
|
-
align-items: center;
|
|
185
|
-
flex-shrink: 0;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.input,
|
|
189
|
-
.prose {
|
|
190
|
-
display: block;
|
|
191
|
-
flex-grow: 1;
|
|
192
|
-
width: 100%;
|
|
193
|
-
font-family: var(--input-value-font-family);
|
|
194
|
-
font-weight: 400;
|
|
195
|
-
background-color: var(--input-bg-color);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.input {
|
|
199
|
-
&::placeholder {
|
|
200
|
-
color: var(--input-placeholder-color);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.prose {
|
|
205
|
-
background-color: var(--c-bg-elv-3);
|
|
206
|
-
|
|
207
|
-
&.empty {
|
|
208
|
-
color: var(--input-placeholder-color);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
150
|
.SInputTextarea.sm,
|
|
213
151
|
.SInputTextarea.mini {
|
|
214
152
|
.input,
|
|
@@ -260,7 +198,8 @@ const isPreview = ref(false)
|
|
|
260
198
|
flex-grow: 1;
|
|
261
199
|
}
|
|
262
200
|
|
|
263
|
-
.SInputTextarea.disabled
|
|
201
|
+
.SInputTextarea.disabled,
|
|
202
|
+
.SInputTextarea.disabled:hover {
|
|
264
203
|
.box {
|
|
265
204
|
border-color: var(--input-disabled-border-color);
|
|
266
205
|
}
|
|
@@ -272,15 +211,69 @@ const isPreview = ref(false)
|
|
|
272
211
|
}
|
|
273
212
|
}
|
|
274
213
|
|
|
275
|
-
.SInputTextarea.has-error {
|
|
276
|
-
|
|
277
|
-
border-color: var(--input-error-border-color);
|
|
278
|
-
}
|
|
214
|
+
.SInputTextarea.has-error .box {
|
|
215
|
+
border-color: var(--input-error-border-color);
|
|
279
216
|
}
|
|
280
217
|
|
|
281
|
-
.SInputTextarea.has-warning {
|
|
282
|
-
|
|
283
|
-
|
|
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);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&:has(.input:focus) {
|
|
239
|
+
border-color: var(--input-focus-border-color);
|
|
284
240
|
}
|
|
285
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);
|
|
278
|
+
}
|
|
286
279
|
</style>
|