@finmars/ui 1.0.36 → 1.0.38

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.
@@ -0,0 +1,110 @@
1
+ import { ComputedRef, Ref, VNode } from 'vue';
2
+ interface ListItem<T = any> {
3
+ title: string;
4
+ props: {
5
+ [key: string]: any;
6
+ title: string;
7
+ value: any;
8
+ };
9
+ children?: ListItem<T>[];
10
+ }
11
+ export interface FmVSelectProps<T> {
12
+ appendIcon?: string;
13
+ bgColor?: string;
14
+ color?: string;
15
+ density: 'default' | 'comfortable' | 'compact';
16
+ chips?: boolean;
17
+ clearable?: boolean;
18
+ closableChips?: boolean;
19
+ disabled?: boolean;
20
+ error?: boolean;
21
+ errorMessages?: string | string[];
22
+ focused?: boolean;
23
+ hideDetails?: boolean;
24
+ hideNoData?: boolean;
25
+ hideSelected?: boolean;
26
+ hint?: string;
27
+ itemProps?: string | boolean;
28
+ items: T[];
29
+ itemTitle?: keyof T | string | any;
30
+ itemValue?: keyof T | string | any;
31
+ loading?: boolean;
32
+ menu?: boolean;
33
+ menuProps?: any;
34
+ messages?: string | string[];
35
+ maxWidth?: number | string;
36
+ minWidth?: number | string;
37
+ width?: number | string;
38
+ modelValue?: T | T[keyof T] | any;
39
+ multiple?: boolean;
40
+ name?: string;
41
+ noDataText?: string;
42
+ openOnClear?: boolean;
43
+ placeholder?: string;
44
+ prependIcon?: string | any;
45
+ prependInnerIcon?: string | any;
46
+ readonly?: boolean;
47
+ returnObject?: boolean;
48
+ rounded?: string | number | boolean;
49
+ singleLine?: boolean;
50
+ tile?: boolean;
51
+ variant?: 'outlined' | 'plain' | 'underlined' | 'filled' | 'solo' | 'solo-inverted' | 'solo-filled';
52
+ }
53
+ export interface FmVSelectEmits<T> {
54
+ (event: 'click:clear', value: MouseEvent): void;
55
+ (event: 'click:prepend', value: MouseEvent): void;
56
+ (event: 'click:prependInner', value: MouseEvent): void;
57
+ (event: 'click:selection', value: MouseEvent): void;
58
+ (event: 'update:focused', value: boolean): void;
59
+ (event: 'update:modelValue', value: T | T[keyof T] | unknown): void;
60
+ }
61
+ export interface FmVSelectSlots<T> {
62
+ 'append-inner': (props: {
63
+ isActive: Ref<boolean>;
64
+ isFocused: Ref<boolean>;
65
+ controlRef: Ref<HTMLElement | undefined>;
66
+ }) => VNode;
67
+ chip: (props: {
68
+ item: ListItem<T>;
69
+ index: number;
70
+ props: Record<string, any>;
71
+ }) => VNode;
72
+ clear: (props: {
73
+ isActive: Ref<boolean>;
74
+ isFocused: Ref<boolean>;
75
+ controlRef: Ref<HTMLElement | undefined>;
76
+ }) => VNode;
77
+ details: (props: {
78
+ id: ComputedRef<string>;
79
+ messagesId: ComputedRef<string>;
80
+ isDirty: ComputedRef<boolean>;
81
+ isDisabled: ComputedRef<boolean>;
82
+ isReadonly: ComputedRef<boolean>;
83
+ isPristine: Ref<boolean>;
84
+ isValid: ComputedRef<boolean | null>;
85
+ isValidating: Ref<boolean>;
86
+ }) => VNode;
87
+ item: (props: {
88
+ item: ListItem<T>;
89
+ index: number;
90
+ props: Record<string, any>;
91
+ }) => VNode;
92
+ loader: (props: {
93
+ color?: string;
94
+ isActive: boolean;
95
+ }) => VNode;
96
+ message: (props: {
97
+ message: string;
98
+ }) => VNode;
99
+ 'no-data': () => VNode;
100
+ 'prepend-inner': (props: {
101
+ isActive: Ref<boolean>;
102
+ isFocused: Ref<boolean>;
103
+ controlRef: Ref<HTMLElement | undefined>;
104
+ }) => VNode;
105
+ selection: (props: {
106
+ item: ListItem<T>;
107
+ index: number;
108
+ }) => VNode;
109
+ }
110
+ export {};
@@ -3,6 +3,7 @@ import { default as FmBadge } from './components/fm/Badge/Badge.vue';
3
3
  import { default as FmButton } from './components/fm/Button/Button.vue';
