tycho-components 0.2.6-SNAPSHOT-1 → 0.2.6-SNAPSHOT-3

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.
@@ -0,0 +1,8 @@
1
+ import { ButtonDSSizes } from 'tycho-storybook/dist/Button/Button';
2
+ import './style.scss';
3
+ type Props = {
4
+ text: string;
5
+ size?: ButtonDSSizes;
6
+ };
7
+ export default function AppClipboard({ text, size }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import { IconButton } from 'tycho-storybook';
4
+ import { useMessageUtils } from '../configs/useMessageUtils';
5
+ import UsabilityUtils from '../functions/UsabilityUtils';
6
+ import './style.scss';
7
+ export default function AppClipboard({ text, size = 'x-small' }) {
8
+ const { t } = useTranslation('home');
9
+ const { dispatchMessage } = useMessageUtils();
10
+ const handleCopy = () => {
11
+ UsabilityUtils.copy(text, () => {
12
+ dispatchMessage({ key: 'message.copy.clipboard', t });
13
+ });
14
+ };
15
+ return (_jsx(IconButton, { name: "content_copy", title: t('tooltip.copy.clipboard'), onClick: handleCopy, size: size }));
16
+ }
@@ -0,0 +1,2 @@
1
+ import AppClipboard from './AppClipboard';
2
+ export default AppClipboard;
@@ -0,0 +1,2 @@
1
+ import AppClipboard from './AppClipboard';
2
+ export default AppClipboard;
@@ -0,0 +1,29 @@
1
+ .editable-container-readonly {
2
+ .editable-line {
3
+ margin-top: var(--spacing-small);
4
+
5
+ .title {
6
+ display: flex;
7
+ align-items: center;
8
+ margin-bottom: var(--spacing-xsmall);
9
+
10
+ h6 {
11
+ margin-bottom: 0px;
12
+ }
13
+
14
+ .info {
15
+ width: 16px;
16
+ height: 16px;
17
+ margin-left: var(--spacing-xsmall);
18
+ cursor: pointer;
19
+ }
20
+ }
21
+
22
+ .color-display {
23
+ width: 36px;
24
+ height: 36px;
25
+ border-radius: var(--border-radius);
26
+ border: var(--border-default);
27
+ }
28
+ }
29
+ }
@@ -10,7 +10,7 @@ export default function HeaderUser({ navigateLogout }) {
10
10
  const [open, setOpen] = useState(false);
11
11
  const handleProfile = () => {
12
12
  setOpen(false);
13
- window.open(import.meta.env.VITE_APP_PROFILE_URL, '_blank');
13
+ window.open(import.meta.env.VITE_APP_RESERVED_URL, '_blank');
14
14
  };
15
15
  return (_jsxs("div", { className: "header-user-container", children: [isLogged() ? (_jsx(ProfileDropdown, { src: getLogged()?.picture, title: getLogged()?.name || getLogged()?.sub, onClick: (b) => setOpen(b) })) : (_jsx(Avatar, { size: "small", onClick: () => (location.href = '/auth') })), open && isLogged() && (_jsxs("div", { className: "ds-dropdown-list", children: [_jsx("div", { className: "ds-dropdown-itemlist", children: _jsx("span", { className: "label", children: `${t('profile.label.hello')} ${getLogged()?.name || getLogged()?.sub}` }) }), _jsxs("div", { className: "ds-dropdown-itemlist d-none", children: [_jsx(Icon, { name: "colors", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.theme') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: handleProfile, children: [_jsx(Icon, { name: "person", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.home') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", children: [_jsx(Icon, { name: "live_help", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.help') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: () => {
16
16
  setOpen(false);
@@ -35,10 +35,11 @@ const init = ({ selector, tree, dagre = false, stylesheet = defaultStylesheet, w
35
35
  });
36
36
  cy.ready(() => {
37
37
  if (!cy._htmlLabelsApplied) {
38
+ const nodesToLabel = cy.nodes().not('.eh-handle');
38
39
  // @ts-ignore (no types)
39
40
  cy.nodeHtmlLabel([
40
41
  {
41
- query: 'node',
42
+ query: nodesToLabel,
42
43
  halign: 'center',
43
44
  valign: 'center',
44
45
  tpl: (data) => `<div class="token-data ${data.classes || ''}">${data.label}</div>`,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as AppAnalytics } from './AppAnalytics';
2
+ export { default as AppClipboard } from './AppClipboard';
2
3
  export { default as AppColorpicker } from './AppColorpicker';
3
4
  export { default as AppDropzone } from './AppDropzone';
4
5
  export type { UploadedFile } from './AppDropzone/UploadedFile';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as AppAnalytics } from './AppAnalytics';
2
+ export { default as AppClipboard } from './AppClipboard';
2
3
  export { default as AppColorpicker } from './AppColorpicker';
3
4
  export { default as AppDropzone } from './AppDropzone';
4
5
  export { default as AppEditable } from './AppEditable';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.2.6-SNAPSHOT-1",
4
+ "version": "0.2.6-SNAPSHOT-3",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {