@loomhq/lens 12.5.0 → 12.6.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/dist/esm/index.js CHANGED
@@ -2060,6 +2060,7 @@ var variantStyles = {
2060
2060
  neutralSecondary: {
2061
2061
  color: getColorValue("body"),
2062
2062
  background: "backgroundSecondary",
2063
+ borderColor: null,
2063
2064
  hover: getColorValue("grey3"),
2064
2065
  // TODO(tatiana/ben p): Awaiting final confirmation from Cody as to semantic approach when he returns Oct 2025
2065
2066
  active: getColorValue("backgroundActive")
@@ -5478,7 +5479,7 @@ var SwitchInput = styled26.input`
5478
5479
  height: ${(props) => sizes2[props.switchSize].switchHeight}px;
5479
5480
 
5480
5481
  &:focus-visible ~ .SwitchBox {
5481
- ${getFocusRing()};
5482
+ ${getOffsetFocusRing()};
5482
5483
  }
5483
5484
  &:not(:checked) {
5484
5485
  & + .SwitchBox {
@@ -5529,14 +5530,16 @@ var Switch = (_a) => {
5529
5530
  onChange,
5530
5531
  size = "medium",
5531
5532
  ariaLabelledby,
5532
- ariaLabel
5533
+ ariaLabel,
5534
+ ariaDescribedby
5533
5535
  } = _b, props = __objRest(_b, [
5534
5536
  "isActive",
5535
5537
  "isDisabled",
5536
5538
  "onChange",
5537
5539
  "size",
5538
5540
  "ariaLabelledby",
5539
- "ariaLabel"
5541
+ "ariaLabel",
5542
+ "ariaDescribedby"
5540
5543
  ]);
5541
5544
  if (ariaLabelledby && ariaLabel) {
5542
5545
  throw new Error(
@@ -5553,6 +5556,7 @@ var Switch = (_a) => {
5553
5556
  switchSize: size,
5554
5557
  "aria-labelledby": ariaLabelledby,
5555
5558
  "aria-label": ariaLabel,
5559
+ "aria-describedby": ariaDescribedby,
5556
5560
  "aria-checked": isActive
5557
5561
  })
5558
5562
  ), /* @__PURE__ */ React32.createElement(
@@ -6644,25 +6648,26 @@ var ListRow = (_a) => {
6644
6648
  className,
6645
6649
  backgroundColor,
6646
6650
  onClick,
6647
- href
6651
+ href,
6652
+ role
6648
6653
  } = _b, props = __objRest(_b, [
6649
6654
  "children",
6650
6655
  "htmlTag",
6651
6656
  "className",
6652
6657
  "backgroundColor",
6653
6658
  "onClick",
6654
- "href"
6659
+ "href",
6660
+ "role"
6655
6661
  ]);
6656
6662
  const classNameFromProp = className ? ` ${className}` : ``;
6657
6663
  return /* @__PURE__ */ React43.createElement(
6658
6664
  ListRowWrapper,
6659
6665
  __spreadValues({
6660
- role: "row",
6666
+ role,
6661
6667
  className: `ListRowWrapper${classNameFromProp}`,
6662
6668
  as: htmlTag,
6663
6669
  backgroundColor,
6664
6670
  onClick,
6665
- tabIndex: 0,
6666
6671
  onKeyDown: (e) => {
6667
6672
  if (e.key === "Enter") {
6668
6673
  e.preventDefault();
@@ -6708,7 +6713,7 @@ var Wrapper = styled35.div`
6708
6713
  ${(props) => props.scrollOffset && `margin: 0 ${negativeScrollOffset(props.scrollOffset)};
6709
6714
  `};
6710
6715
  `;
6711
- var TabsNav = styled35.nav`
6716
+ var TabsNav = styled35.div`
6712
6717
  --activeIndicatorHeight: 3px;
6713
6718
 
6714
6719
  display: flex;
@@ -6724,32 +6729,20 @@ var TabsNav = styled35.nav`
6724
6729
  display: none;
6725
6730
  }
6726
6731
 
6727
- li {
6732
+ > * {
6728
6733
  ${(props) => props.hasFullTabs && `flex: 1 0`};
6729
6734
  &:not(:first-of-type) {
6730
6735
  margin-left: 1rem;
6731
6736
  }
6732
6737
  }
6733
6738
 
6734
- li > * {
6735
- width: 100%;
6736
- }
6737
-
6738
- ul {
6739
- display: flex;
6740
- list-style: none;
6741
- padding: 0;
6742
- margin: 0;
6743
- width: 100%;
6744
- }
6745
-
6746
- ul:after {
6739
+ ::after {
6747
6740
  content: '';
6748
6741
  flex-shrink: 0;
6749
6742
  ${(props) => props.scrollOffset && getSize("width", props.scrollOffset)};
6750
6743
  }
6751
6744
  `;
6752
- var TabsNavPilled = styled35.nav`
6745
+ var TabsNavPilled = styled35.div`
6753
6746
  ${getRadius("200")};
6754
6747
  background-color: var(--lns-color-backgroundSecondary);
6755
6748
 
@@ -6765,23 +6758,11 @@ var TabsNavPilled = styled35.nav`
6765
6758
  display: none;
6766
6759
  }
6767
6760
 
6768
- li {
6761
+ * {
6769
6762
  flex: 1 0;
6770
6763
  }
6771
6764
 
6772
- li > * {
6773
- width: 100%;
6774
- }
6775
-
6776
- ul {
6777
- display: flex;
6778
- list-style: none;
6779
- padding: 0;
6780
- margin: 0;
6781
- width: 100%;
6782
- }
6783
-
6784
- ul:after {
6765
+ ::after {
6785
6766
  content: '';
6786
6767
  flex-shrink: 0;
6787
6768
  ${(props) => props.scrollOffset && getSize("width", props.scrollOffset)};
@@ -6887,18 +6868,31 @@ var Tab = (_a) => {
6887
6868
  ]);
6888
6869
  const { isPilledDesign } = React44.useContext(TabsContext);
6889
6870
  if (isPilledDesign) {
6890
- return /* @__PURE__ */ React44.createElement("li", null, /* @__PURE__ */ React44.createElement(
6871
+ return /* @__PURE__ */ React44.createElement(
6891
6872
  TabWrapperPilled,
6892
6873
  __spreadValues({
6893
6874
  as: htmlTag,
6894
6875
  isActive,
6895
- icon
6876
+ icon,
6877
+ role: "tab",
6878
+ "aria-selected": isActive
6896
6879
  }, props),
6897
6880
  icon && /* @__PURE__ */ React44.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ React44.createElement(icon_default, { icon, color: "currentColor" })),
6898
6881
  children
6899
- ));
6882
+ );
6900
6883
  }
6901
- return /* @__PURE__ */ React44.createElement("li", null, /* @__PURE__ */ React44.createElement(TabWrapper, __spreadValues({ as: htmlTag, isActive, icon }, props), icon && /* @__PURE__ */ React44.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ React44.createElement(icon_default, { icon, color: "currentColor" })), children));
6884
+ return /* @__PURE__ */ React44.createElement(
6885
+ TabWrapper,
6886
+ __spreadValues({
6887
+ as: htmlTag,
6888
+ isActive,
6889
+ icon,
6890
+ role: "tab",
6891
+ "aria-selected": isActive
6892
+ }, props),
6893
+ icon && /* @__PURE__ */ React44.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ React44.createElement(icon_default, { icon, color: "currentColor" })),
6894
+ children
6895
+ );
6902
6896
  };
