@procore/core-react 12.13.0 → 12.15.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 (315) 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.js +7 -7
  4. package/dist/Badge/Badge.styles.js +2 -2
  5. package/dist/Banner/Banner.js +3 -3
  6. package/dist/Banner/Banner.js.map +1 -1
  7. package/dist/Banner/Banner.styles.d.ts +3 -3
  8. package/dist/Banner/Banner.styles.js +16 -16
  9. package/dist/Banner/Banner.styles.js.map +1 -1
  10. package/dist/Box/Box.styles.js +1 -1
  11. package/dist/Breadcrumbs/Breadcrumbs.js +5 -2
  12. package/dist/Breadcrumbs/Breadcrumbs.js.map +1 -1
  13. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  14. package/dist/Button/Button.styles.js +5 -5
  15. package/dist/Calendar/Calendar.styles.js +8 -8
  16. package/dist/Card/Card.styles.js +1 -1
  17. package/dist/Checkbox/Checkbox.styles.js +6 -6
  18. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  19. package/dist/ContactItem/ContactItem.styles.js +5 -5
  20. package/dist/Content/Content.styles.js +2 -2
  21. package/dist/DateInput/DateInput.js +1 -1
  22. package/dist/DateInput/DateInput.js.map +1 -1
  23. package/dist/DateInput/DateInput.styles.d.ts +1 -1
  24. package/dist/DateInput/DateInput.styles.js +6 -6
  25. package/dist/DateInput/DateInput.styles.js.map +1 -1
  26. package/dist/DetailPage/DetailPage.styles.js +7 -7
  27. package/dist/DetailPageTemplate/DetailPageTemplate.d.ts +11 -0
  28. package/dist/DetailPageTemplate/DetailPageTemplate.js +38 -0
  29. package/dist/DetailPageTemplate/DetailPageTemplate.js.map +1 -0
  30. package/dist/DetailPageTemplate/DetailPageTemplate.types.d.ts +13 -0
  31. package/dist/DetailPageTemplate/DetailPageTemplate.types.js +2 -0
  32. package/dist/DetailPageTemplate/DetailPageTemplate.types.js.map +1 -0
  33. package/dist/Dropdown/Dropdown.styles.js +3 -3
  34. package/dist/Dropdown/Dropdown.types.d.ts +5 -11
  35. package/dist/Dropdown/Dropdown.types.js.map +1 -1
  36. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  37. package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +12 -14
  38. package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
  39. package/dist/Dropzone/Dropzone.js +3 -2
  40. package/dist/Dropzone/Dropzone.js.map +1 -1
  41. package/dist/Dropzone/Dropzone.styles.js +9 -9
  42. package/dist/Dropzone/Dropzone.types.d.ts +22 -20
  43. package/dist/Dropzone/Dropzone.types.js.map +1 -1
  44. package/dist/EmptyState/EmptyState.js +1 -1
  45. package/dist/EmptyState/EmptyState.js.map +1 -1
  46. package/dist/EmptyState/EmptyState.styles.d.ts +1 -1
  47. package/dist/EmptyState/EmptyState.styles.js +14 -14
  48. package/dist/EmptyState/EmptyState.styles.js.map +1 -1
  49. package/dist/Field/Field.styles.js +3 -3
  50. package/dist/FileList/FileList.styles.js +4 -4
  51. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  52. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  53. package/dist/FileSelect/FileSelect.styles.js +2 -2
  54. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  55. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  56. package/dist/FileSelect/GridSource/GridSource.js +3 -3
  57. package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
  58. package/dist/FileSelect/GridSource/GridSource.styles.d.ts +3 -3
  59. package/dist/FileSelect/GridSource/GridSource.styles.js +12 -12
  60. package/dist/FileSelect/GridSource/GridSource.styles.js.map +1 -1
  61. package/dist/FileSelect/GridSource/GridSource.types.d.ts +14 -23
  62. package/dist/FileSelect/GridSource/GridSource.types.js.map +1 -1
  63. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  64. package/dist/FileSelect/LocalSource/LocalSource.types.d.ts +43 -47
  65. package/dist/FileSelect/LocalSource/LocalSource.types.js.map +1 -1
  66. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  67. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  68. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  69. package/dist/FileSelect/TreeSource/TreeSource.types.d.ts +3 -1
  70. package/dist/FileSelect/TreeSource/TreeSource.types.js.map +1 -1
  71. package/dist/FileToken/FileToken.styles.js +4 -4
  72. package/dist/FilterToken/FilterToken.styles.js +2 -2
  73. package/dist/FlexList/FlexList.styles.js +1 -1
  74. package/dist/Form/Form.js +14 -8
  75. package/dist/Form/Form.js.map +1 -1
  76. package/dist/Form/Form.styles.js +14 -14
  77. package/dist/Form/Form.types.d.ts +67 -69
  78. package/dist/Form/Form.types.js.map +1 -1
  79. package/dist/Form/StyledFormikForm.styles.js +2 -2
  80. package/dist/Form/index.d.ts +1 -1
  81. package/dist/Form/index.js.map +1 -1
  82. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  83. package/dist/Grid/Grid.styles.js +2 -2
  84. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  85. package/dist/Input/Input.styles.js +1 -1
  86. package/dist/Link/Link.styles.js +1 -1
  87. package/dist/ListPage/ListPage.styles.js +8 -8
  88. package/dist/Loader/Loader.styles.js +2 -2
  89. package/dist/MenuImperative/MenuImperative.js +8 -5
  90. package/dist/MenuImperative/MenuImperative.js.map +1 -1
  91. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  92. package/dist/Modal/Modal.js +2 -2
  93. package/dist/Modal/Modal.js.map +1 -1
  94. package/dist/Modal/Modal.styles.d.ts +2 -2
  95. package/dist/Modal/Modal.styles.js +17 -17
  96. package/dist/Modal/Modal.styles.js.map +1 -1
  97. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  98. package/dist/MultiSelect/MultiSelect.types.d.ts +23 -16
  99. package/dist/MultiSelect/MultiSelect.types.js.map +1 -1
  100. package/dist/NextMenu/NextMenu.styles.js +3 -3
  101. package/dist/Notation/Notation.js +1 -1
  102. package/dist/NumberInput/NumberInput.js +2 -2
  103. package/dist/NumberInput/NumberInput.js.map +1 -1
  104. package/dist/NumberInput/NumberInput.styles.d.ts +2 -2
  105. package/dist/NumberInput/NumberInput.styles.js +11 -11
  106. package/dist/NumberInput/NumberInput.styles.js.map +1 -1
  107. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  108. package/dist/PageFooterTemplate/PageFooterTemplate.d.ts +3 -0
  109. package/dist/PageFooterTemplate/PageFooterTemplate.js +28 -0
  110. package/dist/PageFooterTemplate/PageFooterTemplate.js.map +1 -0
  111. package/dist/PageFooterTemplate/PageFooterTemplate.styles.d.ts +1 -0
  112. package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +8 -0
  113. package/dist/PageFooterTemplate/PageFooterTemplate.styles.js.map +1 -0
  114. package/dist/PageFooterTemplate/PageFooterTemplate.types.d.ts +6 -0
  115. package/dist/PageFooterTemplate/PageFooterTemplate.types.js +2 -0
  116. package/dist/PageFooterTemplate/PageFooterTemplate.types.js.map +1 -0
  117. package/dist/PageHeaderTemplate/PageHeaderTemplate.d.ts +3 -0
  118. package/dist/PageHeaderTemplate/PageHeaderTemplate.js +41 -0
  119. package/dist/PageHeaderTemplate/PageHeaderTemplate.js.map +1 -0
  120. package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.d.ts +2 -0
  121. package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +8 -0
  122. package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js.map +1 -0
  123. package/dist/PageHeaderTemplate/PageHeaderTemplate.types.d.ts +12 -0
  124. package/dist/PageHeaderTemplate/PageHeaderTemplate.types.js +2 -0
  125. package/dist/PageHeaderTemplate/PageHeaderTemplate.types.js.map +1 -0
  126. package/dist/PageLayout/PageLayout.styles.js +16 -16
  127. package/dist/PageTemplate/PageTemplate.d.ts +3 -0
  128. package/dist/PageTemplate/PageTemplate.js +18 -0
  129. package/dist/PageTemplate/PageTemplate.js.map +1 -0
  130. package/dist/PageTemplate/PageTemplate.types.d.ts +8 -0
  131. package/dist/PageTemplate/PageTemplate.types.js +2 -0
  132. package/dist/PageTemplate/PageTemplate.types.js.map +1 -0
  133. package/dist/Pagination/Pagination.styles.js +5 -5
  134. package/dist/Panel/Panel.styles.js +11 -11
  135. package/dist/Pill/Pill.styles.js +2 -2
  136. package/dist/Pill/Pill.types.d.ts +3 -1
  137. package/dist/Pill/Pill.types.js.map +1 -1
  138. package/dist/PillSelect/PillSelect.styles.js +4 -4
  139. package/dist/Popover/Popover.styles.js +2 -2
  140. package/dist/Portal/Portal.styles.js +1 -1
  141. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  142. package/dist/RadioButton/RadioButton.styles.js +3 -3
  143. package/dist/Required/Required.styles.js +3 -3
  144. package/dist/Required/Required.types.d.ts +1 -1
  145. package/dist/Required/Required.types.js.map +1 -1
  146. package/dist/Search/Search.styles.js +5 -5
  147. package/dist/Search/Search.types.d.ts +4 -2
  148. package/dist/Search/Search.types.js.map +1 -1
  149. package/dist/Section/Section.styles.js +7 -7
  150. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  151. package/dist/Select/Select.js +6 -3
  152. package/dist/Select/Select.js.map +1 -1
  153. package/dist/Select/Select.styles.js +7 -7
  154. package/dist/Select/Select.types.d.ts +9 -1
  155. package/dist/Select/Select.types.js.map +1 -1
  156. package/dist/Semantic/Semantic.d.ts +3 -7
  157. package/dist/Semantic/Semantic.js +14 -2
  158. package/dist/Semantic/Semantic.js.map +1 -1
  159. package/dist/Semantic/Semantic.styles.d.ts +3 -3
  160. package/dist/Semantic/Semantic.styles.js +11 -11
  161. package/dist/Semantic/Semantic.styles.js.map +1 -1
  162. package/dist/Semantic/Semantic.types.d.ts +5 -0
  163. package/dist/Semantic/Semantic.types.js.map +1 -1
  164. package/dist/SettingsPageTemplate/SettingsPageTemplate.d.ts +7 -0
  165. package/dist/SettingsPageTemplate/SettingsPageTemplate.js +34 -0
  166. package/dist/SettingsPageTemplate/SettingsPageTemplate.js.map +1 -0
  167. package/dist/SettingsPageTemplate/SettingsPageTemplate.types.d.ts +9 -0
  168. package/dist/SettingsPageTemplate/SettingsPageTemplate.types.js +2 -0
  169. package/dist/SettingsPageTemplate/SettingsPageTemplate.types.js.map +1 -0
  170. package/dist/Slider/Slider.js +2 -2
  171. package/dist/Slider/Slider.js.map +1 -1
  172. package/dist/Slider/Slider.styles.d.ts +2 -2
  173. package/dist/Slider/Slider.styles.js +9 -9
  174. package/dist/Slider/Slider.styles.js.map +1 -1
  175. package/dist/Spinner/Spinner.js +2 -2
  176. package/dist/Spinner/Spinner.js.map +1 -1
  177. package/dist/Spinner/Spinner.styles.d.ts +1 -1
  178. package/dist/Spinner/Spinner.styles.js +9 -9
  179. package/dist/Spinner/Spinner.styles.js.map +1 -1
  180. package/dist/Spinner/Spinner.types.d.ts +2 -5
  181. package/dist/Spinner/Spinner.types.js.map +1 -1
  182. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  183. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  184. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  185. package/dist/Switch/Switch.styles.js +4 -4
  186. package/dist/Table/Table.styles.js +28 -28
  187. package/dist/TableShelf/TableShelf.styles.js +5 -5
  188. package/dist/Tabs/Tabs.styles.js +15 -15
  189. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  190. package/dist/TextArea/TextArea.styles.js +1 -1
  191. package/dist/TextEditor/TextEditor.types.d.ts +12 -9
  192. package/dist/TextEditor/TextEditor.types.js.map +1 -1
  193. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  194. package/dist/Thumbnail/Thumbnail.js +25 -10
  195. package/dist/Thumbnail/Thumbnail.js.map +1 -1
  196. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  197. package/dist/Thumbnail/Thumbnail.types.d.ts +2 -3
  198. package/dist/Thumbnail/Thumbnail.types.js.map +1 -1
  199. package/dist/Thumbnail/ThumbnailCaption.js +2 -2
  200. package/dist/Thumbnail/ThumbnailCaption.js.map +1 -1
  201. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  202. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  203. package/dist/TieredSelect/TieredSelect.types.d.ts +64 -40
  204. package/dist/TieredSelect/TieredSelect.types.js.map +1 -1
  205. package/dist/Tile/Tile.styles.js +8 -8
  206. package/dist/Tile/Tile.types.d.ts +1 -1
  207. package/dist/Tile/Tile.types.js.map +1 -1
  208. package/dist/Title/Title.styles.js +7 -7
  209. package/dist/Toast/Toast.styles.js +3 -3
  210. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  211. package/dist/ToggleButton/ToggleButton.types.d.ts +1 -1
  212. package/dist/ToggleButton/ToggleButton.types.js.map +1 -1
  213. package/dist/Token/Token.styles.js +3 -3
  214. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  215. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  216. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.d.ts +5 -0
  217. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js +44 -0
  218. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js.map +1 -0
  219. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.d.ts +7 -0
  220. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.js +2 -0
  221. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.js.map +1 -0
  222. package/dist/Tooltip/Tooltip.styles.js +2 -2
  223. package/dist/Tree/Tree.js +3 -3
  224. package/dist/Tree/Tree.js.map +1 -1
  225. package/dist/Tree/Tree.styles.d.ts +9 -3
  226. package/dist/Tree/Tree.styles.js +23 -15
  227. package/dist/Tree/Tree.styles.js.map +1 -1
  228. package/dist/Tree/Tree.types.d.ts +40 -19
  229. package/dist/Tree/Tree.types.js.map +1 -1
  230. package/dist/Typeahead/Typeahead.styles.js +3 -3
  231. package/dist/Typography/Typography.js +1 -1
  232. package/dist/Typography/Typography.js.map +1 -1
  233. package/dist/Typography/Typography.styles.d.ts +2 -1
  234. package/dist/Typography/Typography.styles.js +3 -3
  235. package/dist/Typography/Typography.styles.js.map +1 -1
  236. package/dist/Typography/Typography.table.story.js +2 -2
  237. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  238. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  239. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  240. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  241. package/dist/_typedoc/Box/Box.types.json +68 -68
  242. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  243. package/dist/_typedoc/Button/Button.types.json +12 -12
  244. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  245. package/dist/_typedoc/Card/Card.types.json +6 -6
  246. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  247. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  248. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  249. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  250. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  251. package/dist/_typedoc/Dropdown/Dropdown.types.json +39 -39
  252. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +35 -35
  253. package/dist/_typedoc/Dropzone/Dropzone.types.json +53 -53
  254. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  255. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  256. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  257. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +42 -42
  258. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +30 -30
  259. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +27 -27
  260. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  261. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  262. package/dist/_typedoc/Form/Form.types.json +1088 -972
  263. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  264. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  265. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +54 -54
  266. package/dist/_typedoc/Input/Input.types.json +2 -2
  267. package/dist/_typedoc/Link/Link.types.json +4 -4
  268. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  269. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  270. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  271. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  272. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +36 -36
  273. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  274. package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
  275. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
  276. package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
  277. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  278. package/dist/_typedoc/Panel/Panel.types.json +28 -28
  279. package/dist/_typedoc/Pill/Pill.types.json +4 -4
  280. package/dist/_typedoc/PillSelect/PillSelect.types.json +58 -48
  281. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  282. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  283. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  284. package/dist/_typedoc/Required/Required.types.json +7 -7
  285. package/dist/_typedoc/Search/Search.types.json +22 -22
  286. package/dist/_typedoc/Section/Section.types.json +15 -15
  287. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  288. package/dist/_typedoc/Select/Select.types.json +78 -58
  289. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  290. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  291. package/dist/_typedoc/Spinner/Spinner.types.json +11 -11
  292. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
  293. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  294. package/dist/_typedoc/Table/Table.types.json +112 -102
  295. package/dist/_typedoc/Tabs/Tabs.types.json +19 -19
  296. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  297. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  298. package/dist/_typedoc/TextEditor/TextEditor.types.json +13 -13
  299. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  300. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +23 -23
  301. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +56 -56
  302. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +44 -44
  303. package/dist/_typedoc/Tile/Tile.types.json +32 -32
  304. package/dist/_typedoc/Title/Title.types.json +1 -1
  305. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  306. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +6 -6
  307. package/dist/_typedoc/Token/Token.types.json +4 -4
  308. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  309. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
  310. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  311. package/dist/_typedoc/Tree/Tree.types.json +110 -110
  312. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  313. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  314. package/dist/_typedoc/_utils/types.json +3 -3
  315. package/package.json +9 -9
