@synerise/ds-card-tabs 1.5.22 → 1.5.24
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 -0
- package/README.md +24 -27
- package/dist/CardTab/CardTab.d.ts +2 -2
- package/dist/CardTab/CardTab.js +102 -144
- package/dist/CardTab/CardTab.styles.d.ts +11 -11
- package/dist/CardTab/CardTab.styles.js +239 -253
- package/dist/CardTab/CardTab.types.d.ts +4 -4
- package/dist/CardTab/CardTab.types.js +10 -7
- package/dist/CardTab/CardTabActions/CardTabActions.d.ts +2 -2
- package/dist/CardTab/CardTabActions/CardTabActions.js +15 -24
- package/dist/CardTab/CardTabActions/CardTabActions.types.d.ts +2 -2
- package/dist/CardTab/CardTabActions/CardTabActions.types.js +1 -1
- package/dist/CardTab/CardTabDropdown/CardTabDropdown.d.ts +2 -2
- package/dist/CardTab/CardTabDropdown/CardTabDropdown.js +27 -43
- package/dist/CardTab/CardTabDropdown/CardTabDropdown.types.d.ts +1 -1
- package/dist/CardTab/CardTabDropdown/CardTabDropdown.types.js +1 -1
- package/dist/CardTab/CardTabPrefix/CardTabPrefix.d.ts +2 -2
- package/dist/CardTab/CardTabPrefix/CardTabPrefix.js +38 -41
- package/dist/CardTab/CardTabPrefix/CardTabPrefix.types.d.ts +1 -1
- package/dist/CardTab/CardTabPrefix/CardTabPrefix.types.js +1 -1
- package/dist/CardTab/CardTabPrefix/CardTabPrefix.utils.d.ts +1 -1
- package/dist/CardTab/CardTabPrefix/CardTabPrefix.utils.js +12 -6
- package/dist/CardTabs.d.ts +2 -2
- package/dist/CardTabs.js +46 -54
- package/dist/CardTabs.styles.d.ts +2 -2
- package/dist/CardTabs.styles.js +9 -5
- package/dist/CardTabs.types.d.ts +3 -3
- package/dist/CardTabs.types.js +1 -1
- package/dist/index.js +17 -10
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/utils.js +11 -7
- package/package.json +16 -16
|
@@ -1,351 +1,337 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { InPlaceEditableInputContainer } from
|
|
3
|
-
import { macro } from
|
|
4
|
-
import { getColor, getLighterColor } from
|
|
5
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { InPlaceEditableInputContainer } from "@synerise/ds-inline-edit/dist/InlineEdit.styles";
|
|
3
|
+
import { macro } from "@synerise/ds-typography";
|
|
4
|
+
import { getColor, getLighterColor } from "../utils.js";
|
|
5
|
+
const CardTabSuffix = /* @__PURE__ */ styled.div.withConfig({
|
|
6
6
|
displayName: "CardTabstyles__CardTabSuffix",
|
|
7
7
|
componentId: "sc-1n86s98-0"
|
|
8
8
|
})(["flex-direction:row;align-items:center;justify-content:flex-end;height:24px;display:none;:has([data-popover-trigger][data-state='open']){display:flex;}"]);
|
|
9
|
-
|
|
9
|
+
const CardTabName = /* @__PURE__ */ styled.span.withConfig({
|
|
10
10
|
displayName: "CardTabstyles__CardTabName",
|
|
11
11
|
componentId: "sc-1n86s98-1"
|
|
12
12
|
})(["max-width:100%;display:inline-block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;"]);
|
|
13
|
-
|
|
13
|
+
const CardSuffixWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
14
14
|
displayName: "CardTabstyles__CardSuffixWrapper",
|
|
15
15
|
componentId: "sc-1n86s98-2"
|
|
16
16
|
})(["display:none;"]);
|
|
17
|
-
|
|
17
|
+
const CardTabLabel = /* @__PURE__ */ styled.span.withConfig({
|
|
18
18
|
displayName: "CardTabstyles__CardTabLabel",
|
|
19
19
|
componentId: "sc-1n86s98-3"
|
|
20
|
-
})(["", ";color:", ";line-height:20px;position:relative;font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;display:flex;align-items:center;justify-content:flex-start;", "{input{font-weight:500;font-size:14px;line-height:20px;color:", ";background-image:linear-gradient( to right,", " 0%,", " 33%,rgba(255,255,255,0) 34%,rgba(255,255,255,0) 100% );}}"], macro.h300,
|
|
21
|
-
|
|
22
|
-
}, InPlaceEditableInputContainer, function (props) {
|
|
23
|
-
return props.theme.palette['grey-800'];
|
|
24
|
-
}, function (props) {
|
|
25
|
-
return props.theme.palette['blue-600'];
|
|
26
|
-
}, function (props) {
|
|
27
|
-
return props.theme.palette['blue-600'];
|
|
28
|
-
});
|
|
29
|
-
export var CardTabTag = styled.div.withConfig({
|
|
20
|
+
})(["", ";color:", ";line-height:20px;position:relative;font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;display:flex;align-items:center;justify-content:flex-start;", "{input{font-weight:500;font-size:14px;line-height:20px;color:", ";background-image:linear-gradient( to right,", " 0%,", " 33%,rgba(255,255,255,0) 34%,rgba(255,255,255,0) 100% );}}"], macro.h300, (props) => props.theme.palette["grey-600"], InPlaceEditableInputContainer, (props) => props.theme.palette["grey-800"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"]);
|
|
21
|
+
const CardTabTag = /* @__PURE__ */ styled.div.withConfig({
|
|
30
22
|
displayName: "CardTabstyles__CardTabTag",
|
|
31
23
|
componentId: "sc-1n86s98-4"
|
|
32
|
-
})(["", " color:", ";display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:3px;"], macro.h200,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export var CardDotPrefix = styled.div.withConfig({
|
|
24
|
+
})(["", " color:", ";display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:3px;"], macro.h200, ({
|
|
25
|
+
theme
|
|
26
|
+
}) => theme.palette.white);
|
|
27
|
+
const CardDotPrefix = /* @__PURE__ */ styled.div.withConfig({
|
|
37
28
|
displayName: "CardTabstyles__CardDotPrefix",
|
|
38
29
|
componentId: "sc-1n86s98-5"
|
|
39
|
-
})(["", " color:", ";display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;"], macro.h200,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export var CardDot = styled.div.withConfig({
|
|
30
|
+
})(["", " color:", ";display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;"], macro.h200, ({
|
|
31
|
+
theme
|
|
32
|
+
}) => theme.palette.white);
|
|
33
|
+
const CardDot = /* @__PURE__ */ styled.div.withConfig({
|
|
44
34
|
displayName: "CardTabstyles__CardDot",
|
|
45
35
|
componentId: "sc-1n86s98-6"
|
|
46
36
|
})(["", " display:flex;align-items:center;justify-content:center;width:8px;height:8px;border-radius:50%;"], macro.h200);
|
|
47
|
-
|
|
37
|
+
const CardTabPrefix = /* @__PURE__ */ styled.div.withConfig({
|
|
48
38
|
displayName: "CardTabstyles__CardTabPrefix",
|
|
49
39
|
componentId: "sc-1n86s98-7"
|
|
50
40
|
})(["display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin-right:12px;"]);
|
|
51
|
-
|
|
41
|
+
const CardDragPrefix = /* @__PURE__ */ styled.div.withConfig({
|
|
52
42
|
displayName: "CardTabstyles__CardDragPrefix",
|
|
53
43
|
componentId: "sc-1n86s98-8"
|
|
54
|
-
})(["display:", ";"],
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
export var CardIconPrefix = styled.div.withConfig({
|
|
44
|
+
})(["display:", ";"], (props) => props.persistent ? "block" : "none");
|
|
45
|
+
const CardIconPrefix = /* @__PURE__ */ styled.div.withConfig({
|
|
58
46
|
displayName: "CardTabstyles__CardIconPrefix",
|
|
59
47
|
componentId: "sc-1n86s98-9"
|
|
60
48
|
})(["display:flex;"]);
|
|
61
|
-
|
|
49
|
+
const CardTabContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
62
50
|
displayName: "CardTabstyles__CardTabContainer",
|
|
63
51
|
componentId: "sc-1n86s98-10"
|
|
64
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:12px;width:168px;@media (max-width:588px){max-width:145px;}height:48px;user-select:none;background-color:", ";box-shadow:", ";border-radius:3px;border-width:", ";border-color:", ";border-style:solid;pointer-events:", ";", "{background-color:", ";color:", ";}", "{background-color:", ";}", "{height:", ";width:", ";border-width:", ";border-color:", ";border-style:solid;}", "{svg{color:", ";fill:", " !important;}}", "{svg{color:", " !important;fill:", " !important;}.remove{svg{color:", " !important;fill:", " !important;}}}&:hover{cursor:pointer;box-shadow:", ";background-color:", ";", "{display:", ";}", "{display:", ";}", "{color:", ";}", "{background-color:", ";color:", ";display:", ";}", "{svg{color:", ";fill:", ";}}", "{display:", ";svg{color:", ";fill:", " !important;}}", "{display:", ";}", "{display:", ";svg{color:", ";fill:", ";}}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", " !important;}}}&:active{background-color:", ";}", "{input{color:", ";padding:0 !important;background-image:linear-gradient( to right,", " 0%,", " 33%,rgba(255,255,255,0) 34%,rgba(255,255,255,0) 100% ) !important;}}", "{color:", ";opacity:", ";}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", ";}opacity:", ";}", "{opacity:", ";.ds-card-tabs__handle-icon{svg{color:", ";fill:", ";}}svg{color:", ";fill:", ";}", "{opacity:", ";}}"],
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
52
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:12px;width:168px;@media (max-width:588px){max-width:145px;}height:48px;user-select:none;background-color:", ";box-shadow:", ";border-radius:3px;border-width:", ";border-color:", ";border-style:solid;pointer-events:", ";", "{background-color:", ";color:", ";}", "{background-color:", ";}", "{height:", ";width:", ";border-width:", ";border-color:", ";border-style:solid;}", "{svg{color:", ";fill:", " !important;}}", "{svg{color:", " !important;fill:", " !important;}.remove{svg{color:", " !important;fill:", " !important;}}}&:hover{cursor:pointer;box-shadow:", ";background-color:", ";", "{display:", ";}", "{display:", ";}", "{color:", ";}", "{background-color:", ";color:", ";display:", ";}", "{svg{color:", ";fill:", ";}}", "{display:", ";svg{color:", ";fill:", " !important;}}", "{display:", ";}", "{display:", ";svg{color:", ";fill:", ";}}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", " !important;}}}&:active{background-color:", ";}", "{input{color:", ";padding:0 !important;background-image:linear-gradient( to right,", " 0%,", " 33%,rgba(255,255,255,0) 34%,rgba(255,255,255,0) 100% ) !important;}}", "{color:", ";opacity:", ";}.ds-card-tabs__suffix-icon{svg{color:", ";fill:", ";}opacity:", ";}", "{opacity:", ";.ds-card-tabs__handle-icon{svg{color:", ";fill:", ";}}svg{color:", ";fill:", ";}", "{opacity:", ";}}"], ({
|
|
53
|
+
theme,
|
|
54
|
+
active,
|
|
55
|
+
invalid,
|
|
56
|
+
color,
|
|
57
|
+
greyBackground
|
|
58
|
+
}) => {
|
|
70
59
|
if (invalid && active) {
|
|
71
|
-
return theme.palette[
|
|
60
|
+
return theme.palette["red-600"];
|
|
72
61
|
}
|
|
73
62
|
if (active) {
|
|
74
|
-
return theme.palette[
|
|
63
|
+
return theme.palette[`${color}`];
|
|
75
64
|
}
|
|
76
65
|
if (greyBackground) {
|
|
77
66
|
return theme.palette.white;
|
|
78
67
|
}
|
|
79
|
-
return theme.palette[
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
color = _ref6.color;
|
|
68
|
+
return theme.palette["grey-050"];
|
|
69
|
+
}, ({
|
|
70
|
+
greyBackground
|
|
71
|
+
}) => greyBackground ? "0 4px 12px 0 rgba(35, 41, 54, 0.04)" : "0", ({
|
|
72
|
+
greyBackground
|
|
73
|
+
}) => greyBackground ? "0" : "1px", ({
|
|
74
|
+
theme,
|
|
75
|
+
active,
|
|
76
|
+
invalid,
|
|
77
|
+
color
|
|
78
|
+
}) => {
|
|
91
79
|
if (invalid) {
|
|
92
|
-
return theme.palette[
|
|
80
|
+
return theme.palette["red-600"];
|
|
93
81
|
}
|
|
94
|
-
return getColor(active, theme.palette[
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
color = _ref0.color,
|
|
112
|
-
invalid = _ref0.invalid;
|
|
82
|
+
return getColor(active, theme.palette[`${color}`], theme.palette["grey-300"]);
|
|
83
|
+
}, ({
|
|
84
|
+
disabled
|
|
85
|
+
}) => disabled ? "none" : "all", CardTabTag, ({
|
|
86
|
+
theme,
|
|
87
|
+
active,
|
|
88
|
+
color
|
|
89
|
+
}) => getColor(active, theme.palette.white, theme.palette[`${color}`]), ({
|
|
90
|
+
theme,
|
|
91
|
+
active,
|
|
92
|
+
color
|
|
93
|
+
}) => getColor(active, theme.palette[`${color}`], theme.palette.white), CardDot, ({
|
|
94
|
+
theme,
|
|
95
|
+
active,
|
|
96
|
+
color,
|
|
97
|
+
invalid
|
|
98
|
+
}) => {
|
|
113
99
|
if (active && invalid) {
|
|
114
|
-
return theme.palette[
|
|
100
|
+
return theme.palette[`${color}`];
|
|
115
101
|
}
|
|
116
|
-
return getColor(active,
|
|
117
|
-
}, CardDotPrefix,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, CardSuffixWrapper, function (_ref13) {
|
|
135
|
-
var theme = _ref13.theme,
|
|
136
|
-
active = _ref13.active;
|
|
102
|
+
return getColor(active, "transparent", theme.palette[`${color}`]);
|
|
103
|
+
}, CardDotPrefix, ({
|
|
104
|
+
active,
|
|
105
|
+
edited
|
|
106
|
+
}) => active && !edited ? "12px" : "24px", ({
|
|
107
|
+
active,
|
|
108
|
+
edited
|
|
109
|
+
}) => active && !edited ? "12px" : "24px", ({
|
|
110
|
+
active,
|
|
111
|
+
edited
|
|
112
|
+
}) => active && !edited ? "2px" : "0px", ({
|
|
113
|
+
theme,
|
|
114
|
+
active,
|
|
115
|
+
edited
|
|
116
|
+
}) => active && !edited ? theme.palette.white : "none", CardSuffixWrapper, ({
|
|
117
|
+
theme,
|
|
118
|
+
active
|
|
119
|
+
}) => {
|
|
137
120
|
if (active) {
|
|
138
121
|
return theme.palette.white;
|
|
139
122
|
}
|
|
140
|
-
return theme.palette[
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
|
|
123
|
+
return theme.palette["grey-600"];
|
|
124
|
+
}, ({
|
|
125
|
+
theme,
|
|
126
|
+
active
|
|
127
|
+
}) => {
|
|
144
128
|
if (active) {
|
|
145
129
|
return theme.palette.white;
|
|
146
130
|
}
|
|
147
|
-
return theme.palette[
|
|
148
|
-
}, CardTabSuffix,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
active = _ref20.active,
|
|
170
|
-
invalid = _ref20.invalid,
|
|
171
|
-
color = _ref20.color,
|
|
172
|
-
greyBackground = _ref20.greyBackground;
|
|
131
|
+
return theme.palette["grey-600"];
|
|
132
|
+
}, CardTabSuffix, ({
|
|
133
|
+
theme,
|
|
134
|
+
active
|
|
135
|
+
}) => active ? theme.palette.white : theme.palette["grey-600"], ({
|
|
136
|
+
theme,
|
|
137
|
+
active
|
|
138
|
+
}) => active ? theme.palette.white : theme.palette["grey-600"], ({
|
|
139
|
+
theme,
|
|
140
|
+
active
|
|
141
|
+
}) => active ? theme.palette.white : theme.palette["red-600"], ({
|
|
142
|
+
theme,
|
|
143
|
+
active
|
|
144
|
+
}) => active ? theme.palette.white : theme.palette["red-600"], ({
|
|
145
|
+
greyBackground
|
|
146
|
+
}) => greyBackground ? "0 4px 12px 0 rgba(35, 41, 54, 0.04)" : "", ({
|
|
147
|
+
theme,
|
|
148
|
+
active,
|
|
149
|
+
invalid,
|
|
150
|
+
color,
|
|
151
|
+
greyBackground
|
|
152
|
+
}) => {
|
|
173
153
|
if (invalid && active) {
|
|
174
|
-
return theme.palette[
|
|
154
|
+
return theme.palette[`${getLighterColor("red-600")}`];
|
|
175
155
|
}
|
|
176
156
|
if (active) {
|
|
177
|
-
return theme.palette[
|
|
157
|
+
return theme.palette[`${getLighterColor(color)}`];
|
|
178
158
|
}
|
|
179
159
|
if (greyBackground && !active) {
|
|
180
160
|
return theme.palette.white;
|
|
181
161
|
}
|
|
182
|
-
return theme.palette[
|
|
183
|
-
}, CardTabSuffix,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
active = _ref23.active;
|
|
162
|
+
return theme.palette["grey-050"];
|
|
163
|
+
}, CardTabSuffix, ({
|
|
164
|
+
edited
|
|
165
|
+
}) => edited ? "none" : "flex", CardSuffixWrapper, ({
|
|
166
|
+
edited
|
|
167
|
+
}) => edited ? "none" : "flex", CardTabLabel, ({
|
|
168
|
+
theme,
|
|
169
|
+
active
|
|
170
|
+
}) => {
|
|
192
171
|
if (active) {
|
|
193
172
|
return theme.palette.white;
|
|
194
173
|
}
|
|
195
|
-
return theme.palette[
|
|
196
|
-
}, CardTabTag,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
174
|
+
return theme.palette["grey-800"];
|
|
175
|
+
}, CardTabTag, ({
|
|
176
|
+
theme,
|
|
177
|
+
color,
|
|
178
|
+
active
|
|
179
|
+
}) => {
|
|
200
180
|
if (active) {
|
|
201
181
|
return theme.palette.white;
|
|
202
182
|
}
|
|
203
|
-
return theme.palette[
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
183
|
+
return theme.palette[`${color}`];
|
|
184
|
+
}, ({
|
|
185
|
+
theme,
|
|
186
|
+
active,
|
|
187
|
+
color
|
|
188
|
+
}) => {
|
|
208
189
|
if (active) {
|
|
209
|
-
return theme.palette[
|
|
190
|
+
return theme.palette[`${color}`];
|
|
210
191
|
}
|
|
211
192
|
return theme.palette.white;
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
active = _ref26.active;
|
|
193
|
+
}, (props) => props.isDraggable ? "none" : "flex", CardTabPrefix, ({
|
|
194
|
+
theme,
|
|
195
|
+
active
|
|
196
|
+
}) => {
|
|
217
197
|
if (active) {
|
|
218
198
|
return theme.palette.white;
|
|
219
199
|
}
|
|
220
|
-
return theme.palette[
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
|
|
200
|
+
return theme.palette["grey-600"];
|
|
201
|
+
}, ({
|
|
202
|
+
theme,
|
|
203
|
+
active
|
|
204
|
+
}) => {
|
|
224
205
|
if (active) {
|
|
225
206
|
return theme.palette.white;
|
|
226
207
|
}
|
|
227
|
-
return theme.palette[
|
|
228
|
-
}, CardDragPrefix,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
208
|
+
return theme.palette["grey-600"];
|
|
209
|
+
}, CardDragPrefix, ({
|
|
210
|
+
edited
|
|
211
|
+
}) => edited ? "none" : "flex", ({
|
|
212
|
+
theme,
|
|
213
|
+
active
|
|
214
|
+
}) => {
|
|
234
215
|
if (active) {
|
|
235
216
|
return theme.palette.white;
|
|
236
217
|
}
|
|
237
|
-
return theme.palette[
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
|
|
218
|
+
return theme.palette["grey-600"];
|
|
219
|
+
}, ({
|
|
220
|
+
theme,
|
|
221
|
+
active
|
|
222
|
+
}) => {
|
|
241
223
|
if (active) {
|
|
242
224
|
return theme.palette.white;
|
|
243
225
|
}
|
|
244
|
-
return theme.palette[
|
|
245
|
-
}, CardDotPrefix,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
active = _ref32.active;
|
|
256
|
-
return active ? theme.palette.white : theme.palette['grey-600'];
|
|
257
|
-
}, function (_ref33) {
|
|
258
|
-
var theme = _ref33.theme,
|
|
259
|
-
active = _ref33.active;
|
|
226
|
+
return theme.palette["grey-600"];
|
|
227
|
+
}, CardDotPrefix, (props) => props.isDraggable ? "none" : "flex", CardIconPrefix, (props) => props.isDraggable ? "none" : "flex", ({
|
|
228
|
+
theme,
|
|
229
|
+
active
|
|
230
|
+
}) => active ? theme.palette.white : theme.palette["grey-600"], ({
|
|
231
|
+
theme,
|
|
232
|
+
active
|
|
233
|
+
}) => active ? theme.palette.white : theme.palette["grey-600"], ({
|
|
234
|
+
theme,
|
|
235
|
+
active
|
|
236
|
+
}) => {
|
|
260
237
|
if (active) {
|
|
261
238
|
return theme.palette.white;
|
|
262
239
|
}
|
|
263
|
-
return theme.palette[
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
|
|
240
|
+
return theme.palette["grey-600"];
|
|
241
|
+
}, ({
|
|
242
|
+
theme,
|
|
243
|
+
active
|
|
244
|
+
}) => {
|
|
267
245
|
if (active) {
|
|
268
246
|
return theme.palette.white;
|
|
269
247
|
}
|
|
270
|
-
return theme.palette[
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
248
|
+
return theme.palette["grey-600"];
|
|
249
|
+
}, ({
|
|
250
|
+
theme,
|
|
251
|
+
active,
|
|
252
|
+
invalid,
|
|
253
|
+
color,
|
|
254
|
+
greyBackground
|
|
255
|
+
}) => {
|
|
277
256
|
if (invalid && active) {
|
|
278
|
-
return theme.palette[
|
|
257
|
+
return theme.palette[`${getLighterColor("red-600")}`];
|
|
279
258
|
}
|
|
280
259
|
if (active) {
|
|
281
|
-
return theme.palette[
|
|
260
|
+
return theme.palette[`${getLighterColor(color)}`];
|
|
282
261
|
}
|
|
283
262
|
if (greyBackground && !active) {
|
|
284
263
|
return theme.palette.white;
|
|
285
264
|
}
|
|
286
|
-
return theme.palette[
|
|
287
|
-
}, InPlaceEditableInputContainer,
|
|
288
|
-
|
|
289
|
-
|
|
265
|
+
return theme.palette["grey-100"];
|
|
266
|
+
}, InPlaceEditableInputContainer, ({
|
|
267
|
+
theme,
|
|
268
|
+
active
|
|
269
|
+
}) => {
|
|
290
270
|
if (active) {
|
|
291
271
|
return theme.palette.white;
|
|
292
272
|
}
|
|
293
|
-
return theme.palette[
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
|
|
273
|
+
return theme.palette["grey-800"];
|
|
274
|
+
}, ({
|
|
275
|
+
theme,
|
|
276
|
+
active
|
|
277
|
+
}) => {
|
|
297
278
|
if (active) {
|
|
298
279
|
return theme.palette.white;
|
|
299
280
|
}
|
|
300
|
-
return theme.palette[
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
|
|
281
|
+
return theme.palette["grey-800"];
|
|
282
|
+
}, ({
|
|
283
|
+
theme,
|
|
284
|
+
active
|
|
285
|
+
}) => {
|
|
304
286
|
if (active) {
|
|
305
287
|
return theme.palette.white;
|
|
306
288
|
}
|
|
307
|
-
return theme.palette[
|
|
308
|
-
}, CardTabLabel,
|
|
309
|
-
|
|
310
|
-
|
|
289
|
+
return theme.palette["grey-800"];
|
|
290
|
+
}, CardTabLabel, ({
|
|
291
|
+
theme,
|
|
292
|
+
active
|
|
293
|
+
}) => {
|
|
311
294
|
if (active) {
|
|
312
295
|
return theme.palette.white;
|
|
313
296
|
}
|
|
314
|
-
return theme.palette[
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
},
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
297
|
+
return theme.palette["grey-600"];
|
|
298
|
+
}, ({
|
|
299
|
+
disabled
|
|
300
|
+
}) => disabled ? 0.4 : 1, ({
|
|
301
|
+
theme,
|
|
302
|
+
active
|
|
303
|
+
}) => getColor(active, theme.palette.white, theme.palette["grey-600"]), ({
|
|
304
|
+
theme,
|
|
305
|
+
active
|
|
306
|
+
}) => getColor(active, theme.palette.white, theme.palette["grey-600"]), ({
|
|
307
|
+
disabled
|
|
308
|
+
}) => disabled ? 0.4 : 1, CardTabPrefix, ({
|
|
309
|
+
disabled
|
|
310
|
+
}) => disabled ? 0.4 : 1, ({
|
|
311
|
+
theme,
|
|
312
|
+
active
|
|
313
|
+
}) => getColor(active, theme.palette.white, theme.palette["grey-400"]), ({
|
|
314
|
+
theme,
|
|
315
|
+
active
|
|
316
|
+
}) => getColor(active, theme.palette.white, theme.palette["grey-400"]), ({
|
|
317
|
+
theme,
|
|
318
|
+
active
|
|
319
|
+
}) => getColor(active, theme.palette.white, theme.palette["grey-600"]), ({
|
|
320
|
+
theme,
|
|
321
|
+
active
|
|
322
|
+
}) => getColor(active, theme.palette.white, theme.palette["grey-600"]), CardTabSuffix, ({
|
|
323
|
+
disabled
|
|
324
|
+
}) => disabled ? 0.4 : 1);
|
|
325
|
+
export {
|
|
326
|
+
CardDot,
|
|
327
|
+
CardDotPrefix,
|
|
328
|
+
CardDragPrefix,
|
|
329
|
+
CardIconPrefix,
|
|
330
|
+
CardSuffixWrapper,
|
|
331
|
+
CardTabContainer,
|
|
332
|
+
CardTabLabel,
|
|
333
|
+
CardTabName,
|
|
334
|
+
CardTabPrefix,
|
|
335
|
+
CardTabSuffix,
|
|
336
|
+
CardTabTag
|
|
337
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { IntlShape } from 'react-intl';
|
|
3
|
+
import { DefaultColor } from '@synerise/ds-core';
|
|
4
|
+
import { DragHandlePropType } from '@synerise/ds-sortable';
|
|
5
5
|
export declare enum prefixType {
|
|
6
6
|
TAG = 0,
|
|
7
7
|
ICON = 1,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
}({});
|
|
1
|
+
var prefixType = /* @__PURE__ */ ((prefixType2) => {
|
|
2
|
+
prefixType2[prefixType2["TAG"] = 0] = "TAG";
|
|
3
|
+
prefixType2[prefixType2["ICON"] = 1] = "ICON";
|
|
4
|
+
prefixType2[prefixType2["DOT"] = 2] = "DOT";
|
|
5
|
+
prefixType2[prefixType2["HANDLE"] = 3] = "HANDLE";
|
|
6
|
+
return prefixType2;
|
|
7
|
+
})(prefixType || {});
|
|
8
|
+
export {
|
|
9
|
+
prefixType
|
|
10
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CardTabActionsProps } from './CardTabActions.types';
|
|
3
3
|
declare const CardTabActions: ({ onChangeName, enterEditNameMode, onDuplicateTab, onRemoveTab, onPreviewTab, texts, }: CardTabActionsProps) => React.JSX.Element;
|
|
4
4
|
export default CardTabActions;
|