@globalbrain/sefirot 4.27.0 → 4.29.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/lib/components/SActionMenu.vue +9 -4
- package/lib/components/SButton.vue +39 -24
- package/lib/components/SContent.vue +21 -12
- package/lib/components/SControl.vue +9 -0
- package/lib/components/SControlActionBarClose.vue +1 -1
- package/lib/components/SControlActionBarCollapse.vue +2 -2
- package/lib/components/SControlInputSearch.vue +3 -0
- package/lib/components/SControlLeft.vue +6 -0
- package/lib/components/SControlRight.vue +6 -0
- package/lib/components/SInputBase.vue +3 -1
- package/lib/components/SInputCheckbox.vue +8 -1
- package/lib/components/SInputCheckboxes.vue +3 -1
- package/lib/components/SInputDate.vue +18 -2
- package/lib/components/SInputDropdown.vue +22 -0
- package/lib/components/SInputDropdownItem.vue +21 -1
- package/lib/components/SInputFile.vue +23 -1
- package/lib/components/SInputHMS.vue +27 -0
- package/lib/components/SInputRadio.vue +8 -1
- package/lib/components/SInputRadios.vue +3 -1
- package/lib/components/SInputSegments.vue +9 -1
- package/lib/components/SInputSegmentsOption.vue +12 -1
- package/lib/components/SInputSelect.vue +13 -2
- package/lib/components/SInputSwitch.vue +37 -7
- package/lib/components/SInputSwitches.vue +3 -2
- package/lib/components/SInputText.vue +51 -5
- package/lib/components/SInputTextarea.vue +16 -2
- package/lib/components/SInputYMD.vue +26 -0
- package/lib/components/SPagination.vue +1 -1
- package/lib/composables/Control.ts +1 -1
- package/lib/styles/utilities.css +2 -0
- package/lib/styles/variables.css +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import SDropdown from './SDropdown.vue'
|
|
|
7
7
|
|
|
8
8
|
export type { Mode, Size, Tooltip, Type }
|
|
9
9
|
|
|
10
|
-
const props = defineProps<{
|
|
10
|
+
const props = withDefaults(defineProps<{
|
|
11
11
|
tag?: Component | string
|
|
12
12
|
size?: Size
|
|
13
13
|
type?: Type
|
|
@@ -23,8 +23,11 @@ const props = defineProps<{
|
|
|
23
23
|
loading?: boolean
|
|
24
24
|
disabled?: boolean
|
|
25
25
|
tooltip?: string | Tooltip
|
|
26
|
+
dropdownAlign?: 'left' | 'right'
|
|
26
27
|
options: DropdownSection[]
|
|
27
|
-
}>()
|
|
28
|
+
}>(), {
|
|
29
|
+
dropdownAlign: 'left'
|
|
30
|
+
})
|
|
28
31
|
|
|
29
32
|
const container = ref<any>(null)
|
|
30
33
|
|
|
@@ -40,7 +43,7 @@ async function onOpen() {
|
|
|
40
43
|
</script>
|
|
41
44
|
|
|
42
45
|
<template>
|
|
43
|
-
<div class="SActionMenu" :class="[block]" ref="container">
|
|
46
|
+
<div class="SActionMenu" :class="[{ block }, dropdownAlign]" ref="container">
|
|
44
47
|
<div class="button">
|
|
45
48
|
<SButton
|
|
46
49
|
:tag
|
|
@@ -75,7 +78,6 @@ async function onOpen() {
|
|
|
75
78
|
|
|
76
79
|
.dropdown {
|
|
77
80
|
position: absolute;
|
|
78
|
-
left: 0;
|
|
79
81
|
z-index: var(--z-index-dropdown);
|
|
80
82
|
|
|
81
83
|
&.top { bottom: calc(100% + 8px); }
|
|
@@ -85,4 +87,7 @@ async function onOpen() {
|
|
|
85
87
|
.SActionMenu.block {
|
|
86
88
|
display: block;
|
|
87
89
|
}
|
|
90
|
+
|
|
91
|
+
.SActionMenu.left .dropdown { left: 0; }
|
|
92
|
+
.SActionMenu.right .dropdown { right: 0; }
|
|
88
93
|
</style>
|
|
@@ -6,7 +6,17 @@ import SLink from './SLink.vue'
|
|
|
6
6
|
import SSpinner from './SSpinner.vue'
|
|
7
7
|
import STooltip from './STooltip.vue'
|
|
8
8
|
|
|
9
|
-
export type Size =
|
|
9
|
+
export type Size =
|
|
10
|
+
| 'xs'
|
|
11
|
+
| 'sm'
|
|
12
|
+
| 'md'
|
|
13
|
+
| 'lg'
|
|
14
|
+
| 'xl'
|
|
15
|
+
| 'mini'
|
|
16
|
+
| 'small'
|
|
17
|
+
| 'medium'
|
|
18
|
+
| 'large'
|
|
19
|
+
| 'jumbo'
|
|
10
20
|
|
|
11
21
|
export type Type = 'fill' | 'outline' | 'text'
|
|
12
22
|
|
|
@@ -206,17 +216,18 @@ function handleClick(): void {
|
|
|
206
216
|
background-color: var(--button-count-bg-color);
|
|
207
217
|
}
|
|
208
218
|
|
|
219
|
+
.SButton.xs,
|
|
209
220
|
.SButton.mini {
|
|
210
221
|
min-width: 28px;
|
|
211
222
|
min-height: 28px;
|
|
212
223
|
font-size: var(--button-font-size, var(--button-mini-font-size));
|
|
213
224
|
|
|
214
225
|
&.rounded { border-radius: 16px; }
|
|
215
|
-
&.has-label { padding: var(--button-padding, 0
|
|
226
|
+
&.has-label { padding: var(--button-padding, 0 10px); }
|
|
216
227
|
&.has-label.has-lead-icon { padding: var(--button-padding, 0 10px 0 8px); }
|
|
217
228
|
&.has-label.has-trail-icon { padding: var(--button-padding, 0 8px 0 10px); }
|
|
218
|
-
.content { gap:
|
|
219
|
-
.icon-svg { width:
|
|
229
|
+
.content { gap: 6px; }
|
|
230
|
+
.icon-svg { width: 14px; height: 14px; }
|
|
220
231
|
|
|
221
232
|
.count {
|
|
222
233
|
border-radius: 9px;
|
|
@@ -228,13 +239,14 @@ function handleClick(): void {
|
|
|
228
239
|
}
|
|
229
240
|
}
|
|
230
241
|
|
|
242
|
+
.SButton.sm,
|
|
231
243
|
.SButton.small {
|
|
232
244
|
min-width: 32px;
|
|
233
245
|
min-height: 32px;
|
|
234
246
|
font-size: var(--button-font-size, var(--button-small-font-size));
|
|
235
247
|
|
|
236
248
|
&.rounded { border-radius: 16px; }
|
|
237
|
-
&.has-label { padding: var(--button-padding, 0
|
|
249
|
+
&.has-label { padding: var(--button-padding, 0 10px); }
|
|
238
250
|
&.has-label.has-lead-icon { padding: var(--button-padding, 0 10px 0 8px); }
|
|
239
251
|
&.has-label.has-trail-icon { padding: var(--button-padding, 0 8px 0 10px); }
|
|
240
252
|
.content { gap: 6px; }
|
|
@@ -250,17 +262,17 @@ function handleClick(): void {
|
|
|
250
262
|
}
|
|
251
263
|
}
|
|
252
264
|
|
|
253
|
-
.SButton.
|
|
254
|
-
min-width:
|
|
255
|
-
min-height:
|
|
265
|
+
.SButton.md {
|
|
266
|
+
min-width: 36px;
|
|
267
|
+
min-height: 36px;
|
|
256
268
|
font-size: var(--button-font-size, var(--button-medium-font-size));
|
|
257
269
|
|
|
258
|
-
&.rounded { border-radius:
|
|
259
|
-
&.has-label { padding: var(--button-padding, 0
|
|
270
|
+
&.rounded { border-radius: 18px; }
|
|
271
|
+
&.has-label { padding: var(--button-padding, 0 12px); }
|
|
260
272
|
&.has-label.has-lead-icon { padding: var(--button-padding, 0 12px 0 10px); }
|
|
261
273
|
&.has-label.has-trail-icon { padding: var(--button-padding, 0 10px 0 12px); }
|
|
262
|
-
.content { gap:
|
|
263
|
-
.icon-svg { width:
|
|
274
|
+
.content { gap: 6px; }
|
|
275
|
+
.icon-svg { width: 16px; height: 16px; }
|
|
264
276
|
|
|
265
277
|
.count {
|
|
266
278
|
border-radius: 10px;
|
|
@@ -272,17 +284,19 @@ function handleClick(): void {
|
|
|
272
284
|
}
|
|
273
285
|
}
|
|
274
286
|
|
|
287
|
+
.SButton.lg,
|
|
288
|
+
.SButton.medium,
|
|
275
289
|
.SButton.large {
|
|
276
|
-
min-width:
|
|
277
|
-
min-height:
|
|
290
|
+
min-width: 40px;
|
|
291
|
+
min-height: 40px;
|
|
278
292
|
font-size: var(--button-font-size, var(--button-large-font-size));
|
|
279
293
|
|
|
280
|
-
&.rounded { border-radius:
|
|
281
|
-
&.has-label { padding: var(--button-padding, 0
|
|
294
|
+
&.rounded { border-radius: 20px; }
|
|
295
|
+
&.has-label { padding: var(--button-padding, 0 14px); }
|
|
282
296
|
&.has-label.has-lead-icon { padding: var(--button-padding, 0 14px 0 12px); }
|
|
283
297
|
&.has-label.has-trail-icon { padding: var(--button-padding, 0 12px 0 14px); }
|
|
284
298
|
.content { gap: 8px; }
|
|
285
|
-
.icon-svg { width:
|
|
299
|
+
.icon-svg { width: 16px; height: 16px; }
|
|
286
300
|
|
|
287
301
|
.count {
|
|
288
302
|
border-radius: 10px;
|
|
@@ -294,16 +308,17 @@ function handleClick(): void {
|
|
|
294
308
|
}
|
|
295
309
|
}
|
|
296
310
|
|
|
311
|
+
.SButton.xl,
|
|
297
312
|
.SButton.jumbo {
|
|
298
|
-
min-width:
|
|
299
|
-
min-height:
|
|
313
|
+
min-width: 48px;
|
|
314
|
+
min-height: 48px;
|
|
300
315
|
font-size: var(--button-font-size, var(--button-jumbo-font-size));
|
|
301
316
|
|
|
302
|
-
&.rounded { border-radius:
|
|
303
|
-
&.has-label { padding: var(--button-padding, 0
|
|
304
|
-
&.has-label.has-lead-icon { padding: var(--button-padding, 0
|
|
305
|
-
&.has-label.has-trail-icon { padding: var(--button-padding, 0
|
|
306
|
-
.content { gap:
|
|
317
|
+
&.rounded { border-radius: 24px; }
|
|
318
|
+
&.has-label { padding: var(--button-padding, 0 16px); }
|
|
319
|
+
&.has-label.has-lead-icon { padding: var(--button-padding, 0 16px 0 14px); }
|
|
320
|
+
&.has-label.has-trail-icon { padding: var(--button-padding, 0 14px 0 16px); }
|
|
321
|
+
.content { gap: 10px; }
|
|
307
322
|
.icon-svg { width: 20px; height: 20px; }
|
|
308
323
|
|
|
309
324
|
.count {
|
|
@@ -8,25 +8,25 @@
|
|
|
8
8
|
.SContent {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
|
-
gap:
|
|
11
|
+
gap: 8px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.SContent :deep(h1),
|
|
15
15
|
.SContent :deep(.h1) {
|
|
16
16
|
margin: 0;
|
|
17
17
|
padding: 0;
|
|
18
|
-
max-width:
|
|
19
|
-
line-height:
|
|
20
|
-
font-size:
|
|
18
|
+
max-width: 720px;
|
|
19
|
+
line-height: 36px;
|
|
20
|
+
font-size: 24px;
|
|
21
21
|
font-weight: 500;
|
|
22
22
|
color: var(--c-text-1);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.SContent :deep(h2),
|
|
26
26
|
.SContent :deep(.h2) {
|
|
27
|
-
margin: 0;
|
|
27
|
+
margin: 16px 0 0;
|
|
28
28
|
padding: 0;
|
|
29
|
-
max-width:
|
|
29
|
+
max-width: 720px;
|
|
30
30
|
line-height: 32px;
|
|
31
31
|
font-size: 20px;
|
|
32
32
|
font-weight: 500;
|
|
@@ -35,18 +35,27 @@
|
|
|
35
35
|
|
|
36
36
|
.SContent :deep(h3),
|
|
37
37
|
.SContent :deep(.h3) {
|
|
38
|
-
margin: 0;
|
|
38
|
+
margin: 16px 0 0;
|
|
39
39
|
padding: 0;
|
|
40
|
-
max-width:
|
|
41
|
-
line-height:
|
|
42
|
-
font-size:
|
|
40
|
+
max-width: 720px;
|
|
41
|
+
line-height: 28px;
|
|
42
|
+
font-size: 18px;
|
|
43
43
|
font-weight: 500;
|
|
44
44
|
color: var(--c-text-1);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
.SContent :deep(h1:first-child),
|
|
48
|
+
.SContent :deep(.h1:first-child),
|
|
49
|
+
.SContent :deep(h2:first-child),
|
|
50
|
+
.SContent :deep(.h2:first-child),
|
|
51
|
+
.SContent :deep(h3:first-child),
|
|
52
|
+
.SContent :deep(.h3:first-child) {
|
|
53
|
+
margin-top: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
47
56
|
.SContent :deep(p) {
|
|
48
57
|
margin: 0;
|
|
49
|
-
max-width:
|
|
58
|
+
max-width: 720px;
|
|
50
59
|
line-height: 24px;
|
|
51
60
|
font-size: 14px;
|
|
52
61
|
font-weight: 400;
|
|
@@ -70,7 +79,7 @@
|
|
|
70
79
|
.SContent :deep(ol) {
|
|
71
80
|
margin: 0;
|
|
72
81
|
padding-left: 0;
|
|
73
|
-
max-width:
|
|
82
|
+
max-width: 720px;
|
|
74
83
|
list-style: none;
|
|
75
84
|
}
|
|
76
85
|
|
|
@@ -12,6 +12,9 @@ const props = defineProps<{
|
|
|
12
12
|
const cardSize = useCardBlockSize()
|
|
13
13
|
|
|
14
14
|
const sizeDict = {
|
|
15
|
+
xs: 'xs',
|
|
16
|
+
sm: 'sm',
|
|
17
|
+
md: 'md',
|
|
15
18
|
xsmall: 'small',
|
|
16
19
|
small: 'small',
|
|
17
20
|
medium: 'small',
|
|
@@ -45,6 +48,12 @@ provideControlSize(_size)
|
|
|
45
48
|
flex-grow: 1;
|
|
46
49
|
}
|
|
47
50
|
|
|
51
|
+
.SControl.xs { gap: 8px; height: 28px; }
|
|
52
|
+
.SControl.sm { gap: 8px; height: 32px; }
|
|
53
|
+
.SControl.md { gap: 8px; height: 36px; }
|
|
54
|
+
.SControl.lg { gap: 12px; height: 40px; }
|
|
55
|
+
.SControl.xl { gap: 16px; height: 48px; }
|
|
56
|
+
|
|
48
57
|
.SControl.small { gap: 8px; height: 32px; }
|
|
49
58
|
.SControl.medium { gap: 12px; height: 40px; }
|
|
50
59
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import IconArrowsInLineVertical from '~icons/ph/arrows-in-line-vertical
|
|
3
|
-
import IconArrowsOutLineVertical from '~icons/ph/arrows-out-line-vertical
|
|
2
|
+
import IconArrowsInLineVertical from '~icons/ph/arrows-in-line-vertical'
|
|
3
|
+
import IconArrowsOutLineVertical from '~icons/ph/arrows-out-line-vertical'
|
|
4
4
|
import { computed, shallowRef } from 'vue'
|
|
5
5
|
import { useCardState } from '../composables/Card'
|
|
6
6
|
import SControlActionBarButton from './SControlActionBarButton.vue'
|
|
@@ -19,6 +19,12 @@ provideControlPosition('left')
|
|
|
19
19
|
flex-shrink: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
.SControl.xs .SControlLeft { gap: 8px; height: 28px; }
|
|
23
|
+
.SControl.sm .SControlLeft { gap: 8px; height: 32px; }
|
|
24
|
+
.SControl.md .SControlLeft { gap: 8px; height: 36px; }
|
|
25
|
+
.SControl.lg .SControlLeft { gap: 12px; height: 40px; }
|
|
26
|
+
.SControl.xl .SControlLeft { gap: 16px; height: 48px; }
|
|
27
|
+
|
|
22
28
|
.SControl.small .SControlLeft { gap: 8px; }
|
|
23
29
|
.SControl.medium .SControlLeft { gap: 12px; }
|
|
24
30
|
</style>
|
|
@@ -19,6 +19,12 @@ provideControlPosition('right')
|
|
|
19
19
|
flex-shrink: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
.SControl.xs .SControlRight { gap: 8px; height: 28px; }
|
|
23
|
+
.SControl.sm .SControlRight { gap: 8px; height: 32px; }
|
|
24
|
+
.SControl.md .SControlRight { gap: 8px; height: 36px; }
|
|
25
|
+
.SControl.lg .SControlRight { gap: 12px; height: 40px; }
|
|
26
|
+
.SControl.xl .SControlRight { gap: 16px; height: 48px; }
|
|
27
|
+
|
|
22
28
|
.SControl.small .SControlRight { gap: 8px; }
|
|
23
29
|
.SControl.medium .SControlRight { gap: 12px; }
|
|
24
30
|
|
|
@@ -20,7 +20,7 @@ export interface Props {
|
|
|
20
20
|
hideWarning?: boolean
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
23
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
24
24
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
25
25
|
|
|
26
26
|
const props = defineProps<Props>()
|
|
@@ -105,6 +105,8 @@ function getErrorMsg(validation: Validatable) {
|
|
|
105
105
|
.check { padding-top: 0; line-height: 20px; }
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
.SInputBase.sm,
|
|
109
|
+
.SInputBase.md,
|
|
108
110
|
.SInputBase.small {
|
|
109
111
|
.label { padding-bottom: 6px; min-height: 26px; }
|
|
110
112
|
.label-text { font-size: var(--input-label-font-size, var(--input-small-label-font-size)); }
|
|
@@ -5,7 +5,7 @@ import { type Component, computed } from 'vue'
|
|
|
5
5
|
import { type Validatable } from '../composables/Validation'
|
|
6
6
|
import SInputBase from './SInputBase.vue'
|
|
7
7
|
|
|
8
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
8
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
9
9
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
10
10
|
|
|
11
11
|
const props = withDefaults(defineProps<{
|
|
@@ -60,6 +60,7 @@ function onClick() {
|
|
|
60
60
|
<SInputBase
|
|
61
61
|
class="SInputCheckbox"
|
|
62
62
|
:class="classes"
|
|
63
|
+
:size
|
|
63
64
|
:label
|
|
64
65
|
:note
|
|
65
66
|
:info
|
|
@@ -158,6 +159,12 @@ function onClick() {
|
|
|
158
159
|
font-weight: 400;
|
|
159
160
|
}
|
|
160
161
|
|
|
162
|
+
.SInputCheckbox.md {
|
|
163
|
+
.input {
|
|
164
|
+
height: 36px;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
161
168
|
.SInputCheckbox.disabled {
|
|
162
169
|
.input {
|
|
163
170
|
cursor: not-allowed;
|
|
@@ -4,7 +4,7 @@ import { type Validatable } from '../composables/Validation'
|
|
|
4
4
|
import SInputBase from './SInputBase.vue'
|
|
5
5
|
import SInputCheckbox from './SInputCheckbox.vue'
|
|
6
6
|
|
|
7
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
7
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
8
8
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
9
9
|
|
|
10
10
|
export type Value = any
|
|
@@ -69,6 +69,7 @@ function handleChange(value: Value): void {
|
|
|
69
69
|
<SInputBase
|
|
70
70
|
class="SInputCheckboxes"
|
|
71
71
|
:class="[size ?? 'small']"
|
|
72
|
+
:size
|
|
72
73
|
:name
|
|
73
74
|
:label
|
|
74
75
|
:note
|
|
@@ -82,6 +83,7 @@ function handleChange(value: Value): void {
|
|
|
82
83
|
<div class="row">
|
|
83
84
|
<div v-for="option in options" :key="String(option.value)" class="col">
|
|
84
85
|
<SInputCheckbox
|
|
86
|
+
size="sm"
|
|
85
87
|
:text="option.label"
|
|
86
88
|
:disabled="option.disabled ?? disabled"
|
|
87
89
|
:model-value="isChecked(option.value)"
|
|
@@ -5,7 +5,7 @@ import { type Validatable } from '../composables/Validation'
|
|
|
5
5
|
import { type Day, day } from '../support/Day'
|
|
6
6
|
import SInputBase from './SInputBase.vue'
|
|
7
7
|
|
|
8
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
8
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
9
9
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
10
10
|
|
|
11
11
|
const props = defineProps<{
|
|
@@ -54,6 +54,7 @@ function emitBlur() {
|
|
|
54
54
|
<SInputBase
|
|
55
55
|
class="SInputDate"
|
|
56
56
|
:class="classes"
|
|
57
|
+
:size
|
|
57
58
|
:name
|
|
58
59
|
:label
|
|
59
60
|
:note
|
|
@@ -95,6 +96,7 @@ function emitBlur() {
|
|
|
95
96
|
</template>
|
|
96
97
|
|
|
97
98
|
<style lang="postcss" scoped>
|
|
99
|
+
.SInputDate.sm,
|
|
98
100
|
.SInputDate.mini {
|
|
99
101
|
.input {
|
|
100
102
|
padding: 3px 8px;
|
|
@@ -109,13 +111,27 @@ function emitBlur() {
|
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
|
|
114
|
+
.SInputDate.md {
|
|
115
|
+
.input {
|
|
116
|
+
padding: 6px 10px;
|
|
117
|
+
max-width: 120px;
|
|
118
|
+
height: 36px;
|
|
119
|
+
line-height: 24px;
|
|
120
|
+
font-size: var(--input-font-size, var(--input-small-font-size));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.input.block {
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
112
128
|
.SInputDate.small {
|
|
113
129
|
.input {
|
|
114
130
|
padding: 5px 12px;
|
|
115
131
|
max-width: 136px;
|
|
116
132
|
height: 40px;
|
|
117
133
|
line-height: 24px;
|
|
118
|
-
font-size: var(--input-font-size,
|
|
134
|
+
font-size: var(--input-font-size, 14px);
|
|
119
135
|
}
|
|
120
136
|
|
|
121
137
|
.input.block {
|
|
@@ -241,6 +241,7 @@ function handleArray(value: OptionValue) {
|
|
|
241
241
|
z-index: var(--z-index-dropdown);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
.SInputDropdown.sm,
|
|
244
245
|
.SInputDropdown.mini {
|
|
245
246
|
.box {
|
|
246
247
|
min-height: 32px;
|
|
@@ -262,6 +263,27 @@ function handleArray(value: OptionValue) {
|
|
|
262
263
|
}
|
|
263
264
|
}
|
|
264
265
|
|
|
266
|
+
.SInputDropdown.md {
|
|
267
|
+
.box {
|
|
268
|
+
min-height: 36px;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.box-content {
|
|
272
|
+
padding: 0 30px 0 0;
|
|
273
|
+
line-height: 24px;
|
|
274
|
+
font-size: var(--input-font-size, 14px);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.box-placeholder {
|
|
278
|
+
padding-left: 10px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.box-icon {
|
|
282
|
+
top: 5px;
|
|
283
|
+
right: 8px;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
265
287
|
.SInputDropdown.small {
|
|
266
288
|
.box {
|
|
267
289
|
min-height: 40px;
|
|
@@ -20,7 +20,7 @@ export interface ItemAvatar extends ItemBase {
|
|
|
20
20
|
image?: string | null
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
23
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
24
24
|
|
|
25
25
|
defineProps<{
|
|
26
26
|
item: Item | Item[]
|
|
@@ -240,6 +240,7 @@ defineEmits<{
|
|
|
240
240
|
height: 16px;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
+
.SInputDropdownItem.sm,
|
|
243
244
|
.SInputDropdownItem.mini {
|
|
244
245
|
.many {
|
|
245
246
|
padding: 3px 0 3px 3px;
|
|
@@ -259,6 +260,25 @@ defineEmits<{
|
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
|
|
263
|
+
.SInputDropdownItem.md {
|
|
264
|
+
.many {
|
|
265
|
+
padding: 5px 0 5px 4px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.one-text {
|
|
269
|
+
padding-left: 12px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.one-text-value {
|
|
273
|
+
font-size: var(--input-font-size, 14px);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.one-avatar {
|
|
277
|
+
gap: 8px;
|
|
278
|
+
padding-left: 10px;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
262
282
|
.SInputDropdownItem.small {
|
|
263
283
|
.many {
|
|
264
284
|
padding: 7px 0 7px 7px;
|
|
@@ -3,7 +3,7 @@ import { type Component, computed, ref } from 'vue'
|
|
|
3
3
|
import { type Validatable } from '../composables/Validation'
|
|
4
4
|
import SInputBase from './SInputBase.vue'
|
|
5
5
|
|
|
6
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
6
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
7
7
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
8
8
|
|
|
9
9
|
const props = defineProps<{
|
|
@@ -65,6 +65,7 @@ function onChange(e: Event) {
|
|
|
65
65
|
<SInputBase
|
|
66
66
|
class="SInputFile"
|
|
67
67
|
:class="classes"
|
|
68
|
+
:size
|
|
68
69
|
:label
|
|
69
70
|
:note
|
|
70
71
|
:info
|
|
@@ -101,6 +102,7 @@ function onChange(e: Event) {
|
|
|
101
102
|
</template>
|
|
102
103
|
|
|
103
104
|
<style lang="postcss" scoped>
|
|
105
|
+
.SInputFile.sm,
|
|
104
106
|
.SInputFile.mini {
|
|
105
107
|
.action {
|
|
106
108
|
padding: 3px 8px 3px 3px;
|
|
@@ -121,6 +123,26 @@ function onChange(e: Event) {
|
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
.SInputFile.md {
|
|
127
|
+
.action {
|
|
128
|
+
padding: 3px 8px 3px 3px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.button {
|
|
132
|
+
padding: 0 8px;
|
|
133
|
+
line-height: 26px;
|
|
134
|
+
font-size: 12px;
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.file-name,
|
|
139
|
+
.placeholder {
|
|
140
|
+
line-height: 34px;
|
|
141
|
+
font-size: var(--input-font-size, 14px);
|
|
142
|
+
font-weight: 400;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
124
146
|
.SInputFile.small {
|
|
125
147
|
.action {
|
|
126
148
|
padding: 5px 8px 5px 5px;
|
|
@@ -184,6 +184,7 @@ function createRequiredTouched(): boolean[] {
|
|
|
184
184
|
</template>
|
|
185
185
|
|
|
186
186
|
<style lang="postcss" scoped>
|
|
187
|
+
.SInputHMS.sm,
|
|
187
188
|
.SInputHMS.mini {
|
|
188
189
|
.container {
|
|
189
190
|
padding: 0 8px;
|
|
@@ -207,6 +208,32 @@ function createRequiredTouched(): boolean[] {
|
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
210
|
|
|
211
|
+
.SInputHMS.md {
|
|
212
|
+
.container {
|
|
213
|
+
padding: 0 10px;
|
|
214
|
+
min-height: 36px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.input {
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
padding: 5px 0;
|
|
220
|
+
width: 20px;
|
|
221
|
+
text-align: center;
|
|
222
|
+
line-height: 24px;
|
|
223
|
+
font-size: var(--input-font-size, 14px);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.separator {
|
|
227
|
+
padding: 4px 0;
|
|
228
|
+
line-height: 24px;
|
|
229
|
+
font-size: var(--input-font-size, 14px);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.separator::before {
|
|
233
|
+
padding: 0 6px;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
210
237
|
.SInputHMS.small {
|
|
211
238
|
.container {
|
|
212
239
|
padding: 0 12px;
|
|
@@ -3,7 +3,7 @@ import { type Component, computed } from 'vue'
|
|
|
3
3
|
import { type Validatable } from '../composables/Validation'
|
|
4
4
|
import SInputBase from './SInputBase.vue'
|
|
5
5
|
|
|
6
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
6
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
7
7
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
8
8
|
|
|
9
9
|
const props = defineProps<{
|
|
@@ -45,6 +45,7 @@ function onClick() {
|
|
|
45
45
|
<SInputBase
|
|
46
46
|
class="SInputRadio"
|
|
47
47
|
:class="classes"
|
|
48
|
+
:size
|
|
48
49
|
:label
|
|
49
50
|
:note
|
|
50
51
|
:info
|
|
@@ -139,6 +140,12 @@ function onClick() {
|
|
|
139
140
|
font-weight: 400;
|
|
140
141
|
}
|
|
141
142
|
|
|
143
|
+
.SInputRadio.md {
|
|
144
|
+
.input {
|
|
145
|
+
height: 36px;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
142
149
|
.SInputRadio.disabled {
|
|
143
150
|
.input {
|
|
144
151
|
cursor: not-allowed;
|
|
@@ -11,7 +11,7 @@ import { type Validatable } from '../composables/Validation'
|
|
|
11
11
|
import SInputBase from './SInputBase.vue'
|
|
12
12
|
import SInputRadio from './SInputRadio.vue'
|
|
13
13
|
|
|
14
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
14
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
15
15
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
16
16
|
|
|
17
17
|
export interface Option<
|
|
@@ -88,6 +88,7 @@ function onChange(value: ValueType) {
|
|
|
88
88
|
<SInputBase
|
|
89
89
|
class="SInputRadios"
|
|
90
90
|
:class="[size ?? 'small']"
|
|
91
|
+
:size
|
|
91
92
|
:label
|
|
92
93
|
:note
|
|
93
94
|
:info
|
|
@@ -102,6 +103,7 @@ function onChange(value: ValueType) {
|
|
|
102
103
|
<div class="row">
|
|
103
104
|
<div v-for="(option, index) in options" :key="index" class="col">
|
|
104
105
|
<SInputRadio
|
|
106
|
+
size="sm"
|
|
105
107
|
:text="option.label"
|
|
106
108
|
:disabled="option.disabled ?? disabled"
|
|
107
109
|
:model-value="isChecked(option.value)"
|
|
@@ -4,7 +4,7 @@ import { type Validatable } from '../composables/Validation'
|
|
|
4
4
|
import SInputBase from './SInputBase.vue'
|
|
5
5
|
import SInputSegmentsOption, { type Mode } from './SInputSegmentsOption.vue'
|
|
6
6
|
|
|
7
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
7
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
8
8
|
export type Color = 'default' | 'mute' | 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
9
9
|
export type CheckColor = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
10
10
|
|
|
@@ -90,6 +90,7 @@ function onSelect(value: T) {
|
|
|
90
90
|
</template>
|
|
91
91
|
|
|
92
92
|
<style scoped lang="postcss">
|
|
93
|
+
.SInputSegments.sm,
|
|
93
94
|
.SInputSegments.mini {
|
|
94
95
|
.box {
|
|
95
96
|
padding: 2px;
|
|
@@ -97,6 +98,13 @@ function onSelect(value: T) {
|
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
|
|
101
|
+
.SInputSegments.md {
|
|
102
|
+
.box {
|
|
103
|
+
padding: 2px;
|
|
104
|
+
height: 36px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
100
108
|
.SInputSegments.small {
|
|
101
109
|
.box {
|
|
102
110
|
padding: 4px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts" generic="T extends string | number | boolean">
|
|
2
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
2
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
3
3
|
export type Mode = 'default' | 'mute' | 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
@@ -78,6 +78,7 @@ function onClick() {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
.SInputSegmentsOption.sm,
|
|
81
82
|
.SInputSegmentsOption.mini {
|
|
82
83
|
.SInputSegmentsOption + &::before {
|
|
83
84
|
top: 4px;
|
|
@@ -88,6 +89,16 @@ function onClick() {
|
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
|
|
92
|
+
.SInputSegmentsOption.md {
|
|
93
|
+
.SInputSegmentsOption + &::before {
|
|
94
|
+
top: 6px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.label {
|
|
98
|
+
padding: 0 12px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
91
102
|
.SInputSegmentsOption.small {
|
|
92
103
|
.SInputSegmentsOption + &::before {
|
|
93
104
|
top: 7px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import IconCaretDown from '~icons/ph/caret-down
|
|
3
|
-
import IconCaretUp from '~icons/ph/caret-up
|
|
2
|
+
import IconCaretDown from '~icons/ph/caret-down'
|
|
3
|
+
import IconCaretUp from '~icons/ph/caret-up'
|
|
4
4
|
import { computed, ref } from 'vue'
|
|
5
5
|
import SInputBase, { type Props as BaseProps } from './SInputBase.vue'
|
|
6
6
|
|
|
@@ -121,6 +121,7 @@ function emitChange(e: any): void {
|
|
|
121
121
|
</template>
|
|
122
122
|
|
|
123
123
|
<style scoped lang="postcss">
|
|
124
|
+
.SInputSelect.sm,
|
|
124
125
|
.SInputSelect.mini {
|
|
125
126
|
line-height: 30px;
|
|
126
127
|
font-size: var(--input-font-size, var(--input-mini-font-size));
|
|
@@ -131,6 +132,16 @@ function emitChange(e: any): void {
|
|
|
131
132
|
.icon-svg { width: 12px; height: 12px; }
|
|
132
133
|
}
|
|
133
134
|
|
|
135
|
+
.SInputSelect.md {
|
|
136
|
+
line-height: 34px;
|
|
137
|
+
font-size: var(--input-font-size, 14px);
|
|
138
|
+
|
|
139
|
+
.box { height: 36px; }
|
|
140
|
+
.select { padding: 0 30px 0 10px; }
|
|
141
|
+
.icon { top: 5px; right: 8px; }
|
|
142
|
+
.icon-svg { width: 14px; height: 14px; }
|
|
143
|
+
}
|
|
144
|
+
|
|
134
145
|
.SInputSelect.small {
|
|
135
146
|
line-height: 38px;
|
|
136
147
|
font-size: var(--input-font-size, var(--input-small-font-size));
|
|
@@ -3,7 +3,7 @@ import { type Component, computed } from 'vue'
|
|
|
3
3
|
import { type Validatable } from '../composables/Validation'
|
|
4
4
|
import SInputBase from './SInputBase.vue'
|
|
5
5
|
|
|
6
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
6
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
7
7
|
export type ActiveColor = 'info' | 'success' | 'warning' | 'danger'
|
|
8
8
|
export type CheckColor = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
9
9
|
|
|
@@ -58,6 +58,7 @@ function emitChange(): void {
|
|
|
58
58
|
<SInputBase
|
|
59
59
|
class="SInputSwitch"
|
|
60
60
|
:class="classes"
|
|
61
|
+
:size
|
|
61
62
|
:name
|
|
62
63
|
:label
|
|
63
64
|
:note
|
|
@@ -115,6 +116,7 @@ function emitChange(): void {
|
|
|
115
116
|
transition: background-color 0.25s, transform 0.25s;
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
.SInputSwitch.sm,
|
|
118
120
|
.SInputSwitch.mini {
|
|
119
121
|
.input {
|
|
120
122
|
height: 32px;
|
|
@@ -126,20 +128,48 @@ function emitChange(): void {
|
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
.box {
|
|
129
|
-
border-radius:
|
|
130
|
-
width:
|
|
131
|
-
height:
|
|
131
|
+
border-radius: 10px;
|
|
132
|
+
width: 36px;
|
|
133
|
+
height: 20px;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
.toggle {
|
|
135
|
-
top:
|
|
136
|
-
left:
|
|
137
|
+
top: 2px;
|
|
138
|
+
left: 2px;
|
|
137
139
|
width: 14px;
|
|
138
140
|
height: 14px;
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
.input.on .toggle {
|
|
142
|
-
transform: translateX(
|
|
144
|
+
transform: translateX(16px);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.SInputSwitch.md {
|
|
149
|
+
.input {
|
|
150
|
+
height: 36px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.text {
|
|
154
|
+
line-height: 20px;
|
|
155
|
+
font-size: 14px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.box {
|
|
159
|
+
border-radius: 12px;
|
|
160
|
+
width: 44px;
|
|
161
|
+
height: 24px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.toggle {
|
|
165
|
+
top: 3px;
|
|
166
|
+
left: 3px;
|
|
167
|
+
width: 16px;
|
|
168
|
+
height: 16px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.input.on .toggle {
|
|
172
|
+
transform: translateX(20px);
|
|
143
173
|
}
|
|
144
174
|
}
|
|
145
175
|
|
|
@@ -4,7 +4,7 @@ import { type Validatable } from '../composables/Validation'
|
|
|
4
4
|
import SInputBase from './SInputBase.vue'
|
|
5
5
|
import SInputSwitch from './SInputSwitch.vue'
|
|
6
6
|
|
|
7
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
7
|
+
export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
8
8
|
export type CheckColor = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
9
9
|
|
|
10
10
|
export interface Option {
|
|
@@ -54,6 +54,7 @@ function handleChange(value: any): void {
|
|
|
54
54
|
<SInputBase
|
|
55
55
|
class="SInputSwitches"
|
|
56
56
|
:class="classes"
|
|
57
|
+
:size
|
|
57
58
|
:name
|
|
58
59
|
:label
|
|
59
60
|
:note
|
|
@@ -68,7 +69,7 @@ function handleChange(value: any): void {
|
|
|
68
69
|
<div class="row">
|
|
69
70
|
<div v-for="(option, index) in options" :key="index" class="col">
|
|
70
71
|
<SInputSwitch
|
|
71
|
-
|
|
72
|
+
size="sm"
|
|
72
73
|
:text="option.label"
|
|
73
74
|
:model-value="isChecked(option.value)"
|
|
74
75
|
@update:model-value="handleChange(option.value)"
|
|
@@ -161,7 +161,8 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
161
161
|
</template>
|
|
162
162
|
|
|
163
163
|
<style scoped lang="postcss">
|
|
164
|
-
.SInputText.
|
|
164
|
+
.SInputText.sm,
|
|
165
|
+
.SInputText.small {
|
|
165
166
|
.box { min-height: 32px; }
|
|
166
167
|
.value { min-height: 30px; }
|
|
167
168
|
.area { min-height: 30px; }
|
|
@@ -210,6 +211,55 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
|
|
214
|
+
.SInputText.md {
|
|
215
|
+
.box { min-height: 36px; }
|
|
216
|
+
.value { min-height: 34px; }
|
|
217
|
+
.area { min-height: 34px; }
|
|
218
|
+
.unit { min-height: 34px; }
|
|
219
|
+
|
|
220
|
+
.input {
|
|
221
|
+
padding: 5px 10px;
|
|
222
|
+
letter-spacing: 0;
|
|
223
|
+
line-height: 24px;
|
|
224
|
+
font-size: var(--input-font-size, 14px);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.unit + .area .input { padding-left: 8px; }
|
|
228
|
+
.area:has(+ .unit) .input { padding-right: 8px; }
|
|
229
|
+
|
|
230
|
+
.unit {
|
|
231
|
+
padding: 5px 10px;
|
|
232
|
+
line-height: 24px;
|
|
233
|
+
font-size: var(--input-font-size, 14px);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.unit.before { padding-right: 0; }
|
|
237
|
+
.unit.after { padding-left: 0; }
|
|
238
|
+
|
|
239
|
+
.unit-icon {
|
|
240
|
+
width: 16px;
|
|
241
|
+
height: 16px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
:slotted(.SInputAddon) .action {
|
|
245
|
+
padding: 0 12px;
|
|
246
|
+
font-size: 14px;
|
|
247
|
+
font-weight: 500;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:slotted(.SInputAddon) .action-icon {
|
|
251
|
+
width: 16px;
|
|
252
|
+
height: 16px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:slotted(.SInputAddon) .caret {
|
|
256
|
+
margin-left: 6px;
|
|
257
|
+
margin-right: -2px;
|
|
258
|
+
width: 12px;
|
|
259
|
+
height: 12px;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
213
263
|
.SInputText.small {
|
|
214
264
|
.box { min-height: 40px; }
|
|
215
265
|
.value { min-height: 38px; }
|
|
@@ -423,10 +473,6 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
423
473
|
color: var(--c-text-2);
|
|
424
474
|
}
|
|
425
475
|
|
|
426
|
-
.unit-text {
|
|
427
|
-
font-weight: 500;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
476
|
.addon {
|
|
431
477
|
display: flex;
|
|
432
478
|
flex-shrink: 0;
|
|
@@ -27,6 +27,8 @@ const emit = defineEmits<{
|
|
|
27
27
|
}>()
|
|
28
28
|
|
|
29
29
|
const sizePaddingYDict = {
|
|
30
|
+
sm: 12,
|
|
31
|
+
md: 14,
|
|
30
32
|
mini: 12,
|
|
31
33
|
small: 14,
|
|
32
34
|
medium: 22
|
|
@@ -182,17 +184,29 @@ const isPreview = ref(false)
|
|
|
182
184
|
}
|
|
183
185
|
}
|
|
184
186
|
|
|
187
|
+
.SInputTextarea.sm,
|
|
185
188
|
.SInputTextarea.mini {
|
|
186
189
|
.input,
|
|
187
190
|
.prose {
|
|
188
|
-
padding:
|
|
191
|
+
padding: 3px 8px;
|
|
189
192
|
width: 100%;
|
|
190
193
|
min-height: 30px;
|
|
191
|
-
line-height:
|
|
194
|
+
line-height: 24px;
|
|
192
195
|
font-size: var(--input-font-size, var(--input-mini-font-size));
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
198
|
|
|
199
|
+
.SInputTextarea.md {
|
|
200
|
+
.input,
|
|
201
|
+
.prose {
|
|
202
|
+
padding: 5px 10px;
|
|
203
|
+
width: 100%;
|
|
204
|
+
min-height: 34px;
|
|
205
|
+
line-height: 24px;
|
|
206
|
+
font-size: var(--input-font-size, 14px);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
196
210
|
.SInputTextarea.small {
|
|
197
211
|
.input,
|
|
198
212
|
.prose {
|
|
@@ -187,6 +187,7 @@ function createRequiredTouched(): boolean[] {
|
|
|
187
187
|
</template>
|
|
188
188
|
|
|
189
189
|
<style scoped lang="postcss">
|
|
190
|
+
.SInputYMD.sm,
|
|
190
191
|
.SInputYMD.mini {
|
|
191
192
|
.container {
|
|
192
193
|
padding: 0 4px;
|
|
@@ -209,6 +210,31 @@ function createRequiredTouched(): boolean[] {
|
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
|
|
213
|
+
.SInputYMD.md {
|
|
214
|
+
.container {
|
|
215
|
+
padding: 0 6px;
|
|
216
|
+
height: 36px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.input {
|
|
220
|
+
padding: 5px 0;
|
|
221
|
+
text-align: center;
|
|
222
|
+
line-height: 24px;
|
|
223
|
+
font-size: var(--input-font-size, 14px);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.input.year { margin-right: 2px; }
|
|
227
|
+
.input.year { width: 48px; }
|
|
228
|
+
.input.month { width: 32px; }
|
|
229
|
+
.input.date { width: 32px; }
|
|
230
|
+
|
|
231
|
+
.separator {
|
|
232
|
+
padding: 5px 0;
|
|
233
|
+
line-height: 24px;
|
|
234
|
+
font-size: var(--input-font-size, 14px);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
212
238
|
.SInputYMD.small {
|
|
213
239
|
.container {
|
|
214
240
|
padding: 0 8px;
|
|
@@ -6,7 +6,7 @@ import { useTrans } from '../composables/Lang'
|
|
|
6
6
|
import { format } from '../support/Num'
|
|
7
7
|
import SButton from './SButton.vue'
|
|
8
8
|
|
|
9
|
-
export type Size = 'mini' | 'small' | 'medium'
|
|
9
|
+
export type Size = 'xs' | 'sm' | 'md' | 'mini' | 'small' | 'medium'
|
|
10
10
|
export type Align = 'left' | 'center' | 'right'
|
|
11
11
|
|
|
12
12
|
const props = withDefaults(defineProps<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComputedRef, computed, inject, provide, toValue } from 'vue'
|
|
2
2
|
|
|
3
|
-
export type ControlSize = 'small' | 'medium'
|
|
3
|
+
export type ControlSize = 'xs' | 'sm' | 'md' | 'small' | 'medium'
|
|
4
4
|
export type ControlPosition = 'left' | 'center' | 'right'
|
|
5
5
|
|
|
6
6
|
export const ControlSizeKey = 'sefirot-control-size-key'
|
package/lib/styles/utilities.css
CHANGED
|
@@ -143,11 +143,13 @@
|
|
|
143
143
|
.s-w-256 { width: 256px; }
|
|
144
144
|
.s-w-320 { width: 320px; }
|
|
145
145
|
.s-w-512 { width: 512px; }
|
|
146
|
+
.s-w-720 { width: 720px; }
|
|
146
147
|
.s-w-full { max-width: 100%; }
|
|
147
148
|
|
|
148
149
|
.s-max-w-256 { max-width: 256px; }
|
|
149
150
|
.s-max-w-320 { max-width: 320px; }
|
|
150
151
|
.s-max-w-512 { max-width: 512px; }
|
|
152
|
+
.s-max-w-720 { max-width: 720px; }
|
|
151
153
|
.s-max-w-prose { max-width: 65ch; }
|
|
152
154
|
.s-max-w-full { max-width: 100%; }
|
|
153
155
|
.s-max-w-xs { max-width: 320px; }
|
package/lib/styles/variables.css
CHANGED
package/package.json
CHANGED