@jsenv/navi 0.14.11 → 0.14.12

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