@yo-yo.art/ui 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +52 -2
- package/dist/components/Badge/Badge.cjs +13 -0
- package/dist/components/Badge/Badge.cjs.map +1 -0
- package/dist/components/Badge/Badge.d.cts +8 -0
- package/dist/components/Badge/Badge.d.mts +8 -0
- package/dist/components/Badge/Badge.mjs +13 -0
- package/dist/components/Badge/Badge.mjs.map +1 -0
- package/dist/components/Badge/badge-classes.cjs +12 -0
- package/dist/components/Badge/badge-classes.cjs.map +1 -0
- package/dist/components/Badge/badge-classes.d.cts +7 -0
- package/dist/components/Badge/badge-classes.d.mts +7 -0
- package/dist/components/Badge/badge-classes.mjs +12 -0
- package/dist/components/Badge/badge-classes.mjs.map +1 -0
- package/dist/components/Badge/index.cjs +4 -0
- package/dist/components/Badge/index.d.cts +3 -0
- package/dist/components/Badge/index.d.mts +3 -0
- package/dist/components/Badge/index.mjs +3 -0
- package/dist/components/Button/Button.cjs +15 -0
- package/dist/components/Button/Button.cjs.map +1 -0
- package/dist/components/Button/Button.d.cts +9 -0
- package/dist/components/Button/Button.d.mts +9 -0
- package/dist/components/Button/Button.mjs +15 -0
- package/dist/components/Button/Button.mjs.map +1 -0
- package/dist/components/Button/ButtonLink.cjs +15 -0
- package/dist/components/Button/ButtonLink.cjs.map +1 -0
- package/dist/components/Button/ButtonLink.d.cts +10 -0
- package/dist/components/Button/ButtonLink.d.mts +10 -0
- package/dist/components/Button/ButtonLink.mjs +15 -0
- package/dist/components/Button/ButtonLink.mjs.map +1 -0
- package/dist/components/Button/button-classes.cjs +16 -0
- package/dist/components/Button/button-classes.cjs.map +1 -0
- package/dist/components/Button/button-classes.d.cts +9 -0
- package/dist/components/Button/button-classes.d.mts +9 -0
- package/dist/components/Button/button-classes.mjs +16 -0
- package/dist/components/Button/button-classes.mjs.map +1 -0
- package/dist/components/Button/index.cjs +6 -0
- package/dist/components/Button/index.d.cts +4 -0
- package/dist/components/Button/index.d.mts +4 -0
- package/dist/components/Button/index.mjs +4 -0
- package/dist/components/Eyebrow/Eyebrow.cjs +10 -0
- package/dist/components/Eyebrow/Eyebrow.cjs.map +1 -0
- package/dist/components/Eyebrow/Eyebrow.d.cts +5 -0
- package/dist/components/Eyebrow/Eyebrow.d.mts +5 -0
- package/dist/components/Eyebrow/Eyebrow.mjs +10 -0
- package/dist/components/Eyebrow/Eyebrow.mjs.map +1 -0
- package/dist/components/Eyebrow/index.cjs +2 -0
- package/dist/components/Eyebrow/index.d.cts +2 -0
- package/dist/components/Eyebrow/index.d.mts +2 -0
- package/dist/components/Eyebrow/index.mjs +1 -0
- package/dist/components/IconButton/IconButton.cjs +17 -0
- package/dist/components/IconButton/IconButton.cjs.map +1 -0
- package/dist/components/IconButton/IconButton.d.cts +11 -0
- package/dist/components/IconButton/IconButton.d.mts +11 -0
- package/dist/components/IconButton/IconButton.mjs +17 -0
- package/dist/components/IconButton/IconButton.mjs.map +1 -0
- package/dist/components/IconButton/icon-button-classes.cjs +16 -0
- package/dist/components/IconButton/icon-button-classes.cjs.map +1 -0
- package/dist/components/IconButton/icon-button-classes.d.cts +9 -0
- package/dist/components/IconButton/icon-button-classes.d.mts +9 -0
- package/dist/components/IconButton/icon-button-classes.mjs +16 -0
- package/dist/components/IconButton/icon-button-classes.mjs.map +1 -0
- package/dist/components/IconButton/index.cjs +4 -0
- package/dist/components/IconButton/index.d.cts +3 -0
- package/dist/components/IconButton/index.d.mts +3 -0
- package/dist/components/IconButton/index.mjs +3 -0
- package/dist/components/Link/Link.cjs +27 -0
- package/dist/components/Link/Link.cjs.map +1 -0
- package/dist/components/Link/Link.d.cts +16 -0
- package/dist/components/Link/Link.d.mts +16 -0
- package/dist/components/Link/Link.mjs +27 -0
- package/dist/components/Link/Link.mjs.map +1 -0
- package/dist/components/Link/index.cjs +4 -0
- package/dist/components/Link/index.d.cts +3 -0
- package/dist/components/Link/index.d.mts +3 -0
- package/dist/components/Link/index.mjs +3 -0
- package/dist/components/Link/link-classes.cjs +11 -0
- package/dist/components/Link/link-classes.cjs.map +1 -0
- package/dist/components/Link/link-classes.d.cts +7 -0
- package/dist/components/Link/link-classes.d.mts +7 -0
- package/dist/components/Link/link-classes.mjs +11 -0
- package/dist/components/Link/link-classes.mjs.map +1 -0
- package/dist/components/Logo/Logo.cjs +25 -0
- package/dist/components/Logo/Logo.cjs.map +1 -0
- package/dist/components/Logo/Logo.d.cts +12 -0
- package/dist/components/Logo/Logo.d.mts +12 -0
- package/dist/components/Logo/Logo.mjs +25 -0
- package/dist/components/Logo/Logo.mjs.map +1 -0
- package/dist/components/Logo/index.cjs +2 -0
- package/dist/components/Logo/index.mjs +1 -0
- package/dist/components/Panel/Panel.cjs +14 -0
- package/dist/components/Panel/Panel.cjs.map +1 -0
- package/dist/components/Panel/Panel.d.cts +9 -0
- package/dist/components/Panel/Panel.d.mts +9 -0
- package/dist/components/Panel/Panel.mjs +14 -0
- package/dist/components/Panel/Panel.mjs.map +1 -0
- package/dist/components/Panel/index.cjs +4 -0
- package/dist/components/Panel/index.d.cts +3 -0
- package/dist/components/Panel/index.d.mts +3 -0
- package/dist/components/Panel/index.mjs +3 -0
- package/dist/components/Panel/panel-classes.cjs +16 -0
- package/dist/components/Panel/panel-classes.cjs.map +1 -0
- package/dist/components/Panel/panel-classes.d.cts +9 -0
- package/dist/components/Panel/panel-classes.d.mts +9 -0
- package/dist/components/Panel/panel-classes.mjs +16 -0
- package/dist/components/Panel/panel-classes.mjs.map +1 -0
- package/dist/components/ThemeToggle/ThemeToggle.cjs +34 -0
- package/dist/components/ThemeToggle/ThemeToggle.cjs.map +1 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.cts +6 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.mts +6 -0
- package/dist/components/ThemeToggle/ThemeToggle.mjs +34 -0
- package/dist/components/ThemeToggle/ThemeToggle.mjs.map +1 -0
- package/dist/components/ThemeToggle/index.cjs +2 -0
- package/dist/components/ThemeToggle/index.mjs +1 -0
- package/dist/gallery/HomeButton/HomeButton.cjs +15 -0
- package/dist/gallery/HomeButton/HomeButton.cjs.map +1 -0
- package/dist/gallery/HomeButton/HomeButton.d.cts +8 -0
- package/dist/gallery/HomeButton/HomeButton.d.mts +8 -0
- package/dist/gallery/HomeButton/HomeButton.mjs +15 -0
- package/dist/gallery/HomeButton/HomeButton.mjs.map +1 -0
- package/dist/gallery/HomeButton/index.cjs +2 -0
- package/dist/gallery/HomeButton/index.mjs +1 -0
- package/dist/gallery/LoadingScreen/LoadingScreen.cjs +108 -0
- package/dist/gallery/LoadingScreen/LoadingScreen.cjs.map +1 -0
- package/dist/gallery/LoadingScreen/LoadingScreen.d.cts +31 -0
- package/dist/gallery/LoadingScreen/LoadingScreen.d.mts +31 -0
- package/dist/gallery/LoadingScreen/LoadingScreen.mjs +108 -0
- package/dist/gallery/LoadingScreen/LoadingScreen.mjs.map +1 -0
- package/dist/gallery/LoadingScreen/index.cjs +2 -0
- package/dist/gallery/LoadingScreen/index.mjs +1 -0
- package/dist/gallery/SetupNotice/SetupNotice.cjs +41 -0
- package/dist/gallery/SetupNotice/SetupNotice.cjs.map +1 -0
- package/dist/gallery/SetupNotice/SetupNotice.d.cts +9 -0
- package/dist/gallery/SetupNotice/SetupNotice.d.mts +9 -0
- package/dist/gallery/SetupNotice/SetupNotice.mjs +41 -0
- package/dist/gallery/SetupNotice/SetupNotice.mjs.map +1 -0
- package/dist/gallery/SetupNotice/index.cjs +2 -0
- package/dist/gallery/SetupNotice/index.mjs +1 -0
- package/dist/gallery.cjs +10 -0
- package/dist/gallery.d.cts +4 -0
- package/dist/gallery.d.mts +4 -0
- package/dist/gallery.mjs +7 -0
- package/dist/index.cjs +37 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.mjs +23 -0
- package/dist/lib/cn.cjs +5 -0
- package/dist/lib/cn.cjs.map +1 -0
- package/dist/lib/cn.mjs +5 -0
- package/dist/lib/cn.mjs.map +1 -0
- package/dist/scenography.css +332 -0
- package/dist/styles.css +76 -0
- package/package.json +73 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Javier López Úbeda
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @yo-yo.art/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Grupo Yo-Yo design system: shared React components, tokens and styles.
|
|
4
|
+
|
|
5
|
+
- **Workshop:** <https://yo-yo.codeberg.page/ui/>
|
|
6
|
+
- **Repository:** <https://codeberg.org/yo-yo/ui>
|
|
7
|
+
|
|
8
|
+
> **Alpha** (`0.x`). The API can change between minor releases.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pnpm add @yo-yo.art/ui
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
React, React DOM, `lucide-react` and Tailwind 4 are peers.
|
|
17
|
+
|
|
18
|
+
## Tailwind
|
|
19
|
+
|
|
20
|
+
```css
|
|
21
|
+
@import "tailwindcss";
|
|
22
|
+
@import "@yo-yo.art/ui/styles.css";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The stylesheet carries the tokens and a `@source` that points at the package's
|
|
26
|
+
compiled JS, so Tailwind finds the classes the components use.
|
|
27
|
+
|
|
28
|
+
For the scenography overlay, also import:
|
|
29
|
+
|
|
30
|
+
```css
|
|
31
|
+
@import "@yo-yo.art/ui/scenography.css";
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The package does not ship fonts. Set `--font-sans` and `--font-mono` in the app.
|
|
35
|
+
|
|
36
|
+
## Next.js
|
|
37
|
+
|
|
38
|
+
The package is framework-agnostic and does not ship `"use client"` directives.
|
|
39
|
+
Wrap the interactive components (`ThemeToggle`, `LoadingScreen`,
|
|
40
|
+
`SetupNotice`) in a local client component.
|
|
41
|
+
|
|
42
|
+
## Entry points
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
@yo-yo.art/ui components and tokens
|
|
46
|
+
@yo-yo.art/ui/gallery loading cover, home button and setup notice
|
|
47
|
+
@yo-yo.art/ui/styles.css design tokens and Tailwind source
|
|
48
|
+
@yo-yo.art/ui/scenography.css compatibility layer for the overlay presets
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
MIT.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_badge_classes = require("./badge-classes.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
// src/components/Badge/Badge.tsx
|
|
4
|
+
const Badge = ({ tone, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5
|
+
className: require_badge_classes.badgeClasses({
|
|
6
|
+
tone,
|
|
7
|
+
className
|
|
8
|
+
}),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
exports.Badge = Badge;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=Badge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.cjs","names":["badgeClasses"],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\nimport { badgeClasses, type BadgeTone } from \"./badge-classes\";\n\nexport type BadgeProps = HTMLAttributes<HTMLSpanElement> & {\n tone?: BadgeTone;\n};\n\nexport const Badge = ({ tone, className, ...props }: BadgeProps) => (\n <span className={badgeClasses({ tone, className })} {...props} />\n);\n"],"mappings":";;;AAOA,MAAa,SAAS,EAAE,MAAM,WAAW,GAAG,YAC1C,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;CAAM,WAAWA,sBAAAA,aAAa;EAAE;EAAM;CAAU,CAAC;CAAG,GAAI;AAAQ,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BadgeTone } from "./badge-classes.cjs";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
|
+
type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
4
|
+
tone?: BadgeTone;
|
|
5
|
+
};
|
|
6
|
+
declare const Badge: ({ tone, className, ...props }: BadgeProps) => import("react").JSX.Element;
|
|
7
|
+
export { Badge, BadgeProps };
|
|
8
|
+
//# sourceMappingURL=Badge.d.cts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BadgeTone } from "./badge-classes.mjs";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
|
+
type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
4
|
+
tone?: BadgeTone;
|
|
5
|
+
};
|
|
6
|
+
declare const Badge: ({ tone, className, ...props }: BadgeProps) => import("react").JSX.Element;
|
|
7
|
+
export { Badge, BadgeProps };
|
|
8
|
+
//# sourceMappingURL=Badge.d.mts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { badgeClasses } from "./badge-classes.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/Badge/Badge.tsx
|
|
4
|
+
const Badge = ({ tone, className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
5
|
+
className: badgeClasses({
|
|
6
|
+
tone,
|
|
7
|
+
className
|
|
8
|
+
}),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
export { Badge };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=Badge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.mjs","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\nimport { badgeClasses, type BadgeTone } from \"./badge-classes\";\n\nexport type BadgeProps = HTMLAttributes<HTMLSpanElement> & {\n tone?: BadgeTone;\n};\n\nexport const Badge = ({ tone, className, ...props }: BadgeProps) => (\n <span className={badgeClasses({ tone, className })} {...props} />\n);\n"],"mappings":";;;AAOA,MAAa,SAAS,EAAE,MAAM,WAAW,GAAG,YAC1C,oBAAC,QAAD;CAAM,WAAW,aAAa;EAAE;EAAM;CAAU,CAAC;CAAG,GAAI;AAAQ,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const require_cn = require("../../lib/cn.cjs");
|
|
2
|
+
// src/components/Badge/badge-classes.ts
|
|
3
|
+
const base = "inline-flex items-center gap-1 px-2 py-1 font-mono text-[0.65rem] uppercase tracking-[0.16em]";
|
|
4
|
+
const tones = {
|
|
5
|
+
neutral: "border border-base-content/12 bg-base-100/90 text-base-content/70 backdrop-blur-sm",
|
|
6
|
+
accent: "bg-accent text-accent-content",
|
|
7
|
+
muted: "text-base-content/60"
|
|
8
|
+
};
|
|
9
|
+
const badgeClasses = ({ tone = "neutral", className } = {}) => require_cn.cn(base, tones[tone], className);
|
|
10
|
+
exports.badgeClasses = badgeClasses;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=badge-classes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-classes.cjs","names":["cn"],"sources":["../../../src/components/Badge/badge-classes.ts"],"sourcesContent":["import { cn } from \"../../lib/cn\";\n\nexport type BadgeTone = \"neutral\" | \"accent\" | \"muted\";\n\nconst base =\n \"inline-flex items-center gap-1 px-2 py-1 font-mono text-[0.65rem] uppercase tracking-[0.16em]\";\n\nconst tones: Record<BadgeTone, string> = {\n neutral: \"border border-base-content/12 bg-base-100/90 text-base-content/70 backdrop-blur-sm\",\n accent: \"bg-accent text-accent-content\",\n muted: \"text-base-content/60\",\n};\n\nexport const badgeClasses = ({\n tone = \"neutral\",\n className,\n}: {\n tone?: BadgeTone;\n className?: string;\n} = {}): string => cn(base, tones[tone], className);\n"],"mappings":";;AAIA,MAAM,OACJ;AAEF,MAAM,QAAmC;CACvC,SAAS;CACT,QAAQ;CACR,OAAO;AACT;AAEA,MAAa,gBAAgB,EAC3B,OAAO,WACP,cAIE,CAAC,MAAcA,WAAAA,GAAG,MAAM,MAAM,OAAO,SAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.mjs";
|
|
2
|
+
// src/components/Badge/badge-classes.ts
|
|
3
|
+
const base = "inline-flex items-center gap-1 px-2 py-1 font-mono text-[0.65rem] uppercase tracking-[0.16em]";
|
|
4
|
+
const tones = {
|
|
5
|
+
neutral: "border border-base-content/12 bg-base-100/90 text-base-content/70 backdrop-blur-sm",
|
|
6
|
+
accent: "bg-accent text-accent-content",
|
|
7
|
+
muted: "text-base-content/60"
|
|
8
|
+
};
|
|
9
|
+
const badgeClasses = ({ tone = "neutral", className } = {}) => cn(base, tones[tone], className);
|
|
10
|
+
export { badgeClasses };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=badge-classes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-classes.mjs","names":[],"sources":["../../../src/components/Badge/badge-classes.ts"],"sourcesContent":["import { cn } from \"../../lib/cn\";\n\nexport type BadgeTone = \"neutral\" | \"accent\" | \"muted\";\n\nconst base =\n \"inline-flex items-center gap-1 px-2 py-1 font-mono text-[0.65rem] uppercase tracking-[0.16em]\";\n\nconst tones: Record<BadgeTone, string> = {\n neutral: \"border border-base-content/12 bg-base-100/90 text-base-content/70 backdrop-blur-sm\",\n accent: \"bg-accent text-accent-content\",\n muted: \"text-base-content/60\",\n};\n\nexport const badgeClasses = ({\n tone = \"neutral\",\n className,\n}: {\n tone?: BadgeTone;\n className?: string;\n} = {}): string => cn(base, tones[tone], className);\n"],"mappings":";;AAIA,MAAM,OACJ;AAEF,MAAM,QAAmC;CACvC,SAAS;CACT,QAAQ;CACR,OAAO;AACT;AAEA,MAAa,gBAAgB,EAC3B,OAAO,WACP,cAIE,CAAC,MAAc,GAAG,MAAM,MAAM,OAAO,SAAS"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_button_classes = require("./button-classes.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
// src/components/Button/Button.tsx
|
|
4
|
+
const Button = ({ variant, size, className, type = "button", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5
|
+
type,
|
|
6
|
+
className: require_button_classes.buttonClasses({
|
|
7
|
+
variant,
|
|
8
|
+
size,
|
|
9
|
+
className
|
|
10
|
+
}),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
exports.Button = Button;
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=Button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.cjs","names":["buttonClasses"],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from \"react\";\nimport { buttonClasses, type ButtonSize, type ButtonVariant } from \"./button-classes\";\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n variant?: ButtonVariant;\n size?: ButtonSize;\n};\n\nexport const Button = ({ variant, size, className, type = \"button\", ...props }: ButtonProps) => (\n <button type={type} className={buttonClasses({ variant, size, className })} {...props} />\n);\n"],"mappings":";;;AAQA,MAAa,UAAU,EAAE,SAAS,MAAM,WAAW,OAAO,UAAU,GAAG,YACrE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;CAAc;CAAM,WAAWA,uBAAAA,cAAc;EAAE;EAAS;EAAM;CAAU,CAAC;CAAG,GAAI;AAAQ,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ButtonSize, ButtonVariant } from "./button-classes.cjs";
|
|
2
|
+
import { ButtonHTMLAttributes } from "react";
|
|
3
|
+
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
};
|
|
7
|
+
declare const Button: ({ variant, size, className, type, ...props }: ButtonProps) => import("react").JSX.Element;
|
|
8
|
+
export { Button, ButtonProps };
|
|
9
|
+
//# sourceMappingURL=Button.d.cts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ButtonSize, ButtonVariant } from "./button-classes.mjs";
|
|
2
|
+
import { ButtonHTMLAttributes } from "react";
|
|
3
|
+
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
};
|
|
7
|
+
declare const Button: ({ variant, size, className, type, ...props }: ButtonProps) => import("react").JSX.Element;
|
|
8
|
+
export { Button, ButtonProps };
|
|
9
|
+
//# sourceMappingURL=Button.d.mts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { buttonClasses } from "./button-classes.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/Button/Button.tsx
|
|
4
|
+
const Button = ({ variant, size, className, type = "button", ...props }) => /* @__PURE__ */ jsx("button", {
|
|
5
|
+
type,
|
|
6
|
+
className: buttonClasses({
|
|
7
|
+
variant,
|
|
8
|
+
size,
|
|
9
|
+
className
|
|
10
|
+
}),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
export { Button };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=Button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.mjs","names":[],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from \"react\";\nimport { buttonClasses, type ButtonSize, type ButtonVariant } from \"./button-classes\";\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n variant?: ButtonVariant;\n size?: ButtonSize;\n};\n\nexport const Button = ({ variant, size, className, type = \"button\", ...props }: ButtonProps) => (\n <button type={type} className={buttonClasses({ variant, size, className })} {...props} />\n);\n"],"mappings":";;;AAQA,MAAa,UAAU,EAAE,SAAS,MAAM,WAAW,OAAO,UAAU,GAAG,YACrE,oBAAC,UAAD;CAAc;CAAM,WAAW,cAAc;EAAE;EAAS;EAAM;CAAU,CAAC;CAAG,GAAI;AAAQ,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_button_classes = require("./button-classes.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
// src/components/Button/ButtonLink.tsx
|
|
4
|
+
const ButtonLink = ({ variant, size, className, href, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
5
|
+
href,
|
|
6
|
+
className: require_button_classes.buttonClasses({
|
|
7
|
+
variant,
|
|
8
|
+
size,
|
|
9
|
+
className
|
|
10
|
+
}),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
exports.ButtonLink = ButtonLink;
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=ButtonLink.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonLink.cjs","names":["buttonClasses"],"sources":["../../../src/components/Button/ButtonLink.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes } from \"react\";\nimport { buttonClasses, type ButtonSize, type ButtonVariant } from \"./button-classes\";\n\nexport type ButtonLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n variant?: ButtonVariant;\n size?: ButtonSize;\n};\n\nexport const ButtonLink = ({ variant, size, className, href, ...props }: ButtonLinkProps) => (\n <a href={href} className={buttonClasses({ variant, size, className })} {...props} />\n);\n"],"mappings":";;;AASA,MAAa,cAAc,EAAE,SAAS,MAAM,WAAW,MAAM,GAAG,YAC9D,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;CAAS;CAAM,WAAWA,uBAAAA,cAAc;EAAE;EAAS;EAAM;CAAU,CAAC;CAAG,GAAI;AAAQ,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonSize, ButtonVariant } from "./button-classes.cjs";
|
|
2
|
+
import { AnchorHTMLAttributes } from "react";
|
|
3
|
+
type ButtonLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
|
+
href: string;
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
};
|
|
8
|
+
declare const ButtonLink: ({ variant, size, className, href, ...props }: ButtonLinkProps) => import("react").JSX.Element;
|
|
9
|
+
export { ButtonLink, ButtonLinkProps };
|
|
10
|
+
//# sourceMappingURL=ButtonLink.d.cts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonSize, ButtonVariant } from "./button-classes.mjs";
|
|
2
|
+
import { AnchorHTMLAttributes } from "react";
|
|
3
|
+
type ButtonLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
|
+
href: string;
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
};
|
|
8
|
+
declare const ButtonLink: ({ variant, size, className, href, ...props }: ButtonLinkProps) => import("react").JSX.Element;
|
|
9
|
+
export { ButtonLink, ButtonLinkProps };
|
|
10
|
+
//# sourceMappingURL=ButtonLink.d.mts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { buttonClasses } from "./button-classes.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/Button/ButtonLink.tsx
|
|
4
|
+
const ButtonLink = ({ variant, size, className, href, ...props }) => /* @__PURE__ */ jsx("a", {
|
|
5
|
+
href,
|
|
6
|
+
className: buttonClasses({
|
|
7
|
+
variant,
|
|
8
|
+
size,
|
|
9
|
+
className
|
|
10
|
+
}),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
export { ButtonLink };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=ButtonLink.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonLink.mjs","names":[],"sources":["../../../src/components/Button/ButtonLink.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes } from \"react\";\nimport { buttonClasses, type ButtonSize, type ButtonVariant } from \"./button-classes\";\n\nexport type ButtonLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n variant?: ButtonVariant;\n size?: ButtonSize;\n};\n\nexport const ButtonLink = ({ variant, size, className, href, ...props }: ButtonLinkProps) => (\n <a href={href} className={buttonClasses({ variant, size, className })} {...props} />\n);\n"],"mappings":";;;AASA,MAAa,cAAc,EAAE,SAAS,MAAM,WAAW,MAAM,GAAG,YAC9D,oBAAC,KAAD;CAAS;CAAM,WAAW,cAAc;EAAE;EAAS;EAAM;CAAU,CAAC;CAAG,GAAI;AAAQ,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_cn = require("../../lib/cn.cjs");
|
|
2
|
+
// src/components/Button/button-classes.ts
|
|
3
|
+
const base = "inline-flex items-center justify-center gap-2 font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50";
|
|
4
|
+
const variants = {
|
|
5
|
+
primary: "bg-primary text-primary-content hover:bg-accent hover:text-accent-content",
|
|
6
|
+
ghost: "border border-base-content/12 bg-transparent text-base-content hover:bg-base-content/5",
|
|
7
|
+
link: "text-base-content underline-offset-4 hover:underline"
|
|
8
|
+
};
|
|
9
|
+
const sizes = {
|
|
10
|
+
sm: "px-4 py-2 text-sm",
|
|
11
|
+
md: "px-6 py-3.5 text-sm"
|
|
12
|
+
};
|
|
13
|
+
const buttonClasses = ({ variant = "primary", size = "md", className } = {}) => require_cn.cn(base, variants[variant], sizes[size], className);
|
|
14
|
+
exports.buttonClasses = buttonClasses;
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=button-classes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-classes.cjs","names":["cn"],"sources":["../../../src/components/Button/button-classes.ts"],"sourcesContent":["import { cn } from \"../../lib/cn\";\n\nexport type ButtonVariant = \"primary\" | \"ghost\" | \"link\";\nexport type ButtonSize = \"sm\" | \"md\";\n\nconst base =\n \"inline-flex items-center justify-center gap-2 font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50\";\n\nconst variants: Record<ButtonVariant, string> = {\n primary: \"bg-primary text-primary-content hover:bg-accent hover:text-accent-content\",\n ghost: \"border border-base-content/12 bg-transparent text-base-content hover:bg-base-content/5\",\n link: \"text-base-content underline-offset-4 hover:underline\",\n};\n\nconst sizes: Record<ButtonSize, string> = {\n sm: \"px-4 py-2 text-sm\",\n md: \"px-6 py-3.5 text-sm\",\n};\n\nexport const buttonClasses = ({\n variant = \"primary\",\n size = \"md\",\n className,\n}: {\n variant?: ButtonVariant;\n size?: ButtonSize;\n className?: string;\n} = {}): string => cn(base, variants[variant], sizes[size], className);\n"],"mappings":";;AAKA,MAAM,OACJ;AAEF,MAAM,WAA0C;CAC9C,SAAS;CACT,OAAO;CACP,MAAM;AACR;AAEA,MAAM,QAAoC;CACxC,IAAI;CACJ,IAAI;AACN;AAEA,MAAa,iBAAiB,EAC5B,UAAU,WACV,OAAO,MACP,cAKE,CAAC,MAAcA,WAAAA,GAAG,MAAM,SAAS,UAAU,MAAM,OAAO,SAAS"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ButtonVariant = "primary" | "ghost" | "link";
|
|
2
|
+
type ButtonSize = "sm" | "md";
|
|
3
|
+
declare const buttonClasses: ({ variant, size, className }?: {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
}) => string;
|
|
8
|
+
export { ButtonSize, ButtonVariant, buttonClasses };
|
|
9
|
+
//# sourceMappingURL=button-classes.d.cts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ButtonVariant = "primary" | "ghost" | "link";
|
|
2
|
+
type ButtonSize = "sm" | "md";
|
|
3
|
+
declare const buttonClasses: ({ variant, size, className }?: {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
}) => string;
|
|
8
|
+
export { ButtonSize, ButtonVariant, buttonClasses };
|
|
9
|
+
//# sourceMappingURL=button-classes.d.mts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.mjs";
|
|
2
|
+
// src/components/Button/button-classes.ts
|
|
3
|
+
const base = "inline-flex items-center justify-center gap-2 font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50";
|
|
4
|
+
const variants = {
|
|
5
|
+
primary: "bg-primary text-primary-content hover:bg-accent hover:text-accent-content",
|
|
6
|
+
ghost: "border border-base-content/12 bg-transparent text-base-content hover:bg-base-content/5",
|
|
7
|
+
link: "text-base-content underline-offset-4 hover:underline"
|
|
8
|
+
};
|
|
9
|
+
const sizes = {
|
|
10
|
+
sm: "px-4 py-2 text-sm",
|
|
11
|
+
md: "px-6 py-3.5 text-sm"
|
|
12
|
+
};
|
|
13
|
+
const buttonClasses = ({ variant = "primary", size = "md", className } = {}) => cn(base, variants[variant], sizes[size], className);
|
|
14
|
+
export { buttonClasses };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=button-classes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-classes.mjs","names":[],"sources":["../../../src/components/Button/button-classes.ts"],"sourcesContent":["import { cn } from \"../../lib/cn\";\n\nexport type ButtonVariant = \"primary\" | \"ghost\" | \"link\";\nexport type ButtonSize = \"sm\" | \"md\";\n\nconst base =\n \"inline-flex items-center justify-center gap-2 font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50\";\n\nconst variants: Record<ButtonVariant, string> = {\n primary: \"bg-primary text-primary-content hover:bg-accent hover:text-accent-content\",\n ghost: \"border border-base-content/12 bg-transparent text-base-content hover:bg-base-content/5\",\n link: \"text-base-content underline-offset-4 hover:underline\",\n};\n\nconst sizes: Record<ButtonSize, string> = {\n sm: \"px-4 py-2 text-sm\",\n md: \"px-6 py-3.5 text-sm\",\n};\n\nexport const buttonClasses = ({\n variant = \"primary\",\n size = \"md\",\n className,\n}: {\n variant?: ButtonVariant;\n size?: ButtonSize;\n className?: string;\n} = {}): string => cn(base, variants[variant], sizes[size], className);\n"],"mappings":";;AAKA,MAAM,OACJ;AAEF,MAAM,WAA0C;CAC9C,SAAS;CACT,OAAO;CACP,MAAM;AACR;AAEA,MAAM,QAAoC;CACxC,IAAI;CACJ,IAAI;AACN;AAEA,MAAa,iBAAiB,EAC5B,UAAU,WACV,OAAO,MACP,cAKE,CAAC,MAAc,GAAG,MAAM,SAAS,UAAU,MAAM,OAAO,SAAS"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const require_button_classes = require("./button-classes.cjs");
|
|
2
|
+
const require_Button = require("./Button.cjs");
|
|
3
|
+
const require_ButtonLink = require("./ButtonLink.cjs");
|
|
4
|
+
exports.Button = require_Button.Button;
|
|
5
|
+
exports.ButtonLink = require_ButtonLink.ButtonLink;
|
|
6
|
+
exports.buttonClasses = require_button_classes.buttonClasses;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonSize, ButtonVariant, buttonClasses } from "./button-classes.cjs";
|
|
2
|
+
import { Button, ButtonProps } from "./Button.cjs";
|
|
3
|
+
import { ButtonLink, ButtonLinkProps } from "./ButtonLink.cjs";
|
|
4
|
+
export { Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, buttonClasses };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonSize, ButtonVariant, buttonClasses } from "./button-classes.mjs";
|
|
2
|
+
import { Button, ButtonProps } from "./Button.mjs";
|
|
3
|
+
import { ButtonLink, ButtonLinkProps } from "./ButtonLink.mjs";
|
|
4
|
+
export { Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, buttonClasses };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_cn = require("../../lib/cn.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
// src/components/Eyebrow/Eyebrow.tsx
|
|
4
|
+
const Eyebrow = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5
|
+
className: require_cn.cn("font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60", className),
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
exports.Eyebrow = Eyebrow;
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=Eyebrow.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Eyebrow.cjs","names":["cn"],"sources":["../../../src/components/Eyebrow/Eyebrow.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport type EyebrowProps = HTMLAttributes<HTMLParagraphElement>;\n\nexport const Eyebrow = ({ className, ...props }: EyebrowProps) => (\n <p\n className={cn(\n \"font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60\",\n className,\n )}\n {...props}\n />\n);\n"],"mappings":";;;AAKA,MAAa,WAAW,EAAE,WAAW,GAAG,YACtC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;CACE,WAAWA,WAAAA,GACT,6EACA,SACF;CACA,GAAI;AACL,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
type EyebrowProps = HTMLAttributes<HTMLParagraphElement>;
|
|
3
|
+
declare const Eyebrow: ({ className, ...props }: EyebrowProps) => import("react").JSX.Element;
|
|
4
|
+
export { Eyebrow, EyebrowProps };
|
|
5
|
+
//# sourceMappingURL=Eyebrow.d.cts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
type EyebrowProps = HTMLAttributes<HTMLParagraphElement>;
|
|
3
|
+
declare const Eyebrow: ({ className, ...props }: EyebrowProps) => import("react").JSX.Element;
|
|
4
|
+
export { Eyebrow, EyebrowProps };
|
|
5
|
+
//# sourceMappingURL=Eyebrow.d.mts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cn } from "../../lib/cn.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/Eyebrow/Eyebrow.tsx
|
|
4
|
+
const Eyebrow = ({ className, ...props }) => /* @__PURE__ */ jsx("p", {
|
|
5
|
+
className: cn("font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60", className),
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
export { Eyebrow };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=Eyebrow.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Eyebrow.mjs","names":[],"sources":["../../../src/components/Eyebrow/Eyebrow.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport type EyebrowProps = HTMLAttributes<HTMLParagraphElement>;\n\nexport const Eyebrow = ({ className, ...props }: EyebrowProps) => (\n <p\n className={cn(\n \"font-mono text-[0.65rem] uppercase tracking-[0.18em] text-base-content/60\",\n className,\n )}\n {...props}\n />\n);\n"],"mappings":";;;AAKA,MAAa,WAAW,EAAE,WAAW,GAAG,YACtC,oBAAC,KAAD;CACE,WAAW,GACT,6EACA,SACF;CACA,GAAI;AACL,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Eyebrow } from "./Eyebrow.mjs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const require_icon_button_classes = require("./icon-button-classes.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
// src/components/IconButton/IconButton.tsx
|
|
4
|
+
const IconButton = ({ label, variant, size, className, type = "button", children, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5
|
+
type,
|
|
6
|
+
"aria-label": label,
|
|
7
|
+
className: require_icon_button_classes.iconButtonClasses({
|
|
8
|
+
variant,
|
|
9
|
+
size,
|
|
10
|
+
className
|
|
11
|
+
}),
|
|
12
|
+
...props,
|
|
13
|
+
children
|
|
14
|
+
});
|
|
15
|
+
exports.IconButton = IconButton;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=IconButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.cjs","names":["iconButtonClasses"],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode } from \"react\";\nimport {\n iconButtonClasses,\n type IconButtonSize,\n type IconButtonVariant,\n} from \"./icon-button-classes\";\n\nexport type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"aria-label\"> & {\n label: string;\n variant?: IconButtonVariant;\n size?: IconButtonSize;\n children: ReactNode;\n};\n\nexport const IconButton = ({\n label,\n variant,\n size,\n className,\n type = \"button\",\n children,\n ...props\n}: IconButtonProps) => (\n <button\n type={type}\n aria-label={label}\n className={iconButtonClasses({ variant, size, className })}\n {...props}\n >\n {children}\n </button>\n);\n"],"mappings":";;;AAcA,MAAa,cAAc,EACzB,OACA,SACA,MACA,WACA,OAAO,UACP,UACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;CACQ;CACN,cAAY;CACZ,WAAWA,4BAAAA,kBAAkB;EAAE;EAAS;EAAM;CAAU,CAAC;CACzD,GAAI;CAEH;AACK,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconButtonSize, IconButtonVariant } from "./icon-button-classes.cjs";
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
3
|
+
type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & {
|
|
4
|
+
label: string;
|
|
5
|
+
variant?: IconButtonVariant;
|
|
6
|
+
size?: IconButtonSize;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const IconButton: ({ label, variant, size, className, type, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
10
|
+
export { IconButton, IconButtonProps };
|
|
11
|
+
//# sourceMappingURL=IconButton.d.cts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconButtonSize, IconButtonVariant } from "./icon-button-classes.mjs";
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
3
|
+
type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & {
|
|
4
|
+
label: string;
|
|
5
|
+
variant?: IconButtonVariant;
|
|
6
|
+
size?: IconButtonSize;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const IconButton: ({ label, variant, size, className, type, children, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
10
|
+
export { IconButton, IconButtonProps };
|
|
11
|
+
//# sourceMappingURL=IconButton.d.mts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { iconButtonClasses } from "./icon-button-classes.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/IconButton/IconButton.tsx
|
|
4
|
+
const IconButton = ({ label, variant, size, className, type = "button", children, ...props }) => /* @__PURE__ */ jsx("button", {
|
|
5
|
+
type,
|
|
6
|
+
"aria-label": label,
|
|
7
|
+
className: iconButtonClasses({
|
|
8
|
+
variant,
|
|
9
|
+
size,
|
|
10
|
+
className
|
|
11
|
+
}),
|
|
12
|
+
...props,
|
|
13
|
+
children
|
|
14
|
+
});
|
|
15
|
+
export { IconButton };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=IconButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.mjs","names":[],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode } from \"react\";\nimport {\n iconButtonClasses,\n type IconButtonSize,\n type IconButtonVariant,\n} from \"./icon-button-classes\";\n\nexport type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"aria-label\"> & {\n label: string;\n variant?: IconButtonVariant;\n size?: IconButtonSize;\n children: ReactNode;\n};\n\nexport const IconButton = ({\n label,\n variant,\n size,\n className,\n type = \"button\",\n children,\n ...props\n}: IconButtonProps) => (\n <button\n type={type}\n aria-label={label}\n className={iconButtonClasses({ variant, size, className })}\n {...props}\n >\n {children}\n </button>\n);\n"],"mappings":";;;AAcA,MAAa,cAAc,EACzB,OACA,SACA,MACA,WACA,OAAO,UACP,UACA,GAAG,YAEH,oBAAC,UAAD;CACQ;CACN,cAAY;CACZ,WAAW,kBAAkB;EAAE;EAAS;EAAM;CAAU,CAAC;CACzD,GAAI;CAEH;AACK,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_cn = require("../../lib/cn.cjs");
|
|
2
|
+
// src/components/IconButton/icon-button-classes.ts
|
|
3
|
+
const base = "inline-flex items-center justify-center border transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50";
|
|
4
|
+
const variants = {
|
|
5
|
+
outline: "border-base-content/12 bg-base-100/85 text-base-content/60 backdrop-blur-md hover:text-base-content",
|
|
6
|
+
ghost: "border-transparent bg-transparent text-base-content/60 hover:bg-base-content/5 hover:text-base-content"
|
|
7
|
+
};
|
|
8
|
+
const sizes = {
|
|
9
|
+
xs: "size-6",
|
|
10
|
+
sm: "size-8",
|
|
11
|
+
md: "size-10"
|
|
12
|
+
};
|
|
13
|
+
const iconButtonClasses = ({ variant = "outline", size = "sm", className } = {}) => require_cn.cn(base, variants[variant], sizes[size], className);
|
|
14
|
+
exports.iconButtonClasses = iconButtonClasses;
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=icon-button-classes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button-classes.cjs","names":["cn"],"sources":["../../../src/components/IconButton/icon-button-classes.ts"],"sourcesContent":["import { cn } from \"../../lib/cn\";\n\nexport type IconButtonVariant = \"outline\" | \"ghost\";\nexport type IconButtonSize = \"xs\" | \"sm\" | \"md\";\n\nconst base =\n \"inline-flex items-center justify-center border transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50\";\n\nconst variants: Record<IconButtonVariant, string> = {\n outline:\n \"border-base-content/12 bg-base-100/85 text-base-content/60 backdrop-blur-md hover:text-base-content\",\n ghost:\n \"border-transparent bg-transparent text-base-content/60 hover:bg-base-content/5 hover:text-base-content\",\n};\n\nconst sizes: Record<IconButtonSize, string> = {\n xs: \"size-6\",\n sm: \"size-8\",\n md: \"size-10\",\n};\n\nexport const iconButtonClasses = ({\n variant = \"outline\",\n size = \"sm\",\n className,\n}: {\n variant?: IconButtonVariant;\n size?: IconButtonSize;\n className?: string;\n} = {}): string => cn(base, variants[variant], sizes[size], className);\n"],"mappings":";;AAKA,MAAM,OACJ;AAEF,MAAM,WAA8C;CAClD,SACE;CACF,OACE;AACJ;AAEA,MAAM,QAAwC;CAC5C,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,MAAa,qBAAqB,EAChC,UAAU,WACV,OAAO,MACP,cAKE,CAAC,MAAcA,WAAAA,GAAG,MAAM,SAAS,UAAU,MAAM,OAAO,SAAS"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type IconButtonVariant = "outline" | "ghost";
|
|
2
|
+
type IconButtonSize = "xs" | "sm" | "md";
|
|
3
|
+
declare const iconButtonClasses: ({ variant, size, className }?: {
|
|
4
|
+
variant?: IconButtonVariant;
|
|
5
|
+
size?: IconButtonSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
}) => string;
|
|
8
|
+
export { IconButtonSize, IconButtonVariant, iconButtonClasses };
|
|
9
|
+
//# sourceMappingURL=icon-button-classes.d.cts.map
|