@viasat/beam-react 2.58.0 → 2.58.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 2.58.1 (2026-08-20)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **SegmentedControl:** Fix initialSelection causing borderRadius to not render correctly ([#1411](https://git.viasat.com/vega/Beam/pull/1411))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Amaral, Thomas
10
+
1
11
  ## 2.58.0 (2026-08-20)
2
12
 
3
13
  ### 🚀 Features
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),C=require("react"),g=require("clsx"),f=require("../../chunks/classNames.BFQUGnCN.js");require("../../chunks/constants.CgMu0_1M.js");const n=require("../../chunks/segmentedControl.module.Do2xEatq.js"),S=require("./SegmentedControlContext.cjs.js"),b=({children:e,className:a,...u})=>{const{selectedValue:i,setSelectedValue:t,setControlItems:o,fluid:c}=S.useSegmentedControl();C.useEffect(()=>{if(!i){if(!Array.isArray(e)){t(e.props.value),o([e.props.value]);return}const l=e.filter(s=>!s.props.disabled);l.length>0&&t(l[0].props.value),o(e.map(s=>s.props.value))}},[]);const{subElementClassPrefix:m}=f.getBEMClassNames("segmented-control"),r=`${m}list`,d=g(n.styles[r],c&&n.styles[`${r}--fluid`],a);return p.jsx("div",{className:d,...u,children:e})};exports.SegmentedControlList=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),f=require("react"),p=require("clsx"),S=require("../../chunks/classNames.BFQUGnCN.js");require("../../chunks/constants.CgMu0_1M.js");const r=require("../../chunks/segmentedControl.module.Do2xEatq.js"),b=require("./SegmentedControlContext.cjs.js"),q=({children:e,className:l,...n})=>{const{selectedValue:a,setSelectedValue:c,setControlItems:i,fluid:u}=b.useSegmentedControl();f.useEffect(()=>{const o=Array.isArray(e)?e:[e];if(i(o.map(s=>s.props.value)),!a){const s=o.filter(C=>!C.props.disabled);s.length>0&&c(s[0].props.value)}},[]);const{subElementClassPrefix:d}=S.getBEMClassNames("segmented-control"),t=`${d}list`,m=p(r.styles[t],u&&r.styles[`${t}--fluid`],l);return g.jsx("div",{className:m,...n,children:e})};exports.SegmentedControlList=q;
@@ -1,33 +1,30 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { useEffect as d } from "react";
3
- import C from "clsx";
4
- import { g } from "../../chunks/classNames.CA_0DokS.js";
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useEffect as C } from "react";
3
+ import g from "clsx";
4
+ import { g as b } from "../../chunks/classNames.CA_0DokS.js";
5
5
  import "../../chunks/constants.Cruz2A1w.js";
6
- import { s as a } from "../../chunks/segmentedControl.module.xmzdEbo3.js";
7
- import { useSegmentedControl as v } from "./SegmentedControlContext.es.js";
8
- const V = ({
6
+ import { s as r } from "../../chunks/segmentedControl.module.xmzdEbo3.js";
7
+ import { useSegmentedControl as x } from "./SegmentedControlContext.es.js";
8
+ const $ = ({
9
9
  children: s,
10
- className: m,
11
- ...p
10
+ className: l,
11
+ ...m
12
12
  }) => {
13
- const { selectedValue: f, setSelectedValue: t, setControlItems: o, fluid: i } = v();
14
- d(() => {
15
- if (!f) {
16
- if (!Array.isArray(s)) {
17
- t(s.props.value), o([s.props.value]);
18
- return;
19
- }
20
- const l = s.filter((e) => !e.props.disabled);
21
- l.length > 0 && t(l[0].props.value), o(s.map((e) => e.props.value));
13
+ const { selectedValue: a, setSelectedValue: i, setControlItems: n, fluid: p } = x();
14
+ C(() => {
15
+ const o = Array.isArray(s) ? s : [s];
16
+ if (n(o.map((e) => e.props.value)), !a) {
17
+ const e = o.filter((d) => !d.props.disabled);
18
+ e.length > 0 && i(e[0].props.value);
22
19
  }
23
20
  }, []);
24
- const { subElementClassPrefix: n } = g("segmented-control"), r = `${n}list`, u = C(
25
- a[r],
26
- i && a[`${r}--fluid`],
27
- m
21
+ const { subElementClassPrefix: f } = b("segmented-control"), t = `${f}list`, c = g(
22
+ r[t],
23
+ p && r[`${t}--fluid`],
24
+ l
28
25
  );
29
- return /* @__PURE__ */ c("div", { className: u, ...p, children: s });
26
+ return /* @__PURE__ */ u("div", { className: c, ...m, children: s });
30
27
  };
31
28
  export {
32
- V as SegmentedControlList
29
+ $ as SegmentedControlList
33
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viasat/beam-react",
3
- "version": "2.58.0",
3
+ "version": "2.58.1",
4
4
  "description": "React component library for the Beam design system",
5
5
  "license": "MIT",
6
6
  "author": "Viasat",
@@ -60,12 +60,12 @@
60
60
  "access": "public"
61
61
  },
62
62
  "dependencies": {
63
- "@viasat/beam-fonts": "2.58.0",
64
- "@viasat/beam-shared": "2.58.0",
65
- "@viasat/beam-styles": "2.58.0",
66
- "@viasat/beam-tokens": "2.58.0",
67
- "@viasat/beam-icons": "2.58.0",
68
- "@viasat/beam-react-claude-plugin": "2.58.0",
63
+ "@viasat/beam-fonts": "2.58.1",
64
+ "@viasat/beam-shared": "2.58.1",
65
+ "@viasat/beam-styles": "2.58.1",
66
+ "@viasat/beam-tokens": "2.58.1",
67
+ "@viasat/beam-icons": "2.58.1",
68
+ "@viasat/beam-react-claude-plugin": "2.58.1",
69
69
  "clsx": "^1.2.1",
70
70
  "@floating-ui/react": "^0.26.18",
71
71
  "@stepperize/react": "^5.1.5",