@procore/core-react 12.5.0 → 12.7.0

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 (200) hide show
  1. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  2. package/dist/Avatar/Avatar.styles.js +5 -5
  3. package/dist/AvatarStack/AvatarStack.styles.d.ts +2 -2
  4. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  5. package/dist/Badge/Badge.styles.js +2 -2
  6. package/dist/Banner/Banner.styles.js +10 -10
  7. package/dist/Box/Box.styles.js +1 -1
  8. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  9. package/dist/Button/Button.styles.js +5 -5
  10. package/dist/Calendar/Calendar.styles.js +8 -8
  11. package/dist/Card/Card.styles.js +1 -1
  12. package/dist/Checkbox/Checkbox.styles.js +6 -6
  13. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  14. package/dist/ContactItem/ContactItem.styles.d.ts +1 -1
  15. package/dist/ContactItem/ContactItem.styles.js +5 -5
  16. package/dist/Content/Content.styles.js +2 -2
  17. package/dist/DateInput/DateInput.styles.js +6 -6
  18. package/dist/DetailPage/DetailPage.styles.js +7 -7
  19. package/dist/Dropdown/Dropdown.styles.js +3 -3
  20. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  21. package/dist/Dropzone/Dropzone.js +1 -1
  22. package/dist/Dropzone/Dropzone.styles.js +9 -9
  23. package/dist/EmptyState/EmptyState.styles.js +6 -6
  24. package/dist/Field/Field.styles.js +3 -3
  25. package/dist/FileList/FileList.styles.js +4 -4
  26. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  27. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  28. package/dist/FileSelect/FileSelect.styles.js +2 -2
  29. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  30. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  31. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  32. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  33. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  34. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  35. package/dist/FileSelect/ThumbnailList/index.d.ts +1 -1
  36. package/dist/FileSelect/ThumbnailList/index.js.map +1 -1
  37. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  38. package/dist/FileToken/FileToken.styles.js +4 -4
  39. package/dist/FilterToken/FilterToken.styles.js +2 -2
  40. package/dist/FlexList/FlexList.styles.js +1 -1
  41. package/dist/Form/Form.styles.js +14 -14
  42. package/dist/Form/StyledFormikForm.styles.d.ts +1 -1
  43. package/dist/Form/StyledFormikForm.styles.js +2 -2
  44. package/dist/Grid/Grid.styles.js +2 -2
  45. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  46. package/dist/Input/Input.styles.js +1 -1
  47. package/dist/Link/Link.styles.js +1 -1
  48. package/dist/ListPage/ListPage.styles.js +8 -8
  49. package/dist/Loader/Loader.styles.js +2 -2
  50. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  51. package/dist/Modal/Modal.styles.d.ts +1 -1
  52. package/dist/Modal/Modal.styles.js +13 -13
  53. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  54. package/dist/NextListPage/NextListPage.d.ts +24 -0
  55. package/dist/NextListPage/NextListPage.js +44 -0
  56. package/dist/NextListPage/NextListPage.js.map +1 -0
  57. package/dist/NextListPage/NextListPage.types.d.ts +3 -0
  58. package/dist/NextListPage/NextListPage.types.js +2 -0
  59. package/dist/NextListPage/NextListPage.types.js.map +1 -0
  60. package/dist/NextListPage/index.d.ts +2 -0
  61. package/dist/NextListPage/index.js +2 -0
  62. package/dist/NextListPage/index.js.map +1 -0
  63. package/dist/NextMenu/NextMenu.styles.js +3 -3
  64. package/dist/Notation/Notation.js +1 -1
  65. package/dist/NumberInput/NumberInput.styles.js +7 -7
  66. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  67. package/dist/PageLayout/PageLayout.styles.js +15 -15
  68. package/dist/Pagination/Pagination.styles.d.ts +2 -2
  69. package/dist/Pagination/Pagination.styles.js +5 -5
  70. package/dist/Panel/Panel.styles.d.ts +1 -1
  71. package/dist/Panel/Panel.styles.js +11 -11
  72. package/dist/Pill/Pill.styles.js +2 -2
  73. package/dist/PillSelect/PillSelect.styles.js +4 -4
  74. package/dist/Popover/Popover.styles.js +2 -2
  75. package/dist/Portal/Portal.styles.js +1 -1
  76. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  77. package/dist/RadioButton/RadioButton.styles.js +3 -3
  78. package/dist/Required/Required.styles.js +3 -3
  79. package/dist/Search/Search.styles.js +5 -5
  80. package/dist/Section/Section.styles.js +6 -6
  81. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  82. package/dist/Select/Select.styles.js +7 -7
  83. package/dist/Semantic/Semantic.styles.js +9 -9
  84. package/dist/Slider/Slider.styles.d.ts +1 -1
  85. package/dist/Slider/Slider.styles.js +5 -5
  86. package/dist/Spinner/Spinner.styles.js +7 -7
  87. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  88. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  89. package/dist/Switch/Switch.styles.js +4 -4
  90. package/dist/Table/Table.styles.js +28 -28
  91. package/dist/TableShelf/TableShelf.styles.js +5 -5
  92. package/dist/Tabs/Tabs.styles.js +8 -8
  93. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  94. package/dist/TextArea/TextArea.styles.js +1 -1
  95. package/dist/TextEditor/TextEditor.js +7 -1
  96. package/dist/TextEditor/TextEditor.js.map +1 -1
  97. package/dist/TextEditorOutput/TextEditorOutput.js +1 -0
  98. package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
  99. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  100. package/dist/Thumbnail/Thumbnail.styles.d.ts +1 -1
  101. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  102. package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +1 -1
  103. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  104. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  105. package/dist/TieredSelect/index.d.ts +1 -1
  106. package/dist/TieredSelect/index.js.map +1 -1
  107. package/dist/Tile/Tile.styles.js +8 -8
  108. package/dist/Title/Title.styles.d.ts +1 -1
  109. package/dist/Title/Title.styles.js +7 -7
  110. package/dist/Toast/Toast.styles.js +3 -3
  111. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  112. package/dist/Token/Token.styles.js +3 -3
  113. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  114. package/dist/Tooltip/Tooltip.styles.js +2 -2
  115. package/dist/Tree/Tree.styles.d.ts +2 -2
  116. package/dist/Tree/Tree.styles.js +9 -9
  117. package/dist/Typeahead/Typeahead.styles.js +3 -3
  118. package/dist/Typography/Typography.styles.js +1 -1
  119. package/dist/Typography/Typography.table.story.js +2 -2
  120. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  121. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
  122. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  123. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  124. package/dist/_typedoc/Box/Box.types.json +68 -68
  125. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  126. package/dist/_typedoc/Button/Button.types.json +12 -12
  127. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  128. package/dist/_typedoc/Card/Card.types.json +6 -6
  129. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  130. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  131. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  132. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  133. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  134. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  135. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
  136. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  137. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  138. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  139. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  140. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  141. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  142. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  143. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  144. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  145. package/dist/_typedoc/Form/Form.types.json +726 -726
  146. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  147. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  148. package/dist/_typedoc/Input/Input.types.json +2 -2
  149. package/dist/_typedoc/Link/Link.types.json +4 -4
  150. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  151. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  152. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  153. package/dist/_typedoc/Modal/Modal.types.json +41 -41
  154. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  155. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  156. package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
  157. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
  158. package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
  159. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  160. package/dist/_typedoc/Panel/Panel.types.json +27 -27
  161. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  162. package/dist/_typedoc/PillSelect/PillSelect.types.json +47 -47
  163. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  164. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  165. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  166. package/dist/_typedoc/Required/Required.types.json +5 -5
  167. package/dist/_typedoc/Search/Search.types.json +18 -18
  168. package/dist/_typedoc/Section/Section.types.json +14 -14
  169. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  170. package/dist/_typedoc/Select/Select.types.json +57 -57
  171. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  172. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  173. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  174. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  175. package/dist/_typedoc/Table/Table.types.json +99 -99
  176. package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
  177. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  178. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  179. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  180. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  181. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  182. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  183. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  184. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  185. package/dist/_typedoc/Title/Title.types.json +1 -1
  186. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  187. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  188. package/dist/_typedoc/Token/Token.types.json +4 -4
  189. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  190. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  191. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  192. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  193. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  194. package/dist/_typedoc/_utils/types.json +3 -3
  195. package/dist/_utils/TinyMCE.js +2 -2
  196. package/dist/_utils/TinyMCE.js.map +1 -1
  197. package/dist/index.d.ts +3 -1
  198. package/dist/index.js +2 -0
  199. package/dist/index.js.map +1 -1
  200. package/package.json +6 -5
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditor.js","names":["Editor","React","useState","useI18nContext","useZIndexContext","defaultPlugins","generateExternalPlugins","generateLanguageUrl","getValidLookupLocale","tinyMCEConfig","tinyMCESource","tinyMCETabMarkup","tinyMCEVersion","GlobalStyle","errorRed","noop","TextEditorContext","createContext","features","tabAsNavigation","undefined","stickyToolbar","TextEditorProvider","_ref","children","createElement","Provider","value","setupShortcuts","editor","on","checkTabPress","event","altKey","key","execCommand","preventDefault","stopPropagation","TextEditor","_ref2","_props$initialValue","_props$value","error","initOverrides","init","locale","_ref2$onChange","onChange","_onInit","onInit","_ref2$plugins","plugins","props","_objectWithoutProperties","_excluded","_useI18nContext","contextLocale","_useZIndexContext","zIndex","_React$useContext","useContext","toolbar_sticky","tabControls","external_plugins","filter","p","nonbreaking_force_tab","setup","onEditorChange","_","getContent","isDirty","ref","useRef","updateError","current","style","borderColor","useEffect","editorContainer","_useState","initialValue","_useState2","_slicedToArray","derivedInitial","Fragment","$zIndex","_extends","_objectSpread","language_url","language","content_style","tinymceScriptSrc","concat","displayName"],"sources":["../../src/TextEditor/TextEditor.tsx"],"sourcesContent":["import { Editor } from '@tinymce/tinymce-react'\nimport React, { useState } from 'react'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useZIndexContext } from '../_hooks/ZIndex'\nimport {\n defaultPlugins,\n generateExternalPlugins,\n generateLanguageUrl,\n getValidLookupLocale,\n tinyMCEConfig,\n tinyMCESource,\n tinyMCETabMarkup,\n tinyMCEVersion,\n} from '../_utils/TinyMCE'\nimport { GlobalStyle } from './TextEditor.styles'\nimport type {\n TextEditorProps,\n TextEditorProviderProps,\n} from './TextEditor.types'\n\nconst errorRed = '#E61920'\n\nfunction noop() {}\n\nconst TextEditorContext = React.createContext<\n Omit<TextEditorProviderProps, 'children'>\n>({\n features: {\n tabAsNavigation: undefined,\n stickyToolbar: undefined,\n },\n})\n\nexport function TextEditorProvider({\n children,\n features,\n}: TextEditorProviderProps) {\n return (\n <TextEditorContext.Provider value={{ features }}>\n {children}\n </TextEditorContext.Provider>\n )\n}\n\n/**\n * editor.addShortcut does not notify on Tab key presses\n */\nfunction setupShortcuts(editor: any) {\n editor.on('keydown', function checkTabPress(event: React.KeyboardEvent) {\n if (event.altKey && event.key === 'Tab') {\n editor.execCommand('mceInsertContent', false, tinyMCETabMarkup)\n event.preventDefault()\n event.stopPropagation()\n return false\n }\n })\n}\n\n/**\n\n We use text editors to allow users to enter multiple lines of formatted text.\n\n If users need to add unformatted text, see Text Area.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-texteditor--demo)\n\n @see [Design Guidelines](https://design.procore.com/text-editor)\n\n */\nexport function TextEditor({\n error,\n init: initOverrides,\n locale,\n onChange = noop,\n onInit: _onInit,\n plugins = defaultPlugins,\n ...props\n}: TextEditorProps) {\n const { locale: contextLocale } = useI18nContext()\n const { value: zIndex } = useZIndexContext()\n\n const { features } = React.useContext(TextEditorContext)\n const stickyToolbar = features?.stickyToolbar ? { toolbar_sticky: true } : {}\n const tabControls = features?.tabAsNavigation\n ? {\n external_plugins: generateExternalPlugins(\n plugins,\n defaultPlugins.filter((p) => p !== 'nonbreaking')\n ),\n nonbreaking_force_tab: false,\n setup: setupShortcuts,\n }\n : {}\n\n const onEditorChange: React.ComponentProps<\n typeof Editor\n >['onEditorChange'] = (_: any, editor: any) => {\n onChange(editor.getContent(), editor.isDirty())\n }\n\n const ref = React.useRef<HTMLElement>()\n\n const updateError = () => {\n if (ref.current) {\n if (error) {\n ref.current.style.borderColor = errorRed\n } else {\n ref.current.style.borderColor = ''\n }\n }\n }\n\n React.useEffect(() => {\n updateError()\n }, [error])\n\n const onInit: React.ComponentProps<typeof Editor>['onInit'] = (\n event,\n editor\n ) => {\n ref.current = editor.editorContainer\n updateError()\n _onInit && _onInit(event, editor)\n }\n\n const [derivedInitial] = useState(props.initialValue ?? props.value)\n\n // zIndex + 1 because on first render zIndex of Portal(Modal) is higher\n return (\n <>\n <GlobalStyle $zIndex={zIndex + 1} />\n <Editor\n init={{\n ...tinyMCEConfig,\n external_plugins: generateExternalPlugins(plugins),\n language_url: generateLanguageUrl(locale || contextLocale),\n language: getValidLookupLocale(locale || contextLocale),\n content_style: `p { margin: 0; }`,\n ...stickyToolbar,\n ...tabControls,\n ...initOverrides,\n }}\n tinymceScriptSrc={`${tinyMCESource}/${tinyMCEVersion}/tinymce.min.js`}\n onInit={onInit}\n onEditorChange={onEditorChange}\n {...props}\n value={props.value ?? props.initialValue}\n initialValue={derivedInitial}\n />\n </>\n )\n}\n\nTextEditor.displayName = 'TextEditor'\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SACEC,cAAc,EACdC,uBAAuB,EACvBC,mBAAmB,EACnBC,oBAAoB,EACpBC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,QACT,mBAAmB;AAC1B,SAASC,WAAW,QAAQ,qBAAqB;AAMjD,IAAMC,QAAQ,GAAG,SAAS;AAE1B,SAASC,IAAIA,CAAA,EAAG,CAAC;AAEjB,IAAMC,iBAAiB,gBAAGf,KAAK,CAACgB,aAAa,CAE3C;EACAC,QAAQ,EAAE;IACRC,eAAe,EAAEC,SAAS;IAC1BC,aAAa,EAAED;EACjB;AACF,CAAC,CAAC;AAEF,OAAO,SAASE,kBAAkBA,CAAAC,IAAA,EAGN;EAAA,IAF1BC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRN,QAAQ,GAAAK,IAAA,CAARL,QA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B,YAAa;IACzCA,YAAY,EAAEG;EAAe,EAC9B,CACD,CAAC;AAEP;AAEA9C,UAAU,CAACwD,WAAW,GAAG,YAAY"}
1
+ {"version":3,"file":"TextEditor.js","names":["Editor","React","useState","useI18nContext","useZIndexContext","defaultPlugins","generateExternalPlugins","generateLanguageUrl","getValidLookupLocale","tinyMCEConfig","tinyMCESource","tinyMCETabMarkup","tinyMCEVersion","GlobalStyle","errorRed","noop","TextEditorContext","createContext","features","tabAsNavigation","undefined","stickyToolbar","TextEditorProvider","_ref","children","createElement","Provider","value","setupDefaultShortcuts","editor","shortcuts","add","setupShortcuts","on","checkTabPress","event","altKey","key","execCommand","preventDefault","stopPropagation","TextEditor","_ref2","_props$initialValue","_props$value","error","initOverrides","init","locale","_ref2$onChange","onChange","_onInit","onInit","_ref2$plugins","plugins","props","_objectWithoutProperties","_excluded","_useI18nContext","contextLocale","_useZIndexContext","zIndex","_React$useContext","useContext","toolbar_sticky","tabControls","external_plugins","filter","p","nonbreaking_force_tab","setup","onEditorChange","_","getContent","isDirty","ref","useRef","updateError","current","style","borderColor","useEffect","editorContainer","_useState","initialValue","_useState2","_slicedToArray","derivedInitial","Fragment","$zIndex","_extends","_objectSpread","language_url","language","content_style","tinymceScriptSrc","concat","displayName"],"sources":["../../src/TextEditor/TextEditor.tsx"],"sourcesContent":["import { Editor } from '@tinymce/tinymce-react'\nimport React, { useState } from 'react'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useZIndexContext } from '../_hooks/ZIndex'\nimport {\n defaultPlugins,\n generateExternalPlugins,\n generateLanguageUrl,\n getValidLookupLocale,\n tinyMCEConfig,\n tinyMCESource,\n tinyMCETabMarkup,\n tinyMCEVersion,\n} from '../_utils/TinyMCE'\nimport { GlobalStyle } from './TextEditor.styles'\nimport type {\n TextEditorProps,\n TextEditorProviderProps,\n} from './TextEditor.types'\n\nconst errorRed = '#E61920'\n\nfunction noop() {}\n\nconst TextEditorContext = React.createContext<\n Omit<TextEditorProviderProps, 'children'>\n>({\n features: {\n tabAsNavigation: undefined,\n stickyToolbar: undefined,\n },\n})\n\nexport function TextEditorProvider({\n children,\n features,\n}: TextEditorProviderProps) {\n return (\n <TextEditorContext.Provider value={{ features }}>\n {children}\n </TextEditorContext.Provider>\n )\n}\n\nfunction setupDefaultShortcuts(editor: any) {\n editor.shortcuts.add('meta+shift+s', 'Strikethrough', 'Strikethrough')\n}\n\n/**\n * editor.addShortcut does not notify on Tab key presses\n */\nfunction setupShortcuts(editor: any) {\n setupDefaultShortcuts(editor)\n editor.on('keydown', function checkTabPress(event: React.KeyboardEvent) {\n if (event.altKey && event.key === 'Tab') {\n editor.execCommand('mceInsertContent', false, tinyMCETabMarkup)\n event.preventDefault()\n event.stopPropagation()\n return false\n }\n })\n}\n\n/**\n\n We use text editors to allow users to enter multiple lines of formatted text.\n\n If users need to add unformatted text, see Text Area.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-texteditor--demo)\n\n @see [Design Guidelines](https://design.procore.com/text-editor)\n\n */\nexport function TextEditor({\n error,\n init: initOverrides,\n locale,\n onChange = noop,\n onInit: _onInit,\n plugins = defaultPlugins,\n ...props\n}: TextEditorProps) {\n const { locale: contextLocale } = useI18nContext()\n const { value: zIndex } = useZIndexContext()\n\n const { features } = React.useContext(TextEditorContext)\n const stickyToolbar = features?.stickyToolbar ? { toolbar_sticky: true } : {}\n const tabControls = features?.tabAsNavigation\n ? {\n external_plugins: generateExternalPlugins(\n plugins,\n defaultPlugins.filter((p) => p !== 'nonbreaking')\n ),\n nonbreaking_force_tab: false,\n setup: setupShortcuts,\n }\n : {\n setup: setupDefaultShortcuts,\n }\n\n const onEditorChange: React.ComponentProps<\n typeof Editor\n >['onEditorChange'] = (_: any, editor: any) => {\n onChange(editor.getContent(), editor.isDirty())\n }\n\n const ref = React.useRef<HTMLElement>()\n\n const updateError = () => {\n if (ref.current) {\n if (error) {\n ref.current.style.borderColor = errorRed\n } else {\n ref.current.style.borderColor = ''\n }\n }\n }\n\n React.useEffect(() => {\n updateError()\n }, [error])\n\n const onInit: React.ComponentProps<typeof Editor>['onInit'] = (\n event,\n editor\n ) => {\n ref.current = editor.editorContainer\n updateError()\n _onInit && _onInit(event, editor)\n }\n\n const [derivedInitial] = useState(props.initialValue ?? props.value)\n\n // zIndex + 1 because on first render zIndex of Portal(Modal) is higher\n return (\n <>\n <GlobalStyle $zIndex={zIndex + 1} />\n <Editor\n init={{\n ...tinyMCEConfig,\n external_plugins: generateExternalPlugins(plugins),\n language_url: generateLanguageUrl(locale || contextLocale),\n language: getValidLookupLocale(locale || contextLocale),\n content_style: `p { margin: 0; }`,\n ...stickyToolbar,\n ...tabControls,\n ...initOverrides,\n }}\n tinymceScriptSrc={`${tinyMCESource}/${tinyMCEVersion}/tinymce.min.js`}\n onInit={onInit}\n onEditorChange={onEditorChange}\n {...props}\n value={props.value ?? props.initialValue}\n initialValue={derivedInitial}\n />\n </>\n )\n}\n\nTextEditor.displayName = 'TextEditor'\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SACEC,cAAc,EACdC,uBAAuB,EACvBC,mBAAmB,EACnBC,oBAAoB,EACpBC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,QACT,mBAAmB;AAC1B,SAASC,WAAW,QAAQ,qBAAqB;AAMjD,IAAMC,QAAQ,GAAG,SAAS;AAE1B,SAASC,IAAIA,CAAA,EAAG,CAAC;AAEjB,IAAMC,iBAAiB,gBAAGf,KAAK,CAACgB,aAAa,CAE3C;EACAC,QAAQ,EAAE;IACRC,eAAe,EAAEC,SAAS;IAC1BC,aAAa,EAAED;EACjB;AACF,CAAC,CAAC;AAEF,OAAO,SAASE,kBAAkBA,CAAAC,IAAA,EAGN;E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ACXnB,aAAa,CAChB;IACFiD,gBAAgB,KAAAC,MAAA,CAAKtF,aAAa,OAAAsF,MAAA,CAAIpF,cAAc,oBAAkB;IACtEwC,MAAM,EAAEA,MAAO;IACfmB,cAAc,EAAEA;EAAe,GAC3BhB,KAAK;IACT5B,KAAK,GAAAiB,YAAA,GAAEW,KAAK,CAAC5B,KAAK,cAAAiB,YAAA,cAAAA,YAAA,GAAIW,KAAK,CAAC6B,YAAa;IACzCA,YAAY,EAAEG;EAAe,EAC9B,CACD,CAAC;AAEP;AAEA9C,UAAU,CAACwD,WAAW,GAAG,YAAY"}
@@ -34,6 +34,7 @@ export var TextEditorOutput = /*#__PURE__*/React.forwardRef(function TextEditorO
34
34
  toolbar: false,
35
35
  autoresize_overflow_padding: 0,
36
36
  min_height: 0,
37
+ max_height: 400,
37
38
  content_style: "body { margin: 0; padding: 0; } p { margin: 0; }"
38
39
  }, initOverrides),
39
40
  tinymceScriptSrc: "".concat(tinyMCESource, "/").concat(tinyMCEVersion, "/tinymce.min.js"),
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditorOutput.js","names":["Editor","React","generateExternalPlugins","tinyMCEConfig","tinyMCESource","tinyMCEVersion","StyledEditor","TextEditorOutput","forwardRef","_ref","ref","value","initOverrides","init","props","_objectWithoutProperties","_excluded","createElement","_extends","_objectSpread","external_plugins","toolbar","autoresize_overflow_padding","min_height","content_style","tinymceScriptSrc","concat","disabled","displayName"],"sources":["../../src/TextEditorOutput/TextEditorOutput.tsx"],"sourcesContent":["import { Editor } from '@tinymce/tinymce-react'\nimport React from 'react'\nimport {\n generateExternalPlugins,\n tinyMCEConfig,\n tinyMCESource,\n tinyMCEVersion,\n} from '../_utils/TinyMCE'\nimport type { DivAttributes } from '../_utils/types'\nimport { StyledEditor } from './TextEditorOutput.styles'\nimport type { TextEditorOutputProps } from './TextEditorOutput.types'\n\n/**\n\n We use TextEditorOutput to render formatted text.\n\n @since 10.24.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-texteditoroutput--demo)\n\n */\nexport const TextEditorOutput = React.forwardRef<\n HTMLDivElement,\n TextEditorOutputProps & DivAttributes\n>(function TextEditorOutput({ value, init: initOverrides, ...props }, ref) {\n return (\n <StyledEditor {...props} ref={ref}>\n <Editor\n value={value}\n init={{\n ...tinyMCEConfig,\n external_plugins: generateExternalPlugins(['autoresize']),\n toolbar: false,\n autoresize_overflow_padding: 0,\n min_height: 0,\n content_style: `body { margin: 0; padding: 0; } p { margin: 0; }`,\n ...initOverrides,\n }}\n tinymceScriptSrc={`${tinyMCESource}/${tinyMCEVersion}/tinymce.min.js`}\n disabled\n />\n </StyledEditor>\n )\n})\n\nTextEditorOutput.displayName = 'TextEditorOutput'\n"],"mappings":";;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,uBAAuB,EACvBC,aAAa,EACbC,aAAa,EACbC,cAAc,QACT,mBAAmB;AAE1B,SAASC,YAAY,QAAQ,2BAA2B;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,gBAAgB,gBAAGN,KAAK,CAACO,UAAU,CAG9C,SAASD,gBAAgBA,CAAAE,IAAA,EAA2CC,GAAG,EAAE;EAAA,IAA7CC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAQC,aAAa,GAAAH,IAAA,CAAnBI,IAAI;IAAoBC,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAChE,oBACEf,KAAA,CAAAgB,aAAA,CAACX,YAAY,EAAAY,QAAA,KAAKJ,KAAK;IAAEJ,GAAG,EAAEA;EAAI,iBAChCT,KAAA,CAAAgB,aAAA,CAACjB,MAAM;IACLW,KAAK,EAAEA,KAAM;IACbE,IAAI,EAAAM,aAAA,CAAAA,aAAA,KACChB,aAAa;MAChBiB,gBAAgB,EAAElB,uBAAuB,CAAC,CAAC,YAAY,CAAC,CAAC;MACzDmB,OAAO,EAAE,KAAK;MACdC,2BAA2B,EAAE,CAAC;MAC9BC,UAAU,EAAE,CAAC;MACbC,aAAa;IAAoD,GAC9DZ,aAAa,CAChB;IACFa,gBAAgB,KAAAC,MAAA,CAAKtB,aAAa,OAAAsB,MAAA,CAAIrB,cAAc,oBAAkB;IACtEsB,QAAQ;EAAA,CACT,CACW,CAAC;AAEnB,CAAC,CAAC;AAEFpB,gBAAgB,CAACqB,WAAW,GAAG,kBAAkB"}
1
+ {"version":3,"file":"TextEditorOutput.js","names":["Editor","React","generateExternalPlugins","tinyMCEConfig","tinyMCESource","tinyMCEVersion","StyledEditor","TextEditorOutput","forwardRef","_ref","ref","value","initOverrides","init","props","_objectWithoutProperties","_excluded","createElement","_extends","_objectSpread","external_plugins","toolbar","autoresize_overflow_padding","min_height","max_height","content_style","tinymceScriptSrc","concat","disabled","displayName"],"sources":["../../src/TextEditorOutput/TextEditorOutput.tsx"],"sourcesContent":["import { Editor } from '@tinymce/tinymce-react'\nimport React from 'react'\nimport {\n generateExternalPlugins,\n tinyMCEConfig,\n tinyMCESource,\n tinyMCEVersion,\n} from '../_utils/TinyMCE'\nimport type { DivAttributes } from '../_utils/types'\nimport { StyledEditor } from './TextEditorOutput.styles'\nimport type { TextEditorOutputProps } from './TextEditorOutput.types'\n\n/**\n\n We use TextEditorOutput to render formatted text.\n\n @since 10.24.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-texteditoroutput--demo)\n\n */\nexport const TextEditorOutput = React.forwardRef<\n HTMLDivElement,\n TextEditorOutputProps & DivAttributes\n>(function TextEditorOutput({ value, init: initOverrides, ...props }, ref) {\n return (\n <StyledEditor {...props} ref={ref}>\n <Editor\n value={value}\n init={{\n ...tinyMCEConfig,\n external_plugins: generateExternalPlugins(['autoresize']),\n toolbar: false,\n autoresize_overflow_padding: 0,\n min_height: 0,\n max_height: 400,\n content_style: `body { margin: 0; padding: 0; } p { margin: 0; }`,\n ...initOverrides,\n }}\n tinymceScriptSrc={`${tinyMCESource}/${tinyMCEVersion}/tinymce.min.js`}\n disabled\n />\n </StyledEditor>\n )\n})\n\nTextEditorOutput.displayName = 'TextEditorOutput'\n"],"mappings":";;;;;;;;;;AAAA,SAASA,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,uBAAuB,EACvBC,aAAa,EACbC,aAAa,EACbC,cAAc,QACT,mBAAmB;AAE1B,SAASC,YAAY,QAAQ,2BAA2B;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,gBAAgB,gBAAGN,KAAK,CAACO,UAAU,CAG9C,SAASD,gBAAgBA,CAAAE,IAAA,EAA2CC,GAAG,EAAE;EAAA,IAA7CC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAQC,aAAa,GAAAH,IAAA,CAAnBI,IAAI;IAAoBC,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAChE,oBACEf,KAAA,CAAAgB,aAAA,CAACX,YAAY,EAAAY,QAAA,KAAKJ,KAAK;IAAEJ,GAAG,EAAEA;EAAI,iBAChCT,KAAA,CAAAgB,aAAA,CAACjB,MAAM;IACLW,KAAK,EAAEA,KAAM;IACbE,IAAI,EAAAM,aAAA,CAAAA,aAAA,KACChB,aAAa;MAChBiB,gBAAgB,EAAElB,uBAAuB,CAAC,CAAC,YAAY,CAAC,CAAC;MACzDmB,OAAO,EAAE,KAAK;MACdC,2BAA2B,EAAE,CAAC;MAC9BC,UAAU,EAAE,CAAC;MACbC,UAAU,EAAE,GAAG;MACfC,aAAa;IAAoD,GAC9Db,aAAa,CAChB;IACFc,gBAAgB,KAAAC,MAAA,CAAKvB,aAAa,OAAAuB,MAAA,CAAItB,cAAc,oBAAkB;IACtEuB,QAAQ;EAAA,CACT,CACW,CAAC;AAEnB,CAAC,CAAC;AAEFrB,gBAAgB,CAACsB,WAAW,GAAG,kBAAkB"}
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  export var StyledEditor = /*#__PURE__*/styled.div.withConfig({
3
3
  displayName: "StyledEditor",
4
- componentId: "core-12_5_0__sc-1lje1b0-0"
4
+ componentId: "core-12_7_0__sc-1lje1b0-0"
5
5
  })(["> .tox-tinymce{border:none;}"]);
6
6
  //# sourceMappingURL=TextEditorOutput.styles.js.map
@@ -24,7 +24,7 @@ export declare const StyledPlaceholderCaption: import("styled-components").Style
24
24
  export declare const StyledSingleLineCaption: import("styled-components").StyledComponent<"div", any, CaptionProps, never>;
25
25
  export declare const StyledSinglelineCaptionBody: import("styled-components").StyledComponent<"span", any, {}, never>;
26
26
  export declare const StyledSinglelineCaptionEnding: import("styled-components").StyledComponent<"span", any, {}, never>;
27
- export declare const StyledLabelText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../_utils/types").SpanAttributes & TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
27
+ export declare const StyledLabelText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").SpanAttributes & TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
28
28
  export declare const StyledThumbnailFigCaption: import("styled-components").StyledComponent<"figcaption", any, {
29
29
  $color?: TypographyProps['color'];
30
30
  }, never>;
@@ -28,35 +28,35 @@ var captionBase = /*#__PURE__*/css(["color:", ";font-size:12px;line-height:16px;
28
28
  });
29
29
  export var StyledMultilineCaption = /*#__PURE__*/styled.div.withConfig({
30
30
  displayName: "StyledMultilineCaption",
31
- componentId: "core-12_5_0__sc-195f70c-0"
31
+ componentId: "core-12_7_0__sc-195f70c-0"
32
32
  })(["", " display:flex;word-wrap:break-word;overflow-wrap:break-word;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:", "px;"], captionBase, multilineCaptionMaxHeight);
33
33
  export var StyledCaptionText = /*#__PURE__*/styled.span.withConfig({
34
34
  displayName: "StyledCaptionText",
35
- componentId: "core-12_5_0__sc-195f70c-1"
35
+ componentId: "core-12_7_0__sc-195f70c-1"
36
36
  })(["width:100%;"]);
37
37
  export var StyledPlaceholderCaption = /*#__PURE__*/styled.div.withConfig({
38
38
  displayName: "StyledPlaceholderCaption",
39
- componentId: "core-12_5_0__sc-195f70c-2"
39
+ componentId: "core-12_7_0__sc-195f70c-2"
40
40
  })(["", ""], captionBase);
41
41
  export var StyledSingleLineCaption = /*#__PURE__*/styled.div.withConfig({
42
42
  displayName: "StyledSingleLineCaption",
43
- componentId: "core-12_5_0__sc-195f70c-3"
43
+ componentId: "core-12_7_0__sc-195f70c-3"
44
44
  })(["display:flex;", ""], captionBase);
45
45
  export var StyledSinglelineCaptionBody = /*#__PURE__*/styled.span.withConfig({
46
46
  displayName: "StyledSinglelineCaptionBody",
47
- componentId: "core-12_5_0__sc-195f70c-4"
47
+ componentId: "core-12_7_0__sc-195f70c-4"
48
48
  })(["", ""], getEllipsis);
49
49
  export var StyledSinglelineCaptionEnding = /*#__PURE__*/styled.span.withConfig({
50
50
  displayName: "StyledSinglelineCaptionEnding",
51
- componentId: "core-12_5_0__sc-195f70c-5"
51
+ componentId: "core-12_7_0__sc-195f70c-5"
52
52
  })(["max-width:50%;white-space:nowrap;flex-shrink:0;"]);
53
53
  export var StyledLabelText = /*#__PURE__*/styled(Typography).withConfig({
54
54
  displayName: "StyledLabelText",
55
- componentId: "core-12_5_0__sc-195f70c-6"
55
+ componentId: "core-12_7_0__sc-195f70c-6"
56
56
  })(["", ""], getEllipsis());
57
57
  export var StyledThumbnailFigCaption = /*#__PURE__*/styled.figcaption.withConfig({
58
58
  displayName: "StyledThumbnailFigCaption",
59
- componentId: "core-12_5_0__sc-195f70c-7"
59
+ componentId: "core-12_7_0__sc-195f70c-7"
60
60
  })(["", " ", " color:", ";font-weight:", ";text-align:center;width:100%;position:absolute;bottom:0;right:0;left:0;opacity:0.85;height:", "px;padding:", "px ", "px;background-color:", ";"], getTypographyIntent('small'), getEllipsis(), function (_ref5) {
61
61
  var _ref5$$color = _ref5.$color,
62
62
  $color = _ref5$$color === void 0 ? 'gray15' : _ref5$$color;
@@ -64,7 +64,7 @@ export var StyledThumbnailFigCaption = /*#__PURE__*/styled.figcaption.withConfig
64
64
  }, typographyWeights.bold, labelHeight, spacing.sm / 2, spacing.sm, colors.white);
65
65
  export var StyledLabel = /*#__PURE__*/styled.div.withConfig({
66
66
  displayName: "StyledLabel",
67
- componentId: "core-12_5_0__sc-195f70c-8"
67
+ componentId: "core-12_7_0__sc-195f70c-8"
68
68
  })(["display:flex;justify-content:center;position:absolute;bottom:0;right:0;left:0;opacity:0.85;height:", "px;padding:", "px ", "px;font-size:", "px;background-color:", ";"], labelHeight, spacing.sm / 2, spacing.sm, labelFontSize, colors.white);
69
69
  var thumbnailBase = /*#__PURE__*/css(["display:flex;justify-content:center;align-items:center;position:relative;overflow:hidden;border:1px solid ", ";border-radius:", "px;margin:0;", " ", " &:focus{", ";}", " ", " ", ""], colors.gray85, borderRadius.md, function (_ref6) {
70
70
  var clickable = _ref6.clickable;
@@ -86,7 +86,7 @@ var thumbnailBase = /*#__PURE__*/css(["display:flex;justify-content:center;align
86
86
  });
87
87
  export var StyledTickIcon = /*#__PURE__*/styled.svg.withConfig({
88
88
  displayName: "StyledTickIcon",
89
- componentId: "core-12_5_0__sc-195f70c-9"
89
+ componentId: "core-12_7_0__sc-195f70c-9"
90
90
  })(["position:absolute;top:", "px;right:", "px;width:", "px;height:", "px;opacity:0;transform:scale(0.75);transition:transform 250ms ease-out,opacity 100ms ease-out;", " ", ""], spacing.sm, spacing.sm, tickSize, tickSize, function (_ref11) {
91
91
  var selected = _ref11.selected;
92
92
  return selected ? "\n opacity: 1;\n transform: scale(1);\n " : '';
@@ -96,28 +96,28 @@ export var StyledTickIcon = /*#__PURE__*/styled.svg.withConfig({
96
96
  });
97
97
  export var StyledFileIcon = /*#__PURE__*/styled(DocumentIcon).withConfig({
98
98
  displayName: "StyledFileIcon",
99
- componentId: "core-12_5_0__sc-195f70c-10"
99
+ componentId: "core-12_7_0__sc-195f70c-10"
100
100
  })(["width:36.5%;height:auto;"]);
101
101
  export var StyledImageThumbnailPreview = /*#__PURE__*/styled.div.withConfig({
102
102
  displayName: "StyledImageThumbnailPreview",
103
- componentId: "core-12_5_0__sc-195f70c-11"
103
+ componentId: "core-12_7_0__sc-195f70c-11"
104
104
  })(["width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center;", ""], function (_ref13) {
105
105
  var $bgImage = _ref13.$bgImage;
106
106
  return css(["background-image:url(", ");"], $bgImage);
107
107
  });
108
108
  export var StyledImageThumbnailOverlay = /*#__PURE__*/styled.div.withConfig({
109
109
  displayName: "StyledImageThumbnailOverlay",
110
- componentId: "core-12_5_0__sc-195f70c-12"
110
+ componentId: "core-12_7_0__sc-195f70c-12"
111
111
  })(["display:none;position:absolute;top:0;bottom:0;left:0;right:0;"]);
112
112
  var blackOverlay = "\n background-color: ".concat(colors.black, ";\n opacity: 0.2;\n");
113
113
  var whiteOverlay = "\n background-color: ".concat(colors.white, ";\n opacity: 0.5;\n");
114
114
  export var StyledImageThumbnailImage = /*#__PURE__*/styled.img.withConfig({
115
115
  displayName: "StyledImageThumbnailImage",
116
- componentId: "core-12_5_0__sc-195f70c-13"
116
+ componentId: "core-12_7_0__sc-195f70c-13"
117
117
  })([""]);
118
118
  export var StyledImageThumbnail = /*#__PURE__*/styled.div.withConfig({
119
119
  displayName: "StyledImageThumbnail",
120
- componentId: "core-12_5_0__sc-195f70c-14"
120
+ componentId: "core-12_7_0__sc-195f70c-14"
121
121
  })(["", " flex-direction:column;", " ", " ", " ", " ", " ", ""], thumbnailBase, function (_ref14) {
122
122
  var disabled = _ref14.disabled;
123
123
  return disabled ? "\n &,\n &:hover {\n ".concat(StyledImageThumbnailOverlay, " {\n display: block;\n ").concat(whiteOverlay, "\n }\n }\n ").concat(StyledImageThumbnailPreview, ",\n ").concat(StyledTickIcon, ",\n ").concat(StyledImageThumbnailImage, " {\n filter: saturate(0);\n }\n ").concat(StyledFileIcon, " {\n filter: saturate(0);\n z-index: -1;\n }\n ") : '';
@@ -146,7 +146,7 @@ export var StyledImageThumbnail = /*#__PURE__*/styled.div.withConfig({
146
146
  });
147
147
  export var StyledThumbnailWrapper = /*#__PURE__*/styled.div.withConfig({
148
148
  displayName: "StyledThumbnailWrapper",
149
- componentId: "core-12_5_0__sc-195f70c-15"
149
+ componentId: "core-12_7_0__sc-195f70c-15"
150
150
  })(["display:flex;", " ", ""], function (_ref20) {
151
151
  var size = _ref20.size;
152
152
  return size === 'lg' ? "\n width: ".concat(thumbnailSizeLg, "px;\n ") : '';
@@ -157,7 +157,7 @@ export var StyledThumbnailWrapper = /*#__PURE__*/styled.div.withConfig({
157
157
  });
158
158
  export var StyledPlaceholderThumbnail = /*#__PURE__*/styled.div.withConfig({
159
159
  displayName: "StyledPlaceholderThumbnail",
160
- componentId: "core-12_5_0__sc-195f70c-16"
160
+ componentId: "core-12_7_0__sc-195f70c-16"
161
161
  })(["", " ", " ", " ", " ", ""], thumbnailBase, function (_ref22) {
162
162
  var clickable = _ref22.clickable;
163
163
  return clickable ? "\n &:hover {\n background-color: ".concat(colors.gray96, ";\n }\n\n ") : '';
@@ -10,6 +10,6 @@ export declare const StyledThumbnail: import("styled-components").StyledComponen
10
10
  })) => import("react").JSX.Element;
11
11
  }, any, {}, never>;
12
12
  export declare const StyledVariableSizeGrid: import("styled-components").StyledComponent<typeof VariableSizeGrid, any, {}, never>;
13
- export declare const StyledGroupTitle: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../_utils/types").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
13
+ export declare const StyledGroupTitle: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
14
14
  export declare const StyledSpinnerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
15
15
  export declare const StyledThumbnailGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -7,31 +7,31 @@ import { getEllipsis } from '../_styles/mixins';
7
7
  import { spacing } from '../_styles/spacing';
8
8
  export var StyledCheckbox = /*#__PURE__*/styled(Checkbox).withConfig({
9
9
  displayName: "StyledCheckbox",
10
- componentId: "core-12_5_0__sc-1inrbm9-0"
10
+ componentId: "core-12_7_0__sc-1inrbm9-0"
11
11
  })(["input{z-index:2;}"]);
12
12
  export var StyledGroupCell = /*#__PURE__*/styled.div.withConfig({
13
13
  displayName: "StyledGroupCell",
14
- componentId: "core-12_5_0__sc-1inrbm9-1"
14
+ componentId: "core-12_7_0__sc-1inrbm9-1"
15
15
  })(["display:flex;align-items:flex-end;padding-bottom:", "px;"], spacing.md);
16
16
  export var StyledThumbnail = /*#__PURE__*/styled(Thumbnail).withConfig({
17
17
  displayName: "StyledThumbnail",
18
- componentId: "core-12_5_0__sc-1inrbm9-2"
18
+ componentId: "core-12_7_0__sc-1inrbm9-2"
19
19
  })(["display:inline-flex;&:focus{outline:none;}"]);
20
20
  // VariableSizeGrid has provided width and height as inline style, so to make it flexible and support responsive !important was added
21
21
  export var StyledVariableSizeGrid = /*#__PURE__*/styled(VariableSizeGrid).withConfig({
22
22
  displayName: "StyledVariableSizeGrid",
23
- componentId: "core-12_5_0__sc-1inrbm9-3"
23
+ componentId: "core-12_7_0__sc-1inrbm9-3"
24
24
  })(["height:100% !important;& > div{width:100% !important;}"]);
25
25
  export var StyledGroupTitle = /*#__PURE__*/styled(Typography).withConfig({
26
26
  displayName: "StyledGroupTitle",
27
- componentId: "core-12_5_0__sc-1inrbm9-4"
27
+ componentId: "core-12_7_0__sc-1inrbm9-4"
28
28
  })(["", ""], getEllipsis);
29
29
  export var StyledSpinnerWrapper = /*#__PURE__*/styled.div.withConfig({
30
30
  displayName: "StyledSpinnerWrapper",
31
- componentId: "core-12_5_0__sc-1inrbm9-5"
31
+ componentId: "core-12_7_0__sc-1inrbm9-5"
32
32
  })(["display:flex;justify-content:center;align-items:center;width:100%;height:100%;"]);
33
33
  export var StyledThumbnailGrid = /*#__PURE__*/styled.div.withConfig({
34
34
  displayName: "StyledThumbnailGrid",
35
- componentId: "core-12_5_0__sc-1inrbm9-6"
35
+ componentId: "core-12_7_0__sc-1inrbm9-6"
36
36
  })(["display:flex;flex-wrap:wrap;outline:none;"]);
37
37
  //# sourceMappingURL=ThumbnailGrid.styles.js.map
@@ -9,19 +9,19 @@ import { colors } from '../_styles/colors';
9
9
  import { spacing } from '../_styles/spacing';
10
10
  export var StyledTieredSelect = /*#__PURE__*/styled(MenuImperative).withConfig({
11
11
  displayName: "StyledTieredSelect",
12
- componentId: "core-12_5_0__sc-e1ql06-0"
12
+ componentId: "core-12_7_0__sc-e1ql06-0"
13
13
  })(["align-items:stretch;max-height:40vh;"]);
14
14
  export var StyledTieredSelectIcon = /*#__PURE__*/styled(Flex).withConfig({
15
15
  displayName: "StyledTieredSelectIcon",
16
- componentId: "core-12_5_0__sc-e1ql06-1"
16
+ componentId: "core-12_7_0__sc-e1ql06-1"
17
17
  })(["height:24px;width:24px;"]);
18
18
  export var StyledTieredSelectArrowButton = /*#__PURE__*/styled(Button).withConfig({
19
19
  displayName: "StyledTieredSelectArrowButton",
20
- componentId: "core-12_5_0__sc-e1ql06-2"
20
+ componentId: "core-12_7_0__sc-e1ql06-2"
21
21
  })(["border:1px solid transparent;"]);
22
22
  export var StyledTieredSelectBreadcrumbs = /*#__PURE__*/styled(Breadcrumbs).withConfig({
23
23
  displayName: "StyledTieredSelectBreadcrumbs",
24
- componentId: "core-12_5_0__sc-e1ql06-3"
24
+ componentId: "core-12_7_0__sc-e1ql06-3"
25
25
  })(["background-color:", ";flex-wrap:wrap;margin-top:", "px;max-height:68px;overflow-y:auto;padding:", "px ", "px;", ""], colors.gray96, spacing.sm, spacing.xs, spacing.md, function (_ref) {
26
26
  var $nonInteractive = _ref.$nonInteractive;
27
27
  if ($nonInteractive) {
@@ -30,22 +30,22 @@ export var StyledTieredSelectBreadcrumbs = /*#__PURE__*/styled(Breadcrumbs).with
30
30
  });
31
31
  export var StyledTieredSelectHome = /*#__PURE__*/styled(Flex).withConfig({
32
32
  displayName: "StyledTieredSelectHome",
33
- componentId: "core-12_5_0__sc-e1ql06-4"
33
+ componentId: "core-12_7_0__sc-e1ql06-4"
34
34
  })(["height:20px;"]);
35
35
  export var StyledTieredSelectOption = /*#__PURE__*/styled(MenuImperative.Item).withConfig({
36
36
  displayName: "StyledTieredSelectOption",
37
- componentId: "core-12_5_0__sc-e1ql06-5"
37
+ componentId: "core-12_7_0__sc-e1ql06-5"
38
38
  })(["align-items:center;display:flex;justify-content:space-between;padding:2px ", "px;"], spacing.lg);
39
39
  export var StyledTieredSelectLoadingMore = /*#__PURE__*/styled(Flex).withConfig({
40
40
  displayName: "StyledTieredSelectLoadingMore",
41
- componentId: "core-12_5_0__sc-e1ql06-6"
41
+ componentId: "core-12_7_0__sc-e1ql06-6"
42
42
  })(["align-items:center;justify-content:center;padding:", "px ", "px 0px ", "px;"], spacing.xs, spacing.lg, spacing.lg);
43
43
  export var StyledTieredSelectOverlay = /*#__PURE__*/styled(Card).withConfig({
44
44
  displayName: "StyledTieredSelectOverlay",
45
- componentId: "core-12_5_0__sc-e1ql06-7"
45
+ componentId: "core-12_7_0__sc-e1ql06-7"
46
46
  })(["max-width:248px;min-width:inherit;"]);
47
47
  export var StyledTieredSelectSpinnerOverlay = /*#__PURE__*/styled(Spinner).withConfig({
48
48
  displayName: "StyledTieredSelectSpinnerOverlay",
49
- componentId: "core-12_5_0__sc-e1ql06-8"
49
+ componentId: "core-12_7_0__sc-e1ql06-8"
50
50
  })(["min-height:auto;"]);
51
51
  //# sourceMappingURL=TieredSelect.styles.js.map
@@ -1,2 +1,2 @@
1
1
  export { TieredSelect } from './TieredSelect';
2
- export type { TieredSelectProps, TierSelection } from './TieredSelect.types';
2
+ export type { Tier, TieredSelectProps, TierSelection, } from './TieredSelect.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["TieredSelect"],"sources":["../../src/TieredSelect/index.ts"],"sourcesContent":["export { TieredSelect } from './TieredSelect'\nexport type { TieredSelectProps, TierSelection } from './TieredSelect.types'\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB"}
1
+ {"version":3,"file":"index.js","names":["TieredSelect"],"sources":["../../src/TieredSelect/index.ts"],"sourcesContent":["export { TieredSelect } from './TieredSelect'\nexport type {\n Tier,\n TieredSelectProps,\n TierSelection,\n} from './TieredSelect.types'\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB"}
@@ -39,7 +39,7 @@ var getTileStyles = function getTileStyles(_ref) {
39
39
  };
40
40
  export var StyledLinkTile = /*#__PURE__*/styled.a.withConfig({
41
41
  displayName: "StyledLinkTile",
42
- componentId: "core-12_5_0__sc-8q9p0n-0"
42
+ componentId: "core-12_7_0__sc-8q9p0n-0"
43
43
  })(["", " text-decoration:none;color:inherit;"], function (_ref2) {
44
44
  var $orientation = _ref2.$orientation;
45
45
  return getTileStyles({
@@ -49,7 +49,7 @@ export var StyledLinkTile = /*#__PURE__*/styled.a.withConfig({
49
49
  });
50
50
  export var StyledSelectableTile = /*#__PURE__*/styled.div.withConfig({
51
51
  displayName: "StyledSelectableTile",
52
- componentId: "core-12_5_0__sc-8q9p0n-1"
52
+ componentId: "core-12_7_0__sc-8q9p0n-1"
53
53
  })(["", ""], function (_ref3) {
54
54
  var $orientation = _ref3.$orientation,
55
55
  $selected = _ref3.$selected,
@@ -65,7 +65,7 @@ export var StyledSelectableTile = /*#__PURE__*/styled.div.withConfig({
65
65
  });
66
66
  export var StyledInteractableTile = /*#__PURE__*/styled.div.withConfig({
67
67
  displayName: "StyledInteractableTile",
68
- componentId: "core-12_5_0__sc-8q9p0n-2"
68
+ componentId: "core-12_7_0__sc-8q9p0n-2"
69
69
  })(["", ""], function (_ref4) {
70
70
  var $orientation = _ref4.$orientation;
71
71
  return getTileStyles({
@@ -74,26 +74,26 @@ export var StyledInteractableTile = /*#__PURE__*/styled.div.withConfig({
74
74
  });
75
75
  export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
76
76
  displayName: "StyledFooter",
77
- componentId: "core-12_5_0__sc-8q9p0n-3"
77
+ componentId: "core-12_7_0__sc-8q9p0n-3"
78
78
  })(["grid-area:footer;padding:", "px;> ", "{flex-wrap:wrap-reverse;}"], spacing.lg, StyledActions);
79
79
  export var StyledTileContent = /*#__PURE__*/styled(StyledContent).withConfig({
80
80
  displayName: "StyledTileContent",
81
- componentId: "core-12_5_0__sc-8q9p0n-4"
81
+ componentId: "core-12_7_0__sc-8q9p0n-4"
82
82
  })(["grid-column-start:hero-start;grid-column-end:body-end;padding:", "px;+ ", "{padding-top:0;}> ", ",> ", " > ", ",> ", "{grid-column-gap:", "px;}"], spacing.lg, StyledFooter, SFormRow, SForm, SFormRow, SFormRow, spacing.md);
83
83
  export var StyledHeroMedia = /*#__PURE__*/styled.figure.withConfig({
84
84
  displayName: "StyledHeroMedia",
85
- componentId: "core-12_5_0__sc-8q9p0n-5"
85
+ componentId: "core-12_7_0__sc-8q9p0n-5"
86
86
  })(["grid-area:hero;margin:0;position:relative;overflow:hidden;font-size:0;> *{font-size:initial;}+ ", "{grid-area:body;}> video{background-color:", ";}> img,> picture > img{object-fit:cover;}", ""], StyledTileContent, colors.black, function (_ref5) {
87
87
  var $orientation = _ref5.$orientation;
88
88
  return $orientation === 'landscape' && !isIE11() ? css(["border-top-left-radius:inherit;border-bottom-left-radius:inherit;> *,> picture > img{height:100%;width:100%;position:absolute;}@media ", "{> picture > img,> img{width:auto;left:50%;transform:translate(-50%,0);}}"], mediaIE11Hack) : css(["min-height:156px;max-height:567px;border-top-left-radius:inherit;border-top-right-radius:inherit;> *,> picture > img{min-height:inherit;max-height:inherit;height:auto;width:100%;}"]);
89
89
  });
90
90
  export var StyledHeroOverlay = /*#__PURE__*/styled.div.withConfig({
91
91
  displayName: "StyledHeroOverlay",
92
- componentId: "core-12_5_0__sc-8q9p0n-6"
92
+ componentId: "core-12_7_0__sc-8q9p0n-6"
93
93
  })(["position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;"]);
94
94
  export var StyledHeroText = /*#__PURE__*/styled.div.withConfig({
95
95
  displayName: "StyledHeroText",
96
- componentId: "core-12_5_0__sc-8q9p0n-7"
96
+ componentId: "core-12_7_0__sc-8q9p0n-7"
97
97
  })(["grid-area:hero;+ ", "{grid-area:body;}padding:", "px;border-radius:inherit;", ""], StyledTileContent, spacing.lg, function (_ref6) {
98
98
  var $orientation = _ref6.$orientation;
99
99
  return $orientation === 'landscape' ? css(["display:flex;flex-direction:column;justify-content:center;padding-right:0;"]) : css(["padding-bottom:0;"]);
@@ -8,4 +8,4 @@ export declare const StyledTitleContent: import("styled-components").StyledCompo
8
8
  export declare const StyledText: import("styled-components").StyledComponent<"span", any, {}, never>;
9
9
  export declare const StyledTitlePill: import("styled-components").StyledComponent<"span", any, {}, never>;
10
10
  export declare const StyledTitleActions: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
11
- export declare const StyledSubtext: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../_utils/types").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
11
+ export declare const StyledSubtext: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
@@ -5,36 +5,36 @@ import { Typography } from '../Typography/Typography';
5
5
  import { spacing } from '../_styles/spacing';
6
6
  export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
7
7
  displayName: "StyledTitle",
8
- componentId: "core-12_5_0__sc-1t2ye1d-0"
8
+ componentId: "core-12_7_0__sc-1t2ye1d-0"
9
9
  })(["display:flex;align-items:flex-start;"]);
10
10
  export var StyledAssets = /*#__PURE__*/styled.div.withConfig({
11
11
  displayName: "StyledAssets",
12
- componentId: "core-12_5_0__sc-1t2ye1d-1"
12
+ componentId: "core-12_7_0__sc-1t2ye1d-1"
13
13
  })(["margin-right:", "px;", ""], spacing.md, function (_ref) {
14
14
  var alignment = _ref.alignment;
15
15
  return css(["align-self:", ";"], alignment);
16
16
  });
17
17
  export var StyledTitleContent = /*#__PURE__*/styled.div.withConfig({
18
18
  displayName: "StyledTitleContent",
19
- componentId: "core-12_5_0__sc-1t2ye1d-2"
19
+ componentId: "core-12_7_0__sc-1t2ye1d-2"
20
20
  })(["align-self:center;", ""], function (_ref2) {
21
21
  var $hasActions = _ref2.$hasActions;
22
22
  return $hasActions && css(["margin-right:", "px;"], spacing.lg);
23
23
  });
24
24
  export var StyledText = /*#__PURE__*/styled.span.withConfig({
25
25
  displayName: "StyledText",
26
- componentId: "core-12_5_0__sc-1t2ye1d-3"
26
+ componentId: "core-12_7_0__sc-1t2ye1d-3"
27
27
  })(["> h1,> h2,> h3{display:inline;}"]);
28
28
  export var StyledTitlePill = /*#__PURE__*/styled.span.withConfig({
29
29
  displayName: "StyledTitlePill",
30
- componentId: "core-12_5_0__sc-1t2ye1d-4"
30
+ componentId: "core-12_7_0__sc-1t2ye1d-4"
31
31
  })(["margin-left:", "px;", "{vertical-align:text-top;}"], spacing.sm, StyledPill);
32
32
  export var StyledTitleActions = /*#__PURE__*/styled(StyledActions).withConfig({
33
33
  displayName: "StyledTitleActions",
34
- componentId: "core-12_5_0__sc-1t2ye1d-5"
34
+ componentId: "core-12_7_0__sc-1t2ye1d-5"
35
35
  })(["margin-left:auto;"]);
36
36
  export var StyledSubtext = /*#__PURE__*/styled(Typography).withConfig({
37
37
  displayName: "StyledSubtext",
38
- componentId: "core-12_5_0__sc-1t2ye1d-6"
38
+ componentId: "core-12_7_0__sc-1t2ye1d-6"
39
39
  })(["display:block;"]);
40
40
  //# sourceMappingURL=Title.styles.js.map
@@ -7,7 +7,7 @@ import { getShadow } from '../_styles/shadows';
7
7
  import { spacing } from '../_styles/spacing';
8
8
  export var StyledToast = /*#__PURE__*/styled.div.withConfig({
9
9
  displayName: "StyledToast",
10
- componentId: "core-12_5_0__sc-1l6lk2n-0"
10
+ componentId: "core-12_7_0__sc-1l6lk2n-0"
11
11
  })(["", " align-items:center;background-color:", ";border-radius:", "px;color:", ";display:flex;min-height:48px;padding:", "px ", "px;width:550px;"], getShadow(4, 'bottom'), function (_ref) {
12
12
  var $variant = _ref.$variant;
13
13
  return $variant === 'success' ? colors.green30 : colors.red50;
@@ -16,13 +16,13 @@ export var StyledToast = /*#__PURE__*/styled.div.withConfig({
16
16
  // $legacy is direct string inside Toast. Next is with subcomponents
17
17
  export var StyledToastText = /*#__PURE__*/styled.span.withConfig({
18
18
  displayName: "StyledToastText",
19
- componentId: "core-12_5_0__sc-1l6lk2n-1"
19
+ componentId: "core-12_7_0__sc-1l6lk2n-1"
20
20
  })(["", " font-weight:", ";overflow:hidden;", ""], getTypographyIntent('body'), typographyWeights.semibold, function (_ref2) {
21
21
  var $legacy = _ref2.$legacy;
22
22
  return $legacy ? "margin-left: ".concat(spacing.lg, "px;") : "padding: 0 ".concat(spacing.lg, "px;");
23
23
  });
24
24
  export var StyledToastButton = /*#__PURE__*/styled(Button).withConfig({
25
25
  displayName: "StyledToastButton",
26
- componentId: "core-12_5_0__sc-1l6lk2n-2"
26
+ componentId: "core-12_7_0__sc-1l6lk2n-2"
27
27
  })(["line-height:0;color:", ";padding:0;margin-left:auto;"], colors.white);
28
28
  //# sourceMappingURL=Toast.styles.js.map
@@ -3,7 +3,7 @@ import { Button } from '../Button/Button';
3
3
  import { colors } from '../_styles/colors';
4
4
  export var StyledToggleButton = /*#__PURE__*/styled(Button).withConfig({
5
5
  displayName: "StyledToggleButton",
6
- componentId: "core-12_5_0__sc-1x59fxi-0"
6
+ componentId: "core-12_7_0__sc-1x59fxi-0"
7
7
  })(["", "}"], function (_ref) {
8
8
  var $selected = _ref.$selected;
9
9
  return $selected && css(["background-color:", ";color:", ";&:hover{background-color:", ";color:", ";}&:focus{background-color:", ";color:", ";}&:disabled{background-color:", ";color:", ";}"], colors.blue50, colors.white, colors.blue40, colors.white, colors.blue50, colors.white, colors.blue85, colors.white);
@@ -6,15 +6,15 @@ import { getEllipsis, getFocus } from '../_styles/mixins';
6
6
  import { spacing } from '../_styles/spacing';
7
7
  export var StyledLabel = /*#__PURE__*/styled.span.withConfig({
8
8
  displayName: "StyledLabel",
9
- componentId: "core-12_5_0__sc-zqi94b-0"
9
+ componentId: "core-12_7_0__sc-zqi94b-0"
10
10
  })(["", " ", " flex:0 1 auto;"], getTypographyIntent('body'), getEllipsis);
11
11
  export var StyledRemove = /*#__PURE__*/styled(Clear).withConfig({
12
12
  displayName: "StyledRemove",
13
- componentId: "core-12_5_0__sc-zqi94b-1"
13
+ componentId: "core-12_7_0__sc-zqi94b-1"
14
14
  })(["border-radius:100%;cursor:pointer;flex:0 0 auto;height:16px;margin:0 -", "px 0 ", "px;width:16px;&:hover{background:", ";color:", ";}"], spacing.sm, spacing.sm, colors.white, colors.blue40);
15
15
  export var StyledToken = /*#__PURE__*/styled.div.withConfig({
16
16
  displayName: "StyledToken",
17
- componentId: "core-12_5_0__sc-zqi94b-2"
17
+ componentId: "core-12_7_0__sc-zqi94b-2"
18
18
  })(["align-items:center;background-color:", ";border-radius:200px;border:1px solid transparent;color:", ";cursor:default;display:inline-flex;height:24px;line-height:1;max-width:360px;min-width:48px;padding:", "px ", "px;&:hover,&.hover{background-color:", ";}", " ", " ", ""], colors.blue50, colors.white, spacing.xs, spacing.md, colors.blue45, function (_ref) {
19
19
  var _ref$$focused = _ref.$focused,
20
20
  $focused = _ref$$focused === void 0 ? false : _ref$$focused,
@@ -5,7 +5,7 @@ import { colors } from '../_styles/colors';
5
5
  import { spacing } from '../_styles/spacing';
6
6
  export var StyledHeaderBadge = /*#__PURE__*/styled.div.withConfig({
7
7
  displayName: "StyledHeaderBadge",
8
- componentId: "core-12_5_0__sc-1jpjx47-0"
8
+ componentId: "core-12_7_0__sc-1jpjx47-0"
9
9
  })(["", " border-radius:10px;border-style:solid;border-width:1px;display:inline-block;margin-bottom:", "px;padding:1px ", "px;", ""], getTypographyIntent('small'), spacing.sm, spacing.sm, function (_ref) {
10
10
  var $variant = _ref.$variant;
11
11
  if ($variant) {
@@ -18,22 +18,22 @@ export var StyledHeaderBadge = /*#__PURE__*/styled.div.withConfig({
18
18
  // TODO in v12 remove cursor: pointer;
19
19
  export var StyledToolHeaderIconContainer = /*#__PURE__*/styled.div.withConfig({
20
20
  displayName: "StyledToolHeaderIconContainer",
21
- componentId: "core-12_5_0__sc-1jpjx47-1"
21
+ componentId: "core-12_7_0__sc-1jpjx47-1"
22
22
  })(["color:", ";cursor:pointer;display:inline-flex;flex:0 0 auto;"], colors.orange50);
23
23
  export var StyledHeaderTabs = /*#__PURE__*/styled.div.withConfig({
24
24
  displayName: "StyledHeaderTabs",
25
- componentId: "core-12_5_0__sc-1jpjx47-2"
25
+ componentId: "core-12_7_0__sc-1jpjx47-2"
26
26
  })(["align-self:flex-end;flex:1 1 auto;min-width:100px;overflow:hidden;"]);
27
27
  export var StyledHeaderActions = /*#__PURE__*/styled.div.withConfig({
28
28
  displayName: "StyledHeaderActions",
29
- componentId: "core-12_5_0__sc-1jpjx47-3"
29
+ componentId: "core-12_7_0__sc-1jpjx47-3"
30
30
  })(["flex:0 0 auto;margin-left:auto;padding-left:", "px;"], spacing.lg);
31
31
  export var StyledToolHeaderTitle = /*#__PURE__*/styled(H1).withConfig({
32
32
  displayName: "StyledToolHeaderTitle",
33
- componentId: "core-12_5_0__sc-1jpjx47-4"
33
+ componentId: "core-12_7_0__sc-1jpjx47-4"
34
34
  })(["margin-right:", "px;white-space:nowrap;"], spacing.xl);
35
35
  export var StyledToolHeader = /*#__PURE__*/styled.div.withConfig({
36
36
  displayName: "StyledToolHeader",
37
- componentId: "core-12_5_0__sc-1jpjx47-5"
37
+ componentId: "core-12_7_0__sc-1jpjx47-5"
38
38
  })(["align-items:center;display:flex;min-height:36px;width:100%;", " + ", ",a + ", ",button + ", "{margin-left:", "px;}"], StyledToolHeaderIconContainer, StyledToolHeaderTitle, StyledToolHeaderTitle, StyledToolHeaderTitle, spacing.lg);
39
39
  //# sourceMappingURL=ToolHeader.styles.js.map
@@ -6,10 +6,10 @@ import { getShadow } from '../_styles/shadows';
6
6
  import { spacing } from '../_styles/spacing';
7
7
  export var StyledTooltip = /*#__PURE__*/styled.span.withConfig({
8
8
  displayName: "StyledTooltip",
9
- componentId: "core-12_5_0__sc-1fawsi4-0"
9
+ componentId: "core-12_7_0__sc-1fawsi4-0"
10
10
  })(["", " color:", ";max-width:200px;padding:", "px ", "px;position:relative;word-wrap:break-word;overflow-wrap:break-word;white-space:normal;"], getTypographyIntent('small'), colors.white, spacing.sm, spacing.md);
11
11
  export var StyledContainer = /*#__PURE__*/styled.span.withConfig({
12
12
  displayName: "StyledContainer",
13
- componentId: "core-12_5_0__sc-1fawsi4-1"
13
+ componentId: "core-12_7_0__sc-1fawsi4-1"
14
14
  })(["display:inline-flex;background-color:", ";border-radius:", "px;", " & + [data-overlay-arrow]{background:", ";}"], colors.gray15, borderRadius.md, getShadow(3, 'bottom'), colors.gray15);
15
15
  //# sourceMappingURL=Tooltip.styles.js.map
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledFilenameCaption: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../_utils/types").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
2
+ export declare const StyledFilenameCaption: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
3
3
  export declare const StyledTree: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const StyledTreeRowContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../_utils/types").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {
4
+ export declare const StyledTreeRowContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").SpanAttributes & import("..").TypographyProps & import("react").RefAttributes<HTMLSpanElement>>, any, {
5
5
  isHighlighted: boolean;
6
6
  isSelectable: boolean;
7
7
  isSelected: boolean;