@primer/react 38.36.0-rc.3fb350b1f → 38.36.0-rc.62d935135

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/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@
7
7
  - [#8212](https://github.com/primer/react/pull/8212) [`9ac9343`](https://github.com/primer/react/commit/9ac9343a70fd0f70413a42cd27baf562a74dd4fc) Thanks [@mattcosta7](https://github.com/mattcosta7)! - ThemeProvider: Add a CSS-variable-based implementation to `@primer/react/next`
8
8
  and deprecate the legacy JavaScript theme implementation.
9
9
 
10
+ ### Patch Changes
11
+
12
+ - [#8260](https://github.com/primer/react/pull/8260) [`24d0831`](https://github.com/primer/react/commit/24d0831d34b13e3b4bac8afcfa2ccd5795cd9a9d) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - UnderlineNav: Keep item icons visible by default at the medium breakpoint and above
13
+
10
14
  ## 38.35.1
11
15
 
12
16
  ### Patch Changes
@@ -17,8 +17,9 @@ type UnderlineNavProps = {
17
17
  */
18
18
  variant?: 'inset' | 'flush';
19
19
  /**
20
- * Customize when the icons are hidden to save space. Set to `null` to always show icons.
21
- * Defaults to `xxlarge`; if you know there won't be very many tabs you might set this to a smaller value.
20
+ * Controls the container width below which icons are hidden to save space. Defaults to `medium`.
21
+ * To keep icons visible in a narrow container, use a smaller breakpoint such as `xsmall`, or set to `null` to
22
+ * always show icons.
22
23
  */
23
24
  hideIconsBreakpoint?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | null;
24
25
  };
@@ -22,7 +22,7 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
22
22
  const as = t1 === void 0 ? "nav" : t1;
23
23
  const loadingCounters = t2 === void 0 ? false : t2;
24
24
  const variant = t3 === void 0 ? "inset" : t3;
25
- const hideIconsBreakpoint = t4 === void 0 ? "xxlarge" : t4;
25
+ const hideIconsBreakpoint = t4 === void 0 ? "medium" : t4;
26
26
  const backupRef = useRef(null);
27
27
  const navRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
28
28
  const listRef = useRef(null);
@@ -9042,7 +9042,7 @@
9042
9042
  },
9043
9043
  {
9044
9044
  "id": "components-underlinenav-features--overflow-template",
9045
- "code": "({ initialSelectedIndex = 1 }: { initialSelectedIndex?: number }) => {\n const [selectedIndex, setSelectedIndex] = React.useState<number | null>(\n initialSelectedIndex,\n )\n return (\n <UnderlineNav aria-label=\"Repository\">\n {items.map((item, index) => (\n <UnderlineNav.Item\n key={item.navigation}\n leadingVisual={item.icon}\n aria-current={index === selectedIndex ? 'page' : undefined}\n // Set so that navigation in interaction tests does not cause the\n // page to load the storybook iframe URL and instead keeps the test in\n // the local preview\n target=\"_self\"\n onSelect={(event) => {\n event.preventDefault()\n setSelectedIndex(index)\n }}\n counter={item.counter}\n href={item.href}\n >\n {item.navigation}\n </UnderlineNav.Item>\n ))}\n </UnderlineNav>\n )\n}"
9045
+ "code": "({ initialSelectedIndex = 1 }: { initialSelectedIndex?: number }) => {\n const [selectedIndex, setSelectedIndex] = React.useState<number | null>(\n initialSelectedIndex,\n )\n return (\n <UnderlineNav aria-label=\"Repository\" hideIconsBreakpoint=\"medium\">\n {items.map((item, index) => (\n <UnderlineNav.Item\n key={item.navigation}\n leadingVisual={item.icon}\n aria-current={index === selectedIndex ? 'page' : undefined}\n // Set so that navigation in interaction tests does not cause the\n // page to load the storybook iframe URL and instead keeps the test in\n // the local preview\n target=\"_self\"\n onSelect={(event) => {\n event.preventDefault()\n setSelectedIndex(index)\n }}\n counter={item.counter}\n href={item.href}\n >\n {item.navigation}\n </UnderlineNav.Item>\n ))}\n </UnderlineNav>\n )\n}"
9046
9046
  },
9047
9047
  {
9048
9048
  "id": "components-underlinenav-features--overflow-on-narrow-screen",
@@ -9078,6 +9078,12 @@
9078
9078
  "defaultValue": "false",
9079
9079
  "description": "Whether the navigation items are in loading state. Component waits for all the counters to finish loading to prevent multiple layout shifts."
9080
9080
  },
9081
+ {
9082
+ "name": "hideIconsBreakpoint",
9083
+ "type": "'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | null",
9084
+ "defaultValue": "'medium'",
9085
+ "description": "Controls the container width below which icons are hidden to save space. To keep icons visible in a narrow container, use a smaller breakpoint such as `xsmall`, or set to `null` to always show icons."
9086
+ },
9081
9087
  {
9082
9088
  "name": "variant",
9083
9089
  "type": "'inset' | 'flush'",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.36.0-rc.3fb350b1f",
4
+ "version": "38.36.0-rc.62d935135",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",