4
4
  import { default as FmCheckbox } from './components/fm/Checkbox/Checkbox.vue';
5
5
  import { default as FmChip } from './components/fm/Chip/Chip.vue';
6
+ import { FmChipProps, FmChipEmits, FmChipSlots } from './components/fm/Chip/types';
6
7
  import { default as FmDateEditor } from './components/fm/DateEditor/DateEditor.vue';
7
8
  import { default as FmDatePicker } from './components/fm/DatePicker/DatePicker.vue';
8
9
  import { default as FmIcon } from './components/fm/Icon/Icon.vue';
@@ -10,6 +11,7 @@ import { FmIconProps, FmIconSlots } from './components/fm/Icon/types';
10
11
  import { default as FmIconButton } from './components/fm/IconButton/IconButton.vue';
11
12
  import { default as FmItemPicker } from './components/fm/ItemPicker/ItemPicker.vue';
12
13
  import { default as FmLogo } from './components/fm/Logo/Logo.vue';
14
+ import { default as FmMenuItem } from './components/fm/Menu/MenuItem.vue';
13
15
  import { default as FmMenu } from './components/fm/Menu/Menu.vue';
14
16
  import { default as FmNavigationPortal } from './components/fm/Navigation/NavigationPortal.vue';
15
17
  import { default as FmNavigation } from './components/fm/Navigation/Navigation.vue';
@@ -21,13 +23,17 @@ import { default as FmRadio } from './components/fm/Radio/Radio.vue';
21
23
  import { default as FmRadioGroup } from './components/fm/Radio/RadioGroup.vue';
22
24
  import { default as FmRangeSlider } from './components/fm/RangeSlider/RangeSlider.vue';
23
25
  import { default as FmSearch } from './components/fm/Search/Search.vue';
26
+ import { default as FmVSelect } from './components/fm/VSelect/VSelect.vue';
27
+ import { FmVSelectProps, FmVSelectEmits, FmVSelectSlots } from './components/fm/VSelect/types';
24
28
  import { default as FmSelect } from './components/fm/Select/Select.vue';
25
- import { FmSelectProps, FmSelectEmits, FmSelectSlots } from './components/fm/Select/types';
29
+ import { default as FmSelectActivator } from './components/fm/Select/SelectActivator.vue';
30
+ import { FmSelectOption, FmSelectActivatorProps, FmSelectActivatorEmits, FmSelectActivatorSlots, FmSelectProps, FmSelectEmits, FmSelectSlots } from './components/fm/Select/types';
26
31
  import { default as FmSlider } from './components/fm/Slider/Slider.vue';
27
32
  import { default as FmTextField } from './components/fm/TextField/TextField.vue';
28
33
  import { default as FmTooltip } from './components/fm/Tooltip/Tooltip.vue';
29
34
  import { default as FmHeader } from '../stories/Header.vue';
30
- export { FmHeader, FmNavigationPortal, FmNavigation, FmAvatar, FmBadge, FmButton, FmCheckbox, FmChip, FmDateEditor, FmDatePicker, FmIcon, FmIconButton, FmItemPicker, FmLogo, FmMenu, FmPagination, FmProgressCircular, FmProgressLinear, FmRadio, FmRadioGroup, FmRangeSlider, FmSearch, FmSelect, FmSlider, FmTextField, FmTooltip, FmIconProps, FmIconSlots, FmPaginationProps, FmPaginationEmits, FmSelectProps, FmSelectEmits, FmSelectSlots, };
35
+ export * from './types';
36
+ export { FmHeader, FmNavigationPortal, FmNavigation, FmAvatar, FmBadge, FmButton, FmCheckbox, FmChip, FmDateEditor, FmDatePicker, FmIcon, FmIconButton, FmItemPicker, FmLogo, FmMenuItem, FmMenu, FmPagination, FmProgressCircular, FmProgressLinear, FmRadio, FmRadioGroup, FmRangeSlider, FmSearch, FmSelect, FmSelectActivator, FmSlider, FmTextField, FmTooltip, FmVSelect, FmChipProps, FmChipEmits, FmChipSlots, FmIconProps, FmIconSlots, FmPaginationProps, FmPaginationEmits, FmSelectOption, FmSelectActivatorProps, FmSelectActivatorEmits, FmSelectActivatorSlots, FmSelectProps, FmSelectEmits, FmSelectSlots, FmVSelectProps, FmVSelectEmits, FmVSelectSlots };
31
37
  /**
32
38
  * VUE plugin that registers all components
33
39
  *
@@ -52,6 +58,7 @@ declare module 'vue' {
52
58
  FmIconButton: typeof FmIconButton;
53
59
  FmItemPicker: typeof FmItemPicker;
54
60
  FmLogo: typeof FmLogo;
61
+ FmMenuItem: typeof FmMenuItem;
55
62
  FmMenu: typeof FmMenu;
56
63
  FmPagination: typeof FmPagination;
57
64
  FmProgressCircular: typeof FmProgressCircular;
@@ -61,8 +68,10 @@ declare module 'vue' {
61
68
  FmRangeSlider: typeof FmRangeSlider;
62
69
  FmSearch: typeof FmSearch;
63
70
  FmSelect: typeof FmSelect;
71
+ FmSelectActivator: typeof FmSelectActivator;
64
72
  FmSlider: typeof FmSlider;
65
73
  FmTextField: typeof FmTextField;
66
74
  FmTooltip: typeof FmTooltip;
75
+ FmVSelect: typeof FmVSelect;
67
76
  }
68
77
  }
@@ -0,0 +1,5 @@
1
+ export interface FmComponentIcon {
2
+ icon: string;
3
+ size?: number | string;
4
+ color?: string;
5
+ }
@@ -0,0 +1 @@
1
+ export * from './general';
@@ -0,0 +1,9 @@
1
+ export declare function getRandomString(numOfChars: number): string;
2
+ /**
3
+ * функция округления с заданной точностью
4
+ * @param num {number} - округляемое число
5
+ * @param precision {number} - точность округления (количество знаков после запятой
6
+ * указывается со знаком "-")
7
+ * @return {number} - скорректированная округленная десятичная дробь
8
+ */
9
+ export declare function round(num: number, precision: number): number;
@@ -0,0 +1 @@
1
+ export * from './common';
package/dist/themes.css CHANGED
@@ -121,6 +121,8 @@
121
121
  --nv-95: #ffede8;
