@procore/core-react 11.24.4 → 11.25.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 (207) hide show
  1. package/dist/Avatar/Avatar.styles.js +5 -5
  2. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  3. package/dist/Badge/Badge.styles.js +2 -2
  4. package/dist/Banner/Banner.styles.js +10 -10
  5. package/dist/Box/Box.styles.js +1 -1
  6. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  7. package/dist/Button/Button.styles.js +5 -5
  8. package/dist/Calendar/Calendar.styles.js +8 -8
  9. package/dist/Card/Card.styles.js +1 -1
  10. package/dist/Checkbox/Checkbox.d.ts +1 -1
  11. package/dist/Checkbox/Checkbox.js +26 -6
  12. package/dist/Checkbox/Checkbox.js.map +1 -1
  13. package/dist/Checkbox/Checkbox.styles.d.ts +6 -2
  14. package/dist/Checkbox/Checkbox.styles.js +21 -17
  15. package/dist/Checkbox/Checkbox.styles.js.map +1 -1
  16. package/dist/Checkbox/Checkbox.types.d.ts +10 -0
  17. package/dist/Checkbox/Checkbox.types.js.map +1 -1
  18. package/dist/ContactItem/ContactItem.styles.js +5 -5
  19. package/dist/Content/Content.styles.js +2 -2
  20. package/dist/DateInput/DateInput.styles.js +6 -6
  21. package/dist/DetailPage/DetailPage.styles.js +7 -7
  22. package/dist/Dropdown/Dropdown.styles.js +3 -3
  23. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  24. package/dist/Dropzone/Dropzone.js +1 -1
  25. package/dist/Dropzone/Dropzone.styles.js +9 -9
  26. package/dist/EmptyState/EmptyState.styles.js +6 -6
  27. package/dist/Field/Field.styles.js +3 -3
  28. package/dist/FileList/FileList.styles.js +4 -4
  29. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  30. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  31. package/dist/FileSelect/FileSelect.styles.js +2 -2
  32. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  33. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  34. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  35. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  36. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  37. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  38. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  39. package/dist/FileToken/FileToken.styles.js +4 -4
  40. package/dist/FilterToken/FilterToken.styles.js +2 -2
  41. package/dist/FlexList/FlexList.styles.js +1 -1
  42. package/dist/Form/Form.d.ts +1 -1
  43. package/dist/Form/Form.js +67 -35
  44. package/dist/Form/Form.js.map +1 -1
  45. package/dist/Form/Form.styles.d.ts +8 -4
  46. package/dist/Form/Form.styles.js +49 -35
  47. package/dist/Form/Form.styles.js.map +1 -1
  48. package/dist/Form/Form.types.d.ts +28 -1
  49. package/dist/Form/Form.types.js.map +1 -1
  50. package/dist/Form/FormFieldTooltip.d.ts +4 -0
  51. package/dist/Form/FormFieldTooltip.js +18 -0
  52. package/dist/Form/FormFieldTooltip.js.map +1 -0
  53. package/dist/Form/stories/util.d.ts +2 -0
  54. package/dist/Form/stories/util.js +61 -17
  55. package/dist/Form/stories/util.js.map +1 -1
  56. package/dist/Grid/Grid.styles.js +2 -2
  57. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  58. package/dist/Input/Input.styles.js +1 -1
  59. package/dist/Link/Link.styles.js +1 -1
  60. package/dist/ListPage/ListPage.styles.js +8 -8
  61. package/dist/Loader/Loader.styles.js +2 -2
  62. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  63. package/dist/Modal/Modal.styles.js +13 -13
  64. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  65. package/dist/NextMenu/NextMenu.styles.js +3 -3
  66. package/dist/Notation/Notation.js +1 -1
  67. package/dist/NumberInput/NumberInput.styles.js +7 -7
  68. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  69. package/dist/PageLayout/PageLayout.styles.js +13 -13
  70. package/dist/Pagination/Pagination.styles.js +5 -5
  71. package/dist/Panel/Panel.styles.js +11 -11
  72. package/dist/Pill/Pill.styles.js +2 -2
  73. package/dist/PillSelect/PillSelect.styles.js +4 -4
  74. package/dist/Popover/Popover.styles.js +2 -2
  75. package/dist/Portal/Portal.styles.js +1 -1
  76. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  77. package/dist/RadioButton/RadioButton.styles.js +3 -3
  78. package/dist/Required/Required.styles.js +6 -4
  79. package/dist/Required/Required.styles.js.map +1 -1
  80. package/dist/Search/Search.styles.js +5 -5
  81. package/dist/Section/Section.styles.js +6 -6
  82. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  83. package/dist/Select/Select.styles.js +7 -7
  84. package/dist/Semantic/Semantic.styles.js +8 -8
  85. package/dist/Sidebar/Sidebar.styles.js +7 -7
  86. package/dist/Slider/Slider.styles.js +5 -5
  87. package/dist/Spinner/Spinner.styles.js +7 -7
  88. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  89. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  90. package/dist/Switch/Switch.styles.js +4 -4
  91. package/dist/Table/Table.styles.js +28 -28
  92. package/dist/TableShelf/TableShelf.styles.js +5 -5
  93. package/dist/Tabs/Tabs.styles.js +8 -8
  94. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  95. package/dist/TextArea/TextArea.styles.js +1 -1
  96. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  97. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  98. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  99. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  100. package/dist/Tile/Tile.styles.js +8 -8
  101. package/dist/Title/Title.styles.js +7 -7
  102. package/dist/Toast/Toast.styles.js +3 -3
  103. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  104. package/dist/Token/Token.styles.js +3 -3
  105. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  106. package/dist/Tooltip/Tooltip.styles.js +2 -2
  107. package/dist/Tree/Tree.hooks.js +58 -36
  108. package/dist/Tree/Tree.hooks.js.map +1 -1
  109. package/dist/Tree/Tree.js +1 -1
  110. package/dist/Tree/Tree.js.map +1 -1
  111. package/dist/Tree/Tree.styles.js +9 -9
  112. package/dist/Tree/Tree.types.d.ts +7 -3
  113. package/dist/Tree/Tree.types.js.map +1 -1
  114. package/dist/Typeahead/Typeahead.styles.js +3 -3
  115. package/dist/Typography/Typography.styles.js +1 -1
  116. package/dist/Typography/Typography.table.story.js +2 -2
  117. package/dist/_hooks/I18n.d.ts +386 -1
  118. package/dist/_hooks/useSet.js +3 -3
  119. package/dist/_hooks/useSet.js.map +1 -1
  120. package/dist/_locales/de-DE.json +3 -1
  121. package/dist/_locales/en-AU.json +3 -1
  122. package/dist/_locales/en-CA.json +3 -1
  123. package/dist/_locales/en-GB.json +3 -1
  124. package/dist/_locales/en.json +3 -1
  125. package/dist/_locales/es-ES.json +3 -1
  126. package/dist/_locales/es.json +3 -1
  127. package/dist/_locales/fr-CA.json +3 -1
  128. package/dist/_locales/fr-FR.json +3 -1
  129. package/dist/_locales/is-IS.json +3 -1
  130. package/dist/_locales/ja-JP.json +360 -1
  131. package/dist/_locales/pt-BR.json +3 -1
  132. package/dist/_locales/th-TH.json +3 -1
  133. package/dist/_locales/zh-SG.json +3 -1
  134. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  135. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
  136. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  137. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  138. package/dist/_typedoc/Box/Box.types.json +68 -68
  139. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  140. package/dist/_typedoc/Button/Button.types.json +11 -11
  141. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  142. package/dist/_typedoc/Card/Card.types.json +6 -6
  143. package/dist/_typedoc/Checkbox/Checkbox.types.json +27 -7
  144. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  145. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  146. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  147. package/dist/_typedoc/DetailPage/DetailPage.types.json +4 -4
  148. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  149. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
  150. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  151. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  152. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  153. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  154. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  155. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  156. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +11 -11
  157. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  158. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  159. package/dist/_typedoc/Form/Form.types.json +938 -698
  160. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  161. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  162. package/dist/_typedoc/Input/Input.types.json +2 -2
  163. package/dist/_typedoc/Link/Link.types.json +4 -4
  164. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  165. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  166. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  167. package/dist/_typedoc/Modal/Modal.types.json +41 -41
  168. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  169. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  170. package/dist/_typedoc/NumberInput/NumberInput.types.json +38 -38
  171. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +30 -30
  172. package/dist/_typedoc/PageLayout/PageLayout.types.json +22 -22
  173. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  174. package/dist/_typedoc/Panel/Panel.types.json +27 -27
  175. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  176. package/dist/_typedoc/PillSelect/PillSelect.types.json +46 -46
  177. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  178. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  179. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  180. package/dist/_typedoc/Required/Required.types.json +5 -5
  181. package/dist/_typedoc/Search/Search.types.json +18 -18
  182. package/dist/_typedoc/Section/Section.types.json +14 -14
  183. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  184. package/dist/_typedoc/Select/Select.types.json +55 -55
  185. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  186. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  187. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  188. package/dist/_typedoc/Table/Table.types.json +96 -96
  189. package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
  190. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  191. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  192. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  193. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  194. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  195. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  196. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  197. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  198. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  199. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  200. package/dist/_typedoc/Token/Token.types.json +4 -4
  201. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  202. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  203. package/dist/_typedoc/Tree/Tree.types.json +94 -94
  204. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  205. package/dist/_typedoc/Typography/Typography.types.json +8 -8
  206. package/dist/_typedoc/_utils/types.json +3 -3
  207. package/package.json +1 -1
@@ -24,26 +24,26 @@ var iconSize = {
24
24
  };
