tycho-components 0.43.0 → 0.43.1

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.
@@ -5,7 +5,7 @@ export const HelpTexts = {
5
5
  'title.tour': 'Live Tour',
6
6
  'title.autoOpen': 'Enable Auto-Open',
7
7
  'button.tour': 'Start Live Tour',
8
- 'button.updateLiveTourPreference': 'Update your live tour preference',
8
+ 'button.updateLiveTourPreference': 'Update preference',
9
9
  'description.tutorials': 'Access our comprehensive tutorials and documentation',
10
10
  'description.tour': 'Start an interactive tour of the platform or enable it to open automatically',
11
11
  'checkbox.autoOpen': 'Enable Auto-Open',
@@ -17,7 +17,7 @@ export const HelpTexts = {
17
17
  'title.tour': 'Tour ao Vivo',
18
18
  'title.autoOpen': 'Ativar Abertura Automática',
19
19
  'button.tour': 'Iniciar Tour ao Vivo',
20
- 'button.updateLiveTourPreference': 'Atualizar sua preferência de tour ao vivo',
20
+ 'button.updateLiveTourPreference': 'Atualizar preferência',
21
21
  'description.tutorials': 'Acesse nossos tutoriais abrangentes e documentação',
22
22
  'description.tour': 'Inicie um tour interativo da plataforma ou ative para abrir automaticamente',
23
23
  'checkbox.autoOpen': 'Ativar Abertura Automática',
@@ -27,7 +27,7 @@ export const HelpTexts = {
27
27
  'modal.title': 'Centro Assistenza',
28
28
  'title.tutorials': 'Tutorial',
29
29
  'button.tour': 'Avvia Tour Interattivo',
30
- 'button.updateLiveTourPreference': 'Aggiorna la preferenza del tour interattivo',
30
+ 'button.updateLiveTourPreference': 'Aggiorna la preferenza',
31
31
  'title.tour': 'Tour Interattivo',
32
32
  'title.autoOpen': 'Abilita Apertura Automatica',
33
33
  'description.tutorials': 'Accedi ai nostri tutorial completi e alla documentazione',
Binary file
@@ -2,14 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { Button } from 'tycho-storybook';
5
- import { AppPicture } from '../../../common';
6
5
  import AppModal from '../../../common/AppModal/AppModal';
7
6
  import CookieStorage from '../../../configs/CookieStorage';
8
7
  import ProfileService from '../../../configs/services/ProfileService';
9
8
  import { useLoggedUtils } from '../../../configs/useLoggedUtils';
10
9
  import { useTourUtils } from '../../../configs/useTourUtils';
11
10
  import SecurityUtils from '../../../functions/SecurityUtils';
12
- import liveTour from './live-tour.png';
13
11
  import './style.scss';
14
12
  export default function HelpModal({ onClose, helpActions = [] }) {
15
13
  const { t } = useTranslation('help');
@@ -65,14 +63,14 @@ export default function HelpModal({ onClose, helpActions = [] }) {
65
63
  setAutoOpenEnabled(event.target.checked);
66
64
  };
67
65
  const actionItems = [
68
- {
69
- title: t('title.tutorials'),
70
- desc: t('description.tutorials'),
71
- action: handleTutorials,
72
- },
66
+ // {
67
+ // title: t('title.tutorials'),
68
+ // desc: t('description.tutorials'),
69
+ // action: handleTutorials,
70
+ // },
73
71
  ...helpActions,
74
72
  ];
75
- return (_jsxs(AppModal, { title: t('modal.title'), close: onClose, hideFooter: true, className: "help-modal", children: [_jsxs("div", { className: "live-tour", children: [_jsx(AppPicture, { src: liveTour }), _jsxs("div", { className: "tour-content", children: [_jsx("div", { className: "title", children: t('title.tour') }), _jsx("div", { className: "desc", children: t('description.tour') }), _jsxs("label", { className: "help-checkbox-label", children: [_jsx("input", { type: "checkbox", checked: autoOpenEnabled, onChange: handleAutoOpenChange, disabled: updatingLiveTour, className: "help-checkbox" }), _jsx("span", { children: t('checkbox.autoOpen') })] }), _jsx(Button, { text: isDisablingAutoOpen
76
- ? t('button.updateLiveTourPreference')
77
- : t('button.tour'), size: "small", icon: "keyboard_arrow_right", onClick: handleTourToggle, disabled: updatingLiveTour, "data-tour": "guided-tour-start" })] })] }), _jsx("div", { className: "other-actions", children: actionItems.map((item, idx) => (_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: item.title }), _jsx("div", { className: "desc", children: item.desc }), _jsx(Button, { text: t('button.open'), size: "x-small", mode: "outlined", icon: "keyboard_arrow_right", onClick: () => handleCustomAction(item) })] }, idx))) })] }));
73
+ return (_jsxs(AppModal, { title: t('modal.title'), close: onClose, hideFooter: true, className: "help-modal", children: [_jsxs("div", { className: "item item-tour", children: [_jsx("div", { className: "title", children: t('title.tour') }), _jsx("div", { className: "desc", children: t('description.tour') }), _jsxs("label", { className: "help-checkbox-label", children: [_jsx("input", { type: "checkbox", checked: autoOpenEnabled, onChange: handleAutoOpenChange, disabled: updatingLiveTour, className: "help-checkbox" }), _jsx("span", { children: t('checkbox.autoOpen') })] }), _jsx(Button, { text: isDisablingAutoOpen
74
+ ? t('button.updateLiveTourPreference')
75
+ : t('button.tour'), size: "small", icon: isDisablingAutoOpen ? 'save' : 'keyboard_arrow_right', onClick: handleTourToggle, disabled: updatingLiveTour, "data-tour": "guided-tour-start" })] }), actionItems.map((item, idx) => (_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: item.title }), _jsx("div", { className: "desc", children: item.desc }), _jsx(Button, { text: t('button.open'), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: () => handleCustomAction(item) })] }, idx)))] }));
78
76
  }