122
122
  --nv-99: #fffbfc;
123
123
  --nv-100: #fff;
124
+
125
+ --v-theme-overlay-multiplier: 1;
124
126
  }
125
127
 
126
128
  .light-theme {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finmars/ui",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "vite dev --config vite.config.dev.js",
@@ -34,17 +34,17 @@
34
34
  "author": "Sergei Zhitenev",
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "devDependencies": {
37
- "@chromatic-com/storybook": "^1.5.0",
38
- "@storybook/addon-essentials": "^8.3.6",
39
- "@storybook/addon-interactions": "^8.3.6",
40
- "@storybook/addon-links": "^8.3.6",
41
- "@storybook/addon-toolbars": "^8.3.6",
42
- "@storybook/blocks": "^8.3.6",
43
- "@storybook/manager-api": "^8.3.6",
44
- "@storybook/test": "^8.3.6",
45
- "@storybook/theming": "^8.3.6",
46
- "@storybook/vue3": "^8.3.6",
47
- "@storybook/vue3-vite": "^8.3.6",
37
+ "@chromatic-com/storybook": "^1.9.0",
38
+ "@storybook/addon-essentials": "^8.4.2",
39
+ "@storybook/addon-interactions": "^8.4.2",
40
+ "@storybook/addon-links": "^8.4.2",
41
+ "@storybook/addon-toolbars": "^8.4.2",
42
+ "@storybook/blocks": "^8.4.2",
43
+ "@storybook/manager-api": "^8.4.2",
44
+ "@storybook/test": "^8.4.2",
45
+ "@storybook/theming": "^8.4.2",
46
+ "@storybook/vue3": "^8.4.2",
47
+ "@storybook/vue3-vite": "^8.4.2",
48
48
  "@types/lodash": "^4.17.13",
49
49
  "@vuedx/typescript-plugin-vue": "^0.7.6",
50
50
  "autoprefixer": "^10.4.19",
@@ -59,11 +59,12 @@
59
59
  "prettier": "^3.3.3",
60
60
  "rimraf": "^6.0.1",
61
61
  "sass-embedded": "^1.80.4",
62
- "storybook": "^8.3.6",
62
+ "storybook": "^8.4.2",
63
63
  "tailwindcss": "^3.4.11",
64
64
  "typescript": "^5.6.3",
65
65
  "vite": "^5.4.10",
66
66
  "vite-plugin-dts": "^4.3.0",
67
+ "vite-plugin-vue-devtools": "^7.6.4",
67
68
  "vue-tsc": "^2.1.10"
68
69
  },
69
70
  "dependencies": {
@@ -75,6 +76,6 @@
75
76
  "vite-plugin-vuetify": "^2.0.4",
76
77
  "vite-svg-loader": "^5.1.0",
77
78
  "vue": "^3.5.12",
78
- "vuetify": "^3.7.3"
79
+ "vuetify": "^3.7.4"
79
80
  }
80
81
  }