@v1nt1248/3nclient-lib 0.1.6 → 0.1.7

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 (127) hide show
  1. package/dist/components/index.d.ts +40 -23
  2. package/dist/components/ui3n-badge/types.d.ts +13 -0
  3. package/dist/components/{ui3n-badge-simple.vue.d.ts → ui3n-badge/ui3n-badge-simple.vue.d.ts} +1 -6
  4. package/dist/components/{ui3n-badge.vue.d.ts → ui3n-badge/ui3n-badge.vue.d.ts} +1 -7
  5. package/dist/components/ui3n-breadcrumbs/types.d.ts +17 -0
  6. package/dist/components/{ui3n-breadcrumb.vue.d.ts → ui3n-breadcrumbs/ui3n-breadcrumb.vue.d.ts} +1 -12
  7. package/dist/components/{ui3n-breadcrumbs.vue.d.ts → ui3n-breadcrumbs/ui3n-breadcrumbs.vue.d.ts} +1 -4
  8. package/dist/components/ui3n-button/types.d.ts +19 -0
  9. package/dist/components/{ui3n-button.vue.d.ts → ui3n-button/ui3n-button.vue.d.ts} +1 -19
  10. package/dist/components/ui3n-checkbox/types.d.ts +18 -0
  11. package/dist/components/{ui3n-checkbox.vue.d.ts → ui3n-checkbox/ui3n-checkbox.vue.d.ts} +1 -17
  12. package/dist/components/ui3n-chip/types.d.ts +21 -0
  13. package/dist/components/{ui3n-chip.vue.d.ts → ui3n-chip/ui3n-chip.vue.d.ts} +1 -20
  14. package/dist/components/ui3n-dialog/types.d.ts +36 -0
  15. package/dist/components/{ui3n-dialog.vue.d.ts → ui3n-dialog/ui3n-dialog.vue.d.ts} +1 -36
  16. package/dist/components/ui3n-drop-files/types.d.ts +12 -0
  17. package/dist/components/{ui3n-drop-files.vue.d.ts → ui3n-drop-files/ui3n-drop-files.vue.d.ts} +2 -11
  18. package/dist/components/ui3n-emoji/types.d.ts +8 -0
  19. package/dist/components/{ui3n-emoji.vue.d.ts → ui3n-emoji/ui3n-emoji.vue.d.ts} +1 -8
  20. package/dist/components/ui3n-icon/types.d.ts +16 -0
  21. package/dist/components/{ui3n-icon.vue.d.ts → ui3n-icon/ui3n-icon.vue.d.ts} +1 -16
  22. package/dist/components/ui3n-input/types.d.ts +25 -0
  23. package/dist/components/{ui3n-input.vue.d.ts → ui3n-input/ui3n-input.vue.d.ts} +1 -25
  24. package/dist/components/ui3n-list/types.d.ts +20 -0
  25. package/dist/components/{ui3n-list.vue.d.ts → ui3n-list/ui3n-list.vue.d.ts} +1 -19
  26. package/dist/components/ui3n-notification/types.d.ts +11 -0
  27. package/dist/components/{ui3n-notification.vue.d.ts → ui3n-notification/ui3n-notification.vue.d.ts} +1 -1
  28. package/dist/components/ui3n-progress/types.d.ts +17 -0
  29. package/dist/components/{ui3n-progress-circular.vue.d.ts → ui3n-progress/ui3n-progress-circular.vue.d.ts} +1 -9
  30. package/dist/components/{ui3n-progress-linear.vue.d.ts → ui3n-progress/ui3n-progress-linear.vue.d.ts} +1 -8
  31. package/dist/components/ui3n-step-line-bar/types.d.ts +5 -0
  32. package/dist/components/{ui3n-step-line-bar.vue.d.ts → ui3n-step-line-bar/ui3n-step-line-bar.vue.d.ts} +1 -5
  33. package/dist/components/ui3n-switch/types.d.ts +14 -0
  34. package/dist/components/{ui3n-switch.vue.d.ts → ui3n-switch/ui3n-switch.vue.d.ts} +1 -13
  35. package/dist/components/ui3n-table/composables/useTable.d.ts +1 -1
  36. package/dist/components/ui3n-table/types.d.ts +5 -0
  37. package/dist/components/{ui3n-table-sort-icon.vue.d.ts → ui3n-table/ui3n-table-sort-icon.vue.d.ts} +1 -5
  38. package/dist/components/ui3n-tabs/types.d.ts +16 -0
  39. package/dist/components/{ui3n-tabs.vue.d.ts → ui3n-tabs/ui3n-tabs.vue.d.ts} +2 -18
  40. package/dist/components/ui3n-text/types.d.ts +17 -0
  41. package/dist/components/{ui3n-text.vue.d.ts → ui3n-text/ui3n-text.vue.d.ts} +1 -17
  42. package/dist/components/ui3n-virtual-scroll/types.d.ts +12 -0
  43. package/dist/components/{ui3n-virtual-scroll.vue.d.ts → ui3n-virtual-scroll/ui3n-virtual-scroll.vue.d.ts} +1 -11
  44. package/dist/constants/index.d.ts +0 -1
  45. package/dist/index.d.ts +26 -24
  46. package/dist/plugins/dialogs/dialogs.d.ts +9 -0
  47. package/dist/plugins/{store-dialogs.d.ts → dialogs/store-dialogs.d.ts} +1 -1
  48. package/dist/plugins/dialogs/types.d.ts +12 -0
  49. package/dist/plugins/i18n/i18n.d.ts +9 -0
  50. package/dist/plugins/{i18n.d.ts → i18n/types.d.ts} +1 -9
  51. package/dist/plugins/index.d.ts +13 -9
  52. package/dist/plugins/notifications/notifications.d.ts +8 -0
  53. package/dist/plugins/{store-notifications.d.ts → notifications/store-notifications.d.ts} +1 -1
  54. package/dist/plugins/notifications/types.d.ts +6 -0
  55. package/dist/plugins/{store-vue-bus.d.ts → vue-bus/store-vue-bus.d.ts} +1 -1
  56. package/dist/plugins/vue-bus/types.d.ts +13 -0
  57. package/dist/plugins/{vue-bus.d.ts → vue-bus/vue-bus.d.ts} +2 -6
  58. package/dist/style.css +1 -0
  59. package/dist/{components.d.ts → ui3n-components.d.ts} +22 -22
  60. package/dist/ui3n-plugins.d.ts +44 -0
  61. package/dist/ui3n-plugins.js +5678 -0
  62. package/dist/{utils.d.ts → ui3n-utils.d.ts} +1 -1
  63. package/dist/{tools → utils}/index.d.ts +2 -2
  64. package/package.json +9 -10
  65. package/src/components/index.ts +46 -41
  66. package/src/components/ui3n-badge/types.ts +14 -0
  67. package/src/components/{ui3n-badge-simple.vue → ui3n-badge/ui3n-badge-simple.vue} +29 -35
  68. package/src/components/ui3n-badge/ui3n-badge.vue +82 -0
  69. package/src/components/ui3n-breadcrumbs/types.ts +21 -0
  70. package/src/components/{ui3n-breadcrumb.vue → ui3n-breadcrumbs/ui3n-breadcrumb.vue} +1 -14
  71. package/src/components/{ui3n-breadcrumbs.vue → ui3n-breadcrumbs/ui3n-breadcrumbs.vue} +1 -4
  72. package/src/components/ui3n-button/types.ts +20 -0
  73. package/src/components/{ui3n-button.vue → ui3n-button/ui3n-button.vue} +3 -23
  74. package/src/components/ui3n-checkbox/types.ts +22 -0
  75. package/src/components/{ui3n-checkbox.vue → ui3n-checkbox/ui3n-checkbox.vue} +2 -23
  76. package/src/components/ui3n-chip/types.ts +19 -0
  77. package/src/components/{ui3n-chip.vue → ui3n-chip/ui3n-chip.vue} +32 -50
  78. package/src/components/ui3n-dialog/types.ts +40 -0
  79. package/src/components/{ui3n-dialog.vue → ui3n-dialog/ui3n-dialog.vue} +3 -49
  80. package/src/components/ui3n-drop-files/types.ts +15 -0
  81. package/src/components/{ui3n-drop-files.vue → ui3n-drop-files/ui3n-drop-files.vue} +2 -10
  82. package/src/components/ui3n-emoji/types.ts +9 -0
  83. package/src/components/{ui3n-emoji.vue → ui3n-emoji/ui3n-emoji.vue} +2 -11
  84. package/src/components/ui3n-icon/types.ts +17 -0
  85. package/src/components/ui3n-icon/ui3n-icon.vue +53 -0
  86. package/src/components/ui3n-input/types.ts +26 -0
  87. package/src/components/{ui3n-input.vue → ui3n-input/ui3n-input.vue} +4 -30
  88. package/src/components/ui3n-list/types.ts +17 -0
  89. package/src/components/{ui3n-list.vue → ui3n-list/ui3n-list.vue} +1 -16
  90. package/src/components/ui3n-notification/types.ts +11 -0
  91. package/src/components/{ui3n-notification.vue → ui3n-notification/ui3n-notification.vue} +3 -3
  92. package/src/components/ui3n-progress/types.ts +18 -0
  93. package/src/components/{ui3n-progress-circular.vue → ui3n-progress/ui3n-progress-circular.vue} +1 -10
  94. package/src/components/{ui3n-progress-linear.vue → ui3n-progress/ui3n-progress-linear.vue} +1 -9
  95. package/src/components/ui3n-step-line-bar/types.ts +5 -0
  96. package/src/components/{ui3n-step-line-bar.vue → ui3n-step-line-bar/ui3n-step-line-bar.vue} +1 -5
  97. package/src/components/ui3n-switch/types.ts +17 -0
  98. package/src/components/{ui3n-switch.vue → ui3n-switch/ui3n-switch.vue} +1 -16
  99. package/src/components/ui3n-table/composables/useTable.ts +1 -1
  100. package/src/components/ui3n-table/types.ts +6 -0
  101. package/src/components/{ui3n-table-sort-icon.vue → ui3n-table/ui3n-table-sort-icon.vue} +2 -7
  102. package/src/components/ui3n-table/ui3n-table.vue +3 -3
  103. package/src/components/ui3n-tabs/types.ts +19 -0
  104. package/src/components/{ui3n-tabs.vue → ui3n-tabs/ui3n-tabs.vue} +3 -20
  105. package/src/components/ui3n-text/types.ts +18 -0
  106. package/src/components/{ui3n-text.vue → ui3n-text/ui3n-text.vue} +2 -21
  107. package/src/components/ui3n-virtual-scroll/types.ts +11 -0
  108. package/src/components/{ui3n-virtual-scroll.vue → ui3n-virtual-scroll/ui3n-virtual-scroll.vue} +1 -11
  109. package/dist/constants/types.d.ts +0 -29
  110. package/dist/plugins/dialogs.d.ts +0 -18
  111. package/dist/plugins/notifications.d.ts +0 -12
  112. package/dist/plugins.d.ts +0 -32
  113. package/dist/plugins.js +0 -1
  114. package/src/components/ui3n-badge.vue +0 -89
  115. package/src/components/ui3n-icon.vue +0 -70
  116. package/src/components/ui3n-table-simple.vue +0 -328
  117. /package/dist/plugins/{store-i18n.d.ts → i18n/store-i18n.d.ts} +0 -0
  118. /package/dist/plugins/{icons.d.ts → icons/icons.d.ts} +0 -0
  119. /package/dist/{ui-3n-lib.js → ui3n-components.js} +0 -0
  120. /package/dist/{utils.js → ui3n-utils.js} +0 -0
  121. /package/dist/{tools/common.helpers.d.ts → utils/common.utils.d.ts} +0 -0
  122. /package/dist/{tools → utils}/sqlite-on-3nstorage/deferred.d.ts +0 -0
  123. /package/dist/{tools → utils}/sqlite-on-3nstorage/index.d.ts +0 -0
  124. /package/dist/{tools → utils}/sqlite-on-3nstorage/synced.d.ts +0 -0
  125. /package/dist/{tools → utils}/sqlite-on-3nstorage/types.d.ts +0 -0
  126. /package/dist/{tools → utils}/textarea-max-rows.d.ts +0 -0
  127. /package/dist/{tools/ui.helpers.d.ts → utils/ui.utils.d.ts} +0 -0
