kelt-ui-kit-react 2.1.7 → 2.1.8
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/badge/Badge.d.ts +2 -1
- package/dist/index.js +10 -9
- package/package.json +1 -1
- package/src/badge/Badge.tsx +3 -0
- package/src/badge/Badge.view.tsx +1 -0
package/dist/badge/Badge.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ export type BadgeInterface = {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
onClick?: (e: React.MouseEvent) => void;
|
|
5
5
|
title?: string;
|
|
6
|
+
tooltip?: string;
|
|
6
7
|
sizeIcon?: IconSizeEnum;
|
|
7
8
|
classIcon?: string;
|
|
8
9
|
color?: string;
|
|
9
10
|
onRemove?: (event: React.MouseEvent) => void;
|
|
10
11
|
};
|
|
11
|
-
export declare const Badge: ({ className, onClick, title, sizeIcon, classIcon, color, onRemove, }: BadgeInterface) => import('react/jsx-runtime').JSX.Element;
|
|
12
|
+
export declare const Badge: ({ className, onClick, title, tooltip, sizeIcon, classIcon, color, onRemove, }: BadgeInterface) => import('react/jsx-runtime').JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -178,26 +178,27 @@ var ue = () => ({ getTokenValidate: o(() => {
|
|
|
178
178
|
}, z = ({ classIcon: e, size: t, onClick: n }) => /* @__PURE__ */ y("i", {
|
|
179
179
|
className: `bi ${e} ${t ?? "sm"}`,
|
|
180
180
|
onClick: n
|
|
181
|
-
}), pe = ({ className: e, onClick: t, title: n,
|
|
182
|
-
let
|
|
181
|
+
}), pe = ({ className: e, onClick: t, title: n, tooltip: r, sizeIcon: i, classIcon: a, color: s, onRemove: c }) => {
|
|
182
|
+
let l = o((e) => {
|
|
183
183
|
e.stopPropagation(), t && t(e);
|
|
184
184
|
}, [t]);
|
|
185
185
|
return /* @__PURE__ */ b("div", {
|
|
186
|
-
onClick:
|
|
187
|
-
|
|
186
|
+
onClick: l,
|
|
187
|
+
title: r,
|
|
188
|
+
style: s ? { backgroundColor: s } : void 0,
|
|
188
189
|
className: `badge ${e || ""}`,
|
|
189
190
|
children: [
|
|
190
|
-
|
|
191
|
-
size:
|
|
192
|
-
classIcon:
|
|
191
|
+
a && /* @__PURE__ */ y(z, {
|
|
192
|
+
size: i,
|
|
193
|
+
classIcon: a
|
|
193
194
|
}),
|
|
194
195
|
/* @__PURE__ */ y("span", { children: n }),
|
|
195
|
-
|
|
196
|
+
c && /* @__PURE__ */ y("button", {
|
|
196
197
|
type: "button",
|
|
197
198
|
className: "badge-remove",
|
|
198
199
|
"aria-label": `Retirer ${n ?? "le filtre"}`,
|
|
199
200
|
onClick: (e) => {
|
|
200
|
-
e.stopPropagation(),
|
|
201
|
+
e.stopPropagation(), c(e);
|
|
201
202
|
},
|
|
202
203
|
children: /* @__PURE__ */ y(z, { classIcon: "bi-x" })
|
|
203
204
|
})
|
package/package.json
CHANGED
package/src/badge/Badge.tsx
CHANGED
|
@@ -6,6 +6,7 @@ export type BadgeInterface = {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
onClick?: (e: React.MouseEvent) => void;
|
|
8
8
|
title?: string;
|
|
9
|
+
tooltip?: string;
|
|
9
10
|
sizeIcon?: IconSizeEnum;
|
|
10
11
|
classIcon?: string;
|
|
11
12
|
color?: string;
|
|
@@ -15,6 +16,7 @@ export const Badge = ({
|
|
|
15
16
|
className,
|
|
16
17
|
onClick,
|
|
17
18
|
title,
|
|
19
|
+
tooltip,
|
|
18
20
|
sizeIcon,
|
|
19
21
|
classIcon,
|
|
20
22
|
color,
|
|
@@ -29,6 +31,7 @@ export const Badge = ({
|
|
|
29
31
|
return (
|
|
30
32
|
<div
|
|
31
33
|
onClick={handleClick}
|
|
34
|
+
title={tooltip}
|
|
32
35
|
style={color ? { backgroundColor: color } : undefined}
|
|
33
36
|
className={`badge ${className ? className : ""}`}
|
|
34
37
|
>
|
package/src/badge/Badge.view.tsx
CHANGED