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/chunk-5QQAPGR2.mjs
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { useMediaQuery } from './chunk-EYHT2EWJ.mjs';
|
|
2
|
-
import { cn } from './chunk-QAWSH567.mjs';
|
|
3
|
-
import { useInView } from 'framer-motion';
|
|
4
|
-
import { useRef, useState, useLayoutEffect } from 'react';
|
|
5
|
-
import { annotate } from 'rough-notation';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function resolveColor(element, color) {
|
|
9
|
-
if (!color.startsWith("var(")) return color;
|
|
10
|
-
const token = color.slice(4, -1).trim();
|
|
11
|
-
return globalThis.getComputedStyle(element).getPropertyValue(token).trim() || color;
|
|
12
|
-
}
|
|
13
|
-
var BREAKPOINTS = [
|
|
14
|
-
["xs", 30],
|
|
15
|
-
["sm", 40],
|
|
16
|
-
["md", 50],
|
|
17
|
-
["lg", 64],
|
|
18
|
-
["xl", 80],
|
|
19
|
-
["2xl", 96]
|
|
20
|
-
];
|
|
21
|
-
function getBreakpoint() {
|
|
22
|
-
let current = "base";
|
|
23
|
-
for (const [name, rem] of BREAKPOINTS) {
|
|
24
|
-
if (globalThis.matchMedia(`(min-width: ${rem}rem)`).matches) current = name;
|
|
25
|
-
}
|
|
26
|
-
return current;
|
|
27
|
-
}
|
|
28
|
-
function onBreakpointChange(listener) {
|
|
29
|
-
const queries = BREAKPOINTS.map(([, rem]) => globalThis.matchMedia(`(min-width: ${rem}rem)`));
|
|
30
|
-
for (const query of queries) query.addEventListener("change", listener);
|
|
31
|
-
return () => {
|
|
32
|
-
for (const query of queries) query.removeEventListener("change", listener);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function Highlighter({
|
|
36
|
-
children,
|
|
37
|
-
className,
|
|
38
|
-
action = "highlight",
|
|
39
|
-
color = "var(--marker-highlight)",
|
|
40
|
-
strokeWidth = 1.5,
|
|
41
|
-
animationDuration = 600,
|
|
42
|
-
delay = 0,
|
|
43
|
-
iterations = 2,
|
|
44
|
-
padding = 2,
|
|
45
|
-
multiline = true,
|
|
46
|
-
isView = false
|
|
47
|
-
}) {
|
|
48
|
-
const elementRef = useRef(null);
|
|
49
|
-
const isInView = useInView(elementRef, { once: true, margin: "-10%" });
|
|
50
|
-
const reducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)");
|
|
51
|
-
const [themeVersion, setThemeVersion] = useState(0);
|
|
52
|
-
const shouldShow = !isView || isInView;
|
|
53
|
-
useLayoutEffect(() => {
|
|
54
|
-
const observer = new MutationObserver(() => setThemeVersion((v) => v + 1));
|
|
55
|
-
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
|
|
56
|
-
return () => observer.disconnect();
|
|
57
|
-
}, []);
|
|
58
|
-
useLayoutEffect(() => {
|
|
59
|
-
const element = elementRef.current;
|
|
60
|
-
if (!(shouldShow && element)) return;
|
|
61
|
-
let annotation;
|
|
62
|
-
let untrack;
|
|
63
|
-
const draw = () => {
|
|
64
|
-
annotation = annotate(element, {
|
|
65
|
-
type: action,
|
|
66
|
-
color: resolveColor(element, color),
|
|
67
|
-
strokeWidth,
|
|
68
|
-
animationDuration,
|
|
69
|
-
animate: !reducedMotion,
|
|
70
|
-
iterations,
|
|
71
|
-
padding,
|
|
72
|
-
multiline
|
|
73
|
-
});
|
|
74
|
-
annotation.show();
|
|
75
|
-
let drawnAt = getBreakpoint();
|
|
76
|
-
untrack = onBreakpointChange(() => {
|
|
77
|
-
const current = getBreakpoint();
|
|
78
|
-
if (current === drawnAt) return;
|
|
79
|
-
drawnAt = current;
|
|
80
|
-
annotation?.show();
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
const startDelay = reducedMotion ? 0 : delay;
|
|
84
|
-
const timer = startDelay > 0 ? globalThis.setTimeout(draw, startDelay) : void 0;
|
|
85
|
-
if (timer === void 0) draw();
|
|
86
|
-
return () => {
|
|
87
|
-
globalThis.clearTimeout(timer);
|
|
88
|
-
untrack?.();
|
|
89
|
-
annotation?.remove();
|
|
90
|
-
};
|
|
91
|
-
}, [
|
|
92
|
-
shouldShow,
|
|
93
|
-
action,
|
|
94
|
-
color,
|
|
95
|
-
strokeWidth,
|
|
96
|
-
animationDuration,
|
|
97
|
-
delay,
|
|
98
|
-
iterations,
|
|
99
|
-
padding,
|
|
100
|
-
multiline,
|
|
101
|
-
reducedMotion,
|
|
102
|
-
themeVersion
|
|
103
|
-
]);
|
|
104
|
-
return /* @__PURE__ */ jsx("span", { className: cn("relative inline-block bg-transparent", className), children: /* @__PURE__ */ jsx("span", { ref: elementRef, children }) });
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export { Highlighter };
|
|
108
|
-
//# sourceMappingURL=chunk-5QQAPGR2.mjs.map
|
|
109
|
-
//# sourceMappingURL=chunk-5QQAPGR2.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/highlighter.tsx"],"names":[],"mappings":";;;;;;;AAgBA,SAAS,YAAA,CAAa,SAAkB,KAAA,EAAuB;AAC7D,EAAA,IAAI,CAAC,KAAA,CAAM,UAAA,CAAW,MAAM,GAAG,OAAO,KAAA;AACtC,EAAA,MAAM,QAAQ,KAAA,CAAM,KAAA,CAAM,CAAA,EAAG,EAAE,EAAE,IAAA,EAAK;AACtC,EAAA,OAAO,UAAA,CAAW,iBAAiB,OAAO,CAAA,CAAE,iBAAiB,KAAK,CAAA,CAAE,MAAK,IAAK,KAAA;AAChF;AAOA,IAAM,WAAA,GAAc;AAAA,EAClB,CAAC,MAAM,EAAE,CAAA;AAA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,GAAU,mBAAmB,MAAM;AACjC,QAAA,MAAM,UAAU,aAAA,EAAc;AAC9B,QAAA,IAAI,YAAY,OAAA,EAAS;AACzB,QAAA,OAAA,GAAU,OAAA;AACV,QAAA,UAAA,EAAY,IAAA,EAAK;AAAA,MACnB,CAAC,CAAA;AAAA,IACH,CAAA;AAEA,IAAA,MAAM,UAAA,GAAa,gBAAgB,CAAA,GAAI,KAAA;AACvC,IAAA,MAAM,QAAQ,UAAA,GAAa,CAAA,GAAI,WAAW,UAAA,CAAW,IAAA,EAAM,UAAU,CAAA,GAAI,MAAA;AACzE,IAAA,IAAI,KAAA,KAAU,QAAW,IAAA,EAAK;AAE9B,IAAA,OAAO,MAAM;AACX,MAAA,UAAA,CAAW,aAAa,KAAK,CAAA;AAC7B,MAAA,OAAA,IAAU;AACV,MAAA,UAAA,EAAY,MAAA,EAAO;AAAA,IACrB,CAAA;AAAA,EACF,CAAA,EAAG;AAAA,IACD,UAAA;AAAA,IACA,MAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACA,iBAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,GACD,CAAA;AAgBD,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,EAAA,CAAG,sCAAA,EAAwC,SAAS,CAAA,EACnE,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,GAAA,EAAK,UAAA,EAAa,QAAA,EAAS,CAAA,EACnC,CAAA;AAEJ","file":"chunk-5QQAPGR2.mjs","sourcesContent":["'use client';\n\nimport { useInView } from 'framer-motion';\nimport { type ReactNode, useLayoutEffect, useRef, useState } from 'react';\nimport { annotate } from 'rough-notation';\nimport type { RoughAnnotation } from 'rough-notation/lib/model';\nimport { useMediaQuery } from '../lib/use-media-query.js';\nimport { cn } from '../lib/utils.js';\n\ntype AnnotationAction = 'highlight' | 'underline' | 'box' | 'circle' | 'strike-through' | 'crossed-off' | 'bracket';\n\n/**\n * rough-notation writes the colour straight into the SVG's `stroke` presentation\n * attribute, where `var()` is never substituted — so a design token has to be\n * resolved against the live element before it is handed over.\n */\nfunction resolveColor(element: Element, color: string): string {\n if (!color.startsWith('var(')) return color;\n const token = color.slice(4, -1).trim();\n return globalThis.getComputedStyle(element).getPropertyValue(token).trim() || color;\n}\n\n/**\n * The site's breakpoints, ascending, in the `rem` units Tailwind emits them in —\n * so they keep tracking the root font size the way the CSS does. Mirrored from\n * the library's `@theme` block (`xs` and `md` are custom, the rest are defaults).\n */\nconst BREAKPOINTS = [\n ['xs', 30],\n ['sm', 40],\n ['md', 50],\n ['lg', 64],\n ['xl', 80],\n ['2xl', 96],\n] as const;\n\ntype Breakpoint = 'base' | (typeof BREAKPOINTS)[number][0];\n\n/** `'base'` is the implicit below-`xs` band — the widths no `min-width` query claims. */\nfunction getBreakpoint(): Breakpoint {\n let current: Breakpoint = 'base';\n for (const [name, rem] of BREAKPOINTS) {\n if (globalThis.matchMedia(`(min-width: ${rem}rem)`).matches) current = name;\n }\n return current;\n}\n\n/**\n * Call `listener` whenever the viewport crosses a breakpoint. Returns the\n * unsubscribe.\n *\n * The imperative counterpart to a `useBreakpoint` hook, for work that has to land\n * in the *same frame* as the layout change. Media-query change events fire during\n * the rendering steps, before `requestAnimationFrame` and before paint, so a\n * listener that writes to the DOM here is painted with the new layout rather than\n * one frame behind it.\n */\nfunction onBreakpointChange(listener: () => void): () => void {\n const queries = BREAKPOINTS.map(([, rem]) => globalThis.matchMedia(`(min-width: ${rem}rem)`));\n for (const query of queries) query.addEventListener('change', listener);\n return () => {\n for (const query of queries) query.removeEventListener('change', listener);\n };\n}\n\ntype HighlighterProps = {\n /** The words to annotate. Rendered inline, so they inherit the surrounding type. */\n children: ReactNode;\n className?: string;\n /**\n * Which marker stroke to draw.\n * @default 'highlight'\n */\n action?: AnnotationAction;\n /**\n * Stroke colour. Accepts a `var(--token)` string, which is resolved against\n * the live element and re-resolved whenever the theme flips.\n * @default 'var(--marker-highlight)'\n */\n color?: string;\n /** @default 1.5 */\n strokeWidth?: number;\n /** Milliseconds the stroke takes to draw itself on. @default 600 */\n animationDuration?: number;\n /**\n * Milliseconds to hold the stroke back before it starts drawing. Ignored under\n * reduced motion, where there is no draw-on to stagger.\n * @default 0\n */\n delay?: number;\n /** Passes over the same stroke, which is what makes it read as hand-drawn. @default 2 */\n iterations?: number;\n /** Pixels of slack between the text box and the stroke. @default 2 */\n padding?: number;\n /** Annotate every line the text wraps onto, rather than one box around all of them. @default true */\n multiline?: boolean;\n /** Hold the stroke back until the text scrolls into view. @default false */\n isView?: boolean;\n};\n\n/**\n * Draws a hand-drawn marker stroke over a word or phrase.\n *\n * The stroke is an SVG that rough-notation injects on the client, so the\n * exported HTML ships the bare text and nothing about the layout depends on JS\n * having run. Readers who ask for reduced motion get the stroke without the\n * draw-on animation.\n */\nexport function Highlighter({\n children,\n className,\n action = 'highlight',\n color = 'var(--marker-highlight)',\n strokeWidth = 1.5,\n animationDuration = 600,\n delay = 0,\n iterations = 2,\n padding = 2,\n multiline = true,\n isView = false,\n}: HighlighterProps) {\n const elementRef = useRef<HTMLSpanElement>(null);\n const isInView = useInView(elementRef, { once: true, margin: '-10%' });\n const reducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n // Only a re-run trigger: the colour itself comes from the computed style, which\n // is already correct on first paint because the theme class is set before\n // hydration. The observer below bumps this whenever the class attribute flips.\n const [themeVersion, setThemeVersion] = useState(0);\n\n const shouldShow = !isView || isInView;\n\n // Theme flips land as a class swap on <html> (the `.dark` class toggled by the\n // theme provider), and rough-notation bakes the *resolved* token into the\n // SVG's stroke attribute — which does not track var(). Re-running the draw\n // effect with a freshly resolved colour is what repaints the stroke.\n useLayoutEffect(() => {\n const observer = new MutationObserver(() => setThemeVersion((v) => v + 1));\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });\n return () => observer.disconnect();\n }, []);\n\n // Imperatively injects and tears down a rough-notation SVG measured off live\n // DOM layout — a post-render side effect with no render-time equivalent.\n // biome-ignore lint/correctness/useExhaustiveDependencies: `themeVersion` is a redraw trigger, not a read value — the token resolves to a different colour per theme, so a flip has to repaint the stroke.\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!(shouldShow && element)) return;\n\n let annotation: RoughAnnotation | undefined;\n let untrack: (() => void) | undefined;\n\n const draw = () => {\n annotation = annotate(element, {\n type: action,\n color: resolveColor(element, color),\n strokeWidth,\n animationDuration,\n animate: !reducedMotion,\n iterations,\n padding,\n multiline,\n });\n annotation.show();\n\n // The wrapper below already carries the stroke wherever the page moves the\n // text, so the only thing left that can stale it is a change in the text's\n // own shape — which on a breakpoint-driven layout means a breakpoint. This\n // is subscribed directly rather than through a `useBreakpoint` hook because\n // a React state round-trip commits a frame or more after the browser has\n // painted the new layout, which is exactly the lag being chased out.\n // `show()` on a still-showing annotation re-renders un-animated, so the\n // stroke resizes without replaying the draw-on.\n let drawnAt = getBreakpoint();\n untrack = onBreakpointChange(() => {\n const current = getBreakpoint();\n if (current === drawnAt) return;\n drawnAt = current;\n annotation?.show();\n });\n };\n\n const startDelay = reducedMotion ? 0 : delay;\n const timer = startDelay > 0 ? globalThis.setTimeout(draw, startDelay) : undefined;\n if (timer === undefined) draw();\n\n return () => {\n globalThis.clearTimeout(timer);\n untrack?.();\n annotation?.remove();\n };\n }, [\n shouldShow,\n action,\n color,\n strokeWidth,\n animationDuration,\n delay,\n iterations,\n padding,\n multiline,\n reducedMotion,\n themeVersion,\n ]);\n\n // Two spans, and both earn their place.\n //\n // rough-notation injects its SVG as a *sibling* of the annotated element, laid\n // out `position: absolute; top: 0; left: 0`, with the stroke's coordinates baked\n // as offsets from wherever that SVG lands. Left alone it resolves against\n // whatever positioned ancestor it happens to find — for a centred, shrink-wrapped\n // page section, effectively the viewport — so every reflow that slid the text\n // sideways slid it out from under its own stroke, and only a redraw put it back.\n // The `relative` wrapper makes the SVG resolve against a box the text sits\n // inside instead, so the two now move as one and no listener is involved.\n //\n // The inner span stays plain `inline`, which is what makes `multiline` work:\n // `getClientRects()` on an inline reports one box per line, so wrapped text gets\n // a stroke per line rather than one slab drawn around the whole paragraph.\n return (\n <span className={cn('relative inline-block bg-transparent', className)}>\n <span ref={elementRef}>{children}</span>\n </span>\n );\n}\n\nexport type { AnnotationAction, HighlighterProps };\n"]}
|
package/dist/chunk-6MB4UKRX.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-QAWSH567.mjs';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
function SavingsBadge({ className, ...props }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
"span",
|
|
7
|
-
{
|
|
8
|
-
className: cn(
|
|
9
|
-
"rounded-full bg-emerald-500/15 px-2.5 py-0.5 font-numeric font-semibold text-[11px] text-emerald-500 tabular-nums",
|
|
10
|
-
className
|
|
11
|
-
),
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { SavingsBadge };
|
|
18
|
-
//# sourceMappingURL=chunk-6MB4UKRX.mjs.map
|
|
19
|
-
//# sourceMappingURL=chunk-6MB4UKRX.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/savings-badge.tsx"],"names":[],"mappings":";;;AAUO,SAAS,YAAA,CAAa,EAAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AAClF,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,mHAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-6MB4UKRX.mjs","sourcesContent":["import type * as React from 'react';\nimport { cn } from '../lib/utils.js';\n\n/**\n * Soft emerald pill for money-saved callouts — the per-provider delta in the\n * estimate chart.\n *\n * The wording differs per call site, so the label stays in `children`; only the\n * pill treatment is shared.\n */\nexport function SavingsBadge({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n 'rounded-full bg-emerald-500/15 px-2.5 py-0.5 font-numeric font-semibold text-[11px] text-emerald-500 tabular-nums',\n className,\n )}\n {...props}\n />\n );\n}\n"]}
|
package/dist/chunk-6T5LR34O.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-QAWSH567.mjs';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
function ElevatedInput({
|
|
5
|
-
className,
|
|
6
|
-
type = "text",
|
|
7
|
-
ref,
|
|
8
|
-
...props
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
-
"input",
|
|
12
|
-
{
|
|
13
|
-
ref,
|
|
14
|
-
type,
|
|
15
|
-
className: cn(
|
|
16
|
-
// Layout & shape
|
|
17
|
-
"relative w-full overflow-hidden rounded-lg",
|
|
18
|
-
// Typography
|
|
19
|
-
"text-(--color-foreground) text-sm placeholder:text-(--color-muted-foreground)",
|
|
20
|
-
// Sizing
|
|
21
|
-
"h-9 px-3",
|
|
22
|
-
// Reset native input chrome
|
|
23
|
-
"appearance-none border-none outline-none",
|
|
24
|
-
// Background — a barely-there top darkening that reads as cavity depth.
|
|
25
|
-
"bg-[linear-gradient(to_bottom,oklch(0_0_0/0.04),transparent)]",
|
|
26
|
-
"dark:bg-[linear-gradient(to_bottom,oklch(1_0_0/0.04),transparent)]",
|
|
27
|
-
// Shadow stack — light mode
|
|
28
|
-
"shadow-[inset_0_1px_0_0_oklch(1_0_0/0.08),inset_0_2px_2px_-1px_oklch(0_0_0/0.08),inset_0_4px_4px_-2px_oklch(0_0_0/0.08),0_1px_0_0_oklch(0_0_0/0.12),inset_0_0_0_1px_oklch(0_0_0/0.16)]",
|
|
29
|
-
// Shadow stack — dark mode
|
|
30
|
-
"dark:shadow-[inset_0_1px_0_0_oklch(1_0_0/0.1),inset_0_2px_2px_-1px_oklch(0_0_0/0.28),inset_0_4px_4px_-2px_oklch(0_0_0/0.22),0_1px_0_0_oklch(0_0_0/0.36),inset_0_0_0_1px_oklch(1_0_0/0.16)]",
|
|
31
|
-
// Focus
|
|
32
|
-
"focus-visible:shadow-[inset_0_1px_0_0_oklch(1_0_0/0.08),inset_0_2px_2px_-1px_oklch(0_0_0/0.04),inset_0_4px_4px_-2px_oklch(0_0_0/0.04),0_0_0_3px_oklch(0_0_0/0.08),inset_0_0_0_1.5px_oklch(0_0_0/0.36)]",
|
|
33
|
-
"dark:focus-visible:shadow-[inset_0_1px_0_0_oklch(1_0_0/0.12),inset_0_2px_2px_-1px_oklch(0_0_0/0.16),inset_0_4px_4px_-2px_oklch(0_0_0/0.12),0_0_0_3px_oklch(1_0_0/0.08),inset_0_0_0_1.5px_oklch(1_0_0/0.28)]",
|
|
34
|
-
"transition-shadow duration-150",
|
|
35
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
36
|
-
className
|
|
37
|
-
),
|
|
38
|
-
...props
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { ElevatedInput };
|
|
44
|
-
//# sourceMappingURL=chunk-6T5LR34O.mjs.map
|
|
45
|
-
//# sourceMappingURL=chunk-6T5LR34O.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/elevated-input.tsx"],"names":[],"mappings":";;;AASO,SAAS,aAAA,CAAc;AAAA,EAC5B,SAAA;AAAA,EACA,IAAA,GAAO,MAAA;AAAA,EACP,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA;AAAA,QAET,4CAAA;AAAA;AAAA,QAEA,+EAAA;AAAA;AAAA,QAEA,UAAA;AAAA;AAAA,QAEA,0CAAA;AAAA;AAAA,QAGA,+DAAA;AAAA,QACA,oEAAA;AAAA;AAAA,QAGA,wLAAA;AAAA;AAAA,QAEA,4LAAA;AAAA;AAAA,QAGA,wMAAA;AAAA,QACA,6MAAA;AAAA,QAEA,gCAAA;AAAA,QACA,iDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-6T5LR34O.mjs","sourcesContent":["import type { InputHTMLAttributes, RefObject } from 'react';\nimport { cn } from '../lib/utils.js';\n\n/**\n * Physically-recessed input: the inverse read of GlossyButton.\n * The illusion is built entirely from `box-shadow` layers (no wrapper div).\n *\n * Server-renderable: no browser APIs are used.\n */\nexport function ElevatedInput({\n className,\n type = 'text',\n ref,\n ...props\n}: InputHTMLAttributes<HTMLInputElement> & {\n ref?: RefObject<HTMLInputElement | null>;\n}) {\n return (\n <input\n ref={ref}\n type={type}\n className={cn(\n // Layout & shape\n 'relative w-full overflow-hidden rounded-lg',\n // Typography\n 'text-(--color-foreground) text-sm placeholder:text-(--color-muted-foreground)',\n // Sizing\n 'h-9 px-3',\n // Reset native input chrome\n 'appearance-none border-none outline-none',\n\n // Background — a barely-there top darkening that reads as cavity depth.\n 'bg-[linear-gradient(to_bottom,oklch(0_0_0/0.04),transparent)]',\n 'dark:bg-[linear-gradient(to_bottom,oklch(1_0_0/0.04),transparent)]',\n\n // Shadow stack — light mode\n 'shadow-[inset_0_1px_0_0_oklch(1_0_0/0.08),inset_0_2px_2px_-1px_oklch(0_0_0/0.08),inset_0_4px_4px_-2px_oklch(0_0_0/0.08),0_1px_0_0_oklch(0_0_0/0.12),inset_0_0_0_1px_oklch(0_0_0/0.16)]',\n // Shadow stack — dark mode\n 'dark:shadow-[inset_0_1px_0_0_oklch(1_0_0/0.1),inset_0_2px_2px_-1px_oklch(0_0_0/0.28),inset_0_4px_4px_-2px_oklch(0_0_0/0.22),0_1px_0_0_oklch(0_0_0/0.36),inset_0_0_0_1px_oklch(1_0_0/0.16)]',\n\n // Focus\n 'focus-visible:shadow-[inset_0_1px_0_0_oklch(1_0_0/0.08),inset_0_2px_2px_-1px_oklch(0_0_0/0.04),inset_0_4px_4px_-2px_oklch(0_0_0/0.04),0_0_0_3px_oklch(0_0_0/0.08),inset_0_0_0_1.5px_oklch(0_0_0/0.36)]',\n 'dark:focus-visible:shadow-[inset_0_1px_0_0_oklch(1_0_0/0.12),inset_0_2px_2px_-1px_oklch(0_0_0/0.16),inset_0_4px_4px_-2px_oklch(0_0_0/0.12),0_0_0_3px_oklch(1_0_0/0.08),inset_0_0_0_1.5px_oklch(1_0_0/0.28)]',\n\n 'transition-shadow duration-150',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n"]}
|
package/dist/chunk-AYLCYDUM.mjs
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { navigationMenuTriggerStyle, navigationMenuSubTriggerStyle } from './chunk-KBHYXLRG.mjs';
|
|
2
|
-
import { ChevronDownIcon, ChevronRightIcon, ArrowSvg } from './chunk-JVXJ6SFX.mjs';
|
|
3
|
-
import { solidSurface } from './chunk-XZEDZVXT.mjs';
|
|
4
|
-
import { cn, validCssVars } from './chunk-QAWSH567.mjs';
|
|
5
|
-
import { NavigationMenu as NavigationMenu$1 } from '@base-ui/react/navigation-menu';
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function NavigationMenu({
|
|
9
|
-
className,
|
|
10
|
-
children,
|
|
11
|
-
side,
|
|
12
|
-
sideOffset = 10,
|
|
13
|
-
align,
|
|
14
|
-
alignOffset,
|
|
15
|
-
collisionPadding = { top: 5, bottom: 5, left: 20, right: 20 },
|
|
16
|
-
collisionBoundary,
|
|
17
|
-
arrow = false,
|
|
18
|
-
positionMethod = "fixed",
|
|
19
|
-
level = 2,
|
|
20
|
-
shadowLevel = 2,
|
|
21
|
-
...props
|
|
22
|
-
}) {
|
|
23
|
-
return /* @__PURE__ */ jsxs(
|
|
24
|
-
NavigationMenu$1.Root,
|
|
25
|
-
{
|
|
26
|
-
"data-slot": "navigation-menu",
|
|
27
|
-
"data-level": level,
|
|
28
|
-
className: cn("min-w-max rounded-md p-1 text-foreground", solidSurface(level, shadowLevel), className),
|
|
29
|
-
...props,
|
|
30
|
-
children: [
|
|
31
|
-
children,
|
|
32
|
-
/* @__PURE__ */ jsx(
|
|
33
|
-
NavigationMenuViewport,
|
|
34
|
-
{
|
|
35
|
-
side,
|
|
36
|
-
sideOffset,
|
|
37
|
-
align,
|
|
38
|
-
alignOffset,
|
|
39
|
-
collisionPadding,
|
|
40
|
-
collisionBoundary,
|
|
41
|
-
arrow,
|
|
42
|
-
positionMethod
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
function NavigationMenuList({ className, ...props }) {
|
|
50
|
-
return /* @__PURE__ */ jsx(NavigationMenu$1.List, { "data-slot": "navigation-menu-list", className: cn("relative flex", className), ...props });
|
|
51
|
-
}
|
|
52
|
-
function NavigationMenuItem({ className, ...props }) {
|
|
53
|
-
return /* @__PURE__ */ jsx(NavigationMenu$1.Item, { "data-slot": "navigation-menu-item", className: cn("relative", className), ...props });
|
|
54
|
-
}
|
|
55
|
-
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
56
|
-
return /* @__PURE__ */ jsxs(
|
|
57
|
-
NavigationMenu$1.Trigger,
|
|
58
|
-
{
|
|
59
|
-
"data-slot": "navigation-menu-trigger",
|
|
60
|
-
className: cn(navigationMenuTriggerStyle(), className),
|
|
61
|
-
...props,
|
|
62
|
-
children: [
|
|
63
|
-
children,
|
|
64
|
-
/* @__PURE__ */ jsx(NavigationMenuIcon, {})
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
function NavigationMenuIcon({
|
|
70
|
-
className,
|
|
71
|
-
render = /* @__PURE__ */ jsx(ChevronDownIcon, {}),
|
|
72
|
-
...props
|
|
73
|
-
}) {
|
|
74
|
-
return /* @__PURE__ */ jsx(
|
|
75
|
-
NavigationMenu$1.Icon,
|
|
76
|
-
{
|
|
77
|
-
className: cn("transition-transform duration-200 ease-in-out data-[popup-open]:rotate-180", className),
|
|
78
|
-
render,
|
|
79
|
-
...props
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
function NavigationMenuSubTrigger({
|
|
84
|
-
className,
|
|
85
|
-
children,
|
|
86
|
-
...props
|
|
87
|
-
}) {
|
|
88
|
-
return /* @__PURE__ */ jsxs(
|
|
89
|
-
NavigationMenu$1.Trigger,
|
|
90
|
-
{
|
|
91
|
-
"data-slot": "navigation-menu-sub-trigger",
|
|
92
|
-
className: cn(navigationMenuSubTriggerStyle(), className),
|
|
93
|
-
...props,
|
|
94
|
-
children: [
|
|
95
|
-
children,
|
|
96
|
-
/* @__PURE__ */ jsx(
|
|
97
|
-
NavigationMenu$1.Icon,
|
|
98
|
-
{
|
|
99
|
-
className: "absolute top-1/2 right-2.5 flex h-2.5 w-2.5 -translate-y-1/2 items-center justify-center transition-transform duration-200 ease-in-out data-[popup-open]:rotate-180",
|
|
100
|
-
render: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
function NavigationMenuContent({ className, ...props }) {
|
|
108
|
-
return /* @__PURE__ */ jsx(
|
|
109
|
-
NavigationMenu$1.Content,
|
|
110
|
-
{
|
|
111
|
-
"data-slot": "navigation-menu-content",
|
|
112
|
-
className: cn(
|
|
113
|
-
"h-full w-[calc(100vw-2.5rem)] p-4 sm:w-max",
|
|
114
|
-
// Transitions for opacity/transform/filter
|
|
115
|
-
"transition-[opacity,transform,filter,scale,translate] duration-(--duration) ease-(--easing)",
|
|
116
|
-
// Starting/ending opacity
|
|
117
|
-
"data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
118
|
-
// Direction-aware slide (starting)
|
|
119
|
-
"data-starting-style:data-[activation-direction=left]:-translate-x-1/2",
|
|
120
|
-
"data-starting-style:data-[activation-direction=right]:translate-x-1/2",
|
|
121
|
-
// Direction-aware slide (ending)
|
|
122
|
-
"data-ending-style:data-[activation-direction=left]:translate-x-1/2",
|
|
123
|
-
"data-ending-style:data-[activation-direction=right]:-translate-x-1/2",
|
|
124
|
-
// Blur effect during transitions
|
|
125
|
-
"data-ending-style:blur-[4px] data-starting-style:blur-[4px]",
|
|
126
|
-
// scale effect during transitions
|
|
127
|
-
"data-ending-style:scale-97 data-starting-style:scale-97",
|
|
128
|
-
// Motion reduce support
|
|
129
|
-
"motion-reduce:transition-none",
|
|
130
|
-
className
|
|
131
|
-
),
|
|
132
|
-
...props
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
function NavigationMenuLink({ className, standalone, ...props }) {
|
|
137
|
-
return /* @__PURE__ */ jsx(
|
|
138
|
-
NavigationMenu$1.Link,
|
|
139
|
-
{
|
|
140
|
-
"data-slot": "navigation-menu-link",
|
|
141
|
-
className: cn(
|
|
142
|
-
standalone ? navigationMenuTriggerStyle() : "block rounded-md p-2.5 xs:p-3 text-inherit no-underline duration-150 hover:text-foreground hover:duration-0 focus-visible:relative focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-1",
|
|
143
|
-
className
|
|
144
|
-
),
|
|
145
|
-
...props
|
|
146
|
-
}
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
function NavigationMenuBackdrop({ ...props }) {
|
|
150
|
-
return /* @__PURE__ */ jsx(NavigationMenu$1.Backdrop, { "data-slot": "navigation-menu-backdrop", ...props });
|
|
151
|
-
}
|
|
152
|
-
function NavigationMenuPortal({ ...props }) {
|
|
153
|
-
return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, { "data-slot": "navigation-menu-portal", ...props });
|
|
154
|
-
}
|
|
155
|
-
function NavigationMenuArrow({ ...props }) {
|
|
156
|
-
return /* @__PURE__ */ jsx(
|
|
157
|
-
NavigationMenu$1.Arrow,
|
|
158
|
-
{
|
|
159
|
-
className: "flex transition-[left] duration-[var(--duration)] ease-[var(--easing)] data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=top]:bottom-[-8px] data-[side=right]:left-[-13px] data-[side=left]:rotate-90 data-[side=right]:-rotate-90 data-[side=top]:rotate-180",
|
|
160
|
-
...props,
|
|
161
|
-
children: /* @__PURE__ */ jsx(ArrowSvg, {})
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
function NavigationMenuViewport({
|
|
166
|
-
className,
|
|
167
|
-
children,
|
|
168
|
-
side,
|
|
169
|
-
sideOffset,
|
|
170
|
-
align,
|
|
171
|
-
alignOffset,
|
|
172
|
-
collisionPadding,
|
|
173
|
-
collisionBoundary,
|
|
174
|
-
arrow = false,
|
|
175
|
-
positionMethod = "fixed",
|
|
176
|
-
...props
|
|
177
|
-
}) {
|
|
178
|
-
return /* @__PURE__ */ jsx(NavigationMenuPortal, { children: /* @__PURE__ */ jsx(
|
|
179
|
-
NavigationMenu$1.Positioner,
|
|
180
|
-
{
|
|
181
|
-
"data-slot": "navigation-menu-positioner",
|
|
182
|
-
side,
|
|
183
|
-
sideOffset,
|
|
184
|
-
align,
|
|
185
|
-
alignOffset,
|
|
186
|
-
collisionPadding,
|
|
187
|
-
collisionBoundary,
|
|
188
|
-
positionMethod,
|
|
189
|
-
className: "z-50 box-border h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-(--duration) ease-(--easing) before:absolute before:content-[''] data-instant:transition-none data-[side=bottom]:before:-top-2.5 data-[side=left]:before:top-0 data-[side=right]:before:top-0 data-[side=bottom]:before:right-0 data-[side=left]:before:-right-2.5 data-[side=top]:before:right-0 data-[side=left]:before:bottom-0 data-[side=right]:before:bottom-0 data-[side=top]:before:-bottom-2.5 data-[side=bottom]:before:left-0 data-[side=right]:before:-left-2.5 data-[side=top]:before:left-0 data-[side=bottom]:before:h-2.5 data-[side=top]:before:h-2.5 data-[side=left]:before:w-2.5 data-[side=right]:before:w-2.5",
|
|
190
|
-
style: validCssVars({ "--duration": "0.35s", "--easing": "cubic-bezier(0.22, 1, 0.36, 1)" }),
|
|
191
|
-
children: /* @__PURE__ */ jsxs(
|
|
192
|
-
NavigationMenu$1.Popup,
|
|
193
|
-
{
|
|
194
|
-
"data-slot": "navigation-menu-content",
|
|
195
|
-
className: cn(
|
|
196
|
-
"relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) overflow-hidden rounded-md text-foreground transition-[opacity,transform,width,height,scale,translate] duration-(--duration) ease-(--easing) data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-150",
|
|
197
|
-
solidSurface(3, 3)
|
|
198
|
-
),
|
|
199
|
-
children: [
|
|
200
|
-
arrow ? /* @__PURE__ */ jsx(NavigationMenuArrow, {}) : null,
|
|
201
|
-
/* @__PURE__ */ jsx(
|
|
202
|
-
NavigationMenu$1.Viewport,
|
|
203
|
-
{
|
|
204
|
-
"data-slot": "navigation-menu-viewport",
|
|
205
|
-
className: cn("relative h-full w-full overflow-hidden", className),
|
|
206
|
-
...props,
|
|
207
|
-
children
|
|
208
|
-
}
|
|
209
|
-
)
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
)
|
|
213
|
-
}
|
|
214
|
-
) });
|
|
215
|
-
}
|
|
216
|
-
function NavigationMenuSub({
|
|
217
|
-
className,
|
|
218
|
-
children,
|
|
219
|
-
orientation = "vertical",
|
|
220
|
-
side = "right",
|
|
221
|
-
sideOffset = 24,
|
|
222
|
-
align = "end",
|
|
223
|
-
alignOffset = -24,
|
|
224
|
-
arrow = false,
|
|
225
|
-
...props
|
|
226
|
-
}) {
|
|
227
|
-
return /* @__PURE__ */ jsxs(
|
|
228
|
-
NavigationMenu$1.Root,
|
|
229
|
-
{
|
|
230
|
-
"data-slot": "navigation-menu-sub",
|
|
231
|
-
className: cn("", className),
|
|
232
|
-
orientation,
|
|
233
|
-
...props,
|
|
234
|
-
children: [
|
|
235
|
-
children,
|
|
236
|
-
/* @__PURE__ */ jsx(NavigationMenuPortal, { children: /* @__PURE__ */ jsx(
|
|
237
|
-
NavigationMenu$1.Positioner,
|
|
238
|
-
{
|
|
239
|
-
"data-slot": "navigation-menu-sub-positioner",
|
|
240
|
-
sideOffset,
|
|
241
|
-
alignOffset,
|
|
242
|
-
align,
|
|
243
|
-
side,
|
|
244
|
-
className: "box-border h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-(--duration) ease-(--easing) before:absolute before:content-[''] data-instant:transition-none data-[side=bottom]:before:-top-2.5 data-[side=left]:before:top-0 data-[side=right]:before:top-0 data-[side=bottom]:before:right-0 data-[side=left]:before:-right-2.5 data-[side=top]:before:right-0 data-[side=left]:before:bottom-0 data-[side=right]:before:bottom-0 data-[side=top]:before:-bottom-2.5 data-[side=bottom]:before:left-0 data-[side=right]:before:-left-2.5 data-[side=top]:before:left-0 data-[side=bottom]:before:h-2.5 data-[side=top]:before:h-2.5 data-[side=left]:before:w-2.5 data-[side=right]:before:w-2.5",
|
|
245
|
-
style: validCssVars({ "--duration": "0.35s", "--easing": "cubic-bezier(0.22, 1, 0.36, 1)" }),
|
|
246
|
-
children: /* @__PURE__ */ jsxs(
|
|
247
|
-
NavigationMenu$1.Popup,
|
|
248
|
-
{
|
|
249
|
-
"data-slot": "navigation-menu-sub-content",
|
|
250
|
-
className: cn(
|
|
251
|
-
"relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) overflow-hidden rounded-md text-foreground transition-[opacity,transform,width,height,scale,translate] duration-(--duration) ease-(--easing) data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-150",
|
|
252
|
-
solidSurface(5, 5)
|
|
253
|
-
),
|
|
254
|
-
children: [
|
|
255
|
-
arrow ? /* @__PURE__ */ jsx(NavigationMenuArrow, {}) : null,
|
|
256
|
-
/* @__PURE__ */ jsx(
|
|
257
|
-
NavigationMenu$1.Viewport,
|
|
258
|
-
{
|
|
259
|
-
"data-slot": "navigation-menu-sub-viewport",
|
|
260
|
-
className: "relative h-full w-full overflow-hidden"
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
}
|
|
267
|
-
) })
|
|
268
|
-
]
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export { NavigationMenu, NavigationMenuArrow, NavigationMenuBackdrop, NavigationMenuContent, NavigationMenuIcon, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPortal, NavigationMenuSub, NavigationMenuSubTrigger, NavigationMenuTrigger, NavigationMenuViewport };
|
|
274
|
-
//# sourceMappingURL=chunk-AYLCYDUM.mjs.map
|
|
275
|
-
//# sourceMappingURL=chunk-AYLCYDUM.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/navigation-menu.tsx"],"names":["NavigationMenuPrimitive"],"mappings":";;;;;;;AAcA,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA,GAAa,EAAA;AAAA,EACb,KAAA;AAAA,EACA,WAAA;AAAA,EACA,gBAAA,GAAmB,EAAE,GAAA,EAAK,CAAA,EAAG,QAAQ,CAAA,EAAG,IAAA,EAAM,EAAA,EAAI,KAAA,EAAO,EAAA,EAAG;AAAA,EAC5D,iBAAA;AAAA,EACA,KAAA,GAAQ,KAAA;AAAA,EACR,cAAA,GAAiB,OAAA;AAAA,EACjB,KAAA,GAAQ,C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","sourcesContent":["import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';\nimport type * as React from 'react';\nimport { solidSurface } from '../lib/surface.js';\nimport { cn, validCssVars } from '../lib/utils.js';\nimport { ArrowSvg, ChevronDownIcon, ChevronRightIcon } from './navigation-menu-icons.js';\nimport {\n type NavigationMenuLinkProps,\n type NavigationMenuProps,\n type NavigationMenuSubProps,\n type NavigationMenuViewportProps,\n navigationMenuSubTriggerStyle,\n navigationMenuTriggerStyle,\n} from './navigation-menu-styles.js';\n\nfunction NavigationMenu({\n className,\n children,\n side,\n sideOffset = 10,\n align,\n alignOffset,\n collisionPadding = { top: 5, bottom: 5, left: 20, right: 20 },\n collisionBoundary,\n arrow = false,\n positionMethod = 'fixed',\n level = 2,\n shadowLevel = 2,\n ...props\n}: NavigationMenuProps) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n data-level={level}\n className={cn('min-w-max rounded-md p-1 text-foreground', solidSurface(level, shadowLevel), className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n collisionPadding={collisionPadding}\n collisionBoundary={collisionBoundary}\n arrow={arrow}\n positionMethod={positionMethod}\n />\n </NavigationMenuPrimitive.Root>\n );\n}\n\nfunction NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {\n return <NavigationMenuPrimitive.List data-slot=\"navigation-menu-list\" className={cn('relative flex', className)} {...props} />;\n}\n\nfunction NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {\n return <NavigationMenuPrimitive.Item data-slot=\"navigation-menu-item\" className={cn('relative', className)} {...props} />;\n}\n\nfunction NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), className)}\n {...props}\n >\n {children}\n <NavigationMenuIcon />\n </NavigationMenuPrimitive.Trigger>\n );\n}\n\nfunction NavigationMenuIcon({\n className,\n render = <ChevronDownIcon />,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Icon>) {\n return (\n <NavigationMenuPrimitive.Icon\n className={cn('transition-transform duration-200 ease-in-out data-[popup-open]:rotate-180', className)}\n render={render}\n {...props}\n />\n );\n}\n\nfunction NavigationMenuSubTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-sub-trigger\"\n className={cn(navigationMenuSubTriggerStyle(), className)}\n {...props}\n >\n {children}\n <NavigationMenuPrimitive.Icon\n className=\"absolute top-1/2 right-2.5 flex h-2.5 w-2.5 -translate-y-1/2 items-center justify-center transition-transform duration-200 ease-in-out data-[popup-open]:rotate-180\"\n render={<ChevronRightIcon />}\n />\n </NavigationMenuPrimitive.Trigger>\n );\n}\n\nfunction NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n 'h-full w-[calc(100vw-2.5rem)] p-4 sm:w-max',\n // Transitions for opacity/transform/filter\n 'transition-[opacity,transform,filter,scale,translate] duration-(--duration) ease-(--easing)',\n // Starting/ending opacity\n 'data-ending-style:opacity-0 data-starting-style:opacity-0',\n // Direction-aware slide (starting)\n 'data-starting-style:data-[activation-direction=left]:-translate-x-1/2',\n 'data-starting-style:data-[activation-direction=right]:translate-x-1/2',\n // Direction-aware slide (ending)\n 'data-ending-style:data-[activation-direction=left]:translate-x-1/2',\n 'data-ending-style:data-[activation-direction=right]:-translate-x-1/2',\n // Blur effect during transitions\n 'data-ending-style:blur-[4px] data-starting-style:blur-[4px]',\n // scale effect during transitions\n 'data-ending-style:scale-97 data-starting-style:scale-97',\n // Motion reduce support\n 'motion-reduce:transition-none',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction NavigationMenuLink({ className, standalone, ...props }: NavigationMenuLinkProps) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n standalone\n ? navigationMenuTriggerStyle()\n : 'block rounded-md p-2.5 xs:p-3 text-inherit no-underline duration-150 hover:text-foreground hover:duration-0 focus-visible:relative focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction NavigationMenuBackdrop({ ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Backdrop>) {\n return <NavigationMenuPrimitive.Backdrop data-slot=\"navigation-menu-backdrop\" {...props} />;\n}\n\nfunction NavigationMenuPortal({ ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Portal>) {\n return <NavigationMenuPrimitive.Portal data-slot=\"navigation-menu-portal\" {...props} />;\n}\n\nfunction NavigationMenuArrow({ ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Arrow>) {\n return (\n <NavigationMenuPrimitive.Arrow\n className=\"flex transition-[left] duration-[var(--duration)] ease-[var(--easing)] data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=top]:bottom-[-8px] data-[side=right]:left-[-13px] data-[side=left]:rotate-90 data-[side=right]:-rotate-90 data-[side=top]:rotate-180\"\n {...props}\n >\n <ArrowSvg />\n </NavigationMenuPrimitive.Arrow>\n );\n}\n\nfunction NavigationMenuViewport({\n className,\n children,\n side,\n sideOffset,\n align,\n alignOffset,\n collisionPadding,\n collisionBoundary,\n arrow = false,\n positionMethod = 'fixed',\n ...props\n}: NavigationMenuViewportProps) {\n return (\n <NavigationMenuPortal>\n <NavigationMenuPrimitive.Positioner\n data-slot=\"navigation-menu-positioner\"\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n collisionPadding={collisionPadding}\n collisionBoundary={collisionBoundary}\n positionMethod={positionMethod}\n className=\"z-50 box-border h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-(--duration) ease-(--easing) before:absolute before:content-[''] data-instant:transition-none data-[side=bottom]:before:-top-2.5 data-[side=left]:before:top-0 data-[side=right]:before:top-0 data-[side=bottom]:before:right-0 data-[side=left]:before:-right-2.5 data-[side=top]:before:right-0 data-[side=left]:before:bottom-0 data-[side=right]:before:bottom-0 data-[side=top]:before:-bottom-2.5 data-[side=bottom]:before:left-0 data-[side=right]:before:-left-2.5 data-[side=top]:before:left-0 data-[side=bottom]:before:h-2.5 data-[side=top]:before:h-2.5 data-[side=left]:before:w-2.5 data-[side=right]:before:w-2.5\"\n style={validCssVars({ '--duration': '0.35s', '--easing': 'cubic-bezier(0.22, 1, 0.36, 1)' })}\n >\n <NavigationMenuPrimitive.Popup\n data-slot=\"navigation-menu-content\"\n className={cn(\n 'relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) overflow-hidden rounded-md text-foreground transition-[opacity,transform,width,height,scale,translate] duration-(--duration) ease-(--easing) data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-150',\n solidSurface(3, 3),\n )}\n >\n {arrow ? <NavigationMenuArrow /> : null}\n <NavigationMenuPrimitive.Viewport\n data-slot=\"navigation-menu-viewport\"\n className={cn('relative h-full w-full overflow-hidden', className)}\n {...props}\n >\n {children}\n </NavigationMenuPrimitive.Viewport>\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPortal>\n );\n}\n\nfunction NavigationMenuSub({\n className,\n children,\n orientation = 'vertical',\n side = 'right',\n sideOffset = 24,\n align = 'end',\n alignOffset = -24,\n arrow = false,\n ...props\n}: NavigationMenuSubProps) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu-sub\"\n className={cn('', className)}\n orientation={orientation}\n {...props}\n >\n {children}\n <NavigationMenuPortal>\n <NavigationMenuPrimitive.Positioner\n data-slot=\"navigation-menu-sub-positioner\"\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n align={align}\n side={side}\n className=\"box-border h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-(--duration) ease-(--easing) before:absolute before:content-[''] data-instant:transition-none data-[side=bottom]:before:-top-2.5 data-[side=left]:before:top-0 data-[side=right]:before:top-0 data-[side=bottom]:before:right-0 data-[side=left]:before:-right-2.5 data-[side=top]:before:right-0 data-[side=left]:before:bottom-0 data-[side=right]:before:bottom-0 data-[side=top]:before:-bottom-2.5 data-[side=bottom]:before:left-0 data-[side=right]:before:-left-2.5 data-[side=top]:before:left-0 data-[side=bottom]:before:h-2.5 data-[side=top]:before:h-2.5 data-[side=left]:before:w-2.5 data-[side=right]:before:w-2.5\"\n style={validCssVars({ '--duration': '0.35s', '--easing': 'cubic-bezier(0.22, 1, 0.36, 1)' })}\n >\n <NavigationMenuPrimitive.Popup\n data-slot=\"navigation-menu-sub-content\"\n className={cn(\n 'relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) overflow-hidden rounded-md text-foreground transition-[opacity,transform,width,height,scale,translate] duration-(--duration) ease-(--easing) data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-150',\n solidSurface(5, 5),\n )}\n >\n {arrow ? <NavigationMenuArrow /> : null}\n <NavigationMenuPrimitive.Viewport\n data-slot=\"navigation-menu-sub-viewport\"\n className=\"relative h-full w-full overflow-hidden\"\n />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPortal>\n </NavigationMenuPrimitive.Root>\n );\n}\n\nexport {\n NavigationMenu,\n NavigationMenuArrow,\n NavigationMenuBackdrop,\n NavigationMenuContent,\n NavigationMenuIcon,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuPortal,\n NavigationMenuSub,\n NavigationMenuSubTrigger,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n};\n"]}
|
package/dist/chunk-AYY7D2RJ.mjs
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-QAWSH567.mjs';
|
|
2
|
-
import { cva } from 'class-variance-authority';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var buttonVariants = cva(
|
|
6
|
-
"group inline-flex items-center justify-center gap-1.5 font-medium [transition:opacity_.24s_80ms,transform_.15s_cubic-bezier(.4,0,.2,1),box-shadow_.15s_cubic-bezier(.4,0,.2,1),filter_.15s_cubic-bezier(.4,0,.2,1)] disabled:[transition:opacity_.1s]",
|
|
7
|
-
{
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
filled: "bg-(--foreground) text-(--primary-foreground) shadow-elevated-3 hover:opacity-90",
|
|
11
|
-
bordered: "border border-(--border-hi) bg-surface-3 text-foreground shadow-elevated-3 hover:bg-(--muted)",
|
|
12
|
-
ghost: "text-(--foreground-secondary) hover:bg-(--surface-hover) hover:text-(--foreground)"
|
|
13
|
-
},
|
|
14
|
-
size: {
|
|
15
|
-
sm: "h-8 px-3.5 text-[15px]",
|
|
16
|
-
md: "h-9 px-5 text-[17px]",
|
|
17
|
-
lg: "h-11 px-6 text-[17px]",
|
|
18
|
-
icon: "size-11"
|
|
19
|
-
},
|
|
20
|
-
shape: {
|
|
21
|
-
rounded: "rounded-interactive",
|
|
22
|
-
pill: "rounded-full"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
// Pill is the house standard — every CTA is fully rounded.
|
|
26
|
-
defaultVariants: { variant: "filled", size: "md", shape: "pill" }
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
function Button({
|
|
30
|
-
variant,
|
|
31
|
-
size,
|
|
32
|
-
shape,
|
|
33
|
-
showArrow = false,
|
|
34
|
-
external = false,
|
|
35
|
-
title,
|
|
36
|
-
actionOrLink,
|
|
37
|
-
children,
|
|
38
|
-
className,
|
|
39
|
-
"aria-label": ariaLabel,
|
|
40
|
-
"aria-expanded": ariaExpanded
|
|
41
|
-
}) {
|
|
42
|
-
const buttonClassName = cn(buttonVariants({ variant, size, shape }), className);
|
|
43
|
-
const arrowSlot = showArrow && /* @__PURE__ */ jsxs(
|
|
44
|
-
"svg",
|
|
45
|
-
{
|
|
46
|
-
viewBox: "0 0 14 14",
|
|
47
|
-
width: "14",
|
|
48
|
-
height: "14",
|
|
49
|
-
fill: "none",
|
|
50
|
-
stroke: "currentColor",
|
|
51
|
-
strokeWidth: "2",
|
|
52
|
-
strokeLinecap: "round",
|
|
53
|
-
strokeLinejoin: "round",
|
|
54
|
-
"aria-hidden": true,
|
|
55
|
-
className: "shrink-0",
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
"line",
|
|
59
|
-
{
|
|
60
|
-
x1: "0",
|
|
61
|
-
y1: "7",
|
|
62
|
-
x2: "9",
|
|
63
|
-
y2: "7",
|
|
64
|
-
strokeDasharray: "9",
|
|
65
|
-
className: "[stroke-dashoffset:9] [transition:stroke-dashoffset_.08s_cubic-bezier(.22,1,.36,1)] group-hover:[stroke-dashoffset:0] group-hover:[transition-duration:.22s]"
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ jsx(
|
|
69
|
-
"path",
|
|
70
|
-
{
|
|
71
|
-
d: "M5 3l4 4-4 4",
|
|
72
|
-
className: "[transform:translateX(0)] [transition:transform_.22s_cubic-bezier(.22,1,.36,1)] group-hover:[transform:translateX(2px)]"
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
if (typeof actionOrLink === "string")
|
|
79
|
-
return /* @__PURE__ */ jsxs(
|
|
80
|
-
"a",
|
|
81
|
-
{
|
|
82
|
-
href: actionOrLink,
|
|
83
|
-
className: cn(buttonClassName, "no-underline"),
|
|
84
|
-
"aria-label": ariaLabel,
|
|
85
|
-
title,
|
|
86
|
-
...external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
87
|
-
children: [
|
|
88
|
-
children,
|
|
89
|
-
arrowSlot
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
return /* @__PURE__ */ jsxs(
|
|
94
|
-
"button",
|
|
95
|
-
{
|
|
96
|
-
type: "button",
|
|
97
|
-
className: buttonClassName,
|
|
98
|
-
onClick: actionOrLink,
|
|
99
|
-
"aria-label": ariaLabel,
|
|
100
|
-
"aria-expanded": ariaExpanded,
|
|
101
|
-
title,
|
|
102
|
-
children: [
|
|
103
|
-
children,
|
|
104
|
-
arrowSlot
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export { Button };
|
|
111
|
-
//# sourceMappingURL=chunk-AYY7D2RJ.mjs.map
|
|
112
|
-
//# sourceMappingURL=chunk-AYY7D2RJ.mjs.map
|