venice-ui 3.0.19 → 3.0.20
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.
- package/dist/cjs/components/ButtonsFooter/ButtonsFooter.js +2 -2
- package/dist/cjs/components/Modal/Modal.js +2 -2
- package/dist/esm/components/ButtonsFooter/ButtonsFooter.js +2 -2
- package/dist/esm/components/Modal/Modal.js +2 -2
- package/dist/types/components/ButtonsFooter/ButtonsFooter.d.ts +2 -1
- package/dist/types/components/Modal/Modal.d.ts +2 -1
- package/dist/types/components/Table/Table.d.ts +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ const ButtonsFooter = ({ theme, themeVariant, onPrimaryAction, onSecondaryAction
|
|
|
16
16
|
primary: config_2.wordbook.actions.confirm,
|
|
17
17
|
secondary: config_2.wordbook.actions.cancel,
|
|
18
18
|
additional: undefined,
|
|
19
|
-
}, }) => {
|
|
19
|
+
}, primaryVariant = 'primary', }) => {
|
|
20
20
|
const resolvedThemeData = (0, config_1.resolveThemeWithComponentsConfig)({
|
|
21
21
|
theme,
|
|
22
22
|
themeVariant,
|
|
@@ -43,7 +43,7 @@ const ButtonsFooter = ({ theme, themeVariant, onPrimaryAction, onSecondaryAction
|
|
|
43
43
|
additionalType === 'button' && (react_1.default.createElement(Button_1.Button, { mode: isAdditionalDanger ? 'danger' : 'ghost', onClick: additionAction, isDisabled: additionDisabled, text: labels.additional, size: size })),
|
|
44
44
|
additionalType === 'toggle' && (react_1.default.createElement(Toggle_1.Toggle, { label: labels.additional, value: additionalValue, handleClick: additionAction, labelPosition: "left", labelInversed: true, size: size })))))),
|
|
45
45
|
react_1.default.createElement(ButtonsFooter_styles_1.ButtonsFooterGroup, { config: buttonsFooterConfig, theme: resolvedTheme },
|
|
46
|
-
!primaryLoading && (react_1.default.createElement(Button_1.Button, { mode: isMultiButtons ? 'ghost' :
|
|
46
|
+
!primaryLoading && (react_1.default.createElement(Button_1.Button, { mode: isMultiButtons ? 'ghost' : primaryVariant, onClick: onSecondaryAction, text: labels.secondary || config_2.wordbook.actions.cancel, size: size })),
|
|
47
47
|
onPrimaryAction && labels.primary && (react_1.default.createElement(Button_1.Button, { onClick: onPrimaryAction, text: labels.primary, isDisabled: primaryDisabled, loader: primaryLoading, size: size })))))));
|
|
48
48
|
};
|
|
49
49
|
exports.ButtonsFooter = ButtonsFooter;
|
|
@@ -17,7 +17,7 @@ const Modal = ({ theme, themeVariant = 'default', isOpen, children, title, handl
|
|
|
17
17
|
primary: undefined,
|
|
18
18
|
secondary: config_1.wordbook.actions.ok,
|
|
19
19
|
additional: undefined,
|
|
20
|
-
}, }) => {
|
|
20
|
+
}, primaryVariant }) => {
|
|
21
21
|
const resolvedThemeData = (0, config_2.resolveThemeWithComponentsConfig)({
|
|
22
22
|
theme,
|
|
23
23
|
themeVariant,
|
|
@@ -48,6 +48,6 @@ const Modal = ({ theme, themeVariant = 'default', isOpen, children, title, handl
|
|
|
48
48
|
primary: labels.primary,
|
|
49
49
|
secondary: labels.secondary,
|
|
50
50
|
additional: labels.additional,
|
|
51
|
-
} })))), document.body)));
|
|
51
|
+
}, primaryVariant: primaryVariant })))), document.body)));
|
|
52
52
|
};
|
|
53
53
|
exports.Modal = Modal;
|
|
@@ -10,7 +10,7 @@ export const ButtonsFooter = ({ theme, themeVariant, onPrimaryAction, onSecondar
|
|
|
10
10
|
primary: wordbook.actions.confirm,
|
|
11
11
|
secondary: wordbook.actions.cancel,
|
|
12
12
|
additional: undefined,
|
|
13
|
-
}, }) => {
|
|
13
|
+
}, primaryVariant = 'primary', }) => {
|
|
14
14
|
const resolvedThemeData = resolveThemeWithComponentsConfig({
|
|
15
15
|
theme,
|
|
16
16
|
themeVariant,
|
|
@@ -37,6 +37,6 @@ export const ButtonsFooter = ({ theme, themeVariant, onPrimaryAction, onSecondar
|
|
|
37
37
|
additionalType === 'button' && (React.createElement(Button, { mode: isAdditionalDanger ? 'danger' : 'ghost', onClick: additionAction, isDisabled: additionDisabled, text: labels.additional, size: size })),
|
|
38
38
|
additionalType === 'toggle' && (React.createElement(Toggle, { label: labels.additional, value: additionalValue, handleClick: additionAction, labelPosition: "left", labelInversed: true, size: size })))))),
|
|
39
39
|
React.createElement(ButtonsFooterGroup, { config: buttonsFooterConfig, theme: resolvedTheme },
|
|
40
|
-
!primaryLoading && (React.createElement(Button, { mode: isMultiButtons ? 'ghost' :
|
|
40
|
+
!primaryLoading && (React.createElement(Button, { mode: isMultiButtons ? 'ghost' : primaryVariant, onClick: onSecondaryAction, text: labels.secondary || wordbook.actions.cancel, size: size })),
|
|
41
41
|
onPrimaryAction && labels.primary && (React.createElement(Button, { onClick: onPrimaryAction, text: labels.primary, isDisabled: primaryDisabled, loader: primaryLoading, size: size })))))));
|
|
42
42
|
};
|
|
@@ -11,7 +11,7 @@ export const Modal = ({ theme, themeVariant = 'default', isOpen, children, title
|
|
|
11
11
|
primary: undefined,
|
|
12
12
|
secondary: wordbook.actions.ok,
|
|
13
13
|
additional: undefined,
|
|
14
|
-
}, }) => {
|
|
14
|
+
}, primaryVariant }) => {
|
|
15
15
|
const resolvedThemeData = resolveThemeWithComponentsConfig({
|
|
16
16
|
theme,
|
|
17
17
|
themeVariant,
|
|
@@ -42,5 +42,5 @@ export const Modal = ({ theme, themeVariant = 'default', isOpen, children, title
|
|
|
42
42
|
primary: labels.primary,
|
|
43
43
|
secondary: labels.secondary,
|
|
44
44
|
additional: labels.additional,
|
|
45
|
-
} })))), document.body)));
|
|
45
|
+
}, primaryVariant: primaryVariant })))), document.body)));
|
|
46
46
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppTheme, ThemeName } from '../../config';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { AdditionalType, IComponentLabels, InputSize } from 'types';
|
|
3
|
+
import { AdditionalType, ButtonMode, IComponentLabels, InputSize } from 'types';
|
|
4
4
|
interface IButtonsFooterProps {
|
|
5
5
|
theme?: AppTheme;
|
|
6
6
|
themeVariant?: ThemeName;
|
|
@@ -15,6 +15,7 @@ interface IButtonsFooterProps {
|
|
|
15
15
|
additionDisabled?: boolean;
|
|
16
16
|
size?: InputSize;
|
|
17
17
|
labels?: IComponentLabels;
|
|
18
|
+
primaryVariant?: ButtonMode;
|
|
18
19
|
}
|
|
19
20
|
export declare const ButtonsFooter: FC<IButtonsFooterProps>;
|
|
20
21
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppTheme, ThemeName } from '../../config';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { AdditionalType, IComponentLabels, InputSize } from 'types';
|
|
4
|
+
import { AdditionalType, ButtonMode, IComponentLabels, InputSize } from 'types';
|
|
5
5
|
interface IModalProps {
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
theme?: AppTheme;
|
|
@@ -21,6 +21,7 @@ interface IModalProps {
|
|
|
21
21
|
exitOnEsc?: boolean;
|
|
22
22
|
additionDisabled?: boolean;
|
|
23
23
|
labels?: IComponentLabels;
|
|
24
|
+
primaryVariant?: ButtonMode;
|
|
24
25
|
}
|
|
25
26
|
export declare const Modal: FC<IModalProps>;
|
|
26
27
|
export {};
|
|
@@ -15,10 +15,10 @@ interface ITableProps {
|
|
|
15
15
|
pageSize?: number;
|
|
16
16
|
onRowClick?: (id: string) => void;
|
|
17
17
|
pagination?: boolean;
|
|
18
|
-
filterLabels?: IFilterLabels;
|
|
19
18
|
paginationCounters?: number[];
|
|
20
19
|
tableHeight?: string;
|
|
21
20
|
tableWrapperHeight?: string;
|
|
21
|
+
filterLabels?: IFilterLabels;
|
|
22
22
|
paginationLabel?: IFilterLabels;
|
|
23
23
|
calendarLabels?: IFilterLabels;
|
|
24
24
|
calendarLocaleLabels?: ICalendarLocaleLabels;
|