@globalbrain/sefirot 3.50.0 → 4.0.0-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 (106) hide show
  1. package/config/nuxt.d.ts +4 -0
  2. package/config/nuxt.js +31 -0
  3. package/config/vite.d.ts +8 -0
  4. package/config/vite.js +69 -0
  5. package/lib/components/SActionList.vue +0 -1
  6. package/lib/components/SActionListItem.vue +3 -11
  7. package/lib/components/SAlert.vue +8 -13
  8. package/lib/components/SButton.vue +9 -10
  9. package/lib/components/SCardBlock.vue +0 -6
  10. package/lib/components/SControlActionBarClose.vue +1 -1
  11. package/lib/components/SControlActionBarCollapse.vue +2 -2
  12. package/lib/components/SControlInputSearch.vue +2 -2
  13. package/lib/components/SDescAvatar.vue +1 -2
  14. package/lib/components/SDescFile.vue +4 -6
  15. package/lib/components/SDescPill.vue +1 -2
  16. package/lib/components/SDescText.vue +1 -1
  17. package/lib/components/SDropdownSectionDateRange.vue +2 -2
  18. package/lib/components/SDropdownSectionDateRangeDateFromTo.vue +2 -2
  19. package/lib/components/SDropdownSectionDateRangeYear.vue +2 -2
  20. package/lib/components/SDropdownSectionDateRangeYearHalf.vue +2 -2
  21. package/lib/components/SDropdownSectionDateRangeYearQuarter.vue +2 -2
  22. package/lib/components/SDropdownSectionFilter.vue +4 -6
  23. package/lib/components/SIndicator.vue +10 -16
  24. package/lib/components/SInputAddon.vue +6 -8
  25. package/lib/components/SInputBase.vue +6 -8
  26. package/lib/components/SInputCheckbox.vue +7 -11
  27. package/lib/components/SInputCheckboxes.vue +3 -4
  28. package/lib/components/SInputDate.vue +3 -4
  29. package/lib/components/SInputDropdown.vue +10 -13
  30. package/lib/components/SInputDropdownItemAvatar.vue +2 -3
  31. package/lib/components/SInputDropdownItemText.vue +2 -3
  32. package/lib/components/SInputFile.vue +3 -4
  33. package/lib/components/SInputHMS.vue +4 -5
  34. package/lib/components/SInputImage.vue +5 -7
  35. package/lib/components/SInputNumber.vue +10 -11
  36. package/lib/components/SInputRadio.vue +3 -4
  37. package/lib/components/SInputRadios.vue +3 -4
  38. package/lib/components/SInputSegments.vue +3 -4
  39. package/lib/components/SInputSelect.vue +7 -9
  40. package/lib/components/SInputSwitch.vue +3 -4
  41. package/lib/components/SInputSwitches.vue +3 -4
  42. package/lib/components/SInputText.vue +7 -9
  43. package/lib/components/SInputTextarea.vue +3 -4
  44. package/lib/components/SInputYMD.vue +4 -5
  45. package/lib/components/SLink.vue +1 -1
  46. package/lib/components/SLocalNavMenu.vue +3 -4
  47. package/lib/components/SLoginPage.vue +3 -3
  48. package/lib/components/SLoginPagePasswordDialog.vue +4 -4
  49. package/lib/components/SPagination.vue +2 -2
  50. package/lib/components/SPill.vue +1 -5
  51. package/lib/components/SSnackbar.vue +2 -3
  52. package/lib/components/SStep.vue +4 -5
  53. package/lib/components/STable.vue +1 -2
  54. package/lib/components/STableCell.vue +5 -13
  55. package/lib/components/STableCellAvatar.vue +10 -27
  56. package/lib/components/STableCellAvatars.vue +6 -19
  57. package/lib/components/STableCellDay.vue +4 -11
  58. package/lib/components/STableCellNumber.vue +8 -9
  59. package/lib/components/STableCellPill.vue +5 -33
  60. package/lib/components/STableCellPills.vue +4 -14
  61. package/lib/components/STableCellState.vue +3 -3
  62. package/lib/components/STableCellText.vue +22 -50
  63. package/lib/components/STableColumn.vue +4 -6
  64. package/lib/components/STableFooter.vue +4 -5
  65. package/lib/components/STableHeader.vue +2 -19
  66. package/lib/components/STableHeaderMenu.vue +1 -2
  67. package/lib/components/STableHeaderMenuItem.vue +2 -3
  68. package/lib/components/STableItem.vue +1 -1
  69. package/lib/composables/Data.ts +8 -102
  70. package/lib/composables/Error.ts +3 -3
  71. package/lib/composables/Table.ts +17 -22
  72. package/lib/composables/Utils.ts +2 -2
  73. package/lib/composables/Validation.ts +76 -14
  74. package/lib/http/Http.ts +27 -10
  75. package/lib/mixins/Card.ts +0 -27
  76. package/lib/mixins/Fundamental.ts +0 -3
  77. package/lib/support/Day.ts +5 -5
  78. package/lib/support/Utils.ts +35 -14
  79. package/lib/validation/validators/maxLength.ts +2 -2
  80. package/lib/validation/validators/maxValue.ts +2 -2
  81. package/lib/validation/validators/minLength.ts +2 -2
  82. package/lib/validation/validators/minValue.ts +2 -2
  83. package/lib/validation/validators/required.ts +4 -4
  84. package/package.json +40 -40
  85. package/lib/components/SCardFooter.vue +0 -22
  86. package/lib/components/SCardFooterAction.vue +0 -31
  87. package/lib/components/SCardFooterActions.vue +0 -18
  88. package/lib/components/SCardHeader.vue +0 -15
  89. package/lib/components/SCardHeaderAction.vue +0 -28
  90. package/lib/components/SCardHeaderActionClose.vue +0 -27
  91. package/lib/components/SCardHeaderActionCollapse.vue +0 -47
  92. package/lib/components/SCardHeaderActions.vue +0 -13
  93. package/lib/components/SCardHeaderTitle.vue +0 -29
  94. package/lib/components/SIcon.vue +0 -13
  95. package/lib/components/SSheet.vue +0 -87
  96. package/lib/components/SSheetFooter.vue +0 -16
  97. package/lib/components/SSheetFooterAction.vue +0 -34
  98. package/lib/components/SSheetFooterActions.vue +0 -14
  99. package/lib/components/SSheetForm.vue +0 -15
  100. package/lib/components/SSheetMedium.vue +0 -72
  101. package/lib/components/SSheetTitle.vue +0 -13
  102. package/lib/components/STableHeaderActions.vue +0 -20
  103. package/lib/composables/D.ts +0 -21
  104. package/lib/composables/Form.ts +0 -109
  105. package/lib/composables/V.ts +0 -97
  106. package/lib/mixins/Sheet.ts +0 -30
