@vygruppen/spor-react 12.10.2 → 12.10.3

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
@@ -895,6 +895,7 @@ declare const DrawerCloseTrigger: React$1.ForwardRefExoticComponent<Drawer$1.Clo
895
895
  declare const DrawerBackTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
896
896
  declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
897
897
  backTrigger?: boolean;
898
+ closeTrigger?: boolean;
898
899
  title?: string;
899
900
  } & React$1.RefAttributes<HTMLDivElement>>;
900
901
  declare const Drawer: (props: DrawerProps) => react_jsx_runtime.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -895,6 +895,7 @@ declare const DrawerCloseTrigger: React$1.ForwardRefExoticComponent<Drawer$1.Clo
895
895
  declare const DrawerBackTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
896
896
  declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
897
897
  backTrigger?: boolean;
898
+ closeTrigger?: boolean;
898
899
  title?: string;
899
900
  } & React$1.RefAttributes<HTMLDivElement>>;
900
901
  declare const Drawer: (props: DrawerProps) => react_jsx_runtime.JSX.Element;
package/dist/index.mjs CHANGED
@@ -2146,9 +2146,16 @@ var TimeField = ({ state, ...props }) => {
2146
2146
  style: {
2147
2147
  marginBottom: 0,
2148
2148
  fontSize: "mobile.xs",
2149
+ top: 0,
2149
2150
  cursor: "text",
2151
+ left: "50%",
2152
+ transform: "translateX(-50%)",
2150
2153
  position: "absolute",
2151
- paddingTop: "2px"
2154
+ paddingTop: "2px",
2155
+ whiteSpace: "nowrap",
2156
+ overflow: "hidden",
2157
+ textOverflow: "ellipsis",
2158
+ maxWidth: "80%"
2152
2159
  },
2153
2160
  children: props.label
2154
2161
  }
@@ -2235,6 +2242,7 @@ var TimePicker = ({
2235
2242
  "aria-disabled": isDisabled,
2236
2243
  "aria-live": "assertive",
2237
2244
  "aria-label": ariaLabel,
2245
+ position: "relative",
2238
2246
  ...boxProps,
2239
2247
  children: [
2240
2248
  /* @__PURE__ */ jsx(
@@ -2248,7 +2256,8 @@ var TimePicker = ({
2248
2256
  icon: /* @__PURE__ */ jsx(DropdownLeftFill18Icon, {}),
2249
2257
  onClick: handleBackwardsClick,
2250
2258
  disabled: isDisabled,
2251
- style: isDisabled ? { backgroundColor: "transparent" } : {}
2259
+ style: isDisabled ? { backgroundColor: "transparent" } : {},
2260
+ zIndex: 1
2252
2261
  }
2253
2262
  ),
2254
2263
  /* @__PURE__ */ jsx(TimeField, { label, state, name }),
@@ -2263,7 +2272,8 @@ var TimePicker = ({
2263
2272
  icon: /* @__PURE__ */ jsx(DropdownRightFill18Icon, {}),
2264
2273
  onClick: handleForwardClick,
2265
2274
  disabled: isDisabled,
2266
- style: isDisabled ? { backgroundColor: "transparent" } : {}
2275
+ style: isDisabled ? { backgroundColor: "transparent" } : {},
2276
+ zIndex: 1
2267
2277
  }
2268
2278
  )
2269
2279
  ]
@@ -2382,11 +2392,11 @@ var DrawerBackTrigger = forwardRef((props, ref) => {
2382
2392
  });
2383
2393
  DrawerBackTrigger.displayName = "DrawerBackTrigger";
2384
2394
  var DrawerFullScreenHeader = forwardRef((props, ref) => {
2385
- const { backTrigger = true, title } = props;
2395
+ const { backTrigger = true, closeTrigger = true, title } = props;
2386
2396
  return /* @__PURE__ */ jsx(Drawer$1.Header, { ...props, ref, asChild: true, children: /* @__PURE__ */ jsxs(Grid, { templateColumns: "1fr auto 1fr", height: "auto", paddingX: "8", children: [
2387
2397
  /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "center", children: backTrigger && /* @__PURE__ */ jsx(DrawerBackTrigger, {}) }),
2388
2398
  /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", asChild: true, children: title && /* @__PURE__ */ jsx(DrawerTitle, { children: title }) }),
2389
- /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
2399
+ closeTrigger && /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
2390
2400
  ] }) });
2391
2401
  });
2392
2402
  DrawerFullScreenHeader.displayName = "DrawerFullScreenHeader";
@@ -3687,16 +3697,9 @@ var PressableCard = forwardRef(
3687
3697
  PressableCard.displayName = "PressableCard";
3688
3698
  var RadioCard = forwardRef(
3689
3699
  (props, ref) => {
3690
- const { inputProps, children, value, ariaLabel } = props;
3700
+ const { inputProps, children } = props;
3691
3701
  return /* @__PURE__ */ jsxs(RadioCard$1.Item, { ...props, children: [
3692
- /* @__PURE__ */ jsx(
3693
- RadioCard$1.ItemHiddenInput,
3694
- {
3695
- "aria-label": ariaLabel ?? value,
3696
- ref,
3697
- ...inputProps
3698
- }
3699
- ),
3702
+ /* @__PURE__ */ jsx(RadioCard$1.ItemHiddenInput, { ref, ...inputProps }),
3700
3703
  /* @__PURE__ */ jsx(RadioCard$1.ItemControl, { children })
3701
3704
  ] });
3702
3705
  }
@@ -3983,18 +3986,42 @@ var TextLink = forwardRef(
3983
3986
  const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
3984
3987
  const externalLabel = t ? t(texts18.externalLink) : texts18.externalLink.en;
3985
3988
  if (props.asChild && isValidElement(children)) {
3986
- return /* @__PURE__ */ jsx(Link, { href, ...props, ref, children: cloneElement(children, {
3987
- ...children.props,
3988
- children: /* @__PURE__ */ jsxs(Fragment, { children: [
3989
- children.props.children,
3990
- isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
3991
- ] })
3992
- }) });
3989
+ return /* @__PURE__ */ jsx(
3990
+ Link,
3991
+ {
3992
+ href,
3993
+ ...props,
3994
+ ref,
3995
+ ...isExternal && {
3996
+ target: "_blank",
3997
+ rel: "noopener noreferrer"
3998
+ },
3999
+ children: cloneElement(children, {
4000
+ ...children.props,
4001
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
4002
+ children.props.children,
4003
+ isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
4004
+ ] })
4005
+ })
4006
+ }
4007
+ );
3993
4008
  }
3994
- return /* @__PURE__ */ jsxs(Link, { href, ...props, ref, children: [
3995
- children,
3996
- isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
3997
- ] });
4009
+ return /* @__PURE__ */ jsxs(
4010
+ Link,
4011
+ {
4012
+ href,
4013
+ ...props,
4014
+ ref,
4015
+ ...isExternal && {
4016
+ target: "_blank",
4017
+ rel: "noopener noreferrer"
4018
+ },
4019
+ children: [
4020
+ children,
4021
+ isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
4022
+ ]
4023
+ }
4024
+ );
3998
4025
  }
