@v1nt1248/3nclient-lib 0.3.8 → 0.3.11

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 (84) hide show
  1. package/README.md +3 -2
  2. package/dist/components/ui3n-autocomplete/types.d.ts +100 -0
  3. package/dist/components/ui3n-badge/types.d.ts +14 -0
  4. package/dist/components/ui3n-badge/ui3n-badge.vue.d.ts +2 -4
  5. package/dist/components/ui3n-breadcrumbs/types.d.ts +50 -0
  6. package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue.d.ts +2 -4
  7. package/dist/components/ui3n-button/types.d.ts +21 -0
  8. package/dist/components/ui3n-button/ui3n-button.vue.d.ts +2 -4
  9. package/dist/components/ui3n-checkbox/types.d.ts +44 -0
  10. package/dist/components/ui3n-chip/types.d.ts +49 -0
  11. package/dist/components/ui3n-dialog/types.d.ts +103 -0
  12. package/dist/components/ui3n-drop-files/types.d.ts +31 -0
  13. package/dist/components/ui3n-editable/types.d.ts +102 -0
  14. package/dist/components/ui3n-emoji/types.d.ts +13 -0
  15. package/dist/components/ui3n-icon/types.d.ts +10 -0
  16. package/dist/components/ui3n-input/types.d.ts +85 -0
  17. package/dist/components/ui3n-input-file/types.d.ts +29 -0
  18. package/dist/components/ui3n-list/types.d.ts +35 -0
  19. package/dist/components/ui3n-menu/types.d.ts +89 -0
  20. package/dist/components/ui3n-notification/types.d.ts +28 -0
  21. package/dist/components/ui3n-progress/types.d.ts +49 -0
  22. package/dist/components/ui3n-radio-group/types.d.ts +78 -0
  23. package/dist/components/ui3n-selector/types.d.ts +95 -0
  24. package/dist/components/ui3n-slider/types.d.ts +51 -0
  25. package/dist/components/ui3n-step-line-bar/types.d.ts +12 -0
  26. package/dist/components/ui3n-switch/types.d.ts +31 -0
  27. package/dist/components/ui3n-table/types.d.ts +198 -0
  28. package/dist/components/ui3n-tabs/types.d.ts +38 -0
  29. package/dist/components/ui3n-text/types.d.ts +56 -0
  30. package/dist/components/ui3n-tooltip/types.d.ts +69 -0
  31. package/dist/components/ui3n-virtual-scroll/types.d.ts +18 -0
  32. package/dist/constants/general.d.ts +0 -1
  33. package/dist/constants/plugins-keys.d.ts +0 -2
  34. package/dist/index.d.ts +0 -8
  35. package/dist/plugins/index.d.ts +1 -4
  36. package/dist/style.css +1 -1
  37. package/dist/ui3n-components.js +14949 -14627
  38. package/dist/ui3n-plugins.d.ts +3 -11
  39. package/dist/ui3n-plugins.js +338 -367
  40. package/dist/ui3n-utils.js +422 -439
  41. package/dist/utils/copy-to-clipboard.d.ts +1 -0
  42. package/dist/utils/execute-function.d.ts +29 -0
  43. package/dist/utils/index.d.ts +3 -0
  44. package/dist/utils/remove-whitespace-in-string.d.ts +1 -0
  45. package/dist/utils/ui/get-element-color.d.ts +1 -1
  46. package/package.json +29 -26
  47. package/src/components/ui3n-autocomplete/types.ts +100 -0
  48. package/src/components/ui3n-badge/types.ts +16 -0
  49. package/src/components/ui3n-badge/ui3n-badge-simple.vue +10 -9
  50. package/src/components/ui3n-badge/ui3n-badge.vue +37 -36
  51. package/src/components/ui3n-breadcrumbs/types.ts +51 -0
  52. package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +69 -69
  53. package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +7 -8
  54. package/src/components/ui3n-button/types.ts +23 -0
  55. package/src/components/ui3n-button/ui3n-button.vue +27 -29
  56. package/src/components/ui3n-checkbox/types.ts +44 -0
  57. package/src/components/ui3n-checkbox/ui3n-checkbox.vue +16 -23
  58. package/src/components/ui3n-chip/types.ts +51 -0
  59. package/src/components/ui3n-dialog/types.ts +103 -0
  60. package/src/components/ui3n-drop-files/types.ts +31 -0
  61. package/src/components/ui3n-editable/types.ts +102 -0
  62. package/src/components/ui3n-editable/useContentEditable.ts +4 -2
  63. package/src/components/ui3n-emoji/types.ts +13 -0
  64. package/src/components/ui3n-icon/types.ts +10 -0
  65. package/src/components/ui3n-input/types.ts +85 -0
  66. package/src/components/ui3n-input/ui3n-input.vue +15 -3
  67. package/src/components/ui3n-input-file/types.ts +29 -0
  68. package/src/components/ui3n-list/types.ts +35 -0
  69. package/src/components/ui3n-menu/types.ts +89 -0
  70. package/src/components/ui3n-notification/types.ts +28 -0
  71. package/src/components/ui3n-progress/types.ts +49 -0
  72. package/src/components/ui3n-radio-group/types.ts +78 -0
  73. package/src/components/ui3n-selector/types.ts +96 -1
  74. package/src/components/ui3n-slider/types.ts +51 -0
  75. package/src/components/ui3n-step-line-bar/types.ts +12 -0
  76. package/src/components/ui3n-switch/types.ts +31 -0
  77. package/src/components/ui3n-table/types.ts +204 -0
  78. package/src/components/ui3n-tabs/types.ts +38 -0
  79. package/src/components/ui3n-text/types.ts +56 -0
  80. package/src/components/ui3n-tooltip/types.ts +69 -0
  81. package/src/components/ui3n-virtual-scroll/types.ts +18 -0
  82. package/dist/plugins/i18n/i18n.d.ts +0 -9
  83. package/dist/plugins/i18n/store-i18n.d.ts +0 -7
  84. package/dist/plugins/i18n/types.d.ts +0 -9
