@dbosoft/nextjs-uicore 1.0.1 → 1.0.3

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
@@ -1,5 +1,17 @@
1
1
  # @dbosoft/nextjs-uicore
2
2
 
3
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 5fc59bc: fixed missing navigation for github links in subnav
8
+
9
+ ## 1.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 4122817: fixed subnav titlelink
14
+
3
15
  ## 1.0.1
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dbosoft/nextjs-uicore",
3
3
  "description": "Core UI components for Next.js",
4
4
  "author": "dbosoft",
5
- "version": "1.0.1",
5
+ "version": "1.0.3",
6
6
  "sideEffects": false,
7
7
  "license": "MIT",
8
8
  "exports": {
@@ -18,8 +18,8 @@
18
18
  "next": "^14.0.4",
19
19
  "react": "^18.2.0",
20
20
  "typescript": "^5.3.3",
21
- "@dbosoft/eslint-config": "1.0.0",
22
21
  "@dbosoft/web-types": "1.0.0",
22
+ "@dbosoft/eslint-config": "1.0.0",
23
23
  "@dbosoft/typescript-config": "1.0.0"
24
24
  },
25
25
  "publishConfig": {
@@ -23,6 +23,11 @@ export interface ILinkMenuItem {
23
23
  active?: boolean
24
24
  }
25
25
 
26
+ export interface ITitleLink {
27
+ url: string,
28
+ text?: string,
29
+ }
30
+
26
31
 
27
32
  export interface ICtaItem {
28
33
  text: string,
@@ -33,7 +38,7 @@ export interface ICtaItem {
33
38
  }
34
39
 
35
40
  interface ISubNavProps {
36
- titleLink?: ILinkMenuItem,
41
+ titleLink?: ITitleLink,
37
42
  titleContent?: JSX.Element,
38
43
  ctaLinks: ICtaItem[],
39
44
  hideGithubStars: boolean,
@@ -70,7 +75,7 @@ function Subnav({
70
75
  text={titleLink.text}
71
76
 
72
77
  url={titleLink.url} >{titleContent}</TitleLink>}
73
- {titleContent}
78
+ {!titleLink && titleContent}
74
79
  </div>
75
80
  <div className="hidden sm:-my-px sm:ml-6 sm:flex">
76
81
  <MenuItemsDefault
@@ -8,6 +8,7 @@ import { StarIcon } from '@heroicons/react/16/solid'
8
8
  import GithubIcon from '../icons/github.svg'
9
9
  import formatStarCount from './formatStarCount'
10
10
  import parseGithubUrl from './parseGithubUrl'
11
+ import Link from 'next/link';
11
12
 
12
13
  function GithubStarsButton({ url, hideGithubStars }: { url: string, hideGithubStars: boolean }) {
13
14
  const [starCount, setStarCount] = useState(-1)
@@ -63,7 +64,10 @@ function GithubStarsButton({ url, hideGithubStars }: { url: string, hideGithubSt
63
64
 
64
65
  return (
65
66
  <LinkButton icon={!showStarCount ? icon : undefined} label='Github' text={!showStarCount ? "Github" : ""}
66
- variant='neutral' >
67
+ variant='neutral'
68
+ url={url} external
69
+ Link={Link}
70
+ >
67
71
  {showStarCount ? <div className="inline-flex">
68
72
  <GithubIcon className="w-5 mr-2" />
69
73
  <div className='-my-2 mx-2 h-9 block bg-gray-300' style={{ width: "1px" }} />
@@ -4,7 +4,7 @@ import Link from 'next/link'
4
4
 
5
5
 
6
6
  const TitleLink: FC<{
7
- text: string,
7
+ text?: string,
8
8
  url: string,
9
9
  children?: ReactNode
10
10
  }> = ({