@procore/core-react 11.12.1-rc.0 → 11.13.0-rc.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 (109) hide show
  1. package/dist/Avatar/Avatar.js +20 -4
  2. package/dist/Avatar/Avatar.js.map +1 -1
  3. package/dist/Modal/Modal.d.ts +3 -1
  4. package/dist/Modal/Modal.js +72 -19
  5. package/dist/Modal/Modal.js.map +1 -1
  6. package/dist/Modal/Modal.types.d.ts +59 -3
  7. package/dist/OverlayTrigger/OverlayTrigger.d.ts +6 -6
  8. package/dist/OverlayTrigger/OverlayTrigger.js +43 -32
  9. package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
  10. package/dist/OverlayTrigger/OverlayTrigger.types.d.ts +15 -7
  11. package/dist/OverlayTrigger/a11yPresets.d.ts +202 -1
  12. package/dist/OverlayTrigger/a11yPresets.js +210 -0
  13. package/dist/OverlayTrigger/a11yPresets.js.map +1 -1
  14. package/dist/Popover/Popover.d.ts +24 -2
  15. package/dist/Popover/Popover.js +6 -4
  16. package/dist/Popover/Popover.js.map +1 -1
  17. package/dist/Popover/Popover.types.d.ts +15 -2
  18. package/dist/Portal/Portal.d.ts +1 -1
  19. package/dist/Portal/Portal.js +24 -2
  20. package/dist/Portal/Portal.js.map +1 -1
  21. package/dist/Section/Section.d.ts +4 -0
  22. package/dist/Section/Section.js +12 -6
  23. package/dist/Section/Section.js.map +1 -1
  24. package/dist/Semantic/Semantic.d.ts +8 -0
  25. package/dist/Semantic/Semantic.js +28 -0
  26. package/dist/Semantic/Semantic.js.map +1 -1
  27. package/dist/Semantic/Semantic.types.d.ts +1 -1
  28. package/dist/Tearsheet/Tearsheet.d.ts +7 -1
  29. package/dist/Tearsheet/Tearsheet.js +32 -19
  30. package/dist/Tearsheet/Tearsheet.js.map +1 -1
  31. package/dist/Tearsheet/Tearsheet.types.d.ts +24 -0
  32. package/dist/_hooks/I18n.d.ts +1 -0
  33. package/dist/_locales/en.json +2 -1
  34. package/dist/_typedoc/Avatar/Avatar.types.json +28 -28
  35. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +22 -22
  36. package/dist/_typedoc/Badge/Badge.types.json +10 -10
  37. package/dist/_typedoc/Banner/Banner.types.json +19 -19
  38. package/dist/_typedoc/Box/Box.types.json +70 -70
  39. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +14 -14
  40. package/dist/_typedoc/Button/Button.types.json +11 -11
  41. package/dist/_typedoc/Calendar/Calendar.types.json +98 -98
  42. package/dist/_typedoc/Card/Card.types.json +8 -8
  43. package/dist/_typedoc/Checkbox/Checkbox.types.json +7 -7
  44. package/dist/_typedoc/ContactItem/ContactItem.types.json +11 -11
  45. package/dist/_typedoc/DateInput/DateInput.types.json +37 -37
  46. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  47. package/dist/_typedoc/DetailPage/DetailPage.types.json +6 -6
  48. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  49. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +31 -31
  50. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  51. package/dist/_typedoc/EmptyState/EmptyState.types.json +22 -22
  52. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  53. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  54. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  55. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  56. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  57. package/dist/_typedoc/Flex/Flex.types.json +29 -29
  58. package/dist/_typedoc/FlexList/FlexList.types.json +32 -32
  59. package/dist/_typedoc/Form/Form.types.json +698 -698
  60. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  61. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +54 -54
  62. package/dist/_typedoc/Input/Input.types.json +2 -2
  63. package/dist/_typedoc/Link/Link.types.json +6 -6
  64. package/dist/_typedoc/ListPage/ListPage.types.json +19 -19
  65. package/dist/_typedoc/Menu/Menu.types.json +68 -68
  66. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +75 -75
  67. package/dist/_typedoc/Modal/Modal.types.json +213 -70
  68. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  69. package/dist/_typedoc/Notation/Notation.types.json +6 -6
  70. package/dist/_typedoc/NumberInput/NumberInput.types.json +38 -38
  71. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +76 -34
  72. package/dist/_typedoc/PageLayout/PageLayout.types.json +32 -32
  73. package/dist/_typedoc/Pagination/Pagination.types.json +9 -9
  74. package/dist/_typedoc/Panel/Panel.types.json +29 -29
  75. package/dist/_typedoc/Pill/Pill.types.json +1 -1
  76. package/dist/_typedoc/PillSelect/PillSelect.types.json +46 -46
  77. package/dist/_typedoc/Popover/Popover.types.json +60 -38
  78. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +8 -8
  79. package/dist/_typedoc/RadioButton/RadioButton.types.json +8 -8
  80. package/dist/_typedoc/Required/Required.types.json +5 -5
  81. package/dist/_typedoc/Search/Search.types.json +18 -18
  82. package/dist/_typedoc/Section/Section.types.json +16 -16
  83. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +26 -26
  84. package/dist/_typedoc/Select/Select.types.json +32 -32
  85. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  86. package/dist/_typedoc/Spinner/Spinner.types.json +11 -11
  87. package/dist/_typedoc/Switch/Switch.types.json +5 -5
  88. package/dist/_typedoc/Table/Table.types.json +116 -116
  89. package/dist/_typedoc/Tabs/Tabs.types.json +21 -21
  90. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +70 -10
  91. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  92. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  93. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
  94. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +21 -21
  95. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  96. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  97. package/dist/_typedoc/Tile/Tile.types.json +42 -42
  98. package/dist/_typedoc/Toast/Toast.types.json +6 -6
  99. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  100. package/dist/_typedoc/Token/Token.types.json +4 -4
  101. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +14 -14
  102. package/dist/_typedoc/Tooltip/Tooltip.types.json +17 -17
  103. package/dist/_typedoc/Tree/Tree.types.json +88 -88
  104. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  105. package/dist/_typedoc/Typography/Typography.types.json +8 -8
  106. package/dist/_typedoc/_utils/types.json +5 -5
  107. package/dist/_utils/polymorphic.d.ts +4 -4
  108. package/dist/_utils/types.d.ts +0 -3
  109. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.js","sourceRoot":"","sources":["../../src/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAG9C;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,EAGT;QAFZ,QAAQ,cAAA,EACR,SAAS,eAAA;IAET,IAAM,SAAS,GAAG,gBAAgB,EAAE,CAAA;IAEpC,OAAO,QAAQ,CAAC,YAAY,CAC1B,oBAAC,YAAY,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,IAAG,QAAQ,CAAgB,EAC3E,SAAS,IAAI,QAAQ,CAAC,IAAI,CAC3B,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"Portal.js","sourceRoot":"","sources":["../../src/Portal/Portal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAG9C;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,EAIT;IAHZ,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,KAAK,cAHa,yBAItB,CADS;IAER,IAAM,SAAS,GAAG,gBAAgB,EAAE,CAAA;IAEpC,OAAO,QAAQ,CAAC,YAAY,CAC1B,oBAAC,YAAY,eAAK,KAAK,IAAE,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,KACxD,QAAQ,CACI,EACf,SAAS,IAAI,QAAQ,CAAC,IAAI,CAC3B,CAAA;AACH,CAAC"}
