@linagora/twake-mui 15.2.0 → 16.0.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/ContactPopover/ContactPopover.stories.d.ts +1 -0
  3. package/dist/components/ContactPopover/ContactPopover.stories.js +25 -30
  4. package/dist/components/ContactPopover/ContactPopoverCalendarAction.js +5 -2
  5. package/dist/components/ContactPopover/ContactPopoverChatAction.js +5 -2
  6. package/dist/components/ContactPopover/ContactPopoverVideoAction.js +5 -2
  7. package/dist/components/Dialog/Dialog.stories.d.ts +1 -1
  8. package/dist/components/Dialog/Dialog.stories.js +1 -1
  9. package/dist/components/Dialog/index.d.ts +1 -1
  10. package/dist/components/Dialog/index.js +1 -1
  11. package/dist/components/Dialogs/ConfirmDialog.d.ts +8 -0
  12. package/dist/components/Dialogs/ConfirmDialog.js +16 -0
  13. package/dist/components/Dialogs/DialogBackButton.d.ts +8 -0
  14. package/dist/components/Dialogs/DialogBackButton.js +14 -0
  15. package/dist/components/Dialogs/DialogCloseButton.d.ts +8 -0
  16. package/dist/components/Dialogs/DialogCloseButton.js +14 -0
  17. package/dist/components/Dialogs/DialogFluidContent.d.ts +12 -0
  18. package/dist/components/Dialogs/DialogFluidContent.js +11 -0
  19. package/dist/components/Dialogs/DialogNavButtons.d.ts +9 -0
  20. package/dist/components/Dialogs/DialogNavButtons.js +14 -0
  21. package/dist/components/Dialogs/Dialogs.stories.d.ts +33 -0
  22. package/dist/components/Dialogs/Dialogs.stories.js +177 -0
  23. package/dist/components/Dialogs/FixedActionsDialog.d.ts +8 -0
  24. package/dist/components/Dialogs/FixedActionsDialog.js +20 -0
  25. package/dist/components/Dialogs/FixedDialog.d.ts +8 -0
  26. package/dist/components/Dialogs/FixedDialog.js +20 -0
  27. package/dist/components/Dialogs/IllustrationDialog.d.ts +8 -0
  28. package/dist/components/Dialogs/IllustrationDialog.js +21 -0
  29. package/dist/components/Dialogs/InstallFlagshipAppDialog.d.ts +13 -0
  30. package/dist/components/Dialogs/InstallFlagshipAppDialog.js +26 -0
  31. package/dist/components/Dialogs/PermissionDialog.d.ts +11 -0
  32. package/dist/components/Dialogs/PermissionDialog.js +15 -0
  33. package/dist/components/Dialogs/PermissionDialogIcon.d.ts +3 -0
  34. package/dist/components/Dialogs/PermissionDialogIcon.js +8 -0
  35. package/dist/components/Dialogs/ShortcutDialog.d.ts +15 -0
  36. package/dist/components/Dialogs/ShortcutDialog.js +41 -0
  37. package/dist/components/Dialogs/SlideUpTransition.d.ts +5 -0
  38. package/dist/components/Dialogs/SlideUpTransition.js +6 -0
  39. package/dist/components/Dialogs/SpecificDialogs.stories.d.ts +7 -0
  40. package/dist/components/Dialogs/SpecificDialogs.stories.js +43 -0
  41. package/dist/components/Dialogs/StandardDialog.d.ts +11 -0
  42. package/dist/components/Dialogs/StandardDialog.js +21 -0
  43. package/dist/components/Dialogs/images/appStore.png +0 -0
  44. package/dist/components/Dialogs/images/installFlagshipAppQrCode.png +0 -0
  45. package/dist/components/Dialogs/images/playStore.png +0 -0
  46. package/dist/components/Dialogs/locales/de.json +25 -0
  47. package/dist/components/Dialogs/locales/en.json +25 -0
  48. package/dist/components/Dialogs/locales/es.json +25 -0
  49. package/dist/components/Dialogs/locales/fr.json +25 -0
  50. package/dist/components/Dialogs/locales/index.d.ts +177 -0
  51. package/dist/components/Dialogs/locales/index.js +8 -0
  52. package/dist/components/Dialogs/locales/it.json +25 -0
  53. package/dist/components/Dialogs/locales/ru.json +25 -0
  54. package/dist/components/Dialogs/locales/vi.json +25 -0
  55. package/dist/components/Dialogs/shortcutHelpers.d.ts +19 -0
  56. package/dist/components/Dialogs/shortcutHelpers.js +49 -0
  57. package/dist/components/Dialogs/types.d.ts +7 -0
  58. package/dist/components/Dialogs/types.js +1 -0
  59. package/dist/components/Dialogs/useDialogLayout.d.ts +40 -0
  60. package/dist/components/Dialogs/useDialogLayout.js +63 -0
  61. package/dist/index.d.ts +24 -1
  62. package/dist/index.js +12 -1
  63. package/dist/lib/overrides.js +71 -6
  64. package/package.json +2 -2
