@globalbrain/sefirot 2.21.0 → 2.22.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/SDropdown.vue +1 -1
- package/lib/components/SDropdownSection.vue +1 -1
- package/lib/components/SDropdownSectionActions.vue +1 -1
- package/lib/components/SDropdownSectionComponent.vue +1 -1
- package/lib/components/SDropdownSectionFilter.vue +3 -3
- package/lib/components/SDropdownSectionFilterItem.vue +1 -1
- package/lib/components/SDropdownSectionMenu.vue +1 -1
- package/lib/components/SIcon.vue +1 -1
- package/lib/components/SInputAddon.vue +1 -1
- package/lib/components/SInputBase.vue +6 -3
- package/lib/components/SInputCheckbox.vue +3 -3
- package/lib/components/SInputCheckboxes.vue +2 -2
- package/lib/components/SInputDate.vue +6 -4
- package/lib/components/SInputDropdown.vue +6 -4
- package/lib/components/SInputFile.vue +4 -3
- package/lib/components/SInputHMS.vue +4 -3
- package/lib/components/SInputNumber.vue +6 -5
- package/lib/components/SInputRadio.vue +3 -3
- package/lib/components/SInputRadios.vue +4 -3
- package/lib/components/SInputSelect.vue +4 -3
- package/lib/components/SInputSwitch.vue +4 -3
- package/lib/components/SInputSwitches.vue +4 -3
- package/lib/components/SInputText.vue +4 -3
- package/lib/components/SInputTextarea.vue +38 -32
- package/lib/components/SInputYMD.vue +4 -3
- package/lib/components/SMarkdown.vue +2 -1
- package/lib/components/SSheetFooterAction.vue +2 -1
- package/lib/components/SSnackbar.vue +2 -1
- package/lib/components/SStep.vue +2 -2
- package/lib/components/SSteps.vue +5 -4
- package/lib/components/STable.vue +1 -1
- package/lib/components/STableCell.vue +1 -1
- package/lib/components/STableCellAvatars.vue +1 -1
- package/lib/components/STableCellDay.vue +1 -1
- package/lib/components/STableCellPills.vue +1 -1
- package/lib/components/STableColumn.vue +1 -1
- package/lib/components/STooltip.vue +2 -1
- package/lib/composables/Data.ts +2 -1
- package/lib/composables/Dropdown.ts +4 -2
- package/lib/composables/Flyout.ts +2 -1
- package/lib/composables/Form.ts +6 -3
- package/lib/composables/Grid.ts +2 -1
- package/lib/composables/Markdown.ts +4 -2
- package/lib/composables/Table.ts +4 -3
- package/lib/composables/Tooltip.ts +2 -1
- package/lib/composables/Utils.ts +4 -2
- package/lib/composables/Validation.ts +5 -3
- package/lib/composables/markdown/LinkPlugin.ts +1 -1
- package/lib/mixins/Sheet.ts +1 -1
- package/lib/styles/variables.css +10 -10
- package/lib/support/Day.ts +2 -1
- package/lib/validation/rules/hms.ts +2 -1
- package/lib/validation/rules/requiredHms.ts +2 -1
- package/lib/validation/rules/requiredYmd.ts +2 -1
- package/lib/validation/rules/ymd.ts +2 -1
- package/lib/validation/validators/hms.ts +3 -3
- package/lib/validation/validators/requiredYmd.ts +2 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { DropdownSection } from '../composables/Dropdown'
|
|
2
|
+
import type { DropdownSection } from '../composables/Dropdown'
|
|
3
3
|
import SDropdownSectionActions from './SDropdownSectionActions.vue'
|
|
4
4
|
import SDropdownSectionComponent from './SDropdownSectionComponent.vue'
|
|
5
5
|
import SDropdownSectionFilter from './SDropdownSectionFilter.vue'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import IconCheck from '@iconify-icons/ph/check'
|
|
3
|
-
import { MaybeRef } from '@vueuse/core'
|
|
3
|
+
import type { MaybeRef } from '@vueuse/core'
|
|
4
4
|
import Fuse from 'fuse.js'
|
|
5
5
|
import { computed, onMounted, ref, unref } from 'vue'
|
|
6
|
-
import { DropdownSectionFilterOption, DropdownSectionFilterSelectedValue } from '../composables/Dropdown'
|
|
6
|
+
import type { DropdownSectionFilterOption, DropdownSectionFilterSelectedValue } from '../composables/Dropdown'
|
|
7
7
|
import { isArray } from '../support/Utils'
|
|
8
8
|
import SDropdownSectionFilterItem from './SDropdownSectionFilterItem.vue'
|
|
9
9
|
import SIcon from './SIcon.vue'
|
|
@@ -23,7 +23,7 @@ const fuse = computed(() => {
|
|
|
23
23
|
})
|
|
24
24
|
|
|
25
25
|
const filteredOptions = computed(() => {
|
|
26
|
-
return !props.search || !query.value
|
|
26
|
+
return (!props.search || !query.value)
|
|
27
27
|
? unref(props.options)
|
|
28
28
|
: fuse.value.search(query.value).map((r) => r.item)
|
|
29
29
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { DropdownSectionFilterOption } from '../composables/Dropdown'
|
|
2
|
+
import type { DropdownSectionFilterOption } from '../composables/Dropdown'
|
|
3
3
|
import SDropdownSectionFilterItemAvatar from './SDropdownSectionFilterItemAvatar.vue'
|
|
4
4
|
import SDropdownSectionFilterItemText from './SDropdownSectionFilterItemText.vue'
|
|
5
5
|
|
package/lib/components/SIcon.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
|
|
3
|
+
import type { DropdownSection } from 'sefirot/composables/Dropdown'
|
|
3
4
|
import {
|
|
4
|
-
DropdownSection,
|
|
5
5
|
getSelectedOption,
|
|
6
6
|
useManualDropdownPosition
|
|
7
7
|
} from 'sefirot/composables/Dropdown'
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
2
3
|
import IconQuestion from '@iconify-icons/ph/question'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Validatable } from '../composables/Validation'
|
|
4
|
+
import type { DefineComponent } from 'vue'
|
|
5
|
+
import { computed, unref, useSlots } from 'vue'
|
|
6
|
+
import type { Validatable } from '../composables/Validation'
|
|
6
7
|
import SIcon from './SIcon.vue'
|
|
7
8
|
import STooltip from './STooltip.vue'
|
|
8
9
|
|
|
@@ -122,11 +123,13 @@ function getErrorMsg(validation: Validatable) {
|
|
|
122
123
|
display: flex;
|
|
123
124
|
align-items: center;
|
|
124
125
|
gap: 4px;
|
|
126
|
+
transition: color 0.25s;
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
.label-text-value {
|
|
128
130
|
font-weight: 500;
|
|
129
131
|
color: var(--input-label-color);
|
|
132
|
+
transition: color 0.25s;
|
|
130
133
|
}
|
|
131
134
|
|
|
132
135
|
.label-text-info {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
2
3
|
import IconCheck from '@iconify-icons/ph/check'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Validatable } from '../composables/Validation'
|
|
4
|
+
import type { DefineComponent, PropType } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
6
6
|
import SIcon from './SIcon.vue'
|
|
7
7
|
import SInputBase from './SInputBase.vue'
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent, PropType } from 'vue'
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent, PropType } from 'vue'
|
|
4
4
|
import SInputBase from './SInputBase.vue'
|
|
5
5
|
import SInputCheckbox from './SInputCheckbox.vue'
|
|
6
6
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
3
|
import { DatePicker } from 'v-calendar'
|
|
4
|
-
import { DefineComponent
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import type { DefineComponent } from 'vue'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import type { Validatable } from '../composables/Validation'
|
|
7
|
+
import type { Day } from '../support/Day'
|
|
8
|
+
import { day } from '../support/Day'
|
|
7
9
|
import SInputBase from './SInputBase.vue'
|
|
8
10
|
|
|
9
11
|
export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
2
3
|
import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
|
|
3
4
|
import IconCaretUp from '@iconify-icons/ph/caret-up-bold'
|
|
4
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
5
5
|
import xor from 'lodash-es/xor'
|
|
6
|
-
import { DefineComponent
|
|
7
|
-
import {
|
|
6
|
+
import type { DefineComponent } from 'vue'
|
|
7
|
+
import { computed, ref } from 'vue'
|
|
8
|
+
import type { DropdownSectionFilter } from '../composables/Dropdown'
|
|
9
|
+
import { useManualDropdownPosition } from '../composables/Dropdown'
|
|
8
10
|
import { useFlyout } from '../composables/Flyout'
|
|
9
|
-
import { Validatable } from '../composables/Validation'
|
|
11
|
+
import type { Validatable } from '../composables/Validation'
|
|
10
12
|
import { isArray } from '../support/Utils'
|
|
11
13
|
import SDropdown from './SDropdown.vue'
|
|
12
14
|
import SIcon from './SIcon.vue'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed, ref } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import SInputBase from './SInputBase.vue'
|
|
6
7
|
|
|
7
8
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed, ref } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import SInputBase from './SInputBase.vue'
|
|
6
7
|
|
|
7
8
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import { isNullish, isString } from '../support/Utils'
|
|
6
7
|
import SInputText from './SInputText.vue'
|
|
7
8
|
|
|
@@ -40,7 +41,7 @@ const emit = defineEmits<{
|
|
|
40
41
|
}>()
|
|
41
42
|
|
|
42
43
|
const _value = computed(() => {
|
|
43
|
-
return props.modelValue !== undefined
|
|
44
|
+
return (props.modelValue !== undefined)
|
|
44
45
|
? props.modelValue
|
|
45
46
|
: props.value !== undefined ? props.value : null
|
|
46
47
|
})
|
|
@@ -72,7 +73,7 @@ const displayValue = computed(() => {
|
|
|
72
73
|
return props.displayValue
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
return !props.separator || valueWithSeparator.value === null
|
|
76
|
+
return (!props.separator || valueWithSeparator.value === null)
|
|
76
77
|
? null
|
|
77
78
|
: valueWithSeparator.value
|
|
78
79
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent } from 'vue'
|
|
4
|
-
import { Validatable } from '../composables/Validation'
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
|
|
7
7
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import SInputBase from './SInputBase.vue'
|
|
6
7
|
import SInputRadio from './SInputRadio.vue'
|
|
7
8
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
2
3
|
import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
|
|
3
4
|
import IconCaretUp from '@iconify-icons/ph/caret-up-bold'
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Validatable } from '../composables/Validation'
|
|
5
|
+
import type { DefineComponent } from 'vue'
|
|
6
|
+
import { computed, ref } from 'vue'
|
|
7
|
+
import type { Validatable } from '../composables/Validation'
|
|
7
8
|
import SIcon from './SIcon.vue'
|
|
8
9
|
import SInputBase from './SInputBase.vue'
|
|
9
10
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import SInputBase from './SInputBase.vue'
|
|
6
7
|
|
|
7
8
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import SInputBase from './SInputBase.vue'
|
|
6
7
|
import SInputSwitch from './SInputSwitch.vue'
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed, ref } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import { isString } from '../support/Utils'
|
|
6
7
|
import SIcon from './SIcon.vue'
|
|
7
8
|
import SInputBase from './SInputBase.vue'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import {
|
|
4
|
-
import { Validatable } from '../composables/Validation'
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
5
|
import SInputBase from './SInputBase.vue'
|
|
6
6
|
|
|
7
7
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -14,21 +14,30 @@ const props = defineProps<{
|
|
|
14
14
|
info?: string
|
|
15
15
|
note?: string
|
|
16
16
|
help?: string
|
|
17
|
-
checkIcon?: IconifyIcon
|
|
17
|
+
checkIcon?: IconifyIcon
|
|
18
18
|
checkText?: string
|
|
19
19
|
checkColor?: Color
|
|
20
20
|
placeholder?: string
|
|
21
21
|
disabled?: boolean
|
|
22
22
|
rows?: number | 'fill'
|
|
23
|
-
|
|
23
|
+
value?: string | null
|
|
24
|
+
modelValue?: string | null
|
|
24
25
|
hideError?: boolean
|
|
25
26
|
validation?: Validatable
|
|
26
27
|
}>()
|
|
27
28
|
|
|
28
29
|
const emit = defineEmits<{
|
|
29
|
-
(e: 'update:
|
|
30
|
+
(e: 'update:model-value', value: string | null): void
|
|
31
|
+
(e: 'input', value: string | null): void
|
|
32
|
+
(e: 'blur', value: string | null): void
|
|
30
33
|
}>()
|
|
31
34
|
|
|
35
|
+
const _value = computed(() => {
|
|
36
|
+
return props.modelValue !== undefined
|
|
37
|
+
? props.modelValue
|
|
38
|
+
: props.value !== undefined ? props.value : null
|
|
39
|
+
})
|
|
40
|
+
|
|
32
41
|
const classes = computed(() => [
|
|
33
42
|
props.size ?? 'small',
|
|
34
43
|
{ disabled: props.disabled },
|
|
@@ -36,12 +45,17 @@ const classes = computed(() => [
|
|
|
36
45
|
])
|
|
37
46
|
|
|
38
47
|
function emitInput(e: Event): void {
|
|
39
|
-
|
|
48
|
+
const v = (e.target as HTMLInputElement).value || null
|
|
49
|
+
emit('update:model-value', v)
|
|
50
|
+
emit('input', v)
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
function emitBlur(e: FocusEvent): void {
|
|
43
54
|
props.validation?.$touch()
|
|
44
|
-
|
|
55
|
+
|
|
56
|
+
const v = (e.target as HTMLInputElement).value || null
|
|
57
|
+
emit('update:model-value', v)
|
|
58
|
+
emit('blur', v)
|
|
45
59
|
}
|
|
46
60
|
</script>
|
|
47
61
|
|
|
@@ -67,7 +81,7 @@ function emitBlur(e: FocusEvent): void {
|
|
|
67
81
|
:placeholder="placeholder"
|
|
68
82
|
:rows="rows ?? 3"
|
|
69
83
|
:disabled="disabled"
|
|
70
|
-
:value="
|
|
84
|
+
:value="_value ?? undefined"
|
|
71
85
|
@input="emitInput"
|
|
72
86
|
@blur="emitBlur"
|
|
73
87
|
/>
|
|
@@ -78,21 +92,21 @@ function emitBlur(e: FocusEvent): void {
|
|
|
78
92
|
<style scoped lang="postcss">
|
|
79
93
|
.SInputTextarea.mini {
|
|
80
94
|
.input {
|
|
81
|
-
padding: 6px
|
|
95
|
+
padding: 6px 10px;
|
|
82
96
|
width: 100%;
|
|
83
97
|
min-height: 80px;
|
|
84
98
|
line-height: 20px;
|
|
85
|
-
font-size:
|
|
99
|
+
font-size: var(--input-font-size, var(--input-mini-font-size));
|
|
86
100
|
}
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
.SInputTextarea.small {
|
|
90
104
|
.input {
|
|
91
|
-
padding: 12px;
|
|
105
|
+
padding: 7px 12px;
|
|
92
106
|
width: 100%;
|
|
93
107
|
min-height: 96px;
|
|
94
108
|
line-height: 24px;
|
|
95
|
-
font-size:
|
|
109
|
+
font-size: var(--input-font-size, var(--input-small-font-size));
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
112
|
|
|
@@ -102,25 +116,27 @@ function emitBlur(e: FocusEvent): void {
|
|
|
102
116
|
width: 100%;
|
|
103
117
|
min-height: 96px;
|
|
104
118
|
line-height: 24px;
|
|
105
|
-
font-size:
|
|
119
|
+
font-size: var(--input-font-size, var(--input-medium-font-size));
|
|
106
120
|
}
|
|
107
121
|
}
|
|
108
122
|
|
|
109
123
|
.SInputTextarea.disabled {
|
|
110
124
|
.input,
|
|
111
125
|
.input:hover {
|
|
112
|
-
|
|
126
|
+
border-color: var(--input-disabled-border-color);
|
|
127
|
+
color: var(--input-disabled-value-color);
|
|
128
|
+
background-color: var(--input-disabled-bg-color);
|
|
113
129
|
cursor: not-allowed;
|
|
114
130
|
}
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
.SInputTextarea.has-error {
|
|
118
134
|
.input {
|
|
119
|
-
border-color: var(--
|
|
135
|
+
border-color: var(--input-error-border-color);
|
|
120
136
|
|
|
121
137
|
&:hover,
|
|
122
138
|
&:focus {
|
|
123
|
-
border-color: var(--
|
|
139
|
+
border-color: var(--input-error-border-color);
|
|
124
140
|
}
|
|
125
141
|
}
|
|
126
142
|
}
|
|
@@ -128,34 +144,24 @@ function emitBlur(e: FocusEvent): void {
|
|
|
128
144
|
.input {
|
|
129
145
|
display: block;
|
|
130
146
|
flex-grow: 1;
|
|
131
|
-
border: 1px solid var(--
|
|
147
|
+
border: 1px solid var(--input-border-color);
|
|
132
148
|
border-radius: 6px;
|
|
133
149
|
width: 100%;
|
|
134
150
|
font-weight: 400;
|
|
135
|
-
background-color: var(--
|
|
151
|
+
background-color: var(--input-bg-color);
|
|
136
152
|
transition: border-color 0.25s, background-color 0.25s;
|
|
137
153
|
|
|
138
154
|
&::placeholder {
|
|
139
|
-
|
|
140
|
-
color: var(--c-text-3);
|
|
155
|
+
color: var(--input-placeholder-color);
|
|
141
156
|
}
|
|
142
157
|
|
|
143
158
|
&:hover {
|
|
144
|
-
border-color: var(--
|
|
159
|
+
border-color: var(--input-hover-border-color);
|
|
145
160
|
}
|
|
146
161
|
|
|
147
162
|
&:focus,
|
|
148
163
|
&:hover:focus {
|
|
149
|
-
border-color: var(--
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.dark &:hover {
|
|
153
|
-
border-color: var(--c-gray);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.dark &:focus,
|
|
157
|
-
.dark &:hover:focus {
|
|
158
|
-
border-color: var(--c-info);
|
|
164
|
+
border-color: var(--input-focus-border-color);
|
|
159
165
|
}
|
|
160
166
|
|
|
161
167
|
&.fill {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
-
import { DefineComponent
|
|
4
|
-
import {
|
|
2
|
+
import type { IconifyIcon } from '@iconify/vue/dist/offline'
|
|
3
|
+
import type { DefineComponent } from 'vue'
|
|
4
|
+
import { computed, ref } from 'vue'
|
|
5
|
+
import type { Validatable } from '../composables/Validation'
|
|
5
6
|
import SInputBase from './SInputBase.vue'
|
|
6
7
|
|
|
7
8
|
export type Size = 'mini' | 'small' | 'medium'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, nextTick, ref, watch } from 'vue'
|
|
3
|
-
import { LinkCallback, LinkSubscriberPayload
|
|
3
|
+
import type { LinkCallback, LinkSubscriberPayload } from '../composables/Markdown'
|
|
4
|
+
import { useLink, useMarkdown } from '../composables/Markdown'
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
6
7
|
tag?: string
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import IconX from '@iconify-icons/ph/x'
|
|
3
|
-
import { SnackbarAction
|
|
3
|
+
import type { SnackbarAction } from '../stores/Snackbars'
|
|
4
|
+
import { useSnackbars } from '../stores/Snackbars'
|
|
4
5
|
import SButton from './SButton.vue'
|
|
5
6
|
import SIcon from './SIcon.vue'
|
|
6
7
|
|
package/lib/components/SStep.vue
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import IconCheck from '@iconify-icons/ph/check'
|
|
3
3
|
import IconX from '@iconify-icons/ph/x'
|
|
4
|
-
import { PropType } from 'vue'
|
|
5
|
-
import { BarMode, StepStatus } from '../composables/Step'
|
|
4
|
+
import type { PropType } from 'vue'
|
|
5
|
+
import type { BarMode, StepStatus } from '../composables/Step'
|
|
6
6
|
import SIcon from './SIcon.vue'
|
|
7
7
|
|
|
8
8
|
defineProps({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { PropType
|
|
3
|
-
import {
|
|
2
|
+
import type { PropType } from 'vue'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import type { BarMode, Step } from '../composables/Step'
|
|
4
5
|
import SStep from './SStep.vue'
|
|
5
6
|
|
|
6
7
|
const props = defineProps({
|
|
@@ -19,7 +20,7 @@ function getBarLeftMode(index: number): BarMode | null {
|
|
|
19
20
|
const current = props.steps[index]
|
|
20
21
|
const prev = props.steps[index - 1]
|
|
21
22
|
|
|
22
|
-
return isActive(prev) && isActive(current) ? 'active' : 'mute'
|
|
23
|
+
return (isActive(prev) && isActive(current)) ? 'active' : 'mute'
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
function getBarRightMode(index: number): BarMode | null {
|
|
@@ -30,7 +31,7 @@ function getBarRightMode(index: number): BarMode | null {
|
|
|
30
31
|
const current = props.steps[index]
|
|
31
32
|
const next = props.steps[index + 1]
|
|
32
33
|
|
|
33
|
-
return isActive(current) && isActive(next) ? 'active' : 'mute'
|
|
34
|
+
return (isActive(current) && isActive(next)) ? 'active' : 'mute'
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
function isActive(step: Step): boolean {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, reactive, ref, toRefs, watch } from 'vue'
|
|
3
|
-
import { Table } from '../composables/Table'
|
|
3
|
+
import type { Table } from '../composables/Table'
|
|
4
4
|
import SSpinner from './SSpinner.vue'
|
|
5
5
|
import STableCell from './STableCell.vue'
|
|
6
6
|
import STableColumn from './STableColumn.vue'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
|
-
import { TableCell } from '../composables/Table'
|
|
3
|
+
import type { TableCell } from '../composables/Table'
|
|
4
4
|
import STableCellAvatar from './STableCellAvatar.vue'
|
|
5
5
|
import STableCellAvatars from './STableCellAvatars.vue'
|
|
6
6
|
import STableCellDay from './STableCellDay.vue'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import IconDotsThree from '@iconify-icons/ph/dots-three'
|
|
3
3
|
import { computed, nextTick, ref, unref, watch } from 'vue'
|
|
4
|
-
import { DropdownSection } from '../composables/Dropdown'
|
|
4
|
+
import type { DropdownSection } from '../composables/Dropdown'
|
|
5
5
|
import { useFlyout } from '../composables/Flyout'
|
|
6
6
|
import { isArray } from '../support/Utils'
|
|
7
7
|
import SDropdown from './SDropdown.vue'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref } from 'vue'
|
|
3
|
-
import { Position
|
|
3
|
+
import type { Position } from '../composables/Tooltip'
|
|
4
|
+
import { useTooltip } from '../composables/Tooltip'
|
|
4
5
|
import SMarkdown from './SMarkdown.vue'
|
|
5
6
|
|
|
6
7
|
const props = defineProps<{
|
package/lib/composables/Data.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { watchOnce } from '@vueuse/core'
|
|
2
2
|
import cloneDeep from 'lodash-es/cloneDeep'
|
|
3
|
-
import { WatchSource
|
|
3
|
+
import type { WatchSource } from 'vue'
|
|
4
|
+
import { reactive } from 'vue'
|
|
4
5
|
import { isNullish, isObject } from '../support/Utils'
|
|
5
6
|
|
|
6
7
|
export interface Data<T extends Record<string, any>> {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { MaybeRef
|
|
2
|
-
import {
|
|
1
|
+
import type { MaybeRef } from '@vueuse/core'
|
|
2
|
+
import { useElementBounding, useWindowSize } from '@vueuse/core'
|
|
3
|
+
import type { Ref } from 'vue'
|
|
4
|
+
import { ref, unref } from 'vue'
|
|
3
5
|
|
|
4
6
|
export type DropdownSection =
|
|
5
7
|
| DropdownSectionMenu
|
package/lib/composables/Form.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { Ref
|
|
1
|
+
import type { Ref } from 'vue'
|
|
2
|
+
import { computed } from 'vue'
|
|
2
3
|
import { useSnackbars } from '../stores/Snackbars'
|
|
3
|
-
import { UseDataInput
|
|
4
|
-
import {
|
|
4
|
+
import type { UseDataInput } from './Data'
|
|
5
|
+
import { useData } from './Data'
|
|
6
|
+
import type { Validation } from './Validation'
|
|
7
|
+
import { useValidation } from './Validation'
|
|
5
8
|
|
|
6
9
|
export interface Form<T extends Record<string, any>> {
|
|
7
10
|
data: T
|
package/lib/composables/Grid.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import MarkdownIt from 'markdown-it'
|
|
2
|
-
import { Ref
|
|
2
|
+
import type { Ref } from 'vue'
|
|
3
|
+
import { onUnmounted } from 'vue'
|
|
3
4
|
import { useRouter } from 'vue-router'
|
|
4
|
-
import { LinkAttrs
|
|
5
|
+
import type { LinkAttrs } from './markdown/LinkPlugin'
|
|
6
|
+
import { isCallbackUrl, isExternalUrl, linkPlugin } from './markdown/LinkPlugin'
|
|
5
7
|
|
|
6
8
|
export type UseMarkdown = (source: string, inline: boolean) => string
|
|
7
9
|
|
package/lib/composables/Table.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { MaybeRef } from '@vueuse/core'
|
|
2
|
-
import { Component
|
|
3
|
-
import {
|
|
1
|
+
import type { MaybeRef } from '@vueuse/core'
|
|
2
|
+
import type { Component } from 'vue'
|
|
3
|
+
import { reactive } from 'vue'
|
|
4
|
+
import type { DropdownSection } from './Dropdown'
|
|
4
5
|
|
|
5
6
|
export interface Table {
|
|
6
7
|
orders: string[]
|
package/lib/composables/Utils.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { MaybeComputedRef
|
|
2
|
-
import {
|
|
1
|
+
import type { MaybeComputedRef } from '@vueuse/core'
|
|
2
|
+
import { resolveUnref } from '@vueuse/core'
|
|
3
|
+
import type { ComputedRef } from 'vue'
|
|
4
|
+
import { computed } from 'vue'
|
|
3
5
|
|
|
4
6
|
export type WhenCondition<T> = MaybeComputedRef<T>
|
|
5
7
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
GlobalConfig,
|
|
3
3
|
Validation,
|
|
4
|
-
ValidationArgs
|
|
4
|
+
ValidationArgs
|
|
5
|
+
} from '@vuelidate/core'
|
|
6
|
+
import {
|
|
5
7
|
useVuelidate
|
|
6
8
|
} from '@vuelidate/core'
|
|
7
|
-
import { Ref, ToRefs } from 'vue'
|
|
9
|
+
import type { Ref, ToRefs } from 'vue'
|
|
8
10
|
|
|
9
11
|
export type { Validation, ValidationArgs, GlobalConfig }
|
|
10
12
|
|
package/lib/mixins/Sheet.ts
CHANGED
package/lib/styles/variables.css
CHANGED
|
@@ -65,16 +65,16 @@
|
|
|
65
65
|
--c-text-dark-2: rgba(235, 235, 245, 0.6);
|
|
66
66
|
--c-text-dark-3: rgba(235, 235, 245, 0.3);
|
|
67
67
|
|
|
68
|
-
--c-info: #
|
|
69
|
-
--c-info-light: #
|
|
70
|
-
--c-info-lighter: #
|
|
71
|
-
--c-info-lghtest: #
|
|
72
|
-
--c-info-dark: #
|
|
73
|
-
--c-info-darker: #
|
|
74
|
-
--c-info-darkest: #
|
|
75
|
-
--c-info-dimm-1: rgba(
|
|
76
|
-
--c-info-dimm-2: rgba(
|
|
77
|
-
--c-info-dimm-3: rgba(
|
|
68
|
+
--c-info: #1668b6;
|
|
69
|
+
--c-info-light: #2997ff;
|
|
70
|
+
--c-info-lighter: #5bafff;
|
|
71
|
+
--c-info-lghtest: #7dc0ff;
|
|
72
|
+
--c-info-dark: #104c85;
|
|
73
|
+
--c-info-darker: #0c3963;
|
|
74
|
+
--c-info-darkest: #092e51;
|
|
75
|
+
--c-info-dimm-1: rgba(22, 104, 182, 0.12);
|
|
76
|
+
--c-info-dimm-2: rgba(22, 104, 182, 0.2);
|
|
77
|
+
--c-info-dimm-3: rgba(22, 104, 182, 0.28);
|
|
78
78
|
--c-info-text: var(--c-info-light);
|
|
79
79
|
--c-info-text-light: var(--c-info-lighter);
|
|
80
80
|
--c-info-text-lighter: var(--c-info-lightest);
|
package/lib/support/Day.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ConfigType, Dayjs } from 'dayjs'
|
|
2
|
+
import dayjs from 'dayjs'
|
|
2
3
|
import PluginRelativeTime from 'dayjs/plugin/relativeTime'
|
|
3
4
|
import PluginTimezone from 'dayjs/plugin/timezone'
|
|
4
5
|
import PluginUtc from 'dayjs/plugin/utc'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { Hms, HmsType
|
|
2
|
+
import type { Hms, HmsType } from '../validators/hms'
|
|
3
|
+
import { hms as baseHms } from '../validators/hms'
|
|
3
4
|
|
|
4
5
|
export function hms(required?: HmsType[], msg?: string) {
|
|
5
6
|
return helpers.withMessage(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { Hms, HmsType
|
|
2
|
+
import type { Hms, HmsType } from '../validators/requiredHms'
|
|
3
|
+
import { requiredHms as baseRequiredHms } from '../validators/requiredHms'
|
|
3
4
|
|
|
4
5
|
export function requiredHms(required?: HmsType[], msg?: string) {
|
|
5
6
|
return helpers.withMessage(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { Ymd, YmdType
|
|
2
|
+
import type { Ymd, YmdType } from '../validators/requiredYmd'
|
|
3
|
+
import { requiredYmd as baseRequiredYmd } from '../validators/requiredYmd'
|
|
3
4
|
|
|
4
5
|
export function requiredYmd(required?: YmdType[], msg?: string) {
|
|
5
6
|
return helpers.withMessage(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { Ymd, YmdType
|
|
2
|
+
import type { Ymd, YmdType } from '../validators/ymd'
|
|
3
|
+
import { ymd as baseYmd } from '../validators/ymd'
|
|
3
4
|
|
|
4
5
|
export function ymd(required?: YmdType[], msg?: string) {
|
|
5
6
|
return helpers.withMessage(
|
|
@@ -22,8 +22,8 @@ export function hms(hms: Hms, required: HmsType[] = ['h', 'm', 's']): boolean {
|
|
|
22
22
|
|
|
23
23
|
const valueAsNumber = Number(value)
|
|
24
24
|
|
|
25
|
-
return r === 'h'
|
|
26
|
-
? valueAsNumber >= 0 && valueAsNumber < 24
|
|
27
|
-
: valueAsNumber >= 0 && valueAsNumber < 60
|
|
25
|
+
return (r === 'h')
|
|
26
|
+
? (valueAsNumber >= 0 && valueAsNumber < 24)
|
|
27
|
+
: (valueAsNumber >= 0 && valueAsNumber < 60)
|
|
28
28
|
})
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalbrain/sefirot",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"packageManager": "pnpm@7.26.2",
|
|
5
5
|
"description": "Vue Components for Global Brain Design System.",
|
|
6
6
|
"author": "Kia Ishii <ka.ishii@globalbrains.com>",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dayjs": "^1.11.7"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@globalbrain/eslint-config": "^1.
|
|
49
|
+
"@globalbrain/eslint-config": "^1.3.0",
|
|
50
50
|
"@histoire/plugin-vue": "^0.12.4",
|
|
51
51
|
"@iconify-icons/ph": "^1.2.3",
|
|
52
52
|
"@iconify/vue": "^4.0.2",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"chalk": "^4.1.2",
|
|
65
65
|
"conventional-changelog-cli": "^2.2.2",
|
|
66
66
|
"enquirer": "^2.3.6",
|
|
67
|
-
"eslint": "^8.
|
|
67
|
+
"eslint": "^8.35.0",
|
|
68
68
|
"execa": "^5.1.1",
|
|
69
69
|
"fuse.js": "^6.6.2",
|
|
70
70
|
"histoire": "^0.12.4",
|