tenara-ui-components 0.1.6 → 0.1.8
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/README.md +2 -2
- package/dist/components/atoms/BackgroundMedia/BackgroundMedia.d.ts +19 -0
- package/dist/components/atoms/BackgroundMedia/BackgroundMedia.d.ts.map +1 -0
- package/dist/components/atoms/BackgroundMedia/index.d.ts +3 -0
- package/dist/components/atoms/BackgroundMedia/index.d.ts.map +1 -0
- package/dist/components/atoms/Button/Button.d.ts +24 -0
- package/dist/components/atoms/Button/Button.d.ts.map +1 -0
- package/dist/components/atoms/ButtonLink/ButtonLink.d.ts +28 -0
- package/dist/components/atoms/ButtonLink/ButtonLink.d.ts.map +1 -0
- package/dist/components/atoms/ButtonLink/index.d.ts +3 -0
- package/dist/components/atoms/ButtonLink/index.d.ts.map +1 -0
- package/dist/components/atoms/Heading/Heading.d.ts +16 -0
- package/dist/components/atoms/Heading/Heading.d.ts.map +1 -0
- package/dist/components/atoms/Heading/index.d.ts +3 -0
- package/dist/components/atoms/Heading/index.d.ts.map +1 -0
- package/dist/components/atoms/TextLink/TextLink.d.ts +18 -0
- package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/molecules/CTA/CTA.d.ts +34 -0
- package/dist/components/molecules/CTA/CTA.d.ts.map +1 -0
- package/dist/components/molecules/CTA/index.d.ts +3 -0
- package/dist/components/molecules/CTA/index.d.ts.map +1 -0
- package/dist/components/molecules/Card/Card.d.ts +21 -0
- package/dist/components/molecules/Card/Card.d.ts.map +1 -0
- package/dist/components/molecules/Header/Header.d.ts +12 -0
- package/dist/components/molecules/Header/Header.d.ts.map +1 -0
- package/dist/components/pages/Page.d.ts +3 -0
- package/dist/components/pages/Page.d.ts.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/themes/core/client-provider.d.ts +8 -0
- package/dist/themes/core/client-provider.d.ts.map +1 -0
- package/dist/themes/core/context.d.ts +1 -0
- package/dist/themes/core/context.d.ts.map +1 -0
- package/dist/themes/core/types.d.ts +1 -0
- package/dist/themes/core/types.d.ts.map +1 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/presets/advisors-plus.d.ts +1 -0
- package/dist/themes/presets/advisors-plus.d.ts.map +1 -0
- package/dist/themes/presets/default.d.ts +1 -0
- package/dist/themes/presets/default.d.ts.map +1 -0
- package/dist/themes/presets/primax.d.ts +1 -0
- package/dist/themes/presets/primax.d.ts.map +1 -0
- package/dist/themes/tenant-config.example.d.ts +1 -0
- package/dist/themes/tenant-config.example.d.ts.map +1 -0
- package/dist/themes/utils/generator.d.ts +1 -0
- package/dist/themes/utils/generator.d.ts.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,13 +14,13 @@ npm install tenara-ui-components
|
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
16
|
// app/layout.tsx (Next.js 13+) or _app.tsx
|
|
17
|
-
import { ThemeProvider,
|
|
17
|
+
import { ThemeProvider, mySiteTheme } from 'tenara-ui-components';
|
|
18
18
|
|
|
19
19
|
export default function RootLayout({ children }) {
|
|
20
20
|
return (
|
|
21
21
|
<html>
|
|
22
22
|
<body>
|
|
23
|
-
<ThemeProvider initialTheme={
|
|
23
|
+
<ThemeProvider initialTheme={mySiteTheme} initialThemeName="theme-name-here">
|
|
24
24
|
{children}
|
|
25
25
|
</ThemeProvider>
|
|
26
26
|
</body>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './BackgroundMedia.scss';
|
|
3
|
+
export interface BackgroundMediaProps {
|
|
4
|
+
/** Video URL for video background */
|
|
5
|
+
videoUrl?: string;
|
|
6
|
+
/** Image URL for image background */
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
/** CSS gradient overlay */
|
|
9
|
+
gradient?: string;
|
|
10
|
+
/** Background color */
|
|
11
|
+
bgColor?: string;
|
|
12
|
+
/** Custom CSS class */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Inline styles */
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
/** Background media component supporting image or video */
|
|
18
|
+
export declare const BackgroundMedia: React.FC<BackgroundMediaProps>;
|
|
19
|
+
//# sourceMappingURL=BackgroundMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackgroundMedia.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/BackgroundMedia/BackgroundMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,2DAA2D;AAC3D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqC1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/BackgroundMedia/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Button.scss';
|
|
3
|
+
export type ButtonType = 'general' | 'video' | 'subscribe' | 'cta' | 'secondary' | 'secondarySolid' | 'twitter' | 'linkedIn' | 'facebook';
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
/** Button variant type */
|
|
6
|
+
buttonType?: ButtonType;
|
|
7
|
+
/** Button label text */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Icon element */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** Allow passing classname to component */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Custom styles */
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
/** Child elements */
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/** Disabled state */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Click handler */
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
}
|
|
22
|
+
/** Primary UI component for user interaction */
|
|
23
|
+
export declare const Button: ({ buttonType, label, icon, className, children, style, disabled, onClick, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,OAAO,GACP,WAAW,GACX,KAAK,GACL,WAAW,GACX,gBAAgB,GAChB,SAAS,GACT,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAID,gDAAgD;AAEhD,eAAO,MAAM,MAAM,GAAI,sFAUpB,WAAW,4CAeb,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonType } from '../Button/Button';
|
|
3
|
+
import '../Button/Button.scss';
|
|
4
|
+
export interface ButtonLinkProps {
|
|
5
|
+
/** Button variant type */
|
|
6
|
+
buttonType?: ButtonType;
|
|
7
|
+
/** Button label text */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Icon element */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** Link URL */
|
|
12
|
+
href: string;
|
|
13
|
+
/** Link target */
|
|
14
|
+
target?: '_blank' | '_self';
|
|
15
|
+
/** Allow passing classname to component */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Custom styles */
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** Child elements */
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
/** ARIA label */
|
|
22
|
+
'aria-label'?: string;
|
|
23
|
+
/** Test ID */
|
|
24
|
+
'data-testid'?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Button-styled link component for navigation */
|
|
27
|
+
export declare const ButtonLink: ({ buttonType, label, icon, href, target, className, children, style, ...props }: ButtonLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=ButtonLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonLink.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/ButtonLink/ButtonLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,uBAAuB,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,eAAe;IACf,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC5B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,kDAAkD;AAClD,eAAO,MAAM,UAAU,GAAI,iFAUxB,eAAe,4CAgBjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/ButtonLink/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Heading.scss';
|
|
3
|
+
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
+
export interface HeadingProps {
|
|
5
|
+
/** Heading level */
|
|
6
|
+
level?: HeadingLevel;
|
|
7
|
+
/** Heading text */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Custom CSS class */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Inline styles */
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/** Heading component with configurable level */
|
|
15
|
+
export declare const Heading: React.FC<HeadingProps>;
|
|
16
|
+
//# sourceMappingURL=Heading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AAExB,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B,oBAAoB;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,mBAAmB;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,gDAAgD;AAChD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAc1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Heading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './TextLink.scss';
|
|
3
|
+
export interface TextLinkProps {
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
externalLink?: string;
|
|
7
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
8
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
'aria-describedby'?: string;
|
|
15
|
+
'data-testid'?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const TextLink: React.FC<TextLinkProps>;
|
|
18
|
+
//# sourceMappingURL=TextLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AAEzB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA+D5C,CAAC"}
|
|
@@ -7,4 +7,5 @@ export { Header } from './molecules/Header/Header';
|
|
|
7
7
|
export { Card } from './molecules/Card/Card';
|
|
8
8
|
export { CTA } from './molecules/CTA';
|
|
9
9
|
export { Page } from './pages/Page';
|
|
10
|
-
export * from '../themes
|
|
10
|
+
export * from '../themes';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGtC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HeadingLevel } from '../../atoms/Heading';
|
|
3
|
+
import './CTA.scss';
|
|
4
|
+
export interface CTAProps {
|
|
5
|
+
/** Video URL for background */
|
|
6
|
+
videoUrl?: string;
|
|
7
|
+
/** Image URL for background */
|
|
8
|
+
imageUrl?: string;
|
|
9
|
+
/** CSS gradient overlay */
|
|
10
|
+
gradient?: string;
|
|
11
|
+
/** Background color */
|
|
12
|
+
bgColor?: string;
|
|
13
|
+
/** CTA title */
|
|
14
|
+
title: string;
|
|
15
|
+
/** Heading level */
|
|
16
|
+
headingLevel?: HeadingLevel;
|
|
17
|
+
/** CTA description */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Button text */
|
|
20
|
+
buttonText: string;
|
|
21
|
+
/** Button link */
|
|
22
|
+
link?: string;
|
|
23
|
+
/** External link flag */
|
|
24
|
+
externalLink?: boolean;
|
|
25
|
+
/** Link target */
|
|
26
|
+
target?: '_blank' | '_self';
|
|
27
|
+
/** Custom CSS class */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Inline styles */
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
/** CTA component with background media and content */
|
|
33
|
+
export declare const CTA: React.FC<CTAProps>;
|
|
34
|
+
//# sourceMappingURL=CTA.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CTA.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CTA/CTA.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAW,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,YAAY,CAAC;AAEpB,MAAM,WAAW,QAAQ;IACvB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,sBAAsB;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC5B,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,sDAAsD;AACtD,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CA6ClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CTA/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../molecules/Card/Card.scss';
|
|
3
|
+
export interface CardProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
maxWidth?: number | string;
|
|
6
|
+
padding?: string;
|
|
7
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
8
|
+
href?: string;
|
|
9
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
10
|
+
imageUrl?: string;
|
|
11
|
+
imageAlt?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
aspectRatio?: string;
|
|
15
|
+
borderRadius?: string;
|
|
16
|
+
hoverEffect?: boolean;
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
'data-testid'?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const Card: React.FC<CardProps>;
|
|
21
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AAExC,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAkIpC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type User = {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
export interface HeaderProps {
|
|
5
|
+
user?: User;
|
|
6
|
+
onLogin?: () => void;
|
|
7
|
+
onLogout?: () => void;
|
|
8
|
+
onCreateAccount?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Header/Header.tsx"],"names":[],"mappings":"AAEA,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,MAAM,GAAI,8CAA8C,WAAW,4CAuC/E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/components/pages/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAwBxB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,3 +7,21 @@ export { Header } from './molecules/Header/Header';
|
|
|
7
7
|
export { Card } from './molecules/Card/Card';
|
|
8
8
|
export { CTA } from './molecules/CTA';
|
|
9
9
|
export { Page } from './pages/Page';
|
|
10
|
+
|
|
11
|
+
// Theming System
|
|
12
|
+
export { ThemeProvider, useTheme } from './themes/core/context';
|
|
13
|
+
export { defaultTheme } from './themes/presets/default';
|
|
14
|
+
export { advisorsPlusTheme } from './themes/presets/advisors-plus';
|
|
15
|
+
export { primaxTheme } from './themes/presets/primax';
|
|
16
|
+
export type {
|
|
17
|
+
ThemeConfig,
|
|
18
|
+
ThemeColors,
|
|
19
|
+
ThemeSpacing,
|
|
20
|
+
ThemeBorderRadius,
|
|
21
|
+
ThemeShadows,
|
|
22
|
+
ThemeTypography,
|
|
23
|
+
ThemeButtons,
|
|
24
|
+
ThemeComponents,
|
|
25
|
+
ThemeVariant,
|
|
26
|
+
ButtonVariant
|
|
27
|
+
} from './themes/core/types';
|
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import e,{createContext as r,useEffect as o,useContext as n}from"react";function t(e,r){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)r.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(e,n[t])&&(o[n[t]]=e[n[t]])}return o}"function"==typeof SuppressedError&&SuppressedError;var a,c={exports:{}},s={};var l,i,d={};
|
|
2
3
|
/**
|
|
3
4
|
* @license React
|
|
@@ -7,5 +8,5 @@ import e,{createContext as r,useEffect as o,useContext as n}from"react";function
|
|
|
7
8
|
*
|
|
8
9
|
* This source code is licensed under the MIT license found in the
|
|
9
10
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/function b(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===_?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case p:return"Fragment";case y:return"Profiler";case g:return"StrictMode";case h:return"Suspense";case k:return"SuspenseList";case N:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case u:return"Portal";case v:return(e.displayName||"Context")+".Provider";case m:return(e._context.displayName||"Context")+".Consumer";case x:var o=e.render;return(e=e.displayName)||(e=""!==(e=o.displayName||o.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(o=e.displayName||null)?o:r(e.type)||"Memo";case w:o=e._payload,e=e._init;try{return r(e(o))}catch(e){}}return null}function o(e){return""+e}function n(e){try{o(e);var r=!1}catch(e){r=!0}if(r){var n=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),o(e)}}function t(e){if(e===p)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===w)return"<...>";try{var o=r(e);return o?"<"+o+">":"<...>"}catch(e){return"<...>"}}function a(){return Error("react-stack-top-frame")}function c(){var e=r(this.type);return A[e]||(A[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,o,t,a,s,d,b,u){var p,g=o.children;if(void 0!==g)if(a)if(S(g)){for(a=0;a<g.length;a++)l(g[a]);Object.freeze&&Object.freeze(g)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(g);if(O.call(o,"key")){g=r(e);var y=Object.keys(o).filter(function(e){return"key"!==e});a=0<y.length?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}",C[g+a]||(y=0<y.length?"{"+y.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,g,y,g),C[g+a]=!0)}if(g=null,void 0!==t&&(n(t),g=""+t),function(e){if(O.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(o)&&(n(o.key),g=""+o.key),"key"in o)for(var m in t={},o)"key"!==m&&(t[m]=o[m]);else t=o;return g&&function(e,r){function o(){i||(i=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,o,n,t,a,s,l){return o=a.ref,e={$$typeof:f,type:e,key:r,props:a,_owner:t},null!==(void 0!==o?o:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:c}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,g,d,0,null===(p=$.A)?null:p.getOwner(),t,b,u)}function l(e){"object"==typeof e&&null!==e&&e.$$typeof===f&&e._store&&(e._store.validated=1)}var i,b=e,f=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),v=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),$=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,S=Array.isArray,H=console.createTask?console.createTask:function(){return null},A={},R=(b={"react-stack-bottom-frame":function(e){return e()}})["react-stack-bottom-frame"].bind(b,a)(),T=H(t(a)),C={};d.Fragment=p,d.jsx=function(e,r,o,n,a){var c=1e4>$.recentlyCreatedOwnerStacks++;return s(e,r,o,!1,0,a,c?Error("react-stack-top-frame"):R,c?H(t(e)):T)},d.jsxs=function(e,r,o,n,a){var c=1e4>$.recentlyCreatedOwnerStacks++;return s(e,r,o,!0,0,a,c?Error("react-stack-top-frame"):R,c?H(t(e)):T)}}()),d}var f=(i||(i=1,"production"===process.env.NODE_ENV?c.exports=function(){if(a)return s;a=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(r,o,n){var t=null;if(void 0!==n&&(t=""+n),void 0!==o.key&&(t=""+o.key),"key"in o)for(var a in n={},o)"key"!==a&&(n[a]=o[a]);else n=o;return o=n.ref,{$$typeof:e,type:r,key:t,ref:void 0!==o?o:null,props:n}}return s.Fragment=r,s.jsx=o,s.jsxs=o,s}():c.exports=b()),c.exports);const u=e=>{var{buttonType:r="general",label:o,icon:n,className:a,children:c,style:s,disabled:l=!1,onClick:i}=e,d=t(e,["buttonType","label","icon","className","children","style","disabled","onClick"]);const b=`button button--${r} ${a||""}`;return f.jsxs("button",Object.assign({type:"button",className:b,style:s,onClick:i,disabled:l},d,{children:[c||o," ",n&&f.jsx("span",{className:"icon",children:n})]}))},p=e=>{var{buttonType:r="general",label:o,icon:n,href:a,target:c="_self",className:s,children:l,style:i}=e,d=t(e,["buttonType","label","icon","href","target","className","children","style"]);const b=`button button--${r} ${s||""}`,u="_blank"===c?"noopener noreferrer":void 0;return f.jsxs("a",Object.assign({href:a,target:c,rel:u,className:b,style:i},d,{children:[l||o," ",n&&f.jsx("span",{className:"icon",children:n})]}))},g=({label:e,href:r,externalLink:o,target:n="_self",onClick:t,className:a="",icon:c,style:s,disabled:l=!1,"aria-label":i,"aria-describedby":d,"data-testid":b})=>{const u=o||r,p=!!o||"_blank"===n;return!u||l?f.jsxs("span",{className:`text-link text-link--disabled ${a}`,style:s,"data-testid":b,"aria-label":i||e,"aria-describedby":d,children:[e," ",c]}):f.jsxs("a",{href:u,target:n,rel:p?"noopener noreferrer":void 0,onClick:e=>{l?e.preventDefault():t&&t(e)},onKeyDown:e=>{!l||"Enter"!==e.key&&" "!==e.key||e.preventDefault()},className:`text-link ${a}`,style:s,"aria-label":i,"aria-describedby":d,"data-testid":b,children:[e," ",c]})},y=({videoUrl:e,imageUrl:r,gradient:o,bgColor:n,className:t,style:a})=>{const c=["background-media",t].filter(Boolean).join(" ");if(e)return f.jsxs("video",{className:`${c} background-media--video`,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:a,children:[f.jsx("source",{src:e,type:"video/mp4"}),"Your browser does not support video."]});const s=Object.assign({backgroundImage:o?`${o}, url(${r})`:r?`url(${r})`:void 0,backgroundColor:n},a);return f.jsx("div",{className:c,style:s})},m=({level:e="h2",children:r,className:o,style:n})=>{const t=e,a=["heading",o].filter(Boolean).join(" ");return f.jsx(t,{className:a,style:n,children:r})},v=({user:e,onLogin:r,onLogout:o,onCreateAccount:n})=>f.jsx("header",{children:f.jsxs("div",{className:"storybook-header",children:[f.jsxs("div",{children:[f.jsx("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{fill:"none",fillRule:"evenodd",children:[f.jsx("path",{d:"M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z",fill:"#FFF"}),f.jsx("path",{d:"M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z",fill:"#555AB9"}),f.jsx("path",{d:"M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z",fill:"#91BAF8"})]})}),f.jsx("h1",{children:"Acme"})]}),f.jsx("div",{children:e?f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"welcome",children:["Welcome, ",f.jsx("b",{children:e.name}),"!"]}),f.jsx(u,{buttonType:"secondary",onClick:o,label:"Log out"})]}):f.jsxs(f.Fragment,{children:[f.jsx(u,{buttonType:"secondary",onClick:r,label:"Log in"}),f.jsx(u,{buttonType:"cta",onClick:n,label:"Sign up"})]})})]})}),x=({children:e,maxWidth:r="340px",padding:o="30px",onClick:n,href:t,target:a="_self",imageUrl:c,imageAlt:s="",className:l="",style:i,aspectRatio:d="3/2",borderRadius:b="20px",hoverEffect:u=!0,"aria-label":p,"data-testid":g})=>{const y=e=>{"Enter"!==e.key&&" "!==e.key||!n||(e.preventDefault(),n(e))},m=e=>{n&&n(e)},v=Object.assign({maxWidth:r},i),x={borderRadius:b},h={aspectRatio:d,borderRadius:`${b} ${b} 0 0`},k={padding:o},j=["card",u&&"card--hover-effect",l].filter(Boolean).join(" "),w=f.jsxs("div",{className:j,style:x,"data-testid":g,children:[c&&f.jsx("div",{className:"card__image-wrapper",style:h,children:f.jsx("div",{className:"card__image-container",children:f.jsx("img",{src:c,alt:s,className:"card__image",loading:"lazy"})})}),f.jsx("div",{className:"card__body",style:k,children:e})]});return t?f.jsx("div",{className:"card-wrapper",style:v,children:f.jsx("a",{href:t,target:a,rel:"_blank"===a?"noopener noreferrer":void 0,onClick:m,className:"card__link",style:{borderRadius:b},"aria-label":p,children:w})}):n?f.jsx("div",{className:"card-wrapper",style:v,children:f.jsxs("div",{className:j,style:x,onClick:n,onKeyDown:y,role:"button",tabIndex:0,"aria-label":p,"data-testid":g,children:[c&&f.jsx("div",{className:"card__image-wrapper",style:h,children:f.jsx("div",{className:"card__image-container",children:f.jsx("img",{src:c,alt:s,className:"card__image",loading:"lazy"})})}),f.jsx("div",{className:"card__body",style:k,children:e})]})}):f.jsx("div",{className:"card-wrapper",style:v,children:w})},h=({videoUrl:e,imageUrl:r,gradient:o,bgColor:n,title:t,headingLevel:a="h2",description:c,buttonText:s,link:l,externalLink:i,target:d="_self",className:b,style:g})=>{const v=["cta",b].filter(Boolean).join(" ");return f.jsxs("div",{className:v,style:g,children:[f.jsx(y,{videoUrl:e,imageUrl:r,gradient:o,bgColor:n}),f.jsxs("div",{className:"cta__content",children:[f.jsx(m,{level:a,className:"cta__title",children:t}),c&&f.jsx("p",{className:"cta__description",children:c}),l?f.jsx(p,{buttonType:"cta",label:s,href:l,target:i?d:"_self"}):f.jsx(u,{buttonType:"cta",label:s,onClick:()=>{}})]})]})},k=()=>{const[r,o]=e.useState();return f.jsxs("article",{children:[f.jsx(v,{user:r,onLogin:()=>o({name:"Jane Doe"}),onLogout:()=>o(void 0),onCreateAccount:()=>o({name:"Jane Doe"})}),f.jsxs("section",{className:"storybook-page",children:[f.jsx("h2",{children:"Pages in Storybook"}),f.jsxs("p",{children:["We recommend building UIs with a"," ",f.jsx("a",{href:"https://componentdriven.org",target:"_blank",rel:"noopener noreferrer",children:f.jsx("strong",{children:"component-driven"})})," ","process starting with atomic components and ending with pages."]})]})]})},j={name:"default",colors:{primary:"#2e6bf0",primaryHover:"#1e40af",primaryActive:"#1e3a8a",secondary:"#efe63f",secondaryHover:"#eab308",secondaryActive:"#ca8a04",text:"#1f2937",textInverse:"#ffffff",background:"#ffffff",border:"#e5e5e5",success:"#10b981",warning:"#efe63f",error:"#ef4444"},spacing:{xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px",xxl:"48px"},borderRadius:{sm:"4px",md:"8px",lg:"16px",xl:"24px"},shadows:{sm:"0 2px 4px rgba(0, 0, 0, 0.1)",md:"0 4px 8px rgba(0, 0, 0, 0.15)",lg:"0 8px 16px rgba(0, 0, 0, 0.2)",xl:"0 16px 32px rgba(0, 0, 0, 0.25)"},typography:{fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontFamilyHeading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSizeXs:"12px",fontSizeSm:"14px",fontSizeMd:"16px",fontSizeLg:"18px",fontSizeXl:"24px",fontWeightNormal:"400",fontWeightMedium:"500",fontWeightBold:"700",lineHeightTight:"1.25",lineHeightNormal:"1.5",lineHeightRelaxed:"1.75"},buttons:{borderRadius:"8px",padding:"12px 24px",fontSize:"16px",fontWeight:"500",general:{background:"#2e6bf0",backgroundHover:"#1e40af",backgroundActive:"#1e3a8a",color:"#ffffff",colorHover:"#ffffff",border:"#2e6bf0",borderHover:"#1e40af",shadow:"0 2px 4px rgba(46, 107, 240, 0.2)"},cta:{background:"#efe63f",backgroundHover:"#eab308",backgroundActive:"#ca8a04",color:"#1f2937",colorHover:"#1f2937",border:"#efe63f",borderHover:"#eab308",shadow:"0 4px 8px rgba(239, 230, 63, 0.3)"},secondary:{background:"transparent",backgroundHover:"#2e6bf0",backgroundActive:"#1e40af",color:"#2e6bf0",colorHover:"#ffffff",border:"#2e6bf0",borderHover:"#2e6bf0",shadow:"none"},outline:{background:"transparent",backgroundHover:"#f8f9fa",backgroundActive:"#e9ecef",color:"#333333",colorHover:"#333333",border:"#e5e5e5",borderHover:"#d1d5db",shadow:"none"},ghost:{background:"transparent",backgroundHover:"#f8f9fa",backgroundActive:"#e9ecef",color:"#333333",colorHover:"#333333",border:"transparent",borderHover:"transparent",shadow:"none"}},components:{card:{background:"#ffffff",border:"1px solid #e5e5e5",borderRadius:"8px",shadow:"0 2px 4px rgba(0, 0, 0, 0.1)",padding:"24px"},header:{background:"#ffffff",borderBottom:"1px solid #e5e5e5",height:"64px",padding:"0 24px"},cta:{background:"#1e40af",borderRadius:"16px",padding:"32px"}}},w=Object.assign(Object.assign({},j),{name:"advisors-plus",colors:Object.assign(Object.assign({},j.colors),{primary:"#1e2a78",primaryHover:"#151f5c",primaryActive:"#0f1640",secondary:"#4f46e5",secondaryHover:"#4338ca",secondaryActive:"#3730a3",text:"#1f2937",background:"#f8fafc"}),buttons:Object.assign(Object.assign({},j.buttons),{borderRadius:"8px",general:{background:"#1e2a78",backgroundHover:"#151f5c",backgroundActive:"#0f1640",color:"#ffffff",colorHover:"#ffffff",border:"#1e2a78",borderHover:"#151f5c",shadow:"0 2px 6px rgba(30, 42, 120, 0.25)"},cta:{background:"#4f46e5",backgroundHover:"#4338ca",backgroundActive:"#3730a3",color:"#ffffff",colorHover:"#ffffff",border:"#4f46e5",borderHover:"#4338ca",shadow:"0 3px 6px rgba(79, 70, 229, 0.3)"},secondary:{background:"transparent",backgroundHover:"#1e2a78",backgroundActive:"#151f5c",color:"#1e2a78",colorHover:"#ffffff",border:"#1e2a78",borderHover:"#1e2a78",shadow:"none"}}),components:Object.assign(Object.assign({},j.components),{cta:{background:"#1e2a78",borderRadius:"16px",padding:"32px"}})}),N=Object.assign(Object.assign({},j),{name:"primax",colors:Object.assign(Object.assign({},j.colors),{primary:"#0066cc",primaryHover:"#0052a3",primaryActive:"#003d7a",secondary:"#ff6600",secondaryHover:"#e55a00",secondaryActive:"#cc4f00"}),buttons:Object.assign(Object.assign({},j.buttons),{borderRadius:"8px",general:{background:"#0066cc",backgroundHover:"#0052a3",backgroundActive:"#003d7a",color:"#ffffff",colorHover:"#ffffff",border:"#0066cc",borderHover:"#0052a3",shadow:"0 2px 4px rgba(0, 102, 204, 0.2)"},cta:{background:"#ff6600",backgroundHover:"#e55a00",backgroundActive:"#cc4f00",color:"#ffffff",colorHover:"#ffffff",border:"#ff6600",borderHover:"#e55a00",shadow:"0 4px 8px rgba(255, 102, 0, 0.3)"},secondary:{background:"transparent",backgroundHover:"#0066cc",backgroundActive:"#0052a3",color:"#0066cc",colorHover:"#ffffff",border:"#0066cc",borderHover:"#0066cc",shadow:"none"}}),components:Object.assign(Object.assign({},j.components),{cta:{background:"#003d7a",borderRadius:"0px 0px 50px 50px",padding:"54px 60px 0px 30px"}})});const _=r(void 0);function $({children:e,initialTheme:r=j,initialThemeName:n="default"}){o(()=>{!function(e,r){const o=document.getElementById(`theme-${r}`)||document.createElement("style");o.id=`theme-${r}`;const n=`\n [data-theme="${r}"] {\n --primary-color: ${e.colors.primary};\n --primary-color-hover: ${e.colors.primaryHover};\n --primary-color-active: ${e.colors.primaryActive};\n --secondary-color: ${e.colors.secondary};\n --secondary-color-hover: ${e.colors.secondaryHover};\n --secondary-color-active: ${e.colors.secondaryActive};\n --text-color: ${e.colors.text};\n --text-color-inverse: ${e.colors.textInverse};\n --background-color: ${e.colors.background};\n --border-color: ${e.colors.border};\n \n --button-general-bg: ${e.buttons.general.background};\n --button-general-bg-hover: ${e.buttons.general.backgroundHover};\n --button-general-bg-active: ${e.buttons.general.backgroundActive};\n --button-general-color: ${e.buttons.general.color};\n --button-general-border: ${e.buttons.general.border};\n --button-general-shadow: ${e.buttons.general.shadow};\n \n --button-cta-bg: ${e.buttons.cta.background};\n --button-cta-bg-hover: ${e.buttons.cta.backgroundHover};\n --button-cta-bg-active: ${e.buttons.cta.backgroundActive};\n --button-cta-color: ${e.buttons.cta.color};\n --button-cta-border: ${e.buttons.cta.border};\n --button-cta-shadow: ${e.buttons.cta.shadow};\n \n --button-secondary-bg: ${e.buttons.secondary.background};\n --button-secondary-bg-hover: ${e.buttons.secondary.backgroundHover};\n --button-secondary-bg-active: ${e.buttons.secondary.backgroundActive};\n --button-secondary-color: ${e.buttons.secondary.color};\n --button-secondary-color-hover: ${e.buttons.secondary.colorHover};\n --button-secondary-border: ${e.buttons.secondary.border};\n --button-secondary-shadow: ${e.buttons.secondary.shadow};\n \n --button-border-radius: ${e.buttons.borderRadius};\n \n --content-container-bg: ${e.components.cta.background};\n --content-container-border-radius: ${e.components.cta.borderRadius};\n --content-container-padding: ${e.components.cta.padding};\n }\n `;o.textContent=n,document.head.contains(o)||document.head.appendChild(o)}(r,n),document.documentElement.setAttribute("data-theme",n)},[r,n]);const t={currentTheme:r,themeName:n};return f.jsx(_.Provider,{value:t,children:e})}function O(){const e=n(_);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}export{y as BackgroundMedia,u as Button,p as ButtonLink,h as CTA,x as Card,v as Header,m as Heading,k as Page,g as TextLink,$ as ThemeProvider,w as advisorsPlusTheme,j as defaultTheme,N as primaxTheme,O as useTheme};
|
|
11
|
+
*/function b(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===_?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case p:return"Fragment";case y:return"Profiler";case g:return"StrictMode";case h:return"Suspense";case k:return"SuspenseList";case N:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case u:return"Portal";case v:return(e.displayName||"Context")+".Provider";case m:return(e._context.displayName||"Context")+".Consumer";case x:var o=e.render;return(e=e.displayName)||(e=""!==(e=o.displayName||o.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(o=e.displayName||null)?o:r(e.type)||"Memo";case w:o=e._payload,e=e._init;try{return r(e(o))}catch(e){}}return null}function o(e){return""+e}function n(e){try{o(e);var r=!1}catch(e){r=!0}if(r){var n=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),o(e)}}function t(e){if(e===p)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===w)return"<...>";try{var o=r(e);return o?"<"+o+">":"<...>"}catch(e){return"<...>"}}function a(){return Error("react-stack-top-frame")}function c(){var e=r(this.type);return A[e]||(A[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,o,t,a,s,d,b,u){var p,g=o.children;if(void 0!==g)if(a)if(S(g)){for(a=0;a<g.length;a++)l(g[a]);Object.freeze&&Object.freeze(g)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(g);if(O.call(o,"key")){g=r(e);var y=Object.keys(o).filter(function(e){return"key"!==e});a=0<y.length?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}",C[g+a]||(y=0<y.length?"{"+y.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,g,y,g),C[g+a]=!0)}if(g=null,void 0!==t&&(n(t),g=""+t),function(e){if(O.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(o)&&(n(o.key),g=""+o.key),"key"in o)for(var m in t={},o)"key"!==m&&(t[m]=o[m]);else t=o;return g&&function(e,r){function o(){i||(i=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,o,n,t,a,s,l){return o=a.ref,e={$$typeof:f,type:e,key:r,props:a,_owner:t},null!==(void 0!==o?o:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:c}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,g,d,0,null===(p=$.A)?null:p.getOwner(),t,b,u)}function l(e){"object"==typeof e&&null!==e&&e.$$typeof===f&&e._store&&(e._store.validated=1)}var i,b=e,f=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),v=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),$=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,S=Array.isArray,H=console.createTask?console.createTask:function(){return null},A={},R=(b={"react-stack-bottom-frame":function(e){return e()}})["react-stack-bottom-frame"].bind(b,a)(),T=H(t(a)),C={};d.Fragment=p,d.jsx=function(e,r,o,n,a){var c=1e4>$.recentlyCreatedOwnerStacks++;return s(e,r,o,!1,0,a,c?Error("react-stack-top-frame"):R,c?H(t(e)):T)},d.jsxs=function(e,r,o,n,a){var c=1e4>$.recentlyCreatedOwnerStacks++;return s(e,r,o,!0,0,a,c?Error("react-stack-top-frame"):R,c?H(t(e)):T)}}()),d}var f=(i||(i=1,"production"===process.env.NODE_ENV?c.exports=function(){if(a)return s;a=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(r,o,n){var t=null;if(void 0!==n&&(t=""+n),void 0!==o.key&&(t=""+o.key),"key"in o)for(var a in n={},o)"key"!==a&&(n[a]=o[a]);else n=o;return o=n.ref,{$$typeof:e,type:r,key:t,ref:void 0!==o?o:null,props:n}}return s.Fragment=r,s.jsx=o,s.jsxs=o,s}():c.exports=b()),c.exports);const u=e=>{var{buttonType:r="general",label:o,icon:n,className:a,children:c,style:s,disabled:l=!1,onClick:i}=e,d=t(e,["buttonType","label","icon","className","children","style","disabled","onClick"]);const b=`button button--${r} ${a||""}`;return f.jsxs("button",Object.assign({type:"button",className:b,style:s,onClick:i,disabled:l},d,{children:[c||o," ",n&&f.jsx("span",{className:"icon",children:n})]}))},p=e=>{var{buttonType:r="general",label:o,icon:n,href:a,target:c="_self",className:s,children:l,style:i}=e,d=t(e,["buttonType","label","icon","href","target","className","children","style"]);const b=`button button--${r} ${s||""}`,u="_blank"===c?"noopener noreferrer":void 0;return f.jsxs("a",Object.assign({href:a,target:c,rel:u,className:b,style:i},d,{children:[l||o," ",n&&f.jsx("span",{className:"icon",children:n})]}))},g=({label:e,href:r,externalLink:o,target:n="_self",onClick:t,className:a="",icon:c,style:s,disabled:l=!1,"aria-label":i,"aria-describedby":d,"data-testid":b})=>{const u=o||r,p=!!o||"_blank"===n;return!u||l?f.jsxs("span",{className:`text-link text-link--disabled ${a}`,style:s,"data-testid":b,"aria-label":i||e,"aria-describedby":d,children:[e," ",c]}):f.jsxs("a",{href:u,target:n,rel:p?"noopener noreferrer":void 0,onClick:e=>{l?e.preventDefault():t&&t(e)},onKeyDown:e=>{!l||"Enter"!==e.key&&" "!==e.key||e.preventDefault()},className:`text-link ${a}`,style:s,"aria-label":i,"aria-describedby":d,"data-testid":b,children:[e," ",c]})},y=({videoUrl:e,imageUrl:r,gradient:o,bgColor:n,className:t,style:a})=>{const c=["background-media",t].filter(Boolean).join(" ");if(e)return f.jsxs("video",{className:`${c} background-media--video`,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:a,children:[f.jsx("source",{src:e,type:"video/mp4"}),"Your browser does not support video."]});const s=Object.assign({backgroundImage:o?`${o}, url(${r})`:r?`url(${r})`:void 0,backgroundColor:n},a);return f.jsx("div",{className:c,style:s})},m=({level:e="h2",children:r,className:o,style:n})=>{const t=e,a=["heading",o].filter(Boolean).join(" ");return f.jsx(t,{className:a,style:n,children:r})},v=({user:e,onLogin:r,onLogout:o,onCreateAccount:n})=>f.jsx("header",{children:f.jsxs("div",{className:"storybook-header",children:[f.jsxs("div",{children:[f.jsx("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{fill:"none",fillRule:"evenodd",children:[f.jsx("path",{d:"M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z",fill:"#FFF"}),f.jsx("path",{d:"M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z",fill:"#555AB9"}),f.jsx("path",{d:"M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z",fill:"#91BAF8"})]})}),f.jsx("h1",{children:"Acme"})]}),f.jsx("div",{children:e?f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"welcome",children:["Welcome, ",f.jsx("b",{children:e.name}),"!"]}),f.jsx(u,{buttonType:"secondary",onClick:o,label:"Log out"})]}):f.jsxs(f.Fragment,{children:[f.jsx(u,{buttonType:"secondary",onClick:r,label:"Log in"}),f.jsx(u,{buttonType:"cta",onClick:n,label:"Sign up"})]})})]})}),x=({children:e,maxWidth:r="340px",padding:o="30px",onClick:n,href:t,target:a="_self",imageUrl:c,imageAlt:s="",className:l="",style:i,aspectRatio:d="3/2",borderRadius:b="20px",hoverEffect:u=!0,"aria-label":p,"data-testid":g})=>{const y=e=>{"Enter"!==e.key&&" "!==e.key||!n||(e.preventDefault(),n(e))},m=e=>{n&&n(e)},v=Object.assign({maxWidth:r},i),x={borderRadius:b},h={aspectRatio:d,borderRadius:`${b} ${b} 0 0`},k={padding:o},j=["card",u&&"card--hover-effect",l].filter(Boolean).join(" "),w=f.jsxs("div",{className:j,style:x,"data-testid":g,children:[c&&f.jsx("div",{className:"card__image-wrapper",style:h,children:f.jsx("div",{className:"card__image-container",children:f.jsx("img",{src:c,alt:s,className:"card__image",loading:"lazy"})})}),f.jsx("div",{className:"card__body",style:k,children:e})]});return t?f.jsx("div",{className:"card-wrapper",style:v,children:f.jsx("a",{href:t,target:a,rel:"_blank"===a?"noopener noreferrer":void 0,onClick:m,className:"card__link",style:{borderRadius:b},"aria-label":p,children:w})}):n?f.jsx("div",{className:"card-wrapper",style:v,children:f.jsxs("div",{className:j,style:x,onClick:n,onKeyDown:y,role:"button",tabIndex:0,"aria-label":p,"data-testid":g,children:[c&&f.jsx("div",{className:"card__image-wrapper",style:h,children:f.jsx("div",{className:"card__image-container",children:f.jsx("img",{src:c,alt:s,className:"card__image",loading:"lazy"})})}),f.jsx("div",{className:"card__body",style:k,children:e})]})}):f.jsx("div",{className:"card-wrapper",style:v,children:w})},h=({videoUrl:e,imageUrl:r,gradient:o,bgColor:n,title:t,headingLevel:a="h2",description:c,buttonText:s,link:l,externalLink:i,target:d="_self",className:b,style:g})=>{const v=["cta",b].filter(Boolean).join(" ");return f.jsxs("div",{className:v,style:g,children:[f.jsx(y,{videoUrl:e,imageUrl:r,gradient:o,bgColor:n}),f.jsxs("div",{className:"cta__content",children:[f.jsx(m,{level:a,className:"cta__title",children:t}),c&&f.jsx("p",{className:"cta__description",children:c}),l?f.jsx(p,{buttonType:"cta",label:s,href:l,target:i?d:"_self"}):f.jsx(u,{buttonType:"cta",label:s,onClick:()=>{}})]})]})},k=()=>{const[r,o]=e.useState();return f.jsxs("article",{children:[f.jsx(v,{user:r,onLogin:()=>o({name:"Jane Doe"}),onLogout:()=>o(void 0),onCreateAccount:()=>o({name:"Jane Doe"})}),f.jsxs("section",{className:"storybook-page",children:[f.jsx("h2",{children:"Pages in Storybook"}),f.jsxs("p",{children:["We recommend building UIs with a"," ",f.jsx("a",{href:"https://componentdriven.org",target:"_blank",rel:"noopener noreferrer",children:f.jsx("strong",{children:"component-driven"})})," ","process starting with atomic components and ending with pages."]})]})]})},j={name:"default",colors:{primary:"#2e6bf0",primaryHover:"#1e40af",primaryActive:"#1e3a8a",secondary:"#efe63f",secondaryHover:"#eab308",secondaryActive:"#ca8a04",text:"#1f2937",textInverse:"#ffffff",background:"#ffffff",border:"#e5e5e5",success:"#10b981",warning:"#efe63f",error:"#ef4444"},spacing:{xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px",xxl:"48px"},borderRadius:{sm:"4px",md:"8px",lg:"16px",xl:"24px"},shadows:{sm:"0 2px 4px rgba(0, 0, 0, 0.1)",md:"0 4px 8px rgba(0, 0, 0, 0.15)",lg:"0 8px 16px rgba(0, 0, 0, 0.2)",xl:"0 16px 32px rgba(0, 0, 0, 0.25)"},typography:{fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontFamilyHeading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSizeXs:"12px",fontSizeSm:"14px",fontSizeMd:"16px",fontSizeLg:"18px",fontSizeXl:"24px",fontWeightNormal:"400",fontWeightMedium:"500",fontWeightBold:"700",lineHeightTight:"1.25",lineHeightNormal:"1.5",lineHeightRelaxed:"1.75"},buttons:{borderRadius:"8px",padding:"12px 24px",fontSize:"16px",fontWeight:"500",general:{background:"#2e6bf0",backgroundHover:"#1e40af",backgroundActive:"#1e3a8a",color:"#ffffff",colorHover:"#ffffff",border:"#2e6bf0",borderHover:"#1e40af",shadow:"0 2px 4px rgba(46, 107, 240, 0.2)"},cta:{background:"#efe63f",backgroundHover:"#eab308",backgroundActive:"#ca8a04",color:"#1f2937",colorHover:"#1f2937",border:"#efe63f",borderHover:"#eab308",shadow:"0 4px 8px rgba(239, 230, 63, 0.3)"},secondary:{background:"transparent",backgroundHover:"#2e6bf0",backgroundActive:"#1e40af",color:"#2e6bf0",colorHover:"#ffffff",border:"#2e6bf0",borderHover:"#2e6bf0",shadow:"none"},outline:{background:"transparent",backgroundHover:"#f8f9fa",backgroundActive:"#e9ecef",color:"#333333",colorHover:"#333333",border:"#e5e5e5",borderHover:"#d1d5db",shadow:"none"},ghost:{background:"transparent",backgroundHover:"#f8f9fa",backgroundActive:"#e9ecef",color:"#333333",colorHover:"#333333",border:"transparent",borderHover:"transparent",shadow:"none"}},components:{card:{background:"#ffffff",border:"1px solid #e5e5e5",borderRadius:"8px",shadow:"0 2px 4px rgba(0, 0, 0, 0.1)",padding:"24px"},header:{background:"#ffffff",borderBottom:"1px solid #e5e5e5",height:"64px",padding:"0 24px"},cta:{background:"#1e40af",borderRadius:"16px",padding:"32px"}}},w=Object.assign(Object.assign({},j),{name:"advisors-plus",colors:Object.assign(Object.assign({},j.colors),{primary:"#1e2a78",primaryHover:"#151f5c",primaryActive:"#0f1640",secondary:"#4f46e5",secondaryHover:"#4338ca",secondaryActive:"#3730a3",text:"#1f2937",background:"#f8fafc"}),buttons:Object.assign(Object.assign({},j.buttons),{borderRadius:"8px",general:{background:"#1e2a78",backgroundHover:"#151f5c",backgroundActive:"#0f1640",color:"#ffffff",colorHover:"#ffffff",border:"#1e2a78",borderHover:"#151f5c",shadow:"0 2px 6px rgba(30, 42, 120, 0.25)"},cta:{background:"#4f46e5",backgroundHover:"#4338ca",backgroundActive:"#3730a3",color:"#ffffff",colorHover:"#ffffff",border:"#4f46e5",borderHover:"#4338ca",shadow:"0 3px 6px rgba(79, 70, 229, 0.3)"},secondary:{background:"transparent",backgroundHover:"#1e2a78",backgroundActive:"#151f5c",color:"#1e2a78",colorHover:"#ffffff",border:"#1e2a78",borderHover:"#1e2a78",shadow:"none"}}),components:Object.assign(Object.assign({},j.components),{cta:{background:"#1e2a78",borderRadius:"16px",padding:"32px"}})}),N=Object.assign(Object.assign({},j),{name:"primax",colors:Object.assign(Object.assign({},j.colors),{primary:"#0066cc",primaryHover:"#0052a3",primaryActive:"#003d7a",secondary:"#ff6600",secondaryHover:"#e55a00",secondaryActive:"#cc4f00"}),buttons:Object.assign(Object.assign({},j.buttons),{borderRadius:"8px",general:{background:"#0066cc",backgroundHover:"#0052a3",backgroundActive:"#003d7a",color:"#ffffff",colorHover:"#ffffff",border:"#0066cc",borderHover:"#0052a3",shadow:"0 2px 4px rgba(0, 102, 204, 0.2)"},cta:{background:"#ff6600",backgroundHover:"#e55a00",backgroundActive:"#cc4f00",color:"#ffffff",colorHover:"#ffffff",border:"#ff6600",borderHover:"#e55a00",shadow:"0 4px 8px rgba(255, 102, 0, 0.3)"},secondary:{background:"transparent",backgroundHover:"#0066cc",backgroundActive:"#0052a3",color:"#0066cc",colorHover:"#ffffff",border:"#0066cc",borderHover:"#0066cc",shadow:"none"}}),components:Object.assign(Object.assign({},j.components),{cta:{background:"#003d7a",borderRadius:"0px 0px 50px 50px",padding:"54px 60px 0px 30px"}})});const _=r(void 0);function $(){const e=n(_);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const O=function({children:e,initialTheme:r=j,initialThemeName:n="default"}){o(()=>{!function(e,r){const o=document.getElementById(`theme-${r}`)||document.createElement("style");o.id=`theme-${r}`;const n=`\n [data-theme="${r}"] {\n --primary-color: ${e.colors.primary};\n --primary-color-hover: ${e.colors.primaryHover};\n --primary-color-active: ${e.colors.primaryActive};\n --secondary-color: ${e.colors.secondary};\n --secondary-color-hover: ${e.colors.secondaryHover};\n --secondary-color-active: ${e.colors.secondaryActive};\n --text-color: ${e.colors.text};\n --text-color-inverse: ${e.colors.textInverse};\n --background-color: ${e.colors.background};\n --border-color: ${e.colors.border};\n \n --button-general-bg: ${e.buttons.general.background};\n --button-general-bg-hover: ${e.buttons.general.backgroundHover};\n --button-general-bg-active: ${e.buttons.general.backgroundActive};\n --button-general-color: ${e.buttons.general.color};\n --button-general-border: ${e.buttons.general.border};\n --button-general-shadow: ${e.buttons.general.shadow};\n \n --button-cta-bg: ${e.buttons.cta.background};\n --button-cta-bg-hover: ${e.buttons.cta.backgroundHover};\n --button-cta-bg-active: ${e.buttons.cta.backgroundActive};\n --button-cta-color: ${e.buttons.cta.color};\n --button-cta-border: ${e.buttons.cta.border};\n --button-cta-shadow: ${e.buttons.cta.shadow};\n \n --button-secondary-bg: ${e.buttons.secondary.background};\n --button-secondary-bg-hover: ${e.buttons.secondary.backgroundHover};\n --button-secondary-bg-active: ${e.buttons.secondary.backgroundActive};\n --button-secondary-color: ${e.buttons.secondary.color};\n --button-secondary-color-hover: ${e.buttons.secondary.colorHover};\n --button-secondary-border: ${e.buttons.secondary.border};\n --button-secondary-shadow: ${e.buttons.secondary.shadow};\n \n --button-border-radius: ${e.buttons.borderRadius};\n \n --content-container-bg: ${e.components.cta.background};\n --content-container-border-radius: ${e.components.cta.borderRadius};\n --content-container-padding: ${e.components.cta.padding};\n }\n `;o.textContent=n,document.head.contains(o)||document.head.appendChild(o)}(r,n),document.documentElement.setAttribute("data-theme",n)},[r,n]);const t={currentTheme:r,themeName:n};return f.jsx(_.Provider,{value:t,children:e})};export{y as BackgroundMedia,u as Button,p as ButtonLink,h as CTA,x as Card,v as Header,m as Heading,k as Page,g as TextLink,O as ThemeProvider,w as advisorsPlusTheme,j as defaultTheme,N as primaxTheme,$ as useTheme};
|
|
11
12
|
//# sourceMappingURL=index.esm.js.map
|