@workday/canvas-kit-react 14.1.19 → 14.2.0-0009-next.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 (52) hide show
  1. package/banner/lib/hooks/useThemedPalette.ts +6 -0
  2. package/common/lib/CanvasProvider.tsx +6 -0
  3. package/common/lib/theming/README.md +104 -444
  4. package/common/lib/theming/getObjectProxy.ts +1 -0
  5. package/common/lib/theming/index.ts +28 -0
  6. package/common/lib/theming/types.ts +19 -1
  7. package/common/lib/utils/colorUtils.ts +2 -1
  8. package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts +6 -0
  9. package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts.map +1 -1
  10. package/dist/commonjs/banner/lib/hooks/useThemedPalette.js +6 -0
  11. package/dist/commonjs/common/lib/CanvasProvider.d.ts +3 -0
  12. package/dist/commonjs/common/lib/CanvasProvider.d.ts.map +1 -1
  13. package/dist/commonjs/common/lib/CanvasProvider.js +6 -2
  14. package/dist/commonjs/common/lib/theming/getObjectProxy.d.ts +1 -0
  15. package/dist/commonjs/common/lib/theming/getObjectProxy.d.ts.map +1 -1
  16. package/dist/commonjs/common/lib/theming/getObjectProxy.js +1 -0
  17. package/dist/commonjs/common/lib/theming/index.d.ts +28 -0
  18. package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
  19. package/dist/commonjs/common/lib/theming/index.js +28 -0
  20. package/dist/commonjs/common/lib/theming/types.d.ts +15 -0
  21. package/dist/commonjs/common/lib/theming/types.d.ts.map +1 -1
  22. package/dist/commonjs/common/lib/theming/types.js +1 -0
  23. package/dist/commonjs/common/lib/utils/colorUtils.d.ts +1 -0
  24. package/dist/commonjs/common/lib/utils/colorUtils.d.ts.map +1 -1
  25. package/dist/commonjs/common/lib/utils/colorUtils.js +1 -0
  26. package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  27. package/dist/commonjs/pagination/lib/Pagination/Controls.js +9 -15
  28. package/dist/commonjs/testing/lib/ComponentStatesTable.js +5 -5
  29. package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts +6 -0
  30. package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts.map +1 -1
  31. package/dist/es6/banner/lib/hooks/useThemedPalette.js +6 -0
  32. package/dist/es6/common/lib/CanvasProvider.d.ts +3 -0
  33. package/dist/es6/common/lib/CanvasProvider.d.ts.map +1 -1
  34. package/dist/es6/common/lib/CanvasProvider.js +6 -2
  35. package/dist/es6/common/lib/theming/getObjectProxy.d.ts +1 -0
  36. package/dist/es6/common/lib/theming/getObjectProxy.d.ts.map +1 -1
  37. package/dist/es6/common/lib/theming/getObjectProxy.js +1 -0
  38. package/dist/es6/common/lib/theming/index.d.ts +28 -0
  39. package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
  40. package/dist/es6/common/lib/theming/index.js +28 -0
  41. package/dist/es6/common/lib/theming/types.d.ts +15 -0
  42. package/dist/es6/common/lib/theming/types.d.ts.map +1 -1
  43. package/dist/es6/common/lib/theming/types.js +1 -0
  44. package/dist/es6/common/lib/utils/colorUtils.d.ts +1 -0
  45. package/dist/es6/common/lib/utils/colorUtils.d.ts.map +1 -1
  46. package/dist/es6/common/lib/utils/colorUtils.js +1 -0
  47. package/dist/es6/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  48. package/dist/es6/pagination/lib/Pagination/Controls.js +9 -15
  49. package/dist/es6/testing/lib/ComponentStatesTable.js +5 -5
  50. package/package.json +5 -5
  51. package/pagination/lib/Pagination/Controls.tsx +21 -17
  52. package/testing/lib/ComponentStatesTable.tsx +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"getObjectProxy.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/getObjectProxy.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;KAC/B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,EAAE,EACzC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,EACvC,QAAQ,EAAE,CAAC,GACV,CAAC,CAoBH"}
1
+ {"version":3,"file":"getObjectProxy.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/getObjectProxy.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;KAC/B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,EAAE,EACzC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,EACvC,QAAQ,EAAE,CAAC,GACV,CAAC,CAoBH"}
@@ -4,6 +4,7 @@
4
4
  * This function will also handle nested properties.
