@pega/cosmos-react-core 4.0.0-dev.14.0 → 4.0.0-dev.14.2

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 (215) hide show
  1. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  2. package/lib/components/AppShell/AppHeader.styles.js +0 -2
  3. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  4. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  5. package/lib/components/AppShell/AppShell.styles.js +0 -4
  6. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  7. package/lib/components/AppShell/AppShell.types.d.ts +6 -5
  8. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  9. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  10. package/lib/components/AppShell/AppShellList.d.ts +1 -1
  11. package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
  12. package/lib/components/AppShell/AppShellList.js.map +1 -1
  13. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
  14. package/lib/components/AppShell/AppShellList.styles.js +0 -1
  15. package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
  16. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  17. package/lib/components/AppShell/NavigationList.js.map +1 -1
  18. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  19. package/lib/components/AppShell/NavigationListItemWrapper.js +31 -11
  20. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  21. package/lib/components/AppShell/Operator.d.ts.map +1 -1
  22. package/lib/components/AppShell/Operator.js +1 -3
  23. package/lib/components/AppShell/Operator.js.map +1 -1
  24. package/lib/components/Avatar/Avatar.d.ts +2 -2
  25. package/lib/components/Avatar/Avatar.js.map +1 -1
  26. package/lib/components/Backdrop/Backdrop.d.ts +9 -21
  27. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  28. package/lib/components/Backdrop/Backdrop.js +0 -2
  29. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  30. package/lib/components/Badges/Count.d.ts +1 -1
  31. package/lib/components/Badges/Count.js.map +1 -1
  32. package/lib/components/Banner/Banner.d.ts +1 -1
  33. package/lib/components/Banner/Banner.js.map +1 -1
  34. package/lib/components/Boolean/BooleanDisplay.d.ts +2 -2
  35. package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
  36. package/lib/components/Button/BareButton.d.ts +1 -1
  37. package/lib/components/Button/BareButton.js.map +1 -1
  38. package/lib/components/Button/Button.d.ts +4 -8
  39. package/lib/components/Button/Button.d.ts.map +1 -1
  40. package/lib/components/Button/Button.js.map +1 -1
  41. package/lib/components/ColorPicker/ColorPicker.d.ts +1 -1
  42. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  43. package/lib/components/CompositeInput/CompositeInput.types.d.ts +2 -6
  44. package/lib/components/CompositeInput/CompositeInput.types.d.ts.map +1 -1
  45. package/lib/components/CompositeInput/CompositeInput.types.js.map +1 -1
  46. package/lib/components/Configuration/Configuration.d.ts +9 -27
  47. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  48. package/lib/components/Configuration/Configuration.js.map +1 -1
  49. package/lib/components/CreditCard/utils.d.ts +1 -1
  50. package/lib/components/CreditCard/utils.d.ts.map +1 -1
  51. package/lib/components/CreditCard/utils.js +1 -1
  52. package/lib/components/CreditCard/utils.js.map +1 -1
  53. package/lib/components/Currency/CurrencyInput.types.d.ts +3 -7
  54. package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
  55. package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
  56. package/lib/components/DateTime/DateTimeDisplay.d.ts +4 -10
  57. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  58. package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
  59. package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -3
  60. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  61. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  62. package/lib/components/DateTime/Input/TimeInput.d.ts +1 -3
  63. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  64. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  65. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +1 -3
  66. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  67. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  68. package/lib/components/DateTime/Input/usePickerButton.js +3 -3
  69. package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
  70. package/lib/components/DateTime/Picker/Calendar.d.ts +4 -6
  71. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  72. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  73. package/lib/components/DateTime/Picker/DatePicker.types.d.ts +2 -4
  74. package/lib/components/DateTime/Picker/DatePicker.types.d.ts.map +1 -1
  75. package/lib/components/DateTime/Picker/DatePicker.types.js.map +1 -1
  76. package/lib/components/DateTime/Picker/TimePicker.d.ts +1 -3
  77. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  78. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  79. package/lib/components/DateTime/Picker/Weeks.d.ts +1 -3
  80. package/lib/components/DateTime/Picker/Weeks.d.ts.map +1 -1
  81. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  82. package/lib/components/DateTime/Picker/utils.js +1 -1
  83. package/lib/components/DateTime/Picker/utils.js.map +1 -1
  84. package/lib/components/Dialog/Dialog.types.d.ts +11 -33
  85. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  86. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  87. package/lib/components/Dialog/InfoDialog.js +1 -1
  88. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  89. package/lib/components/Drawer/Drawer.d.ts +9 -9
  90. package/lib/components/Drawer/Drawer.d.ts.map +1 -1
  91. package/lib/components/Drawer/Drawer.js.map +1 -1
  92. package/lib/components/Email/EmailDisplay.d.ts +1 -1
  93. package/lib/components/Email/EmailDisplay.js.map +1 -1
  94. package/lib/components/EmojiPicker/EmojiPicker.styles.d.ts.map +1 -1
  95. package/lib/components/EmojiPicker/EmojiPicker.styles.js +1 -6
  96. package/lib/components/EmojiPicker/EmojiPicker.styles.js.map +1 -1
  97. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts +6 -6
  98. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
  99. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  100. package/lib/components/FieldGroup/FieldGroup.d.ts +1 -3
  101. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  102. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  103. package/lib/components/FieldValueList/FieldValueList.d.ts +1 -1
  104. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  105. package/lib/components/File/FileDisplay.d.ts +2 -2
  106. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  107. package/lib/components/File/FileDisplay.js.map +1 -1
  108. package/lib/components/File/FileInput.d.ts +1 -3
  109. package/lib/components/File/FileInput.d.ts.map +1 -1
  110. package/lib/components/File/FileInput.js.map +1 -1
  111. package/lib/components/FormControl/FormControl.d.ts +3 -2
  112. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  113. package/lib/components/FormControl/FormControl.js.map +1 -1
  114. package/lib/components/FormField/FormField.d.ts +2 -2
  115. package/lib/components/FormField/FormField.d.ts.map +1 -1
  116. package/lib/components/FormField/FormField.js +10 -14
  117. package/lib/components/FormField/FormField.js.map +1 -1
  118. package/lib/components/Grid/Grid.d.ts.map +1 -1
  119. package/lib/components/Grid/Grid.js +0 -3
  120. package/lib/components/Grid/Grid.js.map +1 -1
  121. package/lib/components/Grid/Grid.types.d.ts +6 -6
  122. package/lib/components/Grid/Grid.types.js.map +1 -1
  123. package/lib/components/Input/Input.d.ts +1 -1
  124. package/lib/components/Input/Input.js.map +1 -1
  125. package/lib/components/Label/Label.d.ts +1 -1
  126. package/lib/components/Label/Label.js.map +1 -1
  127. package/lib/components/Lightbox/Lightbox.types.d.ts +1 -1
  128. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  129. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  130. package/lib/components/Link/Link.d.ts +1 -1
  131. package/lib/components/Link/Link.js.map +1 -1
  132. package/lib/components/ListToolbar/ListToolbar.types.d.ts +2 -2
  133. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  134. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  135. package/lib/components/Location/LocationDisplay.d.ts +1 -1
  136. package/lib/components/Location/LocationDisplay.js.map +1 -1
  137. package/lib/components/Location/utils.d.ts +1 -1
  138. package/lib/components/Location/utils.d.ts.map +1 -1
  139. package/lib/components/Location/utils.js +1 -1
  140. package/lib/components/Location/utils.js.map +1 -1
  141. package/lib/components/Menu/Menu.types.d.ts +6 -12
  142. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  143. package/lib/components/Menu/Menu.types.js.map +1 -1
  144. package/lib/components/MenuButton/MenuButton.d.ts +1 -1
  145. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  146. package/lib/components/Modal/Modal.d.ts.map +1 -1
  147. package/lib/components/Modal/Modal.js +3 -5
  148. package/lib/components/Modal/Modal.js.map +1 -1
  149. package/lib/components/Modal/Modal.types.d.ts +25 -71
  150. package/lib/components/Modal/Modal.types.d.ts.map +1 -1
  151. package/lib/components/Modal/Modal.types.js.map +1 -1
  152. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
  153. package/lib/components/MultiStepForm/HorizontalFormProgress.js +4 -0
  154. package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
  155. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  156. package/lib/components/MultiStepForm/MultiStepForm.js +1 -1
  157. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  158. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +1 -1
  159. package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
  160. package/lib/components/Phone/PhoneDisplay.d.ts +1 -1
  161. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  162. package/lib/components/Popover/Popover.d.ts +4 -4
  163. package/lib/components/Popover/Popover.d.ts.map +1 -1
  164. package/lib/components/Popover/Popover.js +16 -1
  165. package/lib/components/Popover/Popover.js.map +1 -1
  166. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  167. package/lib/components/Popover/modifiers.js +25 -6
  168. package/lib/components/Popover/modifiers.js.map +1 -1
  169. package/lib/components/Progress/Progress.types.d.ts +2 -2
  170. package/lib/components/Progress/Progress.types.js.map +1 -1
  171. package/lib/components/SearchInput/SearchInput.d.ts +1 -1
  172. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  173. package/lib/components/Skeleton/LineSkeleton.d.ts +2 -2
  174. package/lib/components/Skeleton/LineSkeleton.js.map +1 -1
  175. package/lib/components/Skeleton/RectangleSkeleton.d.ts +3 -3
  176. package/lib/components/Skeleton/RectangleSkeleton.js.map +1 -1
  177. package/lib/components/Slider/Slider.types.d.ts +3 -9
  178. package/lib/components/Slider/Slider.types.d.ts.map +1 -1
  179. package/lib/components/Slider/Slider.types.js.map +1 -1
  180. package/lib/components/SummaryItem/SummaryItem.d.ts +2 -1
  181. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  182. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  183. package/lib/components/SummaryList/SummaryList.d.ts +2 -2
  184. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  185. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  186. package/lib/components/Table/Table.d.ts +1 -1
  187. package/lib/components/Table/Table.js.map +1 -1
  188. package/lib/components/Tabs/TabPanel.d.ts +1 -1
  189. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  190. package/lib/components/Tabs/TabPanel.js.map +1 -1
  191. package/lib/components/Tabs/Tabs.types.d.ts +1 -1
  192. package/lib/components/Tabs/Tabs.types.js.map +1 -1
  193. package/lib/components/Text/Text.d.ts +2 -4
  194. package/lib/components/Text/Text.d.ts.map +1 -1
  195. package/lib/components/Text/Text.js.map +1 -1
  196. package/lib/components/Toaster/Toaster.types.d.ts +1 -1
  197. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  198. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  199. package/lib/components/Tooltip/Tooltip.d.ts +3 -3
  200. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  201. package/lib/components/URL/URLDisplay.d.ts +1 -1
  202. package/lib/components/URL/URLDisplay.js +2 -2
  203. package/lib/components/URL/URLDisplay.js.map +1 -1
  204. package/lib/hooks/useArrows.js +1 -1
  205. package/lib/hooks/useArrows.js.map +1 -1
  206. package/lib/i18n/translate.d.ts +2 -6
  207. package/lib/i18n/translate.d.ts.map +1 -1
  208. package/lib/i18n/translate.js.map +1 -1
  209. package/lib/types/types.d.ts.map +1 -1
  210. package/lib/types/types.js.map +1 -1
  211. package/lib/utils/kebabToCamel.d.ts +1 -3
  212. package/lib/utils/kebabToCamel.d.ts.map +1 -1
  213. package/lib/utils/kebabToCamel.js +1 -3
  214. package/lib/utils/kebabToCamel.js.map +1 -1
  215. package/package.json +1 -1