@@ -1,18 +1,67 @@
1
+ /**
2
+ * Circular progress component properties
3
+ */
1
4
  export interface Ui3nProgressCircularProps {
5
+ /**
6
+ * Progress value
7
+ */
2
8
  value?: number | string;
9
+ /**
10
+ * Progress size
11
+ */
3
12
  size?: number | string;
13
+ /**
14
+ * Progress width
15
+ */
4
16
  width?: number | string;
17
+ /**
18
+ * Whether to show text
19
+ * @default false
20
+ */
5
21
  withText?: boolean;
22
+ /**
23
+ * Background color
24
+ */
6
25
  bgColor?: string;
26
+ /**
27
+ * Progress color
28
+ */
7
29
  color?: string;
30
+ /**
31
+ * Whether progress is indeterminate
32
+ * @default false
33
+ */
8
34
  indeterminate?: boolean;
9
35
  }
10
36
 
37
+ /**
38
+ * Linear progress component properties
39
+ */
11
40
  export interface Ui3nProgressLinearProps {
41
+ /**
42
+ * Progress value
43
+ */
12
44
  value?: number | string;
45
+ /**
46
+ * Progress height
47
+ */
13
48
  height?: number | string;
49
+ /**
50
+ * Whether to show text
51
+ * @default false
52
+ */
14
53
  withText?: boolean;
54
+ /**
55
+ * Background color
56
+ */
15
57
  bgColor?: string;
58
+ /**
59
+ * Progress color
60
+ */
16
61
  color?: string;
62
+ /**
63
+ * Whether progress is indeterminate
64
+ * @default false
65
+ */
17
66
  indeterminate?: boolean;
18
67
  }
@@ -1,39 +1,117 @@
1
1
  import { VNode } from 'vue';
2
2
 