@@ -3,84 +3,49 @@
3
3
  width: 60vw !important;
4
4
 
5
5
  .body {
6
- display: flex;
7
- flex-direction: column;
8
- gap: 16px;
6
+ display: grid;
7
+ grid-template-columns: repeat(3, minmax(0, 1fr));
8
+ gap: var(--spacing-200);
9
9
 
10
- .live-tour {
10
+ .item {
11
11
  display: flex;
12
+ flex-direction: column;
13
+ min-width: 0;
12
14
  padding: 24px 24px 16px;
13
15
  border: 1px solid var(--border-subtle-2);
14
16
  border-radius: var(--radius-100);
15
- background-color: #ebeff8;
16
- gap: 48px;
17
-
18
- .tour-content {
19
- display: flex;
20
- flex-direction: column;
21
- gap: 8px;
22
- max-width: 50%;
23
17
 
24
- > .title {
25
- @include subtitle-medium-2;
26
- }
18
+ > .title {
19
+ @include subtitle-small-2;
20
+ color: var(--text-primary);
21
+ margin-bottom: 4px;
22
+ }
27
23
 
28
- > .desc {
29
- @include body-medium-1;
30
- color: var(--text-secondary);
31
- }
24
+ > .desc {
25
+ @include body-medium-1;
26
+ color: var(--text-secondary);
32
27
  }
33
28
 
34
- .app-picture-container > img {
35
- width: 240px;
36
- height: 180px;
29
+ > .ds-button {
30
+ margin-top: auto;
37
31
  }
32
+ }
33
+
34
+ .item-tour {
35
+ background-color: #ebeff8;
38
36
 
39
37
  .help-checkbox-label {
40
38
  display: flex;
41
39
  align-items: center;
42
40
  gap: var(--spacing-100);
43
41
  cursor: pointer;
44
- user-select: none;
45
- font-size: 0.875rem;
46
- margin-bottom: 16px;
42
+ margin: 8px 0;
47
43
 
48
44
  .help-checkbox {
49
45
  cursor: pointer;
50
46
  }
51
47
  }
52
48
  }
53
-
54
- .other-actions {
55
- display: grid;
56
- grid-template-columns: repeat(3, minmax(0, 1fr));
57
- gap: var(--spacing-200);
58
-
59
- .item {
60
- display: flex;
61
- flex-direction: column;
62
- min-width: 0;
63
- padding: 24px 24px 16px;
64
- border: 1px solid var(--border-subtle-2);
65
- border-radius: var(--radius-100);
66
-
67
- > .title {
68
- @include subtitle-small-2;
69
- color: var(--text-primary);
70
- margin-bottom: 4px;
71
- }
72
-
73
- > .desc {
74
- @include body-medium-1;
75
- color: var(--text-secondary);
76
- margin-bottom: 24px;
77
- }
78
-
79
- > .ds-button {
80
- margin-top: auto;
81
- }
82
- }
83
- }
84
49
  }
85
50
  }
86
51
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.43.0",
4
+ "version": "0.43.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {