@jsenv/navi 0.14.10 → 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);
@@ -17120,7 +17118,9 @@ const TabRoute = ({
17120
17118
  };
17121
17119
  const TabBasic = ({
17122
17120
  children,
17121
+ icon,
17123
17122
  selected,
17123
+ boldWhenSelected = !icon,
17124
17124
  onClick,
17125
17125
  ...props
17126
17126
  }) => {
@@ -17130,6 +17130,7 @@ const TabBasic = ({
17130
17130
  role: "tab",
17131
17131
  "aria-selected": selected ? "true" : "false",
17132
17132
  "data-interactive": onClick ? "" : undefined,
17133
+ "data-bold-when-selected": boldWhenSelected ? "" : undefined,
17133
17134
  onClick: onClick
17134
17135
  // Style system
17135
17136
  ,
@@ -17146,13 +17147,12 @@ const TabBasic = ({
17146
17147
  children: [(tabListIndicator === "start" || tabListIndicator === "end") && jsx("span", {
17147
17148
  className: "navi_tab_indicator",
17148
17149
  "data-position": tabListIndicator
17149
- }), jsx(Text, {
17150
- noWrap: true,
17150
+ }), boldWhenSelected ? jsx(Text, {
17151
17151
  preventBoldLayoutShift: true
17152
17152
  // boldTransition
17153
17153
  ,
17154
17154
  children: children
17155
- })]
17155
+ }) : children]
17156
17156
  });
17157
17157
  };
17158
17158