@ansiversa/components 0.0.129 → 0.0.131
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/index.ts +2 -0
- package/package.json +1 -1
- package/src/Logo/AppLogo.tsx +39 -0
- package/src/Logo/index.ts +7 -0
- package/src/Logo/logos/AppLogoDefault.tsx +25 -0
- package/src/Logo/logos/AppLogoFlashNote.tsx +23 -0
- package/src/Logo/logos/AppLogoPortfolioCreator.tsx +26 -0
- package/src/Logo/logos/AppLogoQuiz.tsx +30 -0
- package/src/Logo/logos/AppLogoResumeBuilder.tsx +26 -0
- package/src/components/Ai/AvAiAssist.astro +25 -2
package/index.ts
CHANGED
|
@@ -39,6 +39,8 @@ export { default as ResumeBuilderSummary } from './src/Summary/ResumeBuilderSumm
|
|
|
39
39
|
export { default as PortfolioCreatorSummary } from './src/Summary/PortfolioCreatorSummary.astro';
|
|
40
40
|
export { default as AvImageUploader } from "./src/components/media/AvImageUploader.astro";
|
|
41
41
|
export { default as AvAiAssist } from "./src/components/Ai/AvAiAssist.astro";
|
|
42
|
+
export { AppLogo } from "./src/Logo";
|
|
43
|
+
export type { AppLogoProps } from "./src/Logo";
|
|
42
44
|
export { default as ResumeBuilderShell } from './src/resume-templates/ResumeBuilderShell.astro';
|
|
43
45
|
export { default as ResumeTemplateClassic } from './src/resume-templates/ResumeTemplateClassic.astro';
|
|
44
46
|
export { default as ResumeTemplateModernTwoTone } from './src/resume-templates/ResumeTemplateModernTwoTone.astro';
|
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { JSX } from "astro/jsx-runtime";
|
|
2
|
+
import AppLogoDefault from "./logos/AppLogoDefault";
|
|
3
|
+
import AppLogoFlashNote from "./logos/AppLogoFlashNote";
|
|
4
|
+
import AppLogoPortfolioCreator from "./logos/AppLogoPortfolioCreator";
|
|
5
|
+
import AppLogoQuiz from "./logos/AppLogoQuiz";
|
|
6
|
+
import AppLogoResumeBuilder from "./logos/AppLogoResumeBuilder";
|
|
7
|
+
|
|
8
|
+
type LogoComponentProps = {
|
|
9
|
+
size: number;
|
|
10
|
+
class?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type LogoComponent = (props: LogoComponentProps) => JSX.Element;
|
|
15
|
+
|
|
16
|
+
export type AppLogoProps = {
|
|
17
|
+
appId: string;
|
|
18
|
+
size?: "xs" | "sm" | "md";
|
|
19
|
+
class?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const SIZE_MAP: Record<NonNullable<AppLogoProps["size"]>, number> = {
|
|
24
|
+
xs: 16,
|
|
25
|
+
sm: 18,
|
|
26
|
+
md: 20,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const LOGO_REGISTRY: Record<string, LogoComponent> = {
|
|
30
|
+
quiz: AppLogoQuiz,
|
|
31
|
+
"resume-builder": AppLogoResumeBuilder,
|
|
32
|
+
"portfolio-creator": AppLogoPortfolioCreator,
|
|
33
|
+
flashnote: AppLogoFlashNote,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default function AppLogo({ appId, size = "sm", class: className, title }: AppLogoProps) {
|
|
37
|
+
const Logo = LOGO_REGISTRY[appId] ?? AppLogoDefault;
|
|
38
|
+
return <Logo size={SIZE_MAP[size]} class={className} title={title} />;
|
|
39
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as AppLogo } from "./AppLogo";
|
|
2
|
+
export { default as AppLogoDefault } from "./logos/AppLogoDefault";
|
|
3
|
+
export { default as AppLogoFlashNote } from "./logos/AppLogoFlashNote";
|
|
4
|
+
export { default as AppLogoPortfolioCreator } from "./logos/AppLogoPortfolioCreator";
|
|
5
|
+
export { default as AppLogoQuiz } from "./logos/AppLogoQuiz";
|
|
6
|
+
export { default as AppLogoResumeBuilder } from "./logos/AppLogoResumeBuilder";
|
|
7
|
+
export type { AppLogoProps } from "./AppLogo";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AppLogoGlyphProps } from "./AppLogoQuiz";
|
|
2
|
+
|
|
3
|
+
export default function AppLogoDefault({ size, class: className, title }: AppLogoGlyphProps) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
width={size}
|
|
9
|
+
height={size}
|
|
10
|
+
fill="none"
|
|
11
|
+
stroke="currentColor"
|
|
12
|
+
stroke-width="1.75"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
class={className}
|
|
16
|
+
aria-hidden={title ? undefined : "true"}
|
|
17
|
+
role={title ? "img" : "presentation"}
|
|
18
|
+
>
|
|
19
|
+
{title ? <title>{title}</title> : null}
|
|
20
|
+
<circle cx="12" cy="12" r="9" />
|
|
21
|
+
<path d="M12 8v8" />
|
|
22
|
+
<path d="M8 12h8" />
|
|
23
|
+
</svg>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AppLogoGlyphProps } from "./AppLogoQuiz";
|
|
2
|
+
|
|
3
|
+
export default function AppLogoFlashNote({ size, class: className, title }: AppLogoGlyphProps) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
width={size}
|
|
9
|
+
height={size}
|
|
10
|
+
fill="none"
|
|
11
|
+
stroke="currentColor"
|
|
12
|
+
stroke-width="1.75"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
class={className}
|
|
16
|
+
aria-hidden={title ? undefined : "true"}
|
|
17
|
+
role={title ? "img" : "presentation"}
|
|
18
|
+
>
|
|
19
|
+
{title ? <title>{title}</title> : null}
|
|
20
|
+
<path d="M12 2.8L4.5 12H10l-1 9.2L19.5 10H14l1-7.2Z" />
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AppLogoGlyphProps } from "./AppLogoQuiz";
|
|
2
|
+
|
|
3
|
+
export default function AppLogoPortfolioCreator({ size, class: className, title }: AppLogoGlyphProps) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
width={size}
|
|
9
|
+
height={size}
|
|
10
|
+
fill="none"
|
|
11
|
+
stroke="currentColor"
|
|
12
|
+
stroke-width="1.75"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
class={className}
|
|
16
|
+
aria-hidden={title ? undefined : "true"}
|
|
17
|
+
role={title ? "img" : "presentation"}
|
|
18
|
+
>
|
|
19
|
+
{title ? <title>{title}</title> : null}
|
|
20
|
+
<rect x="3" y="5" width="18" height="14" rx="2.5" />
|
|
21
|
+
<path d="M8.5 5V4a1.5 1.5 0 0 1 1.5-1.5h4A1.5 1.5 0 0 1 15.5 4v1" />
|
|
22
|
+
<path d="M3 11h18" />
|
|
23
|
+
<path d="M11 14.5h2" />
|
|
24
|
+
</svg>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type AppLogoGlyphProps = {
|
|
2
|
+
size: number;
|
|
3
|
+
class?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export default function AppLogoQuiz({ size, class: className, title }: AppLogoGlyphProps) {
|
|
8
|
+
return (
|
|
9
|
+
<svg
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
width={size}
|
|
13
|
+
height={size}
|
|
14
|
+
fill="none"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
stroke-width="1.75"
|
|
17
|
+
stroke-linecap="round"
|
|
18
|
+
stroke-linejoin="round"
|
|
19
|
+
class={className}
|
|
20
|
+
aria-hidden={title ? undefined : "true"}
|
|
21
|
+
role={title ? "img" : "presentation"}
|
|
22
|
+
>
|
|
23
|
+
{title ? <title>{title}</title> : null}
|
|
24
|
+
<circle cx="11" cy="11" r="7" />
|
|
25
|
+
<path d="M21 21l-4.2-4.2" />
|
|
26
|
+
<path d="M8.6 9.2a2.6 2.6 0 1 1 4.8 1.3c-.7.8-1.8 1.4-1.8 2.4" />
|
|
27
|
+
<path d="M11.5 16h0" />
|
|
28
|
+
</svg>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AppLogoGlyphProps } from "./AppLogoQuiz";
|
|
2
|
+
|
|
3
|
+
export default function AppLogoResumeBuilder({ size, class: className, title }: AppLogoGlyphProps) {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
width={size}
|
|
9
|
+
height={size}
|
|
10
|
+
fill="none"
|
|
11
|
+
stroke="currentColor"
|
|
12
|
+
stroke-width="1.75"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
class={className}
|
|
16
|
+
aria-hidden={title ? undefined : "true"}
|
|
17
|
+
role={title ? "img" : "presentation"}
|
|
18
|
+
>
|
|
19
|
+
{title ? <title>{title}</title> : null}
|
|
20
|
+
<rect x="4" y="3.5" width="16" height="17" rx="2.5" />
|
|
21
|
+
<path d="M8 8.5h8" />
|
|
22
|
+
<path d="M8 12h8" />
|
|
23
|
+
<path d="M8 15.5h5" />
|
|
24
|
+
</svg>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -59,9 +59,17 @@ const componentId = `av-ai-assist-${Math.random().toString(36).slice(2, 10)}`;
|
|
|
59
59
|
<div class="av-ai-assist-overlay" @click.self="closeModal()" @keydown.escape.window="closeModal()">
|
|
60
60
|
<div class="av-ai-assist-modal" role="dialog" aria-modal="true" aria-label="AI suggestions">
|
|
61
61
|
<div class="av-auth-stack-sm">
|
|
62
|
-
<div class="av-
|
|
62
|
+
<div class="av-ai-assist-modal-header">
|
|
63
63
|
<h3 class="av-card-heading av-m-0">AI Suggestions</h3>
|
|
64
|
-
<button
|
|
64
|
+
<button
|
|
65
|
+
type="button"
|
|
66
|
+
class="av-btn-ghost av-btn-sm av-ai-assist-close"
|
|
67
|
+
@click.prevent="closeModal()"
|
|
68
|
+
aria-label="Close AI suggestions"
|
|
69
|
+
title="Close"
|
|
70
|
+
>
|
|
71
|
+
<span aria-hidden="true">X</span>
|
|
72
|
+
</button>
|
|
65
73
|
</div>
|
|
66
74
|
|
|
67
75
|
<template x-if="loading">
|
|
@@ -304,6 +312,21 @@ const componentId = `av-ai-assist-${Math.random().toString(36).slice(2, 10)}`;
|
|
|
304
312
|
padding: 1rem;
|
|
305
313
|
}
|
|
306
314
|
|
|
315
|
+
.av-ai-assist-modal-header {
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
justify-content: space-between;
|
|
319
|
+
flex-wrap: nowrap;
|
|
320
|
+
gap: 0.75rem;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.av-ai-assist-close {
|
|
324
|
+
margin-left: auto;
|
|
325
|
+
flex-shrink: 0;
|
|
326
|
+
min-width: 2.25rem;
|
|
327
|
+
justify-content: center;
|
|
328
|
+
}
|
|
329
|
+
|
|
307
330
|
.av-ai-assist-suggestion {
|
|
308
331
|
display: grid;
|
|
309
332
|
gap: 0.75rem;
|