@pega/cosmos-react-core 10.0.0-build.4.2 → 10.0.0-build.4.21

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 (253) hide show
  1. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  2. package/lib/components/AppShell/AppHeader.js +44 -7
  3. package/lib/components/AppShell/AppHeader.js.map +1 -1
  4. package/lib/components/AppShell/AppHeader.styles.d.ts +6 -2
  5. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  6. package/lib/components/AppShell/AppHeader.styles.js +36 -18
  7. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  8. package/lib/components/AppShell/AppNavigationPanel.js +1 -1
  9. package/lib/components/AppShell/AppNavigationPanel.js.map +1 -1
  10. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  11. package/lib/components/AppShell/AppShell.js +27 -9
  12. package/lib/components/AppShell/AppShell.js.map +1 -1
  13. package/lib/components/AppShell/AppShellContext.d.ts +1 -0
  14. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  15. package/lib/components/AppShell/AppShellContext.js +1 -0
  16. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  17. package/lib/components/AppShell/AppShellList.js +1 -1
  18. package/lib/components/AppShell/AppShellList.js.map +1 -1
  19. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  20. package/lib/components/AppShell/NavigationList.js +3 -2
  21. package/lib/components/AppShell/NavigationList.js.map +1 -1
  22. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  23. package/lib/components/AppShell/NavigationListItemWrapper.js +87 -48
  24. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  25. package/lib/components/Avatar/Avatar.d.ts +1 -1
  26. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  27. package/lib/components/Avatar/Avatar.js.map +1 -1
  28. package/lib/components/Badges/Selection.js +1 -1
  29. package/lib/components/Badges/Selection.js.map +1 -1
  30. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  31. package/lib/components/ComboBox/ComboBox.js +3 -6
  32. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  33. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  34. package/lib/components/ComboBox/ComboBox.styles.js +9 -1
  35. package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
  36. package/lib/components/ComboBox/ComboBoxInput.d.ts +0 -2
  37. package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
  38. package/lib/components/ComboBox/ComboBoxInput.js +2 -2
  39. package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
  40. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts +4 -6
  41. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  42. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +96 -189
  43. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  44. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.d.ts +190 -0
  45. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.d.ts.map +1 -0
  46. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.js +72 -0
  47. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.js.map +1 -0
  48. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +0 -2
  49. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
  50. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
  51. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  52. package/lib/components/Configuration/Configuration.js +3 -1
  53. package/lib/components/Configuration/Configuration.js.map +1 -1
  54. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  55. package/lib/components/Currency/CurrencyInput.js +19 -12
  56. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  57. package/lib/components/Currency/utils.d.ts +8 -0
  58. package/lib/components/Currency/utils.d.ts.map +1 -1
  59. package/lib/components/Currency/utils.js +34 -4
  60. package/lib/components/Currency/utils.js.map +1 -1
  61. package/lib/components/DateTime/DateTimeDisplay.d.ts +2 -2
  62. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  63. package/lib/components/DateTime/DateTimeDisplay.js +29 -4
  64. package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
  65. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  66. package/lib/components/DateTime/Input/DateInput.js +7 -7
  67. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  68. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  69. package/lib/components/DateTime/Input/DateRangeInput.js +8 -2
  70. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  71. package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -1
  72. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  73. package/lib/components/DateTime/Input/DateTimeInput.js +8 -8
  74. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  75. package/lib/components/DateTime/Input/MonthInput.js +2 -2
  76. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  77. package/lib/components/DateTime/Input/QuarterInput.js +2 -2
  78. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
  79. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  80. package/lib/components/DateTime/Input/TimeInput.js +3 -3
  81. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  82. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  83. package/lib/components/DateTime/Input/TimeRangeInput.js +12 -4
  84. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  85. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  86. package/lib/components/DateTime/Input/WeekInput.js +2 -2
  87. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  88. package/lib/components/DateTime/Input/utils.d.ts +6 -0
  89. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  90. package/lib/components/DateTime/Input/utils.js +47 -0
  91. package/lib/components/DateTime/Input/utils.js.map +1 -1
  92. package/lib/components/DateTime/utils.d.ts +15 -4
  93. package/lib/components/DateTime/utils.d.ts.map +1 -1
  94. package/lib/components/DateTime/utils.js +24 -3
  95. package/lib/components/DateTime/utils.js.map +1 -1
  96. package/lib/components/Dialog/InfoDialogWrapper.d.ts +4 -0
  97. package/lib/components/Dialog/InfoDialogWrapper.d.ts.map +1 -0
  98. package/lib/components/Dialog/InfoDialogWrapper.js +13 -0
  99. package/lib/components/Dialog/InfoDialogWrapper.js.map +1 -0
  100. package/lib/components/Dialog/TouchDialog.d.ts +5 -0
  101. package/lib/components/Dialog/TouchDialog.d.ts.map +1 -0
  102. package/lib/components/Dialog/TouchDialog.js +85 -0
  103. package/lib/components/Dialog/TouchDialog.js.map +1 -0
  104. package/lib/components/Dialog/TouchDialog.styles.d.ts +7 -0
  105. package/lib/components/Dialog/TouchDialog.styles.d.ts.map +1 -0
  106. package/lib/components/Dialog/TouchDialog.styles.js +62 -0
  107. package/lib/components/Dialog/TouchDialog.styles.js.map +1 -0
  108. package/lib/components/Dialog/TouchDialog.test-ids.d.ts +2 -0
  109. package/lib/components/Dialog/TouchDialog.test-ids.d.ts.map +1 -0
  110. package/lib/components/Dialog/TouchDialog.test-ids.js +3 -0
  111. package/lib/components/Dialog/TouchDialog.test-ids.js.map +1 -0
  112. package/lib/components/Dialog/TouchDialog.types.d.ts +42 -0
  113. package/lib/components/Dialog/TouchDialog.types.d.ts.map +1 -0
  114. package/lib/components/Dialog/TouchDialog.types.js +2 -0
  115. package/lib/components/Dialog/TouchDialog.types.js.map +1 -0
  116. package/lib/components/Dialog/TouchInfoDialog.d.ts +4 -0
  117. package/lib/components/Dialog/TouchInfoDialog.d.ts.map +1 -0
  118. package/lib/components/Dialog/TouchInfoDialog.js +14 -0
  119. package/lib/components/Dialog/TouchInfoDialog.js.map +1 -0
  120. package/lib/components/Dialog/index.d.ts +4 -1
  121. package/lib/components/Dialog/index.d.ts.map +1 -1
  122. package/lib/components/Dialog/index.js +3 -1
  123. package/lib/components/Dialog/index.js.map +1 -1
  124. package/lib/components/FieldGroup/FieldGroup.d.ts +12 -7
  125. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  126. package/lib/components/FieldGroup/FieldGroup.js +28 -25
  127. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  128. package/lib/components/FieldGroup/FieldGroupList.js +1 -1
  129. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  130. package/lib/components/FieldValueList/FieldValueList.d.ts +3 -1
  131. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  132. package/lib/components/FieldValueList/FieldValueList.js +15 -6
  133. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  134. package/lib/components/File/CompactList.js +1 -1
  135. package/lib/components/File/CompactList.js.map +1 -1
  136. package/lib/components/File/FileItem.d.ts +38 -0
  137. package/lib/components/File/FileItem.d.ts.map +1 -1
  138. package/lib/components/File/FileItem.js +167 -23
  139. package/lib/components/File/FileItem.js.map +1 -1
  140. package/lib/components/File/FileList.d.ts.map +1 -1
  141. package/lib/components/File/FileList.js +6 -2
  142. package/lib/components/File/FileList.js.map +1 -1
  143. package/lib/components/File/index.d.ts +1 -1
  144. package/lib/components/File/index.d.ts.map +1 -1
  145. package/lib/components/File/index.js.map +1 -1
  146. package/lib/components/File/mimeTypes.json +1 -0
  147. package/lib/components/FormField/FormField.d.ts +9 -1
  148. package/lib/components/FormField/FormField.d.ts.map +1 -1
  149. package/lib/components/FormField/FormField.js +26 -10
  150. package/lib/components/FormField/FormField.js.map +1 -1
  151. package/lib/components/Icon/Icon.d.ts +5 -0
  152. package/lib/components/Icon/Icon.d.ts.map +1 -1
  153. package/lib/components/Icon/Icon.js +44 -4
  154. package/lib/components/Icon/Icon.js.map +1 -1
  155. package/lib/components/Icon/iconNames.d.ts +1 -0
  156. package/lib/components/Icon/iconNames.d.ts.map +1 -1
  157. package/lib/components/Icon/iconNames.js +1 -0
  158. package/lib/components/Icon/iconNames.js.map +1 -1
  159. package/lib/components/Icon/icons/search-solid.icon.d.ts +1 -1
  160. package/lib/components/Icon/icons/search-solid.icon.js +3 -3
  161. package/lib/components/Icon/icons/search-solid.icon.js.map +1 -1
  162. package/lib/components/Icon/streamlineIconNames.d.ts +1 -0
  163. package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
  164. package/lib/components/Icon/streamlineIconNames.js +1 -0
  165. package/lib/components/Icon/streamlineIconNames.js.map +1 -1
  166. package/lib/components/Link/Link.d.ts +6 -13
  167. package/lib/components/Link/Link.d.ts.map +1 -1
  168. package/lib/components/Link/Link.js.map +1 -1
  169. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  170. package/lib/components/ListToolbar/ListToolbar.js +1 -1
  171. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  172. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
  173. package/lib/components/ListToolbar/PresetMenuPopover.js +16 -5
  174. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
  175. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  176. package/lib/components/MenuButton/MenuButton.js +33 -7
  177. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  178. package/lib/components/MultiStepForm/FormProgress.styles.d.ts +25 -1
  179. package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
  180. package/lib/components/MultiStepForm/FormProgress.styles.js +168 -5
  181. package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
  182. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -2
  183. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
  184. package/lib/components/MultiStepForm/HorizontalFormProgress.js +48 -22
  185. package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
  186. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  187. package/lib/components/MultiStepForm/MultiStepForm.js +2 -2
  188. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  189. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +5 -0
  190. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts.map +1 -1
  191. package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
  192. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts +2 -2
  193. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
  194. package/lib/components/MultiStepForm/VerticalFormProgress.js +45 -20
  195. package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
  196. package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts +1 -1
  197. package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts.map +1 -1
  198. package/lib/components/MultiStepForm/useFormProgressOverflow.js +17 -9
  199. package/lib/components/MultiStepForm/useFormProgressOverflow.js.map +1 -1
  200. package/lib/components/Number/utils.js +1 -1
  201. package/lib/components/Number/utils.js.map +1 -1
  202. package/lib/components/PageTemplates/PageTemplates.js +1 -1
  203. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  204. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  205. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +1 -1
  206. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  207. package/lib/components/SelectionCard/SelectionCard.d.ts +1 -1
  208. package/lib/components/SelectionCard/SelectionCard.d.ts.map +1 -1
  209. package/lib/components/SelectionCard/SelectionCard.js +3 -3
  210. package/lib/components/SelectionCard/SelectionCard.js.map +1 -1
  211. package/lib/components/SelectionCard/SelectionCardDisplay.d.ts +5 -0
  212. package/lib/components/SelectionCard/SelectionCardDisplay.d.ts.map +1 -1
  213. package/lib/components/SelectionCard/SelectionCardDisplay.js +4 -2
  214. package/lib/components/SelectionCard/SelectionCardDisplay.js.map +1 -1
  215. package/lib/components/SpeechToTextButton/SpeechToTextButton.js +1 -1
  216. package/lib/components/SpeechToTextButton/SpeechToTextButton.js.map +1 -1
  217. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  218. package/lib/components/SummaryList/SummaryList.js +8 -4
  219. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  220. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  221. package/lib/components/TextArea/TextArea.js +7 -21
  222. package/lib/components/TextArea/TextArea.js.map +1 -1
  223. package/lib/components/TextArea/TextArea.styles.d.ts +0 -1
  224. package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
  225. package/lib/components/TextArea/TextArea.styles.js +1 -2
  226. package/lib/components/TextArea/TextArea.styles.js.map +1 -1
  227. package/lib/hooks/useI18n.d.ts +13 -9
  228. package/lib/hooks/useI18n.d.ts.map +1 -1
  229. package/lib/i18n/default.d.ts +13 -10
  230. package/lib/i18n/default.d.ts.map +1 -1
  231. package/lib/i18n/default.js +16 -12
  232. package/lib/i18n/default.js.map +1 -1
  233. package/lib/i18n/i18n.d.ts +13 -9
  234. package/lib/i18n/i18n.d.ts.map +1 -1
  235. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  236. package/lib/styles/GlobalStyle.js +3 -3
  237. package/lib/styles/GlobalStyle.js.map +1 -1
  238. package/lib/theme/theme.d.ts +48 -0
  239. package/lib/theme/theme.d.ts.map +1 -1
  240. package/lib/theme/themeDefinition.json +26 -0
  241. package/lib/theme/themeOverrides.schema.json +36 -0
  242. package/lib/theme/themes/aurigaDarkTheme.json +54 -61
  243. package/lib/theme/themes/aurigaTheme.json +49 -56
  244. package/lib/theme/themes/virgoTheme.json +3 -3
  245. package/lib/utils/index.d.ts +1 -0
  246. package/lib/utils/index.d.ts.map +1 -1
  247. package/lib/utils/index.js +1 -0
  248. package/lib/utils/index.js.map +1 -1
  249. package/lib/utils/isTouchDevice.d.ts +3 -0
  250. package/lib/utils/isTouchDevice.d.ts.map +1 -0
  251. package/lib/utils/isTouchDevice.js +4 -0
  252. package/lib/utils/isTouchDevice.js.map +1 -0
  253. package/package.json +2 -2
