xertica-ui 1.9.4 → 1.9.5
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/assets/xertica-logo.svg +37 -37
- package/assets/xertica-x-logo.svg +20 -20
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +21 -21
- package/components/brand/branding/branding.mdx +1 -1
- package/components/brand/branding/branding.stories.tsx +4 -4
- package/components/brand/xertica-logo/XerticaLogo.stories.tsx +82 -0
- package/components/brand/xertica-logo/xertica-logo.mdx +56 -0
- package/components/brand/xertica-logo/xertica-logo.test.tsx +1 -1
- package/components/brand/xertica-provider/XerticaProvider.tsx +4 -3
- package/components/brand/xertica-provider/xertica-provider.mdx +7 -3
- package/components/brand/xertica-xlogo/XerticaXLogo.stories.tsx +79 -0
- package/components/brand/xertica-xlogo/xertica-xlogo.mdx +55 -0
- package/components/examples/MapExamples.tsx +282 -282
- package/components/examples/SimpleFilterableMap.tsx +191 -191
- package/components/examples/index.ts +51 -51
- package/components/figma/ImageWithFallback.tsx +27 -27
- package/components/media/FloatingMediaWrapper.tsx +9 -33
- package/components/media/floating-media-wrapper.mdx +74 -0
- package/components/pages/forgot-password-page/ForgotPasswordPage.stories.tsx +24 -0
- package/components/pages/forgot-password-page/forgot-password-page.mdx +60 -0
- package/components/pages/home-content/HomeContent.stories.tsx +39 -0
- package/components/pages/home-content/home-content.mdx +63 -0
- package/components/pages/home-page/HomePage.tsx +4 -4
- package/components/pages/reset-password-page/ResetPasswordPage.stories.tsx +24 -0
- package/components/pages/reset-password-page/reset-password-page.mdx +59 -0
- package/components/pages/template-content/TemplateContent.stories.tsx +39 -0
- package/components/pages/template-content/template-content.mdx +62 -0
- package/components/pages/verify-email-page/VerifyEmailPage.stories.tsx +41 -0
- package/components/pages/verify-email-page/verify-email-page.mdx +55 -0
- package/components/shared/assistant-utils.test.ts +1 -1
- package/components/shared/assistant-utils.ts +9 -9
- package/components/ui/assistant-chart/AssistantChart.tsx +58 -23
- package/components/ui/assistant-chart/assistant-chart.stories.tsx +1 -1
- package/components/ui/assistant-chart/assistant-chart.test.tsx +1 -1
- package/components/ui/dialog/dialog.stories.tsx +4 -4
- package/components/ui/drawer/drawer.test.tsx +2 -2
- package/components/ui/file-upload/file-upload.tsx +47 -16
- package/components/ui/form/form.test.tsx +1 -1
- package/components/ui/google-maps-loader/google-maps-loader.mdx +68 -0
- package/components/ui/index.ts +8 -3
- package/components/ui/notification-badge/notification-badge.tsx +88 -88
- package/components/ui/page-header/page-header.test.tsx +1 -1
- package/components/ui/page-header/page-header.tsx +39 -29
- package/components/ui/progress/progress.tsx +68 -68
- package/components/ui/rating/rating.test.tsx +1 -1
- package/components/ui/rating/rating.tsx +68 -38
- package/components/ui/rich-text-editor/rich-text-editor.mdx +2 -0
- package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +37 -1
- package/components/ui/rich-text-editor/rich-text-editor.test.tsx +35 -0
- package/components/ui/rich-text-editor/rich-text-editor.tsx +483 -99
- package/components/ui/search/search.test.tsx +1 -1
- package/components/ui/search/search.tsx +33 -16
- package/components/ui/simple-map/simple-map.tsx +1 -1
- package/components/ui/stats-card/stats-card.tsx +3 -3
- package/components/ui/stepper/stepper.tsx +67 -61
- package/components/ui/timeline/timeline.tsx +1 -1
- package/components/ui/tree-view/tree-view.tsx +156 -44
- package/contexts/LanguageContext.test.tsx +6 -6
- package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +5 -5
- package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
- package/dist/components/blocks/audio-player/index.d.ts +1 -0
- package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
- package/dist/components/blocks/document-editor/index.d.ts +1 -0
- package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
- package/dist/components/blocks/podcast-player/index.d.ts +1 -0
- package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +1 -1
- package/dist/components/ui/assistant-chart/AssistantChart.d.ts +20 -3
- package/dist/components/ui/file-upload/file-upload.d.ts +5 -2
- package/dist/components/ui/index.d.ts +8 -2
- package/dist/components/ui/page-header/page-header.d.ts +19 -18
- package/dist/components/ui/rating/rating.d.ts +12 -3
- package/dist/components/ui/rich-text-editor/rich-text-editor.d.ts +22 -1
- package/dist/components/ui/search/search.d.ts +4 -0
- package/dist/components/ui/simple-map/simple-map.d.ts +1 -2
- package/dist/components/ui/stepper/stepper.d.ts +9 -4
- package/dist/components/ui/timeline/timeline.d.ts +1 -1
- package/dist/components/ui/tree-view/tree-view.d.ts +11 -3
- package/dist/index.es.js +1046 -473
- package/dist/index.umd.js +1043 -470
- package/dist/xertica-ui.css +2 -2
- package/docs/components/badge.md +84 -84
- package/docs/components/button.md +156 -156
- package/docs/components/dialog.md +180 -180
- package/docs/components/header.md +175 -175
- package/docs/components/notification-badge.md +78 -78
- package/docs/components/progress.md +103 -103
- package/docs/components/rating.md +77 -77
- package/docs/components/rich-text-editor.md +13 -0
- package/docs/components/search.md +87 -87
- package/docs/components/sidebar.md +146 -146
- package/docs/components/timeline.md +117 -117
- package/hooks/useTheme.ts +3 -3
- package/imports/Podcast.tsx +388 -388
- package/imports/XerticaAi.tsx +45 -45
- package/imports/XerticaX.tsx +19 -19
- package/imports/svg-aueiaqngck.ts +11 -11
- package/imports/svg-v9krss1ozd.ts +16 -16
- package/imports/svg-vhrdofe3qe.ts +5 -5
- package/llms-full.txt +99 -6
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/styles/globals.css +15 -15
- package/styles/xertica/app-overrides/chat.css +61 -61
- package/styles/xertica/app-overrides/scrollbar.css +33 -33
- package/styles/xertica/integrations/google-maps.css +76 -76
- package/styles/xertica/integrations/sonner.css +73 -73
- package/templates/package.json +2 -2
- package/utils/gemini.ts +140 -140
package/assets/xertica-logo.svg
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
fill="none"
|
|
3
|
-
preserveAspectRatio="xMidYMid meet"
|
|
4
|
-
viewBox="0 0 1543 289"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
>
|
|
7
|
-
<g id="Xertica.ai">
|
|
8
|
-
<path d="M1352.82 239.808V285.425H1304.73V239.808H1352.82Z" fill="#00BEFF" />
|
|
9
|
-
<path d="M814.8 284.848H766.711V77.4971H814.8V284.848Z" fill="#00BEFF" />
|
|
10
|
-
<path d="M1543 284.438H1514.2V160.28H1543V284.438Z" fill="#00BEFF" />
|
|
11
|
-
<path
|
|
12
|
-
clip-rule="evenodd"
|
|
13
|
-
d="M1432.83 157.796C1446.98 157.796 1459.14 162.515 1468.58 170.709V160.28H1497.38V284.438H1468.58V274.01C1459.14 282.451 1446.98 286.921 1432.83 286.921C1395.1 286.921 1368.29 260.352 1368.29 222.359C1368.29 184.616 1395.1 157.796 1432.83 157.796ZM1432.83 183.778C1410.79 183.778 1396.27 199.061 1396.27 222.359C1396.27 245.658 1410.79 260.94 1432.83 260.94C1454.63 260.94 1468.9 245.658 1468.9 222.359C1468.9 199.06 1454.63 183.778 1432.83 183.778Z"
|
|
14
|
-
fill="#00BEFF"
|
|
15
|
-
fill-rule="evenodd"
|
|
16
|
-
/>
|
|
17
|
-
<path d="M947.87 73.3516C1002.88 73.3516 1044.42 107.647 1053.57 159.234H1004.68C997.221 132.988 976.34 117.308 947.87 117.308C911.387 117.308 887.337 142.612 887.337 181.176C887.337 219.739 911.387 245.036 947.87 245.036C976.34 245.036 997.221 229.356 1004.68 203.109H1053.57C1044.47 254.701 1003.26 289 947.87 289C884.853 289 840.078 244.626 840.078 181.176C840.078 118.142 884.854 73.3516 947.87 73.3516Z" fill="#00BEFF" />
|
|
18
|
-
<path d="M88.4971 39.8242L157.353 142.191L83.5371 251.524L60.9277 284.854H0L96.3154 142.191L5.37695 7H66.3047L88.4971 39.8242Z" fill="#00BEFF" />
|
|
19
|
-
<path d="M254.314 284.855H193.387L151.914 223.71L182.548 178.551L254.314 284.855Z" fill="#00BEFF" />
|
|
20
|
-
<path
|
|
21
|
-
clip-rule="evenodd"
|
|
22
|
-
d="M1179.14 73.3477C1202.77 73.3477 1223.08 81.2286 1238.84 94.9121V77.4971H1286.94V284.847H1238.84V267.431C1223.09 281.528 1202.77 288.992 1179.14 288.992C1116.12 288.992 1071.35 244.622 1071.35 181.172C1071.35 118.139 1116.12 73.3478 1179.14 73.3477ZM1179.14 117.308C1142.66 117.308 1118.61 142.604 1118.61 181.172C1118.61 219.739 1142.66 245.035 1179.14 245.035C1215.21 245.035 1238.84 219.739 1238.84 181.172C1238.84 142.605 1215.21 117.308 1179.14 117.308Z"
|
|
23
|
-
fill="#00BEFF"
|
|
24
|
-
fill-rule="evenodd"
|
|
25
|
-
/>
|
|
26
|
-
<path d="M1543 145.383H1514.2V118.067H1543V145.383Z" fill="#00BEFF" />
|
|
27
|
-
<path d="M672.466 77.501H736.31V121.457H672.466V211.448C672.466 230.939 682.415 240.891 702.313 240.891H736.309V284.852H698.999C649.246 284.851 625.203 259.968 625.203 211.449V7H672.466V77.501Z" fill="#00BEFF" />
|
|
28
|
-
<path d="M814.8 52.6172H766.711V7H814.8V52.6172Z" fill="#00BEFF" />
|
|
29
|
-
<path
|
|
30
|
-
clip-rule="evenodd"
|
|
31
|
-
d="M354.069 73.3516C417.086 73.3517 461.864 118.143 461.864 181.176C461.864 187.396 461.031 193.615 460.204 199.422H295.197C301.829 228.864 323.392 246.696 354.069 246.696C372.724 246.696 389.309 241.721 399.675 226.376H452.742C441.132 265.774 400.501 288.996 354.069 288.996C291.053 288.996 246.274 244.626 246.273 181.176C246.273 118.142 291.053 73.3516 354.069 73.3516ZM354.068 115.65C325.044 115.65 303.902 131.826 296.44 158.78H410.863C403.819 131.826 382.672 115.65 354.068 115.65Z"
|
|
32
|
-
fill="#00BEFF"
|
|
33
|
-
fill-rule="evenodd"
|
|
34
|
-
/>
|
|
35
|
-
<path d="M596.957 121.453H562.962C543.064 121.453 533.114 131.409 533.114 150.899V284.847H485.852V150.899C485.852 102.38 509.894 77.4972 559.647 77.4971H596.957V121.453Z" fill="#00BEFF" />
|
|
36
|
-
<path d="M182.552 98.6992L151.922 53.3906L188.014 0H248.941L182.552 98.6992Z" fill="#00BEFF" />
|
|
37
|
-
</g>
|
|
1
|
+
<svg
|
|
2
|
+
fill="none"
|
|
3
|
+
preserveAspectRatio="xMidYMid meet"
|
|
4
|
+
viewBox="0 0 1543 289"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
>
|
|
7
|
+
<g id="Xertica.ai">
|
|
8
|
+
<path d="M1352.82 239.808V285.425H1304.73V239.808H1352.82Z" fill="#00BEFF" />
|
|
9
|
+
<path d="M814.8 284.848H766.711V77.4971H814.8V284.848Z" fill="#00BEFF" />
|
|
10
|
+
<path d="M1543 284.438H1514.2V160.28H1543V284.438Z" fill="#00BEFF" />
|
|
11
|
+
<path
|
|
12
|
+
clip-rule="evenodd"
|
|
13
|
+
d="M1432.83 157.796C1446.98 157.796 1459.14 162.515 1468.58 170.709V160.28H1497.38V284.438H1468.58V274.01C1459.14 282.451 1446.98 286.921 1432.83 286.921C1395.1 286.921 1368.29 260.352 1368.29 222.359C1368.29 184.616 1395.1 157.796 1432.83 157.796ZM1432.83 183.778C1410.79 183.778 1396.27 199.061 1396.27 222.359C1396.27 245.658 1410.79 260.94 1432.83 260.94C1454.63 260.94 1468.9 245.658 1468.9 222.359C1468.9 199.06 1454.63 183.778 1432.83 183.778Z"
|
|
14
|
+
fill="#00BEFF"
|
|
15
|
+
fill-rule="evenodd"
|
|
16
|
+
/>
|
|
17
|
+
<path d="M947.87 73.3516C1002.88 73.3516 1044.42 107.647 1053.57 159.234H1004.68C997.221 132.988 976.34 117.308 947.87 117.308C911.387 117.308 887.337 142.612 887.337 181.176C887.337 219.739 911.387 245.036 947.87 245.036C976.34 245.036 997.221 229.356 1004.68 203.109H1053.57C1044.47 254.701 1003.26 289 947.87 289C884.853 289 840.078 244.626 840.078 181.176C840.078 118.142 884.854 73.3516 947.87 73.3516Z" fill="#00BEFF" />
|
|
18
|
+
<path d="M88.4971 39.8242L157.353 142.191L83.5371 251.524L60.9277 284.854H0L96.3154 142.191L5.37695 7H66.3047L88.4971 39.8242Z" fill="#00BEFF" />
|
|
19
|
+
<path d="M254.314 284.855H193.387L151.914 223.71L182.548 178.551L254.314 284.855Z" fill="#00BEFF" />
|
|
20
|
+
<path
|
|
21
|
+
clip-rule="evenodd"
|
|
22
|
+
d="M1179.14 73.3477C1202.77 73.3477 1223.08 81.2286 1238.84 94.9121V77.4971H1286.94V284.847H1238.84V267.431C1223.09 281.528 1202.77 288.992 1179.14 288.992C1116.12 288.992 1071.35 244.622 1071.35 181.172C1071.35 118.139 1116.12 73.3478 1179.14 73.3477ZM1179.14 117.308C1142.66 117.308 1118.61 142.604 1118.61 181.172C1118.61 219.739 1142.66 245.035 1179.14 245.035C1215.21 245.035 1238.84 219.739 1238.84 181.172C1238.84 142.605 1215.21 117.308 1179.14 117.308Z"
|
|
23
|
+
fill="#00BEFF"
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
/>
|
|
26
|
+
<path d="M1543 145.383H1514.2V118.067H1543V145.383Z" fill="#00BEFF" />
|
|
27
|
+
<path d="M672.466 77.501H736.31V121.457H672.466V211.448C672.466 230.939 682.415 240.891 702.313 240.891H736.309V284.852H698.999C649.246 284.851 625.203 259.968 625.203 211.449V7H672.466V77.501Z" fill="#00BEFF" />
|
|
28
|
+
<path d="M814.8 52.6172H766.711V7H814.8V52.6172Z" fill="#00BEFF" />
|
|
29
|
+
<path
|
|
30
|
+
clip-rule="evenodd"
|
|
31
|
+
d="M354.069 73.3516C417.086 73.3517 461.864 118.143 461.864 181.176C461.864 187.396 461.031 193.615 460.204 199.422H295.197C301.829 228.864 323.392 246.696 354.069 246.696C372.724 246.696 389.309 241.721 399.675 226.376H452.742C441.132 265.774 400.501 288.996 354.069 288.996C291.053 288.996 246.274 244.626 246.273 181.176C246.273 118.142 291.053 73.3516 354.069 73.3516ZM354.068 115.65C325.044 115.65 303.902 131.826 296.44 158.78H410.863C403.819 131.826 382.672 115.65 354.068 115.65Z"
|
|
32
|
+
fill="#00BEFF"
|
|
33
|
+
fill-rule="evenodd"
|
|
34
|
+
/>
|
|
35
|
+
<path d="M596.957 121.453H562.962C543.064 121.453 533.114 131.409 533.114 150.899V284.847H485.852V150.899C485.852 102.38 509.894 77.4972 559.647 77.4971H596.957V121.453Z" fill="#00BEFF" />
|
|
36
|
+
<path d="M182.552 98.6992L151.922 53.3906L188.014 0H248.941L182.552 98.6992Z" fill="#00BEFF" />
|
|
37
|
+
</g>
|
|
38
38
|
</svg>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
fill="none"
|
|
3
|
-
preserveAspectRatio="xMidYMid meet"
|
|
4
|
-
viewBox="0 0 258 282"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
>
|
|
7
|
-
<g id="Xertica X">
|
|
8
|
-
<path
|
|
9
|
-
d="M67.2666 0.0361328L89.7793 33.3447L159.63 137.228L84.7471 248.178L61.8115 282H0L97.7109 137.228L5.45508 0.0361328H67.2666Z"
|
|
10
|
-
fill="#00BEFF"
|
|
11
|
-
/>
|
|
12
|
-
<path
|
|
13
|
-
d="M258 282H196.185L154.114 219.951L185.192 174.123L258 282Z"
|
|
14
|
-
fill="#00BEFF"
|
|
15
|
-
/>
|
|
16
|
-
<path
|
|
17
|
-
d="M252.696 0.186523L185.042 100.142L154.106 54.0693L190.884 0L252.696 0.186523Z"
|
|
18
|
-
fill="#00BEFF"
|
|
19
|
-
/>
|
|
20
|
-
</g>
|
|
1
|
+
<svg
|
|
2
|
+
fill="none"
|
|
3
|
+
preserveAspectRatio="xMidYMid meet"
|
|
4
|
+
viewBox="0 0 258 282"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
>
|
|
7
|
+
<g id="Xertica X">
|
|
8
|
+
<path
|
|
9
|
+
d="M67.2666 0.0361328L89.7793 33.3447L159.63 137.228L84.7471 248.178L61.8115 282H0L97.7109 137.228L5.45508 0.0361328H67.2666Z"
|
|
10
|
+
fill="#00BEFF"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M258 282H196.185L154.114 219.951L185.192 174.123L258 282Z"
|
|
14
|
+
fill="#00BEFF"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M252.696 0.186523L185.042 100.142L154.106 54.0693L190.884 0L252.696 0.186523Z"
|
|
18
|
+
fill="#00BEFF"
|
|
19
|
+
/>
|
|
20
|
+
</g>
|
|
21
21
|
</svg>
|
|
@@ -211,11 +211,11 @@ export interface Message {
|
|
|
211
211
|
*/
|
|
212
212
|
export interface Conversation {
|
|
213
213
|
id: string;
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
title: string;
|
|
215
|
+
lastMessage?: string;
|
|
216
216
|
timestamp: string;
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
isFavorite: boolean;
|
|
218
|
+
messages: Message[];
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/**
|
|
@@ -223,7 +223,7 @@ export interface Conversation {
|
|
|
223
223
|
*/
|
|
224
224
|
export interface Suggestion {
|
|
225
225
|
id: string;
|
|
226
|
-
|
|
226
|
+
text: string;
|
|
227
227
|
icon?: React.ReactNode;
|
|
228
228
|
}
|
|
229
229
|
|
|
@@ -550,10 +550,10 @@ export function XerticaAssistant({
|
|
|
550
550
|
// ============================================================================
|
|
551
551
|
|
|
552
552
|
const defaultSuggestions: Suggestion[] = [
|
|
553
|
-
{ id: '1',
|
|
554
|
-
{ id: '2',
|
|
555
|
-
{ id: '3',
|
|
556
|
-
{ id: '4',
|
|
553
|
+
{ id: '1', text: 'Me ajude a criar um documento profissional' },
|
|
554
|
+
{ id: '2', text: 'Buscar nos meus arquivos por "relatório"' },
|
|
555
|
+
{ id: '3', text: 'Resuma as conversas importantes desta semana' },
|
|
556
|
+
{ id: '4', text: 'Crie um podcast sobre o último projeto' },
|
|
557
557
|
];
|
|
558
558
|
|
|
559
559
|
const sugestoes = propSuggestions ?? defaultSuggestions;
|
|
@@ -765,7 +765,7 @@ export function XerticaAssistant({
|
|
|
765
765
|
const handleSelecionarConversa = (conversaId: string) => {
|
|
766
766
|
const conversa = conversas.find(c => c.id === conversaId);
|
|
767
767
|
if (conversa) {
|
|
768
|
-
setMensagens(conversa.
|
|
768
|
+
setMensagens(conversa.messages);
|
|
769
769
|
setConversaAtual(conversaId);
|
|
770
770
|
setAbaSelecionada('chat');
|
|
771
771
|
}
|
|
@@ -774,7 +774,7 @@ export function XerticaAssistant({
|
|
|
774
774
|
const handleToggleFavoritaConversa = (conversaId: string) => {
|
|
775
775
|
setConversas(prev =>
|
|
776
776
|
prev.map(conv =>
|
|
777
|
-
conv.id === conversaId ? { ...conv,
|
|
777
|
+
conv.id === conversaId ? { ...conv, isFavorite: !conv.isFavorite } : conv
|
|
778
778
|
)
|
|
779
779
|
);
|
|
780
780
|
};
|
|
@@ -803,10 +803,10 @@ export function XerticaAssistant({
|
|
|
803
803
|
|
|
804
804
|
const handleRichSuggestionClick = (suggestion: Suggestion) => {
|
|
805
805
|
if (onRichAction) {
|
|
806
|
-
onRichAction(suggestion.id, suggestion.
|
|
806
|
+
onRichAction(suggestion.id, suggestion.text);
|
|
807
807
|
} else {
|
|
808
808
|
// Fallback: send as message
|
|
809
|
-
handleEnviarMensagem(suggestion.
|
|
809
|
+
handleEnviarMensagem(suggestion.text);
|
|
810
810
|
}
|
|
811
811
|
setShowMoreSuggestions(false);
|
|
812
812
|
};
|
|
@@ -853,7 +853,7 @@ export function XerticaAssistant({
|
|
|
853
853
|
|
|
854
854
|
const conversasFiltradas = conversas.filter(conversa => {
|
|
855
855
|
if (abaSelecionada === 'favoritos') {
|
|
856
|
-
return conversa.
|
|
856
|
+
return conversa.isFavorite;
|
|
857
857
|
}
|
|
858
858
|
return true;
|
|
859
859
|
});
|
|
@@ -1197,10 +1197,10 @@ export function XerticaAssistant({
|
|
|
1197
1197
|
{sugestoes.map((sugestao) => (
|
|
1198
1198
|
<button
|
|
1199
1199
|
key={sugestao.id}
|
|
1200
|
-
onClick={() => handleEnviarMensagem(sugestao.
|
|
1200
|
+
onClick={() => handleEnviarMensagem(sugestao.text)}
|
|
1201
1201
|
className="w-full p-3 text-left rounded-[var(--radius-card)] bg-muted text-foreground transition-colors duration-200 hover:bg-muted/80"
|
|
1202
1202
|
>
|
|
1203
|
-
{sugestao.
|
|
1203
|
+
{sugestao.text}
|
|
1204
1204
|
</button>
|
|
1205
1205
|
))}
|
|
1206
1206
|
|
|
@@ -1226,7 +1226,7 @@ export function XerticaAssistant({
|
|
|
1226
1226
|
<div className="flex items-center gap-2">
|
|
1227
1227
|
{sugestao.id.includes('chart') && <BarChart3 className="w-4 h-4 text-primary" />}
|
|
1228
1228
|
{sugestao.id.includes('table') && <TableIcon className="w-4 h-4 text-primary" />}
|
|
1229
|
-
<span className="font-medium">{sugestao.
|
|
1229
|
+
<span className="font-medium">{sugestao.text}</span>
|
|
1230
1230
|
</div>
|
|
1231
1231
|
</button>
|
|
1232
1232
|
))
|
|
@@ -1767,7 +1767,7 @@ export function XerticaAssistant({
|
|
|
1767
1767
|
>
|
|
1768
1768
|
<div className="flex items-start justify-between mb-1">
|
|
1769
1769
|
<h4 className="text-sm font-medium text-foreground truncate flex-1">
|
|
1770
|
-
{conversa.
|
|
1770
|
+
{conversa.title}
|
|
1771
1771
|
</h4>
|
|
1772
1772
|
<Button
|
|
1773
1773
|
variant="ghost"
|
|
@@ -1781,14 +1781,14 @@ export function XerticaAssistant({
|
|
|
1781
1781
|
<Heart
|
|
1782
1782
|
className={cn(
|
|
1783
1783
|
"w-3 h-3",
|
|
1784
|
-
conversa.
|
|
1784
|
+
conversa.isFavorite ? "text-destructive fill-current" : "text-muted-foreground"
|
|
1785
1785
|
)}
|
|
1786
1786
|
/>
|
|
1787
1787
|
</Button>
|
|
1788
1788
|
</div>
|
|
1789
|
-
{conversa.
|
|
1789
|
+
{conversa.lastMessage && (
|
|
1790
1790
|
<p className="text-sm text-muted-foreground truncate mb-1">
|
|
1791
|
-
{conversa.
|
|
1791
|
+
{conversa.lastMessage}
|
|
1792
1792
|
</p>
|
|
1793
1793
|
)}
|
|
1794
1794
|
<p className="text-sm text-muted-foreground">
|
|
@@ -22,6 +22,6 @@ The standard Xertica.ai logo, available in multiple color variants to suit diffe
|
|
|
22
22
|
## AI Best Practices
|
|
23
23
|
|
|
24
24
|
> [!IMPORTANT]
|
|
25
|
-
> - **Variants** — Use
|
|
25
|
+
> - **Variants** — Use `default` on light/neutral backgrounds, `white` on dark or colored backgrounds, and `theme` to inherit the surrounding text color. There is no `brand` or `dark` variant.
|
|
26
26
|
> - **Scaling** — Always specify a height (`h-*`) and use `w-auto` to maintain the correct aspect ratio.
|
|
27
27
|
> - **Icon Usage** — Use `XerticaXLogo` for favicon-like placements, profile avatars, or collapsed sidebars where horizontal space is limited.
|
|
@@ -19,12 +19,12 @@ export const Logos: StoryObj = {
|
|
|
19
19
|
<h3 className="text-lg font-semibold text-muted-foreground border-b pb-2">Full Logo</h3>
|
|
20
20
|
<div className="flex flex-wrap gap-8 items-center bg-muted/20 p-8 rounded-xl">
|
|
21
21
|
<div className="space-y-2 text-center">
|
|
22
|
-
<XerticaLogo variant="
|
|
23
|
-
<span className="text-xs text-muted-foreground">
|
|
22
|
+
<XerticaLogo variant="default" className="h-10 w-auto" />
|
|
23
|
+
<span className="text-xs text-muted-foreground">Default</span>
|
|
24
24
|
</div>
|
|
25
25
|
<div className="space-y-2 text-center">
|
|
26
|
-
<XerticaLogo variant="
|
|
27
|
-
<span className="text-xs text-muted-foreground">
|
|
26
|
+
<XerticaLogo variant="theme" className="h-10 w-auto" />
|
|
27
|
+
<span className="text-xs text-muted-foreground">Theme</span>
|
|
28
28
|
</div>
|
|
29
29
|
<div className="space-y-2 text-center bg-slate-900 p-4 rounded-lg">
|
|
30
30
|
<XerticaLogo variant="white" className="h-10 w-auto" />
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { XerticaLogo } from './XerticaLogo';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof XerticaLogo> = {
|
|
6
|
+
title: 'Brand/XerticaLogo',
|
|
7
|
+
component: XerticaLogo,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
variant: {
|
|
13
|
+
control: 'select',
|
|
14
|
+
options: ['default', 'white', 'theme'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof XerticaLogo>;
|
|
21
|
+
|
|
22
|
+
export const Default: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
variant: 'default',
|
|
25
|
+
className: 'h-10 w-auto',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const White: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
variant: 'white',
|
|
32
|
+
className: 'h-10 w-auto',
|
|
33
|
+
},
|
|
34
|
+
decorators: [
|
|
35
|
+
(Story) => (
|
|
36
|
+
<div className="bg-slate-900 p-8 rounded-xl">
|
|
37
|
+
<Story />
|
|
38
|
+
</div>
|
|
39
|
+
),
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Theme: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
variant: 'theme',
|
|
46
|
+
className: 'h-10 w-auto text-blue-600',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const AllVariants: Story = {
|
|
51
|
+
render: () => (
|
|
52
|
+
<div className="space-y-8 p-6">
|
|
53
|
+
<div className="space-y-2">
|
|
54
|
+
<p className="text-xs text-muted-foreground font-mono">variant="default"</p>
|
|
55
|
+
<XerticaLogo variant="default" className="h-10 w-auto" />
|
|
56
|
+
</div>
|
|
57
|
+
<div className="space-y-2 bg-slate-900 p-6 rounded-xl">
|
|
58
|
+
<p className="text-xs text-slate-400 font-mono">variant="white"</p>
|
|
59
|
+
<XerticaLogo variant="white" className="h-10 w-auto" />
|
|
60
|
+
</div>
|
|
61
|
+
<div className="space-y-2">
|
|
62
|
+
<p className="text-xs text-muted-foreground font-mono">variant="theme" (text-blue-600)</p>
|
|
63
|
+
<XerticaLogo variant="theme" className="h-10 w-auto text-blue-600" />
|
|
64
|
+
</div>
|
|
65
|
+
<div className="space-y-2">
|
|
66
|
+
<p className="text-xs text-muted-foreground font-mono">color="#e11d48" (direct override)</p>
|
|
67
|
+
<XerticaLogo color="#e11d48" className="h-10 w-auto" />
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
),
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const Sizes: Story = {
|
|
74
|
+
render: () => (
|
|
75
|
+
<div className="flex flex-col gap-6 p-6 items-start">
|
|
76
|
+
<XerticaLogo className="h-6 w-auto" />
|
|
77
|
+
<XerticaLogo className="h-8 w-auto" />
|
|
78
|
+
<XerticaLogo className="h-10 w-auto" />
|
|
79
|
+
<XerticaLogo className="h-14 w-auto" />
|
|
80
|
+
</div>
|
|
81
|
+
),
|
|
82
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="Brand/XerticaLogo" />
|
|
4
|
+
|
|
5
|
+
<Title>XerticaLogo</Title>
|
|
6
|
+
<Subtitle>Full Xertica.ai wordmark (X-symbol + text) as a responsive SVG.</Subtitle>
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
`XerticaLogo` renders the complete Xertica brand identity — the X symbol alongside the wordmark text. It adapts to different backgrounds through its `variant` prop and supports a direct `color` override for edge cases.
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { XerticaLogo } from 'xertica-ui';
|
|
16
|
+
|
|
17
|
+
<XerticaLogo className="h-8 w-auto" />
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
| Prop | Type | Default | Description |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| `variant` | `'default' \| 'white' \| 'theme'` | `'default'` | Color variant. `default` uses `var(--primary)`, `white` forces white fill, `theme` inherits `currentColor`. |
|
|
27
|
+
| `color` | `string` | — | Direct color override (CSS color value). Overrides `variant`. |
|
|
28
|
+
| `className` | `string` | `'w-auto h-8'` | Additional CSS classes applied to the SVG element. |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Variants
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
// Light background — primary brand color
|
|
36
|
+
<XerticaLogo variant="default" className="h-8 w-auto" />
|
|
37
|
+
|
|
38
|
+
// Dark background — white fill
|
|
39
|
+
<XerticaLogo variant="white" className="h-8 w-auto" />
|
|
40
|
+
|
|
41
|
+
// Inherits text color from parent (useful on colored backgrounds)
|
|
42
|
+
<XerticaLogo variant="theme" className="h-8 w-auto" />
|
|
43
|
+
|
|
44
|
+
// Direct color override
|
|
45
|
+
<XerticaLogo color="#1D4ED8" className="h-8 w-auto" />
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## AI Best Practices
|
|
51
|
+
|
|
52
|
+
> [!IMPORTANT]
|
|
53
|
+
> - **Variant selection** — Use `default` on light/neutral backgrounds, `white` on dark or colored backgrounds, and `theme` when the logo should inherit the surrounding text color.
|
|
54
|
+
> - **Sizing** — Always set a height (`h-*`) and use `w-auto` to preserve the correct aspect ratio. Never set both width and height to fixed values.
|
|
55
|
+
> - **Icon-only contexts** — Use `XerticaXLogo` instead of `XerticaLogo` in compact spaces such as collapsed sidebars, favicons, or avatars.
|
|
56
|
+
> - **No `dark` or `brand` variants** — These are not valid. Use `default` for brand-color rendering.
|
|
@@ -20,7 +20,7 @@ describe('XerticaLogo', () => {
|
|
|
20
20
|
// Verification depends on implementation (e.g. fill color)
|
|
21
21
|
expect(container.querySelector('svg')).toBeInTheDocument();
|
|
22
22
|
|
|
23
|
-
rerender(<XerticaLogo variant="
|
|
23
|
+
rerender(<XerticaLogo variant="theme" />);
|
|
24
24
|
expect(container.querySelector('svg')).toBeInTheDocument();
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -31,11 +31,12 @@ interface XerticaProviderProps {
|
|
|
31
31
|
* This component aggregates all necessary context providers. It should be placed at the
|
|
32
32
|
* root of your application, ideally inside the App component.
|
|
33
33
|
*/
|
|
34
|
-
export function XerticaProvider({
|
|
35
|
-
children
|
|
34
|
+
export function XerticaProvider({
|
|
35
|
+
children,
|
|
36
|
+
googleMapsApiKey,
|
|
36
37
|
}: XerticaProviderProps) {
|
|
37
38
|
return (
|
|
38
|
-
<GoogleMapsLoaderProvider>
|
|
39
|
+
<GoogleMapsLoaderProvider apiKey={googleMapsApiKey}>
|
|
39
40
|
<LayoutProvider>
|
|
40
41
|
<TooltipProvider>
|
|
41
42
|
{children}
|
|
@@ -32,9 +32,13 @@ function App() {
|
|
|
32
32
|
|
|
33
33
|
| Prop | Type | Default | Description |
|
|
34
34
|
|---|---|---|---|
|
|
35
|
-
| `children` | `ReactNode` | **Required** | The application content |
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
| `children` | `ReactNode` | **Required** | The application content to be wrapped by all providers. |
|
|
36
|
+
| `googleMapsApiKey` | `string` | — | Google Maps JavaScript API key. Passed to `GoogleMapsLoaderProvider` to enable map components (`SimpleMap`, `MapShowcase`, etc.). |
|
|
37
|
+
| `apiKey` | `string` | — | Gemini / AI service API key for AI-powered features. Accepted by the provider but not yet wired to a default context — pass explicitly to AI components that require it. |
|
|
38
|
+
| `defaultBrandTheme` | `string` | — | Initial theme name (e.g., `'default'`, `'dark'`). Intended for future theme-switching support. |
|
|
39
|
+
| `primaryColor` | `string` | — | Hex color override for the primary brand token. When set, updates `--primary` at runtime. |
|
|
40
|
+
| `useCustomTokens` | `boolean` | `false` | When `true`, skips injecting the library's default CSS token set, relying entirely on the host application's tokens. |
|
|
41
|
+
| `disableDarkMode` | `boolean` | `false` | When `true`, prevents the library from applying dark-mode class or media-query overrides. |
|
|
38
42
|
|
|
39
43
|
---
|
|
40
44
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { XerticaXLogo } from './XerticaXLogo';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof XerticaXLogo> = {
|
|
6
|
+
title: 'Brand/XerticaXLogo',
|
|
7
|
+
component: XerticaXLogo,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
variant: {
|
|
13
|
+
control: 'select',
|
|
14
|
+
options: ['default', 'white', 'theme'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof XerticaXLogo>;
|
|
21
|
+
|
|
22
|
+
export const Default: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
variant: 'default',
|
|
25
|
+
className: 'h-12 w-12',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const White: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
variant: 'white',
|
|
32
|
+
className: 'h-12 w-12',
|
|
33
|
+
},
|
|
34
|
+
decorators: [
|
|
35
|
+
(Story) => (
|
|
36
|
+
<div className="bg-slate-900 p-8 rounded-xl">
|
|
37
|
+
<Story />
|
|
38
|
+
</div>
|
|
39
|
+
),
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Theme: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
variant: 'theme',
|
|
46
|
+
className: 'h-12 w-12 text-blue-600',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const AllVariants: Story = {
|
|
51
|
+
render: () => (
|
|
52
|
+
<div className="flex flex-wrap gap-10 p-6 items-end">
|
|
53
|
+
<div className="space-y-2 text-center">
|
|
54
|
+
<XerticaXLogo variant="default" className="h-12 w-12" />
|
|
55
|
+
<p className="text-xs text-muted-foreground">default</p>
|
|
56
|
+
</div>
|
|
57
|
+
<div className="space-y-2 text-center bg-slate-900 p-4 rounded-xl">
|
|
58
|
+
<XerticaXLogo variant="white" className="h-12 w-12" />
|
|
59
|
+
<p className="text-xs text-slate-400">white</p>
|
|
60
|
+
</div>
|
|
61
|
+
<div className="space-y-2 text-center">
|
|
62
|
+
<XerticaXLogo variant="theme" className="h-12 w-12 text-blue-600" />
|
|
63
|
+
<p className="text-xs text-muted-foreground">theme</p>
|
|
64
|
+
</div>
|
|
65
|
+
<div className="space-y-2 text-center">
|
|
66
|
+
<XerticaXLogo color="#e11d48" className="h-12 w-12" />
|
|
67
|
+
<p className="text-xs text-muted-foreground">color override</p>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
),
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const CollapsedSidebarSlot: Story = {
|
|
74
|
+
render: () => (
|
|
75
|
+
<div className="flex items-center justify-center w-20 h-16 bg-sidebar border-r border-border">
|
|
76
|
+
<XerticaXLogo className="h-7 w-7" />
|
|
77
|
+
</div>
|
|
78
|
+
),
|
|
79
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="Brand/XerticaXLogo" />
|
|
4
|
+
|
|
5
|
+
<Title>XerticaXLogo</Title>
|
|
6
|
+
<Subtitle>Compact X-symbol mark for favicons, avatars, and collapsed sidebar slots.</Subtitle>
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
`XerticaXLogo` renders only the X-symbol portion of the Xertica identity. It shares the same prop API as `XerticaLogo` and is the preferred choice wherever horizontal space is constrained.
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { XerticaXLogo } from 'xertica-ui';
|
|
16
|
+
|
|
17
|
+
<XerticaXLogo className="h-8 w-8" />
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
| Prop | Type | Default | Description |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| `variant` | `'default' \| 'white' \| 'theme'` | `'default'` | Color variant. `default` uses `var(--primary)`, `white` forces white fill, `theme` inherits `currentColor`. |
|
|
27
|
+
| `color` | `string` | — | Direct color override. Overrides `variant`. |
|
|
28
|
+
| `className` | `string` | `'w-auto h-8'` | Additional CSS classes applied to the SVG element. |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Usage Examples
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
// Default — primary color
|
|
36
|
+
<XerticaXLogo className="h-10 w-10" />
|
|
37
|
+
|
|
38
|
+
// On a dark background
|
|
39
|
+
<XerticaXLogo variant="white" className="h-10 w-10" />
|
|
40
|
+
|
|
41
|
+
// Inherits current text color
|
|
42
|
+
<XerticaXLogo variant="theme" className="h-10 w-10 text-blue-600" />
|
|
43
|
+
|
|
44
|
+
// Collapsed sidebar icon slot
|
|
45
|
+
<XerticaXLogo className="h-6 w-6 shrink-0" />
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## AI Best Practices
|
|
51
|
+
|
|
52
|
+
> [!IMPORTANT]
|
|
53
|
+
> - **Square sizing** — Unlike the full logo, set both width and height to the same value (e.g., `h-10 w-10`) since the X symbol has a near-square aspect ratio (viewBox `0 0 258 282`).
|
|
54
|
+
> - **Favicon** — Export as a PNG at 32×32 and 192×192 for web manifest icons; do not use the SVG component directly in `<link rel="icon">`.
|
|
55
|
+
> - **Collapsed sidebar** — Replace the full `XerticaLogo` with `XerticaXLogo` when `sidebarExpanded === false` to avoid clipping.
|