@@ -1,6 +1,10 @@
1
1
  import React from 'react';
2
+ import { HeadingProps } from '../Semantic/Semantic.types';
2
3
  import { SectionProps, SectionProviderProps } from './Section.types';
3
4
  export declare const LevelContext: React.Context<number>;
5
+ export declare function Heading({ level: level_, ...props }: HeadingProps & {
6
+ level?: number;
7
+ }): JSX.Element;
4
8
  export declare const SectionProvider: ({ children }: SectionProviderProps) => JSX.Element;
5
9
  /**
6
10
  * @deprecatedSince 11
@@ -25,12 +25,9 @@ import cx from 'classnames';
25
25
  import React from 'react';
26
26
  import { ulid } from 'ulid';
27
27
  import { Button } from '../Button/Button';
28
- import { H2, H3 } from '../Semantic/Semantic';
28
+ import { getHeadingComponent } from '../Semantic/Semantic';
29
29
  import { Title } from '../Title/Title';
30
30
  import { sectionClassnames, StyledSection, StyledSectionCollapseHeading, StyledSectionContentRegion, StyledSectionHeader, StyledSectionInner, StyledTitle, } from './Section.styles';
31
- function H4(props) {
32
- return React.createElement(H3, __assign({ as: "h4" }, props));
33
- }
34
31
  var isFunction = function (obj) { return typeof obj === 'function'; };
35
32
  // Header levels start at level 2
36
33
  export var LevelContext = React.createContext(2);
@@ -39,6 +36,12 @@ var SectionContext = React.createContext({
39
36
  setSection: function () { },
40
37
  toggleSection: function () { },
41
38
  });
39
+ export function Heading(_a) {
40
+ var level_ = _a.level, props = __rest(_a, ["level"]);
41
+ var level = React.useContext(LevelContext);
42
+ var H = getHeadingComponent(level_ || level);
43
+ return React.createElement(H, __assign({}, props));
44
+ }
42
45
  export var SectionProvider = function (_a) {
43
46
  var children = _a.children;
44
47
  var _b = React.useState({}), open = _b[0], setSectionsOpen = _b[1];
@@ -86,7 +89,6 @@ export var Section = React.forwardRef(function Section(_a, ref) {
86
89
  headingTextId: "heading-".concat(ulid()),
87
90
  };
88
91
  }, []), contentRegionId = _d.contentRegionId, headingTextId = _d.headingTextId;
89
- var Heading = level === 2 ? H2 : level === 3 ? H3 : H4;
90
92
  var expandClosed = !open || !children;
91
93
  var divide = level >= 3 || !heading;
92
94
  var hasHeader = heading || actions;
@@ -101,7 +103,11 @@ export var Section = React.forwardRef(function Section(_a, ref) {
101
103
  expandId ? (React.createElement(StyledSectionCollapseHeading, { "aria-labelledby": headingTextId, "aria-level": level, role: "heading" },
102
104
  React.createElement(Button, { "aria-controls": contentRegionId, "aria-expanded": open, "aria-labelledby": headingTextId, icon: open ? React.createElement(ChevronDown, null) : React.createElement(ChevronRight, null), onClick: toggleOpen, variant: "tertiary" }))) : null,
103
105
  React.createElement(StyledTitle, null,
104
- React.createElement(Title.Text, null, heading && (React.createElement(Heading, { "aria-hidden": expandId ? true : false, id: headingTextId }, heading))),
106
+ React.createElement(Title.Text, null, heading && (React.createElement(Heading, { "aria-hidden": expandId ? true : false, id: headingTextId,
107
+ // Pass level since Heading component renders
108
+ // under the incremented (level + 1) LevelProvider.
109
+ // Alternative, render Heading as a variable outside of return.
110
+ level: level }, heading))),
105
111
  React.createElement(Title.Subtext, null, subtext),
106
112
  React.createElement(Title.Pills, null, pills),
107
113
  React.createElement(Title.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,CACF,CAAA;AAED,OAAO,CAAC,WAAW,GAAG,SAAS,CAAA"}
@@ -3,6 +3,14 @@ import { HeadingProps } from './Semantic.types';
3
3
  export declare const H1: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
4
4
  export declare const H2: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
5
5
  export declare const H3: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
6
+ export declare const H4: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
7
+ export declare const H5: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
8
+ export declare const H6: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
9
+ /**
10
+ * @param level 1 - 6
11
+ * @returns H1 - H6 component
12
+ */
13
+ export declare function getHeadingComponent(level: string | number): React.ForwardRefExoticComponent<HeadingProps>;
6
14
  export declare const P: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
