@pega/cosmos-react-core 10.0.0-build.9.7 → 10.0.0-build.9.8

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 (79) hide show
  1. package/lib/components/AIRewrite/AIRewrite.styles.d.ts +32 -12
  2. package/lib/components/AIRewrite/AIRewrite.styles.d.ts.map +1 -1
  3. package/lib/components/AIRewrite/AIRewrite.styles.js +5 -2
  4. package/lib/components/AIRewrite/AIRewrite.styles.js.map +1 -1
  5. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  6. package/lib/components/AppShell/AppHeader.js +3 -2
  7. package/lib/components/AppShell/AppHeader.js.map +1 -1
  8. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  9. package/lib/components/AppShell/AppShell.js +17 -7
  10. package/lib/components/AppShell/AppShell.js.map +1 -1
  11. package/lib/components/AppShell/AppShell.types.d.ts +23 -2
  12. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  14. package/lib/components/AppShell/AppShellList.styles.d.ts +1 -1
  15. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
  16. package/lib/components/AppShell/AppShellList.styles.js +63 -23
  17. package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
  18. package/lib/components/AppShell/Notifications.d.ts +28 -0
  19. package/lib/components/AppShell/Notifications.d.ts.map +1 -0
  20. package/lib/components/AppShell/Notifications.js +145 -0
  21. package/lib/components/AppShell/Notifications.js.map +1 -0
  22. package/lib/components/AppShell/TouchAppShell.d.ts +1 -1
  23. package/lib/components/AppShell/TouchAppShell.d.ts.map +1 -1
  24. package/lib/components/AppShell/TouchAppShell.js +4 -3
  25. package/lib/components/AppShell/TouchAppShell.js.map +1 -1
  26. package/lib/components/AppShell/TouchAppShell.styles.d.ts +4 -2
  27. package/lib/components/AppShell/TouchAppShell.styles.d.ts.map +1 -1
  28. package/lib/components/AppShell/index.d.ts +1 -1
  29. package/lib/components/AppShell/index.d.ts.map +1 -1
  30. package/lib/components/AppShell/index.js.map +1 -1
  31. package/lib/components/Dialog/Dialog.types.d.ts +42 -12
  32. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  33. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  34. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  35. package/lib/components/Dialog/FormDialog.js +29 -33
  36. package/lib/components/Dialog/FormDialog.js.map +1 -1
  37. package/lib/components/Dialog/FormDialogWrapper.d.ts +5 -0
  38. package/lib/components/Dialog/FormDialogWrapper.d.ts.map +1 -0
  39. package/lib/components/Dialog/FormDialogWrapper.js +13 -0
  40. package/lib/components/Dialog/FormDialogWrapper.js.map +1 -0
  41. package/lib/components/Dialog/TouchDialog.d.ts.map +1 -1
  42. package/lib/components/Dialog/TouchDialog.js +6 -6
  43. package/lib/components/Dialog/TouchDialog.js.map +1 -1
  44. package/lib/components/Dialog/TouchDialog.styles.d.ts +2 -2
  45. package/lib/components/Dialog/TouchDialog.styles.d.ts.map +1 -1
  46. package/lib/components/Dialog/TouchDialog.styles.js +31 -30
  47. package/lib/components/Dialog/TouchDialog.styles.js.map +1 -1
  48. package/lib/components/Dialog/TouchDialog.types.d.ts +9 -4
  49. package/lib/components/Dialog/TouchDialog.types.d.ts.map +1 -1
  50. package/lib/components/Dialog/TouchDialog.types.js.map +1 -1
  51. package/lib/components/Dialog/TouchFormDialog.d.ts +5 -0
  52. package/lib/components/Dialog/TouchFormDialog.d.ts.map +1 -0
  53. package/lib/components/Dialog/TouchFormDialog.js +53 -0
  54. package/lib/components/Dialog/TouchFormDialog.js.map +1 -0
  55. package/lib/components/Dialog/TouchFormDialog.styles.d.ts +7 -0
  56. package/lib/components/Dialog/TouchFormDialog.styles.d.ts.map +1 -0
  57. package/lib/components/Dialog/TouchFormDialog.styles.js +39 -0
  58. package/lib/components/Dialog/TouchFormDialog.styles.js.map +1 -0
  59. package/lib/components/Dialog/index.d.ts +2 -1
  60. package/lib/components/Dialog/index.d.ts.map +1 -1
  61. package/lib/components/Dialog/index.js +2 -1
  62. package/lib/components/Dialog/index.js.map +1 -1
  63. package/lib/components/InlineEdit/InlineEdit.styles.d.ts +32 -12
  64. package/lib/components/InlineEdit/InlineEdit.styles.d.ts.map +1 -1
  65. package/lib/components/ListToolbar/ListToolbar.styles.d.ts +32 -12
  66. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  67. package/lib/components/ListToolbar/ListToolbar.styles.js +9 -6
  68. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  69. package/lib/components/Modal/DockedModals.js +1 -1
  70. package/lib/components/Modal/DockedModals.js.map +1 -1
  71. package/lib/hooks/useI18n.d.ts +1 -0
  72. package/lib/hooks/useI18n.d.ts.map +1 -1
  73. package/lib/i18n/default.d.ts +1 -0
  74. package/lib/i18n/default.d.ts.map +1 -1
  75. package/lib/i18n/default.js +1 -0
  76. package/lib/i18n/default.js.map +1 -1
  77. package/lib/i18n/i18n.d.ts +1 -0
  78. package/lib/i18n/i18n.d.ts.map +1 -1
  79. package/package.json +1 -1
@@ -5,7 +5,7 @@ import Backdrop from '../Backdrop';
5
5
  import Drawer from '../Drawer';
6
6
  import { ExpandCollapseButton } from '../ExpandCollapse';
7
7
  import { StyledIcon } from '../Icon';
8
- import { StyledChildrenWrap } from './Dialog.styles';
8
+ import { StyledChildrenWrap, StyledDialogFooter } from './Dialog.styles';
9
9
  export const StyledExpandCollapse = styled(ExpandCollapseButton) `
10
10
  position: absolute;
11
11
  inset-block-start: 0;
@@ -16,6 +16,30 @@ export const StyledExpandCollapse = styled(ExpandCollapseButton) `
16
16
  }
17
17
  `;
18
18
  StyledExpandCollapse.defaultProps = defaultThemeProp;
19
+ export const StyledTouchDialogHeader = styled.div(({ theme: { base } }) => css `
20
+ padding-inline: ${base.spacing};
21
+ padding-block-start: ${base.spacing};
22
+
23
+ ${StyledButton} {
24
+ margin-inline-start: auto;
25
+ }
26
+ `);
27
+ StyledTouchDialogHeader.defaultProps = defaultThemeProp;
28
+ export const StyledTouchDialogContent = styled.div(({ theme: { base } }) => css `
29
+ min-height: 0;
30
+ overflow: auto;
31
+ height: 100%;
32
+ position: relative;
33
+ padding-block: calc(${base.spacing} * 0.5);
34
+
35
+ ${StyledChildrenWrap} {
36
+ height: 100%;
37
+ display: flex;
38
+ flex-direction: column;
39
+ padding-inline: ${base.spacing};
40
+ }
41
+ `);
42
+ StyledTouchDialogContent.defaultProps = defaultThemeProp;
19
43
  export const StyledTouchDialog = styled(Drawer)(({ theme: { base, components } }) => css `
20
44
  display: flex;
21
45
  flex-direction: column;
@@ -39,6 +63,12 @@ export const StyledTouchDialog = styled(Drawer)(({ theme: { base, components } }
39
63
  &:has(${StyledExpandCollapse}) {
40
64
  padding-block-start: ${base['hit-area'].compact};
41
65
  }
66
+
67
+ ${StyledTouchDialogContent}[hidden],
68
+ ${StyledChildrenWrap}[hidden],
69
+ ${StyledDialogFooter}[hidden] {
70
+ display: none;
71
+ }
42
72
  `);
43
73
  StyledTouchDialog.defaultProps = defaultThemeProp;
44
74
  export const StyledTouchDialogBackdrop = styled(Backdrop)(({ $compact }) => $compact &&
@@ -46,33 +76,4 @@ export const StyledTouchDialogBackdrop = styled(Backdrop)(({ $compact }) => $com
46
76
  inset-block-start: calc(100dvh - var(--appshell-bottom-panel-offset, 0));
47
77
  `);
48
78
  StyledTouchDialogBackdrop.defaultProps = defaultThemeProp;
49
- export const StyledTouchDialogHeader = styled.div(({ theme: { base } }) => css `
50
- padding-inline: ${base.spacing};
51
- padding-block-start: ${base.spacing};
52
-
53
- ${StyledButton} {
54
- margin-inline-start: auto;
55
- }
56
- `);
57
- StyledTouchDialogHeader.defaultProps = defaultThemeProp;
58
- export const StyledTouchDialogContent = styled.div(({ theme: { base } }) => css `
59
- min-height: 0;
60
- overflow: auto;
61
- height: 100%;
62
- position: relative;
63
- padding-block-start: calc(${base.spacing} * 0.5);
64
-
65
- &[hidden],
66
- ${StyledChildrenWrap}[hidden] {
67
- display: none;
68
- }
69
-
70
- ${StyledChildrenWrap} {
71
- height: 100%;
72
- display: flex;
73
- flex-direction: column;
74
- padding-inline: ${base.spacing};
75
- }
76
- `);
77
- StyledTouchDialogContent.defaultProps = defaultThemeProp;
78
79
  //# sourceMappingURL=TouchDialog.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TouchDialog.styles.js","sourceRoot":"","sources":["../../../src/components/Dialog/TouchDialog.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAA;;;;;6BAKnC,UAAU;;;CAGtC,CAAC;AAEF,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAErD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,CAC7C,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;kBAGxB,UAAU,CAAC,OAAO,CAAC,UAAU;4BACnB,IAAI,CAAC,OAAO;yBACf,IAAI,CAAC,OAAO;;;QAG7B,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,MAAM,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC;;qBAEjE,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC;;;;;;;;;;YAUzC,oBAAoB;6BACH,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO;;GAElD,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,QAAQ,CAAC,CACvD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACf,QAAQ;IACR,GAAG,CAAA;;KAEF,CACJ,CAAC;AAEF,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAC/C,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;sBACR,IAAI,CAAC,OAAO;2BACP,IAAI,CAAC,OAAO;;MAEjC,YAAY;;;GAGf,CACF,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAChD,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;;;gCAKE,IAAI,CAAC,OAAO;;;MAGtC,kBAAkB;;;;MAIlB,kBAAkB;;;;wBAIA,IAAI,CAAC,OAAO;;GAEjC,CACF,CAAC;AAEF,wBAAwB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledButton } from '../Button';\nimport Backdrop from '../Backdrop';\nimport Drawer from '../Drawer';\nimport { ExpandCollapseButton } from '../ExpandCollapse';\nimport { StyledIcon } from '../Icon';\n\nimport { StyledChildrenWrap } from './Dialog.styles';\n\nexport const StyledExpandCollapse = styled(ExpandCollapseButton)`\n position: absolute;\n inset-block-start: 0;\n width: 100%;\n\n &[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(-90deg);\n }\n`;\n\nStyledExpandCollapse.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialog = styled(Drawer)(\n ({ theme: { base, components } }) => css`\n display: flex;\n flex-direction: column;\n background: ${components.popover.background};\n inset-block-end: calc(${base.spacing} * 0.5);\n inset-inline: calc(${base.spacing} * 0.5);\n max-height: 90dvh;\n --touch-dialog-compact-height: calc(\n ${base['hit-area'].compact} + ${base.spacing} + ${base['hit-area']['finger-min']}\n );\n border-radius: ${components.card['border-radius']};\n width: auto;\n overflow: hidden;\n transition-property: transform, box-shadow, opacity, height;\n\n @media (height < 31.25rem) {\n overflow-y: auto;\n display: block;\n }\n\n &:has(${StyledExpandCollapse}) {\n padding-block-start: ${base['hit-area'].compact};\n }\n `\n);\n\nStyledTouchDialog.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialogBackdrop = styled(Backdrop)<{ $compact?: boolean }>(\n ({ $compact }) =>\n $compact &&\n css`\n inset-block-start: calc(100dvh - var(--appshell-bottom-panel-offset, 0));\n `\n);\n\nStyledTouchDialogBackdrop.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialogHeader = styled.div(\n ({ theme: { base } }) => css`\n padding-inline: ${base.spacing};\n padding-block-start: ${base.spacing};\n\n ${StyledButton} {\n margin-inline-start: auto;\n }\n `\n);\n\nStyledTouchDialogHeader.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialogContent = styled.div(\n ({ theme: { base } }) => css`\n min-height: 0;\n overflow: auto;\n height: 100%;\n position: relative;\n padding-block-start: calc(${base.spacing} * 0.5);\n\n &[hidden],\n ${StyledChildrenWrap}[hidden] {\n display: none;\n }\n\n ${StyledChildrenWrap} {\n height: 100%;\n display: flex;\n flex-direction: column;\n padding-inline: ${base.spacing};\n }\n `\n);\n\nStyledTouchDialogContent.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"TouchDialog.styles.js","sourceRoot":"","sources":["../../../src/components/Dialog/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K,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;kBAGxB,UAAU,CAAC,OAAO,CAAC,UAAU;4BACnB,IAAI,CAAC,OAAO;yBACf,IAAI,CAAC,OAAO;;;QAG7B,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,MAAM,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC;;qBAEjE,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC;;;;;;;;;;YAUzC,oBAAoB;6BACH,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO;;;MAG/C,wBAAwB;MACxB,kBAAkB;MAClB,kBAAkB;;;GAGrB,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,QAAQ,CAAC,CACvD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACf,QAAQ;IACR,GAAG,CAAA;;KAEF,CACJ,CAAC;AAEF,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledButton } from '../Button';\nimport Backdrop from '../Backdrop';\nimport Drawer from '../Drawer';\nimport { ExpandCollapseButton } from '../ExpandCollapse';\nimport { StyledIcon } from '../Icon';\n\nimport { StyledChildrenWrap, StyledDialogFooter } from './Dialog.styles';\n\nexport const StyledExpandCollapse = styled(ExpandCollapseButton)`\n position: absolute;\n inset-block-start: 0;\n width: 100%;\n\n &[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(-90deg);\n }\n`;\n\nStyledExpandCollapse.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialogHeader = styled.div(\n ({ theme: { base } }) => css`\n padding-inline: ${base.spacing};\n padding-block-start: ${base.spacing};\n\n ${StyledButton} {\n margin-inline-start: auto;\n }\n `\n);\n\nStyledTouchDialogHeader.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialogContent = styled.div(\n ({ theme: { base } }) => css`\n min-height: 0;\n overflow: auto;\n height: 100%;\n position: relative;\n padding-block: calc(${base.spacing} * 0.5);\n\n ${StyledChildrenWrap} {\n height: 100%;\n display: flex;\n flex-direction: column;\n padding-inline: ${base.spacing};\n }\n `\n);\n\nStyledTouchDialogContent.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialog = styled(Drawer)(\n ({ theme: { base, components } }) => css`\n display: flex;\n flex-direction: column;\n background: ${components.popover.background};\n inset-block-end: calc(${base.spacing} * 0.5);\n inset-inline: calc(${base.spacing} * 0.5);\n max-height: 90dvh;\n --touch-dialog-compact-height: calc(\n ${base['hit-area'].compact} + ${base.spacing} + ${base['hit-area']['finger-min']}\n );\n border-radius: ${components.card['border-radius']};\n width: auto;\n overflow: hidden;\n transition-property: transform, box-shadow, opacity, height;\n\n @media (height < 31.25rem) {\n overflow-y: auto;\n display: block;\n }\n\n &:has(${StyledExpandCollapse}) {\n padding-block-start: ${base['hit-area'].compact};\n }\n\n ${StyledTouchDialogContent}[hidden],\n ${StyledChildrenWrap}[hidden],\n ${StyledDialogFooter}[hidden] {\n display: none;\n }\n `\n);\n\nStyledTouchDialog.defaultProps = defaultThemeProp;\n\nexport const StyledTouchDialogBackdrop = styled(Backdrop)<{ $compact?: boolean }>(\n ({ $compact }) =>\n $compact &&\n css`\n inset-block-start: calc(100dvh - var(--appshell-bottom-panel-offset, 0));\n `\n);\n\nStyledTouchDialogBackdrop.defaultProps = defaultThemeProp;\n"]}
@@ -1,8 +1,8 @@
1
1
  import type { Ref, ReactNode } from 'react';
2
- import type { BaseProps, TestIdProp } from '../../types';
2
+ import type { BaseProps, RequireAtLeastOne, TestIdProp } from '../../types';
3
3
  import type { DrawerProps } from '../Drawer';
4
4
  import type { ProgressProps } from '../Progress';
5
- export interface TouchDialogProps extends BaseProps, TestIdProp {
5
+ export interface TouchDialogPropsBase extends BaseProps, TestIdProp {
6
6
  /**
7
7
  * Whether the TouchDialog should be open or closed.
8
8
  * The component should not be unmounted before onAfterClose is called,
@@ -11,15 +11,19 @@ export interface TouchDialogProps extends BaseProps, TestIdProp {
11
11
  open: DrawerProps['open'];
12
12
  /**
13
13
  * Callback fired when the TouchDialog is dismissed with user intent.
14
- * The parent component should toggle the `open` prop.
14
+ * Drives the visibility of the close button in the header.
15
+ * When not passed, the parent component should handle dismiss by way of `onBeforeClose` callback.
16
+ * The parent component should toggle the `open` prop in the callback.
15
17
  */
16
- onDismiss: () => void;
18
+ onDismiss?: () => void;
17
19
  /** Heading text displayed at the top of the drawer. */
18
20
  heading?: ReactNode;
19
21
  /** Aria label for the dialog, used when there is no heading. */
20
22
  'aria-label'?: string;
21
23
  /** Content of the TouchDialog. */
22
24
  children?: DrawerProps['children'];
25
+ /** Non-scrollable footer content displayed at the bottom of the TouchDialog. */
26
+ footer?: ReactNode;
23
27
  /** If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well. */
24
28
  progress?: boolean | ProgressProps['message'];
25
29
  /**
@@ -49,4 +53,5 @@ export interface TouchDialogProps extends BaseProps, TestIdProp {
49
53
  /** Ref for the dialog panel element. */
50
54
  ref?: Ref<HTMLDivElement>;
51
55
  }
56
+ export type TouchDialogProps = RequireAtLeastOne<TouchDialogPropsBase, 'onDismiss' | 'onBeforeClose'>;
52
57
  //# sourceMappingURL=TouchDialog.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TouchDialog.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/TouchDialog.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAA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dialog/TouchDialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref, ReactNode } from 'react';\n\nimport type { BaseProps, TestIdProp } from '../../types';\nimport type { DrawerProps } from '../Drawer';\nimport type { ProgressProps } from '../Progress';\n\nexport interface TouchDialogProps extends BaseProps, TestIdProp {\n /**\n * Whether the TouchDialog should be open or closed.\n * The component should not be unmounted before onAfterClose is called,\n * otherwise the closing animation will be interrupted.\n */\n open: DrawerProps['open'];\n /**\n * Callback fired when the TouchDialog is dismissed with user intent.\n * The parent component should toggle the `open` prop.\n */\n onDismiss: () => void;\n /** Heading text displayed at the top of the drawer. */\n heading?: ReactNode;\n /** Aria label for the dialog, used when there is no heading. */\n 'aria-label'?: string;\n /** Content of the TouchDialog. */\n children?: DrawerProps['children'];\n /** If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well. */\n progress?: boolean | ProgressProps['message'];\n /**\n * The initial height of the TouchDialog panel.\n * - `'auto'` — height is driven by content (capped at 90% of the viewport), without an expand control.\n * - `'full-compact'` — initially opens to full height, with the option to collapse to a compact header.\n * - `'half'` — half the viewport height.\n * - `'full'` — opens to the maximum height (90% of the viewport).\n * @default 'half'\n */\n size?: 'auto' | 'full-compact' | 'half' | 'full';\n /** Callback fired before the TouchDialog starts opening. */\n onBeforeOpen?: DrawerProps['onBeforeOpen'];\n /** Callback fired after the TouchDialog finishes opening. */\n onAfterOpen?: DrawerProps['onAfterOpen'];\n /** Callback fired before the TouchDialog starts closing. */\n onBeforeClose?: DrawerProps['onBeforeClose'];\n /** Callback fired after the TouchDialog finishes closing. */\n onAfterClose?: DrawerProps['onAfterClose'];\n /**\n * Action performed when a click occurs outside the dialog.\n * - `'close'` — dismisses the dialog.\n * - `'reset-size'` — resets to `compact` for `full-compact`, otherwise to the configured size.\n * @default 'close'\n */\n outerClickAction?: 'close' | 'reset-size';\n /** Ref for the dialog panel element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"TouchDialog.types.js","sourceRoot":"","sources":["../../../src/components/Dialog/TouchDialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref, ReactNode } from 'react';\n\nimport type { BaseProps, RequireAtLeastOne, TestIdProp } from '../../types';\nimport type { DrawerProps } from '../Drawer';\nimport type { ProgressProps } from '../Progress';\n\nexport interface TouchDialogPropsBase extends BaseProps, TestIdProp {\n /**\n * Whether the TouchDialog should be open or closed.\n * The component should not be unmounted before onAfterClose is called,\n * otherwise the closing animation will be interrupted.\n */\n open: DrawerProps['open'];\n /**\n * Callback fired when the TouchDialog is dismissed with user intent.\n * Drives the visibility of the close button in the header.\n * When not passed, the parent component should handle dismiss by way of `onBeforeClose` callback.\n * The parent component should toggle the `open` prop in the callback.\n */\n onDismiss?: () => void;\n /** Heading text displayed at the top of the drawer. */\n heading?: ReactNode;\n /** Aria label for the dialog, used when there is no heading. */\n 'aria-label'?: string;\n /** Content of the TouchDialog. */\n children?: DrawerProps['children'];\n /** Non-scrollable footer content displayed at the bottom of the TouchDialog. */\n footer?: ReactNode;\n /** If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well. */\n progress?: boolean | ProgressProps['message'];\n /**\n * The initial height of the TouchDialog panel.\n * - `'auto'` — height is driven by content (capped at 90% of the viewport), without an expand control.\n * - `'full-compact'` — initially opens to full height, with the option to collapse to a compact header.\n * - `'half'` — half the viewport height.\n * - `'full'` — opens to the maximum height (90% of the viewport).\n * @default 'half'\n */\n size?: 'auto' | 'full-compact' | 'half' | 'full';\n /** Callback fired before the TouchDialog starts opening. */\n onBeforeOpen?: DrawerProps['onBeforeOpen'];\n /** Callback fired after the TouchDialog finishes opening. */\n onAfterOpen?: DrawerProps['onAfterOpen'];\n /** Callback fired before the TouchDialog starts closing. */\n onBeforeClose?: DrawerProps['onBeforeClose'];\n /** Callback fired after the TouchDialog finishes closing. */\n onAfterClose?: DrawerProps['onAfterClose'];\n /**\n * Action performed when a click occurs outside the dialog.\n * - `'close'` — dismisses the dialog.\n * - `'reset-size'` — resets to `compact` for `full-compact`, otherwise to the configured size.\n * @default 'close'\n */\n outerClickAction?: 'close' | 'reset-size';\n /** Ref for the dialog panel element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport type TouchDialogProps = RequireAtLeastOne<\n TouchDialogPropsBase,\n 'onDismiss' | 'onBeforeClose'\n>;\n"]}
@@ -0,0 +1,5 @@
1
+ import type { PropsWithoutRef } from 'react';
2
+ import type { FormDialogProps } from './Dialog.types';
3
+ declare const TouchFormDialog: import("react").ForwardRefExoticComponent<PropsWithoutRef<FormDialogProps> & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default TouchFormDialog;
5
+ //# sourceMappingURL=TouchFormDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchFormDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/TouchFormDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAU7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AActD,QAAA,MAAM,eAAe,6HA2HpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useLayoutEffect, useRef } from 'react';
3
+ import { useConsolidatedRef, useContentTabIndex, useI18n, useUID } from '../../hooks';
4
+ import AdditionalInfo from '../AdditionalInfo';
5
+ import Button from '../Button';
6
+ import Flex from '../Flex';
7
+ import Text from '../Text';
8
+ import { isInstance, getActiveElement } from '../../utils';
9
+ import { StyledChildrenWrap } from './Dialog.styles';
10
+ import { StyledTouchFormDialog, StyledTouchFormDialogContent } from './TouchFormDialog.styles';
11
+ const getTouchProps = ({ arrow, compact, portal, strategy, placement, focusTrap, ...touchProps }) => touchProps;
12
+ const TouchFormDialog = forwardRef(function TouchFormDialog(props, ref) {
13
+ const { heading, 'aria-label': ariaLabel, children, progress, onDismiss, onCancel = () => true, onSubmit, onAfterClose, additionalInfo, ...restProps } = getTouchProps(props);
14
+ const t = useI18n();
15
+ const [open, setOpen] = useState(true);
16
+ const headerId = useUID();
17
+ const dialogRef = useConsolidatedRef(ref);
18
+ const dialogContentRef = useRef(null);
19
+ const contentTabIndex = useContentTabIndex(dialogRef, dialogContentRef, [], [progress]);
20
+ const onCancelHandler = typeof onCancel === 'function' ? onCancel : onCancel.handler;
21
+ const onSubmitHandler = typeof onSubmit === 'function' ? onSubmit : onSubmit.handler;
22
+ const cancelLabel = typeof onCancel !== 'function' && onCancel.text ? onCancel.text : t('cancel');
23
+ const submitLabel = typeof onSubmit !== 'function' && onSubmit.text ? onSubmit.text : t('submit');
24
+ // Using layout effect to capture the focused element prior to dialog elements taking focus.
25
+ useLayoutEffect(() => {
26
+ const initiatorElement = getActiveElement();
27
+ return () => {
28
+ if (isInstance(initiatorElement, HTMLElement) &&
29
+ initiatorElement.isConnected &&
30
+ // Restore focus only when it wasn't returned before.
31
+ dialogRef.current?.contains(getActiveElement())) {
32
+ initiatorElement.focus();
33
+ }
34
+ };
35
+ }, []);
36
+ return (_jsx(StyledTouchFormDialog, { ...restProps, ref: dialogRef, open: open, onBeforeClose: () => {
37
+ setOpen(false);
38
+ }, onAfterClose: onAfterClose, onDismiss: () => {
39
+ (onDismiss || onCancelHandler)?.();
40
+ }, heading: heading && (_jsxs(_Fragment, { children: [_jsx(Text, { variant: 'h2', id: headerId, children: heading }), additionalInfo?.heading && (_jsx(AdditionalInfo, { heading: additionalInfo.heading, children: additionalInfo.children }))] })), footer: _jsxs(_Fragment, { children: [_jsx(Button, { disabled: typeof onCancel !== 'function' ? onCancel.disabled : undefined, onClick: async () => {
41
+ const returnValue = await onCancelHandler();
42
+ if (returnValue === true) {
43
+ setOpen(false);
44
+ }
45
+ }, children: cancelLabel }), _jsx(Button, { variant: 'primary', disabled: typeof onSubmit !== 'function' ? onSubmit.disabled : undefined, onClick: async () => {
46
+ const returnValue = await onSubmitHandler();
47
+ if (returnValue === true) {
48
+ setOpen(false);
49
+ }
50
+ }, children: submitLabel })] }), "aria-label": ariaLabel, "aria-labelledby": heading && headerId, progress: progress, children: _jsx(Flex, { container: { direction: 'column', pad: [0, 0.5] }, item: { grow: 1 }, as: StyledTouchFormDialogContent, children: children && (_jsx(StyledChildrenWrap, { ref: dialogContentRef, tabIndex: contentTabIndex, inert: progress ? '' : undefined, children: children })) }) }));
51
+ });
52
+ export default TouchFormDialog;
53
+ //# sourceMappingURL=TouchFormDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchFormDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/TouchFormDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAE/F,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,GAAG,UAAU,EACG,EAAE,EAAE,CAAC,UAAU,CAAC;AAElC,MAAM,eAAe,GAAG,UAAU,CAChC,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG;IACjC,MAAM,EACJ,OAAO,EACP,YAAY,EAAE,SAAS,EACv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AQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EACxE,OAAO,EAAE,KAAK,IAAI,EAAE;wBAClB,MAAM,WAAW,GAAG,MAAM,eAAe,EAAE,CAAC;wBAE5C,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;4BACzB,OAAO,CAAC,KAAK,CAAC,CAAC;wBACjB,CAAC;oBACH,CAAC,YAEA,WAAW,GACL,IACR,gBAEO,SAAS,qBACJ,OAAO,IAAI,QAAQ,EACpC,QAAQ,EAAE,QAAQ,YAElB,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EACjD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EACjB,EAAE,EAAE,4BAA4B,YAE/B,QAAQ,IAAI,CACX,KAAC,kBAAkB,IACjB,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAE/B,QAAQ,GACU,CACtB,GACI,GACe,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, useState, useLayoutEffect, useRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport { useConsolidatedRef, useContentTabIndex, useI18n, useUID } from '../../hooks';\nimport type { RefElement } from '../../types';\nimport AdditionalInfo from '../AdditionalInfo';\nimport Button from '../Button';\nimport Flex from '../Flex';\nimport Text from '../Text';\nimport { isInstance, getActiveElement } from '../../utils';\n\nimport type { FormDialogProps } from './Dialog.types';\nimport { StyledChildrenWrap } from './Dialog.styles';\nimport { StyledTouchFormDialog, StyledTouchFormDialogContent } from './TouchFormDialog.styles';\n\nconst getTouchProps = ({\n arrow,\n compact,\n portal,\n strategy,\n placement,\n focusTrap,\n ...touchProps\n}: FormDialogProps) => touchProps;\n\nconst TouchFormDialog = forwardRef<RefElement<FormDialogProps>, PropsWithoutRef<FormDialogProps>>(\n function TouchFormDialog(props, ref) {\n const {\n heading,\n 'aria-label': ariaLabel,\n children,\n progress,\n onDismiss,\n onCancel = () => true,\n onSubmit,\n onAfterClose,\n additionalInfo,\n ...restProps\n } = getTouchProps(props);\n const t = useI18n();\n const [open, setOpen] = useState(true);\n const headerId = useUID();\n const dialogRef = useConsolidatedRef(ref);\n const dialogContentRef = useRef<HTMLDivElement>(null);\n\n const contentTabIndex = useContentTabIndex(dialogRef, dialogContentRef, [], [progress]);\n\n const onCancelHandler = typeof onCancel === 'function' ? onCancel : onCancel.handler;\n const onSubmitHandler = typeof onSubmit === 'function' ? onSubmit : onSubmit.handler;\n\n const cancelLabel =\n typeof onCancel !== 'function' && onCancel.text ? onCancel.text : t('cancel');\n const submitLabel =\n typeof onSubmit !== 'function' && onSubmit.text ? onSubmit.text : t('submit');\n\n // Using layout effect to capture the focused element prior to dialog elements taking focus.\n useLayoutEffect(() => {\n const initiatorElement = getActiveElement();\n\n return () => {\n if (\n isInstance(initiatorElement, HTMLElement) &&\n initiatorElement.isConnected &&\n // Restore focus only when it wasn't returned before.\n dialogRef.current?.contains(getActiveElement())\n ) {\n initiatorElement.focus();\n }\n };\n }, []);\n\n return (\n <StyledTouchFormDialog\n {...restProps}\n ref={dialogRef}\n open={open}\n onBeforeClose={() => {\n setOpen(false);\n }}\n onAfterClose={onAfterClose}\n onDismiss={() => {\n (onDismiss || onCancelHandler)?.();\n }}\n heading={\n heading && (\n <>\n <Text variant='h2' id={headerId}>\n {heading}\n </Text>\n {additionalInfo?.heading && (\n <AdditionalInfo heading={additionalInfo.heading}>\n {additionalInfo.children}\n </AdditionalInfo>\n )}\n </>\n )\n }\n footer={\n <>\n <Button\n disabled={typeof onCancel !== 'function' ? onCancel.disabled : undefined}\n onClick={async () => {\n const returnValue = await onCancelHandler();\n\n if (returnValue === true) {\n setOpen(false);\n }\n }}\n >\n {cancelLabel}\n </Button>\n <Button\n variant='primary'\n disabled={typeof onSubmit !== 'function' ? onSubmit.disabled : undefined}\n onClick={async () => {\n const returnValue = await onSubmitHandler();\n\n if (returnValue === true) {\n setOpen(false);\n }\n }}\n >\n {submitLabel}\n </Button>\n </>\n }\n aria-label={ariaLabel}\n aria-labelledby={heading && headerId}\n progress={progress}\n >\n <Flex\n container={{ direction: 'column', pad: [0, 0.5] }}\n item={{ grow: 1 }}\n as={StyledTouchFormDialogContent}\n >\n {children && (\n <StyledChildrenWrap\n ref={dialogContentRef}\n tabIndex={contentTabIndex}\n inert={progress ? '' : undefined}\n >\n {children}\n </StyledChildrenWrap>\n )}\n </Flex>\n </StyledTouchFormDialog>\n );\n }\n);\n\nexport default TouchFormDialog;\n"]}
@@ -0,0 +1,7 @@
1
+ export declare const StyledTouchFormDialogContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const StyledTouchFormDialog: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Omit<Pick<import("./TouchDialog.types").TouchDialogPropsBase, "size" | "progress" | "open" | "footer" | "ref" | "className" | "aria-label" | "children" | "heading" | "testId" | "onBeforeOpen" | "onAfterOpen" | "onAfterClose" | "outerClickAction"> & Required<Pick<import("./TouchDialog.types").TouchDialogPropsBase, "onBeforeClose">> & Partial<Pick<import("./TouchDialog.types").TouchDialogPropsBase, "onDismiss">>, "ref"> & import("react").RefAttributes<HTMLDivElement> & import("../..").ForwardProps, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }) | (Omit<Omit<Pick<import("./TouchDialog.types").TouchDialogPropsBase, "size" | "progress" | "open" | "footer" | "ref" | "className" | "aria-label" | "children" | "heading" | "testId" | "onBeforeOpen" | "onAfterOpen" | "onAfterClose" | "outerClickAction"> & Required<Pick<import("./TouchDialog.types").TouchDialogPropsBase, "onDismiss">> & Partial<Pick<import("./TouchDialog.types").TouchDialogPropsBase, "onBeforeClose">>, "ref"> & import("react").RefAttributes<HTMLDivElement> & import("../..").ForwardProps, "ref"> & {
5
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
6
+ }), import("styled-components/dist/types").BaseObject>> & string & Omit<import("../..").ForwardRefForwardPropsComponent<import("./TouchDialog.types").TouchDialogProps>, keyof import("react").Component<any, {}, any>>;
7
+ //# sourceMappingURL=TouchFormDialog.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchFormDialog.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/TouchFormDialog.styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,4BAA4B,6NAGxC,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;;uNA2BjC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp } from '../../theme';
3
+ import { StyledButton } from '../Button';
4
+ import TouchDialog from './TouchDialog';
5
+ import { StyledTouchDialogContent } from './TouchDialog.styles';
6
+ import { StyledChildrenWrap, StyledDialogFooter } from './Dialog.styles';
7
+ export const StyledTouchFormDialogContent = styled.div `
8
+ position: relative;
9
+ min-height: 0;
10
+ `;
11
+ StyledTouchFormDialogContent.defaultProps = defaultThemeProp;
12
+ export const StyledTouchFormDialog = styled(TouchDialog)(({ theme }) => css `
13
+ @media (height < 31.25rem) {
14
+ display: flex;
15
+ overflow: hidden;
16
+ }
17
+
18
+ ${StyledTouchDialogContent} {
19
+ overflow: hidden;
20
+ }
21
+
22
+ ${StyledChildrenWrap} {
23
+ padding: calc(${theme.base.spacing} * 0.5);
24
+ overflow: auto;
25
+ min-height: 0;
26
+ }
27
+
28
+ ${StyledDialogFooter} {
29
+ padding-block-end: calc(
30
+ var(--appshell-hard-bottom-offset, 0rem) + ${theme.base.spacing} * 0.5
31
+ );
32
+
33
+ ${StyledButton} {
34
+ white-space: normal;
35
+ }
36
+ }
37
+ `);
38
+ StyledTouchFormDialog.defaultProps = defaultThemeProp;
39
+ //# sourceMappingURL=TouchFormDialog.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchFormDialog.styles.js","sourceRoot":"","sources":["../../../src/components/Dialog/TouchFormDialog.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGrD,CAAC;AAEF,4BAA4B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,WAAW,CAAC,CACtD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;;;;MAMd,wBAAwB;;;;MAIxB,kBAAkB;sBACF,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;MAKlC,kBAAkB;;qDAE6B,KAAK,CAAC,IAAI,CAAC,OAAO;;;QAG/D,YAAY;;;;GAIjB,CACF,CAAC;AAEF,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledButton } from '../Button';\n\nimport TouchDialog from './TouchDialog';\nimport { StyledTouchDialogContent } from './TouchDialog.styles';\nimport { StyledChildrenWrap, StyledDialogFooter } from './Dialog.styles';\n\nexport const StyledTouchFormDialogContent = styled.div`\n position: relative;\n min-height: 0;\n`;\n\nStyledTouchFormDialogContent.defaultProps = defaultThemeProp;\n\nexport const StyledTouchFormDialog = styled(TouchDialog)(\n ({ theme }) => css`\n @media (height < 31.25rem) {\n display: flex;\n overflow: hidden;\n }\n\n ${StyledTouchDialogContent} {\n overflow: hidden;\n }\n\n ${StyledChildrenWrap} {\n padding: calc(${theme.base.spacing} * 0.5);\n overflow: auto;\n min-height: 0;\n }\n\n ${StyledDialogFooter} {\n padding-block-end: calc(\n var(--appshell-hard-bottom-offset, 0rem) + ${theme.base.spacing} * 0.5\n );\n\n ${StyledButton} {\n white-space: normal;\n }\n }\n `\n);\n\nStyledTouchFormDialog.defaultProps = defaultThemeProp;\n"]}
@@ -1,6 +1,7 @@
1
- export { default as FormDialog } from './FormDialog';
1
+ export { default as FormDialog } from './FormDialogWrapper';
2
2
  export { default as InfoDialog } from './InfoDialogWrapper';
3
3
  export { default as TouchDialog } from './TouchDialog';
4
+ export { StyledTouchDialog } from './TouchDialog.styles';
4
5
  export type { TouchDialogProps } from './TouchDialog.types';
5
6
  export { getTouchDialogTestIds } from './TouchDialog.test-ids';
6
7
  export type { FormDialogProps, InfoDialogProps, DialogHandleValue } from './Dialog.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,5 +1,6 @@
1
- export { default as FormDialog } from './FormDialog';
1
+ export { default as FormDialog } from './FormDialogWrapper';
2
2
  export { default as InfoDialog } from './InfoDialogWrapper';
3
3
  export { default as TouchDialog } from './TouchDialog';
4
+ export { StyledTouchDialog } from './TouchDialog.styles';
4
5
  export { getTouchDialogTestIds } from './TouchDialog.test-ids';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["export { default as FormDialog } from './FormDialog';\nexport { default as InfoDialog } from './InfoDialogWrapper';\nexport { default as TouchDialog } from './TouchDialog';\nexport type { TouchDialogProps } from './TouchDialog.types';\nexport { getTouchDialogTestIds } from './TouchDialog.test-ids';\nexport type { FormDialogProps, InfoDialogProps, DialogHandleValue } from './Dialog.types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["export { default as FormDialog } from './FormDialogWrapper';\nexport { default as InfoDialog } from './InfoDialogWrapper';\nexport { default as TouchDialog } from './TouchDialog';\nexport { StyledTouchDialog } from './TouchDialog.styles';\nexport type { TouchDialogProps } from './TouchDialog.types';\nexport { getTouchDialogTestIds } from './TouchDialog.test-ids';\nexport type { FormDialogProps, InfoDialogProps, DialogHandleValue } from './Dialog.types';\n"]}
@@ -4,39 +4,59 @@ export declare const StyledEditButton: import("styled-components/dist/types").IS
4
4
  }, never>> & string & Omit<import("../..").ForwardRefForwardPropsComponent<import("../Button").ButtonProps>, keyof import("react").Component<any, {}, any>>;
