@workday/canvas-kit-react 5.3.0-next.9 → 5.3.3

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 (99) hide show
  1. package/common/lib/styles/accessibleHide.ts +2 -2
  2. package/cookie-banner/README.md +10 -15
  3. package/cookie-banner/index.ts +3 -3
  4. package/cookie-banner/lib/CookieBanner.tsx +4 -29
  5. package/dist/commonjs/common/lib/styles/accessibleHide.d.ts +2 -2
  6. package/dist/commonjs/common/lib/styles/accessibleHide.d.ts.map +1 -1
  7. package/dist/commonjs/cookie-banner/index.d.ts +3 -3
  8. package/dist/commonjs/cookie-banner/index.d.ts.map +1 -1
  9. package/dist/commonjs/cookie-banner/index.js +1 -1
  10. package/dist/commonjs/cookie-banner/lib/CookieBanner.d.ts +2 -19
  11. package/dist/commonjs/cookie-banner/lib/CookieBanner.d.ts.map +1 -1
  12. package/dist/commonjs/cookie-banner/lib/CookieBanner.js +8 -19
  13. package/dist/commonjs/page-header/index.d.ts +3 -3
  14. package/dist/commonjs/page-header/index.d.ts.map +1 -1
  15. package/dist/commonjs/page-header/index.js +1 -1
  16. package/dist/commonjs/page-header/lib/PageHeader.d.ts +2 -19
  17. package/dist/commonjs/page-header/lib/PageHeader.d.ts.map +1 -1
  18. package/dist/commonjs/page-header/lib/PageHeader.js +7 -18
  19. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts +3 -0
  20. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
  21. package/dist/commonjs/pagination/lib/Pagination/types.d.ts +39 -0
  22. package/dist/commonjs/pagination/lib/Pagination/types.d.ts.map +1 -1
  23. package/dist/commonjs/pagination/lib/Pagination/usePaginationModel.d.ts +19 -0
  24. package/dist/commonjs/pagination/lib/Pagination/usePaginationModel.d.ts.map +1 -1
  25. package/dist/commonjs/tabs/lib/Tab.d.ts.map +1 -1
  26. package/dist/commonjs/tabs/lib/Tab.js +18 -24
  27. package/dist/commonjs/tooltip/lib/OverflowTooltip.d.ts +10 -0
  28. package/dist/commonjs/tooltip/lib/OverflowTooltip.d.ts.map +1 -1
  29. package/dist/commonjs/tooltip/lib/OverflowTooltip.js +8 -6
  30. package/dist/commonjs/tooltip/lib/Tooltip.d.ts +9 -1
  31. package/dist/commonjs/tooltip/lib/Tooltip.d.ts.map +1 -1
  32. package/dist/commonjs/tooltip/lib/Tooltip.js +7 -2
  33. package/dist/commonjs/tooltip/lib/useTooltip.d.ts +9 -1
  34. package/dist/commonjs/tooltip/lib/useTooltip.d.ts.map +1 -1
  35. package/dist/commonjs/tooltip/lib/useTooltip.js +13 -8
  36. package/dist/es6/common/lib/styles/accessibleHide.d.ts +2 -2
  37. package/dist/es6/common/lib/styles/accessibleHide.d.ts.map +1 -1
  38. package/dist/es6/cookie-banner/index.d.ts +3 -3
  39. package/dist/es6/cookie-banner/index.d.ts.map +1 -1
  40. package/dist/es6/cookie-banner/index.js +3 -3
  41. package/dist/es6/cookie-banner/lib/CookieBanner.d.ts +2 -19
  42. package/dist/es6/cookie-banner/lib/CookieBanner.d.ts.map +1 -1
  43. package/dist/es6/cookie-banner/lib/CookieBanner.js +8 -19
  44. package/dist/es6/page-header/index.d.ts +3 -3
  45. package/dist/es6/page-header/index.d.ts.map +1 -1
  46. package/dist/es6/page-header/index.js +3 -3
  47. package/dist/es6/page-header/lib/PageHeader.d.ts +2 -19
  48. package/dist/es6/page-header/lib/PageHeader.d.ts.map +1 -1
  49. package/dist/es6/page-header/lib/PageHeader.js +7 -18
  50. package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts +3 -0
  51. package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
  52. package/dist/es6/pagination/lib/Pagination/types.d.ts +39 -0
  53. package/dist/es6/pagination/lib/Pagination/types.d.ts.map +1 -1
  54. package/dist/es6/pagination/lib/Pagination/usePaginationModel.d.ts +19 -0
  55. package/dist/es6/pagination/lib/Pagination/usePaginationModel.d.ts.map +1 -1
  56. package/dist/es6/tabs/lib/Tab.d.ts.map +1 -1
  57. package/dist/es6/tabs/lib/Tab.js +18 -24
  58. package/dist/es6/tooltip/lib/OverflowTooltip.d.ts +10 -0
  59. package/dist/es6/tooltip/lib/OverflowTooltip.d.ts.map +1 -1
  60. package/dist/es6/tooltip/lib/OverflowTooltip.js +5 -3
  61. package/dist/es6/tooltip/lib/Tooltip.d.ts +9 -1
  62. package/dist/es6/tooltip/lib/Tooltip.d.ts.map +1 -1
  63. package/dist/es6/tooltip/lib/Tooltip.js +7 -2
  64. package/dist/es6/tooltip/lib/useTooltip.d.ts +9 -1
  65. package/dist/es6/tooltip/lib/useTooltip.d.ts.map +1 -1
  66. package/dist/es6/tooltip/lib/useTooltip.js +13 -8
  67. package/package.json +5 -5
  68. package/page-header/README.md +6 -11
  69. package/page-header/index.ts +3 -3
  70. package/page-header/lib/PageHeader.tsx +3 -28
  71. package/pagination/lib/Pagination/GoTo/Label.tsx +3 -0
  72. package/pagination/lib/Pagination/types.ts +44 -5
  73. package/pagination/lib/Pagination/usePaginationModel.ts +19 -0
  74. package/tabs/lib/Tab.tsx +53 -59
  75. package/tooltip/lib/OverflowTooltip.tsx +5 -3
  76. package/tooltip/lib/Tooltip.tsx +16 -1
  77. package/tooltip/lib/useTooltip.tsx +21 -6
  78. package/ts3.5/dist/commonjs/common/lib/styles/accessibleHide.d.ts +2 -2
  79. package/ts3.5/dist/commonjs/cookie-banner/index.d.ts +3 -3
  80. package/ts3.5/dist/commonjs/cookie-banner/lib/CookieBanner.d.ts +2 -19
  81. package/ts3.5/dist/commonjs/page-header/index.d.ts +3 -3
  82. package/ts3.5/dist/commonjs/page-header/lib/PageHeader.d.ts +2 -19
  83. package/ts3.5/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts +3 -0
  84. package/ts3.5/dist/commonjs/pagination/lib/Pagination/types.d.ts +39 -0
  85. package/ts3.5/dist/commonjs/pagination/lib/Pagination/usePaginationModel.d.ts +19 -0
  86. package/ts3.5/dist/commonjs/tooltip/lib/OverflowTooltip.d.ts +10 -0
  87. package/ts3.5/dist/commonjs/tooltip/lib/Tooltip.d.ts +9 -1
  88. package/ts3.5/dist/commonjs/tooltip/lib/useTooltip.d.ts +9 -1
  89. package/ts3.5/dist/es6/common/lib/styles/accessibleHide.d.ts +2 -2
  90. package/ts3.5/dist/es6/cookie-banner/index.d.ts +3 -3
  91. package/ts3.5/dist/es6/cookie-banner/lib/CookieBanner.d.ts +2 -19
  92. package/ts3.5/dist/es6/page-header/index.d.ts +3 -3
  93. package/ts3.5/dist/es6/page-header/lib/PageHeader.d.ts +2 -19
  94. package/ts3.5/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts +3 -0
  95. package/ts3.5/dist/es6/pagination/lib/Pagination/types.d.ts +39 -0
  96. package/ts3.5/dist/es6/pagination/lib/Pagination/usePaginationModel.d.ts +19 -0
  97. package/ts3.5/dist/es6/tooltip/lib/OverflowTooltip.d.ts +10 -0
  98. package/ts3.5/dist/es6/tooltip/lib/Tooltip.d.ts +9 -1
  99. package/ts3.5/dist/es6/tooltip/lib/useTooltip.d.ts +9 -1