@@ -0,0 +1,62 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp } from '../../theme';
3
+ import { StyledButton } from '../Button';
4
+ import Drawer from '../Drawer';
5
+ import { ExpandCollapseButton } from '../ExpandCollapse';
6
+ import { StyledIcon } from '../Icon';
7
+ import { StyledChildrenWrap } from './Dialog.styles';
8
+ export const StyledExpandCollapse = styled(ExpandCollapseButton) `
9
+ position: absolute;
10
+ inset-block-start: 0;
11
+ width: 100%;
12
+
13
+ &[aria-expanded='false'] ${StyledIcon} {
14
+ transform: rotate(-90deg);
15
+ }
16
+ `;
17
+ StyledExpandCollapse.defaultProps = defaultThemeProp;
18
+ export const StyledTouchDialog = styled(Drawer)(({ theme: { base, components } }) => css `
19
+ display: flex;
20
+ flex-direction: column;
21
+ background: ${components.popover.background};
22
+ inset-block-end: calc(${base.spacing} * 0.5);
23
+ inset-inline: calc(${base.spacing} * 0.5);
24
+ max-height: 90dvh;
25
+ border-radius: ${components.card['border-radius']};
26
+ width: auto;
27
+ transition-property: transform, box-shadow, opacity, height;
28
+
29
+ @media (height < 31.25rem) {
30
+ overflow-y: auto;
31
+ display: block;
32
+ }
33
+
34
+ &:has(${StyledExpandCollapse}) {
35
+ padding-block-start: ${base['hit-area'].compact};
36
+ }
37
+ `);
38
+ StyledTouchDialog.defaultProps = defaultThemeProp;
39
+ export const StyledTouchDialogHeader = styled.div(({ theme: { base } }) => css `
40
+ padding-inline: ${base.spacing};
41
+
42
+ ${StyledButton} {
43
+ margin-inline-start: auto;
44
+ }
45
+ `);
46
+ StyledTouchDialogHeader.defaultProps = defaultThemeProp;
47
+ export const StyledTouchDialogContent = styled.div(({ theme: { base } }) => css `
48
+ min-height: 0;
49
+ overflow: auto;
50
+ height: 100%;
51
+ position: relative;
52
+ padding-block-start: calc(${base.spacing} * 0.5);
53
+
54
+ ${StyledChildrenWrap} {
55
+ height: 100%;
56
+ display: flex;
57
+ flex-direction: column;
58
+ padding-inline: ${base.spacing};
59
+ }
60
+ `);
61
+ StyledTouchDialogContent.defaultProps = defaultThemeProp;
62
+ //# sourceMappingURL=TouchDialog.styles.js.map
@@ -0,0 +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,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;;qBAEhB,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC;;;;;;;;;YASzC,oBAAoB;6BACH,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO;;GAElD,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,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;;MAE5B,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;;MAEtC,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 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 border-radius: ${components.card['border-radius']};\n width: auto;\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 StyledTouchDialogHeader = styled.div(\n ({ theme: { base } }) => css`\n padding-inline: ${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 ${StyledChildrenWrap} {\n height: 100%;\n display: flex;\n flex-direction: column;\n padding-inline: ${base.spacing};\n }\n `\n);\n\nStyledTouchDialogContent.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const getTouchDialogTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["dismiss"]>;
2
+ //# sourceMappingURL=TouchDialog.test-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchDialog.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/TouchDialog.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,4GAAsD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createTestIds } from '../../utils';
2
+ export const getTouchDialogTestIds = createTestIds('touch-dialog', ['dismiss']);
3
+ //# sourceMappingURL=TouchDialog.test-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchDialog.test-ids.js","sourceRoot":"","sources":["../../../src/components/Dialog/TouchDialog.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,cAAc,EAAE,CAAC,SAAS,CAAU,CAAC,CAAC","sourcesContent":["import { createTestIds } from '../../utils';\n\nexport const getTouchDialogTestIds = createTestIds('touch-dialog', ['dismiss'] as const);\n"]}
@@ -0,0 +1,42 @@
1
+ import type { Ref } from 'react';
2
+ import type { BaseProps, TestIdProp } from '../../types';
3
+ import type { DrawerProps } from '../Drawer';
4
+ import type { ProgressProps } from '../Progress';
5
+ export interface TouchDialogProps extends BaseProps, TestIdProp {
6
+ /**
7
+ * Whether the TouchDialog should be open or closed.
8
+ * The component should not be unmounted before onAfterClose is called,
9
+ * otherwise the closing animation will be interrupted.
10
+ */
11
+ open: DrawerProps['open'];
12
+ /**
13
+ * Callback fired when the TouchDialog is dismissed with user intent.
14
+ * The parent component should toggle the `open` prop.
15
+ */
16
+ onDismiss: () => void;
17
+ /** Heading text displayed at the top of the drawer. */
18
+ heading?: string;
19
+ /** Content of the TouchDialog. */
20
+ children?: DrawerProps['children'];
21
+ /** If there is a progress state either on opening, or after submit, you must indicate as such. A custom message is supported as well. */
22
+ progress?: boolean | ProgressProps['message'];
23
+ /**
24
+ * The initial height of the TouchDialog panel.
25
+ * - `'auto'` — height is driven by content (capped at 90% of the viewport).
26
+ * - `'half'` — half the viewport height.
27
+ * - `'full'` — opens to the maximum height (90% of the viewport).
28
+ * @default 'half'
29
+ */
30
+ size?: 'auto' | 'half' | 'full';
31
+ /** Callback fired before the TouchDialog starts opening. */
32
+ onBeforeOpen?: DrawerProps['onBeforeOpen'];
33
+ /** Callback fired after the TouchDialog finishes opening. */
34
+ onAfterOpen?: DrawerProps['onAfterOpen'];
35
+ /** Callback fired before the TouchDialog starts closing. */
36
+ onBeforeClose?: DrawerProps['onBeforeClose'];
37
+ /** Callback fired after the TouchDialog finishes closing. */
38
+ onAfterClose?: DrawerProps['onAfterClose'];
39
+ /** Ref for the dialog panel element. */
40
+ ref?: Ref<HTMLDivElement>;
41
+ }
42
+ //# sourceMappingURL=TouchDialog.types.d.ts.map
@@ -0,0 +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,MAAM,OAAO,CAAC;AAEjC,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,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,SAAS,EAAE,UAAU;IAC7D;;;;OAIG;IACH,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B;;;OAGG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACnC,yIAAyI;IACzI,QAAQ,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAC9C;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC,4DAA4D;IAC5D,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC3C,6DAA6D;IAC7D,WAAW,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACzC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAC7C,6DAA6D;IAC7D,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC3C,wCAAwC;IACxC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TouchDialog.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchDialog.types.js","sourceRoot":"","sources":["../../../src/components/Dialog/TouchDialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref } 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?: 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).\n * - `'half'` — half the viewport height.\n * - `'full'` — opens to the maximum height (90% of the viewport).\n * @default 'half'\n */\n size?: 'auto' | '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 /** Ref for the dialog panel element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { InfoDialogProps } from './Dialog.types';
2
+ declare const TouchInfoDialog: import("react").ForwardRefExoticComponent<Omit<Pick<InfoDialogProps, "hidden" | "color" | "content" | "style" | "progress" | "translate" | "slot" | "title" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "nonce" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "inert" | "heading" | "placement" | "strategy" | "portal" | "onDismiss" | "focusTrap">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
3
+ export default TouchInfoDialog;
4
+ //# sourceMappingURL=TouchInfoDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchInfoDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/TouchInfoDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,QAAA,MAAM,eAAe,80JAuBnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useState } from 'react';
3
+ import { TouchDialog } from './TouchDialog';
4
+ const TouchInfoDialog = forwardRef(function TouchInfoDialog({ heading: headingProp, children, onDismiss, ...restProps }, ref) {
5
+ const headingText = typeof headingProp === 'string' ? headingProp : headingProp?.primary;
6
+ const [open, setOpen] = useState(true);
7
+ return (_jsx(TouchDialog, { ...restProps, open: open, onDismiss: () => {
8
+ setOpen(false);
9
+ }, ref: ref, heading: headingText, onAfterClose: () => {
10
+ onDismiss();
11
+ }, children: children }));
12
+ });
13
+ export default TouchInfoDialog;
14
+ //# sourceMappingURL=TouchInfoDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchInfoDialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/TouchInfoDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAwB,MAAM,OAAO,CAAC;AAInE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,MAAM,eAAe,GAAG,UAAU,CAGhC,SAAS,eAAe,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG;IACzF,MAAM,WAAW,GAAG,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC;IACzF,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEvC,OAAO,CACL,KAAC,WAAW,OACN,SAAS,EACb,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,GAAG,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,EACD,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE,GAAG,EAAE;YACjB,SAAS,EAAE,CAAC;QACd,CAAC,YAEA,QAAQ,GACG,CACf,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, useState, type PropsWithoutRef } from 'react';\n\nimport type { RefElement, OmitStrict } from '../../types';\n\nimport { TouchDialog } from './TouchDialog';\nimport type { InfoDialogProps } from './Dialog.types';\n\nconst TouchInfoDialog = forwardRef<\n RefElement<InfoDialogProps>,\n PropsWithoutRef<OmitStrict<InfoDialogProps, 'target'>>\n>(function TouchInfoDialog({ heading: headingProp, children, onDismiss, ...restProps }, ref) {\n const headingText = typeof headingProp === 'string' ? headingProp : headingProp?.primary;\n const [open, setOpen] = useState(true);\n\n return (\n <TouchDialog\n {...restProps}\n open={open}\n onDismiss={() => {\n setOpen(false);\n }}\n ref={ref}\n heading={headingText}\n onAfterClose={() => {\n onDismiss();\n }}\n >\n {children}\n </TouchDialog>\n );\n});\n\nexport default TouchInfoDialog;\n"]}
@@ -1,4 +1,7 @@
1
1
  export { default as FormDialog } from './FormDialog';