5
5
  export declare const StyledInlineEditDialog: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
6
6
  onDismiss?: () => void;
7
- onCancel: import("../Dialog/Dialog.types").FormAction;
8
7
  onSubmit: import("../Dialog/Dialog.types").FormAction;
9
8
  } & {
10
- compact: true;
9
+ compact?: boolean;
11
10
  } & {
12
11
  'aria-label': string;
13
12
  heading?: never;
14
13
  additionalInfo?: never;
15
- } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
14
+ } & {
15
+ onAfterClose?: () => void;
16
+ onCancel: import("../Dialog/Dialog.types").FormAction | undefined;
17
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
16
18
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
17
19
  }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
18
20
  onDismiss?: () => void;
19
- onCancel: import("../Dialog/Dialog.types").FormAction;
20
21
  onSubmit: import("../Dialog/Dialog.types").FormAction;
21
22
  } & {
22
- compact?: false | undefined;
23
+ compact?: boolean;
24
+ } & {
25
+ 'aria-label': string;
26
+ heading?: never;
27
+ additionalInfo?: never;
28
+ } & {
29
+ onAfterClose: () => void;
30
+ onCancel?: import("../Dialog/Dialog.types").FormAction;
31
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
32
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
33
+ }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
34
+ onDismiss?: () => void;
35
+ onSubmit: import("../Dialog/Dialog.types").FormAction;
36
+ } & {
37
+ compact?: false;
23
38
  } & {
24
39
  heading: string;
25
40
  additionalInfo?: import("../AdditionalInfo").AdditionalInfoProps;
26
41
  'aria-label'?: never;
27
- } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
42
+ } & {
43
+ onAfterClose?: () => void;
44
+ onCancel: import("../Dialog/Dialog.types").FormAction | undefined;
45
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
28
46
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
29
47
  }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
