@globalbrain/sefirot 3.14.0 → 3.16.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/SButton.vue +41 -28
- package/lib/components/SCard.vue +2 -2
- package/lib/components/SCardBlock.vue +32 -6
- package/lib/components/SControl.vue +50 -0
- package/lib/components/SControlButton.vue +45 -0
- package/lib/components/SControlCenter.vue +24 -0
- package/lib/components/SControlInputSearch.vue +68 -0
- package/lib/components/SControlLeft.vue +24 -0
- package/lib/components/SControlPagination.vue +26 -0
- package/lib/components/SControlRight.vue +24 -0
- package/lib/components/SControlText.vue +12 -0
- package/lib/components/SInputBase.vue +1 -1
- package/lib/components/SInputCheckbox.vue +1 -1
- package/lib/components/SInputCheckboxes.vue +1 -1
- package/lib/components/SInputDate.vue +1 -1
- package/lib/components/SInputDropdown.vue +1 -1
- package/lib/components/SInputFile.vue +1 -1
- package/lib/components/SInputHMS.vue +1 -1
- package/lib/components/SInputImage.vue +1 -1
- package/lib/components/SInputNumber.vue +1 -1
- package/lib/components/SInputRadio.vue +1 -1
- package/lib/components/SInputRadios.vue +1 -1
- package/lib/components/SInputSegments.vue +1 -1
- package/lib/components/SInputSelect.vue +1 -1
- package/lib/components/SInputSwitch.vue +1 -1
- package/lib/components/SInputSwitches.vue +1 -1
- package/lib/components/SInputText.vue +10 -8
- package/lib/components/SInputTextarea.vue +1 -1
- package/lib/components/SInputYMD.vue +1 -1
- package/lib/components/SPagination.vue +132 -0
- package/lib/components/STable.vue +6 -2
- package/lib/components/STableColumn.vue +1 -1
- package/lib/components/SW.vue +1 -1
- package/lib/composables/Card.ts +16 -4
- package/lib/composables/Control.ts +43 -0
- package/lib/composables/D.ts +21 -0
- package/lib/composables/Data.ts +4 -0
- package/lib/composables/Form.ts +4 -0
- package/lib/composables/Table.ts +11 -9
- package/lib/composables/V.ts +73 -0
- package/lib/composables/Validation.ts +4 -0
- package/lib/mixins/Control.ts +30 -0
- package/lib/styles/utilities.css +113 -3
- package/package.json +1 -1
|
@@ -36,6 +36,8 @@ const props = defineProps<{
|
|
|
36
36
|
type?: Type
|
|
37
37
|
mode?: Mode
|
|
38
38
|
icon?: any
|
|
39
|
+
leadIcon?: any
|
|
40
|
+
trailIcon?: any
|
|
39
41
|
iconMode?: Mode
|
|
40
42
|
label?: string
|
|
41
43
|
labelMode?: Mode
|
|
@@ -52,12 +54,15 @@ const emit = defineEmits<{
|
|
|
52
54
|
(e: 'disabled-click'): void
|
|
53
55
|
}>()
|
|
54
56
|
|
|
57
|
+
const _leadIcon = computed(() => props.leadIcon ?? props.icon)
|
|
58
|
+
|
|
55
59
|
const classes = computed(() => [
|
|
56
60
|
props.size ?? 'medium',
|
|
57
61
|
props.type ?? 'fill',
|
|
58
62
|
props.mode ?? 'default',
|
|
59
63
|
{ 'has-label': props.label },
|
|
60
|
-
{ 'has-icon':
|
|
64
|
+
{ 'has-lead-icon': _leadIcon.value },
|
|
65
|
+
{ 'has-trail-icon': props.trailIcon },
|
|
61
66
|
{ loading: props.loading },
|
|
62
67
|
{ rounded: props.rounded },
|
|
63
68
|
{ block: props.block },
|
|
@@ -104,12 +109,15 @@ function handleClick(): void {
|
|
|
104
109
|
@click="handleClick"
|
|
105
110
|
>
|
|
106
111
|
<span class="content">
|
|
107
|
-
<span v-if="
|
|
108
|
-
<SIcon :icon="
|
|
112
|
+
<span v-if="_leadIcon" class="icon" :class="iconMode">
|
|
113
|
+
<SIcon :icon="_leadIcon" class="icon-svg" />
|
|
109
114
|
</span>
|
|
110
115
|
<span v-if="label" class="label" :class="labelMode">
|
|
111
116
|
{{ label }}
|
|
112
117
|
</span>
|
|
118
|
+
<span v-if="trailIcon" class="icon" :class="iconMode">
|
|
119
|
+
<SIcon :icon="trailIcon" class="icon-svg" />
|
|
120
|
+
</span>
|
|
113
121
|
</span>
|
|
114
122
|
|
|
115
123
|
<transition name="fade">
|
|
@@ -192,11 +200,12 @@ function handleClick(): void {
|
|
|
192
200
|
min-height: 28px;
|
|
193
201
|
font-size: var(--button-font-size, var(--button-mini-font-size));
|
|
194
202
|
|
|
195
|
-
&.rounded
|
|
196
|
-
&.has-label
|
|
197
|
-
&.has-label.has-icon
|
|
198
|
-
.
|
|
199
|
-
.
|
|
203
|
+
&.rounded { border-radius: 16px; }
|
|
204
|
+
&.has-label { padding: var(--button-padding, 0 12px); }
|
|
205
|
+
&.has-label.has-lead-icon { padding: var(--button-padding, 0 10px 0 8px); }
|
|
206
|
+
&.has-label.has-trail-icon { padding: var(--button-padding, 0 8px 0 10px); }
|
|
207
|
+
.content { gap: 4px; }
|
|
208
|
+
.icon-svg { width: 16px; height: 16px; }
|
|
200
209
|
}
|
|
201
210
|
|
|
202
211
|
.SButton.small {
|
|
@@ -204,11 +213,12 @@ function handleClick(): void {
|
|
|
204
213
|
min-height: 32px;
|
|
205
214
|
font-size: var(--button-font-size, var(--button-small-font-size));
|
|
206
215
|
|
|
207
|
-
&.rounded
|
|
208
|
-
&.has-label
|
|
209
|
-
&.has-label.has-icon
|
|
210
|
-
.
|
|
211
|
-
.
|
|
216
|
+
&.rounded { border-radius: 16px; }
|
|
217
|
+
&.has-label { padding: var(--button-padding, 0 12px); }
|
|
218
|
+
&.has-label.has-lead-icon { padding: var(--button-padding, 0 10px 0 8px); }
|
|
219
|
+
&.has-label.has-trail-icon { padding: var(--button-padding, 0 8px 0 10px); }
|
|
220
|
+
.content { gap: 6px; }
|
|
221
|
+
.icon-svg { width: 16px; height: 16px; }
|
|
212
222
|
}
|
|
213
223
|
|
|
214
224
|
.SButton.medium {
|
|
@@ -216,11 +226,12 @@ function handleClick(): void {
|
|
|
216
226
|
min-height: 40px;
|
|
217
227
|
font-size: var(--button-font-size, var(--button-medium-font-size));
|
|
218
228
|
|
|
219
|
-
&.rounded
|
|
220
|
-
&.has-label
|
|
221
|
-
&.has-label.has-icon
|
|
222
|
-
.
|
|
223
|
-
.
|
|
229
|
+
&.rounded { border-radius: 20px; }
|
|
230
|
+
&.has-label { padding: var(--button-padding, 0 16px); }
|
|
231
|
+
&.has-label.has-lead-icon { padding: var(--button-padding, 0 12px 0 10px); }
|
|
232
|
+
&.has-label.has-trail-icon { padding: var(--button-padding, 0 10px 0 12px); }
|
|
233
|
+
.content { gap: 6px; }
|
|
234
|
+
.icon-svg { width: 18px; height: 18px; }
|
|
224
235
|
}
|
|
225
236
|
|
|
226
237
|
.SButton.large {
|
|
@@ -228,11 +239,12 @@ function handleClick(): void {
|
|
|
228
239
|
min-height: 48px;
|
|
229
240
|
font-size: var(--button-font-size, var(--button-large-font-size));
|
|
230
241
|
|
|
231
|
-
&.rounded
|
|
232
|
-
&.has-label
|
|
233
|
-
&.has-label.has-icon
|
|
234
|
-
.
|
|
235
|
-
.
|
|
242
|
+
&.rounded { border-radius: 24px; }
|
|
243
|
+
&.has-label { padding: var(--button-padding, 0 20px); }
|
|
244
|
+
&.has-label.has-lead-icon { padding: var(--button-padding, 0 14px 0 12px); }
|
|
245
|
+
&.has-label.has-trail-icon { padding: var(--button-padding, 0 12px 0 14px); }
|
|
246
|
+
.content { gap: 6px; }
|
|
247
|
+
.icon-svg { width: 18px; height: 18px; }
|
|
236
248
|
}
|
|
237
249
|
|
|
238
250
|
.SButton.jumbo {
|
|
@@ -240,11 +252,12 @@ function handleClick(): void {
|
|
|
240
252
|
min-height: 64px;
|
|
241
253
|
font-size: var(--button-font-size, var(--button-jumbo-font-size));
|
|
242
254
|
|
|
243
|
-
&.rounded
|
|
244
|
-
&.has-label
|
|
245
|
-
&.has-label.has-icon
|
|
246
|
-
.
|
|
247
|
-
.
|
|
255
|
+
&.rounded { border-radius: 32px; }
|
|
256
|
+
&.has-label { padding: var(--button-padding, 0 24px); }
|
|
257
|
+
&.has-label.has-lead-icon { padding: var(--button-padding, 0 20px 0 18px); }
|
|
258
|
+
&.has-label.has-trail-icon { padding: var(--button-padding, 0 18px 0 20px); }
|
|
259
|
+
.content { gap: 8px; }
|
|
260
|
+
.icon-svg { width: 20px; height: 20px; }
|
|
248
261
|
}
|
|
249
262
|
|
|
250
263
|
.SButton.disabled {
|
package/lib/components/SCard.vue
CHANGED
|
@@ -10,13 +10,13 @@ const props = defineProps<{
|
|
|
10
10
|
mode?: Mode
|
|
11
11
|
}>()
|
|
12
12
|
|
|
13
|
-
const { isCollapsed } = provideCardState()
|
|
14
|
-
|
|
15
13
|
const classes = computed(() => [
|
|
16
14
|
props.size,
|
|
17
15
|
props.mode ?? 'neutral',
|
|
18
16
|
{ collapsed: isCollapsed.value }
|
|
19
17
|
])
|
|
18
|
+
|
|
19
|
+
const { isCollapsed } = provideCardState()
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { type CardBlockSize, provideCardBlockSize } from '../composables/Card'
|
|
4
|
+
|
|
5
|
+
export type { CardBlockSize as Size }
|
|
6
|
+
|
|
7
|
+
// @deprecated Use CSS utility classes instead.
|
|
2
8
|
export type Space = 'compact' | 'wide' | 'xwide'
|
|
3
9
|
|
|
4
|
-
defineProps<{
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
size?: CardBlockSize
|
|
12
|
+
|
|
13
|
+
// @deprecated Use CSS utility classes instead.
|
|
5
14
|
space?: Space
|
|
6
15
|
}>()
|
|
16
|
+
|
|
17
|
+
provideCardBlockSize(computed(() => props.size ?? null))
|
|
7
18
|
</script>
|
|
8
19
|
|
|
9
20
|
<template>
|
|
10
|
-
<div class="SCardBlock" :class="[space]">
|
|
21
|
+
<div class="SCardBlock" :class="[size, space]">
|
|
11
22
|
<slot />
|
|
12
23
|
</div>
|
|
13
24
|
</template>
|
|
14
25
|
|
|
15
26
|
<style scoped lang="postcss">
|
|
16
27
|
.SCardBlock {
|
|
17
|
-
padding: var(--card-padding, 0);
|
|
18
28
|
background-color: var(--c-bg-elv-3);
|
|
19
29
|
|
|
20
|
-
&.compact { padding:
|
|
21
|
-
&.wide { padding:
|
|
22
|
-
&.xwide { padding:
|
|
30
|
+
&.compact { padding: 12px; }
|
|
31
|
+
&.wide { padding: 16px; }
|
|
32
|
+
&.xwide { padding: 24px; }
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
.SCard > .SCardBlock:first-child {
|
|
@@ -31,4 +41,20 @@ defineProps<{
|
|
|
31
41
|
border-bottom-right-radius: 5px;
|
|
32
42
|
border-bottom-left-radius: 5px;
|
|
33
43
|
}
|
|
44
|
+
|
|
45
|
+
.SCardBlock.xsmall,
|
|
46
|
+
.SCardBlock.small,
|
|
47
|
+
.SCardBlock.medium,
|
|
48
|
+
.SCardBlock.large,
|
|
49
|
+
.SCardBlock.xlarge {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.SCardBlock.xsmall { height: 40px; }
|
|
56
|
+
.SCardBlock.small { height: 48px; }
|
|
57
|
+
.SCardBlock.medium { height: 56px; }
|
|
58
|
+
.SCardBlock.large { height: 64px; }
|
|
59
|
+
.SCardBlock.xlarge { height: 80px; }
|
|
34
60
|
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { useCardBlockSize } from '../composables/Card'
|
|
4
|
+
import { type ControlSize, provideControlSize } from '../composables/Control'
|
|
5
|
+
|
|
6
|
+
export type { ControlSize as Size }
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
size?: ControlSize
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const cardSize = useCardBlockSize()
|
|
13
|
+
|
|
14
|
+
const sizeDict = {
|
|
15
|
+
xsmall: 'small',
|
|
16
|
+
small: 'small',
|
|
17
|
+
medium: 'small',
|
|
18
|
+
large: 'medium',
|
|
19
|
+
xlarge: 'medium',
|
|
20
|
+
null: null
|
|
21
|
+
} as const
|
|
22
|
+
|
|
23
|
+
const _size = computed(() => {
|
|
24
|
+
return props.size ?? sizeDict[cardSize.value ?? 'null'] ?? 'small'
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const classes = computed(() => [
|
|
28
|
+
_size.value,
|
|
29
|
+
cardSize.value ? `card-size-${cardSize.value}` : null
|
|
30
|
+
])
|
|
31
|
+
|
|
32
|
+
provideControlSize(_size)
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<div class="SControl" :class="classes">
|
|
37
|
+
<slot />
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<style scoped lang="postcss">
|
|
42
|
+
.SControl {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.SControl.small { gap: 8px; height: 32px; }
|
|
49
|
+
.SControl.medium { gap: 12px; height: 40px; }
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useControlSize } from '../composables/Control'
|
|
3
|
+
import SButton, { type Mode, type Tooltip, type Type } from './SButton.vue'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
tag?: string
|
|
7
|
+
type?: Type
|
|
8
|
+
mode?: Mode
|
|
9
|
+
icon?: any
|
|
10
|
+
iconMode?: Mode
|
|
11
|
+
label?: string
|
|
12
|
+
labelMode?: Mode
|
|
13
|
+
href?: string
|
|
14
|
+
loading?: boolean
|
|
15
|
+
disabled?: boolean
|
|
16
|
+
tooltip?: Tooltip
|
|
17
|
+
}>()
|
|
18
|
+
|
|
19
|
+
defineEmits<{
|
|
20
|
+
(e: 'click'): void
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const size = useControlSize()
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div class="SControlButton">
|
|
28
|
+
<SButton
|
|
29
|
+
:tag="tag"
|
|
30
|
+
:size="size"
|
|
31
|
+
:type="type"
|
|
32
|
+
:mode="mode"
|
|
33
|
+
:icon="icon"
|
|
34
|
+
:icon-mode="iconMode"
|
|
35
|
+
:label="label"
|
|
36
|
+
:label-mode="labelMode"
|
|
37
|
+
:href="href"
|
|
38
|
+
:tooltip="tooltip"
|
|
39
|
+
block
|
|
40
|
+
:loading="loading"
|
|
41
|
+
:disabled="disabled"
|
|
42
|
+
@click="$emit('click')"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provideControlPosition } from '../composables/Control'
|
|
3
|
+
|
|
4
|
+
provideControlPosition('center')
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="SControlCenter">
|
|
9
|
+
<slot />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style scoped lang="postcss">
|
|
14
|
+
.SControlCenter {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
flex-grow: 1;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.SControl.small .SControlCenter { gap: 8px; }
|
|
23
|
+
.SControl.medium .SControlCenter { gap: 12px; }
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import IconMagnifyingGlass from '@iconify-icons/ph/magnifying-glass-bold'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { useControlSize } from '../composables/Control'
|
|
5
|
+
import { useTrans } from '../composables/Lang'
|
|
6
|
+
import { type Validatable } from '../composables/V'
|
|
7
|
+
import SInputText, { type Align, type TextColor } from './SInputText.vue'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
placeholder?: string
|
|
11
|
+
unitAfter?: any
|
|
12
|
+
textColor?: TextColor | ((value: string | null) => TextColor)
|
|
13
|
+
align?: Align
|
|
14
|
+
disabled?: boolean
|
|
15
|
+
value?: string | null
|
|
16
|
+
modelValue?: string | null
|
|
17
|
+
displayValue?: string | null
|
|
18
|
+
validation?: Validatable
|
|
19
|
+
}>()
|
|
20
|
+
|
|
21
|
+
defineEmits<{
|
|
22
|
+
(e: 'update:model-value', value: string | null): void
|
|
23
|
+
(e: 'input', value: string | null): void
|
|
24
|
+
(e: 'blur', value: string | null): void
|
|
25
|
+
(e: 'enter', value: string | null): void
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const { t } = useTrans({
|
|
29
|
+
en: { placeholder: 'Search items' },
|
|
30
|
+
ja: { placeholder: '検索する' }
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const size = useControlSize()
|
|
34
|
+
|
|
35
|
+
const sizeDict = {
|
|
36
|
+
small: 'mini',
|
|
37
|
+
medium: 'small'
|
|
38
|
+
} as const
|
|
39
|
+
|
|
40
|
+
const _value = computed(() => {
|
|
41
|
+
return props.modelValue ?? props.value ?? null
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div class="SControlInputSearch">
|
|
47
|
+
<SInputText
|
|
48
|
+
:size="sizeDict[size]"
|
|
49
|
+
type="search"
|
|
50
|
+
:placeholder="placeholder ?? t.placeholder"
|
|
51
|
+
:unit-before="IconMagnifyingGlass"
|
|
52
|
+
:model-value="_value"
|
|
53
|
+
:validation="validation"
|
|
54
|
+
hide-error
|
|
55
|
+
@update:model-value="$emit('update:model-value', $event)"
|
|
56
|
+
@input="$emit('input', $event)"
|
|
57
|
+
@blur="$emit('blur', $event)"
|
|
58
|
+
@enter="$emit('enter', $event)"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<style scoped lang="postcss">
|
|
64
|
+
.SControlInputSearch {
|
|
65
|
+
flex-grow: 1;
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provideControlPosition } from '../composables/Control'
|
|
3
|
+
|
|
4
|
+
provideControlPosition('left')
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="SControlLeft">
|
|
9
|
+
<slot />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style scoped lang="postcss">
|
|
14
|
+
.SControlLeft {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: flex-start;
|
|
17
|
+
align-items: center;
|
|
18
|
+
flex-grow: 1;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.SControl.small .SControlLeft { gap: 8px; }
|
|
23
|
+
.SControl.medium .SControlLeft { gap: 12px; }
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useControlPosition, useControlSize } from '../composables/Control'
|
|
3
|
+
import SPagination, { type Size } from './SPagination.vue'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
size?: Size
|
|
7
|
+
total: number
|
|
8
|
+
page: number
|
|
9
|
+
perPage: number
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const size = useControlSize()
|
|
13
|
+
const position = useControlPosition()
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="SControlPagination">
|
|
18
|
+
<SPagination
|
|
19
|
+
:size="size"
|
|
20
|
+
:align="position"
|
|
21
|
+
:total="total"
|
|
22
|
+
:page="page"
|
|
23
|
+
:per-page="perPage"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provideControlPosition } from '../composables/Control'
|
|
3
|
+
|
|
4
|
+
provideControlPosition('right')
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="SControlRight">
|
|
9
|
+
<slot />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style scoped lang="postcss">
|
|
14
|
+
.SControlRight {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: flex-end;
|
|
17
|
+
align-items: center;
|
|
18
|
+
flex-grow: 1;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.SControl.small .SControlRight { gap: 8px; }
|
|
23
|
+
.SControl.medium .SControlRight { gap: 12px; }
|
|
24
|
+
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import IconQuestion from '@iconify-icons/ph/question'
|
|
4
4
|
import { type DefineComponent, computed, unref, useSlots } from 'vue'
|
|
5
|
-
import { type Validatable } from '../composables/
|
|
5
|
+
import { type Validatable } from '../composables/V'
|
|
6
6
|
import SIcon from './SIcon.vue'
|
|
7
7
|
import STooltip from './STooltip.vue'
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@ import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
|
3
3
|
import IconCheck from '@iconify-icons/ph/check-bold'
|
|
4
4
|
import IconMinus from '@iconify-icons/ph/minus-bold'
|
|
5
5
|
import { computed } from 'vue'
|
|
6
|
-
import { type Validatable } from '../composables/
|
|
6
|
+
import { type Validatable } from '../composables/V'
|
|
7
7
|
import SIcon from './SIcon.vue'
|
|
8
8
|
import SInputBase from './SInputBase.vue'
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
import SInputCheckbox from './SInputCheckbox.vue'
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { DatePicker } from 'v-calendar'
|
|
4
4
|
import { computed } from 'vue'
|
|
5
|
-
import { type Validatable } from '../composables/
|
|
5
|
+
import { type Validatable } from '../composables/V'
|
|
6
6
|
import { type Day, day } from '../support/Day'
|
|
7
7
|
import SInputBase from './SInputBase.vue'
|
|
8
8
|
|
|
@@ -6,7 +6,7 @@ import xor from 'lodash-es/xor'
|
|
|
6
6
|
import { type DefineComponent, computed, ref } from 'vue'
|
|
7
7
|
import { type DropdownSectionFilter, useManualDropdownPosition } from '../composables/Dropdown'
|
|
8
8
|
import { useFlyout } from '../composables/Flyout'
|
|
9
|
-
import { type Validatable } from '../composables/
|
|
9
|
+
import { type Validatable } from '../composables/V'
|
|
10
10
|
import { isArray } from '../support/Utils'
|
|
11
11
|
import SDropdown from './SDropdown.vue'
|
|
12
12
|
import SIcon from './SIcon.vue'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { type DefineComponent, computed, ref } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
|
|
7
7
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { type DefineComponent, computed, ref } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
|
|
7
7
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -3,7 +3,7 @@ import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
|
3
3
|
import IconImage from '@iconify-icons/ph/image-bold'
|
|
4
4
|
import { computed, ref } from 'vue'
|
|
5
5
|
import { useImageSrcFromFile } from '../composables/Image'
|
|
6
|
-
import { type Validatable } from '../composables/
|
|
6
|
+
import { type Validatable } from '../composables/V'
|
|
7
7
|
import SButton from './SButton.vue'
|
|
8
8
|
import SIcon from './SIcon.vue'
|
|
9
9
|
import SInputBase from './SInputBase.vue'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { type DefineComponent, computed } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import { isNullish, isString } from '../support/Utils'
|
|
6
6
|
import SInputText from './SInputText.vue'
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { type DefineComponent, computed } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
|
|
7
7
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { type DefineComponent, computed } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
import SInputRadio from './SInputRadio.vue'
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts" generic="T extends string | number | boolean">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
import SInputSegmentsOption, { type Mode } from './SInputSegmentsOption.vue'
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
|
3
3
|
import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
|
|
4
4
|
import IconCaretUp from '@iconify-icons/ph/caret-up-bold'
|
|
5
5
|
import { type DefineComponent, computed, ref } from 'vue'
|
|
6
|
-
import { type Validatable } from '../composables/
|
|
6
|
+
import { type Validatable } from '../composables/V'
|
|
7
7
|
import SIcon from './SIcon.vue'
|
|
8
8
|
import SInputBase from './SInputBase.vue'
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { type DefineComponent, computed } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
|
|
7
7
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { type DefineComponent, computed } from 'vue'
|
|
4
|
-
import { type Validatable } from '../composables/
|
|
4
|
+
import { type Validatable } from '../composables/V'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
import SInputSwitch from './SInputSwitch.vue'
|
|
7
7
|
|