@@ -1,11 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import IconCheck from '@iconify-icons/ph/check-bold'
4
- import IconMinus from '@iconify-icons/ph/minus-bold'
5
- import { computed } from 'vue'
6
- import { type Validatable } from '../composables/V'
7
- import SIcon from './SIcon.vue'
2
+ import { type Component, computed } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
8
4
  import SInputBase from './SInputBase.vue'
5
+ import IconCheck from '~icons/ph/check-bold'
6
+ import IconMinus from '~icons/ph/minus-bold'
9
7
 
10
8
  export type Size = 'mini' | 'small' | 'medium'
11
9
  export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
@@ -16,7 +14,7 @@ const props = withDefaults(defineProps<{
16
14
  info?: string
17
15
  note?: string
18
16
  help?: string
19
- checkIcon?: IconifyIcon
17
+ checkIcon?: Component
20
18
  checkText?: string
21
19
  checkColor?: Color
22
20
  text?: string
@@ -81,10 +79,8 @@ function onClick() {
81
79
  >
82
80
  <div class="box">
83
81
  <div class="check">
84
- <SIcon
85
- :icon="isIndeterminate ? IconMinus : IconCheck"
86
- class="check-icon"
87
- />
82
+ <IconMinus v-if="isIndeterminate" class="check-icon" />
83
+ <IconCheck v-else class="check-icon" />
88
84
  </div>
89
85
  </div>
90
86
 
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { computed } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
  import SInputCheckbox from './SInputCheckbox.vue'
7
6
 
@@ -23,7 +22,7 @@ const props = withDefaults(defineProps<{
23
22
  info?: string
24
23
  note?: string
25
24
  help?: string
26
- checkIcon?: IconifyIcon
25
+ checkIcon?: Component
27
26
  checkText?: string
28
27
  checkColor?: Color
29
28
  options: Option[]
@@ -1,8 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
2
  import { DatePicker } from 'v-calendar'
4
- import { computed } from 'vue'
5
- import { type Validatable } from '../composables/V'
3
+ import { type Component, computed } from 'vue'
4
+ import { type Validatable } from '../composables/Validation'
6
5
  import { type Day, day } from '../support/Day'
7
6
  import SInputBase from './SInputBase.vue'
8
7
 
@@ -16,7 +15,7 @@ const props = defineProps<{
16
15
  info?: string
17
16
  note?: string
18
17
  help?: string
19
- checkIcon?: IconifyIcon
18
+ checkIcon?: Component
20
19
  checkText?: string
21
20
  checkColor?: Color
22
21
  block?: boolean
@@ -1,17 +1,14 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
4
- import IconCaretUp from '@iconify-icons/ph/caret-up-bold'
5
2
  import xor from 'lodash-es/xor'
6
- import { type DefineComponent, computed, ref } from 'vue'
3
+ import { type Component, computed, ref } from 'vue'
7
4
  import { type DropdownSectionFilter, useManualDropdownPosition } from '../composables/Dropdown'
8
5
  import { useFlyout } from '../composables/Flyout'
9
- import { type Validatable } from '../composables/V'
10
- import { isArray } from '../support/Utils'
6
+ import { type Validatable } from '../composables/Validation'
11
7
  import SDropdown from './SDropdown.vue'
12
- import SIcon from './SIcon.vue'
13
8
  import SInputBase from './SInputBase.vue'
14
9
  import SInputDropdownItem from './SInputDropdownItem.vue'
10
+ import IconCaretDown from '~icons/ph/caret-down-bold'
11
+ import IconCaretUp from '~icons/ph/caret-up-bold'
15
12
 
16
13
  export type Size = 'mini' | 'small' | 'medium'
17
14
  export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
@@ -46,7 +43,7 @@ const props = defineProps<{
46
43
  note?: string
47
44
  help?: string
48
45
  placeholder?: string
49
- checkIcon?: IconifyIcon | DefineComponent
46
+ checkIcon?: Component
50
47
  checkText?: string
51
48
  checkColor?: Color
52
49
  options: Option[]
@@ -82,7 +79,7 @@ const dropdownOptions = computed<DropdownSectionFilter[]>(() => [{
82
79
  }])
83
80
 
84
81
  const selected = computed(() => {
85
- if (isArray(props.modelValue)) {
82
+ if (Array.isArray(props.modelValue)) {
86
83
  return props.options.filter((o) => (props.modelValue as ArrayValue).includes(o.value))
87
84
  }
88
85
 
@@ -96,7 +93,7 @@ const hasSelected = computed(() => {
96
93
  })
97
94
 
98
95
  const removable = computed(() => {
99
- if (isArray(props.modelValue)) {
96
+ if (Array.isArray(props.modelValue)) {
100
97
  return props.nullable || selected.value.length > 1
101
98
  }
102
99
 
@@ -113,7 +110,7 @@ async function handleOpen() {
113
110
  function handleSelect(value: OptionValue) {
114
111
  props.validation?.$touch()
115
112
 
116
- isArray(props.modelValue) ? handleArray(value) : handlePrimitive(value)
113
+ Array.isArray(props.modelValue) ? handleArray(value) : handlePrimitive(value)
117
114
  }
118
115
 
119
116
  function handlePrimitive(value: OptionValue) {
@@ -174,8 +171,8 @@ function handleArray(value: OptionValue) {
174
171
  </div>
175
172
 
176
173
  <div class="box-icon">
177
- <SIcon :icon="IconCaretUp" class="box-icon-svg up" />
178
- <SIcon :icon="IconCaretDown" class="box-icon-svg down" />
174
+ <IconCaretUp class="box-icon-svg up" />
175
+ <IconCaretDown class="box-icon-svg down" />
179
176
  </div>
180
177
  </div>
181
178
 
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import IconX from '@iconify-icons/ph/x-bold'
3
2
  import SAvatar from './SAvatar.vue'
4
- import SIcon from './SIcon.vue'
3
+ import IconX from '~icons/ph/x-bold'
5
4
 
6
5
  export type Size = 'mini' | 'small' | 'medium'
7
6
 
@@ -36,7 +35,7 @@ const avatarSizeDict = {
36
35
 
37
36
  <div v-if="!disabled && removable" class="remove" role="button" @click="$emit('remove', value)">
38
37
  <div class="remove-box">
39
- <SIcon :icon="IconX" class="remove-icon" />
38
+ <IconX class="remove-icon" />
40
39
  </div>
41
40
  </div>
42
41
  </div>
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
- import IconX from '@iconify-icons/ph/x-bold'
3
- import SIcon from './SIcon.vue'
2
+ import IconX from '~icons/ph/x-bold'
4
3
 
5
4
  export type Size = 'mini' | 'small' | 'medium'
6
5
 
@@ -23,7 +22,7 @@ defineEmits<{
23
22
 
24
23
  <div v-if="!disabled && removable" class="remove" role="button" @click.stop="$emit('remove', value)">
25
24
  <div class="remove-box">
26
- <SIcon :icon="IconX" class="remove-icon" />
25
+ <IconX class="remove-icon" />
27
26
  </div>
28
27
  </div>
29
28
  </div>
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed, ref } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed, ref } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
 
7
6
  export type Size = 'mini' | 'small' | 'medium'
@@ -17,7 +16,7 @@ const props = defineProps<{
17
16
  placeholder?: string
18
17
  accept?: string
19
18
  multiple?: boolean
20
- checkIcon?: IconifyIcon | DefineComponent
19
+ checkIcon?: Component
21
20
  checkText?: string
22
21
  checkColor?: Color
23
22
  value?: File | File[] | null
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed, ref } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed, ref } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
 
7
6
  export type Size = 'mini' | 'small' | 'medium'
@@ -28,7 +27,7 @@ const props = defineProps<{
28
27
  note?: string
29
28
  help?: string
30
29
  placeholder?: Placeholder
31
- checkIcon?: IconifyIcon | DefineComponent
30
+ checkIcon?: Component
32
31
  checkText?: string
33
32
  checkColor?: Color
34
33
  noHour?: boolean
@@ -97,7 +96,7 @@ function updateSecond(e: FocusEvent): void {
97
96
  }
98
97
 
99
98
  function update(type: ValueType, value: string | null) {
100
- if (_value.value === null) {
99
+ if (_value.value == null) {
101
100
  return
102
101
  }
103
102
 
@@ -1,12 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import IconImage from '@iconify-icons/ph/image-bold'
4
- import { computed, ref } from 'vue'
2
+ import { type Component, computed, ref } from 'vue'
5
3
  import { useImageSrcFromFile } from '../composables/Image'
6
- import { type Validatable } from '../composables/V'
4
+ import { type Validatable } from '../composables/Validation'
7
5
  import SButton from './SButton.vue'
8
- import SIcon from './SIcon.vue'
9
6
  import SInputBase from './SInputBase.vue'
7
+ import IconImage from '~icons/ph/image-bold'
10
8
 
11
9
  export type Size = 'mini' | 'small' | 'medium'
12
10
  export type CheckColor = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
@@ -18,7 +16,7 @@ const props = withDefaults(defineProps<{
18
16
  info?: string
19
17
  note?: string
20
18
  help?: string
21
- checkIcon?: IconifyIcon
19
+ checkIcon?: Component
22
20
  checkText?: string
23
21
  checkColor?: CheckColor
24
22
  imageType?: ImageType
@@ -108,7 +106,7 @@ function onFileDelete() {
108
106
  </div>
109
107
  <div v-else class="image-empty">
110
108
  <div class="image-empty-inner">
111
- <SIcon class="image-empty-icon" :icon="IconImage" />
109
+ <IconImage class="image-empty-icon" />
112
110
  </div>
113
111
  </div>
114
112
  </div>
@@ -1,8 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed } from 'vue'
4
- import { type Validatable } from '../composables/V'
5
- import { isNullish, isString } from '../support/Utils'
2
+ import { type Component, computed } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
4
+ import { isString } from '../support/Utils'
6
5
  import SInputText from './SInputText.vue'
7
6
 
8
7
  export type Size = 'mini' | 'small' | 'medium'
@@ -20,7 +19,7 @@ const props = defineProps<{
20
19
  placeholder?: string
21
20
  unitBefore?: any
22
21
  unitAfter?: any
23
- checkIcon?: IconifyIcon | DefineComponent
22
+ checkIcon?: Component
24
23
  checkText?: string
25
24
  checkColor?: CheckColor
26
25
  textColor?: TextColor | ((value: number | null) => TextColor)
@@ -58,27 +57,27 @@ const _textColor = computed(() => {
58
57
  })
59
58
 
60
59
  const valueWithSeparator = computed(() => {
61
- if (isNullish(_value.value)) {
60
+ if (_value.value == null) {
62
61
  return null
63
62
  }
64
63
 
65
- return _value.value >= 100000000000000000000
64
+ return _value.value >= Number.MAX_SAFE_INTEGER
66
65
  ? 'The number is too big'
67
66
  : _value.value.toLocaleString('en-US', { maximumSignificantDigits: 20 })
68
67
  })
69
68
 
70
69
  const displayValue = computed(() => {
71
- if (!isNullish(props.displayValue)) {
70
+ if (props.displayValue != null) {
72
71
  return props.displayValue
73
72
  }
74
73
 
75
- return (!props.separator || valueWithSeparator.value === null)
74
+ return (!props.separator || valueWithSeparator.value == null)
76
75
  ? null
77
76
  : valueWithSeparator.value
78
77
  })
79
78
 
80
79
  function emitUpdate(value: string | null) {
81
- const v = isNullish(value) ? null : Number(value)
80
+ const v = value == null ? null : Number(value)
82
81
  emit('update:model-value', v)
83
82
  emit('input', v)
84
83
  }
@@ -105,7 +104,7 @@ function emitUpdate(value: string | null) {
105
104
  :disabled="disabled"
106
105
  :hide-error="hideError"
107
106
  :display-value="displayValue"
108
- :model-value="_value === null ? null : String(_value)"
107
+ :model-value="_value == null ? null : String(_value)"
109
108
  :validation="validation"
110
109
  @update:model-value="emitUpdate"
111
110
  @input="emitUpdate"
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
 
7
6
  export type Size = 'mini' | 'small' | 'medium'
@@ -14,7 +13,7 @@ const props = defineProps<{
14
13
  info?: string
15
14
  note?: string
16
15
  help?: string
17
- checkIcon?: IconifyIcon | DefineComponent
16
+ checkIcon?: Component
18
17
  checkText?: string
19
18
  checkColor?: Color
20
19
  text?: string
@@ -6,9 +6,8 @@
6
6
  Nullable extends boolean = false
7
7
  "
8
8
  >
9
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
10
- import { type DefineComponent, computed } from 'vue'
11
- import { type Validatable } from '../composables/V'
9
+ import { type Component, computed } from 'vue'
10
+ import { type Validatable } from '../composables/Validation'
12
11
  import SInputBase from './SInputBase.vue'
13
12
  import SInputRadio from './SInputRadio.vue'
14
13
 
@@ -32,7 +31,7 @@ const props = withDefaults(defineProps<{
32
31
  info?: string
33
32
  note?: string
34
33
  help?: string
35
- checkIcon?: IconifyIcon | DefineComponent
34
+ checkIcon?: Component
36
35
  checkText?: string
37
36
  checkColor?: Color
38
37
  options: Option<ValueType>[]
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts" generic="T extends string | number | boolean">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { computed } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
  import SInputSegmentsOption, { type Mode } from './SInputSegmentsOption.vue'
7
6
 
@@ -23,7 +22,7 @@ const props = defineProps<{
23
22
  info?: string
24
23
  note?: string
25
24
  help?: string
26
- checkIcon?: IconifyIcon
25
+ checkIcon?: Component
27
26
  checkText?: string
28
27
  checkColor?: CheckColor
29
28
  options: Option<T>[]
@@ -1,11 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
4
- import IconCaretUp from '@iconify-icons/ph/caret-up-bold'
5
- import { type DefineComponent, computed, ref } from 'vue'
6
- import { type Validatable } from '../composables/V'
7
- import SIcon from './SIcon.vue'
2
+ import { type Component, computed, ref } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
8
4
  import SInputBase from './SInputBase.vue'
5
+ import IconCaretDown from '~icons/ph/caret-down-bold'
6
+ import IconCaretUp from '~icons/ph/caret-up-bold'
9
7
 
10
8
  export type Size = 'mini' | 'small' | 'medium'
11
9
  export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
@@ -24,7 +22,7 @@ const props = withDefaults(defineProps<{
24
22
  note?: string
25
23
  help?: string
26
24
  placeholder?: string
27
- checkIcon?: IconifyIcon | DefineComponent
25
+ checkIcon?: Component
28
26
  checkText?: string
29
27
  checkColor?: Color
30
28
  options: Option[]
@@ -124,8 +122,8 @@ function emitChange(e: any): void {
124
122
  </select>
125
123
 
126
124
  <div class="icon" role="button">
127
- <SIcon :icon="IconCaretUp" class="icon-svg up" />
128
- <SIcon :icon="IconCaretDown" class="icon-svg down" />
125
+ <IconCaretUp class="icon-svg up" />
126
+ <IconCaretDown class="icon-svg down" />
129
127
  </div>
130
128
  </div>
131
129
  <template v-if="$slots.info" #info><slot name="info" /></template>
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
 
7
6
  export type Size = 'mini' | 'small' | 'medium'
@@ -17,7 +16,7 @@ const props = withDefaults(defineProps<{
17
16
  text?: string
18
17
  color?: ActiveColor
19
18
  help?: string
20
- checkIcon?: IconifyIcon | DefineComponent
19
+ checkIcon?: Component
21
20
  checkText?: string
22
21
  checkColor?: CheckColor
23
22
  disabled?: boolean
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
  import SInputSwitch from './SInputSwitch.vue'
7
6
 
@@ -20,7 +19,7 @@ const props = defineProps<{
20
19
  info?: string
21
20
  note?: string
22
21
  help?: string
23
- checkIcon?: IconifyIcon | DefineComponent
22
+ checkIcon?: Component
24
23
  checkText?: string
25
24
  checkColor?: CheckColor
26
25
  options: Option[]
@@ -1,9 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed, ref } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed, ref } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import { isString } from '../support/Utils'
6
- import SIcon from './SIcon.vue'
7
5
  import SInputBase from './SInputBase.vue'
8
6
 
9
7
  export interface Props {
@@ -15,9 +13,9 @@ export interface Props {
15
13
  help?: string
16
14
  type?: string
17
15
  placeholder?: string
18
- unitBefore?: any
19
- unitAfter?: any
20
- checkIcon?: IconifyIcon | DefineComponent
16
+ unitBefore?: Component | string
17
+ unitAfter?: Component | string
18
+ checkIcon?: Component
21
19
  checkText?: string
22
20
  checkColor?: CheckColor
23
21
  textColor?: TextColor | ((value: string | null) => TextColor)
@@ -137,7 +135,7 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
137
135
  <div class="value">
138
136
  <div v-if="unitBefore" class="unit before">
139
137
  <span v-if="isString(unitBefore)" class="unit-text">{{ unitBefore }}</span>
140
- <SIcon v-else class="unit-icon" :icon="unitBefore" />
138
+ <component v-else :is="unitBefore" class="unit-icon" />
141
139
  </div>
142
140
 
143
141
  <div class="area">
@@ -162,7 +160,7 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
162
160
 
163
161
  <div v-if="unitAfter" class="unit after">
164
162
  <span v-if="isString(unitAfter)" class="unit-text">{{ unitAfter }}</span>
165
- <SIcon v-else class="unit-icon" :icon="unitAfter" />
163
+ <component v-else :is="unitAfter" class="unit-icon" />
166
164
  </div>
167
165
  </div>
168
166
 
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { computed, ref } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed, ref } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
  import SInputSegments from './SInputSegments.vue'
7
6
 
@@ -15,7 +14,7 @@ const props = withDefaults(defineProps<{
15
14
  info?: string
16
15
  note?: string
17
16
  help?: string
18
- checkIcon?: IconifyIcon
17
+ checkIcon?: Component
19
18
  checkText?: string
20
19
  checkColor?: Color
21
20
  placeholder?: string
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import { type DefineComponent, computed, ref } from 'vue'
4
- import { type Validatable } from '../composables/V'
2
+ import { type Component, computed, ref } from 'vue'
3
+ import { type Validatable } from '../composables/Validation'
5
4
  import SInputBase from './SInputBase.vue'
6
5
 
7
6
  export type Size = 'mini' | 'small' | 'medium'
@@ -28,7 +27,7 @@ const props = defineProps<{
28
27
  note?: string
29
28
  help?: string
30
29
  placeholder?: Placeholder
31
- checkIcon?: IconifyIcon | DefineComponent
30
+ checkIcon?: Component
32
31
  checkText?: string
33
32
  checkColor?: Color
34
33
  noYear?: boolean
@@ -98,7 +97,7 @@ function updateDate(e: FocusEvent) {
98
97
  }
99
98
 
100
99
  function update(type: ValueType, value: string) {
101
- if (_value.value === null) {
100
+ if (_value.value == null) {
102
101
  return
103
102
  }
104
103
 
@@ -15,7 +15,7 @@ const isExternal = computed(() => {
15
15
  return false
16
16
  }
17
17
 
18
- if (props.external !== null) {
18
+ if (props.external != null) {
19
19
  return props.external
20
20
  }
21
21
 
@@ -1,10 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { type IconifyIcon } from '@iconify/vue/dist/offline'
3
- import SIcon from './SIcon.vue'
2
+ import { type Component } from 'vue'
4
3
  import SLink from './SLink.vue'
5
4
 
6
5
  export interface MenuItem {
7
- icon?: IconifyIcon
6
+ icon?: Component
8
7
  text: string
9
8
  link: string
10
9
  active?: boolean
@@ -20,7 +19,7 @@ defineProps<{
20
19
  <div v-for="nav, index in menu" :key="index" class="group">
21
20
  <div v-for="item in nav" :key="item.text" class="item">
22
21
  <SLink class="link" :class="{ active: item.active }" :href="item.link">
23
- <SIcon v-if="item.icon" class="icon-svg" :icon="item.icon" />
22
+ <component v-if="item.icon" :is="item.icon" class="icon-svg" />
24
23
  <span class="text">{{ item.text }}</span>
25
24
  </SLink>
26
25
  </div>
@@ -1,6 +1,4 @@
1
1
  <script setup lang="ts">
2
- import LockKey from '@iconify-icons/ph/lock-key-fill'
3
- import IconGoogle from '@iconify-icons/ri/google-fill'
4
2
  import { computed, ref } from 'vue'
5
3
  import { usePower } from '../composables/Power'
6
4
  import SButton from './SButton.vue'
@@ -8,6 +6,8 @@ import SLink from './SLink.vue'
8
6
  import SLoginPagePasswordDialog from './SLoginPagePasswordDialog.vue'
9
7
  import SModal from './SModal.vue'
10
8
  import SIconGbLogoWhite from './icon/SIconGbLogoWhite.vue'
9
+ import IconLockKey from '~icons/ph/lock-key-fill'
10
+ import IconGoogle from '~icons/ri/google-fill'
11
11
 
12
12
  export interface CoverTitle {
13
13
  text: string
@@ -60,7 +60,7 @@ function getActionLabel(type: ActionType) {
60
60
  function getIconComponent(type: ActionType) {
61
61
  switch (type) {
62
62
  case 'password':
63
- return LockKey
63
+ return IconLockKey
64
64
  case 'google':
65
65
  return IconGoogle
66
66
  }
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { useD } from '../composables/D'
3
- import { useV } from '../composables/V'
2
+ import { useData } from '../composables/Data'
3
+ import { useValidation } from '../composables/Validation'
4
4
  import { email, maxLength, required } from '../validation/rules'
5
5
  import SAlert from './SAlert.vue'
6
6
  import SCard from './SCard.vue'
@@ -22,12 +22,12 @@ const emit = defineEmits<{
22
22
  submit: [email: string, password: string]
23
23
  }>()
24
24
 
25
- const { data } = useD({
25
+ const { data } = useData({
26
26
  email: null as string | null,
27
27
  password: null as string | null
28
28
  })
29
29
 
30
- const { validation, validateAndNotify } = useV(data, {
30
+ const { validation, validateAndNotify } = useValidation(data, {
31
31
  email: {
32
32
  required: required(),
33
33
  maxLength: maxLength(255),
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import IconCaretLeft from '@iconify-icons/ph/caret-left-bold'
3
- import IconCaretRight from '@iconify-icons/ph/caret-right-bold'
4
2
  import { computed } from 'vue'
5
3
  import { useTrans } from '../composables/Lang'
6
4
  import { format } from '../support/Num'
7
5
  import SButton from './SButton.vue'
6
+ import IconCaretLeft from '~icons/ph/caret-left-bold'
7
+ import IconCaretRight from '~icons/ph/caret-right-bold'
8
8
 
9
9
  export type Size = 'mini' | 'small' | 'medium'
10
10
  export type Align = 'left' | 'center' | 'right'