@vygruppen/spor-react 12.24.7 → 12.24.9

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.d.cts CHANGED
@@ -1669,7 +1669,16 @@ declare const NativeSelect: React$1.ForwardRefExoticComponent<{
1669
1669
  icon?: React$1.ReactNode;
1670
1670
  } & React$1.RefAttributes<HTMLDivElement>>;
1671
1671
 
1672
- declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "container" | "input" | "text" | "button">>;
1672
+ declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", {
1673
+ withStepLabel: {
1674
+ true: {
1675
+ button: {
1676
+ paddingInline: "1 !important";
1677
+ };
1678
+ };
1679
+ false: {};
1680
+ };
1681
+ }>;
1673
1682
 
1674
1683
  type NumericStepperVariants = RecipeVariantProps<typeof numericStepperRecipe>;
1675
1684
  type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
@@ -1722,6 +1731,8 @@ type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
1722
1731
  * @see https://spor.vy.no/components/numeric-stepper
1723
1732
  */
1724
1733
  declare const NumericStepper: React__default.ForwardRefExoticComponent<FieldBaseProps & {
1734
+ withStepLabel?: _chakra_ui_react.ConditionalValue<boolean | undefined>;
1735
+ } & {
1725
1736
  children?: React__default.ReactNode;
1726
1737
  /** The name of the input field */
1727
1738
  name?: string;
package/dist/index.d.ts CHANGED
@@ -1669,7 +1669,16 @@ declare const NativeSelect: React$1.ForwardRefExoticComponent<{
1669
1669
  icon?: React$1.ReactNode;
1670
1670
  } & React$1.RefAttributes<HTMLDivElement>>;
1671
1671
 
1672
- declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "container" | "input" | "text" | "button">>;
1672
+ declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", {
1673
+ withStepLabel: {
1674
+ true: {
1675
+ button: {
1676
+ paddingInline: "1 !important";
1677
+ };
1678
+ };
1679
+ false: {};
1680
+ };
1681
+ }>;
1673
1682
 
1674
1683
  type NumericStepperVariants = RecipeVariantProps<typeof numericStepperRecipe>;
1675
1684
  type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
@@ -1722,6 +1731,8 @@ type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
1722
1731
  * @see https://spor.vy.no/components/numeric-stepper
1723
1732
  */
1724
1733
  declare const NumericStepper: React__default.ForwardRefExoticComponent<FieldBaseProps & {
1734
+ withStepLabel?: _chakra_ui_react.ConditionalValue<boolean | undefined>;
1735
+ } & {
1725
1736
  children?: React__default.ReactNode;
1726
1737
  /** The name of the input field */
1727
1738
  name?: string;
package/dist/index.mjs CHANGED
@@ -4040,7 +4040,8 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
4040
4040
  focusOnAddButton();
4041
4041
  }
4042
4042
  },
4043
- disabled: disabled || value <= minValue
4043
+ disabled: disabled || value <= minValue,
4044
+ withStepLabel: stepSize != 1
4044
4045
  }
4045
4046
  ),
4046
4047
  withInput ? /* @__PURE__ */ jsx(
@@ -4089,7 +4090,8 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
4089
4090
  )
4090
4091
  ),
4091
4092
  onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
4092
- disabled: disabled || value >= maxValue
4093
+ disabled: disabled || value >= maxValue,
4094
+ withStepLabel: stepSize != 1
4093
4095
  }
4094
4096
  )
4095
4097
  ]
@@ -4098,8 +4100,9 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
4098
4100
  });
4099
4101
  NumericStepper.displayName = "NumericStepper";
4100
4102
  var VerySmallButton = React20__default.forwardRef((props, ref) => {
4103
+ const { withStepLabel = false, ...rest } = props;
4101
4104
  const recipe = useSlotRecipe({ key: "numericStepper" });
4102
- const styles = recipe({ colorPalette: "default" });
4105
+ const styles = recipe({ withStepLabel });
4103
4106
  return /* @__PURE__ */ jsx(
4104
4107
  IconButton,
4105
4108
  {
@@ -4107,7 +4110,7 @@ var VerySmallButton = React20__default.forwardRef((props, ref) => {
4107
4110
  size: "xs",
4108
4111
  css: styles.button,
4109
4112
  ref,
4110
- ...props
4113
+ ...rest
4111
4114
  }
4112
4115
  );
4113
4116
  });
@@ -9811,6 +9814,16 @@ var numericStepperRecipe = defineSlotRecipe({
9811
9814
  height: "1.2rem"
9812
9815
  }
9813
9816
  }
9817
+ },
9818
+ variants: {
9819
+ withStepLabel: {
9820
+ true: {
9821
+ button: {
9822
+ paddingInline: "1 !important"
9823
+ }
9824
+ },
9825
+ false: {}
9826
+ }
9814
9827
  }
9815
9828
  });
9816
9829
  var paginationSlotRecipe = defineSlotRecipe({