30
48
  onDismiss?: () => void;
31
- onCancel: import("../Dialog/Dialog.types").FormAction;
32
49
  onSubmit: import("../Dialog/Dialog.types").FormAction;
33
50
  } & {
34
- compact?: false | undefined;
51
+ compact?: false;
35
52
  } & {
36
- 'aria-label': string;
37
- heading?: never;
38
- additionalInfo?: never;
39
- } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
53
+ heading: string;
54
+ additionalInfo?: import("../AdditionalInfo").AdditionalInfoProps;
55
+ 'aria-label'?: never;
56
+ } & {
57
+ onAfterClose: () => void;
58
+ onCancel?: import("../Dialog/Dialog.types").FormAction;
59
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
40
60
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
41
61
  }), import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<import("../Dialog").FormDialogProps> & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
42
62
  export declare const StyledInlineEdit: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1 +1 @@
1
- {"version":3,"file":"InlineEdit.styles.d.ts","sourceRoot":"","sources":["../../../src/components/InlineEdit/InlineEdit.styles.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,6NAEzB,CAAC;AAIF,eAAO,MAAM,gBAAgB;;2JAS3B,CAAC;AAIH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uRAQjC,CAAC;AAIH,eAAO,MAAM,gBAAgB,6NAmC3B,CAAC"}
1
+ {"version":3,"file":"InlineEdit.styles.d.ts","sourceRoot":"","sources":["../../../src/components/InlineEdit/InlineEdit.styles.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,6NAEzB,CAAC;AAIF,eAAO,MAAM,gBAAgB;;2JAS3B,CAAC;AAIH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uRAQjC,CAAC;AAIH,eAAO,MAAM,gBAAgB,6NAmC3B,CAAC"}
@@ -12,39 +12,59 @@ export declare const StyledListToolbar: import("styled-components/dist/types").I
12
12
  }>> & string;
13
13
  export declare const StyledListToolbarDialog: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
14
14
  onDismiss?: () => void;
15
- onCancel: import("../Dialog/Dialog.types").FormAction;
16
15
  onSubmit: import("../Dialog/Dialog.types").FormAction;
17
16
  } & {
18
- compact: true;
17
+ compact?: boolean;
19
18
  } & {
20
19
  'aria-label': string;
21
20
  heading?: never;
22
21
  additionalInfo?: never;
23
- } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
22
+ } & {
23
+ onAfterClose?: () => void;
24
+ onCancel: import("../Dialog/Dialog.types").FormAction | undefined;
25
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
24
26
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
25
27
  }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