5
5
  * @param target A partial object with up to the same shape as the `fallback` object
6
6
  * @param fallback A fallback object. If a property to be accessed from the proxy is not available on the target object, the fallback object will be used
7
+ * @deprecated ⚠️ `getObjectProxy` is deprecated. This utility was used for theme object fallbacks. Now that we're shifting to a global theming approach based on CSS variables, this is no longer needed. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
7
8
  */
8
9
  export function getObjectProxy(target, fallback) {
9
10
  if (target) {
@@ -1,9 +1,37 @@
1
1
  export * from './breakpoints';
2
+ /**
3
+ * @deprecated ⚠️ Theme types are deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead.
4
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
5
+ */
2
6
  export * from './types';
7
+ /**
8
+ * @deprecated ⚠️ `styled` is deprecated. Use `createStyles` or `createStencil` from `@workday/canvas-kit-styling` instead.
9
+ * For more information, view our [Styling Docs](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--docs).
10
+ */
3
11
  export { default as styled, StyleRewriteFn, filterOutProps } from './styled';
12
+ /**
13
+ * @deprecated ⚠️ `defaultCanvasTheme` is deprecated. Use `defaultBranding` from `@workday/canvas-kit-react/common` instead.
14
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
15
+ */
4
16
  export * from './theme';
17
+ /**
18
+ * @deprecated ⚠️ `useTheme` and `getTheme` are deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead.
19
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
20
+ */
5
21
  export * from './useTheme';
22
+ /**
23
+ * @deprecated ⚠️ `useThemedRing` is deprecated. Use `brand.common.focusOutline` CSS variable instead.
24
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
25
+ */
6
26
  export * from './useThemedRing';
27
+ /**
28
+ * @deprecated ⚠️ `useIsRTL` is deprecated. Use `isElementRTL` or the `:dir()` CSS pseudo-class selector instead.
29
+ * For more information, see [MDN :dir()](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir).
30
+ */
7
31
  export * from './useIsRTL';
32
+ /**
33
+ * @deprecated ⚠️ `getObjectProxy` is deprecated. This utility was used for theme object fallbacks and is no longer needed.
34
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
35
+ */
8
36
  export * from './getObjectProxy';
9
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,cAAc,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B;;;GAGG;AACH,cAAc,SAAS,CAAC;AACxB;;;GAGG;AACH,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,cAAc,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAC3E;;;GAGG;AACH,cAAc,SAAS,CAAC;AACxB;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B;;;GAGG;AACH,cAAc,iBAAiB,CAAC;AAChC;;;GAGG;AACH,cAAc,YAAY,CAAC;AAC3B;;;GAGG;AACH,cAAc,kBAAkB,CAAC"}
@@ -1,8 +1,36 @@
1
1
  export * from './breakpoints';
2
+ /**
3
+ * @deprecated ⚠️ Theme types are deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead.
4
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
5
+ */
2
6
  export * from './types';
7
+ /**
8
+ * @deprecated ⚠️ `styled` is deprecated. Use `createStyles` or `createStencil` from `@workday/canvas-kit-styling` instead.
9
+ * For more information, view our [Styling Docs](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--docs).
10
+ */
3
11
  export { default as styled, filterOutProps } from './styled';
12
+ /**
13
+ * @deprecated ⚠️ `defaultCanvasTheme` is deprecated. Use `defaultBranding` from `@workday/canvas-kit-react/common` instead.
14
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
15
+ */
4
16
  export * from './theme';
17
+ /**
18
+ * @deprecated ⚠️ `useTheme` and `getTheme` are deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead.
19
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
20
+ */
5
21
  export * from './useTheme';
22
+ /**
23
+ * @deprecated ⚠️ `useThemedRing` is deprecated. Use `brand.common.focusOutline` CSS variable instead.
24
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
25
+ */
6
26
  export * from './useThemedRing';
27
+ /**
28
+ * @deprecated ⚠️ `useIsRTL` is deprecated. Use `isElementRTL` or the `:dir()` CSS pseudo-class selector instead.
29
+ * For more information, see [MDN :dir()](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir).
30
+ */
7
31
  export * from './useIsRTL';
32
+ /**
33
+ * @deprecated ⚠️ `getObjectProxy` is deprecated. This utility was used for theme object fallbacks and is no longer needed.
34
+ * For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
35
+ */
8
36
  export * from './getObjectProxy';
@@ -19,6 +19,7 @@ type CanvasThemeCommonPalette = {
19
19
  };
20
20
  /**
21
21
  * Direction of page content for internationalization
22
+ * @deprecated ⚠️ `ContentDirection` is deprecated. Use the `:dir()` CSS pseudo-class selector and CSS logical properties instead. For more information, see [MDN :dir()](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir) and [CSS Logical Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values).
22
23
  */
23
24
  export declare enum ContentDirection {
24
25
  LTR = "ltr",
@@ -26,6 +27,7 @@ export declare enum ContentDirection {
26
27
  }
27
28
  /**
28
29
  * The format of a Canvas theme for components that support it.
30
+ * @deprecated ⚠️ `CanvasTheme` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
29
31
  */
30
32
  export interface CanvasTheme {
31
33
  palette: {
@@ -244,12 +246,22 @@ export interface Themeable {
244
246
  }
245
247
  /**
246
248
  * For custom themes that do not overwrite every default.
249
+ * @deprecated ⚠️ `RecursivePartial` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
247
250
  */
248
251
  type RecursivePartial<T> = {
249
252
  [P in keyof T]?: RecursivePartial<T[P]>;
250
253
  };
254
+ /**
255
+ * @deprecated ⚠️ `PartialCanvasTheme` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
256
+ */
251
257
  export type PartialCanvasTheme = RecursivePartial<CanvasTheme>;
258
+ /**
259
+ * @deprecated ⚠️ `PartialCanvasThemePalette` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
260
+ */
252
261
  export type PartialCanvasThemePalette = RecursivePartial<CanvasThemePalette>;
262
+ /**
263
+ * @deprecated ⚠️ `PartialEmotionCanvasTheme` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
264
+ */
253
265
  export type PartialEmotionCanvasTheme = {
254
266
  canvas?: PartialCanvasTheme;
255
267
  };
@@ -258,6 +270,9 @@ declare module '@emotion/react' {
258
270
  canvas: CanvasTheme;
259
271
  }
260
272
  }
273
+ /**
274
+ * @deprecated ⚠️ `EmotionCanvasTheme` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
275
+ */
261
276
  export type EmotionCanvasTheme = {
262
277
  canvas: CanvasTheme;
263
278
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEnE;;GAEG;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAED;;GAEG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE;QACP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AkB,GAAG;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Direction of page content for internationalization
3
+ * @deprecated ⚠️ `ContentDirection` is deprecated. Use the `:dir()` CSS pseudo-class selector and CSS logical properties instead. For more information, see [MDN :dir()](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir) and [CSS Logical Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values).
3
4
  */
4
5
  export var ContentDirection;
5
6
  (function (ContentDirection) {
@@ -13,6 +13,7 @@ export declare const expandHex: (hex: string) => string;
13
13
  * have a high enough contrast ratio, picks the first color of the following that meets 4.5:1 or higher:
14
14
  * [frenchVanilla100, blackPepper300, blackPepper400, blackPepper500, blackPepper600]
15
15
  * (https://www.w3.org/TR/WCAG20-TECHS/G18.html)
16
+ * @deprecated ⚠️ `pickForegroundColor` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
16
17
  */
17
18
  export declare const pickForegroundColor: (background: string, darkColor?: string, lightColor?: string) => string | undefined;
18
19
  //# sourceMappingURL=colorUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAS,MAAM,kCAAkC,CAAC;AAGrE;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,sBAKpD;AAGD,eAAO,MAAM,SAAS,QAAS,MAAM,WAKpC,CAAC;AAWF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAClB,MAAM,cACN,MAAM,eACL,MAAM,uBAmBpB,CAAC"}
1
+ {"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAS,MAAM,kCAAkC,CAAC;AAGrE;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,sBAKpD;AAGD,eAAO,MAAM,SAAS,QAAS,MAAM,WAKpC,CAAC;AAWF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,eAClB,MAAM,cACN,MAAM,eACL,MAAM,uBAmBpB,CAAC"}
@@ -33,6 +33,7 @@ const colorPriority = [
33
33
  * have a high enough contrast ratio, picks the first color of the following that meets 4.5:1 or higher:
34
34
  * [frenchVanilla100, blackPepper300, blackPepper400, blackPepper500, blackPepper600]
35
35
  * (https://www.w3.org/TR/WCAG20-TECHS/G18.html)
36
+ * @deprecated ⚠️ `pickForegroundColor` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
36
37
  */
37
38
  export const pickForegroundColor = (background, darkColor, lightColor) => {
38
39
  const [bg, dark, light] = [getColor(background), getColor(darkColor), getColor(lightColor)];
@@ -1 +1 @@
1
- {"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/Controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAG/E,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAMhE,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,OAAO,cAAc,EAAE,KAAK,CAAC;IACpF,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,uBAAuB;CAAG;AAE3C,eAAO,MAAM,yBAAyB,iJAMpC,CAAC;AAEH,eAAO,MAAM,kBAAkB,6FAK7B,CAAC;AAEH,eAAO,MAAM,iBAAiB,2FA2B5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,2FA0B/B,CAAC;AAEH,eAAO,MAAM,gBAAgB,2FA0B3B,CAAC;AAEH,eAAO,MAAM,gBAAgB,2FA0B3B,CAAC"}
1
+ {"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/Controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAG/E,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAKhE,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,OAAO,cAAc,EAAE,KAAK,CAAC;IACpF,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,uBAAuB;CAAG;AAE3C,eAAO,MAAM,yBAAyB,iJAMpC,CAAC;AAYH,eAAO,MAAM,kBAAkB,6FAK7B,CAAC;AAEH,eAAO,MAAM,iBAAiB,2FAyB5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,2FAyB/B,CAAC;AAEH,eAAO,MAAM,gBAAgB,2FAyB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB,2FAyB3B,CAAC"}
@@ -6,11 +6,13 @@ import { createStencil } from '@workday/canvas-kit-styling';
6
6
  import { mergeStyles } from '@workday/canvas-kit-react/layout';
7
7
  import { TertiaryButton } from '@workday/canvas-kit-react/button';
8
8
  import { system } from '@workday/canvas-tokens-web';
9
- import { useRTL } from './common/utils/useRTL';
10
9
  import { PaginationContext } from './usePaginationModel';
11
10
  export const paginationControlsStencil = createStencil({
12
- base: { name: "2wo4b3", styles: "box-sizing:border-box;display:flex;gap:var(--cnvs-sys-space-x1);align-items:center;" }
13
- }, "pagination-controls-f02bc7");
11
+ base: { name: "5mqk0", styles: "box-sizing:border-box;display:flex;gap:var(--cnvs-sys-space-x1);align-items:center;" }
12
+ }, "pagination-controls-103bfc");
13
+ const controlButtonStencil = createStencil({
14
+ base: { name: "1e1nij", styles: "box-sizing:border-box;&:dir(rtl){& .wd-icon{transform:scaleX(-1);}}" }
15
+ }, "control-button-595088");
14
16
  export const PaginationControls = createComponent('div')({
15
17
  displayName: 'Pagination.Controls',
16
18
  Component(elemProps, ref, Element) {
@@ -29,9 +31,7 @@ export const JumpToFirstButton = createComponent('button')({
29
31
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
30
32
  model.events.setCurrentPage(model.state.firstPage);
31
33
  };
32
- const { shouldUseRTL } = useRTL();
33
- const icon = shouldUseRTL ? chevron2xRightSmallIcon : chevron2xLeftSmallIcon;
34
- return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
34
+ return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: chevron2xLeftSmallIcon, onClick: handleClick, ...mergeStyles(restProps, controlButtonStencil()) }));
35
35
  },
36
36
  });
37
37
  export const StepToPreviousButton = createComponent('button')({
@@ -46,9 +46,7 @@ export const StepToPreviousButton = createComponent('button')({
46
46
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
47
47
  model.events.setCurrentPage(model.state.currentPage - 1);
48
48
  };
49
- const { shouldUseRTL } = useRTL();
50
- const icon = shouldUseRTL ? chevronRightSmallIcon : chevronLeftSmallIcon;
51
- return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
49
+ return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: chevronLeftSmallIcon, onClick: handleClick, ...mergeStyles(restProps, controlButtonStencil()) }));
52
50
  },
53
51
  });
54
52
  export const StepToNextButton = createComponent('button')({
@@ -63,9 +61,7 @@ export const StepToNextButton = createComponent('button')({
63
61
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
64
62
  model.events.setCurrentPage(model.state.currentPage + 1);
65
63
  };
66
- const { shouldUseRTL } = useRTL();
67
- const icon = shouldUseRTL ? chevronLeftSmallIcon : chevronRightSmallIcon;
68
- return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
64
+ return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: chevronRightSmallIcon, onClick: handleClick, ...mergeStyles(restProps, controlButtonStencil()) }));
69
65
  },
70
66
  });
71
67
  export const JumpToLastButton = createComponent('button')({
@@ -80,8 +76,6 @@ export const JumpToLastButton = createComponent('button')({
80
76
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
81
77
  model.events.setCurrentPage(model.state.lastPage);
82
78
  };
83
- const { shouldUseRTL } = useRTL();
84
- const icon = shouldUseRTL ? chevron2xLeftSmallIcon : chevron2xRightSmallIcon;
85
- return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
79
+ return (_jsx(TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: chevron2xRightSmallIcon, onClick: handleClick, ...mergeStyles(restProps, controlButtonStencil()) }));
86
80
  },
87
81
  });