25
25
  export var StyledAvatarOverlay = /*#__PURE__*/styled.div.withConfig({
26
26
  displayName: "StyledAvatarOverlay",
27
- componentId: "core-11_24_4__sc-7q2ydl-0"
27
+ componentId: "core-11_25_0__sc-7q2ydl-0"
28
28
  })(["width:100%;height:100%;position:absolute;top:0;left:0;border-radius:100%;opacity:0;"]);
29
29
  export var StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
30
30
  displayName: "StyledIconContainer",
31
- componentId: "core-11_24_4__sc-7q2ydl-1"
31
+ componentId: "core-11_25_0__sc-7q2ydl-1"
32
32
  })(["display:inline-flex;"]);
33
33
  export var StyledLabelContainer = /*#__PURE__*/styled.div.withConfig({
34
34
  displayName: "StyledLabelContainer",
35
- componentId: "core-11_24_4__sc-7q2ydl-2"
35
+ componentId: "core-11_25_0__sc-7q2ydl-2"
36
36
  })(["text-transform:uppercase;"]);
37
37
  export var StyledPortraitContainer = /*#__PURE__*/styled.div.withConfig({
38
38
  displayName: "StyledPortraitContainer",
39
- componentId: "core-11_24_4__sc-7q2ydl-3"
39
+ componentId: "core-11_25_0__sc-7q2ydl-3"
40
40
  })(["background-color:", ";background-position:center;background-repeat:no-repeat;background-size:cover;height:100%;width:100%;", ""], colors.white, function (_ref) {
41
41
  var $imageUrl = _ref.$imageUrl;
42
42
  return css(["background-image:url(", ");"], $imageUrl);
43
43
  });
44
44
  export var StyledAvatarContainer = /*#__PURE__*/styled.div.withConfig({
45
45
  displayName: "StyledAvatarContainer",
46
- componentId: "core-11_24_4__sc-7q2ydl-4"
46
+ componentId: "core-11_25_0__sc-7q2ydl-4"
47
47
  })(["display:inline-flex;justify-content:center;align-items:center;border-radius:100%;overflow:hidden;position:relative;cursor:default;color:", ";background-color:", ";text-decoration:none;a:has(> &){text-decoration:none;}&:focus{", "}a:focus:has(> &){", " border-radius:100%;}", " ", ";"], colors.white, colors.gray30, getGapOutlineFocus, getGapOutlineFocus, function (_ref2) {
48
48
  var _ref2$$size = _ref2.$size,
49
49
  $size = _ref2$$size === void 0 ? 'md' : _ref2$$size;
@@ -7,32 +7,32 @@ import { spacing } from '../_styles/spacing';
7
7
  var maxModalWidth = 528;
8
8
  var StyledBaseAvatar = /*#__PURE__*/styled(Avatar).withConfig({
9
9
  displayName: "StyledBaseAvatar",
10
- componentId: "core-11_24_4__sc-ft72hu-0"
10
+ componentId: "core-11_25_0__sc-ft72hu-0"
11
11
  })(["border-color:", ";border-style:solid;border-width:1px;&:hover{z-index:1;}&[role='img']:focus{outline:none;}"], colors.white);
12
12
  export var StyledAvatar = /*#__PURE__*/styled(StyledBaseAvatar).withConfig({
13
13
  displayName: "StyledAvatar",
14
- componentId: "core-11_24_4__sc-ft72hu-1"
14
+ componentId: "core-11_25_0__sc-ft72hu-1"
15
15
  })(["background-color:", ";"], function (props) {
16
16
  return colors[props.$color];
17
17
  });
18
18
  export var StyledContactItems = /*#__PURE__*/styled.div.withConfig({
19
19
  displayName: "StyledContactItems",
20
- componentId: "core-11_24_4__sc-ft72hu-2"
20
+ componentId: "core-11_25_0__sc-ft72hu-2"
21
21
  })(["padding-top:", "px;padding-bottom:", "px;padding-left:", "px;"], spacing.sm, spacing.sm, spacing.xs);
22
22
  export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "StyledWrapper",
24
- componentId: "core-11_24_4__sc-ft72hu-3"
24
+ componentId: "core-11_25_0__sc-ft72hu-3"
25
25
  })(["display:flex;", " + ", "{margin-left:-", "px;}"], StyledAvatar, StyledAvatar, spacing.sm);
26
26
  export var StyledViewAllWrapper = /*#__PURE__*/styled.div.withConfig({
27
27
  displayName: "StyledViewAllWrapper",
28
- componentId: "core-11_24_4__sc-ft72hu-4"
28
+ componentId: "core-11_25_0__sc-ft72hu-4"
29
29
  })(["display:flex;margin-left:", "px;margin-bottom:", "px;"], spacing.md, spacing.lg);
30
30
  export var StyledModalBody = /*#__PURE__*/styled(Modal.Body).withConfig({
31
31
  displayName: "StyledModalBody",
32
- componentId: "core-11_24_4__sc-ft72hu-5"
32
+ componentId: "core-11_25_0__sc-ft72hu-5"
33
33
  })(["max-width:", "px;"], maxModalWidth);
34
34
  export var StyledContactItem = /*#__PURE__*/styled(ContactItem).withConfig({
35
35
  displayName: "StyledContactItem",
36
- componentId: "core-11_24_4__sc-ft72hu-6"
36
+ componentId: "core-11_25_0__sc-ft72hu-6"
37
37
  })(["flex-shrink:0;"]);
38
38
  //# sourceMappingURL=AvatarStack.styles.js.map
@@ -1,10 +1,10 @@
1
1
  import styled from 'styled-components';
2
2
  export var StyledBadge = /*#__PURE__*/styled.div.withConfig({
3
3
  displayName: "StyledBadge",
4
- componentId: "core-11_24_4__sc-rpertu-0"
4
+ componentId: "core-11_25_0__sc-rpertu-0"
5
5
  })(["display:inline-block;position:relative;"]);
6
6
  export var StyledBadgeLabel = /*#__PURE__*/styled.span.withConfig({
7
7
  displayName: "StyledBadgeLabel",
8
- componentId: "core-11_24_4__sc-rpertu-1"
8
+ componentId: "core-11_25_0__sc-rpertu-1"
9
9
  })(["bottom:100%;position:absolute;right:0;transform:translateX(50%) translateY(50%);"]);
10
10
  //# sourceMappingURL=Badge.styles.js.map
@@ -44,7 +44,7 @@ var expandContent = function expandContent(maxHeight) {
44
44
  };
45
45
  export var StyledBannerContainer = /*#__PURE__*/styled.div.withConfig({
46
46
  displayName: "StyledBannerContainer",
47
- componentId: "core-11_24_4__sc-149wm7c-0"
47
+ componentId: "core-11_25_0__sc-149wm7c-0"
48
48
  })(["align-items:center;border-left:", "px solid;border-radius:", "px;color:", ";display:flex;justify-content:space-between;min-height:52px;padding:0 ", "px;", " ", " ", ""], bannerLeft, borderRadius.md, colors.gray15, spacing.lg, bannerShadow, function (_ref) {
49
49
  var variant = _ref.variant;
50
50
  var _bannerVariantColors$ = bannerVariantColors[variant],
@@ -57,15 +57,15 @@ export var StyledBannerContainer = /*#__PURE__*/styled.div.withConfig({
57
57
  });
58
58
  export var StyledContent = /*#__PURE__*/styled.div.withConfig({
59
59
  displayName: "StyledContent",
60
- componentId: "core-11_24_4__sc-149wm7c-1"
60
+ componentId: "core-11_25_0__sc-149wm7c-1"
61
61
  })(["align-self:center;margin:", "px ", "px;width:100%;"], spacing.sm, spacing.lg);
62
62
  export var StyledExpandableContentContainer = /*#__PURE__*/styled(Flex).withConfig({
63
63
  displayName: "StyledExpandableContentContainer",
64
- componentId: "core-11_24_4__sc-149wm7c-2"
64
+ componentId: "core-11_25_0__sc-149wm7c-2"
65
65
  })(["color:", ";min-height:52px;padding:0 ", "px;position:relative;z-index:1;", ""], colors.gray15, spacing.lg, bannerShadow);
66
66
  export var StyledExpandableContent = /*#__PURE__*/styled(Flex).withConfig({
67
67
  displayName: "StyledExpandableContent",
68
- componentId: "core-11_24_4__sc-149wm7c-3"
68
+ componentId: "core-11_25_0__sc-149wm7c-3"
69
69
  })(["animation-duration:450ms;animation-fill-mode:forwards;animation-timing-function:ease-out;background-color:", ";box-sizing:border-box;font-size:14px;font-weight:500;letter-spacing:0.25px;line-height:20px;overflow-y:auto;padding:0 ", "px;position:relative;z-index:0;", " ", ""], colors.white, spacing.xl * 2 + spacing.sm, function (_ref3) {
70
70
  var isOverflowingY = _ref3.isOverflowingY;
71
71
  return isOverflowingY && focusable;
@@ -75,23 +75,23 @@ export var StyledExpandableContent = /*#__PURE__*/styled(Flex).withConfig({
75
75
  });
76
76
  export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
77
77
  displayName: "StyledTitle",
78
- componentId: "core-11_24_4__sc-149wm7c-4"
78
+ componentId: "core-11_25_0__sc-149wm7c-4"
79
79
  })(["", " color:", ";font-weight:", ";"], getTypographyIntent('body'), colors.gray15, typographyWeights.semibold);
80
80
  export var StyledBody = /*#__PURE__*/styled.div.withConfig({
81
81
  displayName: "StyledBody",
82
- componentId: "core-11_24_4__sc-149wm7c-5"
82
+ componentId: "core-11_25_0__sc-149wm7c-5"
83
83
  })(["", " color:", ";"], getTypographyIntent('body'), colors.gray15);
84
84
  export var StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
85
85
  displayName: "StyledIconContainer",
86
- componentId: "core-11_24_4__sc-149wm7c-6"
86
+ componentId: "core-11_25_0__sc-149wm7c-6"
87
87
  })(["flex:0 0 auto;margin:", "px 0;"], spacing.lg);