26
28
  onDismiss?: () => void;
27
- onCancel: import("../Dialog/Dialog.types").FormAction;
28
29
  onSubmit: import("../Dialog/Dialog.types").FormAction;
29
30
  } & {
30
- compact?: false | undefined;
31
+ compact?: boolean;
32
+ } & {
33
+ 'aria-label': string;
34
+ heading?: never;
35
+ additionalInfo?: never;
36
+ } & {
37
+ onAfterClose: () => void;
38
+ onCancel?: import("../Dialog/Dialog.types").FormAction;
39
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
40
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
41
+ }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
42
+ onDismiss?: () => void;
43
+ onSubmit: import("../Dialog/Dialog.types").FormAction;
44
+ } & {
45
+ compact?: false;
31
46
  } & {
32
47
  heading: string;
33
48
  additionalInfo?: import("../AdditionalInfo").AdditionalInfoProps;
34
49
  'aria-label'?: never;
35
- } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
50
+ } & {
51
+ onAfterClose?: () => void;
52
+ onCancel: import("../Dialog/Dialog.types").FormAction | undefined;
53
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
36
54
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
37
55
  }) | (Omit<Omit<import("../Dialog/Dialog.types").BaseDialogProps & {
38
56
  onDismiss?: () => void;
39
- onCancel: import("../Dialog/Dialog.types").FormAction;
40
57
  onSubmit: import("../Dialog/Dialog.types").FormAction;
41
58
  } & {
42
- compact?: false | undefined;
59
+ compact?: false;
43
60
  } & {
44
- 'aria-label': string;
45
- heading?: never;
46
- additionalInfo?: never;
47
- } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
61
+ heading: string;
62
+ additionalInfo?: import("../AdditionalInfo").AdditionalInfoProps;
63
+ 'aria-label'?: never;
64
+ } & {
65
+ onAfterClose: () => void;
66
+ onCancel?: import("../Dialog/Dialog.types").FormAction;
67
+ } & Omit<import("../..").Attributes<"div">, "compact" | "aria-label" | "onSubmit" | "onCancel" | "heading" | "onAfterClose" | "onDismiss" | keyof import("../Dialog/Dialog.types").BaseDialogProps | "additionalInfo">, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
48
68
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
49
69
  }), import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<import("../Dialog").FormDialogProps> & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
