@yo-yo.art/ui 0.1.0 → 0.1.1
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/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.cts +5 -2
- package/dist/components/Link/Link.d.mts +5 -2
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Link/index.d.cts +2 -2
- package/dist/components/Link/index.d.mts +2 -2
- package/dist/gallery/HomeButton/HomeButton.cjs +14 -9
- package/dist/gallery/HomeButton/HomeButton.cjs.map +1 -1
- package/dist/gallery/HomeButton/HomeButton.mjs +14 -9
- package/dist/gallery/HomeButton/HomeButton.mjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.cjs","names":["linkClasses","ArrowUpRight"],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ElementType } from \"react\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport { linkClasses, type LinkTone } from \"./link-classes\";\n\nexport type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n tone?: LinkTone;\n external?: boolean;\n arrow?: boolean;\n /**\n * Swap the rendered element. Pages can pass their framework's link\n * component here to keep client-side navigation.\n */\n component?: ElementType<
|
|
1
|
+
{"version":3,"file":"Link.cjs","names":["linkClasses","ArrowUpRight"],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ElementType } from \"react\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport { linkClasses, type LinkTone } from \"./link-classes\";\n\nexport type LinkComponentProps = Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"href\"\n> & {\n href: string;\n};\n\nexport type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n tone?: LinkTone;\n external?: boolean;\n arrow?: boolean;\n /**\n * Swap the rendered element. Pages can pass their framework's link\n * component here to keep client-side navigation.\n */\n component?: ElementType<LinkComponentProps>;\n};\n\nexport const Link = ({\n href,\n tone,\n external,\n arrow,\n component,\n className,\n children,\n ...props\n}: LinkProps) => {\n const Component = (component ?? \"a\") as ElementType<LinkComponentProps>;\n const externalProps = external ? { target: \"_blank\", rel: \"noopener noreferrer\" } : {};\n\n return (\n <Component\n href={href}\n className={linkClasses({ tone, className })}\n {...externalProps}\n {...props}\n >\n {children}\n {external || arrow ? <ArrowUpRight aria-hidden className=\"size-4\" /> : null}\n </Component>\n );\n};\n"],"mappings":";;;;AAuBA,MAAa,QAAQ,EACnB,MACA,MACA,UACA,OACA,WACA,WACA,UACA,GAAG,YACY;CACf,MAAM,YAAa,aAAa;CAChC,MAAM,gBAAgB,WAAW;EAAE,QAAQ;EAAU,KAAK;CAAsB,IAAI,CAAC;CAErF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAD;EACQ;EACN,WAAWA,qBAAAA,YAAY;GAAE;GAAM;EAAU,CAAC;EAC1C,GAAI;EACJ,GAAI;EAJN,UAAA,CAMG,UACA,YAAY,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,cAAD;GAAc,eAAA;GAAY,WAAU;EAAU,CAAA,IAAI,IAC9D;;AAEf"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { LinkTone } from "./link-classes.cjs";
|
|
2
2
|
import { AnchorHTMLAttributes, ElementType } from "react";
|
|
3
|
+
type LinkComponentProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"> & {
|
|
4
|
+
href: string;
|
|
5
|
+
};
|
|
3
6
|
type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
7
|
href: string;
|
|
5
8
|
tone?: LinkTone;
|
|
@@ -9,8 +12,8 @@ type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
9
12
|
* Swap the rendered element. Pages can pass their framework's link
|
|
10
13
|
* component here to keep client-side navigation.
|
|
11
14
|
*/
|
|
12
|
-
component?: ElementType<
|
|
15
|
+
component?: ElementType<LinkComponentProps>;
|
|
13
16
|
};
|
|
14
17
|
declare const Link: ({ href, tone, external, arrow, component, className, children, ...props }: LinkProps) => import("react").JSX.Element;
|
|
15
|
-
export { Link, LinkProps };
|
|
18
|
+
export { Link, LinkComponentProps, LinkProps };
|
|
16
19
|
//# sourceMappingURL=Link.d.cts.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { LinkTone } from "./link-classes.mjs";
|
|
2
2
|
import { AnchorHTMLAttributes, ElementType } from "react";
|
|
3
|
+
type LinkComponentProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"> & {
|
|
4
|
+
href: string;
|
|
5
|
+
};
|
|
3
6
|
type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
7
|
href: string;
|
|
5
8
|
tone?: LinkTone;
|
|
@@ -9,8 +12,8 @@ type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
9
12
|
* Swap the rendered element. Pages can pass their framework's link
|
|
10
13
|
* component here to keep client-side navigation.
|
|
11
14
|
*/
|
|
12
|
-
component?: ElementType<
|
|
15
|
+
component?: ElementType<LinkComponentProps>;
|
|
13
16
|
};
|
|
14
17
|
declare const Link: ({ href, tone, external, arrow, component, className, children, ...props }: LinkProps) => import("react").JSX.Element;
|
|
15
|
-
export { Link, LinkProps };
|
|
18
|
+
export { Link, LinkComponentProps, LinkProps };
|
|
16
19
|
//# sourceMappingURL=Link.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.mjs","names":[],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ElementType } from \"react\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport { linkClasses, type LinkTone } from \"./link-classes\";\n\nexport type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n tone?: LinkTone;\n external?: boolean;\n arrow?: boolean;\n /**\n * Swap the rendered element. Pages can pass their framework's link\n * component here to keep client-side navigation.\n */\n component?: ElementType<
|
|
1
|
+
{"version":3,"file":"Link.mjs","names":[],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ElementType } from \"react\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport { linkClasses, type LinkTone } from \"./link-classes\";\n\nexport type LinkComponentProps = Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"href\"\n> & {\n href: string;\n};\n\nexport type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n tone?: LinkTone;\n external?: boolean;\n arrow?: boolean;\n /**\n * Swap the rendered element. Pages can pass their framework's link\n * component here to keep client-side navigation.\n */\n component?: ElementType<LinkComponentProps>;\n};\n\nexport const Link = ({\n href,\n tone,\n external,\n arrow,\n component,\n className,\n children,\n ...props\n}: LinkProps) => {\n const Component = (component ?? \"a\") as ElementType<LinkComponentProps>;\n const externalProps = external ? { target: \"_blank\", rel: \"noopener noreferrer\" } : {};\n\n return (\n <Component\n href={href}\n className={linkClasses({ tone, className })}\n {...externalProps}\n {...props}\n >\n {children}\n {external || arrow ? <ArrowUpRight aria-hidden className=\"size-4\" /> : null}\n </Component>\n );\n};\n"],"mappings":";;;;AAuBA,MAAa,QAAQ,EACnB,MACA,MACA,UACA,OACA,WACA,WACA,UACA,GAAG,YACY;CACf,MAAM,YAAa,aAAa;CAChC,MAAM,gBAAgB,WAAW;EAAE,QAAQ;EAAU,KAAK;CAAsB,IAAI,CAAC;CAErF,OACE,qBAAC,WAAD;EACQ;EACN,WAAW,YAAY;GAAE;GAAM;EAAU,CAAC;EAC1C,GAAI;EACJ,GAAI;EAJN,UAAA,CAMG,UACA,YAAY,QAAQ,oBAAC,cAAD;GAAc,eAAA;GAAY,WAAU;EAAU,CAAA,IAAI,IAC9D;;AAEf"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LinkTone, linkClasses } from "./link-classes.cjs";
|
|
2
|
-
import { Link, LinkProps } from "./Link.cjs";
|
|
3
|
-
export { Link, type LinkProps, type LinkTone, linkClasses };
|
|
2
|
+
import { Link, LinkComponentProps, LinkProps } from "./Link.cjs";
|
|
3
|
+
export { Link, type LinkComponentProps, type LinkProps, type LinkTone, linkClasses };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LinkTone, linkClasses } from "./link-classes.mjs";
|
|
2
|
-
import { Link, LinkProps } from "./Link.mjs";
|
|
3
|
-
export { Link, type LinkProps, type LinkTone, linkClasses };
|
|
2
|
+
import { Link, LinkComponentProps, LinkProps } from "./Link.mjs";
|
|
3
|
+
export { Link, type LinkComponentProps, type LinkProps, type LinkTone, linkClasses };
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
2
2
|
let lucide_react = require("lucide-react");
|
|
3
3
|
// src/gallery/HomeButton/HomeButton.tsx
|
|
4
|
-
const HomeButton = ({ href, label = "Grupo Yo-Yo" }) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
4
|
+
const HomeButton = ({ href, label = "Grupo Yo-Yo" }) => {
|
|
5
|
+
const stop = (event) => event.stopPropagation();
|
|
6
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
7
|
+
href,
|
|
8
|
+
onPointerDown: stop,
|
|
9
|
+
onTouchStart: stop,
|
|
10
|
+
"aria-label": `Volver a ${label}`,
|
|
11
|
+
className: "fixed left-4 top-4 z-[9999] flex items-center gap-2 border border-base-content/12 bg-base-100/85 px-3 py-2 font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60 backdrop-blur-md transition-colors [touch-action:manipulation] hover:text-base-content",
|
|
12
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowLeft, { className: "size-3.5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
13
|
+
className: "hidden sm:inline",
|
|
14
|
+
children: label
|
|
15
|
+
})]
|
|
16
|
+
});
|
|
17
|
+
};
|
|
13
18
|
exports.HomeButton = HomeButton;
|
|
14
19
|
|
|
15
20
|
//# sourceMappingURL=HomeButton.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeButton.cjs","names":["ArrowLeft"],"sources":["../../../src/gallery/HomeButton/HomeButton.tsx"],"sourcesContent":["import { ArrowLeft } from \"lucide-react\";\n\nexport type HomeButtonProps = {\n href: string;\n /** Group name shown next to the arrow. */\n label?: string;\n};\n\nexport const HomeButton = ({ href, label = \"Grupo Yo-Yo\" }: HomeButtonProps) => (\n <a\n
|
|
1
|
+
{"version":3,"file":"HomeButton.cjs","names":["ArrowLeft"],"sources":["../../../src/gallery/HomeButton/HomeButton.tsx"],"sourcesContent":["import type { SyntheticEvent } from \"react\";\nimport { ArrowLeft } from \"lucide-react\";\n\nexport type HomeButtonProps = {\n href: string;\n /** Group name shown next to the arrow. */\n label?: string;\n};\n\nexport const HomeButton = ({ href, label = \"Grupo Yo-Yo\" }: HomeButtonProps) => {\n const stop = (event: SyntheticEvent) => event.stopPropagation();\n\n return (\n <a\n href={href}\n onPointerDown={stop}\n onTouchStart={stop}\n aria-label={`Volver a ${label}`}\n className=\"fixed left-4 top-4 z-[9999] flex items-center gap-2 border border-base-content/12 bg-base-100/85 px-3 py-2 font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60 backdrop-blur-md transition-colors [touch-action:manipulation] hover:text-base-content\"\n >\n <ArrowLeft className=\"size-3.5\" />\n <span className=\"hidden sm:inline\">{label}</span>\n </a>\n );\n};\n"],"mappings":";;;AASA,MAAa,cAAc,EAAE,MAAM,QAAQ,oBAAqC;CAC9E,MAAM,QAAQ,UAA0B,MAAM,gBAAgB;CAE9D,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,KAAD;EACQ;EACN,eAAe;EACf,cAAc;EACd,cAAY,YAAY;EACxB,WAAU;EALZ,UAAA,CAOE,iBAAA,GAAA,kBAAA,IAAA,CAACA,aAAAA,WAAD,EAAW,WAAU,WAAY,CAAA,GACjC,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,WAAU;GAAoB,UAAA;EAAY,CAAA,CAC/C;;AAEP"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowLeft } from "lucide-react";
|
|
3
3
|
// src/gallery/HomeButton/HomeButton.tsx
|
|
4
|
-
const HomeButton = ({ href, label = "Grupo Yo-Yo" }) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
4
|
+
const HomeButton = ({ href, label = "Grupo Yo-Yo" }) => {
|
|
5
|
+
const stop = (event) => event.stopPropagation();
|
|
6
|
+
return /* @__PURE__ */ jsxs("a", {
|
|
7
|
+
href,
|
|
8
|
+
onPointerDown: stop,
|
|
9
|
+
onTouchStart: stop,
|
|
10
|
+
"aria-label": `Volver a ${label}`,
|
|
11
|
+
className: "fixed left-4 top-4 z-[9999] flex items-center gap-2 border border-base-content/12 bg-base-100/85 px-3 py-2 font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60 backdrop-blur-md transition-colors [touch-action:manipulation] hover:text-base-content",
|
|
12
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "size-3.5" }), /* @__PURE__ */ jsx("span", {
|
|
13
|
+
className: "hidden sm:inline",
|
|
14
|
+
children: label
|
|
15
|
+
})]
|
|
16
|
+
});
|
|
17
|
+
};
|
|
13
18
|
export { HomeButton };
|
|
14
19
|
|
|
15
20
|
//# sourceMappingURL=HomeButton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeButton.mjs","names":[],"sources":["../../../src/gallery/HomeButton/HomeButton.tsx"],"sourcesContent":["import { ArrowLeft } from \"lucide-react\";\n\nexport type HomeButtonProps = {\n href: string;\n /** Group name shown next to the arrow. */\n label?: string;\n};\n\nexport const HomeButton = ({ href, label = \"Grupo Yo-Yo\" }: HomeButtonProps) => (\n <a\n
|
|
1
|
+
{"version":3,"file":"HomeButton.mjs","names":[],"sources":["../../../src/gallery/HomeButton/HomeButton.tsx"],"sourcesContent":["import type { SyntheticEvent } from \"react\";\nimport { ArrowLeft } from \"lucide-react\";\n\nexport type HomeButtonProps = {\n href: string;\n /** Group name shown next to the arrow. */\n label?: string;\n};\n\nexport const HomeButton = ({ href, label = \"Grupo Yo-Yo\" }: HomeButtonProps) => {\n const stop = (event: SyntheticEvent) => event.stopPropagation();\n\n return (\n <a\n href={href}\n onPointerDown={stop}\n onTouchStart={stop}\n aria-label={`Volver a ${label}`}\n className=\"fixed left-4 top-4 z-[9999] flex items-center gap-2 border border-base-content/12 bg-base-100/85 px-3 py-2 font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60 backdrop-blur-md transition-colors [touch-action:manipulation] hover:text-base-content\"\n >\n <ArrowLeft className=\"size-3.5\" />\n <span className=\"hidden sm:inline\">{label}</span>\n </a>\n );\n};\n"],"mappings":";;;AASA,MAAa,cAAc,EAAE,MAAM,QAAQ,oBAAqC;CAC9E,MAAM,QAAQ,UAA0B,MAAM,gBAAgB;CAE9D,OACE,qBAAC,KAAD;EACQ;EACN,eAAe;EACf,cAAc;EACd,cAAY,YAAY;EACxB,WAAU;EALZ,UAAA,CAOE,oBAAC,WAAD,EAAW,WAAU,WAAY,CAAA,GACjC,oBAAC,QAAD;GAAM,WAAU;GAAoB,UAAA;EAAY,CAAA,CAC/C;;AAEP"}
|
package/dist/index.d.cts
CHANGED
|
@@ -11,11 +11,11 @@ import { IconButtonSize, IconButtonVariant, iconButtonClasses } from "./componen
|
|
|
11
11
|
import { IconButton, IconButtonProps } from "./components/IconButton/IconButton.cjs";
|
|
12
12
|
import "./components/IconButton/index.cjs";
|
|
13
13
|
import { LinkTone, linkClasses } from "./components/Link/link-classes.cjs";
|
|
14
|
-
import { Link, LinkProps } from "./components/Link/Link.cjs";
|
|
14
|
+
import { Link, LinkComponentProps, LinkProps } from "./components/Link/Link.cjs";
|
|
15
15
|
import "./components/Link/index.cjs";
|
|
16
16
|
import { Logo, LogoProps } from "./components/Logo/Logo.cjs";
|
|
17
17
|
import { PanelPadding, PanelTone, panelClasses } from "./components/Panel/panel-classes.cjs";
|
|
18
18
|
import { Panel, PanelProps } from "./components/Panel/Panel.cjs";
|
|
19
19
|
import "./components/Panel/index.cjs";
|
|
20
20
|
import { ThemeToggle, ThemeToggleProps } from "./components/ThemeToggle/ThemeToggle.cjs";
|
|
21
|
-
export { Badge, type BadgeProps, type BadgeTone, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Eyebrow, type EyebrowProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Link, type LinkProps, type LinkTone, Logo, type LogoProps, Panel, type PanelPadding, type PanelProps, type PanelTone, ThemeToggle, type ThemeToggleProps, badgeClasses, buttonClasses, iconButtonClasses, linkClasses, panelClasses };
|
|
21
|
+
export { Badge, type BadgeProps, type BadgeTone, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Eyebrow, type EyebrowProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Link, type LinkComponentProps, type LinkProps, type LinkTone, Logo, type LogoProps, Panel, type PanelPadding, type PanelProps, type PanelTone, ThemeToggle, type ThemeToggleProps, badgeClasses, buttonClasses, iconButtonClasses, linkClasses, panelClasses };
|
package/dist/index.d.mts
CHANGED
|
@@ -11,11 +11,11 @@ import { IconButtonSize, IconButtonVariant, iconButtonClasses } from "./componen
|
|
|
11
11
|
import { IconButton, IconButtonProps } from "./components/IconButton/IconButton.mjs";
|
|
12
12
|
import "./components/IconButton/index.mjs";
|
|
13
13
|
import { LinkTone, linkClasses } from "./components/Link/link-classes.mjs";
|
|
14
|
-
import { Link, LinkProps } from "./components/Link/Link.mjs";
|
|
14
|
+
import { Link, LinkComponentProps, LinkProps } from "./components/Link/Link.mjs";
|
|
15
15
|
import "./components/Link/index.mjs";
|
|
16
16
|
import { Logo, LogoProps } from "./components/Logo/Logo.mjs";
|
|
17
17
|
import { PanelPadding, PanelTone, panelClasses } from "./components/Panel/panel-classes.mjs";
|
|
18
18
|
import { Panel, PanelProps } from "./components/Panel/Panel.mjs";
|
|
19
19
|
import "./components/Panel/index.mjs";
|
|
20
20
|
import { ThemeToggle, ThemeToggleProps } from "./components/ThemeToggle/ThemeToggle.mjs";
|
|
21
|
-
export { Badge, type BadgeProps, type BadgeTone, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Eyebrow, type EyebrowProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Link, type LinkProps, type LinkTone, Logo, type LogoProps, Panel, type PanelPadding, type PanelProps, type PanelTone, ThemeToggle, type ThemeToggleProps, badgeClasses, buttonClasses, iconButtonClasses, linkClasses, panelClasses };
|
|
21
|
+
export { Badge, type BadgeProps, type BadgeTone, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Eyebrow, type EyebrowProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Link, type LinkComponentProps, type LinkProps, type LinkTone, Logo, type LogoProps, Panel, type PanelPadding, type PanelProps, type PanelTone, ThemeToggle, type ThemeToggleProps, badgeClasses, buttonClasses, iconButtonClasses, linkClasses, panelClasses };
|