3
+ /**
4
+ * Radio value type
5
+ */
3
6
  export type Ui3nRadioValue = boolean | string | number;
4
7
 
8
+ /**
9
+ * Radio component properties
10
+ */
5
11
  export interface Ui3nRadioProps {
12
+ /**
13
+ * Current radio value
14
+ */
6
15
  modelValue?: Ui3nRadioValue;
16
+ /**
17
+ * Value when radio is checked
18
+ */
7
19
  checkedValue?: Ui3nRadioValue;
20
+ /**
21
+ * Value when radio is unchecked
22
+ */
8
23
  uncheckedValue?: Ui3nRadioValue;
24
+ /**
25
+ * Radio size
26
+ */
9
27
  size?: number | string;
28
+ /**
29
+ * Radio color
30
+ */
10
31
  color?: string;
32
+ /**
33
+ * Whether radio is disabled
34
+ * @default false
35
+ */
11
36
  disabled?: boolean;
12
37
  }
13
38
 
39
+ /**
40
+ * Radio component emits
41
+ */
14
42
  export interface Ui3nRadioEmits {
43
+ /**
44
+ * Emitted when radio value changes
45
+ */
15
46
  (ev: 'change', value: Ui3nRadioValue): void;
47
+ /**
48
+ * Emitted when model value updates
49
+ */
16
50
  (ev: 'update:modelValue', value: Ui3nRadioValue): void;
17
51
  }
18
52
 
53
+ /**
54
+ * Radio component slots
55
+ */
19
56
  export interface Ui3nRadioSlots {
57
+ /**
58
+ * Checked icon slot
59
+ */
20
60
  checkedIcon: () => VNode;
61
+ /**
62
+ * Unchecked icon slot
63
+ */
21
64
  uncheckedIcon: () => VNode;
65
+ /**
66
+ * Default slot
67
+ */
22
68
  default: () => VNode;
23
69
  }
24
70
 
71
+ /**
72
+ * Radio group component properties
73
+ */
25
74
  export interface Ui3nRadioGroupProps {
75
+ /**
76
+ * Radio group name
77
+ */
26
78
  name: string;
79
+ /**
80
+ * Current radio group value
81
+ */
27
82
  modelValue: Ui3nRadioValue;
83
+ /**
84
+ * Radio group direction
85
+ * @default 'vertical'
86
+ */
28
87
  direction?: 'horizontal' | 'vertical';
88
+ /**
89
+ * Whether radio group is disabled
90
+ * @default false
91
+ */
29
92
  disabled?: boolean;
30
93
  }
31
94
 
95
+ /**
96
+ * Radio group component emits
97
+ */
32
98
  export interface Ui3nRadioGroupEmits {
99
+ /**
100
+ * Emitted when radio group value changes
101
+ */
33
102
  (ev: 'change', value: Ui3nRadioValue): void;
103
+ /**
104
+ * Emitted when model value updates
105
+ */
34
106
  (ev: 'update:modelValue', value: Ui3nRadioValue): void;
35
107
  }
36
108
 
109
+ /**
110
+ * Radio group component slots
111
+ */
37
112
  export interface Ui3nRadioGroupSlots {
113
+ /**
114
+ * Default slot
115
+ */
38
116
  default: () => VNode;
39
117
  }
@@ -1,40 +1,120 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import type { VNode } from 'vue';
3
- import type { PrepareComponentEmits, Nullable } from '../../types';
3
+ import type { PrepareComponentEmits, Nullable } from '@/types';
4
4
 
5
+ /**
6
+ * Base selector option interface
7
+ */
5
8
  export interface Ui3nSelectorOptionBase {
9
+ /**
10
+ * Option ID
11
+ */
6
12
  id: string;
7
13
  [key: string]: any;
8
14
  }
9
15
 
16
+ /**
17
+ * Function to display selector item
18
+ */
10
19
  export type Ui3nSelectorItemDisplayingFunction<T extends Ui3nSelectorOptionBase> = (v: T) => string;
