react-marketing-ui 0.0.2 → 0.0.4
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/accordion.js +1 -1
- package/dist/accordion.js.map +1 -1
- package/dist/accordion.mjs +222 -2
- package/dist/accordion.mjs.map +1 -1
- package/dist/action-swap.js +1 -0
- package/dist/action-swap.mjs +77 -3
- package/dist/action-swap.mjs.map +1 -1
- package/dist/animated-beam.js +1 -0
- package/dist/animated-beam.mjs +127 -2
- package/dist/animated-beam.mjs.map +1 -1
- package/dist/button.js +1 -1
- package/dist/button.js.map +1 -1
- package/dist/button.mjs +115 -2
- package/dist/button.mjs.map +1 -1
- package/dist/card.js +1 -2
- package/dist/card.js.map +1 -1
- package/dist/card.mjs +135 -3
- package/dist/card.mjs.map +1 -1
- package/dist/dia-text-reveal.js +1 -0
- package/dist/dia-text-reveal.mjs +331 -2
- package/dist/dia-text-reveal.mjs.map +1 -1
- package/dist/elevated-input.js +1 -1
- package/dist/elevated-input.js.map +1 -1
- package/dist/elevated-input.mjs +48 -2
- package/dist/elevated-input.mjs.map +1 -1
- package/dist/fade-in.js +1 -0
- package/dist/fade-in.mjs +84 -2
- package/dist/fade-in.mjs.map +1 -1
- package/dist/feature-card.js +1 -1
- package/dist/feature-card.js.map +1 -1
- package/dist/feature-card.mjs +34 -2
- package/dist/feature-card.mjs.map +1 -1
- package/dist/flowchart-parts.js +1 -1
- package/dist/flowchart-parts.js.map +1 -1
- package/dist/flowchart-parts.mjs +91 -2
- package/dist/flowchart-parts.mjs.map +1 -1
- package/dist/glossy-button.js +1 -1
- package/dist/glossy-button.js.map +1 -1
- package/dist/glossy-button.mjs +82 -2
- package/dist/glossy-button.mjs.map +1 -1
- package/dist/grainient.js +1 -0
- package/dist/grainient.mjs +327 -2
- package/dist/grainient.mjs.map +1 -1
- package/dist/highlighter.js +1 -0
- package/dist/highlighter.mjs +122 -3
- package/dist/highlighter.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2642 -32
- package/dist/index.mjs.map +1 -1
- package/dist/input.js +1 -0
- package/dist/input.mjs +107 -2
- package/dist/input.mjs.map +1 -1
- package/dist/lib/breakpoints.js +1 -1
- package/dist/lib/breakpoints.js.map +1 -1
- package/dist/lib/breakpoints.mjs +34 -1
- package/dist/lib/breakpoints.mjs.map +1 -1
- package/dist/lib/cn.js +1 -1
- package/dist/lib/cn.js.map +1 -1
- package/dist/lib/cn.mjs +17 -1
- package/dist/lib/cn.mjs.map +1 -1
- package/dist/lib/ease.js +1 -0
- package/dist/lib/ease.mjs +9 -1
- package/dist/lib/ease.mjs.map +1 -1
- package/dist/lib/surface.js +1 -0
- package/dist/lib/surface.mjs +37 -1
- package/dist/lib/surface.mjs.map +1 -1
- package/dist/lib/use-media-query.js +1 -0
- package/dist/lib/use-media-query.mjs +16 -1
- package/dist/lib/use-media-query.mjs.map +1 -1
- package/dist/liquid-metal.js +1 -0
- package/dist/liquid-metal.mjs +40 -2
- package/dist/liquid-metal.mjs.map +1 -1
- package/dist/navigation-menu-icons.js +1 -1
- package/dist/navigation-menu-icons.js.map +1 -1
- package/dist/navigation-menu-icons.mjs +36 -1
- package/dist/navigation-menu-icons.mjs.map +1 -1
- package/dist/navigation-menu-styles.js +1 -1
- package/dist/navigation-menu-styles.js.map +1 -1
- package/dist/navigation-menu-styles.mjs +11 -1
- package/dist/navigation-menu-styles.mjs.map +1 -1
- package/dist/navigation-menu.js +1 -2
- package/dist/navigation-menu.js.map +1 -1
- package/dist/navigation-menu.mjs +350 -5
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/password-input.js +1 -0
- package/dist/password-input.mjs +171 -3
- package/dist/password-input.mjs.map +1 -1
- package/dist/rainbow-button.js +1 -0
- package/dist/rainbow-button.mjs +45 -2
- package/dist/rainbow-button.mjs.map +1 -1
- package/dist/range-slider.js +1 -0
- package/dist/range-slider.mjs +82 -1
- package/dist/range-slider.mjs.map +1 -1
- package/dist/rolling-badge.js +1 -0
- package/dist/rolling-badge.mjs +68 -2
- package/dist/rolling-badge.mjs.map +1 -1
- package/dist/savings-badge.js +1 -1
- package/dist/savings-badge.js.map +1 -1
- package/dist/savings-badge.mjs +22 -2
- package/dist/savings-badge.mjs.map +1 -1
- package/dist/shine-border.js +1 -0
- package/dist/shine-border.mjs +44 -2
- package/dist/shine-border.mjs.map +1 -1
- package/dist/sparkles-text.js +1 -0
- package/dist/sparkles-text.mjs +84 -3
- package/dist/sparkles-text.mjs.map +1 -1
- package/dist/tabs.js +1 -0
- package/dist/tabs.mjs +118 -2
- package/dist/tabs.mjs.map +1 -1
- package/dist/theme-toggle.js +1 -0
- package/dist/theme-toggle.mjs +248 -5
- package/dist/theme-toggle.mjs.map +1 -1
- package/package.json +68 -68
- package/dist/chunk-3SB6HUBA.mjs +0 -31
- package/dist/chunk-3SB6HUBA.mjs.map +0 -1
- package/dist/chunk-4PBVBXGY.mjs +0 -84
- package/dist/chunk-4PBVBXGY.mjs.map +0 -1
- package/dist/chunk-4VCFWVSJ.mjs +0 -42
- package/dist/chunk-4VCFWVSJ.mjs.map +0 -1
- package/dist/chunk-5QQAPGR2.mjs +0 -109
- package/dist/chunk-5QQAPGR2.mjs.map +0 -1
- package/dist/chunk-6MB4UKRX.mjs +0 -19
- package/dist/chunk-6MB4UKRX.mjs.map +0 -1
- package/dist/chunk-6T5LR34O.mjs +0 -45
- package/dist/chunk-6T5LR34O.mjs.map +0 -1
- package/dist/chunk-AYLCYDUM.mjs +0 -275
- package/dist/chunk-AYLCYDUM.mjs.map +0 -1
- package/dist/chunk-AYY7D2RJ.mjs +0 -112
- package/dist/chunk-AYY7D2RJ.mjs.map +0 -1
- package/dist/chunk-CTZEI2YS.mjs +0 -324
- package/dist/chunk-CTZEI2YS.mjs.map +0 -1
- package/dist/chunk-DA3I3Y5O.mjs +0 -71
- package/dist/chunk-DA3I3Y5O.mjs.map +0 -1
- package/dist/chunk-EYHT2EWJ.mjs +0 -18
- package/dist/chunk-EYHT2EWJ.mjs.map +0 -1
- package/dist/chunk-IHLGCS63.mjs +0 -36
- package/dist/chunk-IHLGCS63.mjs.map +0 -1
- package/dist/chunk-JVXJ6SFX.mjs +0 -38
- package/dist/chunk-JVXJ6SFX.mjs.map +0 -1
- package/dist/chunk-KBHYXLRG.mjs +0 -13
- package/dist/chunk-KBHYXLRG.mjs.map +0 -1
- package/dist/chunk-KMXUQYR3.mjs +0 -74
- package/dist/chunk-KMXUQYR3.mjs.map +0 -1
- package/dist/chunk-KNPOZ34H.mjs +0 -88
- package/dist/chunk-KNPOZ34H.mjs.map +0 -1
- package/dist/chunk-KRNWCJ4D.mjs +0 -219
- package/dist/chunk-KRNWCJ4D.mjs.map +0 -1
- package/dist/chunk-M5MESV26.mjs +0 -124
- package/dist/chunk-M5MESV26.mjs.map +0 -1
- package/dist/chunk-MJYBPJBA.mjs +0 -115
- package/dist/chunk-MJYBPJBA.mjs.map +0 -1
- package/dist/chunk-NNHPQ67J.mjs +0 -10
- package/dist/chunk-NNHPQ67J.mjs.map +0 -1
- package/dist/chunk-OCZFHVVD.mjs +0 -71
- package/dist/chunk-OCZFHVVD.mjs.map +0 -1
- package/dist/chunk-QAWSH567.mjs +0 -19
- package/dist/chunk-QAWSH567.mjs.map +0 -1
- package/dist/chunk-R2E2J42H.mjs +0 -38
- package/dist/chunk-R2E2J42H.mjs.map +0 -1
- package/dist/chunk-TPGLLSYV.mjs +0 -65
- package/dist/chunk-TPGLLSYV.mjs.map +0 -1
- package/dist/chunk-VJENJHXJ.mjs +0 -72
- package/dist/chunk-VJENJHXJ.mjs.map +0 -1
- package/dist/chunk-W22G7XHR.mjs +0 -104
- package/dist/chunk-W22G7XHR.mjs.map +0 -1
- package/dist/chunk-WDR5VPZJ.mjs +0 -79
- package/dist/chunk-WDR5VPZJ.mjs.map +0 -1
- package/dist/chunk-WLUGKBH7.mjs +0 -37
- package/dist/chunk-WLUGKBH7.mjs.map +0 -1
- package/dist/chunk-WYJYLDUA.mjs +0 -84
- package/dist/chunk-WYJYLDUA.mjs.map +0 -1
- package/dist/chunk-XZEDZVXT.mjs +0 -38
- package/dist/chunk-XZEDZVXT.mjs.map +0 -1
- package/dist/chunk-YKGP5JIL.mjs +0 -328
- package/dist/chunk-YKGP5JIL.mjs.map +0 -1
- package/dist/chunk-YM3U2OBE.mjs +0 -99
- package/dist/chunk-YM3U2OBE.mjs.map +0 -1
package/dist/feature-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts","../src/components/feature-card.tsx"],"names":["twMerge","clsx","jsxs","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/feature-card.tsx"],"names":["twMerge","clsx","jsxs","jsx"],"mappings":";;;;;;AAIO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACkBO,SAAS,YAAY,EAAE,IAAA,EAAM,OAAO,IAAA,EAAM,SAAA,EAAW,WAAU,EAAqB;AACzF,EAAA,uBACEC,eAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,6HAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAAC,KAAA,EAAA,EAAI,WAAU,sHAAA,EACb,QAAA,kBAAAA,cAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAW,EAAA,CAAG,wDAAA,EAA0D,SAAA,IAAa,+BAA+B,CAAA;AAAA,YAEnH,QAAA,EAAA;AAAA;AAAA,SACH,EACF,CAAA;AAAA,wBACAD,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,qBAAA,EACb,QAAA,EAAA;AAAA,0BAAAC,cAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,wDAAA,EAA0D,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,0BAC9EA,cAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,sEAAA,EAAwE,QAAA,EAAA,IAAA,EAAK;AAAA,SAAA,EAC5F;AAAA;AAAA;AAAA,GACF;AAEJ","file":"feature-card.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","import type { ReactNode } from 'react';\nimport { cn } from '../lib/utils.js';\n\nexport type FeatureCardProps = {\n /** Icon rendered in the elevated top-left box. Pass any ReactNode (e.g. an\n * inlined SVG or an iconify <Icon icon={...} />). */\n icon: ReactNode;\n title: string;\n body: string;\n /** Icon colour class, e.g. `text-violet-500`. Defaults to the secondary foreground tone. */\n iconColor?: string;\n /** Extra classes merged onto the card root. */\n className?: string;\n};\n\n/**\n * Shared marketing feature card: a soft-filled panel with an elevated icon box\n * above a title + body. Used across the /security, /syncing, /web-access pages\n * and future copy pages.\n *\n * Geometry mirrors the design-system reference (p-6 → lg:p-8 → xl:p-10, icon box\n * size-10 → lg:size-12); the design tokens are mapped onto this library's own\n * variables so both themes stay in sync.\n */\nexport function FeatureCard({ icon, title, body, iconColor, className }: FeatureCardProps) {\n return (\n <div\n className={cn(\n 'flex w-full flex-col justify-between gap-6 rounded-[20px] bg-(--muted) p-6 lg:gap-8 lg:rounded-3xl lg:p-8 xl:gap-10 xl:p-10',\n className,\n )}\n >\n <div className=\"flex size-10 items-center justify-center rounded-[10px] bg-(--surface) shadow-(--shadow-sm) lg:size-12 lg:rounded-md\">\n <span\n className={cn('flex h-5 w-5 items-center justify-center lg:h-6 lg:w-6', iconColor ?? 'text-(--foreground-secondary)')}\n >\n {icon}\n </span>\n </div>\n <div className=\"flex flex-col gap-2\">\n <h3 className=\"font-semibold text-[15px] text-foreground lg:text-base\">{title}</h3>\n <p className=\"text-(--foreground-secondary) text-[13px] leading-relaxed lg:text-sm\">{body}</p>\n </div>\n </div>\n );\n}\n"]}
|
package/dist/feature-card.mjs
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return twMerge(clsx(inputs));
|
|
8
|
+
}
|
|
9
|
+
function FeatureCard({ icon, title, body, iconColor, className }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: cn(
|
|
14
|
+
"flex w-full flex-col justify-between gap-6 rounded-[20px] bg-(--muted) p-6 lg:gap-8 lg:rounded-3xl lg:p-8 xl:gap-10 xl:p-10",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx("div", { className: "flex size-10 items-center justify-center rounded-[10px] bg-(--surface) shadow-(--shadow-sm) lg:size-12 lg:rounded-md", children: /* @__PURE__ */ jsx(
|
|
19
|
+
"span",
|
|
20
|
+
{
|
|
21
|
+
className: cn("flex h-5 w-5 items-center justify-center lg:h-6 lg:w-6", iconColor ?? "text-(--foreground-secondary)"),
|
|
22
|
+
children: icon
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
26
|
+
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-[15px] text-foreground lg:text-base", children: title }),
|
|
27
|
+
/* @__PURE__ */ jsx("p", { className: "text-(--foreground-secondary) text-[13px] leading-relaxed lg:text-sm", children: body })
|
|
28
|
+
] })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { FeatureCard };
|
|
3
35
|
//# sourceMappingURL=feature-card.mjs.map
|
|
4
36
|
//# sourceMappingURL=feature-card.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"feature-card.mjs"}
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/feature-card.tsx"],"names":[],"mappings":";;;;AAIO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACkBO,SAAS,YAAY,EAAE,IAAA,EAAM,OAAO,IAAA,EAAM,SAAA,EAAW,WAAU,EAAqB;AACzF,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,6HAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,WAAU,sHAAA,EACb,QAAA,kBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAW,EAAA,CAAG,wDAAA,EAA0D,SAAA,IAAa,+BAA+B,CAAA;AAAA,YAEnH,QAAA,EAAA;AAAA;AAAA,SACH,EACF,CAAA;AAAA,wBACA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,qBAAA,EACb,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,wDAAA,EAA0D,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,0BAC9E,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,sEAAA,EAAwE,QAAA,EAAA,IAAA,EAAK;AAAA,SAAA,EAC5F;AAAA;AAAA;AAAA,GACF;AAEJ","file":"feature-card.mjs","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","import type { ReactNode } from 'react';\nimport { cn } from '../lib/utils.js';\n\nexport type FeatureCardProps = {\n /** Icon rendered in the elevated top-left box. Pass any ReactNode (e.g. an\n * inlined SVG or an iconify <Icon icon={...} />). */\n icon: ReactNode;\n title: string;\n body: string;\n /** Icon colour class, e.g. `text-violet-500`. Defaults to the secondary foreground tone. */\n iconColor?: string;\n /** Extra classes merged onto the card root. */\n className?: string;\n};\n\n/**\n * Shared marketing feature card: a soft-filled panel with an elevated icon box\n * above a title + body. Used across the /security, /syncing, /web-access pages\n * and future copy pages.\n *\n * Geometry mirrors the design-system reference (p-6 → lg:p-8 → xl:p-10, icon box\n * size-10 → lg:size-12); the design tokens are mapped onto this library's own\n * variables so both themes stay in sync.\n */\nexport function FeatureCard({ icon, title, body, iconColor, className }: FeatureCardProps) {\n return (\n <div\n className={cn(\n 'flex w-full flex-col justify-between gap-6 rounded-[20px] bg-(--muted) p-6 lg:gap-8 lg:rounded-3xl lg:p-8 xl:gap-10 xl:p-10',\n className,\n )}\n >\n <div className=\"flex size-10 items-center justify-center rounded-[10px] bg-(--surface) shadow-(--shadow-sm) lg:size-12 lg:rounded-md\">\n <span\n className={cn('flex h-5 w-5 items-center justify-center lg:h-6 lg:w-6', iconColor ?? 'text-(--foreground-secondary)')}\n >\n {icon}\n </span>\n </div>\n <div className=\"flex flex-col gap-2\">\n <h3 className=\"font-semibold text-[15px] text-foreground lg:text-base\">{title}</h3>\n <p className=\"text-(--foreground-secondary) text-[13px] leading-relaxed lg:text-sm\">{body}</p>\n </div>\n </div>\n );\n}\n"]}
|
package/dist/flowchart-parts.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var clsx = require('clsx');
|
|
4
5
|
var tailwindMerge = require('tailwind-merge');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
|
|
7
|
-
// src/lib/utils.ts
|
|
8
8
|
function cn(...inputs) {
|
|
9
9
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|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sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../lib/utils.js';\n\n// ── Non-exported helpers ──────────────────────────────────────────────────────\n\n/** Downward chevron (rotated square, two borders) placed at the end of a line. */\nconst downChevronClass =\n 'absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)';\n\nconst rightChevronClass =\n 'absolute right-0 top-1/2 size-2 translate-x-1/2 -translate-y-1/2 rotate-45 border-t border-r border-(--foreground-muted)';\n\nconst leftChevronClass =\n 'absolute left-0 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 -rotate-45 border-t border-l border-(--foreground-muted)';\n\n/** Micro label chip that masks the line it sits on. */\nconst microLabelClass =\n 'absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded-full border border-(--border) bg-(--muted) px-1.5 py-px font-mono text-[8.5px] leading-tight text-(--foreground-secondary)';\n\n// ── Exports ───────────────────────────────────────────────────────────────────\n\ntype ArrowRightProps = { label?: string; className?: string };\n\n/** Horizontal connector (left → right) between two snake cells. */\nexport function ArrowRight({ label, className }: ArrowRightProps) {\n return (\n <div className={cn('relative flex items-center', className)}>\n <span className=\"h-px w-full bg-(--foreground-muted)\" />\n <span className={rightChevronClass} />\n {label ? <span className={microLabelClass}>{label}</span> : null}\n </div>\n );\n}\n\ntype ArrowLeftProps = { label?: string; className?: string };\n\n/** Horizontal connector (right → left) between two snake cells. */\nexport function ArrowLeft({ label, className }: ArrowLeftProps) {\n return (\n <div className={cn('relative flex items-center', className)}>\n <span className=\"h-px w-full bg-(--foreground-muted)\" />\n <span className={leftChevronClass} />\n {label ? <span className={microLabelClass}>{label}</span> : null}\n </div>\n );\n}\n\ntype TurnDownProps = { className?: string };\n\n/** Short vertical connector used when the snake drops to the next row. */\nexport function TurnDown({ className }: TurnDownProps) {\n return (\n <div className={cn('relative h-4', className)}>\n <span className=\"absolute left-1/2 top-0 h-full w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className={downChevronClass} />\n </div>\n );\n}\n\ntype SplitArrowProps = { leftLabel?: string; rightLabel?: string; className?: string };\n\n/** One-to-two branch connector: spine down, horizontal arm, drops at 25% / 75%. */\nexport function SplitArrow({ leftLabel, rightLabel, className }: SplitArrowProps) {\n return (\n <div className={cn('relative h-12', className)}>\n <span className=\"absolute left-1/2 top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n {leftLabel ? (\n <span className=\"absolute left-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)\">\n {leftLabel}\n </span>\n ) : null}\n {rightLabel ? (\n <span className=\"absolute right-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)\">\n {rightLabel}\n </span>\n ) : null}\n </div>\n );\n}\n\ntype JoinArrowProps = { className?: string };\n\n/** Two-to-one join connector: risers at 25% / 75%, horizontal arm, spine down. */\nexport function JoinArrow({ className }: JoinArrowProps) {\n return (\n <div className={cn('relative h-12', className)}>\n <span className=\"absolute left-[25%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-1/2 top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n </div>\n );\n}\n\ntype FlowNodeProps = {\n icon?: ReactNode;\n /**\n * Accepted for API compatibility with the site's icon-based version; the icon is now a\n * caller-supplied ReactNode that carries its own sizing/color classes, so this is unused.\n */\n iconClass?: string;\n chipClass?: string;\n title: string;\n body?: string;\n tag?: string;\n children?: ReactNode;\n className?: string;\n};\n\n/** A compact rounded node: icon chip, one-line title, one-line sub, optional children. */\nexport function FlowNode({ icon, chipClass, title, body, tag, children, className }: FlowNodeProps) {\n return (\n <div className={cn('flex h-full flex-col rounded-[12px] border border-(--border) bg-(--surface) p-2.5', className)}>\n <div className=\"flex items-start gap-2\">\n {icon ? (\n <div className={cn('flex size-7 shrink-0 items-center justify-center rounded-[8px]', chipClass ?? 'bg-(--muted)')}>\n {icon}\n </div>\n ) : null}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-x-1.5 gap-y-0.5\">\n <p className=\"font-semibold text-[11px] leading-snug text-foreground sm:text-[12px]\">{title}</p>\n {tag ? (\n <span className=\"rounded-full border border-(--border) px-1.5 py-px font-mono text-[8.5px] text-(--foreground-muted)\">\n {tag}\n </span>\n ) : null}\n </div>\n {body ? <p className=\"mt-0.5 text-[9.5px] leading-snug text-(--foreground-secondary) sm:text-[10px]\">{body}</p> : null}\n </div>\n </div>\n {children ? <div className=\"mt-2\">{children}</div> : null}\n </div>\n );\n}\n\ntype FlowPillProps = { title: string; className?: string };\n\n/** A start/end pill: centered, fits content, sits on the flowchart spine. */\nexport function FlowPill({ title, className }: FlowPillProps) {\n return (\n <div\n className={cn(\n 'mx-auto flex w-fit max-w-full items-center justify-center rounded-full border border-(--border) bg-(--surface) px-4 py-2 text-center',\n className,\n )}\n >\n <p className=\"text-[12px] font-semibold leading-snug text-foreground\">{title}</p>\n </div>\n );\n}\n\ntype FlowDiamondProps = { label: string; sub?: string; className?: string };\n\n/** A compact decision diamond (clip-path, straight text inside). */\nexport function FlowDiamond({ label, sub, className }: FlowDiamondProps) {\n return (\n <div className={cn('relative h-14 w-36 justify-self-center sm:h-16 sm:w-44', className)}>\n <div className=\"absolute inset-0 bg-(--border-hi) [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]\" />\n <div className=\"absolute inset-[1px] flex flex-col items-center justify-center gap-0.5 bg-(--surface) px-6 text-center [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]\">\n <p className=\"text-[11px] font-semibold leading-tight text-foreground sm:text-[12px]\">{label}</p>\n {sub ? <p className=\"text-[8.5px] leading-tight text-(--foreground-muted)\">{sub}</p> : null}\n </div>\n </div>\n );\n}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chart-parts.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../lib/utils.js';\n\n// ── Non-exported helpers ──────────────────────────────────────────────────────\n\n/** Downward chevron (rotated square, two borders) placed at the end of a line. */\nconst downChevronClass =\n 'absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)';\n\nconst rightChevronClass =\n 'absolute right-0 top-1/2 size-2 translate-x-1/2 -translate-y-1/2 rotate-45 border-t border-r border-(--foreground-muted)';\n\nconst leftChevronClass =\n 'absolute left-0 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 -rotate-45 border-t border-l border-(--foreground-muted)';\n\n/** Micro label chip that masks the line it sits on. */\nconst microLabelClass =\n 'absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded-full border border-(--border) bg-(--muted) px-1.5 py-px font-mono text-[8.5px] leading-tight text-(--foreground-secondary)';\n\n// ── Exports ───────────────────────────────────────────────────────────────────\n\ntype ArrowRightProps = { label?: string; className?: string };\n\n/** Horizontal connector (left → right) between two snake cells. */\nexport function ArrowRight({ label, className }: ArrowRightProps) {\n return (\n <div className={cn('relative flex items-center', className)}>\n <span className=\"h-px w-full bg-(--foreground-muted)\" />\n <span className={rightChevronClass} />\n {label ? <span className={microLabelClass}>{label}</span> : null}\n </div>\n );\n}\n\ntype ArrowLeftProps = { label?: string; className?: string };\n\n/** Horizontal connector (right → left) between two snake cells. */\nexport function ArrowLeft({ label, className }: ArrowLeftProps) {\n return (\n <div className={cn('relative flex items-center', className)}>\n <span className=\"h-px w-full bg-(--foreground-muted)\" />\n <span className={leftChevronClass} />\n {label ? <span className={microLabelClass}>{label}</span> : null}\n </div>\n );\n}\n\ntype TurnDownProps = { className?: string };\n\n/** Short vertical connector used when the snake drops to the next row. */\nexport function TurnDown({ className }: TurnDownProps) {\n return (\n <div className={cn('relative h-4', className)}>\n <span className=\"absolute left-1/2 top-0 h-full w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className={downChevronClass} />\n </div>\n );\n}\n\ntype SplitArrowProps = { leftLabel?: string; rightLabel?: string; className?: string };\n\n/** One-to-two branch connector: spine down, horizontal arm, drops at 25% / 75%. */\nexport function SplitArrow({ leftLabel, rightLabel, className }: SplitArrowProps) {\n return (\n <div className={cn('relative h-12', className)}>\n <span className=\"absolute left-1/2 top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n {leftLabel ? (\n <span className=\"absolute left-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)\">\n {leftLabel}\n </span>\n ) : null}\n {rightLabel ? (\n <span className=\"absolute right-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)\">\n {rightLabel}\n </span>\n ) : null}\n </div>\n );\n}\n\ntype JoinArrowProps = { className?: string };\n\n/** Two-to-one join connector: risers at 25% / 75%, horizontal arm, spine down. */\nexport function JoinArrow({ className }: JoinArrowProps) {\n return (\n <div className={cn('relative h-12', className)}>\n <span className=\"absolute left-[25%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-1/2 top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n </div>\n );\n}\n\ntype FlowNodeProps = {\n icon?: ReactNode;\n /**\n * Accepted for API compatibility with the site's icon-based version; the icon is now a\n * caller-supplied ReactNode that carries its own sizing/color classes, so this is unused.\n */\n iconClass?: string;\n chipClass?: string;\n title: string;\n body?: string;\n tag?: string;\n children?: ReactNode;\n className?: string;\n};\n\n/** A compact rounded node: icon chip, one-line title, one-line sub, optional children. */\nexport function FlowNode({ icon, chipClass, title, body, tag, children, className }: FlowNodeProps) {\n return (\n <div className={cn('flex h-full flex-col rounded-[12px] border border-(--border) bg-(--surface) p-2.5', className)}>\n <div className=\"flex items-start gap-2\">\n {icon ? (\n <div className={cn('flex size-7 shrink-0 items-center justify-center rounded-[8px]', chipClass ?? 'bg-(--muted)')}>\n {icon}\n </div>\n ) : null}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-x-1.5 gap-y-0.5\">\n <p className=\"font-semibold text-[11px] leading-snug text-foreground sm:text-[12px]\">{title}</p>\n {tag ? (\n <span className=\"rounded-full border border-(--border) px-1.5 py-px font-mono text-[8.5px] text-(--foreground-muted)\">\n {tag}\n </span>\n ) : null}\n </div>\n {body ? <p className=\"mt-0.5 text-[9.5px] leading-snug text-(--foreground-secondary) sm:text-[10px]\">{body}</p> : null}\n </div>\n </div>\n {children ? <div className=\"mt-2\">{children}</div> : null}\n </div>\n );\n}\n\ntype FlowPillProps = { title: string; className?: string };\n\n/** A start/end pill: centered, fits content, sits on the flowchart spine. */\nexport function FlowPill({ title, className }: FlowPillProps) {\n return (\n <div\n className={cn(\n 'mx-auto flex w-fit max-w-full items-center justify-center rounded-full border border-(--border) bg-(--surface) px-4 py-2 text-center',\n className,\n )}\n >\n <p className=\"text-[12px] font-semibold leading-snug text-foreground\">{title}</p>\n </div>\n );\n}\n\ntype FlowDiamondProps = { label: string; sub?: string; className?: string };\n\n/** A compact decision diamond (clip-path, straight text inside). */\nexport function FlowDiamond({ label, sub, className }: FlowDiamondProps) {\n return (\n <div className={cn('relative h-14 w-36 justify-self-center sm:h-16 sm:w-44', className)}>\n <div className=\"absolute inset-0 bg-(--border-hi) [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]\" />\n <div className=\"absolute inset-[1px] flex flex-col items-center justify-center gap-0.5 bg-(--surface) px-6 text-center [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]\">\n <p className=\"text-[11px] font-semibold leading-tight text-foreground sm:text-[12px]\">{label}</p>\n {sub ? <p className=\"text-[8.5px] leading-tight text-(--foreground-muted)\">{sub}</p> : null}\n </div>\n </div>\n );\n}\n"]}
|
package/dist/flowchart-parts.mjs
CHANGED
|
@@ -1,4 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return twMerge(clsx(inputs));
|
|
8
|
+
}
|
|
9
|
+
var downChevronClass = "absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)";
|
|
10
|
+
var rightChevronClass = "absolute right-0 top-1/2 size-2 translate-x-1/2 -translate-y-1/2 rotate-45 border-t border-r border-(--foreground-muted)";
|
|
11
|
+
var leftChevronClass = "absolute left-0 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 -rotate-45 border-t border-l border-(--foreground-muted)";
|
|
12
|
+
var microLabelClass = "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded-full border border-(--border) bg-(--muted) px-1.5 py-px font-mono text-[8.5px] leading-tight text-(--foreground-secondary)";
|
|
13
|
+
function ArrowRight({ label, className }) {
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative flex items-center", className), children: [
|
|
15
|
+
/* @__PURE__ */ jsx("span", { className: "h-px w-full bg-(--foreground-muted)" }),
|
|
16
|
+
/* @__PURE__ */ jsx("span", { className: rightChevronClass }),
|
|
17
|
+
label ? /* @__PURE__ */ jsx("span", { className: microLabelClass, children: label }) : null
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
function ArrowLeft({ label, className }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative flex items-center", className), children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { className: "h-px w-full bg-(--foreground-muted)" }),
|
|
23
|
+
/* @__PURE__ */ jsx("span", { className: leftChevronClass }),
|
|
24
|
+
label ? /* @__PURE__ */ jsx("span", { className: microLabelClass, children: label }) : null
|
|
25
|
+
] });
|
|
26
|
+
}
|
|
27
|
+
function TurnDown({ className }) {
|
|
28
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative h-4", className), children: [
|
|
29
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-0 h-full w-px -translate-x-1/2 bg-(--foreground-muted)" }),
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: downChevronClass })
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
33
|
+
function SplitArrow({ leftLabel, rightLabel, className }) {
|
|
34
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative h-12", className), children: [
|
|
35
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)" }),
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)" }),
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[25%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)" }),
|
|
38
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[75%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)" }),
|
|
39
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[25%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)" }),
|
|
40
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[75%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)" }),
|
|
41
|
+
leftLabel ? /* @__PURE__ */ jsx("span", { className: "absolute left-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)", children: leftLabel }) : null,
|
|
42
|
+
rightLabel ? /* @__PURE__ */ jsx("span", { className: "absolute right-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)", children: rightLabel }) : null
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
function JoinArrow({ className }) {
|
|
46
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative h-12", className), children: [
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[25%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)" }),
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[75%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)" }),
|
|
49
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)" }),
|
|
50
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)" }),
|
|
51
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)" })
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
function FlowNode({ icon, chipClass, title, body, tag, children, className }) {
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex h-full flex-col rounded-[12px] border border-(--border) bg-(--surface) p-2.5", className), children: [
|
|
56
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
57
|
+
icon ? /* @__PURE__ */ jsx("div", { className: cn("flex size-7 shrink-0 items-center justify-center rounded-[8px]", chipClass ?? "bg-(--muted)"), children: icon }) : null,
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-1.5 gap-y-0.5", children: [
|
|
60
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-[11px] leading-snug text-foreground sm:text-[12px]", children: title }),
|
|
61
|
+
tag ? /* @__PURE__ */ jsx("span", { className: "rounded-full border border-(--border) px-1.5 py-px font-mono text-[8.5px] text-(--foreground-muted)", children: tag }) : null
|
|
62
|
+
] }),
|
|
63
|
+
body ? /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-[9.5px] leading-snug text-(--foreground-secondary) sm:text-[10px]", children: body }) : null
|
|
64
|
+
] })
|
|
65
|
+
] }),
|
|
66
|
+
children ? /* @__PURE__ */ jsx("div", { className: "mt-2", children }) : null
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
function FlowPill({ title, className }) {
|
|
70
|
+
return /* @__PURE__ */ jsx(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: cn(
|
|
74
|
+
"mx-auto flex w-fit max-w-full items-center justify-center rounded-full border border-(--border) bg-(--surface) px-4 py-2 text-center",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
children: /* @__PURE__ */ jsx("p", { className: "text-[12px] font-semibold leading-snug text-foreground", children: title })
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function FlowDiamond({ label, sub, className }) {
|
|
82
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative h-14 w-36 justify-self-center sm:h-16 sm:w-44", className), children: [
|
|
83
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-(--border-hi) [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]" }),
|
|
84
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute inset-[1px] flex flex-col items-center justify-center gap-0.5 bg-(--surface) px-6 text-center [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]", children: [
|
|
85
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] font-semibold leading-tight text-foreground sm:text-[12px]", children: label }),
|
|
86
|
+
sub ? /* @__PURE__ */ jsx("p", { className: "text-[8.5px] leading-tight text-(--foreground-muted)", children: sub }) : null
|
|
87
|
+
] })
|
|
88
|
+
] });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { ArrowLeft, ArrowRight, FlowDiamond, FlowNode, FlowPill, JoinArrow, SplitArrow, TurnDown };
|
|
3
92
|
//# sourceMappingURL=flowchart-parts.mjs.map
|
|
4
93
|
//# sourceMappingURL=flowchart-parts.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"flowchart-parts.mjs"}
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/flowchart-parts.tsx"],"names":[],"mappings":";;;;AAIO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACCA,IAAM,gBAAA,GACJ,6HAAA;AAEF,IAAM,iBAAA,GACJ,0HAAA;AAEF,IAAM,gBAAA,GACJ,2HAAA;AAGF,IAAM,eAAA,GACJ,kNAAA;AAOK,SAAS,UAAA,CAAW,EAAE,KAAA,EAAO,SAAA,EAAU,EAAoB;AAChE,EAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,4BAAA,EAA8B,SAAS,CAAA,EACxD,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,WAAU,qCAAA,EAAsC,CAAA;AAAA,oBACtD,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,iBAAA,EAAmB,CAAA;AAAA,IACnC,wBAAQ,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,eAAA,EAAkB,iBAAM,CAAA,GAAU;AAAA,GAAA,EAC9D,CAAA;AAEJ;AAKO,SAAS,SAAA,CAAU,EAAE,KAAA,EAAO,SAAA,EAAU,EAAmB;AAC9D,EAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,4BAA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,SAAA,EAAU,2JAAA,EACb,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,wEAAA,EAA0E,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MAC5F,sBAAM,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,sDAAA,EAAwD,eAAI,CAAA,GAAO;AAAA,KAAA,EACzF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"flowchart-parts.mjs","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../lib/utils.js';\n\n// ── Non-exported helpers ──────────────────────────────────────────────────────\n\n/** Downward chevron (rotated square, two borders) placed at the end of a line. */\nconst downChevronClass =\n 'absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)';\n\nconst rightChevronClass =\n 'absolute right-0 top-1/2 size-2 translate-x-1/2 -translate-y-1/2 rotate-45 border-t border-r border-(--foreground-muted)';\n\nconst leftChevronClass =\n 'absolute left-0 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 -rotate-45 border-t border-l border-(--foreground-muted)';\n\n/** Micro label chip that masks the line it sits on. */\nconst microLabelClass =\n 'absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded-full border border-(--border) bg-(--muted) px-1.5 py-px font-mono text-[8.5px] leading-tight text-(--foreground-secondary)';\n\n// ── Exports ───────────────────────────────────────────────────────────────────\n\ntype ArrowRightProps = { label?: string; className?: string };\n\n/** Horizontal connector (left → right) between two snake cells. */\nexport function ArrowRight({ label, className }: ArrowRightProps) {\n return (\n <div className={cn('relative flex items-center', className)}>\n <span className=\"h-px w-full bg-(--foreground-muted)\" />\n <span className={rightChevronClass} />\n {label ? <span className={microLabelClass}>{label}</span> : null}\n </div>\n );\n}\n\ntype ArrowLeftProps = { label?: string; className?: string };\n\n/** Horizontal connector (right → left) between two snake cells. */\nexport function ArrowLeft({ label, className }: ArrowLeftProps) {\n return (\n <div className={cn('relative flex items-center', className)}>\n <span className=\"h-px w-full bg-(--foreground-muted)\" />\n <span className={leftChevronClass} />\n {label ? <span className={microLabelClass}>{label}</span> : null}\n </div>\n );\n}\n\ntype TurnDownProps = { className?: string };\n\n/** Short vertical connector used when the snake drops to the next row. */\nexport function TurnDown({ className }: TurnDownProps) {\n return (\n <div className={cn('relative h-4', className)}>\n <span className=\"absolute left-1/2 top-0 h-full w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className={downChevronClass} />\n </div>\n );\n}\n\ntype SplitArrowProps = { leftLabel?: string; rightLabel?: string; className?: string };\n\n/** One-to-two branch connector: spine down, horizontal arm, drops at 25% / 75%. */\nexport function SplitArrow({ leftLabel, rightLabel, className }: SplitArrowProps) {\n return (\n <div className={cn('relative h-12', className)}>\n <span className=\"absolute left-1/2 top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n {leftLabel ? (\n <span className=\"absolute left-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)\">\n {leftLabel}\n </span>\n ) : null}\n {rightLabel ? (\n <span className=\"absolute right-[30%] top-1/2 -translate-y-1/2 rounded-full border border-(--border) bg-(--muted) px-2 py-0.5 font-mono text-[10px] text-(--foreground-secondary)\">\n {rightLabel}\n </span>\n ) : null}\n </div>\n );\n}\n\ntype JoinArrowProps = { className?: string };\n\n/** Two-to-one join connector: risers at 25% / 75%, horizontal arm, spine down. */\nexport function JoinArrow({ className }: JoinArrowProps) {\n return (\n <div className={cn('relative h-12', className)}>\n <span className=\"absolute left-[25%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[75%] top-0 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-[25%] right-[25%] top-1/2 h-px -translate-y-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-1/2 top-1/2 h-1/2 w-px -translate-x-1/2 bg-(--foreground-muted)\" />\n <span className=\"absolute left-1/2 top-full size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-b border-r border-(--foreground-muted)\" />\n </div>\n );\n}\n\ntype FlowNodeProps = {\n icon?: ReactNode;\n /**\n * Accepted for API compatibility with the site's icon-based version; the icon is now a\n * caller-supplied ReactNode that carries its own sizing/color classes, so this is unused.\n */\n iconClass?: string;\n chipClass?: string;\n title: string;\n body?: string;\n tag?: string;\n children?: ReactNode;\n className?: string;\n};\n\n/** A compact rounded node: icon chip, one-line title, one-line sub, optional children. */\nexport function FlowNode({ icon, chipClass, title, body, tag, children, className }: FlowNodeProps) {\n return (\n <div className={cn('flex h-full flex-col rounded-[12px] border border-(--border) bg-(--surface) p-2.5', className)}>\n <div className=\"flex items-start gap-2\">\n {icon ? (\n <div className={cn('flex size-7 shrink-0 items-center justify-center rounded-[8px]', chipClass ?? 'bg-(--muted)')}>\n {icon}\n </div>\n ) : null}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-x-1.5 gap-y-0.5\">\n <p className=\"font-semibold text-[11px] leading-snug text-foreground sm:text-[12px]\">{title}</p>\n {tag ? (\n <span className=\"rounded-full border border-(--border) px-1.5 py-px font-mono text-[8.5px] text-(--foreground-muted)\">\n {tag}\n </span>\n ) : null}\n </div>\n {body ? <p className=\"mt-0.5 text-[9.5px] leading-snug text-(--foreground-secondary) sm:text-[10px]\">{body}</p> : null}\n </div>\n </div>\n {children ? <div className=\"mt-2\">{children}</div> : null}\n </div>\n );\n}\n\ntype FlowPillProps = { title: string; className?: string };\n\n/** A start/end pill: centered, fits content, sits on the flowchart spine. */\nexport function FlowPill({ title, className }: FlowPillProps) {\n return (\n <div\n className={cn(\n 'mx-auto flex w-fit max-w-full items-center justify-center rounded-full border border-(--border) bg-(--surface) px-4 py-2 text-center',\n className,\n )}\n >\n <p className=\"text-[12px] font-semibold leading-snug text-foreground\">{title}</p>\n </div>\n );\n}\n\ntype FlowDiamondProps = { label: string; sub?: string; className?: string };\n\n/** A compact decision diamond (clip-path, straight text inside). */\nexport function FlowDiamond({ label, sub, className }: FlowDiamondProps) {\n return (\n <div className={cn('relative h-14 w-36 justify-self-center sm:h-16 sm:w-44', className)}>\n <div className=\"absolute inset-0 bg-(--border-hi) [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]\" />\n <div className=\"absolute inset-[1px] flex flex-col items-center justify-center gap-0.5 bg-(--surface) px-6 text-center [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]\">\n <p className=\"text-[11px] font-semibold leading-tight text-foreground sm:text-[12px]\">{label}</p>\n {sub ? <p className=\"text-[8.5px] leading-tight text-(--foreground-muted)\">{sub}</p> : null}\n </div>\n </div>\n );\n}\n"]}
|
package/dist/glossy-button.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var classVarianceAuthority = require('class-variance-authority');
|
|
@@ -5,7 +6,6 @@ var clsx = require('clsx');
|
|
|
5
6
|
var tailwindMerge = require('tailwind-merge');
|
|
6
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
|
|
8
|
-
// src/components/glossy-button.tsx
|
|
9
9
|
function cn(...inputs) {
|
|
10
10
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts","../src/components/glossy-button.tsx"],"names":["twMerge","clsx","cva","jsxs","Fragment","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/glossy-button.tsx"],"names":["twMerge","clsx","cva","jsxs","Fragment","jsx"],"mappings":";;;;;;;AAIO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;AC6BA,IAAM,UAAA,GAAa,EAAA;AAAA,EACjB,+DAAA;AAAA,EACA,sEAAA;AAAA,EACA,gCAAA;AAAA;AAAA,EAEA,+DAAA;AAAA,EACA,iEAAA;AAAA;AAAA,EAEA,8HAAA;AAAA;AAAA;AAAA,EAGA,yFAAA;AAAA,EACA,wHAAA;AA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A,CAAqB,EAAE,MAAM,OAAA,EAAS,GAAG,SAAS,CAAA;AAE7E,EAAA,IAAI,OAAO,YAAA,KAAiB,QAAA;AAC1B,IAAA,uBACEA,cAAA,CAAC,GAAA,EAAA,EAAE,IAAA,EAAM,YAAA,EAAc,SAAA,EAAW,EAAA,CAAG,eAAA,EAAiB,cAAc,CAAA,EAAG,YAAA,EAAY,SAAA,EAChF,QAAA,EAAA,OAAA,EACH,CAAA;AAGJ,EAAA,uBACEA,cAAA,CAAC,QAAA,EAAA,EAAO,IAAA,EAAK,QAAA,EAAS,SAAA,EAAW,eAAA,EAAiB,OAAA,EAAS,YAAA,EAAc,QAAA,EAAoB,YAAA,EAAY,SAAA,EACtG,QAAA,EAAA,OAAA,EACH,CAAA;AAEJ","file":"glossy-button.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ReactNode } from 'react';\nimport { cn } from '../lib/utils.js';\n\n/**\n * Physically-lit button: a domed, back-lit key built from one effect layer.\n *\n * The geometry lives in a single `box-shadow` list that gets swapped wholesale on\n * press, so the bevel and cast can drop out while the rim survives without any\n * of them being separate elements:\n *\n * • the gloss span — face fill + the shadow list (bevel, rim, cast).\n * • its `before:` — the dome gradient, painted over the face.\n * • its `after:` — the hover/press tint, the only thing that cross-fades.\n *\n * The recipe lives in `global.css`. Every colour is a `--btn-*` primitive, and\n * the two shadow composites are declared on `.glossy` — on the key itself, not\n * on `:root` — because a var() inside a custom property is substituted where the\n * property is *declared*. That's what lets one `.glossy-<variant>` class restyle\n * the whole recipe by setting primitives, and it's why there are no `dark:`\n * variants here: `.dark` overrides the same primitives.\n *\n * The span is a sibling of the label rather than its parent so the label never\n * inherits the effect layers' stacking or transitions; `isolate` on the root\n * contains the span's negative z-index.\n *\n * Server-renderable: every state is pure CSS. Passing a function as\n * `actionOrLink` requires a client-component parent, as with any onClick prop.\n */\n\n/**\n * The whole visual treatment. Absolutely positioned behind the label, with the\n * dome (`before:`) and the interaction tint (`after:`) stacked over the face.\n * Only the tint animates opacity; the shadow list animates by being replaced.\n */\nconst glossLayer = cn(\n 'pointer-events-none absolute inset-0 z-[-1] rounded-[inherit]',\n '[background-color:var(--btn-face)] [box-shadow:var(--shadow-button)]',\n 'transition-shadow duration-150',\n // Pressed (and disabled): bevel + cast go transparent, the rim stays.\n 'group-active/glossy:[box-shadow:var(--shadow-button-pressed)]',\n 'group-disabled/glossy:[box-shadow:var(--shadow-button-pressed)]',\n // Dome — fixed direction, per-variant stops. Above the face, below the tint.\n \"before:absolute before:inset-0 before:rounded-[inherit] before:content-[''] before:[background-image:var(--gradient-button)]\",\n // Interaction tint. Hidden outright when disabled, and on touch (no hover\n // state to speak of) so the root's active:opacity can carry the press instead.\n \"after:absolute after:inset-0 after:rounded-[inherit] after:content-[''] after:opacity-0\",\n 'after:[background-color:var(--btn-tint-hover)] after:transition-opacity after:duration-150 after:[will-change:opacity]',\n 'group-hover/glossy:after:opacity-100',\n 'group-active/glossy:after:[background-color:var(--btn-tint-active)]',\n 'group-disabled/glossy:after:hidden [@media(hover:none)]:after:hidden',\n);\n\nconst glossyButtonVariants = cva(\n cn(\n 'glossy group/glossy relative isolate inline-flex cursor-pointer select-none items-center justify-center gap-1 whitespace-nowrap rounded-full font-normal',\n // Label colour rides the variant. Kept as a utility rather than a plain\n // declaration on `.glossy` so a caller's own text-* class still wins.\n '[color:var(--btn-fg)]',\n 'disabled:cursor-default disabled:opacity-50',\n // Touch devices get no hover layer, so the whole key dims on press instead.\n '[@media(hover:none)]:active:opacity-80',\n ),\n {\n variants: {\n size: {\n sm: 'h-8 px-2.5 text-sm',\n md: 'h-9 px-5 text-[17px]',\n lg: 'h-11 px-6 text-[17px]',\n },\n /**\n * Written out as literal class names — Tailwind's scanner is static, so a\n * `glossy-${variant}` template would never make it into the stylesheet.\n * `neutral` is the bare recipe, so it needs no class of its own.\n */\n variant: {\n neutral: '',\n accent: 'glossy-accent',\n destructive: 'glossy-destructive',\n special: 'glossy-special',\n positive: 'glossy-positive',\n attention: 'glossy-attention',\n highlight: 'glossy-highlight',\n inverse: 'glossy-inverse',\n },\n },\n defaultVariants: { size: 'md', variant: 'neutral' },\n },\n);\n\nexport type GlossyButtonProps = VariantProps<typeof glossyButtonVariants> & {\n /**\n * String → renders as a plain <a href={...}>.\n * Function → renders as a <button type=\"button\" onClick={...}>.\n */\n actionOrLink: string | (() => void);\n children: ReactNode;\n /** Button-only — an anchor can't be disabled. */\n disabled?: boolean;\n className?: string;\n 'aria-label'?: string;\n};\n\nexport function GlossyButton({\n size,\n variant,\n actionOrLink,\n children,\n disabled,\n className,\n 'aria-label': ariaLabel,\n}: GlossyButtonProps) {\n const content = (\n <>\n <span data-fx-layer=\"gloss\" aria-hidden={true} className={glossLayer} />\n <span className=\"px-0.5\">{children}</span>\n </>\n );\n\n const buttonClassName = cn(glossyButtonVariants({ size, variant }), className);\n\n if (typeof actionOrLink === 'string')\n return (\n <a href={actionOrLink} className={cn(buttonClassName, 'no-underline')} aria-label={ariaLabel}>\n {content}\n </a>\n );\n\n return (\n <button type=\"button\" className={buttonClassName} onClick={actionOrLink} disabled={disabled} aria-label={ariaLabel}>\n {content}\n </button>\n );\n}\n\nexport { glossyButtonVariants };\n"]}
|
package/dist/glossy-button.mjs
CHANGED
|
@@ -1,4 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
1
|
+
"use client";
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
var glossLayer = cn(
|
|
11
|
+
"pointer-events-none absolute inset-0 z-[-1] rounded-[inherit]",
|
|
12
|
+
"[background-color:var(--btn-face)] [box-shadow:var(--shadow-button)]",
|
|
13
|
+
"transition-shadow duration-150",
|
|
14
|
+
// Pressed (and disabled): bevel + cast go transparent, the rim stays.
|
|
15
|
+
"group-active/glossy:[box-shadow:var(--shadow-button-pressed)]",
|
|
16
|
+
"group-disabled/glossy:[box-shadow:var(--shadow-button-pressed)]",
|
|
17
|
+
// Dome — fixed direction, per-variant stops. Above the face, below the tint.
|
|
18
|
+
"before:absolute before:inset-0 before:rounded-[inherit] before:content-[''] before:[background-image:var(--gradient-button)]",
|
|
19
|
+
// Interaction tint. Hidden outright when disabled, and on touch (no hover
|
|
20
|
+
// state to speak of) so the root's active:opacity can carry the press instead.
|
|
21
|
+
"after:absolute after:inset-0 after:rounded-[inherit] after:content-[''] after:opacity-0",
|
|
22
|
+
"after:[background-color:var(--btn-tint-hover)] after:transition-opacity after:duration-150 after:[will-change:opacity]",
|
|
23
|
+
"group-hover/glossy:after:opacity-100",
|
|
24
|
+
"group-active/glossy:after:[background-color:var(--btn-tint-active)]",
|
|
25
|
+
"group-disabled/glossy:after:hidden [@media(hover:none)]:after:hidden"
|
|
26
|
+
);
|
|
27
|
+
var glossyButtonVariants = cva(
|
|
28
|
+
cn(
|
|
29
|
+
"glossy group/glossy relative isolate inline-flex cursor-pointer select-none items-center justify-center gap-1 whitespace-nowrap rounded-full font-normal",
|
|
30
|
+
// Label colour rides the variant. Kept as a utility rather than a plain
|
|
31
|
+
// declaration on `.glossy` so a caller's own text-* class still wins.
|
|
32
|
+
"[color:var(--btn-fg)]",
|
|
33
|
+
"disabled:cursor-default disabled:opacity-50",
|
|
34
|
+
// Touch devices get no hover layer, so the whole key dims on press instead.
|
|
35
|
+
"[@media(hover:none)]:active:opacity-80"
|
|
36
|
+
),
|
|
37
|
+
{
|
|
38
|
+
variants: {
|
|
39
|
+
size: {
|
|
40
|
+
sm: "h-8 px-2.5 text-sm",
|
|
41
|
+
md: "h-9 px-5 text-[17px]",
|
|
42
|
+
lg: "h-11 px-6 text-[17px]"
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Written out as literal class names — Tailwind's scanner is static, so a
|
|
46
|
+
* `glossy-${variant}` template would never make it into the stylesheet.
|
|
47
|
+
* `neutral` is the bare recipe, so it needs no class of its own.
|
|
48
|
+
*/
|
|
49
|
+
variant: {
|
|
50
|
+
neutral: "",
|
|
51
|
+
accent: "glossy-accent",
|
|
52
|
+
destructive: "glossy-destructive",
|
|
53
|
+
special: "glossy-special",
|
|
54
|
+
positive: "glossy-positive",
|
|
55
|
+
attention: "glossy-attention",
|
|
56
|
+
highlight: "glossy-highlight",
|
|
57
|
+
inverse: "glossy-inverse"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: { size: "md", variant: "neutral" }
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
function GlossyButton({
|
|
64
|
+
size,
|
|
65
|
+
variant,
|
|
66
|
+
actionOrLink,
|
|
67
|
+
children,
|
|
68
|
+
disabled,
|
|
69
|
+
className,
|
|
70
|
+
"aria-label": ariaLabel
|
|
71
|
+
}) {
|
|
72
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx("span", { "data-fx-layer": "gloss", "aria-hidden": true, className: glossLayer }),
|
|
74
|
+
/* @__PURE__ */ jsx("span", { className: "px-0.5", children })
|
|
75
|
+
] });
|
|
76
|
+
const buttonClassName = cn(glossyButtonVariants({ size, variant }), className);
|
|
77
|
+
if (typeof actionOrLink === "string")
|
|
78
|
+
return /* @__PURE__ */ jsx("a", { href: actionOrLink, className: cn(buttonClassName, "no-underline"), "aria-label": ariaLabel, children: content });
|
|
79
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: buttonClassName, onClick: actionOrLink, disabled, "aria-label": ariaLabel, children: content });
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { GlossyButton, glossyButtonVariants };
|
|
3
83
|
//# sourceMappingURL=glossy-button.mjs.map
|
|
4
84
|
//# sourceMappingURL=glossy-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"glossy-button.mjs"}
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/glossy-button.tsx"],"names":[],"mappings":";;;;;AAIO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;AC6BA,IAAM,UAAA,GAAa,EAAA;AAAA,EACjB,+DAAA;AAAA,EACA,sEAAA;AAAA,EACA,gCAAA;AAAA;AAAA,EAEA,+DAAA;AAAA,EACA,iEAAA;AAAA;AAAA,EAEA,8HAAA;AAAA;AAAA;AAAA,EAGA,yFAAA;AAAA,EACA,wHAAA;AAAA,EACA,sCAAA;AAAA,EACA,qEAAA;AAAA,EACA;AACF,CAAA;AAEA,IAAM,oBAAA,GAAuB,GAAA;AAAA,EAC3B,EAAA;AAAA,IACE,0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,GAAA,EAAA,EAAE,IAAA,EAAM,YAAA,EAAc,SAAA,EAAW,EAAA,CAAG,eAAA,EAAiB,cAAc,CAAA,EAAG,YAAA,EAAY,SAAA,EAChF,QAAA,EAAA,OAAA,EACH,CAAA;AAGJ,EAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAO,IAAA,EAAK,QAAA,EAAS,SAAA,EAAW,eAAA,EAAiB,OAAA,EAAS,YAAA,EAAc,QAAA,EAAoB,YAAA,EAAY,SAAA,EACtG,QAAA,EAAA,OAAA,EACH,CAAA;AAEJ","file":"glossy-button.mjs","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ReactNode } from 'react';\nimport { cn } from '../lib/utils.js';\n\n/**\n * Physically-lit button: a domed, back-lit key built from one effect layer.\n *\n * The geometry lives in a single `box-shadow` list that gets swapped wholesale on\n * press, so the bevel and cast can drop out while the rim survives without any\n * of them being separate elements:\n *\n * • the gloss span — face fill + the shadow list (bevel, rim, cast).\n * • its `before:` — the dome gradient, painted over the face.\n * • its `after:` — the hover/press tint, the only thing that cross-fades.\n *\n * The recipe lives in `global.css`. Every colour is a `--btn-*` primitive, and\n * the two shadow composites are declared on `.glossy` — on the key itself, not\n * on `:root` — because a var() inside a custom property is substituted where the\n * property is *declared*. That's what lets one `.glossy-<variant>` class restyle\n * the whole recipe by setting primitives, and it's why there are no `dark:`\n * variants here: `.dark` overrides the same primitives.\n *\n * The span is a sibling of the label rather than its parent so the label never\n * inherits the effect layers' stacking or transitions; `isolate` on the root\n * contains the span's negative z-index.\n *\n * Server-renderable: every state is pure CSS. Passing a function as\n * `actionOrLink` requires a client-component parent, as with any onClick prop.\n */\n\n/**\n * The whole visual treatment. Absolutely positioned behind the label, with the\n * dome (`before:`) and the interaction tint (`after:`) stacked over the face.\n * Only the tint animates opacity; the shadow list animates by being replaced.\n */\nconst glossLayer = cn(\n 'pointer-events-none absolute inset-0 z-[-1] rounded-[inherit]',\n '[background-color:var(--btn-face)] [box-shadow:var(--shadow-button)]',\n 'transition-shadow duration-150',\n // Pressed (and disabled): bevel + cast go transparent, the rim stays.\n 'group-active/glossy:[box-shadow:var(--shadow-button-pressed)]',\n 'group-disabled/glossy:[box-shadow:var(--shadow-button-pressed)]',\n // Dome — fixed direction, per-variant stops. Above the face, below the tint.\n \"before:absolute before:inset-0 before:rounded-[inherit] before:content-[''] before:[background-image:var(--gradient-button)]\",\n // Interaction tint. Hidden outright when disabled, and on touch (no hover\n // state to speak of) so the root's active:opacity can carry the press instead.\n \"after:absolute after:inset-0 after:rounded-[inherit] after:content-[''] after:opacity-0\",\n 'after:[background-color:var(--btn-tint-hover)] after:transition-opacity after:duration-150 after:[will-change:opacity]',\n 'group-hover/glossy:after:opacity-100',\n 'group-active/glossy:after:[background-color:var(--btn-tint-active)]',\n 'group-disabled/glossy:after:hidden [@media(hover:none)]:after:hidden',\n);\n\nconst glossyButtonVariants = cva(\n cn(\n 'glossy group/glossy relative isolate inline-flex cursor-pointer select-none items-center justify-center gap-1 whitespace-nowrap rounded-full font-normal',\n // Label colour rides the variant. Kept as a utility rather than a plain\n // declaration on `.glossy` so a caller's own text-* class still wins.\n '[color:var(--btn-fg)]',\n 'disabled:cursor-default disabled:opacity-50',\n // Touch devices get no hover layer, so the whole key dims on press instead.\n '[@media(hover:none)]:active:opacity-80',\n ),\n {\n variants: {\n size: {\n sm: 'h-8 px-2.5 text-sm',\n md: 'h-9 px-5 text-[17px]',\n lg: 'h-11 px-6 text-[17px]',\n },\n /**\n * Written out as literal class names — Tailwind's scanner is static, so a\n * `glossy-${variant}` template would never make it into the stylesheet.\n * `neutral` is the bare recipe, so it needs no class of its own.\n */\n variant: {\n neutral: '',\n accent: 'glossy-accent',\n destructive: 'glossy-destructive',\n special: 'glossy-special',\n positive: 'glossy-positive',\n attention: 'glossy-attention',\n highlight: 'glossy-highlight',\n inverse: 'glossy-inverse',\n },\n },\n defaultVariants: { size: 'md', variant: 'neutral' },\n },\n);\n\nexport type GlossyButtonProps = VariantProps<typeof glossyButtonVariants> & {\n /**\n * String → renders as a plain <a href={...}>.\n * Function → renders as a <button type=\"button\" onClick={...}>.\n */\n actionOrLink: string | (() => void);\n children: ReactNode;\n /** Button-only — an anchor can't be disabled. */\n disabled?: boolean;\n className?: string;\n 'aria-label'?: string;\n};\n\nexport function GlossyButton({\n size,\n variant,\n actionOrLink,\n children,\n disabled,\n className,\n 'aria-label': ariaLabel,\n}: GlossyButtonProps) {\n const content = (\n <>\n <span data-fx-layer=\"gloss\" aria-hidden={true} className={glossLayer} />\n <span className=\"px-0.5\">{children}</span>\n </>\n );\n\n const buttonClassName = cn(glossyButtonVariants({ size, variant }), className);\n\n if (typeof actionOrLink === 'string')\n return (\n <a href={actionOrLink} className={cn(buttonClassName, 'no-underline')} aria-label={ariaLabel}>\n {content}\n </a>\n );\n\n return (\n <button type=\"button\" className={buttonClassName} onClick={actionOrLink} disabled={disabled} aria-label={ariaLabel}>\n {content}\n </button>\n );\n}\n\nexport { glossyButtonVariants };\n"]}
|
package/dist/grainient.js
CHANGED