@vygruppen/spor-react 12.14.1 → 12.14.2

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.14.1 build /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.14.2 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,17 +11,17 @@ CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
13
  DTS Build start
14
- CJS dist/index.cjs 320.36 KB
15
- CJS dist/icons/index.cjs 381.00 B
16
- CJS dist/index.cjs.map 637.96 KB
17
- CJS dist/icons/index.cjs.map 157.00 B
18
- CJS ⚡️ Build success in 2498ms
19
- ESM dist/index.mjs 298.78 KB
14
+ ESM dist/index.mjs 298.93 KB
20
15
  ESM dist/icons/index.mjs 110.00 B
21
- ESM dist/index.mjs.map 637.96 KB
22
16
  ESM dist/icons/index.mjs.map 157.00 B
23
- ESM ⚡️ Build success in 2498ms
24
- DTS ⚡️ Build success in 19261ms
17
+ ESM dist/index.mjs.map 638.54 KB
18
+ ESM ⚡️ Build success in 2541ms
19
+ CJS dist/index.cjs 320.53 KB
20
+ CJS dist/icons/index.cjs 381.00 B
21
+ CJS dist/icons/index.cjs.map 157.00 B
22
+ CJS dist/index.cjs.map 638.54 KB
23
+ CJS ⚡️ Build success in 2541ms
24
+ DTS ⚡️ Build success in 18296ms
25
25
  DTS dist/icons/index.d.ts 44.00 B
26
26
  DTS dist/index.d.ts 157.08 KB
27
27
  DTS dist/icons/index.d.cts 44.00 B
@@ -1,8 +1,8 @@
1
1
 
2
- > @vygruppen/spor-react@12.14.1 postinstall /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.14.2 postinstall /home/runner/work/spor/spor/packages/spor-react
3
3
  > chakra typegen src/theme/index.ts
4
4
 
5
- [dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️ suppress all logs with { quiet: true }
5
+ [dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️ enable debug logging with { debug: true }
6
6
  ┌ Chakra CLI ⚡️
7
7
  [?25l│
8
8
  ◒ Generating conditions types...
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 12.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 02bdd99: Fix issue where switch without label has empty space on right
8
+ - 2b611fa: Fix layout on full screen drawer header.
9
+
3
10
  ## 12.14.1
4
11
 
5
12
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2375,6 +2375,20 @@ var DialogTitle = react.Dialog.Title;
2375
2375
  var DialogDescription = react.Dialog.Description;
2376
2376
  var DialogTrigger = react.Dialog.Trigger;
2377
2377
  var DialogActionTrigger = react.Dialog.ActionTrigger;
2378
+ var ResponsiveButton = ({ label, icon, ...props }) => {
2379
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2380
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { display: ["none", "flex"], leftIcon: icon, ...props, children: label }),
2381
+ /* @__PURE__ */ jsxRuntime.jsx(
2382
+ IconButton,
2383
+ {
2384
+ display: ["flex", "none"],
2385
+ "aria-label": label,
2386
+ icon,
2387
+ ...props
2388
+ }
2389
+ )
2390
+ ] });
2391
+ };
2378
2392
  var [RootDrawerProvider, useRootDrawerProps] = react.createContext({
2379
2393
  name: "RootDrawerProvider"
2380
2394
  });
@@ -2421,20 +2435,37 @@ CloseDrawerLine.displayName = "CloseDrawerLine";
2421
2435
  var DrawerCloseTrigger = React27.forwardRef(function DrawerCloseTrigger2(props, ref) {
2422
2436
  const { size } = useRootDrawerProps();
2423
2437
  const { t } = useTranslation();
2424
- return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.CloseTrigger, { ref, ...props, asChild: true, children: size === "full" ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", leftIcon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CloseFill24Icon, {}), children: t(texts12.close) }) : /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "md" }) });
2438
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.CloseTrigger, { ref, ...props, asChild: true, children: size === "full" ? /* @__PURE__ */ jsxRuntime.jsx(
2439
+ ResponsiveButton,
2440
+ {
2441
+ variant: "ghost",
2442
+ icon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CloseFill24Icon, {}),
2443
+ label: t(texts12.close)
2444
+ }
2445
+ ) : /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "md" }) });
2425
2446
  });
2426
2447
  var DrawerBackTrigger = React27.forwardRef((props, ref) => {
2427
2448
  const { t } = useTranslation();
2428
- return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.CloseTrigger, { asChild: true, ...props, ref, top: "0", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", leftIcon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.ArrowLeftFill24Icon, {}), children: t(texts12.back) }) });
2449
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.CloseTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsxRuntime.jsx(
2450
+ ResponsiveButton,
2451
+ {
2452
+ variant: "ghost",
2453
+ icon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.ArrowLeftFill24Icon, {}),
2454
+ label: t(texts12.back)
2455
+ }
2456
+ ) });
2429
2457
  });
2430
2458
  DrawerBackTrigger.displayName = "DrawerBackTrigger";
2431
2459
  var DrawerFullScreenHeader = React27.forwardRef((props, ref) => {
2432
2460
  const { backTrigger = true, closeTrigger = true, children } = props;
2433
- 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: [
2434
- /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "center", children: backTrigger && /* @__PURE__ */ jsxRuntime.jsx(DrawerBackTrigger, {}) }),
2435
- /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", asChild: true, children: children && /* @__PURE__ */ jsxRuntime.jsx(DrawerTitle, { children }) }),
2436
- closeTrigger && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsxRuntime.jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
2437
- ] }) });
2461
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Drawer.Header, { ...props, ref, children: [
2462
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: backTrigger && /* @__PURE__ */ jsxRuntime.jsx(DrawerBackTrigger, {}) }),
2463
+ /* @__PURE__ */ jsxRuntime.jsx(DrawerTitle, { children }),
2464
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
2465
+ " ",
2466
+ closeTrigger && /* @__PURE__ */ jsxRuntime.jsx(DrawerCloseTrigger, {})
2467
+ ] })
2468
+ ] });
2438
2469
  });
2439
2470
  DrawerFullScreenHeader.displayName = "DrawerFullScreenHeader";
2440
2471
  var Drawer = (props) => {
@@ -3691,7 +3722,7 @@ var Switch = React27.forwardRef(
3691
3722
  children: [
3692
3723
  /* @__PURE__ */ jsxRuntime.jsx(react.Switch.HiddenInput, { ref }),
3693
3724
  /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Control, { css: styles.control, children: /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Thumb, {}) }),
3694
- /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Label, { children: label })
3725
+ label && /* @__PURE__ */ jsxRuntime.jsx(react.Switch.Label, { children: label })
3695
3726
  ]
3696
3727
  }
3697
3728
  )
@@ -7681,7 +7712,8 @@ var drawerSlotRecipe = react.defineSlotRecipe({
7681
7712
  display: "flex",
7682
7713
  alignItems: "center",
7683
7714
  justifyContent: "space-between",
7684
- paddingX: ["3", null, null, "5"],
7715
+ paddingX: ["2", null, null, "5"],
7716
+ gap: "1",
7685
7717
  paddingBottom: "1"
7686
7718
  },
7687
7719
  body: {