11
20
 
21
+ /**
22
+ * Selector value type
23
+ */
12
24
  export type Ui3nSelectorValue<T extends Ui3nSelectorOptionBase> = T | T[keyof T] | null;
13
25
 
26
+ /**
27
+ * Selector component properties
28
+ */
14
29
  export interface Ui3nSelectorProps<T extends Ui3nSelectorOptionBase> {
30
+ /**
31
+ * Current selector value
32
+ */
15
33
  modelValue: Ui3nSelectorValue<T>;
34
+ /**
35
+ * Label text
36
+ */
16
37
  label?: string;
38
+ /**
39
+ * Placeholder text
40
+ */
17
41
  placeholder?: string;
42
+ /**
43
+ * Items to display
44
+ */
18
45
  items?: T[];
46
+ /**
47
+ * Property to use as value
48
+ */
19
49
  itemValue?: keyof T;
50
+ /**
51
+ * Property or function to display item
52
+ */
20
53
  itemDisplay?: keyof T | Ui3nSelectorItemDisplayingFunction<T>;
54
+ /**
55
+ * Custom filter function
56
+ */
21
57
  customFilter?: (value: Ui3nSelectorValue<T>, query: string) => boolean;
58
+ /**
59
+ * Whether to return the whole object or just the value
60
+ * @default false
61
+ */
22
62
  returnObject?: boolean;
63
+ /**
64
+ * Whether to show clear button
65
+ * @default false
66
+ */
23
67
  clearable?: boolean;
68
+ /**
69
+ * Whether to show search input
70
+ * @default false
71
+ */
24
72
  withSearch?: boolean;
73
+ /**
74
+ * Whether to hide selected item
75
+ * @default false
76
+ */
25
77
  hideSelected?: boolean;
78
+ /**
79
+ * Text to show when no data
80
+ */
26
81
  noDataText?: string;
82
+ /**
83
+ * Whether selector is disabled
84
+ * @default false
85
+ */
27
86
  disabled?: boolean;
28
87
  }
29
88
 
89
+ /**
90
+ * Selector component events map
91
+ */
30
92
  export interface Ui3nSelectorEventsMap<T extends Ui3nSelectorOptionBase> {
93
+ /**
94
+ * Emitted when model value updates
95
+ */
31
96
  'update:modelValue': Ui3nSelectorValue<T>;
97
+ /**
98
+ * Emitted when list is opened
99
+ */
32
100
  'list:open': undefined;
101
+ /**
102
+ * Emitted when list is closed
103
+ */
33
104
  'list:close': undefined;
105
+ /**
106
+ * Emitted when component is focused
107
+ */
34
108
  focus: undefined;
109
+ /**
110
+ * Emitted when component loses focus
111
+ */
35
112
  blur: undefined;
36
113
  }
37
114
 
115
+ /**
116
+ * Selector component events type
117
+ */
38
118
  export type Ui3nSelectorEvents = keyof Ui3nSelectorEventsMap<any>;
39
119
 
40
120
  // export interface Ui3nSelectorEmits<T extends Ui3nSelectorOptionBase> {
@@ -45,10 +125,25 @@ export type Ui3nSelectorEvents = keyof Ui3nSelectorEventsMap<any>;
45
125
  // (event: 'blur'): void;
46
126
  // }
47
127
 
128
+ /**
129
+ * Selector component emits
130
+ */
48
131
  export type Ui3nSelectorEmits<T extends Ui3nSelectorOptionBase> = PrepareComponentEmits<Ui3nSelectorEventsMap<T>>;
49
132
 
133
+ /**
134
+ * Selector component slots
135
+ */
50
136
  export interface Ui3nSelectorSlots<T extends Ui3nSelectorOptionBase> {
137
+ /**
138
+ * No data text slot
139
+ */
51
140
  noDataText?: () => VNode;
141
+ /**
142
+ * Item slot
143
+ */
52
144
  item?: (props: { item: T; index: number; activeIndex: Nullable<number>; query?: string }) => VNode;
145
+ /**
146
+ * Selection slot
147
+ */
53
148
  selection?: (props: { value: Ui3nSelectorValue<T>; selectedItem: T | undefined }) => VNode;
54
149
  }
