@sustaina/shared-ui 1.40.0 → 1.40.2

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/index.mjs CHANGED
@@ -2973,25 +2973,65 @@ var ConditionNumberInput = ({ row, control, onClear }) => /* @__PURE__ */ jsx(
2973
2973
  }
2974
2974
  }
2975
2975
  );
2976
- var cotton = "hover:ring-2 active:ring-0 focus-visible:ring-2 text-primary-foreground ";
2976
+ var cotton = "hover:ring-2 active:ring-0 focus-visible:ring-2 text-primary-foreground disabled:bg-sus-secondary-gray-5 disabled:text-sus-secondary-gray-8";
2977
+ var outline = "bg-none disabled:bg-none disabled:border-sus-secondary-gray-5 disabled:text-sus-secondary-gray-8";
2977
2978
  var buttonVariants = cva(
2978
- "disabled:bg-sus-secondary-gray-5 disabled:text-sus-secondary-gray-8 inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",
2979
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",
2979
2980
  {
2980
2981
  variants: {
2981
2982
  variant: {
2982
- default: cotton + "bg-sus-primary-green-9 hover:bg-sus-primary-green-8 hover:ring-sus-primary-green-8/20 focus-visible:ring-2 focus-visible:bg-sus-primary-green-8 active:bg-sus-primary-green-10 focus-visible:ring-sus-primary-green-10",
2983
- destructive: cotton + "bg-sus-button-red-2 hover:bg-sus-button-red-1 hover:ring-sus-button-red-1/20 focus-visible:ring-2 active:bg-sus-button-red-3 focus-visible:bg-sus-button-red-1 focus-visible:ring-sus-button-red-3",
2984
- cancel: cotton + "bg-sus-button-accent-2 hover:bg-sus-button-accent-1 hover:ring-sus-button-accent-1/20 focus-visible:ring-2 active:bg-sus-button-accent-3 focus-visible:bg-sus-button-accent-1 focus-visible:ring-sus-button-accent-3",
2985
- warning: cotton + "bg-sus-button-yellow-2 hover:bg-sus-button-yellow-1 hover:ring-sus-button-yellow-1/20 focus-visible:ring-2 active:bg-sus-button-yellow-3 focus-visible:bg-sus-button-yellow-1 focus-visible:ring-sus-button-yellow-3",
2986
- cottonYellowDark: cotton + "bg-sus-button-yellowdark-2 hover:bg-sus-button-yellowdark-1 hover:ring-sus-button-yellowdark-1/20 focus-visible:ring-2 active:bg-sus-button-yellowdark-3 focus-visible:bg-sus-button-yellowdark-1 focus-visible:ring-sus-button-yellowdark-3",
2987
- cottonGreen: cotton + "bg-sus-button-green-2 hover:bg-sus-button-green-1 hover:ring-sus-button-green-1/20 focus-visible:ring-2 active:bg-sus-button-green-3 focus-visible:bg-sus-button-green-1 focus-visible:ring-sus-button-green-3",
2988
- cottonBlue: cotton + "bg-sus-button-blue-2 hover:bg-sus-button-blue-1 hover:ring-sus-button-blue-1/20 focus-visible:ring-2 active:bg-sus-button-blue-3 focus-visible:bg-sus-button-blue-1 focus-visible:ring-sus-button-blue-3",
2989
- cottonRed: cotton + "bg-sus-button-red-2 hover:bg-sus-button-red-1 hover:ring-sus-button-red-1/20 focus-visible:ring-2 active:bg-sus-button-red-3 focus-visible:bg-sus-button-red-1 focus-visible:ring-sus-button-red-3",
2990
- cottonAccent: cotton + "bg-sus-button-accent-2 hover:bg-sus-button-accent-1 hover:ring-sus-button-accent-1/20 focus-visible:ring-2 active:bg-sus-button-accent-3 focus-visible:bg-sus-button-accent-1 focus-visible:ring-sus-button-accent-3",
2991
- cottonYellow: cotton + "bg-sus-button-yellow-2 hover:bg-sus-button-yellow-1 hover:ring-sus-button-yellow-1/20 focus-visible:ring-2 active:bg-sus-button-yellow-3 focus-visible:bg-sus-button-yellow-1 focus-visible:ring-sus-button-yellow-3",
2992
- cottonBlack: cotton + "bg-sus-button-black-2 hover:bg-sus-button-black-1 hover:ring-sus-button-black-1/20 focus-visible:ring-2 active:bg-sus-button-black-3 focus-visible:bg-sus-button-black-1 focus-visible:ring-sus-button-black-3",
2993
- defaultOutline: "border border-sus-primary-green-9 text-black hover:border-sus-primary-green-8 hover:text-sus-primary-green-8 active:border-sus-primary-green-9 active:text-black focus-visible:border-sus-primary-green-10 focus-visible:text-sus-primary-green-10",
2994
- destructiveOutline: "border border-sus-button-red-2 text-black hover:border-sus-button-red-1 hover:text-sus-button-red-1 active:border-sus-button-red-2 active:text-black focus-visible:border-sus-button-red-3 focus-visible:text-sus-button-red-3",
2983
+ default: cn(
2984
+ cotton,
2985
+ "bg-sus-primary-green-9 hover:bg-sus-primary-green-8 hover:ring-sus-primary-green-8/20 focus-visible:ring-2 focus-visible:bg-sus-primary-green-8 active:bg-sus-primary-green-10 focus-visible:ring-sus-primary-green-10"
2986
+ ),
2987
+ destructive: cn(
2988
+ cotton,
2989
+ "bg-sus-button-red-2 hover:bg-sus-button-red-1 hover:ring-sus-button-red-1/20 focus-visible:ring-2 active:bg-sus-button-red-3 focus-visible:bg-sus-button-red-1 focus-visible:ring-sus-button-red-3"
2990
+ ),
2991
+ cancel: cn(
2992
+ cotton,
2993
+ "bg-sus-button-accent-2 hover:bg-sus-button-accent-1 hover:ring-sus-button-accent-1/20 focus-visible:ring-2 active:bg-sus-button-accent-3 focus-visible:bg-sus-button-accent-1 focus-visible:ring-sus-button-accent-3"
2994
+ ),
2995
+ warning: cn(
2996
+ cotton,
2997
+ "bg-sus-button-yellow-2 hover:bg-sus-button-yellow-1 hover:ring-sus-button-yellow-1/20 focus-visible:ring-2 active:bg-sus-button-yellow-3 focus-visible:bg-sus-button-yellow-1 focus-visible:ring-sus-button-yellow-3"
2998
+ ),
2999
+ cottonYellowDark: cn(
3000
+ cotton,
3001
+ "bg-sus-button-yellowdark-2 hover:bg-sus-button-yellowdark-1 hover:ring-sus-button-yellowdark-1/20 focus-visible:ring-2 active:bg-sus-button-yellowdark-3 focus-visible:bg-sus-button-yellowdark-1 focus-visible:ring-sus-button-yellowdark-3"
3002
+ ),
3003
+ cottonGreen: cn(
3004
+ cotton,
3005
+ "bg-sus-button-green-2 hover:bg-sus-button-green-1 hover:ring-sus-button-green-1/20 focus-visible:ring-2 active:bg-sus-button-green-3 focus-visible:bg-sus-button-green-1 focus-visible:ring-sus-button-green-3"
3006
+ ),
3007
+ cottonBlue: cn(
3008
+ cotton,
3009
+ "bg-sus-button-blue-2 hover:bg-sus-button-blue-1 hover:ring-sus-button-blue-1/20 focus-visible:ring-2 active:bg-sus-button-blue-3 focus-visible:bg-sus-button-blue-1 focus-visible:ring-sus-button-blue-3"
3010
+ ),
3011
+ cottonRed: cn(
3012
+ cotton,
3013
+ "bg-sus-button-red-2 hover:bg-sus-button-red-1 hover:ring-sus-button-red-1/20 focus-visible:ring-2 active:bg-sus-button-red-3 focus-visible:bg-sus-button-red-1 focus-visible:ring-sus-button-red-3"
3014
+ ),
3015
+ cottonAccent: cn(
3016
+ cotton,
3017
+ "bg-sus-button-accent-2 hover:bg-sus-button-accent-1 hover:ring-sus-button-accent-1/20 focus-visible:ring-2 active:bg-sus-button-accent-3 focus-visible:bg-sus-button-accent-1 focus-visible:ring-sus-button-accent-3"
3018
+ ),
3019
+ cottonYellow: cn(
3020
+ cotton,
3021
+ "bg-sus-button-yellow-2 hover:bg-sus-button-yellow-1 hover:ring-sus-button-yellow-1/20 focus-visible:ring-2 active:bg-sus-button-yellow-3 focus-visible:bg-sus-button-yellow-1 focus-visible:ring-sus-button-yellow-3"
3022
+ ),
3023
+ cottonBlack: cn(
3024
+ cotton,
3025
+ "bg-sus-button-black-2 hover:bg-sus-button-black-1 hover:ring-sus-button-black-1/20 focus-visible:ring-2 active:bg-sus-button-black-3 focus-visible:bg-sus-button-black-1 focus-visible:ring-sus-button-black-3"
3026
+ ),
3027
+ defaultOutline: cn(
3028
+ outline,
3029
+ "border border-sus-primary-green-9 text-black hover:border-sus-primary-green-8 hover:text-sus-primary-green-8 active:border-sus-primary-green-9 active:text-black focus-visible:border-sus-primary-green-10 focus-visible:text-sus-primary-green-10"
3030
+ ),
3031
+ destructiveOutline: cn(
3032
+ outline,
3033
+ "border border-sus-button-red-2 text-black hover:border-sus-button-red-1 hover:text-sus-button-red-1 active:border-sus-button-red-2 active:text-black focus-visible:border-sus-button-red-3 focus-visible:text-sus-button-red-3"
3034
+ ),
2995
3035
  outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
2996
3036
  secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
2997
3037
  ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
@@ -3003,11 +3043,16 @@ var buttonVariants = cva(
3003
3043
  option: "py-5 h-9 px-4 has-[>svg]:px-3",
3004
3044
  sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
3005
3045
  lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
3006
- icon: "size-9 rounded-full",
3007
- "icon-xs": "size-5 rounded-full",
3008
- "icon-sm": "size-[22px] rounded-full",
3009
- "icon-md": "size-9 rounded-full",
3010
- "icon-lg": "size-10 rounded-full"
3046
+ icon: "size-9",
3047
+ "icon-xs": "size-5",
3048
+ "icon-sm": "size-[22px]",
3049
+ "icon-md": "size-9",
3050
+ "icon-lg": "size-10",
3051
+ "icon-rounded": "size-9 rounded-full",
3052
+ "icon-xs-rounded": "size-5 rounded-full",
3053
+ "icon-sm-rounded": "size-[22px] rounded-full",
3054
+ "icon-md-rounded": "size-9 rounded-full",
3055
+ "icon-lg-rounded": "size-10 rounded-full"
3011
3056
  },
3012
3057
  active: {
3013
3058
  true: "",
@@ -10310,7 +10355,8 @@ var FormulaEditor = ({
10310
10355
  {
10311
10356
  type: "button",
10312
10357
  onClick: () => insertOperator(operator.value),
10313
- className: "min-w-10 rounded-sm px-3 bg-sus-blue-3",
10358
+ variant: "cottonBlue",
10359
+ className: "min-w-10 rounded-sm px-3",
10314
10360
  disabled: isEditorDisabled,
10315
10361
  children: operator.label
10316
10362
  },
@@ -12787,7 +12833,7 @@ var TabSelect = ({
12787
12833
  {
12788
12834
  hidden: index >= items.length - 1,
12789
12835
  orientation: "vertical",
12790
- className: cn("h-[70%]! mx-3.5 bg-sus-secondary-gray-3", separatorClassName)
12836
+ className: cn("h-[70%]! mx-2 bg-sus-secondary-gray-3", separatorClassName)
12791
12837
  }
12792
12838
  )
12793
12839
  ] }, `key-${index}`);