@vygruppen/spor-react 12.24.7 → 12.24.8

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
@@ -614,6 +614,7 @@ declare const RadioCard: React__default.ForwardRefExoticComponent<RadioCard$1.It
614
614
  } & {
615
615
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
616
616
  ariaLabel?: string;
617
+ value?: string;
617
618
  } & React__default.RefAttributes<HTMLInputElement>>;
618
619
  declare const RadioCardGroup: React__default.ForwardRefExoticComponent<{
619
620
  variant?: _chakra_ui_react.ConditionalValue<"core" | "floating" | undefined>;
@@ -1669,7 +1670,16 @@ declare const NativeSelect: React$1.ForwardRefExoticComponent<{
1669
1670
  icon?: React$1.ReactNode;
1670
1671
  } & React$1.RefAttributes<HTMLDivElement>>;
1671
1672
 
1672
- declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "container" | "input" | "text" | "button">>;
1673
+ declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", {
1674
+ withStepLabel: {
1675
+ true: {
1676
+ button: {
1677
+ paddingInline: "1 !important";
1678
+ };
1679
+ };
1680
+ false: {};
1681
+ };
1682
+ }>;
1673
1683
 
1674
1684
  type NumericStepperVariants = RecipeVariantProps<typeof numericStepperRecipe>;
1675
1685
  type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
@@ -1722,6 +1732,8 @@ type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
1722
1732
  * @see https://spor.vy.no/components/numeric-stepper
1723
1733
  */
1724
1734
  declare const NumericStepper: React__default.ForwardRefExoticComponent<FieldBaseProps & {
1735
+ withStepLabel?: _chakra_ui_react.ConditionalValue<boolean | undefined>;
1736
+ } & {
1725
1737
  children?: React__default.ReactNode;
1726
1738
  /** The name of the input field */
1727
1739
  name?: string;
package/dist/index.d.ts CHANGED
@@ -614,6 +614,7 @@ declare const RadioCard: React__default.ForwardRefExoticComponent<RadioCard$1.It
614
614
  } & {
615
615
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
616
616
  ariaLabel?: string;
617
+ value?: string;
617
618
  } & React__default.RefAttributes<HTMLInputElement>>;
618
619
  declare const RadioCardGroup: React__default.ForwardRefExoticComponent<{
619
620
  variant?: _chakra_ui_react.ConditionalValue<"core" | "floating" | undefined>;
@@ -1669,7 +1670,16 @@ declare const NativeSelect: React$1.ForwardRefExoticComponent<{
1669
1670
  icon?: React$1.ReactNode;
1670
1671
  } & React$1.RefAttributes<HTMLDivElement>>;
1671
1672
 
1672
- declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "container" | "input" | "text" | "button">>;
1673
+ declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", {
1674
+ withStepLabel: {
1675
+ true: {
1676
+ button: {
1677
+ paddingInline: "1 !important";
1678
+ };
1679
+ };
1680
+ false: {};
1681
+ };
1682
+ }>;
1673
1683
 
1674
1684
  type NumericStepperVariants = RecipeVariantProps<typeof numericStepperRecipe>;
1675
1685
  type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
@@ -1722,6 +1732,8 @@ type NumericStepperProps = FieldBaseProps & NumericStepperVariants & {
1722
1732
  * @see https://spor.vy.no/components/numeric-stepper
1723
1733
  */
1724
1734
  declare const NumericStepper: React__default.ForwardRefExoticComponent<FieldBaseProps & {
1735
+ withStepLabel?: _chakra_ui_react.ConditionalValue<boolean | undefined>;
1736
+ } & {
1725
1737
  children?: React__default.ReactNode;
1726
1738
  /** The name of the input field */
1727
1739
  name?: string;
package/dist/index.mjs CHANGED
@@ -1503,10 +1503,17 @@ var PressableCard = forwardRef(
1503
1503
  PressableCard.displayName = "PressableCard";
1504
1504
  var RadioCard = forwardRef(
1505
1505
  (props, ref) => {
1506
- const { inputProps, children } = props;
1506
+ const { inputProps, children, value } = props;
1507
1507
  return /* @__PURE__ */ jsxs(RadioCard$1.Item, { ...props, children: [
1508
- /* @__PURE__ */ jsx(RadioCard$1.ItemHiddenInput, { ref, ...inputProps }),
1509
- /* @__PURE__ */ jsx(RadioCard$1.ItemControl, { children })
1508
+ /* @__PURE__ */ jsx(
1509
+ RadioCard$1.ItemHiddenInput,
1510
+ {
1511
+ ref,
1512
+ ...inputProps,
1513
+ "aria-label": value
1514
+ }
1515
+ ),
1516
+ /* @__PURE__ */ jsx(RadioCard$1.ItemControl, { "aria-hidden": value ? true : false, children })
1510
1517
  ] });
1511
1518
  }
1512
1519
  );
@@ -4040,7 +4047,8 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
4040
4047
  focusOnAddButton();
4041
4048
  }
4042
4049
  },
4043
- disabled: disabled || value <= minValue
4050
+ disabled: disabled || value <= minValue,
4051
+ withStepLabel: stepSize != 1
4044
4052
  }
4045
4053
  ),
4046
4054
  withInput ? /* @__PURE__ */ jsx(
@@ -4089,7 +4097,8 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
4089
4097
  )
4090
4098
  ),
4091
4099
  onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
4092
- disabled: disabled || value >= maxValue
4100
+ disabled: disabled || value >= maxValue,
4101
+ withStepLabel: stepSize != 1
4093
4102
  }
4094
4103
  )
4095
4104
  ]
@@ -4098,8 +4107,9 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
4098
4107
  });
4099
4108
  NumericStepper.displayName = "NumericStepper";
4100
4109
  var VerySmallButton = React20__default.forwardRef((props, ref) => {
4110
+ const { withStepLabel = false, ...rest } = props;
4101
4111
  const recipe = useSlotRecipe({ key: "numericStepper" });
4102
- const styles = recipe({ colorPalette: "default" });
4112
+ const styles = recipe({ withStepLabel });
4103
4113
  return /* @__PURE__ */ jsx(
4104
4114
  IconButton,
4105
4115
  {
@@ -4107,7 +4117,7 @@ var VerySmallButton = React20__default.forwardRef((props, ref) => {
4107
4117
  size: "xs",
4108
4118
  css: styles.button,
4109
4119
  ref,
4110
- ...props
4120
+ ...rest
4111
4121
  }
4112
4122
  );
4113
4123
  });
@@ -9811,6 +9821,16 @@ var numericStepperRecipe = defineSlotRecipe({
9811
9821
  height: "1.2rem"
9812
9822
  }
9813
9823
  }
9824
+ },
9825
+ variants: {
9826
+ withStepLabel: {
9827
+ true: {
9828
+ button: {
9829
+ paddingInline: "1 !important"
9830
+ }
9831
+ },
9832
+ false: {}
9833
+ }
9814
9834
  }
9815
9835
  });
9816
9836
  var paginationSlotRecipe = defineSlotRecipe({