@@ -0,0 +1,40 @@
1
+ import type { Component } from 'vue';
2
+
3
+ export type Ui3nDialogEvent = 'open' | 'before-close' | 'close' | 'confirm' | 'cancel' | 'click-overlay';
4
+
5
+ export interface Ui3nDialogProps {
6
+ teleport?: string;
7
+ title?: string;
8
+ width?: string | number;
9
+ cssClass?: string[];
10
+ cssStyle?: Record<string, string>;
11
+ contentCssClass?: string[];
12
+ contentCssStyle?: Record<string, string>;
13
+ confirmButton?: boolean;
14
+ cancelButton?: boolean;
15
+ onClose?: () => void;
16
+ onConfirm?: (data: any) => void;
17
+ onCancel?: (data: any) => void;
18
+ confirmButtonText?: string;
19
+ cancelButtonText?: string;
20
+ confirmButtonColor?: string;
21
+ cancelButtonColor?: string;
22
+ confirmButtonBackground?: string;
23
+ cancelButtonBackground?: string;
24
+ closeOnClickOverlay?: boolean;
25
+ }
26
+
27
+ export interface Ui3nDialogComponentProps {
28
+ component: Component;
29
+ componentProps?: Record<string, any>;
30
+ dialogProps?: Ui3nDialogProps;
31
+ }
32
+
33
+ export interface Ui3nDialogComponentEmits {
34
+ (ev: 'open', value?: any): void;
35
+ (ev: 'before-close', value?: any): void;
36
+ (ev: 'close', value?: any): void;
37
+ (ev: 'confirm', value?: any): void;
38
+ (ev: 'cancel', value?: any): void;
39
+ (ev: 'click-overlay', value?: any): void;
40
+ }
@@ -1,55 +1,10 @@
1
1
  <script lang="ts" setup>
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
  import { computed, nextTick, onMounted, ref } from 'vue';
