@jsenv/navi 0.14.11 → 0.14.13

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.
@@ -16334,7 +16334,6 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
16334
16334
  position: relative;
16335
16335
  color: var(--x-link-color);
16336
16336
  text-decoration: var(--x-link-text-decoration);
16337
- vertical-align: middle;
16338
16337
  border-radius: var(--link-border-radius);
16339
16338
  outline-width: 0;
16340
16339
  outline-style: solid;
@@ -16837,11 +16836,6 @@ import.meta.css = /* css */`
16837
16836
  position: relative;
16838
16837
  display: inline-flex;
16839
16838
 
16840
- /* Space for eventual outline inside the tab (link) */
16841
- .navi_tab {
16842
- padding: 2px;
16843
- }
16844
-
16845
16839
  .navi_tab {
16846
16840
  --x-tab-background: var(
16847
16841
  --tab-background-color,
@@ -16858,6 +16852,7 @@ import.meta.css = /* css */`
16858
16852
  --x-tab-color: var(--tab-color);
16859
16853
 
16860
16854
  display: flex;
16855
+ padding: 2px; /* Space for eventual outline inside the tab (link) */
16861
16856
  flex-direction: column;
16862
16857
  color: var(--x-tab-color);
16863
16858
  white-space: nowrap;
@@ -16912,7 +16907,9 @@ import.meta.css = /* css */`
16912
16907
  &[data-tab-selected] {
16913
16908
  --x-tab-background: var(--x-tab-background-selected);
16914
16909
  --x-tab-color: var(--tab-color-selected);
16915
- font-weight: bold;
16910
+ &[data-bold-when-selected] {
16911
+ font-weight: bold;
16912
+ }
16916
16913
 
16917
16914
  .navi_tab_indicator {
16918
16915
  background: var(--tab-indicator-color);
@@ -17122,6 +17119,7 @@ const TabBasic = ({
17122
17119
  children,
17123
17120
  icon,
17124
17121
  selected,
17122
+ boldWhenSelected = !icon,
17125
17123
  onClick,
17126
17124
  ...props
17127
17125
  }) => {
@@ -17131,6 +17129,7 @@ const TabBasic = ({
17131
17129
  role: "tab",
17132
17130
  "aria-selected": selected ? "true" : "false",
17133
17131
  "data-interactive": onClick ? "" : undefined,
17132
+ "data-bold-when-selected": boldWhenSelected ? "" : undefined,
17134
17133
  onClick: onClick
17135
17134
  // Style system
17136
17135
  ,
@@ -17147,13 +17146,12 @@ const TabBasic = ({
17147
17146
  children: [(tabListIndicator === "start" || tabListIndicator === "end") && jsx("span", {
17148
17147
  className: "navi_tab_indicator",
17149
17148
  "data-position": tabListIndicator
17150
- }), icon ? children : jsx(Text, {
17151
- noWrap: true,
17149
+ }), boldWhenSelected ? jsx(Text, {
17152
17150
  preventBoldLayoutShift: true
17153
17151
  // boldTransition
17154
17152
  ,
17155
17153
  children: children
17156
- })]
17154
+ }) : children]
17157
17155
  });
17158
17156
  };
17159
17157