@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/cjs/index.js CHANGED
@@ -2288,6 +2288,7 @@ var variantStyles = {
2288
2288
  neutralSecondary: {
2289
2289
  color: getColorValue("body"),
2290
2290
  background: "backgroundSecondary",
2291
+ borderColor: null,
2291
2292
  hover: getColorValue("grey3"),
2292
2293
  // TODO(tatiana/ben p): Awaiting final confirmation from Cody as to semantic approach when he returns Oct 2025
2293
2294
  active: getColorValue("backgroundActive")
@@ -5699,7 +5700,7 @@ var SwitchInput = import_styled26.default.input`
5699
5700
  height: ${(props) => sizes2[props.switchSize].switchHeight}px;
5700
5701
 
5701
5702
  &:focus-visible ~ .SwitchBox {
5702
- ${getFocusRing()};
5703
+ ${getOffsetFocusRing()};
5703
5704
  }
5704
5705
  &:not(:checked) {
5705
5706
  & + .SwitchBox {
@@ -5750,14 +5751,16 @@ var Switch = (_a) => {
5750
5751
  onChange,
5751
5752
  size = "medium",
5752
5753
  ariaLabelledby,
5753
- ariaLabel
5754
+ ariaLabel,
5755
+ ariaDescribedby
5754
5756
  } = _b, props = __objRest(_b, [
5755
5757
  "isActive",
5756
5758
  "isDisabled",
5757
5759
  "onChange",
5758
5760
  "size",
5759
5761
  "ariaLabelledby",
5760
- "ariaLabel"
5762
+ "ariaLabel",
5763
+ "ariaDescribedby"
5761
5764
  ]);
5762
5765
  if (ariaLabelledby && ariaLabel) {
5763
5766
  throw new Error(
@@ -5774,6 +5777,7 @@ var Switch = (_a) => {
5774
5777
  switchSize: size,
5775
5778
  "aria-labelledby": ariaLabelledby,
5776
5779
  "aria-label": ariaLabel,
5780
+ "aria-describedby": ariaDescribedby,
5777
5781
  "aria-checked": isActive
5778
5782
  })
5779
5783
  ), /* @__PURE__ */ import_react33.default.createElement(
@@ -6865,25 +6869,26 @@ var ListRow = (_a) => {
6865
6869
  className,
6866
6870
  backgroundColor,
6867
6871
  onClick,
6868
- href
6872
+ href,
6873
+ role
6869
6874
  } = _b, props = __objRest(_b, [
6870
6875
  "children",
6871
6876
  "htmlTag",
6872
6877
  "className",
6873
6878
  "backgroundColor",
6874
6879
  "onClick",
6875
- "href"
6880
+ "href",
6881
+ "role"
6876
6882
  ]);
6877
6883
  const classNameFromProp = className ? ` ${className}` : ``;
6878
6884
  return /* @__PURE__ */ import_react48.default.createElement(
6879
6885
  ListRowWrapper,
6880
6886
  __spreadValues({
6881
- role: "row",
6887
+ role,
6882
6888
  className: `ListRowWrapper${classNameFromProp}`,
6883
6889
  as: htmlTag,
6884
6890
  backgroundColor,
6885
6891
  onClick,
6886
- tabIndex: 0,
6887
6892
  onKeyDown: (e) => {
6888
6893
  if (e.key === "Enter") {
6889
6894
  e.preventDefault();
@@ -6929,7 +6934,7 @@ var Wrapper = import_styled35.default.div`
6929
6934
  ${(props) => props.scrollOffset && `margin: 0 ${negativeScrollOffset(props.scrollOffset)};
6930
6935
  `};
6931
6936
  `;
6932
- var TabsNav = import_styled35.default.nav`
6937
+ var TabsNav = import_styled35.default.div`
6933
6938
  --activeIndicatorHeight: 3px;
6934
6939
 
6935
6940
  display: flex;
@@ -6945,32 +6950,20 @@ var TabsNav = import_styled35.default.nav`
6945
6950
  display: none;
6946
6951
  }
6947
6952
 
6948
- li {
6953
+ > * {
6949
6954
  ${(props) => props.hasFullTabs && `flex: 1 0`};
6950
6955
  &:not(:first-of-type) {
6951
6956
  margin-left: 1rem;
6952
6957
  }
6953
6958
  }
6954
6959
 
6955
- li > * {
6956
- width: 100%;
6957
- }
6958
-
6959
- ul {
6960
- display: flex;
6961
- list-style: none;
6962
- padding: 0;
6963
- margin: 0;
6964
- width: 100%;
6965
- }
6966
-
6967
- ul:after {
6960
+ ::after {
6968
6961
  content: '';
6969
6962
  flex-shrink: 0;
6970
6963
  ${(props) => props.scrollOffset && getSize("width", props.scrollOffset)};
6971
6964
  }
6972
6965
  `;
6973
- var TabsNavPilled = import_styled35.default.nav`
6966
+ var TabsNavPilled = import_styled35.default.div`
6974
6967
  ${getRadius("200")};
6975
6968
  background-color: var(--lns-color-backgroundSecondary);
6976
6969
 
@@ -6986,23 +6979,11 @@ var TabsNavPilled = import_styled35.default.nav`
6986
6979
  display: none;
6987
6980
  }
6988
6981
 
6989
- li {
6982
+ * {
6990
6983
  flex: 1 0;
6991
6984
  }
6992
6985
 
6993
- li > * {
6994
- width: 100%;
6995
- }
6996
-
6997
- ul {
6998
- display: flex;
6999
- list-style: none;
7000
- padding: 0;
7001
- margin: 0;
7002
- width: 100%;
7003
- }
7004
-
7005
- ul:after {
6986
+ ::after {
7006
6987
  content: '';
7007
6988
  flex-shrink: 0;
7008
6989
  ${(props) => props.scrollOffset && getSize("width", props.scrollOffset)};
@@ -7108,18 +7089,31 @@ var Tab = (_a) => {
7108
7089
  ]);
7109
7090
  const { isPilledDesign } = import_react49.default.useContext(TabsContext);
7110
7091
  if (isPilledDesign) {
7111
- return /* @__PURE__ */ import_react49.default.createElement("li", null, /* @__PURE__ */ import_react49.default.createElement(
7092
+ return /* @__PURE__ */ import_react49.default.createElement(
7112
7093
  TabWrapperPilled,
7113
7094
  __spreadValues({
7114
7095
  as: htmlTag,
7115
7096
  isActive,
7116
- icon
7097
+ icon,
7098
+ role: "tab",
7099
+ "aria-selected": isActive
7117
7100
  }, props),
7118
7101
  icon && /* @__PURE__ */ import_react49.default.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ import_react49.default.createElement(icon_default, { icon, color: "currentColor" })),
7119
7102
  children
7120
- ));
7103
+ );
7121
7104
  }
7122
- return /* @__PURE__ */ import_react49.default.createElement("li", null, /* @__PURE__ */ import_react49.default.createElement(TabWrapper, __spreadValues({ as: htmlTag, isActive, icon }, props), icon && /* @__PURE__ */ import_react49.default.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ import_react49.default.createElement(icon_default, { icon, color: "currentColor" })), children));
7105
+ return /* @__PURE__ */ import_react49.default.createElement(
7106
+ TabWrapper,
7107
+ __spreadValues({
7108
+ as: htmlTag,
7109
+ isActive,
7110
+ icon,
7111
+ role: "tab",
7112
+ "aria-selected": isActive
7113
+ }, props),
7114
+ icon && /* @__PURE__ */ import_react49.default.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ import_react49.default.createElement(icon_default, { icon, color: "currentColor" })),
7115
+ children
7116
+ );
7123
7117
  };
