@trackunit/react-components 1.10.45 → 1.10.47

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/index.cjs.js CHANGED
@@ -585,7 +585,6 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
585
585
  * So we need to add padding to the min-height calculation. Two times the vertical
586
586
  * padding aka py-1 * 2 aka --spacing-1 * 2 aka spacing-2 (for small).
587
587
  */
588
- extraSmall: ["p-0", "gap-1", "w-5", "h-8", "text-xs", "min-h-[calc(var(--line-height-sm)+var(--spacing-1))"],
589
588
  small: ["px-2", "py-1.5", "gap-1", "h-7", "text-xs", "min-h-[calc(var(--line-height-sm)+var(--spacing-2))]"],
590
589
  medium: ["px-3", "py-1.5", "gap-2", "h-8", "text-sm", "min-h-[calc(var(--line-height-sm)+var(--spacing-3))]"],
591
590
  large: [
@@ -598,10 +597,6 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
598
597
  "min-h-[calc(var(--line-height-sm)+var(--spacing-4))]",
599
598
  ],
600
599
  },
601
- rounded: {
602
- true: ["rounded-full"],
603
- false: [],
604
- },
605
600
  fullWidth: {
606
601
  true: ["w-full", "flex-auto"],
607
602
  false: [],
@@ -665,7 +660,6 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
665
660
  defaultVariants: {
666
661
  variant: "primary",
667
662
  size: "medium",
668
- rounded: false,
669
663
  fullWidth: false,
670
664
  square: false,
671
665
  disabled: false,
@@ -724,7 +718,6 @@ const cvaButtonPrefixSuffix = cssClassVarianceUtilities.cvaMerge(["flex", "items
724
718
  const cvaIconButton = cssClassVarianceUtilities.cvaMerge([], {
725
719
  variants: {
726
720
  size: {
727
- extraSmall: ["p-0", "w-5", "h-8"],
728
721
  small: ["p-1.5", "w-7", "h-7"],
729
722
  medium: ["p-2", "w-8", "h-8"],
730
723
  large: ["p-2.5", "w-10", "h-10"],
@@ -747,7 +740,7 @@ const cvaIconButton = cssClassVarianceUtilities.cvaMerge([], {
747
740
  * @param {ButtonProps} props - The props for the Button component
748
741
  * @returns {ReactElement} Button component
749
742
  */
750
- const Button = ({ onClick, children, loading = false, disabled = false, className, fullWidth = false, prefix, suffix, variant = "primary", type = "button", size = "medium", square = false, dataTestId, title, role, tabIndex, asChild = false, circular = false, ref, ...rest }) => {
743
+ const Button = ({ onClick, children, loading = false, disabled = false, className, fullWidth = false, prefix, suffix, variant = "primary", type = "button", size = "medium", square = false, dataTestId, title, role, tabIndex, asChild = false, ref, ...rest }) => {
751
744
  const Comp = asChild ? reactSlot.Slot : "button";
752
745
  const sharedCompProps = {
753
746
  ref,
@@ -755,7 +748,7 @@ const Button = ({ onClick, children, loading = false, disabled = false, classNam
755
748
  role,
756
749
  onClick,
757
750
  tabIndex,
758
- className: cvaButton({ rounded: circular, disabled, size, square, variant, loading, fullWidth, className }),
751
+ className: cvaButton({ disabled, size, square, variant, loading, fullWidth, className }),
759
752
  "aria-label": title,
760
753
  "aria-disabled": disabled || loading,
761
754
  "data-testid": dataTestId,
@@ -3036,6 +3029,7 @@ const cvaOverflowIndicatorButton = cssClassVarianceUtilities.cvaMerge([
3036
3029
  "pointer-events-auto",
3037
3030
  "starting:opacity-0",
3038
3031
  "group-hover:opacity-100",
3032
+ "rounded-full",
3039
3033
  ]);
3040
3034
 
3041
3035
  /**
@@ -3047,7 +3041,7 @@ const cvaOverflowIndicatorButton = cssClassVarianceUtilities.cvaMerge([
3047
3041
  */
3048
3042
  const OverflowIndicator = ({ className, dataTestId, direction, onClickScroll, }) => {
3049
3043
  const iconName = direction === "left" ? "ChevronLeft" : "ChevronRight";
3050
- return (jsxRuntime.jsxs(ZStack, { className: cvaOverflowIndicatorContainer({ className }), dataTestId: dataTestId, children: [jsxRuntime.jsx("div", { className: cvaJustificationContainer({ direction }), children: jsxRuntime.jsx("div", { className: cvaOverflowIndicatorGradient({ direction }), "data-testid": dataTestId ? `${dataTestId}-gradient` : undefined }) }), jsxRuntime.jsx("div", { className: cvaJustificationContainer({ direction }), children: jsxRuntime.jsx(IconButton, { circular: true, className: cvaOverflowIndicatorButton(), "data-testid": dataTestId ? `${dataTestId}-button` : undefined, icon: jsxRuntime.jsx(Icon, { name: iconName, size: "small" }), onClick: onClickScroll, size: "small", variant: "secondary" }) })] }));
3044
+ return (jsxRuntime.jsxs(ZStack, { className: cvaOverflowIndicatorContainer({ className }), dataTestId: dataTestId, children: [jsxRuntime.jsx("div", { className: cvaJustificationContainer({ direction }), children: jsxRuntime.jsx("div", { className: cvaOverflowIndicatorGradient({ direction }), "data-testid": dataTestId ? `${dataTestId}-gradient` : undefined }) }), jsxRuntime.jsx("div", { className: cvaJustificationContainer({ direction }), children: jsxRuntime.jsx(IconButton, { className: cvaOverflowIndicatorButton(), "data-testid": dataTestId ? `${dataTestId}-button` : undefined, icon: jsxRuntime.jsx(Icon, { name: iconName, size: "small" }), onClick: onClickScroll, size: "small", variant: "secondary" }) })] }));
3051
3045
  };
3052
3046
 
3053
3047
  /**
@@ -4637,7 +4631,6 @@ const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
4637
4631
  className: "text-neutral-400",
4638
4632
  }, iconButtonProps = {
4639
4633
  size: "medium",
4640
- circular: false,
4641
4634
  square: true,
4642
4635
  variant: "secondary",
4643
4636
  }, customButton, customPortalId, children, }) => {
package/index.esm.js CHANGED
@@ -583,7 +583,6 @@ const cvaButton = cvaMerge([
583
583
  * So we need to add padding to the min-height calculation. Two times the vertical
584
584
  * padding aka py-1 * 2 aka --spacing-1 * 2 aka spacing-2 (for small).
585
585
  */
586
- extraSmall: ["p-0", "gap-1", "w-5", "h-8", "text-xs", "min-h-[calc(var(--line-height-sm)+var(--spacing-1))"],
587
586
  small: ["px-2", "py-1.5", "gap-1", "h-7", "text-xs", "min-h-[calc(var(--line-height-sm)+var(--spacing-2))]"],
588
587
  medium: ["px-3", "py-1.5", "gap-2", "h-8", "text-sm", "min-h-[calc(var(--line-height-sm)+var(--spacing-3))]"],
589
588
  large: [
@@ -596,10 +595,6 @@ const cvaButton = cvaMerge([
596
595
  "min-h-[calc(var(--line-height-sm)+var(--spacing-4))]",
597
596
  ],
598
597
  },
599
- rounded: {
600
- true: ["rounded-full"],
601
- false: [],
602
- },
603
598
  fullWidth: {
604
599
  true: ["w-full", "flex-auto"],
605
600
  false: [],
@@ -663,7 +658,6 @@ const cvaButton = cvaMerge([
663
658
  defaultVariants: {
664
659
  variant: "primary",
665
660
  size: "medium",
666
- rounded: false,
667
661
  fullWidth: false,
668
662
  square: false,
669
663
  disabled: false,
@@ -722,7 +716,6 @@ const cvaButtonPrefixSuffix = cvaMerge(["flex", "items-center"], {
722
716
  const cvaIconButton = cvaMerge([], {
723
717
  variants: {
724
718
  size: {
725
- extraSmall: ["p-0", "w-5", "h-8"],
726
719
  small: ["p-1.5", "w-7", "h-7"],
727
720
  medium: ["p-2", "w-8", "h-8"],
728
721
  large: ["p-2.5", "w-10", "h-10"],
@@ -745,7 +738,7 @@ const cvaIconButton = cvaMerge([], {
745
738
  * @param {ButtonProps} props - The props for the Button component
746
739
  * @returns {ReactElement} Button component
747
740
  */
748
- const Button = ({ onClick, children, loading = false, disabled = false, className, fullWidth = false, prefix, suffix, variant = "primary", type = "button", size = "medium", square = false, dataTestId, title, role, tabIndex, asChild = false, circular = false, ref, ...rest }) => {
741
+ const Button = ({ onClick, children, loading = false, disabled = false, className, fullWidth = false, prefix, suffix, variant = "primary", type = "button", size = "medium", square = false, dataTestId, title, role, tabIndex, asChild = false, ref, ...rest }) => {
749
742
  const Comp = asChild ? Slot : "button";
750
743
  const sharedCompProps = {
751
744
  ref,
@@ -753,7 +746,7 @@ const Button = ({ onClick, children, loading = false, disabled = false, classNam
753
746
  role,
754
747
  onClick,
755
748
  tabIndex,
756
- className: cvaButton({ rounded: circular, disabled, size, square, variant, loading, fullWidth, className }),
749
+ className: cvaButton({ disabled, size, square, variant, loading, fullWidth, className }),
757
750
  "aria-label": title,
758
751
  "aria-disabled": disabled || loading,
759
752
  "data-testid": dataTestId,
@@ -3034,6 +3027,7 @@ const cvaOverflowIndicatorButton = cvaMerge([
3034
3027
  "pointer-events-auto",
3035
3028
  "starting:opacity-0",
3036
3029
  "group-hover:opacity-100",
3030
+ "rounded-full",
3037
3031
  ]);
3038
3032
 
3039
3033
  /**
@@ -3045,7 +3039,7 @@ const cvaOverflowIndicatorButton = cvaMerge([
3045
3039
  */
3046
3040
  const OverflowIndicator = ({ className, dataTestId, direction, onClickScroll, }) => {
3047
3041
  const iconName = direction === "left" ? "ChevronLeft" : "ChevronRight";
3048
- return (jsxs(ZStack, { className: cvaOverflowIndicatorContainer({ className }), dataTestId: dataTestId, children: [jsx("div", { className: cvaJustificationContainer({ direction }), children: jsx("div", { className: cvaOverflowIndicatorGradient({ direction }), "data-testid": dataTestId ? `${dataTestId}-gradient` : undefined }) }), jsx("div", { className: cvaJustificationContainer({ direction }), children: jsx(IconButton, { circular: true, className: cvaOverflowIndicatorButton(), "data-testid": dataTestId ? `${dataTestId}-button` : undefined, icon: jsx(Icon, { name: iconName, size: "small" }), onClick: onClickScroll, size: "small", variant: "secondary" }) })] }));
3042
+ return (jsxs(ZStack, { className: cvaOverflowIndicatorContainer({ className }), dataTestId: dataTestId, children: [jsx("div", { className: cvaJustificationContainer({ direction }), children: jsx("div", { className: cvaOverflowIndicatorGradient({ direction }), "data-testid": dataTestId ? `${dataTestId}-gradient` : undefined }) }), jsx("div", { className: cvaJustificationContainer({ direction }), children: jsx(IconButton, { className: cvaOverflowIndicatorButton(), "data-testid": dataTestId ? `${dataTestId}-button` : undefined, icon: jsx(Icon, { name: iconName, size: "small" }), onClick: onClickScroll, size: "small", variant: "secondary" }) })] }));
3049
3043
  };
3050
3044
 
3051
3045
  /**
@@ -4635,7 +4629,6 @@ const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
4635
4629
  className: "text-neutral-400",
4636
4630
  }, iconButtonProps = {
4637
4631
  size: "medium",
4638
- circular: false,
4639
4632
  square: true,
4640
4633
  variant: "secondary",
4641
4634
  }, customButton, customPortalId, children, }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "1.10.45",
3
+ "version": "1.10.47",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -40,9 +40,9 @@ export interface ButtonProps extends Omit<ButtonCommonProps, "size"> {
40
40
  */
41
41
  ref?: Ref<HTMLButtonElement>;
42
42
  /**
43
- * The size of the button. "ExtraSmall" is only used for IconButtons.
43
+ * The size of the button
44
44
  */
45
- size?: "extraSmall" | Size;
45
+ size?: Size;
46
46
  }
47
47
  /**
48
48
  * Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it.
@@ -57,6 +57,6 @@ export interface ButtonProps extends Omit<ButtonCommonProps, "size"> {
57
57
  * @returns {ReactElement} Button component
58
58
  */
59
59
  export declare const Button: {
60
- ({ onClick, children, loading, disabled, className, fullWidth, prefix, suffix, variant, type, size, square, dataTestId, title, role, tabIndex, asChild, circular, ref, ...rest }: ButtonProps): ReactElement;
60
+ ({ onClick, children, loading, disabled, className, fullWidth, prefix, suffix, variant, type, size, square, dataTestId, title, role, tabIndex, asChild, ref, ...rest }: ButtonProps): ReactElement;
61
61
  displayName: string;
62
62
  };
@@ -16,7 +16,7 @@ export interface IconButtonProps extends MappedOmit<ButtonCommonProps, "size"> {
16
16
  /**
17
17
  * The size of the button. Defaults to "medium".
18
18
  */
19
- size?: "extraSmall" | Size;
19
+ size?: Size;
20
20
  /**
21
21
  * A ref for the component
22
22
  */
@@ -1,7 +1,6 @@
1
1
  export declare const cvaButton: (props?: ({
2
2
  variant?: "primary" | "primary-danger" | "secondary" | "secondary-danger" | "ghost" | "ghost-neutral" | "filled" | null | undefined;
3
- size?: "extraSmall" | "small" | "medium" | "large" | null | undefined;
4
- rounded?: boolean | null | undefined;
3
+ size?: "small" | "medium" | "large" | null | undefined;
5
4
  fullWidth?: boolean | null | undefined;
6
5
  square?: boolean | null | undefined;
7
6
  disabled?: boolean | null | undefined;
@@ -12,9 +11,9 @@ export declare const cvaButtonSpinner: (props?: ({
12
11
  variant?: "primary" | "primary-danger" | "secondary" | "secondary-danger" | "ghost" | "ghost-neutral" | "filled" | null | undefined;
13
12
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
14
13
  export declare const cvaButtonPrefixSuffix: (props?: ({
15
- size?: "extraSmall" | "small" | "medium" | "large" | null | undefined;
14
+ size?: "small" | "medium" | "large" | "extraSmall" | null | undefined;
16
15
  variant?: "primary" | "primary-danger" | "secondary" | "secondary-danger" | "ghost" | "ghost-neutral" | "filled" | null | undefined;
17
16
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
18
17
  export declare const cvaIconButton: (props?: ({
19
- size?: "extraSmall" | "small" | "medium" | "large" | null | undefined;
18
+ size?: "small" | "medium" | "large" | null | undefined;
20
19
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -38,10 +38,6 @@ export interface ButtonCommonProps extends CommonProps {
38
38
  * The id of the button.
39
39
  */
40
40
  id?: string;
41
- /**
42
- * Whether the button is circular or not.
43
- */
44
- circular?: boolean;
45
41
  title?: string;
46
42
  tabIndex?: number;
47
43
  role?: string;