@globalbrain/sefirot 2.32.0 → 2.34.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 (60) hide show
  1. package/lib/components/SButton.vue +52 -21
  2. package/lib/components/SDropdown.vue +1 -1
  3. package/lib/components/SDropdownSection.vue +1 -1
  4. package/lib/components/SDropdownSectionActions.vue +1 -1
  5. package/lib/components/SDropdownSectionComponent.vue +1 -1
  6. package/lib/components/SDropdownSectionFilter.vue +2 -2
  7. package/lib/components/SDropdownSectionFilterItem.vue +1 -1
  8. package/lib/components/SDropdownSectionMenu.vue +1 -1
  9. package/lib/components/SFragment.vue +16 -0
  10. package/lib/components/SIcon.vue +1 -1
  11. package/lib/components/SInputAddon.vue +1 -1
  12. package/lib/components/SInputBase.vue +3 -3
  13. package/lib/components/SInputCheckbox.vue +2 -2
  14. package/lib/components/SInputCheckboxes.vue +2 -2
  15. package/lib/components/SInputDate.vue +2 -2
  16. package/lib/components/SInputDropdown.vue +4 -4
  17. package/lib/components/SInputFile.vue +3 -3
  18. package/lib/components/SInputHMS.vue +9 -9
  19. package/lib/components/SInputNumber.vue +3 -3
  20. package/lib/components/SInputRadio.vue +3 -3
  21. package/lib/components/SInputRadios.vue +3 -3
  22. package/lib/components/SInputSelect.vue +3 -3
  23. package/lib/components/SInputSwitch.vue +3 -3
  24. package/lib/components/SInputSwitches.vue +3 -3
  25. package/lib/components/SInputText.vue +3 -3
  26. package/lib/components/SInputTextarea.vue +2 -2
  27. package/lib/components/SInputYMD.vue +9 -9
  28. package/lib/components/SMarkdown.vue +1 -1
  29. package/lib/components/SSheetFooterAction.vue +1 -1
  30. package/lib/components/SSnackbar.vue +1 -1
  31. package/lib/components/SStep.vue +2 -2
  32. package/lib/components/SSteps.vue +2 -2
  33. package/lib/components/STable.vue +50 -18
  34. package/lib/components/STableCell.vue +1 -1
  35. package/lib/components/STableCellAvatars.vue +1 -1
  36. package/lib/components/STableCellDay.vue +1 -1
  37. package/lib/components/STableCellPills.vue +1 -1
  38. package/lib/components/STableColumn.vue +1 -1
  39. package/lib/components/STooltip.vue +102 -14
  40. package/lib/composables/Data.ts +1 -1
  41. package/lib/composables/Dropdown.ts +2 -2
  42. package/lib/composables/Flyout.ts +1 -1
  43. package/lib/composables/Grid.ts +11 -11
  44. package/lib/composables/Markdown.ts +2 -2
  45. package/lib/composables/Table.ts +5 -4
  46. package/lib/composables/Tooltip.ts +27 -5
  47. package/lib/composables/Utils.ts +2 -2
  48. package/lib/composables/Validation.ts +5 -5
  49. package/lib/mixins/Sheet.ts +1 -1
  50. package/lib/styles/variables.css +49 -49
  51. package/lib/support/Day.ts +1 -1
  52. package/lib/validation/rules/hms.ts +1 -1
  53. package/lib/validation/rules/requiredHms.ts +1 -1
  54. package/lib/validation/rules/requiredYmd.ts +1 -1
  55. package/lib/validation/rules/ymd.ts +1 -1
  56. package/lib/validation/validators/hms.ts +1 -1
  57. package/lib/validation/validators/requiredHms.ts +1 -1
  58. package/lib/validation/validators/requiredYmd.ts +1 -1
  59. package/lib/validation/validators/ymd.ts +1 -1
  60. package/package.json +5 -5
@@ -1,8 +1,12 @@
1
1
  <script setup lang="ts">
2
- import { computed } from 'vue'
2
+ import { type MaybeRef } from '@vueuse/core'
3
+ import { computed, unref, useSlots } from 'vue'
4
+ import { type Position } from '../composables/Tooltip'
5
+ import SFragment from './SFragment.vue'
3
6
  import SIcon from './SIcon.vue'
4
7
  import SLink from './SLink.vue'
5
8
  import SSpinner from './SSpinner.vue'
