@vygruppen/spor-react 12.10.5 → 12.11.0

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
@@ -893,10 +893,9 @@ declare const DrawerContent: React$1.ForwardRefExoticComponent<Drawer$1.ContentP
893
893
  declare const CloseDrawerLine: React$1.ForwardRefExoticComponent<React$1.RefAttributes<HTMLButtonElement>>;
894
894
  declare const DrawerCloseTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
895
895
  declare const DrawerBackTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
896
- declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
896
+ declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Omit<Drawer$1.HeaderProps, "title"> & {
897
897
  backTrigger?: boolean;
898
898
  closeTrigger?: boolean;
899
- title?: string;
900
899
  } & React$1.RefAttributes<HTMLDivElement>>;
901
900
  declare const Drawer: (props: DrawerProps) => react_jsx_runtime.JSX.Element;
902
901
  declare const DrawerTrigger: React$1.ForwardRefExoticComponent<Drawer$1.TriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
package/dist/index.d.ts CHANGED
@@ -893,10 +893,9 @@ declare const DrawerContent: React$1.ForwardRefExoticComponent<Drawer$1.ContentP
893
893
  declare const CloseDrawerLine: React$1.ForwardRefExoticComponent<React$1.RefAttributes<HTMLButtonElement>>;
894
894
  declare const DrawerCloseTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
895
895
  declare const DrawerBackTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
896
- declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
896
+ declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Omit<Drawer$1.HeaderProps, "title"> & {
897
897
  backTrigger?: boolean;
898
898
  closeTrigger?: boolean;
899
- title?: string;
900
899
  } & React$1.RefAttributes<HTMLDivElement>>;
901
900
  declare const Drawer: (props: DrawerProps) => react_jsx_runtime.JSX.Element;
902
901
  declare const DrawerTrigger: React$1.ForwardRefExoticComponent<Drawer$1.TriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
package/dist/index.mjs CHANGED
@@ -2357,7 +2357,7 @@ var DrawerContent = forwardRef(
2357
2357
  swipeDuration: 250
2358
2358
  });
2359
2359
  const sizeNotFull = size !== "full";
2360
- return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(Drawer$1.Positioner, { children: /* @__PURE__ */ jsx(Box, { ...handlers, width: "100%", children: /* @__PURE__ */ jsxs(Drawer$1.Content, { ref, ...rest, children: [
2360
+ return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(Drawer$1.Positioner, { asChild: true, children: /* @__PURE__ */ jsx(Box, { ...handlers, width: "100%", children: /* @__PURE__ */ jsxs(Drawer$1.Content, { ref, ...rest, children: [
2361
2361
  sizeNotFull && placement === "bottom" && /* @__PURE__ */ jsx(CloseDrawerLine, {}),
2362
2362
  children,
2363
2363
  sizeNotFull && placement === "top" && /* @__PURE__ */ jsx(CloseDrawerLine, {})
@@ -2393,10 +2393,10 @@ var DrawerBackTrigger = forwardRef((props, ref) => {
2393
2393
  });
2394
2394
  DrawerBackTrigger.displayName = "DrawerBackTrigger";
2395
2395
  var DrawerFullScreenHeader = forwardRef((props, ref) => {
2396
- const { backTrigger = true, closeTrigger = true, title } = props;
2396
+ const { backTrigger = true, closeTrigger = true, children } = props;
2397
2397
  return /* @__PURE__ */ jsx(Drawer$1.Header, { ...props, ref, asChild: true, children: /* @__PURE__ */ jsxs(Grid, { templateColumns: "1fr auto 1fr", height: "auto", paddingX: "8", children: [
2398
2398
  /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "center", children: backTrigger && /* @__PURE__ */ jsx(DrawerBackTrigger, {}) }),
2399
- /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", asChild: true, children: title && /* @__PURE__ */ jsx(DrawerTitle, { children: title }) }),
2399
+ /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", asChild: true, children: children && /* @__PURE__ */ jsx(DrawerTitle, { children }) }),
2400
2400
  closeTrigger && /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
2401
2401
  ] }) });
2402
2402
  });
@@ -2434,7 +2434,7 @@ var AttachedInputs = forwardRef(
2434
2434
  const recipe = useRecipe({ key: "attachedInputs" });
2435
2435
  const [recipeProps, restProps] = recipe.splitVariantProps(props);
2436
2436
  const styles = recipe(recipeProps);
2437
- return /* @__PURE__ */ jsx(Group, { ref, css: styles, attached: true, ...restProps });
2437
+ return /* @__PURE__ */ jsx(Group, { ref, css: styles, attached: true, isolation: "auto", ...restProps });
2438
2438
  }
2439
2439
  );
2440
2440
  AttachedInputs.displayName = "AttachedInputs";
@@ -3407,12 +3407,6 @@ var texts16 = createTexts({
3407
3407
  nn: "Telefonnummer (valgfritt)",
3408
3408
  en: "Phone number (optional)",
3409
3409
  sv: "Telefonnummer (valfritt)"
3410
- },
3411
- countryCodeLabel: {
3412
- nb: "Landskode",
3413
- nn: "Landskode",
3414
- en: "Country code",
3415
- sv: "Landskod"
3416
3410
  }
3417
3411
  });
3418
3412
  var Radio = forwardRef((props, ref) => {
@@ -3666,24 +3660,47 @@ var useLabelHeight = (label) => {
3666
3660
  };
3667
3661
  var Textarea = forwardRef(
3668
3662
  (props, ref) => {
3669
- const { label, variant = "core", ...fieldProps } = props;
3663
+ const {
3664
+ label,
3665
+ variant = "core",
3666
+ invalid,
3667
+ required,
3668
+ errorText,
3669
+ readOnly,
3670
+ helperText,
3671
+ floatingLabel,
3672
+ ...restProps
3673
+ } = props;
3670
3674
  const recipe = useRecipe({ key: "textarea" });
3671
3675
  const styles = recipe({ variant });
3672
3676
  const { labelRef, labelHeight } = useLabelHeight(label);
3673
- return /* @__PURE__ */ jsxs(Field3, { ...fieldProps, position: "relative", children: [
3674
- /* @__PURE__ */ jsx(
3675
- Textarea$1,
3676
- {
3677
- ...props,
3678
- css: styles,
3679
- className: "peer",
3680
- ref,
3681
- style: { "--label-height": `${labelHeight}px` },
3682
- placeholder: " "
3683
- }
3684
- ),
3685
- /* @__PURE__ */ jsx(FloatingLabel, { ref: labelRef, children: label })
3686
- ] });
3677
+ return /* @__PURE__ */ jsxs(
3678
+ Field3,
3679
+ {
3680
+ label,
3681
+ errorText,
3682
+ helperText,
3683
+ invalid,
3684
+ required,
3685
+ readOnly,
3686
+ floatingLabel,
3687
+ position: "relative",
3688
+ children: [
3689
+ /* @__PURE__ */ jsx(
3690
+ Textarea$1,
3691
+ {
3692
+ ...restProps,
3693
+ css: styles,
3694
+ className: "peer",
3695
+ ref,
3696
+ style: { "--label-height": `${labelHeight}px` },
3697
+ placeholder: " "
3698
+ }
3699
+ ),
3700
+ /* @__PURE__ */ jsx(FloatingLabel, { ref: labelRef, children: label })
3701
+ ]
3702
+ }
3703
+ );
3687
3704
  }
3688
3705
  );
3689
3706
  Textarea.displayName = "Textarea";