@k8o/arte-odyssey 0.0.5 → 0.0.6

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.
@@ -1,11 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
- export declare const Anchor: ({ href, children, openInNewTab, renderAnchor, }: {
3
- href: string;
2
+ export declare const Anchor: <T extends string>({ href, children, openInNewTab, renderAnchor, }: {
3
+ href: T;
4
4
  children: ReactNode;
5
5
  openInNewTab?: boolean;
6
6
  renderAnchor?: (props: {
7
7
  type: "internal" | "external";
8
- href: string;
8
+ href: NoInfer<T>;
9
9
  className: string;
10
10
  target?: string;
11
11
  rel?: string;
@@ -7,12 +7,12 @@ export declare const Breadcrumb: {
7
7
  children?: React.ReactNode | undefined;
8
8
  }>;
9
9
  readonly Separator: FC;
10
- readonly Link: FC<PropsWithChildren<{
11
- href: string;
10
+ readonly Link: <T extends string>({ href, current, children, component, }: PropsWithChildren<{
11
+ href: T;
12
12
  current?: boolean;
13
13
  component?: FC<{
14
- href: string;
14
+ href: T;
15
15
  className: string;
16
16
  }>;
17
- }>>;
17
+ }>) => import("react/jsx-runtime").JSX.Element;
18
18
  };
@@ -21,7 +21,12 @@ const Item = ({ children }) => {
21
21
  const Separator = () => {
22
22
  return /* @__PURE__ */ jsx("li", { className: "text-fg-mute", children: /* @__PURE__ */ jsx(ChevronIcon, { direction: "right", size: "sm" }) });
23
23
  };
24
- const _Link = ({ href, current = false, children, component }) => {
24
+ const _Link = ({
25
+ href,
26
+ current = false,
27
+ children,
28
+ component
29
+ }) => {
25
30
  const Link = component ?? "a";
26
31
  return current ? /* @__PURE__ */ jsx("span", { className: "text-fg-base", children }) : /* @__PURE__ */ jsx(Link, { className: "text-fg-mute underline hover:text-fg-base", href, children });
27
32
  };
@@ -1,17 +1,15 @@
1
- import type { FC, PropsWithChildren, ReactNode } from 'react';
2
- type IconLinkProps = PropsWithChildren<{
3
- size?: 'sm' | 'md' | 'lg';
4
- bg?: 'transparent' | 'base';
1
+ import type { PropsWithChildren, ReactNode } from 'react';
2
+ export declare const IconLink: <T extends string>({ size, bg, label, href, children, openInNewTab, renderAnchor, }: PropsWithChildren<{
3
+ size?: "sm" | "md" | "lg";
4
+ bg?: "transparent" | "base";
5
5
  label?: string;
6
- href: string;
6
+ href: T;
7
7
  openInNewTab?: boolean;
8
8
  renderAnchor?: (props: {
9
- href: string;
9
+ href: NoInfer<T>;
10
10
  className: string;
11
11
  target?: string;
12
12
  rel?: string;
13
13
  children: ReactNode;
14
14
  }) => ReactNode;
15
- }>;
16
- export declare const IconLink: FC<IconLinkProps>;
17
- export {};
15
+ }>) => ReactNode;
@@ -1,19 +1,19 @@
1
- import type { FC, ReactNode } from 'react';
2
- export declare const LinkButton: FC<{
3
- variant?: 'contained' | 'outlined' | 'skeleton';
4
- size?: 'sm' | 'md' | 'lg';
5
- href: string;
1
+ import type { ReactNode } from 'react';
2
+ export declare const LinkButton: <T extends string>({ children, size, variant, href, startIcon, endIcon, active, openInNewTab, renderAnchor, }: {
3
+ variant?: "contained" | "outlined" | "skeleton";
4
+ size?: "sm" | "md" | "lg";
5
+ href: T;
6
6
  startIcon?: ReactNode;
7
7
  endIcon?: ReactNode;
8
8
  active?: boolean;
9
9
  openInNewTab?: boolean;
10
10
  children: string;
11
11
  renderAnchor?: (props: {
12
- 'aria-label'?: string;
13
- href: string;
12
+ "aria-label"?: string;
13
+ href: NoInfer<T>;
14
14
  className: string;
15
15
  target?: string;
16
16
  rel?: string;
17
17
  children: ReactNode;
18
18
  }) => ReactNode;
19
- }>;
19
+ }) => ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k8o/arte-odyssey",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "k8o's react ui library",
5
5
  "author": "k8o <kosakanoki@gmail.com>",
6
6
  "keywords": [