@@ -1,21 +1,72 @@
1
1
  export interface UI3nSliderProps {
2
+ /**
3
+ * Current slider value
4
+ */
2
5
  modelValue: number | [number, number];
6
+ /**
7
+ * Slider step
8
+ */
3
9
  step?: string | number;
10
+ /**
11
+ * Whether slider is range
12
+ * @default false
13
+ */
4
14
  range?: boolean;
15
+ /**
16
+ * Minimum value
17
+ */
5
18
  min?: string | number;
19
+ /**
20
+ * Maximum value
21
+ */
6
22
  max?: string | number;
23
+ /**
24
+ * Label visibility
25
+ * @default 'normal'
26
+ */
7
27
  labelVisible?: 'always' | 'normal' | 'never';
28
+ /**
29
+ * Label text color
30
+ */
8
31
  labelTextColor?: string;
32
+ /**
33
+ * Label color
34
+ */
9
35
  labelColor?: string;
36
+ /**
37
+ * Active color
38
+ */
10
39
  activeColor?: string;
40
+ /**
41
+ * Track color
42
+ */
11
43
  trackColor?: string;
44
+ /**
45
+ * Track height
46
+ */
12
47
  trackHeight?: string | number;
48
+ /**
49
+ * Thumb size
50
+ */
13
51
  thumbSize?: string | number;
52
+ /**
53
+ * Thumb color
54
+ */
14
55
  thumbColor?: string;
56
+ /**
57
+ * Transform value method
58
+ */
15
59
  transformValueMethod?: (value: number) => string;
60
+ /**
61
+ * Whether slider is disabled
62
+ * @default false
63
+ */
16
64
  disabled?: boolean;
17
65
  }
18
66
 
19
67
  export interface UI3nSliderEmits {
68
+ /**
69
+ * Emitted when model value updates
70
+ */
20
71
  (event: 'update:modelValue', value: number | [number, number]): void;
21
72
  }
@@ -1,5 +1,17 @@
1
+ /**
2
+ * Step line bar component properties
3
+ */
1
4
  export interface Ui3nStepLineBarProps {
5
+ /**
6
+ * Step label
7
+ */
2
8
  label: string;
9
+ /**
10
+ * Current step
11
+ */
3
12
  current: number;
13
+ /**
14
+ * Total number of steps
15
+ */
4
16
  steps: number;
5
17
  }
@@ -1,17 +1,48 @@
1
1
  import { VNode } from 'vue';
2
2
 
3
+ /**
4
+ * Switch component properties
5
+ */
3
6
  export interface Ui3nSwitchProps {
7
+ /**
8
+ * Current switch value
9
+ */
4
10
  modelValue: boolean;
11
+ /**
12
+ * Switch size
13
+ */
5
14
  size?: number | string;
15
+ /**
16
+ * Switch color
17
+ */
6
18
  color?: string;
19
+ /**
20
+ * Whether switch is disabled
21
+ * @default false
22
+ */
7
23
  disabled?: boolean;
8
24
  }
9
25
 
26
+ /**
27
+ * Switch component emits
28
+ */
10
29
  export interface Ui3nSwitchEmits {
30
+ /**
31
+ * Emitted when switch value changes
32
+ */
11
33
  (ev: 'change', value: boolean): void;
34
+ /**
35
+ * Emitted when model value updates
36
+ */
12
37
  (ev: 'update:modelValue', value: boolean): void;
13
38
  }
14
39
 
40
+ /**
41
+ * Switch component slots
42
+ */
15
43
  export interface Ui3nSwitchSlots {
44
+ /**
45
+ * Default slot
46
+ */
16
47
  default: () => VNode;
17
48
  }