@gravity-ui/dashkit 6.0.0-beta.2 → 6.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.
- package/build/cjs/components/index.d.ts +0 -2
- package/build/cjs/components/index.js +0 -3
- package/build/esm/components/index.d.ts +0 -2
- package/build/esm/components/index.js +0 -1
- package/package.json +3 -3
- package/build/cjs/components/ActionsToolbar/ActionsToolbar.css +0 -26
- package/build/cjs/components/ActionsToolbar/ActionsToolbar.d.ts +0 -13
- package/build/cjs/components/ActionsToolbar/ActionsToolbar.js +0 -17
- package/build/esm/components/ActionsToolbar/ActionsToolbar.css +0 -26
- package/build/esm/components/ActionsToolbar/ActionsToolbar.d.ts +0 -14
- package/build/esm/components/ActionsToolbar/ActionsToolbar.js +0 -13
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionsToolbar = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
tslib_1.__exportStar(require("./DashKit"), exports);
|
|
6
|
-
var ActionsToolbar_1 = require("./ActionsToolbar/ActionsToolbar");
|
|
7
|
-
Object.defineProperty(exports, "ActionsToolbar", { enumerable: true, get: function () { return ActionsToolbar_1.ActionsToolbar; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/dashkit",
|
|
3
|
-
"version": "6.0.0
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Library for rendering dashboard grid layout",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react-grid-layout": "^1.3.4"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@gravity-ui/uikit": "5.0.0
|
|
44
|
+
"@gravity-ui/uikit": "^5.0.0",
|
|
45
45
|
"bem-cn-lite": "^4.0.0",
|
|
46
46
|
"react": "^16.8.0 || ^17 || ^18"
|
|
47
47
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@gravity-ui/prettier-config": "^1.0.1",
|
|
53
53
|
"@gravity-ui/stylelint-config": "^1.0.1",
|
|
54
54
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
55
|
-
"@gravity-ui/uikit": "^5.0.0
|
|
55
|
+
"@gravity-ui/uikit": "^5.0.0",
|
|
56
56
|
"@storybook/addon-essentials": "^7.0.18",
|
|
57
57
|
"@storybook/addon-knobs": "^7.0.2",
|
|
58
58
|
"@storybook/cli": "^7.0.18",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.actions-toolbar {
|
|
2
|
-
display: flex;
|
|
3
|
-
position: fixed;
|
|
4
|
-
width: fit-content;
|
|
5
|
-
padding: 8px;
|
|
6
|
-
border-radius: var(--g-border-radius-l);
|
|
7
|
-
background-color: var(--g-color-base-background);
|
|
8
|
-
box-shadow: 0px 5px 6px 0px var(--g-color-sfx-shadow);
|
|
9
|
-
}
|
|
10
|
-
.actions-toolbar__button {
|
|
11
|
-
transition: all 0.2s ease;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
align-items: center;
|
|
16
|
-
width: 98px;
|
|
17
|
-
height: 68px;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
border-radius: var(--g-border-radius-s);
|
|
20
|
-
}
|
|
21
|
-
.actions-toolbar__button:hover {
|
|
22
|
-
background-color: var(--g-color-base-generic);
|
|
23
|
-
}
|
|
24
|
-
.actions-toolbar__icon {
|
|
25
|
-
margin-bottom: 10px;
|
|
26
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconProps } from '@gravity-ui/uikit';
|
|
3
|
-
export interface ActionsToolbarProps {
|
|
4
|
-
controls: ActionsToolbarButton[];
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ActionsToolbarButton {
|
|
8
|
-
icon: IconProps['data'];
|
|
9
|
-
text: React.ReactNode;
|
|
10
|
-
handler: () => void;
|
|
11
|
-
iconSize?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const ActionsToolbar: React.FC<ActionsToolbarProps>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionsToolbar = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const bem_cn_lite_1 = tslib_1.__importDefault(require("bem-cn-lite"));
|
|
7
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
|
-
const b = (0, bem_cn_lite_1.default)('actions-toolbar');
|
|
9
|
-
const WidgetButton = ({ icon, text, handler }) => (react_1.default.createElement("div", { className: b('button'), onClick: handler },
|
|
10
|
-
react_1.default.createElement(uikit_1.Icon, { size: '18', className: b('icon'), data: icon }),
|
|
11
|
-
react_1.default.createElement(uikit_1.Text, { variant: 'body-1' }, text)));
|
|
12
|
-
const ActionsToolbar = (props) => {
|
|
13
|
-
return (react_1.default.createElement("div", { className: `${b()} ${props.className}` }, props.controls.map((button, index) => {
|
|
14
|
-
return (react_1.default.createElement(WidgetButton, { key: index, icon: button.icon, text: button.text, handler: button.handler }));
|
|
15
|
-
})));
|
|
16
|
-
};
|
|
17
|
-
exports.ActionsToolbar = ActionsToolbar;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.actions-toolbar {
|
|
2
|
-
display: flex;
|
|
3
|
-
position: fixed;
|
|
4
|
-
width: fit-content;
|
|
5
|
-
padding: 8px;
|
|
6
|
-
border-radius: var(--g-border-radius-l);
|
|
7
|
-
background-color: var(--g-color-base-background);
|
|
8
|
-
box-shadow: 0px 5px 6px 0px var(--g-color-sfx-shadow);
|
|
9
|
-
}
|
|
10
|
-
.actions-toolbar__button {
|
|
11
|
-
transition: all 0.2s ease;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
align-items: center;
|
|
16
|
-
width: 98px;
|
|
17
|
-
height: 68px;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
border-radius: var(--g-border-radius-s);
|
|
20
|
-
}
|
|
21
|
-
.actions-toolbar__button:hover {
|
|
22
|
-
background-color: var(--g-color-base-generic);
|
|
23
|
-
}
|
|
24
|
-
.actions-toolbar__icon {
|
|
25
|
-
margin-bottom: 10px;
|
|
26
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconProps } from '@gravity-ui/uikit';
|
|
3
|
-
import './ActionsToolbar.css';
|
|
4
|
-
export interface ActionsToolbarProps {
|
|
5
|
-
controls: ActionsToolbarButton[];
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ActionsToolbarButton {
|
|
9
|
-
icon: IconProps['data'];
|
|
10
|
-
text: React.ReactNode;
|
|
11
|
-
handler: () => void;
|
|
12
|
-
iconSize?: number;
|
|
13
|
-
}
|
|
14
|
-
export declare const ActionsToolbar: React.FC<ActionsToolbarProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import block from 'bem-cn-lite';
|
|
3
|
-
import { Icon, Text } from '@gravity-ui/uikit';
|
|
4
|
-
import './ActionsToolbar.css';
|
|
5
|
-
const b = block('actions-toolbar');
|
|
6
|
-
const WidgetButton = ({ icon, text, handler }) => (React.createElement("div", { className: b('button'), onClick: handler },
|
|
7
|
-
React.createElement(Icon, { size: '18', className: b('icon'), data: icon }),
|
|
8
|
-
React.createElement(Text, { variant: 'body-1' }, text)));
|
|
9
|
-
export const ActionsToolbar = (props) => {
|
|
10
|
-
return (React.createElement("div", { className: `${b()} ${props.className}` }, props.controls.map((button, index) => {
|
|
11
|
-
return (React.createElement(WidgetButton, { key: index, icon: button.icon, text: button.text, handler: button.handler }));
|
|
12
|
-
})));
|
|
13
|
-
};
|