6903
6897
  var Tabs = (_a) => {
6904
6898
  var _b = _a, {
@@ -6906,37 +6900,31 @@ var Tabs = (_a) => {
6906
6900
  scrollOffset,
6907
6901
  hasFullTabs,
6908
6902
  isPilledDesign,
6909
- hasBottomBorder = false,
6910
- role,
6911
- ariaOrientation
6903
+ hasBottomBorder = false
6912
6904
  } = _b, props = __objRest(_b, [
6913
6905
  "children",
6914
6906
  "scrollOffset",
6915
6907
  "hasFullTabs",
6916
6908
  "isPilledDesign",
6917
- "hasBottomBorder",
6918
- "role",
6919
- "ariaOrientation"
6909
+ "hasBottomBorder"
6920
6910
  ]);
6921
6911
  const tabsContent = isPilledDesign ? /* @__PURE__ */ React44.createElement(
6922
6912
  TabsNavPilled,
6923
6913
  __spreadValues({
6924
6914
  hasFullTabs,
6925
6915
  scrollOffset,
6926
- role,
6927
- "aria-orientation": ariaOrientation
6916
+ role: "tablist"
6928
6917
  }, props),
6929
- /* @__PURE__ */ React44.createElement("ul", null, children)
6918
+ children
6930
6919
  ) : /* @__PURE__ */ React44.createElement(
6931
6920
  TabsNav,
6932
6921
  __spreadValues({
6933
6922
  hasFullTabs,
6934
6923
  scrollOffset,
6935
6924
  hasBottomBorder,
6936
- role,
6937
- "aria-orientation": ariaOrientation
6925
+ role: "tablist"
6938
6926
  }, props),
6939
- /* @__PURE__ */ React44.createElement("ul", null, children)
6927
+ children
6940
6928
  );
6941
6929
  if (scrollOffset) {
6942
6930
  return /* @__PURE__ */ React44.createElement(Wrapper, { scrollOffset }, tabsContent);