@workday/canvas-kit-react 6.0.0-alpha.0-next.33 → 6.0.0-alpha.0-next.39

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 (173) hide show
  1. package/banner/index.ts +1 -4
  2. package/banner/lib/Banner.tsx +85 -111
  3. package/banner/lib/BannerActionText.tsx +46 -0
  4. package/banner/lib/BannerIcon.tsx +40 -0
  5. package/banner/lib/BannerLabel.tsx +29 -0
  6. package/banner/lib/hooks/index.ts +6 -0
  7. package/banner/lib/hooks/useBanner.tsx +13 -0
  8. package/banner/lib/hooks/useBannerActionText.tsx +12 -0
  9. package/banner/lib/hooks/useBannerIcon.tsx +19 -0
  10. package/banner/lib/hooks/useBannerLabel.tsx +12 -0
  11. package/banner/lib/hooks/useBannerModel.tsx +63 -0
  12. package/banner/lib/hooks/useThemedPalette.ts +53 -0
  13. package/button/lib/IconButton.tsx +5 -2
  14. package/common/lib/styles/hideMouseFocus.ts +3 -2
  15. package/dist/commonjs/banner/index.d.ts +1 -3
  16. package/dist/commonjs/banner/index.d.ts.map +1 -1
  17. package/dist/commonjs/banner/index.js +1 -6
  18. package/dist/commonjs/banner/lib/Banner.d.ts +17 -33
  19. package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
  20. package/dist/commonjs/banner/lib/Banner.js +44 -69
  21. package/dist/commonjs/banner/lib/BannerActionText.d.ts +14 -0
  22. package/dist/commonjs/banner/lib/BannerActionText.d.ts.map +1 -0
  23. package/dist/commonjs/banner/lib/BannerActionText.js +42 -0
  24. package/dist/commonjs/banner/lib/BannerIcon.d.ts +14 -0
  25. package/dist/commonjs/banner/lib/BannerIcon.d.ts.map +1 -0
  26. package/dist/commonjs/banner/lib/BannerIcon.js +47 -0
  27. package/dist/commonjs/banner/lib/BannerLabel.d.ts +13 -0
  28. package/dist/commonjs/banner/lib/BannerLabel.d.ts.map +1 -0
  29. package/dist/commonjs/banner/lib/BannerLabel.js +45 -0
  30. package/dist/commonjs/banner/lib/hooks/index.d.ts +7 -0
  31. package/dist/commonjs/banner/lib/hooks/index.d.ts.map +1 -0
  32. package/dist/commonjs/banner/lib/hooks/index.js +11 -0
  33. package/dist/commonjs/banner/lib/hooks/useBanner.d.ts +16 -0
  34. package/dist/commonjs/banner/lib/hooks/useBanner.d.ts.map +1 -0
  35. package/dist/commonjs/banner/lib/hooks/useBanner.js +14 -0
  36. package/dist/commonjs/banner/lib/hooks/useBannerActionText.d.ts +15 -0
  37. package/dist/commonjs/banner/lib/hooks/useBannerActionText.d.ts.map +1 -0
  38. package/dist/commonjs/banner/lib/hooks/useBannerActionText.js +13 -0
  39. package/dist/commonjs/banner/lib/hooks/useBannerIcon.d.ts +18 -0
  40. package/dist/commonjs/banner/lib/hooks/useBannerIcon.d.ts.map +1 -0
  41. package/dist/commonjs/banner/lib/hooks/useBannerIcon.js +19 -0
  42. package/dist/commonjs/banner/lib/hooks/useBannerLabel.d.ts +15 -0
  43. package/dist/commonjs/banner/lib/hooks/useBannerLabel.d.ts.map +1 -0
  44. package/dist/commonjs/banner/lib/hooks/useBannerLabel.js +13 -0
  45. package/dist/commonjs/banner/lib/hooks/useBannerModel.d.ts +37 -0
  46. package/dist/commonjs/banner/lib/hooks/useBannerModel.d.ts.map +1 -0
  47. package/dist/commonjs/banner/lib/hooks/useBannerModel.js +22 -0
  48. package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts +11 -0
  49. package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts.map +1 -0
  50. package/dist/commonjs/banner/lib/hooks/useThemedPalette.js +39 -0
  51. package/dist/commonjs/button/lib/IconButton.d.ts +5 -2
  52. package/dist/commonjs/button/lib/IconButton.d.ts.map +1 -1
  53. package/dist/commonjs/common/lib/styles/hideMouseFocus.d.ts +3 -2
  54. package/dist/commonjs/common/lib/styles/hideMouseFocus.d.ts.map +1 -1
  55. package/dist/commonjs/loading-animation/lib/LoadingDots.js +3 -6
  56. package/dist/commonjs/pagination/lib/Pagination/common/Stack.d.ts +1 -1
  57. package/dist/commonjs/popup/lib/PopupCard.d.ts.map +1 -1
  58. package/dist/commonjs/popup/lib/PopupCard.js +3 -9
  59. package/dist/commonjs/popup/lib/hooks/useReturnFocus.d.ts +1 -1
  60. package/dist/commonjs/popup/lib/hooks/useReturnFocus.js +1 -1
  61. package/dist/commonjs/tabs/lib/menu/MenuList.d.ts.map +1 -1
  62. package/dist/commonjs/tabs/lib/menu/MenuList.js +1 -1
  63. package/dist/commonjs/tabs/lib/overflow/useOverflowModel.d.ts.map +1 -1
  64. package/dist/commonjs/tabs/lib/overflow/useOverflowModel.js +9 -0
  65. package/dist/commonjs/tabs/lib/overflow/useOverflowTarget.js +1 -1
  66. package/dist/commonjs/tooltip/lib/Tooltip.d.ts +9 -1
  67. package/dist/commonjs/tooltip/lib/Tooltip.d.ts.map +1 -1
  68. package/dist/commonjs/tooltip/lib/Tooltip.js +7 -2
  69. package/dist/commonjs/tooltip/lib/useTooltip.d.ts +9 -1
  70. package/dist/commonjs/tooltip/lib/useTooltip.d.ts.map +1 -1
  71. package/dist/commonjs/tooltip/lib/useTooltip.js +13 -8
  72. package/dist/es6/banner/index.d.ts +1 -3
  73. package/dist/es6/banner/index.d.ts.map +1 -1
  74. package/dist/es6/banner/index.js +1 -3
  75. package/dist/es6/banner/lib/Banner.d.ts +17 -33
  76. package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
  77. package/dist/es6/banner/lib/Banner.js +46 -71
  78. package/dist/es6/banner/lib/BannerActionText.d.ts +14 -0
  79. package/dist/es6/banner/lib/BannerActionText.d.ts.map +1 -0
  80. package/dist/es6/banner/lib/BannerActionText.js +40 -0
  81. package/dist/es6/banner/lib/BannerIcon.d.ts +14 -0
  82. package/dist/es6/banner/lib/BannerIcon.d.ts.map +1 -0
  83. package/dist/es6/banner/lib/BannerIcon.js +45 -0
  84. package/dist/es6/banner/lib/BannerLabel.d.ts +13 -0
  85. package/dist/es6/banner/lib/BannerLabel.d.ts.map +1 -0
  86. package/dist/es6/banner/lib/BannerLabel.js +36 -0
  87. package/dist/es6/banner/lib/hooks/index.d.ts +7 -0
  88. package/dist/es6/banner/lib/hooks/index.d.ts.map +1 -0
  89. package/dist/es6/banner/lib/hooks/index.js +6 -0
  90. package/dist/es6/banner/lib/hooks/useBanner.d.ts +16 -0
  91. package/dist/es6/banner/lib/hooks/useBanner.d.ts.map +1 -0
  92. package/dist/es6/banner/lib/hooks/useBanner.js +12 -0
  93. package/dist/es6/banner/lib/hooks/useBannerActionText.d.ts +15 -0
  94. package/dist/es6/banner/lib/hooks/useBannerActionText.d.ts.map +1 -0
  95. package/dist/es6/banner/lib/hooks/useBannerActionText.js +11 -0
  96. package/dist/es6/banner/lib/hooks/useBannerIcon.d.ts +18 -0
  97. package/dist/es6/banner/lib/hooks/useBannerIcon.d.ts.map +1 -0
  98. package/dist/es6/banner/lib/hooks/useBannerIcon.js +17 -0
  99. package/dist/es6/banner/lib/hooks/useBannerLabel.d.ts +15 -0
  100. package/dist/es6/banner/lib/hooks/useBannerLabel.d.ts.map +1 -0
  101. package/dist/es6/banner/lib/hooks/useBannerLabel.js +11 -0
  102. package/dist/es6/banner/lib/hooks/useBannerModel.d.ts +37 -0
  103. package/dist/es6/banner/lib/hooks/useBannerModel.d.ts.map +1 -0
  104. package/dist/es6/banner/lib/hooks/useBannerModel.js +20 -0
  105. package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts +11 -0
  106. package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts.map +1 -0
  107. package/dist/es6/banner/lib/hooks/useThemedPalette.js +33 -0
  108. package/dist/es6/button/lib/IconButton.d.ts +5 -2
  109. package/dist/es6/button/lib/IconButton.d.ts.map +1 -1
  110. package/dist/es6/common/lib/styles/hideMouseFocus.d.ts +3 -2
  111. package/dist/es6/common/lib/styles/hideMouseFocus.d.ts.map +1 -1
  112. package/dist/es6/loading-animation/lib/LoadingDots.js +1 -1
  113. package/dist/es6/pagination/lib/Pagination/common/Stack.d.ts +1 -1
  114. package/dist/es6/popup/lib/PopupCard.d.ts.map +1 -1
  115. package/dist/es6/popup/lib/PopupCard.js +3 -9
  116. package/dist/es6/popup/lib/hooks/useReturnFocus.d.ts +1 -1
  117. package/dist/es6/popup/lib/hooks/useReturnFocus.js +1 -1
  118. package/dist/es6/tabs/lib/menu/MenuList.d.ts.map +1 -1
  119. package/dist/es6/tabs/lib/menu/MenuList.js +1 -1
  120. package/dist/es6/tabs/lib/overflow/useOverflowModel.d.ts.map +1 -1
  121. package/dist/es6/tabs/lib/overflow/useOverflowModel.js +9 -0
  122. package/dist/es6/tabs/lib/overflow/useOverflowTarget.js +1 -1
  123. package/dist/es6/tooltip/lib/Tooltip.d.ts +9 -1
  124. package/dist/es6/tooltip/lib/Tooltip.d.ts.map +1 -1
  125. package/dist/es6/tooltip/lib/Tooltip.js +7 -2
  126. package/dist/es6/tooltip/lib/useTooltip.d.ts +9 -1
  127. package/dist/es6/tooltip/lib/useTooltip.d.ts.map +1 -1
  128. package/dist/es6/tooltip/lib/useTooltip.js +13 -8
  129. package/loading-animation/lib/LoadingDots.tsx +1 -1
  130. package/package.json +7 -6
  131. package/popup/lib/PopupCard.tsx +19 -30
  132. package/popup/lib/hooks/useReturnFocus.tsx +1 -1
  133. package/tabs/lib/menu/MenuList.tsx +2 -3
  134. package/tabs/lib/overflow/useOverflowModel.tsx +22 -0
  135. package/tabs/lib/overflow/useOverflowTarget.tsx +1 -1
  136. package/tooltip/lib/Tooltip.tsx +16 -1
  137. package/tooltip/lib/useTooltip.tsx +21 -6
  138. package/ts3.5/dist/commonjs/banner/index.d.ts +1 -3
  139. package/ts3.5/dist/commonjs/banner/lib/Banner.d.ts +17 -33
  140. package/ts3.5/dist/commonjs/banner/lib/BannerActionText.d.ts +14 -0
  141. package/ts3.5/dist/commonjs/banner/lib/BannerIcon.d.ts +14 -0
  142. package/ts3.5/dist/commonjs/banner/lib/BannerLabel.d.ts +13 -0
  143. package/ts3.5/dist/commonjs/banner/lib/hooks/index.d.ts +7 -0
  144. package/ts3.5/dist/commonjs/banner/lib/hooks/useBanner.d.ts +16 -0
  145. package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerActionText.d.ts +15 -0
  146. package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerIcon.d.ts +18 -0
  147. package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerLabel.d.ts +15 -0
  148. package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerModel.d.ts +37 -0
  149. package/ts3.5/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts +11 -0
  150. package/ts3.5/dist/commonjs/button/lib/IconButton.d.ts +5 -2
  151. package/ts3.5/dist/commonjs/common/lib/styles/hideMouseFocus.d.ts +3 -2
  152. package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/Stack.d.ts +1 -1
  153. package/ts3.5/dist/commonjs/popup/lib/hooks/useReturnFocus.d.ts +1 -1
  154. package/ts3.5/dist/commonjs/tooltip/lib/Tooltip.d.ts +9 -1
  155. package/ts3.5/dist/commonjs/tooltip/lib/useTooltip.d.ts +9 -1
  156. package/ts3.5/dist/es6/banner/index.d.ts +1 -3
  157. package/ts3.5/dist/es6/banner/lib/Banner.d.ts +17 -33
  158. package/ts3.5/dist/es6/banner/lib/BannerActionText.d.ts +14 -0
  159. package/ts3.5/dist/es6/banner/lib/BannerIcon.d.ts +14 -0
  160. package/ts3.5/dist/es6/banner/lib/BannerLabel.d.ts +13 -0
  161. package/ts3.5/dist/es6/banner/lib/hooks/index.d.ts +7 -0
  162. package/ts3.5/dist/es6/banner/lib/hooks/useBanner.d.ts +16 -0
  163. package/ts3.5/dist/es6/banner/lib/hooks/useBannerActionText.d.ts +15 -0
  164. package/ts3.5/dist/es6/banner/lib/hooks/useBannerIcon.d.ts +18 -0
  165. package/ts3.5/dist/es6/banner/lib/hooks/useBannerLabel.d.ts +15 -0
  166. package/ts3.5/dist/es6/banner/lib/hooks/useBannerModel.d.ts +37 -0
  167. package/ts3.5/dist/es6/banner/lib/hooks/useThemedPalette.d.ts +11 -0
  168. package/ts3.5/dist/es6/button/lib/IconButton.d.ts +5 -2
  169. package/ts3.5/dist/es6/common/lib/styles/hideMouseFocus.d.ts +3 -2
  170. package/ts3.5/dist/es6/pagination/lib/Pagination/common/Stack.d.ts +1 -1
  171. package/ts3.5/dist/es6/popup/lib/hooks/useReturnFocus.d.ts +1 -1
  172. package/ts3.5/dist/es6/tooltip/lib/Tooltip.d.ts +9 -1
  173. package/ts3.5/dist/es6/tooltip/lib/useTooltip.d.ts +9 -1