@@ -0,0 +1,25 @@
1
+ {
2
+ "Dialogs": {
3
+ "closeButton": "Đóng",
4
+ "backButton": "Quay lại",
5
+ "installFlagshipApp": {
6
+ "title": "Quét mã QR",
7
+ "text": "hoặc trực tiếp đến <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>hoặc <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> để cài đặt ứng dụng Twake Workplace",
8
+ "linkLabel": "Đến trang tải xuống ứng dụng Twake Workplace"
9
+ },
10
+ "shortcut": {
11
+ "createTitle": "Tạo lối tắt",
12
+ "editTitle": "Chỉnh sửa lối tắt",
13
+ "filename": "Tên lối tắt",
14
+ "url": "URL",
15
+ "cancel": "Hủy",
16
+ "create": "Tạo",
17
+ "edit": "Lưu",
18
+ "created": "Lối tắt đã được tạo",
19
+ "edited": "Lối tắt đã được chỉnh sửa",
20
+ "errored": "Đã xảy ra lỗi",
21
+ "needsInfo": "Lối tắt cần có tên và URL",
22
+ "urlBadFormat": "URL đã nhập không đúng định dạng"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,19 @@
1
+ import type { ShowAlert } from '../../providers/AlertProvider/useAlert';
2
+ export declare const isValidUrl: (url: string) => boolean;
3
+ /** Returns the URL, prefixed with `https://` when it lacks a protocol, or `null` when it stays invalid */
4
+ export declare const makeValidUrl: (url: string) => string | null;
5
+ export declare const makeValidFileName: (fileName: string) => string;
6
+ export declare const makeHumanReadableFileName: (fileName: string) => string;
7
+ export type SaveShortcut = (fileName: string, url: string) => void | Promise<void>;
8
+ interface CheckAndSaveShortcutOptions {
9
+ fileName: string;
10
+ url: string;
11
+ isEditing: boolean;
12
+ onSave: SaveShortcut;
13
+ onClose: () => void;
14
+ showAlert: ShowAlert;
15
+ t: (key: string) => string;
16
+ }
17
+ /** Saves the shortcut once its name and URL are valid, and reports the outcome in an alert */
18
+ export declare const checkAndSaveShortcut: ({ fileName, url, isEditing, onSave, onClose, showAlert, t }: CheckAndSaveShortcutOptions) => Promise<void>;
19
+ export {};
@@ -0,0 +1,49 @@
1
+ const SHORTCUT_EXTENSION = '.url';
2
+ export const isValidUrl = (url) => {
3
+ try {
4
+ return Boolean(new URL(url));
5
+ }
6
+ catch {
7
+ return false;
8
+ }
9
+ };
10
+ /** Returns the URL, prefixed with `https://` when it lacks a protocol, or `null` when it stays invalid */
11
+ export const makeValidUrl = (url) => {
12
+ if (isValidUrl(url))
13
+ return url;
14
+ if (isValidUrl(`https://${url}`))
15
+ return `https://${url}`;
16
+ return null;
17
+ };
18
+ export const makeValidFileName = (fileName) => fileName.endsWith(SHORTCUT_EXTENSION)
19
+ ? fileName
20
+ : `${fileName}${SHORTCUT_EXTENSION}`;
21
+ export const makeHumanReadableFileName = (fileName) => fileName.endsWith(SHORTCUT_EXTENSION)
22
+ ? fileName.slice(0, -SHORTCUT_EXTENSION.length)
23
+ : fileName;
24
+ /** Saves the shortcut once its name and URL are valid, and reports the outcome in an alert */
25
+ export const checkAndSaveShortcut = async ({ fileName, url, isEditing, onSave, onClose, showAlert, t }) => {
26
+ if (!fileName || !url) {
27
+ showAlert({ message: t('Dialogs.shortcut.needsInfo'), severity: 'error' });
28
+ return;
29
+ }
30
+ const validUrl = makeValidUrl(url);
31
+ if (!validUrl) {
32
+ showAlert({
33
+ message: t('Dialogs.shortcut.urlBadFormat'),
34
+ severity: 'error'
35
+ });
36
+ return;
37
+ }
38
+ try {
39
+ await onSave(makeValidFileName(fileName), validUrl);
40
+ showAlert({
41
+ message: t(isEditing ? 'Dialogs.shortcut.edited' : 'Dialogs.shortcut.created'),
42
+ severity: 'success'
43
+ });
44
+ }
45
+ catch {
46
+ showAlert({ message: t('Dialogs.shortcut.errored'), severity: 'error' });
47
+ }
48
+ onClose();
49
+ };
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ export interface DialogSectionsProps {
3
+ title?: React.ReactNode;
4
+ content?: React.ReactNode;
5
+ actions?: React.ReactNode;
6
+ actionsLayout?: 'row' | 'column';
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,40 @@
1
+ import { DialogActionsProps, DialogContentProps, DialogTitleProps, DividerProps } from '@mui/material';
2
+ import React from 'react';
3
+ import type { DialogProps } from '../Dialog';
4
+ export type DialogCloseReason = 'backdropClick' | 'escapeKeyDown';
5
+ export interface DialogLayoutComponentsProps {
6
+ dialogTitle?: DialogTitleProps;
7
+ divider?: DividerProps;
8
+ dialogActions?: DialogActionsProps;
9
+ dialogContent?: DialogContentProps;
10
+ }
11
+ export interface DialogLayoutProps extends Omit<DialogProps, 'title' | 'content' | 'onClose'> {
12
+ /** Called without a reason when the close or back button is clicked */
13
+ onClose?: (event: object, reason?: DialogCloseReason) => void;
14
+ /** Shows a back button. On full screen, it replaces the close button */
15
+ onBack?: React.MouseEventHandler<HTMLButtonElement>;
16
+ align?: 'top' | 'middle';
17
+ /** Lets the title run under the close and back buttons */
18
+ disableTitleAutoPadding?: boolean;
19
+ /** Lets the title wrap and scroll with the content */
20
+ isFluidTitle?: boolean;
21
+ /** Removes the paddings around the content */
22
+ disableGutters?: boolean;
23
+ titleRef?: React.Ref<HTMLHeadingElement>;
24
+ /** CSS `background` of the dialog paper */
25
+ background?: string;
26
+ componentsProps?: DialogLayoutComponentsProps;
27
+ }
28
+ export interface DialogLayout {
29
+ id: string;
30
+ fullScreen: boolean;
31
+ dialogProps: DialogProps;
32
+ dialogTitleProps: DialogTitleProps & {
33
+ ref?: React.Ref<HTMLHeadingElement>;
34
+ };
35
+ dividerProps: DividerProps;
36
+ dialogActionsProps: DialogActionsProps;
37
+ dialogContentProps: DialogContentProps;
38
+ }
39
+ /** Computes the props of a dialog and of its parts, for dialogs laid out with a title, a content and actions */
40
+ export declare const useDialogLayout: ({ size, fullScreen: fullScreenProp, onClose, onBack, align, disableTitleAutoPadding, isFluidTitle, disableGutters, titleRef, background, componentsProps, classes, slots, slotProps, ...props }: DialogLayoutProps) => DialogLayout;
@@ -0,0 +1,63 @@
1
+ import { Grow } from '@mui/material';
2
+ import { mergeSlotProps } from '@mui/material/utils';
3
+ import cx from 'classnames';
4
+ import { useId } from 'react';
5
+ import SlideUpTransition from './SlideUpTransition';
6
+ import { useBreakpoints } from '../../hooks/useBreakpoints';
7
+ /** Computes the props of a dialog and of its parts, for dialogs laid out with a title, a content and actions */
8
+ export const useDialogLayout = ({ size = 'medium', fullScreen: fullScreenProp, onClose, onBack, align, disableTitleAutoPadding, isFluidTitle, disableGutters, titleRef, background, componentsProps, classes, slots, slotProps, ...props }) => {
9
+ const { isMobile } = useBreakpoints();
10
+ const id = useId();
11
+ const fullScreen = fullScreenProp ?? (size !== 'small' && isMobile);
12
+ const titleId = `modal-title-${id}`;
13
+ const hasCloseButton = !fullScreen && Boolean(onClose);
14
+ const hasBackButton = Boolean(onBack) || (fullScreen && Boolean(onClose));
15
+ return {
16
+ id,
17
+ fullScreen,
18
+ dialogProps: {
19
+ 'aria-labelledby': titleId,
20
+ ...props,
21
+ size,
22
+ fullScreen,
23
+ onClose,
24
+ classes: {
25
+ ...classes,
26
+ container: cx({ alignTop: align === 'top' }, classes?.container)
27
+ },
28
+ slots: {
29
+ transition: fullScreen ? SlideUpTransition : Grow,
30
+ ...slots
31
+ },
32
+ slotProps: {
33
+ ...slotProps,
34
+ paper: background
35
+ ? mergeSlotProps(slotProps?.paper, { sx: { background } })
36
+ : slotProps?.paper
37
+ }
38
+ },
39
+ dialogTitleProps: {
40
+ ...componentsProps?.dialogTitle,
41
+ id: titleId,
42
+ ref: titleRef,
43
+ className: cx({
44
+ 'u-ellipsis': !isFluidTitle,
45
+ dialogTitleFluid: isFluidTitle,
46
+ dialogTitleWithClose: hasCloseButton && !disableTitleAutoPadding,
47
+ dialogTitleWithBack: hasBackButton && !disableTitleAutoPadding
48
+ }, componentsProps?.dialogTitle?.className)
49
+ },
50
+ dividerProps: {
51
+ ...componentsProps?.divider,
52
+ className: cx('dialogDivider', componentsProps?.divider?.className)
53
+ },
54
+ dialogActionsProps: {
55
+ ...componentsProps?.dialogActions,
56
+ className: cx('dialogActions', componentsProps?.dialogActions?.className)
57
+ },
58
+ dialogContentProps: {
59
+ ...componentsProps?.dialogContent,
60
+ className: cx({ disableGutters }, componentsProps?.dialogContent?.className)
61
+ }
62
+ };
63
+ };
package/dist/index.d.ts CHANGED
@@ -41,7 +41,18 @@ export { default as BottomSheetHeader } from './components/BottomSheet/BottomShe
41
41
  export { default as BottomSheetTitle } from './components/BottomSheet/BottomSheetTitle';
42
42
  export { default as Chip } from './components/Chip';
43
43
  export { default as ColorList } from './components/ColorList';
44
- export { Dialog, default as DialogDefault } from './components/Dialog';
44
+ export { default as Dialog } from './components/Dialog';
45
+ export { default as StandardDialog } from './components/Dialogs/StandardDialog';
46
+ export { default as DialogCloseButton } from './components/Dialogs/DialogCloseButton';
47
+ export { default as DialogBackButton } from './components/Dialogs/DialogBackButton';
48
+ export { default as ConfirmDialog } from './components/Dialogs/ConfirmDialog';
49
+ export { default as FixedDialog } from './components/Dialogs/FixedDialog';
50
+ export { default as FixedActionsDialog } from './components/Dialogs/FixedActionsDialog';
51
+ export { default as IllustrationDialog } from './components/Dialogs/IllustrationDialog';
52
+ export { default as PermissionDialog } from './components/Dialogs/PermissionDialog';
53
+ export { default as InstallFlagshipAppDialog } from './components/Dialogs/InstallFlagshipAppDialog';
54
+ export { default as ShortcutDialog } from './components/Dialogs/ShortcutDialog';
55
+ export { useDialogLayout } from './components/Dialogs/useDialogLayout';
45
56
  export { default as ContactPopover } from './components/ContactPopover';
46
57
  export { default as DropdownButton } from './components/DropdownButton';
47
58
  export { default as DropdownText } from './components/DropdownText';
@@ -127,6 +138,18 @@ export type { OverlayBox, OverlayRegion } from './components/SpaceOverlay/region
127
138
  export type { OverlayFrameProps } from './components/SpaceOverlay/OverlayFrame';
128
139
  export type { ColorListProps, ColorListSize } from './components/ColorList';
129
140
  export type { DialogProps, DialogSize } from './components/Dialog';
141
+ export type { StandardDialogProps } from './components/Dialogs/StandardDialog';
142
+ export type { DialogSectionsProps } from './components/Dialogs/types';
143
+ export type { ShortcutDialogProps } from './components/Dialogs/ShortcutDialog';
144
+ export type { InstallFlagshipAppDialogProps } from './components/Dialogs/InstallFlagshipAppDialog';
145
+ export type { PermissionDialogProps } from './components/Dialogs/PermissionDialog';
146
+ export type { IllustrationDialogProps } from './components/Dialogs/IllustrationDialog';
147
+ export type { FixedActionsDialogProps } from './components/Dialogs/FixedActionsDialog';
148
+ export type { FixedDialogProps } from './components/Dialogs/FixedDialog';
149
+ export type { ConfirmDialogProps } from './components/Dialogs/ConfirmDialog';
150
+ export type { DialogCloseButtonProps } from './components/Dialogs/DialogCloseButton';
151
+ export type { DialogBackButtonProps } from './components/Dialogs/DialogBackButton';
152
+ export type { DialogCloseReason, DialogLayout, DialogLayoutComponentsProps, DialogLayoutProps } from './components/Dialogs/useDialogLayout';
130
153
  export type { PointerAlertProps, PointerAlertDirection } from './components/PointerAlert';
131
154
  export type { ProgressionBannerProps } from './components/ProgressionBanner';
132
155
  export type { EmptyProps, EmptyIconSize, EmptyComponentsProps } from './components/Empty';
package/dist/index.js CHANGED
@@ -44,7 +44,18 @@ export { default as BottomSheetHeader } from './components/BottomSheet/BottomShe
44
44
  export { default as BottomSheetTitle } from './components/BottomSheet/BottomSheetTitle';
45
45
  export { default as Chip } from './components/Chip';
46
46
  export { default as ColorList } from './components/ColorList';
47
- export { Dialog, default as DialogDefault } from './components/Dialog';
47
+ export { default as Dialog } from './components/Dialog';
48
+ export { default as StandardDialog } from './components/Dialogs/StandardDialog';
49
+ export { default as DialogCloseButton } from './components/Dialogs/DialogCloseButton';
50
+ export { default as DialogBackButton } from './components/Dialogs/DialogBackButton';
51
+ export { default as ConfirmDialog } from './components/Dialogs/ConfirmDialog';
52
+ export { default as FixedDialog } from './components/Dialogs/FixedDialog';
53
+ export { default as FixedActionsDialog } from './components/Dialogs/FixedActionsDialog';
54
+ export { default as IllustrationDialog } from './components/Dialogs/IllustrationDialog';
55
+ export { default as PermissionDialog } from './components/Dialogs/PermissionDialog';
56
+ export { default as InstallFlagshipAppDialog } from './components/Dialogs/InstallFlagshipAppDialog';
57
+ export { default as ShortcutDialog } from './components/Dialogs/ShortcutDialog';
58
+ export { useDialogLayout } from './components/Dialogs/useDialogLayout';
48
59
  export { default as ContactPopover } from './components/ContactPopover';
49
60
  export { default as DropdownButton } from './components/DropdownButton';
50
61
  export { default as DropdownText } from './components/DropdownText';
@@ -430,15 +430,20 @@ export const overrides = {
430
430
  padding: '0 8px 8px',
431
431
  height: 'auto',
432
432
  maxHeight: 'calc(100% - 32px)',
433
- borderRadius: 6
433
+ borderRadius: 6,
434
+ '& .dialogDivider': { marginLeft: -8, marginRight: -8 }
434
435
  }
435
436
  },
436
437
  '&.medium': { maxWidth: 544 },
437
438
  '&.large': { maxWidth: 800 },
438
439
  '&.full': { maxWidth: '100%' }
439
440
  }),
441
+ container: {
442
+ '&.alignTop': { alignItems: 'start' }
443
+ },
440
444
  paperFullScreen: {
441
- '&.small, &.medium, &.large': { maxWidth: '100%' }
445
+ '&.small, &.medium, &.large': { maxWidth: '100%' },
446
+ '& .dialogActions': { paddingBottom: 'env(safe-area-inset-bottom)' }
442
447
  }
443
448
  }