4
- import type { Component } from 'vue';
5
- import Ui3nButton from './ui3n-button.vue';
6
-
7
- export type Ui3nDialogEvent = 'open' | 'before-close' | 'close' | 'confirm' | 'cancel' | 'click-overlay';
8
-
9
- export interface Ui3nDialogProps {
10
- teleport?: string;
11
- title?: string;
12
- width?: string | number;
13
- cssClass?: string[];
14
- cssStyle?: Record<string, string>;
15
- contentCssClass?: string[];
16
- contentCssStyle?: Record<string, string>;
17
- confirmButton?: boolean;
18
- cancelButton?: boolean;
19
- onClose?: () => void;
20
- onConfirm?: (data: any) => void;
21
- onCancel?: (data: any) => void;
22
- confirmButtonText?: string;
23
- cancelButtonText?: string;
24
- confirmButtonColor?: string;
25
- cancelButtonColor?: string;
26
- confirmButtonBackground?: string;
27
- cancelButtonBackground?: string;
28
- closeOnClickOverlay?: boolean;
29
- }
30
-
31
- export interface Ui3nDialogComponentProps {
32
- component: Component;
33
- componentProps?: Record<string, any>;
34
- dialogProps?: Ui3nDialogProps;
35
- }
36
-
37
- export interface Ui3nDialogComponentEmits {
38
- (ev: 'open', value?: any): void;
39
-
40
- (ev: 'before-close', value?: any): void;
41
-
42
- (ev: 'close', value?: any): void;
43
-
44
- (ev: 'confirm', value?: any): void;
45
-
46
- (ev: 'cancel', value?: any): void;
47
-
48
- (ev: 'click-overlay', value?: any): void;
49
- }
4
+ import Ui3nButton from '../ui3n-button/ui3n-button.vue';
5
+ import type { Ui3nDialogEvent, Ui3nDialogProps, Ui3nDialogComponentProps, Ui3nDialogComponentEmits } from './types';
50
6
 