@@ -3,14 +3,14 @@ import { styled } from '@workday/canvas-kit-react/common';
3
3
  const Table = styled('table')({
4
4
  width: '100%',
5
5
  thead: {
6
- textAlign: 'left',
7
- paddingBottom: 16,
6
+ textAlign: 'start',
7
+ paddingBlockEnd: 16,
8
8
  },
9
9
  'td, th': {
10
10
  minWidth: 100,
11
- paddingBottom: 16,
12
- paddingRight: 16,
13
- textAlign: 'left',
11
+ paddingBlockEnd: 16,
12
+ paddingInlineEnd: 16,
13
+ textAlign: 'start',
14
14
  },
15
15
  });
16
16
  export const ComponentStatesTable = ({ rowProps, columnProps, children, }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "14.1.19",
3
+ "version": "14.2.0-0009-next.0",
4
4
  "description": "The parent module that contains all Workday Canvas Kit React components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -52,9 +52,9 @@
52
52
  "@popperjs/core": "^2.5.4",
53
53
  "@tanstack/react-virtual": "^3.13.9",
54
54
  "@workday/canvas-colors-web": "^2.0.0",
55
- "@workday/canvas-kit-popup-stack": "^14.1.19",
56
- "@workday/canvas-kit-preview-react": "^14.1.19",
57
- "@workday/canvas-kit-styling": "^14.1.19",
55
+ "@workday/canvas-kit-popup-stack": "^14.2.0-0009-next.0",
56
+ "@workday/canvas-kit-preview-react": "^14.2.0-0009-next.0",
57
+ "@workday/canvas-kit-styling": "^14.2.0-0009-next.0",
58
58
  "@workday/canvas-system-icons-web": "^3.0.36",
59
59
  "@workday/canvas-tokens-web": "^3.1.1",
60
60
  "@workday/design-assets-types": "^0.2.10",
@@ -69,5 +69,5 @@
69
69
  "@workday/canvas-accent-icons-web": "^3.0.0",
70
70
  "@workday/canvas-applet-icons-web": "^2.0.0"
71
71
  },