9
+ import STooltip from './STooltip.vue'
6
10
 
7
11
  export type Size = 'mini' | 'small' | 'medium' | 'large' | 'jumbo'
8
12
 
@@ -18,6 +22,14 @@ export type Mode =
18
22
  | 'warning'
19
23
  | 'danger'
20
24
 
25
+ export interface Tooltip {
26
+ tag?: string
27
+ text?: MaybeRef<string>
28
+ position?: Position
29
+ trigger?: 'hover' | 'focus' | 'both'
30
+ timeout?: number
31
+ }
32
+
21
33
  const props = defineProps<{
22
34
  tag?: string
23
35
  size?: Size
@@ -32,6 +44,7 @@ const props = defineProps<{
32
44
  block?: boolean
33
45
  loading?: boolean
34
46
  disabled?: boolean
47
+ tooltip?: Tooltip
35
48
  }>()
36
49
 
37
50
  const emit = defineEmits<{
@@ -57,6 +70,12 @@ const computedTag = computed(() => {
57
70
  : props.href ? SLink : 'button'
58
71
  })
59
72
 
73
+ const slots = useSlots()
74
+
75
+ const hasTooltip = computed(() => {
76
+ return slots['tooltip-text'] || unref(props.tooltip?.text)
77
+ })
78
+
60
79
  function handleClick(): void {
61
80
  if (!props.loading) {
62
81
  props.disabled ? emit('disabled-click') : emit('click')
@@ -65,29 +84,41 @@ function handleClick(): void {
65
84
  </script>
66
85
 
67
86
  <template>
68
- <Component
69
- :is="computedTag"
70
- class="SButton"
71
- :class="classes"
72
- :href="href"
73
- role="button"
74
- @click="handleClick"
87
+ <SFragment
88
+ :is="hasTooltip && STooltip"
89
+ :tag="tooltip?.tag"
90
+ :text="unref(tooltip?.text)"
91
+ :position="tooltip?.position"
92
+ display="inline-block"
93
+ :trigger="tooltip?.trigger ?? 'both'"
94
+ :timeout="tooltip?.timeout"
95
+ :tabindex="-1"
75
96
  >
76
- <span class="content">
77
- <span v-if="icon" class="icon" :class="iconMode">
78
- <SIcon :icon="icon" class="icon-svg" />
97
+ <template v-if="$slots['tooltip-text']" #text><slot name="tooltip-text" /></template>
98
+ <component
99
+ :is="computedTag"
100
+ class="SButton"
101
+ :class="classes"
102
+ :href="href"
103
+ role="button"
104
+ @click="handleClick"
105
+ >
106
+ <span class="content">
107
+ <span v-if="icon" class="icon" :class="iconMode">
108
+ <SIcon :icon="icon" class="icon-svg" />
109
+ </span>
110
+ <span v-if="label" class="label" :class="labelMode">
111
+ {{ label }}
112
+ </span>
79
113
  </span>
80
- <span v-if="label" class="label" :class="labelMode">
81
- {{ label }}
82
- </span>
83
- </span>
84
114
 
85
- <Transition name="fade">
86
- <span v-if="loading" key="loading" class="loader">
87
- <SSpinner class="loader-icon" />
88
- </span>
89
- </Transition>
90
- </Component>
115
+ <transition name="fade">
116
+ <span v-if="loading" key="loading" class="loader">
117
+ <SSpinner class="loader-icon" />
118
+ </span>
119
+ </transition>
120
+ </component>
121
+ </SFragment>
91
122
  </template>
92
123
 
93
124
  <style scoped lang="postcss">
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownSection } from '../composables/Dropdown'
2
+ import { type DropdownSection } from '../composables/Dropdown'
3
3
  import SDropdownSection from './SDropdownSection.vue'
4
4
 
5
5
  defineProps<{
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { 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,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownSectionActionsOption } from '../composables/Dropdown'
2
+ import { type DropdownSectionActionsOption } from '../composables/Dropdown'
3
3
 
4
4
  defineProps<{
5
5
  options: DropdownSectionActionsOption[]
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { DefineComponent } from 'vue'
2
+ import { type DefineComponent } from 'vue'
3
3
 
4
4
  defineProps<{
5
5
  comp: DefineComponent
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import IconCheck from '@iconify-icons/ph/check'
3
- import type { 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 type { DropdownSectionFilterOption, DropdownSectionFilterSelectedValue } from '../composables/Dropdown'
6
+ import { type DropdownSectionFilterOption, type 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'
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { 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
 
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownSectionMenuOption } from '../composables/Dropdown'
2
+ import { type DropdownSectionMenuOption } from '../composables/Dropdown'
3
3
 
4
4
  defineProps<{
5
5
  options: DropdownSectionMenuOption[]
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ export default { inheritAttrs: false }
3
+ </script>
4
+
5
+ <script setup lang="ts">
6
+ defineProps<{ is?: any }>()
7
+ </script>
8
+
9
+ <template>
10
+ <component v-if="is" :is="is" v-bind="$attrs">
11
+ <template v-for="(_, slot) of $slots" #[slot]="scope">
12
+ <slot :name="slot" v-bind="scope" />
13
+ </template>
14
+ </component>
15
+ <slot v-else />
16
+ </template>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { Icon, IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
3
+ import { type DefineComponent } from 'vue'
4
4
 
5
5
  defineProps<{
6
6
  icon: IconifyIcon | DefineComponent
@@ -1,6 +1,6 @@
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
+ import { type DropdownSection } from 'sefirot/composables/Dropdown'
4
4
  import {
5
5
  getSelectedOption,
6
6
  useManualDropdownPosition
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
3
  import IconQuestion from '@iconify-icons/ph/question'
4
- import type { DefineComponent } from 'vue'
4
+ import { type DefineComponent } from 'vue'
5
5
  import { computed, unref, useSlots } from 'vue'
6
- import type { Validatable } from '../composables/Validation'
6
+ import { type Validatable } from '../composables/Validation'
7
7
  import SIcon from './SIcon.vue'
8
8
  import STooltip from './STooltip.vue'
9
9
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
3
  import IconCheck from '@iconify-icons/ph/check-bold'
4
4
  import { computed } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import SIcon from './SIcon.vue'
7
7
  import SInputBase from './SInputBase.vue'
8
8
 
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
3
  import { computed } from 'vue'
4
- import type { Validatable } from '../composables/Validation'
4
+ import { type Validatable } from '../composables/Validation'
5
5
  import SInputBase from './SInputBase.vue'
6
6
  import SInputCheckbox from './SInputCheckbox.vue'
7
7
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
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/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import { type Day, day } from '../support/Day'
7
7
  import SInputBase from './SInputBase.vue'
8
8
 
@@ -1,14 +1,14 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
2
+ 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 xor from 'lodash-es/xor'
6
- import type { DefineComponent } from 'vue'
6
+ import { type DefineComponent } from 'vue'
7
7
  import { computed, ref } from 'vue'
8
- import type { DropdownSectionFilter } from '../composables/Dropdown'
8
+ import { type DropdownSectionFilter } from '../composables/Dropdown'
9
9
  import { useManualDropdownPosition } from '../composables/Dropdown'
10
10
  import { useFlyout } from '../composables/Flyout'
11
- import type { Validatable } from '../composables/Validation'
11
+ import { type Validatable } from '../composables/Validation'
12
12
  import { isArray } from '../support/Utils'
13
13
  import SDropdown from './SDropdown.vue'
14
14
  import SIcon from './SIcon.vue'
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed, ref } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import SInputBase from './SInputBase.vue'
7
7
 
8
8
  export type Size = 'mini' | 'small' | 'medium'
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed, ref } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import SInputBase from './SInputBase.vue'
7
7
 
8
8
  export type Size = 'mini' | 'small' | 'medium'
@@ -15,9 +15,9 @@ export interface Value {
15
15
  }
16
16
 
17
17
  export interface Placeholder {
18
- hour: string
19
- minute: string
20
- second: string
18
+ hour?: string
19
+ minute?: string
20
+ second?: string
21
21
  }
22
22
 
23
23
  export type ValueType = 'hour' | 'minute' | 'second'
@@ -63,9 +63,9 @@ const padValue = computed(() => {
63
63
 
64
64
  const padPlaceholder = computed(() => {
65
65
  return {
66
- hour: props.placeholder?.hour.toString().padStart(2, '0') ?? '00',
67
- minute: props.placeholder?.minute.toString().padStart(2, '0') ?? '00',
68
- second: props.placeholder?.second.toString().padStart(2, '0') ?? '00'
66
+ hour: props.placeholder?.hour?.toString().padStart(2, '0') ?? '00',
67
+ minute: props.placeholder?.minute?.toString().padStart(2, '0') ?? '00',
68
+ second: props.placeholder?.second?.toString().padStart(2, '0') ?? '00'
69
69
  }
70
70
  })
71
71
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import { isNullish, isString } from '../support/Utils'
7
7
  import SInputText from './SInputText.vue'
8
8
 
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
4
- import type { 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,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import SInputBase from './SInputBase.vue'
7
7
  import SInputRadio from './SInputRadio.vue'
8
8
 
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
2
+ 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
- import type { DefineComponent } from 'vue'
5
+ import { type DefineComponent } from 'vue'
6
6
  import { computed, ref } from 'vue'
7
- import type { Validatable } from '../composables/Validation'
7
+ import { type Validatable } from '../composables/Validation'
8
8
  import SIcon from './SIcon.vue'
9
9
  import SInputBase from './SInputBase.vue'
10
10
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import SInputBase from './SInputBase.vue'
7
7
 
8
8
  export type Size = 'mini' | 'small' | 'medium'
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import SInputBase from './SInputBase.vue'
7
7
  import SInputSwitch from './SInputSwitch.vue'
8
8
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed, ref } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import { isString } from '../support/Utils'
7
7
  import SIcon from './SIcon.vue'
8
8
  import SInputBase from './SInputBase.vue'
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
3
  import { computed } from 'vue'
4
- import type { Validatable } from '../composables/Validation'
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,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import type { IconifyIcon } from '@iconify/vue/dist/offline'
3
- import type { DefineComponent } from 'vue'
2
+ import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
+ import { type DefineComponent } from 'vue'
4
4
  import { computed, ref } from 'vue'
5
- import type { Validatable } from '../composables/Validation'
5
+ import { type Validatable } from '../composables/Validation'
6
6
  import SInputBase from './SInputBase.vue'
7
7
 
8
8
  export type Size = 'mini' | 'small' | 'medium'
@@ -17,9 +17,9 @@ export interface Value {
17
17
  export type ValueType = 'year' | 'month' | 'date'
18
18
 
19
19
  export interface Placeholder {
20
- year: number
21
- month: number
22
- date: number
20
+ year?: number
21
+ month?: number
22
+ date?: number
23
23
  }
24
24
 
25
25
  const props = defineProps<{
@@ -64,9 +64,9 @@ const padValue = computed(() => {
64
64
 
65
65
  const padPlaceholder = computed(() => {
66
66
  return {
67
- year: props.placeholder?.year.toString().padStart(4, '0') ?? '1998',
68
- month: props.placeholder?.month.toString().padStart(2, '0') ?? '01',
69
- date: props.placeholder?.date.toString().padStart(2, '0') ?? '14'
67
+ year: props.placeholder?.year?.toString().padStart(4, '0') ?? '1998',
68
+ month: props.placeholder?.month?.toString().padStart(2, '0') ?? '01',
69
+ date: props.placeholder?.date?.toString().padStart(2, '0') ?? '14'
70
70
  }
71
71
  })
72
72
 
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, nextTick, shallowRef, watch } from 'vue'
3
- import type { LinkCallback, LinkSubscriberPayload } from '../composables/Markdown'
3
+ import { type LinkCallback, type LinkSubscriberPayload } from '../composables/Markdown'
4
4
  import { useLink, useMarkdown } from '../composables/Markdown'
5
5
 
6
6
  const props = defineProps<{
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { Mode, Type } from './SButton.vue'
2
+ import { type Mode, type Type } from './SButton.vue'
3
3
  import SButton from './SButton.vue'
4
4
 
5
5
  defineProps<{
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import IconX from '@iconify-icons/ph/x'
3
- import type { SnackbarAction } from '../stores/Snackbars'
3
+ import { type SnackbarAction } from '../stores/Snackbars'
4
4
  import { useSnackbars } from '../stores/Snackbars'
5
5
  import SButton from './SButton.vue'
6
6
  import SIcon from './SIcon.vue'
@@ -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 type { PropType } from 'vue'
5
- import type { BarMode, StepStatus } from '../composables/Step'
4
+ import { type PropType } from 'vue'
5
+ import { type BarMode, type StepStatus } from '../composables/Step'
6
6
  import SIcon from './SIcon.vue'
7
7
 
8
8
  defineProps({
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import type { PropType } from 'vue'
2
+ import { type PropType } from 'vue'
3
3
  import { computed } from 'vue'
4
- import type { BarMode, Step } from '../composables/Step'
4
+ import { type BarMode, type Step } from '../composables/Step'
5
5
  import SStep from './SStep.vue'
6
6
 
7
7
  const props = defineProps({
@@ -10,7 +10,7 @@ import {
10
10
  watch
11
11
  } from 'vue'
12
12
  import { DynamicScroller, DynamicScrollerItem } from 'vue-virtual-scroller'
13
- import type { Table } from '../composables/Table'
13
+ import { type Table } from '../composables/Table'
14
14
  import SSpinner from './SSpinner.vue'
15
15
  import STableCell from './STableCell.vue'
16
16
  import STableColumn from './STableColumn.vue'
@@ -259,19 +259,52 @@ function getCell(key: string, index: number) {
259
259
  @mouseleave="lockBody(false)"
260
260
  @scroll="syncBodyScroll"
261
261
  >
262
- <DynamicScroller
263
- :items="recordsWithSummary"
264
- :min-item-size="40"
265
- key-field="__index"
266
- class="block"
267
- :style="blockWidth ? { width: `${blockWidth}px` } : undefined"
268
- :prerender="Math.min(10, recordsWithSummary.length)"
269
- >
270
- <template #default="{ item: record, index: rIndex, active }">
271
- <DynamicScrollerItem
272
- :item="record"
273
- :active="active"
274
- :data-index="rIndex"
262
+ <template v-if="unref(options.virtualScroll)">
263
+ <DynamicScroller
264
+ :items="recordsWithSummary"
265
+ :min-item-size="40"
266
+ key-field="__index"
267
+ class="block"
268
+ :style="blockWidth ? { width: `${blockWidth}px` } : undefined"
269
+ :prerender="Math.min(10, recordsWithSummary.length)"
270
+ >
271
+ <template #default="{ item: record, index: rIndex, active }">
272
+ <DynamicScrollerItem
273
+ :item="record"
274
+ :active="active"
275
+ :data-index="rIndex"
276
+ >
277
+ <div class="row" :class="isSummaryOrLastClass(rIndex)">
278
+ <STableItem
279
+ v-for="key in unref(options.orders)"
280
+ :key="key"
281
+ :name="key"
282
+ :class-name="unref(options.columns)[key].className"
283
+ :width="colWidths[key]"
284
+ >
285
+ <STableCell
286
+ :name="key"
287
+ :class="isSummary(rIndex) && 'summary'"
288
+ :class-name="unref(options.columns)[key].className"
289
+ :cell="getCell(key, rIndex)"
290
+ :value="record[key]"
291
+ :record="record"
292
+ :records="unref(options.records)!"
293
+ />
294
+ </STableItem>
295
+ </div>
296
+ </DynamicScrollerItem>
297
+ </template>
298
+ </DynamicScroller>
299
+ </template>
300
+ <template v-else>
301
+ <div
302
+ class="block"
303
+ :style="blockWidth ? { width: `${blockWidth}px` } : undefined"
304
+ >
305
+ <div
306
+ v-for="(record, rIndex) in recordsWithSummary"
307
+ :key="record.__index"
275
308
  >
276
309
  <div class="row" :class="isSummaryOrLastClass(rIndex)">
277
310
  <STableItem
@@ -292,9 +325,9 @@ function getCell(key: string, index: number) {
292
325
  />
293
326
  </STableItem>
294
327
  </div>
295
- </DynamicScrollerItem>
296
- </template>
297
- </DynamicScroller>
328
+ </div>
329
+ </div>
330
+ </template>
298
331
  </div>
299
332
  </div>
300
333
 
@@ -378,7 +411,6 @@ function getCell(key: string, index: number) {
378
411
 
379
412
  .block {
380
413
  max-height: var(--table-max-height, 100%);
381
- overflow-y: auto;
382
414
  }
383
415
  }
384
416
 
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import type { 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,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import type { TableCellAvatarsOption } from '../composables/Table'
3
+ import { type TableCellAvatarsOption } from '../composables/Table'
4
4
  import SAvatar from './SAvatar.vue'
5
5
 
6
6
  const props = defineProps<{