@globalbrain/sefirot 4.19.1 → 4.21.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.
Files changed (63) hide show
  1. package/lib/components/SActionListItem.vue +2 -2
  2. package/lib/components/SActionMenu.vue +15 -15
  3. package/lib/components/SAvatarStack.vue +2 -2
  4. package/lib/components/SButton.vue +1 -1
  5. package/lib/components/SControlActionBarButton.vue +5 -5
  6. package/lib/components/SControlActionBarClose.vue +1 -1
  7. package/lib/components/SControlActionBarCollapse.vue +2 -2
  8. package/lib/components/SControlActionMenu.vue +15 -15
  9. package/lib/components/SControlButton.vue +14 -14
  10. package/lib/components/SControlInputSearch.vue +1 -1
  11. package/lib/components/SControlPagination.vue +6 -4
  12. package/lib/components/SDesc.vue +2 -2
  13. package/lib/components/SDescItem.vue +1 -1
  14. package/lib/components/SDropdown.vue +1 -1
  15. package/lib/components/SDropdownSectionFilter.vue +1 -1
  16. package/lib/components/SErrorBoundary.vue +1 -1
  17. package/lib/components/SFragment.vue +1 -1
  18. package/lib/components/SInputCheckbox.vue +8 -8
  19. package/lib/components/SInputCheckboxes.vue +8 -8
  20. package/lib/components/SInputDate.vue +11 -11
  21. package/lib/components/SInputDropdown.vue +9 -9
  22. package/lib/components/SInputFile.vue +11 -11
  23. package/lib/components/SInputFileUpload.vue +12 -12
  24. package/lib/components/SInputHMS.vue +12 -12
  25. package/lib/components/SInputImage.vue +11 -11
  26. package/lib/components/SInputNumber.vue +19 -19
  27. package/lib/components/SInputRadio.vue +9 -9
  28. package/lib/components/SInputRadios.vue +9 -9
  29. package/lib/components/SInputSegments.vue +9 -9
  30. package/lib/components/SInputSelect.vue +1 -1
  31. package/lib/components/SInputSwitch.vue +9 -9
  32. package/lib/components/SInputSwitches.vue +10 -10
  33. package/lib/components/SInputText.vue +15 -15
  34. package/lib/components/SInputTextarea.vue +16 -16
  35. package/lib/components/SInputYMD.vue +12 -12
  36. package/lib/components/SLink.vue +3 -3
  37. package/lib/components/SLocalNav.vue +2 -2
  38. package/lib/components/SLocalNavAvatar.vue +1 -1
  39. package/lib/components/SLoginPagePasswordDialog.vue +1 -1
  40. package/lib/components/SM.vue +1 -1
  41. package/lib/components/SMFade.vue +1 -1
  42. package/lib/components/SPagination.vue +9 -15
  43. package/lib/components/STable.vue +2 -2
  44. package/lib/components/STableCell.vue +9 -9
  45. package/lib/components/STableCellAvatar.vue +1 -1
  46. package/lib/components/STableCellAvatars.vue +1 -1
  47. package/lib/components/STableCellIndicator.vue +1 -1
  48. package/lib/components/STableCellState.vue +1 -1
  49. package/lib/components/STableHeader.vue +1 -1
  50. package/lib/components/STableHeaderActionItem.vue +3 -3
  51. package/lib/components/STooltip.vue +1 -1
  52. package/lib/support/Day.ts +4 -0
  53. package/lib/validation/rules/after.ts +16 -0
  54. package/lib/validation/rules/afterOrEqual.ts +16 -0
  55. package/lib/validation/rules/before.ts +16 -0
  56. package/lib/validation/rules/beforeOrEqual.ts +16 -0
  57. package/lib/validation/rules/index.ts +4 -0
  58. package/lib/validation/validators/after.ts +9 -0
  59. package/lib/validation/validators/afterOrEqual.ts +9 -0
  60. package/lib/validation/validators/before.ts +8 -0
  61. package/lib/validation/validators/beforeOrEqual.ts +9 -0
  62. package/lib/validation/validators/index.ts +4 -0
  63. package/package.json +1 -1
