@youngonesworks/ui 0.1.43 → 0.1.45
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/components/badge/index.d.ts +1 -1
- package/dist/index.cjs +16 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ interface IBadgeProps {
|
|
|
21
21
|
badgeBorder?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export declare const Badge: {
|
|
24
|
-
({ styleVariant, className, favorite, mobile, badgeBorder, fullWidth, ...props }: IBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
({ styleVariant, className, favorite, mobile, badgeBorder, fullWidth, leftSection, rightSection, children, ...props }: IBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
displayName: string;
|
|
26
26
|
};
|
|
27
27
|
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -103268,7 +103268,7 @@ const AvatarIndicator = ({ indicatorCount, className }) => /* @__PURE__ */ (0, r
|
|
|
103268
103268
|
|
|
103269
103269
|
//#endregion
|
|
103270
103270
|
//#region src/components/badge/index.tsx
|
|
103271
|
-
const Badge = ({ styleVariant = COLOR.ACCENT_BLUE, className, favorite, mobile = false, badgeBorder = false, fullWidth = false,...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
103271
|
+
const Badge = ({ styleVariant = COLOR.ACCENT_BLUE, className, favorite, mobile = false, badgeBorder = false, fullWidth = false, leftSection, rightSection, children,...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
103272
103272
|
"data-testid": "badge",
|
|
103273
103273
|
"data-component": "Badge",
|
|
103274
103274
|
className: clsx_default("inline-flex h-[1.375rem] max-w-full place-content-center items-center p-[10px] align-middle text-xs leading-[20px] font-medium tracking-wide text-wrap whitespace-normal normal-case", mobile ? "rounded-s" : "rounded-[2rem]", fullWidth && "w-full", badgeBorder && {
|
|
@@ -103295,18 +103295,18 @@ const Badge = ({ styleVariant = COLOR.ACCENT_BLUE, className, favorite, mobile =
|
|
|
103295
103295
|
}, className),
|
|
103296
103296
|
...props,
|
|
103297
103297
|
children: [
|
|
103298
|
-
|
|
103298
|
+
leftSection && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
103299
103299
|
"data-testid": "left-section",
|
|
103300
|
-
children:
|
|
103300
|
+
children: leftSection
|
|
103301
103301
|
}),
|
|
103302
103302
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
103303
103303
|
"data-testid": "badge-content",
|
|
103304
103304
|
className: cn("block h-5 overflow-hidden text-ellipsis whitespace-nowrap", { "flex items-center": favorite }),
|
|
103305
|
-
children
|
|
103305
|
+
children
|
|
103306
103306
|
}),
|
|
103307
|
-
|
|
103307
|
+
rightSection && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
103308
103308
|
"data-testid": "right-section",
|
|
103309
|
-
children:
|
|
103309
|
+
children: rightSection
|
|
103310
103310
|
})
|
|
103311
103311
|
]
|
|
103312
103312
|
});
|
|
@@ -109915,8 +109915,10 @@ const Rating = ({ rating, ratings, size: size$3 = "normal", setReview, className
|
|
|
109915
109915
|
}, index$4))
|
|
109916
109916
|
}),
|
|
109917
109917
|
setReview && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
109918
|
-
|
|
109918
|
+
"data-testid": "small-stars-container",
|
|
109919
|
+
className: "mt-4 flex flex-col gap-2",
|
|
109919
109920
|
children: ratings.map(({ value, label }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
109921
|
+
"data-testid": `small-star-item-${value}`,
|
|
109920
109922
|
className: "flex w-auto cursor-pointer items-center gap-1",
|
|
109921
109923
|
onMouseEnter: () => setHoveredSmallStars(value),
|
|
109922
109924
|
onMouseLeave: () => setHoveredSmallStars(0),
|
|
@@ -116027,9 +116029,9 @@ const TabsBadge = ({ children }) => {
|
|
|
116027
116029
|
const isCircular = typeof children === "number" && children <= 9 || typeof children === "string" && children.length === 1 || false;
|
|
116028
116030
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
116029
116031
|
"data-testid": "tabs-badge",
|
|
116030
|
-
className: clsx_default("bg-pink h-5 text-xs leading-5 font-medium text-white", {
|
|
116031
|
-
"
|
|
116032
|
-
"
|
|
116032
|
+
className: clsx_default("bg-pink h-5 rounded-full text-xs leading-5 font-medium text-white", {
|
|
116033
|
+
"w-5 text-center": isCircular,
|
|
116034
|
+
"px-2": !isCircular
|
|
116033
116035
|
}),
|
|
116034
116036
|
children
|
|
116035
116037
|
});
|
|
@@ -116279,7 +116281,8 @@ const Tooltip = ({ content, children, passedOpen = false, size: size$3 = "md", v
|
|
|
116279
116281
|
height: 17,
|
|
116280
116282
|
tipRadius: 1,
|
|
116281
116283
|
fill: "white",
|
|
116282
|
-
className: "drop-shadow-xl"
|
|
116284
|
+
className: "drop-shadow-xl",
|
|
116285
|
+
"data-testid": "tooltip-arrow"
|
|
116283
116286
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FloatingArrow, {
|
|
116284
116287
|
ref: arrowRef,
|
|
116285
116288
|
context,
|
|
@@ -116287,7 +116290,8 @@ const Tooltip = ({ content, children, passedOpen = false, size: size$3 = "md", v
|
|
|
116287
116290
|
height: 6,
|
|
116288
116291
|
tipRadius: 1,
|
|
116289
116292
|
fill: "white",
|
|
116290
|
-
className: "drop-shadow-xl"
|
|
116293
|
+
className: "drop-shadow-xl",
|
|
116294
|
+
"data-testid": "tooltip-arrow"
|
|
116291
116295
|
})]
|
|
116292
116296
|
})
|
|
116293
116297
|
})] });
|