88
88
  export var StyledActionsTrigger = /*#__PURE__*/styled(DropdownButton).withConfig({
89
89
  displayName: "StyledActionsTrigger",
90
- componentId: "core-11_24_4__sc-149wm7c-7"
90
+ componentId: "core-11_25_0__sc-149wm7c-7"
91
91
  })(["flex-shrink:0;& + ", "{margin-left:", "px;}"], StyledButton, spacing.sm);
92
92
  export var StyledAction = /*#__PURE__*/styled.div.withConfig({
93
93
  displayName: "StyledAction",
94
- componentId: "core-11_24_4__sc-149wm7c-8"
94
+ componentId: "core-11_25_0__sc-149wm7c-8"
95
95
  })(["margin:", "px 0;& + ", ",& + ", "{margin-left:", "px;}", "{background:rgba(0,0,0,0.05);color:", ";&:hover{background:", ";color:", ";}}"], spacing.sm, StyledButton, StyledActionsTrigger, spacing.sm, StyledButton, colors.gray15, colors.gray85, colors.gray15);
96
96
  function getMiniBannerIconColor(_ref5) {
97
97
  var variant = _ref5.variant;
@@ -99,6 +99,6 @@ function getMiniBannerIconColor(_ref5) {
99
99
  }
100
100
  export var StyledMiniBannerContainer = /*#__PURE__*/styled.div.withConfig({
101
101
  displayName: "StyledMiniBannerContainer",
102
- componentId: "core-11_24_4__sc-149wm7c-9"
102
+ componentId: "core-11_25_0__sc-149wm7c-9"
103
103
  })(["align-items:center;background-color:", ";display:flex;justify-content:space-between;padding:0 ", "px;", " ", " & ", "{margin:", "px;}"], colors.gray96, spacing.md, getTypographyIntent('small'), getMiniBannerIconColor, StyledContent, spacing.sm);
104
104
  //# sourceMappingURL=Banner.styles.js.map
@@ -21,7 +21,7 @@ function sizeToPx(size) {
21
21
  }
22
22
  export var StyledBox = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "StyledBox",
24
- componentId: "core-11_24_4__sc-fgsy0p-0"
24
+ componentId: "core-11_25_0__sc-fgsy0p-0"
25
25
  })(["", " ", ""], function (_ref) {
26
26
  var $as = _ref.$as;
27
27
  if ($as === 'ol' || $as === 'ul') {
@@ -4,19 +4,19 @@ import { colors } from '../_styles/colors';
4
4
  import { spacing } from '../_styles/spacing';
5
5
  export var StyledContainer = /*#__PURE__*/styled.nav.withConfig({
6
6
  displayName: "StyledContainer",
7
- componentId: "core-11_24_4__sc-1q6nqfz-0"
7
+ componentId: "core-11_25_0__sc-1q6nqfz-0"
8
8
  })(["color:", ";display:flex;align-items:center;a,a:hover{display:inline-flex;text-decoration:none;}"], colors.gray50);
9
9
  export var StyledList = /*#__PURE__*/styled.ol.withConfig({
10
10
  displayName: "StyledList",
11
- componentId: "core-11_24_4__sc-1q6nqfz-1"
11
+ componentId: "core-11_25_0__sc-1q6nqfz-1"
12
12
  })(["display:flex;margin:0;padding-left:0;"]);
13
13
  export var StyledSeparator = /*#__PURE__*/styled.div.withConfig({
14
14
  displayName: "StyledSeparator",
15
- componentId: "core-11_24_4__sc-1q6nqfz-2"
15
+ componentId: "core-11_25_0__sc-1q6nqfz-2"
16
16
  })(["align-items:center;display:inline-flex;justify-content:center;margin:0px ", "px;"], spacing.xs);
17
17
  export var StyledCrumb = /*#__PURE__*/styled.li.withConfig({
18
18
  displayName: "StyledCrumb",
19
- componentId: "core-11_24_4__sc-1q6nqfz-3"
19
+ componentId: "core-11_25_0__sc-1q6nqfz-3"
20
20
  })(["", " align-items:center;color:", ";display:inline-flex;min-height:24px;text-decoration:none;&:hover{cursor:", ";text-decoration:", ";}> a{color:", ";", "}", ""], getTypographyIntent('body'), colors.gray45, function (_ref) {
21
21
  var active = _ref.active;
22
22
  return active ? 'default' : 'pointer';
@@ -84,11 +84,11 @@ function getColors(loading, variant) {
84
84
  }
85
85
  export var StyledContent = /*#__PURE__*/styled.span.withConfig({
86
86
  displayName: "StyledContent",
87
- componentId: "core-11_24_4__sc-c5bhwh-0"
87
+ componentId: "core-11_25_0__sc-c5bhwh-0"
88
88
  })(["align-items:center;display:flex;overflow:hidden;"]);
89
89
  export var StyledSpinner = /*#__PURE__*/styled(Spinner).withConfig({
90
90
  displayName: "StyledSpinner",
91
- componentId: "core-11_24_4__sc-c5bhwh-1"
91
+ componentId: "core-11_25_0__sc-c5bhwh-1"
92
92
  })(["box-sizing:border-box;display:none;position:absolute;transform:translateZ(0);@media ", "{left:50%;top:50%;", "}"], mediaIE11Hack, function (_ref) {
93
93
  var size = _ref.size;
94
94
  var margin = -1 * (spinnerDimensions[size !== null && size !== void 0 ? size : defaultSpinnerSize] / 2);
@@ -96,14 +96,14 @@ export var StyledSpinner = /*#__PURE__*/styled(Spinner).withConfig({
96
96
  });
97
97
  export var StyledLabel = /*#__PURE__*/styled.span.withConfig({
98
98
  displayName: "StyledLabel",
99
- componentId: "core-11_24_4__sc-c5bhwh-2"
99
+ componentId: "core-11_25_0__sc-c5bhwh-2"
100
100
  })(["overflow:hidden;padding:0 6px;text-overflow:ellipsis;white-space:nowrap;& + span{padding-left:0;}"]);
101
101
  function getButtonStyles(block, disabled, loading, size, variant) {
102
102
  return css(["", " ", " ", " align-items:center;border-radius:", "px;border:0;box-sizing:border-box;cursor:pointer;display:inline-flex;flex-direction:row;flex-shrink:0;font-family:inherit;font-weight:", ";height:", "px;justify-content:center;margin:0;overflow:hidden;padding:0 ", "px;position:relative;pointer-events:", ";text-overflow:ellipsis;user-select:", ";vertical-align:middle;white-space:nowrap;width:", ";[data-icon-prop='true']{pointer-events:none;height:", "px;width:", "px;}", ""], getTypographyIntent(typographySizes[size]), focusable, getColors(loading, variant), borderRadius.md, typographyWeights.semibold, heights[size], paddingX[size], disabled || loading ? 'none' : 'inherit', disabled || loading ? 'none' : 'inherit', block && '100%', size === 'sm' ? 16 : 24, size === 'sm' ? 16 : 24, loading && css(["", "{pointer-events:none;visibility:hidden;}", "{display:block;}"], StyledContent, StyledSpinner));
103
103
  }
104
104
  export var StyledButton = /*#__PURE__*/styled.button.withConfig({
105
105
  displayName: "StyledButton",
106
- componentId: "core-11_24_4__sc-c5bhwh-3"
106
+ componentId: "core-11_25_0__sc-c5bhwh-3"
107
107
  })(["", ""], function (_ref2) {
108
108
  var $block = _ref2.$block,
109
109
  disabled = _ref2.disabled,
@@ -114,7 +114,7 @@ export var StyledButton = /*#__PURE__*/styled.button.withConfig({
114
114
  });
115
115
  export var StyledLinkButton = /*#__PURE__*/styled.a.withConfig({
116
116
  displayName: "StyledLinkButton",
117
- componentId: "core-11_24_4__sc-c5bhwh-4"
117
+ componentId: "core-11_25_0__sc-c5bhwh-4"
118
118
  })(["text-decoration:none;", ""], function (_ref3) {
119
119
  var $block = _ref3.$block,
120
120
  $disabled = _ref3.$disabled,
@@ -8,31 +8,31 @@ var cellSize = 36; // TODO one-off size
8
8
 
9
9
  export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
10
10
  displayName: "StyledContainer",
11
- componentId: "core-11_24_4__sc-1kkl86t-0"
11
+ componentId: "core-11_25_0__sc-1kkl86t-0"
12
12
  })(["", ";display:inline-flex;flex-direction:column;padding:", "px ", "px ", "px;"], getTypographyIntent('small'), spacing.lg, spacing.md, spacing.md);
13
13
  export var StyledPaginator = /*#__PURE__*/styled(Button).withConfig({
14
14
  displayName: "StyledPaginator",
15
- componentId: "core-11_24_4__sc-1kkl86t-1"
15
+ componentId: "core-11_25_0__sc-1kkl86t-1"
16
16
  })(["flex:0 0 auto;"]);
17
17
  export var StyledSelect = /*#__PURE__*/styled.div.withConfig({
18
18
  displayName: "StyledSelect",
19
- componentId: "core-11_24_4__sc-1kkl86t-2"
19
+ componentId: "core-11_25_0__sc-1kkl86t-2"
20
20
  })(["display:inline-flex;flex:1 1 0;margin-left:", "px;> div{font-size:12px;}"], spacing.sm);
21
21
  export var StyledNavigation = /*#__PURE__*/styled.div.withConfig({
22
22
  displayName: "StyledNavigation",
23
- componentId: "core-11_24_4__sc-1kkl86t-3"
23
+ componentId: "core-11_25_0__sc-1kkl86t-3"
24
24
  })(["display:inline-flex;margin-bottom:", "px;", " + ", ",", " + ", "{margin-left:", "px;}"], spacing.sm, StyledPaginator, StyledSelect, StyledSelect, StyledPaginator, spacing.sm);
25
25
  export var StyledCell = /*#__PURE__*/styled.div.withConfig({
26
26
  displayName: "StyledCell",
27
- componentId: "core-11_24_4__sc-1kkl86t-4"
27
+ componentId: "core-11_25_0__sc-1kkl86t-4"
28
28
  })(["align-items:center;display:inline-flex;height:", "px;justify-content:center;width:", "px;"], cellSize, cellSize);
29
29
  export var StyledDayHeaderCell = /*#__PURE__*/styled(StyledCell).withConfig({
30
30
  displayName: "StyledDayHeaderCell",
31
- componentId: "core-11_24_4__sc-1kkl86t-5"
31
+ componentId: "core-11_25_0__sc-1kkl86t-5"
32
32
  })(["cursor:default;font-weight:", ";"], typographyWeights.semibold);
33
33
  export var StyledDayCell = /*#__PURE__*/styled(StyledCell).withConfig({
34
34
  displayName: "StyledDayCell",
35
- componentId: "core-11_24_4__sc-1kkl86t-6"
35
+ componentId: "core-11_25_0__sc-1kkl86t-6"
36
36
  })(["", ""], function (_ref) {
37
37
  var _ref$$disabled = _ref.$disabled,
38
38
  $disabled = _ref$$disabled === void 0 ? false : _ref$$disabled,
@@ -55,6 +55,6 @@ export var StyledDayCell = /*#__PURE__*/styled(StyledCell).withConfig({
55
55
  });
56
56
  export var StyledWeekRow = /*#__PURE__*/styled.div.withConfig({
57
57
  displayName: "StyledWeekRow",
58
- componentId: "core-11_24_4__sc-1kkl86t-7"
58
+ componentId: "core-11_25_0__sc-1kkl86t-7"
59
59
  })(["display:inline-flex;padding-bottom:2px;user-select:none;&:last-child{padding-bottom:0;}", "{&:first-child{border-top-left-radius:", "px;border-bottom-left-radius:", "px;}&:last-child{border-top-right-radius:", "px;border-bottom-right-radius:", "px;}}"], StyledCell, borderRadius.md, borderRadius.md, borderRadius.md, borderRadius.md);
60
60
  //# sourceMappingURL=Calendar.styles.js.map
@@ -4,7 +4,7 @@ import { colors } from '../_styles/colors';
4
4
  import { getShadow } from '../_styles/shadows';
5
5
  export var StyledCardContainer = /*#__PURE__*/styled.div.withConfig({
6
6
  displayName: "StyledCardContainer",
7
- componentId: "core-11_24_4__sc-2fii7b-0"
7
+ componentId: "core-11_25_0__sc-2fii7b-0"
8
8
  })(["background-color:", ";border-radius:", "px;transition:box-shadow 0.2s ease-in-out;", " ", ""], colors.white, borderRadius.md, function (_ref) {
9
9
  var $level = _ref.$level,
10
10
  $shadowStrength = _ref.$shadowStrength;
@@ -21,4 +21,4 @@ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & R
21
21
  *
22
22
  * @since 11.3.0
23
23
  */
24
- export declare const FakeCheckbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLDivElement>>;
24
+ export declare const FakeCheckbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "tooltip" | "requiredMark"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,10 +1,19 @@
1
- var _excluded = ["checked", "children", "className", "error", "indeterminate", "style"],
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["checked", "children", "className", "error", "indeterminate", "style", "requiredMark", "tooltip"],
2
3
  _excluded2 = ["checked", "children", "className", "disabled", "error", "indeterminate", "style"];
3
4
  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); }
5
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
10
  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; }
5
11
  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; }
12
+ import { useLabel } from '@react-aria/label';
6
13
  import React from 'react';
7
- import { StyledCheckboxContainer, StyledCheckboxInput, StyledCheckboxLabel, StyledFakeCheckboxInput, StyledFakeCheckboxLabel } from './Checkbox.styles';
14
+ import { FormFieldTooltip } from '../Form/FormFieldTooltip';
15
+ import { Required } from '../Required/Required';
16
+ import { StyledCheckboxContainer, StyledCheckboxInput, StyledCheckboxLabel, StyledCheckboxLabelWrapper, StyledFakeCheckboxInput, StyledFakeCheckboxLabel } from './Checkbox.styles';
8
17
  /**
9
18
 
10
19
 
@@ -28,18 +37,30 @@ export var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_ref, ref)
28
37
  _ref$indeterminate = _ref.indeterminate,
29
38
  indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
30
39
  style = _ref.style,
40
+ requiredMark = _ref.requiredMark,
41
+ tooltip = _ref.tooltip,
31
42
  props = _objectWithoutProperties(_ref, _excluded);
43
+ var _useLabel = useLabel(_objectSpread(_objectSpread({}, props), {}, {
44
+ // to always generate labelProps, so checkbox icon can be clickable for empty labels
45
+ label: true
46
+ })),
47
+ fieldProps = _useLabel.fieldProps,
48
+ labelProps = _useLabel.labelProps;
32
49
  return /*#__PURE__*/React.createElement(StyledCheckboxContainer, {
33
50
  className: className,
34
51
  style: style
35
- }, /*#__PURE__*/React.createElement(StyledCheckboxInput, _extends({}, props, {
52
+ }, /*#__PURE__*/React.createElement(StyledCheckboxInput, _extends({}, props, fieldProps, {
36
53
  "aria-checked": indeterminate ? 'mixed' : checked,
37
54
  type: "checkbox",
38
55
  checked: checked,
39
56
  $error: error,
40
57
  $indeterminate: indeterminate,
41
58
  ref: ref
42
- })), /*#__PURE__*/React.createElement(StyledCheckboxLabel, null, children));
59
+ })), /*#__PURE__*/React.createElement(StyledCheckboxLabelWrapper, {
60
+ $hasLabel: Boolean(children)
61
+ }, /*#__PURE__*/React.createElement(StyledCheckboxLabel, labelProps, children, requiredMark && /*#__PURE__*/React.createElement(Required, null)), tooltip && /*#__PURE__*/React.createElement(FormFieldTooltip, {
62
+ overlay: tooltip
63
+ })));
43
64
  });
44
65
  Checkbox.displayName = 'Checkbox';
45
66
 
@@ -65,8 +86,7 @@ export var FakeCheckbox = /*#__PURE__*/React.forwardRef(function FakeCheckbox(_r
65
86
  props = _objectWithoutProperties(_ref2, _excluded2);
66
87
  return /*#__PURE__*/React.createElement(StyledCheckboxContainer, {
67
88
  className: className,
68
- style: style,
69
- as: "div"
89
+ style: style
70
90
  }, /*#__PURE__*/React.createElement(StyledFakeCheckboxInput, _extends({}, props, {
71
91
  $checked: checked,
72
92
  $disabled: disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["React","StyledCheckboxContainer","StyledCheckboxInput","StyledCheckboxLabel","StyledFakeCheckboxInput","StyledFakeCheckboxLabel","Checkbox","forwardRef","_ref","ref","checked","children","className","_ref$error","error","_ref$indeterminate","indeterminate","style","props","_objectWithoutProperties","_excluded","createElement","_extends","type","$error","$indeterminate","displayName","FakeCheckbox","_ref2","_ref2$checked","_ref2$disabled","disabled","_ref2$error","_ref2$indeterminate","_excluded2","as","$checked","$disabled"],"sources":["../../src/Checkbox/Checkbox.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledCheckboxContainer,\n StyledCheckboxInput,\n StyledCheckboxLabel,\n StyledFakeCheckboxInput,\n StyledFakeCheckboxLabel,\n} from './Checkbox.styles'\nimport type { CheckboxProps } from './Checkbox.types'\n\n/**\n\n\n We use checkboxes to provide users with the ability to either select or\n deselect multiple values from a list of options (e.g. items on list pages),\n or to select or deselect a single option (e.g. settings on configure pages).\n\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-checkbox--demo)\n\n @see [Design Guidelines](https://design.procore.com/checkbox)\n\n */\nexport const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n function Checkbox(\n {\n checked,\n children,\n className,\n error = false,\n indeterminate = false,\n style,\n ...props\n },\n ref\n ) {\n return (\n <StyledCheckboxContainer className={className} style={style}>\n <StyledCheckboxInput\n {...props}\n aria-checked={indeterminate ? 'mixed' : checked}\n type=\"checkbox\"\n checked={checked}\n $error={error}\n $indeterminate={indeterminate}\n ref={ref}\n />\n <StyledCheckboxLabel>{children}</StyledCheckboxLabel>\n </StyledCheckboxContainer>\n )\n }\n)\n\nCheckbox.displayName = 'Checkbox'\n\n/**\n * This checkbox was created to be used as a non-interactive Checkbox component\n * for VoiceOver inside MenuImperative.CheckboxItem.\n *\n * @since 11.3.0\n */\n\nexport const FakeCheckbox = React.forwardRef<HTMLDivElement, CheckboxProps>(\n function FakeCheckbox(\n {\n checked = false,\n children,\n className,\n disabled = false,\n error = false,\n indeterminate = false,\n style,\n ...props\n },\n ref\n ) {\n return (\n <StyledCheckboxContainer className={className} style={style} as=\"div\">\n <StyledFakeCheckboxInput\n {...props}\n $checked={checked}\n $disabled={disabled}\n $error={error}\n $indeterminate={indeterminate}\n ref={ref}\n />\n <StyledFakeCheckboxLabel $checked={checked} $disabled={disabled}>\n {children}\n </StyledFakeCheckboxLabel>\n </StyledCheckboxContainer>\n )\n }\n)\n\nFakeCheckbox.displayName = 'FakeCheckbox'\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,uBAAuB,EACvBC,mBAAmB,EACnBC,mBAAmB,EACnBC,uBAAuB,EACvBC,uBAAuB,QAClB,mBAAmB;AAG1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,QAAQ,gBAAGN,KAAK,CAACO,UAAU,CACtC,SAASD,QAAQA,CAAAE,IAAA,EAUfC,GAAG,EACH;EAAA,IATEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,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AJ,KAAA,CAChBd,KAAK;IAALA,KAAK,GAAAkB,WAAA,cAAG,KAAK,GAAAA,WAAA;IAAAC,mBAAA,GAAAL,KAAA,CACbZ,aAAa;IAAbA,aAAa,GAAAiB,mBAAA,cAAG,KAAK,GAAAA,mBAAA;IACrBhB,KAAK,GAAAW,KAAA,CAALX,KAAK;IACFC,KAAK,GAAAC,wBAAA,CAAAS,KAAA,EAAAM,UAAA;EAIV,oBACElC,KAAA,CAAAqB,aAAA,CAACpB,uBAAuB;IAACW,SAAS,EAAEA,SAAU;IAACK,KAAK,EAAEA,KAAM;IAACkB,EAAE,EAAC;EAAK,gBACnEnC,KAAA,CAAAqB,aAAA,CAACjB,uBAAuB,EAAAkB,QAAA,KAClBJ,KAAK;IACTkB,QAAQ,EAAE1B,OAAQ;IAClB2B,SAAS,EAAEN,QAAS;IACpBP,MAAM,EAAEV,KAAM;IACdW,cAAc,EAAET,aAAc;IAC9BP,GAAG,EAAEA;EAAI,EACV,CAAC,eACFT,KAAA,CAAAqB,aAAA,CAAChB,uBAAuB;IAAC+B,QAAQ,EAAE1B,OAAQ;IAAC2B,SAAS,EAAEN;EAAS,GAC7DpB,QACsB,CACF,CAAC;AAE9B,CACF,CAAC;AAEDgB,YAAY,CAACD,WAAW,GAAG,cAAc"}
1
+ {"version":3,"file":"Checkbox.js","names":["useLabel","React","FormFieldTooltip","Required","StyledCheckboxContainer","StyledCheckboxInput","StyledCheckboxLabel","StyledCheckboxLabelWrapper","StyledFakeCheckboxInput","StyledFakeCheckboxLabel","Checkbox","forwardRef","_ref","ref","checked","children","className","_ref$error","error","_ref$indeterminate","indeterminate","style","requiredMark","tooltip","props","_objectWithoutProperties","_excluded","_useLabel","_objectSpread","label","fieldProps","labelProps","createElement","_extends","type","$error","$indeterminate","$hasLabel","Boolean","overlay","displayName","FakeCheckbox","_ref2","_ref2$checked","_ref2$disabled","disabled","_ref2$error","_ref2$indeterminate","_excluded2","$checked","$disabled"],"sources":["../../src/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useLabel } from '@react-aria/label'\nimport React from 'react'\nimport { FormFieldTooltip } from '../Form/FormFieldTooltip'\nimport { Required } from '../Required/Required'\nimport {\n StyledCheckboxContainer,\n StyledCheckboxInput,\n StyledCheckboxLabel,\n StyledCheckboxLabelWrapper,\n StyledFakeCheckboxInput,\n StyledFakeCheckboxLabel,\n} from './Checkbox.styles'\nimport type { CheckboxProps } from './Checkbox.types'\n\n/**\n\n\n We use checkboxes to provide users with the ability to either select or\n deselect multiple values from a list of options (e.g. items on list pages),\n or to select or deselect a single option (e.g. settings on configure pages).\n\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-checkbox--demo)\n\n @see [Design Guidelines](https://design.procore.com/checkbox)\n\n */\nexport const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n function Checkbox(\n {\n checked,\n children,\n className,\n error = false,\n indeterminate = false,\n style,\n requiredMark,\n tooltip,\n ...props\n },\n ref\n ) {\n const { fieldProps, labelProps } = useLabel({\n ...props,\n // to always generate labelProps, so checkbox icon can be clickable for empty labels\n label: true,\n })\n return (\n <StyledCheckboxContainer className={className} style={style}>\n <StyledCheckboxInput\n {...props}\n {...fieldProps}\n aria-checked={indeterminate ? 'mixed' : checked}\n type=\"checkbox\"\n checked={checked}\n $error={error}\n $indeterminate={indeterminate}\n ref={ref}\n />\n <StyledCheckboxLabelWrapper $hasLabel={Boolean(children)}>\n <StyledCheckboxLabel {...labelProps}>\n {children}\n {requiredMark && <Required />}\n </StyledCheckboxLabel>\n {tooltip && <FormFieldTooltip overlay={tooltip} />}\n </StyledCheckboxLabelWrapper>\n </StyledCheckboxContainer>\n )\n }\n)\n\nCheckbox.displayName = 'Checkbox'\n\n/**\n * This checkbox was created to be used as a non-interactive Checkbox component\n * for VoiceOver inside MenuImperative.CheckboxItem.\n *\n * @since 11.3.0\n */\n\nexport const FakeCheckbox = React.forwardRef<\n HTMLDivElement,\n Omit<CheckboxProps, 'requiredMark' | 'tooltip'>\n>(function FakeCheckbox(\n {\n checked = false,\n children,\n className,\n disabled = false,\n error = false,\n indeterminate = false,\n style,\n ...props\n },\n ref\n) {\n return (\n <StyledCheckboxContainer className={className} style={style}>\n <StyledFakeCheckboxInput\n {...props}\n $checked={checked}\n $disabled={disabled}\n $error={error}\n $indeterminate={indeterminate}\n ref={ref}\n />\n <StyledFakeCheckboxLabel $checked={checked} $disabled={disabled}>\n {children}\n </StyledFakeCheckboxLabel>\n </StyledCheckboxContainer>\n )\n})\n\nFakeCheckbox.displayName = 'FakeCheckbox'\n"],"mappings":";;;;;;;;;;;AAAA,SAASA,QAAQ,QAAQ,mBAAmB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,SACEC,uBAAuB,EACvBC,mBAAmB,EACnBC,mBAAmB,EACnBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,uBAAuB,QAClB,mBAAmB;AAG1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,QAAQ,gBAAGT,KAAK,CAACU,UAAU,CACtC,SAASD,QAAQA,CAAAE,IAAA,EAYfC,GAAG,EACH;EAAA,IAXEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAAC,UAAA,GAAAL,IAAA,CACTM,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,KAAK,GAAAA,UAAA;IAAAE,kBAAA,GAAAP,IAAA,CACbQ,aAAa;IAAbA,aAAa,GAAAD,kBAAA,cAAG,KAAK,GAAAA,kBAAA;IACrBE,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACZC,OAAO,GAAAX,IAAA,CAAPW,OAAO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5B,OAAO;IAAPA,OAAO,GAAA6B,aAAA,cAAG,KAAK,GAAAA,aAAA;IACf5B,QAAQ,GAAA2B,KAAA,CAAR3B,QAAQ;IACRC,SAAS,GAAA0B,KAAA,CAAT1B,SAAS;IAAA4B,cAAA,GAAAF,KAAA,CACTG,QAAQ;IAARA,QAAQ,GAAAD,cAAA,cAAG,KAAK,GAAAA,cAAA;IAAAE,WAAA,GAAAJ,KAAA,CAChBxB,KAAK;IAALA,KAAK,GAAA4B,WAAA,cAAG,KAAK,GAAAA,WAAA;IAAAC,mBAAA,GAAAL,KAAA,CACbtB,aAAa;IAAbA,aAAa,GAAA2B,mBAAA,cAAG,KAAK,GAAAA,mBAAA;IACrB1B,KAAK,GAAAqB,KAAA,CAALrB,KAAK;IACFG,KAAK,GAAAC,wBAAA,CAAAiB,KAAA,EAAAM,UAAA;EAIV,oBACE/C,KAAA,CAAA+B,aAAA,CAAC5B,uBAAuB;IAACY,SAAS,EAAEA,SAAU;IAACK,KAAK,EAAEA;EAAM,gBAC1DpB,KAAA,CAAA+B,aAAA,CAACxB,uBAAuB,EAAAyB,QAAA,KAClBT,KAAK;IACTyB,QAAQ,EAAEnC,OAAQ;IAClBoC,SAAS,EAAEL,QAAS;IACpBV,MAAM,EAAEjB,KAAM;IACdkB,cAAc,EAAEhB,aAAc;IAC9BP,GAAG,EAAEA;EAAI,EACV,CAAC,eACFZ,KAAA,CAAA+B,aAAA,CAACvB,uBAAuB;IAACwC,QAAQ,EAAEnC,OAAQ;IAACoC,SAAS,EAAEL;EAAS,GAC7D9B,QACsB,CACF,CAAC;AAE9B,CAAC,CAAC;AAEF0B,YAAY,CAACD,WAAW,GAAG,cAAc"}
@@ -1,8 +1,12 @@
1
1
  export declare const dataQa: {
2
2
  focused: string;
3
3
  };
4
- export declare const StyledCheckboxContainer: import("styled-components").StyledComponent<"label", any, {}, never>;
5
- export declare const StyledCheckboxLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
4
+ export declare const checkboxSize = 20;
5
+ export declare const StyledCheckboxContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const StyledCheckboxLabelWrapper: import("styled-components").StyledComponent<"div", any, {
7
+ $hasLabel: boolean;
8
+ }, never>;
9
+ export declare const StyledCheckboxLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
6
10
  export declare const StyledCheckboxInput: import("styled-components").StyledComponent<"input", any, {
7
11
  $error: boolean;
8
12
  $indeterminate: boolean;
@@ -6,11 +6,11 @@ import { spacing } from '../_styles/spacing';
6
6
  export var dataQa = {
7
7
  focused: 'core-checkbox-focused'
8
8
  };
9
- export var StyledCheckboxContainer = /*#__PURE__*/styled.label.withConfig({
9
+ export var checkboxSize = 20;
10
+ export var StyledCheckboxContainer = /*#__PURE__*/styled.div.withConfig({
10
11
  displayName: "StyledCheckboxContainer",
11
- componentId: "core-11_24_4__sc-u63tye-0"
12
+ componentId: "core-11_25_0__sc-u63tye-0"
12
13
  })(["color:", ";display:block;position:relative;& + &{margin-top:", "px;}"], colors.gray15, spacing.md);
13
- var checkboxSize = 20;
14
14
  function StyledIndeterminate() {
15
15
  return css(["background-color:", ";content:'';height:2px;left:5px;position:absolute;top:9px;width:10px;border:none;"], colors.white);
16
16
  }
@@ -46,40 +46,44 @@ function StyledFakeIndeterminate() {
46
46
  return css(["background-color:", ";"], colors.blue50);
47
47
  });
48
48
  }
49
- export var StyledCheckboxLabel = /*#__PURE__*/styled.span.withConfig({
49
+ export var StyledCheckboxLabelWrapper = /*#__PURE__*/styled.div.withConfig({
50
+ displayName: "StyledCheckboxLabelWrapper",
51
+ componentId: "core-11_25_0__sc-u63tye-1"
52
+ })(["padding-left:", "px;min-height:", "px;position:relative;", ""], function (_ref) {
53
+ var $hasLabel = _ref.$hasLabel;
54
+ return $hasLabel ? checkboxSize + spacing.md : checkboxSize;
55
+ }, checkboxSize, getTypographyIntent('body'));
56
+ export var StyledCheckboxLabel = /*#__PURE__*/styled.label.withConfig({
50
57
  displayName: "StyledCheckboxLabel",
51
- componentId: "core-11_24_4__sc-u63tye-1"
52
- })(["", " display:block;min-height:", "px;padding-left:", "px;position:relative;user-select:none;&:before{background-color:", ";border-radius:2px;border:2px solid ", ";content:'';display:inline-block;height:", "px;width:", "px;min-width:", "px;top:0;left:0;position:absolute;}"], getTypographyIntent('body'), checkboxSize, function (_ref) {
53
- var children = _ref.children;
54
- return children ? checkboxSize + spacing.md : checkboxSize;
55
- }, colors.white, colors.gray70, checkboxSize, checkboxSize, checkboxSize);
58
+ componentId: "core-11_25_0__sc-u63tye-2"
59
+ })(["user-select:none;&:before{background-color:", ";border-radius:2px;border:2px solid ", ";content:'';display:inline-block;height:", "px;width:", "px;min-width:", "px;top:0;left:0;position:absolute;}"], colors.white, colors.gray70, checkboxSize, checkboxSize, checkboxSize);
56
60
  export var StyledCheckboxInput = /*#__PURE__*/styled.input.withConfig({
57
61
  displayName: "StyledCheckboxInput",
58
- componentId: "core-11_24_4__sc-u63tye-2"
59
- })(["left:0;opacity:0;position:absolute;top:0;&:disabled:checked + ", ":before{background-color:", ";border-color:", ";}&:disabled + ", ":before{background-color:", ";border-color:", ";}", " &:checked + ", "{position:relative;&:before{background-color:", ";border-color:", ";color:", ";}&:after{", "}}&:focus:not(:disabled),&[data-qa=", "]:not(:disabled){+ ", ":before{", "}}", ""], StyledCheckboxLabel, colors.blue85, colors.blue85, StyledCheckboxLabel, function (_ref2) {
62
+ componentId: "core-11_25_0__sc-u63tye-3"
63
+ })(["left:0;opacity:0;position:absolute;top:0;&:disabled:checked + ", " > ", ":before{background-color:", ";border-color:", ";}&:disabled + ", " > ", ":before{background-color:", ";border-color:", ";}", " &:checked + ", " > ", "{&:before{background-color:", ";border-color:", ";color:", ";}&:after{", "}}&:focus:not(:disabled),&[data-qa=", "]:not(:disabled){+ ", " > ", ":before{", "}}", ""], StyledCheckboxLabelWrapper, StyledCheckboxLabel, colors.blue85, colors.blue85, StyledCheckboxLabelWrapper, StyledCheckboxLabel, function (_ref2) {
60
64
  var $indeterminate = _ref2.$indeterminate;
61
65
  return $indeterminate ? colors.gray85 : colors.white;
62
66
  }, colors.gray85, function (_ref3) {
63
67
  var $error = _ref3.$error;
64
68
  if ($error) {
65
- return css(["& + ", ":before{border-color:", ";}&:disabled:checked + ", ":before{background-color:", ";border-color:", ";}"], StyledCheckboxLabel, colors.red50, StyledCheckboxLabel, colors.gray85, colors.gray85);
69
+ return css(["& + ", " > ", ":before{border-color:", ";}&:disabled:checked + ", " > ", ":before{background-color:", ";border-color:", ";}"], StyledCheckboxLabelWrapper, StyledCheckboxLabel, colors.red50, StyledCheckboxLabelWrapper, StyledCheckboxLabel, colors.gray85, colors.gray85);
66
70
  }
67
- }, StyledCheckboxLabel, function (_ref4) {
71
+ }, StyledCheckboxLabelWrapper, StyledCheckboxLabel, function (_ref4) {
68
72
  var $error = _ref4.$error;
69
73
  return $error ? colors.red50 : colors.blue50;
70
74
  }, function (_ref5) {
71
75
  var $error = _ref5.$error;
72
76
  return $error ? colors.red50 : colors.blue50;
73
- }, colors.white, StyledChecked(), dataQa.focused, StyledCheckboxLabel, getFocus(), function (_ref6) {
77
+ }, colors.white, StyledChecked(), dataQa.focused, StyledCheckboxLabelWrapper, StyledCheckboxLabel, getFocus(), function (_ref6) {
74
78
  var $indeterminate = _ref6.$indeterminate,
75
79
  $error = _ref6.$error;
76
80
  if ($indeterminate) {
77
- return css(["& + ", ":before,&:checked + ", ":before{background-color:", ";border-color:", ";color:", ";}& + ", ":after,&:checked + ", ":after{", "}"], StyledCheckboxLabel, StyledCheckboxLabel, $error ? colors.red50 : colors.blue50, $error ? colors.red50 : colors.blue50, colors.white, StyledCheckboxLabel, StyledCheckboxLabel, StyledIndeterminate());
81
+ return css(["& + ", " > ", ":before,&:checked + ", " > ", ":before{background-color:", ";border-color:", ";color:", ";}& + ", " > ", ":after,&:checked + ", " > ", ":after{", "}"], StyledCheckboxLabelWrapper, StyledCheckboxLabel, StyledCheckboxLabelWrapper, StyledCheckboxLabel, $error ? colors.red50 : colors.blue50, $error ? colors.red50 : colors.blue50, colors.white, StyledCheckboxLabelWrapper, StyledCheckboxLabel, StyledCheckboxLabelWrapper, StyledCheckboxLabel, StyledIndeterminate());
78
82
  }
79
83
  });
80
84
  export var StyledFakeCheckboxLabel = /*#__PURE__*/styled.span.withConfig({
81
85
  displayName: "StyledFakeCheckboxLabel",
82
- componentId: "core-11_24_4__sc-u63tye-3"
86
+ componentId: "core-11_25_0__sc-u63tye-4"
83
87
  })(["", " display:block;min-height:", "px;padding-left:", "px;position:relative;user-select:none;cursor:pointer;", ""], getTypographyIntent('body'), checkboxSize, function (_ref7) {
84
88
  var children = _ref7.children;
85
89
  return children ? checkboxSize + spacing.md : checkboxSize;
@@ -95,7 +99,7 @@ export var StyledFakeCheckboxLabel = /*#__PURE__*/styled.span.withConfig({
95
99
  });
96
100
  export var StyledFakeCheckboxInput = /*#__PURE__*/styled.div.withConfig({
97
101
  displayName: "StyledFakeCheckboxInput",
98
- componentId: "core-11_24_4__sc-u63tye-4"
102
+ componentId: "core-11_25_0__sc-u63tye-5"
99
103
  })(["width:", "px;height:", "px;border-radius:2px;border:2px solid ", ";position:absolute;", " ", " ", " ", ""], checkboxSize, checkboxSize, colors.gray70, function (_ref9) {
100
104
  var $checked = _ref9.$checked,
101
105
  $disabled = _ref9.$disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.styles.js","names":["styled","css","getTypographyIntent","colors","getFocus","spacing","dataQa","focused","StyledCheckboxContainer","label","withConfig","displayName","componentId","gray15","md","checkboxSize","StyledIndeterminate","white","StyledChecked","StyledFakeChecked","$disabled","arguments","length","undefined","$error","red85","blue85","red50","blue50","StyledFakeIndeterminate","gray85","StyledCheckboxLabel","span","_ref","children","gray70","StyledCheckboxInput","input","_ref2","$indeterminate","_ref3","_ref4","_ref5","_ref6","StyledFakeCheckboxLabel","_ref7","_ref8","$checked","gray50","StyledFakeCheckboxInput","div","_ref9","_ref10","_ref11","_ref12"],"sources":["../../src/Checkbox/Checkbox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\nexport const dataQa = {\n focused: 'core-checkbox-focused',\n}\n\nexport const StyledCheckboxContainer = styled.label`\n color: ${colors.gray15};\n display: block;\n position: relative;\n\n & + & {\n margin-top: ${spacing.md}px;\n }\n`\n\nconst checkboxSize = 20\n\nfunction StyledIndeterminate() {\n return css`\n background-color: ${colors.white};\n content: '';\n height: 2px;\n left: 5px;\n position: absolute;\n top: 9px;\n width: 10px;\n border: none;\n `\n}\n\nfunction StyledChecked() {\n return css`\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik00MzMuNzkyIDcwNGwtMTc3Ljc5Mi0xNzIuNDE2IDY4LjkyOC01OS45NjggMTA4Ljg2NCAxMDUuNiAyNjUuMjgtMjU3LjIxNiA2OC45MjggNTkuOTY4eiI+PC9wYXRoPjwvc3ZnPg==');\n content: '';\n border: none;\n height: 20px;\n width: 20px;\n top: 0;\n left: 0;\n position: absolute;\n `\n}\n\nfunction StyledFakeChecked($disabled = false, $error = false) {\n return css`\n ${StyledChecked()};\n\n ${() => {\n if ($disabled && $error) {\n return css`\n background-color: ${colors.red85};\n `\n }\n if ($disabled) {\n return css`\n background-color: ${colors.blue85};\n `\n }\n if ($error) {\n return css`\n background-color: ${colors.red50};\n `\n }\n return css`\n background-color: ${colors.blue50};\n `\n }}\n `\n}\n\nfunction StyledFakeIndeterminate($disabled = false, $error = false) {\n return css`\n border: none;\n\n &:before {\n ${StyledIndeterminate()};\n }\n\n ${() => {\n if ($disabled) {\n return css`\n background-color: ${colors.gray85};\n `\n }\n if ($error) {\n return css`\n background-color: ${colors.red50};\n `\n }\n return css`\n background-color: ${colors.blue50};\n `\n }}\n `\n}\n\nexport const StyledCheckboxLabel = styled.span`\n ${getTypographyIntent('body')}\n\n display: block;\n min-height: ${checkboxSize}px;\n padding-left: ${({ children }) =>\n children ? checkboxSize + spacing.md : checkboxSize}px;\n position: relative;\n user-select: none;\n\n &:before {\n background-color: ${colors.white};\n border-radius: 2px;\n border: 2px solid ${colors.gray70};\n content: '';\n display: inline-block;\n height: ${checkboxSize}px;\n width: ${checkboxSize}px;\n min-width: ${checkboxSize}px;\n top: 0;\n left: 0;\n position: absolute;\n }\n`\n\nexport const StyledCheckboxInput = styled.input<{\n $error: boolean\n $indeterminate: boolean\n}>`\n left: 0;\n opacity: 0;\n position: absolute;\n top: 0;\n\n &:disabled:checked + ${StyledCheckboxLabel}:before {\n background-color: ${colors.blue85};\n border-color: ${colors.blue85};\n }\n\n &:disabled + ${StyledCheckboxLabel}:before {\n background-color: ${({ $indeterminate }) =>\n $indeterminate ? colors.gray85 : colors.white};\n border-color: ${colors.gray85};\n }\n\n ${({ $error }) => {\n if ($error) {\n return css`\n & + ${StyledCheckboxLabel}:before {\n border-color: ${colors.red50};\n }\n\n &:disabled:checked + ${StyledCheckboxLabel}:before {\n background-color: ${colors.gray85};\n border-color: ${colors.gray85};\n }\n `\n }\n }}\n\n &:checked + ${StyledCheckboxLabel} {\n position: relative;\n\n &:before {\n background-color: ${({ $error }) =>\n $error ? colors.red50 : colors.blue50};\n border-color: ${({ $error }) => ($error ? colors.red50 : colors.blue50)};\n color: ${colors.white};\n }\n\n &:after {\n ${StyledChecked()}\n }\n }\n\n &:focus:not(:disabled),\n &[data-qa=${dataQa.focused}]:not(:disabled) {\n + ${StyledCheckboxLabel}:before {\n ${getFocus()}\n }\n }\n\n ${({ $indeterminate, $error }) => {\n if ($indeterminate) {\n return css`\n &\n + ${StyledCheckboxLabel}:before,\n &:checked\n + ${StyledCheckboxLabel}:before {\n background-color: ${$error ? colors.red50 : colors.blue50};\n border-color: ${$error ? colors.red50 : colors.blue50};\n color: ${colors.white};\n }\n\n &\n + ${StyledCheckboxLabel}:after,\n &:checked\n + ${StyledCheckboxLabel}:after {\n ${StyledIndeterminate()}\n }\n `\n }\n }}\n`\n\nexport const StyledFakeCheckboxLabel = styled.span<{\n $checked: boolean\n $disabled: boolean\n}>`\n ${getTypographyIntent('body')}\n\n display: block;\n min-height: ${checkboxSize}px;\n padding-left: ${({ children }) =>\n children ? checkboxSize + spacing.md : checkboxSize}px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n ${({ $checked, $disabled }) => {\n if ($checked && $disabled) {\n return css`\n color: ${colors.gray50};\n `\n }\n if ($disabled) {\n return css`\n color: ${colors.gray85};\n `\n }\n }}\n`\n\nexport const StyledFakeCheckboxInput = styled.div<{\n $checked: boolean\n $error: boolean\n $disabled: boolean\n $indeterminate: boolean\n}>`\n width: ${checkboxSize}px;\n height: ${checkboxSize}px;\n border-radius: 2px;\n border: 2px solid ${colors.gray70};\n position: absolute;\n\n ${({ $checked, $disabled, $error }) => {\n if ($checked) {\n return StyledFakeChecked($disabled, $error)\n }\n }}\n\n ${({ $indeterminate, $disabled, $error }) => {\n if ($indeterminate) {\n return StyledFakeIndeterminate($disabled, $error)\n }\n }}\n\n ${({ $error }) => {\n if ($error) {\n return css`\n border-color: ${colors.red50};\n `\n }\n }}\n\n ${({ $disabled }) => {\n if ($disabled) {\n return css`\n border-color: ${colors.gray85};\n `\n }\n }}\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,MAAM,GAAG;EACpBC,OAAO,EAAE;AACX,CAAC;AAED,OAAO,IAAMC,uBAAuB,gBAAGR,MA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AACF,CAAC,CACF"}
1
+ {"version":3,"file":"Checkbox.styles.js","names":["styled","css","getTypographyIntent","colors","getFocus","spacing","dataQa","focused","checkboxSize","StyledCheckboxContainer","div","withConfig","displayName","componentId","gray15","md","StyledIndeterminate","white","StyledChecked","StyledFakeChecked","$disabled","arguments","length","undefined","$error","red85","blue85","red50","blue50","StyledFakeIndeterminate","gray85","StyledCheckboxLabelWrapper","_ref","$hasLabel","StyledCheckboxLabel","label","gray70","StyledCheckboxInput","input","_ref2","$indeterminate","_ref3","_ref4","_ref5","_ref6","StyledFakeCheckboxLabel","span","_ref7","children","_ref8","$checked","gray50","StyledFakeCheckboxInput","_ref9","_ref10","_ref11","_ref12"],"sources":["../../src/Checkbox/Checkbox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\nexport const dataQa = {\n focused: 'core-checkbox-focused',\n}\n\nexport const checkboxSize = 20\n\nexport const StyledCheckboxContainer = styled.div`\n color: ${colors.gray15};\n display: block;\n position: relative;\n\n & + & {\n margin-top: ${spacing.md}px;\n }\n`\n\nfunction StyledIndeterminate() {\n return css`\n background-color: ${colors.white};\n content: '';\n height: 2px;\n left: 5px;\n position: absolute;\n top: 9px;\n width: 10px;\n border: none;\n `\n}\n\nfunction StyledChecked() {\n return css`\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik00MzMuNzkyIDcwNGwtMTc3Ljc5Mi0xNzIuNDE2IDY4LjkyOC01OS45NjggMTA4Ljg2NCAxMDUuNiAyNjUuMjgtMjU3LjIxNiA2OC45MjggNTkuOTY4eiI+PC9wYXRoPjwvc3ZnPg==');\n content: '';\n border: none;\n height: 20px;\n width: 20px;\n top: 0;\n left: 0;\n position: absolute;\n `\n}\n\nfunction StyledFakeChecked($disabled = false, $error = false) {\n return css`\n ${StyledChecked()};\n\n ${() => {\n if ($disabled && $error) {\n return css`\n background-color: ${colors.red85};\n `\n }\n if ($disabled) {\n return css`\n background-color: ${colors.blue85};\n `\n }\n if ($error) {\n return css`\n background-color: ${colors.red50};\n `\n }\n return css`\n background-color: ${colors.blue50};\n `\n }}\n `\n}\n\nfunction StyledFakeIndeterminate($disabled = false, $error = false) {\n return css`\n border: none;\n\n &:before {\n ${StyledIndeterminate()};\n }\n\n ${() => {\n if ($disabled) {\n return css`\n background-color: ${colors.gray85};\n `\n }\n if ($error) {\n return css`\n background-color: ${colors.red50};\n `\n }\n return css`\n background-color: ${colors.blue50};\n `\n }}\n `\n}\n\nexport const StyledCheckboxLabelWrapper = styled.div<{ $hasLabel: boolean }>`\n padding-left: ${({ $hasLabel }) =>\n $hasLabel ? checkboxSize + spacing.md : checkboxSize}px;\n min-height: ${checkboxSize}px;\n position: relative;\n ${getTypographyIntent('body')}\n`\n\nexport const StyledCheckboxLabel = styled.label`\n user-select: none;\n\n &:before {\n background-color: ${colors.white};\n border-radius: 2px;\n border: 2px solid ${colors.gray70};\n content: '';\n display: inline-block;\n height: ${checkboxSize}px;\n width: ${checkboxSize}px;\n min-width: ${checkboxSize}px;\n top: 0;\n left: 0;\n position: absolute;\n }\n`\n\nexport const StyledCheckboxInput = styled.input<{\n $error: boolean\n $indeterminate: boolean\n}>`\n left: 0;\n opacity: 0;\n position: absolute;\n top: 0;\n\n &:disabled:checked\n + ${StyledCheckboxLabelWrapper}\n > ${StyledCheckboxLabel}:before {\n background-color: ${colors.blue85};\n border-color: ${colors.blue85};\n }\n\n &:disabled + ${StyledCheckboxLabelWrapper} > ${StyledCheckboxLabel}:before {\n background-color: ${({ $indeterminate }) =>\n $indeterminate ? colors.gray85 : colors.white};\n border-color: ${colors.gray85};\n }\n\n ${({ $error }) => {\n if ($error) {\n return css`\n & + ${StyledCheckboxLabelWrapper} > ${StyledCheckboxLabel}:before {\n border-color: ${colors.red50};\n }\n\n &:disabled:checked\n + ${StyledCheckboxLabelWrapper}\n > ${StyledCheckboxLabel}:before {\n background-color: ${colors.gray85};\n border-color: ${colors.gray85};\n }\n `\n }\n }}\n\n &:checked + ${StyledCheckboxLabelWrapper} > ${StyledCheckboxLabel} {\n &:before {\n background-color: ${({ $error }) =>\n $error ? colors.red50 : colors.blue50};\n border-color: ${({ $error }) => ($error ? colors.red50 : colors.blue50)};\n color: ${colors.white};\n }\n\n &:after {\n ${StyledChecked()}\n }\n }\n\n &:focus:not(:disabled),\n &[data-qa=${dataQa.focused}]:not(:disabled) {\n + ${StyledCheckboxLabelWrapper} > ${StyledCheckboxLabel}:before {\n ${getFocus()}\n }\n }\n\n ${({ $indeterminate, $error }) => {\n if ($indeterminate) {\n return css`\n &\n + ${StyledCheckboxLabelWrapper}\n > ${StyledCheckboxLabel}:before,\n &:checked\n + ${StyledCheckboxLabelWrapper}\n > ${StyledCheckboxLabel}:before {\n background-color: ${$error ? colors.red50 : colors.blue50};\n border-color: ${$error ? colors.red50 : colors.blue50};\n color: ${colors.white};\n }\n\n &\n + ${StyledCheckboxLabelWrapper}\n > ${StyledCheckboxLabel}:after,\n &:checked\n + ${StyledCheckboxLabelWrapper}\n > ${StyledCheckboxLabel}:after {\n ${StyledIndeterminate()}\n }\n `\n }\n }}\n`\n\nexport const StyledFakeCheckboxLabel = styled.span<{\n $checked: boolean\n $disabled: boolean\n}>`\n ${getTypographyIntent('body')}\n\n display: block;\n min-height: ${checkboxSize}px;\n padding-left: ${({ children }) =>\n children ? checkboxSize + spacing.md : checkboxSize}px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n ${({ $checked, $disabled }) => {\n if ($checked && $disabled) {\n return css`\n color: ${colors.gray50};\n `\n }\n if ($disabled) {\n return css`\n color: ${colors.gray85};\n `\n }\n }}\n`\n\nexport const StyledFakeCheckboxInput = styled.div<{\n $checked: boolean\n $error: boolean\n $disabled: boolean\n $indeterminate: boolean\n}>`\n width: ${checkboxSize}px;\n height: ${checkboxSize}px;\n border-radius: 2px;\n border: 2px solid ${colors.gray70};\n position: absolute;\n\n ${({ $checked, $disabled, $error }) => {\n if ($checked) {\n return StyledFakeChecked($disabled, $error)\n }\n }}\n\n ${({ $indeterminate, $disabled, $error }) => {\n if ($indeterminate) {\n return StyledFakeIndeterminate($disabled, $error)\n }\n }}\n\n ${({ $error }) => {\n if ($error) {\n return css`\n border-color: ${colors.red50};\n `\n }\n }}\n\n ${({ $disabled }) => {\n if ($disabled) {\n return css`\n border-color: ${colors.gray85};\n `\n }\n }}\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,MAAM,GAAG;EACpBC,OAAO,EAAE;AACX,CAAC;AAED,OAAO,IAAMC,YAAY,GAAG,EAAE;AAE9B,OAAO,IAAMC,uBAAuB,gBAAGT,MAAM,CAACU,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,6EACtCV,MAAM,CAACW,MAAM,EAKNT,OAAO,CAACU,EAAE,CAE3B;AAED,SAASC,mBAAmBA,CAAA,EAAG;EAC7B,OAAOf,GAAG,6GACYE,MAAM,CAACc,KAAK;AASpC;AAEA,SAASC,aAAaA,CAAA,EAAG;EACvB,OAAOjB,GAAG;AAUZ;AAEA,SAASkB,iBAAiBA,CAAA,EAAoC;EAAA,IAAnCC,SAAS,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAAA,IAAEG,MAAM,GAAAH,SAAA,CAAAC,MAA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AAC2B,MAAM;EAE1B;AACF,CAAC,CACF;AAED,OAAO,IAAMsB,uBAAuB,gBAAGpD,MAAM,CAACU,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iHAMtCL,YAAY,EACXA,YAAY,EAEFL,MAAM,CAACiC,MAAM,EAG/B,UAAAiB,KAAA,EAAqC;EAAA,IAAlCH,QAAQ,GAAAG,KAAA,CAARH,QAAQ;IAAE9B,SAAS,GAAAiC,KAAA,CAATjC,SAAS;IAAEI,MAAM,GAAA6B,KAAA,CAAN7B,MAAM;EAC9B,IAAI0B,QAAQ,EAAE;IACZ,OAAO/B,iBAAiB,CAACC,SAAS,EAAEI,MAAM,CAAC;EAC7C;AACF,CAAC,EAEC,UAAA8B,MAAA,EAA2C;EAAA,IAAxCd,cAAc,GAAAc,MAAA,CAAdd,cAAc;IAAEpB,SAAS,GAAAkC,MAAA,CAATlC,SAAS;IAAEI,MAAM,GAAA8B,MAAA,CAAN9B,MAAM;EACpC,IAAIgB,cAAc,EAAE;IAClB,OAAOX,uBAAuB,CAACT,SAAS,EAAEI,MAAM,CAAC;EACnD;AACF,CAAC,EAEC,UAAA+B,MAAA,EAAgB;EAAA,IAAb/B,MAAM,GAAA+B,MAAA,CAAN/B,MAAM;EACT,IAAIA,MAAM,EAAE;IACV,OAAOvB,GAAG,yBACQE,MAAM,CAACwB,KAAK;EAEhC;AACF,CAAC,EAEC,UAAA6B,MAAA,EAAmB;EAAA,IAAhBpC,SAAS,GAAAoC,MAAA,CAATpC,SAAS;EACZ,IAAIA,SAAS,EAAE;IACb,OAAOnB,GAAG,yBACQE,MAAM,CAAC2B,MAAM;EAEjC;AACF,CAAC,CACF"}
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { TooltipProps } from '../Tooltip';
2
3
  import type { InputAttributes, Props } from '../_utils/types';
3
4
  export interface CheckboxProps extends Props, InputAttributes {
4
5
  /**
@@ -31,4 +32,13 @@ export interface CheckboxProps extends Props, InputAttributes {
31
32
  * @since 10.19.0
32
33
  */
33
34
  indeterminate?: boolean;
35
+ /**
36
+ * Whether to show requiredMark
37
+ * @since 11.25.0
38
+ */
39
+ requiredMark?: boolean;
40
+ /**
41
+ * @since 11.25.0
42
+ */
43
+ tooltip?: TooltipProps['overlay'];
34
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.types.js","names":[],"sources":["../../src/Checkbox/Checkbox.types.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { InputAttributes, Props } from '../_utils/types'\n\nexport interface CheckboxProps extends Props, InputAttributes {\n /**\n * Checked state of the checkbox\n * @since 10.19.0\n */\n checked?: boolean\n /**\n * The contents of the checkbox label\n * @since 10.19.0\n */\n children?: ReactNode\n /**\n * Additional classNames\n * @since 10.19.0\n */\n className?: string\n /**\n * Disabled state of the checkbox\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * Error state of the checkbox\n * @since 10.19.0\n */\n error?: boolean\n /**\n * Indeterminate state of the checkbox\n * @since 10.19.0\n */\n indeterminate?: boolean\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Checkbox.types.js","names":[],"sources":["../../src/Checkbox/Checkbox.types.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { TooltipProps } from '../Tooltip'\nimport type { InputAttributes, Props } from '../_utils/types'\n\nexport interface CheckboxProps extends Props, InputAttributes {\n /**\n * Checked state of the checkbox\n * @since 10.19.0\n */\n checked?: boolean\n /**\n * The contents of the checkbox label\n * @since 10.19.0\n */\n children?: ReactNode\n /**\n * Additional classNames\n * @since 10.19.0\n */\n className?: string\n /**\n * Disabled state of the checkbox\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * Error state of the checkbox\n * @since 10.19.0\n */\n error?: boolean\n /**\n * Indeterminate state of the checkbox\n * @since 10.19.0\n */\n indeterminate?: boolean\n /**\n * Whether to show requiredMark\n * @since 11.25.0\n */\n requiredMark?: boolean\n /**\n * @since 11.25.0\n */\n tooltip?: TooltipProps['overlay']\n}\n"],"mappings":""}