3999
4026
  );
4000
4027
  TextLink.displayName = "TextLink";
@@ -7485,7 +7512,7 @@ var drawerSlotRecipe = defineSlotRecipe({
7485
7512
  maxHeight: "100dvh",
7486
7513
  color: "inherit",
7487
7514
  boxShadow: "lg",
7488
- minHeight: ["50vh", null, null, "auto"],
7515
+ minHeight: ["10rem", null, null, "auto"],
7489
7516
  _open: {
7490
7517
  animationDuration: "slowest",
7491
7518
  animationTimingFunction: "ease-in-smooth"
@@ -7499,16 +7526,16 @@ var drawerSlotRecipe = defineSlotRecipe({
7499
7526
  display: "flex",
7500
7527
  alignItems: "center",
7501
7528
  justifyContent: "space-between",
7502
- paddingX: "5",
7529
+ paddingX: ["3", null, null, "5"],
7503
7530
  paddingBottom: "1"
7504
7531
  },
7505
7532
  body: {
7506
- paddingX: "5",
7533
+ paddingX: ["3", null, null, "5"],
7507
7534
  paddingY: ["1", null, null, "2"],
7508
7535
  flex: "1",
7509
7536
  overflow: "auto",
7510
7537
  fontSize: ["xs", null, null, "sm"],
7511
- minHeight: ["12", null, null, "auto"]
7538
+ minHeight: ["2", null, null, "auto"]
7512
7539
  },
7513
7540
  footer: {
7514
7541
  display: "flex",
@@ -7525,8 +7552,8 @@ var drawerSlotRecipe = defineSlotRecipe({
7525
7552
  },
7526
7553
  closeTrigger: {
7527
7554
  position: "absolute",
7528
- top: "2",
7529
- insetEnd: "2"
7555
+ top: "0",
7556
+ right: "0"
7530
7557
  }
7531
7558
  },
7532
7559
  variants: {