@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.
- package/banner/lib/hooks/useThemedPalette.ts +6 -0
- package/common/lib/CanvasProvider.tsx +6 -0
- package/common/lib/theming/README.md +104 -444
- package/common/lib/theming/getObjectProxy.ts +1 -0
- package/common/lib/theming/index.ts +28 -0
- package/common/lib/theming/types.ts +19 -1
- package/common/lib/utils/colorUtils.ts +2 -1
- package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts +6 -0
- package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts.map +1 -1
- package/dist/commonjs/banner/lib/hooks/useThemedPalette.js +6 -0
- package/dist/commonjs/common/lib/CanvasProvider.d.ts +3 -0
- package/dist/commonjs/common/lib/CanvasProvider.d.ts.map +1 -1
- package/dist/commonjs/common/lib/CanvasProvider.js +6 -2
- package/dist/commonjs/common/lib/theming/getObjectProxy.d.ts +1 -0
- package/dist/commonjs/common/lib/theming/getObjectProxy.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/getObjectProxy.js +1 -0
- package/dist/commonjs/common/lib/theming/index.d.ts +28 -0
- package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/index.js +28 -0
- package/dist/commonjs/common/lib/theming/types.d.ts +15 -0
- package/dist/commonjs/common/lib/theming/types.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/types.js +1 -0
- package/dist/commonjs/common/lib/utils/colorUtils.d.ts +1 -0
- package/dist/commonjs/common/lib/utils/colorUtils.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/colorUtils.js +1 -0
- package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Controls.js +9 -15
- package/dist/commonjs/testing/lib/ComponentStatesTable.js +5 -5
- package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts +6 -0
- package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts.map +1 -1
- package/dist/es6/banner/lib/hooks/useThemedPalette.js +6 -0
- package/dist/es6/common/lib/CanvasProvider.d.ts +3 -0
- package/dist/es6/common/lib/CanvasProvider.d.ts.map +1 -1
- package/dist/es6/common/lib/CanvasProvider.js +6 -2
- package/dist/es6/common/lib/theming/getObjectProxy.d.ts +1 -0
- package/dist/es6/common/lib/theming/getObjectProxy.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/getObjectProxy.js +1 -0
- package/dist/es6/common/lib/theming/index.d.ts +28 -0
- package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/index.js +28 -0
- package/dist/es6/common/lib/theming/types.d.ts +15 -0
- package/dist/es6/common/lib/theming/types.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/types.js +1 -0
- package/dist/es6/common/lib/utils/colorUtils.d.ts +1 -0
- package/dist/es6/common/lib/utils/colorUtils.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/colorUtils.js +1 -0
- package/dist/es6/pagination/lib/Pagination/Controls.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/Controls.js +9 -15
- package/dist/es6/testing/lib/ComponentStatesTable.js +5 -5
- package/package.json +5 -5
- package/pagination/lib/Pagination/Controls.tsx +21 -17
- package/testing/lib/ComponentStatesTable.tsx +5 -5
|
@@ -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, 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';
|
|
@@ -23,6 +23,7 @@ type CanvasThemeCommonPalette = {
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Direction of page content for internationalization
|
|
26
|
+
* @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).
|
|
26
27
|
*/
|
|
27
28
|
export enum ContentDirection {
|
|
28
29
|
LTR = 'ltr',
|
|
@@ -31,8 +32,8 @@ export enum ContentDirection {
|
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* The format of a Canvas theme for components that support it.
|
|
35
|
+
* @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).
|
|
34
36
|
*/
|
|
35
|
-
|
|
36
37
|
export interface CanvasTheme {
|
|
37
38
|
palette: {
|
|
38
39
|
common: CanvasThemeCommonPalette;
|
|
@@ -252,17 +253,34 @@ export interface Themeable {
|
|
|
252
253
|
|
|
253
254
|
/**
|
|
254
255
|
* For custom themes that do not overwrite every default.
|
|
256
|
+
* @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).
|
|
255
257
|
*/
|
|
256
258
|
type RecursivePartial<T> = {
|
|
257
259
|
[P in keyof T]?: RecursivePartial<T[P]>;
|
|
258
260
|
};
|
|
259
261
|
|
|
262
|
+
/**
|
|
263
|
+
* @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).
|
|
264
|
+
*/
|
|
260
265
|
export type PartialCanvasTheme = RecursivePartial<CanvasTheme>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @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).
|
|
269
|
+
*/
|
|
261
270
|
export type PartialCanvasThemePalette = RecursivePartial<CanvasThemePalette>;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @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).
|
|
274
|
+
*/
|
|
262
275
|
export type PartialEmotionCanvasTheme = {canvas?: PartialCanvasTheme};
|
|
276
|
+
|
|
263
277
|
declare module '@emotion/react' {
|
|
264
278
|
export interface Theme {
|
|
265
279
|
canvas: CanvasTheme;
|
|
266
280
|
}
|
|
267
281
|
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @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).
|
|
285
|
+
*/
|
|
268
286
|
export type EmotionCanvasTheme = {canvas: CanvasTheme};
|
|
@@ -16,7 +16,7 @@ export function getColor(value?: CanvasColor | string) {
|
|
|
16
16
|
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
17
17
|
export const expandHex = (hex: string) => {
|
|
18
18
|
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
19
|
-
return hex.replace(shorthandRegex, function(m: string, r: string, g: string, b: string) {
|
|
19
|
+
return hex.replace(shorthandRegex, function (m: string, r: string, g: string, b: string) {
|
|
20
20
|
return r + r + g + g + b + b;
|
|
21
21
|
});
|
|
22
22
|
};
|
|
@@ -37,6 +37,7 @@ const colorPriority = [
|
|
|
37
37
|
* have a high enough contrast ratio, picks the first color of the following that meets 4.5:1 or higher:
|
|
38
38
|
* [frenchVanilla100, blackPepper300, blackPepper400, blackPepper500, blackPepper600]
|
|
39
39
|
* (https://www.w3.org/TR/WCAG20-TECHS/G18.html)
|
|
40
|
+
* @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).
|
|
40
41
|
*/
|
|
41
42
|
export const pickForegroundColor = (
|
|
42
43
|
background: string,
|
|
@@ -5,7 +5,13 @@ interface BackgroundColors {
|
|
|
5
5
|
hover?: string;
|
|
6
6
|
contrast?: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated ⚠️ `getPaletteColors` is deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
10
|
+
*/
|
|
8
11
|
export declare const getPaletteColors: (type: paletteSelection, theme: EmotionCanvasTheme) => BackgroundColors;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated ⚠️ `useThemedPalette` 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).
|
|
14
|
+
*/
|
|
9
15
|
export declare const useThemedPalette: (type: paletteSelection) => BackgroundColors;
|
|
10
16
|
export {};
|
|
11
17
|
//# sourceMappingURL=useThemedPalette.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemedPalette.d.ts","sourceRoot":"","sources":["../../../../../banner/lib/hooks/useThemedPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,kBAAkB,EAAW,MAAM,kCAAkC,CAAC;AAIlG,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEzF,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmBD,eAAO,MAAM,gBAAgB,SACrB,gBAAgB,SACf,kBAAkB,KACxB,gBAcF,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAU,gBAAgB,qBAItD,CAAC"}
|
|
1
|
+
{"version":3,"file":"useThemedPalette.d.ts","sourceRoot":"","sources":["../../../../../banner/lib/hooks/useThemedPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,kBAAkB,EAAW,MAAM,kCAAkC,CAAC;AAIlG,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEzF,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmBD;;GAEG;AACH,eAAO,MAAM,gBAAgB,SACrB,gBAAgB,SACf,kBAAkB,KACxB,gBAcF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,gBAAgB,qBAItD,CAAC"}
|
|
@@ -19,6 +19,9 @@ const getPaletteColorsFromTheme = (palette, fallbackColors) => {
|
|
|
19
19
|
: fallbackColors === null || fallbackColors === void 0 ? void 0 : fallbackColors.contrast,
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated ⚠️ `getPaletteColors` is deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
24
|
+
*/
|
|
22
25
|
const getPaletteColors = (type, theme) => {
|
|
23
26
|
const palette = theme.canvas.palette[type];
|
|
24
27
|
switch (type) {
|
|
@@ -34,6 +37,9 @@ const getPaletteColors = (type, theme) => {
|
|
|
34
37
|
}
|
|
35
38
|
};
|
|
36
39
|
exports.getPaletteColors = getPaletteColors;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated ⚠️ `useThemedPalette` 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).
|
|
42
|
+
*/
|
|
37
43
|
const useThemedPalette = (type) => {
|
|
38
44
|
const theme = (0, common_1.useTheme)();
|
|
39
45
|
return (0, exports.getPaletteColors)(type, theme);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PartialEmotionCanvasTheme } from './theming';
|
|
3
3
|
export interface CanvasProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated ⚠️ `theme` 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).
|
|
6
|
+
*/
|
|
4
7
|
theme?: PartialEmotionCanvasTheme;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/CanvasProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,yBAAyB,EAAW,MAAM,WAAW,CAAC;AAIlF,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACnC;AAYD;;GAEG;AACH,eAAO,MAAM,eAAe,QA0C1B,CAAC;AAEH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"CanvasProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/CanvasProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,yBAAyB,EAAW,MAAM,WAAW,CAAC;AAIlF,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACnC;AAYD;;GAEG;AACH,eAAO,MAAM,eAAe,QA0C1B,CAAC;AAEH,eAAO,MAAM,uBAAuB,UAI3B,yBAAyB,GAAG,SAAS,aACjC,MAAM,cAAc,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC7C,CAAC;AAEF,eAAO,MAAM,cAAc,kCAIxB,mBAAmB,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,4CAgBzD,CAAC"}
|
|
@@ -18,8 +18,12 @@ const mappedKeys = {
|
|
|
18
18
|
/**
|
|
19
19
|
* If you wish to reset the theme to the default, apply this class on the CanvasProvider.
|
|
20
20
|
*/
|
|
21
|
-
exports.defaultBranding = (0, canvas_kit_styling_1.createStyles)({ name: "
|
|
22
|
-
const useCanvasThemeToCssVars = (
|
|
21
|
+
exports.defaultBranding = (0, canvas_kit_styling_1.createStyles)({ name: "hnfk8", styles: "--cnvs-brand-common-alert-inner:var(--cnvs-base-palette-amber-400);--cnvs-brand-common-alert-outer:var(--cnvs-base-palette-amber-500);--cnvs-brand-common-error-inner:var(--cnvs-base-palette-red-500);--cnvs-brand-common-focus-outline:var(--cnvs-base-palette-blue-500);--cnvs-brand-neutral-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-neutral-darkest:var(--cnvs-base-palette-slate-800);--cnvs-brand-neutral-dark:var(--cnvs-base-palette-slate-700);--cnvs-brand-neutral-base:var(--cnvs-base-palette-slate-600);--cnvs-brand-neutral-light:var(--cnvs-base-palette-slate-200);--cnvs-brand-neutral-lighter:var(--cnvs-base-palette-slate-50);--cnvs-brand-neutral-lightest:var(--cnvs-base-palette-slate-25);--cnvs-brand-success-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-success-darkest:var(--cnvs-base-palette-green-800);--cnvs-brand-success-dark:var(--cnvs-base-palette-green-700);--cnvs-brand-success-base:var(--cnvs-base-palette-green-600);--cnvs-brand-success-light:var(--cnvs-base-palette-green-200);--cnvs-brand-success-lighter:var(--cnvs-base-palette-green-50);--cnvs-brand-success-lightest:var(--cnvs-base-palette-green-25);--cnvs-brand-error-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-error-darkest:var(--cnvs-base-palette-red-800);--cnvs-brand-error-dark:var(--cnvs-base-palette-red-700);--cnvs-brand-error-base:var(--cnvs-base-palette-red-600);--cnvs-brand-error-light:var(--cnvs-base-palette-red-200);--cnvs-brand-error-lighter:var(--cnvs-base-palette-red-50);--cnvs-brand-error-lightest:var(--cnvs-base-palette-red-25);--cnvs-brand-alert-accent:var(--cnvs-base-palette-neutral-900);--cnvs-brand-alert-darkest:var(--cnvs-base-palette-amber-600);--cnvs-brand-alert-dark:var(--cnvs-base-palette-amber-500);--cnvs-brand-alert-base:var(--cnvs-base-palette-amber-400);--cnvs-brand-alert-light:var(--cnvs-base-palette-amber-200);--cnvs-brand-alert-lighter:var(--cnvs-base-palette-amber-50);--cnvs-brand-alert-lightest:var(--cnvs-base-palette-amber-25);--cnvs-brand-primary-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-primary-darkest:var(--cnvs-base-palette-blue-800);--cnvs-brand-primary-dark:var(--cnvs-base-palette-blue-700);--cnvs-brand-primary-base:var(--cnvs-base-palette-blue-600);--cnvs-brand-primary-light:var(--cnvs-base-palette-blue-200);--cnvs-brand-primary-lighter:var(--cnvs-base-palette-blue-50);--cnvs-brand-primary-lightest:var(--cnvs-base-palette-blue-25);--cnvs-brand-gradient-primary:linear-gradient(90deg, var(--cnvs-brand-primary-base) 0%, var(--cnvs-brand-primary-dark) 100%);" });
|
|
22
|
+
const useCanvasThemeToCssVars = (
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated ⚠️ `theme` 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).
|
|
25
|
+
*/
|
|
26
|
+
theme, elemProps) => {
|
|
23
27
|
const filledTheme = (0, theming_1.useTheme)(theme);
|
|
24
28
|
const className = (elemProps.className || '').split(' ').concat(exports.defaultBranding).join(' ');
|
|
25
29
|
const style = elemProps.style || {};
|
|
@@ -10,6 +10,7 @@ export type RecursivePartial<T> = {
|
|
|
10
10
|
* This function will also handle nested properties.
|
|
11
11
|
* @param target A partial object with up to the same shape as the `fallback` object
|
|
12
12
|
* @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
|
|
13
|
+
* @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).
|
|
13
14
|
*/
|
|
14
15
|
export declare function getObjectProxy<T extends {}>(target: RecursivePartial<T> | undefined, fallback: T): T;
|
|
15
16
|
//# sourceMappingURL=getObjectProxy.d.ts.map
|
|
@@ -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
|
|
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"}
|
|
@@ -7,6 +7,7 @@ exports.getObjectProxy = void 0;
|
|
|
7
7
|
* This function will also handle nested properties.
|
|
8
8
|
* @param target A partial object with up to the same shape as the `fallback` object
|
|
9
9
|
* @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
|
|
10
|
+
* @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).
|
|
10
11
|
*/
|
|
11
12
|
function getObjectProxy(target, fallback) {
|
|
12
13
|
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"}
|
|
@@ -19,12 +19,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.filterOutProps = exports.styled = void 0;
|
|
21
21
|
__exportStar(require("./breakpoints"), exports);
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated ⚠️ Theme types are deprecated. Use CSS variables from `@workday/canvas-tokens-web` 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
|
+
*/
|
|
22
26
|
__exportStar(require("./types"), exports);
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated ⚠️ `styled` is deprecated. Use `createStyles` or `createStencil` from `@workday/canvas-kit-styling` instead.
|
|
29
|
+
* For more information, view our [Styling Docs](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--docs).
|
|
30
|
+
*/
|
|
23
31
|
var styled_1 = require("./styled");
|
|
24
32
|
Object.defineProperty(exports, "styled", { enumerable: true, get: function () { return __importDefault(styled_1).default; } });
|
|
25
33
|
Object.defineProperty(exports, "filterOutProps", { enumerable: true, get: function () { return styled_1.filterOutProps; } });
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated ⚠️ `defaultCanvasTheme` is deprecated. Use `defaultBranding` from `@workday/canvas-kit-react/common` instead.
|
|
36
|
+
* For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
37
|
+
*/
|
|
26
38
|
__exportStar(require("./theme"), exports);
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated ⚠️ `useTheme` and `getTheme` are deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead.
|
|
41
|
+
* For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
42
|
+
*/
|
|
27
43
|
__exportStar(require("./useTheme"), exports);
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated ⚠️ `useThemedRing` is deprecated. Use `brand.common.focusOutline` CSS variable instead.
|
|
46
|
+
* For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
47
|
+
*/
|
|
28
48
|
__exportStar(require("./useThemedRing"), exports);
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated ⚠️ `useIsRTL` is deprecated. Use `isElementRTL` or the `:dir()` CSS pseudo-class selector instead.
|
|
51
|
+
* For more information, see [MDN :dir()](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir).
|
|
52
|
+
*/
|
|
29
53
|
__exportStar(require("./useIsRTL"), exports);
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated ⚠️ `getObjectProxy` is deprecated. This utility was used for theme object fallbacks and is no longer needed.
|
|
56
|
+
* For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
57
|
+
*/
|
|
30
58
|
__exportStar(require("./getObjectProxy"), exports);
|
|
@@ -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
|
|
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;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE;QACP,MAAM,EAAE,wBAAwB,CAAC;QACjC,OAAO,EAAE,kBAAkB,CAAC;QAC5B,KAAK,EAAE,kBAAkB,CAAC;QAC1B,KAAK,EAAE,kBAAkB,CAAC;QAC1B,OAAO,EAAE,kBAAkB,CAAC;QAC5B,OAAO,EAAE,kBAAkB,CAAC;KAC7B,CAAC;IACF;;;;;;;;OAQG;IACH,WAAW,EAAE;QACX;;;;;;;;;;;;;;;;;;;;;WAqBG;QACH,MAAM,EAAE,iBAAiB,CAAC;QAC1B;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,EAAE,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,MAAM,CAAC;QACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA4CG;QACH,IAAI,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,MAAM,CAAC;QACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA6CG;QACH,OAAO,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,iBAAiB,KAAK,MAAM,CAAC;QACtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA4CG;QACH,IAAI,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,MAAM,CAAC;KAC1C,CAAC;IACF,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;GAGG;AACH,KAAK,gBAAgB,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IAAC,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAAC,CAAC;AAEtE,OAAO,QAAQ,gBAAgB,CAAC;IAC9B,UAAiB,KAAK;QACpB,MAAM,EAAE,WAAW,CAAC;KACrB;CACF;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ContentDirection = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Direction of page content for internationalization
|
|
6
|
+
* @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).
|
|
6
7
|
*/
|
|
7
8
|
var ContentDirection;
|
|
8
9
|
(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
|
|
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"}
|
|
@@ -41,6 +41,7 @@ const colorPriority = [
|
|
|
41
41
|
* have a high enough contrast ratio, picks the first color of the following that meets 4.5:1 or higher:
|
|
42
42
|
* [frenchVanilla100, blackPepper300, blackPepper400, blackPepper500, blackPepper600]
|
|
43
43
|
* (https://www.w3.org/TR/WCAG20-TECHS/G18.html)
|
|
44
|
+
* @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).
|
|
44
45
|
*/
|
|
45
46
|
const pickForegroundColor = (background, darkColor, lightColor) => {
|
|
46
47
|
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;
|
|
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"}
|
|
@@ -32,11 +32,13 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
32
32
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
33
33
|
const button_1 = require("@workday/canvas-kit-react/button");
|
|
34
34
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
35
|
-
const useRTL_1 = require("./common/utils/useRTL");
|
|
36
35
|
const usePaginationModel_1 = require("./usePaginationModel");
|
|
37
36
|
exports.paginationControlsStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
38
|
-
base: { name: "
|
|
39
|
-
}, "pagination-controls-
|
|
37
|
+
base: { name: "5mqk0", styles: "box-sizing:border-box;display:flex;gap:var(--cnvs-sys-space-x1);align-items:center;" }
|
|
38
|
+
}, "pagination-controls-103bfc");
|
|
39
|
+
const controlButtonStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
40
|
+
base: { name: "1e1nij", styles: "box-sizing:border-box;&:dir(rtl){& .wd-icon{transform:scaleX(-1);}}" }
|
|
41
|
+
}, "control-button-595088");
|
|
40
42
|
exports.PaginationControls = (0, common_1.createComponent)('div')({
|
|
41
43
|
displayName: 'Pagination.Controls',
|
|
42
44
|
Component(elemProps, ref, Element) {
|
|
@@ -55,9 +57,7 @@ exports.JumpToFirstButton = (0, common_1.createComponent)('button')({
|
|
|
55
57
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
56
58
|
model.events.setCurrentPage(model.state.firstPage);
|
|
57
59
|
};
|
|
58
|
-
|
|
59
|
-
const icon = shouldUseRTL ? canvas_system_icons_web_1.chevron2xRightSmallIcon : canvas_system_icons_web_1.chevron2xLeftSmallIcon;
|
|
60
|
-
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
|
|
60
|
+
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: canvas_system_icons_web_1.chevron2xLeftSmallIcon, onClick: handleClick, ...(0, layout_1.mergeStyles)(restProps, controlButtonStencil()) }));
|
|
61
61
|
},
|
|
62
62
|
});
|
|
63
63
|
exports.StepToPreviousButton = (0, common_1.createComponent)('button')({
|
|
@@ -72,9 +72,7 @@ exports.StepToPreviousButton = (0, common_1.createComponent)('button')({
|
|
|
72
72
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
73
73
|
model.events.setCurrentPage(model.state.currentPage - 1);
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
const icon = shouldUseRTL ? canvas_system_icons_web_1.chevronRightSmallIcon : canvas_system_icons_web_1.chevronLeftSmallIcon;
|
|
77
|
-
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
|
|
75
|
+
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: canvas_system_icons_web_1.chevronLeftSmallIcon, onClick: handleClick, ...(0, layout_1.mergeStyles)(restProps, controlButtonStencil()) }));
|
|
78
76
|
},
|
|
79
77
|
});
|
|
80
78
|
exports.StepToNextButton = (0, common_1.createComponent)('button')({
|
|
@@ -89,9 +87,7 @@ exports.StepToNextButton = (0, common_1.createComponent)('button')({
|
|
|
89
87
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
90
88
|
model.events.setCurrentPage(model.state.currentPage + 1);
|
|
91
89
|
};
|
|
92
|
-
|
|
93
|
-
const icon = shouldUseRTL ? canvas_system_icons_web_1.chevronLeftSmallIcon : canvas_system_icons_web_1.chevronRightSmallIcon;
|
|
94
|
-
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
|
|
90
|
+
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: canvas_system_icons_web_1.chevronRightSmallIcon, onClick: handleClick, ...(0, layout_1.mergeStyles)(restProps, controlButtonStencil()) }));
|
|
95
91
|
},
|
|
96
92
|
});
|
|
97
93
|
exports.JumpToLastButton = (0, common_1.createComponent)('button')({
|
|
@@ -106,8 +102,6 @@ exports.JumpToLastButton = (0, common_1.createComponent)('button')({
|
|
|
106
102
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
107
103
|
model.events.setCurrentPage(model.state.lastPage);
|
|
108
104
|
};
|
|
109
|
-
|
|
110
|
-
const icon = shouldUseRTL ? canvas_system_icons_web_1.chevron2xLeftSmallIcon : canvas_system_icons_web_1.chevron2xRightSmallIcon;
|
|
111
|
-
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick, ...restProps }));
|
|
105
|
+
return ((0, jsx_runtime_1.jsx)(button_1.TertiaryButton, { ref: ref, as: Element, "aria-disabled": isDisabled || undefined, size: "small", icon: canvas_system_icons_web_1.chevron2xRightSmallIcon, onClick: handleClick, ...(0, layout_1.mergeStyles)(restProps, controlButtonStencil()) }));
|
|
112
106
|
},
|
|
113
107
|
});
|
|
@@ -6,14 +6,14 @@ const common_1 = require("@workday/canvas-kit-react/common");
|
|
|
6
6
|
const Table = (0, common_1.styled)('table')({
|
|
7
7
|
width: '100%',
|
|
8
8
|
thead: {
|
|
9
|
-
textAlign: '
|
|
10
|
-
|
|
9
|
+
textAlign: 'start',
|
|
10
|
+
paddingBlockEnd: 16,
|
|
11
11
|
},
|
|
12
12
|
'td, th': {
|
|
13
13
|
minWidth: 100,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
textAlign: '
|
|
14
|
+
paddingBlockEnd: 16,
|
|
15
|
+
paddingInlineEnd: 16,
|
|
16
|
+
textAlign: 'start',
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
const ComponentStatesTable = ({ rowProps, columnProps, children, }) => {
|
|
@@ -5,7 +5,13 @@ interface BackgroundColors {
|
|
|
5
5
|
hover?: string;
|
|
6
6
|
contrast?: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated ⚠️ `getPaletteColors` is deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
10
|
+
*/
|
|
8
11
|
export declare const getPaletteColors: (type: paletteSelection, theme: EmotionCanvasTheme) => BackgroundColors;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated ⚠️ `useThemedPalette` 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).
|
|
14
|
+
*/
|
|
9
15
|
export declare const useThemedPalette: (type: paletteSelection) => BackgroundColors;
|
|
10
16
|
export {};
|
|
11
17
|
//# sourceMappingURL=useThemedPalette.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemedPalette.d.ts","sourceRoot":"","sources":["../../../../../banner/lib/hooks/useThemedPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,kBAAkB,EAAW,MAAM,kCAAkC,CAAC;AAIlG,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEzF,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmBD,eAAO,MAAM,gBAAgB,SACrB,gBAAgB,SACf,kBAAkB,KACxB,gBAcF,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAU,gBAAgB,qBAItD,CAAC"}
|
|
1
|
+
{"version":3,"file":"useThemedPalette.d.ts","sourceRoot":"","sources":["../../../../../banner/lib/hooks/useThemedPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,kBAAkB,EAAW,MAAM,kCAAkC,CAAC;AAIlG,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEzF,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmBD;;GAEG;AACH,eAAO,MAAM,gBAAgB,SACrB,gBAAgB,SACf,kBAAkB,KACxB,gBAcF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,gBAAgB,qBAItD,CAAC"}
|
|
@@ -13,6 +13,9 @@ const getPaletteColorsFromTheme = (palette, fallbackColors) => {
|
|
|
13
13
|
: fallbackColors === null || fallbackColors === void 0 ? void 0 : fallbackColors.contrast,
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated ⚠️ `getPaletteColors` is deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
|
|
18
|
+
*/
|
|
16
19
|
export const getPaletteColors = (type, theme) => {
|
|
17
20
|
const palette = theme.canvas.palette[type];
|
|
18
21
|
switch (type) {
|
|
@@ -27,6 +30,9 @@ export const getPaletteColors = (type, theme) => {
|
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated ⚠️ `useThemedPalette` 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).
|
|
35
|
+
*/
|
|
30
36
|
export const useThemedPalette = (type) => {
|
|
31
37
|
const theme = useTheme();
|
|
32
38
|
return getPaletteColors(type, theme);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PartialEmotionCanvasTheme } from './theming';
|
|
3
3
|
export interface CanvasProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated ⚠️ `theme` 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).
|
|
6
|
+
*/
|
|
4
7
|
theme?: PartialEmotionCanvasTheme;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/CanvasProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,yBAAyB,EAAW,MAAM,WAAW,CAAC;AAIlF,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACnC;AAYD;;GAEG;AACH,eAAO,MAAM,eAAe,QA0C1B,CAAC;AAEH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"CanvasProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/CanvasProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAqB,yBAAyB,EAAW,MAAM,WAAW,CAAC;AAIlF,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACnC;AAYD;;GAEG;AACH,eAAO,MAAM,eAAe,QA0C1B,CAAC;AAEH,eAAO,MAAM,uBAAuB,UAI3B,yBAAyB,GAAG,SAAS,aACjC,MAAM,cAAc,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC7C,CAAC;AAEF,eAAO,MAAM,cAAc,kCAIxB,mBAAmB,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,4CAgBzD,CAAC"}
|
|
@@ -15,8 +15,12 @@ const mappedKeys = {
|
|
|
15
15
|
/**
|
|
16
16
|
* If you wish to reset the theme to the default, apply this class on the CanvasProvider.
|
|
17
17
|
*/
|
|
18
|
-
export const defaultBranding = createStyles({ name: "
|
|
19
|
-
export const useCanvasThemeToCssVars = (
|
|
18
|
+
export const defaultBranding = createStyles({ name: "hnfk8", styles: "--cnvs-brand-common-alert-inner:var(--cnvs-base-palette-amber-400);--cnvs-brand-common-alert-outer:var(--cnvs-base-palette-amber-500);--cnvs-brand-common-error-inner:var(--cnvs-base-palette-red-500);--cnvs-brand-common-focus-outline:var(--cnvs-base-palette-blue-500);--cnvs-brand-neutral-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-neutral-darkest:var(--cnvs-base-palette-slate-800);--cnvs-brand-neutral-dark:var(--cnvs-base-palette-slate-700);--cnvs-brand-neutral-base:var(--cnvs-base-palette-slate-600);--cnvs-brand-neutral-light:var(--cnvs-base-palette-slate-200);--cnvs-brand-neutral-lighter:var(--cnvs-base-palette-slate-50);--cnvs-brand-neutral-lightest:var(--cnvs-base-palette-slate-25);--cnvs-brand-success-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-success-darkest:var(--cnvs-base-palette-green-800);--cnvs-brand-success-dark:var(--cnvs-base-palette-green-700);--cnvs-brand-success-base:var(--cnvs-base-palette-green-600);--cnvs-brand-success-light:var(--cnvs-base-palette-green-200);--cnvs-brand-success-lighter:var(--cnvs-base-palette-green-50);--cnvs-brand-success-lightest:var(--cnvs-base-palette-green-25);--cnvs-brand-error-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-error-darkest:var(--cnvs-base-palette-red-800);--cnvs-brand-error-dark:var(--cnvs-base-palette-red-700);--cnvs-brand-error-base:var(--cnvs-base-palette-red-600);--cnvs-brand-error-light:var(--cnvs-base-palette-red-200);--cnvs-brand-error-lighter:var(--cnvs-base-palette-red-50);--cnvs-brand-error-lightest:var(--cnvs-base-palette-red-25);--cnvs-brand-alert-accent:var(--cnvs-base-palette-neutral-900);--cnvs-brand-alert-darkest:var(--cnvs-base-palette-amber-600);--cnvs-brand-alert-dark:var(--cnvs-base-palette-amber-500);--cnvs-brand-alert-base:var(--cnvs-base-palette-amber-400);--cnvs-brand-alert-light:var(--cnvs-base-palette-amber-200);--cnvs-brand-alert-lighter:var(--cnvs-base-palette-amber-50);--cnvs-brand-alert-lightest:var(--cnvs-base-palette-amber-25);--cnvs-brand-primary-accent:var(--cnvs-base-palette-neutral-0);--cnvs-brand-primary-darkest:var(--cnvs-base-palette-blue-800);--cnvs-brand-primary-dark:var(--cnvs-base-palette-blue-700);--cnvs-brand-primary-base:var(--cnvs-base-palette-blue-600);--cnvs-brand-primary-light:var(--cnvs-base-palette-blue-200);--cnvs-brand-primary-lighter:var(--cnvs-base-palette-blue-50);--cnvs-brand-primary-lightest:var(--cnvs-base-palette-blue-25);--cnvs-brand-gradient-primary:linear-gradient(90deg, var(--cnvs-brand-primary-base) 0%, var(--cnvs-brand-primary-dark) 100%);" });
|
|
19
|
+
export const useCanvasThemeToCssVars = (
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated ⚠️ `theme` 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).
|
|
22
|
+
*/
|
|
23
|
+
theme, elemProps) => {
|
|
20
24
|
const filledTheme = useTheme(theme);
|
|
21
25
|
const className = (elemProps.className || '').split(' ').concat(defaultBranding).join(' ');
|
|
22
26
|
const style = elemProps.style || {};
|
|
@@ -10,6 +10,7 @@ export type RecursivePartial<T> = {
|
|
|
10
10
|
* This function will also handle nested properties.
|
|
11
11
|
* @param target A partial object with up to the same shape as the `fallback` object
|
|
12
12
|
* @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
|
|
13
|
+
* @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).
|
|
13
14
|
*/
|
|
14
15
|
export declare function getObjectProxy<T extends {}>(target: RecursivePartial<T> | undefined, fallback: T): T;
|
|
15
16
|
//# sourceMappingURL=getObjectProxy.d.ts.map
|