@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@12.10.2 build /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.10.3 build /home/runner/work/spor/spor/packages/spor-react
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.tsx, src/icons/index.tsx
@@ -11,18 +11,18 @@ CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
13
  DTS Build start
14
- ESM dist/index.mjs 293.03 KB
15
- ESM dist/icons/index.mjs 110.00 B
16
- ESM dist/icons/index.mjs.map 157.00 B
17
- ESM dist/index.mjs.map 628.47 KB
18
- ESM ⚡️ Build success in 2673ms
19
- CJS dist/index.cjs 314.43 KB
14
+ CJS dist/index.cjs 315.03 KB
20
15
  CJS dist/icons/index.cjs 381.00 B
21
- CJS dist/index.cjs.map 628.47 KB
16
+ CJS dist/index.cjs.map 629.44 KB
22
17
  CJS dist/icons/index.cjs.map 157.00 B
23
- CJS ⚡️ Build success in 2674ms
24
- DTS ⚡️ Build success in 18779ms
18
+ CJS ⚡️ Build success in 2766ms
19
+ ESM dist/icons/index.mjs 110.00 B
20
+ ESM dist/index.mjs 293.63 KB
21
+ ESM dist/icons/index.mjs.map 157.00 B
22
+ ESM dist/index.mjs.map 629.44 KB
23
+ ESM ⚡️ Build success in 2769ms
24
+ DTS ⚡️ Build success in 18537ms
25
25
  DTS dist/icons/index.d.ts 44.00 B
26
- DTS dist/index.d.ts 156.01 KB
26
+ DTS dist/index.d.ts 156.04 KB
27
27
  DTS dist/icons/index.d.cts 44.00 B
28
- DTS dist/index.d.cts 156.01 KB
28
+ DTS dist/index.d.cts 156.04 KB
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@12.10.2 postinstall /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.10.3 postinstall /home/runner/work/spor/spor/packages/spor-react
3
3
  > chakra typegen src/theme/index.ts
4
4
 
5
5
  ┌ Chakra CLI ⚡️
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 12.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 3329fa1: TextLink: Open in a new tab when `external` is true
8
+ Drawer: Correct close button placement and mobile padding. Add prop to conditionally show closeTrigger on fullscreeen drawer.
9
+ - 2be55a9: TimePicker: Fix label overlapping buttons and center it
10
+ RadioCard: Fix value read by screen reader, not content of radio button.
11
+
3
12
  ## 12.10.2
4
13
 
5
14
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2166,9 +2166,16 @@ var TimeField = ({ state, ...props }) => {
2166
2166
  style: {
2167
2167
  marginBottom: 0,
2168
2168
  fontSize: "mobile.xs",
2169
+ top: 0,
2169
2170
  cursor: "text",
2171
+ left: "50%",
2172
+ transform: "translateX(-50%)",
2170
2173
  position: "absolute",
2171
- paddingTop: "2px"
2174
+ paddingTop: "2px",
2175
+ whiteSpace: "nowrap",
2176
+ overflow: "hidden",
2177
+ textOverflow: "ellipsis",
2178
+ maxWidth: "80%"
2172
2179
  },
2173
2180
  children: props.label
2174
2181
  }
@@ -2255,6 +2262,7 @@ var TimePicker = ({
2255
2262
  "aria-disabled": isDisabled,
2256
2263
  "aria-live": "assertive",
2257
2264
  "aria-label": ariaLabel,
2265
+ position: "relative",
2258
2266
  ...boxProps,
2259
2267
  children: [
2260
2268
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2268,7 +2276,8 @@ var TimePicker = ({
2268
2276
  icon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.DropdownLeftFill18Icon, {}),
2269
2277
  onClick: handleBackwardsClick,
2270
2278
  disabled: isDisabled,
2271
- style: isDisabled ? { backgroundColor: "transparent" } : {}
2279
+ style: isDisabled ? { backgroundColor: "transparent" } : {},
2280
+ zIndex: 1
2272
2281
  }
2273
2282
  ),
2274
2283
  /* @__PURE__ */ jsxRuntime.jsx(TimeField, { label, state, name }),
@@ -2283,7 +2292,8 @@ var TimePicker = ({
2283
2292
  icon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.DropdownRightFill18Icon, {}),
2284
2293
  onClick: handleForwardClick,
2285
2294
  disabled: isDisabled,
2286
- style: isDisabled ? { backgroundColor: "transparent" } : {}
2295
+ style: isDisabled ? { backgroundColor: "transparent" } : {},
2296
+ zIndex: 1
2287
2297
  }
2288
2298
  )
2289
2299
  ]
@@ -2402,11 +2412,11 @@ var DrawerBackTrigger = React27.forwardRef((props, ref) => {
2402
2412
  });
2403
2413
  DrawerBackTrigger.displayName = "DrawerBackTrigger";
