@devtron-labs/devtron-fe-common-lib 0.0.7-beta-13 → 0.0.7-beta-14
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/Common/CustomTagSelector/Types.d.ts +1 -0
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/src/Common/CustomTagSelector/ResizableTagTextArea.tsx +4 -4
- package/src/Common/CustomTagSelector/TagLabelValueSelector.tsx +2 -2
- package/src/Common/CustomTagSelector/Types.ts +1 -0
- package/src/Common/MultiSelectCustomization.tsx +2 -2
package/dist/index.js
CHANGED
|
@@ -8590,8 +8590,8 @@ function ResizableTagTextArea(_a) {
|
|
|
8590
8590
|
var reInitHeight = function () {
|
|
8591
8591
|
if (document.activeElement !== refVar.current)
|
|
8592
8592
|
return;
|
|
8593
|
-
refVar.current.style.height = '
|
|
8594
|
-
dependentRef.current.style.height = '
|
|
8593
|
+
refVar.current.style.height = minHeight + 'px';
|
|
8594
|
+
dependentRef.current.style.height = minHeight + 'px';
|
|
8595
8595
|
var nextHeight = refVar.current.scrollHeight;
|
|
8596
8596
|
if (nextHeight < dependentRef.current.scrollHeight) {
|
|
8597
8597
|
nextHeight = dependentRef.current.scrollHeight;
|
|
@@ -8607,8 +8607,8 @@ function ResizableTagTextArea(_a) {
|
|
|
8607
8607
|
};
|
|
8608
8608
|
useThrottledEffect(reInitHeight, 500, [text]);
|
|
8609
8609
|
var handleOnBlur = function (event) {
|
|
8610
|
-
refVar.current.style.height = '
|
|
8611
|
-
dependentRef.current.style.height = '
|
|
8610
|
+
refVar.current.style.height = minHeight + 'px';
|
|
8611
|
+
dependentRef.current.style.height = minHeight + 'px';
|
|
8612
8612
|
onBlur && onBlur(event);
|
|
8613
8613
|
};
|
|
8614
8614
|
var handleOnFocus = function (event) {
|
|
@@ -8684,7 +8684,7 @@ var TagLabelValueSelector = function (_a) {
|
|
|
8684
8684
|
return (jsxRuntime.jsx("div", __assign({ "data-key": tag.label, "data-propagate": tag.propagate, className: "dc__hover-n50 lh-20 fs-13 fw-4 pt-6 pr-8 pb-6 pl-8 cursor", onClick: onSelectValue }, { children: tag.label }), "".concat(tag.value, "-").concat(index)));
|
|
8685
8685
|
};
|
|
8686
8686
|
var optionWithTippy = function (tag, index) {
|
|
8687
|
-
return (jsxRuntime.jsx(Tippy, __assign({ className: "default-tt", arrow: false, placement: "right", content: jsxRuntime.jsxs("div", __assign({ className: "pt-6 pr-10 pb-6 pl-10" }, { children: [jsxRuntime.jsx("div", __assign({ className: "mb-10 fs-12 fw-6 cn-0" }, { children: tag.label })), jsxRuntime.jsx("div", __assign({ className: "fs-12 fw-4 cn-0" }, { children: tag.description }))] })) }, { children: option(tag, index) })));
|
|
8687
|
+
return (jsxRuntime.jsx(Tippy, __assign({ className: "default-tt", arrow: false, placement: "right", content: jsxRuntime.jsxs("div", __assign({ className: "pt-6 pr-10 pb-6 pl-10" }, { children: [jsxRuntime.jsx("div", __assign({ className: "mb-10 fs-12 fw-6 cn-0 dc__break-word" }, { children: tag.label })), jsxRuntime.jsx("div", __assign({ className: "fs-12 fw-4 cn-0 dc__break-word" }, { children: tag.description }))] })) }, { children: option(tag, index) })));
|
|
8688
8688
|
};
|
|
8689
8689
|
var renderSuggestions = function () {
|
|
8690
8690
|
if (tagOptions === null || tagOptions === void 0 ? void 0 : tagOptions.length) {
|
|
@@ -16312,7 +16312,7 @@ var MultiValueChipContainer = function (_a) {
|
|
|
16312
16312
|
var isValidEmail = validator ? validator(value) : true;
|
|
16313
16313
|
if (isAllSelected && value !== '*')
|
|
16314
16314
|
return null;
|
|
16315
|
-
return (jsxRuntime.jsxs(components.MultiValueContainer, __assign({}, { data: data, innerProps: innerProps, selectProps: selectProps }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flex fs-12 pl-4 pr-4" }, { children: [!isValidEmail && jsxRuntime.jsx(SvgIcErrorMedium, { className: "mr-4 icon-dim-16" }), jsxRuntime.jsx("div", __assign({ className: "".concat(isValidEmail ? 'cn-9' : 'cr-5') }, { children: label }))] })), children[1]] })));
|
|
16315
|
+
return (jsxRuntime.jsxs(components.MultiValueContainer, __assign({}, { data: data, innerProps: innerProps, selectProps: selectProps }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flex left fs-12 pl-4 pr-4 dc__ellipsis-right" }, { children: [!isValidEmail && jsxRuntime.jsx(SvgIcErrorMedium, { className: "mr-4 icon-dim-16" }), jsxRuntime.jsx("div", __assign({ className: "dc__ellipsis-right ".concat(isValidEmail ? 'cn-9' : 'cr-5') }, { children: label }))] })), children[1]] })));
|
|
16316
16316
|
};
|
|
16317
16317
|
var multiSelectStyles = {
|
|
16318
16318
|
control: function (base, state) { return (__assign(__assign({}, base), { cursor: state.isDisabled ? 'not-allowed' : 'normal', border: state.isFocused ? '1px solid #06c' : '1px solid #d6dbdf', boxShadow: 'none' })); },
|
package/package.json
CHANGED
|
@@ -28,8 +28,8 @@ export function ResizableTagTextArea({
|
|
|
28
28
|
|
|
29
29
|
const reInitHeight = () => {
|
|
30
30
|
if (document.activeElement !== refVar.current) return
|
|
31
|
-
refVar.current.style.height = '
|
|
32
|
-
dependentRef.current.style.height = '
|
|
31
|
+
refVar.current.style.height = minHeight+ 'px'
|
|
32
|
+
dependentRef.current.style.height = minHeight+ 'px'
|
|
33
33
|
let nextHeight = refVar.current.scrollHeight
|
|
34
34
|
if (nextHeight < dependentRef.current.scrollHeight) {
|
|
35
35
|
nextHeight = dependentRef.current.scrollHeight
|
|
@@ -47,8 +47,8 @@ export function ResizableTagTextArea({
|
|
|
47
47
|
useThrottledEffect(reInitHeight, 500, [text])
|
|
48
48
|
|
|
49
49
|
const handleOnBlur = (event) => {
|
|
50
|
-
refVar.current.style.height = '
|
|
51
|
-
dependentRef.current.style.height = '
|
|
50
|
+
refVar.current.style.height = minHeight+ 'px'
|
|
51
|
+
dependentRef.current.style.height = minHeight+ 'px'
|
|
52
52
|
onBlur && onBlur(event)
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -127,10 +127,10 @@ export const TagLabelValueSelector = ({
|
|
|
127
127
|
placement="right"
|
|
128
128
|
content={
|
|
129
129
|
<div className="pt-6 pr-10 pb-6 pl-10">
|
|
130
|
-
<div className="mb-10 fs-12 fw-6 cn-0">
|
|
130
|
+
<div className="mb-10 fs-12 fw-6 cn-0 dc__break-word">
|
|
131
131
|
{tag.label}
|
|
132
132
|
</div>
|
|
133
|
-
<div className="fs-12 fw-4 cn-0">
|
|
133
|
+
<div className="fs-12 fw-4 cn-0 dc__break-word">
|
|
134
134
|
{tag.description}
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
@@ -87,9 +87,9 @@ export const MultiValueChipContainer = ({ validator, isAllSelected = false, ...p
|
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
89
|
<components.MultiValueContainer {...{ data, innerProps, selectProps }}>
|
|
90
|
-
<div className=
|
|
90
|
+
<div className="flex left fs-12 pl-4 pr-4 dc__ellipsis-right">
|
|
91
91
|
{!isValidEmail && <RedWarning className="mr-4 icon-dim-16" />}
|
|
92
|
-
<div className={
|
|
92
|
+
<div className={`dc__ellipsis-right ${isValidEmail ? 'cn-9' : 'cr-5'}`}>{label}</div>
|
|
93
93
|
</div>
|
|
94
94
|
{children[1]}
|
|
95
95
|
</components.MultiValueContainer>
|