72
- "gitHead": "29a5672bb1d695563c5469d21223c15ba0321599"
72
+ "gitHead": "818a2267813e8bdc146bc3cdefef5a9a519e918b"
73
73
  }
@@ -11,7 +11,6 @@ import {mergeStyles} from '@workday/canvas-kit-react/layout';
11
11
  import {TertiaryButton} from '@workday/canvas-kit-react/button';
12
12
  import {system} from '@workday/canvas-tokens-web';
13
13
 
14
- import {useRTL} from './common/utils/useRTL';
15
14
  import {PaginationContext} from './usePaginationModel';
16
15
 
17
16
  export interface ControlButtonProps extends ExtractProps<typeof TertiaryButton, never> {
@@ -28,6 +27,16 @@ export const paginationControlsStencil = createStencil({
28
27
  },
29
28
  });
30
29
 
30
+ const controlButtonStencil = createStencil({
31
+ base: {
32
+ '&:dir(rtl)': {
33
+ '& .wd-icon': {
34
+ transform: 'scaleX(-1)',
35
+ },
36
+ },
37
+ },
38
+ });
39
+
31
40
  export const PaginationControls = createComponent('div')({
32
41
  displayName: 'Pagination.Controls',
33
42
  Component(elemProps: PaginationControlsProps, ref, Element) {
@@ -47,8 +56,6 @@ export const JumpToFirstButton = createComponent('button')({
47
56
  onClick?.(e);
48
57
  model.events.setCurrentPage(model.state.firstPage);
49
58
  };
50
- const {shouldUseRTL} = useRTL();
51
- const icon = shouldUseRTL ? chevron2xRightSmallIcon : chevron2xLeftSmallIcon;
52
59
 
53
60
  return (
54
61
  <TertiaryButton
@@ -56,9 +63,9 @@ export const JumpToFirstButton = createComponent('button')({
56
63
  as={Element}
57
64
  aria-disabled={isDisabled || undefined}
58
65
  size="small"
59
- icon={icon}
66
+ icon={chevron2xLeftSmallIcon}
60
67
  onClick={handleClick}
61
- {...restProps}
68
+ {...mergeStyles(restProps, controlButtonStencil())}
62
69
  />
63
70
  );
64
71
  },
@@ -76,17 +83,16 @@ export const StepToPreviousButton = createComponent('button')({
76
83
  onClick?.(e);
77
84
  model.events.setCurrentPage(model.state.currentPage - 1);
78
85
  };
79
- const {shouldUseRTL} = useRTL();
80
- const icon = shouldUseRTL ? chevronRightSmallIcon : chevronLeftSmallIcon;
86
+
81
87
  return (
82
88
  <TertiaryButton
83
89
  ref={ref}
84
90
  as={Element}
85
91
  aria-disabled={isDisabled || undefined}
86
92
  size="small"
87
- icon={icon}
93
+ icon={chevronLeftSmallIcon}
88
94
  onClick={handleClick}
89
- {...restProps}
95
+ {...mergeStyles(restProps, controlButtonStencil())}
90
96
  />
91
97
  );
92
98
  },
@@ -104,17 +110,16 @@ export const StepToNextButton = createComponent('button')({
104
110
  onClick?.(e);
105
111
  model.events.setCurrentPage(model.state.currentPage + 1);
106
112
  };
107
- const {shouldUseRTL} = useRTL();
108
- const icon = shouldUseRTL ? chevronLeftSmallIcon : chevronRightSmallIcon;
113
+
109
114
  return (
110
115
  <TertiaryButton
111
116
  ref={ref}
112
117
  as={Element}
113
118
  aria-disabled={isDisabled || undefined}
114
119
  size="small"
115
- icon={icon}
120
+ icon={chevronRightSmallIcon}
116
121
  onClick={handleClick}
117
- {...restProps}
122
+ {...mergeStyles(restProps, controlButtonStencil())}
118
123
  />
119
124
  );
120
125
  },
@@ -132,17 +137,16 @@ export const JumpToLastButton = createComponent('button')({
132
137
  onClick?.(e);
133
138
  model.events.setCurrentPage(model.state.lastPage);
134
139
  };
135
- const {shouldUseRTL} = useRTL();
136
- const icon = shouldUseRTL ? chevron2xLeftSmallIcon : chevron2xRightSmallIcon;
140
+
137
141
  return (
138
142
  <TertiaryButton
139
143
  ref={ref}
140
144
  as={Element}
141
145
  aria-disabled={isDisabled || undefined}
142
146
  size="small"
143
- icon={icon}
147
+ icon={chevron2xRightSmallIcon}
144
148
  onClick={handleClick}
145
- {...restProps}
149
+ {...mergeStyles(restProps, controlButtonStencil())}
146
150
  />
147
151
  );
148
152
  },
@@ -28,14 +28,14 @@ export interface ComponentStatesTableProps {
28
28
  const Table = styled('table')({
29
29
  width: '100%',
30
30
  thead: {
31
- textAlign: 'left',
32
- paddingBottom: 16,
31
+ textAlign: 'start',
32
+ paddingBlockEnd: 16,
33
33
  },
34
34
  'td, th': {
35
35
  minWidth: 100,
36
- paddingBottom: 16,
37
- paddingRight: 16,
38
- textAlign: 'left',
36
+ paddingBlockEnd: 16,
37
+ paddingInlineEnd: 16,
38
+ textAlign: 'start',
39
39
  },
40
40
  });
41
41