7124
7118
  var Tabs = (_a) => {
7125
7119
  var _b = _a, {
@@ -7127,37 +7121,31 @@ var Tabs = (_a) => {
7127
7121
  scrollOffset,
7128
7122
  hasFullTabs,
7129
7123
  isPilledDesign,
7130
- hasBottomBorder = false,
7131
- role,
7132
- ariaOrientation
7124
+ hasBottomBorder = false
7133
7125
  } = _b, props = __objRest(_b, [
7134
7126
  "children",
7135
7127
  "scrollOffset",
7136
7128
  "hasFullTabs",
7137
7129
  "isPilledDesign",
7138
- "hasBottomBorder",
7139
- "role",
7140
- "ariaOrientation"
7130
+ "hasBottomBorder"
7141
7131
  ]);
7142
7132
  const tabsContent = isPilledDesign ? /* @__PURE__ */ import_react49.default.createElement(
7143
7133
  TabsNavPilled,
7144
7134
  __spreadValues({
7145
7135
  hasFullTabs,
7146
7136
  scrollOffset,
7147
- role,
7148
- "aria-orientation": ariaOrientation
7137
+ role: "tablist"
7149
7138
  }, props),
7150
- /* @__PURE__ */ import_react49.default.createElement("ul", null, children)
7139
+ children
7151
7140
  ) : /* @__PURE__ */ import_react49.default.createElement(
7152
7141
  TabsNav,
7153
7142
  __spreadValues({
7154
7143
  hasFullTabs,
7155
7144
  scrollOffset,
7156
7145
  hasBottomBorder,
7157
- role,
7158
- "aria-orientation": ariaOrientation
7146
+ role: "tablist"
7159
7147
  }, props),
7160
- /* @__PURE__ */ import_react49.default.createElement("ul", null, children)
7148
+ children
7161
7149
  );
7162
7150
  if (scrollOffset) {
7163
7151
  return /* @__PURE__ */ import_react49.default.createElement(Wrapper, { scrollOffset }, tabsContent);