50
70
  export declare const StyledListToolbarContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Omit<Pick<import("../Flex/Flex").BaseFlexProps & import("../..").BaseProps & import("../..").AsProp & {
@@ -1 +1 @@
1
- {"version":3,"file":"ListToolbar.styles.d.ts","sourceRoot":"","sources":["../../../src/components/ListToolbar/ListToolbar.styles.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAKvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQ9C,eAAO,MAAM,wBAAwB;;2JAAmB,CAAC;AAGzD,eAAO,MAAM,gBAAgB,6NAK5B,CAAC;AAEF,eAAO,MAAM,kBAAkB;cAA6B,OAAO;YA0BjE,CAAC;AAIH,eAAO,MAAM,iBAAiB;oBAAgC,OAAO;YAsBpE,CAAC;AAIF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uRAWlC,CAAC;AAIH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oMAYnC,CAAC;AAIH,eA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eAAe,kYAK3B,CAAC;AAIF,eAAO,MAAM,aAAa;eACb,OAAO;cACR,OAAO;gBACL,UAAU;YAwDtB,CAAC;AAIH,eAAO,MAAM,eAAe;;;;mBAM1B,CAAC;AAIH,eAAO,MAAM,UAAU,qQAatB,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oMAQjC,CAAC"}
@@ -9,8 +9,9 @@ import { StyledText } from '../Text';
9
9
  import { defaultThemeProp } from '../../theme';
10
10
  import { calculateFontSize } from '../../styles';
11
11
  import Button, { StyledButton } from '../Button';
12
- import FormDialog from '../Dialog/FormDialog';
12
+ import { FormDialog } from '../Dialog';
13
13
  import { ellipsisOverflow } from '../../styles/mixins';
14
+ import { StyledTouchDialog } from '../Dialog/TouchDialog.styles';
14
15
  export const StyledExpandSearchButton = styled(Button) ``;
15
16
  StyledExpandSearchButton.defaultProps = defaultThemeProp;
16
17
  export const StyledSearchForm = styled.div `
@@ -70,12 +71,14 @@ export const StyledListToolbar = styled.div(({ theme, isSmallOrAbove }) => {
70
71
  StyledListToolbar.defaultProps = defaultThemeProp;
71
72
  export const StyledListToolbarDialog = styled(FormDialog)(({ theme }) => {
72
73
  return css `
73
- min-width: min(${theme.base['content-width'].lg}, calc(100% - 2rem));
74
- max-width: calc(100vw - 4 * ${theme.base.spacing});
74
+ &:not(${StyledTouchDialog}) {
75
+ min-width: min(${theme.base['content-width'].lg}, calc(100% - 2rem));
76
+ max-width: calc(100vw - 4 * ${theme.base.spacing});
75
77
 
76
- ${StyledDialogContent} {
77
- @media (height >= 31.25rem) {
78
- min-height: 2rem;
78
+ ${StyledDialogContent} {
79
+ @media (height >= 31.25rem) {
80
+ min-height: 2rem;
81
+ }
79
82
  }
80
83
  }
81
84
  `;