2
- export { default as InfoDialog } from './InfoDialog';
2
+ export { default as InfoDialog } from './InfoDialogWrapper';
3
+ export { default as TouchDialog } from './TouchDialog';
4
+ export type { TouchDialogProps } from './TouchDialog.types';
5
+ export { getTouchDialogTestIds } from './TouchDialog.test-ids';
3
6
  export type { FormDialogProps, InfoDialogProps, DialogHandleValue } from './Dialog.types';
4
7
  //# sourceMappingURL=index.d.ts.map
@@ -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,cAAc,CAAC;AACrD,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,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,3 +1,5 @@
1
1
  export { default as FormDialog } from './FormDialog';
2
- export { default as InfoDialog } from './InfoDialog';
2
+ export { default as InfoDialog } from './InfoDialogWrapper';
3
+ export { default as TouchDialog } from './TouchDialog';
4
+ export { getTouchDialogTestIds } from './TouchDialog.test-ids';
3
5
  //# 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,cAAc,CAAC","sourcesContent":["export { default as FormDialog } from './FormDialog';\nexport { default as InfoDialog } from './InfoDialog';\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,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"]}
@@ -49,7 +49,15 @@ export type FieldGroupProps = BaseProps & {
49
49
  collapsed?: never;
50
50
  onToggleCollapsed?: never;
51
51
  });
