@fluencypassdevs/pulse 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buttons/cta-brand.d.ts +39 -0
- package/dist/buttons/cta-brand.js +8 -0
- package/dist/buttons/cta-brand.js.map +1 -0
- package/dist/buttons/index.d.ts +5 -0
- package/dist/buttons/index.js +10 -0
- package/dist/buttons/index.js.map +1 -0
- package/dist/buttons/link-brand.d.ts +39 -0
- package/dist/buttons/link-brand.js +6 -0
- package/dist/buttons/link-brand.js.map +1 -0
- package/dist/chunk-2NMEKWO5.js +35 -0
- package/dist/chunk-2NMEKWO5.js.map +1 -0
- package/dist/chunk-44ESRMDK.js +56 -0
- package/dist/chunk-44ESRMDK.js.map +1 -0
- package/dist/chunk-5OLUQZFV.js +27 -0
- package/dist/chunk-5OLUQZFV.js.map +1 -0
- package/dist/chunk-CHSR2ETD.js +24 -0
- package/dist/chunk-CHSR2ETD.js.map +1 -0
- package/dist/chunk-CNVIYLIS.js +3 -0
- package/dist/chunk-CNVIYLIS.js.map +1 -0
- package/dist/chunk-EFZL6LLI.js +3 -0
- package/dist/chunk-EFZL6LLI.js.map +1 -0
- package/dist/chunk-EQHE53IC.js +3 -0
- package/dist/chunk-EQHE53IC.js.map +1 -0
- package/dist/chunk-GQURTO6D.js +29 -0
- package/dist/chunk-GQURTO6D.js.map +1 -0
- package/dist/chunk-JK3UYOM2.js +49 -0
- package/dist/chunk-JK3UYOM2.js.map +1 -0
- package/dist/chunk-KIXWOUY4.js +82 -0
- package/dist/chunk-KIXWOUY4.js.map +1 -0
- package/dist/chunk-KWQHWZI7.js +74 -0
- package/dist/chunk-KWQHWZI7.js.map +1 -0
- package/dist/chunk-OHRYR7PN.js +37 -0
- package/dist/chunk-OHRYR7PN.js.map +1 -0
- package/dist/chunk-PGXSBSQT.js +57 -0
- package/dist/chunk-PGXSBSQT.js.map +1 -0
- package/dist/chunk-RSCKN557.js +29 -0
- package/dist/chunk-RSCKN557.js.map +1 -0
- package/dist/chunk-SDJ6HXPX.js +48 -0
- package/dist/chunk-SDJ6HXPX.js.map +1 -0
- package/dist/chunk-SDPIL7HA.js +65 -0
- package/dist/chunk-SDPIL7HA.js.map +1 -0
- package/dist/chunk-SGFTGHM5.js +3 -0
- package/dist/chunk-SGFTGHM5.js.map +1 -0
- package/dist/chunk-T7EIAVSF.js +18 -0
- package/dist/chunk-T7EIAVSF.js.map +1 -0
- package/dist/chunk-VNGGZL6V.js +105 -0
- package/dist/chunk-VNGGZL6V.js.map +1 -0
- package/dist/chunk-W4KJCBMW.js +11 -0
- package/dist/chunk-W4KJCBMW.js.map +1 -0
- package/dist/chunk-WVYPNZFL.js +77 -0
- package/dist/chunk-WVYPNZFL.js.map +1 -0
- package/dist/chunk-WZIXM2X2.js +55 -0
- package/dist/chunk-WZIXM2X2.js.map +1 -0
- package/dist/chunk-XGV5OIPX.js +33 -0
- package/dist/chunk-XGV5OIPX.js.map +1 -0
- package/dist/chunk-YVBHOWUJ.js +3 -0
- package/dist/chunk-YVBHOWUJ.js.map +1 -0
- package/dist/chunk-YYH3A42F.js +24 -0
- package/dist/chunk-YYH3A42F.js.map +1 -0
- package/dist/chunk-ZRJFO4OW.js +26 -0
- package/dist/chunk-ZRJFO4OW.js.map +1 -0
- package/dist/effects/card-dark-glow.d.ts +30 -0
- package/dist/effects/card-dark-glow.js +6 -0
- package/dist/effects/card-dark-glow.js.map +1 -0
- package/dist/effects/circle-glow.d.ts +26 -0
- package/dist/effects/circle-glow.js +6 -0
- package/dist/effects/circle-glow.js.map +1 -0
- package/dist/effects/hand-underline.d.ts +33 -0
- package/dist/effects/hand-underline.js +8 -0
- package/dist/effects/hand-underline.js.map +1 -0
- package/dist/effects/index.d.ts +7 -0
- package/dist/effects/index.js +14 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/effects/magnetic-button.d.ts +36 -0
- package/dist/effects/magnetic-button.js +7 -0
- package/dist/effects/magnetic-button.js.map +1 -0
- package/dist/effects/marquee.d.ts +30 -0
- package/dist/effects/marquee.js +6 -0
- package/dist/effects/marquee.js.map +1 -0
- package/dist/effects/rotating-word.d.ts +40 -0
- package/dist/effects/rotating-word.js +7 -0
- package/dist/effects/rotating-word.js.map +1 -0
- package/dist/hooks/use-intersection.d.ts +34 -0
- package/dist/hooks/use-intersection.js +5 -0
- package/dist/hooks/use-intersection.js.map +1 -0
- package/dist/hooks/use-reduced-motion.d.ts +11 -0
- package/dist/hooks/use-reduced-motion.js +5 -0
- package/dist/hooks/use-reduced-motion.js.map +1 -0
- package/dist/index.d.ts +887 -0
- package/dist/index.js +1640 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +7 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/section.d.ts +36 -0
- package/dist/layout/section.js +6 -0
- package/dist/layout/section.js.map +1 -0
- package/dist/motion/animated-number.d.ts +35 -0
- package/dist/motion/animated-number.js +8 -0
- package/dist/motion/animated-number.js.map +1 -0
- package/dist/motion/index.d.ts +6 -0
- package/dist/motion/index.js +12 -0
- package/dist/motion/index.js.map +1 -0
- package/dist/motion/reveal-on-scroll.d.ts +27 -0
- package/dist/motion/reveal-on-scroll.js +8 -0
- package/dist/motion/reveal-on-scroll.js.map +1 -0
- package/dist/motion/smooth-anchor.d.ts +31 -0
- package/dist/motion/smooth-anchor.js +5 -0
- package/dist/motion/smooth-anchor.js.map +1 -0
- package/dist/motion/stagger-reveal.d.ts +30 -0
- package/dist/motion/stagger-reveal.js +8 -0
- package/dist/motion/stagger-reveal.js.map +1 -0
- package/dist/styles/foundation.css +79 -0
- package/dist/styles/styles.css +1221 -0
- package/dist/typography/hero-heading.d.ts +25 -0
- package/dist/typography/hero-heading.js +6 -0
- package/dist/typography/hero-heading.js.map +1 -0
- package/dist/typography/index.d.ts +5 -0
- package/dist/typography/index.js +10 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/typography/section-eyebrow.d.ts +21 -0
- package/dist/typography/section-eyebrow.js +6 -0
- package/dist/typography/section-eyebrow.js.map +1 -0
- package/dist/typography/section-heading.d.ts +37 -0
- package/dist/typography/section-heading.js +6 -0
- package/dist/typography/section-heading.js.map +1 -0
- package/dist/typography/section-subtitle.d.ts +19 -0
- package/dist/typography/section-subtitle.js +6 -0
- package/dist/typography/section-subtitle.js.map +1 -0
- package/package.json +103 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const ctaBrandVariants: (props?: ({
|
|
6
|
+
size?: "md" | "lg" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface CtaBrandProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "size">, VariantProps<typeof ctaBrandVariants> {
|
|
9
|
+
/** URL destino. Sempre renderiza como `<a>`. Pra acao de JS sem URL, use `<Button>` core. */
|
|
10
|
+
href: string;
|
|
11
|
+
/** Quando true, abre em nova aba com `rel="noopener noreferrer"`. Default `false`. */
|
|
12
|
+
external?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Escape hatch — desliga o efeito magnetic wrapper. Use em contextos onde o
|
|
15
|
+
* movimento incomoda (dentro de Sheet/Drawer/popover). Default `false`
|
|
16
|
+
* (magnetic SEMPRE ligado — esse e o ponto do CtaBrand).
|
|
17
|
+
*/
|
|
18
|
+
disableMagnetic?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* CTA principal de marketing — botao com gradient brand rose (Fluencypass),
|
|
22
|
+
* rounded-full, drop-shadow glow + brightness hover, e efeito magnetic
|
|
23
|
+
* embutido (puxa em direcao ao cursor).
|
|
24
|
+
*
|
|
25
|
+
* Pra acoes de JS sem URL (submit de form, abrir modal etc), use o
|
|
26
|
+
* `<Button>` core do Cycle em vez disso.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <CtaBrand href="#vendas">
|
|
30
|
+
* Solicitar demonstracao
|
|
31
|
+
* </CtaBrand>
|
|
32
|
+
*
|
|
33
|
+
* <CtaBrand href="https://app.fluencypass.com" external size="md">
|
|
34
|
+
* Acessar app
|
|
35
|
+
* </CtaBrand>
|
|
36
|
+
*/
|
|
37
|
+
declare const CtaBrand: React.ForwardRefExoticComponent<CtaBrandProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
38
|
+
|
|
39
|
+
export { CtaBrand, type CtaBrandProps, ctaBrandVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { CtaBrand, ctaBrandVariants } from '../chunk-44ESRMDK.js';
|
|
3
|
+
import '../chunk-VNGGZL6V.js';
|
|
4
|
+
import '../chunk-T7EIAVSF.js';
|
|
5
|
+
import '../chunk-W4KJCBMW.js';
|
|
6
|
+
import '../chunk-2NMEKWO5.js';
|
|
7
|
+
//# sourceMappingURL=cta-brand.js.map
|
|
8
|
+
//# sourceMappingURL=cta-brand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cta-brand.js"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import '../chunk-SGFTGHM5.js';
|
|
3
|
+
export { CtaBrand, ctaBrandVariants } from '../chunk-44ESRMDK.js';
|
|
4
|
+
export { LinkBrand } from '../chunk-SDJ6HXPX.js';
|
|
5
|
+
import '../chunk-VNGGZL6V.js';
|
|
6
|
+
import '../chunk-T7EIAVSF.js';
|
|
7
|
+
import '../chunk-W4KJCBMW.js';
|
|
8
|
+
import '../chunk-2NMEKWO5.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type LinkBrandAnchorProps = {
|
|
4
|
+
/** Renderiza como `<a>` (default). */
|
|
5
|
+
as?: "a";
|
|
6
|
+
/** URL destino. */
|
|
7
|
+
href: string;
|
|
8
|
+
external?: boolean;
|
|
9
|
+
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "as" | "href">;
|
|
10
|
+
type LinkBrandButtonProps = {
|
|
11
|
+
/** Renderiza como `<button>` quando a acao e JS (sem URL). */
|
|
12
|
+
as: "button";
|
|
13
|
+
href?: never;
|
|
14
|
+
external?: never;
|
|
15
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "as">;
|
|
16
|
+
type LinkBrandProps = LinkBrandAnchorProps | LinkBrandButtonProps;
|
|
17
|
+
/**
|
|
18
|
+
* Link de texto discreto da marca — `text-brand-default` com hover pra
|
|
19
|
+
* `text-brand-dark`. Usado em nav, footer e texto inline.
|
|
20
|
+
*
|
|
21
|
+
* Sem underline por default (visual mais clean). Pra ter underline, passe
|
|
22
|
+
* `className="hover:underline"` ou `underline` no consumer.
|
|
23
|
+
*
|
|
24
|
+
* Pode renderizar como `<a>` (default) ou `<button>` via prop `as`.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* <LinkBrand href="/precos">Ver planos</LinkBrand>
|
|
28
|
+
*
|
|
29
|
+
* <LinkBrand href="https://twitter.com" external>
|
|
30
|
+
* Siga no Twitter
|
|
31
|
+
* </LinkBrand>
|
|
32
|
+
*
|
|
33
|
+
* <LinkBrand as="button" onClick={() => openModal()}>
|
|
34
|
+
* Abrir filtros
|
|
35
|
+
* </LinkBrand>
|
|
36
|
+
*/
|
|
37
|
+
declare const LinkBrand: React.ForwardRefExoticComponent<LinkBrandProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
38
|
+
|
|
39
|
+
export { LinkBrand, type LinkBrandProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"link-brand.js"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { __objRest, __spreadProps, __spreadValues };
|
|
34
|
+
//# sourceMappingURL=chunk-2NMEKWO5.js.map
|
|
35
|
+
//# sourceMappingURL=chunk-2NMEKWO5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-2NMEKWO5.js"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { MagneticButton } from './chunk-VNGGZL6V.js';
|
|
2
|
+
import { cn } from './chunk-W4KJCBMW.js';
|
|
3
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-2NMEKWO5.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var ctaBrandVariants = cva(
|
|
9
|
+
[
|
|
10
|
+
// Base
|
|
11
|
+
"inline-flex items-center justify-center gap-2",
|
|
12
|
+
"rounded-full font-semibold whitespace-nowrap",
|
|
13
|
+
"text-white border-0",
|
|
14
|
+
// Brand gradient (consome tokens --brand-soft/--brand-dark da Camada 2a)
|
|
15
|
+
"bg-gradient-to-b from-[color:var(--brand-soft)] to-[color:var(--brand-dark)]",
|
|
16
|
+
"hover:brightness-110 transition-[filter] duration-200",
|
|
17
|
+
// A11y focus
|
|
18
|
+
"outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
19
|
+
"focus-visible:outline-[color:var(--brand-default)]"
|
|
20
|
+
].join(" "),
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
size: {
|
|
24
|
+
md: "h-11 px-7 text-sm",
|
|
25
|
+
lg: "h-13 px-10 text-base"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
size: "lg"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
var CtaBrand = React.forwardRef(
|
|
34
|
+
function CtaBrand2(_a, ref) {
|
|
35
|
+
var _b = _a, { href, external = false, size, disableMagnetic = false, className, children } = _b, props = __objRest(_b, ["href", "external", "size", "disableMagnetic", "className", "children"]);
|
|
36
|
+
const anchor = /* @__PURE__ */ jsx(
|
|
37
|
+
"a",
|
|
38
|
+
__spreadProps(__spreadValues({
|
|
39
|
+
ref,
|
|
40
|
+
href,
|
|
41
|
+
target: external ? "_blank" : void 0,
|
|
42
|
+
rel: external ? "noopener noreferrer" : void 0,
|
|
43
|
+
"data-slot": "cta-brand",
|
|
44
|
+
className: cn(ctaBrandVariants({ size }), className)
|
|
45
|
+
}, props), {
|
|
46
|
+
children
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
if (disableMagnetic) return anchor;
|
|
50
|
+
return /* @__PURE__ */ jsx(MagneticButton, { children: anchor });
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export { CtaBrand, ctaBrandVariants };
|
|
55
|
+
//# sourceMappingURL=chunk-44ESRMDK.js.map
|
|
56
|
+
//# sourceMappingURL=chunk-44ESRMDK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing/buttons/cta-brand.tsx"],"names":["CtaBrand"],"mappings":";;;;;;;AAQA,IAAM,gBAAA,GAAmB,GAAA;AAAA,EACvB;AAAA;AAAA,IAEE,+CAAA;AAAA,IACA,8CAAA;AAAA,IACA,qBAAA;AAAA;AAAA,IAEA,8EAAA;AAAA,IACA,uDAAA;AAAA;AAAA,IAEA,qEAAA;AAAA,IACA;AAAA,GACF,CAAE,KAAK,GAAG,CAAA;AAAA,EACV;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,mBAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,IAAA,EAAM;AAAA;AACR;AAEJ;AAkCA,IAAM,QAAA,GAAiB,KAAA,CAAA,UAAA;AAAA,EACrB,SAASA,SAAAA,CACP,EAAA,EACA,GAAA,EACA;AAFA,IAAA,IAAA,EAAA,GAAA,EAAA,EAAE,QAAM,QAAA,GAAW,KAAA,EAAO,IAAA,EAAM,eAAA,GAAkB,OAAO,SAAA,EAAW,QAAA,EApExE,GAoEI,EAAA,EAAiF,kBAAjF,EAAA,EAAiF,CAA/E,QAAM,UAAA,EAAkB,MAAA,EAAM,mBAAyB,WAAA,EAAW,UAAA,CAAA,CAAA;AAGpE,IAAA,MAAM,MAAA,mBACJ,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA,aAAA,CAAA,cAAA,CAAA;AAAA,QACC,GAAA;AAAA,QACA,IAAA;AAAA,QACA,MAAA,EAAQ,WAAW,QAAA,GAAW,MAAA;AAAA,QAC9B,GAAA,EAAK,WAAW,qBAAA,GAAwB,MAAA;AAAA,QACxC,WAAA,EAAU,WAAA;AAAA,QACV,WAAW,EAAA,CAAG,gBAAA,CAAiB,EAAE,IAAA,EAAM,GAAG,SAAS;AAAA,OAAA,EAC/C,KAAA,CAAA,EAPL;AAAA,QASE;AAAA,OAAA;AAAA,KACH;AAGF,IAAA,IAAI,iBAAiB,OAAO,MAAA;AAC5B,IAAA,uBAAO,GAAA,CAAC,kBAAgB,QAAA,EAAA,MAAA,EAAO,CAAA;AAAA,EACjC;AACF","file":"chunk-44ESRMDK.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@core/lib/utils\"\nimport { MagneticButton } from \"@pulse/components/marketing/effects/magnetic-button\"\n\nconst ctaBrandVariants = cva(\n [\n // Base\n \"inline-flex items-center justify-center gap-2\",\n \"rounded-full font-semibold whitespace-nowrap\",\n \"text-white border-0\",\n // Brand gradient (consome tokens --brand-soft/--brand-dark da Camada 2a)\n \"bg-gradient-to-b from-[color:var(--brand-soft)] to-[color:var(--brand-dark)]\",\n \"hover:brightness-110 transition-[filter] duration-200\",\n // A11y focus\n \"outline-none focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-[color:var(--brand-default)]\",\n ].join(\" \"),\n {\n variants: {\n size: {\n md: \"h-11 px-7 text-sm\",\n lg: \"h-13 px-10 text-base\",\n },\n },\n defaultVariants: {\n size: \"lg\",\n },\n }\n)\n\nexport interface CtaBrandProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"size\">,\n VariantProps<typeof ctaBrandVariants> {\n /** URL destino. Sempre renderiza como `<a>`. Pra acao de JS sem URL, use `<Button>` core. */\n href: string\n /** Quando true, abre em nova aba com `rel=\"noopener noreferrer\"`. Default `false`. */\n external?: boolean\n /**\n * Escape hatch — desliga o efeito magnetic wrapper. Use em contextos onde o\n * movimento incomoda (dentro de Sheet/Drawer/popover). Default `false`\n * (magnetic SEMPRE ligado — esse e o ponto do CtaBrand).\n */\n disableMagnetic?: boolean\n}\n\n/**\n * CTA principal de marketing — botao com gradient brand rose (Fluencypass),\n * rounded-full, drop-shadow glow + brightness hover, e efeito magnetic\n * embutido (puxa em direcao ao cursor).\n *\n * Pra acoes de JS sem URL (submit de form, abrir modal etc), use o\n * `<Button>` core do Cycle em vez disso.\n *\n * @example\n * <CtaBrand href=\"#vendas\">\n * Solicitar demonstracao\n * </CtaBrand>\n *\n * <CtaBrand href=\"https://app.fluencypass.com\" external size=\"md\">\n * Acessar app\n * </CtaBrand>\n */\nconst CtaBrand = React.forwardRef<HTMLAnchorElement, CtaBrandProps>(\n function CtaBrand(\n { href, external = false, size, disableMagnetic = false, className, children, ...props },\n ref\n ) {\n const anchor = (\n <a\n ref={ref}\n href={href}\n target={external ? \"_blank\" : undefined}\n rel={external ? \"noopener noreferrer\" : undefined}\n data-slot=\"cta-brand\"\n className={cn(ctaBrandVariants({ size }), className)}\n {...props}\n >\n {children}\n </a>\n )\n\n if (disableMagnetic) return anchor\n return <MagneticButton>{anchor}</MagneticButton>\n }\n)\n\nexport { CtaBrand, ctaBrandVariants }\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cn } from './chunk-W4KJCBMW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-2NMEKWO5.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var SectionEyebrow = React.forwardRef(
|
|
7
|
+
function SectionEyebrow2(_a, ref) {
|
|
8
|
+
var _b = _a, { as = "p", align = "left", className } = _b, props = __objRest(_b, ["as", "align", "className"]);
|
|
9
|
+
const Tag = as;
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Tag,
|
|
12
|
+
__spreadValues({
|
|
13
|
+
ref,
|
|
14
|
+
"data-slot": "section-eyebrow",
|
|
15
|
+
className: cn(
|
|
16
|
+
"text-xs font-mono uppercase tracking-widest text-muted-foreground",
|
|
17
|
+
align === "center" && "text-center",
|
|
18
|
+
className
|
|
19
|
+
)
|
|
20
|
+
}, props)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export { SectionEyebrow };
|
|
26
|
+
//# sourceMappingURL=chunk-5OLUQZFV.js.map
|
|
27
|
+
//# sourceMappingURL=chunk-5OLUQZFV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing/typography/section-eyebrow.tsx"],"names":["SectionEyebrow"],"mappings":";;;;;AAsBA,IAAM,cAAA,GAAuB,KAAA,CAAA,UAAA;AAAA,EAC3B,SAASA,eAAAA,CAAe,EAAA,EAAmD,GAAA,EAAK;AAAxD,IAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAAA,EAAA,GAAK,GAAA,EAAK,KAAA,GAAQ,MAAA,EAAQ,SAAA,EAvBtD,GAuB0B,EAAA,EAA0C,KAAA,GAAA,SAAA,CAA1C,EAAA,EAA0C,CAAxC,IAAA,EAAU,OAAA,EAAgB,WAAA,CAAA,CAAA;AAClD,IAAA,MAAM,GAAA,GAAM,EAAA;AACZ,IAAA,uBACE,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA,cAAA,CAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAA,EAAU,iBAAA;AAAA,QACV,SAAA,EAAW,EAAA;AAAA,UACT,mEAAA;AAAA,UACA,UAAU,QAAA,IAAY,aAAA;AAAA,UACtB;AAAA;AACF,OAAA,EACI,KAAA;AAAA,KACN;AAAA,EAEJ;AACF","file":"chunk-5OLUQZFV.js","sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@core/lib/utils\"\n\ntype SectionEyebrowTag = \"p\" | \"span\" | \"div\"\n\nexport interface SectionEyebrowProps extends React.HTMLAttributes<HTMLElement> {\n /** Tag renderizada. Default `\"p\"`. */\n as?: SectionEyebrowTag\n /** Alinhamento. Default `\"left\"`. */\n align?: \"left\" | \"center\"\n}\n\n/**\n * Rotulo monospace acima do `SectionHeading` — funciona como \"eyebrow\" que\n * categoriza a dobra (ex: \"Nossa solucao\", \"Para empresas\"). Tipografia\n * conservadora pra nao competir com o heading principal.\n *\n * @example\n * <SectionEyebrow align=\"center\">Para empresas</SectionEyebrow>\n * <SectionHeading>Acelere o ingles do seu time</SectionHeading>\n */\nconst SectionEyebrow = React.forwardRef<HTMLElement, SectionEyebrowProps>(\n function SectionEyebrow({ as = \"p\", align = \"left\", className, ...props }, ref) {\n const Tag = as as React.ElementType\n return (\n <Tag\n ref={ref}\n data-slot=\"section-eyebrow\"\n className={cn(\n \"text-xs font-mono uppercase tracking-widest text-muted-foreground\",\n align === \"center\" && \"text-center\",\n className\n )}\n {...props}\n />\n )\n }\n)\n\nexport { SectionEyebrow }\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from './chunk-W4KJCBMW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-2NMEKWO5.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var CardDarkGlow = React.forwardRef(
|
|
7
|
+
function CardDarkGlow2(_a, ref) {
|
|
8
|
+
var _b = _a, { as = "div", interactive = true, className } = _b, props = __objRest(_b, ["as", "interactive", "className"]);
|
|
9
|
+
const Tag = as;
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Tag,
|
|
12
|
+
__spreadValues({
|
|
13
|
+
ref,
|
|
14
|
+
"data-slot": "card-dark-glow",
|
|
15
|
+
"data-interactive": interactive ? "true" : "false",
|
|
16
|
+
className: cn("cycle-card-dark-glow", className)
|
|
17
|
+
}, props)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export { CardDarkGlow };
|
|
23
|
+
//# sourceMappingURL=chunk-CHSR2ETD.js.map
|
|
24
|
+
//# sourceMappingURL=chunk-CHSR2ETD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing/effects/card-dark-glow.tsx"],"names":["CardDarkGlow"],"mappings":";;;;;AA+BA,IAAM,YAAA,GAAqB,KAAA,CAAA,UAAA;AAAA,EACzB,SAASA,aAAAA,CAAa,EAAA,EAAyD,GAAA,EAAK;AAA9D,IAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAAA,EAAA,GAAK,KAAA,EAAO,WAAA,GAAc,IAAA,EAAM,SAAA,EAhC1D,GAgCwB,EAAA,EAAgD,KAAA,GAAA,SAAA,CAAhD,EAAA,EAAgD,CAA9C,IAAA,EAAY,aAAA,EAAoB,WAAA,CAAA,CAAA;AACtD,IAAA,MAAM,GAAA,GAAM,EAAA;AACZ,IAAA,uBACE,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA,cAAA,CAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAA,EAAU,gBAAA;AAAA,QACV,kBAAA,EAAkB,cAAc,MAAA,GAAS,OAAA;AAAA,QACzC,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS;AAAA,OAAA,EAC3C,KAAA;AAAA,KACN;AAAA,EAEJ;AACF","file":"chunk-CHSR2ETD.js","sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@core/lib/utils\"\n\ntype CardDarkGlowTag = \"div\" | \"article\" | \"section\"\n\nexport interface CardDarkGlowProps extends React.HTMLAttributes<HTMLElement> {\n /** Tag renderizada. Default `\"div\"`. */\n as?: CardDarkGlowTag\n /**\n * Habilita lift visual no hover (`translateY(-3px)` + glow mais forte).\n * Default `true`. Use `false` em cards que sao apenas conteudo (sem ser link/clicavel).\n */\n interactive?: boolean\n}\n\n/**\n * Wrapper de card com inset highlight + sombra com glow rose subtil + hover\n * lift opcional. Pareie com `CircleGlow` (no container externo) pra entregar o\n * efeito \"dark premium\" que repete pelas dobras do corporate.\n *\n * @example\n * <CardDarkGlow className=\"rounded-2xl bg-card border p-6\">\n * <h3>Titulo</h3>\n * <p>Descricao do card</p>\n * </CardDarkGlow>\n *\n * <CardDarkGlow as=\"article\" interactive={false}>\n * ...card nao-interativo, sem hover lift\n * </CardDarkGlow>\n */\nconst CardDarkGlow = React.forwardRef<HTMLElement, CardDarkGlowProps>(\n function CardDarkGlow({ as = \"div\", interactive = true, className, ...props }, ref) {\n const Tag = as as React.ElementType\n return (\n <Tag\n ref={ref}\n data-slot=\"card-dark-glow\"\n data-interactive={interactive ? \"true\" : \"false\"}\n className={cn(\"cycle-card-dark-glow\", className)}\n {...props}\n />\n )\n }\n)\n\nexport { CardDarkGlow }\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-CNVIYLIS.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-EFZL6LLI.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-EQHE53IC.js"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from './chunk-W4KJCBMW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-2NMEKWO5.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var HeroHeading = React.forwardRef(
|
|
7
|
+
function HeroHeading2(_a, ref) {
|
|
8
|
+
var _b = _a, { as = "h1", align = "left", className } = _b, props = __objRest(_b, ["as", "align", "className"]);
|
|
9
|
+
const Tag = as;
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Tag,
|
|
12
|
+
__spreadValues({
|
|
13
|
+
ref,
|
|
14
|
+
"data-slot": "hero-heading",
|
|
15
|
+
className: cn(
|
|
16
|
+
"text-3xl sm:text-4xl md:text-5xl lg:text-[56px]",
|
|
17
|
+
"font-bold leading-[1.07] tracking-tight text-balance",
|
|
18
|
+
"max-w-2xl",
|
|
19
|
+
align === "center" && "text-center mx-auto",
|
|
20
|
+
className
|
|
21
|
+
)
|
|
22
|
+
}, props)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export { HeroHeading };
|
|
28
|
+
//# sourceMappingURL=chunk-GQURTO6D.js.map
|
|
29
|
+
//# sourceMappingURL=chunk-GQURTO6D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing/typography/hero-heading.tsx"],"names":["HeroHeading"],"mappings":";;;;;AA2BA,IAAM,WAAA,GAAoB,KAAA,CAAA,UAAA;AAAA,EACxB,SAASA,YAAAA,CAAY,EAAA,EAAoD,GAAA,EAAK;AAAzD,IAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAAA,EAAA,GAAK,IAAA,EAAM,KAAA,GAAQ,MAAA,EAAQ,SAAA,EA5BpD,GA4BuB,EAAA,EAA2C,KAAA,GAAA,SAAA,CAA3C,EAAA,EAA2C,CAAzC,IAAA,EAAW,OAAA,EAAgB,WAAA,CAAA,CAAA;AAChD,IAAA,MAAM,GAAA,GAAM,EAAA;AACZ,IAAA,uBACE,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA,cAAA,CAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAA,EAAU,cAAA;AAAA,QACV,SAAA,EAAW,EAAA;AAAA,UACT,iDAAA;AAAA,UACA,sDAAA;AAAA,UACA,WAAA;AAAA,UACA,UAAU,QAAA,IAAY,qBAAA;AAAA,UACtB;AAAA;AACF,OAAA,EACI,KAAA;AAAA,KACN;AAAA,EAEJ;AACF","file":"chunk-GQURTO6D.js","sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@core/lib/utils\"\n\ntype HeroHeadingTag = \"h1\" | \"h2\" | \"div\"\n\nexport interface HeroHeadingProps\n extends Omit<React.HTMLAttributes<HTMLHeadingElement>, \"color\"> {\n /** Tag renderizada. Default `\"h1\"`. */\n as?: HeroHeadingTag\n /** Alinhamento horizontal. Default `\"left\"`. */\n align?: \"left\" | \"center\"\n}\n\n/**\n * Titulo dramatico de hero — sizes grandes, weight bold, leading apertado\n * (1.07) pra dar \"punch\" visual. Use no `<h1>` da primeira dobra de landings.\n *\n * @example\n * <HeroHeading>\n * Acelere o ingles do seu time\n * </HeroHeading>\n *\n * <HeroHeading align=\"center\">\n * Aprenda <RotatingWord words={[\"rapido\", \"facil\"]} /> com IA\n * </HeroHeading>\n */\nconst HeroHeading = React.forwardRef<HTMLHeadingElement, HeroHeadingProps>(\n function HeroHeading({ as = \"h1\", align = \"left\", className, ...props }, ref) {\n const Tag = as as React.ElementType\n return (\n <Tag\n ref={ref}\n data-slot=\"hero-heading\"\n className={cn(\n \"text-3xl sm:text-4xl md:text-5xl lg:text-[56px]\",\n \"font-bold leading-[1.07] tracking-tight text-balance\",\n \"max-w-2xl\",\n align === \"center\" && \"text-center mx-auto\",\n className\n )}\n {...props}\n />\n )\n }\n)\n\nexport { HeroHeading }\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useIntersection } from './chunk-OHRYR7PN.js';
|
|
2
|
+
import { useReducedMotion } from './chunk-T7EIAVSF.js';
|
|
3
|
+
import { cn } from './chunk-W4KJCBMW.js';
|
|
4
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-2NMEKWO5.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function RevealOnScroll(_a) {
|
|
8
|
+
var _b = _a, {
|
|
9
|
+
as = "div",
|
|
10
|
+
delay = 0,
|
|
11
|
+
threshold = 0.15,
|
|
12
|
+
rootMargin = "0px 0px -10% 0px",
|
|
13
|
+
repeat = false,
|
|
14
|
+
className,
|
|
15
|
+
style,
|
|
16
|
+
children
|
|
17
|
+
} = _b, props = __objRest(_b, [
|
|
18
|
+
"as",
|
|
19
|
+
"delay",
|
|
20
|
+
"threshold",
|
|
21
|
+
"rootMargin",
|
|
22
|
+
"repeat",
|
|
23
|
+
"className",
|
|
24
|
+
"style",
|
|
25
|
+
"children"
|
|
26
|
+
]);
|
|
27
|
+
const reduced = useReducedMotion();
|
|
28
|
+
const { ref, isVisible } = useIntersection({
|
|
29
|
+
threshold,
|
|
30
|
+
rootMargin,
|
|
31
|
+
once: !repeat,
|
|
32
|
+
startVisible: reduced
|
|
33
|
+
});
|
|
34
|
+
const Tag = as;
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
Tag,
|
|
37
|
+
__spreadProps(__spreadValues({
|
|
38
|
+
ref,
|
|
39
|
+
className: cn("cycle-reveal", isVisible && "is-visible", className),
|
|
40
|
+
style: delay && !reduced ? __spreadValues({ transitionDelay: `${delay}ms` }, style) : style
|
|
41
|
+
}, props), {
|
|
42
|
+
children
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { RevealOnScroll };
|
|
48
|
+
//# sourceMappingURL=chunk-JK3UYOM2.js.map
|
|
49
|
+
//# sourceMappingURL=chunk-JK3UYOM2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing/motion/reveal-on-scroll.tsx"],"names":[],"mappings":";;;;;;AA+BA,SAAS,eAAe,EAAA,EAUA;AAVA,EAAA,IAAA,EAAA,GAAA,EAAA,EACtB;AAAA,IAAA,EAAA,GAAK,KAAA;AAAA,IACL,KAAA,GAAQ,CAAA;AAAA,IACR,SAAA,GAAY,IAAA;AAAA,IACZ,UAAA,GAAa,kBAAA;AAAA,IACb,MAAA,GAAS,KAAA;AAAA,IACT,SAAA;AAAA,IACA,KAAA;AAAA,IACA;AAAA,GAvCF,GA+BwB,EAAA,EASnB,KAAA,GAAA,SAAA,CATmB,EAAA,EASnB;AAAA,IARH,IAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAGA,EAAA,MAAM,UAAU,gBAAA,EAAiB;AACjC,EAAA,MAAM,EAAE,GAAA,EAAK,SAAA,EAAU,GAAI,eAAA,CAA6B;AAAA,IACtD,SAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAM,CAAC,MAAA;AAAA,IACP,YAAA,EAAc;AAAA,GACf,CAAA;AAED,EAAA,MAAM,GAAA,GAAM,EAAA;AACZ,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA,aAAA,CAAA,cAAA,CAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,cAAA,EAAgB,SAAA,IAAa,cAAc,SAAS,CAAA;AAAA,MAClE,KAAA,EAAO,SAAS,CAAC,OAAA,GAAU,iBAAE,eAAA,EAAiB,CAAA,EAAG,KAAK,CAAA,EAAA,CAAA,EAAA,EAAS,KAAA,CAAA,GAAU;AAAA,KAAA,EACrE,KAAA,CAAA,EAJL;AAAA,MAME;AAAA,KAAA;AAAA,GACH;AAEJ","file":"chunk-JK3UYOM2.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@core/lib/utils\"\nimport { useIntersection } from \"@pulse/hooks/use-intersection\"\nimport { useReducedMotion } from \"@pulse/hooks/use-reduced-motion\"\n\ntype AsTag = \"div\" | \"section\" | \"article\" | \"header\" | \"footer\" | \"main\" | \"aside\"\n\nexport interface RevealOnScrollProps extends React.HTMLAttributes<HTMLElement> {\n /** Tag HTML renderizada. Default `\"div\"`. */\n as?: AsTag\n /** Delay extra em ms antes de iniciar a animacao. Default `0`. */\n delay?: number\n /** Fracao do elemento que precisa estar visivel pra disparar. Default `0.15`. */\n threshold?: number\n /** Margin do viewport (CSS shorthand). Default `\"0px 0px -10% 0px\"`. */\n rootMargin?: string\n /** Repetir a animacao toda vez que reentrar no viewport. Default `false`. */\n repeat?: boolean\n}\n\n/**\n * Envelopa qualquer conteudo e aplica fade-up suave quando o elemento entra\n * no viewport. Usa a utility `.cycle-reveal` definida em `globals.css` (que\n * faz `opacity 0 → 1` e `translateY(8px → 0)` com `--duration-reveal`).\n *\n * Acessibilidade: respeita `prefers-reduced-motion` — quando habilitado,\n * o conteudo fica imediatamente visivel sem transicao.\n */\nfunction RevealOnScroll({\n as = \"div\",\n delay = 0,\n threshold = 0.15,\n rootMargin = \"0px 0px -10% 0px\",\n repeat = false,\n className,\n style,\n children,\n ...props\n}: RevealOnScrollProps) {\n const reduced = useReducedMotion()\n const { ref, isVisible } = useIntersection<HTMLElement>({\n threshold,\n rootMargin,\n once: !repeat,\n startVisible: reduced,\n })\n\n const Tag = as as React.ElementType\n return (\n <Tag\n ref={ref}\n className={cn(\"cycle-reveal\", isVisible && \"is-visible\", className)}\n style={delay && !reduced ? { transitionDelay: `${delay}ms`, ...style } : style}\n {...props}\n >\n {children}\n </Tag>\n )\n}\n\nexport { RevealOnScroll }\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useReducedMotion } from './chunk-T7EIAVSF.js';
|
|
2
|
+
import { cn } from './chunk-W4KJCBMW.js';
|
|
3
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-2NMEKWO5.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var RotatingWord = React.forwardRef(
|
|
8
|
+
function RotatingWord2(_a, ref) {
|
|
9
|
+
var _b = _a, { words, typingMs = 80, eraseMs = 45, holdMs = 1500, className } = _b, props = __objRest(_b, ["words", "typingMs", "eraseMs", "holdMs", "className"]);
|
|
10
|
+
var _a2;
|
|
11
|
+
const reduced = useReducedMotion();
|
|
12
|
+
const [wordIdx, setWordIdx] = React.useState(0);
|
|
13
|
+
const [chars, setChars] = React.useState(0);
|
|
14
|
+
const [phase, setPhase] = React.useState("typing");
|
|
15
|
+
const current = (_a2 = words[wordIdx]) != null ? _a2 : "";
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
if (reduced) return;
|
|
18
|
+
let timer;
|
|
19
|
+
if (phase === "typing") {
|
|
20
|
+
if (chars < current.length) {
|
|
21
|
+
timer = window.setTimeout(() => setChars((c) => c + 1), typingMs);
|
|
22
|
+
} else {
|
|
23
|
+
timer = window.setTimeout(() => setPhase("erasing"), holdMs);
|
|
24
|
+
}
|
|
25
|
+
} else if (phase === "erasing") {
|
|
26
|
+
if (chars > 0) {
|
|
27
|
+
timer = window.setTimeout(() => setChars((c) => c - 1), eraseMs);
|
|
28
|
+
} else {
|
|
29
|
+
setWordIdx((i) => (i + 1) % words.length);
|
|
30
|
+
setPhase("typing");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return () => {
|
|
34
|
+
if (timer) window.clearTimeout(timer);
|
|
35
|
+
};
|
|
36
|
+
}, [chars, phase, current, typingMs, eraseMs, holdMs, words.length, reduced]);
|
|
37
|
+
if (reduced) {
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
"span",
|
|
40
|
+
__spreadProps(__spreadValues({
|
|
41
|
+
ref,
|
|
42
|
+
"data-slot": "rotating-word",
|
|
43
|
+
className: cn(className),
|
|
44
|
+
"aria-live": "polite"
|
|
45
|
+
}, props), {
|
|
46
|
+
children: words[0]
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
const displayed = current.substring(0, chars);
|
|
51
|
+
return /* @__PURE__ */ jsxs(
|
|
52
|
+
"span",
|
|
53
|
+
__spreadProps(__spreadValues({
|
|
54
|
+
ref,
|
|
55
|
+
"data-slot": "rotating-word",
|
|
56
|
+
className: cn("whitespace-nowrap", className),
|
|
57
|
+
"aria-live": "polite",
|
|
58
|
+
"aria-atomic": "true"
|
|
59
|
+
}, props), {
|
|
60
|
+
children: [
|
|
61
|
+
displayed,
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
className: "cycle-rotating-cursor inline-block align-baseline bg-current ml-[0.05em]",
|
|
67
|
+
style: {
|
|
68
|
+
width: "0.06em",
|
|
69
|
+
height: "0.82em",
|
|
70
|
+
transform: "translateY(0.08em)"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export { RotatingWord };
|
|
81
|
+
//# sourceMappingURL=chunk-KIXWOUY4.js.map
|
|
82
|
+
//# sourceMappingURL=chunk-KIXWOUY4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing/effects/rotating-word.tsx"],"names":["RotatingWord","_a"],"mappings":"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","file":"chunk-KIXWOUY4.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@core/lib/utils\"\nimport { useReducedMotion } from \"@pulse/hooks/use-reduced-motion\"\n\nexport interface RotatingWordProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n /** Lista de palavras a ciclar (typewriter). */\n words: string[]\n /** Velocidade de digitacao em ms por caractere. Default `80`. */\n typingMs?: number\n /** Velocidade de apagar em ms por caractere. Default `45`. */\n eraseMs?: number\n /** Tempo segurando a palavra completa em ms. Default `1500`. */\n holdMs?: number\n}\n\ntype Phase = \"typing\" | \"holding\" | \"erasing\"\n\n/**\n * Typewriter de palavras em loop. Util em headings de hero para destacar\n * caracteristicas ou propostas de valor que rotacionam.\n *\n * State machine: `typing → holding → erasing → next word`.\n *\n * Cor herda do parent via `currentColor` — wrappa com `text-[color]` ou\n * `text-foreground` no consumer pra controlar. O cursor blink usa a mesma\n * cor do texto (`bg-current`).\n *\n * Acessibilidade:\n * - `aria-live=\"polite\"` + `aria-atomic=\"true\"` — screen reader anuncia a\n * palavra completa apos cada ciclo, sem ler caractere por caractere.\n * - `prefers-reduced-motion: reduce` — renderiza so a primeira palavra,\n * estatica, sem cursor.\n *\n * @example\n * <h1>\n * Aprenda ingles com{\" \"}\n * <RotatingWord\n * className=\"text-[color:var(--brand-default)]\"\n * words={[\"IA\", \"proposito\", \"confianca\"]}\n * />\n * </h1>\n */\nconst RotatingWord = React.forwardRef<HTMLSpanElement, RotatingWordProps>(\n function RotatingWord(\n { words, typingMs = 80, eraseMs = 45, holdMs = 1500, className, ...props },\n ref\n ) {\n const reduced = useReducedMotion()\n const [wordIdx, setWordIdx] = React.useState(0)\n const [chars, setChars] = React.useState(0)\n const [phase, setPhase] = React.useState<Phase>(\"typing\")\n\n const current = words[wordIdx] ?? \"\"\n\n React.useEffect(() => {\n if (reduced) return\n\n let timer: number | undefined\n\n if (phase === \"typing\") {\n if (chars < current.length) {\n timer = window.setTimeout(() => setChars((c) => c + 1), typingMs)\n } else {\n timer = window.setTimeout(() => setPhase(\"erasing\"), holdMs)\n }\n } else if (phase === \"erasing\") {\n if (chars > 0) {\n timer = window.setTimeout(() => setChars((c) => c - 1), eraseMs)\n } else {\n setWordIdx((i) => (i + 1) % words.length)\n setPhase(\"typing\")\n }\n }\n\n return () => {\n if (timer) window.clearTimeout(timer)\n }\n }, [chars, phase, current, typingMs, eraseMs, holdMs, words.length, reduced])\n\n if (reduced) {\n return (\n <span\n ref={ref}\n data-slot=\"rotating-word\"\n className={cn(className)}\n aria-live=\"polite\"\n {...props}\n >\n {words[0]}\n </span>\n )\n }\n\n const displayed = current.substring(0, chars)\n\n return (\n <span\n ref={ref}\n data-slot=\"rotating-word\"\n className={cn(\"whitespace-nowrap\", className)}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n {...props}\n >\n {displayed}\n <span\n aria-hidden=\"true\"\n className=\"cycle-rotating-cursor inline-block align-baseline bg-current ml-[0.05em]\"\n style={{\n width: \"0.06em\",\n height: \"0.82em\",\n transform: \"translateY(0.08em)\",\n }}\n />\n </span>\n )\n }\n)\n\nexport { RotatingWord }\n"]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useIntersection } from './chunk-OHRYR7PN.js';
|
|
2
|
+
import { useReducedMotion } from './chunk-T7EIAVSF.js';
|
|
3
|
+
import { cn } from './chunk-W4KJCBMW.js';
|
|
4
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-2NMEKWO5.js';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var PATH_LENGTH = 240;
|
|
9
|
+
var STROKE_WIDTH = 2.2;
|
|
10
|
+
var SVG_PATH = "M 2 9 C 30 4, 70 12, 110 7 S 180 4, 198 8";
|
|
11
|
+
var SVG_VIEWBOX = "0 0 200 14";
|
|
12
|
+
var HandUnderline = React.forwardRef(
|
|
13
|
+
function HandUnderline2(_a, forwardedRef) {
|
|
14
|
+
var _b = _a, { delay = 600, duration = 780, className, children } = _b, props = __objRest(_b, ["delay", "duration", "className", "children"]);
|
|
15
|
+
const reduced = useReducedMotion();
|
|
16
|
+
const { ref, isVisible } = useIntersection({
|
|
17
|
+
threshold: 0.6,
|
|
18
|
+
rootMargin: "0px",
|
|
19
|
+
startVisible: reduced
|
|
20
|
+
});
|
|
21
|
+
const [draw, setDraw] = React.useState(reduced);
|
|
22
|
+
React.useImperativeHandle(forwardedRef, () => ref.current, [ref]);
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
if (!isVisible || draw) return;
|
|
25
|
+
if (reduced) {
|
|
26
|
+
setDraw(true);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const id = window.setTimeout(() => setDraw(true), delay);
|
|
30
|
+
return () => window.clearTimeout(id);
|
|
31
|
+
}, [isVisible, draw, delay, reduced]);
|
|
32
|
+
return /* @__PURE__ */ jsxs(
|
|
33
|
+
"span",
|
|
34
|
+
__spreadProps(__spreadValues({
|
|
35
|
+
ref,
|
|
36
|
+
"data-slot": "hand-underline",
|
|
37
|
+
className: cn("relative inline-block whitespace-nowrap", className)
|
|
38
|
+
}, props), {
|
|
39
|
+
children: [
|
|
40
|
+
children,
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
"svg",
|
|
43
|
+
{
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
viewBox: SVG_VIEWBOX,
|
|
46
|
+
preserveAspectRatio: "none",
|
|
47
|
+
className: "absolute left-0 right-0 -bottom-1 w-full pointer-events-none",
|
|
48
|
+
style: { height: "0.32em" },
|
|
49
|
+
children: /* @__PURE__ */ jsx(
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
d: SVG_PATH,
|
|
53
|
+
fill: "none",
|
|
54
|
+
stroke: "currentColor",
|
|
55
|
+
strokeWidth: STROKE_WIDTH,
|
|
56
|
+
strokeLinecap: "round",
|
|
57
|
+
style: {
|
|
58
|
+
strokeDasharray: PATH_LENGTH,
|
|
59
|
+
strokeDashoffset: draw ? 0 : PATH_LENGTH,
|
|
60
|
+
transition: reduced ? "none" : `stroke-dashoffset ${duration}ms cubic-bezier(0.22, 1, 0.36, 1)`
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
export { HandUnderline };
|
|
73
|
+
//# sourceMappingURL=chunk-KWQHWZI7.js.map
|
|
74
|
+
//# sourceMappingURL=chunk-KWQHWZI7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/marketing/effects/hand-underline.tsx"],"names":["HandUnderline"],"mappings":";;;;;;;AAiBA,IAAM,WAAA,GAAc,GAAA;AACpB,IAAM,YAAA,GAAe,GAAA;AACrB,IAAM,QAAA,GAAW,2CAAA;AACjB,IAAM,WAAA,GAAc,YAAA;AAuBpB,IAAM,aAAA,GAAsB,KAAA,CAAA,UAAA;AAAA,EAC1B,SAASA,cAAAA,CACP,EAAA,EACA,YAAA,EACA;AAFA,IAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAAA,KAAA,GAAQ,GAAA,EAAK,QAAA,GAAW,GAAA,EAAK,SAAA,EAAW,QAAA,EA7C9C,GA6CI,EAAA,EAAuD,KAAA,GAAA,SAAA,CAAvD,EAAA,EAAuD,CAArD,OAAA,EAAa,YAAgB,WAAA,EAAW,UAAA,CAAA,CAAA;AAG1C,IAAA,MAAM,UAAU,gBAAA,EAAiB;AACjC,IAAA,MAAM,EAAE,GAAA,EAAK,SAAA,EAAU,GAAI,eAAA,CAAiC;AAAA,MAC1D,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY,KAAA;AAAA,MACZ,YAAA,EAAc;AAAA,KACf,CAAA;AACD,IAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAU,eAAS,OAAO,CAAA;AAG9C,IAAM,0BAAoB,YAAA,EAAc,MAAM,IAAI,OAAA,EAA4B,CAAC,GAAG,CAAC,CAAA;AAEnF,IAAM,gBAAU,MAAM;AACpB,MAAA,IAAI,CAAC,aAAa,IAAA,EAAM;AACxB,MAAA,IAAI,OAAA,EAAS;AACX,QAAA,OAAA,CAAQ,IAAI,CAAA;AACZ,QAAA;AAAA,MACF;AACA,MAAA,MAAM,KAAK,MAAA,CAAO,UAAA,CAAW,MAAM,OAAA,CAAQ,IAAI,GAAG,KAAK,CAAA;AACvD,MAAA,OAAO,MAAM,MAAA,CAAO,YAAA,CAAa,EAAE,CAAA;AAAA,IACrC,GAAG,CAAC,SAAA,EAAW,IAAA,EAAM,KAAA,EAAO,OAAO,CAAC,CAAA;AAEpC,IAAA,uBACE,IAAA;AAAA,MAAC,MAAA;AAAA,MAAA,aAAA,CAAA,cAAA,CAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAA,EAAU,gBAAA;AAAA,QACV,SAAA,EAAW,EAAA,CAAG,yCAAA,EAA2C,SAAS;AAAA,OAAA,EAC9D,KAAA,CAAA,EAJL;AAAA,QAME,QAAA,EAAA;AAAA,UAAA,QAAA;AAAA,0BACD,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,aAAA,EAAY,MAAA;AAAA,cACZ,OAAA,EAAS,WAAA;AAAA,cACT,mBAAA,EAAoB,MAAA;AAAA,cACpB,SAAA,EAAU,8DAAA;AAAA,cACV,KAAA,EAAO,EAAE,MAAA,EAAQ,QAAA,EAAS;AAAA,cAE1B,QAAA,kBAAA,GAAA;AAAA,gBAAC,MAAA;AAAA,gBAAA;AAAA,kBACC,CAAA,EAAG,QAAA;AAAA,kBACH,IAAA,EAAK,MAAA;AAAA,kBACL,MAAA,EAAO,cAAA;AAAA,kBACP,WAAA,EAAa,YAAA;AAAA,kBACb,aAAA,EAAc,OAAA;AAAA,kBACd,KAAA,EAAO;AAAA,oBACL,eAAA,EAAiB,WAAA;AAAA,oBACjB,gBAAA,EAAkB,OAAO,CAAA,GAAI,WAAA;AAAA,oBAC7B,UAAA,EAAY,OAAA,GACR,MAAA,GACA,CAAA,kBAAA,EAAqB,QAAQ,CAAA,iCAAA;AAAA;AACnC;AAAA;AACF;AAAA;AACF;AAAA,OAAA;AAAA,KACF;AAAA,EAEJ;AACF","file":"chunk-KWQHWZI7.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@core/lib/utils\"\nimport { useReducedMotion } from \"@pulse/hooks/use-reduced-motion\"\nimport { useIntersection } from \"@pulse/hooks/use-intersection\"\n\nexport interface HandUnderlineProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n /** Delay em ms entre intersecao no viewport e inicio do draw. Default `600`. */\n delay?: number\n /** Duracao do draw em ms (stroke-dashoffset 240 → 0). Default `780`. */\n duration?: number\n children: React.ReactNode\n}\n\nconst PATH_LENGTH = 240\nconst STROKE_WIDTH = 2.2\nconst SVG_PATH = \"M 2 9 C 30 4, 70 12, 110 7 S 180 4, 198 8\"\nconst SVG_VIEWBOX = \"0 0 200 14\"\n\n/**\n * Wrapper que desenha um underline SVG em curva sutil abaixo do texto, animado\n * via stroke-dasharray quando entra no viewport. Util pra dar enfase em\n * palavras-chave em headings sem usar bold/color.\n *\n * Cor do stroke: `currentColor` — herda do parent. Wrappa com\n * `<span className=\"text-[color:var(--brand-default)]\">` ou outra cor.\n *\n * Acessibilidade:\n * - SVG `aria-hidden` (decorativo).\n * - `prefers-reduced-motion: reduce` — desenha o underline completo direto,\n * sem animar.\n *\n * @example\n * <h2>\n * Acelere o ingles do seu{\" \"}\n * <HandUnderline className=\"text-[color:var(--brand-default)]\">\n * time corporativo\n * </HandUnderline>\n * </h2>\n */\nconst HandUnderline = React.forwardRef<HTMLSpanElement, HandUnderlineProps>(\n function HandUnderline(\n { delay = 600, duration = 780, className, children, ...props },\n forwardedRef\n ) {\n const reduced = useReducedMotion()\n const { ref, isVisible } = useIntersection<HTMLSpanElement>({\n threshold: 0.6,\n rootMargin: \"0px\",\n startVisible: reduced,\n })\n const [draw, setDraw] = React.useState(reduced)\n\n // Combina forwarded ref + ref interno do useIntersection.\n React.useImperativeHandle(forwardedRef, () => ref.current as HTMLSpanElement, [ref])\n\n React.useEffect(() => {\n if (!isVisible || draw) return\n if (reduced) {\n setDraw(true)\n return\n }\n const id = window.setTimeout(() => setDraw(true), delay)\n return () => window.clearTimeout(id)\n }, [isVisible, draw, delay, reduced])\n\n return (\n <span\n ref={ref}\n data-slot=\"hand-underline\"\n className={cn(\"relative inline-block whitespace-nowrap\", className)}\n {...props}\n >\n {children}\n <svg\n aria-hidden=\"true\"\n viewBox={SVG_VIEWBOX}\n preserveAspectRatio=\"none\"\n className=\"absolute left-0 right-0 -bottom-1 w-full pointer-events-none\"\n style={{ height: \"0.32em\" }}\n >\n <path\n d={SVG_PATH}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={STROKE_WIDTH}\n strokeLinecap=\"round\"\n style={{\n strokeDasharray: PATH_LENGTH,\n strokeDashoffset: draw ? 0 : PATH_LENGTH,\n transition: reduced\n ? \"none\"\n : `stroke-dashoffset ${duration}ms cubic-bezier(0.22, 1, 0.36, 1)`,\n }}\n />\n </svg>\n </span>\n )\n }\n)\n\nexport { HandUnderline }\n"]}
|