@@ -88,15 +88,15 @@ function onChange(value: ValueType) {
88
88
  <SInputBase
89
89
  class="SInputRadios"
90
90
  :class="[size ?? 'small']"
91
- :label="label"
92
- :note="note"
93
- :info="info"
94
- :help="help"
95
- :check-icon="checkIcon"
96
- :check-text="checkText"
97
- :check-color="checkColor"
98
- :hide-error="hideError"
99
- :validation="validation"
91
+ :label
92
+ :note
93
+ :info
94
+ :help
95
+ :check-icon
96
+ :check-text
97
+ :check-color
98
+ :hide-error
99
+ :validation
100
100
  >
101
101
  <div class="container">
102
102
  <div class="row">
@@ -61,15 +61,15 @@ function onSelect(value: T) {
61
61
  <SInputBase
62
62
  class="SInputSegments"
63
63
  :class="[size ?? 'small', { block }]"
64
- :label="label"
65
- :note="note"
66
- :info="info"
67
- :help="help"
68
- :check-icon="checkIcon"
69
- :check-text="checkText"
70
- :check-color="checkColor"
71
- :hide-error="hideError"
72
- :validation="validation"
64
+ :label
65
+ :note
66
+ :info
67
+ :help
68
+ :check-icon
69
+ :check-text
70
+ :check-color
71
+ :hide-error
72
+ :validation
73
73
  >
74
74
  <div class="box">
75
75
  <SInputSegmentsOption
@@ -84,7 +84,7 @@ function emitChange(e: any): void {
84
84
  <select
85
85
  class="select"
86
86
  :class="{ 'is-not-selected': isNotSelected }"
87
- :disabled="disabled"
87
+ :disabled
88
88
  @focus="isFocused = true"
89
89
  @blur="isFocused = false"
90
90
  @change="emitChange"
@@ -58,15 +58,15 @@ function emitChange(): void {
58
58
  <SInputBase
59
59
  class="SInputSwitch"
60
60
  :class="classes"
61
- :name="name"
62
- :label="label"
63
- :note="note"
64
- :info="info"
65
- :check-icon="checkIcon"
66
- :check-text="checkText"
67
- :check-color="checkColor"
68
- :help="help"
69
- :hide-error="hideError"
61
+ :name
62
+ :label
63
+ :note
64
+ :info
65
+ :check-icon
66
+ :check-text
67
+ :check-color
68
+ :help
69
+ :hide-error
70
70
  >
71
71
  <div class="container">
72
72
  <div class="input" :class="{ on: _value }" role="button" @click="emitChange">
@@ -54,21 +54,21 @@ function handleChange(value: any): void {
54
54
  <SInputBase
55
55
  class="SInputSwitches"
56
56
  :class="classes"
57
- :name="name"
58
- :label="label"
59
- :note="note"
60
- :info="info"
61
- :help="help"
62
- :check-icon="checkIcon"
63
- :check-text="checkText"
64
- :check-color="checkColor"
65
- :hide-error="hideError"
57
+ :name
58
+ :label
59
+ :note
60
+ :info
61
+ :help
62
+ :check-icon
63
+ :check-text
64
+ :check-color
65
+ :hide-error
66
66
  >
67
67
  <div class="container">
68
68
  <div class="row">
69
69
  <div v-for="(option, index) in options" :key="index" class="col">
70
70
  <SInputSwitch
71
- :size="size"
71
+ :size
72
72
  :text="option.label"
73
73
  :model-value="isChecked(option.value)"
74
74
  @update:model-value="handleChange(option.value)"
@@ -101,19 +101,19 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
101
101
  <SInputBase
102
102
  class="SInputText"
103
103
  :class="classes"
104
- :size="size"
105
- :name="name"
106
- :label="label"
107
- :note="note"
108
- :info="info"
109
- :help="help"
110
- :check-icon="checkIcon"
111
- :check-text="checkText"
112
- :check-color="checkColor"
113
- :validation="validation"
114
- :warning="warning"
115
- :hide-error="hideError"
116
- :hide-warning="hideWarning"
104
+ :size
105
+ :name
106
+ :label
107
+ :note
108
+ :info
109
+ :help
110
+ :check-icon
111
+ :check-text
112
+ :check-color
113
+ :validation
114
+ :warning
115
+ :hide-error
116
+ :hide-warning
117
117
  >
118
118
  <div class="box" :class="{ focus: isFocused }" @click="focus">
119
119
  <div v-if="$slots['addon-before']" class="addon before">
@@ -132,8 +132,8 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
132
132
  :class="inputClasses"
133
133
  :id="name"
134
134
  :type="type ?? 'text'"
135
- :placeholder="placeholder"
136
- :disabled="disabled"
135
+ :placeholder
136
+ :disabled
137
137
  :value="modelValue"
138
138
  ref="input"
139
139
  @focus="onFocus"
@@ -80,19 +80,19 @@ const isPreview = ref(false)
80
80
  <SInputBase
81
81
  class="SInputTextarea"
82
82
  :class="classes"
83
- :size="size"
84
- :name="name"
85
- :label="label"
86
- :note="note"
87
- :info="info"
88
- :help="help"
89
- :check-icon="checkIcon"
90
- :check-text="checkText"
91
- :check-color="checkColor"
92
- :validation="validation"
93
- :warning="warning"
94
- :hide-error="hideError"
95
- :hide-warning="hideWarning"
83
+ :size
84
+ :name
85
+ :label
86
+ :note
87
+ :info
88
+ :help
89
+ :check-icon
90
+ :check-text
91
+ :check-color
92
+ :validation
93
+ :warning
94
+ :hide-error
95
+ :hide-warning
96
96
  >
97
97
  <div class="box">
98
98
  <div v-if="preview !== undefined" class="control">
@@ -109,10 +109,10 @@ const isPreview = ref(false)
109
109
  v-show="!isPreview"
110
110
  :id="name"
111
111
  class="input"
112
- :style="style"
113
- :placeholder="placeholder"
112
+ :style
113
+ :placeholder
114
114
  :rows="rows === 'fill' ? 3 : rows"
115
- :disabled="disabled"
115
+ :disabled
116
116
  :value="_value ?? undefined"
117
117
  @input="emitInput"
118
118
  @blur="emitBlur"
@@ -143,15 +143,15 @@ function createRequiredTouched(): boolean[] {
143
143
  <SInputBase
144
144
  class="SInputYMD"
145
145
  :class="[size ?? 'small', { disabled }]"
146
- :label="label"
147
- :note="note"
148
- :info="info"
149
- :help="help"
150
- :check-icon="checkIcon"
151
- :check-text="checkText"
152
- :check-color="checkColor"
153
- :hide-error="hideError"
154
- :validation="validation"
146
+ :label
147
+ :note
148
+ :info
149
+ :help
150
+ :check-icon
151
+ :check-text
152
+ :check-color
153
+ :hide-error
154
+ :validation
155
155
  >
156
156
  <div class="container" :class="{ focus: isFocused, block }">
157
157
  <input
@@ -160,7 +160,7 @@ function createRequiredTouched(): boolean[] {
160
160
  :value="padValue?.year"
161
161
  :placeholder="padPlaceholder.year"
162
162
  :maxlength="4"
163
- :disabled="disabled"
163
+ :disabled
164
164
  @focus="onFocus"
165
165
  @blur="updateYear"
166
166
  >
@@ -174,7 +174,7 @@ function createRequiredTouched(): boolean[] {
174
174
  :value="padValue?.month"
175
175
  :placeholder="padPlaceholder.month"
176
176
  :maxlength="2"
177
- :disabled="disabled"
177
+ :disabled
178
178
  @focus="onFocus"
179
179
  @blur="updateMonth"
180
180
  >
@@ -188,7 +188,7 @@ function createRequiredTouched(): boolean[] {
188
188
  :value="padValue?.date"
189
189
  :placeholder="padPlaceholder.date"
190
190
  :maxlength="2"
191
- :disabled="disabled"
191
+ :disabled
192
192
  @focus="onFocus"
193
193
  @blur="updateDate"
194
194
  >
@@ -39,10 +39,10 @@ const rel = computed(() => isExternal.value ? 'noopener noreferrer' : null)
39
39
  :is="component"
40
40
  class="SLink"
41
41
  :class="{ link: href }"
42
- :href="href"
42
+ :href
43
43
  :to="href"
44
- :target="target"
45
- :rel="rel"
44
+ :target
45
+ :rel
46
46
  >
47
47
  <slot />
48
48
  </component>
@@ -40,8 +40,8 @@ const normalizedMenu = computed(() => {
40
40
  </div>
41
41
  <div class="title-bar-body">
42
42
  <div class="title-bar-title">
43
- <SLocalNavTitle :title="title" />
44
- <SLocalNavActions v-if="actions?.length" :actions="actions" />
43
+ <SLocalNavTitle :title />
44
+ <SLocalNavActions v-if="actions?.length" :actions />
45
45
  </div>
46
46
  <SLocalNavDescription v-if="description" :text="description" />
47
47
  </div>
@@ -12,7 +12,7 @@ defineProps<{
12
12
  <SAvatar
13
13
  size="fill"
14
14
  :avatar="image"
15
- :name="name"
15
+ :name
16
16
  />
17
17
  </div>
18
18
  </template>
@@ -85,7 +85,7 @@ async function onSubmit() {
85
85
  <SControlButton
86
86
  mode="info"
87
87
  label="Sign in"
88
- :loading="loading"
88
+ :loading
89
89
  @click="onSubmit"
90
90
  />
91
91
  </SControlRight>
@@ -35,7 +35,7 @@ const { stop } = useIntersectionObserver(target, ([{ isIntersecting }]) => {
35
35
 
36
36
  <template>
37
37
  <component :is="as" class="SM" :class="{ on }" ref="target">
38
- <slot :on="on" />
38
+ <slot :on />
39
39
  </component>
40
40
  </template>
41
41
 
@@ -9,6 +9,6 @@ withDefaults(defineProps<Props>(), {
9
9
 
10
10
  <template>
11
11
  <SM class="SMFade" v-bind="$props" v-slot="{ on }">
12
- <slot :on="on" />
12
+ <slot :on />
13
13
  </SM>
14
14
  </template>
@@ -11,16 +11,18 @@ export type Align = 'left' | 'center' | 'right'
11
11
 
12
12
  const props = withDefaults(defineProps<{
13
13
  size?: Size
14
+ disabled?: boolean
14
15
  align?: Align
15
16
  total: number
16
17
  page: number
17
18
  perPage: number
18
19
  }>(), {
19
20
  size: 'medium',
21
+ disabled: false,
20
22
  align: 'center'
21
23
  })
22
24
 
23
- const emit = defineEmits<{
25
+ defineEmits<{
24
26
  prev: []
25
27
  next: []
26
28
  }>()
@@ -47,14 +49,6 @@ const hasPrev = computed(() => {
47
49
  const hasNext = computed(() => {
48
50
  return to.value < props.total
49
51
  })
50
-
51
- function prev() {
52
- hasPrev.value && emit('prev')
53
- }
54
-
55
- function next() {
56
- hasNext.value && emit('next')
57
- }
58
52
  </script>
59
53
 
60
54
  <template>
@@ -63,11 +57,11 @@ function next() {
63
57
  <SButton
64
58
  type="outline"
65
59
  mode="mute"
66
- :size="size"
60
+ :size
67
61
  :lead-icon="IconCaretLeft"
68
62
  :label="t.prev"
69
- :disabled="!hasPrev"
70
- @click="prev"
63
+ :disabled="disabled || !hasPrev"
64
+ @click="$emit('prev')"
71
65
  />
72
66
  </div>
73
67
  <div class="text">
@@ -77,11 +71,11 @@ function next() {
77
71
  <SButton
78
72
  type="outline"
79
73
  mode="mute"
80
- :size="size"
74
+ :size
81
75
  :trail-icon="IconCaretRight"
82
76
  :label="t.next"
83
- :disabled="!hasNext"
84
- @click="next"
77
+ :disabled="disabled || !hasNext"
78
+ @click="$emit('next')"
85
79
  />
86
80
  </div>
87
81
  </div>
@@ -401,7 +401,7 @@ function getStyles(key: string) {
401
401
  <div class="row" ref="row">
402
402
  <STableItem
403
403
  v-for="key in ordersToShow"
404
- :key="key"
404
+ :key
405
405
  :name="key"
406
406
  :class-name="unref(options.columns)[key]?.className"
407
407
  :style="getStyles(key)"
@@ -460,7 +460,7 @@ function getStyles(key: string) {
460
460
  >
461
461
  <STableItem
462
462
  v-for="key in ordersToShow"
463
- :key="key"
463
+ :key
464
464
  :name="key"
465
465
  :class-name="unref(options.columns)[key]?.className"
466
466
  :style="getStyles(key)"
@@ -35,8 +35,8 @@ const computedCell = computed<TableCell | undefined>(() =>
35
35
  <div class="STableCell" :class="[className, `col-${name}`]">
36
36
  <STableCellText
37
37
  v-if="!computedCell || computedCell.type === 'text'"
38
- :value="value"
39
- :record="record"
38
+ :value
39
+ :record
40
40
  :align="computedCell?.align"
41
41
  :icon="computedCell?.icon"
42
42
  :text="computedCell?.value"
@@ -47,8 +47,8 @@ const computedCell = computed<TableCell | undefined>(() =>
47
47
  />
48
48
  <STableCellNumber
49
49
  v-else-if="computedCell.type === 'number'"
50
- :value="value"
51
- :record="record"
50
+ :value
51
+ :record
52
52
  :align="computedCell.align"
53
53
  :icon="computedCell.icon"
54
54
  :number="computedCell.value"
@@ -90,8 +90,8 @@ const computedCell = computed<TableCell | undefined>(() =>
90
90
  />
91
91
  <STableCellAvatar
92
92
  v-else-if="computedCell.type === 'avatar'"
93
- :value="value"
94
- :record="record"
93
+ :value
94
+ :record
95
95
  :image="computedCell.image"
96
96
  :name="computedCell.name"
97
97
  :link="computedCell.link"
@@ -108,7 +108,7 @@ const computedCell = computed<TableCell | undefined>(() =>
108
108
  />
109
109
  <STableCellActions
110
110
  v-else-if="computedCell.type === 'actions'"
111
- :record="record"
111
+ :record
112
112
  :actions="computedCell.actions"
113
113
  />
114
114
  <STableCellCustom
@@ -122,8 +122,8 @@ const computedCell = computed<TableCell | undefined>(() =>
122
122
  <component
123
123
  v-else-if="computedCell.type === 'component'"
124
124
  :is="computedCell.component"
125
- :value="value"
126
- :record="record"
125
+ :value
126
+ :record
127
127
  v-bind="computedCell.props"
128
128
  />
129
129
  </div>
@@ -22,7 +22,7 @@ defineProps<{
22
22
  @click="() => onClick?.(value, record)"
23
23
  >
24
24
  <div v-if="image || name" class="avatar">
25
- <SAvatar size="mini" :avatar="image" :name="name" />
25
+ <SAvatar size="mini" :avatar="image" :name />
26
26
  </div>
27
27
  <span v-if="name" class="name">
28
28
  {{ name }}
@@ -50,7 +50,7 @@ const displayNames = computed(() => {
50
50
  <div v-if="displayAvatars.length" class="avatars">
51
51
  <div v-for="(avatar, index) in displayAvatars" :key="index" class="avatar">
52
52
  <div class="avatar-box">
53
- <SAvatar size="mini" :avatar="avatar.image" :name="avatar.name" :tooltip="tooltip" />
53
+ <SAvatar size="mini" :avatar="avatar.image" :name="avatar.name" :tooltip />
54
54
  </div>
55
55
  </div>
56
56
  <div v-if="avatarDiff > 0" class="avatar">
@@ -9,7 +9,7 @@ defineProps<{
9
9
 
10
10
  <template>
11
11
  <div class="STableCellIndicator" :class="[state]">
12
- <SIndicator size="nano" :state="state" />
12
+ <SIndicator size="nano" :state />
13
13
  <div v-if="label" class="text">{{ label }}</div>
14
14
  </div>
15
15
  </template>
@@ -12,7 +12,7 @@ defineProps<{
12
12
  <SState
13
13
  v-if="state"
14
14
  size="mini"
15
- :mode="mode"
15
+ :mode
16
16
  :label="state"
17
17
  />
18
18
  </div>
@@ -32,7 +32,7 @@ const stats = computed(() => {
32
32
  </div>
33
33
  </div>
34
34
  <div v-if="menu && menu.length" class="menu">
35
- <STableHeaderMenu :menu="menu" />
35
+ <STableHeaderMenu :menu />
36
36
  </div>
37
37
  </div>
38
38
  </div>
@@ -13,9 +13,9 @@ withDefaults(defineProps<TableHeaderAction>(), {
13
13
  <div v-if="show" class="STableHeaderActionItem">
14
14
  <SButton
15
15
  size="mini"
16
- :mode="mode"
17
- :label="label"
18
- :label-mode="labelMode"
16
+ :mode
17
+ :label
18
+ :label-mode
19
19
  @click="onClick"
20
20
  />
21
21
  </div>
@@ -97,7 +97,7 @@ onBeforeUnmount(() => {
97
97
  </script>
98
98
 
99
99
  <template>
100
- <component ref="root" :is="tag" class="STooltip" :class="rootClasses" :tabindex="tabindex">
100
+ <component ref="root" :is="tag" class="STooltip" :class="rootClasses" :tabindex>
101
101
  <component :is="triggerTag" class="trigger" ref="trigger">
102
102
  <slot />
103
103
  </component>
@@ -132,3 +132,7 @@ export function isHms(value: unknown, required: HmsType[] = ['h', 'm', 's']): va
132
132
  }, [])
133
133
  .every((key) => value[key] === null || isString(value[key]))
134
134
  }
135
+
136
+ export function isDay(value: unknown): value is Day {
137
+ return dayjs.isDayjs(value)
138
+ }
@@ -0,0 +1,16 @@
1
+ import { type Day } from '../../support/Day'
2
+ import { createRule } from '../Rule'
3
+ import { after as baseAfter } from '../validators/after'
4
+
5
+ export const message = {
6
+ en: (date: string) => `Date must be after ${date}.`,
7
+ ja: (date: string) => `${date}より後の日付を指定してください。`
8
+ }
9
+
10
+ export function after(date: Day, msg?: string) {
11
+ return createRule({
12
+ message: ({ lang }) => msg ?? message[lang](date.format('YYYY-MM-DD')),
13
+ optional: true,
14
+ validation: (value) => baseAfter(value, date)
15
+ })
16
+ }
@@ -0,0 +1,16 @@
1
+ import { type Day } from '../../support/Day'
2
+ import { createRule } from '../Rule'
3
+ import { afterOrEqual as baseAfterOrEqual } from '../validators/afterOrEqual'
4
+
5
+ export const message = {
6
+ en: (date: string) => `Date must be after or equal to ${date}.`,
7
+ ja: (date: string) => `${date}より後、または同じ日付を指定してください。`
8
+ }
9
+
10
+ export function afterOrEqual(date: Day, msg?: string) {
11
+ return createRule({
12
+ message: ({ lang }) => msg ?? message[lang](date.format('YYYY-MM-DD')),
13
+ optional: true,
14
+ validation: (value) => baseAfterOrEqual(value, date)
15
+ })
16
+ }
@@ -0,0 +1,16 @@
1
+ import { type Day } from '../../support/Day'
2
+ import { createRule } from '../Rule'
3
+ import { before as baseBefore } from '../validators/before'
4
+
5
+ export const message = {
6
+ en: (date: string) => `Date must be before ${date}.`,
7
+ ja: (date: string) => `${date}より前の日付を指定してください。`
8
+ }
9
+
10
+ export function before(date: Day, msg?: string) {
11
+ return createRule({
12
+ message: ({ lang }) => msg ?? message[lang](date.format('YYYY-MM-DD')),
13
+ optional: true,
14
+ validation: (value) => baseBefore(value, date)
15
+ })
16
+ }
@@ -0,0 +1,16 @@
1
+ import { type Day } from '../../support/Day'
2
+ import { createRule } from '../Rule'
3
+ import { beforeOrEqual as baseBeforeOrEqual } from '../validators/beforeOrEqual'
4
+
5
+ export const message = {
6
+ en: (date: string) => `Date must be before or equal to ${date}.`,
7
+ ja: (date: string) => `${date}より前、または同じ日付を指定してください。`
8
+ }
9
+
10
+ export function beforeOrEqual(date: Day, msg?: string) {
11
+ return createRule({
12
+ message: ({ lang }) => msg ?? message[lang](date.format('YYYY-MM-DD')),
13
+ optional: true,
14
+ validation: (value) => baseBeforeOrEqual(value, date)
15
+ })
16
+ }
@@ -1,4 +1,8 @@
1
1
  export { and, not, or } from '@vuelidate/validators'
2
+ export { after } from './after'
3
+ export { afterOrEqual } from './afterOrEqual'
4
+ export { before } from './before'
5
+ export { beforeOrEqual } from './beforeOrEqual'
2
6
  export { checked } from './checked'
3
7
  export { decimal } from './decimal'
4
8
  export { decimalOrHyphen } from './decimalOrHyphen'
@@ -0,0 +1,9 @@
1
+ import { type Day, isDay } from '../../support/Day'
2
+
3
+ export function after(value: unknown, date: Day): boolean {
4
+ if (!isDay(value) || !isDay(date)) {
5
+ return false
6
+ }
7
+
8
+ return value.isAfter(date)
9
+ }
@@ -0,0 +1,9 @@
1
+ import { type Day, isDay } from '../../support/Day'
2
+
3
+ export function afterOrEqual(value: unknown, date: Day): boolean {
4
+ if (!isDay(value) || !isDay(date)) {
5
+ return false
6
+ }
7
+
8
+ return value.isAfter(date) || value.isSame(date)
9
+ }