@@ -1,10 +1,10 @@
1
- import {CSSProperties} from '@workday/canvas-kit-react/tokens';
1
+ import {CSSObject} from '@emotion/core';
2
2
 
3
3
  /**
4
4
  * A utility to hide content normal users while still making accessible to screenreaders
5
5
  * See https://a11y-101.com/development/skip-link
6
6
  */
7
- export const accessibleHide: CSSProperties = {
7
+ export const accessibleHide: CSSObject = {
8
8
  clip: 'rect(1px, 1px, 1px, 1px)', // Deprecated but still used by most browsers, clip-path will be taking its place soon.
9
9
  clipPath: 'polygon(0px 0px, 0px 0px, 0px 0px, 0px 0px)',
10
10
  position: 'absolute',
@@ -1,9 +1,4 @@
1
- # Canvas Kit Cookie Banner (Deprecated)
2
-
3
- > Note: As of Canvas Kit v6, CookieBanner is being soft-deprecated. It will be hard-deprecated
4
- > (completely removed) in v7. Please see the
5
- > [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
6
- > for more information.
1
+ # Canvas Kit Cookie Banner
7
2
 
8
3
  Cookie banner component.
9
4
 
@@ -20,28 +15,28 @@ Fixes a cookie banner to the bottom of the web page.
20
15
  Can be configured with a "Cookie Settings" element and a custom notice.
21
16
 
22
17
  ```tsx
23
- import DeprecatedCookieBanner from '@workday/canvas-kit-react/cookie-banner'
18
+ import CookieBanner from '@workday/canvas-kit-react/cookie-banner'
24
19
 
25
- <DeprecatedCookieBanner
20
+ <CookieBanner
26
21
  onAccept={this.onAccept}
27
22
  isClosed={this.state.acceptedCookies}
28
23
  />
29
24
 
30
- <DeprecatedCookieBanner
25
+ <CookieBanner
31
26
  onAccept={this.onAccept}
32
27
  isClosed={this.state.acceptedCookies}
33
28
  onClickSettings={this.openSettings}
34
29
  notice="Custom notice"
35
30
  />
36
31
 
37
- <DeprecatedCookieBanner
32
+ <CookieBanner
38
33
  onAccept={this.onAccept}
39
34
  isClosed={this.state.acceptedCookies}
40
35
  onClickSettings={this.openSettings}
41
- notice={`${DeprecatedCookieBanner.DefaultNotice} This is appended.`}
36
+ notice={`${CookieBanner.DefaultNotice} This is appended.`}
42
37
  />
43
38
 
44
- <DeprecatedCookieBanner
39
+ <CookieBanner
45
40
  onAccept={this.onAccept}
46
41
  isClosed={this.state.acceptedCookies}
47
42
  notice={<Component />}
@@ -56,11 +51,11 @@ import DeprecatedCookieBanner from '@workday/canvas-kit-react/cookie-banner'
56
51
  > without changing your settings, we’ll assume that you are willing to receive cookies.
57
52
 
58
53
  ```tsx
59
- <DeprecatedCookieBanner
54
+ <CookieBanner
60
55
  onAccept={this.onAccept}
61
56
  isClosed={this.state.acceptedCookies}
62
57
  onClickSettings={this.openSettings}
63
- notice={`${DeprecatedCookieBanner.DefaultNotice} This is appended.`}
58
+ notice={`${CookieBanner.DefaultNotice} This is appended.`}
64
59
  />
65
60
  ```
66
61
 
@@ -95,7 +90,7 @@ Default: `undefined`
95
90
 
96
91
  > Custom cookie notice text or element to display.
97
92
 
98
- Default: `DeprecatedCookieBanner.DefaultNotice`
93
+ Default: `CookieBanner.DefaultNotice`
99
94
 
100
95
  #### `settingsLabel: string`
101
96
 
@@ -1,5 +1,5 @@
1
- import DeprecatedCookieBanner from './lib/CookieBanner';
1
+ import CookieBanner from './lib/CookieBanner';
2
2
 
3
- export default DeprecatedCookieBanner;
4
- export {DeprecatedCookieBanner};
3
+ export default CookieBanner;
4
+ export {CookieBanner};
5
5
  export * from './lib/CookieBanner';
@@ -5,15 +5,7 @@ import styled from '@emotion/styled';
5
5
  import {colors, commonColors, type, space} from '@workday/canvas-kit-react/tokens';
6
6
  import {Hyperlink, HyperlinkProps, PrimaryButton} from '@workday/canvas-kit-react/button';
7
7
 
8
- /**
9
- * ### Deprecated Cookie Banner Props
10
- *
11
- * As of Canvas Kit v6, CookieBanner is being soft-deprecated.
12
- * It will be hard-deprecated (completely removed) in v7. Please see the
13
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
14
- * for more information.
15
- */
16
- export interface DeprecatedCookieBannerProps {
8
+ export interface CookieBannerProps {
17
9
  /**
18
10
  * If true, set the CookieBanner to the closed state.
19
11
  * @default false
@@ -65,7 +57,7 @@ const Banner = styled('div')(
65
57
  padding: `${space.s} 0`,
66
58
  },
67
59
  },
68
- ({isClosed}: Pick<DeprecatedCookieBannerProps, 'isClosed'>) =>
60
+ ({isClosed}: Pick<CookieBannerProps, 'isClosed'>) =>
69
61
  isClosed ? {transform: 'translateY(100%)'} : null
70
62
  );
71
63
 
@@ -103,30 +95,13 @@ const CookieSettings = (props: CookieSettingsProps) => {
103
95
  return <Hyperlink as="button" css={cookieSettingsStyles} {...props} />;
104
96
  };
105
97
 
106
- /**
107
- * ### Deprecated Cookie Banner
108
- *
109
- * As of Canvas Kit v6, this component is being soft-deprecated.
110
- * It will be hard-deprecated (completely removed) in v7. Please see the
111
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
112
- * for more information.
113
- */
114
- export default class DeprecatedCookieBanner extends React.Component<DeprecatedCookieBannerProps> {
115
- componentDidMount() {
116
- console.warn(
117
- `This component is being deprecated and will be removed in Canvas Kit V7.\n
118
- For more information, please see the V6 migration guide:\n
119
- https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page
120
- `
121
- );
122
- }
123
-
98
+ export default class CookieBanner extends React.Component<CookieBannerProps> {
124
99
  public static DefaultNotice =
125
100
  'We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we’ll assume that you are willing to receive cookies.';
126
101
 
127
102
  public render(): React.ReactNode {
128
103
  const {
129
- notice = DeprecatedCookieBanner.DefaultNotice,
104
+ notice = CookieBanner.DefaultNotice,
130
105
  settingsLabel = 'Cookie Settings',
131
106
  isClosed,
132
107
  onAccept,
@@ -1,7 +1,7 @@
1
- import { CSSProperties } from '@workday/canvas-kit-react/tokens';
1
+ import { CSSObject } from '@emotion/core';
2
2
  /**
3
3
  * A utility to hide content normal users while still making accessible to screenreaders
4
4
  * See https://a11y-101.com/development/skip-link
5
5
  */
6
- export declare const accessibleHide: CSSProperties;
6
+ export declare const accessibleHide: CSSObject;
7
7
  //# sourceMappingURL=accessibleHide.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accessibleHide.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/accessibleHide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,aAW5B,CAAC"}
1
+ {"version":3,"file":"accessibleHide.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/accessibleHide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAW5B,CAAC"}
@@ -1,5 +1,5 @@
1
- import DeprecatedCookieBanner from './lib/CookieBanner';
2
- export default DeprecatedCookieBanner;
3
- export { DeprecatedCookieBanner };
1
+ import CookieBanner from './lib/CookieBanner';
2
+ export default CookieBanner;
3
+ export { CookieBanner };
4
4
  export * from './lib/CookieBanner';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../cookie-banner/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,oBAAoB,CAAC;AAExD,eAAe,sBAAsB,CAAC;AACtC,OAAO,EAAC,sBAAsB,EAAC,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../cookie-banner/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAC,YAAY,EAAC,CAAC;AACtB,cAAc,oBAAoB,CAAC"}
@@ -7,6 +7,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  var CookieBanner_1 = __importDefault(require("./lib/CookieBanner"));
10
- exports.DeprecatedCookieBanner = CookieBanner_1.default;
10
+ exports.CookieBanner = CookieBanner_1.default;
11
11
  exports.default = CookieBanner_1.default;
12
12
  __export(require("./lib/CookieBanner"));
@@ -1,13 +1,5 @@
1
1
  import * as React from 'react';
2
- /**
3
- * ### Deprecated Cookie Banner Props
4
- *
5
- * As of Canvas Kit v6, CookieBanner is being soft-deprecated.
6
- * It will be hard-deprecated (completely removed) in v7. Please see the
7
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
8
- * for more information.
9
- */
10
- export interface DeprecatedCookieBannerProps {
2
+ export interface CookieBannerProps {
11
3
  /**
12
4
  * If true, set the CookieBanner to the closed state.
13
5
  * @default false
@@ -32,16 +24,7 @@ export interface DeprecatedCookieBannerProps {
32
24
  */
33
25
  settingsLabel?: string;
34
26
  }
35
- /**
36
- * ### Deprecated Cookie Banner
37
- *
38
- * As of Canvas Kit v6, this component is being soft-deprecated.
39
- * It will be hard-deprecated (completely removed) in v7. Please see the
40
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
41
- * for more information.
42
- */
43
- export default class DeprecatedCookieBanner extends React.Component<DeprecatedCookieBannerProps> {
44
- componentDidMount(): void;
27
+ export default class CookieBanner extends React.Component<CookieBannerProps> {
45
28
  static DefaultNotice: string;
46
29
  render(): React.ReactNode;
47
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CookieBanner.d.ts","sourceRoot":"","sources":["../../../../cookie-banner/lib/CookieBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAEnE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAElC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA8DD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CAAC,2BAA2B,CAAC;IAC9F,iBAAiB;IASjB,OAAc,aAAa,SAC6J;IAEjL,MAAM,IAAI,KAAK,CAAC,SAAS;CAwBjC"}
1
+ {"version":3,"file":"CookieBanner.d.ts","sourceRoot":"","sources":["../../../../cookie-banner/lib/CookieBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAEnE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAElC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA8DD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IAC1E,OAAc,aAAa,SAC6J;IAEjL,MAAM,IAAI,KAAK,CAAC,SAAS;CAwBjC"}
@@ -100,31 +100,20 @@ var cookieSettingsStyles = core_1.css({
100
100
  var CookieSettings = function (props) {
101
101
  return core_1.jsx(button_1.Hyperlink, __assign({ as: "button", css: cookieSettingsStyles }, props));
102
102
  };
103
- /**
104
- * ### Deprecated Cookie Banner
105
- *
106
- * As of Canvas Kit v6, this component is being soft-deprecated.
107
- * It will be hard-deprecated (completely removed) in v7. Please see the
108
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
109
- * for more information.
110
- */
111
- var DeprecatedCookieBanner = /** @class */ (function (_super) {
112
- __extends(DeprecatedCookieBanner, _super);
113
- function DeprecatedCookieBanner() {
103
+ var CookieBanner = /** @class */ (function (_super) {
104
+ __extends(CookieBanner, _super);
105
+ function CookieBanner() {
114
106
  return _super !== null && _super.apply(this, arguments) || this;
115
107
  }
116
- DeprecatedCookieBanner.prototype.componentDidMount = function () {
117
- console.warn("This component is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
118
- };
119
- DeprecatedCookieBanner.prototype.render = function () {
120
- var _a = this.props, _b = _a.notice, notice = _b === void 0 ? DeprecatedCookieBanner.DefaultNotice : _b, _c = _a.settingsLabel, settingsLabel = _c === void 0 ? 'Cookie Settings' : _c, isClosed = _a.isClosed, onAccept = _a.onAccept, onClickSettings = _a.onClickSettings, elemProps = __rest(_a, ["notice", "settingsLabel", "isClosed", "onAccept", "onClickSettings"]);
108
+ CookieBanner.prototype.render = function () {
109
+ var _a = this.props, _b = _a.notice, notice = _b === void 0 ? CookieBanner.DefaultNotice : _b, _c = _a.settingsLabel, settingsLabel = _c === void 0 ? 'Cookie Settings' : _c, isClosed = _a.isClosed, onAccept = _a.onAccept, onClickSettings = _a.onClickSettings, elemProps = __rest(_a, ["notice", "settingsLabel", "isClosed", "onAccept", "onClickSettings"]);
121
110
  return (core_1.jsx(Banner, __assign({ isClosed: isClosed }, elemProps),
122
111
  core_1.jsx(BannerItem, null, notice),
123
112
  core_1.jsx(BannerItem, { css: rowStyle },
124
113
  onClickSettings && (core_1.jsx(CookieSettings, { onClick: onClickSettings }, settingsLabel)),
125
114
  core_1.jsx(button_1.PrimaryButton, { onClick: onAccept, grow: true }, "Continue"))));
126
115
  };
127
- DeprecatedCookieBanner.DefaultNotice = 'We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we’ll assume that you are willing to receive cookies.';
128
- return DeprecatedCookieBanner;
116
+ CookieBanner.DefaultNotice = 'We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we’ll assume that you are willing to receive cookies.';
117
+ return CookieBanner;
129
118
  }(React.Component));
130
- exports.default = DeprecatedCookieBanner;
119
+ exports.default = CookieBanner;
@@ -1,5 +1,5 @@
1
- import DeprecatedPageHeader from './lib/PageHeader';
2
- export default DeprecatedPageHeader;
3
- export { DeprecatedPageHeader };
1
+ import PageHeader from './lib/PageHeader';
2
+ export default PageHeader;
3
+ export { PageHeader };
4
4
  export * from './lib/PageHeader';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,kBAAkB,CAAC;AAEpD,eAAe,oBAAoB,CAAC;AACpC,OAAO,EAAC,oBAAoB,EAAC,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,CAAC;AACpB,cAAc,kBAAkB,CAAC"}
@@ -7,6 +7,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  var PageHeader_1 = __importDefault(require("./lib/PageHeader"));
10
- exports.DeprecatedPageHeader = PageHeader_1.default;
10
+ exports.PageHeader = PageHeader_1.default;
11
11
  exports.default = PageHeader_1.default;
12
12
  __export(require("./lib/PageHeader"));
@@ -1,13 +1,5 @@
1
1
  import * as React from 'react';
2
- /**
3
- * ### Deprecated Page Header Props
4
- *
5
- * As of Canvas Kit v6, PageHeader is being soft-deprecated.
6
- * It will be hard-deprecated (completely removed) in v7. Please see the
7
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
8
- * for more information.
9
- */
10
- export interface DeprecatedPageHeaderProps {
2
+ export interface PageHeaderProps {
11
3
  /**
12
4
  * The text of the PageHeader title.
13
5
  */
@@ -23,16 +15,7 @@ export interface DeprecatedPageHeaderProps {
23
15
  */
24
16
  breakpoint?: number;
25
17
  }
26
- /**
27
- * ### Deprecated Page Header
28
- *
29
- * As of Canvas Kit v6, this component is being soft-deprecated.
30
- * It will be hard-deprecated (completely removed) in v7. Please see the
31
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
32
- * for more information.
33
- */
34
- export default class DeprecatedPageHeader extends React.Component<DeprecatedPageHeaderProps> {
35
- componentDidMount(): void;
18
+ export default class PageHeader extends React.Component<PageHeaderProps> {
36
19
  private renderChildren;
37
20
  render(): JSX.Element;
38
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../page-header/lib/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkDD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,KAAK,CAAC,SAAS,CAAC,yBAAyB,CAAC;IAC1F,iBAAiB;IASjB,OAAO,CAAC,cAAc;IAgBf,MAAM;CAad"}
1
+ {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../page-header/lib/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkDD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC;IACtE,OAAO,CAAC,cAAc;IAgBf,MAAM;CAad"}
@@ -88,23 +88,12 @@ var IconList = styled_1.default('div')({
88
88
  marginRight: tokens_1.space.xxs,
89
89
  },
90
90
  });
91
- /**
92
- * ### Deprecated Page Header
93
- *
94
- * As of Canvas Kit v6, this component is being soft-deprecated.
95
- * It will be hard-deprecated (completely removed) in v7. Please see the
96
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
97
- * for more information.
98
- */
99
- var DeprecatedPageHeader = /** @class */ (function (_super) {
100
- __extends(DeprecatedPageHeader, _super);
101
- function DeprecatedPageHeader() {
91
+ var PageHeader = /** @class */ (function (_super) {
92
+ __extends(PageHeader, _super);
93
+ function PageHeader() {
102
94
  return _super !== null && _super.apply(this, arguments) || this;
103
95
  }
104
- DeprecatedPageHeader.prototype.componentDidMount = function () {
105
- console.warn("This component is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
106
- };
107
- DeprecatedPageHeader.prototype.renderChildren = function (children) {
96
+ PageHeader.prototype.renderChildren = function (children) {
108
97
  return React.Children.map(children, function (child) {
109
98
  if (!React.isValidElement(child)) {
110
99
  return child;
@@ -117,7 +106,7 @@ var DeprecatedPageHeader = /** @class */ (function (_super) {
117
106
  return child;
118
107
  });
119
108
  };
120
- DeprecatedPageHeader.prototype.render = function () {
109
+ PageHeader.prototype.render = function () {
121
110
  // TODO: Standardize on prop spread location (see #150)
122
111
  var _a = this.props, _b = _a.title, title = _b === void 0 ? '' : _b, _c = _a.breakpoint, breakpoint = _c === void 0 ? 768 : _c, _d = _a.capWidth, capWidth = _d === void 0 ? false : _d, children = _a.children, elemProps = __rest(_a, ["title", "breakpoint", "capWidth", "children"]);
123
112
  return (React.createElement(Header, null,
@@ -125,6 +114,6 @@ var DeprecatedPageHeader = /** @class */ (function (_super) {
125
114
  React.createElement(Title, null, title),
126
115
  React.createElement(IconList, null, this.renderChildren(children)))));
127
116
  };
128
- return DeprecatedPageHeader;
117
+ return PageHeader;
129
118
  }(React.Component));
130
- exports.default = DeprecatedPageHeader;
119
+ exports.default = PageHeader;
@@ -3,6 +3,9 @@ import * as React from 'react';
3
3
  import { PaginationModel } from '../types';
4
4
  export interface GoToLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
5
5
  model: PaginationModel;
6
+ /**
7
+ * Accepts child elements or a render prop.
8
+ */
6
9
  children?: (model: PaginationModel) => React.ReactNode | React.ReactNode;
7
10
  }
8
11
  export declare const GoToLabel: ({ css: cssProp, model, children, ...elemProps }: GoToLabelProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../pagination/lib/Pagination/GoTo/Label.tsx"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IACjF,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;CAC1E;AAQD,eAAO,MAAM,SAAS,kFAMrB,CAAC"}
1
+ {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../pagination/lib/Pagination/GoTo/Label.tsx"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IACjF,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;CAC1E;AAQD,eAAO,MAAM,SAAS,kFAMrB,CAAC"}
@@ -1,16 +1,55 @@
1
1
  export interface PaginationState {
2
+ /**
3
+ * The page number for the current page
4
+ */
2
5
  currentPage: number;
6
+ /**
7
+ * The page number for the first page
8
+ */
3
9
  firstPage: number;
10
+ /**
11
+ * The page number for the last page (it can also be used as a total page
12
+ * count)
13
+ */
4
14
  lastPage: number;
15
+ /**
16
+ * An array of page numbers included in the pagination range
17
+ */
5
18
  range: number[];
19
+ /**
20
+ * The size of the pagination range
21
+ */
6
22
  rangeSize: number;
7
23
  }
8
24
  export interface PaginationEvents {
25
+ /**
26
+ * Sets the current page to a given page number (no safeguards)
27
+ */
9
28
  setCurrentPage: (page: number) => void;
29
+ /**
30
+ * Sets the current page to the first page
31
+ */
10
32
  first: () => void;
33
+ /**
34
+ * Sets the current page to the last page
35
+ */
11
36
  last: () => void;
37
+ /**
38
+ * Increments the current page by 1
39
+ */
12
40
  next: () => void;
41
+ /**
42
+ * Decrements the current page by 1
43
+ */
13
44
  previous: () => void;
45
+ /**
46
+ * Sets the current page to a given page number (with safeguards). `goTo`
47
+ * is very similar to `setCurrentPage`, but it has some built-in safeguards.
48
+ * If the page number provided is below the first page (e.g: `0`),
49
+ * `currentPage` will be set to the `firstPage`. Similarly, if the number
50
+ * provided is larger than the `lastPage`, it will set `currentPage` to the
51
+ * `lastPage`.
52
+ */
14
53
  goTo: (page: number) => void;
15
54
  }
16
55
  export interface PaginationModel {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;;;OAOG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
@@ -1,9 +1,28 @@
1
1
  import { PaginationModel } from './types';
2
2
  export declare type UsePaginationModelConfig = {
3
+ /**
4
+ * The page number for the last page (it can also be used as a total page
5
+ * count)
6
+ */
3
7
  lastPage: number;
8
+ /**
9
+ * The page number for the first page
10
+ * @default 1
11
+ */
4
12
  firstPage?: number;
13
+ /**
14
+ * The initial current page
15
+ * @default 1
16
+ */
5
17
  initialCurrentPage?: number;
18
+ /**
19
+ * The function called when the page changes
20
+ */
6
21
  onPageChange?: (pageNumber: number) => void;
22
+ /**
23
+ * The size of the pagination range
24
+ * @default 5
25
+ */
7
26
  rangeSize?: number;
8
27
  };
9
28
  export declare const usePaginationModel: ({ firstPage, initialCurrentPage, lastPage, rangeSize, onPageChange, }: UsePaginationModelConfig) => PaginationModel;
@@ -1 +1 @@
1
- {"version":3,"file":"usePaginationModel.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/usePaginationModel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAExC,oBAAY,wBAAwB,GAAG;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sHAsE9B,CAAC"}
1
+ {"version":3,"file":"usePaginationModel.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/usePaginationModel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAExC,oBAAY,wBAAwB,GAAG;IACrC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sHAsE9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/Tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmGD,eAAO,MAAM,GAAG,6DAad,CAAC"}
1
+ {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/Tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA6FD,eAAO,MAAM,GAAG,6DAad,CAAC"}
@@ -46,31 +46,25 @@ var StyledButton = common_1.styled('button')(__assign(__assign(__assign(__assign
46
46
  cursor: 'auto',
47
47
  backgroundColor: "transparent",
48
48
  },
49
- } }), function (_a) {
50
- var isSelected = _a.isSelected;
51
- if (isSelected) {
52
- return {
49
+ }, '&[aria-selected=true]': {
50
+ color: tokens_1.colors.blueberry400,
51
+ cursor: 'default',
52
+ '&:after': {
53
+ position: 'absolute',
54
+ height: tokens_1.space.xxxs,
55
+ borderRadius: tokens_1.borderRadius.m + " " + tokens_1.borderRadius.m + " 0px 0px",
56
+ backgroundColor: tokens_1.colors.blueberry400,
57
+ bottom: 0,
58
+ content: "''",
59
+ left: 0,
60
+ marginTop: '-2px',
61
+ width: '100%',
62
+ },
63
+ '&:hover, &:focus': {
64
+ backgroundColor: "transparent",
53
65
  color: tokens_1.colors.blueberry400,
54
- cursor: 'default',
55
- '&:after': {
56
- position: 'absolute',
57
- height: tokens_1.space.xxxs,
58
- borderRadius: tokens_1.borderRadius.m + " " + tokens_1.borderRadius.m + " 0px 0px",
59
- backgroundColor: tokens_1.colors.blueberry400,
60
- bottom: 0,
61
- content: "''",
62
- left: 0,
63
- marginTop: '-2px',
64
- width: '100%',
65
- },
66
- '&:hover, &:focus': {
67
- backgroundColor: "transparent",
68
- color: tokens_1.colors.blueberry400,
69
- },
70
- };
71
- }
72
- return {};
73
- });
66
+ },
67
+ } }));
74
68
  var useTab = function (model, elemProps, ref) {
75
69
  if (elemProps === void 0) { elemProps = {}; }
76
70
  var _a = common_1.useLocalRef(ref), localRef = _a.localRef, elementRef = _a.elementRef;
@@ -1,5 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import { Placement } from '@workday/canvas-kit-react/popup';
3
+ /**
4
+ * Look for an element within the tree for an overflow element (auto, scroll, clip, or hidden).
5
+ * This could be the passed element, or a descendant. If no element is found, `null` is returned.
6
+ */
7
+ export declare const findOverflowElement: (element: Element) => Element | null;
8
+ /**
9
+ * Look for an element within the tree for a `text-overflow` CSS property of `ellipsis`.
10
+ * This could be the passed element, or a descendant. If no element is found, `null` is returned.
11
+ */
12
+ export declare const findEllipsisElement: (element: Element) => Element | null;
3
13
  export interface OverflowTooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
4
14
  /**
5
15
  * The target (anchor element) for the Tooltip.
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA4B,SAAS,EAAS,MAAM,iCAAiC,CAAC;AA+D7F,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAiBD,eAAO,MAAM,eAAe,8EA4C3B,CAAC"}
1
+ {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA4B,SAAS,EAAS,MAAM,iCAAiC,CAAC;AAM7F;;;GAGG;AACH,eAAO,MAAM,mBAAmB,sCAoB/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,sCAe/B,CAAC;AAcF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAiBD,eAAO,MAAM,eAAe,8EA4C3B,CAAC"}
@@ -38,7 +38,7 @@ var useTooltip_1 = require("./useTooltip");
38
38
  * Look for an element within the tree for an overflow element (auto, scroll, clip, or hidden).
39
39
  * This could be the passed element, or a descendant. If no element is found, `null` is returned.
40
40
  */
41
- var findOverflowElement = function (element) {
41
+ exports.findOverflowElement = function (element) {
42
42
  var style = getComputedStyle(element);
43
43
  if (style.overflow === 'auto' ||
44
44
  style.overflow === 'scroll' ||
@@ -49,7 +49,7 @@ var findOverflowElement = function (element) {
49
49
  else if (element.children) {
50
50
  // `children` is not defined for SVGElement in IE11
51
51
  for (var i = 0; i < element.children.length; i++) {
52
- var overflowElement = findOverflowElement(element.children[i]);
52
+ var overflowElement = exports.findOverflowElement(element.children[i]);
53
53
  if (overflowElement) {
54
54
  return overflowElement;
55
55
  }
@@ -62,23 +62,25 @@ var findOverflowElement = function (element) {
62
62
  * Look for an element within the tree for a `text-overflow` CSS property of `ellipsis`.
63
63
  * This could be the passed element, or a descendant. If no element is found, `null` is returned.
64
64
  */
65
- var findEllipsisElement = function (element) {
65
+ exports.findEllipsisElement = function (element) {
66
66
  var style = getComputedStyle(element);
67
67
  if (style.textOverflow === 'ellipsis' || Number(style.webkitLineClamp) > 0) {
68
68
  return element;
69
69
  }
70
- else {
70
+ else if (element.children) {
71
+ // `children` is not defined for SVGElement in IE11
71
72
  for (var i = 0; i < element.children.length; i++) {
72
- var overflowElement = findEllipsisElement(element.children[i]);
73
+ var overflowElement = exports.findEllipsisElement(element.children[i]);
73
74
  if (overflowElement) {
74
75
  return overflowElement;
75
76
  }
76
77
  }
77
78
  return null;
78
79
  }
80
+ return null;
79
81
  };
80
82
  var isOverflowed = function (element) {
81
- var overflowElement = findEllipsisElement(element) || findOverflowElement(element);
83
+ var overflowElement = exports.findEllipsisElement(element) || exports.findOverflowElement(element);
82
84
  if (overflowElement) {
83
85
  return (overflowElement.scrollWidth > overflowElement.clientWidth ||
84
86
  overflowElement.scrollHeight > overflowElement.clientHeight);