@@ -15,33 +15,33 @@ export interface DrawerProps extends AsProp, BaseProps {
15
15
  shadow?: boolean;
16
16
  /**
17
17
  * Used to determine which side of the viewport the Drawer should open from.
18
- * @default "right"
18
+ * @default 'right'
19
19
  */
20
20
  placement?: 'top' | 'right' | 'bottom' | 'left';
21
21
  /**
22
22
  * The position of the Drawer.
23
- * @default "absolute"
23
+ * @default 'absolute'
24
24
  */
25
25
  position?: 'absolute' | 'fixed';
26
26
  /**
27
27
  * Determines the speed of the transition. This value comes from `theme.base.animation.speed`.
28
- * @default "0.25s"
28
+ * @default '0.25s'
29
29
  */
30
30
  transitionSpeed?: string;
31
31
  /**
32
32
  * The width or height that the Drawer will open to, depending on its placement.
33
- * @default "100%"
33
+ * @default '100%'
34
34
  */
35
35
  size?: string;
36
- /** Callback fired after Drawer opens. */
36
+ /** Callback fired after Drawer opens. */
37
37
  onAfterOpen?: () => void;
38
- /** Callback fired after Drawer closes. */
38
+ /** Callback fired after Drawer closes. */
39
39
  onAfterClose?: () => void;
40
- /** Callback fired before Drawer opens. */
40
+ /** Callback fired before Drawer opens. */
41
41
  onBeforeOpen?: () => void;
42
- /** Callback fired before Drawer closes. */
42
+ /** Callback fired before Drawer closes. */
43
43
  onBeforeClose?: () => void;
44
- /** Callback fired when a click action occurs outside of the Drawer. */
44
+ /** Callback fired when a click action occurs outside of the Drawer. */
45
45
  onOuterClick?: () => void;
46
46
  /**
47
47
  * If true, removes the component from the real DOM when closed. For full virtual DOM unmount(if necessary), perform at a parent level.
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAEjB,SAAS,EAGV,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI9D,MAAM,WAAW,WAAY,SAAQ,MAAM,EAAE,SAAS;IACpD;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,W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AC;SACjB;aAAM,IAAI,CAAC,IAAI,IAAI,KAAK,KAAK,QAAQ,IAAI,SAAS,KAAK,QAAQ,EAAE;YAChE,YAAY,EAAE,EAAE,CAAC;SAClB;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;IAErF,MAAM,eAAe,GAAG,WAAW,CACjC,CAAC,CAAkB,EAAQ,EAAE;QAC3B,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,OAAO,IAAI,CAAC,CAAC,YAAY,KAAK,WAAW;YAAE,OAAO;QAC7E,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,EACD,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC5D,KAAC,YAAY,IACX,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,IAAI,IAAI,EACtB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,KAC5B,SAAS,YAEZ,QAAQ,GACI,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import {\n useEffect,\n Ref,\n useCallback,\n FunctionComponent,\n forwardRef,\n ReactNode,\n TransitionEvent,\n useState\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { useOuterEvent, useConsolidatedRef, usePrevious } from '../../hooks';\nimport { AsProp, BaseProps, ForwardProps } from '../../types';\nimport { reflow } from '../../utils';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface DrawerProps extends AsProp, BaseProps {\n /**\n * If true, the Drawer will be visible.\n * @default false\n */\n open: boolean;\n /** Content of the Drawer. */\n children?: ReactNode;\n /**\n * Determines whether a drop shadow should be visible along the edge of the Drawer for contrast purposes.\n * @default false\n */\n shadow?: boolean;\n /**\n * Used to determine which side of the viewport the Drawer should open from.\n * @default \"right\"\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * The position of the Drawer.\n * @default \"absolute\"\n */\n position?: 'absolute' | 'fixed';\n /**\n * Determines the speed of the transition. This value comes from `theme.base.animation.speed`.\n * @default \"0.25s\"\n */\n transitionSpeed?: string;\n /**\n * The width or height that the Drawer will open to, depending on its placement.\n * @default \"100%\"\n */\n size?: string;\n /** Callback fired after Drawer opens. */\n onAfterOpen?: () => void;\n /** Callback fired after Drawer closes. */\n onAfterClose?: () => void;\n /** Callback fired before Drawer opens. */\n onBeforeOpen?: () => void;\n /** Callback fired before Drawer closes. */\n onBeforeClose?: () => void;\n /** Callback fired when a click action occurs outside of the Drawer. */\n onOuterClick?: () => void;\n /**\n * If true, removes the component from the real DOM when closed. For full virtual DOM unmount(if necessary), perform at a parent level.\n * @default false\n */\n nullWhenClosed?: boolean;\n}\n\ntype State = 'open' | 'closed' | 'opening' | 'closing';\n\nexport const StyledDrawer = styled.div<Partial<DrawerProps & { state: State }>>(props => {\n const { state, shadow, position, placement, transitionSpeed, size, theme } = props;\n let dimension = 'horizontal';\n let axis = 'X';\n let anchor = 'top';\n\n if (placement === 'top' || placement === 'bottom') {\n dimension = 'vertical';\n axis = 'Y';\n anchor = 'left';\n }\n\n const translate = state === 'open' || state === 'opening' ? 0 : '100%';\n const speed = transitionSpeed || theme.base.animation.speed;\n\n return css`\n z-index: ${theme.base['z-index'].drawer};\n position: ${position};\n ${placement}: 0;\n ${anchor}: 0;\n height: ${dimension === 'vertical' ? size : '100%'};\n width: ${dimension === 'horizontal' ? size : '100%'};\n transition-property: transform, box-shadow, opacity;\n transition-duration: max(${speed}, 0.0001s);\n transition-timing-function: ${theme.base.animation.timing.ease};\n transform: ${state === 'open'\n ? 'none'\n : `translate${axis}(${placement === 'top' || placement === 'left' ? '-' : ''}${translate})`};\n\n ${shadow &&\n css`\n box-shadow: ${theme.base.shadow.high};\n `}\n `;\n});\n\nStyledDrawer.defaultProps = defaultThemeProp;\n\nconst Drawer: FunctionComponent<DrawerProps & ForwardProps> = forwardRef(\n (props: DrawerProps, ref: Ref<HTMLElement>) => {\n const {\n open = false,\n shadow = false,\n position = 'absolute',\n children,\n placement = 'right',\n transitionSpeed,\n size = '100%',\n onAfterOpen,\n onAfterClose,\n onBeforeOpen,\n onBeforeClose,\n onOuterClick,\n nullWhenClosed = false,\n ...restProps\n } = props;\n\n const drawerRef = useConsolidatedRef(ref);\n\n const [state, setState] = useState<State>(open ? 'open' : 'closed');\n\n let prevState = usePrevious(state);\n if (!prevState) prevState = state;\n\n useOuterEvent(\n 'mousedown',\n [drawerRef.current],\n useCallback(() => {\n if (open) onOuterClick?.();\n }, [open, onOuterClick])\n );\n\n useEffect(() => {\n if (open && (state === 'closed' || state === 'closing')) {\n onBeforeOpen?.();\n reflow(drawerRef.current);\n setState('opening');\n } else if (!open && (state === 'open' || state === 'opening')) {\n onBeforeClose?.();\n setState('closing');\n } else if (open && state === 'open' && prevState !== 'open') {\n onAfterOpen?.();\n } else if (!open && state === 'closed' && prevState !== 'closed') {\n onAfterClose?.();\n }\n }, [open, state, prevState, onBeforeOpen, onBeforeClose, onAfterOpen, onAfterClose]);\n\n const onTransitionEnd = useCallback(\n (e: TransitionEvent): void => {\n if (e.target !== drawerRef.current || e.propertyName !== 'transform') return;\n setState(open ? 'open' : 'closed');\n },\n [open]\n );\n\n return state === 'closed' && !open && nullWhenClosed ? null : (\n <StyledDrawer\n ref={drawerRef}\n position={position}\n shadow={shadow && open}\n transitionSpeed={transitionSpeed}\n placement={placement}\n size={size}\n open={open}\n state={state}\n onTransitionEnd={onTransitionEnd}\n {...restProps}\n >\n {children}\n </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C,CACP,CAAC;IAEF,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC5D,KAAC,YAAY,IACX,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,IAAI,IAAI,EACtB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,KAC5B,SAAS,YAEZ,QAAQ,GACI,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import {\n useEffect,\n Ref,\n useCallback,\n FunctionComponent,\n forwardRef,\n ReactNode,\n TransitionEvent,\n useState\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { useOuterEvent, useConsolidatedRef, usePrevious } from '../../hooks';\nimport { AsProp, BaseProps, ForwardProps } from '../../types';\nimport { reflow } from '../../utils';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface DrawerProps extends AsProp, BaseProps {\n /**\n * If true, the Drawer will be visible.\n * @default false\n */\n open: boolean;\n /** Content of the Drawer. */\n children?: ReactNode;\n /**\n * Determines whether a drop shadow should be visible along the edge of the Drawer for contrast purposes.\n * @default false\n */\n shadow?: boolean;\n /**\n * Used to determine which side of the viewport the Drawer should open from.\n * @default 'right'\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * The position of the Drawer.\n * @default 'absolute'\n */\n position?: 'absolute' | 'fixed';\n /**\n * Determines the speed of the transition. This value comes from `theme.base.animation.speed`.\n * @default '0.25s'\n */\n transitionSpeed?: string;\n /**\n * The width or height that the Drawer will open to, depending on its placement.\n * @default '100%'\n */\n size?: string;\n /** Callback fired after Drawer opens. */\n onAfterOpen?: () => void;\n /** Callback fired after Drawer closes. */\n onAfterClose?: () => void;\n /** Callback fired before Drawer opens. */\n onBeforeOpen?: () => void;\n /** Callback fired before Drawer closes. */\n onBeforeClose?: () => void;\n /** Callback fired when a click action occurs outside of the Drawer. */\n onOuterClick?: () => void;\n /**\n * If true, removes the component from the real DOM when closed. For full virtual DOM unmount(if necessary), perform at a parent level.\n * @default false\n */\n nullWhenClosed?: boolean;\n}\n\ntype State = 'open' | 'closed' | 'opening' | 'closing';\n\nexport const StyledDrawer = styled.div<Partial<DrawerProps & { state: State }>>(props => {\n const { state, shadow, position, placement, transitionSpeed, size, theme } = props;\n let dimension = 'horizontal';\n let axis = 'X';\n let anchor = 'top';\n\n if (placement === 'top' || placement === 'bottom') {\n dimension = 'vertical';\n axis = 'Y';\n anchor = 'left';\n }\n\n const translate = state === 'open' || state === 'opening' ? 0 : '100%';\n const speed = transitionSpeed || theme.base.animation.speed;\n\n return css`\n z-index: ${theme.base['z-index'].drawer};\n position: ${position};\n ${placement}: 0;\n ${anchor}: 0;\n height: ${dimension === 'vertical' ? size : '100%'};\n width: ${dimension === 'horizontal' ? size : '100%'};\n transition-property: transform, box-shadow, opacity;\n transition-duration: max(${speed}, 0.0001s);\n transition-timing-function: ${theme.base.animation.timing.ease};\n transform: ${state === 'open'\n ? 'none'\n : `translate${axis}(${placement === 'top' || placement === 'left' ? '-' : ''}${translate})`};\n\n ${shadow &&\n css`\n box-shadow: ${theme.base.shadow.high};\n `}\n `;\n});\n\nStyledDrawer.defaultProps = defaultThemeProp;\n\nconst Drawer: FunctionComponent<DrawerProps & ForwardProps> = forwardRef(\n (props: DrawerProps, ref: Ref<HTMLElement>) => {\n const {\n open = false,\n shadow = false,\n position = 'absolute',\n children,\n placement = 'right',\n transitionSpeed,\n size = '100%',\n onAfterOpen,\n onAfterClose,\n onBeforeOpen,\n onBeforeClose,\n onOuterClick,\n nullWhenClosed = false,\n ...restProps\n } = props;\n\n const drawerRef = useConsolidatedRef(ref);\n\n const [state, setState] = useState<State>(open ? 'open' : 'closed');\n\n let prevState = usePrevious(state);\n if (!prevState) prevState = state;\n\n useOuterEvent(\n 'mousedown',\n [drawerRef.current],\n useCallback(() => {\n if (open) onOuterClick?.();\n }, [open, onOuterClick])\n );\n\n useEffect(() => {\n if (open && (state === 'closed' || state === 'closing')) {\n onBeforeOpen?.();\n reflow(drawerRef.current);\n setState('opening');\n } else if (!open && (state === 'open' || state === 'opening')) {\n onBeforeClose?.();\n setState('closing');\n } else if (open && state === 'open' && prevState !== 'open') {\n onAfterOpen?.();\n } else if (!open && state === 'closed' && prevState !== 'closed') {\n onAfterClose?.();\n }\n }, [open, state, prevState, onBeforeOpen, onBeforeClose, onAfterOpen, onAfterClose]);\n\n const onTransitionEnd = useCallback(\n (e: TransitionEvent): void => {\n if (e.target !== drawerRef.current || e.propertyName !== 'transform') return;\n setState(open ? 'open' : 'closed');\n },\n [open]\n );\n\n return state === 'closed' && !open && nullWhenClosed ? null : (\n <StyledDrawer\n ref={drawerRef}\n position={position}\n shadow={shadow && open}\n transitionSpeed={transitionSpeed}\n placement={placement}\n size={size}\n open={open}\n state={state}\n onTransitionEnd={onTransitionEnd}\n {...restProps}\n >\n {children}\n </StyledDrawer>\n );\n }\n);\n\nexport default Drawer;\n"]}
@@ -7,7 +7,7 @@ export interface EmailDisplayProps extends BaseProps, NoChildrenProp {
7
7
  displayText?: string;
8
8
  /**
9
9
  * Controls styling of the field.
10
- * @default "link"
10
+ * @default 'link'
11
11
  */
12
12
  variant?: 'link' | 'text';
13
13
  /** Ref for the wrapping element. */
@@ -1 +1 @@
1
- {"version":3,"file":"EmailDisplay.js","sourceRoot":"","sources":["../../../src/components/Email/EmailDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAG5E,OAAO,IAAI,MAAM,SAAS,CAAC;AAgB3B,MAAM,YAAY,GAAwD,UAAU,CAClF,CACE,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS,EAAsC,EAC1F,GAA6B,EAC7B,EAAE;IACF,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,CAC3B,WAAW,IAAI,KAAK,CACrB,CAAC,CAAC,CAAC,CACF,8BAAkB,MAAM,6BAAsB,CAC/C,CAAC;IACF,OAAO,OAAO,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACpC,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,YAAY,GACR,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,GAA6B,KAAM,SAAS,EAAE,IAAI,EAAE,UAAU,KAAK,EAAE,YAC7E,YAAY,GACR,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Link from '../Link';\n\nexport interface EmailDisplayProps extends BaseProps, NoChildrenProp {\n /** Email address, no 'mailto:' scheme */\n value?: string;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Controls styling of the field.\n * @default \"link\"\n */\n variant?: 'link' | 'text';\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst EmailDisplay: FunctionComponent<EmailDisplayProps & ForwardProps> = forwardRef(\n (\n { value, displayText, variant = 'link', ...restProps }: PropsWithoutRef<EmailDisplayProps>,\n ref: EmailDisplayProps['ref']\n ) => {\n const displayValue = value ? (\n displayText || value\n ) : (\n <span aria-hidden='true'>&ndash;&ndash;</span>\n );\n return variant === 'text' || !value ? (\n <span ref={ref} {...restProps}>\n {displayValue}\n </span>\n ) : (\n <Link ref={ref as Ref<HTMLAnchorElement>} {...restProps} href={`mailto:${value}`}>\n {displayValue}\n </Link>\n );\n }\n);\n\nexport default EmailDisplay;\n"]}
1
+ {"version":3,"file":"EmailDisplay.js","sourceRoot":"","sources":["../../../src/components/Email/EmailDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAG5E,OAAO,IAAI,MAAM,SAAS,CAAC;AAgB3B,MAAM,YAAY,GAAwD,UAAU,CAClF,CACE,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS,EAAsC,EAC1F,GAA6B,EAC7B,EAAE;IACF,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,CAC3B,WAAW,IAAI,KAAK,CACrB,CAAC,CAAC,CAAC,CACF,8BAAkB,MAAM,6BAAsB,CAC/C,CAAC;IACF,OAAO,OAAO,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACpC,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,YAAY,GACR,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,GAA6B,KAAM,SAAS,EAAE,IAAI,EAAE,UAAU,KAAK,EAAE,YAC7E,YAAY,GACR,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Link from '../Link';\n\nexport interface EmailDisplayProps extends BaseProps, NoChildrenProp {\n /** Email address, no 'mailto:' scheme */\n value?: string;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Controls styling of the field.\n * @default 'link'\n */\n variant?: 'link' | 'text';\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst EmailDisplay: FunctionComponent<EmailDisplayProps & ForwardProps> = forwardRef(\n (\n { value, displayText, variant = 'link', ...restProps }: PropsWithoutRef<EmailDisplayProps>,\n ref: EmailDisplayProps['ref']\n ) => {\n const displayValue = value ? (\n displayText || value\n ) : (\n <span aria-hidden='true'>&ndash;&ndash;</span>\n );\n return variant === 'text' || !value ? (\n <span ref={ref} {...restProps}>\n {displayValue}\n </span>\n ) : (\n <Link ref={ref as Ref<HTMLAnchorElement>} {...restProps} href={`mailto:${value}`}>\n {displayValue}\n </Link>\n );\n }\n);\n\nexport default EmailDisplay;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPicker.styles.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.styles.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,iBAAiB;gBAA4B,OAAO;SA2hBzD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"EmojiPicker.styles.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.styles.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,iBAAiB;gBAA4B,OAAO;SAshBzD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -7,13 +7,10 @@ const StyledEmojiPicker = styled.div(({ showFooter, theme: { base: { animation:
7
7
  const secondaryTextColor = transparentize(1 - transparency['transparent-2'], palette['foreground-color']);
8
8
  const fontSizes = calculateFontSize(fontSize, fontScale);
9
9
  return css `
10
- border-radius: inherit;
11
-
12
10
  /* stylelint-disable no-descending-specificity */
13
-
14
11
  /* stylelint-disable no-duplicate-selectors */
15
-
16
12
  /* stylelint-disable selector-max-class */
13
+ border-radius: inherit;
17
14
 
18
15
  .emoji-mart,
19
16
  .emoji-mart * {
@@ -192,7 +189,6 @@ const StyledEmojiPicker = styled.div(({ showFooter, theme: { base: { animation:
192
189
  position: relative;
193
190
  position: -webkit-sticky;
194
191
  position: sticky;
195
-
196
192
  /* stylelint-enable declaration-block-no-duplicate-properties */
197
193
  }
198
194
 
@@ -231,7 +227,6 @@ const StyledEmojiPicker = styled.div(({ showFooter, theme: { base: { animation:
231
227
  /* stylelint-disable font-family-no-missing-generic-family-keyword */
232
228
  font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji',
233
229
  'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; /* cspell:disable-line */
234
-
235
230
  /* stylelint-enable font-family-no-missing-generic-family-keyword */
236
231
  }
237
232
 
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPicker.styles.js","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAClC,CAAC,EACC,UAAU,EACV,KAAK,EAAE,EACL,IAAI,EAAE,EACJ,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAC5B,WAAW,EAAE,QAAQ,EACrB,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,aAAa,EAAE,UAAU,EACzB,OAAO,EACP,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAC9B,OAAO,EACP,eAAe,EAAE,YAAY,EAC7B,YAAY,EACb,EACD,UAAU,EAAE,EACV,cAAc,EAAE,EAAE,eAAe,EAAE,iBAAiB,EAAE,EACvD,EACF,EACF,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC;IAC5E,MAAM,kBAAkB,GAAG,cAAc,CACvC,CAAC,GAAG,YAAY,CAAC,eAAe,CAAC,EACjC,OAAO,CAAC,kBAAkB,CAAC,CAC5B,CAAC;IAEF,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEzD,OAAO,GAAG,CAAA;;;;;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AiB,CAAC","sourcesContent":["import { hideVisually, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { getHoverColors, calculateFontSize } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\n\nconst StyledEmojiPicker = styled.div<{ showFooter: boolean }>(\n ({\n showFooter,\n theme: {\n base: {\n animation: { speed, timing },\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'font-family': fontFamily,\n 'font-weight': fontWeight,\n palette,\n shadow: { focus: focusShadow },\n spacing,\n 'border-radius': borderRadius,\n transparency\n },\n components: {\n 'search-input': { 'border-radius': searchInputRadius }\n }\n }\n }) => {\n const hoverColor = getHoverColors(palette['primary-background']).background;\n const secondaryTextColor = transparentize(\n 1 - transparency['transparent-2'],\n palette['foreground-color']\n );\n\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n border-radius: inherit;\n\n /* stylelint-disable no-descending-specificity */\n\n /* stylelint-disable no-duplicate-selectors */\n\n /* stylelint-disable selector-max-class */\n\n .emoji-mart,\n .emoji-mart * {\n box-sizing: border-box;\n line-height: 1.15;\n }\n\n .emoji-mart {\n font-family: ${fontFamily};\n font-size: ${fontSizes.l};\n display: inline-block;\n color: ${palette['foreground-color']};\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: inherit;\n background: ${palette['primary-background']};\n }\n\n .emoji-mart .emoji-mart-emoji {\n padding: calc(0.75 * ${spacing});\n }\n\n .emoji-mart-bar {\n border: 0 solid ${palette['border-line']};\n }\n .emoji-mart-bar:first-child {\n border-bottom-width: 0.0625rem;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n .emoji-mart-bar:last-child {\n border-top-width: 0.0625rem;\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n ${!showFooter &&\n css`\n display: none;\n `}\n }\n\n .emoji-mart-anchors {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 calc(0.75 * ${spacing});\n line-height: 0;\n }\n\n .emoji-mart-anchor {\n position: relative;\n display: block;\n flex: 1 1 auto;\n color: ${secondaryTextColor};\n text-align: center;\n padding: calc(1.5 * ${spacing}) calc(0.5 * ${spacing});\n overflow: hidden;\n transition: color calc(0.4 * ${speed}) ${timing['ease-out']};\n margin: 0;\n box-shadow: none;\n background: none;\n border: none;\n }\n .emoji-mart-anchor:focus {\n outline: 0;\n }\n .emoji-mart-anchor:hover,\n .emoji-mart-anchor:focus,\n .emoji-mart-anchor-selected {\n color: ${palette.interactive};\n }\n\n .emoji-mart-anchor-selected .emoji-mart-anchor-bar {\n bottom: 0;\n }\n\n .emoji-mart-anchor-bar {\n position: absolute;\n bottom: calc(-0.375 * ${spacing});\n left: 0;\n width: 100%;\n height: calc(0.375 * ${spacing});\n background-color: ${palette.interactive};\n }\n\n .emoji-mart-anchors i {\n display: inline-block;\n width: 100%;\n max-width: calc(2.75 * ${spacing});\n }\n\n .emoji-mart-anchors svg,\n .emoji-mart-anchors img {\n fill: currentColor;\n height: calc(2.25 * ${spacing});\n width: calc(2.25 * ${spacing});\n }\n\n .emoji-mart-scroll {\n overflow-y: scroll;\n overflow-x: hidden;\n height: 16.875rem;\n padding: 0 calc(0.75 * ${spacing});\n will-change: transform; /* avoids \"repaints on scroll\" in mobile Chrome */\n }\n\n .emoji-mart-search {\n padding: ${spacing};\n position: relative;\n }\n\n .emoji-mart-search input {\n font-size: ${fontSizes.l};\n color: ${palette['foreground-color']};\n display: block;\n width: 100%;\n padding: calc(0.625 * ${spacing}) calc(3.125 * ${spacing}) calc(0.75 * ${spacing})\n calc(1.25 * ${spacing});\n border-radius: calc(${borderRadius} * ${searchInputRadius});\n border: 0.0625rem solid ${palette['border-line']};\n background-color: ${palette['primary-background']};\n outline: 0;\n }\n\n .emoji-mart-search input:hover {\n border-color: ${palette['foreground-color']};\n }\n\n .emoji-mart-search input,\n .emoji-mart-search input::-webkit-search-decoration,\n .emoji-mart-search input::-webkit-search-cancel-button,\n .emoji-mart-search input::-webkit-search-results-button,\n .emoji-mart-search input::-webkit-search-results-decoration {\n /*\n remove webkit/blink styles for <input type=\"search\">\n via https://stackoverflow.com/a/9422689\n */\n -webkit-appearance: none;\n }\n\n .emoji-mart-search-icon {\n position: absolute;\n top: calc(1.875 * ${spacing});\n right: calc(2.25 * ${spacing});\n z-index: 2;\n border: none;\n background: none;\n }\n\n .emoji-mart-search-icon svg {\n fill: ${secondaryTextColor};\n }\n\n .emoji-mart-category .emoji-mart-emoji span {\n z-index: 1;\n position: relative;\n text-align: center;\n cursor: default;\n }\n\n .emoji-mart-category .emoji-mart-emoji:hover::before {\n z-index: 0;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: ${hoverColor};\n border-radius: 100%;\n }\n\n .emoji-mart-category-label {\n z-index: 2;\n top: 0;\n\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: -webkit-sticky;\n position: sticky;\n\n /* stylelint-enable declaration-block-no-duplicate-properties */\n }\n\n .emoji-mart-category-label span {\n display: block;\n width: 100%;\n font-weight: ${fontWeight['semi-bold']};\n padding: ${spacing} calc(0.25 * ${spacing});\n background-color: ${transparentize(0.05, palette['primary-background'])};\n }\n\n .emoji-mart-category-list {\n margin: 0;\n padding: calc(0.375 * ${spacing}) 0;\n }\n\n .emoji-mart-category-list li {\n list-style: none;\n margin: 0;\n padding: 0;\n display: inline-block;\n }\n\n .emoji-mart-emoji {\n position: relative;\n display: inline-block;\n font-size: 0;\n margin: 0;\n padding: 0;\n border: none;\n background: none;\n box-shadow: none;\n }\n\n .emoji-mart-emoji-native {\n /* stylelint-disable font-family-no-missing-generic-family-keyword */\n font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji',\n 'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; /* cspell:disable-line */\n\n /* stylelint-enable font-family-no-missing-generic-family-keyword */\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus,\n .emoji-mart-skin:focus,\n .emoji-mart-search input:focus {\n outline: 0;\n border-color: transparent;\n box-shadow: ${focusShadow};\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus {\n border-radius: 100%;\n }\n\n .emoji-mart-no-results {\n font-size: ${fontSizes.s};\n text-align: center;\n padding-top: 4.375rem;\n color: ${secondaryTextColor};\n }\n .emoji-mart-no-results-img {\n display: block;\n margin-left: auto;\n margin-right: auto;\n width: 50%;\n }\n .emoji-mart-no-results .emoji-mart-category-label {\n display: none;\n }\n .emoji-mart-no-results .emoji-mart-no-results-label {\n margin-top: 0.2em;\n }\n .emoji-mart-no-results .emoji-mart-emoji:hover::before {\n content: none;\n }\n\n .emoji-mart-preview {\n position: relative;\n min-height: 2.5rem;\n height: fit-content;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n .emoji-mart-preview-emoji {\n left: calc(1.5 * ${spacing});\n }\n\n .emoji-mart-preview-data {\n left: calc(8.5 * ${spacing});\n right: calc(1.5 * ${spacing});\n word-break: break-all;\n flex: 1;\n }\n\n .emoji-mart-preview-skins {\n position: absolute;\n right: calc(3.75 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-skins.custom {\n right: calc(1.25 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-name {\n font-size: ${fontSizes.s};\n }\n\n .emoji-mart-preview-shortname {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n .emoji-mart-preview-shortname + .emoji-mart-preview-shortname,\n .emoji-mart-preview-shortname + .emoji-mart-preview-emoticon,\n .emoji-mart-preview-emoticon + .emoji-mart-preview-emoticon {\n margin-left: 0.5em;\n }\n\n .emoji-mart-preview-emoticon {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n\n .emoji-mart-title span {\n display: inline-block;\n vertical-align: middle;\n }\n\n .emoji-mart-title .emoji-mart-emoji {\n padding: 0;\n }\n\n .emoji-mart-title-label {\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxl};\n font-weight: ${fontWeight.normal};\n }\n\n .emoji-mart-skin-swatches {\n font-size: 0;\n padding: calc(0.25 * ${spacing}) 0;\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: calc(1.5 * ${spacing});\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.custom {\n font-size: 0;\n border: none;\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch {\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-swatch {\n display: inline-block;\n width: 0;\n vertical-align: middle;\n transition-property: width, padding;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch:nth-child(1) {\n transition-delay: 0s;\n }\n .emoji-mart-skin-swatch:nth-child(2) {\n transition-delay: 0.03s;\n }\n .emoji-mart-skin-swatch:nth-child(3) {\n transition-delay: 0.06s;\n }\n .emoji-mart-skin-swatch:nth-child(4) {\n transition-delay: 0.09s;\n }\n .emoji-mart-skin-swatch:nth-child(5) {\n transition-delay: 0.12s;\n }\n .emoji-mart-skin-swatch:nth-child(6) {\n transition-delay: 0.15s;\n }\n\n .emoji-mart-skin-swatch.selected {\n position: relative;\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatch.selected::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: calc(0.5 * ${spacing});\n height: calc(0.5 * ${spacing});\n margin: calc(-0.25 * ${spacing}) 0 0 calc(-0.25 * ${spacing});\n background-color: ${palette['primary-background']};\n border-radius: 100%;\n pointer-events: none;\n opacity: 0;\n transition: opacity ${speed} ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch.custom {\n display: inline-block;\n width: 0;\n height: 2.375rem;\n overflow: hidden;\n vertical-align: middle;\n transition-property: width, height;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n cursor: default;\n }\n\n .emoji-mart-skin-swatch.custom.selected {\n position: relative;\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatch.custom.selected::after {\n content: '';\n width: 0;\n height: 0;\n }\n\n .emoji-mart-skin-swatches.custom .emoji-mart-skin-swatch.custom:hover {\n background-color: ${palette['primary-background']};\n border-radius: 10%;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom {\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-text.opened {\n display: inline-block;\n vertical-align: middle;\n text-align: left;\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxs};\n padding: calc(0.625 * ${spacing}) calc(0.25 * ${spacing});\n width: 6rem;\n height: 2.5rem;\n border-radius: 10%;\n background-color: ${palette['primary-background']};\n }\n\n .emoji-mart-skin {\n display: inline-block;\n width: 100%;\n padding-top: 100%;\n max-width: calc(1.5 * ${spacing});\n border-radius: 100%;\n }\n\n .emoji-mart-skin-tone-1 {\n background-color: #ffc93a;\n }\n .emoji-mart-skin-tone-2 {\n background-color: #fadcbc;\n }\n .emoji-mart-skin-tone-3 {\n background-color: #e0bb95;\n }\n .emoji-mart-skin-tone-4 {\n background-color: #bf8f68;\n }\n .emoji-mart-skin-tone-5 {\n background-color: #9b643d;\n }\n .emoji-mart-skin-tone-6 {\n background-color: #594539;\n }\n\n /* For screen readers only */\n .emoji-mart-sr-only {\n ${hideVisually}\n }\n\n /*\n https://github.com/missive/emoji-mart/issues/319\n https://github.com/missive/emoji-mart/pull/442\n */\n .emoji-mart-emoji-native {\n height: var(--emoji-size);\n width: var(--emoji-size);\n position: relative;\n display: inline-block;\n box-sizing: content-box;\n vertical-align: bottom;\n }\n\n .emoji-mart-emoji-native > span {\n position: absolute !important;\n top: 50%;\n left: 50%;\n height: initial !important;\n width: initial !important;\n transform: translate(-50%, -50%);\n }\n `;\n }\n);\n\nStyledEmojiPicker.defaultProps = defaultThemeProp;\n\nexport default StyledEmojiPicker;\n"]}
1
+ {"version":3,"file":"EmojiPicker.styles.js","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAClC,CAAC,EACC,UAAU,EACV,KAAK,EAAE,EACL,IAAI,EAAE,EACJ,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAC5B,WAAW,EAAE,QAAQ,EACrB,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,EACzB,aAAa,EAAE,UAAU,EACzB,OAAO,EACP,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAC9B,OAAO,EACP,eAAe,EAAE,YAAY,EAC7B,YAAY,EACb,EACD,UAAU,EAAE,EACV,cAAc,EAAE,EAAE,eAAe,EAAE,iBAAiB,EAAE,EACvD,EACF,EACF,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC;IAC5E,MAAM,kBAAkB,GAAG,cAAc,CACvC,CAAC,GAAG,YAAY,CAAC,eAAe,CAAC,EACjC,OAA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;;;;;;;;;;;;;;;;;;;;;;;;KAwBjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,eAAe,iBAAiB,CAAC","sourcesContent":["import { hideVisually, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { getHoverColors, calculateFontSize } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\n\nconst StyledEmojiPicker = styled.div<{ showFooter: boolean }>(\n ({\n showFooter,\n theme: {\n base: {\n animation: { speed, timing },\n 'font-size': fontSize,\n 'font-scale': fontScale,\n 'font-family': fontFamily,\n 'font-weight': fontWeight,\n palette,\n shadow: { focus: focusShadow },\n spacing,\n 'border-radius': borderRadius,\n transparency\n },\n components: {\n 'search-input': { 'border-radius': searchInputRadius }\n }\n }\n }) => {\n const hoverColor = getHoverColors(palette['primary-background']).background;\n const secondaryTextColor = transparentize(\n 1 - transparency['transparent-2'],\n palette['foreground-color']\n );\n\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n /* stylelint-disable no-descending-specificity */\n /* stylelint-disable no-duplicate-selectors */\n /* stylelint-disable selector-max-class */\n border-radius: inherit;\n\n .emoji-mart,\n .emoji-mart * {\n box-sizing: border-box;\n line-height: 1.15;\n }\n\n .emoji-mart {\n font-family: ${fontFamily};\n font-size: ${fontSizes.l};\n display: inline-block;\n color: ${palette['foreground-color']};\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: inherit;\n background: ${palette['primary-background']};\n }\n\n .emoji-mart .emoji-mart-emoji {\n padding: calc(0.75 * ${spacing});\n }\n\n .emoji-mart-bar {\n border: 0 solid ${palette['border-line']};\n }\n .emoji-mart-bar:first-child {\n border-bottom-width: 0.0625rem;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n .emoji-mart-bar:last-child {\n border-top-width: 0.0625rem;\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n ${!showFooter &&\n css`\n display: none;\n `}\n }\n\n .emoji-mart-anchors {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 calc(0.75 * ${spacing});\n line-height: 0;\n }\n\n .emoji-mart-anchor {\n position: relative;\n display: block;\n flex: 1 1 auto;\n color: ${secondaryTextColor};\n text-align: center;\n padding: calc(1.5 * ${spacing}) calc(0.5 * ${spacing});\n overflow: hidden;\n transition: color calc(0.4 * ${speed}) ${timing['ease-out']};\n margin: 0;\n box-shadow: none;\n background: none;\n border: none;\n }\n .emoji-mart-anchor:focus {\n outline: 0;\n }\n .emoji-mart-anchor:hover,\n .emoji-mart-anchor:focus,\n .emoji-mart-anchor-selected {\n color: ${palette.interactive};\n }\n\n .emoji-mart-anchor-selected .emoji-mart-anchor-bar {\n bottom: 0;\n }\n\n .emoji-mart-anchor-bar {\n position: absolute;\n bottom: calc(-0.375 * ${spacing});\n left: 0;\n width: 100%;\n height: calc(0.375 * ${spacing});\n background-color: ${palette.interactive};\n }\n\n .emoji-mart-anchors i {\n display: inline-block;\n width: 100%;\n max-width: calc(2.75 * ${spacing});\n }\n\n .emoji-mart-anchors svg,\n .emoji-mart-anchors img {\n fill: currentColor;\n height: calc(2.25 * ${spacing});\n width: calc(2.25 * ${spacing});\n }\n\n .emoji-mart-scroll {\n overflow-y: scroll;\n overflow-x: hidden;\n height: 16.875rem;\n padding: 0 calc(0.75 * ${spacing});\n will-change: transform; /* avoids \"repaints on scroll\" in mobile Chrome */\n }\n\n .emoji-mart-search {\n padding: ${spacing};\n position: relative;\n }\n\n .emoji-mart-search input {\n font-size: ${fontSizes.l};\n color: ${palette['foreground-color']};\n display: block;\n width: 100%;\n padding: calc(0.625 * ${spacing}) calc(3.125 * ${spacing}) calc(0.75 * ${spacing})\n calc(1.25 * ${spacing});\n border-radius: calc(${borderRadius} * ${searchInputRadius});\n border: 0.0625rem solid ${palette['border-line']};\n background-color: ${palette['primary-background']};\n outline: 0;\n }\n\n .emoji-mart-search input:hover {\n border-color: ${palette['foreground-color']};\n }\n\n .emoji-mart-search input,\n .emoji-mart-search input::-webkit-search-decoration,\n .emoji-mart-search input::-webkit-search-cancel-button,\n .emoji-mart-search input::-webkit-search-results-button,\n .emoji-mart-search input::-webkit-search-results-decoration {\n /*\n remove webkit/blink styles for <input type=\"search\">\n via https://stackoverflow.com/a/9422689\n */\n -webkit-appearance: none;\n }\n\n .emoji-mart-search-icon {\n position: absolute;\n top: calc(1.875 * ${spacing});\n right: calc(2.25 * ${spacing});\n z-index: 2;\n border: none;\n background: none;\n }\n\n .emoji-mart-search-icon svg {\n fill: ${secondaryTextColor};\n }\n\n .emoji-mart-category .emoji-mart-emoji span {\n z-index: 1;\n position: relative;\n text-align: center;\n cursor: default;\n }\n\n .emoji-mart-category .emoji-mart-emoji:hover::before {\n z-index: 0;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: ${hoverColor};\n border-radius: 100%;\n }\n\n .emoji-mart-category-label {\n z-index: 2;\n top: 0;\n\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: -webkit-sticky;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n }\n\n .emoji-mart-category-label span {\n display: block;\n width: 100%;\n font-weight: ${fontWeight['semi-bold']};\n padding: ${spacing} calc(0.25 * ${spacing});\n background-color: ${transparentize(0.05, palette['primary-background'])};\n }\n\n .emoji-mart-category-list {\n margin: 0;\n padding: calc(0.375 * ${spacing}) 0;\n }\n\n .emoji-mart-category-list li {\n list-style: none;\n margin: 0;\n padding: 0;\n display: inline-block;\n }\n\n .emoji-mart-emoji {\n position: relative;\n display: inline-block;\n font-size: 0;\n margin: 0;\n padding: 0;\n border: none;\n background: none;\n box-shadow: none;\n }\n\n .emoji-mart-emoji-native {\n /* stylelint-disable font-family-no-missing-generic-family-keyword */\n font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji',\n 'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; /* cspell:disable-line */\n /* stylelint-enable font-family-no-missing-generic-family-keyword */\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus,\n .emoji-mart-skin:focus,\n .emoji-mart-search input:focus {\n outline: 0;\n border-color: transparent;\n box-shadow: ${focusShadow};\n }\n\n .emoji-mart-category .emoji-mart-emoji:focus,\n .emoji-mart-category .emoji-mart-emoji-native:focus {\n border-radius: 100%;\n }\n\n .emoji-mart-no-results {\n font-size: ${fontSizes.s};\n text-align: center;\n padding-top: 4.375rem;\n color: ${secondaryTextColor};\n }\n .emoji-mart-no-results-img {\n display: block;\n margin-left: auto;\n margin-right: auto;\n width: 50%;\n }\n .emoji-mart-no-results .emoji-mart-category-label {\n display: none;\n }\n .emoji-mart-no-results .emoji-mart-no-results-label {\n margin-top: 0.2em;\n }\n .emoji-mart-no-results .emoji-mart-emoji:hover::before {\n content: none;\n }\n\n .emoji-mart-preview {\n position: relative;\n min-height: 2.5rem;\n height: fit-content;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n .emoji-mart-preview-emoji {\n left: calc(1.5 * ${spacing});\n }\n\n .emoji-mart-preview-data {\n left: calc(8.5 * ${spacing});\n right: calc(1.5 * ${spacing});\n word-break: break-all;\n flex: 1;\n }\n\n .emoji-mart-preview-skins {\n position: absolute;\n right: calc(3.75 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-skins.custom {\n right: calc(1.25 * ${spacing});\n text-align: right;\n }\n\n .emoji-mart-preview-name {\n font-size: ${fontSizes.s};\n }\n\n .emoji-mart-preview-shortname {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n .emoji-mart-preview-shortname + .emoji-mart-preview-shortname,\n .emoji-mart-preview-shortname + .emoji-mart-preview-emoticon,\n .emoji-mart-preview-emoticon + .emoji-mart-preview-emoticon {\n margin-left: 0.5em;\n }\n\n .emoji-mart-preview-emoticon {\n font-size: ${fontSizes.xxs};\n color: ${secondaryTextColor};\n }\n\n .emoji-mart-title span {\n display: inline-block;\n vertical-align: middle;\n }\n\n .emoji-mart-title .emoji-mart-emoji {\n padding: 0;\n }\n\n .emoji-mart-title-label {\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxl};\n font-weight: ${fontWeight.normal};\n }\n\n .emoji-mart-skin-swatches {\n font-size: 0;\n padding: calc(0.25 * ${spacing}) 0;\n border: 0.0625rem solid ${palette['border-line']};\n border-radius: calc(1.5 * ${spacing});\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.custom {\n font-size: 0;\n border: none;\n background-color: ${palette['secondary-background']};\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch {\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-swatch {\n display: inline-block;\n width: 0;\n vertical-align: middle;\n transition-property: width, padding;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch:nth-child(1) {\n transition-delay: 0s;\n }\n .emoji-mart-skin-swatch:nth-child(2) {\n transition-delay: 0.03s;\n }\n .emoji-mart-skin-swatch:nth-child(3) {\n transition-delay: 0.06s;\n }\n .emoji-mart-skin-swatch:nth-child(4) {\n transition-delay: 0.09s;\n }\n .emoji-mart-skin-swatch:nth-child(5) {\n transition-delay: 0.12s;\n }\n .emoji-mart-skin-swatch:nth-child(6) {\n transition-delay: 0.15s;\n }\n\n .emoji-mart-skin-swatch.selected {\n position: relative;\n width: calc(2 * ${spacing});\n padding: 0 calc(0.25 * ${spacing});\n }\n\n .emoji-mart-skin-swatch.selected::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: calc(0.5 * ${spacing});\n height: calc(0.5 * ${spacing});\n margin: calc(-0.25 * ${spacing}) 0 0 calc(-0.25 * ${spacing});\n background-color: ${palette['primary-background']};\n border-radius: 100%;\n pointer-events: none;\n opacity: 0;\n transition: opacity ${speed} ${timing['ease-out']};\n }\n\n .emoji-mart-skin-swatch.custom {\n display: inline-block;\n width: 0;\n height: 2.375rem;\n overflow: hidden;\n vertical-align: middle;\n transition-property: width, height;\n transition-duration: calc(0.5 * ${speed});\n transition-timing-function: ${timing['ease-out']};\n cursor: default;\n }\n\n .emoji-mart-skin-swatch.custom.selected {\n position: relative;\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatch.custom.selected::after {\n content: '';\n width: 0;\n height: 0;\n }\n\n .emoji-mart-skin-swatches.custom .emoji-mart-skin-swatch.custom:hover {\n background-color: ${palette['primary-background']};\n border-radius: 10%;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom {\n width: 2.25rem;\n height: 2.375rem;\n padding: 0 calc(0.25 * ${spacing}) 0 0;\n }\n\n .emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom.selected::after {\n opacity: ${transparency['transparent-2']};\n }\n\n .emoji-mart-skin-text.opened {\n display: inline-block;\n vertical-align: middle;\n text-align: left;\n color: ${secondaryTextColor};\n font-size: ${fontSizes.xxs};\n padding: calc(0.625 * ${spacing}) calc(0.25 * ${spacing});\n width: 6rem;\n height: 2.5rem;\n border-radius: 10%;\n background-color: ${palette['primary-background']};\n }\n\n .emoji-mart-skin {\n display: inline-block;\n width: 100%;\n padding-top: 100%;\n max-width: calc(1.5 * ${spacing});\n border-radius: 100%;\n }\n\n .emoji-mart-skin-tone-1 {\n background-color: #ffc93a;\n }\n .emoji-mart-skin-tone-2 {\n background-color: #fadcbc;\n }\n .emoji-mart-skin-tone-3 {\n background-color: #e0bb95;\n }\n .emoji-mart-skin-tone-4 {\n background-color: #bf8f68;\n }\n .emoji-mart-skin-tone-5 {\n background-color: #9b643d;\n }\n .emoji-mart-skin-tone-6 {\n background-color: #594539;\n }\n\n /* For screen readers only */\n .emoji-mart-sr-only {\n ${hideVisually}\n }\n\n /*\n https://github.com/missive/emoji-mart/issues/319\n https://github.com/missive/emoji-mart/pull/442\n */\n .emoji-mart-emoji-native {\n height: var(--emoji-size);\n width: var(--emoji-size);\n position: relative;\n display: inline-block;\n box-sizing: content-box;\n vertical-align: bottom;\n }\n\n .emoji-mart-emoji-native > span {\n position: absolute !important;\n top: 50%;\n left: 50%;\n height: initial !important;\n width: initial !important;\n transform: translate(-50%, -50%);\n }\n `;\n }\n);\n\nStyledEmojiPicker.defaultProps = defaultThemeProp;\n\nexport default StyledEmojiPicker;\n"]}
@@ -10,24 +10,24 @@ export interface ExpandCollapseProps extends AsProp, BaseProps {
10
10
  collapsed?: boolean;
11
11
  /**
12
12
  * Used to determine the transition property.
13
- * @default "height"
13
+ * @default 'height'
14
14
  */
15
15
  dimension?: 'height' | 'width';
16
16
  /** Minimum height/width to collapse to. This will set the starting collapsed size as well. */
17
17
  min?: string;
18
18
  /** Maximum height/width to expand to. Expanded state will expanded up until, but not beyond, the natural height/width of the element. */
19
19
  max?: string;
20
- /** Callback fired after content collapsed. */
20
+ /** Callback fired after content collapsed. */
21
21
  onAfterCollapse?: () => void;
22
- /** Callback fired after content expanded. */
22
+ /** Callback fired after content expanded. */
23
23
  onAfterExpand?: () => void;
24
- /** Callback fired before content collapsed. */
24
+ /** Callback fired before content collapsed. */
25
25
  onBeforeCollapse?: () => void;
26
- /** Callback fired before content expanded. */
26
+ /** Callback fired before content expanded. */
27
27
  onBeforeExpand?: () => void;
28
28
  /**
29
29
  * Determine the speed of animation. This value comes from `theme.base.animation.speed`.
30
- * @default "0.25s"
30
+ * @default '0.25s'
31
31
  */
32
32
  transitionSpeed?: string;
33
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandCollapse.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandCollapse/ExpandCollapse.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAGjB,SAAS,EAM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,CAAC,MAAM,CAAC,IAAI;SACrD,CAAC,CAAC;KACJ;IAED,OAAO,MAAM,KAAK,WAAW,IAAI,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAClE,KAAC,GAAG,IAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,eAAe,KAAM,SAAS,EAAE,KAAK,EAAE,KAAK,YACzE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import {\n FunctionComponent,\n Ref,\n forwardRef,\n ReactNode,\n PropsWithoutRef,\n useState,\n useLayoutEffect,\n useCallback,\n CSSProperties\n} from 'react';\n\nimport { ForwardProps, BaseProps, AsProp, PropsWithDefaults } from '../../types';\nimport { useConsolidatedRef, usePrevious, useTheme } from '../../hooks';\n\nexport interface ExpandCollapseProps extends AsProp, BaseProps {\n /** Content to expand/collapse. */\n children?: ReactNode;\n /**\n * If true,the content will be hidden.\n * @default false\n */\n collapsed?: boolean;\n /**\n * Used to determine the transition property.\n * @default \"height\"\n */\n dimension?: 'height' | 'width';\n /** Minimum height/width to collapse to. This will set the starting collapsed size as well. */\n min?: string;\n /** Maximum height/width to expand to. Expanded state will expanded up until, but not beyond, the natural height/width of the element. */\n max?: string;\n /** Callback fired after content collapsed. */\n onAfterCollapse?: () => void;\n /** Callback fired after content expanded. */\n onAfterExpand?: () => void;\n /** Callback fired before content collapsed. */\n onBeforeCollapse?: () => void;\n /** Callback fired before content expanded. */\n onBeforeExpand?: () => void;\n /**\n * Determine the speed of animation. This value comes from `theme.base.animation.speed`.\n * @default \"0.25s\"\n */\n transitionSpeed?: string;\n /**\n * If true, removes the component from the real DOM when collapsed. For full virtual DOM unmount(if necessary), perform at a parent level.\n * @default false\n */\n nullWhenCollapsed?: boolean;\n}\n\ntype ExpandCollapsePropsWithDefaults = PropsWithDefaults<\n ExpandCollapseProps,\n 'collapsed' | 'dimension' | 'transitionSpeed' | 'nullWhenCollapsed'\n>;\n\ntype Statuses = 'collapsed' | 'collapsing' | 'expanded' | 'expanding';\n\ninterface GetStyleProps\n extends Pick<\n ExpandCollapsePropsWithDefaults,\n 'dimension' | 'transitionSpeed' | 'min' | 'max' | 'nullWhenCollapsed'\n > {\n status: Statuses;\n el?: HTMLElement | null;\n transitionTimingFunction?: string;\n}\n\nconst getScrollSize = (\n el: HTMLElement,\n dimension: ExpandCollapsePropsWithDefaults['dimension']\n): string => {\n if (!el) return '';\n return dimension === 'height' ? `${el.scrollHeight}px` : `${el.scrollWidth}px`;\n};\n\nconst getStyle = (props: GetStyleProps): CSSProperties => {\n const {\n status,\n dimension,\n transitionSpeed,\n transitionTimingFunction,\n min,\n max,\n nullWhenCollapsed,\n el\n } = props;\n const style: CSSProperties = {};\n let maxSize = max;\n\n if (el && !max) {\n maxSize = getScrollSize(el, dimension!);\n }\n\n if (status === 'expanded' || status === 'collapsed') {\n if (max || min) {\n style[dimension as 'height' | 'width'] = status === 'expanded' ? maxSize : min || 0;\n style[`overflow${dimension === 'width' ? 'X' : 'Y'}`] = 'hidden';\n }\n\n if (status === 'collapsed' && !nullWhenCollapsed && !min) {\n style.display = 'none';\n }\n }\n\n if (status === 'expanding' || status === 'collapsing') {\n style[dimension as 'height' | 'width'] = status === 'expanding' ? maxSize : min || 0;\n style.overflow = 'hidden';\n style.transitionProperty = dimension;\n style.transitionDuration = `max(${transitionSpeed}, 0.01ms)`;\n style.transitionTimingFunction = transitionTimingFunction;\n }\n\n return style;\n};\n\nconst ExpandCollapse: FunctionComponent<ExpandCollapseProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<ExpandCollapseProps>, refArg: Ref<HTMLElement>) => {\n const {\n base: { animation: themeAnimation }\n } = useTheme();\n\n const {\n children,\n dimension = 'height',\n collapsed = false,\n onBeforeExpand,\n onAfterExpand,\n onBeforeCollapse,\n onAfterCollapse,\n transitionSpeed = themeAnimation.speed,\n min,\n max,\n nullWhenCollapsed = false,\n as: Tag = 'div',\n ...restProps\n } = props;\n\n const [status, setStatus] = useState<Statuses>(collapsed ? 'collapsed' : 'expanded');\n const styleStateHook = useState<CSSProperties>();\n const setStyle = styleStateHook[1];\n let style = styleStateHook[0];\n const previousStatus = usePrevious(status);\n const ref = useConsolidatedRef(refArg);\n\n const onTransitionEnd = useCallback(\n (e: TransitionEvent) => {\n if (e.target !== ref.current || e.propertyName !== dimension) return;\n setStatus(status === 'expanding' ? 'expanded' : 'collapsed');\n },\n [ref.current, status]\n );\n\n useLayoutEffect(() => {\n const wantsToCollapse = collapsed;\n const wantsToExpand = !collapsed;\n const canCollapse = ['expanded', 'expanding'].includes(status);\n const canExpand = ['collapsed', 'collapsing'].includes(status);\n\n if (wantsToExpand && canExpand) {\n onBeforeExpand?.();\n setStatus('expanding');\n } else if (wantsToCollapse && canCollapse) {\n onBeforeCollapse?.();\n setStatus('collapsing');\n }\n\n if (status === 'expanded' && previousStatus !== 'expanded') {\n onAfterExpand?.();\n } else if (status === 'collapsed' && previousStatus !== 'collapsed') {\n onAfterCollapse?.();\n }\n\n setStyle(\n getStyle({\n dimension,\n min,\n max,\n transitionSpeed,\n nullWhenCollapsed,\n status,\n el: ref.current,\n transitionTimingFunction: themeAnimation.timing.ease\n })\n );\n }, [collapsed, status, min, max]);\n\n if (status !== previousStatus && ['expanded', 'collapsed'].includes(previousStatus!)) {\n style = getStyle({\n dimension,\n min,\n max,\n transitionSpeed,\n nullWhenCollapsed,\n status: status === 'expanding' ? 'collapsing' : 'expanding',\n el: ref.current,\n transitionTimingFunction: themeAnimation.timing.ease\n });\n }\n\n return status === 'collapsed' && nullWhenCollapsed && !min ? null : (\n <Tag ref={ref} onTransitionEnd={onTransitionEnd} {...restProps} style={style}>\n {children}\n </Tag>\n );\n }\n);\n\nexport default ExpandCollapse;\n"]}
1
+ {"version":3,"file":"ExpandCollapse.js","sourceRoot":"","sources":["../../../src/components/ExpandCollapse/ExpandCollapse.tsx"],"names":[],"mappings":";AAAA,OAAO,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,cAAc,CAAC,MAAM,CAAC,IAAI;SACrD,CAAC,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAElC,IAAI,MAAM,KAAK,cAAc,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,cAAe,CAAC,EAAE;QACpF,KAAK,GAAG,QAAQ,CAAC;YACf,SAAS;YACT,GAAG;YACH,GAAG;YACH,eAAe;YACf,iBAAiB;YACjB,MAAM,EAAE,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW;YAC3D,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,wBAAwB,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI;SACrD,CAAC,CAAC;KACJ;IAED,OAAO,MAAM,KAAK,WAAW,IAAI,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAClE,KAAC,GAAG,IAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,eAAe,KAAM,SAAS,EAAE,KAAK,EAAE,KAAK,YACzE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import {\n FunctionComponent,\n Ref,\n forwardRef,\n ReactNode,\n PropsWithoutRef,\n useState,\n useLayoutEffect,\n useCallback,\n CSSProperties\n} from 'react';\n\nimport { ForwardProps, BaseProps, AsProp, PropsWithDefaults } from '../../types';\nimport { useConsolidatedRef, usePrevious, useTheme } from '../../hooks';\n\nexport interface ExpandCollapseProps extends AsProp, BaseProps {\n /** Content to expand/collapse. */\n children?: ReactNode;\n /**\n * If true,the content will be hidden.\n * @default false\n */\n collapsed?: boolean;\n /**\n * Used to determine the transition property.\n * @default 'height'\n */\n dimension?: 'height' | 'width';\n /** Minimum height/width to collapse to. This will set the starting collapsed size as well. */\n min?: string;\n /** Maximum height/width to expand to. Expanded state will expanded up until, but not beyond, the natural height/width of the element. */\n max?: string;\n /** Callback fired after content collapsed. */\n onAfterCollapse?: () => void;\n /** Callback fired after content expanded. */\n onAfterExpand?: () => void;\n /** Callback fired before content collapsed. */\n onBeforeCollapse?: () => void;\n /** Callback fired before content expanded. */\n onBeforeExpand?: () => void;\n /**\n * Determine the speed of animation. This value comes from `theme.base.animation.speed`.\n * @default '0.25s'\n */\n transitionSpeed?: string;\n /**\n * If true, removes the component from the real DOM when collapsed. For full virtual DOM unmount(if necessary), perform at a parent level.\n * @default false\n */\n nullWhenCollapsed?: boolean;\n}\n\ntype ExpandCollapsePropsWithDefaults = PropsWithDefaults<\n ExpandCollapseProps,\n 'collapsed' | 'dimension' | 'transitionSpeed' | 'nullWhenCollapsed'\n>;\n\ntype Statuses = 'collapsed' | 'collapsing' | 'expanded' | 'expanding';\n\ninterface GetStyleProps\n extends Pick<\n ExpandCollapsePropsWithDefaults,\n 'dimension' | 'transitionSpeed' | 'min' | 'max' | 'nullWhenCollapsed'\n > {\n status: Statuses;\n el?: HTMLElement | null;\n transitionTimingFunction?: string;\n}\n\nconst getScrollSize = (\n el: HTMLElement,\n dimension: ExpandCollapsePropsWithDefaults['dimension']\n): string => {\n if (!el) return '';\n return dimension === 'height' ? `${el.scrollHeight}px` : `${el.scrollWidth}px`;\n};\n\nconst getStyle = (props: GetStyleProps): CSSProperties => {\n const {\n status,\n dimension,\n transitionSpeed,\n transitionTimingFunction,\n min,\n max,\n nullWhenCollapsed,\n el\n } = props;\n const style: CSSProperties = {};\n let maxSize = max;\n\n if (el && !max) {\n maxSize = getScrollSize(el, dimension!);\n }\n\n if (status === 'expanded' || status === 'collapsed') {\n if (max || min) {\n style[dimension as 'height' | 'width'] = status === 'expanded' ? maxSize : min || 0;\n style[`overflow${dimension === 'width' ? 'X' : 'Y'}`] = 'hidden';\n }\n\n if (status === 'collapsed' && !nullWhenCollapsed && !min) {\n style.display = 'none';\n }\n }\n\n if (status === 'expanding' || status === 'collapsing') {\n style[dimension as 'height' | 'width'] = status === 'expanding' ? maxSize : min || 0;\n style.overflow = 'hidden';\n style.transitionProperty = dimension;\n style.transitionDuration = `max(${transitionSpeed}, 0.01ms)`;\n style.transitionTimingFunction = transitionTimingFunction;\n }\n\n return style;\n};\n\nconst ExpandCollapse: FunctionComponent<ExpandCollapseProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<ExpandCollapseProps>, refArg: Ref<HTMLElement>) => {\n const {\n base: { animation: themeAnimation }\n } = useTheme();\n\n const {\n children,\n dimension = 'height',\n collapsed = false,\n onBeforeExpand,\n onAfterExpand,\n onBeforeCollapse,\n onAfterCollapse,\n transitionSpeed = themeAnimation.speed,\n min,\n max,\n nullWhenCollapsed = false,\n as: Tag = 'div',\n ...restProps\n } = props;\n\n const [status, setStatus] = useState<Statuses>(collapsed ? 'collapsed' : 'expanded');\n const styleStateHook = useState<CSSProperties>();\n const setStyle = styleStateHook[1];\n let style = styleStateHook[0];\n const previousStatus = usePrevious(status);\n const ref = useConsolidatedRef(refArg);\n\n const onTransitionEnd = useCallback(\n (e: TransitionEvent) => {\n if (e.target !== ref.current || e.propertyName !== dimension) return;\n setStatus(status === 'expanding' ? 'expanded' : 'collapsed');\n },\n [ref.current, status]\n );\n\n useLayoutEffect(() => {\n const wantsToCollapse = collapsed;\n const wantsToExpand = !collapsed;\n const canCollapse = ['expanded', 'expanding'].includes(status);\n const canExpand = ['collapsed', 'collapsing'].includes(status);\n\n if (wantsToExpand && canExpand) {\n onBeforeExpand?.();\n setStatus('expanding');\n } else if (wantsToCollapse && canCollapse) {\n onBeforeCollapse?.();\n setStatus('collapsing');\n }\n\n if (status === 'expanded' && previousStatus !== 'expanded') {\n onAfterExpand?.();\n } else if (status === 'collapsed' && previousStatus !== 'collapsed') {\n onAfterCollapse?.();\n }\n\n setStyle(\n getStyle({\n dimension,\n min,\n max,\n transitionSpeed,\n nullWhenCollapsed,\n status,\n el: ref.current,\n transitionTimingFunction: themeAnimation.timing.ease\n })\n );\n }, [collapsed, status, min, max]);\n\n if (status !== previousStatus && ['expanded', 'collapsed'].includes(previousStatus!)) {\n style = getStyle({\n dimension,\n min,\n max,\n transitionSpeed,\n nullWhenCollapsed,\n status: status === 'expanding' ? 'collapsing' : 'expanding',\n el: ref.current,\n transitionTimingFunction: themeAnimation.timing.ease\n });\n }\n\n return status === 'collapsed' && nullWhenCollapsed && !min ? null : (\n <Tag ref={ref} onTransitionEnd={onTransitionEnd} {...restProps} style={style}>\n {children}\n </Tag>\n );\n }\n);\n\nexport default ExpandCollapse;\n"]}
@@ -17,9 +17,7 @@ export interface FieldGroupProps extends BaseProps {
17
17
  * @default false
18
18
  */
19
19
  defaultCollapsed?: boolean;
20
- /**
21
- * Select the heading tag for header
22
- */
20
+ /** Select the heading tag for header */
23
21
  headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
24
22
  /** The name associated with the Field Group. */
25
23
  name?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../src/components/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,iBAAiB,EAAmB,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWjG,OAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAuB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,sCAAsC;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,GAAG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ChB,IACgB,CACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef, useState, FunctionComponent, 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 * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport Actions, { ActionsProps } from '../Actions';\nimport { defaultThemeProp } from '../../theme';\nimport { BaseProps, ForwardProps } from '../../types';\nimport { useDirection, useI18n, useUID } from '../../hooks';\nimport { calculateFontSize, FontSize, omitProps } from '../../styles';\nimport AdditionalInfo, { AdditionalInfoProps } from '../AdditionalInfo';\n\nregisterIcon(caretRightIcon);\n\nexport interface FieldGroupProps extends 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 /**\n * If true, the Field Group will be able to collapse the content of its children by clicking on the name.\n * @default false\n */\n collapsible?: boolean;\n /**\n * If true, the Field Group will be collapsed on the first render.\n * @default false\n */\n defaultCollapsed?: boolean;\n /**\n * Select the heading tag for header\n */\n headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** The name associated with the Field Group. */\n name?: string;\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 /** A reference to the wrapping element. */\n ref?: Ref<HTMLFieldSetElement>;\n}\n\ninterface FieldGroupLegendProps {\n open: boolean;\n actions?: ActionsProps['items'];\n children?: ReactNode;\n additionalInfo?: FieldGroupProps['additionalInfo'];\n}\n\nconst StyledExpandButton = styled(Button)(\n ({\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} {\n transform: rotate(90deg);\n }\n &[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n }\n);\n\nStyledExpandButton.defaultProps = defaultThemeProp;\n\nexport const StyledFieldGroupName = styled.span``;\n\nexport const StyledFieldGroupLegend = styled.legend.withConfig<{ open: boolean }>(\n omitProps('open')\n)(\n ({\n open,\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 ${open &&\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 & & ${StyledFieldGroupName} {\n font-size: ${fontSizes[text.h4['font-size'] as FontSize]};\n font-weight: ${text.h4['font-weight']};\n }\n\n & & & ${StyledFieldGroupName} {\n font-size: ${fontSizes[text.h5['font-size'] as FontSize]};\n font-weight: ${text.h5['font-weight']};\n }\n\n & & & & ${StyledFieldGroupName} {\n font-size: ${fontSizes[text.h6['font-size'] as FontSize]};\n font-weight: ${text.h6['font-weight']};\n }\n `;\n }\n);\n\nStyledFieldGroup.defaultProps = defaultThemeProp;\n\nconst FieldGroupLegend: FunctionComponent<FieldGroupLegendProps> = ({\n children,\n open,\n actions,\n additionalInfo,\n ...restProps\n}) => {\n return (\n <StyledFieldGroupLegend open={open} {...restProps}>\n <Flex container={{ alignItems: 'center', justify: 'between', gap: 0.5 }}>\n <Flex container={{ alignItems: 'center', gap: 0.5 }}>\n {children}\n {additionalInfo && (\n <AdditionalInfo heading={additionalInfo.heading}>\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </Flex>\n {actions && <Actions items={actions} />}\n </Flex>\n </StyledFieldGroupLegend>\n );\n};\n\nconst FieldGroup: FunctionComponent<FieldGroupProps & ForwardProps> = forwardRef(\n (\n {\n children,\n description,\n name,\n additionalInfo,\n actions,\n collapsible = false,\n defaultCollapsed = false,\n headingTag,\n ...restProps\n }: PropsWithoutRef<FieldGroupProps>,\n ref: FieldGroupProps['ref']\n ) => {\n const [open, setOpen] = useState(!defaultCollapsed);\n const t = useI18n();\n const uid = useUID();\n\n const descAndChildren = (\n <Grid container={{ cols: 'minmax(0, 1fr)', gap: 3 }}>\n {description && <HTML id={`${uid}-description`} as='p' content={description} />}\n <div>{children}</div>\n </Grid>\n );\n\n return (\n <StyledFieldGroup\n aria-label={name}\n aria-describedby={description ? `${uid}-description` : undefined}\n {...restProps}\n ref={ref}\n >\n {name && (\n <FieldGroupLegend open={open} actions={actions} additionalInfo={additionalInfo}>\n {collapsible ? (\n <StyledExpandButton\n type='button'\n variant='text'\n onClick={() => {\n setOpen(cur => !cur);\n }}\n aria-expanded={open ? 'true' : 'false'}\n aria-label={t(open ? 'collapse_noun' : 'expand_noun', [name])}\n >\n <Flex\n container={{ direction: 'row', alignItems: 'center', gap: 0.5 }}\n forwardedAs='span'\n >\n <Icon name='caret-right' />\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName>{name}</StyledFieldGroupName>\n )}\n </Flex>\n </StyledExpandButton>\n ) : (\n <>\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName>{name}</StyledFieldGroupName>\n )}\n </>\n )}\n </FieldGroupLegend>\n )}\n {collapsible ? (\n <ExpandCollapse collapsed={!open}>{descAndChildren}</ExpandCollapse>\n ) : (\n descAndChildren\n )}\n </StyledFieldGroup>\n );\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,QAAQ,EAAsD,MAAM,OAAO,CAAC;AACjG,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,KAAK,cAAc,MAAM,gCAAgC,CAAC;AACjE,OAAO,OAAyB,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAY,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,cAAuC,MAAM,mBAAmB,CAAC;AAExE,YAAY,CAAC,cAAc,CAAC,CAAC;AAuC7B,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CACvC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,SAAS,EAAE,EACpB,EACF,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC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,YAE7D,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,EAC/D,WAAW,EAAC,MAAM,aAElB,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,GAAG,EAC1B,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,IACI,GACY,CACtB,CAAC,CAAC,CAAC,CACF,4BACG,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,GACA,CACJ,GACgB,CACpB,EACA,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,cAAc,IAAC,SAAS,EAAE,CAAC,IAAI,YAAG,eAAe,GAAkB,CACrE,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,IACgB,CACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { forwardRef, useState, FunctionComponent, 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 * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport Actions, { ActionsProps } from '../Actions';\nimport { defaultThemeProp } from '../../theme';\nimport { BaseProps, ForwardProps } from '../../types';\nimport { useDirection, useI18n, useUID } from '../../hooks';\nimport { calculateFontSize, FontSize, omitProps } from '../../styles';\nimport AdditionalInfo, { AdditionalInfoProps } from '../AdditionalInfo';\n\nregisterIcon(caretRightIcon);\n\nexport interface FieldGroupProps extends 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 /**\n * If true, the Field Group will be able to collapse the content of its children by clicking on the name.\n * @default false\n */\n collapsible?: boolean;\n /**\n * If true, the Field Group will be collapsed on the first render.\n * @default false\n */\n defaultCollapsed?: boolean;\n /** Select the heading tag for header */\n headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /** The name associated with the Field Group. */\n name?: string;\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 /** A reference to the wrapping element. */\n ref?: Ref<HTMLFieldSetElement>;\n}\n\ninterface FieldGroupLegendProps {\n open: boolean;\n actions?: ActionsProps['items'];\n children?: ReactNode;\n additionalInfo?: FieldGroupProps['additionalInfo'];\n}\n\nconst StyledExpandButton = styled(Button)(\n ({\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} {\n transform: rotate(90deg);\n }\n &[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n }\n);\n\nStyledExpandButton.defaultProps = defaultThemeProp;\n\nexport const StyledFieldGroupName = styled.span``;\n\nexport const StyledFieldGroupLegend = styled.legend.withConfig<{ open: boolean }>(\n omitProps('open')\n)(\n ({\n open,\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 ${open &&\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 & & ${StyledFieldGroupName} {\n font-size: ${fontSizes[text.h4['font-size'] as FontSize]};\n font-weight: ${text.h4['font-weight']};\n }\n\n & & & ${StyledFieldGroupName} {\n font-size: ${fontSizes[text.h5['font-size'] as FontSize]};\n font-weight: ${text.h5['font-weight']};\n }\n\n & & & & ${StyledFieldGroupName} {\n font-size: ${fontSizes[text.h6['font-size'] as FontSize]};\n font-weight: ${text.h6['font-weight']};\n }\n `;\n }\n);\n\nStyledFieldGroup.defaultProps = defaultThemeProp;\n\nconst FieldGroupLegend: FunctionComponent<FieldGroupLegendProps> = ({\n children,\n open,\n actions,\n additionalInfo,\n ...restProps\n}) => {\n return (\n <StyledFieldGroupLegend open={open} {...restProps}>\n <Flex container={{ alignItems: 'center', justify: 'between', gap: 0.5 }}>\n <Flex container={{ alignItems: 'center', gap: 0.5 }}>\n {children}\n {additionalInfo && (\n <AdditionalInfo heading={additionalInfo.heading}>\n {additionalInfo.content}\n </AdditionalInfo>\n )}\n </Flex>\n {actions && <Actions items={actions} />}\n </Flex>\n </StyledFieldGroupLegend>\n );\n};\n\nconst FieldGroup: FunctionComponent<FieldGroupProps & ForwardProps> = forwardRef(\n (\n {\n children,\n description,\n name,\n additionalInfo,\n actions,\n collapsible = false,\n defaultCollapsed = false,\n headingTag,\n ...restProps\n }: PropsWithoutRef<FieldGroupProps>,\n ref: FieldGroupProps['ref']\n ) => {\n const [open, setOpen] = useState(!defaultCollapsed);\n const t = useI18n();\n const uid = useUID();\n\n const descAndChildren = (\n <Grid container={{ cols: 'minmax(0, 1fr)', gap: 3 }}>\n {description && <HTML id={`${uid}-description`} as='p' content={description} />}\n <div>{children}</div>\n </Grid>\n );\n\n return (\n <StyledFieldGroup\n aria-label={name}\n aria-describedby={description ? `${uid}-description` : undefined}\n {...restProps}\n ref={ref}\n >\n {name && (\n <FieldGroupLegend open={open} actions={actions} additionalInfo={additionalInfo}>\n {collapsible ? (\n <StyledExpandButton\n type='button'\n variant='text'\n onClick={() => {\n setOpen(cur => !cur);\n }}\n aria-expanded={open ? 'true' : 'false'}\n aria-label={t(open ? 'collapse_noun' : 'expand_noun', [name])}\n >\n <Flex\n container={{ direction: 'row', alignItems: 'center', gap: 0.5 }}\n forwardedAs='span'\n >\n <Icon name='caret-right' />\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName>{name}</StyledFieldGroupName>\n )}\n </Flex>\n </StyledExpandButton>\n ) : (\n <>\n {headingTag ? (\n <Text variant={headingTag}>{name}</Text>\n ) : (\n <StyledFieldGroupName>{name}</StyledFieldGroupName>\n )}\n </>\n )}\n </FieldGroupLegend>\n )}\n {collapsible ? (\n <ExpandCollapse collapsed={!open}>{descAndChildren}</ExpandCollapse>\n ) : (\n descAndChildren\n )}\n </StyledFieldGroup>\n );\n }\n);\n\nexport default FieldGroup;\n"]}
@@ -14,7 +14,7 @@ export interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdPr
14
14
  fields: FieldValueListItem[];
15
15
  /**
16
16
  * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.
17
- * @default "inline"
17
+ * @default 'inline'
18
18
  */
19
19
  variant?: FieldValueVariant | 'value-comparison';
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqC,UAAU,EAAE,MA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AAC,qBAAqB;gBACvB,CAAC,CAAC,gBAAgB;YACtB,MAAM,EAAE,OAAO,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,MAAM,EAAE,OAAO,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;SACjD,EACD,EAAE,EAAE,oBAAoB,EACxB,OAAO,EAAE,OAAO,YAEf,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;YACzD,OAAO,CACL,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EACL,CAAC,YAAY,IAAI,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,uBAAuB;oBACjE,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,QAAQ,IAET,EAAE,IAAI,IAAI,CACf,CACH,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { ReactNode, FunctionComponent, Ref, forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport Grid from '../Grid';\nimport { StyledLabel } from '../Label';\nimport { useBreakpoint, useConsolidatedRef, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport ShowMoreLess from '../ShowMoreLess';\n\nimport { getFieldValueListTestIds, getFieldValueItemTestIds } from './FieldValueList.test-ids';\n\nexport type FieldValueVariant = 'inline' | 'stacked';\n\nexport interface FieldValueListItemProps extends TestIdProp {\n name: string;\n value?: ReactNode;\n variant?: FieldValueVariant;\n}\n\nexport interface FieldValueListItem extends FieldValueListItemProps {\n id?: string;\n}\n\nexport interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The set of field values to render in the list. */\n fields: FieldValueListItem[];\n /**\n * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.\n * @default \"inline\"\n */\n variant?: FieldValueVariant | 'value-comparison';\n}\n\nexport const StyledFieldName = styled.dt`\n word-break: break-word;\n`;\n\nexport const StyledFieldValue = styled.dd`\n word-break: break-word;\n`;\n\nexport type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;\n\nexport const StyledFieldValueList = styled.dl<StyledFieldValueListProps>(({ variant, theme }) => {\n return css`\n width: 100%;\n\n ${variant === 'value-comparison' &&\n css`\n dt {\n width: 100%;\n }\n dd {\n text-align: end;\n padding-inline-start: calc(2 * ${theme.base.spacing});\n }\n ${StyledLabel} {\n max-width: unset;\n }\n dd:not(:last-of-type),\n dt:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-bottom: calc(0.5 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledStackedFieldValue = styled.div``;\n\nexport const FieldValueItem = ({\n testId,\n name,\n value,\n variant = 'inline'\n}: FieldValueListItemProps) => {\n const testIds = useTestIds(testId, getFieldValueItemTestIds);\n\n const displayValue =\n typeof value === 'string' ? <ShowMoreLess lines={3}>{value}</ShowMoreLess> : value;\n\n const labelAndValue = (\n <>\n <StyledLabel data-testid={testIds.name} as={StyledFieldName}>\n {name}\n </StyledLabel>\n <StyledFieldValue data-testid={testIds.value}>\n {value ? displayValue : <span aria-hidden='true'>&ndash;&ndash;</span>}\n </StyledFieldValue>\n </>\n );\n\n return variant === 'stacked' ? (\n <StyledStackedFieldValue data-testid={testIds.root}>{labelAndValue}</StyledStackedFieldValue>\n ) : (\n <>{labelAndValue}</>\n );\n};\n\nconst FieldValueList: FunctionComponent<FieldValueListProps & ForwardProps> = forwardRef(\n (\n { testId, fields, variant = 'inline', ...restProps }: FieldValueListProps,\n ref: Ref<HTMLDivElement>\n ) => {\n const testIds = useTestIds(testId, getFieldValueListTestIds);\n\n const fieldValueListRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isXSContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: fieldValueListRef,\n themeProp: 'content-width'\n });\n\n return (\n <Grid\n data-testid={testIds.root}\n {...restProps}\n ref={fieldValueListRef}\n container={{\n cols:\n ['inline', 'value-comparison'].includes(variant) && isXSContentWidthOrAbove\n ? '16ch minmax(0, 1fr)'\n : 'minmax(0, 1fr)',\n colGap: variant !== 'value-comparison' ? 2 : 0,\n rowGap: variant !== 'value-comparison' ? 1 : 0.5\n }}\n as={StyledFieldValueList}\n variant={variant}\n >\n {fields.map(({ id, name, value, variant: fieldVariant }) => {\n return (\n <FieldValueItem\n name={name}\n value={value}\n variant={\n (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove\n ? 'stacked'\n : 'inline'\n }\n key={id ?? name}\n />\n );\n })}\n </Grid>\n );\n }\n);\n\nexport default FieldValueList;\n"]}
1
+ {"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqC,UAAU,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAwB/F,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CAAA;;CAEvC,CAAC;AAEF,MAAM,CAAC,MAAM,gBA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C,KAAK,SAAS,IAAI,CAAC,uBAAuB;oBACjE,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,QAAQ,IAET,EAAE,IAAI,IAAI,CACf,CACH,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { ReactNode, FunctionComponent, Ref, forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport Grid from '../Grid';\nimport { StyledLabel } from '../Label';\nimport { useBreakpoint, useConsolidatedRef, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport ShowMoreLess from '../ShowMoreLess';\n\nimport { getFieldValueListTestIds, getFieldValueItemTestIds } from './FieldValueList.test-ids';\n\nexport type FieldValueVariant = 'inline' | 'stacked';\n\nexport interface FieldValueListItemProps extends TestIdProp {\n name: string;\n value?: ReactNode;\n variant?: FieldValueVariant;\n}\n\nexport interface FieldValueListItem extends FieldValueListItemProps {\n id?: string;\n}\n\nexport interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The set of field values to render in the list. */\n fields: FieldValueListItem[];\n /**\n * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.\n * @default 'inline'\n */\n variant?: FieldValueVariant | 'value-comparison';\n}\n\nexport const StyledFieldName = styled.dt`\n word-break: break-word;\n`;\n\nexport const StyledFieldValue = styled.dd`\n word-break: break-word;\n`;\n\nexport type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;\n\nexport const StyledFieldValueList = styled.dl<StyledFieldValueListProps>(({ variant, theme }) => {\n return css`\n width: 100%;\n\n ${variant === 'value-comparison' &&\n css`\n dt {\n width: 100%;\n }\n dd {\n text-align: end;\n padding-inline-start: calc(2 * ${theme.base.spacing});\n }\n ${StyledLabel} {\n max-width: unset;\n }\n dd:not(:last-of-type),\n dt:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-bottom: calc(0.5 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledStackedFieldValue = styled.div``;\n\nexport const FieldValueItem = ({\n testId,\n name,\n value,\n variant = 'inline'\n}: FieldValueListItemProps) => {\n const testIds = useTestIds(testId, getFieldValueItemTestIds);\n\n const displayValue =\n typeof value === 'string' ? <ShowMoreLess lines={3}>{value}</ShowMoreLess> : value;\n\n const labelAndValue = (\n <>\n <StyledLabel data-testid={testIds.name} as={StyledFieldName}>\n {name}\n </StyledLabel>\n <StyledFieldValue data-testid={testIds.value}>\n {value ? displayValue : <span aria-hidden='true'>&ndash;&ndash;</span>}\n </StyledFieldValue>\n </>\n );\n\n return variant === 'stacked' ? (\n <StyledStackedFieldValue data-testid={testIds.root}>{labelAndValue}</StyledStackedFieldValue>\n ) : (\n <>{labelAndValue}</>\n );\n};\n\nconst FieldValueList: FunctionComponent<FieldValueListProps & ForwardProps> = forwardRef(\n (\n { testId, fields, variant = 'inline', ...restProps }: FieldValueListProps,\n ref: Ref<HTMLDivElement>\n ) => {\n const testIds = useTestIds(testId, getFieldValueListTestIds);\n\n const fieldValueListRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isXSContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: fieldValueListRef,\n themeProp: 'content-width'\n });\n\n return (\n <Grid\n data-testid={testIds.root}\n {...restProps}\n ref={fieldValueListRef}\n container={{\n cols:\n ['inline', 'value-comparison'].includes(variant) && isXSContentWidthOrAbove\n ? '16ch minmax(0, 1fr)'\n : 'minmax(0, 1fr)',\n colGap: variant !== 'value-comparison' ? 2 : 0,\n rowGap: variant !== 'value-comparison' ? 1 : 0.5\n }}\n as={StyledFieldValueList}\n variant={variant}\n >\n {fields.map(({ id, name, value, variant: fieldVariant }) => {\n return (\n <FieldValueItem\n name={name}\n value={value}\n variant={\n (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove\n ? 'stacked'\n : 'inline'\n }\n key={id ?? name}\n />\n );\n })}\n </Grid>\n );\n }\n);\n\nexport default FieldValueList;\n"]}
@@ -8,8 +8,8 @@ export interface FileDisplayProps extends Pick<FileItemProps, 'onPreview' | 'onD
8
8
  displayText?: string;
9
9
  /**
10
10
  * Display value either as file, link only or textual representation.
11
- * @default "file"
12
- * */
11
+ * @default 'file'
12
+ */
13
13
  variant?: 'file' | 'link' | 'text';
14
14
  /** Thumbnail image. */
15
15
  thumbnail?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"FileDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGtE,OAAiB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,YAAY,CAAC,EACrD,SAAS,EACT,cAAc;IAChB,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;SAGK;IACL,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACnC,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,iBAAiB,GAAG,eAAe,CAAC,CAAC;CACjE;AAED,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,GAAG,YAAY,CA0CnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"FileDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":"AAA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WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,8BAAkB,MAAM,6BAAsB,GACzE,CACR,CAAC;KACH;IAED,IAAI,OAAO,KAAK,MAAM;QACpB,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAA6B,KAAM,SAAS,EAAE,IAAI,EAAE,KAAK,YACjE,WAAW,IAAI,KAAK,GAChB,CACR,CAAC;IAEJ,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,GAAG,EAAE,GAA6B,EAClC,IAAI,EAAE,WAAW,IAAI,KAAK,EAC1B,GAAG,EAAE,KAAK,KACN;YACF,SAAS;YACT,UAAU;YACV,SAAS;SACV,GACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Link from '../Link';\n\nimport FileItem, { FileItemProps } from './FileItem';\n\nexport interface FileDisplayProps\n extends Pick<FileItemProps, 'onPreview' | 'onDownload'>,\n BaseProps,\n NoChildrenProp {\n /** URL address */\n value?: string;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Display value either as file, link only or textual representation.\n * @default \"file\"\n * */\n variant?: 'file' | 'link' | 'text';\n /** Thumbnail image. */\n thumbnail?: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement | HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst FileDisplay: FunctionComponent<FileDisplayProps & ForwardProps> = forwardRef(\n (\n {\n displayText,\n value,\n variant,\n thumbnail,\n onPreview,\n onDownload,\n ...restProps\n }: PropsWithoutRef<FileDisplayProps>,\n ref: FileDisplayProps['ref']\n ) => {\n if (variant === 'text' || !value) {\n return (\n <span ref={ref} {...restProps}>\n {value ? displayText || value : <span aria-hidden='true'>&ndash;&ndash;</span>}\n </span>\n );\n }\n\n if (variant === 'link')\n return (\n <Link ref={ref as Ref<HTMLAnchorElement>} {...restProps} href={value}>\n {displayText || value}\n </Link>\n );\n\n return (\n <FileItem\n {...restProps}\n ref={ref as Ref<HTMLButtonElement>}\n name={displayText || value}\n url={value}\n {...{\n thumbnail,\n onDownload,\n onPreview\n }}\n />\n );\n }\n);\n\nexport default FileDisplay;\n"]}
1
+ {"version":3,"file":"FileDisplay.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAG5E,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,QAA2B,MAAM,YAAY,CAAC;AAqBrD,MAAM,WAAW,GAAuD,UAAU,CAChF,CACE,EACE,WAAW,EACX,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,GAAG,SAAS,EACsB,EACpC,GAA4B,EAC5B,EAAE;IACF,IAAI,OAAO,KAAK,MAAM,IAAI,CAAC,KAAK,EAAE;QAChC,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,KAAK,CAAC,CAAC,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,8BAAkB,MAAM,6BAAsB,GACzE,CACR,CAAC;KACH;IAED,IAAI,OAAO,KAAK,MAAM;QACpB,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAA6B,KAAM,SAAS,EAAE,IAAI,EAAE,KAAK,YACjE,WAAW,IAAI,KAAK,GAChB,CACR,CAAC;IAEJ,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,GAAG,EAAE,GAA6B,EAClC,IAAI,EAAE,WAAW,IAAI,KAAK,EAC1B,GAAG,EAAE,KAAK,KACN;YACF,SAAS;YACT,UAAU;YACV,SAAS;SACV,GACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Link from '../Link';\n\nimport FileItem, { FileItemProps } from './FileItem';\n\nexport interface FileDisplayProps\n extends Pick<FileItemProps, 'onPreview' | 'onDownload'>,\n BaseProps,\n NoChildrenProp {\n /** URL address */\n value?: string;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Display value either as file, link only or textual representation.\n * @default 'file'\n */\n variant?: 'file' | 'link' | 'text';\n /** Thumbnail image. */\n thumbnail?: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement | HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst FileDisplay: FunctionComponent<FileDisplayProps & ForwardProps> = forwardRef(\n (\n {\n displayText,\n value,\n variant,\n thumbnail,\n onPreview,\n onDownload,\n ...restProps\n }: PropsWithoutRef<FileDisplayProps>,\n ref: FileDisplayProps['ref']\n ) => {\n if (variant === 'text' || !value) {\n return (\n <span ref={ref} {...restProps}>\n {value ? displayText || value : <span aria-hidden='true'>&ndash;&ndash;</span>}\n </span>\n );\n }\n\n if (variant === 'link')\n return (\n <Link ref={ref as Ref<HTMLAnchorElement>} {...restProps} href={value}>\n {displayText || value}\n </Link>\n );\n\n return (\n <FileItem\n {...restProps}\n ref={ref as Ref<HTMLButtonElement>}\n name={displayText || value}\n url={value}\n {...{\n thumbnail,\n onDownload,\n onPreview\n }}\n />\n );\n }\n);\n\nexport default FileDisplay;\n"]}
@@ -3,9 +3,7 @@ import { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types
3
3
  import { FormControlProps } from '../FormControl';
4
4
  import { FileUploadItemProps } from './FileUploadItem';
5
5
  export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
6
- /**
7
- * Called when files are added either via the input or drop zone.
8
- */
6
+ /** Called when files are added either via the input or drop zone. */
9
7
  onFilesAdded?: (files: File[]) => void;
10
8
  /**
11
9
  * Allow multiple files to be selected from the OS specific file browser.
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources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