@@ -1,8 +1,9 @@
1
- import { CSSObject, Interpolation } from '@emotion/core';
1
+ import { Interpolation } from '@emotion/core';
2
+ import { CSSProperties } from '@workday/canvas-kit-react/tokens';
2
3
  /**
3
4
  * A utility to hide the default canvas style focus ring when using mouse input.
4
5
  * Requires wrapping your components in an InputProvider component.
5
6
  */
6
- export declare const hideMouseFocus: CSSObject;
7
+ export declare const hideMouseFocus: CSSProperties;
7
8
  export declare const mouseFocusBehavior: (selectors: Record<string, Interpolation<undefined>>) => Record<string, Interpolation<undefined>>;
8
9
  //# sourceMappingURL=hideMouseFocus.d.ts.map
@@ -16,7 +16,7 @@ declare type Options = {
16
16
  shouldUseRTL: boolean;
17
17
  };
18
18
  export declare const useStack: ({ direction, shouldUseRTL, spacing }: Options) => {
19
- flexDirection: StackDirection;
19
+ flexDirection: import("@workday/canvas-kit-labs-react/layout").StackDirection;
20
20
  "& > *:not(style) ~ *:not(style)": {
21
21
  marginTop: "0px" | "4px" | "8px" | "12px" | "16px" | "24px" | "32px" | "40px" | "64px" | "80px";
22
22
  } | {
@@ -3,7 +3,7 @@
3
3
  * `useInitialFocus`. This should be used with `useFocusRedirect` or `useFocusTrap` for a complete
4
4
  * focus management solution.
5
5
  *
6
- * This should ble used on popup elements that use `useInitialFocus`.
6
+ * This should be used on popup elements that use `useInitialFocus`.
7
7
  */
8
8
  export declare const useReturnFocus: (model: import("../../../common").Model<import("./usePopupModel").PopupState, import("./usePopupModel").PopupEvents>, elemProps?: {}) => {};
9
9
  //# sourceMappingURL=useReturnFocus.d.ts.map
@@ -37,6 +37,14 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
37
37
  * @default 'label'
38
38
  */
39
39
  type?: 'label' | 'describe' | 'muted';
40
+ /**
41
+ * Amount of time (in ms) to delay before showing the tooltip
42
+ */
43
+ showDelay?: number;
44
+ /**
45
+ * Amount of time (in ms) to delay before hiding the tooltip
46
+ */
47
+ hideDelay?: number;
40
48
  }
41
- export declare const Tooltip: ({ type, placement, title, children, ...elemProps }: TooltipProps) => JSX.Element;
49
+ export declare const Tooltip: ({ type, placement, title, children, showDelay, hideDelay, ...elemProps }: TooltipProps) => JSX.Element;
42
50
  //# sourceMappingURL=Tooltip.d.ts.map
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  * Convenience hook for creating components with tooltips. It will return an object of properties to mix
4
4
  * into a target, popper and tooltip
5
5
  */
6
- export declare function useTooltip<T extends Element = Element>({ type, titleText, }?: {
6
+ export declare function useTooltip<T extends Element = Element>({ type, titleText, showDelay, hideDelay, }?: {
7
7
  /**
8
8
  * Determines the tooltip type for accessibility.
9
9
  *
@@ -25,6 +25,14 @@ export declare function useTooltip<T extends Element = Element>({ type, titleTex
25
25
  * The content of the `aria-label` if `type` is `label.
26
26
  */
27
27
  titleText?: string;
28
+ /**
29
+ * Amount of time (in ms) to delay before showing the tooltip
30
+ */
31
+ showDelay?: number;
32
+ /**
33
+ * Amount of time (in ms) to delay before hiding the tooltip
34
+ */
35
+ hideDelay?: number;
28
36
  }): {
29
37
  /** Mix these properties into the target element. **Must be an Element** */
30
38
  targetProps: {
@@ -1,5 +1,3 @@
1
- import Banner from './lib/Banner';
2
- export default Banner;
3
- export { Banner };
4
1
  export * from './lib/Banner';
2
+ export * from './lib/hooks/';
5
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,38 +1,22 @@
1
1
  import * as React from 'react';
2
- import { ErrorType, Themeable } from '@workday/canvas-kit-react/common';
3
- export declare enum BannerVariant {
4
- Full = 0,
5
- Sticky = 1
6
- }
7
- export interface BannerProps extends Themeable, React.ButtonHTMLAttributes<HTMLButtonElement> {
8
- /**
9
- * The function called when the Banner is clicked.
10
- */
11
- onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
12
- /**
13
- * The label of the Banner.
14
- */
15
- label?: React.ReactNode;
2
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
3
+ import { Flex } from '@workday/canvas-kit-labs-react/layout';
4
+ import { BannerModel, BannerModelConfig } from './hooks';
5
+ export declare const BannerModelContext: React.Context<import("../../common").Model<{
6
+ hasError?: boolean | undefined;
7
+ isSticky?: boolean | undefined;
8
+ id?: string | undefined;
9
+ }, {}>>;
10
+ export interface BannerProps extends BannerModelConfig, ExtractProps<typeof Flex, never> {
11
+ model?: BannerModel;
16
12
  /**
17
- * The variant of the Banner. Accepts `Full` or `Sticky`.
18
- * @default BannerVariant.Full
13
+ * Children of the Banner. Should contain a `<Banner.Label>` a <Banner.Icon> and an optional `<Banner.ActionText>`
19
14
  */
20
- variant?: BannerVariant;
21
- /**
22
- * The type of error associated with the Banner (if applicable).
23
- * @default ErrorType.Alert
24
- */
25
- error?: ErrorType;
26
- /**
27
- * The text of the Banner action. This prop is also used as the aria-label for the action in the banner
28
- * @default 'View All'
29
- */
30
- actionText?: string;
31
- }
32
- declare class Banner extends React.Component<BannerProps> {
33
- static Variant: typeof BannerVariant;
34
- static ErrorType: typeof ErrorType;
35
- render(): JSX.Element;
15
+ children?: React.ReactNode;
36
16
  }
37
- export default Banner;
17
+ export declare const Banner: import("../../common").ElementComponent<"button", BannerProps> & {
18
+ Icon: import("../../common").ElementComponent<"span", import("./BannerIcon").BannerIconProps>;
19
+ Label: import("../../common").ElementComponent<"div", import("./BannerLabel").BannerLabelProps>;
20
+ ActionText: import("../../common").ElementComponent<"span", import("./BannerActionText").BannerActionTextProps>;
21
+ };
38
22
  //# sourceMappingURL=Banner.d.ts.map
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
3
+ import { Box } from '@workday/canvas-kit-labs-react/common';
4
+ import { BannerModel } from './hooks';
5
+ export interface BannerActionTextProps extends ExtractProps<typeof Box, never> {
6
+ model?: BannerModel;
7
+ /**
8
+ * The text of the Banner action.
9
+ * @default 'View All'
10
+ */
11
+ children?: React.ReactNode;
12
+ }
13
+ export declare const BannerActionText: import("../../common").ElementComponent<"span", BannerActionTextProps>;
14
+ //# sourceMappingURL=BannerActionText.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
2
+ import { SystemIcon } from '@workday/canvas-kit-react/icon';
3
+ import { CanvasSystemIcon } from '@workday/design-assets-types';
4
+ import { BannerModel } from './hooks';
5
+ export interface BannerIconProps extends Omit<ExtractProps<typeof SystemIcon, never>, 'icon'> {
6
+ model?: BannerModel;
7
+ /**
8
+ * Icon to show next to label
9
+ * @default exclamationTriangleIcon or exclamationCircleIcon when hasError is true
10
+ */
11
+ icon?: CanvasSystemIcon;
12
+ }
13
+ export declare const BannerIcon: import("../../common").ElementComponent<"span", BannerIconProps>;
14
+ //# sourceMappingURL=BannerIcon.d.ts.map
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
3
+ import { Flex } from '@workday/canvas-kit-labs-react/layout';
4
+ import { BannerModel } from './hooks';
5
+ export interface BannerLabelProps extends ExtractProps<typeof Flex, never> {
6
+ model?: BannerModel;
7
+ /**
8
+ * The text of the Banner.
9
+ */
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const BannerLabel: import("../../common").ElementComponent<"div", BannerLabelProps>;
13
+ //# sourceMappingURL=BannerLabel.d.ts.map
@@ -0,0 +1,7 @@
1
+ export * from './useBannerModel';
2
+ export * from './useThemedPalette';
3
+ export * from './useBannerIcon';
4
+ export * from './useBannerLabel';
5
+ export * from './useBannerActionText';
6
+ export * from './useBanner';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /// <reference types="@emotion/core" />
2
+ /**
3
+ * Adds the necessary props to a `Banner` component.
4
+ * Used by the Banner component
5
+ */
6
+ export declare const useBanner: <P extends {}, R>(model: import("../../../common").Model<{
7
+ hasError?: boolean | undefined;
8
+ isSticky?: boolean | undefined;
9
+ id?: string | undefined;
10
+ }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
11
+ 'aria-describedby': string;
12
+ 'aria-labelledby': string;
13
+ } & P & (R extends HTMLOrSVGElement ? {
14
+ ref: import("react").Ref<R>;
15
+ } : {});
16
+ //# sourceMappingURL=useBanner.d.ts.map
@@ -0,0 +1,15 @@
1
+ /// <reference types="@emotion/core" />
2
+ /**
3
+ * Adds the necessary props to a `ActionText` component.
4
+ * Used by the Banner.ActionText subcomponent
5
+ */
6
+ export declare const useBannerActionText: <P extends {}, R>(model: import("../../../common").Model<{
7
+ hasError?: boolean | undefined;
8
+ isSticky?: boolean | undefined;
9
+ id?: string | undefined;
10
+ }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
11
+ id: string;
12
+ } & P & (R extends HTMLOrSVGElement ? {
13
+ ref: import("react").Ref<R>;
14
+ } : {});
15
+ //# sourceMappingURL=useBannerActionText.d.ts.map
@@ -0,0 +1,18 @@
1
+ /// <reference types="@emotion/core" />
2
+ /**
3
+ * Adds the necessary props to a `Icon` component.
4
+ * Used by the Banner.Icon subcomponent
5
+ */
6
+ export declare const useBannerIcon: <P extends {}, R>(model: import("../../../common").Model<{
7
+ hasError?: boolean | undefined;
8
+ isSticky?: boolean | undefined;
9
+ id?: string | undefined;
10
+ }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
11
+ icon: import("@workday/design-assets-types").CanvasSystemIcon;
12
+ color: string | undefined;
13
+ colorHover: string | undefined;
14
+ size: number;
15
+ } & P & (R extends HTMLOrSVGElement ? {
16
+ ref: import("react").Ref<R>;
17
+ } : {});
18
+ //# sourceMappingURL=useBannerIcon.d.ts.map
@@ -0,0 +1,15 @@
1
+ /// <reference types="@emotion/core" />
2
+ /**
3
+ * Adds the necessary props to a `Label` component.
4
+ * Used by the Banner.Label subcomponent
5
+ */
6
+ export declare const useBannerLabel: <P extends {}, R>(model: import("../../../common").Model<{
7
+ hasError?: boolean | undefined;
8
+ isSticky?: boolean | undefined;
9
+ id?: string | undefined;
10
+ }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
11
+ id: string;
12
+ } & P & (R extends HTMLOrSVGElement ? {
13
+ ref: import("react").Ref<R>;
14
+ } : {});
15
+ //# sourceMappingURL=useBannerLabel.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { Model, ToModelConfig } from '@workday/canvas-kit-react/common';
2
+ declare type BannerState = {
3
+ /**
4
+ * Optional flag to denote the banner has an error to display. When true the default `Banner.Icon`
5
+ * will be `exclamationCircleIcon`, and a themed error color will be applied.
6
+ * @default false
7
+ */
8
+ hasError?: boolean;
9
+ /**
10
+ * Optional flag to denote the banner is stuck to the side of the screen. When true the default `Banner.ActionText`
11
+ * will be hidden, and some basic styles will be applied.
12
+ * You will still need to manually set the css `position` value.
13
+ * @default false
14
+ */
15
+ isSticky?: boolean;
16
+ /**
17
+ * Optional `id` provided to `Banner`'s subcomponents as HTML attributes:
18
+ * - `Banner` will set `aria-describedby` to `label-${id}`
19
+ * - `Banner` will set `aria-label` to `action-${id}`
20
+ * - `Banner.Label` will set `id` to `label-${id}`
21
+ * - `Banner.ActionText` will set `id` to `action-${id}`
22
+ *
23
+ * If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
24
+ * @default `useUniqueId()`
25
+ */
26
+ id?: string;
27
+ };
28
+ declare type BannerEvents = {};
29
+ export declare type BannerModel = Model<BannerState, BannerEvents>;
30
+ declare const BannerEventMap: {
31
+ guards: {};
32
+ callbacks: {};
33
+ };
34
+ export declare type BannerModelConfig = BannerState & Partial<ToModelConfig<BannerState, BannerEvents, typeof BannerEventMap>>;
35
+ export declare const useBannerModel: (config?: BannerModelConfig) => Model<BannerState, BannerEvents>;
36
+ export {};
37
+ //# sourceMappingURL=useBannerModel.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
2
+ declare type paletteSelection = Exclude<keyof EmotionCanvasTheme['canvas']['palette'], 'common'>;
3
+ interface BackgroundColors {
4
+ normal?: string;
5
+ hover?: string;
6
+ contrast?: string;
7
+ }
8
+ export declare function getPaletteColors(type: paletteSelection, theme: EmotionCanvasTheme): BackgroundColors;
9
+ export declare const useThemedPalette: (type: "alert" | "error" | "primary" | "success" | "neutral") => BackgroundColors;
10
+ export {};
11
+ //# sourceMappingURL=useThemedPalette.d.ts.map
@@ -3,9 +3,12 @@ import { Themeable } from '@workday/canvas-kit-react/common';
3
3
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
4
  export interface IconButtonProps extends Themeable {
5
5
  /**
6
- * The accessibility label to indicate the action triggered by clicking the IconButton.
6
+ * The accessibility label to indicate the action triggered by clicking the IconButton. This is optional because there are
7
+ * instances where an Icon Button might already have an `aria-labelledby`. In a case where an `aria-labelledby` is provided
8
+ * it will take precedence over the `aria-label` as explained here: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute
9
+ * We highly encourage consumers to either provide an `aria-label` OR an `aria-labelledby`
7
10
  */
8
- 'aria-label': string;
11
+ 'aria-label'?: string;
9
12
  /**
10
13
  * The type of the IconButton.
11
14
  * @default 'circle'
@@ -1,8 +1,9 @@
1
- import { CSSObject, Interpolation } from '@emotion/core';
1
+ import { Interpolation } from '@emotion/core';
2
+ import { CSSProperties } from '@workday/canvas-kit-react/tokens';
2
3
  /**
3
4
  * A utility to hide the default canvas style focus ring when using mouse input.
4
5
  * Requires wrapping your components in an InputProvider component.
5
6
  */
6
- export declare const hideMouseFocus: CSSObject;
7
+ export declare const hideMouseFocus: CSSProperties;
7
8
  export declare const mouseFocusBehavior: (selectors: Record<string, Interpolation<undefined>>) => Record<string, Interpolation<undefined>>;
8
9
  //# sourceMappingURL=hideMouseFocus.d.ts.map
@@ -16,7 +16,7 @@ declare type Options = {
16
16
  shouldUseRTL: boolean;
17
17
  };
18
18
  export declare const useStack: ({ direction, shouldUseRTL, spacing }: Options) => {
19
- flexDirection: StackDirection;
19
+ flexDirection: import("@workday/canvas-kit-labs-react/layout").StackDirection;
20
20
  "& > *:not(style) ~ *:not(style)": {
21
21
  marginTop: "0px" | "4px" | "8px" | "12px" | "16px" | "24px" | "32px" | "40px" | "64px" | "80px";
22
22
  } | {
@@ -3,7 +3,7 @@
3
3
  * `useInitialFocus`. This should be used with `useFocusRedirect` or `useFocusTrap` for a complete
4
4
  * focus management solution.
5
5
  *
6
- * This should ble used on popup elements that use `useInitialFocus`.
6
+ * This should be used on popup elements that use `useInitialFocus`.
7
7
  */
8
8
  export declare const useReturnFocus: (model: import("../../../common").Model<import("./usePopupModel").PopupState, import("./usePopupModel").PopupEvents>, elemProps?: {}) => {};
9
9
  //# sourceMappingURL=useReturnFocus.d.ts.map
@@ -37,6 +37,14 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
37
37
  * @default 'label'
38
38
  */
39
39
  type?: 'label' | 'describe' | 'muted';
40
+ /**
41
+ * Amount of time (in ms) to delay before showing the tooltip
42
+ */
43
+ showDelay?: number;
44
+ /**
45
+ * Amount of time (in ms) to delay before hiding the tooltip
46
+ */
47
+ hideDelay?: number;
40
48
  }
41
- export declare const Tooltip: ({ type, placement, title, children, ...elemProps }: TooltipProps) => JSX.Element;
49
+ export declare const Tooltip: ({ type, placement, title, children, showDelay, hideDelay, ...elemProps }: TooltipProps) => JSX.Element;
42
50
  //# sourceMappingURL=Tooltip.d.ts.map
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  * Convenience hook for creating components with tooltips. It will return an object of properties to mix
4
4
  * into a target, popper and tooltip
5
5
  */
6
- export declare function useTooltip<T extends Element = Element>({ type, titleText, }?: {
6
+ export declare function useTooltip<T extends Element = Element>({ type, titleText, showDelay, hideDelay, }?: {
7
7
  /**
8
8
  * Determines the tooltip type for accessibility.
9
9
  *
@@ -25,6 +25,14 @@ export declare function useTooltip<T extends Element = Element>({ type, titleTex
25
25
  * The content of the `aria-label` if `type` is `label.
26
26
  */
27
27
  titleText?: string;
28
+ /**
29
+ * Amount of time (in ms) to delay before showing the tooltip
30
+ */
31
+ showDelay?: number;
32
+ /**
33
+ * Amount of time (in ms) to delay before hiding the tooltip
34
+ */
35
+ hideDelay?: number;
28
36
  }): {
29
37
  /** Mix these properties into the target element. **Must be an Element** */
30
38
  targetProps: {