@@ -5,15 +5,15 @@ import { colors } from '../_styles/colors';
5
5
  import { spacing } from '../_styles/spacing';
6
6
  export var StyledH1 = /*#__PURE__*/styled.h1.withConfig({
7
7
  displayName: "StyledH1",
8
- componentId: "core-12_13_0__sc-172j5qh-0"
8
+ componentId: "core-12_15_0__sc-172j5qh-0"
9
9
  })(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h1'));
10
10
  export var StyledH2 = /*#__PURE__*/styled.h2.withConfig({
11
11
  displayName: "StyledH2",
12
- componentId: "core-12_13_0__sc-172j5qh-1"
12
+ componentId: "core-12_15_0__sc-172j5qh-1"
13
13
  })(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h2'));
14
14
  export var StyledH3 = /*#__PURE__*/styled.h3.withConfig({
15
15
  displayName: "StyledH3",
16
- componentId: "core-12_13_0__sc-172j5qh-2"
16
+ componentId: "core-12_15_0__sc-172j5qh-2"
17
17
  })(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h3'));
18
18
  var topMarginRules = function topMarginRules() {
19
19
  return css(["& + &,p + &,ol + &,ul + &{margin-top:", "px;}"], spacing.lg);
@@ -28,21 +28,21 @@ export function getSmallIconBodyTextRules() {
28
28
  }
29
29
  export var StyledP = /*#__PURE__*/styled.p.withConfig({
30
30
  displayName: "StyledP",
31
- componentId: "core-12_13_0__sc-172j5qh-3"
31
+ componentId: "core-12_15_0__sc-172j5qh-3"
32
32
  })(["color:", ";", " ", " ", ""], colors.gray15, getTypographyIntent('body'), topMarginRules, semiboldRules);
33
33
  export var StyledUL = /*#__PURE__*/styled.ul.withConfig({
34
34
  displayName: "StyledUL",
35
- componentId: "core-12_13_0__sc-172j5qh-4"
35
+ componentId: "core-12_15_0__sc-172j5qh-4"
36
36
  })(["color:", ";margin:0;padding:0;", " ", " padding-left:", "px;list-style-type:", ";"], colors.gray15, getTypographyIntent('body'), topMarginRules, spacing.lg, function (props) {
37
- return props.listStyleType || 'disc';
37
+ return props.$listStyleType || 'disc';
38
38
  });
39
39
  export var StyledOL = /*#__PURE__*/styled(StyledUL).attrs({
40
40
  as: 'ol'
41
41
  }).withConfig({
42
42
  displayName: "StyledOL",
43
- componentId: "core-12_13_0__sc-172j5qh-5"
43
+ componentId: "core-12_15_0__sc-172j5qh-5"
44
44
  })(["list-style-type:", ";"], function (props) {
45
- return props.listStyleType || 'decimal';
45
+ return props.$listStyleType || 'decimal';
46
46
  });
47
47
  function enforceLabelTypography(props) {
48
48
  return {
@@ -52,7 +52,7 @@ function enforceLabelTypography(props) {
52
52
  }
53
53
  export var StyledLabel = /*#__PURE__*/styled(StyledTypography).attrs(enforceLabelTypography).withConfig({
54
54
  displayName: "StyledLabel",
55
- componentId: "core-12_13_0__sc-172j5qh-6"
55
+ componentId: "core-12_15_0__sc-172j5qh-6"
56
56
  })(["", " ", " > ", "{margin-left:", "px;vertical-align:top;}"], function (_ref) {
57
57
  var _ref$block = _ref.block,
58
58
  block = _ref$block === void 0 ? false : _ref$block;
@@ -70,7 +70,7 @@ export function getUnstyledButton() {
70
70
  */
71
71
  export var StyledUnstyledButton = /*#__PURE__*/styled.button.withConfig({
72
72
  displayName: "StyledUnstyledButton",
73
- componentId: "core-12_13_0__sc-172j5qh-7"
73
+ componentId: "core-12_15_0__sc-172j5qh-7"
74
74
  })(["", ""], getUnstyledButton);
75
75
 
76
76
  /**
@@ -78,6 +78,6 @@ export var StyledUnstyledButton = /*#__PURE__*/styled.button.withConfig({
78
78
  */
79
79
  export var StyledAnchor = /*#__PURE__*/styled.a.withConfig({
80
80
  displayName: "StyledAnchor",
81
- componentId: "core-12_13_0__sc-172j5qh-8"
81
+ componentId: "core-12_15_0__sc-172j5qh-8"
82
82
  })([""]);
83
83
  //# sourceMappingURL=Semantic.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Semantic.styles.js","names":["styled","css","StyledRequiredContainer","getTypographyIntent","semiboldRules","StyledTypography","colors","spacing","StyledH1","h1","withConfig","displayName","componentId","gray15","StyledH2","h2","StyledH3","h3","topMarginRules","lg","getSmallIconBodyTextRules","space","xs","spaceWhenTouch","sm","StyledP","p","StyledUL","ul","props","listStyleType","StyledOL","attrs","as","enforceLabelTypography","intent","StyledLabel","_ref","_ref$block","block","getUnstyledButton","StyledUnstyledButton","button","StyledAnchor","a"],"sources":["../../src/Semantic/Semantic.styles.ts"],"sourcesContent":["import type React from 'react'\nimport styled, { css } from 'styled-components'\nimport { StyledRequiredContainer } from '../Required/Required.styles'\nimport type { TypographyProps } from '../Typography'\nimport {\n getTypographyIntent,\n semiboldRules,\n StyledTypography,\n} from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nexport type StyledListProps = React.HTMLAttributes<\n HTMLUListElement | HTMLOListElement\n> & {\n listStyleType?: string\n}\n\nexport const StyledH1 = styled.h1`\n color: ${colors.gray15};\n ${getTypographyIntent('h1')}\n margin: 0;\n`\nexport const StyledH2 = styled.h2`\n color: ${colors.gray15};\n ${getTypographyIntent('h2')}\n margin: 0;\n`\nexport const StyledH3 = styled.h3`\n color: ${colors.gray15};\n ${getTypographyIntent('h3')}\n margin: 0;\n`\n\nconst topMarginRules = () => {\n return css`\n & + &,\n p + &,\n ol + &,\n ul + & {\n margin-top: ${spacing.lg}px;\n }\n `\n}\n\n// Should this be on Typography? body | label\n/** Small icons align with font and line height */\nexport function getSmallIconBodyTextRules() {\n const space = spacing.xs\n const spaceWhenTouch = spacing.sm\n\n return css`\n & > [data-qa^='ci'] {\n height: 16px;\n width: 16px;\n vertical-align: middle;\n margin-left: ${space}px;\n\n &[tabindex='0'] {\n margin-left: ${spaceWhenTouch}px;\n }\n\n &:first-child {\n margin-left: 0;\n margin-right: ${space}px;\n vertical-align: sub;\n\n &[tabindex='0'] {\n margin-right: ${spaceWhenTouch}px;\n }\n }\n }\n `\n}\n\nexport const StyledP = styled.p`\n color: ${colors.gray15};\n ${getTypographyIntent('body')}\n ${topMarginRules}\n ${semiboldRules}\n`\n\nexport const StyledUL = styled.ul<StyledListProps>`\n color: ${colors.gray15};\n margin: 0;\n padding: 0;\n ${getTypographyIntent('body')}\n ${topMarginRules}\n padding-left: ${spacing.lg}px;\n list-style-type: ${(props) => props.listStyleType || 'disc'};\n`\n\nexport const StyledOL = styled(StyledUL).attrs({ as: 'ol' })<StyledListProps>`\n list-style-type: ${(props) => props.listStyleType || 'decimal'};\n`\n\nfunction enforceLabelTypography(props: TypographyProps) {\n return {\n as: props.as || 'label',\n intent: 'label',\n }\n}\n\nexport const StyledLabel = styled(StyledTypography).attrs(\n enforceLabelTypography\n)`\n ${({ block = false }) => block && `display: block;`}\n ${getSmallIconBodyTextRules}\n\n > ${StyledRequiredContainer} {\n margin-left: ${spacing.xs}px;\n vertical-align: top;\n }\n`\n\n/**\n * An unstyled `button`, browser reset\n */\nexport function getUnstyledButton() {\n return css`\n border: none;\n background: none;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n padding: 0;\n text-transform: none;\n -webkit-appearance: button;\n `\n}\n/**\n * An unstyled `button`, browser reset\n */\nexport const StyledUnstyledButton = styled.button`\n ${getUnstyledButton}\n`\n\n/**\n * An a styled component a\n */\nexport const StyledAnchor = styled.a``\n"],"mappings":"AACA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SACEC,mBAAmB,EACnBC,aAAa,EACbC,gBAAgB,QACX,iCAAiC;AACxC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAQ5C,OAAO,IAAMC,QAAQ,gBAAGR,MAAM,CAACS,EAAE,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kCACtBN,MAAM,CAACO,MAAM,EACpBV,mBAAmB,CAAC,IAAI,CAAC,CAE5B;AACD,OAAO,IAAMW,QAAQ,gBAAGd,MAAM,CAACe,EAAE,CAAAL,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kCACtBN,MAAM,CAACO,MAAM,EACpBV,mBAAmB,CAAC,IAAI,CAAC,CAE5B;AACD,OAAO,IAAMa,QAAQ,gBAAGhB,MAAM,CAACiB,EAAE,CAAAP,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kCAC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AAE;EACV,CAAC;AACH;AAEA,OAAO,IAAMC,WAAW,gBAAGpC,MAAM,CAACK,gBAAgB,CAAC,CAAC2B,KAAK,CACvDE,sBACF,CAAC,CAAAxB,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iEACG,UAAAyB,IAAA;EAAA,IAAAC,UAAA,GAAAD,IAAA,CAAGE,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,KAAK,GAAAA,UAAA;EAAA,OAAOC,KAAK,qBAAqB;AAAA,GACjDnB,yBAAyB,EAEvBlB,uBAAuB,EACVK,OAAO,CAACe,EAAE,CAG5B;;AAED;AACA;AACA;AACA,OAAO,SAASkB,iBAAiBA,CAAA,EAAG;EAClC,OAAOvC,GAAG;AAWZ;AACA;AACA;AACA;AACA,OAAO,IAAMwC,oBAAoB,gBAAGzC,MAAM,CAAC0C,MAAM,CAAAhC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,aAC7C4B,iBAAiB,CACpB;;AAED;AACA;AACA;AACA,OAAO,IAAMG,YAAY,gBAAG3C,MAAM,CAAC4C,CAAC,CAAAlC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,QAAE"}
1
+ {"version":3,"file":"Semantic.styles.js","names":["styled","css","StyledRequiredContainer","getTypographyIntent","semiboldRules","StyledTypography","colors","spacing","StyledH1","h1","withConfig","displayName","componentId","gray15","StyledH2","h2","StyledH3","h3","topMarginRules","lg","getSmallIconBodyTextRules","space","xs","spaceWhenTouch","sm","StyledP","p","StyledUL","ul","props","$listStyleType","StyledOL","attrs","as","enforceLabelTypography","intent","StyledLabel","_ref","_ref$block","block","getUnstyledButton","StyledUnstyledButton","button","StyledAnchor","a"],"sources":["../../src/Semantic/Semantic.styles.ts"],"sourcesContent":["import type React from 'react'\nimport styled, { css } from 'styled-components'\nimport { StyledRequiredContainer } from '../Required/Required.styles'\nimport type { TypographyProps } from '../Typography'\nimport {\n getTypographyIntent,\n semiboldRules,\n StyledTypography,\n} from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nexport type StyledListProps = React.HTMLAttributes<\n HTMLUListElement | HTMLOListElement\n> & {\n $listStyleType?: string\n}\n\nexport const StyledH1 = styled.h1`\n color: ${colors.gray15};\n ${getTypographyIntent('h1')}\n margin: 0;\n`\nexport const StyledH2 = styled.h2`\n color: ${colors.gray15};\n ${getTypographyIntent('h2')}\n margin: 0;\n`\nexport const StyledH3 = styled.h3`\n color: ${colors.gray15};\n ${getTypographyIntent('h3')}\n margin: 0;\n`\n\nconst topMarginRules = () => {\n return css`\n & + &,\n p + &,\n ol + &,\n ul + & {\n margin-top: ${spacing.lg}px;\n }\n `\n}\n\n// Should this be on Typography? body | label\n/** Small icons align with font and line height */\nexport function getSmallIconBodyTextRules() {\n const space = spacing.xs\n const spaceWhenTouch = spacing.sm\n\n return css`\n & > [data-qa^='ci'] {\n height: 16px;\n width: 16px;\n vertical-align: middle;\n margin-left: ${space}px;\n\n &[tabindex='0'] {\n margin-left: ${spaceWhenTouch}px;\n }\n\n &:first-child {\n margin-left: 0;\n margin-right: ${space}px;\n vertical-align: sub;\n\n &[tabindex='0'] {\n margin-right: ${spaceWhenTouch}px;\n }\n }\n }\n `\n}\n\nexport const StyledP = styled.p`\n color: ${colors.gray15};\n ${getTypographyIntent('body')}\n ${topMarginRules}\n ${semiboldRules}\n`\n\nexport const StyledUL = styled.ul<StyledListProps>`\n color: ${colors.gray15};\n margin: 0;\n padding: 0;\n ${getTypographyIntent('body')}\n ${topMarginRules}\n padding-left: ${spacing.lg}px;\n list-style-type: ${(props) => props.$listStyleType || 'disc'};\n`\n\nexport const StyledOL = styled(StyledUL).attrs({ as: 'ol' })<StyledListProps>`\n list-style-type: ${(props) => props.$listStyleType || 'decimal'};\n`\n\nfunction enforceLabelTypography(props: TypographyProps) {\n return {\n as: props.as || 'label',\n intent: 'label',\n }\n}\n\nexport const StyledLabel = styled(StyledTypography).attrs(\n enforceLabelTypography\n)`\n ${({ block = false }) => block && `display: block;`}\n ${getSmallIconBodyTextRules}\n\n > ${StyledRequiredContainer} {\n margin-left: ${spacing.xs}px;\n vertical-align: top;\n }\n`\n\n/**\n * An unstyled `button`, browser reset\n */\nexport function getUnstyledButton() {\n return css`\n border: none;\n background: none;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n padding: 0;\n text-transform: none;\n -webkit-appearance: button;\n `\n}\n/**\n * An unstyled `button`, browser reset\n */\nexport const StyledUnstyledButton = styled.button`\n ${getUnstyledButton}\n`\n\n/**\n * An a styled component a\n */\nexport const StyledAnchor = styled.a``\n"],"mappings":"AACA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SACEC,mBAAmB,EACnBC,aAAa,EACbC,gBAAgB,QACX,iCAAiC;AACxC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAQ5C,OAAO,IAAMC,QAAQ,gBAAGR,MAAM,CAACS,EAAE,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kCACtBN,MAAM,CAACO,MAAM,EACpBV,mBAAmB,CAAC,IAAI,CAAC,CAE5B;AACD,OAAO,IAAMW,QAAQ,gBAAGd,MAAM,CAACe,EAAE,CAAAL,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kCACtBN,MAAM,CAACO,MAAM,EACpBV,mBAAmB,CAAC,IAAI,CAAC,CAE5B;AACD,OAAO,IAAMa,QAAQ,gBAAGhB,MAAM,CAACiB,EAAE,CAAAP,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kCACtBN,MAAM,CAACO,MAAM,EACpBV,mBAAmB,CAAC,IAAI,CAAC,CAE5B;AAED,IAAMe,cAAc,GAAG,SAAjBA,cAAcA,CAAA,EAAS;EAC3B,OAAOjB,GAAG,oDAKQM,OAAO,CAACY,EAAE;AAG9B,CAAC;;AAED;AACA;AAC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AAC,UAAA,GAAAD,IAAA,CAAGE,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,KAAK,GAAAA,UAAA;EAAA,OAAOC,KAAK,qBAAqB;AAAA,GACjDnB,yBAAyB,EAEvBlB,uBAAuB,EACVK,OAAO,CAACe,EAAE,CAG5B;;AAED;AACA;AACA;AACA,OAAO,SAASkB,iBAAiBA,CAAA,EAAG;EAClC,OAAOvC,GAAG;AAWZ;AACA;AACA;AACA;AACA,OAAO,IAAMwC,oBAAoB,gBAAGzC,MAAM,CAAC0C,MAAM,CAAAhC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,aAC7C4B,iBAAiB,CACpB;;AAED;AACA;AACA;AACA,OAAO,IAAMG,YAAY,gBAAG3C,MAAM,CAAC4C,CAAC,CAAAlC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,QAAE"}
@@ -1,3 +1,4 @@
1
+ import type React from 'react';
1
2
  import type { HeadingAttributes } from '../_utils/types';
2
3
  export interface HeadingProps extends HeadingAttributes {
3
4
  /**
@@ -6,3 +7,7 @@ export interface HeadingProps extends HeadingAttributes {
6
7
  */
7
8
  as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
8
9
  }
10
+ export interface ListProps extends React.HTMLAttributes<HTMLUListElement | HTMLOListElement> {
11
+ /** @since 11.25.1 */
12
+ listStyleType?: string;
13
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Semantic.types.js","names":[],"sources":["../../src/Semantic/Semantic.types.ts"],"sourcesContent":["import type { HeadingAttributes } from '../_utils/types'\n\nexport interface HeadingProps extends HeadingAttributes {\n /**\n * Change the HTML tag.\n * @since 11.12.0\n */\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Semantic.types.js","names":[],"sources":["../../src/Semantic/Semantic.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { HeadingAttributes } from '../_utils/types'\n\nexport interface HeadingProps extends HeadingAttributes {\n /**\n * Change the HTML tag.\n * @since 11.12.0\n */\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport interface ListProps\n extends React.HTMLAttributes<HTMLUListElement | HTMLOListElement> {\n /** @since 11.25.1 */\n listStyleType?: string\n}\n"],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const SettingsPageTemplate: React.ForwardRefExoticComponent<import("../PageTemplate/PageTemplate.types").PageTemplateProps & Omit<import("../PageHeaderTemplate/PageHeaderTemplate.types").PageHeaderTemplateProps, "actions"> & {
3
+ headerActions?: React.ReactNode;
4
+ footerActions?: React.ReactNode;
5
+ footerNotation?: React.ReactNode;
6
+ footerRequired?: string | boolean | undefined;
7
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,34 @@
1
+ var _excluded = ["children", "header", "footer", "pane", "innerPane", "headerActions", "footerActions", "footerNotation", "footerRequired"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
+ import React from 'react';
6
+ import { PageFooterTemplate } from '../PageFooterTemplate/PageFooterTemplate';
7
+ import { PageHeaderTemplate } from '../PageHeaderTemplate/PageHeaderTemplate';
8
+ import { PageTemplate } from '../PageTemplate/PageTemplate';
9
+ export var SettingsPageTemplate = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
10
+ var children = _ref.children,
11
+ header = _ref.header,
12
+ footer = _ref.footer,
13
+ pane = _ref.pane,
14
+ innerPane = _ref.innerPane,
15
+ headerActions = _ref.headerActions,
16
+ footerActions = _ref.footerActions,
17
+ footerNotation = _ref.footerNotation,
18
+ footerRequired = _ref.footerRequired,
19
+ headerProps = _objectWithoutProperties(_ref, _excluded);
20
+ return /*#__PURE__*/React.createElement(PageTemplate, {
21
+ header: header !== null && header !== void 0 ? header : /*#__PURE__*/React.createElement(PageHeaderTemplate, _extends({
22
+ actions: headerActions
23
+ }, headerProps)),
24
+ footer: footer !== null && footer !== void 0 ? footer : /*#__PURE__*/React.createElement(PageFooterTemplate, {
25
+ actions: footerActions,
26
+ notation: footerNotation,
27
+ required: footerRequired
28
+ }),
29
+ pane: pane,
30
+ innerPane: innerPane,
31
+ ref: ref
32
+ }, children);
33
+ });
34
+ //# sourceMappingURL=SettingsPageTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsPageTemplate.js","names":["React","PageFooterTemplate","PageHeaderTemplate","PageTemplate","SettingsPageTemplate","forwardRef","_ref","ref","children","header","footer","pane","innerPane","headerActions","footerActions","footerNotation","footerRequired","headerProps","_objectWithoutProperties","_excluded","createElement","_extends","actions","notation","required"],"sources":["../../src/SettingsPageTemplate/SettingsPageTemplate.tsx"],"sourcesContent":["import React from 'react'\nimport { PageFooterTemplate } from '../PageFooterTemplate/PageFooterTemplate'\nimport { PageHeaderTemplate } from '../PageHeaderTemplate/PageHeaderTemplate'\nimport { PageTemplate } from '../PageTemplate/PageTemplate'\nimport type { SettingsPageTemplateProps } from './SettingsPageTemplate.types'\n\nexport const SettingsPageTemplate = React.forwardRef<\n HTMLDivElement,\n SettingsPageTemplateProps\n>(\n (\n {\n children,\n header,\n footer,\n pane,\n innerPane,\n headerActions,\n footerActions,\n footerNotation,\n footerRequired,\n ...headerProps\n }: SettingsPageTemplateProps,\n ref\n ) => (\n <PageTemplate\n header={\n header ?? (\n <PageHeaderTemplate actions={headerActions} {...headerProps} />\n )\n }\n footer={\n footer ?? (\n <PageFooterTemplate\n actions={footerActions}\n notation={footerNotation}\n required={footerRequired}\n />\n )\n }\n pane={pane}\n innerPane={innerPane}\n ref={ref}\n >\n {children}\n </PageTemplate>\n )\n)\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,kBAAkB,QAAQ,0CAA0C;AAC7E,SAASC,kBAAkB,QAAQ,0CAA0C;AAC7E,SAASC,YAAY,QAAQ,8BAA8B;AAG3D,OAAO,IAAMC,oBAAoB,gBAAGJ,KAAK,CAACK,UAAU,CAIlD,UAAAC,IAAA,EAaEC,GAAG;EAAA,IAXDC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IACJC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,aAAa,GAAAP,IAAA,CAAbO,aAAa;IACbC,aAAa,GAAAR,IAAA,CAAbQ,aAAa;IACbC,cAAc,GAAAT,IAAA,CAAdS,cAAc;IACdC,cAAc,GAAAV,IAAA,CAAdU,cAAc;IACXC,WAAW,GAAAC,wBAAA,CAAAZ,IAAA,EAAAa,SAAA;EAAA,oBAIhBnB,KAAA,CAAAoB,aAAA,CAACjB,YAAY;IACXM,MAAM,EACJA,MAAM,aAANA,MAAM,cAANA,MAAM,gBACJT,KAAA,CAAAoB,aAAA,CAAClB,kBAAkB,EAAAmB,QAAA;MAACC,OAAO,EAAET;IAAc,GAAKI,WAAW,CAAG,CAEjE;IACDP,MAAM,EACJA,MAAM,aAANA,MAAM,cAANA,MAAM,gBACJV,KAAA,CAAAoB,aAAA,CAACnB,kBAAkB;MACjBqB,OAAO,EAAER,aAAc;MACvBS,QAAQ,EAAER,cAAe;MACzBS,QAAQ,EAAER;IAAe,CAC1B,CAEJ;IACDL,IAAI,EAAEA,IAAK;IACXC,SAAS,EAAEA,SAAU;IACrBL,GAAG,EAAEA;EAAI,GAERC,QACW,CAAC;AAAA,CAEnB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { PageFooterTemplateProps } from '../PageFooterTemplate/PageFooterTemplate.types';
2
+ import type { PageHeaderTemplateProps } from '../PageHeaderTemplate/PageHeaderTemplate.types';
3
+ import type { PageTemplateProps } from '../PageTemplate/PageTemplate.types';
4
+ export declare type SettingsPageTemplateProps = PageTemplateProps & Omit<PageHeaderTemplateProps, 'actions'> & {
5
+ headerActions?: PageHeaderTemplateProps['actions'];
6
+ footerActions?: PageFooterTemplateProps['actions'];
7
+ footerNotation?: PageFooterTemplateProps['notation'];
8
+ footerRequired?: PageFooterTemplateProps['required'];
9
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SettingsPageTemplate.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsPageTemplate.types.js","names":[],"sources":["../../src/SettingsPageTemplate/SettingsPageTemplate.types.ts"],"sourcesContent":["import type { PageFooterTemplateProps } from '../PageFooterTemplate/PageFooterTemplate.types'\nimport type { PageHeaderTemplateProps } from '../PageHeaderTemplate/PageHeaderTemplate.types'\nimport type { PageTemplateProps } from '../PageTemplate/PageTemplate.types'\n\nexport type SettingsPageTemplateProps = PageTemplateProps &\n Omit<PageHeaderTemplateProps, 'actions'> & {\n headerActions?: PageHeaderTemplateProps['actions']\n footerActions?: PageFooterTemplateProps['actions']\n footerNotation?: PageFooterTemplateProps['notation']\n footerRequired?: PageFooterTemplateProps['required']\n }\n"],"mappings":""}
@@ -103,7 +103,7 @@ export var Slider = /*#__PURE__*/React.forwardRef(function Slider(_ref5, ref) {
103
103
  return /*#__PURE__*/React.createElement(StyledContainer, {
104
104
  className: className,
105
105
  style: style,
106
- showLabel: showLabel
106
+ $showLabel: showLabel
107
107
  }, /*#__PURE__*/React.createElement(StyledSlider, _extends({}, props, {
108
108
  disabled: disabled,
109
109
  onChange: onChange,
@@ -124,7 +124,7 @@ export var Slider = /*#__PURE__*/React.forwardRef(function Slider(_ref5, ref) {
124
124
  onMouseUp: function onMouseUp() {
125
125
  return setIsDragging(false);
126
126
  },
127
- isDragging: isDragging
127
+ $isDragging: isDragging
128
128
  })), step && /*#__PURE__*/React.createElement(StyledIncrementContainer, null, Array(Math.floor(increments) + 1).fill(null).map(function (_, index) {
129
129
  return /*#__PURE__*/React.createElement(StyledIncrementOverlay, {
130
130
  key: "core-slider-increment-overlay-".concat(index, "-").concat(min, "-").concat(max, "-").concat(step)
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","names":["React","StyledContainer","StyledIncrementContainer","StyledIncrementOverlay","StyledLabel","StyledSlider","getIncrements","_ref","min","max","step","getPercentage","_ref2","value","getLabel","_ref3","index","getDefaultValue","_ref4","defaultVal","Math","round","Slider","forwardRef","_ref5","ref","className","disabled","onChange","_ref5$max","_ref5$min","showLabel","style","value_","props","_objectWithoutProperties","_excluded","_React$useState","useState","_React$useState2","_slicedToArray","isDragging","setIsDragging","increments","console","warn","createElement","_extends","$percent","type","onMouseDown","onMouseUp","Array","floor","fill","map","_","key","concat","intent"],"sources":["../../src/Slider/Slider.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledContainer,\n StyledIncrementContainer,\n StyledIncrementOverlay,\n StyledLabel,\n StyledSlider,\n} from './Slider.styles'\nimport type { SliderProps } from './Slider.types'\n\nexport const getIncrements = ({\n min,\n max,\n step,\n}: {\n min: number\n max: number\n step?: number\n}): number => {\n if (!step) {\n return 0\n }\n return (max - min) / step\n}\n\nexport const getPercentage = ({\n max,\n min,\n value,\n}: {\n max: number\n min: number\n value: number\n}): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nexport const getLabel = ({\n max,\n min,\n step,\n index,\n}: {\n max: number\n min: number\n step: number\n index: number\n}): number => {\n if (min === 0) {\n return index * step\n } else if (min >= 0) {\n return index * step + min\n } else if (min <= 0) {\n return (index - getIncrements({ max, min, step })) * step + max\n } else {\n return 0\n }\n}\n\nexport const getDefaultValue = ({\n min,\n max,\n step,\n}: {\n min: number\n max: number\n step?: number\n}): number => {\n // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#value\n const defaultVal = max < min ? min : min + (max - min) / 2\n return step ? Math.round(defaultVal / step) * step : defaultVal\n}\n\n/**\n\n A slider is a bar with selectable/grabbable handle. It allows users to click\n and drag horizontally to a desired value. It is used when users need to select\n a value from a predefined range of values. Sliders should always have a\n corresponding value or increment displayed within proximity of the component.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-slider--demo)\n\n @see [Design Guidelines](https://design.procore.com/slider)\n\n */\nexport const Slider = React.forwardRef<HTMLInputElement, SliderProps>(\n function Slider(\n {\n className,\n disabled,\n onChange,\n max = 100,\n min = 0,\n showLabel,\n step,\n style,\n value: value_,\n ...props\n },\n ref\n ) {\n const [isDragging, setIsDragging] = React.useState<boolean>(false)\n\n const value = value_ ?? getDefaultValue({ max, min, step })\n const increments = getIncrements({ max, min, step })\n\n // check if the \"step\" value does not cleanly\n // divide into max - min\n if (increments % 1 !== 0) {\n console.warn(\n '@procore/core-react: SLIDER COMPONENT WARNING: Your step value does not cleanly divide into max - min. This will cause your Slider to display incorrectly.'\n )\n }\n\n return (\n <StyledContainer\n className={className}\n style={style}\n showLabel={showLabel}\n >\n <StyledSlider\n {...props}\n disabled={disabled}\n onChange={onChange}\n max={max}\n min={min}\n $percent={getPercentage({ max, min, value })}\n ref={ref}\n step={step}\n type=\"range\"\n value={value}\n onMouseDown={() => setIsDragging(true)}\n onMouseUp={() => setIsDragging(false)}\n isDragging={isDragging}\n />\n {step && (\n <StyledIncrementContainer>\n {Array(Math.floor(increments) + 1)\n .fill(null)\n .map((_, index) => {\n return (\n <StyledIncrementOverlay\n key={`core-slider-increment-overlay-${index}-${min}-${max}-${step}`}\n >\n {showLabel && (\n <StyledLabel intent=\"small\">\n {getLabel({\n min,\n max,\n step,\n index,\n })}\n </StyledLabel>\n )}\n </StyledIncrementOverlay>\n )\n })}\n </StyledIncrementContainer>\n )}\n </StyledContainer>\n )\n }\n)\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,eAAe,EACfC,wBAAwB,EACxBC,sBAAsB,EACtBC,WAAW,EACXC,YAAY,QACP,iBAAiB;AAGxB,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQZ;EAAA,IAPZC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,IAAI,GAAAH,IAAA,CAAJG,IAAI;EAMJ,IAAI,CAACA,IAAI,EAAE;IACT,OAAO,CAAC;EACV;EACA,OAAO,CAACD,GAAG,GAAGD,GAAG,IAAIE,IAAI;AAC3B,CAAC;AAED,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,KAAA,EAQZ;EAAA,IAPZH,GAAG,GAAAG,KAAA,CAAHH,GAAG;IACHD,GAAG,GAAAI,KAAA,CAAHJ,GAAG;IACHK,KAAK,GAAAD,KAAA,CAALC,KAAK;EAML,OAAQ,CAACA,KAAK,GAAGL,GAAG,KAAKC,GAAG,GAAGD,GAAG,CAAC,GAAI,GAAG;AAC5C,CAAC;AAED,OAAO,IAAMM,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,KAAA,EAUP;EAAA,IATZN,GAAG,GAAAM,KAAA,CAAHN,GAAG;IACHD,GAAG,GAAAO,KAAA,CAAHP,GAAG;IACHE,IAAI,GAAAK,KAAA,CAAJL,IAAI;IACJM,KAAK,GAAAD,KAAA,CAALC,KAAK;EAOL,IAAIR,GAAG,KAAK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ED,GAAG,EAAHA,GAAG;MAAEK,KAAK,EAALA;IAAM,CAAC,CAAE;IAC7CY,GAAG,EAAEA,GAAI;IACTf,IAAI,EAAEA,IAAK;IACXuC,IAAI,EAAC,OAAO;IACZpC,KAAK,EAAEA,KAAM;IACbqC,WAAW,EAAE,SAAAA,YAAA;MAAA,OAAMR,aAAa,CAAC,IAAI,CAAC;IAAA,CAAC;IACvCS,SAAS,EAAE,SAAAA,UAAA;MAAA,OAAMT,aAAa,CAAC,KAAK,CAAC;IAAA,CAAC;IACtCD,UAAU,EAAEA;EAAW,EACxB,CAAC,EACD/B,IAAI,iBACHV,KAAA,CAAA8C,aAAA,CAAC5C,wBAAwB,QACtBkD,KAAK,CAAChC,IAAI,CAACiC,KAAK,CAACV,UAAU,CAAC,GAAG,CAAC,CAAC,CAC/BW,IAAI,CAAC,IAAI,CAAC,CACVC,GAAG,CAAC,UAACC,CAAC,EAAExC,KAAK,EAAK;IACjB,oBACEhB,KAAA,CAAA8C,aAAA,CAAC3C,sBAAsB;MACrBsD,GAAG,mCAAAC,MAAA,CAAmC1C,KAAK,OAAA0C,MAAA,CAAIlD,GAAG,OAAAkD,MAAA,CAAIjD,GAAG,OAAAiD,MAAA,CAAIhD,IAAI;IAAG,GAEnEqB,SAAS,iBACR/B,KAAA,CAAA8C,aAAA,CAAC1C,WAAW;MAACuD,MAAM,EAAC;IAAO,GACxB7C,QAAQ,CAAC;MACRN,GAAG,EAAHA,GAAG;MACHC,GAAG,EAAHA,GAAG;MACHC,IAAI,EAAJA,IAAI;MACJM,KAAK,EAALA;IACF,CAAC,CACU,CAEO,CAAC;EAE7B,CAAC,CACqB,CAEb,CAAC;AAEtB,CACF,CAAC"}
1
+ {"version":3,"file":"Slider.js","names":["React","StyledContainer","StyledIncrementContainer","StyledIncrementOverlay","StyledLabel","StyledSlider","getIncrements","_ref","min","max","step","getPercentage","_ref2","value","getLabel","_ref3","index","getDefaultValue","_ref4","defaultVal","Math","round","Slider","forwardRef","_ref5","ref","className","disabled","onChange","_ref5$max","_ref5$min","showLabel","style","value_","props","_objectWithoutProperties","_excluded","_React$useState","useState","_React$useState2","_slicedToArray","isDragging","setIsDragging","increments","console","warn","createElement","$showLabel","_extends","$percent","type","onMouseDown","onMouseUp","$isDragging","Array","floor","fill","map","_","key","concat","intent"],"sources":["../../src/Slider/Slider.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledContainer,\n StyledIncrementContainer,\n StyledIncrementOverlay,\n StyledLabel,\n StyledSlider,\n} from './Slider.styles'\nimport type { SliderProps } from './Slider.types'\n\nexport const getIncrements = ({\n min,\n max,\n step,\n}: {\n min: number\n max: number\n step?: number\n}): number => {\n if (!step) {\n return 0\n }\n return (max - min) / step\n}\n\nexport const getPercentage = ({\n max,\n min,\n value,\n}: {\n max: number\n min: number\n value: number\n}): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nexport const getLabel = ({\n max,\n min,\n step,\n index,\n}: {\n max: number\n min: number\n step: number\n index: number\n}): number => {\n if (min === 0) {\n return index * step\n } else if (min >= 0) {\n return index * step + min\n } else if (min <= 0) {\n return (index - getIncrements({ max, min, step })) * step + max\n } else {\n return 0\n }\n}\n\nexport const getDefaultValue = ({\n min,\n max,\n step,\n}: {\n min: number\n max: number\n step?: number\n}): number => {\n // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#value\n const defaultVal = max < min ? min : min + (max - min) / 2\n return step ? Math.round(defaultVal / step) * step : defaultVal\n}\n\n/**\n\n A slider is a bar with selectable/grabbable handle. It allows users to click\n and drag horizontally to a desired value. It is used when users need to select\n a value from a predefined range of values. Sliders should always have a\n corresponding value or increment displayed within proximity of the component.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-slider--demo)\n\n @see [Design Guidelines](https://design.procore.com/slider)\n\n */\nexport const Slider = React.forwardRef<HTMLInputElement, SliderProps>(\n function Slider(\n {\n className,\n disabled,\n onChange,\n max = 100,\n min = 0,\n showLabel,\n step,\n style,\n value: value_,\n ...props\n },\n ref\n ) {\n const [isDragging, setIsDragging] = React.useState<boolean>(false)\n\n const value = value_ ?? getDefaultValue({ max, min, step })\n const increments = getIncrements({ max, min, step })\n\n // check if the \"step\" value does not cleanly\n // divide into max - min\n if (increments % 1 !== 0) {\n console.warn(\n '@procore/core-react: SLIDER COMPONENT WARNING: Your step value does not cleanly divide into max - min. This will cause your Slider to display incorrectly.'\n )\n }\n\n return (\n <StyledContainer\n className={className}\n style={style}\n $showLabel={showLabel}\n >\n <StyledSlider\n {...props}\n disabled={disabled}\n onChange={onChange}\n max={max}\n min={min}\n $percent={getPercentage({ max, min, value })}\n ref={ref}\n step={step}\n type=\"range\"\n value={value}\n onMouseDown={() => setIsDragging(true)}\n onMouseUp={() => setIsDragging(false)}\n $isDragging={isDragging}\n />\n {step && (\n <StyledIncrementContainer>\n {Array(Math.floor(increments) + 1)\n .fill(null)\n .map((_, index) => {\n return (\n <StyledIncrementOverlay\n key={`core-slider-increment-overlay-${index}-${min}-${max}-${step}`}\n >\n {showLabel && (\n <StyledLabel intent=\"small\">\n {getLabel({\n min,\n max,\n step,\n index,\n })}\n </StyledLabel>\n )}\n </StyledIncrementOverlay>\n )\n })}\n </StyledIncrementContainer>\n )}\n </StyledContainer>\n )\n }\n)\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,eAAe,EACfC,wBAAwB,EACxBC,sBAAsB,EACtBC,WAAW,EACXC,YAAY,QACP,iBAAiB;AAGxB,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQZ;EAAA,IAPZC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,IAAI,GAAAH,IAAA,CAAJG,IAAI;EAMJ,IAAI,CAACA,IAAI,EAAE;IACT,OAAO,CAAC;EACV;EACA,OAAO,CAACD,GAAG,GAAGD,GAAG,IAAIE,IAAI;AAC3B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C,MAAA,CAAIpD,GAAG,OAAAoD,MAAA,CAAInD,GAAG,OAAAmD,MAAA,CAAIlD,IAAI;IAAG,GAEnEqB,SAAS,iBACR/B,KAAA,CAAA8C,aAAA,CAAC1C,WAAW;MAACyD,MAAM,EAAC;IAAO,GACxB/C,QAAQ,CAAC;MACRN,GAAG,EAAHA,GAAG;MACHC,GAAG,EAAHA,GAAG;MACHC,IAAI,EAAJA,IAAI;MACJM,KAAK,EAALA;IACF,CAAC,CACU,CAEO,CAAC;EAE7B,CAAC,CACqB,CAEb,CAAC;AAEtB,CACF,CAAC"}
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  export declare const StyledContainer: import("styled-components").StyledComponent<"div", any, {
3
- showLabel?: boolean | undefined;
3
+ $showLabel?: boolean | undefined;
4
4
  }, never>;
5
5
  export declare const StyledSlider: import("styled-components").StyledComponent<"input", any, {
6
6
  $percent: number;
7
7
  ref: any;
8
- isDragging: boolean;
8
+ $isDragging: boolean;
9
9
  }, never>;
10
10
  export declare const StyledIncrementOverlay: import("styled-components").StyledComponent<"div", any, {}, never>;
11
11
  export declare const StyledIncrementContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -7,10 +7,10 @@ function applyStylesOnlyToFF(styles) {
7
7
  return css(["@supports (-moz-appearance:none){", "}"], styles);
8
8
  }
9
9
  var getThumbStyles = /*#__PURE__*/css(["box-shadow:0px 1px 4px rgba(40,40,40,0.2),0px 0px 3px rgba(0,0,0,0.14),0px 2px 3px rgba(0,0,0,0.12);height:", "px;width:", "px;border-radius:15px;background:", ";border:2px solid ", ";z-index:3;", ";"], THUMB_HEIGHT, THUMB_HEIGHT, colors.white, colors.blue50, function (props) {
10
- return props.isDragging ? "cursor: grabbing" : "cursor: pointer";
10
+ return props.$isDragging ? "cursor: grabbing" : "cursor: pointer";
11
11
  });
12
12
  var getTrackStyles = /*#__PURE__*/css(["width:100%;height:", "px;animate:0.2s;border-radius:1px;border:0px solid ", ";z-index:1;", ";"], TRACK_HEIGHT, colors.black, function (props) {
13
- return props.isDragging ? "cursor: grabbing" : "cursor: pointer";
13
+ return props.$isDragging ? "cursor: grabbing" : "cursor: pointer";
14
14
  });
15
15
  var getTrackBackground = function getTrackBackground(percent) {
16
16
  return "background: linear-gradient(to right, ".concat(colors.blue50, " 0%, ").concat(colors.blue50, " ").concat(percent, "%, ").concat(colors.gray70, " ").concat(percent, "%, ").concat(colors.gray70, " 100%);");
@@ -21,15 +21,15 @@ var getTrackBackgroundDisabled = function getTrackBackgroundDisabled(percent) {
21
21
  var getThumbDisabledStyles = /*#__PURE__*/css(["cursor:not-allowed;border:2px solid ", ";"], colors.blue85);
22
22
  export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "StyledContainer",
24
- componentId: "core-12_13_0__sc-12icguw-0"
24
+ componentId: "core-12_15_0__sc-12icguw-0"
25
25
  })(["position:relative;", ";"], function (props) {
26
- return props.showLabel && 'padding-bottom: 10px';
26
+ return props.$showLabel && 'padding-bottom: 10px';
27
27
  });
28
28
  export var StyledSlider = /*#__PURE__*/styled.input.withConfig({
29
29
  displayName: "StyledSlider",
30
- componentId: "core-12_13_0__sc-12icguw-1"
30
+ componentId: "core-12_15_0__sc-12icguw-1"
31
31
  })(["-webkit-appearance:none;margin:0;padding-top:5px;padding-bottom:5px;width:100%;border:1px solid transparent;background-color:transparent;font-size:12px;&:focus{outline:none;", ";padding-top:5px;padding-bottom:5px;border-radius:2px;}&::-webkit-slider-runnable-track{", " ", "}&:disabled::-webkit-slider-runnable-track{cursor:not-allowed;", "}&::-webkit-slider-thumb{", " -webkit-appearance:none;margin-top:-5px;}&:disabled::-webkit-slider-thumb{", "}&::-moz-range-track{", " ", "}&:disabled::-moz-range-track{cursor:not-allowed;", "}&::-moz-range-thumb{", " height:12px;width:12px;}&:disabled::-moz-range-thumb{", "}&::-ms-track{", " height:", "px;color:transparent;", "}&:disabled::-ms-track{cursor:not-allowed;", "}&::-ms-fill-lower{background:", ";border:0px solid ", ";border-radius:2px;box-shadow:1px 1px 1px ", ";}&::-ms-fill-upper{background:", ";border:0px solid ", ";border-radius:2px;box-shadow:1px 1px 1px ", ";}&::-ms-thumb{", "}&:disabled::-ms-thumb{", "}&:focus::-ms-fill-lower{background:", ";}&:focus::-ms-fill-upper{background:", ";}"], function (props) {
32
- return props.isDragging ? "border: 1px solid transparent" : "border: 1px solid ".concat(colors.blue40);
32
+ return props.$isDragging ? "border: 1px solid transparent" : "border: 1px solid ".concat(colors.blue40);
33
33
  }, getTrackStyles, function (props) {
34
34
  return getTrackBackground(props.$percent);
35
35
  }, function (props) {
@@ -45,14 +45,14 @@ export var StyledSlider = /*#__PURE__*/styled.input.withConfig({
45
45
  }, colors.blue50, colors.black, colors.black, colors.gray70, colors.black, colors.black, getThumbStyles, getThumbDisabledStyles, colors.blue50, colors.gray70);
46
46
  export var StyledIncrementOverlay = /*#__PURE__*/styled.div.withConfig({
47
47
  displayName: "StyledIncrementOverlay",
48
- componentId: "core-12_13_0__sc-12icguw-2"
48
+ componentId: "core-12_15_0__sc-12icguw-2"
49
49
  })(["position:relative;width:0;&::before{content:'';height:", "px;width:2px;background-color:white;display:block;}z-index:2;"], TRACK_HEIGHT);
50
50
  export var StyledIncrementContainer = /*#__PURE__*/styled.div.withConfig({
51
51
  displayName: "StyledIncrementContainer",
52
- componentId: "core-12_13_0__sc-12icguw-3"
52
+ componentId: "core-12_15_0__sc-12icguw-3"
53
53
  })(["position:absolute;display:flex;justify-content:space-between;top:6px;", " left:5px;right:5px;> :first-child{visibility:hidden;}> :last-child{visibility:hidden;}"], applyStylesOnlyToFF("\n top: 12px;\n "));
54
54
  export var StyledLabel = /*#__PURE__*/styled(Typography).withConfig({
55
55
  displayName: "StyledLabel",
56
- componentId: "core-12_13_0__sc-12icguw-4"
56
+ componentId: "core-12_15_0__sc-12icguw-4"
57
57
  })(["visibility:visible;position:absolute;left:50%;transform:translateX(-50%);margin-top:8px;"]);
58
58
  //# sourceMappingURL=Slider.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.styles.js","names":["styled","css","Typography","colors","TRACK_HEIGHT","THUMB_HEIGHT","applyStylesOnlyToFF","styles","getThumbStyles","white","blue50","props","isDragging","getTrackStyles","black","getTrackBackground","percent","concat","gray70","getTrackBackgroundDisabled","blue85","gray90","getThumbDisabledStyles","StyledContainer","div","withConfig","displayName","componentId","showLabel","StyledSlider","input","blue40","$percent","StyledIncrementOverlay","StyledIncrementContainer","StyledLabel"],"sources":["../../src/Slider/Slider.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { Typography } from '../Typography/Typography'\nimport { colors } from '../_styles/colors'\n\nconst TRACK_HEIGHT = 4\nconst THUMB_HEIGHT = 14\n\nfunction applyStylesOnlyToFF(styles: string) {\n return css`\n @supports (-moz-appearance: none) {\n ${styles}\n }\n `\n}\n\nconst getThumbStyles = css<{ isDragging: boolean }>`\n box-shadow: 0px 1px 4px rgba(40, 40, 40, 0.2), 0px 0px 3px rgba(0, 0, 0, 0.14),\n 0px 2px 3px rgba(0, 0, 0, 0.12);\n height: ${THUMB_HEIGHT}px;\n width: ${THUMB_HEIGHT}px;\n border-radius: 15px;\n background: ${colors.white};\n border: 2px solid ${colors.blue50};\n z-index: 3;\n ${(props) => (props.isDragging ? `cursor: grabbing` : `cursor: pointer`)};\n`\n\nconst getTrackStyles = css<{ isDragging: boolean }>`\n width: 100%;\n height: ${TRACK_HEIGHT}px;\n animate: 0.2s;\n border-radius: 1px;\n border: 0px solid ${colors.black};\n z-index: 1;\n ${(props) => (props.isDragging ? `cursor: grabbing` : `cursor: pointer`)};\n`\n\nconst getTrackBackground = (percent: number): string =>\n `background: linear-gradient(to right, ${colors.blue50} 0%, ${colors.blue50} ${percent}%, ${colors.gray70} ${percent}%, ${colors.gray70} 100%);`\n\nconst getTrackBackgroundDisabled = (percent: number): string =>\n `background: linear-gradient(to right, ${colors.blue85} 0%, ${colors.blue85} ${percent}%, ${colors.gray90} ${percent}%, ${colors.gray90} 100%);`\n\nconst getThumbDisabledStyles = css`\n cursor: not-allowed;\n border: 2px solid ${colors.blue85};\n`\n\nexport const StyledContainer = styled.div<{ showLabel?: boolean }>`\n position: relative;\n ${(props) => props.showLabel && 'padding-bottom: 10px'};\n`\n\nexport const StyledSlider = styled.input<{\n $percent: number\n ref: any\n isDragging: boolean\n}>`\n -webkit-appearance: none;\n margin: 0;\n padding-top: 5px;\n padding-bottom: 5px;\n width: 100%;\n border: 1px solid transparent;\n background-color: transparent;\n font-size: 12px;\n\n &:focus {\n outline: none;\n ${(props) =>\n props.isDragging\n ? `border: 1px solid transparent`\n : `border: 1px solid ${colors.blue40}`};\n padding-top: 5px;\n padding-bottom: 5px;\n border-radius: 2px;\n }\n\n &::-webkit-slider-runnable-track {\n ${getTrackStyles}\n ${(props) => getTrackBackground(props.$percent)}\n }\n &:disabled::-webkit-slider-runnable-track {\n cursor: not-allowed;\n ${(props) => getTrackBackgroundDisabled(props.$percent)}\n }\n\n &::-webkit-slider-thumb {\n ${getThumbStyles}\n -webkit-appearance: none;\n margin-top: -5px;\n }\n &:disabled::-webkit-slider-thumb {\n ${getThumbDisabledStyles}\n }\n\n &::-moz-range-track {\n ${getTrackStyles}\n ${(props) => getTrackBackground(props.$percent)}\n }\n &:disabled::-moz-range-track {\n cursor: not-allowed;\n ${(props) => getTrackBackgroundDisabled(props.$percent)}\n }\n\n &::-moz-range-thumb {\n ${getThumbStyles}\n height: 12px;\n width: 12px;\n }\n &:disabled::-moz-range-thumb {\n ${getThumbDisabledStyles}\n }\n\n &::-ms-track {\n ${getTrackStyles}\n height: ${THUMB_HEIGHT + 2}px;\n color: transparent;\n ${(props) => getTrackBackground(props.$percent)}\n }\n &:disabled::-ms-track {\n cursor: not-allowed;\n ${(props) => getTrackBackgroundDisabled(props.$percent)}\n }\n\n &::-ms-fill-lower {\n background: ${colors.blue50};\n border: 0px solid ${colors.black};\n border-radius: 2px;\n box-shadow: 1px 1px 1px ${colors.black};\n }\n\n &::-ms-fill-upper {\n background: ${colors.gray70};\n border: 0px solid ${colors.black};\n border-radius: 2px;\n box-shadow: 1px 1px 1px ${colors.black};\n }\n\n &::-ms-thumb {\n ${getThumbStyles}\n }\n &:disabled::-ms-thumb {\n ${getThumbDisabledStyles}\n }\n\n &:focus::-ms-fill-lower {\n background: ${colors.blue50};\n }\n\n &:focus::-ms-fill-upper {\n background: ${colors.gray70};\n }\n`\n\nexport const StyledIncrementOverlay = styled.div`\n position: relative;\n width: 0;\n &::before {\n content: '';\n height: ${TRACK_HEIGHT}px;\n width: 2px;\n background-color: white;\n display: block;\n }\n z-index: 2;\n`\n\nexport const StyledIncrementContainer = styled.div`\n position: absolute;\n display: flex;\n justify-content: space-between;\n top: 6px;\n ${applyStylesOnlyToFF(`\n top: 12px;\n `)}\n left: 5px;\n right: 5px;\n\n > :first-child {\n visibility: hidden;\n }\n\n > :last-child {\n visibility: hidden;\n }\n`\n\nexport const StyledLabel = styled(Typography)`\n visibility: visible;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 8px;\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,IAAMC,YAAY,GAAG,CAAC;AACtB,IAAMC,YAAY,GAAG,EAAE;AAEvB,SAASC,mBAAmBA,CAACC,MAAc,EAAE;EAC3C,OAAON,GAAG,6CAEJM,MAAM;AAGd;AAEA,IAAMC,cAAc,gBAAGP,GAAG,8MAGdI,YAAY,EACbA,YAAY,EAEPF,MAAM,CAACM,KAAK,EACNN,MAAM,CAACO,MAAM,EAE/B,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,UAAU,yCAAyC;AAAA,CAAC,CACzE;AAED,IAAMC,cAAc,gBAAGZ,GAAG,oGAEdG,YAAY,EAGFD,MAAM,CAACW,KAAK,EAE9B,UAACH,KAAK;EAAA,OAAMA,KAAK,CAACC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,GAIrDxB,cAAc,EAKdc,sBAAsB,EAItBT,cAAc,EACd,UAACF,KAAK;EAAA,OAAKI,kBAAkB,CAACJ,KAAK,CAACqB,QAAQ,CAAC;AAAA,GAI7C,UAACrB,KAAK;EAAA,OAAKQ,0BAA0B,CAACR,KAAK,CAACqB,QAAQ,CAAC;AAAA,GAIrDxB,cAAc,EAKdc,sBAAsB,EAItBT,cAAc,EACNR,YAAY,GAAG,CAAC,EAExB,UAACM,KAAK;EAAA,OAAKI,kBAAkB,CAACJ,KAAK,CAACqB,QAAQ,CAAC;AAAA,GAI7C,UAACrB,KAAK;EAAA,OAAKQ,0BAA0B,CAACR,KAAK,CAACqB,QAAQ,CAAC;AAAA,GAIzC7B,MAAM,CAACO,MAAM,EACPP,MAAM,CAACW,KAAK,EAENX,MAAM,CAACW,KAAK,EAIxBX,MAAM,CAACe,MAAM,EACPf,MAAM,CAACW,KAAK,EAENX,MAAM,CAACW,KAAK,EAIpCN,cAAc,EAGdc,sBAAsB,EAIVnB,MAAM,CAACO,MAAM,EAIbP,MAAM,CAACe,MAAM,CAE9B;AAED,OAAO,IAAMe,sBAAsB,gBAAGjC,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gIAKlCvB,YAAY,CAMzB;AAED,OAAO,IAAM8B,wBAAwB,gBAAGlC,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yKAK9CrB,mBAAmB,uBAEpB,CAAC,CAWH;AAED,OAAO,IAAM6B,WAAW,gBAAGnC,MAAM,CAACE,UAAU,CAAC,CAAAuB,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gGAM5C"}
1
+ {"version":3,"file":"Slider.styles.js","names":["styled","css","Typography","colors","TRACK_HEIGHT","THUMB_HEIGHT","applyStylesOnlyToFF","styles","getThumbStyles","white","blue50","props","$isDragging","getTrackStyles","black","getTrackBackground","percent","concat","gray70","getTrackBackgroundDisabled","blue85","gray90","getThumbDisabledStyles","StyledContainer","div","withConfig","displayName","componentId","$showLabel","StyledSlider","input","blue40","$percent","StyledIncrementOverlay","StyledIncrementContainer","StyledLabel"],"sources":["../../src/Slider/Slider.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { Typography } from '../Typography/Typography'\nimport { colors } from '../_styles/colors'\n\nconst TRACK_HEIGHT = 4\nconst THUMB_HEIGHT = 14\n\nfunction applyStylesOnlyToFF(styles: string) {\n return css`\n @supports (-moz-appearance: none) {\n ${styles}\n }\n `\n}\n\nconst getThumbStyles = css<{ $isDragging: boolean }>`\n box-shadow: 0px 1px 4px rgba(40, 40, 40, 0.2), 0px 0px 3px rgba(0, 0, 0, 0.14),\n 0px 2px 3px rgba(0, 0, 0, 0.12);\n height: ${THUMB_HEIGHT}px;\n width: ${THUMB_HEIGHT}px;\n border-radius: 15px;\n background: ${colors.white};\n border: 2px solid ${colors.blue50};\n z-index: 3;\n ${(props) => (props.$isDragging ? `cursor: grabbing` : `cursor: pointer`)};\n`\n\nconst getTrackStyles = css<{ $isDragging: boolean }>`\n width: 100%;\n height: ${TRACK_HEIGHT}px;\n animate: 0.2s;\n border-radius: 1px;\n border: 0px solid ${colors.black};\n z-index: 1;\n ${(props) => (props.$isDragging ? `cursor: grabbing` : `cursor: pointer`)};\n`\n\nconst getTrackBackground = (percent: number): string =>\n `background: linear-gradient(to right, ${colors.blue50} 0%, ${colors.blue50} ${percent}%, ${colors.gray70} ${percent}%, ${colors.gray70} 100%);`\n\nconst getTrackBackgroundDisabled = (percent: number): string =>\n `background: linear-gradient(to right, ${colors.blue85} 0%, ${colors.blue85} ${percent}%, ${colors.gray90} ${percent}%, ${colors.gray90} 100%);`\n\nconst getThumbDisabledStyles = css`\n cursor: not-allowed;\n border: 2px solid ${colors.blue85};\n`\n\nexport const StyledContainer = styled.div<{ $showLabel?: boolean }>`\n position: relative;\n ${(props) => props.$showLabel && 'padding-bottom: 10px'};\n`\n\nexport const StyledSlider = styled.input<{\n $percent: number\n ref: any\n $isDragging: boolean\n}>`\n -webkit-appearance: none;\n margin: 0;\n padding-top: 5px;\n padding-bottom: 5px;\n width: 100%;\n border: 1px solid transparent;\n background-color: transparent;\n font-size: 12px;\n\n &:focus {\n outline: none;\n ${(props) =>\n props.$isDragging\n ? `border: 1px solid transparent`\n : `border: 1px solid ${colors.blue40}`};\n padding-top: 5px;\n padding-bottom: 5px;\n border-radius: 2px;\n }\n\n &::-webkit-slider-runnable-track {\n ${getTrackStyles}\n ${(props) => getTrackBackground(props.$percent)}\n }\n &:disabled::-webkit-slider-runnable-track {\n cursor: not-allowed;\n ${(props) => getTrackBackgroundDisabled(props.$percent)}\n }\n\n &::-webkit-slider-thumb {\n ${getThumbStyles}\n -webkit-appearance: none;\n margin-top: -5px;\n }\n &:disabled::-webkit-slider-thumb {\n ${getThumbDisabledStyles}\n }\n\n &::-moz-range-track {\n ${getTrackStyles}\n ${(props) => getTrackBackground(props.$percent)}\n }\n &:disabled::-moz-range-track {\n cursor: not-allowed;\n ${(props) => getTrackBackgroundDisabled(props.$percent)}\n }\n\n &::-moz-range-thumb {\n ${getThumbStyles}\n height: 12px;\n width: 12px;\n }\n &:disabled::-moz-range-thumb {\n ${getThumbDisabledStyles}\n }\n\n &::-ms-track {\n ${getTrackStyles}\n height: ${THUMB_HEIGHT + 2}px;\n color: transparent;\n ${(props) => getTrackBackground(props.$percent)}\n }\n &:disabled::-ms-track {\n cursor: not-allowed;\n ${(props) => getTrackBackgroundDisabled(props.$percent)}\n }\n\n &::-ms-fill-lower {\n background: ${colors.blue50};\n border: 0px solid ${colors.black};\n border-radius: 2px;\n box-shadow: 1px 1px 1px ${colors.black};\n }\n\n &::-ms-fill-upper {\n background: ${colors.gray70};\n border: 0px solid ${colors.black};\n border-radius: 2px;\n box-shadow: 1px 1px 1px ${colors.black};\n }\n\n &::-ms-thumb {\n ${getThumbStyles}\n }\n &:disabled::-ms-thumb {\n ${getThumbDisabledStyles}\n }\n\n &:focus::-ms-fill-lower {\n background: ${colors.blue50};\n }\n\n &:focus::-ms-fill-upper {\n background: ${colors.gray70};\n }\n`\n\nexport const StyledIncrementOverlay = styled.div`\n position: relative;\n width: 0;\n &::before {\n content: '';\n height: ${TRACK_HEIGHT}px;\n width: 2px;\n background-color: white;\n display: block;\n }\n z-index: 2;\n`\n\nexport const StyledIncrementContainer = styled.div`\n position: absolute;\n display: flex;\n justify-content: space-between;\n top: 6px;\n ${applyStylesOnlyToFF(`\n top: 12px;\n `)}\n left: 5px;\n right: 5px;\n\n > :first-child {\n visibility: hidden;\n }\n\n > :last-child {\n visibility: hidden;\n }\n`\n\nexport const StyledLabel = styled(Typography)`\n visibility: visible;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 8px;\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,IAAMC,YAAY,GAAG,CAAC;AACtB,IAAMC,YAAY,GAAG,EAAE;AAEvB,SAASC,mBAAmBA,CAACC,MAAc,EAAE;EAC3C,OAAON,GAAG,6CAEJM,MAAM;AAGd;AAEA,IAAMC,cAAc,gBAAGP,GAAG,8MAGdI,YAAY,EACbA,YAAY,EAEPF,MAAM,CAACM,KAAK,EACNN,MAAM,CAACO,MAAM,EAE/B,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,WAAW,yCAAyC;AAAA,CAAC,CAC1E;AAED,IAAMC,cAAc,gBAAGZ,GAAG,oGAEdG,YAAY,EAGFD,MAAM,CAACW,KAAK,EAE9B,UAACH,KAAK;EAAA,OAAMA,KAAK,CAACC,WAAW,yCAAyC;AAAA,CAAC,CAC1E;AAED,IAAMG,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,OAAe;EAAA,gDAAAC,MAAA,CACAd,MAAM,CAACO,MAAM,WAAAO,MAAA,CAAQd,MAAM,CAACO,MAAM,OAA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AK,CAACqB,QAAQ,CAAC;AAAA,GAIrDxB,cAAc,EAKdc,sBAAsB,EAItBT,cAAc,EACNR,YAAY,GAAG,CAAC,EAExB,UAACM,KAAK;EAAA,OAAKI,kBAAkB,CAACJ,KAAK,CAACqB,QAAQ,CAAC;AAAA,GAI7C,UAACrB,KAAK;EAAA,OAAKQ,0BAA0B,CAACR,KAAK,CAACqB,QAAQ,CAAC;AAAA,GAIzC7B,MAAM,CAACO,MAAM,EACPP,MAAM,CAACW,KAAK,EAENX,MAAM,CAACW,KAAK,EAIxBX,MAAM,CAACe,MAAM,EACPf,MAAM,CAACW,KAAK,EAENX,MAAM,CAACW,KAAK,EAIpCN,cAAc,EAGdc,sBAAsB,EAIVnB,MAAM,CAACO,MAAM,EAIbP,MAAM,CAACe,MAAM,CAE9B;AAED,OAAO,IAAMe,sBAAsB,gBAAGjC,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gIAKlCvB,YAAY,CAMzB;AAED,OAAO,IAAM8B,wBAAwB,gBAAGlC,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yKAK9CrB,mBAAmB,uBAEpB,CAAC,CAWH;AAED,OAAO,IAAM6B,WAAW,gBAAGnC,MAAM,CAACE,UAAU,CAAC,CAAAuB,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gGAM5C"}
@@ -48,12 +48,12 @@ export var Spinner = /*#__PURE__*/React.forwardRef(function Spinner(_ref, ref) {
48
48
  }, /*#__PURE__*/React.createElement(StyledSpinnerSVG, {
49
49
  viewBox: "0 0 48 48",
50
50
  xmlns: "http://www.w3.org/2000/svg",
51
- mountTime: mountTime.current
51
+ $mountTime: mountTime.current
52
52
  }, /*#__PURE__*/React.createElement(StyledCircle, {
53
53
  cx: "24",
54
54
  cy: "24",
55
55
  r: radiusMap[size],
56
- mountTime: mountTime.current
56
+ $mountTime: mountTime.current
57
57
  })));
58
58
  if (!children) {
59
59
  return circle;
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","names":["React","StyledCircle","StyledSpinnerContainer","StyledSpinnerContainerWithLabel","StyledSpinnerOverlay","StyledSpinnerOverlayContainer","StyledSpinnerOverlayLabel","StyledSpinnerSVG","radiusMap","xs","sm","md","lg","defaultSpinnerSize","Spinner","forwardRef","_ref","ref","children","_ref$className","className","color","label","_ref$loading","loading","_ref$size","size","variant","_ref$centered","centered","props","_objectWithoutProperties","_excluded","mountTime","useRef","Date","now","circle","createElement","$color","$size","$variant","viewBox","xmlns","current","cx","cy","r","_extends","$loading","$centered","displayName"],"sources":["../../src/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledCircle,\n StyledSpinnerContainer,\n StyledSpinnerContainerWithLabel,\n StyledSpinnerOverlay,\n StyledSpinnerOverlayContainer,\n StyledSpinnerOverlayLabel,\n StyledSpinnerSVG,\n} from './Spinner.styles'\nimport type { SpinnerProps, SpinnerSize } from './Spinner.types'\n\nconst radiusMap: { [size in SpinnerSize]: number } = {\n xs: 18.5,\n sm: 18,\n md: 20,\n lg: 20.5,\n}\n\nexport const defaultSpinnerSize = 'lg'\n\n/**\n\n Spinners indicate a loading state on either a full page or smaller component,\n like a menu, select or button.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-spinner--demo)\n\n @see [Design Guidelines](https://design.procore.com/spinner)\n\n */\nexport const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n function Spinner(\n {\n children,\n className = '',\n color,\n label,\n loading = false,\n size = defaultSpinnerSize,\n variant,\n centered = false,\n ...props\n },\n ref\n ) {\n const mountTime = React.useRef(Date.now())\n\n const circle = (\n <StyledSpinnerContainer\n className={!children ? className : ''}\n $color={color}\n $size={size}\n $variant={variant}\n ref={ref}\n >\n <StyledSpinnerSVG\n viewBox=\"0 0 48 48\"\n xmlns=\"http://www.w3.org/2000/svg\"\n mountTime={mountTime.current}\n >\n <StyledCircle\n cx=\"24\"\n cy=\"24\"\n r={radiusMap[size]}\n mountTime={mountTime.current}\n />\n </StyledSpinnerSVG>\n </StyledSpinnerContainer>\n )\n\n if (!children) {\n return circle\n }\n\n return (\n <StyledSpinnerOverlayContainer\n $loading={loading}\n className={className}\n $centered={centered}\n {...props}\n >\n <StyledSpinnerOverlay />\n <StyledSpinnerContainerWithLabel>\n {circle}\n <StyledSpinnerOverlayLabel>{label}</StyledSpinnerOverlayLabel>\n </StyledSpinnerContainerWithLabel>\n {children}\n </StyledSpinnerOverlayContainer>\n )\n }\n)\n\nSpinner.displayName = 'Spinner'\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,YAAY,EACZC,sBAAsB,EACtBC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yBAAyB,EACzBC,gBAAgB,QACX,kBAAkB;AAGzB,IAAMC,SAA4C,GAAG;EACnDC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE;AACN,CAAC;AAED,OAAO,IAAMC,kBAAkB,GAAG,IAAI;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,OAAO,gBAAGd,KAAK,CAACe,UAAU,CACrC,SAASD,OAAOA,CAAAE,IAAA,EAYdC,GAAG,EACH;EAAA,IAXEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,cAAA,GAAAH,IAAA,CACRI,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IACdE,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,KAAK,GAAAN,IAAA,CAALM,KAAK;IAAAC,YAAA,GAAAP,IAAA,CACLQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,KAAK,GAAAA,YAAA;IAAAE,SAAA,GAAAT,IAAA,CACfU,IAAI;IAAJA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AM,eACPrC,KAAA,CAAAsC,aAAA,CAAChC,yBAAyB,QAAEgB,KAAiC,CAC9B,CAAC,EACjCJ,QAC4B,CAAC;AAEpC,CACF,CAAC;AAEDJ,OAAO,CAACqC,WAAW,GAAG,SAAS"}
1
+ {"version":3,"file":"Spinner.js","names":["React","StyledCircle","StyledSpinnerContainer","StyledSpinnerContainerWithLabel","StyledSpinnerOverlay","StyledSpinnerOverlayContainer","StyledSpinnerOverlayLabel","StyledSpinnerSVG","radiusMap","xs","sm","md","lg","defaultSpinnerSize","Spinner","forwardRef","_ref","ref","children","_ref$className","className","color","label","_ref$loading","loading","_ref$size","size","variant","_ref$centered","centered","props","_objectWithoutProperties","_excluded","mountTime","useRef","Date","now","circle","createElement","$color","$size","$variant","viewBox","xmlns","$mountTime","current","cx","cy","r","_extends","$loading","$centered","displayName"],"sources":["../../src/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledCircle,\n StyledSpinnerContainer,\n StyledSpinnerContainerWithLabel,\n StyledSpinnerOverlay,\n StyledSpinnerOverlayContainer,\n StyledSpinnerOverlayLabel,\n StyledSpinnerSVG,\n} from './Spinner.styles'\nimport type { SpinnerProps, SpinnerSize } from './Spinner.types'\n\nconst radiusMap: { [size in SpinnerSize]: number } = {\n xs: 18.5,\n sm: 18,\n md: 20,\n lg: 20.5,\n}\n\nexport const defaultSpinnerSize = 'lg'\n\n/**\n\n Spinners indicate a loading state on either a full page or smaller component,\n like a menu, select or button.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-spinner--demo)\n\n @see [Design Guidelines](https://design.procore.com/spinner)\n\n */\nexport const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n function Spinner(\n {\n children,\n className = '',\n color,\n label,\n loading = false,\n size = defaultSpinnerSize,\n variant,\n centered = false,\n ...props\n },\n ref\n ) {\n const mountTime = React.useRef(Date.now())\n\n const circle = (\n <StyledSpinnerContainer\n className={!children ? className : ''}\n $color={color}\n $size={size}\n $variant={variant}\n ref={ref}\n >\n <StyledSpinnerSVG\n viewBox=\"0 0 48 48\"\n xmlns=\"http://www.w3.org/2000/svg\"\n $mountTime={mountTime.current}\n >\n <StyledCircle\n cx=\"24\"\n cy=\"24\"\n r={radiusMap[size]}\n $mountTime={mountTime.current}\n />\n </StyledSpinnerSVG>\n </StyledSpinnerContainer>\n )\n\n if (!children) {\n return circle\n }\n\n return (\n <StyledSpinnerOverlayContainer\n $loading={loading}\n className={className}\n $centered={centered}\n {...props}\n >\n <StyledSpinnerOverlay />\n <StyledSpinnerContainerWithLabel>\n {circle}\n <StyledSpinnerOverlayLabel>{label}</StyledSpinnerOverlayLabel>\n </StyledSpinnerContainerWithLabel>\n {children}\n </StyledSpinnerOverlayContainer>\n )\n }\n)\n\nSpinner.displayName = 'Spinner'\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,YAAY,EACZC,sBAAsB,EACtBC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yBAAyB,EACzBC,gBAAgB,QACX,kBAAkB;AAGzB,IAAMC,SAA4C,GAAG;EACnDC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE;AACN,CAAC;AAED,OAAO,IAAMC,kBAAkB,GAAG,IAAI;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,OAAO,gBAAGd,KAAK,CAACe,UAAU,CACrC,SAASD,OAAOA,CAAAE,IAAA,EAYdC,GAAG,EACH;EAAA,IAXEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,cAAA,GAAAH,IAAA,CACRI,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IACdE,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,KAAK,GAAAN,IAAA,CAALM,KAAK;I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tB;EAAS,GAChBC,KAAK,gBAET9B,KAAA,CAAAsC,aAAA,CAAClC,oBAAoB,MAAE,CAAC,eACxBJ,KAAA,CAAAsC,aAAA,CAACnC,+BAA+B,QAC7BkC,MAAM,eACPrC,KAAA,CAAAsC,aAAA,CAAChC,yBAAyB,QAAEgB,KAAiC,CAC9B,CAAC,EACjCJ,QAC4B,CAAC;AAEpC,CACF,CAAC;AAEDJ,OAAO,CAACsC,WAAW,GAAG,SAAS"}
@@ -1,7 +1,7 @@
1
1
  import type { Color } from '../_styles/colors';
2
2
  import type { SpinnerSize, SpinnerVariant } from './Spinner.types';
3
3
  declare type SyncAnimationProps = {
4
- mountTime: number;
4
+ $mountTime: number;
5
5
  };
6
6
  export declare const StyledCircle: import("styled-components").StyledComponent<"circle", any, SyncAnimationProps, never>;
7
7
  export declare const spinnerDimensions: Record<SpinnerSize, number>;
@@ -10,9 +10,9 @@ var zOverlay = 2;
10
10
  var dash = /*#__PURE__*/keyframes(["0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}"]);
11
11
  export var StyledCircle = /*#__PURE__*/styled.circle.withConfig({
12
12
  displayName: "StyledCircle",
13
- componentId: "core-12_13_0__sc-1igww3-0"
13
+ componentId: "core-12_15_0__sc-1igww3-0"
14
14
  })(["animation:", " ", "ms ease-in-out ", "ms infinite;stroke-linecap:round;"], dash, duration, function (p) {
15
- var animationDelay = -(p.mountTime % duration);
15
+ var animationDelay = -(p.$mountTime % duration);
16
16
  return animationDelay;
17
17
  });
18
18
  export var spinnerDimensions = {
@@ -43,32 +43,32 @@ function getStrokeColor(_ref2) {
43
43
  }
44
44
  export var StyledSpinnerContainer = /*#__PURE__*/styled.div.withConfig({
45
45
  displayName: "StyledSpinnerContainer",
46
- componentId: "core-12_13_0__sc-1igww3-1"
46
+ componentId: "core-12_15_0__sc-1igww3-1"
47
47
  })(["border-radius:100%;box-sizing:border-box;display:block;flex-shrink:0;position:relative;", " ", "{", "}"], getHeightWidthStroke, StyledCircle, getStrokeColor);
48
48
  export var StyledSpinnerOverlayLabel = /*#__PURE__*/styled.span.withConfig({
49
49
  displayName: "StyledSpinnerOverlayLabel",
50
- componentId: "core-12_13_0__sc-1igww3-2"
50
+ componentId: "core-12_15_0__sc-1igww3-2"
51
51
  })(["", " color:", ";display:block;min-height:20px;padding-top:", "px;text-align:center;text-transform:uppercase;transition:opacity ", ";"], getTypographyIntent('body'), colors.gray15, spacing.md, transition);
52
52
  var rotate = /*#__PURE__*/keyframes(["to{transform:rotate(360deg);}"]);
53
53
  export var StyledSpinnerSVG = /*#__PURE__*/styled.svg.withConfig({
54
54
  displayName: "StyledSpinnerSVG",
55
- componentId: "core-12_13_0__sc-1igww3-3"
55
+ componentId: "core-12_15_0__sc-1igww3-3"
56
56
  })(["animation:", " ", "ms linear ", "ms infinite;fill:none;height:100%;left:0;margin:auto;position:absolute;right:0;top:0;width:100%;z-index:2;"], rotate, duration - durationOffset, function (p) {
57
- var animationDelay = -(p.mountTime % (duration - durationOffset));
57
+ var animationDelay = -(p.$mountTime % (duration - durationOffset));
58
58
  return animationDelay;
59
59
  });
60
60
  var startsWithNoInteraction = /*#__PURE__*/css(["opacity:0;pointer-events:none;transition:opacity ", ";"], transition);
61
61
  export var StyledSpinnerOverlay = /*#__PURE__*/styled.div.withConfig({
62
62
  displayName: "StyledSpinnerOverlay",
63
- componentId: "core-12_13_0__sc-1igww3-4"
63
+ componentId: "core-12_15_0__sc-1igww3-4"
64
64
  })(["", " background-color:", ";bottom:0;left:0;position:absolute;right:0;top:0;z-index:", ";"], startsWithNoInteraction, colors.white, zOverlay);
65
65
  export var StyledSpinnerContainerWithLabel = /*#__PURE__*/styled.div.withConfig({
66
66
  displayName: "StyledSpinnerContainerWithLabel",
67
- componentId: "core-12_13_0__sc-1igww3-5"
67
+ componentId: "core-12_15_0__sc-1igww3-5"
68
68
  })(["", " align-items:center;display:flex;flex-direction:column;height:100%;max-height:400px;justify-content:center;position:absolute;top:0;width:100%;z-index:", ";"], startsWithNoInteraction, zContainer);
69
69
  export var StyledSpinnerOverlayContainer = /*#__PURE__*/styled.div.withConfig({
70
70
  displayName: "StyledSpinnerOverlayContainer",
71
- componentId: "core-12_13_0__sc-1igww3-6"
71
+ componentId: "core-12_15_0__sc-1igww3-6"
72
72
  })(["min-height:150px;position:relative;", " ", ""], function (_ref3) {
73
73
  var $loading = _ref3.$loading;
74
74
  if ($loading) {
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.styles.js","names":["styled","css","keyframes","getTypographyIntent","colors","spacing","duration","durationOffset","transition","zContainer","zOverlay","dash","StyledCircle","circle","withConfig","displayName","componentId","p","animationDelay","mountTime","spinnerDimensions","xs","md","sm","lg","xl","spinnerStroke","getHeightWidthStroke","_ref","$size","dimension","strokeWidth","getStrokeColor","_ref2","$color","$variant","white","gray60","StyledSpinnerContainer","div","StyledSpinnerOverlayLabel","span","gray15","rotate","StyledSpinnerSVG","svg","startsWithNoInteraction","StyledSpinnerOverlay","StyledSpinnerContainerWithLabel","StyledSpinnerOverlayContainer","_ref3","$loading","_ref4","$centered"],"sources":["../../src/Spinner/Spinner.styles.ts"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport type { Color } from '../_styles/colors'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\nimport type { SpinnerSize, SpinnerVariant } from './Spinner.types'\n\nconst duration = 1500\n\nconst durationOffset = 500\n\nconst transition = '0.5s ease'\n\nconst zContainer = 3\n\nconst zOverlay = 2\n\nconst dash = keyframes`\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n`\n\ntype SyncAnimationProps = {\n mountTime: number\n}\n\nexport const StyledCircle = styled.circle<SyncAnimationProps>`\n animation: ${dash} ${duration}ms ease-in-out\n ${(p) => {\n const animationDelay = -(p.mountTime % duration)\n return animationDelay\n }}ms\n infinite;\n stroke-linecap: round;\n`\n\nexport const spinnerDimensions: Record<SpinnerSize, number> = {\n xs: spacing.md,\n sm: spacing.lg,\n md: spacing.xl,\n lg: 48,\n}\n\nconst spinnerStroke: Record<SpinnerSize, number> = {\n xs: 10,\n sm: 8,\n md: 8,\n lg: 6,\n}\n\nfunction getHeightWidthStroke({ $size }: { $size: SpinnerSize }) {\n const dimension = spinnerDimensions[$size]\n const strokeWidth = spinnerStroke[$size]\n\n return css`\n height: ${dimension}px;\n width: ${dimension}px;\n stroke-width: ${strokeWidth}px;\n `\n}\n\nfunction getStrokeColor({\n $color,\n $variant,\n}: {\n $color?: Color\n $variant?: SpinnerVariant\n}) {\n if ($color) {\n return css`\n stroke: ${colors[$color]};\n `\n }\n\n return css`\n stroke: ${$variant && $variant === 'light' ? colors.white : colors.gray60};\n `\n}\n\ninterface StyledSpinnerContainerProps {\n $color?: Color\n $size: SpinnerSize\n $variant?: SpinnerVariant\n}\n\nexport const StyledSpinnerContainer = styled.div<StyledSpinnerContainerProps>`\n border-radius: 100%;\n box-sizing: border-box;\n display: block;\n flex-shrink: 0;\n position: relative;\n\n ${getHeightWidthStroke}\n\n ${StyledCircle} {\n ${getStrokeColor}\n }\n`\n\nexport const StyledSpinnerOverlayLabel = styled.span`\n ${getTypographyIntent('body')}\n color: ${colors.gray15};\n\n display: block;\n min-height: 20px;\n padding-top: ${spacing.md}px;\n text-align: center;\n text-transform: uppercase;\n transition: opacity ${transition};\n`\n\nconst rotate = keyframes`\n to {\n transform: rotate(360deg);\n }\n`\n\nexport const StyledSpinnerSVG = styled.svg<SyncAnimationProps>`\n animation: ${rotate} ${duration - durationOffset}ms linear\n ${(p) => {\n const animationDelay = -(p.mountTime % (duration - durationOffset))\n return animationDelay\n }}ms\n infinite;\n fill: none;\n height: 100%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 2;\n`\n\nconst startsWithNoInteraction = css`\n opacity: 0;\n pointer-events: none;\n transition: opacity ${transition};\n`\n\nexport const StyledSpinnerOverlay = styled.div`\n ${startsWithNoInteraction}\n\n background-color: ${colors.white};\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: ${zOverlay};\n`\n\nexport const StyledSpinnerContainerWithLabel = styled.div`\n ${startsWithNoInteraction}\n\n align-items: center;\n display: flex;\n flex-direction: column;\n height: 100%;\n max-height: 400px;\n justify-content: center;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: ${zContainer};\n`\n\nexport const StyledSpinnerOverlayContainer = styled.div<{\n $loading: boolean\n $centered: boolean\n}>`\n min-height: 150px;\n position: relative;\n\n ${({ $loading }) => {\n if ($loading) {\n return css`\n ${StyledSpinnerContainerWithLabel}, ${StyledSpinnerOverlay} {\n opacity: 1;\n pointer-events: auto;\n }\n `\n }\n }}\n\n ${({ $centered }) => {\n if ($centered) {\n return css`\n ${StyledSpinnerContainerWithLabel} {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n `\n }\n }}\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAC1D,SAASC,mBAAmB,QAAQ,iCAAiC;AAErE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,IAAMC,QAAQ,GAAG,IAAI;AAErB,IAAMC,cAAc,GAAG,GAAG;AAE1B,IAAMC,UAAU,GAAG,WAAW;AAE9B,IAAMC,UAAU,GAAG,CAAC;AAEpB,IAAMC,QAAQ,GAAG,CAAC;AAElB,IAAMC,IAAI,gBAAGT,SAAS,6JAarB;AAMD,OAAO,IAAMU,YAAY,gBAAGZ,MAAM,CAACa,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gFAC1BL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,KAAA,CAATC,SAAS;EACZ,IAAIA,SAAS,EAAE;IACb,OAAOpD,GAAG,kEACN+C,+BAA+B;EAMrC;AACF,CAAC,CACF"}
1
+ {"version":3,"file":"Spinner.styles.js","names":["styled","css","keyframes","getTypographyIntent","colors","spacing","duration","durationOffset","transition","zContainer","zOverlay","dash","StyledCircle","circle","withConfig","displayName","componentId","p","animationDelay","$mountTime","spinnerDimensions","xs","md","sm","lg","xl","spinnerStroke","getHeightWidthStroke","_ref","$size","dimension","strokeWidth","getStrokeColor","_ref2","$color","$variant","white","gray60","StyledSpinnerContainer","div","StyledSpinnerOverlayLabel","span","gray15","rotate","StyledSpinnerSVG","svg","startsWithNoInteraction","StyledSpinnerOverlay","StyledSpinnerContainerWithLabel","StyledSpinnerOverlayContainer","_ref3","$loading","_ref4","$centered"],"sources":["../../src/Spinner/Spinner.styles.ts"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport type { Color } from '../_styles/colors'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\nimport type { SpinnerSize, SpinnerVariant } from './Spinner.types'\n\nconst duration = 1500\n\nconst durationOffset = 500\n\nconst transition = '0.5s ease'\n\nconst zContainer = 3\n\nconst zOverlay = 2\n\nconst dash = keyframes`\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n`\n\ntype SyncAnimationProps = {\n $mountTime: number\n}\n\nexport const StyledCircle = styled.circle<SyncAnimationProps>`\n animation: ${dash} ${duration}ms ease-in-out\n ${(p) => {\n const animationDelay = -(p.$mountTime % duration)\n return animationDelay\n }}ms\n infinite;\n stroke-linecap: round;\n`\n\nexport const spinnerDimensions: Record<SpinnerSize, number> = {\n xs: spacing.md,\n sm: spacing.lg,\n md: spacing.xl,\n lg: 48,\n}\n\nconst spinnerStroke: Record<SpinnerSize, number> = {\n xs: 10,\n sm: 8,\n md: 8,\n lg: 6,\n}\n\nfunction getHeightWidthStroke({ $size }: { $size: SpinnerSize }) {\n const dimension = spinnerDimensions[$size]\n const strokeWidth = spinnerStroke[$size]\n\n return css`\n height: ${dimension}px;\n width: ${dimension}px;\n stroke-width: ${strokeWidth}px;\n `\n}\n\nfunction getStrokeColor({\n $color,\n $variant,\n}: {\n $color?: Color\n $variant?: SpinnerVariant\n}) {\n if ($color) {\n return css`\n stroke: ${colors[$color]};\n `\n }\n\n return css`\n stroke: ${$variant && $variant === 'light' ? colors.white : colors.gray60};\n `\n}\n\ninterface StyledSpinnerContainerProps {\n $color?: Color\n $size: SpinnerSize\n $variant?: SpinnerVariant\n}\n\nexport const StyledSpinnerContainer = styled.div<StyledSpinnerContainerProps>`\n border-radius: 100%;\n box-sizing: border-box;\n display: block;\n flex-shrink: 0;\n position: relative;\n\n ${getHeightWidthStroke}\n\n ${StyledCircle} {\n ${getStrokeColor}\n }\n`\n\nexport const StyledSpinnerOverlayLabel = styled.span`\n ${getTypographyIntent('body')}\n color: ${colors.gray15};\n\n display: block;\n min-height: 20px;\n padding-top: ${spacing.md}px;\n text-align: center;\n text-transform: uppercase;\n transition: opacity ${transition};\n`\n\nconst rotate = keyframes`\n to {\n transform: rotate(360deg);\n }\n`\n\nexport const StyledSpinnerSVG = styled.svg<SyncAnimationProps>`\n animation: ${rotate} ${duration - durationOffset}ms linear\n ${(p) => {\n const animationDelay = -(p.$mountTime % (duration - durationOffset))\n return animationDelay\n }}ms\n infinite;\n fill: none;\n height: 100%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 2;\n`\n\nconst startsWithNoInteraction = css`\n opacity: 0;\n pointer-events: none;\n transition: opacity ${transition};\n`\n\nexport const StyledSpinnerOverlay = styled.div`\n ${startsWithNoInteraction}\n\n background-color: ${colors.white};\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: ${zOverlay};\n`\n\nexport const StyledSpinnerContainerWithLabel = styled.div`\n ${startsWithNoInteraction}\n\n align-items: center;\n display: flex;\n flex-direction: column;\n height: 100%;\n max-height: 400px;\n justify-content: center;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: ${zContainer};\n`\n\nexport const StyledSpinnerOverlayContainer = styled.div<{\n $loading: boolean\n $centered: boolean\n}>`\n min-height: 150px;\n position: relative;\n\n ${({ $loading }) => {\n if ($loading) {\n return css`\n ${StyledSpinnerContainerWithLabel}, ${StyledSpinnerOverlay} {\n opacity: 1;\n pointer-events: auto;\n }\n `\n }\n }}\n\n ${({ $centered }) => {\n if ($centered) {\n return css`\n ${StyledSpinnerContainerWithLabel} {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n `\n }\n }}\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAC1D,SAASC,mBAAmB,QAAQ,iCAAiC;AAErE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,IAAMC,QAAQ,GAAG,IAAI;AAErB,IAAMC,cAAc,GAAG,GAAG;AAE1B,IAAMC,UAAU,GAAG,WAAW;AAE9B,IAAMC,UAAU,GAAG,CAAC;AAEpB,IAAMC,QAAQ,GAAG,CAAC;AAElB,IAAMC,IAAI,gBAAGT,SAAS,6JAarB;AAMD,OAAO,IAAMU,YAAY,gBAAGZ,MAAM,CAACa,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gFAC1BL,IAAI,EAAIL,QAAQ,EACzB,UAACW,CAAC,EAAK;EACP,IAAMC,cAAc,GAAG,EAAED,CAAC,CAACE,UAAU,GAAGb,QAAQ,CAAC;EACjD,OAAOY,cAAc;AACvB,CAAC,CAGJ;AAED,OAAO,IAAME,iBAA8C,GAAG;EAC5DC,EAAE,EAAEhB,OAAO,CAACi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ends Props {
6
6
  /**
7
- * <span>
8
- * Spinner color, one of the{' '}
9
- * <Link to="/web/style/colors/#hsl-palette">HSL Palette</Link> css
10
- * strings
11
- * </span>
7
+ * Spinner color, one of the
8
+ * [HSL Palette](/web/style/colors/#hsl-palette) css strings
12
9
  * @since 10.19.0
13
10
  */
14
11
  color?: Color;
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.types.js","names":[],"sources":["../../src/Spinner/Spinner.types.ts"],"sourcesContent":["import type { Color } from '../_styles/colors'\nimport type { Props } from '../_utils/types'\n\nexport type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg'\n\nexport type SpinnerVariant = '' | 'light'\n\nexport interface SpinnerProps extends Props {\n /**\n * <span>\n * Spinner color, one of the{' '}\n * <Link to=\"/web/style/colors/#hsl-palette\">HSL Palette</Link> css\n * strings\n * </span>\n * @since 10.19.0\n */\n color?: Color\n /**\n * The spinner label, only displayed when used as an overlay\n * @since 10.19.0\n */\n label?: string\n\n /**\n * The spinner will show if loading is true\n * @since 10.19.0\n */\n loading?: boolean\n\n /**\n * The size of the spinner\n * @since 10.19.0\n */\n size?: SpinnerSize\n /**\n * @deprecated \"variant\" prop will be removed in a future version.\n * Use \"color\" prop instead to set a spinner's color.\n * @deprecatedSince 11\n * @since 10.19.0\n */\n variant?: SpinnerVariant\n /**\n * Spinner option to be centered.\n * Use this prop if you need to center the spinner regardless of the height of its children.\n * @since 11.3.0\n */\n centered?: boolean\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Spinner.types.js","names":[],"sources":["../../src/Spinner/Spinner.types.ts"],"sourcesContent":["import type { Color } from '../_styles/colors'\nimport type { Props } from '../_utils/types'\n\nexport type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg'\n\nexport type SpinnerVariant = '' | 'light'\n\nexport interface SpinnerProps extends Props {\n /**\n * Spinner color, one of the\n * [HSL Palette](/web/style/colors/#hsl-palette) css strings\n * @since 10.19.0\n */\n color?: Color\n /**\n * The spinner label, only displayed when used as an overlay\n * @since 10.19.0\n */\n label?: string\n\n /**\n * The spinner will show if loading is true\n * @since 10.19.0\n */\n loading?: boolean\n\n /**\n * The size of the spinner\n * @since 10.19.0\n */\n size?: SpinnerSize\n /**\n * @deprecated \"variant\" prop will be removed in a future version.\n * Use \"color\" prop instead to set a spinner's color.\n * @deprecatedSince 11\n * @since 10.19.0\n */\n variant?: SpinnerVariant\n /**\n * Spinner option to be centered.\n * Use this prop if you need to center the spinner regardless of the height of its children.\n * @since 11.3.0\n */\n centered?: boolean\n}\n"],"mappings":""}