444
449
  },
@@ -461,7 +466,8 @@ export const overrides = {
461
466
  '&.dialogTitleWithClose': {
462
467
  paddingRight: '4rem',
463
468
  [theme.breakpoints.down('md')]: { paddingRight: '3rem' }
464
- }
469
+ },
470
+ '&.dialogTitleFluid': { paddingTop: 0 }
465
471
  })
466
472
  }
467
473
  },
@@ -471,7 +477,41 @@ export const overrides = {
471
477
  padding: '24px 32px 0',
472
478
  [theme.breakpoints.down('md')]: { padding: '24px 16px 0' },
473
479
  // MUI drops the top padding after a title, cozy-ui keeps it
474
- [`.${dialogTitleClasses.root} + &`]: { paddingTop: 24 }
480
+ [`.${dialogTitleClasses.root} + &`]: { paddingTop: 24 },
481
+ '&.disableGutters': {
482
+ padding: 0,
483
+ '& .dialogContentInner': { marginBottom: 0 },
484
+ '& .dialogTitleFluidContainer': { margin: 0 }
485
+ },
486
+ '& .dialogContentInner': {
487
+ marginBottom: 24,
488
+ '&.withFluidActions': {
489
+ [theme.breakpoints.down('md')]: {
490
+ marginBottom: 0,
491
+ display: 'flex',
492
+ flexDirection: 'column',
493
+ height: '100%',
494
+ '& .dialogContentWrapper': {
495
+ flexGrow: 1,
496
+ '&:not(.withActions)': {
497
+ paddingBottom: 'calc(env(safe-area-inset-bottom) + 16px)'
498
+ }
499
+ },
500
+ '& .dialogActions': {
501
+ paddingBottom: 'calc(env(safe-area-inset-bottom) + 16px)'
502
+ }
503
+ }
504
+ },
505
+ '& .dialogTitleFluidContainer': {
506
+ marginLeft: '-2rem',
507
+ marginRight: '-2rem',
508
+ [theme.breakpoints.down('md')]: {
509
+ marginLeft: '-1rem',
510
+ marginRight: '-1rem',
511
+ marginTop: '-0.75rem'
512
+ }
513
+ }
514
+ }
475
515
  })