51
7
  const props = defineProps<Ui3nDialogComponentProps>();
52
-
53
8
  const emits = defineEmits<Ui3nDialogComponentEmits>();
54
9
 
55
10
  const show = ref(true);
@@ -92,7 +47,6 @@ onMounted(() => {
92
47
  }
93
48
  });
94
49
 
95
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
96
50
  const selectData = (value: any) => {
97
51
  data.value = value;
98
52
  if (
@@ -240,7 +194,7 @@ const handleEvent = (event: Event, eventName: Ui3nDialogEvent) => {
240
194
  </template>
241
195
 
242
196
  <style lang="scss" module>
243
- @import "../assets/styles/mixins";
197
+ @import "../../assets/styles/mixins";
244
198
 
245
199
  .overlay {
246
200
  position: fixed;
@@ -0,0 +1,15 @@
1
+ import { VNode } from 'vue';
2
+
3
+ export interface Ui3nDropFilesProps {
4
+ title?: string;
5
+ text?: string;
6
+ additionalText?: string;
7
+ }
8
+
9
+ export interface Ui3nDropFilesEmits {
10
+ (e: 'select', fileList: FileList): void;
11
+ }
12
+
13
+ export interface Ui3nDropFilesSlots {
14
+ default: () => VNode;
15
+ }
@@ -1,15 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { onMounted, ref } from 'vue';
3
-
4
- export interface Ui3nDropFilesProps {
5
- title?: string;
6
- text?: string;
7
- additionalText?: string;
8
- }
9
-
10
- export interface Ui3nDropFilesEmits {
11
- (e: 'select', fileList: FileList): void;
12
- }
3
+ import type { Ui3nDropFilesEmits, Ui3nDropFilesProps, Ui3nDropFilesSlots } from './types';
13
4
 
14
5
  const props = withDefaults(
15
6
  defineProps<Ui3nDropFilesProps>(),
@@ -20,6 +11,7 @@ const props = withDefaults(
20
11
  },
21
12
  );
22
13
  const emits = defineEmits<Ui3nDropFilesEmits>();
14
+ defineSlots<Ui3nDropFilesSlots>();
23
15
 
24
16
  const wrapperElement = ref<HTMLDivElement | null>(null);
25
17
  const wrapperElementHeight = ref(0);
@@ -0,0 +1,9 @@
1
+ export interface Ui3nEmojiProps {
2
+ emoji: string;
3
+ size?: string | number;
4
+ readonly?: boolean;
5
+ }
6
+
7
+ export interface Ui3nEmojiEmits {
8
+ (ev: 'click', value: Event): void;
9
+ }
@@ -1,16 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed, onMounted, ref, watch } from 'vue';
3
- import { emoticons } from '../constants/emoticons';
4
-
5
- export interface Ui3nEmojiProps {
6
- emoji: string;
7
- size?: string | number;
8
- readonly?: boolean;
9
- }
10
-
11
- export interface Ui3nEmojiEmits {
12
- (ev: 'click', value: Event): void;
13
- }
3
+ import { emoticons } from '@/constants/emoticons';
4
+ import type { Ui3nEmojiEmits, Ui3nEmojiProps } from './types';
14
5
 
15
6
  const props = withDefaults(
16
7
  defineProps<Ui3nEmojiProps>(),
@@ -0,0 +1,17 @@
1
+ export interface Ui3nIconProps {
2
+ icon: string;
3
+ title?: string;
4
+ inline?: boolean;
5
+ width?: string | number;
6
+ height?: string | number;
7
+ horizontalFlip?: boolean;
8
+ verticalFlip?: boolean;
9
+ flip?: string;
10
+ rotate?: number;
11
+ color?: string;
12
+ onLoad?: Function;
13
+ }
14
+
15
+ export interface Ui3nIconEmits {
16
+ (ev: 'click', value: Event): void;
17
+ }
@@ -0,0 +1,53 @@
1
+ <script lang="ts" setup>
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import { Icon } from '@iconify/vue';
4
+ import type { Ui3nIconEmits, Ui3nIconProps } from './types';
5
+
6
+ const props = withDefaults(
7
+ defineProps<Ui3nIconProps>(),
8
+ {
9
+ title: '',
10
+ width: 16,
11
+ height: 16,
12
+ rotate: 0,
13
+ color: 'var(--color-icon-control-primary-default)',
14
+ },
15
+ );
16
+ const emits = defineEmits<Ui3nIconEmits>();
17
+
18
+ const onLoad = (value: any) => {
19
+ if (props.onLoad) {
20
+ props.onLoad(value);
21
+ }
22
+ };
23
+ const onClick = (ev: Event) => {
24
+ emits('click', ev);
25
+ };
26
+ </script>
27
+
28
+ <template>
29
+ <icon
30
+ :class="$style.icon"
31
+ :icon="icon"
32
+ :title="title"
33
+ :inline="inline"
34
+ :width="width"
35
+ :height="height"
36
+ :horizontal-flip="horizontalFlip"
37
+ :vertical-flip="verticalFlip"
38
+ :flip="flip"
39
+ :rotate="rotate"
40
+ :color="color"
41
+ :on-load="onLoad"
42
+ @click="onClick"
43
+ />
44
+ </template>
45
+
46
+ <style lang="scss" module>
47
+ .icon {
48
+ min-width: v-bind(width);
49
+ min-height: v-bind(height);
50
+ flex-grow: 0;
51
+ flex-shrink: 0;
52
+ }
53
+ </style>
@@ -0,0 +1,26 @@
1
+ export interface Ui3nInputProps {
2
+ modelValue: string;
3
+ label?: string;
4
+ type?: 'text' | 'password';
5
+ placeholder?: string;
6
+ clearable?: boolean;
7
+ autofocus?: boolean;
8
+ icon?: string;
9
+ iconColor?: string;
10
+ rules?: Array<(v: string) => any>;
11
+ displayStateMode?: 'error' | 'success';
12
+ displayStateWithIcon?: boolean;
13
+ displayStateMessage?: string;
14
+ disabled?: boolean;
15
+ }
16
+
17
+ export interface Ui3nInputEmits {
18
+ (ev: 'init', value: HTMLInputElement): void;
19
+ (ev: 'input', value: string): void;
20
+ (ev: 'focus', value: Event): void;
21
+ (ev: 'blur', value: Event): void;
22
+ (ev: 'clear'): void;
23
+ (ev: 'change', value: string): void;
24
+ (ev: 'update:modelValue', value: string): void;
25
+ (ev: 'update:valid', value: boolean): void;
26
+ }
@@ -1,35 +1,9 @@
1
1
  <script lang="ts" setup>
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
  import { computed, onMounted, ref, watch } from 'vue';
4
- import Ui3nIcon from './ui3n-icon.vue';
5
- import Ui3nButton from './ui3n-button.vue';
6
-
7
- export interface Ui3nInputProps {
8
- modelValue: string;
9
- label?: string;
10
- type?: 'text' | 'password';
11
- placeholder?: string;
12
- clearable?: boolean;
13
- autofocus?: boolean;
14
- icon?: string;
15
- iconColor?: string;
16
- rules?: Array<(v: string) => any>;
17
- displayStateMode?: 'error' | 'success';
18
- displayStateWithIcon?: boolean;
19
- displayStateMessage?: string;
20
- disabled?: boolean;
21
- }
22
-
23
- export interface Ui3nInputEmits {
24
- (ev: 'init', value: HTMLInputElement): void;
25
- (ev: 'input', value: string): void;
26
- (ev: 'focus', value: Event): void;
27
- (ev: 'blur', value: Event): void;
28
- (ev: 'clear'): void;
29
- (ev: 'change', value: string): void;
30
- (ev: 'update:modelValue', value: string): void;
31
- (ev: 'update:valid', value: boolean): void;
32
- }
4
+ import Ui3nIcon from '../ui3n-icon/ui3n-icon.vue';
5
+ import Ui3nButton from '../ui3n-button/ui3n-button.vue';
6
+ import type { Ui3nInputEmits, Ui3nInputProps } from './types';
33
7
 
34
8
  const props = defineProps<Ui3nInputProps>();
35
9
  const emits = defineEmits<Ui3nInputEmits>();
@@ -196,7 +170,7 @@ const validate = (text: string) => {
196
170
  </template>
197
171
 
198
172
  <style lang="scss" module>
199
- @import "../assets/styles/mixins";
173
+ @import "../../assets/styles/mixins";
200
174
 
201
175
  .input {
202
176
  --ui3n-input-height: var(--spacing-l);
@@ -0,0 +1,17 @@
1
+ import { VNode } from 'vue';
2
+
3
+ export interface Ui3nListProps<T> {
4
+ title?: string;
5
+ sticky?: boolean;
6
+ items: T[];
7
+ disabled?: boolean;
8
+ }
9
+
10
+ export interface Ui3nListEmits<T> {
11
+ (ev: 'select', value: { value: T; index: number }): void;
12
+ }
13
+
14
+ export interface Ui3nListSlots<T> {
15
+ title?: () => VNode;
16
+ item?: ({ item, index }: { item: T; index: number }) => VNode;
17
+ }
@@ -1,20 +1,5 @@
1
1
  <script lang="ts" setup generic="T extends { id?: string }">
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- export interface Ui3nListProps<T> {
4
- title?: string;
5
- sticky?: boolean;
6
- items: T[];
7
- disabled?: boolean;
8
- }
9
-
10
- export interface Ui3nListEmits<T> {
11
- (ev: 'select', value: { value: T, index: number }): void;
12
- }
13
-
14
- export interface Ui3nListSlots<T> {
15
- title?: () => any;
16
- item?: ({ item, index }: { item: T, index: number }) => any;
17
- }
2
+ import type { Ui3nListEmits, Ui3nListProps, Ui3nListSlots } from './types';
18
3
 
19
4
  const props = withDefaults(defineProps<Ui3nListProps<T>>(), {
20
5
  title: '',
@@ -0,0 +1,11 @@
1
+ export interface Ui3nNotificationProps {
2
+ id?: string;
3
+ type?: 'success' | 'warning' | 'info' | 'error';
4
+ content: string;
5
+ position?: 'left' | 'center' | 'right';
6
+ duration?: number;
7
+ withIcon?: boolean;
8
+ teleport?: string;
9
+ onOpen?: () => void;
10
+ onClose?: () => void;
11
+ }
@@ -1,8 +1,8 @@
1
1
  <script lang="ts" setup>
2
2
  import { onMounted } from 'vue';
3
- import Ui3nIcon from './ui3n-icon.vue';
4
- import Ui3nButton from './ui3n-button.vue';
5
- import type { Ui3nNotificationProps } from '../constants';
3
+ import Ui3nIcon from '../ui3n-icon/ui3n-icon.vue';
4
+ import Ui3nButton from '../ui3n-button/ui3n-button.vue';
5
+ import type { Ui3nNotificationProps } from './types';
6
6
 
7
7
  const props = withDefaults(
8
8
  defineProps<Ui3nNotificationProps>(),
@@ -0,0 +1,18 @@
1
+ export interface Ui3nProgressCircularProps {
2
+ value?: number | string;
3
+ size?: number | string;
4
+ width?: number | string;
5
+ withText?: boolean;
6
+ bgColor?: string;
7
+ color?: string;
8
+ indeterminate?: boolean;
9
+ }
10
+
11
+ export interface Ui3nProgressLinearProps {
12
+ value?: number | string;
13
+ height?: number | string;
14
+ withText?: boolean;
15
+ bgColor?: string;
16
+ color?: string;
17
+ indeterminate?: boolean;
18
+ }
@@ -1,16 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed, onBeforeMount, onBeforeUnmount, ref, useCssModule } from 'vue';
3
3
  import { toNumber } from 'lodash';
4
-
5
- export interface Ui3nProgressCircularProps {
6
- value?: number | string;
7
- size?: number | string;
8
- width?: number | string;
9
- withText?: boolean;
10
- bgColor?: string;
11
- color?: string;
12
- indeterminate?: boolean;
13
- }
4
+ import type { Ui3nProgressCircularProps } from './types';
14
5
 
15
6
  const thresholdSize = 64;
16
7
  const indeterminateModeValues = [1, 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 85, 90, 95, 99];
@@ -1,15 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed } from 'vue';
3
3
  import { toNumber } from 'lodash';
4
-
5
- export interface Ui3nProgressLinearProps {
6
- value?: number | string;
7
- height?: number | string;
8
- withText?: boolean;
9
- bgColor?: string;
10
- color?: string;
11
- indeterminate?: boolean;
12
- }
4
+ import type { Ui3nProgressLinearProps } from './types';
13
5
 
14
6
  const thresholdHeight = 12;
15
7
  const thresholdValue = 5;
@@ -0,0 +1,5 @@
1
+ export interface Ui3nStepLineBarProps {
2
+ label: string;
3
+ current: number;
4
+ steps: number;
5
+ }
@@ -1,9 +1,5 @@
1
1
  <script lang="ts" setup>
2
- export interface Ui3nStepLineBarProps {
3
- label: string;
4
- current: number;
5
- steps: number;
6
- }
2
+ import type { Ui3nStepLineBarProps } from './types';
7
3
 
8
4
  withDefaults(
9
5
  defineProps<Ui3nStepLineBarProps>(),
@@ -0,0 +1,17 @@
1
+ import { VNode } from 'vue';
2
+
3
+ export interface Ui3nSwitchProps {
4
+ modelValue: boolean;
5
+ size?: number | string;
6
+ color?: string;
7
+ disabled?: boolean;
8
+ }
9
+
10
+ export interface Ui3nSwitchEmits {
11
+ (ev: 'change', value: boolean): void;
12
+ (ev: 'update:modelValue', value: boolean): void;
13
+ }
14
+
15
+ export interface Ui3nSwitchSlots {
16
+ default: () => VNode;
17
+ }
@@ -1,21 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { onMounted, ref, watch, useSlots } from 'vue';
3
-
4
- export interface Ui3nSwitchProps {
5
- modelValue: boolean;
6
- size?: number | string;
7
- color?: string;
8
- disabled?: boolean;
9
- }
10
-
11
- export interface Ui3nSwitchEmits {
12
- (ev: 'change', value: boolean): void;
13
- (ev: 'update:modelValue', value: boolean): void;
14
- }
15
-
16
- export interface Ui3nSwitchSlots {
17
- default: () => any;
18
- }
3
+ import type { Ui3nSwitchEmits, Ui3nSwitchProps, Ui3nSwitchSlots } from './types';
19
4
 
20
5
  const props = withDefaults(
21
6
  defineProps<Ui3nSwitchProps>(),
@@ -7,7 +7,7 @@ import {
7
7
  Ui3nTableProps,
8
8
  Ui3nTableSort,
9
9
  } from '@/components/ui3n-table/types';
10
- import type { Ui3nCheckboxValue } from '../../ui3n-checkbox.vue';
10
+ import type { Ui3nCheckboxValue } from '@/components/ui3n-checkbox/types';
11
11
 
12
12
  export function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<T>, emits: Ui3nTableEmits<T>) {
13
13
  const tableEl = ref<HTMLDivElement | null>(null);
@@ -78,3 +78,9 @@ export type Ui3nTableSlots<T extends Ui3nTableBodyBaseItem, K extends string & k
78
78
  Ui3nTableHeaderCellSlot<T, K> &
79
79
  Ui3nTableBodyRowSlot<T> &
80
80
  Ui3nTableBodyRowCellSlot<T, K>;
81
+
82
+ export interface Ui3nTableSortIconProps {
83
+ size?: string | number;
84
+ color?: string;
85
+ value: 'asc' | 'desc';
86
+ }
@@ -1,12 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed } from 'vue'
3
- import Ui3nIcon from './ui3n-icon.vue'
4
-
5
- export interface Ui3nTableSortIconProps {
6
- size?: string | number;
7
- color?: string;
8
- value: 'asc' | 'desc';
9
- }
3
+ import Ui3nIcon from '../ui3n-icon/ui3n-icon.vue'
4
+ import type { Ui3nTableSortIconProps } from './types';
10
5
 
11
6
  const props = defineProps<Ui3nTableSortIconProps>()
12
7
 
@@ -6,9 +6,9 @@ import type {
6
6
  Ui3nTableProps,
7
7
  Ui3nTableSlots,
8
8
  } from './types';
9
- import Ui3nButton from '../ui3n-button.vue';
10
- import Ui3nCheckbox from '../ui3n-checkbox.vue';
11
- import Ui3nTableSortIcon from '../ui3n-table-sort-icon.vue';
9
+ import Ui3nButton from '../ui3n-button/ui3n-button.vue';
10
+ import Ui3nCheckbox from '../ui3n-checkbox/ui3n-checkbox.vue';
11
+ import Ui3nTableSortIcon from './ui3n-table-sort-icon.vue';
12
12
 
13
13
  const props = defineProps<Ui3nTableProps<T>>();
14
14
  const emits = defineEmits<Ui3nTableEmits<T>>();
@@ -0,0 +1,19 @@
1
+ import { VNode } from 'vue';
2
+
3
+ export interface Ui3nTabsProps {
4
+ modelValue: number;
5
+ itemDirection?: 'horizontal' | 'vertical';
6
+ activeColor?: string;
7
+ inactiveColor?: string;
8
+ indicatorColor?: string;
9
+ indicatorSize?: number | string;
10
+ indicatorPosition?: 'normal' | 'reverse';
11
+ }
12
+
13
+ export interface Ui3nTabsEmits {
14
+ (ev: 'update:modelValue', val: number): void;
15
+ }
16
+
17
+ export interface Ui3nTabsSlots {
18
+ default: () => VNode;
19
+ }
@@ -1,24 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed, onMounted, ref, watch, useCssModule } from 'vue';
3
-
4
- export interface Ui3nTabsProps {
5
- modelValue: number;
6
- itemDirection?: 'horizontal' | 'vertical';
7
- activeColor?: string;
8
- inactiveColor?: string;
9
- indicatorColor?: string;
10
- indicatorSize?: number | string;
11
- indicatorPosition?: 'normal' | 'reverse';
12
- }
13
-
14
- export interface Ui3nTabsEmits {
15
- (ev: 'update:modelValue', val: number): void;
16
- }
17
-
18
- export interface Ui3nTabsSlots {
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- default: () => any;
21
- }
3
+ import type { Ui3nTabsEmits, Ui3nTabsProps, Ui3nTabsSlots } from './types';
22
4
 
23
5
  const props = withDefaults(
24
6
  defineProps<Ui3nTabsProps>(),
@@ -33,6 +15,7 @@ const props = withDefaults(
33
15
  },
34
16
  );
35
17
  const emits = defineEmits<Ui3nTabsEmits>();
18
+ defineSlots<Ui3nTabsSlots>();
36
19
 
37
20
  const $style = useCssModule();
38
21
 
@@ -100,7 +83,7 @@ const onClick = (ev: MouseEvent) => {
100
83
  </template>
101
84
 
102
85
  <style lang="scss" module>
103
- @import "../assets/styles/mixins";
86
+ @import "../../assets/styles/mixins";
104
87
 
105
88
  .tabs {
106
89
  --ui3n-tabs-height: 48px;
@@ -0,0 +1,18 @@
1
+ export interface Ui3nTextProps {
2
+ text: string;
3
+ rows?: number;
4
+ maxRows?: number;
5
+ label?: string;
6
+ placeholder?: string;
7
+ rules?: Array<(v: string) => string | boolean>;
8
+ disabled?: boolean;
9
+ }
10
+
11
+ export interface Ui3nTextEmits {
12
+ (ev: 'init', value: HTMLTextAreaElement): void;
13
+ (ev: 'input', value: string): void;
14
+ (ev: 'focus', value: Event): void;
15
+ (ev: 'blur', value: Event): void;
16
+ (ev: 'update:text', value: string): void;
17
+ (ev: 'update:valid', value: boolean): void;
18
+ }