52
- export declare const StyledFieldGroupName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
52
+ export declare const StyledDescription: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("../HTML").HTMLProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & import("../..").ForwardProps, "ref"> & {
53
+ 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;
54
+ }, never>> & string & Omit<ForwardRefForwardPropsComponent<import("../HTML").HTMLProps> & {
55
+ getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
56
+ }, keyof import("react").Component<any, {}, any>>;
57
+ export declare const StyledFieldGroupChildren: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
58
+ export declare const StyledFieldGroupName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("../Text").TextProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement | HTMLSpanElement> & import("../..").ForwardProps, "ref"> & {
59
+ ref?: ((instance: HTMLHeadingElement | HTMLSpanElement | 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<HTMLHeadingElement | HTMLSpanElement> | null | undefined;
60
+ }, never>> & string & Omit<ForwardRefForwardPropsComponent<import("../Text").TextProps>, keyof import("react").Component<any, {}, any>>;
53
61
  export declare const StyledFieldHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Omit<Pick<import("../Flex/Flex").BaseFlexProps & BaseProps & import("../..").AsProp & {
54
62
  children?: ReactNode;
55
63
  ref?: Ref<Element>;
@@ -417,15 +425,12 @@ export declare const StyledFieldGroupContent: import("styled-components/dist/typ
417
425
  ref?: import("react").RefObject<Element> | ((instance: Element | 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]) | null | undefined;
418
426
  }), import("styled-components/dist/types").BaseObject>> & string & Omit<ForwardRefForwardPropsComponent<import("../Grid").GridProps>, keyof import("react").Component<any, {}, any>>;
419
427
  export declare const StyledFieldGroupLegend: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, Pick<FieldGroupProps, "collapsed">>> & string;
420
- export declare const StyledFieldGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>> & string;
428
+ export declare const StyledFieldGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, {
429
+ $hasDescription?: boolean;
430
+ }>> & string;
421
431
  export declare const StyledGroupContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
422
432
  border?: boolean;
423
433
  }>> & string;
424
- export declare const StyledDescription: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("../HTML").HTMLProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & import("../..").ForwardProps, "ref"> & {
425
- 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;
426
- }, never>> & string & Omit<ForwardRefForwardPropsComponent<import("../HTML").HTMLProps> & {
427
- getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
428
- }, keyof import("react").Component<any, {}, any>>;
429
434
  declare const FieldGroup: ForwardRefForwardPropsComponent<FieldGroupProps>;
430
435
  export default FieldGroup;
431
436
  //# sourceMappingURL=FieldGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../src/components/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAW7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAI7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA+B,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAM7D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,sCAAsC;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,GAAG,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC;CAChC,GAAG,CACE;IACE,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wCAAwC;IACxC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,4DAA4D;IAC5D,cAAc,CAAC,EAAE;QACf,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACzC,OAAO,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAA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BAA+B,CAAC,eAAe,CAmG/D,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -18,6 +18,18 @@ import { calculateFontSize, omitProps } from '../../styles';
18
18
  import AdditionalInfo from '../AdditionalInfo';
19
19
  registerIcon(caretRightIcon);
20
20
  registerIcon(warnSolidIcon);
21
+ export const StyledDescription = styled(HTML)(({ theme }) => {
22
+ const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
23
+ return css `
24
+ /* Prevent instruction text from contributing to modal width calculation */
25
+ width: 0;
26
+ min-width: 100%;
27
+ color: rgb(from currentColor r g b / ${theme.base.transparency['transparent-2']});
28
+ font-size: ${fontSizes.xs};
29
+ `;
30
+ });
31
+ StyledDescription.defaultProps = defaultThemeProp;
32
+ export const StyledFieldGroupChildren = styled.div ``;
21
33
  // Styles
22
34
  const StyledExpandButton = styled(Button)(({ theme: { base: { animation } } }) => {
23
35
  const { rtl } = useDirection();
@@ -38,19 +50,14 @@ const StyledErrorIcon = styled(Icon)(({ theme: { base: { palette } } }) => css `
38
50
  color: ${palette.urgent};
39
51
  `);
40
52
  StyledErrorIcon.defaultProps = defaultThemeProp;
41
- export const StyledFieldGroupName = styled.span ``;
53
+ export const StyledFieldGroupName = styled(Text) ``;
42
54
  export const StyledFieldHeader = styled(Flex) `
43
55
  word-break: break-word;
44
56
  `;
45
57
  export const StyledFieldGroupContent = styled(Grid) ``;
46
- export const StyledFieldGroupLegend = styled.legend.withConfig(omitProps('collapsed'))(({ collapsed, theme: { base: { spacing, animation, 'hit-area': { 'mouse-min': hitAreaMouse, 'finger-min': hitAreaFinger } } } }) => {
58
+ export const StyledFieldGroupLegend = styled.legend.withConfig(omitProps('collapsed'))(({ theme: { base: { animation, 'hit-area': { 'mouse-min': hitAreaMouse, 'finger-min': hitAreaFinger } } } }) => {
47
59
  return css `
48
60
  width: 100%;
49
- margin-bottom: 0;
50
- ${!collapsed &&
51
- css `
52
- margin-block-end: calc(1.5 * ${spacing});
53
- `}
54
61
  transition: margin-block-end ${animation.speed} ${animation.timing.ease};
55
62
 
56
63
  > ${StyledExpandButton} {
@@ -63,26 +70,27 @@ export const StyledFieldGroupLegend = styled.legend.withConfig(omitProps('collap
63
70
  `;
64
71
  });
65
72
  StyledFieldGroupLegend.defaultProps = defaultThemeProp;
66
- export const StyledFieldGroup = styled.fieldset(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale }, components: { text } } }) => {
67
- const fontSizes = calculateFontSize(fontSize, fontScale);
73
+ export const StyledFieldGroup = styled.fieldset(({ theme, $hasDescription }) => {
68
74
  return css `
69
75
  border: none;
70
76
 
71
- & ${StyledFieldGroupName} {
72
- font-size: ${fontSizes[text.h3['font-size']]};
73
- font-weight: ${text.h3['font-weight']};
74
- }
77
+ ${!$hasDescription &&
78
+ css `
79
+ & > ${StyledFieldGroupLegend}:not(:has([aria-expanded='false'])) {
80
+ margin-block-end: calc(${theme.base.spacing} / 2);
81
+ }
82
+ `}
75
83
  `;
76
84
  });
77
85
  StyledFieldGroup.defaultProps = defaultThemeProp;
78
86
  export const StyledGroupContainer = styled.div(({ theme, border }) => {
79
- const { base: { palette: { 'border-line': borderColor }, spacing, 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-width': borderWidth } } } = theme;
80
87
  if (!border)
81
88
  return null;
82
89
  return css `
83
- padding: ${spacing};
84
- border-radius: calc(${baseBorderRadius} / 2);
85
- border: ${borderWidth} solid ${borderColor};
90
+ padding: calc(2 * ${theme.base.spacing});
91
+ border-radius: calc(${theme.base['border-radius']} / 2);
92
+ border: ${theme.components['form-control']['border-width']} solid
93
+ ${theme.base.palette['border-line']};
86
94
  `;
87
95
  });
88
96
  StyledGroupContainer.defaultProps = defaultThemeProp;
@@ -90,20 +98,15 @@ StyledGroupContainer.defaultProps = defaultThemeProp;
90
98
  const FieldGroupLegend = ({ name, contextualLabel, children, collapsed, actions, additionalInfo }) => {
91
99
  return (_jsx(StyledFieldGroupLegend, { collapsed: collapsed, children: _jsxs(Flex, { container: { alignItems: 'center', justify: 'between', gap: 0.5 }, children: [_jsxs(Flex, { container: { alignItems: 'center', gap: 0.5 }, as: StyledFieldHeader, children: [children, additionalInfo && (_jsx(AdditionalInfo, { heading: additionalInfo.heading, contextualLabel: contextualLabel || name, children: additionalInfo.content }))] }), actions && _jsx(Actions, { items: actions, contextualLabel: contextualLabel })] }) }));
92
100
  };
93
- export const StyledDescription = styled(HTML) `
94
- /* Prevent instruction text from contributing to modal width calculation */
95
- width: 0;
96
- min-width: 100%;
97
- `;
98
101
  const FieldGroup = forwardRef(function FieldGroup({ children, description, banner, name, contextualLabel, additionalInfo, actions, collapsed, headingTag, onToggleCollapsed, variant, status, ...restProps }, ref) {
99
102
  const t = useI18n();
100
103
  const uid = useUID();
101
- const descAndChildren = (_jsxs(StyledFieldGroupContent, { container: { cols: 'minmax(0, 1fr)', gap: 2 }, children: [banner && _jsx(Banner, { ...banner }), description && (_jsx(StyledDescription, { id: `${uid}-description`, forwardedAs: 'p', content: description })), _jsx("div", { children: children })] }));
102
- return (_jsx(StyledGroupContainer, { border: variant === 'form-group', children: _jsxs(StyledFieldGroup, { "aria-label": contextualLabel || name, "aria-describedby": description ? `${uid}-description` : undefined, as: name ? 'fieldset' : 'div', ...restProps, ref: ref, children: [name && (_jsx(FieldGroupLegend, { collapsed: collapsed, actions: actions, additionalInfo: additionalInfo, name: name, contextualLabel: contextualLabel, children: typeof collapsed === 'boolean' ? (_jsx(StyledExpandButton, { type: 'button', variant: 'text', onClick: () => {
104
+ const descAndChildren = (_jsxs(StyledFieldGroupContent, { container: { cols: 'minmax(0, 1fr)', gap: 0.5 }, children: [banner && _jsx(Banner, { ...banner }), description && (_jsx(StyledDescription, { id: `${uid}-description`, forwardedAs: 'p', content: description })), _jsx(StyledFieldGroupChildren, { children: children })] }));
105
+ return (_jsx(StyledGroupContainer, { border: variant === 'form-group', children: _jsxs(StyledFieldGroup, { "aria-label": contextualLabel || name, "aria-describedby": description ? `${uid}-description` : undefined, as: name ? 'fieldset' : 'div', ...restProps, ref: ref, "$hasDescription": !!description, children: [name && (_jsx(FieldGroupLegend, { collapsed: collapsed, actions: actions, additionalInfo: additionalInfo, name: name, contextualLabel: contextualLabel, children: typeof collapsed === 'boolean' ? (_jsx(StyledExpandButton, { type: 'button', variant: 'text', onClick: () => {
103
106
  onToggleCollapsed?.();
104
107
  }, "aria-expanded": !collapsed, "aria-label": t(collapsed ? 'expand_noun' : 'collapse_noun', [
105
108
  contextualLabel || name
106
- ]), children: _jsxs(Flex, { container: { direction: 'row', alignItems: 'center', gap: 0.5 }, forwardedAs: 'span', children: [_jsx(Icon, { name: 'caret-right' }), status === 'error' ? _jsx(StyledErrorIcon, { name: 'warn-solid' }) : null, headingTag ? (_jsx(Text, { variant: headingTag, children: name })) : (_jsx(StyledFieldGroupName, { children: name }))] }) })) : (_jsxs(_Fragment, { children: [status === 'error' ? _jsx(StyledErrorIcon, { name: 'warn-solid' }) : null, headingTag ? (_jsx(Text, { variant: headingTag, children: name })) : (_jsx(StyledFieldGroupName, { children: name }))] })) })), typeof collapsed === 'boolean' ? (_jsx(ExpandCollapse, { collapsed: collapsed, children: descAndChildren })) : (descAndChildren)] }) }));
109
+ ]), children: _jsxs(Flex, { container: { direction: 'row', alignItems: 'center', gap: 0.5 }, forwardedAs: 'span', children: [_jsx(Icon, { name: 'caret-right' }), status === 'error' ? _jsx(StyledErrorIcon, { name: 'warn-solid' }) : null, headingTag ? (_jsx(Text, { variant: headingTag, children: name })) : (_jsx(StyledFieldGroupName, { variant: 'h3', forwardedAs: 'span', children: name }))] }) })) : (_jsxs(_Fragment, { children: [status === 'error' ? _jsx(StyledErrorIcon, { name: 'warn-solid' }) : null, headingTag ? (_jsx(Text, { variant: headingTag, children: name })) : (_jsx(StyledFieldGroupName, { variant: 'h3', forwardedAs: 'span', children: name }))] })) })), typeof collapsed === 'boolean' ? (_jsx(ExpandCollapse, { collapsed: collapsed, children: descAndChildren })) : (descAndChildren)] }) }));
107
110
  });
108
111
  export default FieldGroup;
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AO,EAAE,UAAU,YAAG,IAAI,GAAQ,CACzC,CAAC,CAAC,CAAC,CACF,KAAC,oBAAoB,cAAE,IAAI,GAAwB,CACpD,IACI,GACY,CACtB,CAAC,CAAC,CAAC,CACF,8BACG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,KAAC,eAAe,IAAC,IAAI,EAAC,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,EACjE,UAAU,CAAC,CAAC,CAAC,CACZ,KAAC,IAAI,IAAC,OAAO,EAAE,UAAU,YAAG,IAAI,GAAQ,CACzC,CAAC,CAAC,CAAC,CACF,KAAC,oBAAoB,cAAE,IAAI,GAAwB,CACpD,IACA,CACJ,GACgB,CACpB,EAEA,OAAO,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CAChC,KAAC,cAAc,IAAC,SAAS,EAAE,SAAS,YAAG,eAAe,GAAkB,CACzE,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,IACgB,GACE,CACxB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, Ref, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Text from '../Text';\nimport Button from '../Button';\nimport ExpandCollapse from '../ExpandCollapse';\nimport Flex from '../Flex';\nimport Grid from '../Grid';\nimport HTML from '../HTML';\nimport Icon, { StyledIcon, registerIcon } from '../Icon';\nimport Banner from '../Banner';\nimport type { BannerProps } from '../Banner';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport { defaultThemeProp } from '../../theme';\nimport type { BaseProps, ForwardRefForwardPropsComponent, HeadingTag } from '../../types';\nimport { useDirection, useI18n, useUID } from '../../hooks';\nimport { calculateFontSize, omitProps } from '../../styles';\nimport type { FontSize } from '../../styles';\nimport AdditionalInfo from '../AdditionalInfo';\nimport type { AdditionalInfoProps } from '../AdditionalInfo';\n\nregisterIcon(caretRightIcon);\nregisterIcon(warnSolidIcon);\n\n// Types\nexport type FieldGroupProps = BaseProps & {\n /** The content of the Field Group. */\n children: ReactNode;\n /** A description of the field group to be displayed above the controls. */\n description?: string;\n /** A banner to be displayed above the controls. */\n banner?: BannerProps;\n /** The display and markup variant to apply to the group. */\n variant?: 'form-group';\n /** Indicates validation status for error display in the header. */\n status?: 'error';\n /** A reference to the wrapping element. */\n ref?: Ref<HTMLFieldSetElement>;\n} & (\n | {\n /** The name associated with the Field Group. */\n name: string;\n /** Provides a contextual label for the name. */\n contextualLabel?: string;\n /** Select the heading tag for header */\n headingTag?: HeadingTag;\n /** Provides additional info relevant to the field group. */\n additionalInfo?: {\n heading?: AdditionalInfoProps['heading'];\n content: AdditionalInfoProps['children'];\n };\n /** An array of actions to add to the header. */\n actions?: ActionsProps['items'];\n /**\n * Controls the collapsed state of the field group.\n * Passing undefined will render the field group as non-collapsible.\n * @default false\n */\n collapsed?: boolean;\n /**\n * Called when user clicks the toggle button.\n */\n onToggleCollapsed?: () => void;\n }\n | {\n name?: undefined;\n contextualLabel?: never;\n headingTag?: never;\n additionalInfo?: never;\n actions?: never;\n collapsed?: never;\n onToggleCollapsed?: never;\n }\n );\n\ninterface FieldGroupLegendProps extends Pick<FieldGroupProps, 'collapsed'> {\n name: NonNullable<FieldGroupProps['name']>;\n actions?: ActionsProps['items'];\n children?: ReactNode;\n additionalInfo?: FieldGroupProps['additionalInfo'];\n contextualLabel?: FieldGroupProps['contextualLabel'];\n}\n\n// Styles\nconst StyledExpandButton = styled(Button)(({\n theme: {\n base: { animation }\n }\n}) => {\n const { rtl } = useDirection();\n return css`\n ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n &[aria-expanded='true'] ${StyledIcon}:first-child {\n transform: rotate(90deg);\n }\n &[aria-expanded='false'] ${StyledIcon}:first-child {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n});\n\nStyledExpandButton.defaultProps = defaultThemeProp;\n\nconst StyledErrorIcon = styled(Icon)(\n ({\n theme: {\n base: { palette }\n }\n }) => css`\n color: ${palette.urgent};\n `\n);\n\nStyledErrorIcon.defaultProps = defaultThemeProp;\n\nexport const StyledFieldGroupName = styled.span``;\n\nexport const StyledFieldHeader = styled(Flex)`\n word-break: break-word;\n`;\n\nexport const StyledFieldGroupContent = styled(Grid)``;\n\nexport const StyledFieldGroupLegend = styled.legend.withConfig(omitProps('collapsed'))<\n Pick<FieldGroupProps, 'collapsed'>\n>(\n ({\n collapsed,\n theme: {\n base: {\n spacing,\n animation,\n 'hit-area': { 'mouse-min': hitAreaMouse, 'finger-min': hitAreaFinger }\n }\n }\n }) => {\n return css`\n width: 100%;\n margin-bottom: 0;\n ${!collapsed &&\n css`\n margin-block-end: calc(1.5 * ${spacing});\n `}\n transition: margin-block-end ${animation.speed} ${animation.timing.ease};\n\n > ${StyledExpandButton} {\n min-height: ${hitAreaMouse};\n\n @media (pointer: 'coarse') {\n min-height: ${hitAreaFinger};\n }\n }\n `;\n }\n);\n\nStyledFieldGroupLegend.defaultProps = defaultThemeProp;\n\nexport const StyledFieldGroup = styled.fieldset(\n ({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale },\n components: { text }\n }\n }) => {\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n border: none;\n\n & ${StyledFieldGroupName} {\n font-size: ${fontSizes[text.h3['font-size'] as FontSize]};\n font-weight: ${text.h3['font-weight']};\n }\n `;\n }\n);\n\nStyledFieldGroup.defaultProps = defaultThemeProp;\n\nexport const StyledGroupContainer = styled.div<{ border?: boolean }>(({ theme, border }) => {\n const {\n base: {\n palette: { 'border-line': borderColor },\n spacing,\n 'border-radius': baseBorderRadius\n },\n components: {\n 'form-control': { 'border-width': borderWidth }\n }\n } = theme;\n if (!border) return null;\n\n return css`\n padding: ${spacing};\n border-radius: calc(${baseBorderRadius} / 2);\n border: ${borderWidth} solid ${borderColor};\n `;\n});\n\nStyledGroupContainer.defaultProps = defaultThemeProp;\n\n// Components\nconst FieldGroupLegend = ({\n name,\n contextualLabel,\n children,\n collapsed,\n actions,\n additionalInfo\n}: FieldGroupLegendProps) => {\n return (\n <StyledFieldGroupLegend collapsed={collapsed}>\n <Flex container={{ alignItems: 'center', justify: 'between', gap: 0.5 }}>\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as={StyledFieldHeader}>\n {children}\n {additionalInfo && (\n <AdditionalInfo\n heading={additionalInfo.heading}\n contextualLabel={contextualLabel || name}\n >\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </Flex>\n {actions && <Actions items={actions} contextualLabel={contextualLabel} />}\n </Flex>\n </StyledFieldGroupLegend>\n );\n};\n\nexport const StyledDescription = styled(HTML)`\n /* Prevent instruction text from contributing to modal width calculation */\n width: 0;\n min-width: 100%;\n`;\n\nconst FieldGroup: ForwardRefForwardPropsComponent<FieldGroupProps> = forwardRef(function FieldGroup(\n {\n children,\n description,\n banner,\n name,\n contextualLabel,\n additionalInfo,\n actions,\n collapsed,\n headingTag,\n onToggleCollapsed,\n variant,\n status,\n ...restProps\n }: PropsWithoutRef<FieldGroupProps>,\n ref: FieldGroupProps['ref']\n) {\n const t = useI18n();\n const uid = useUID();\n\n const descAndChildren = (\n <StyledFieldGroupContent container={{ cols: 'minmax(0, 1fr)', gap: 2 }}>\n {banner && <Banner {...banner} />}\n {description && (\n <StyledDescription id={`${uid}-description`} forwardedAs='p' content={description} />\n )}\n <div>{children}</div>\n </StyledFieldGroupContent>\n );\n\n return (\n <StyledGroupContainer border={variant === 'form-group'}>\n <StyledFieldGroup\n aria-label={contextualLabel || name}\n aria-describedby={description ? `${uid}-description` : undefined}\n as={name ? 'fieldset' : 'div'}\n {...restProps}\n ref={ref}\n >\n {name && (\n <FieldGroupLegend\n collapsed={collapsed}\n actions={actions}\n additionalInfo={additionalInfo}\n name={name}\n contextualLabel={contextualLabel}\n >\n {typeof collapsed === 'boolean' ? (\n <StyledExpandButton\n type='button'\n variant='text'\n onClick={() => {\n onToggleCollapsed?.();\n }}\n aria-expanded={!collapsed}\n aria-label={t(collapsed ? 'expand_noun' : 'collapse_noun', [\n contextualLabel || name\n ])}\n >\n <Flex\n container={{ direction: 'row', alignItems: 'center', gap: 0.5 }}\n forwardedAs='span'\n >\n <Icon name='caret-right' />\n {status === 'error' ? <StyledErrorIcon name='warn-solid' /> : null}\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName>{name}</StyledFieldGroupName>\n )}\n </Flex>\n </StyledExpandButton>\n ) : (\n <>\n {status === 'error' ? <StyledErrorIcon name='warn-solid' /> : null}\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName>{name}</StyledFieldGroupName>\n )}\n </>\n )}\n </FieldGroupLegend>\n )}\n\n {typeof collapsed === 'boolean' ? (\n <ExpandCollapse collapsed={collapsed}>{descAndChildren}</ExpandCollapse>\n ) : (\n descAndChildren\n )}\n </StyledFieldGroup>\n </StyledGroupContainer>\n );\n});\n\nexport default FieldGroup;\n"]}
1
+ {"version":3,"file":"FieldGroup.js","sourceRoot":"","sources":["../../../src/components/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,MAAM,MAAM,WAAW,CAAC;A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EAAC,MAAM,YAClD,IAAI,GACgB,CACxB,IACA,CACJ,GACgB,CACpB,EAEA,OAAO,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CAChC,KAAC,cAAc,IAAC,SAAS,EAAE,SAAS,YAAG,eAAe,GAAkB,CACzE,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,IACgB,GACE,CACxB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, Ref, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Text from '../Text';\nimport Button from '../Button';\nimport ExpandCollapse from '../ExpandCollapse';\nimport Flex from '../Flex';\nimport Grid from '../Grid';\nimport HTML from '../HTML';\nimport Icon, { StyledIcon, registerIcon } from '../Icon';\nimport Banner from '../Banner';\nimport type { BannerProps } from '../Banner';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport * as warnSolidIcon from '../Icon/icons/warn-solid.icon';\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport { defaultThemeProp } from '../../theme';\nimport type { BaseProps, ForwardRefForwardPropsComponent, HeadingTag } from '../../types';\nimport { useDirection, useI18n, useUID } from '../../hooks';\nimport { calculateFontSize, omitProps } from '../../styles';\nimport AdditionalInfo from '../AdditionalInfo';\nimport type { AdditionalInfoProps } from '../AdditionalInfo';\n\nregisterIcon(caretRightIcon);\nregisterIcon(warnSolidIcon);\n\n// Types\nexport type FieldGroupProps = BaseProps & {\n /** The content of the Field Group. */\n children: ReactNode;\n /** A description of the field group to be displayed above the controls. */\n description?: string;\n /** A banner to be displayed above the controls. */\n banner?: BannerProps;\n /** The display and markup variant to apply to the group. */\n variant?: 'form-group';\n /** Indicates validation status for error display in the header. */\n status?: 'error';\n /** A reference to the wrapping element. */\n ref?: Ref<HTMLFieldSetElement>;\n} & (\n | {\n /** The name associated with the Field Group. */\n name: string;\n /** Provides a contextual label for the name. */\n contextualLabel?: string;\n /** Select the heading tag for header */\n headingTag?: HeadingTag;\n /** Provides additional info relevant to the field group. */\n additionalInfo?: {\n heading?: AdditionalInfoProps['heading'];\n content: AdditionalInfoProps['children'];\n };\n /** An array of actions to add to the header. */\n actions?: ActionsProps['items'];\n /**\n * Controls the collapsed state of the field group.\n * Passing undefined will render the field group as non-collapsible.\n * @default false\n */\n collapsed?: boolean;\n /**\n * Called when user clicks the toggle button.\n */\n onToggleCollapsed?: () => void;\n }\n | {\n name?: undefined;\n contextualLabel?: never;\n headingTag?: never;\n additionalInfo?: never;\n actions?: never;\n collapsed?: never;\n onToggleCollapsed?: never;\n }\n );\n\ninterface FieldGroupLegendProps extends Pick<FieldGroupProps, 'collapsed'> {\n name: NonNullable<FieldGroupProps['name']>;\n actions?: ActionsProps['items'];\n children?: ReactNode;\n additionalInfo?: FieldGroupProps['additionalInfo'];\n contextualLabel?: FieldGroupProps['contextualLabel'];\n}\n\nexport const StyledDescription = styled(HTML)(({ theme }) => {\n const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n /* Prevent instruction text from contributing to modal width calculation */\n width: 0;\n min-width: 100%;\n color: rgb(from currentColor r g b / ${theme.base.transparency['transparent-2']});\n font-size: ${fontSizes.xs};\n `;\n});\n\nStyledDescription.defaultProps = defaultThemeProp;\n\nexport const StyledFieldGroupChildren = styled.div``;\n\n// Styles\nconst StyledExpandButton = styled(Button)(({\n theme: {\n base: { animation }\n }\n}) => {\n const { rtl } = useDirection();\n return css`\n ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n &[aria-expanded='true'] ${StyledIcon}:first-child {\n transform: rotate(90deg);\n }\n &[aria-expanded='false'] ${StyledIcon}:first-child {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n});\n\nStyledExpandButton.defaultProps = defaultThemeProp;\n\nconst StyledErrorIcon = styled(Icon)(\n ({\n theme: {\n base: { palette }\n }\n }) => css`\n color: ${palette.urgent};\n `\n);\n\nStyledErrorIcon.defaultProps = defaultThemeProp;\n\nexport const StyledFieldGroupName = styled(Text)``;\n\nexport const StyledFieldHeader = styled(Flex)`\n word-break: break-word;\n`;\n\nexport const StyledFieldGroupContent = styled(Grid)``;\n\nexport const StyledFieldGroupLegend = styled.legend.withConfig(omitProps('collapsed'))<\n Pick<FieldGroupProps, 'collapsed'>\n>(\n ({\n theme: {\n base: {\n animation,\n 'hit-area': { 'mouse-min': hitAreaMouse, 'finger-min': hitAreaFinger }\n }\n }\n }) => {\n return css`\n width: 100%;\n transition: margin-block-end ${animation.speed} ${animation.timing.ease};\n\n > ${StyledExpandButton} {\n min-height: ${hitAreaMouse};\n\n @media (pointer: 'coarse') {\n min-height: ${hitAreaFinger};\n }\n }\n `;\n }\n);\n\nStyledFieldGroupLegend.defaultProps = defaultThemeProp;\n\nexport const StyledFieldGroup = styled.fieldset<{ $hasDescription?: boolean }>(\n ({ theme, $hasDescription }) => {\n return css`\n border: none;\n\n ${!$hasDescription &&\n css`\n & > ${StyledFieldGroupLegend}:not(:has([aria-expanded='false'])) {\n margin-block-end: calc(${theme.base.spacing} / 2);\n }\n `}\n `;\n }\n);\n\nStyledFieldGroup.defaultProps = defaultThemeProp;\n\nexport const StyledGroupContainer = styled.div<{ border?: boolean }>(({ theme, border }) => {\n if (!border) return null;\n\n return css`\n padding: calc(2 * ${theme.base.spacing});\n border-radius: calc(${theme.base['border-radius']} / 2);\n border: ${theme.components['form-control']['border-width']} solid\n ${theme.base.palette['border-line']};\n `;\n});\n\nStyledGroupContainer.defaultProps = defaultThemeProp;\n\n// Components\nconst FieldGroupLegend = ({\n name,\n contextualLabel,\n children,\n collapsed,\n actions,\n additionalInfo\n}: FieldGroupLegendProps) => {\n return (\n <StyledFieldGroupLegend collapsed={collapsed}>\n <Flex container={{ alignItems: 'center', justify: 'between', gap: 0.5 }}>\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as={StyledFieldHeader}>\n {children}\n {additionalInfo && (\n <AdditionalInfo\n heading={additionalInfo.heading}\n contextualLabel={contextualLabel || name}\n >\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </Flex>\n {actions && <Actions items={actions} contextualLabel={contextualLabel} />}\n </Flex>\n </StyledFieldGroupLegend>\n );\n};\n\nconst FieldGroup: ForwardRefForwardPropsComponent<FieldGroupProps> = forwardRef(function FieldGroup(\n {\n children,\n description,\n banner,\n name,\n contextualLabel,\n additionalInfo,\n actions,\n collapsed,\n headingTag,\n onToggleCollapsed,\n variant,\n status,\n ...restProps\n }: PropsWithoutRef<FieldGroupProps>,\n ref: FieldGroupProps['ref']\n) {\n const t = useI18n();\n const uid = useUID();\n\n const descAndChildren = (\n <StyledFieldGroupContent container={{ cols: 'minmax(0, 1fr)', gap: 0.5 }}>\n {banner && <Banner {...banner} />}\n {description && (\n <StyledDescription id={`${uid}-description`} forwardedAs='p' content={description} />\n )}\n <StyledFieldGroupChildren>{children}</StyledFieldGroupChildren>\n </StyledFieldGroupContent>\n );\n\n return (\n <StyledGroupContainer border={variant === 'form-group'}>\n <StyledFieldGroup\n aria-label={contextualLabel || name}\n aria-describedby={description ? `${uid}-description` : undefined}\n as={name ? 'fieldset' : 'div'}\n {...restProps}\n ref={ref}\n $hasDescription={!!description}\n >\n {name && (\n <FieldGroupLegend\n collapsed={collapsed}\n actions={actions}\n additionalInfo={additionalInfo}\n name={name}\n contextualLabel={contextualLabel}\n >\n {typeof collapsed === 'boolean' ? (\n <StyledExpandButton\n type='button'\n variant='text'\n onClick={() => {\n onToggleCollapsed?.();\n }}\n aria-expanded={!collapsed}\n aria-label={t(collapsed ? 'expand_noun' : 'collapse_noun', [\n contextualLabel || name\n ])}\n >\n <Flex\n container={{ direction: 'row', alignItems: 'center', gap: 0.5 }}\n forwardedAs='span'\n >\n <Icon name='caret-right' />\n {status === 'error' ? <StyledErrorIcon name='warn-solid' /> : null}\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName variant='h3' forwardedAs='span'>\n {name}\n </StyledFieldGroupName>\n )}\n </Flex>\n </StyledExpandButton>\n ) : (\n <>\n {status === 'error' ? <StyledErrorIcon name='warn-solid' /> : null}\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName variant='h3' forwardedAs='span'>\n {name}\n </StyledFieldGroupName>\n )}\n </>\n )}\n </FieldGroupLegend>\n )}\n\n {typeof collapsed === 'boolean' ? (\n <ExpandCollapse collapsed={collapsed}>{descAndChildren}</ExpandCollapse>\n ) : (\n descAndChildren\n )}\n </StyledFieldGroup>\n </StyledGroupContainer>\n );\n});\n\nexport default FieldGroup;\n"]}
@@ -88,7 +88,7 @@ export const StyledListItem = styled.li(({ theme, depth, listGroupIndex, shouldH
88
88
  ${StyledFieldHeader} {
89
89
  margin-inline-start: calc(0.5 * ${spacing});
90
90
  padding-inline: ${spacing};
91
- height: calc(4 * ${spacing});
91
+ padding-block: ${spacing};
92
92
  border-start-end-radius: calc(0.5 * ${borderRadius});
93
93
  border-end-end-radius: calc(0.5 * ${borderRadius});
94
94
  background: ${bgColor};