476
516
  }
477
517
  },
@@ -484,7 +524,16 @@ export const overrides = {
484
524
  margin: '8px 16px',
485
525
  '& button': { flexGrow: 1 }
486
526
  },
487
- '& > :not(style) ~ :not(style)': { marginLeft: 4 }
527
+ '& > :not(style) ~ :not(style)': { marginLeft: 4 },
528
+ '&.dialogActionsFluid': { margin: '24px 0 0' },
529
+ '&.columnLayout': {
530
+ flexDirection: 'column-reverse',
531
+ '& button': {
532
+ width: '100%',
533
+ margin: 0,
534
+ '&:not(:first-child)': { marginBottom: 8 }
535
+ }
536
+ }
488
537
  })
489
538
  }
490
539
  },
@@ -495,7 +544,7 @@ export const overrides = {
495
544
  variants: [
496
545
  {
497
546
  props: { variant: 'inset' },
498
- style: { marginLeft: 64 }
547
+ style: { marginLeft: 64, '&.dialogDivider': { marginLeft: 80 } }
499
548
  },
500
549
  {
501
550
  props: ({ ownerState }) => !!ownerState.children &&
@@ -651,6 +700,22 @@ export const overrides = {
651
700
  defaultProps: { size: 'large' },
652
701
  styleOverrides: {
653
702
  root: ({ theme }) => ({
703
+ '&.dialogIconButton': {
704
+ position: 'absolute',
705
+ top: '1.15rem',
706
+ zIndex: 1,
707
+ backgroundColor: theme.vars.palette.background.paper,
708
+ '&:hover': { backgroundColor: theme.vars.palette.action.selected },
709
+ [theme.breakpoints.down('md')]: { top: '0.25rem' }
710
+ },
711
+ '&.dialogCloseButton': {
712
+ right: '1.15rem',
713
+ [theme.breakpoints.down('md')]: { right: '0.25rem' }
714
+ },
715
+ '&.dialogBackButton': {
716
+ left: '1.15rem',
717
+ [theme.breakpoints.down('md')]: { left: '0.25rem' }
718
+ },
654
719
  variants: [
655
720
  {
656
721
  props: { color: 'default' },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linagora/twake-mui",
3
3
  "type": "module",
4
- "version": "15.2.0",
4
+ "version": "16.0.1",
5
5
  "description": "MUI v9 theme system for Twake applications",
6
6
  "author": "Twake",
7
7
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "scripts": {
40
- "build": "tsc",
40
+ "build": "tsc && node scripts/copyAssets.mjs",
41
41
  "build:doc": "storybook build --output-dir storybook-static",
42
42
  "start": "tsc --watch",
43
43
  "test": "vitest run --project unit",