@code-sherpas/pharos-react 0.19.0 → 0.20.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/dist/components/Avatar.js +138 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Avatar.module.js +15 -0
- package/dist/components/Avatar.module.js.map +1 -0
- package/dist/components/Badge.js +30 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Badge.module.js +14 -0
- package/dist/components/Badge.module.js.map +1 -0
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +49 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Button.module.js +14 -0
- package/dist/components/Button.module.js.map +1 -0
- package/dist/components/Card.js +66 -0
- package/dist/components/Card.js.map +1 -0
- package/dist/components/Card.module.js +15 -0
- package/dist/components/Card.module.js.map +1 -0
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +47 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/Checkbox.module.js +11 -0
- package/dist/components/Checkbox.module.js.map +1 -0
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +212 -0
- package/dist/components/Combobox.js.map +1 -0
- package/dist/components/Combobox.module.js +25 -0
- package/dist/components/Combobox.module.js.map +1 -0
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog.js +66 -0
- package/dist/components/Dialog.js.map +1 -0
- package/dist/components/Dialog.module.js +12 -0
- package/dist/components/Dialog.module.js.map +1 -0
- package/dist/components/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu.js +64 -0
- package/dist/components/DropdownMenu.js.map +1 -0
- package/dist/components/DropdownMenu.module.js +12 -0
- package/dist/components/DropdownMenu.module.js.map +1 -0
- package/dist/components/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton.js +53 -0
- package/dist/components/IconButton.js.map +1 -0
- package/dist/components/IconButton.module.js +14 -0
- package/dist/components/IconButton.module.js.map +1 -0
- package/dist/components/Input.js +28 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/Input.module.js +10 -0
- package/dist/components/Input.module.js.map +1 -0
- package/dist/components/Popover.d.ts.map +1 -1
- package/dist/components/Popover.js +57 -0
- package/dist/components/Popover.js.map +1 -0
- package/dist/components/Popover.module.js +10 -0
- package/dist/components/Popover.module.js.map +1 -0
- package/dist/components/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup.js +28 -0
- package/dist/components/RadioGroup.js.map +1 -0
- package/dist/components/RadioGroup.module.js +9 -0
- package/dist/components/RadioGroup.module.js.map +1 -0
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +130 -0
- package/dist/components/Select.js.map +1 -0
- package/dist/components/Select.module.js +19 -0
- package/dist/components/Select.module.js.map +1 -0
- package/dist/components/Separator.js +18 -0
- package/dist/components/Separator.js.map +1 -0
- package/dist/components/Separator.module.js +9 -0
- package/dist/components/Separator.module.js.map +1 -0
- package/dist/components/Sheet.d.ts.map +1 -1
- package/dist/components/Sheet.js +77 -0
- package/dist/components/Sheet.js.map +1 -0
- package/dist/components/Sheet.module.js +16 -0
- package/dist/components/Sheet.module.js.map +1 -0
- package/dist/components/Spinner.js +51 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/Spinner.module.js +13 -0
- package/dist/components/Spinner.module.js.map +1 -0
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +19 -0
- package/dist/components/Switch.js.map +1 -0
- package/dist/components/Switch.module.js +8 -0
- package/dist/components/Switch.module.js.map +1 -0
- package/dist/components/Textarea.js +27 -0
- package/dist/components/Textarea.js.map +1 -0
- package/dist/components/Textarea.module.js +10 -0
- package/dist/components/Textarea.module.js.map +1 -0
- package/dist/index.js +20 -1218
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +76 -3
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/cn.js";
|
|
3
|
+
import t from "./Avatar.module.js";
|
|
4
|
+
import { useRender as n } from "@base-ui/react/use-render";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { createContext as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useState as u } from "react";
|
|
7
|
+
//#region src/components/Avatar.tsx
|
|
8
|
+
var d = a(null), f = a(null), p = a(null), m = {
|
|
9
|
+
sm: t.sizeSm,
|
|
10
|
+
md: t.sizeMd,
|
|
11
|
+
lg: t.sizeLg
|
|
12
|
+
}, h = {
|
|
13
|
+
circle: t.shapeCircle,
|
|
14
|
+
square: t.shapeSquare
|
|
15
|
+
};
|
|
16
|
+
function g(e) {
|
|
17
|
+
if (typeof e == "number") return {
|
|
18
|
+
width: e,
|
|
19
|
+
height: e,
|
|
20
|
+
fontSize: `${Math.round(e * .4)}px`
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function _(e) {
|
|
24
|
+
if (typeof e != "number") return m[e];
|
|
25
|
+
}
|
|
26
|
+
function v({ size: i, shape: a, className: o, style: c, render: m, ref: v, children: y, ...b }) {
|
|
27
|
+
let x = s(p), S = i ?? x?.size ?? "md", C = a ?? x?.shape ?? "circle", [w, T] = u("idle"), E = l(() => ({
|
|
28
|
+
size: S,
|
|
29
|
+
shape: C
|
|
30
|
+
}), [S, C]), D = l(() => ({
|
|
31
|
+
status: w,
|
|
32
|
+
setStatus: T
|
|
33
|
+
}), [w]), O = _(S), k = g(S), A = typeof S == "number" ? String(S) : S;
|
|
34
|
+
return /* @__PURE__ */ r(d.Provider, {
|
|
35
|
+
value: E,
|
|
36
|
+
children: /* @__PURE__ */ r(f.Provider, {
|
|
37
|
+
value: D,
|
|
38
|
+
children: n({
|
|
39
|
+
render: m ?? /* @__PURE__ */ r("span", {}),
|
|
40
|
+
ref: v,
|
|
41
|
+
defaultTagName: "span",
|
|
42
|
+
props: {
|
|
43
|
+
"data-pharos-size": A,
|
|
44
|
+
"data-pharos-shape": C,
|
|
45
|
+
"data-pharos-loading": w,
|
|
46
|
+
className: e(t.root, O, h[C], o),
|
|
47
|
+
style: k ? {
|
|
48
|
+
...k,
|
|
49
|
+
...c
|
|
50
|
+
} : c,
|
|
51
|
+
...b,
|
|
52
|
+
children: y
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
v.displayName = "Avatar";
|
|
59
|
+
function y({ className: n, src: i, onLoad: a, onError: l, onLoadingStatusChange: u, ref: d, ...p }) {
|
|
60
|
+
let m = s(f), h = typeof i == "string" && i.length > 0;
|
|
61
|
+
c(() => {
|
|
62
|
+
m && (m.setStatus(h ? "loading" : "idle"), u?.(h ? "loading" : "idle"));
|
|
63
|
+
}, [i]);
|
|
64
|
+
let g = o((e) => {
|
|
65
|
+
m?.setStatus("loaded"), u?.("loaded"), a?.(e);
|
|
66
|
+
}, [
|
|
67
|
+
m,
|
|
68
|
+
a,
|
|
69
|
+
u
|
|
70
|
+
]), _ = o((e) => {
|
|
71
|
+
m?.setStatus("error"), u?.("error"), l?.(e);
|
|
72
|
+
}, [
|
|
73
|
+
m,
|
|
74
|
+
l,
|
|
75
|
+
u
|
|
76
|
+
]);
|
|
77
|
+
return !h || m && m.status === "error" ? null : /* @__PURE__ */ r("img", {
|
|
78
|
+
ref: d,
|
|
79
|
+
src: i,
|
|
80
|
+
onLoad: g,
|
|
81
|
+
onError: _,
|
|
82
|
+
"data-pharos-loading": m?.status,
|
|
83
|
+
className: e(t.image, n),
|
|
84
|
+
...p
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
y.displayName = "AvatarImage";
|
|
88
|
+
function b({ className: n, delayMs: i = 0, children: a, ref: o, ...l }) {
|
|
89
|
+
let d = s(f), [p, m] = u(i === 0);
|
|
90
|
+
return c(() => {
|
|
91
|
+
if (i === 0) {
|
|
92
|
+
m(!0);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
let e = window.setTimeout(() => m(!0), i);
|
|
96
|
+
return () => window.clearTimeout(e);
|
|
97
|
+
}, [i]), d && d.status === "loaded" || !p ? null : /* @__PURE__ */ r("span", {
|
|
98
|
+
ref: o,
|
|
99
|
+
"data-pharos-slot": "avatar-fallback",
|
|
100
|
+
"data-pharos-loading": d?.status,
|
|
101
|
+
className: e(t.fallback, n),
|
|
102
|
+
...l,
|
|
103
|
+
children: a
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
b.displayName = "AvatarFallback";
|
|
107
|
+
function x({ size: n, shape: a, max: o, renderOverflow: s, className: c, children: u, ref: d, ...f }) {
|
|
108
|
+
let m = n ?? "md", h = a ?? "circle", g = l(() => {
|
|
109
|
+
let e = [], t = 0, n = [], r = (e) => {
|
|
110
|
+
n.push(e), t += 1;
|
|
111
|
+
};
|
|
112
|
+
return Array.isArray(u) ? u.forEach((e) => r(e)) : u && r(u), n.concat(e).slice(0, t);
|
|
113
|
+
}, [u]), _ = typeof o == "number" && g.length > o ? g.slice(0, Math.max(o - 1, 0)) : g, y = typeof o == "number" && g.length > o ? g.length - _.length : 0, x = l(() => ({
|
|
114
|
+
size: m,
|
|
115
|
+
shape: h
|
|
116
|
+
}), [m, h]);
|
|
117
|
+
return /* @__PURE__ */ r(p.Provider, {
|
|
118
|
+
value: x,
|
|
119
|
+
children: /* @__PURE__ */ i("div", {
|
|
120
|
+
ref: d,
|
|
121
|
+
"data-pharos-slot": "avatar-group",
|
|
122
|
+
"data-pharos-size": typeof m == "number" ? String(m) : m,
|
|
123
|
+
"data-pharos-shape": h,
|
|
124
|
+
className: e(t.group, c),
|
|
125
|
+
...f,
|
|
126
|
+
children: [_, y > 0 ? /* @__PURE__ */ r(v, {
|
|
127
|
+
"aria-label": `${y} more`,
|
|
128
|
+
"data-pharos-slot": "avatar-group-overflow",
|
|
129
|
+
children: /* @__PURE__ */ r(b, { children: s ? s(y) : `+${y}` })
|
|
130
|
+
}) : null]
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
x.displayName = "AvatarGroup";
|
|
135
|
+
//#endregion
|
|
136
|
+
export { v as Avatar, b as AvatarFallback, x as AvatarGroup, y as AvatarImage };
|
|
137
|
+
|
|
138
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","names":[],"sources":["../../src/components/Avatar.tsx"],"sourcesContent":["'use client';\n\n/* The `'use client'` directive at the top of this file is load-bearing.\n * Avatar runs `createContext(...)` three times at module top level (shape /\n * loading / group). Without the directive, Next.js evaluates the module in\n * its build-time RSC analysis pass, where React is wired in a way that\n * makes `createContext` blow up with\n * `TypeError: (0 , c.createContext) is not a function` during page-data\n * collection. The directive marks the module as client-only in the\n * published bundle (esbuild / Vite preserve the banner verbatim) and the\n * RSC analysis stops at the import boundary.\n *\n * The other Pharos atoms (Button / Spinner / etc.) do not need this\n * because their hook calls happen inside the component body, not at module\n * scope — module evaluation is side-effect free for them.\n */\n\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n type ReactNode,\n type Ref,\n} from 'react';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../lib/cn';\nimport styles from './Avatar.module.css';\n\n/**\n * Compound atom (Decision D14). The state-of-the-art convention across\n * shadcn / Radix / Base UI / Chakra is to expose `Avatar`,\n * `AvatarImage`, and `AvatarFallback` as discrete parts so the consumer\n * composes the fallback content (initials, icon, default image)\n * directly — same Escuela 1 composition principle Pharos applies for\n * Input / Textarea (D11).\n *\n * Two contexts coordinate the parts:\n *\n * - `AvatarShapeContext` carries the resolved `size` / `shape` for\n * nested `> svg` sizing and AvatarGroup cascade.\n * - `AvatarLoadingContext` carries the image load status so\n * `AvatarFallback` only renders when the image is missing or has\n * failed — the same render-gate pattern Radix Primitives document.\n *\n * The group reads `AvatarGroupContext` to cascade `size` / `shape` to\n * every Avatar child and to inject the overflow \"+N\" badge when the\n * children exceed `max`.\n */\n\ntype AvatarSize = 'sm' | 'md' | 'lg' | number;\ntype AvatarShape = 'circle' | 'square';\n\ninterface AvatarShapeContextValue {\n size: AvatarSize;\n shape: AvatarShape;\n}\n\nconst AvatarShapeContext = createContext<AvatarShapeContextValue | null>(null);\n\ntype AvatarLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';\n\ninterface AvatarLoadingContextValue {\n status: AvatarLoadingStatus;\n setStatus: (next: AvatarLoadingStatus) => void;\n}\n\nconst AvatarLoadingContext = createContext<AvatarLoadingContextValue | null>(null);\n\ninterface AvatarGroupContextValue {\n size: AvatarSize;\n shape: AvatarShape;\n}\n\nconst AvatarGroupContext = createContext<AvatarGroupContextValue | null>(null);\n\nconst SIZE_CLASSNAME: Record<Exclude<AvatarSize, number>, string> = {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n};\n\nconst SHAPE_CLASSNAME: Record<AvatarShape, string> = {\n circle: styles.shapeCircle,\n square: styles.shapeSquare,\n};\n\nfunction resolveSizeStyle(size: AvatarSize): CSSProperties | undefined {\n if (typeof size !== 'number') return undefined;\n // Numeric escape: consumer-supplied one-off dimension. Font-size\n // follows the 0.4 ratio the named sizes (12/14/16 at 32/40/48) imply\n // so an initials fallback still reads correctly inside a non-grid\n // avatar.\n return {\n width: size,\n height: size,\n fontSize: `${Math.round(size * 0.4)}px`,\n };\n}\n\nfunction resolveSizeClassName(size: AvatarSize): string | undefined {\n if (typeof size === 'number') return undefined;\n return SIZE_CLASSNAME[size];\n}\n\n// ---------------------------------------------------------------------------\n// Avatar (Root)\n// ---------------------------------------------------------------------------\n\nexport interface AvatarProps extends Omit<useRender.ComponentProps<'span'>, 'children'> {\n /**\n * Avatar dimensions. Named sizes (`sm` / `md` / `lg` = 32 / 40 / 48 px)\n * align with the IconButton / Button height grid. A numeric value\n * sets one-off `width` / `height` / `font-size` inline — use it for\n * profile-picture sized images (e.g. 108 px) or compact stacks\n * (20 px) outside the canonical grid.\n *\n * @default 'md'\n */\n size?: AvatarSize;\n /**\n * Border-radius family. `circle` (default) clips the avatar to a\n * perfect circle via `border-radius: full`; `square` uses the\n * `radius-md` token so an org or product avatar harmonises with the\n * Card corner family on the same surface.\n *\n * @default 'circle'\n */\n shape?: AvatarShape;\n /**\n * The Image and Fallback parts, plus any content the consumer wishes\n * to layer (status badge, ring overlay, etc.). The atom does not\n * inject a default `<AvatarFallback>` — composition is explicit so\n * the consumer is in control of the fallback content (initials,\n * icon, default PNG).\n */\n children?: ReactNode;\n}\n\nexport function Avatar({\n size,\n shape,\n className,\n style,\n render,\n ref,\n children,\n ...rest\n}: AvatarProps) {\n const group = useContext(AvatarGroupContext);\n const resolvedSize: AvatarSize = size ?? group?.size ?? 'md';\n const resolvedShape: AvatarShape = shape ?? group?.shape ?? 'circle';\n\n const [status, setStatus] = useState<AvatarLoadingStatus>('idle');\n\n const shapeCtx = useMemo<AvatarShapeContextValue>(\n () => ({ size: resolvedSize, shape: resolvedShape }),\n [resolvedSize, resolvedShape],\n );\n const loadingCtx = useMemo<AvatarLoadingContextValue>(() => ({ status, setStatus }), [status]);\n\n // Numeric vs named: the named path applies a size class that owns\n // width / height / font-size / --pharos-avatar-overlap; the numeric\n // path skips the class and writes width / height / font-size inline.\n // The shape class always applies — same border-radius regardless of\n // sizing path.\n const sizeClassName = resolveSizeClassName(resolvedSize);\n const sizeStyle = resolveSizeStyle(resolvedSize);\n\n const resolvedSizeAttr = typeof resolvedSize === 'number' ? String(resolvedSize) : resolvedSize;\n\n return (\n <AvatarShapeContext.Provider value={shapeCtx}>\n <AvatarLoadingContext.Provider value={loadingCtx}>\n {useRender({\n render: render ?? <span />,\n ref,\n defaultTagName: 'span',\n props: {\n 'data-pharos-size': resolvedSizeAttr,\n 'data-pharos-shape': resolvedShape,\n 'data-pharos-loading': status,\n className: cn(styles.root, sizeClassName, SHAPE_CLASSNAME[resolvedShape], className),\n style: sizeStyle ? { ...sizeStyle, ...style } : style,\n ...rest,\n children,\n },\n })}\n </AvatarLoadingContext.Provider>\n </AvatarShapeContext.Provider>\n );\n}\n\nAvatar.displayName = 'Avatar';\n\n// ---------------------------------------------------------------------------\n// AvatarImage\n// ---------------------------------------------------------------------------\n\nexport interface AvatarImageProps extends ComponentPropsWithoutRef<'img'> {\n /**\n * Optional callback invoked when the image transitions between load\n * states. Mirrors Radix / Base UI's `onLoadingStatusChange` so an\n * external consumer can react to the cascade (e.g. emit telemetry\n * when a CDN avatar fails).\n */\n onLoadingStatusChange?: (status: AvatarLoadingStatus) => void;\n ref?: Ref<HTMLImageElement>;\n}\n\nexport function AvatarImage({\n className,\n src,\n onLoad,\n onError,\n onLoadingStatusChange,\n ref,\n ...rest\n}: AvatarImageProps) {\n const loading = useContext(AvatarLoadingContext);\n\n // When no `src` lands, the image stays hidden and the Fallback\n // renders. Same contract Radix and Base UI document. Without this\n // guard the browser would request the current URL relatively\n // (interpreting `undefined` as empty string), polluting the network\n // tab with a useless 404.\n const hasSrc = typeof src === 'string' && src.length > 0;\n\n useEffect(() => {\n if (!loading) return;\n // Whenever `src` changes we re-enter the loading phase. The browser\n // re-fires `onLoad` / `onError` for the new URL; the local state\n // resets here so the Fallback returns until the new load resolves.\n loading.setStatus(hasSrc ? 'loading' : 'idle');\n onLoadingStatusChange?.(hasSrc ? 'loading' : 'idle');\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [src]);\n\n const handleLoad = useCallback(\n (event: React.SyntheticEvent<HTMLImageElement, Event>) => {\n loading?.setStatus('loaded');\n onLoadingStatusChange?.('loaded');\n onLoad?.(event);\n },\n [loading, onLoad, onLoadingStatusChange],\n );\n\n const handleError = useCallback(\n (event: React.SyntheticEvent<HTMLImageElement, Event>) => {\n loading?.setStatus('error');\n onLoadingStatusChange?.('error');\n onError?.(event);\n },\n [loading, onError, onLoadingStatusChange],\n );\n\n if (!hasSrc) return null;\n if (loading && loading.status === 'error') return null;\n\n return (\n <img\n ref={ref}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n data-pharos-loading={loading?.status}\n className={cn(styles.image, className)}\n {...rest}\n />\n );\n}\n\nAvatarImage.displayName = 'AvatarImage';\n\n// ---------------------------------------------------------------------------\n// AvatarFallback\n// ---------------------------------------------------------------------------\n\nexport interface AvatarFallbackProps extends ComponentPropsWithoutRef<'span'> {\n /**\n * Milliseconds to wait before rendering the fallback. Useful when\n * the image is likely to load quickly — delaying the fallback avoids\n * a flash of placeholder before the real avatar paints. Same\n * `delayMs` contract Radix / Base UI document. Defaults to `0`\n * (render immediately while the image is still loading or after an\n * error).\n */\n delayMs?: number;\n ref?: Ref<HTMLSpanElement>;\n}\n\nexport function AvatarFallback({\n className,\n delayMs = 0,\n children,\n ref,\n ...rest\n}: AvatarFallbackProps) {\n const loading = useContext(AvatarLoadingContext);\n const [canRender, setCanRender] = useState(delayMs === 0);\n\n useEffect(() => {\n if (delayMs === 0) {\n setCanRender(true);\n return;\n }\n const handle = window.setTimeout(() => setCanRender(true), delayMs);\n return () => window.clearTimeout(handle);\n }, [delayMs]);\n\n // The fallback hides as soon as the image reports `loaded`. Until\n // then (idle / loading / error) the slot is on screen. A consumer\n // that prefers to keep the fallback while the image is mid-flight\n // gets the default; a consumer that only wants the fallback after a\n // hard failure can branch on `data-pharos-loading=\"error\"` from the\n // root.\n if (loading && loading.status === 'loaded') return null;\n if (!canRender) return null;\n\n return (\n <span\n ref={ref}\n data-pharos-slot=\"avatar-fallback\"\n data-pharos-loading={loading?.status}\n className={cn(styles.fallback, className)}\n {...rest}\n >\n {children}\n </span>\n );\n}\n\nAvatarFallback.displayName = 'AvatarFallback';\n\n// ---------------------------------------------------------------------------\n// AvatarGroup\n// ---------------------------------------------------------------------------\n\nexport interface AvatarGroupProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Default `size` cascaded to every Avatar child that does not set\n * its own. Mirrors MUI / Chakra / Mantine Avatar.Group sizing.\n *\n * @default 'md'\n */\n size?: AvatarSize;\n /**\n * Default `shape` cascaded to every Avatar child that does not set\n * its own.\n *\n * @default 'circle'\n */\n shape?: AvatarShape;\n /**\n * Maximum number of Avatar children to render before an overflow\n * indicator takes over the remaining slots. When the children count\n * exceeds `max`, the group renders `max - 1` avatars followed by a\n * compact \"+N\" Avatar that summarises the surplus.\n *\n * Omitting the prop displays every Avatar without an overflow\n * indicator — the contract MUI / Chakra apply.\n */\n max?: number;\n /**\n * Optional renderer for the overflow indicator. Receives the surplus\n * count and returns the React node placed at the end of the stack\n * (wrapped in an Avatar with matching `size` / `shape`). Defaults to\n * a `+N` text fallback.\n */\n renderOverflow?: (surplus: number) => ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport function AvatarGroup({\n size,\n shape,\n max,\n renderOverflow,\n className,\n children,\n ref,\n ...rest\n}: AvatarGroupProps) {\n const resolvedSize: AvatarSize = size ?? 'md';\n const resolvedShape: AvatarShape = shape ?? 'circle';\n\n const childArray = useMemo(() => {\n const list: ReactNode[] = [];\n // `React.Children.toArray` would assign sequential keys, but using\n // a `Children.forEach` keeps the consumer-provided keys intact\n // when present. The order Avatar children appear in the DOM is the\n // order the consumer passed them — first child paints on top.\n let index = 0;\n const items: ReactNode[] = [];\n const append = (child: ReactNode) => {\n items.push(child);\n index += 1;\n };\n if (Array.isArray(children)) {\n children.forEach((child) => append(child));\n } else if (children) {\n append(children);\n }\n return items.concat(list).slice(0, index);\n }, [children]);\n\n const visible =\n typeof max === 'number' && childArray.length > max\n ? childArray.slice(0, Math.max(max - 1, 0))\n : childArray;\n const surplus =\n typeof max === 'number' && childArray.length > max ? childArray.length - visible.length : 0;\n\n const groupCtx = useMemo<AvatarGroupContextValue>(\n () => ({ size: resolvedSize, shape: resolvedShape }),\n [resolvedSize, resolvedShape],\n );\n\n return (\n <AvatarGroupContext.Provider value={groupCtx}>\n <div\n ref={ref}\n data-pharos-slot=\"avatar-group\"\n data-pharos-size={typeof resolvedSize === 'number' ? String(resolvedSize) : resolvedSize}\n data-pharos-shape={resolvedShape}\n className={cn(styles.group, className)}\n {...rest}\n >\n {visible}\n {surplus > 0 ? (\n <Avatar aria-label={`${surplus} more`} data-pharos-slot=\"avatar-group-overflow\">\n <AvatarFallback>\n {renderOverflow ? renderOverflow(surplus) : `+${surplus}`}\n </AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n </AvatarGroupContext.Provider>\n );\n}\n\nAvatarGroup.displayName = 'AvatarGroup';\n"],"mappings":";;;;;;;AA8DA,IAAM,IAAqB,EAA8C,IAAI,GASvE,IAAuB,EAAgD,IAAI,GAO3E,IAAqB,EAA8C,IAAI,GAEvE,IAA8D;CAClE,IAAI,EAAO;CACX,IAAI,EAAO;CACX,IAAI,EAAO;AACb,GAEM,IAA+C;CACnD,QAAQ,EAAO;CACf,QAAQ,EAAO;AACjB;AAEA,SAAS,EAAiB,GAA6C;CACjE,WAAO,KAAS,UAKpB,OAAO;EACL,OAAO;EACP,QAAQ;EACR,UAAU,GAAG,KAAK,MAAM,IAAO,EAAG,EAAE;CACtC;AACF;AAEA,SAAS,EAAqB,GAAsC;CAC9D,WAAO,KAAS,UACpB,OAAO,EAAe;AACxB;AAoCA,SAAgB,EAAO,EACrB,SACA,UACA,cACA,UACA,WACA,QACA,aACA,GAAG,KACW;CACd,IAAM,IAAQ,EAAW,CAAkB,GACrC,IAA2B,KAAQ,GAAO,QAAQ,MAClD,IAA6B,KAAS,GAAO,SAAS,UAEtD,CAAC,GAAQ,KAAa,EAA8B,MAAM,GAE1D,IAAW,SACR;EAAE,MAAM;EAAc,OAAO;CAAc,IAClD,CAAC,GAAc,CAAa,CAC9B,GACM,IAAa,SAA0C;EAAE;EAAQ;CAAU,IAAI,CAAC,CAAM,CAAC,GAOvF,IAAgB,EAAqB,CAAY,GACjD,IAAY,EAAiB,CAAY,GAEzC,IAAmB,OAAO,KAAiB,WAAW,OAAO,CAAY,IAAI;CAEnF,OACE,kBAAC,EAAmB,UAApB;EAA6B,O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iB,WAAW,OAAO,CAAY,IAAI;GAC5E,qBAAmB;GACnB,WAAW,EAAG,EAAO,OAAO,CAAS;GACrC,GAAI;aANN,CAQG,GACA,IAAU,IACT,kBAAC,GAAD;IAAQ,cAAY,GAAG,EAAQ;IAAQ,oBAAiB;cACtD,kBAAC,GAAD,EAAA,UACG,IAAiB,EAAe,CAAO,IAAI,IAAI,IAClC,CAAA;GACV,CAAA,IACN,IACD;;CACsB,CAAA;AAEjC;AAEA,EAAY,cAAc"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
root: "_root_1xx27_21",
|
|
3
|
+
shapeCircle: "_shapeCircle_1xx27_63",
|
|
4
|
+
shapeSquare: "_shapeSquare_1xx27_67",
|
|
5
|
+
sizeSm: "_sizeSm_1xx27_86",
|
|
6
|
+
sizeMd: "_sizeMd_1xx27_93",
|
|
7
|
+
sizeLg: "_sizeLg_1xx27_100",
|
|
8
|
+
image: "_image_1xx27_118",
|
|
9
|
+
fallback: "_fallback_1xx27_134",
|
|
10
|
+
group: "_group_1xx27_175"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as default };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=Avatar.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.module.js","names":[],"sources":["../../src/components/Avatar.module.css"],"sourcesContent":["/* Avatar.module.css\n *\n * Per-component CSS Modules definition (Decision D9). Compound:\n * `Avatar` (root), `AvatarImage`, `AvatarFallback`, `AvatarGroup`. The\n * build emits hashed class names (`Avatar_root__xxxx`) into\n * `dist/styles.css`; the runtime JS references them through the\n * `styles` object imported by Avatar.tsx.\n *\n * Sizes (D14): 3 named (sm / md / lg = 32 / 40 / 48 px) aligned to the\n * IconButton height grid. Consumers needing a one-off (a 108px profile\n * picture, a 20px stack avatar) pass `size={number}` and the runtime\n * sets `width` / `height` inline — same escape pattern Mantine /\n * Ant Design ship. The `--pharos-avatar-overlap` CSS variable cascades\n * to AvatarGroup so the negative margin scales with the chosen size.\n *\n * Shape: `circle` (default) via `border-radius: full`; `square` via\n * `radius-md`. The atom does not impose a breakpoint-conditional\n * shape — that is the consumer's call.\n */\n\n.root {\n /* === Box model ===\n * Square dimensions with `border-radius` doing the circle/rounded\n * shape. `flex-shrink: 0` prevents the avatar from collapsing inside\n * a flex row (typical in stacks and people lists). `overflow: hidden`\n * clips the inner `<img>` to the shape — the same approach Radix /\n * Base UI document.\n *\n * `position: relative` anchors the absolutely-positioned image so it\n * stacks on top of the fallback. Without this the image and the\n * fallback would compete as siblings of the same flex container, and\n * during the loading window both would render at `width: 100%` —\n * shrinking to 50/50 inside the avatar (visible as a split chrome\n * until the image paints). Layering the image on top keeps the\n * fallback as the single flex item that centres its content, and\n * the image fades in over it once the browser decodes the pixels. */\n position: relative;\n box-sizing: border-box;\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n\n /* === Visual baseline ===\n * Neutral surface behind the fallback so the slot reads as a defined\n * shape even before the image (or text) renders. `color: inherit`\n * lets icons inside Fallback pick the parent's text colour. */\n background-color: var(--pharos-color-neutral-100);\n color: var(--pharos-color-neutral-700);\n font-family: var(--pharos-font-family-sans);\n font-weight: 500;\n line-height: 1;\n user-select: none;\n\n /* Default overlap step for grouped avatars. The size classes below\n * override it so the negative margin scales with the avatar. */\n --pharos-avatar-overlap: calc(var(--pharos-spacing-2) * -1); /* -8px */\n}\n\n/* === Shape === */\n\n.shapeCircle {\n border-radius: var(--pharos-radius-full);\n}\n\n.shapeSquare {\n /* Matches the `Card` outlined corner radius family — squared avatars\n * (org logos, product icons) sit consistently next to cards on the\n * same surface. */\n border-radius: var(--pharos-radius-md);\n}\n\n/* === Sizes ===\n *\n * Named sizes match the IconButton grid (32 / 40 / 48 px). Initials\n * type scale follows the body 14 / 20 rhythm (D3): sm shrinks to 12 px,\n * md / lg sit at 14 / 16 px. The fallback `font-size` is set on\n * `.root` so the text reflows correctly when the consumer passes an\n * inline-style override.\n *\n * Each size also pegs the `--pharos-avatar-overlap` so AvatarGroup\n * pulls the next sibling proportionally — ~20% of the avatar diameter,\n * the same ratio MUI / Chakra / Mantine ship by default. */\n\n.sizeSm {\n width: var(--pharos-spacing-8); /* 32 px */\n height: var(--pharos-spacing-8);\n font-size: 0.75rem; /* 12 px */\n --pharos-avatar-overlap: calc(var(--pharos-spacing-2) * -0.75); /* -6 px */\n}\n\n.sizeMd {\n width: var(--pharos-spacing-10); /* 40 px */\n height: var(--pharos-spacing-10);\n font-size: 0.875rem; /* 14 px */\n --pharos-avatar-overlap: calc(var(--pharos-spacing-2) * -1); /* -8 px */\n}\n\n.sizeLg {\n width: var(--pharos-spacing-12); /* 48 px */\n height: var(--pharos-spacing-12);\n font-size: 1rem; /* 16 px */\n --pharos-avatar-overlap: calc(var(--pharos-spacing-2) * -1.25); /* -10 px */\n}\n\n/* === Image ===\n *\n * The img fills the root completely with `object-fit: cover` so a\n * non-square portrait crops to the avatar shape without distortion.\n * `position: absolute` lifts the image out of the flex flow so it can\n * stack on top of the fallback during the load window — without this\n * the two would split the root's width 50/50 because each carries\n * `width: 100%` (visible as a fractured chrome on size=lg, story\n * grids, and any docs page that renders multiple Avatars before the\n * images decode). */\n\n.image {\n position: absolute;\n inset: 0;\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n /* Hairline border-radius inheritance to keep clipping crisp under\n * sub-pixel rendering — `overflow: hidden` on the root handles the\n * clip but the inner `<img>` repeating the radius prevents a\n * one-pixel halo on some browsers. */\n border-radius: inherit;\n}\n\n/* === Fallback === */\n\n.fallback {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n text-align: center;\n /* Inherit the typography baked into the root via `.sizeX`. */\n font: inherit;\n color: inherit;\n}\n\n/* The Fallback owns a direct-child `> svg` sizing rule for icon-only\n * fallbacks (e.g. `<UserIcon/>`). Icons render at ~60% of the avatar\n * diameter — matching the Material 3 / MUI default when an Avatar\n * falls back to its generic person silhouette. */\n\n.sizeSm .fallback > svg {\n width: var(--pharos-spacing-5); /* 20 px ≈ 62.5% of 32 */\n height: var(--pharos-spacing-5);\n}\n\n.sizeMd .fallback > svg {\n width: var(--pharos-spacing-6); /* 24 px = 60% of 40 */\n height: var(--pharos-spacing-6);\n}\n\n.sizeLg .fallback > svg {\n width: var(--pharos-spacing-7); /* 28 px ≈ 58% of 48 */\n height: var(--pharos-spacing-7);\n}\n\n/* === Group ===\n *\n * Stack avatars with negative left margin. The first child sits flush;\n * each subsequent child slides under the previous one. The `ring` is\n * applied as a `box-shadow` (not `border`) so it does not shrink the\n * avatar's content box — same trick Tailwind UI / MUI use. The ring\n * colour reads from a CSS var so the consumer can match the\n * surrounding surface (e.g. a card with a tinted background). */\n\n.group {\n display: inline-flex;\n align-items: center;\n /* Direction control: `flex-direction: row-reverse` would reverse\n * stacking order; we keep the default and let the consumer pass\n * children in the order they prefer. The first-rendered child sits\n * on top of the stack because z-index increases via :nth-child\n * below. */\n}\n\n.group > .root {\n /* The ring fills the gap that the negative margin opens between\n * stacked avatars so each silhouette reads as a separate shape.\n * `--pharos-avatar-group-ring` defaults to white (the page surface);\n * a consumer with a tinted backdrop overrides it. */\n box-shadow: 0 0 0 2px var(--pharos-avatar-group-ring, var(--pharos-color-base-white));\n /* Position relative + z-index lets the box-shadow ring sit above\n * the next sibling so the gap stays visible. */\n position: relative;\n}\n\n.group > .root + .root {\n margin-left: var(--pharos-avatar-overlap);\n}\n\n/* === Loading status data attributes ===\n *\n * The Image element exposes `data-pharos-loading` while it transitions\n * through `idle` → `loaded` / `error`. The Fallback reads the same\n * attribute on the root via context (no CSS selector needed, but the\n * data attribute remains queryable from e2e tests). */\n"],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cn as e } from "../lib/cn.js";
|
|
2
|
+
import t from "./Badge.module.js";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/Badge.tsx
|
|
6
|
+
var i = n(t.badge, {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: t.default,
|
|
9
|
+
secondary: t.secondary,
|
|
10
|
+
destructive: t.destructive,
|
|
11
|
+
outline: t.outline,
|
|
12
|
+
success: t.success,
|
|
13
|
+
warning: t.warning,
|
|
14
|
+
info: t.info
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { variant: "default" }
|
|
17
|
+
});
|
|
18
|
+
function a({ variant: t, className: n, ...a }) {
|
|
19
|
+
let o = t ?? "default";
|
|
20
|
+
return /* @__PURE__ */ r("span", {
|
|
21
|
+
"data-pharos-variant": o,
|
|
22
|
+
className: e(i({ variant: o }), n),
|
|
23
|
+
...a
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
a.displayName = "Badge";
|
|
27
|
+
//#endregion
|
|
28
|
+
export { a as Badge, i as badgeVariants };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","names":[],"sources":["../../src/components/Badge.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/cn';\nimport styles from './Badge.module.css';\n\n/**\n * Maps the `variant` axis to per-class names inside `Badge.module.css`.\n * The variant set follows shadcn/ui — `default`, `secondary`, `destructive`,\n * `outline` — extended with the semantic tones every modern DS exposes\n * (`success`, `warning`, `info`). Naming stays asymmetric on purpose:\n * `destructive` is the canonical shadcn name for \"negative tone\" and we\n * keep it instead of renaming it to `error`, so consumers familiar with\n * shadcn pick the right value without re-learning the API.\n */\nconst badgeVariants = cva(styles.badge, {\n variants: {\n variant: {\n default: styles.default,\n secondary: styles.secondary,\n destructive: styles.destructive,\n outline: styles.outline,\n success: styles.success,\n warning: styles.warning,\n info: styles.info,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\ntype BadgeVariantProps = VariantProps<typeof badgeVariants>;\n\nexport interface BadgeProps extends ComponentPropsWithoutRef<'span'>, BadgeVariantProps {}\n\nexport function Badge({ variant, className, ...rest }: BadgeProps) {\n const resolvedVariant = variant ?? 'default';\n return (\n <span\n data-pharos-variant={resolvedVariant}\n className={cn(badgeVariants({ variant: resolvedVariant }), className)}\n {...rest}\n />\n );\n}\n\nBadge.displayName = 'Badge';\n\nexport { badgeVariants };\n"],"mappings":";;;;;AAcA,IAAM,IAAgB,EAAI,EAAO,OAAO;CACtC,UAAU,EACR,SAAS;EACP,SAAS,EAAO;EAChB,WAAW,EAAO;EAClB,aAAa,EAAO;EACpB,SAAS,EAAO;EAChB,SAAS,EAAO;EAChB,SAAS,EAAO;EAChB,MAAM,EAAO;CACf,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC;AAMD,SAAgB,EAAM,EAAE,YAAS,cAAW,GAAG,KAAoB;CACjE,IAAM,IAAkB,KAAW;CACnC,OACE,kBAAC,QAAD;EACE,uBAAqB;EACrB,WAAW,EAAG,EAAc,EAAE,SAAS,EAAgB,CAAC,GAAG,CAAS;EACpE,GAAI;CACL,CAAA;AAEL;AAEA,EAAM,cAAc"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
badge: "_badge_zrawy_5",
|
|
3
|
+
default: "_default_zrawy_30",
|
|
4
|
+
secondary: "_secondary_zrawy_35",
|
|
5
|
+
destructive: "_destructive_zrawy_40",
|
|
6
|
+
outline: "_outline_zrawy_45",
|
|
7
|
+
success: "_success_zrawy_55",
|
|
8
|
+
warning: "_warning_zrawy_60",
|
|
9
|
+
info: "_info_zrawy_65"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Badge.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.module.js","names":[],"sources":["../../src/components/Badge.module.css"],"sourcesContent":["/* Base layout. Same across every variant — only surface, label and border\n * change. Inline-flex so a child SVG (rendered by the consumer as plain\n * children) sits on the same baseline as the label. The font-relative SVG\n * sizing rule mirrors shadcn's `[&>svg]:size-3` utility. */\n.badge {\n display: inline-flex;\n align-items: center;\n gap: var(--pharos-spacing-1);\n padding: 0 var(--pharos-spacing-2);\n height: var(--pharos-spacing-5);\n border: 1px solid transparent;\n border-radius: var(--pharos-radius-full);\n font-family: var(--pharos-font-family-sans);\n font-size: var(--pharos-font-size-xs);\n font-weight: var(--pharos-font-weight-medium);\n line-height: 1;\n white-space: nowrap;\n width: fit-content;\n text-box-trim: trim-both;\n text-box-edge: cap alphabetic;\n}\n\n.badge > svg {\n width: 0.75em;\n height: 0.75em;\n flex: 0 0 auto;\n pointer-events: none;\n}\n\n.default {\n background: var(--pharos-color-neutral-900);\n color: var(--pharos-color-base-white);\n}\n\n.secondary {\n background: var(--pharos-color-neutral-100);\n color: var(--pharos-color-neutral-900);\n}\n\n.destructive {\n background: var(--pharos-color-semantic-error-fg);\n color: var(--pharos-color-semantic-error-on);\n}\n\n.outline {\n background: transparent;\n color: var(--pharos-color-neutral-900);\n /* `neutral-500` clears WCAG 1.4.11 (Non-text Contrast, 3:1 against the\n * surrounding surface) and matches the resting border of Input and\n * Button secondary so the system has one accessible boundary intensity\n * across primitives. See `Input.module.css` for the cross-DS rationale. */\n border-color: var(--pharos-color-neutral-500);\n}\n\n.success {\n background: var(--pharos-color-semantic-success-fg);\n color: var(--pharos-color-semantic-success-on);\n}\n\n.warning {\n background: var(--pharos-color-semantic-warning-fg);\n color: var(--pharos-color-semantic-warning-on);\n}\n\n.info {\n background: var(--pharos-color-semantic-info-fg);\n color: var(--pharos-color-semantic-info-on);\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;;GAOG;AACH,QAAA,MAAM,cAAc;;;8EAwBlB,CAAC;AAEH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,kBAAkB;CAAG;AAE9F,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,SAAS,EACT,MAAM,EACN,IAAI,EACJ,IAAe,EACf,GAAG,EACH,GAAG,IAAI,EACR,EAAE,WAAW,8FAmBb;yBA3Be,MAAM;;;AA+BtB,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/cn.js";
|
|
3
|
+
import t from "./Button.module.js";
|
|
4
|
+
import { useRender as n } from "@base-ui/react/use-render";
|
|
5
|
+
import { cva as r } from "class-variance-authority";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/Button.tsx
|
|
8
|
+
var a = r(t.button, {
|
|
9
|
+
variants: {
|
|
10
|
+
intent: {
|
|
11
|
+
primary: t.primary,
|
|
12
|
+
secondary: t.secondary,
|
|
13
|
+
ghost: t.ghost,
|
|
14
|
+
destructive: t.destructive
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: t.sizeSm,
|
|
18
|
+
md: t.sizeMd,
|
|
19
|
+
lg: t.sizeLg
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
intent: "primary",
|
|
24
|
+
size: "md"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
function o({ render: t, className: r, intent: o, size: s, type: c = "button", ref: l, ...u }) {
|
|
28
|
+
let d = o ?? "primary", f = s ?? "md";
|
|
29
|
+
return n({
|
|
30
|
+
render: t ?? /* @__PURE__ */ i("button", {}),
|
|
31
|
+
ref: l,
|
|
32
|
+
defaultTagName: "button",
|
|
33
|
+
props: {
|
|
34
|
+
type: c,
|
|
35
|
+
"data-pharos-intent": d,
|
|
36
|
+
"data-pharos-size": f,
|
|
37
|
+
className: e(a({
|
|
38
|
+
intent: d,
|
|
39
|
+
size: f
|
|
40
|
+
}), r),
|
|
41
|
+
...u
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
o.displayName = "Button";
|
|
46
|
+
//#endregion
|
|
47
|
+
export { o as Button, a as buttonVariants };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","names":[],"sources":["../../src/components/Button.tsx"],"sourcesContent":["'use client';\n\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/cn';\nimport styles from './Button.module.css';\n\n/**\n * Maps the two public variant axes (`intent`, `size`) to the per-class names\n * inside `Button.module.css`. CVA stays as the typed-variants mechanism\n * (Decision D9 keeps the authoring DX) but each value points at a hashed\n * CSS Modules class instead of a Tailwind utility string. The base class\n * carries layout, typography and the focus-visible ring — every variant\n * stacks on top of it.\n */\nconst buttonVariants = cva(styles.button, {\n variants: {\n intent: {\n // `primary` is the most emphasized CTA. It renders in neutral-900,\n // matching Alexandria's `NewButton variant=\"filled\" tone=\"default\"`\n // and the Linear/Vercel/Notion convention of \"brand color as accent,\n // dark neutral as primary action\". The blue `primary-*` palette is\n // reserved for brand accents (focus rings, highlights, badges) —\n // not for the default filled button.\n primary: styles.primary,\n secondary: styles.secondary,\n ghost: styles.ghost,\n destructive: styles.destructive,\n },\n size: {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n intent: 'primary',\n size: 'md',\n },\n});\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\n/**\n * Props accepted by `<Button>`. Extends Base UI's `useRender.ComponentProps<'button'>`,\n * which means the component accepts every native `<button>` attribute plus the\n * `render` prop for composition:\n *\n * ```tsx\n * // Render as a router link (inherits all Button styles and behavior):\n * <Button render={<Link to=\"/dashboard\" />}>Dashboard</Button>\n * // Or as a function receiving props + state:\n * <Button render={(props) => <a {...props} href=\"/x\" />}>External</Button>\n * ```\n */\nexport interface ButtonProps extends useRender.ComponentProps<'button'>, ButtonVariantProps {}\n\nexport function Button({\n render,\n className,\n intent,\n size,\n type = 'button',\n ref,\n ...rest\n}: ButtonProps) {\n const resolvedIntent = intent ?? 'primary';\n const resolvedSize = size ?? 'md';\n return useRender({\n render: render ?? <button />,\n ref,\n defaultTagName: 'button',\n props: {\n type,\n // `data-pharos-intent` / `data-pharos-size` are stable hooks for\n // selectors and tests. They mirror the CSS Modules class but stay\n // semantic — consumer queries do not need to know the hashed class\n // name and tests do not need to import the module to assert variant.\n 'data-pharos-intent': resolvedIntent,\n 'data-pharos-size': resolvedSize,\n className: cn(buttonVariants({ intent: resolvedIntent, size: resolvedSize }), className),\n ...rest,\n },\n });\n}\n\nButton.displayName = 'Button';\n\nexport { buttonVariants };\n"],"mappings":";;;;;;;AAeA,IAAM,IAAiB,EAAI,EAAO,QAAQ;CACxC,UAAU;EACR,QAAQ;GAON,SAAS,EAAO;GAChB,WAAW,EAAO;GAClB,OAAO,EAAO;GACd,aAAa,EAAO;EACtB;EACA,MAAM;GACJ,IAAI,EAAO;GACX,IAAI,EAAO;GACX,IAAI,EAAO;EACb;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,MAAM;CACR;AACF,CAAC;AAkBD,SAAgB,EAAO,EACrB,WACA,cACA,WACA,SACA,UAAO,UACP,QACA,GAAG,KACW;CACd,IAAM,IAAiB,KAAU,WAC3B,IAAe,KAAQ;CAC7B,OAAO,EAAU;EACf,QAAQ,KAAU,kBAAC,UAAD,CAAS,CAAA;EAC3B;EACA,gBAAgB;EAChB,OAAO;GACL;GAKA,sBAAsB;GACtB,oBAAoB;GACpB,WAAW,EAAG,EAAe;IAAE,QAAQ;IAAgB,MAAM;GAAa,CAAC,GAAG,CAAS;GACvF,GAAG;EACL;CACF,CAAC;AACH;AAEA,EAAO,cAAc"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
button: "_button_iu0wg_18",
|
|
3
|
+
primary: "_primary_iu0wg_127",
|
|
4
|
+
secondary: "_secondary_iu0wg_141",
|
|
5
|
+
ghost: "_ghost_iu0wg_161",
|
|
6
|
+
destructive: "_destructive_iu0wg_175",
|
|
7
|
+
sizeSm: "_sizeSm_iu0wg_197",
|
|
8
|
+
sizeMd: "_sizeMd_iu0wg_205",
|
|
9
|
+
sizeLg: "_sizeLg_iu0wg_213"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Button.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.module.js","names":[],"sources":["../../src/components/Button.module.css"],"sourcesContent":["/* Button.module.css\n *\n * Per-component CSS Modules definition (Decision D9). The build emits hashed\n * class names (e.g. `Button_button__a3f2`) into dist/styles.css; the runtime\n * JS references those names through the `styles` object imported by Button.tsx.\n *\n * Every visual value comes from a `--pharos-*` token. No hex, no raw px/rem\n * for design dimensions, no Tailwind. Hover / active / focus states are\n * authored with native CSS pseudo-classes — no preprocessor, no utility-first\n * shorthand, no framework dependency at runtime.\n *\n * Consumers do not need Tailwind (any version) or any other CSS framework to\n * use this component. They only need to load the published `dist/styles.css`\n * once and the consumer's app must define `--pharos-*` (achieved by importing\n * `@code-sherpas/pharos-tokens/css`, which is a peer dependency).\n */\n\n.button {\n /* Strip native button rendering. The component is fully custom-styled,\n * so platform-specific drawing (rounded corners, shadows, focus rings\n * on macOS, push-button gradient on iOS) only adds variance without\n * adding value. `appearance: none` keeps every consumer rendering the\n * exact same pixel set. The `-webkit-appearance` line is a no-op on\n * modern Chromium but stays for older WebKit. */\n appearance: none;\n -webkit-appearance: none;\n\n /* === Box model ===\n * Explicit so the rendered control matches the height set in the size\n * rules even when the consumer's app does not ship a CSS reset. With\n * the consumer-side preflight gone, `border-box`, `margin: 0` and the\n * zero block-padding neutralise the user-agent's `padding: 1px 6px`\n * (Chrome) or `padding: 0 8px` (Firefox) on `<button>`. */\n box-sizing: border-box;\n margin: 0;\n padding-top: 0;\n padding-bottom: 0;\n border: 0 solid transparent;\n border-radius: var(--pharos-radius-full);\n\n /* === Layout === */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n white-space: nowrap;\n\n /* === Optical text centering ===\n * `text-box-trim` strips the leading above the cap-line and below the\n * alphabetic baseline so `align-items: center` centres the actual\n * cap-block instead of the line-box (which includes per-font half-\n * leading that biases the visual centre upward or downward depending\n * on the font's vertical metrics). Without this, fonts with a high\n * baseline like Outfit (the D8 sans) render visibly above the\n * geometric centre even though `align-items: center` is correctly\n * applied — matching what Chromatic flagged on the migration PR.\n * The `text-box-edge` longhand picks the cap-line at the start and\n * the alphabetic baseline at the end so descenders (\"y\", \"g\", ...)\n * still hang below the cap-block as the font intended; only the\n * extra leading is trimmed.\n *\n * Browser support: Chromium 133+ / Safari 18.2+ ship the property,\n * Firefox has it behind a flag at the time of writing. In engines\n * without support the declaration is ignored and the text falls\n * back to standard line-box centring — which is the same behaviour\n * the bundle had before this rule, so the fallback is safe. */\n text-box-trim: trim-both;\n text-box-edge: cap alphabetic;\n\n /* === Typography ===\n * Each font longhand is set explicitly. The shorthand `font: inherit`\n * was tempting but the CSS spec says the `font` shorthand resets a\n * dozen related properties (`font-feature-settings`,\n * `font-variation-settings`, `font-kerning`, `font-optical-sizing`,\n * `font-size-adjust`, etc.) to their *initial* values rather than\n * inheriting them. That subtle reset shifted the rendered baseline\n * by a fraction of a pixel against the consumer's surrounding text,\n * which Chromatic flagged as a diff vs 0.2.x. The size variants\n * below override `font-size` and `line-height` per size. */\n font-family: var(--pharos-font-family-sans);\n font-style: normal;\n font-weight: var(--pharos-font-weight-medium);\n font-stretch: normal;\n font-variant: normal;\n font-kerning: auto;\n font-optical-sizing: auto;\n font-size-adjust: none;\n font-feature-settings: normal;\n font-variation-settings: normal;\n letter-spacing: normal;\n text-decoration: none;\n text-transform: none;\n /* Default size (overridden per size variant) — keeps a sensible\n * fallback if a Button is somehow rendered without a size class. */\n font-size: var(--pharos-font-size-sm);\n line-height: 1.5;\n\n /* === Interactivity === */\n user-select: none;\n cursor: pointer;\n background-color: transparent;\n color: inherit;\n\n /* === Transitions === */\n transition-property: color, background-color, border-color, box-shadow;\n transition-duration: var(--pharos-duration-normal);\n transition-timing-function: var(--pharos-easing-out);\n}\n\n.button:focus-visible {\n outline: none;\n /* Two-stop box-shadow mimics the Tailwind `ring-offset-2 ring-2` pattern:\n * an inner halo in the surface color separates the ring from the button\n * fill, and the outer color is the per-intent focus accent. */\n box-shadow:\n 0 0 0 2px var(--pharos-color-base-white),\n 0 0 0 4px var(--button-focus-ring, var(--pharos-color-primary-600));\n}\n\n.button:disabled {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* === Intents === */\n\n.primary {\n background-color: var(--pharos-color-neutral-900);\n color: var(--pharos-color-base-white);\n --button-focus-ring: var(--pharos-color-primary-600);\n}\n\n.primary:hover {\n background-color: var(--pharos-color-neutral-700);\n}\n\n.primary:active {\n background-color: var(--pharos-color-neutral-950);\n}\n\n.secondary {\n background-color: var(--pharos-color-base-white);\n color: var(--pharos-color-neutral-900);\n /* `neutral-500` clears WCAG 1.4.11 (Non-text Contrast, 3:1 against the\n * surrounding surface). See Input.module.css for the full rationale and\n * the cross-DS comparison; Button secondary, Input and Badge outline\n * share the same border tone so the system has one accessible boundary\n * intensity across primitives. */\n border: 1px solid var(--pharos-color-neutral-500);\n --button-focus-ring: var(--pharos-color-primary-600);\n}\n\n.secondary:hover {\n background-color: var(--pharos-color-neutral-50);\n}\n\n.secondary:active {\n background-color: var(--pharos-color-neutral-100);\n}\n\n.ghost {\n background-color: transparent;\n color: var(--pharos-color-neutral-900);\n --button-focus-ring: var(--pharos-color-primary-600);\n}\n\n.ghost:hover {\n background-color: var(--pharos-color-neutral-100);\n}\n\n.ghost:active {\n background-color: var(--pharos-color-neutral-200);\n}\n\n.destructive {\n background-color: var(--pharos-color-semantic-error-fg);\n color: var(--pharos-color-semantic-error-on);\n --button-focus-ring: var(--pharos-color-semantic-error-fg);\n}\n\n.destructive:hover {\n background-color: var(--pharos-color-semantic-error-fg-hover);\n}\n\n.destructive:active {\n background-color: var(--pharos-color-semantic-error-fg-active);\n}\n\n/* === Sizes ===\n *\n * Heights and paddings are derived from `--pharos-spacing-*` so a runtime\n * override of the spacing scale rescales the whole control proportionally.\n * Font sizes use `--pharos-font-size-*` tokens; the line-height ratios match\n * the Tailwind v4 defaults that shipped in 0.2.x so visual fidelity is\n * preserved across the migration. */\n\n.sizeSm {\n height: var(--pharos-spacing-8);\n gap: var(--pharos-spacing-1-5);\n padding: 0 var(--pharos-spacing-3);\n font-size: var(--pharos-font-size-sm);\n line-height: calc(1.25 / 0.875);\n}\n\n.sizeMd {\n height: var(--pharos-spacing-10);\n gap: var(--pharos-spacing-2);\n padding: 0 var(--pharos-spacing-4);\n font-size: var(--pharos-font-size-sm);\n line-height: calc(1.25 / 0.875);\n}\n\n.sizeLg {\n height: var(--pharos-spacing-12);\n gap: var(--pharos-spacing-2);\n padding: 0 var(--pharos-spacing-6);\n font-size: var(--pharos-font-size-base);\n line-height: 1.5;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { cn as e } from "../lib/cn.js";
|
|
2
|
+
import t from "./Card.module.js";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/Card.tsx
|
|
6
|
+
var i = n(t.card, {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: t.default,
|
|
9
|
+
elevated: t.elevated,
|
|
10
|
+
outlined: t.outlined
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { variant: "default" }
|
|
13
|
+
});
|
|
14
|
+
function a({ variant: t, className: n, ...a }) {
|
|
15
|
+
let o = t ?? "default";
|
|
16
|
+
return /* @__PURE__ */ r("div", {
|
|
17
|
+
"data-pharos-variant": o,
|
|
18
|
+
className: e(i({ variant: o }), n),
|
|
19
|
+
...a
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
a.displayName = "Card";
|
|
23
|
+
function o({ className: n, ...i }) {
|
|
24
|
+
return /* @__PURE__ */ r("div", {
|
|
25
|
+
"data-pharos-slot": "card-header",
|
|
26
|
+
className: e(t.header, n),
|
|
27
|
+
...i
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
o.displayName = "CardHeader";
|
|
31
|
+
function s({ className: n, ...i }) {
|
|
32
|
+
return /* @__PURE__ */ r("div", {
|
|
33
|
+
"data-pharos-slot": "card-title",
|
|
34
|
+
className: e(t.title, n),
|
|
35
|
+
...i
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
s.displayName = "CardTitle";
|
|
39
|
+
function c({ className: n, ...i }) {
|
|
40
|
+
return /* @__PURE__ */ r("p", {
|
|
41
|
+
"data-pharos-slot": "card-description",
|
|
42
|
+
className: e(t.description, n),
|
|
43
|
+
...i
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
c.displayName = "CardDescription";
|
|
47
|
+
function l({ className: n, ...i }) {
|
|
48
|
+
return /* @__PURE__ */ r("div", {
|
|
49
|
+
"data-pharos-slot": "card-content",
|
|
50
|
+
className: e(t.content, n),
|
|
51
|
+
...i
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
l.displayName = "CardContent";
|
|
55
|
+
function u({ className: n, ...i }) {
|
|
56
|
+
return /* @__PURE__ */ r("div", {
|
|
57
|
+
"data-pharos-slot": "card-footer",
|
|
58
|
+
className: e(t.footer, n),
|
|
59
|
+
...i
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
u.displayName = "CardFooter";
|
|
63
|
+
//#endregion
|
|
64
|
+
export { a as Card, l as CardContent, c as CardDescription, u as CardFooter, o as CardHeader, s as CardTitle, i as cardVariants };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","names":[],"sources":["../../src/components/Card.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/cn';\nimport styles from './Card.module.css';\n\n/**\n * Container surface for grouped content. Three variants on the\n * border-intensity hierarchy (Decision D12):\n *\n * - `default` (subtle border, no shadow) — the most common card. Sits\n * on the same `neutral-200` tone as `Separator`, so panels and\n * dividers harmonise visually.\n * - `elevated` (no border, soft shadow) — for surfaces that should lift\n * off the canvas (modals' inner cards, important callouts).\n * - `outlined` (deliberately stronger border, no shadow) — emphasised\n * container. Sits on `neutral-300`, between subtle non-interactive\n * tone and the strong interactive tone reserved for controls.\n *\n * Sub-components (`CardHeader`, `CardTitle`, `CardDescription`,\n * `CardContent`, `CardFooter`) are slot primitives, not separate atoms\n * — same pattern shadcn uses. They are exported individually so the\n * consumer composes the structure they need; an empty Card with no\n * slots is equally valid.\n */\nconst cardVariants = cva(styles.card, {\n variants: {\n variant: {\n default: styles.default,\n elevated: styles.elevated,\n outlined: styles.outlined,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\ntype CardVariantProps = VariantProps<typeof cardVariants>;\n\nexport interface CardProps extends ComponentPropsWithoutRef<'div'>, CardVariantProps {}\n\nexport function Card({ variant, className, ...rest }: CardProps) {\n const resolvedVariant = variant ?? 'default';\n return (\n <div\n data-pharos-variant={resolvedVariant}\n className={cn(cardVariants({ variant: resolvedVariant }), className)}\n {...rest}\n />\n );\n}\n\nCard.displayName = 'Card';\n\nexport interface CardHeaderProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function CardHeader({ className, ...rest }: CardHeaderProps) {\n return <div data-pharos-slot=\"card-header\" className={cn(styles.header, className)} {...rest} />;\n}\n\nCardHeader.displayName = 'CardHeader';\n\nexport interface CardTitleProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function CardTitle({ className, ...rest }: CardTitleProps) {\n // Renders as a `<div>` so the consumer picks the semantic heading\n // level (`<h2>`, `<h3>`, etc.) by wrapping or by using the native\n // `role` and `aria-level` attributes if needed. Same default as\n // shadcn's CardTitle — atoms do not impose document outline.\n return <div data-pharos-slot=\"card-title\" className={cn(styles.title, className)} {...rest} />;\n}\n\nCardTitle.displayName = 'CardTitle';\n\nexport interface CardDescriptionProps extends ComponentPropsWithoutRef<'p'> {}\n\nexport function CardDescription({ className, ...rest }: CardDescriptionProps) {\n return (\n <p\n data-pharos-slot=\"card-description\"\n className={cn(styles.description, className)}\n {...rest}\n />\n );\n}\n\nCardDescription.displayName = 'CardDescription';\n\nexport interface CardContentProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function CardContent({ className, ...rest }: CardContentProps) {\n return (\n <div data-pharos-slot=\"card-content\" className={cn(styles.content, className)} {...rest} />\n );\n}\n\nCardContent.displayName = 'CardContent';\n\nexport interface CardFooterProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function CardFooter({ className, ...rest }: CardFooterProps) {\n return <div data-pharos-slot=\"card-footer\" className={cn(styles.footer, className)} {...rest} />;\n}\n\nCardFooter.displayName = 'CardFooter';\n\nexport { cardVariants };\n"],"mappings":";;;;;AAwBA,IAAM,IAAe,EAAI,EAAO,MAAM;CACpC,UAAU,EACR,SAAS;EACP,SAAS,EAAO;EAChB,UAAU,EAAO;EACjB,UAAU,EAAO;CACnB,EACF;CACA,iB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"_elevated_yxgwa_46",
|
|
5
|
+
outlined: "_outlined_yxgwa_51",
|
|
6
|
+
header: "_header_yxgwa_62",
|
|
7
|
+
title: "_title_yxgwa_69",
|
|
8
|
+
description: "_description_yxgwa_77",
|
|
9
|
+
content: "_content_yxgwa_85",
|
|
10
|
+
footer: "_footer_yxgwa_95"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as default };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=Card.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.module.js","names":[],"sources":["../../src/components/Card.module.css"],"sourcesContent":["/* Card.module.css\n *\n * Per-component CSS Modules definition (Decision D9). Hashed into\n * `dist/styles.css`. The variant tones land on the border-intensity\n * hierarchy from D12: `default` and `elevated` carry the subtle tier,\n * `outlined` carries the emphasised tier. None of them reach the\n * strong tier reserved for interactive controls.\n */\n\n.card {\n /* === Surface === */\n background-color: var(--pharos-color-base-white);\n border-radius: var(--pharos-radius-2xl);\n /* Default to no border / no shadow at the base level — variants opt\n * into one or the other. Keeping the base neutral means a consumer\n * that overrides via `className` does not have to fight defaults. */\n border: 0 solid transparent;\n\n /* === Layout ===\n * Cards default to vertical stacking of their slots (Header / Content /\n * Footer). The slots themselves carry their own padding so the Card\n * never imposes a global padding that would conflict with full-bleed\n * media headers. */\n display: flex;\n flex-direction: column;\n gap: var(--pharos-spacing-6);\n\n /* === Typography ===\n * Set the body baseline for the card so `<CardTitle>` and\n * `<CardDescription>` can size relatively if a future caller wants. */\n font-family: var(--pharos-font-family-sans);\n color: var(--pharos-color-neutral-900);\n\n /* === Transitions === */\n transition-property: border-color, box-shadow;\n transition-duration: var(--pharos-duration-normal);\n transition-timing-function: var(--pharos-easing-out);\n}\n\n/* === Variants === */\n\n.default {\n border: 1px solid var(--pharos-color-neutral-200);\n}\n\n.elevated {\n border: 0 solid transparent;\n box-shadow: var(--pharos-shadow-md);\n}\n\n.outlined {\n border: 1px solid var(--pharos-color-neutral-300);\n}\n\n/* === Slots ===\n *\n * Every slot is a styled `<div>` (CardTitle stays a `<div>` like shadcn,\n * so the consumer picks the semantic heading level). Padding is consistent\n * across the three slots — the consumer composes them inside `<Card>`\n * without thinking about layout details. */\n\n.header {\n display: flex;\n flex-direction: column;\n gap: var(--pharos-spacing-1-5);\n padding: var(--pharos-spacing-6) var(--pharos-spacing-6) 0;\n}\n\n.title {\n margin: 0;\n font-size: var(--pharos-font-size-base);\n font-weight: var(--pharos-font-weight-semibold);\n line-height: 1.25;\n color: var(--pharos-color-neutral-900);\n}\n\n.description {\n margin: 0;\n font-size: var(--pharos-font-size-sm);\n font-weight: var(--pharos-font-weight-regular);\n line-height: 1.5;\n color: var(--pharos-color-neutral-500);\n}\n\n.content {\n /* Header padding-top + Footer padding-bottom already provide the\n * vertical breathing room. Content itself only carries inline padding;\n * its vertical rhythm comes from the parent `gap`. When the card has\n * no Header/Footer, Content's lack of vertical padding means the card\n * is content-only with the card-level `gap` collapsing to zero — the\n * consumer applies their own padding via `style` or `className`. */\n padding: 0 var(--pharos-spacing-6);\n}\n\n.footer {\n display: flex;\n align-items: center;\n gap: var(--pharos-spacing-3);\n padding: 0 var(--pharos-spacing-6) var(--pharos-spacing-6);\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAInE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC;CAAG;AAmClF,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,+BAS7D;yBATe,QAAQ"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/cn.js";
|
|
3
|
+
import t from "./Checkbox.module.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { Checkbox as i } from "@base-ui/react/checkbox";
|
|
6
|
+
//#region src/components/Checkbox.tsx
|
|
7
|
+
function a() {
|
|
8
|
+
return /* @__PURE__ */ n("svg", {
|
|
9
|
+
className: e(t.icon, t.iconCheck),
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
strokeWidth: "3",
|
|
14
|
+
strokeLinecap: "round",
|
|
15
|
+
strokeLinejoin: "round",
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
children: /* @__PURE__ */ n("path", { d: "M20 6 9 17l-5-5" })
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function o() {
|
|
21
|
+
return /* @__PURE__ */ n("svg", {
|
|
22
|
+
className: e(t.icon, t.iconIndeterminate),
|
|
23
|
+
viewBox: "0 0 24 24",
|
|
24
|
+
fill: "none",
|
|
25
|
+
stroke: "currentColor",
|
|
26
|
+
strokeWidth: "3",
|
|
27
|
+
strokeLinecap: "round",
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
children: /* @__PURE__ */ n("path", { d: "M5 12h14" })
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function s({ className: s, ...c }) {
|
|
33
|
+
return /* @__PURE__ */ n(i.Root, {
|
|
34
|
+
"data-pharos-slot": "checkbox",
|
|
35
|
+
className: e(t.root, s),
|
|
36
|
+
...c,
|
|
37
|
+
children: /* @__PURE__ */ r(i.Indicator, {
|
|
38
|
+
className: t.indicator,
|
|
39
|
+
children: [/* @__PURE__ */ n(a, {}), /* @__PURE__ */ n(o, {})]
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
s.displayName = "Checkbox";
|
|
44
|
+
//#endregion
|
|
45
|
+
export { s as Checkbox };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":[],"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentProps } from 'react';\nimport { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { cn } from '../lib/cn';\nimport styles from './Checkbox.module.css';\n\n/**\n * A single square checkbox control (the shadcn **Checkbox** contract). Wraps\n * Base UI's `Checkbox`, which renders a `role=\"checkbox\"` button plus a hidden\n * form input, and carries the ARIA state (`aria-checked`, including the\n * `mixed` value for the indeterminate state), keyboard toggle (Space) and\n * focus handling.\n *\n * Like `Input` / `Textarea` (Escuela 1, D11), the atom owns no label: pair it\n * with a `<label htmlFor>`. Error state is conveyed via `aria-invalid`, not a\n * custom prop.\n *\n * Indeterminate uses Base UI's boolean `indeterminate` prop (not shadcn's\n * `checked=\"indeterminate\"` string union — a Radix quirk). Base UI's split is\n * cleaner and better typed; per Rule #0 the DS follows the primitive here.\n *\n * @example\n * <label htmlFor=\"terms\" className=\"flex items-center gap-2\">\n * <Checkbox id=\"terms\" checked={agreed} onCheckedChange={setAgreed} />\n * I accept the terms\n * </label>\n */\nexport interface CheckboxProps extends ComponentProps<typeof BaseCheckbox.Root> {}\n\nfunction CheckIcon() {\n return (\n <svg\n className={cn(styles.icon, styles.iconCheck)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n );\n}\n\nfunction IndeterminateIcon() {\n return (\n <svg\n className={cn(styles.icon, styles.iconIndeterminate)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M5 12h14\" />\n </svg>\n );\n}\n\nexport function Checkbox({ className, ...rest }: CheckboxProps) {\n return (\n <BaseCheckbox.Root data-pharos-slot=\"checkbox\" className={cn(styles.root, className)} {...rest}>\n <BaseCheckbox.Indicator className={styles.indicator}>\n <CheckIcon />\n <IndeterminateIcon />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n );\n}\n\nCheckbox.displayName = 'Checkbox';\n"],"mappings":";;;;;;AA8BA,SAAS,IAAY;CACnB,OACE,kBAAC,OAAD;EACE,WAAW,EAAG,EAAO,MAAM,EAAO,SAAS;EAC3C,SAAQ;EACR,MAAK;EACL,QAAO;EACP,aAAY;EACZ,eAAc;EACd,gBAAe;EACf,eAAY;YAEZ,kBAAC,QAAD,EAAM,GAAE,kBAAmB,CAAA;CACxB,CAAA;AAET;AAEA,SAAS,IAAoB;CAC3B,OACE,kBAAC,OAAD;EACE,WAAW,EAAG,EAAO,MAAM,EAAO,iBAAiB;EACnD,SAAQ;EACR,MAAK;EACL,QAAO;EACP,aAAY;EACZ,eAAc;EACd,eAAY;YAEZ,kBAAC,QAAD,EAAM,GAAE,WAAY,CAAA;CACjB,CAAA;AAET;AAEA,SAAgB,EAAS,EAAE,cAAW,GAAG,KAAuB;CAC9D,OACE,kBAAC,EAAa,MAAd;EAAmB,oBAAiB;EAAW,WAAW,EAAG,EAAO,MAAM,CAAS;EAAG,GAAI;YACxF,kBAAC,EAAa,WAAd;GAAwB,WAAW,EAAO;aAA1C,CACE,kBAAC,GAAD,CAAY,CAAA,GACZ,kBAAC,GAAD,CAAoB,CAAA,CACE;;CACP,CAAA;AAEvB;AAEA,EAAS,cAAc"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
root: "_root_1v9tz_14",
|
|
3
|
+
indicator: "_indicator_1v9tz_65",
|
|
4
|
+
icon: "_icon_1v9tz_72",
|
|
5
|
+
iconIndeterminate: "_iconIndeterminate_1v9tz_79",
|
|
6
|
+
iconCheck: "_iconCheck_1v9tz_83"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as default };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=Checkbox.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.module.js","names":[],"sources":["../../src/components/Checkbox.module.css"],"sourcesContent":["/* Checkbox.module.css\n *\n * Per-component CSS Modules definition (Decision D9). Hashed into\n * `dist/styles.css`. Styles a single square control (the shadcn \"Checkbox\"\n * contract) over Base UI's `Checkbox`. State is driven by Base UI's\n * `data-checked` / `data-indeterminate` / `data-disabled` attributes.\n *\n * The atom owns no label (Escuela 1, D11): the consumer pairs it with a\n * `<label htmlFor>`. Error state is conveyed with `aria-invalid`, like Input /\n * Textarea. The check / dash marks are inline SVG — the library ships no icon\n * dependency (same convention as Spinner / Select).\n */\n\n.root {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--pharos-spacing-5);\n height: var(--pharos-spacing-5);\n padding: 0;\n\n border: 1px solid var(--pharos-color-neutral-500);\n border-radius: var(--pharos-radius-sm);\n background-color: var(--pharos-color-base-white);\n /* The indicator inherits this via `currentColor`. */\n color: var(--pharos-color-base-white);\n\n cursor: pointer;\n transition-property: background-color, border-color, box-shadow;\n transition-duration: var(--pharos-duration-fast);\n transition-timing-function: var(--pharos-easing-out);\n}\n\n.root:hover:not([data-disabled]):not([data-checked]):not([data-indeterminate]) {\n border-color: var(--pharos-color-neutral-700);\n}\n\n/* Checked and indeterminate share the filled look — the mark differs. */\n.root[data-checked],\n.root[data-indeterminate] {\n background-color: var(--pharos-color-neutral-900);\n border-color: var(--pharos-color-neutral-900);\n}\n\n/* Error state via the standard aria-invalid attribute (D11). */\n.root[aria-invalid='true'] {\n border-color: var(--pharos-color-semantic-error-fg);\n}\n\n.root:focus-visible {\n outline: none;\n /* Same two-stop ring as Button / Input so the system has one focus look. */\n box-shadow:\n 0 0 0 2px var(--pharos-color-base-white),\n 0 0 0 4px var(--pharos-color-primary-600);\n}\n\n.root[data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.indicator {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--pharos-color-base-white);\n}\n\n.icon {\n width: var(--pharos-spacing-3);\n height: var(--pharos-spacing-3);\n}\n\n/* The Indicator renders only when checked or indeterminate; inside it the\n * check shows by default and the dash takes over for the indeterminate state. */\n.iconIndeterminate {\n display: none;\n}\n\n.indicator[data-indeterminate] .iconCheck {\n display: none;\n}\n\n.indicator[data-indeterminate] .iconIndeterminate {\n display: block;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/components/Combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/components/Combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,MAAM,aAAa,CACvB,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,IAC1C,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAuB7C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,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