2404
2414
  var DrawerFullScreenHeader = React27.forwardRef((props, ref) => {
2405
- const { backTrigger = true, title } = props;
2415
+ const { backTrigger = true, closeTrigger = true, title } = props;
2406
2416
  return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.Header, { ...props, ref, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Grid, { templateColumns: "1fr auto 1fr", height: "auto", paddingX: "8", children: [
2407
2417
  /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "center", children: backTrigger && /* @__PURE__ */ jsxRuntime.jsx(DrawerBackTrigger, {}) }),
2408
2418
  /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", asChild: true, children: title && /* @__PURE__ */ jsxRuntime.jsx(DrawerTitle, { children: title }) }),
2409
- /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsxRuntime.jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
2419
+ closeTrigger && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsxRuntime.jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
2410
2420
  ] }) });
2411
2421
  });
2412
2422
  DrawerFullScreenHeader.displayName = "DrawerFullScreenHeader";
@@ -3707,16 +3717,9 @@ var PressableCard = React27.forwardRef(
3707
3717
  PressableCard.displayName = "PressableCard";
3708
3718
  var RadioCard = React27.forwardRef(
3709
3719
  (props, ref) => {
3710
- const { inputProps, children, value, ariaLabel } = props;
3720
+ const { inputProps, children } = props;
3711
3721
  return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
3712
- /* @__PURE__ */ jsxRuntime.jsx(
3713
- react.RadioCard.ItemHiddenInput,
3714
- {
3715
- "aria-label": ariaLabel ?? value,
3716
- ref,
3717
- ...inputProps
3718
- }
3719
- ),
3722
+ /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemHiddenInput, { ref, ...inputProps }),
3720
3723
  /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemControl, { children })
3721
3724
  ] });
3722
3725
  }
@@ -4003,18 +4006,42 @@ var TextLink = React27.forwardRef(
4003
4006
  const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
4004
4007
  const externalLabel = t ? t(texts18.externalLink) : texts18.externalLink.en;
4005
4008
  if (props.asChild && React27.isValidElement(children)) {
4006
- return /* @__PURE__ */ jsxRuntime.jsx(react.Link, { href, ...props, ref, children: React27.cloneElement(children, {
4007
- ...children.props,
4008
- children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4009
- children.props.children,
4010
- isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
4011
- ] })
4012
- }) });
4009
+ return /* @__PURE__ */ jsxRuntime.jsx(
4010
+ react.Link,
4011
+ {
4012
+ href,
4013
+ ...props,
4014
+ ref,
4015
+ ...isExternal && {
4016
+ target: "_blank",
4017
+ rel: "noopener noreferrer"
4018
+ },
4019
+ children: React27.cloneElement(children, {
4020
+ ...children.props,
4021
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4022
+ children.props.children,
4023
+ isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
4024
+ ] })
4025
+ })
4026
+ }
4027
+ );
4013
4028
  }
4014
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Link, { href, ...props, ref, children: [
4015
- children,
4016
- isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
4017
- ] });
4029
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4030
+ react.Link,
4031
+ {
4032
+ href,
4033
+ ...props,
4034
+ ref,
4035
+ ...isExternal && {
4036
+ target: "_blank",
4037
+ rel: "noopener noreferrer"
4038
+ },
4039
+ children: [
4040
+ children,
4041
+ isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
4042
+ ]
4043
+ }
4044
+ );
4018
4045
  }
4019
4046
  );
4020
4047
  TextLink.displayName = "TextLink";
@@ -7505,7 +7532,7 @@ var drawerSlotRecipe = react.defineSlotRecipe({
7505
7532
  maxHeight: "100dvh",
7506
7533
  color: "inherit",
7507
7534
  boxShadow: "lg",
7508
- minHeight: ["50vh", null, null, "auto"],
7535
+ minHeight: ["10rem", null, null, "auto"],
7509
7536
  _open: {
7510
7537
  animationDuration: "slowest",
7511
7538
  animationTimingFunction: "ease-in-smooth"
@@ -7519,16 +7546,16 @@ var drawerSlotRecipe = react.defineSlotRecipe({
7519
7546
  display: "flex",
7520
7547
  alignItems: "center",
7521
7548
  justifyContent: "space-between",
7522
- paddingX: "5",
7549
+ paddingX: ["3", null, null, "5"],
7523
7550
  paddingBottom: "1"
7524
7551
  },
7525
7552
  body: {
7526
- paddingX: "5",
7553
+ paddingX: ["3", null, null, "5"],
7527
7554
  paddingY: ["1", null, null, "2"],
7528
7555
  flex: "1",
7529
7556
  overflow: "auto",
7530
7557
  fontSize: ["xs", null, null, "sm"],
7531
- minHeight: ["12", null, null, "auto"]
7558
+ minHeight: ["2", null, null, "auto"]
7532
7559
  },
7533
7560
  footer: {
7534
7561
  display: "flex",
@@ -7545,8 +7572,8 @@ var drawerSlotRecipe = react.defineSlotRecipe({
7545
7572
  },
7546
7573
  closeTrigger: {
7547
7574
  position: "absolute",
7548
- top: "2",
7549
- insetEnd: "2"
7575
+ top: "0",
7576
+ right: "0"
7550
7577
  }
7551
7578
  },
7552
7579
  variants: {