@devtron-labs/devtron-fe-common-lib 0.0.82-beta-12 → 0.0.82-beta-13
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/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +4 -0
- package/dist/Shared/Components/ButtonWithSelector/ButtonWithSelector.d.ts +1 -1
- package/dist/Shared/Components/ButtonWithSelector/types.d.ts +1 -0
- package/dist/index.js +67 -51
- package/package.json +1 -1
|
@@ -34,5 +34,5 @@ import { SearchBarProps } from './types';
|
|
|
34
34
|
* <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, }: SearchBarProps) => JSX.Element;
|
|
37
|
+
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
|
|
38
38
|
export default SearchBar;
|
|
@@ -14,5 +14,5 @@ import { ButtonWithSelectorProps } from './types';
|
|
|
14
14
|
* </ButtonWithSelector>
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, }: ButtonWithSelectorProps) => JSX.Element;
|
|
17
|
+
declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, disabled, }: ButtonWithSelectorProps) => JSX.Element;
|
|
18
18
|
export default ButtonWithSelector;
|
package/dist/index.js
CHANGED
|
@@ -14544,9 +14544,10 @@ const Sy = ({
|
|
|
14544
14544
|
children: n,
|
|
14545
14545
|
className: r = "",
|
|
14546
14546
|
popUpBodyClassName: i = "",
|
|
14547
|
-
showPopUp: a = !0
|
|
14547
|
+
showPopUp: a = !0,
|
|
14548
|
+
disabled: s = !1
|
|
14548
14549
|
}) => {
|
|
14549
|
-
const [
|
|
14550
|
+
const [c, l] = k(!1);
|
|
14550
14551
|
return /* @__PURE__ */ o.jsxs("div", { className: "flexbox bcb-5 br-4", children: [
|
|
14551
14552
|
/* @__PURE__ */ o.jsx(
|
|
14552
14553
|
"button",
|
|
@@ -14554,17 +14555,25 @@ const Sy = ({
|
|
|
14554
14555
|
className: `cta flex h-28 ${a ? "dc__no-right-radius" : ""} dc__no-border-imp fs-12 fw-6 lh-20-imp ${r}`,
|
|
14555
14556
|
type: "button",
|
|
14556
14557
|
onClick: t,
|
|
14558
|
+
disabled: s,
|
|
14557
14559
|
children: e
|
|
14558
14560
|
}
|
|
14559
14561
|
),
|
|
14560
|
-
a && /* @__PURE__ */ o.jsxs(Pt, { autoClose: !0, autoPosition: !0, onToggleCallback:
|
|
14561
|
-
/* @__PURE__ */ o.jsx(
|
|
14562
|
-
|
|
14562
|
+
a && /* @__PURE__ */ o.jsxs(Pt, { autoClose: !0, autoPosition: !0, onToggleCallback: l, children: [
|
|
14563
|
+
/* @__PURE__ */ o.jsx(
|
|
14564
|
+
Pt.Button,
|
|
14563
14565
|
{
|
|
14564
|
-
|
|
14565
|
-
|
|
14566
|
+
disabled: s,
|
|
14567
|
+
rootClassName: "flex dc__transparent p-0 w-28 bcb-5 dc__right-radius-4 dc__no-left-radius dc__no-top-border dc__no-bottom-border dc__no-right-border button-with-selector",
|
|
14568
|
+
children: /* @__PURE__ */ o.jsx(
|
|
14569
|
+
sa,
|
|
14570
|
+
{
|
|
14571
|
+
className: "icon-dim-16 fcn-0 dc__no-shrink rotate",
|
|
14572
|
+
style: { "--rotateBy": c ? "180deg" : "0deg" }
|
|
14573
|
+
}
|
|
14574
|
+
)
|
|
14566
14575
|
}
|
|
14567
|
-
)
|
|
14576
|
+
),
|
|
14568
14577
|
/* @__PURE__ */ o.jsx(Pt.Body, { rootClassName: `pt-4 pb-4 dc__border dc__overflow-hidden ${i}`, children: n })
|
|
14569
14578
|
] })
|
|
14570
14579
|
] });
|
|
@@ -16573,57 +16582,64 @@ const zb = ({
|
|
|
16573
16582
|
inputProps: r = {},
|
|
16574
16583
|
containerClassName: i,
|
|
16575
16584
|
shouldDebounce: a = !1,
|
|
16576
|
-
debounceTimeout: s = 300
|
|
16585
|
+
debounceTimeout: s = 300,
|
|
16586
|
+
noBackgroundAndBorder: c = !1
|
|
16577
16587
|
}) => {
|
|
16578
|
-
const [
|
|
16588
|
+
const [l, u] = k(!!e), d = De(), g = ft(Zy(t, s), [
|
|
16579
16589
|
t,
|
|
16580
16590
|
s
|
|
16581
16591
|
]);
|
|
16582
16592
|
ne(() => {
|
|
16583
|
-
|
|
16593
|
+
d.current.value = e, u(!!e);
|
|
16584
16594
|
}, [e]);
|
|
16585
|
-
const
|
|
16586
|
-
t(
|
|
16587
|
-
},
|
|
16588
|
-
|
|
16589
|
-
},
|
|
16590
|
-
const { value:
|
|
16591
|
-
|
|
16592
|
-
},
|
|
16593
|
-
const { key:
|
|
16594
|
-
if (
|
|
16595
|
-
|
|
16596
|
-
const
|
|
16597
|
-
|
|
16595
|
+
const f = (M) => {
|
|
16596
|
+
t(M), n(M);
|
|
16597
|
+
}, I = () => {
|
|
16598
|
+
d.current.value = "", f(""), u(!1);
|
|
16599
|
+
}, p = (M) => {
|
|
16600
|
+
const { value: N } = M.target;
|
|
16601
|
+
u(!!N), a ? g(N) : t(N);
|
|
16602
|
+
}, A = (M) => {
|
|
16603
|
+
const { key: N } = M;
|
|
16604
|
+
if (N === "Enter") {
|
|
16605
|
+
M.preventDefault();
|
|
16606
|
+
const E = M.target.value.trim();
|
|
16607
|
+
f(E);
|
|
16598
16608
|
}
|
|
16599
16609
|
};
|
|
16600
|
-
return /* @__PURE__ */ o.jsx("div", { className: i, children: /* @__PURE__ */ o.jsxs(
|
|
16601
|
-
|
|
16602
|
-
|
|
16603
|
-
"
|
|
16604
|
-
|
|
16605
|
-
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
|
|
16609
|
-
|
|
16610
|
-
|
|
16611
|
-
|
|
16612
|
-
|
|
16613
|
-
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
|
|
16622
|
-
|
|
16623
|
-
|
|
16624
|
-
|
|
16625
|
-
|
|
16626
|
-
|
|
16610
|
+
return /* @__PURE__ */ o.jsx("div", { className: i, children: /* @__PURE__ */ o.jsxs(
|
|
16611
|
+
"div",
|
|
16612
|
+
{
|
|
16613
|
+
className: `search-bar ${c ? "dc__no-border dc__no-background dc__hover-n50" : "bc-n50 en-2 dc__hover-border-n300"} focus-within-border-b5 dc__block w-100 min-w-200 dc__position-rel br-4 bw-1 h-32`,
|
|
16614
|
+
children: [
|
|
16615
|
+
/* @__PURE__ */ o.jsx(Lb, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-16" }),
|
|
16616
|
+
/* @__PURE__ */ o.jsx(
|
|
16617
|
+
"input",
|
|
16618
|
+
{
|
|
16619
|
+
placeholder: "Search",
|
|
16620
|
+
"data-testid": "search-bar",
|
|
16621
|
+
type: "text",
|
|
16622
|
+
...r,
|
|
16623
|
+
defaultValue: e,
|
|
16624
|
+
className: `search-bar__input dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ${l ? "pr-30" : "pr-10"} ${c ? "dc__no-background" : "bc-n50"}`,
|
|
16625
|
+
onChange: p,
|
|
16626
|
+
onKeyDown: A,
|
|
16627
|
+
ref: d
|
|
16628
|
+
}
|
|
16629
|
+
),
|
|
16630
|
+
l && /* @__PURE__ */ o.jsx(
|
|
16631
|
+
"button",
|
|
16632
|
+
{
|
|
16633
|
+
className: "flex search-bar__clear-button dc__position-abs dc__transparent mt-0 mb-0 mr-5 ml-5",
|
|
16634
|
+
type: "button",
|
|
16635
|
+
onClick: I,
|
|
16636
|
+
"aria-label": "Clear search",
|
|
16637
|
+
children: /* @__PURE__ */ o.jsx(V0, { className: "icon-dim-16 icon-n4 dc__vertical-align-middle" })
|
|
16638
|
+
}
|
|
16639
|
+
)
|
|
16640
|
+
]
|
|
16641
|
+
}
|
|
16642
|
+
) });
|
|
16627
16643
|
}, v6 = zb, Pb = (e) => /* @__PURE__ */ C.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", ...e }, /* @__PURE__ */ C.createElement("path", { d: "M4.125 8.5L6 10.75L7.875 8.5M4.125 3.5L6 1.25L7.875 3.5", stroke: "#3B444C", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Rb = (e) => /* @__PURE__ */ C.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { d: "M3.5 7.50009L6.00004 10.0001M6.00004 10.0001L8.5 7.50054M6.00004 10.0001V2", stroke: "#596168", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), kb = ({
|
|
16628
16644
|
isSorted: e,
|
|
16629
16645
|
triggerSorting: t,
|