@synerise/ds-card-tabs 0.13.9 → 0.13.12
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/CHANGELOG.md +8 -4
- package/dist/CardTab/CardTab.styles.js +1 -1
- package/dist/CardTab/CardTab.types.d.ts +2 -1
- package/dist/CardTabs.js +6 -4
- package/dist/CardTabs.styles.js +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [0.13.
|
|
6
|
+
## [0.13.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@0.13.11...@synerise/ds-card-tabs@0.13.12) (2022-08-25)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @synerise/ds-card-tabs
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [0.13.
|
|
14
|
+
## [0.13.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@0.13.6...@synerise/ds-card-tabs@0.13.11) (2022-08-11)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @synerise/ds-card-tabs
|
|
17
17
|
|
|
@@ -19,9 +19,13 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
## [0.13.
|
|
22
|
+
## [0.13.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-tabs@0.13.5...@synerise/ds-card-tabs@0.13.6) (2022-07-28)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **card-tabs:** add option of custom color to pick ([8504ed6](https://github.com/Synerise/synerise-design/commit/8504ed6a7a50a75851973ad2062d1a9c65e33489))
|
|
28
|
+
* **card-tabs:** width for 3 card tabs and width lte 588px ([e80e56f](https://github.com/Synerise/synerise-design/commit/e80e56f6f4ea3d8029f066e02570423f589f0e9e))
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
|
|
@@ -78,7 +78,7 @@ export var CardIconPrefix = styled.div.withConfig({
|
|
|
78
78
|
export var CardTabContainer = styled.div.withConfig({
|
|
79
79
|
displayName: "CardTabstyles__CardTabContainer",
|
|
80
80
|
componentId: "sc-1n86s98-10"
|
|
81
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:12px;width:180px;height:40px;user-select:none;background-color:", ";box-shadow:", ";border-radius:3px;border-width:1px;border-color:", ";border-style:solid;pointer-events:", ";", "{background-color:", ";color:", ";}", "{background-color:", ";}", "{height:", ";width:", ";border-width:", ";border-color:", ";border-style:solid;}&:hover{cursor:pointer;box-shadow:", ";background-color:", ";", "{display:", ";}", "{display:", ";}", "{color:", ";}", "{background-color:", ";color:", ";display:", ";}", "{svg{color:", ";fill:", ";}}", "{display:flex;svg{color:", ";fill:", " !important;}}", "{display:none;}", "{display:none;svg{color:", ";fill:", ";}}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", ";}}}&.pressed{background-color:", ";}", "{color:", ";opacity:", ";}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", ";}opacity:", ";}", "{opacity:", ";.ds-card-tabs__handle-icon{svg{color:", ";fill:", ";}}svg{color:", ";fill:", ";}", "{opacity:", ";}}"], function (_ref7) {
|
|
81
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:12px;width:180px;@media (max-width:588px){max-width:145px;}height:40px;user-select:none;background-color:", ";box-shadow:", ";border-radius:3px;border-width:1px;border-color:", ";border-style:solid;pointer-events:", ";", "{background-color:", ";color:", ";}", "{background-color:", ";}", "{height:", ";width:", ";border-width:", ";border-color:", ";border-style:solid;}&:hover{cursor:pointer;box-shadow:", ";background-color:", ";", "{display:", ";}", "{display:", ";}", "{color:", ";}", "{background-color:", ";color:", ";display:", ";}", "{svg{color:", ";fill:", ";}}", "{display:flex;svg{color:", ";fill:", " !important;}}", "{display:none;}", "{display:none;svg{color:", ";fill:", ";}}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", ";}}}&.pressed{background-color:", ";}", "{color:", ";opacity:", ";}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", ";}opacity:", ";}", "{opacity:", ";.ds-card-tabs__handle-icon{svg{color:", ";fill:", ";}}svg{color:", ";fill:", ";}", "{opacity:", ";}}"], function (_ref7) {
|
|
82
82
|
var theme = _ref7.theme,
|
|
83
83
|
active = _ref7.active,
|
|
84
84
|
invalid = _ref7.invalid,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IntlShape } from 'react-intl';
|
|
3
|
+
import { DefaultColor } from '@synerise/ds-core/dist/js/DSProvider/ThemeProvider/theme';
|
|
3
4
|
export declare enum prefixType {
|
|
4
5
|
TAG = 0,
|
|
5
6
|
ICON = 1,
|
|
@@ -18,7 +19,7 @@ export interface CardTabProps {
|
|
|
18
19
|
tag: string;
|
|
19
20
|
prefix: prefixType;
|
|
20
21
|
colorDot: React.ReactNode;
|
|
21
|
-
color?: Color;
|
|
22
|
+
color?: Color | DefaultColor | string;
|
|
22
23
|
active?: boolean;
|
|
23
24
|
draggable?: boolean;
|
|
24
25
|
prefixIcon?: React.ReactNode;
|
package/dist/CardTabs.js
CHANGED
|
@@ -9,8 +9,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { ReactSortable } from 'react-sortablejs-typescript';
|
|
11
11
|
import Button from '@synerise/ds-button';
|
|
12
|
+
import { defaultColorsOrder } from '@synerise/ds-core/dist/js/DSProvider/ThemeProvider/theme';
|
|
12
13
|
import * as S from './CardTabs.styles';
|
|
13
|
-
import { COLORS_TABS } from './CardTab/ColorsTabs';
|
|
14
14
|
var SORTABLE_CONFIG = {
|
|
15
15
|
ghostClass: 'sortable-card-ghost-element',
|
|
16
16
|
className: 'sortable-card',
|
|
@@ -35,10 +35,11 @@ var CardTabs = function CardTabs(_ref) {
|
|
|
35
35
|
|
|
36
36
|
var renderChildren = function renderChildren() {
|
|
37
37
|
return React.Children.map(children, function (child, i) {
|
|
38
|
-
return React.cloneElement(child, {
|
|
39
|
-
color:
|
|
38
|
+
return React.cloneElement(child, _objectSpread({}, child.props.color ? {} : {
|
|
39
|
+
color: defaultColorsOrder[i % defaultColorsOrder.length]
|
|
40
|
+
}, {
|
|
40
41
|
draggable: Boolean(onChangeOrder) || child.props.draggable
|
|
41
|
-
});
|
|
42
|
+
}));
|
|
42
43
|
});
|
|
43
44
|
};
|
|
44
45
|
|
|
@@ -57,6 +58,7 @@ var CardTabs = function CardTabs(_ref) {
|
|
|
57
58
|
}, renderChildren()), onAddTab && /*#__PURE__*/React.createElement("span", {
|
|
58
59
|
"data-testid": "card-tabs-add-button"
|
|
59
60
|
}, /*#__PURE__*/React.createElement(Button.Creator, {
|
|
61
|
+
block: true,
|
|
60
62
|
disabled: !!maxTabsCount && React.Children.toArray(children).length >= maxTabsCount,
|
|
61
63
|
label: addTabLabel != null ? addTabLabel : '',
|
|
62
64
|
onClick: onAddTab
|
package/dist/CardTabs.styles.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
+
import * as CreatorStyles from '@synerise/ds-button/dist/Creator/Creator.styles';
|
|
2
3
|
import { CardTabContainer } from './CardTab/CardTab.styles'; // eslint-disable-next-line import/prefer-default-export
|
|
3
4
|
|
|
4
5
|
export var CardTabsContainer = styled.div.withConfig({
|
|
5
6
|
displayName: "CardTabsstyles__CardTabsContainer",
|
|
6
7
|
componentId: "sc-1uu9dja-0"
|
|
7
|
-
})(["display:flex;flex-direction:row;algin-items:flex-start;justify-content:flex-start;width:100%;", "{margin-right:12px;margin-bottom:16px;}.ds-card-tags-sortable{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;}.sortable-chosen{cursor:grabbing;background-color:", ";opacity:1;}.sortable-drag{opacity:1 !important;box-shadow:0 16px 32px 0 rgba(35,41,54,0.1);}.sortable-card-ghost-element{background-color:", ";&:hover{background-color:", ";}opacity:1;cursor:grabbing;*{visibility:hidden;}}"], CardTabContainer, function (props) {
|
|
8
|
+
})(["display:flex;flex-direction:row;algin-items:flex-start;justify-content:flex-start;width:100%;", "{margin-right:12px;margin-bottom:16px;}.ds-card-tags-sortable{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;}.sortable-chosen{cursor:grabbing;background-color:", ";opacity:1;}.sortable-drag{opacity:1 !important;box-shadow:0 16px 32px 0 rgba(35,41,54,0.1);}.sortable-card-ghost-element{background-color:", ";&:hover{background-color:", ";}opacity:1;cursor:grabbing;*{visibility:hidden;}}@media (max-width:588px){.ds-button-creator{", "{display:none;}}}"], CardTabContainer, function (props) {
|
|
8
9
|
return props.theme.palette.white;
|
|
9
10
|
}, function (props) {
|
|
10
11
|
return props.theme.palette['blue-300'];
|
|
11
12
|
}, function (props) {
|
|
12
13
|
return props.theme.palette['blue-050'];
|
|
13
|
-
});
|
|
14
|
+
}, CreatorStyles.CreatorLabel);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from './CardTabs';
|
|
1
|
+
export { default } from './CardTabs';
|
|
2
|
+
export { default as CardTab } from './CardTab/CardTab';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-card-tabs",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.12",
|
|
4
4
|
"description": "CardTabs UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-button": "^0.17.
|
|
36
|
-
"@synerise/ds-cruds": "^0.3.
|
|
37
|
-
"@synerise/ds-icon": "^0.
|
|
38
|
-
"@synerise/ds-inline-edit": "^0.6.
|
|
39
|
-
"@synerise/ds-typography": "^0.12.
|
|
35
|
+
"@synerise/ds-button": "^0.17.8",
|
|
36
|
+
"@synerise/ds-cruds": "^0.3.16",
|
|
37
|
+
"@synerise/ds-icon": "^0.50.0",
|
|
38
|
+
"@synerise/ds-inline-edit": "^0.6.24",
|
|
39
|
+
"@synerise/ds-typography": "^0.12.7",
|
|
40
40
|
"react-sortablejs-typescript": "2.0.3",
|
|
41
41
|
"sortablejs": "^1.10.1"
|
|
42
42
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/lodash": "4.14.149"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "c9530f0548fa244796b0c6b1ea5fa3d6330e84ea"
|
|
52
52
|
}
|