@trackunit/react-components 0.0.176 → 0.0.179

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.
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ThemeColors } from "@trackunit/ui-design-tokens";
3
3
  import { CommonProps } from "../../common/CommonProps";
4
- export declare type BadgeSize = "medium" | "large";
5
4
  interface BaseBadgeProps extends CommonProps {
6
5
  /**
7
6
  * The color of the badge.
@@ -31,10 +30,6 @@ interface BaseBadgeProps extends CommonProps {
31
30
  * If enabled the badge is shown even if the count is 0.
32
31
  */
33
32
  hideZero?: boolean;
34
- /**
35
- * Size of the badge.
36
- */
37
- size?: BadgeSize;
38
33
  }
39
34
  export declare type BadgeProps = BaseBadgeProps;
40
35
  /**
@@ -43,5 +38,5 @@ export declare type BadgeProps = BaseBadgeProps;
43
38
  * @param {BadgeProps} props - The props for the Badge component
44
39
  * @returns {JSX.Element} Badge component
45
40
  */
46
- export declare const Badge: ({ color, subtle, className, count, max, hideZero, dataTestId, size, ...rest }: BadgeProps) => JSX.Element | null;
41
+ export declare const Badge: ({ color, subtle, className, count, max, hideZero, dataTestId, ...rest }: BadgeProps) => JSX.Element | null;
47
42
  export {};
package/index.js CHANGED
@@ -843,10 +843,9 @@ const Badge = _a => {
843
843
  count,
844
844
  max,
845
845
  hideZero = false,
846
- dataTestId,
847
- size = "medium"
846
+ dataTestId
848
847
  } = _a;
849
- __rest(_a, ["color", "subtle", "className", "count", "max", "hideZero", "dataTestId", "size"]);
848
+ __rest(_a, ["color", "subtle", "className", "count", "max", "hideZero", "dataTestId"]);
850
849
 
851
850
  if (hideZero && count === 0) {
852
851
  return null;
@@ -856,7 +855,6 @@ const Badge = _a => {
856
855
  return jsx(StyledText$3, Object.assign({
857
856
  className: className,
858
857
  "$color": color,
859
- "$size": size,
860
858
  "$subtle": subtle,
861
859
  "$count": count,
862
860
  "data-testid": dataTestId,
@@ -866,16 +864,6 @@ const Badge = _a => {
866
864
  }));
867
865
  };
868
866
 
869
- const getSizeModifierClass$1 = () => ({
870
- $size
871
- }) => {
872
- const sizeModifierClass = {
873
- large: tws`tu-badge--large`,
874
- medium: ""
875
- };
876
- return sizeModifierClass[$size];
877
- };
878
-
879
867
  const getBadgeModifierClass = () => ({
880
868
  $color,
881
869
  $subtle
@@ -906,7 +894,6 @@ const StyledText$3 = tw.text`
906
894
  $count
907
895
  }) => ($count === null || $count === undefined) && tws`tu-badge--square`}
908
896
  ${getBadgeModifierClass()}
909
- ${getSizeModifierClass$1()}
910
897
  `;
911
898
 
912
899
  /**
@@ -2645,6 +2632,9 @@ const Container$4 = tw.div`
2645
2632
  case "in_repair":
2646
2633
  return tws`tu-indicator--in-repair`;
2647
2634
 
2635
+ case "returned":
2636
+ return tws`tu-indicator--returned`;
2637
+
2648
2638
  case "other_rental_status":
2649
2639
  return tws`tu-indicator--other-rental-status`;
2650
2640
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.0.176",
3
+ "version": "0.0.179",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
@@ -14,7 +14,7 @@
14
14
  "react-use": "^17.4.0",
15
15
  "date-fns": "^2.29.3",
16
16
  "react-day-picker": "^8.3.0",
17
- "@trackunit/ui-icons": "0.0.48",
17
+ "@trackunit/ui-icons": "0.0.49",
18
18
  "react-useportal": "1.0.17",
19
19
  "@react-spring/web": "9.5.4",
20
20
  "react-router-dom": "6.4.1",