7
15
  export declare const UL: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLUListElement> & React.RefAttributes<HTMLUListElement>>;
8
16
  export declare const Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLLabelElement> & {
@@ -20,6 +20,34 @@ export var H2 = React.forwardRef(function H2(props, ref) {
20
20
  export var H3 = React.forwardRef(function H3(props, ref) {
21
21
  return React.createElement(StyledH3, __assign({}, props, { ref: ref }));
22
22
  });
23
+ export var H4 = React.forwardRef(function H4(props, ref) {
24
+ return React.createElement(H3, __assign({ as: "h4" }, props, { ref: ref }));
25
+ });
26
+ export var H5 = React.forwardRef(function H5(props, ref) {
27
+ return React.createElement(H3, __assign({ as: "h5", style: { fontSize: '90%' } }, props, { ref: ref }));
28
+ });
29
+ export var H6 = React.forwardRef(function H6(props, ref) {
30
+ return React.createElement(H3, __assign({ as: "h6", style: { fontSize: '85%' } }, props, { ref: ref }));
31
+ });
32
+ var UnknownHeading = React.forwardRef(function UnknownHeading(props, ref) {
33
+ return React.createElement("strong", __assign({}, props, { ref: ref }));
34
+ });
35
+ var levelToComponent = {
36
+ '1': H1,
37
+ '2': H2,
38
+ '3': H3,
39
+ '4': H4,
40
+ '5': H5,
41
+ '6': H6,
42
+ };
43
+ /**
44
+ * @param level 1 - 6
45
+ * @returns H1 - H6 component
46
+ */
47
+ export function getHeadingComponent(level) {
48
+ // @ts-ignore
49
+ return levelToComponent[String(level)] || UnknownHeading;
50
+ }
23
51
  export var P = React.forwardRef(function P(props, ref) {
24
52
  return React.createElement(StyledP, __assign({}, props, { ref: ref }));
25
53
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Semantic.js","sourceRoot":"","sources":["../../src/Semantic/Semantic.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,mBAAmB,CAAA;AAG1B,MAAM,CAAC,IAAM,EAAE,GAAG,KAAK,CAAC,UAAU,CAChC,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG;IACpB,OAAO,oBAAC,QAAQ,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAC1C,CAAC,CACF,CAAA;AAED,MAAM,CAAC,IAAM,EAAE,GAAG,KAAK,CAAC,UAAU,CAChC,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG;IACpB,OAAO,oBAAC,QAAQ,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAC1C,CAAC,CACF,CAAA;AAED,MAAM,CAAC,IAAM,EAAE,GAAG,KAAK,CAAC,UAAU,CAChC,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG;IACpB,OAAO,oBAAC,QAAQ,eAAK,KAAK,IAAE,GAAG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,CAAA;AAEnB,EAAE,CAAC,WAAW,GAAG,IAAI,CAAA;AAErB,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
@@ -4,5 +4,5 @@ export interface HeadingProps extends HeadingAttributes {
4
4
  * Change the HTML tag.
5
5
  * @since 11.12.0
6
6
  */
7
- as?: 'h1' | 'h2' | 'h3';
7
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
8
8
  }
@@ -14,4 +14,10 @@ export declare const TearsheetContext: React.Context<TearsheetContextProps>;
14
14
  @see [Design Guidelines](https://design.procore.com/tearsheet)
15
15
 
16
16
  */
17
- export declare const Tearsheet: React.ForwardRefExoticComponent<TearsheetProps & React.RefAttributes<HTMLDivElement>>;
17
+ export declare const Tearsheet: (props: TearsheetProps & {
18
+ /**
19
+ * @deprecatedSince 11.11.0
20
+ * @deprecated This ref is passed to two elements, in the future it will only be provided to the inner element (StyledTearsheetContent).
21
+ */
22
+ ref?: React.ComponentPropsWithRef<'div'>['ref'];
23
+ }) => React.ReactElement;
@@ -46,10 +46,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  }
47
47
  };
48
48
  import { Clear } from '@procore/core-icons/dist';
49
+ import { FocusScope } from '@react-aria/focus';
49
50
  import React from 'react';
50
51
  import { Button } from '../Button/Button';
51
52
  import { CloseWithConfirmContext, useCloseWithConfirmState, } from '../Form/closeWithConfirm';
52
53
  import { StyledModal, StyledModalScrim } from '../Modal/Modal.styles';
54
+ import { useModalDialogLike } from '../OverlayTrigger/a11yPresets';
53
55
  import { Portal } from '../Portal/Portal';
54
56
  import { useEventRegistry } from '../_hooks/EventRegistry';
55
57
  import { useHotkey } from '../_hooks/Hotkey';
@@ -78,7 +80,7 @@ export var TearsheetContext = React.createContext({
78
80
  */
79
81
  export var Tearsheet = React.forwardRef(function Tearsheet(_a, ref) {
80
82
  var _this = this;
81
- var children = _a.children, open = _a.open, onClose_ = _a.onClose, afterShow = _a.afterShow, afterHide = _a.afterHide, _b = _a.placement, placement = _b === void 0 ? 'right' : _b, _c = _a.stretch, stretch = _c === void 0 ? false : _c, qa = _a.qa;
83
+ var ariaDescribedby = _a["aria-describedby"], ariaDetails = _a["aria-details"], ariaLabelledby = _a["aria-labelledby"], ariaLabel = _a["aria-label"], children = _a.children, id = _a.id, open = _a.open, onClose_ = _a.onClose, afterShow = _a.afterShow, afterHide = _a.afterHide, _b = _a.placement, placement = _b === void 0 ? 'right' : _b, role = _a.role, _c = _a.stretch, stretch = _c === void 0 ? false : _c, qa = _a.qa;
82
84
  var I18n = useI18nContext();
83
85
  var _d = React.useState('closed'), status = _d[0], setStatus = _d[1];
84
86
  var _e = React.useState('disabled'), phase = _e[0], setPhase = _e[1];
@@ -87,7 +89,17 @@ export var Tearsheet = React.forwardRef(function Tearsheet(_a, ref) {
87
89
  var closeWithConfirmState = useCloseWithConfirmState();
88
90
  var closeWithConfirm = closeWithConfirmState.closeWithConfirm;
89
91
  var onClose = closeWithConfirm(onClose_);
90
- var _g = useEventRegistry(), registry = _g.registry, addListener = _g.addListener;
92
+ var _g = useModalDialogLike({
93
+ 'aria-describedby': ariaDescribedby,
94
+ 'aria-details': ariaDetails,
95
+ 'aria-labelledby': ariaLabelledby,
96
+ 'aria-label': ariaLabel,
97
+ id: id,
98
+ isModal: false,
99
+ isOpen: isVisible && status === 'open',
100
+ role: role,
101
+ }), dialogProps = _g.dialogProps, focusScopeProps = _g.focusScopeProps;
102
+ var _h = useEventRegistry(), registry = _h.registry, addListener = _h.addListener;
91
103
  var ctx = React.useMemo(function () { return ({
92
104
  addListener: addListener,
93
105
  placement: placement,
@@ -174,22 +186,23 @@ export var Tearsheet = React.forwardRef(function Tearsheet(_a, ref) {
174
186
  return null;
175
187
  }
176
188
  return (React.createElement(Portal, null,
177
- React.createElement(StyledModal, { ref: ref, className: getScrimClassName(status, phase) },
178
- React.createElement(StyledModalScrim, null),
179
- React.createElement(StyledTearsheetContent, __assign({ ref: ref, "$placement": placement }, getAnimationState('tearsheet', phase, status)),
180
- React.createElement(StyledScrimContainer, { "$placement": placement, onClick: handleClose, "data-qa": qa === null || qa === void 0 ? void 0 : qa.scrim },
181
- React.createElement(StyledButtonContainer, { "$placement": placement },
182
- React.createElement("div", null,
183
- React.createElement(StyledButtonCard, __assign({}, getAnimationState('closeButton', phase, status)),
184
- React.createElement(Button, { ref: closeBtnRef, "aria-label": I18n.t('core.tearsheet.a11y.close'), onClick: function (e) {
185
- e.stopPropagation();
186
- onClose();
187
- }, size: "lg", variant: "tertiary", icon: React.createElement(Clear, null), "data-qa": qa === null || qa === void 0 ? void 0 : qa.closeButton }))))),
188
- React.createElement(StyledTearsheetBody, { onScroll: function () {
189
- var _a;
190
- (_a = registry.current.scroll) === null || _a === void 0 ? void 0 : _a.forEach(function (cb) { return cb(); });
191
- }, "$placement": placement, "$stretch": stretch },
192
- React.createElement(TearsheetContext.Provider, { value: ctx },
193
- React.createElement(CloseWithConfirmContext.Provider, { value: closeWithConfirmState }, children)))))));
189
+ React.createElement(FocusScope, __assign({}, focusScopeProps, { restoreFocus: true }),
190
+ React.createElement(StyledModal, { ref: ref, className: getScrimClassName(status, phase) },
191
+ React.createElement(StyledModalScrim, null),
192
+ React.createElement(StyledTearsheetContent, __assign({}, dialogProps, { ref: ref, "$placement": placement }, getAnimationState('tearsheet', phase, status)),
193
+ React.createElement(StyledScrimContainer, { "$placement": placement, onClick: handleClose, "data-qa": qa === null || qa === void 0 ? void 0 : qa.scrim },
194
+ React.createElement(StyledButtonContainer, { "$placement": placement },
195
+ React.createElement("div", null,
196
+ React.createElement(StyledButtonCard, __assign({}, getAnimationState('closeButton', phase, status)),
197
+ React.createElement(Button, { ref: closeBtnRef, "aria-label": I18n.t('core.tearsheet.a11y.close'), onClick: function (e) {
198
+ e.stopPropagation();
199
+ onClose();
200
+ }, size: "lg", variant: "tertiary", icon: React.createElement(Clear, null), "data-qa": qa === null || qa === void 0 ? void 0 : qa.closeButton }))))),
201
+ React.createElement(StyledTearsheetBody, { onScroll: function () {
202
+ var _a;
203
+ (_a = registry.current.scroll) === null || _a === void 0 ? void 0 : _a.forEach(function (cb) { return cb(); });
204
+ }, "$placement": placement, "$stretch": stretch },
205
+ React.createElement(TearsheetContext.Provider, { value: ctx },
206
+ React.createElement(CloseWithConfirmContext.Provider, { value: closeWithConfirmState }, children))))))));
194
207
  });
195
208
  //# sourceMappingURL=Tearsheet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tearsheet.js","sourceRoot":"","sources":["../../src/Tearsheet/Tearsheet.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,oBAAoB,CAAA;AAO3B,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,kBAA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;4CACnB,OAAO,EAAE,CAAA;wCACX,CAAC,EACD,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,UAAU,EAClB,IAAI,EAAE,oBAAC,KAAK,OAAG,aACN,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,WAAW,GACxB,CACe,CACf,CACgB,CACH;oBACvB,oBAAC,mBAAmB,IAClB,QAAQ,EAAE;;4BACR,MAAA,QAAQ,CAAC,OAAO,CAAC,MAAM,0CAAE,OAAO,CAAC,UAAC,EAAE,IAAK,OAAA,EAAE,EAAE,EAAJ,CAAI,CAAC,CAAA;wBAChD,CAAC,gBACW,SAAS,cACX,OAAO;wBAEjB,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG;4BACnC,oBAAC,uBAAuB,CAAC,QAAQ,IAC/B,KAAK,EAAE,qBAAqB,IAE3B,QAAQ,CACwB,CACT,CACR,CACC,CACb,CACH,CACN,CACV,CAAA;AACH,CAAC,CASoB,CAAA"}
@@ -6,7 +6,27 @@ interface QaTags {
6
6
  scrim?: string;
7
7
  }
8
8
  export interface TearsheetProps {
9
+ /**
10
+ * @since 11.11.0
11
+ */
12
+ ['aria-describedby']?: string;
13
+ /**
14
+ * @since 11.11.0
15
+ */
16
+ ['aria-details']?: string;
17
+ /**
18
+ * @since 11.11.0
19
+ */
20
+ ['aria-label']?: string;
21
+ /**
22
+ * @since 11.11.0
23
+ */
24
+ ['aria-labelledby']?: string;
9
25
  children?: React.ReactNode;
26
+ /**
27
+ * @since 11.11.0
28
+ */
29
+ id?: string;
10
30
  /**
11
31
  * A controlled prop defining open/close state of the tearsheet.
12
32
  * @since 10.25.0
@@ -37,6 +57,10 @@ export interface TearsheetProps {
37
57
  * @since 11.1.0
38
58
  */
39
59
  stretch?: boolean;
60
+ /**
61
+ * @since 11.11.0
62
+ */
63
+ role?: 'dialog';
40
64
  /**
41
65
  * QA tags
42
66
  * @since 10.25.0
@@ -508,6 +508,7 @@ export declare const coreTranslations: {
508
508
  a11y: {
509
509
  close: string;
510
510
  };
511
+ cancel: string;
511
512
  };
512
513
  multiSelect: {
513
514
  clearAll: string;
@@ -204,7 +204,8 @@
204
204
  "modal": {
205
205
  "a11y": {
206
206
  "close": "Close"
207
- }
207
+ },
208
+ "cancel": "Cancel"
208
209
  },
209
210
  "multiSelect": {
210
211
  "clearAll": "Delete field",
@@ -7,10 +7,10 @@
7
7
  "required": false,
8
8
  "type": "<span class=\"tsd-signature-type\">ReactNode</span>",
9
9
  "typeDetail": "<span class=\"tsd-signature-type\">ReactNode</span>",
10
- "description": "Instead of using the default children, you can pass in your own.",
11
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Instead of using the default children, you can pass in your own.</p>\n</div></div>",
10
+ "description": "",
11
+ "descriptionHtml": "",
12
12
  "sourceFile": "packages/core-react/src/_utils/types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L45"
13
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L42"
14
14
  },
15
15
  {
16
16
  "name": "className",
@@ -20,7 +20,7 @@
20
20
  "description": "Additional classNames",
21
21
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
22
22
  "sourceFile": "packages/core-react/src/_utils/types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L50"
23
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L47"
24
24
  },
25
25
  {
26
26
  "name": "icon",
@@ -30,7 +30,7 @@
30
30
  "description": "The icon to display",
31
31
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The icon to display</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
32
32
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
33
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L100"
33
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L100"
34
34
  },
35
35
  {
36
36
  "name": "style",
@@ -40,7 +40,7 @@
40
40
  "description": "Additional CSS styles",
41
41
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
42
42
  "sourceFile": "packages/core-react/src/_utils/types.ts",
43
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L55"
43
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L52"
44
44
  }
45
45
  ],
46
46
  "description": ""
@@ -53,10 +53,10 @@
53
53
  "required": false,
54
54
  "type": "<span class=\"tsd-signature-type\">ReactNode</span>",
55
55
  "typeDetail": "<span class=\"tsd-signature-type\">ReactNode</span>",
56
- "description": "Instead of using the default children, you can pass in your own.",
57
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Instead of using the default children, you can pass in your own.</p>\n</div></div>",
56
+ "description": "",
57
+ "descriptionHtml": "",
58
58
  "sourceFile": "packages/core-react/src/_utils/types.ts",
59
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L45"
59
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L42"
60
60
  },
61
61
  {
62
62
  "name": "className",
@@ -66,7 +66,7 @@
66
66
  "description": "Additional classNames",
67
67
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
68
68
  "sourceFile": "packages/core-react/src/_utils/types.ts",
69
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L50"
69
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L47"
70
70
  },
71
71
  {
72
72
  "name": "style",
@@ -76,7 +76,7 @@
76
76
  "description": "Additional CSS styles",
77
77
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
78
78
  "sourceFile": "packages/core-react/src/_utils/types.ts",
79
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L55"
79
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L52"
80
80
  }
81
81
  ],
82
82
  "description": ""
@@ -92,7 +92,7 @@
92
92
  "description": "",
93
93
  "descriptionHtml": "",
94
94
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
95
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L12"
95
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L12"
96
96
  },
97
97
  {
98
98
  "name": "img",
@@ -102,7 +102,7 @@
102
102
  "description": "",
103
103
  "descriptionHtml": "",
104
104
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
105
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L13"
105
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L13"
106
106
  },
107
107
  {
108
108
  "name": "link",
@@ -112,7 +112,7 @@
112
112
  "description": "",
113
113
  "descriptionHtml": "",
114
114
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
115
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L14"
115
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L14"
116
116
  }
117
117
  ],
118
118
  "description": ""
@@ -125,10 +125,10 @@
125
125
  "required": false,
126
126
  "type": "<span class=\"tsd-signature-type\">ReactNode</span>",
127
127
  "typeDetail": "<span class=\"tsd-signature-type\">ReactNode</span>",
128
- "description": "Instead of using the default children, you can pass in your own.",
129
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Instead of using the default children, you can pass in your own.</p>\n</div></div>",
128
+ "description": "",
129
+ "descriptionHtml": "",
130
130
  "sourceFile": "packages/core-react/src/_utils/types.ts",
131
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L45"
131
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L42"
132
132
  },
133
133
  {
134
134
  "name": "className",
@@ -138,7 +138,7 @@
138
138
  "description": "Additional classNames",
139
139
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
140
140
  "sourceFile": "packages/core-react/src/_utils/types.ts",
141
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L50"
141
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L47"
142
142
  },
143
143
  {
144
144
  "name": "imageUrl",
@@ -148,7 +148,7 @@
148
148
  "description": "The Avatar rich media url",
149
149
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The Avatar rich media url</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
150
150
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
151
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L108"
151
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L108"
152
152
  },
153
153
  {
154
154
  "name": "style",
@@ -158,7 +158,7 @@
158
158
  "description": "Additional CSS styles",
159
159
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
160
160
  "sourceFile": "packages/core-react/src/_utils/types.ts",
161
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L55"
161
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L52"
162
162
  }
163
163
  ],
164
164
  "description": ""
@@ -171,10 +171,10 @@
171
171
  "required": false,
172
172
  "type": "<span class=\"tsd-signature-type\">ReactNode</span>",
173
173
  "typeDetail": "<span class=\"tsd-signature-type\">ReactNode</span>",
174
- "description": "Instead of using the default children, you can pass in your own.",
175
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Instead of using the default children, you can pass in your own.</p>\n</div></div>",
174
+ "description": "",
175
+ "descriptionHtml": "",
176
176
  "sourceFile": "packages/core-react/src/_utils/types.ts",
177
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L45"
177
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L42"
178
178
  },
179
179
  {
180
180
  "name": "className",
@@ -184,7 +184,7 @@
184
184
  "description": "Additional classNames",
185
185
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
186
186
  "sourceFile": "packages/core-react/src/_utils/types.ts",
187
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L50"
187
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L47"
188
188
  },
189
189
  {
190
190
  "name": "clickable",
@@ -197,7 +197,7 @@
197
197
  "deprecated": "Reviewing for removal from system, prefer accessible `role` for interactive UI.",
198
198
  "deprecatedSince": "TBD",
199
199
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
200
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L34"
200
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L34"
201
201
  },
202
202
  {
203
203
  "name": "disabled",
@@ -208,7 +208,7 @@
208
208
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Sets the Avatar&#39;s disabled state</p>\n</div><dl class=\"tsd-comment-tags\"><dt>defaultvalue</dt><dd><p>false</p>\n</dd></dl></div>",
209
209
  "defaultValue": "false\n",
210
210
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
211
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L40"
211
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L40"
212
212
  },
213
213
  {
214
214
  "name": "size",
@@ -221,7 +221,7 @@
221
221
  "deprecated": "\n\nSize \"xl\" has been deprecated and will be removed in a future version.\nPlease use \"lg\" instead of \"xl\".\n\n**Before**\n\n`<Avatar size=\"xl\" />`\n\n**After**\n\n`<Avatar size=\"lg\" />`\n",
222
222
  "deprecatedSince": "10.20.0",
223
223
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
224
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/Avatar/Avatar.types.ts#L62"
224
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/Avatar/Avatar.types.ts#L62"
225
225
  },
226
226
  {
227
227
  "name": "style",
@@ -231,7 +231,7 @@
231
231
  "description": "Additional CSS styles",
232
232
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
233
233
  "sourceFile": "packages/core-react/src/_utils/types.ts",
234
- "sourceUrl": "https://github.com/procore/core/blob/dbaaaeb26/packages/core-react/src/_utils/types.ts#L55"
234
+ "sourceUrl": "https://github.com/procore/core/blob/fbd7c364a/packages/core-react/src/_utils/types.ts#L52"
235
235
  }
236
236
  ],
237
237
  "description": ""