@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
@@ -25,9 +25,9 @@ const _tooltip = computed<Tooltip | undefined>(() => {
25
25
  size="small"
26
26
  type="text"
27
27
  :icon="leadIcon"
28
- :label="label"
28
+ :label
29
29
  :href="link"
30
- :disabled="disabled"
30
+ :disabled
31
31
  :tooltip="_tooltip"
32
32
  @click="onClick"
33
33
  />
@@ -43,21 +43,21 @@ async function onOpen() {
43
43
  <div class="SActionMenu" :class="[block]" ref="container">
44
44
  <div class="button">
45
45
  <SButton
46
- :tag="tag"
47
- :size="size"
48
- :type="type"
49
- :mode="mode"
50
- :icon="icon"
51
- :lead-icon="leadIcon"
52
- :trail-icon="trailIcon"
53
- :icon-mode="iconMode"
54
- :label="label"
55
- :label-mode="labelMode"
56
- :rounded="rounded"
57
- :block="block"
58
- :loading="loading"
59
- :disabled="disabled"
60
- :tooltip="tooltip"
46
+ :tag
47
+ :size
48
+ :type
49
+ :mode
50
+ :icon
51
+ :lead-icon
52
+ :trail-icon
53
+ :icon-mode
54
+ :label
55
+ :label-mode
56
+ :rounded
57
+ :block
58
+ :loading
59
+ :disabled
60
+ :tooltip
61
61
  @click="onOpen"
62
62
  />
63
63
  </div>
@@ -29,10 +29,10 @@ const count = computed(() => {
29
29
  <SAvatar
30
30
  v-for="(avatar, index) in avatars"
31
31
  :key="index"
32
- :size="size"
32
+ :size
33
33
  :avatar="avatar.image"
34
34
  :name="avatar.name"
35
- :tooltip="tooltip"
35
+ :tooltip
36
36
  />
37
37
  <div v-if="count" class="more">+{{ count }}</div>
38
38
  </div>
@@ -108,7 +108,7 @@ function handleClick(): void {
108
108
  :is="computedTag"
109
109
  class="SButton"
110
110
  :class="classes"
111
- :href="href"
111
+ :href
112
112
  role="button"
113
113
  @click="handleClick"
114
114
  >
@@ -24,12 +24,12 @@ const size = useControlSize()
24
24
  :tag="as"
25
25
  type="text"
26
26
  mode="mute"
27
- :size="size"
28
- :icon="icon"
29
- :href="href"
27
+ :size
28
+ :icon
29
+ :href
30
30
  block
31
- :disabled="disabled"
32
- :tooltip="tooltip"
31
+ :disabled
32
+ :tooltip
33
33
  @click="$emit('click')"
34
34
  />
35
35
  </div>
@@ -14,7 +14,7 @@ defineEmits<{
14
14
  <template>
15
15
  <div class="SControlActionBarClose">
16
16
  <SControlActionBarButton
17
- :as="as"
17
+ :as
18
18
  :icon="IconX"
19
19
  @click="$emit('click')"
20
20
  />
@@ -30,8 +30,8 @@ const icon = computed(() => {
30
30
  <template>
31
31
  <div class="SControlActionBarCollapse" ref="el">
32
32
  <SControlActionBarButton
33
- :as="as"
34
- :icon="icon"
33
+ :as
34
+ :icon
35
35
  @click="toggleCollapse"
36
36
  />
37
37
  </div>
@@ -27,22 +27,22 @@ const size = useControlSize()
27
27
  <template>
28
28
  <div class="SControlActionMenu">
29
29
  <SActionMenu
30
- :tag="tag"
31
- :size="size"
32
- :type="type"
33
- :mode="mode"
34
- :icon="icon"
35
- :lead-icon="leadIcon"
36
- :trail-icon="trailIcon"
37
- :icon-mode="iconMode"
38
- :label="label"
39
- :label-mode="labelMode"
40
- :href="href"
41
- :tooltip="tooltip"
42
- :options="options"
30
+ :tag
31
+ :size
32
+ :type
33
+ :mode
34
+ :icon
35
+ :lead-icon
36
+ :trail-icon
37
+ :icon-mode
38
+ :label
39
+ :label-mode
40
+ :href
41
+ :tooltip
42
+ :options
43
43
  block
44
- :loading="loading"
45
- :disabled="disabled"
44
+ :loading
45
+ :disabled
46
46
  />
47
47
  </div>
48
48
  </template>
@@ -29,21 +29,21 @@ const size = useControlSize()
29
29
  <template>
30
30
  <div class="SControlButton">
31
31
  <SButton
32
- :tag="tag"
33
- :size="size"
34
- :type="type"
35
- :mode="mode"
36
- :icon="icon"
37
- :lead-icon="leadIcon"
38
- :trail-icon="trailIcon"
39
- :icon-mode="iconMode"
40
- :label="label"
41
- :label-mode="labelMode"
42
- :href="href"
43
- :tooltip="tooltip"
32
+ :tag
33
+ :size
34
+ :type
35
+ :mode
36
+ :icon
37
+ :lead-icon
38
+ :trail-icon
39
+ :icon-mode
40
+ :label
41
+ :label-mode
42
+ :href
43
+ :tooltip
44
44
  block
45
- :loading="loading"
46
- :disabled="disabled"
45
+ :loading
46
+ :disabled
47
47
  @click="$emit('click')"
48
48
  />
49
49
  </div>
@@ -50,7 +50,7 @@ const _value = computed(() => {
50
50
  :placeholder="placeholder ?? t.placeholder"
51
51
  :unit-before="IconMagnifyingGlass"
52
52
  :model-value="_value"
53
- :validation="validation"
53
+ :validation
54
54
  hide-error
55
55
  @update:model-value="$emit('update:model-value', $event)"
56
56
  @input="$emit('input', $event)"
@@ -4,6 +4,7 @@ import SPagination, { type Size } from './SPagination.vue'
4
4
 
5
5
  defineProps<{
6
6
  size?: Size
7
+ disabled?: boolean
7
8
  total: number
8
9
  page: number
9
10
  perPage: number
@@ -21,11 +22,12 @@ const position = useControlPosition()
21
22
  <template>
22
23
  <div class="SControlPagination">
23
24
  <SPagination
24
- :size="size"
25
+ :size
26
+ :disabled
25
27
  :align="position"
26
- :total="total"
27
- :page="page"
28
- :per-page="perPage"
28
+ :total
29
+ :page
30
+ :per-page
29
31
  @prev="$emit('prev')"
30
32
  @next="$emit('next')"
31
33
  />
@@ -20,8 +20,8 @@ provide('sefirot-desc-label-width', () => props.labelWidth)
20
20
  <SGrid
21
21
  class="SDesc"
22
22
  :class="[dir, { divider }]"
23
- :cols="cols"
24
- :gap="gap"
23
+ :cols
24
+ :gap
25
25
  >
26
26
  <slot />
27
27
  </SGrid>
@@ -17,7 +17,7 @@ const labelWidth = computed(() => {
17
17
  </script>
18
18
 
19
19
  <template>
20
- <SGridItem class="SDescItem" :span="span">
20
+ <SGridItem class="SDescItem" :span>
21
21
  <slot />
22
22
  </SGridItem>
23
23
  </template>
@@ -11,7 +11,7 @@ defineProps<{
11
11
  <div class="SDropdown">
12
12
  <div class="container">
13
13
  <div v-for="(section, index) in sections" :key="index" class="section">
14
- <SDropdownSection :section="section" />
14
+ <SDropdownSection :section />
15
15
  </div>
16
16
  </div>
17
17
  </div>
@@ -92,7 +92,7 @@ function handleClick(option: DropdownSectionFilterOption, value: any) {
92
92
  <span class="radio-dot" />
93
93
  </span>
94
94
  <span class="option-item">
95
- <SDropdownSectionFilterItem :option="option" />
95
+ <SDropdownSectionFilterItem :option />
96
96
  </span>
97
97
  </button>
98
98
  </li>
@@ -28,6 +28,6 @@ async function clearError(options: { redirect?: string } = {}) {
28
28
  </script>
29
29
 
30
30
  <template>
31
- <slot v-if="error != null" name="error" :error="error" :clear-error="clearError" />
31
+ <slot v-if="error != null" name="error" :error :clear-error />
32
32
  <slot v-else />
33
33
  </template>
@@ -5,7 +5,7 @@ defineOptions({ inheritAttrs: false })
5
5
  </script>
6
6
 
7
7
  <template>
8
- <component v-if="is" :is="is" v-bind="$attrs">
8
+ <component v-if="is" :is v-bind="$attrs">
9
9
  <template v-for="(_, slot) of $slots" #[slot]="scope">
10
10
  <slot :name="slot" v-bind="scope" />
11
11
  </template>
@@ -60,14 +60,14 @@ function onClick() {
60
60
  <SInputBase
61
61
  class="SInputCheckbox"
62
62
  :class="classes"
63
- :label="label"
64
- :note="note"
65
- :info="info"
66
- :help="help"
67
- :check-icon="checkIcon"
68
- :check-text="checkText"
69
- :check-color="checkColor"
70
- :validation="validation"
63
+ :label
64
+ :note
65
+ :info
66
+ :help
67
+ :check-icon
68
+ :check-text
69
+ :check-color
70
+ :validation
71
71
  >
72
72
  <div class="container">
73
73
  <div
@@ -69,14 +69,14 @@ function handleChange(value: Value): void {
69
69
  <SInputBase
70
70
  class="SInputCheckboxes"
71
71
  :class="[size ?? 'small']"
72
- :name="name"
73
- :label="label"
74
- :note="note"
75
- :info="info"
76
- :help="help"
77
- :check-icon="checkIcon"
78
- :check-text="checkText"
79
- :check-color="checkColor"
72
+ :name
73
+ :label
74
+ :note
75
+ :info
76
+ :help
77
+ :check-icon
78
+ :check-text
79
+ :check-color
80
80
  >
81
81
  <div class="container">
82
82
  <div class="row">
@@ -54,16 +54,16 @@ function emitBlur() {
54
54
  <SInputBase
55
55
  class="SInputDate"
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"
66
- :validation="validation"
57
+ :name
58
+ :label
59
+ :note
60
+ :info
61
+ :help
62
+ :check-icon
63
+ :check-text
64
+ :check-color
65
+ :hide-error
66
+ :validation
67
67
  >
68
68
  <div class="container">
69
69
  <DatePicker
@@ -84,7 +84,7 @@ function emitBlur() {
84
84
  placeholder="YYYY-MM-DD"
85
85
  autocomplete="off"
86
86
  :value="inputValue"
87
- :disabled="disabled"
87
+ :disabled
88
88
  v-on="disabled ? {} : inputEvents"
89
89
  @blur="emitBlur"
90
90
  >
@@ -143,14 +143,14 @@ function handleArray(value: OptionValue) {
143
143
  <SInputBase
144
144
  class="SInputDropdown"
145
145
  :class="classes"
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
- :validation="validation"
146
+ :label
147
+ :note
148
+ :info
149
+ :help
150
+ :check-icon
151
+ :check-text
152
+ :check-color
153
+ :validation
154
154
  >
155
155
  <div class="container" ref="container">
156
156
  <div
@@ -167,7 +167,7 @@ function handleArray(value: OptionValue) {
167
167
  v-if="hasSelected"
168
168
  :item="selected!"
169
169
  :size="size ?? 'small'"
170
- :removable="removable"
170
+ :removable
171
171
  :disabled="disabled ?? false"
172
172
  @remove="handleSelect"
173
173
  />
@@ -65,22 +65,22 @@ function onChange(e: Event) {
65
65
  <SInputBase
66
66
  class="SInputFile"
67
67
  :class="classes"
68
- :label="label"
69
- :note="note"
70
- :info="info"
71
- :help="help"
72
- :check-icon="checkIcon"
73
- :check-text="checkText"
74
- :check-color="checkColor"
75
- :validation="validation"
76
- :hide-error="hideError"
68
+ :label
69
+ :note
70
+ :info
71
+ :help
72
+ :check-icon
73
+ :check-text
74
+ :check-color
75
+ :validation
76
+ :hide-error
77
77
  >
78
78
  <input
79
79
  ref="input"
80
80
  class="input"
81
81
  type="file"
82
- :accept="accept"
83
- :multiple="multiple"
82
+ :accept
83
+ :multiple
84
84
  @change="onChange"
85
85
  >
86
86
 
@@ -158,22 +158,22 @@ function toFileObjects(files: File[]) {
158
158
  <SInputBase
159
159
  class="SInputFileUpload"
160
160
  :class="classes"
161
- :label="label"
162
- :note="note"
163
- :info="info"
164
- :help="help"
165
- :check-icon="checkIcon"
166
- :check-text="checkText"
167
- :check-color="checkColor"
168
- :validation="validation"
169
- :hide-error="hideError"
161
+ :label
162
+ :note
163
+ :info
164
+ :help
165
+ :check-icon
166
+ :check-text
167
+ :check-color
168
+ :validation
169
+ :hide-error
170
170
  >
171
171
  <template #default="{ hasError }">
172
172
  <input
173
173
  ref="input"
174
174
  class="input"
175
175
  type="file"
176
- :accept="accept"
176
+ :accept
177
177
  multiple
178
178
  @change="onChange"
179
179
  >
@@ -213,8 +213,8 @@ function toFileObjects(files: File[]) {
213
213
  <SInputFileUploadItem
214
214
  v-for="file, i in _value"
215
215
  :key="i"
216
- :file="file"
217
- :rules="rules"
216
+ :file
217
+ :rules
218
218
  @remove="() => { onRemove(i) }"
219
219
  />
220
220
  </template>
@@ -144,15 +144,15 @@ function createRequiredTouched(): boolean[] {
144
144
  <SInputBase
145
145
  class="SInputHMS"
146
146
  :class="[size ?? 'small', { disabled }]"
147
- :label="label"
148
- :note="note"
149
- :info="info"
150
- :help="help"
151
- :check-icon="checkIcon"
152
- :check-text="checkText"
153
- :check-color="checkColor"
154
- :hide-error="hideError"
155
- :validation="validation"
147
+ :label
148
+ :note
149
+ :info
150
+ :help
151
+ :check-icon
152
+ :check-text
153
+ :check-color
154
+ :hide-error
155
+ :validation
156
156
  >
157
157
  <div class="container" :class="{ focus: isFocused }">
158
158
  <input
@@ -161,7 +161,7 @@ function createRequiredTouched(): boolean[] {
161
161
  :value="_value?.hour"
162
162
  :placeholder="padPlaceholder.hour"
163
163
  :maxlength="2"
164
- :disabled="disabled"
164
+ :disabled
165
165
  @focus="onFocus"
166
166
  @blur="updateHour"
167
167
  >
@@ -172,7 +172,7 @@ function createRequiredTouched(): boolean[] {
172
172
  :value="_value?.minute"
173
173
  :placeholder="padPlaceholder.minute"
174
174
  :maxlength="2"
175
- :disabled="disabled"
175
+ :disabled
176
176
  @focus="onFocus"
177
177
  @blur="updateMinute"
178
178
  >
@@ -183,7 +183,7 @@ function createRequiredTouched(): boolean[] {
183
183
  :value="_value?.second"
184
184
  :placeholder="padPlaceholder.second"
185
185
  :maxlength="2"
186
- :disabled="disabled"
186
+ :disabled
187
187
  @focus="onFocus"
188
188
  @blur="updateSecond"
189
189
  >
@@ -81,21 +81,21 @@ function onFileDelete() {
81
81
  <SInputBase
82
82
  class="SInputImage"
83
83
  :class="[size]"
84
- :label="label"
85
- :note="note"
86
- :info="info"
87
- :check-icon="checkIcon"
88
- :check-text="checkText"
89
- :check-color="checkColor"
90
- :hide-error="hideError"
91
- :validation="validation"
84
+ :label
85
+ :note
86
+ :info
87
+ :check-icon
88
+ :check-text
89
+ :check-color
90
+ :hide-error
91
+ :validation
92
92
  >
93
93
  <template #default>
94
94
  <input
95
95
  ref="fileInput"
96
96
  class="file-input"
97
97
  type="file"
98
- :accept="accept"
98
+ :accept
99
99
  @change="onFileSelect"
100
100
  >
101
101
 
@@ -115,7 +115,7 @@ function onFileDelete() {
115
115
  <SButton
116
116
  size="small"
117
117
  :label="selectText"
118
- :disabled="disabled"
118
+ :disabled
119
119
  @click="openFileSelect"
120
120
  />
121
121
  <SButton
@@ -123,7 +123,7 @@ function onFileDelete() {
123
123
  size="small"
124
124
  mode="danger"
125
125
  :label="removeText"
126
- :disabled="disabled"
126
+ :disabled
127
127
  @click="onFileDelete"
128
128
  />
129
129
  </div>
@@ -75,28 +75,28 @@ function emitUpdate(value: string | null) {
75
75
  <template>
76
76
  <SInputText
77
77
  class="SInputNumber"
78
- :size="size"
79
- :name="name"
78
+ :size
79
+ :name
80
80
  type="number"
81
- :label="label"
82
- :note="note"
83
- :info="info"
84
- :help="help"
85
- :placeholder="placeholder"
86
- :unit-before="unitBefore"
87
- :unit-after="unitAfter"
88
- :check-icon="checkIcon"
89
- :check-text="checkText"
90
- :check-color="checkColor"
81
+ :label
82
+ :note
83
+ :info
84
+ :help
85
+ :placeholder
86
+ :unit-before
87
+ :unit-after
88
+ :check-icon
89
+ :check-text
90
+ :check-color
91
91
  :text-color="_textColor"
92
- :align="align"
93
- :disabled="disabled"
94
- :display-value="displayValue"
92
+ :align
93
+ :disabled
94
+ :display-value
95
95
  :model-value="_value == null ? null : String(_value)"
96
- :validation="validation"
97
- :warning="warning"
98
- :hide-error="hideError"
99
- :hide-warning="hideWarning"
96
+ :validation
97
+ :warning
98
+ :hide-error
99
+ :hide-warning
100
100
  @update:model-value="emitUpdate"
101
101
  @input="emitUpdate"
102
102
  >
@@ -45,15 +45,15 @@ function onClick() {
45
45
  <SInputBase
46
46
  class="SInputRadio"
47
47
  :class="classes"
48
- :label="label"
49
- :note="note"
50
- :info="info"
51
- :help="help"
52
- :check-icon="checkIcon"
53
- :check-text="checkText"
54
- :check-color="checkColor"
55
- :validation="validation"
56
- :hide-error="hideError"
48
+ :label
49
+ :note
50
+ :info
51
+ :help
52
+ :check-icon
53
+ :check-text
54
+ :check-color
55
+ :validation
56
+ :hide-error
57
57
  >
58
58
  <div class="container">
59
59
  <div