@workday/canvas-kit-react 14.0.9 → 14.1.0-1284-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/common/lib/theming/createCanvasTheme.ts +4 -0
- package/common/lib/theming/styled.ts +6 -0
- package/common/lib/theming/theme.ts +3 -0
- package/common/lib/theming/useIsRTL.ts +1 -1
- package/common/lib/theming/useTheme.ts +3 -0
- package/common/lib/theming/useThemedRing.ts +4 -0
- package/dist/commonjs/common/lib/theming/createCanvasTheme.d.ts +4 -0
- package/dist/commonjs/common/lib/theming/createCanvasTheme.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/createCanvasTheme.js +4 -0
- package/dist/commonjs/common/lib/theming/styled.d.ts +6 -0
- package/dist/commonjs/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/styled.js +6 -0
- package/dist/commonjs/common/lib/theming/theme.d.ts +3 -0
- package/dist/commonjs/common/lib/theming/theme.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/theme.js +3 -0
- package/dist/commonjs/common/lib/theming/useIsRTL.d.ts +1 -1
- package/dist/commonjs/common/lib/theming/useIsRTL.js +1 -1
- package/dist/commonjs/common/lib/theming/useTheme.d.ts +2 -0
- package/dist/commonjs/common/lib/theming/useTheme.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/useTheme.js +3 -0
- package/dist/commonjs/common/lib/theming/useThemedRing.d.ts +4 -0
- package/dist/commonjs/common/lib/theming/useThemedRing.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/useThemedRing.js +4 -0
- package/dist/commonjs/layout/lib/Box.d.ts +1 -0
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +2 -0
- package/dist/commonjs/layout/lib/utils/background.d.ts +25 -8
- package/dist/commonjs/layout/lib/utils/background.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/background.js +3 -0
- package/dist/commonjs/layout/lib/utils/border/color.d.ts +12 -1
- package/dist/commonjs/layout/lib/utils/border/color.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/border/color.js +2 -0
- package/dist/commonjs/layout/lib/utils/border/index.d.ts +3 -0
- package/dist/commonjs/layout/lib/utils/border/index.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/border/index.js +2 -0
- package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts +24 -6
- package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/border/lineStyle.js +2 -0
- package/dist/commonjs/layout/lib/utils/border/radius.d.ts +15 -6
- package/dist/commonjs/layout/lib/utils/border/radius.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/border/radius.js +2 -0
- package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts +22 -8
- package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/border/shorthand.js +2 -0
- package/dist/commonjs/layout/lib/utils/border/width.d.ts +18 -4
- package/dist/commonjs/layout/lib/utils/border/width.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/border/width.js +2 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts +4 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/buildStyleFns.js +9 -0
- package/dist/commonjs/layout/lib/utils/color.d.ts +13 -4
- package/dist/commonjs/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/color.js +3 -0
- package/dist/commonjs/layout/lib/utils/depth.d.ts +11 -3
- package/dist/commonjs/layout/lib/utils/depth.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/depth.js +3 -0
- package/dist/commonjs/layout/lib/utils/flex.d.ts +32 -11
- package/dist/commonjs/layout/lib/utils/flex.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/flex.js +3 -0
- package/dist/commonjs/layout/lib/utils/flexItem.d.ts +27 -8
- package/dist/commonjs/layout/lib/utils/flexItem.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/flexItem.js +3 -0
- package/dist/commonjs/layout/lib/utils/grid.d.ts +56 -19
- package/dist/commonjs/layout/lib/utils/grid.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/grid.js +3 -0
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts +36 -11
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/gridItem.js +3 -0
- package/dist/commonjs/layout/lib/utils/layout.d.ts +36 -13
- package/dist/commonjs/layout/lib/utils/layout.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/layout.js +3 -0
- package/dist/commonjs/layout/lib/utils/mergeStyles.d.ts +1 -0
- package/dist/commonjs/layout/lib/utils/mergeStyles.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/mergeStyles.js +1 -0
- package/dist/commonjs/layout/lib/utils/other.d.ts +106 -34
- package/dist/commonjs/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/other.js +3 -0
- package/dist/commonjs/layout/lib/utils/position.d.ts +24 -9
- package/dist/commonjs/layout/lib/utils/position.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/position.js +3 -0
- package/dist/commonjs/layout/lib/utils/space.d.ts +42 -19
- package/dist/commonjs/layout/lib/utils/space.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/space.js +3 -0
- package/dist/commonjs/layout/lib/utils/styleProps.d.ts +2 -0
- package/dist/commonjs/layout/lib/utils/styleProps.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/systemProps.d.ts +17 -0
- package/dist/commonjs/layout/lib/utils/systemProps.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/text.d.ts +45 -14
- package/dist/commonjs/layout/lib/utils/text.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/text.js +3 -0
- package/dist/commonjs/text-input/lib/TextInput.js +5 -5
- package/dist/es6/common/lib/theming/createCanvasTheme.d.ts +4 -0
- package/dist/es6/common/lib/theming/createCanvasTheme.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/createCanvasTheme.js +4 -0
- package/dist/es6/common/lib/theming/styled.d.ts +6 -0
- package/dist/es6/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/styled.js +6 -0
- package/dist/es6/common/lib/theming/theme.d.ts +3 -0
- package/dist/es6/common/lib/theming/theme.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/theme.js +3 -0
- package/dist/es6/common/lib/theming/useIsRTL.d.ts +1 -1
- package/dist/es6/common/lib/theming/useIsRTL.js +1 -1
- package/dist/es6/common/lib/theming/useTheme.d.ts +2 -0
- package/dist/es6/common/lib/theming/useTheme.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/useTheme.js +3 -0
- package/dist/es6/common/lib/theming/useThemedRing.d.ts +4 -0
- package/dist/es6/common/lib/theming/useThemedRing.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/useThemedRing.js +4 -0
- package/dist/es6/layout/lib/Box.d.ts +1 -0
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +2 -0
- package/dist/es6/layout/lib/utils/background.d.ts +25 -8
- package/dist/es6/layout/lib/utils/background.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/background.js +3 -0
- package/dist/es6/layout/lib/utils/border/color.d.ts +12 -1
- package/dist/es6/layout/lib/utils/border/color.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/border/color.js +2 -0
- package/dist/es6/layout/lib/utils/border/index.d.ts +3 -0
- package/dist/es6/layout/lib/utils/border/index.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/border/index.js +2 -0
- package/dist/es6/layout/lib/utils/border/lineStyle.d.ts +24 -6
- package/dist/es6/layout/lib/utils/border/lineStyle.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/border/lineStyle.js +2 -0
- package/dist/es6/layout/lib/utils/border/radius.d.ts +15 -6
- package/dist/es6/layout/lib/utils/border/radius.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/border/radius.js +2 -0
- package/dist/es6/layout/lib/utils/border/shorthand.d.ts +22 -8
- package/dist/es6/layout/lib/utils/border/shorthand.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/border/shorthand.js +2 -0
- package/dist/es6/layout/lib/utils/border/width.d.ts +18 -4
- package/dist/es6/layout/lib/utils/border/width.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/border/width.js +2 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.d.ts +4 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/buildStyleFns.js +9 -0
- package/dist/es6/layout/lib/utils/color.d.ts +13 -4
- package/dist/es6/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/color.js +3 -0
- package/dist/es6/layout/lib/utils/depth.d.ts +11 -3
- package/dist/es6/layout/lib/utils/depth.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/depth.js +3 -0
- package/dist/es6/layout/lib/utils/flex.d.ts +32 -11
- package/dist/es6/layout/lib/utils/flex.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/flex.js +3 -0
- package/dist/es6/layout/lib/utils/flexItem.d.ts +27 -8
- package/dist/es6/layout/lib/utils/flexItem.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/flexItem.js +3 -0
- package/dist/es6/layout/lib/utils/grid.d.ts +56 -19
- package/dist/es6/layout/lib/utils/grid.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/grid.js +3 -0
- package/dist/es6/layout/lib/utils/gridItem.d.ts +36 -11
- package/dist/es6/layout/lib/utils/gridItem.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/gridItem.js +3 -0
- package/dist/es6/layout/lib/utils/layout.d.ts +36 -13
- package/dist/es6/layout/lib/utils/layout.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/layout.js +3 -0
- package/dist/es6/layout/lib/utils/mergeStyles.d.ts +1 -0
- package/dist/es6/layout/lib/utils/mergeStyles.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/mergeStyles.js +1 -0
- package/dist/es6/layout/lib/utils/other.d.ts +106 -34
- package/dist/es6/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/other.js +3 -0
- package/dist/es6/layout/lib/utils/position.d.ts +24 -9
- package/dist/es6/layout/lib/utils/position.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/position.js +3 -0
- package/dist/es6/layout/lib/utils/space.d.ts +42 -19
- package/dist/es6/layout/lib/utils/space.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/space.js +3 -0
- package/dist/es6/layout/lib/utils/styleProps.d.ts +2 -0
- package/dist/es6/layout/lib/utils/styleProps.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/systemProps.d.ts +17 -0
- package/dist/es6/layout/lib/utils/systemProps.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/text.d.ts +45 -14
- package/dist/es6/layout/lib/utils/text.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/text.js +3 -0
- package/dist/es6/text-input/lib/TextInput.js +5 -5
- package/layout/lib/Box.tsx +2 -0
- package/layout/lib/utils/background.ts +25 -8
- package/layout/lib/utils/border/color.ts +12 -1
- package/layout/lib/utils/border/index.ts +3 -0
- package/layout/lib/utils/border/lineStyle.ts +24 -6
- package/layout/lib/utils/border/radius.ts +15 -6
- package/layout/lib/utils/border/shorthand.ts +22 -8
- package/layout/lib/utils/border/width.ts +18 -4
- package/layout/lib/utils/buildStyleFns.ts +11 -0
- package/layout/lib/utils/color.ts +13 -4
- package/layout/lib/utils/depth.ts +11 -3
- package/layout/lib/utils/flex.ts +32 -11
- package/layout/lib/utils/flexItem.ts +27 -8
- package/layout/lib/utils/grid.ts +56 -19
- package/layout/lib/utils/gridItem.ts +36 -11
- package/layout/lib/utils/layout.ts +36 -13
- package/layout/lib/utils/mergeStyles.ts +1 -0
- package/layout/lib/utils/other.ts +106 -34
- package/layout/lib/utils/position.ts +24 -9
- package/layout/lib/utils/space.ts +42 -19
- package/layout/lib/utils/styleProps.ts +2 -0
- package/layout/lib/utils/systemProps.ts +17 -0
- package/layout/lib/utils/text.ts +45 -14
- package/package.json +4 -4
- package/text-input/lib/TextInput.tsx +1 -1
|
@@ -15,6 +15,9 @@ import {pickForegroundColor} from '../utils';
|
|
|
15
15
|
import {deepMerge} from '../utils/deepMerge';
|
|
16
16
|
import {memoize} from '../utils/memoize';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated ⚠️ `shiftColor` is deprecated and will be removed in a future major version. While we work on an algorithm for color shifting, you can use [oklch from or with calc](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) to calculate colors.
|
|
20
|
+
*/
|
|
18
21
|
export const shiftColor = memoize(
|
|
19
22
|
(hexColor: string, amount = 100) => {
|
|
20
23
|
const canvasColor = Object.keys(colors).find(color => colors[color] === hexColor);
|
|
@@ -105,5 +108,6 @@ function calculateCanvasTheme(partialTheme: PartialCanvasTheme): CanvasTheme {
|
|
|
105
108
|
* Creates a full {@link CanvasTheme} from any partial theme by deeply merging with the
|
|
106
109
|
* `defaultCanvasTheme` object. The function is memoized, but it is best to run this function
|
|
107
110
|
* only once and save the result.
|
|
111
|
+
* @deprecated ⚠️ `createCanvasTheme` is deprecated and will be removed in a future major version. Please use our CSS Branding tokens to create a theme. For more information, please use our [theming docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
|
|
108
112
|
*/
|
|
109
113
|
export const createCanvasTheme = memoize(calculateCanvasTheme, (...args) => JSON.stringify(args));
|
|
@@ -10,6 +10,9 @@ interface ThemingStyledOptions {
|
|
|
10
10
|
shouldForwardProp?: (prop: any) => boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated ⚠️ `filterOutProps` is deprecated and will be removed in a future major version. Use our `createComponent` and `handleCsProp` helpers to handle props. For more information, view our [Meriging Styles Docs](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-merging-styles--docs#handlecsprop).
|
|
15
|
+
*/
|
|
13
16
|
export const filterOutProps = (omittedProps: string[]) => {
|
|
14
17
|
return (prop: string) => !omittedProps.includes(prop);
|
|
15
18
|
};
|
|
@@ -42,4 +45,7 @@ function styled<Props>(node: any, options?: ThemingStyledOptions) {
|
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated ⚠️ `styled` is deprecated and will be removed in a future major version. Please use `createStyles` or `createStencil` instead with [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values). For more information, view our [Styling docs](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-overview--docs).
|
|
50
|
+
*/
|
|
45
51
|
export default styled as CreateStyled;
|
|
@@ -2,6 +2,9 @@ import {CanvasTheme, ContentDirection} from './types';
|
|
|
2
2
|
import {base} from '@workday/canvas-tokens-web';
|
|
3
3
|
import {breakpoints, up, down, between, only} from './breakpoints';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated ⚠️ `defaultCanvasTheme` is deprecated and will be removed in a future major version. If you want to reset the theme, use `defaultBranding` and apply it to the `CanvasProvider`. For more information, view our [theming docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
|
|
7
|
+
*/
|
|
5
8
|
export const defaultCanvasTheme: CanvasTheme = {
|
|
6
9
|
palette: {
|
|
7
10
|
primary: {
|
|
@@ -14,7 +14,7 @@ function useDefaultTheme<T, C>(theme: T | undefined, config: C, fn: (config: C)
|
|
|
14
14
|
* const isRTL = useIsRTL();
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
-
* @deprecated
|
|
17
|
+
* @deprecated ⚠️ `useIsRTL` is deprecated and will be removed in a future major version. Please use `isElementRTL` instead.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
export const useIsRTL = (partialTheme?: PartialEmotionCanvasTheme) => {
|
|
@@ -13,6 +13,7 @@ import {base} from '@workday/canvas-tokens-web';
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* We can adjust the shift but this should get us close enough until we clean up the algorithm to determine the colors.
|
|
16
|
+
* @deprecated ⚠️ `shiftColor` is deprecated and will be removed in a future major version. While we work on an algorithm for color shifting, you can use [`oklch from`](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) to generate a palette.
|
|
16
17
|
*/
|
|
17
18
|
const shiftColor = (color: string, value: number) => {
|
|
18
19
|
return `oklch(from ${color} calc(l ${value > 0 ? '+' : '-'} ${Math.abs(value) / 1000}) c h)`;
|
|
@@ -108,6 +109,7 @@ const getFilledTheme = (theme: PartialEmotionCanvasTheme): EmotionCanvasTheme =>
|
|
|
108
109
|
* margin: space.l
|
|
109
110
|
* }
|
|
110
111
|
* }
|
|
112
|
+
* @deprecated ⚠️ `getTheme` is deprecated and will be removed in a future major version. Please use our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) to theme components.
|
|
111
113
|
*/
|
|
112
114
|
export function getTheme(theme?: PartialEmotionCanvasTheme): EmotionCanvasTheme {
|
|
113
115
|
if (theme?.canvas) {
|
|
@@ -150,6 +152,7 @@ export function getTheme(theme?: PartialEmotionCanvasTheme): EmotionCanvasTheme
|
|
|
150
152
|
* <Subtext size="large" color={theme.canvas.palette.error.main}>
|
|
151
153
|
* );
|
|
152
154
|
* }
|
|
155
|
+
* @deprecated ⚠️ `useTheme` is deprecated and will be removed in a future major version. Please use our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) to theme components.
|
|
153
156
|
*/
|
|
154
157
|
export function useTheme(theme?: PartialEmotionCanvasTheme): EmotionCanvasTheme {
|
|
155
158
|
if (!theme) {
|
|
@@ -40,6 +40,9 @@ const getPaletteColorsFromTheme = (
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated ⚠️ `getPaletteColorsForFocusRing` is deprecated and will be removed in a future major version. Please use the `brand.common.focusRing` CSS variable to theme focus rings. For more information, view our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs).
|
|
45
|
+
*/
|
|
43
46
|
export function getPaletteColorsForFocusRing(
|
|
44
47
|
type: paletteSelection,
|
|
45
48
|
theme: EmotionCanvasTheme
|
|
@@ -99,6 +102,7 @@ export function getPaletteColorsForFocusRing(
|
|
|
99
102
|
* );
|
|
100
103
|
* };
|
|
101
104
|
*```
|
|
105
|
+
* @deprecated `useThemedRing` is deprecated and will be removed in a future major version. Please use `brand.common.focusOutline` CSS variable instead. View our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) for more information.
|
|
102
106
|
*/
|
|
103
107
|
export const useThemedRing = (type: paletteSelection): CSSProperties => {
|
|
104
108
|
const theme = useTheme();
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { CanvasTheme, PartialCanvasTheme } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated ⚠️ `shiftColor` is deprecated and will be removed in a future major version. While we work on an algorithm for color shifting, you can use [oklch from or with calc](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) to calculate colors.
|
|
4
|
+
*/
|
|
2
5
|
export declare const shiftColor: (hexColor: string, amount?: any) => string;
|
|
3
6
|
declare function calculateCanvasTheme(partialTheme: PartialCanvasTheme): CanvasTheme;
|
|
4
7
|
/**
|
|
5
8
|
* Creates a full {@link CanvasTheme} from any partial theme by deeply merging with the
|
|
6
9
|
* `defaultCanvasTheme` object. The function is memoized, but it is best to run this function
|
|
7
10
|
* only once and save the result.
|
|
11
|
+
* @deprecated ⚠️ `createCanvasTheme` is deprecated and will be removed in a future major version. Please use our CSS Branding tokens to create a theme. For more information, please use our [theming docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
|
|
8
12
|
*/
|
|
9
13
|
export declare const createCanvasTheme: typeof calculateCanvasTheme;
|
|
10
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCanvasTheme.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/createCanvasTheme.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,kBAAkB,EAInB,MAAM,SAAS,CAAC;AAQjB,eAAO,MAAM,UAAU,aACV,MAAM,yBA+BlB,CAAC;AAkCF,iBAAS,oBAAoB,CAAC,YAAY,EAAE,kBAAkB,GAAG,WAAW,CAkB3E;AAED
|
|
1
|
+
{"version":3,"file":"createCanvasTheme.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/createCanvasTheme.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,kBAAkB,EAInB,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,eAAO,MAAM,UAAU,aACV,MAAM,yBA+BlB,CAAC;AAkCF,iBAAS,oBAAoB,CAAC,YAAY,EAAE,kBAAkB,GAAG,WAAW,CAkB3E;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,6BAAmE,CAAC"}
|
|
@@ -12,6 +12,9 @@ const utils_1 = require("../utils");
|
|
|
12
12
|
// Should these be exported?
|
|
13
13
|
const deepMerge_1 = require("../utils/deepMerge");
|
|
14
14
|
const memoize_1 = require("../utils/memoize");
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated ⚠️ `shiftColor` is deprecated and will be removed in a future major version. While we work on an algorithm for color shifting, you can use [oklch from or with calc](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) to calculate colors.
|
|
17
|
+
*/
|
|
15
18
|
exports.shiftColor = (0, memoize_1.memoize)((hexColor, amount = 100) => {
|
|
16
19
|
const canvasColor = Object.keys(canvas_colors_web_1.default).find(color => canvas_colors_web_1.default[color] === hexColor);
|
|
17
20
|
if (canvasColor) {
|
|
@@ -79,5 +82,6 @@ function calculateCanvasTheme(partialTheme) {
|
|
|
79
82
|
* Creates a full {@link CanvasTheme} from any partial theme by deeply merging with the
|
|
80
83
|
* `defaultCanvasTheme` object. The function is memoized, but it is best to run this function
|
|
81
84
|
* only once and save the result.
|
|
85
|
+
* @deprecated ⚠️ `createCanvasTheme` is deprecated and will be removed in a future major version. Please use our CSS Branding tokens to create a theme. For more information, please use our [theming docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
|
|
82
86
|
*/
|
|
83
87
|
exports.createCanvasTheme = (0, memoize_1.memoize)(calculateCanvasTheme, (...args) => JSON.stringify(args));
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { CreateStyled } from '@emotion/styled';
|
|
2
2
|
import { CSSProperties } from '@workday/canvas-kit-react/tokens';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated ⚠️ `filterOutProps` is deprecated and will be removed in a future major version. Use our `createComponent` and `handleCsProp` helpers to handle props. For more information, view our [Meriging Styles Docs](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-merging-styles--docs#handlecsprop).
|
|
5
|
+
*/
|
|
3
6
|
export declare const filterOutProps: (omittedProps: string[]) => (prop: string) => boolean;
|
|
4
7
|
export type StyleRewriteFn = (obj?: CSSProperties) => CSSProperties | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated ⚠️ `styled` is deprecated and will be removed in a future major version. Please use `createStyles` or `createStencil` instead with [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values). For more information, view our [Styling docs](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-overview--docs).
|
|
10
|
+
*/
|
|
5
11
|
declare const _default: CreateStyled;
|
|
6
12
|
export default _default;
|
|
7
13
|
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAW/D,eAAO,MAAM,cAAc,iBAAkB,MAAM,EAAE,YACrC,MAAM,YACrB,CAAC;AAIF,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;;
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAA2B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAW/D;;GAEG;AACH,eAAO,MAAM,cAAc,iBAAkB,MAAM,EAAE,YACrC,MAAM,YACrB,CAAC;AAIF,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,SAAS,CAAC;AA0BhF;;GAEG;;AACH,wBAAsC"}
|
|
@@ -8,6 +8,9 @@ const styled_1 = __importDefault(require("@emotion/styled"));
|
|
|
8
8
|
const index_1 = require("./index");
|
|
9
9
|
const rtl_css_js_1 = __importDefault(require("rtl-css-js"));
|
|
10
10
|
const noop = (styles) => styles;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated ⚠️ `filterOutProps` is deprecated and will be removed in a future major version. Use our `createComponent` and `handleCsProp` helpers to handle props. For more information, view our [Meriging Styles Docs](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-merging-styles--docs#handlecsprop).
|
|
13
|
+
*/
|
|
11
14
|
const filterOutProps = (omittedProps) => {
|
|
12
15
|
return (prop) => !omittedProps.includes(prop);
|
|
13
16
|
};
|
|
@@ -32,4 +35,7 @@ function styled(node, options) {
|
|
|
32
35
|
return (0, styled_1.default)(node, options)(newArgs);
|
|
33
36
|
};
|
|
34
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated ⚠️ `styled` is deprecated and will be removed in a future major version. Please use `createStyles` or `createStencil` instead with [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values). For more information, view our [Styling docs](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-overview--docs).
|
|
40
|
+
*/
|
|
35
41
|
exports.default = styled;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { CanvasTheme } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated ⚠️ `defaultCanvasTheme` is deprecated and will be removed in a future major version. If you want to reset the theme, use `defaultBranding` and apply it to the `CanvasProvider`. For more information, view our [theming docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
|
|
4
|
+
*/
|
|
2
5
|
export declare const defaultCanvasTheme: CanvasTheme;
|
|
3
6
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAmB,MAAM,SAAS,CAAC;AAItD,eAAO,MAAM,kBAAkB,EAAE,WA8DhC,CAAC"}
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAmB,MAAM,SAAS,CAAC;AAItD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,WA8DhC,CAAC"}
|
|
@@ -4,6 +4,9 @@ exports.defaultCanvasTheme = void 0;
|
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
6
6
|
const breakpoints_1 = require("./breakpoints");
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated ⚠️ `defaultCanvasTheme` is deprecated and will be removed in a future major version. If you want to reset the theme, use `defaultBranding` and apply it to the `CanvasProvider`. For more information, view our [theming docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
|
|
9
|
+
*/
|
|
7
10
|
exports.defaultCanvasTheme = {
|
|
8
11
|
palette: {
|
|
9
12
|
primary: {
|
|
@@ -7,7 +7,7 @@ import { PartialEmotionCanvasTheme } from './types';
|
|
|
7
7
|
* const isRTL = useIsRTL();
|
|
8
8
|
* ```
|
|
9
9
|
*
|
|
10
|
-
* @deprecated
|
|
10
|
+
* @deprecated ⚠️ `useIsRTL` is deprecated and will be removed in a future major version. Please use `isElementRTL` instead.
|
|
11
11
|
*/
|
|
12
12
|
export declare const useIsRTL: (partialTheme?: PartialEmotionCanvasTheme) => boolean;
|
|
13
13
|
//# sourceMappingURL=useIsRTL.d.ts.map
|
|
@@ -38,7 +38,7 @@ function useDefaultTheme(theme, config, fn) {
|
|
|
38
38
|
* const isRTL = useIsRTL();
|
|
39
39
|
* ```
|
|
40
40
|
*
|
|
41
|
-
* @deprecated
|
|
41
|
+
* @deprecated ⚠️ `useIsRTL` is deprecated and will be removed in a future major version. Please use `isElementRTL` instead.
|
|
42
42
|
*/
|
|
43
43
|
const useIsRTL = (partialTheme) => {
|
|
44
44
|
const theme = useDefaultTheme(partialTheme, react_1.ThemeContext, React.useContext);
|
|
@@ -31,6 +31,7 @@ import { EmotionCanvasTheme, PartialEmotionCanvasTheme } from './index';
|
|
|
31
31
|
* margin: space.l
|
|
32
32
|
* }
|
|
33
33
|
* }
|
|
34
|
+
* @deprecated ⚠️ `getTheme` is deprecated and will be removed in a future major version. Please use our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) to theme components.
|
|
34
35
|
*/
|
|
35
36
|
export declare function getTheme(theme?: PartialEmotionCanvasTheme): EmotionCanvasTheme;
|
|
36
37
|
/**
|
|
@@ -60,6 +61,7 @@ export declare function getTheme(theme?: PartialEmotionCanvasTheme): EmotionCanv
|
|
|
60
61
|
* <Subtext size="large" color={theme.canvas.palette.error.main}>
|
|
61
62
|
* );
|
|
62
63
|
* }
|
|
64
|
+
* @deprecated ⚠️ `useTheme` is deprecated and will be removed in a future major version. Please use our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) to theme components.
|
|
63
65
|
*/
|
|
64
66
|
export declare function useTheme(theme?: PartialEmotionCanvasTheme): EmotionCanvasTheme;
|
|
65
67
|
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/useTheme.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,kBAAkB,EAClB,yBAAyB,EAE1B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/useTheme.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,kBAAkB,EAClB,yBAAyB,EAE1B,MAAM,SAAS,CAAC;AAsEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,yBAAyB,GAAG,kBAAkB,CAY9E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,yBAAyB,GAAG,kBAAkB,CAkB9E"}
|
|
@@ -9,6 +9,7 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
9
9
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
10
10
|
/**
|
|
11
11
|
* We can adjust the shift but this should get us close enough until we clean up the algorithm to determine the colors.
|
|
12
|
+
* @deprecated ⚠️ `shiftColor` is deprecated and will be removed in a future major version. While we work on an algorithm for color shifting, you can use [`oklch from`](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) to generate a palette.
|
|
12
13
|
*/
|
|
13
14
|
const shiftColor = (color, value) => {
|
|
14
15
|
return `oklch(from ${color} calc(l ${value > 0 ? '+' : '-'} ${Math.abs(value) / 1000}) c h)`;
|
|
@@ -93,6 +94,7 @@ const getFilledTheme = (theme) => {
|
|
|
93
94
|
* margin: space.l
|
|
94
95
|
* }
|
|
95
96
|
* }
|
|
97
|
+
* @deprecated ⚠️ `getTheme` is deprecated and will be removed in a future major version. Please use our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) to theme components.
|
|
96
98
|
*/
|
|
97
99
|
function getTheme(theme) {
|
|
98
100
|
var _a, _b;
|
|
@@ -133,6 +135,7 @@ exports.getTheme = getTheme;
|
|
|
133
135
|
* <Subtext size="large" color={theme.canvas.palette.error.main}>
|
|
134
136
|
* );
|
|
135
137
|
* }
|
|
138
|
+
* @deprecated ⚠️ `useTheme` is deprecated and will be removed in a future major version. Please use our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) to theme components.
|
|
136
139
|
*/
|
|
137
140
|
function useTheme(theme) {
|
|
138
141
|
if (!theme) {
|
|
@@ -5,6 +5,9 @@ interface ContrastColors {
|
|
|
5
5
|
outer?: string;
|
|
6
6
|
inner?: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated ⚠️ `getPaletteColorsForFocusRing` is deprecated and will be removed in a future major version. Please use the `brand.common.focusRing` CSS variable to theme focus rings. For more information, view our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs).
|
|
10
|
+
*/
|
|
8
11
|
export declare function getPaletteColorsForFocusRing(type: paletteSelection, theme: EmotionCanvasTheme): ContrastColors;
|
|
9
12
|
/**
|
|
10
13
|
* This is a way to automatically add themed colors to your input and is helpful when showing alerts, success or errors to users.
|
|
@@ -40,6 +43,7 @@ export declare function getPaletteColorsForFocusRing(type: paletteSelection, the
|
|
|
40
43
|
* );
|
|
41
44
|
* };
|
|
42
45
|
*```
|
|
46
|
+
* @deprecated `useThemedRing` is deprecated and will be removed in a future major version. Please use `brand.common.focusOutline` CSS variable instead. View our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) for more information.
|
|
43
47
|
*/
|
|
44
48
|
export declare const useThemedRing: (type: paletteSelection) => CSSProperties;
|
|
45
49
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemedRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/useThemedRing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,kBAAkB,EAAW,MAAM,kCAAkC,CAAC;AAE3F,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAG/D,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AACzF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiCD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,kBAAkB,GACxB,cAAc,CAoBhB;AAED
|
|
1
|
+
{"version":3,"file":"useThemedRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/useThemedRing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,kBAAkB,EAAW,MAAM,kCAAkC,CAAC;AAE3F,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAG/D,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AACzF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiCD;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,kBAAkB,GACxB,cAAc,CAoBhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,aAAa,SAAU,gBAAgB,KAAG,aA0BtD,CAAC"}
|
|
@@ -30,6 +30,9 @@ const getPaletteColorsFromTheme = (palette, fallbackColors, errorType) => {
|
|
|
30
30
|
inner: (0, canvas_kit_styling_1.cssVar)(canvas_tokens_web_1.brand.common.focusOutline),
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated ⚠️ `getPaletteColorsForFocusRing` is deprecated and will be removed in a future major version. Please use the `brand.common.focusRing` CSS variable to theme focus rings. For more information, view our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs).
|
|
35
|
+
*/
|
|
33
36
|
function getPaletteColorsForFocusRing(type, theme) {
|
|
34
37
|
switch (type) {
|
|
35
38
|
case 'error': {
|
|
@@ -86,6 +89,7 @@ exports.getPaletteColorsForFocusRing = getPaletteColorsForFocusRing;
|
|
|
86
89
|
* );
|
|
87
90
|
* };
|
|
88
91
|
*```
|
|
92
|
+
* @deprecated `useThemedRing` is deprecated and will be removed in a future major version. Please use `brand.common.focusOutline` CSS variable instead. View our [CSS tokens](https://workday.github.io/canvas-tokens/?path=/docs/docs-brand-tokens--docs) for more information.
|
|
89
93
|
*/
|
|
90
94
|
const useThemedRing = (type) => {
|
|
91
95
|
const theme = (0, common_1.useTheme)();
|
|
@@ -38,6 +38,7 @@ export type BoxProps = CommonStyleProps & CSProps & {
|
|
|
38
38
|
*
|
|
39
39
|
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
40
40
|
* ```
|
|
41
|
+
* @deprecated ⚠️ `boxStyleFn` is deprecated and will be removed in a future major version. Please reference our new way of styling components [here](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-overview--docs).
|
|
41
42
|
*/
|
|
42
43
|
export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
43
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,OAAO,EAAe,MAAM,6BAA6B,CAAC;AAclE,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,QAAQ,GAAG,gBAAgB,GACrC,OAAO,GAAG;IACR,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,OAAO,EAAe,MAAM,6BAA6B,CAAC;AAclE,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,QAAQ,GAAG,gBAAgB,GACrC,OAAO,GAAG;IACR,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA8BJ;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,sCA0BtB,CAAC;AAQF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,6yBAad,CAAC"}
|
|
@@ -43,6 +43,7 @@ const omittedProps = [
|
|
|
43
43
|
'whiteSpace',
|
|
44
44
|
'wordBreak',
|
|
45
45
|
];
|
|
46
|
+
/** @deprecated */
|
|
46
47
|
const shouldForwardProp = (prop) => {
|
|
47
48
|
return (0, is_prop_valid_1.default)(prop) && !omittedProps.includes(prop);
|
|
48
49
|
};
|
|
@@ -63,6 +64,7 @@ const shouldForwardProp = (prop) => {
|
|
|
63
64
|
*
|
|
64
65
|
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
65
66
|
* ```
|
|
67
|
+
* @deprecated ⚠️ `boxStyleFn` is deprecated and will be removed in a future major version. Please reference our new way of styling components [here](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-overview--docs).
|
|
66
68
|
*/
|
|
67
69
|
const boxStyleFn = (props) => {
|
|
68
70
|
return [
|
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { StyleFnConfig } from './buildStyleFns';
|
|
3
3
|
import { SystemPropValues } from './systemProps';
|
|
4
|
-
/** style props to set CSS background properties
|
|
4
|
+
/** style props to set CSS background properties
|
|
5
|
+
* @deprecated
|
|
6
|
+
*/
|
|
5
7
|
export type BackgroundStyleProps = {
|
|
6
8
|
/**
|
|
7
9
|
* - sets [CSS background property](https://developer.mozilla.org/en-US/docs/Web/CSS/background)
|
|
8
10
|
* - system tokens: `color`
|
|
9
|
-
*
|
|
11
|
+
* @deprecated Use `cs` prop with `system.color.bg.*` tokens
|
|
12
|
+
*/
|
|
10
13
|
background?: SystemPropValues['color'];
|
|
11
|
-
/** sets [CSS background-attachment property](https://developer.mozilla.org/en-US/docs/Web/CSS/)
|
|
14
|
+
/** sets [CSS background-attachment property](https://developer.mozilla.org/en-US/docs/Web/CSS/)
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
12
17
|
backgroundAttachment?: Property.BackgroundAttachment;
|
|
13
18
|
/**
|
|
14
19
|
* - sets [CSS background-color property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color)
|
|
15
20
|
* - system tokens: `color`
|
|
16
|
-
*
|
|
21
|
+
* @deprecated Use `cs` prop with `system.color.bg.*` tokens
|
|
22
|
+
*/
|
|
17
23
|
backgroundColor?: SystemPropValues['color'];
|
|
18
|
-
/** sets [CSS background-image property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-image)
|
|
24
|
+
/** sets [CSS background-image property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-image)
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
19
27
|
backgroundImage?: Property.BackgroundImage;
|
|
20
|
-
/** sets [CSS background-position property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
|
|
28
|
+
/** sets [CSS background-position property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
|
|
29
|
+
* @deprecated
|
|
30
|
+
*/
|
|
21
31
|
backgroundPosition?: Property.BackgroundPosition;
|
|
22
|
-
/** sets [CSS background-repeat property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat)
|
|
32
|
+
/** sets [CSS background-repeat property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat)
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
23
35
|
backgroundRepeat?: Property.BackgroundRepeat;
|
|
24
|
-
/** sets [CSS background-size property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
|
|
36
|
+
/** sets [CSS background-size property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
25
39
|
backgroundSize?: Property.BackgroundSize;
|
|
26
40
|
};
|
|
41
|
+
/** @deprecated */
|
|
27
42
|
export declare const backgroundStyleFnConfigs: StyleFnConfig[];
|
|
43
|
+
/** @deprecated */
|
|
28
44
|
export declare const backgroundFns: import("./buildStyleFns").StyleFns;
|
|
29
45
|
/**
|
|
30
46
|
* A style prop function that takes component props and returns border styles.
|
|
@@ -39,6 +55,7 @@ export declare const backgroundFns: import("./buildStyleFns").StyleFns;
|
|
|
39
55
|
* </Box>
|
|
40
56
|
* );
|
|
41
57
|
*```
|
|
58
|
+
@deprecated
|
|
42
59
|
*/
|
|
43
60
|
export declare const background: (props: BackgroundStyleProps) => {};
|
|
44
61
|
//# sourceMappingURL=background.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,oBAAoB,CAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC;IACrD;;;;OAIG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5C;;OAEG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC;IAC3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAC,kBAAkB,CAAC;IACjD;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC;IAC7C;;OAEG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC;CAC1C,CAAC;AAEF,kBAAkB;AAClB,eAAO,MAAM,wBAAwB,EAAE,aAAa,EAoCnD,CAAC;AAEF,kBAAkB;AAClB,eAAO,MAAM,aAAa,oCAA0C,CAAC;AACrE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,qCAAwD,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.background = exports.backgroundFns = exports.backgroundStyleFnConfigs = void 0;
|
|
4
4
|
const buildStyleFns_1 = require("./buildStyleFns");
|
|
5
|
+
/** @deprecated */
|
|
5
6
|
exports.backgroundStyleFnConfigs = [
|
|
6
7
|
{
|
|
7
8
|
name: 'background',
|
|
@@ -39,6 +40,7 @@ exports.backgroundStyleFnConfigs = [
|
|
|
39
40
|
system: 'none',
|
|
40
41
|
},
|
|
41
42
|
];
|
|
43
|
+
/** @deprecated */
|
|
42
44
|
exports.backgroundFns = (0, buildStyleFns_1.buildStyleFns)(exports.backgroundStyleFnConfigs);
|
|
43
45
|
/**
|
|
44
46
|
* A style prop function that takes component props and returns border styles.
|
|
@@ -53,5 +55,6 @@ exports.backgroundFns = (0, buildStyleFns_1.buildStyleFns)(exports.backgroundSty
|
|
|
53
55
|
* </Box>
|
|
54
56
|
* );
|
|
55
57
|
*```
|
|
58
|
+
@deprecated
|
|
56
59
|
*/
|
|
57
60
|
exports.background = (0, buildStyleFns_1.buildStylePropFn)(exports.backgroundFns);
|
|
@@ -1,47 +1,58 @@
|
|
|
1
1
|
import { StyleFnConfig } from '../buildStyleFns';
|
|
2
2
|
import { SystemPropValues } from '../systemProps';
|
|
3
|
-
/** style props to set CSS border color properties
|
|
3
|
+
/** style props to set CSS border color properties
|
|
4
|
+
* @deprecated
|
|
5
|
+
*/
|
|
4
6
|
export type BorderColorStyleProps = {
|
|
5
7
|
/**
|
|
6
8
|
* - sets [CSS border-color property](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color)
|
|
7
9
|
* - system tokens: `color`
|
|
10
|
+
* @deprecated Use `cs` prop with `system.color.border.*` tokens
|
|
8
11
|
*/
|
|
9
12
|
borderColor?: SystemPropValues['color'];
|
|
10
13
|
/**
|
|
11
14
|
* - sets [CSS border-top-color property](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-color)
|
|
12
15
|
* - system tokens: `color`
|
|
16
|
+
* @deprecated Use `cs` prop with `system.color.border.*` tokens
|
|
13
17
|
*/
|
|
14
18
|
borderTopColor?: SystemPropValues['color'];
|
|
15
19
|
/**
|
|
16
20
|
* - sets [CSS border-right-color property](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-color)
|
|
17
21
|
* - no bidirectional support
|
|
18
22
|
* - system tokens: `color`
|
|
23
|
+
* @deprecated Use `cs` prop with `system.color.border.*` tokens
|
|
19
24
|
*/
|
|
20
25
|
borderRightColor?: SystemPropValues['color'];
|
|
21
26
|
/**
|
|
22
27
|
* - sets [CSS border-bottom-color property](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-color)
|
|
23
28
|
* - system tokens: `color`
|
|
29
|
+
* @deprecated Use `cs` prop with `system.color.border.*` tokens
|
|
24
30
|
*/
|
|
25
31
|
borderBottomColor?: SystemPropValues['color'];
|
|
26
32
|
/**
|
|
27
33
|
* - sets [CSS border-left-color property](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-color)
|
|
28
34
|
* - no bidirectional support
|
|
29
35
|
* - system tokens: `color`
|
|
36
|
+
* @deprecated Use `cs` prop with `system.color.border.*` tokens
|
|
30
37
|
*/
|
|
31
38
|
borderLeftColor?: SystemPropValues['color'];
|
|
32
39
|
/**
|
|
33
40
|
* - sets [CSS border-inline-start-color property ](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-start-color)
|
|
34
41
|
* - bidirectional support
|
|
35
42
|
* - system tokens: `color`
|
|
43
|
+
* @deprecated Use `cs` prop with `system.color.border.*` tokens
|
|
36
44
|
*/
|
|
37
45
|
borderInlineStartColor?: SystemPropValues['color'];
|
|
38
46
|
/**
|
|
39
47
|
* - sets [CSS border-inline-end-color property ](https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-end-color)
|
|
40
48
|
* - bidirectional support
|
|
41
49
|
* - system tokens: `color`
|
|
50
|
+
* @deprecated Use `cs` prop with `system.color.border.*` tokens
|
|
42
51
|
*/
|
|
43
52
|
borderInlineEndColor?: SystemPropValues['color'];
|
|
44
53
|
};
|
|
54
|
+
/** @deprecated */
|
|
45
55
|
export declare const borderColorStyleFnConfigs: StyleFnConfig[];
|
|
56
|
+
/** @deprecated */
|
|
46
57
|
export declare const borderColorFns: import("../buildStyleFns").StyleFns;
|
|
47
58
|
//# sourceMappingURL=color.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../../layout/lib/utils/border/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../../layout/lib/utils/border/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC3C;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC7C;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC9C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5C;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnD;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAClD,CAAC;AAEF,kBAAkB;AAClB,eAAO,MAAM,yBAAyB,EAAE,aAAa,EAoCpD,CAAC;AAEF,kBAAkB;AAClB,eAAO,MAAM,cAAc,qCAA2C,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.borderColorFns = exports.borderColorStyleFnConfigs = void 0;
|
|
4
4
|
const buildStyleFns_1 = require("../buildStyleFns");
|
|
5
|
+
/** @deprecated */
|
|
5
6
|
exports.borderColorStyleFnConfigs = [
|
|
6
7
|
{
|
|
7
8
|
name: 'borderColor',
|
|
@@ -39,4 +40,5 @@ exports.borderColorStyleFnConfigs = [
|
|
|
39
40
|
system: 'color',
|
|
40
41
|
},
|
|
41
42
|
];
|
|
43
|
+
/** @deprecated */
|
|
42
44
|
exports.borderColorFns = (0, buildStyleFns_1.buildStyleFns)(exports.borderColorStyleFnConfigs);
|
|
@@ -3,6 +3,7 @@ import { BorderLineStyleProps } from './lineStyle';
|
|
|
3
3
|
import { BorderRadiusStyleProps } from './radius';
|
|
4
4
|
import { BorderShorthandStyleProps } from './shorthand';
|
|
5
5
|
import { BorderWidthStyleProps } from './width';
|
|
6
|
+
/** @deprecated */
|
|
6
7
|
export type BorderStyleProps = BorderColorStyleProps & BorderLineStyleProps & BorderRadiusStyleProps & BorderShorthandStyleProps & BorderWidthStyleProps;
|
|
7
8
|
/**
|
|
8
9
|
* A style prop function that takes component props and returns border styles. Some props, such as borderRadius and borderColor, are connected to our design tokens.
|
|
@@ -20,7 +21,9 @@ export type BorderStyleProps = BorderColorStyleProps & BorderLineStyleProps & Bo
|
|
|
20
21
|
* </Box>
|
|
21
22
|
* );
|
|
22
23
|
*```
|
|
24
|
+
* @deprecated
|
|
23
25
|
*/
|
|
24
26
|
export declare const border: (props: BorderStyleProps) => {};
|
|
27
|
+
/** @deprecated */
|
|
25
28
|
export declare const borderStyleFnConfigs: import("../buildStyleFns").StyleFnConfig[];
|
|
26
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../layout/lib/utils/border/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,qBAAqB,EAA4C,MAAM,SAAS,CAAC;AACzF,OAAO,EAAC,oBAAoB,EAA+C,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAC,sBAAsB,EAA8C,MAAM,UAAU,CAAC;AAC7F,OAAO,EACL,yBAAyB,EAG1B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,qBAAqB,EAA4C,MAAM,SAAS,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAClD,oBAAoB,GACpB,sBAAsB,GACtB,yBAAyB,GACzB,qBAAqB,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../layout/lib/utils/border/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,qBAAqB,EAA4C,MAAM,SAAS,CAAC;AACzF,OAAO,EAAC,oBAAoB,EAA+C,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAC,sBAAsB,EAA8C,MAAM,UAAU,CAAC;AAC7F,OAAO,EACL,yBAAyB,EAG1B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,qBAAqB,EAA4C,MAAM,SAAS,CAAC;AAEzF,kBAAkB;AAClB,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAClD,oBAAoB,GACpB,sBAAsB,GACtB,yBAAyB,GACzB,qBAAqB,CAAC;AAExB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM,iCAMjB,CAAC;AAEH,kBAAkB;AAClB,eAAO,MAAM,oBAAoB,4CAMhC,CAAC"}
|
|
@@ -23,6 +23,7 @@ const width_1 = require("./width");
|
|
|
23
23
|
* </Box>
|
|
24
24
|
* );
|
|
25
25
|
*```
|
|
26
|
+
* @deprecated
|
|
26
27
|
*/
|
|
27
28
|
exports.border = (0, buildStyleFns_1.buildStylePropFn)({
|
|
28
29
|
...color_1.borderColorFns,
|
|
@@ -31,6 +32,7 @@ exports.border = (0, buildStyleFns_1.buildStylePropFn)({
|
|
|
31
32
|
...shorthand_1.borderShorthandFns,
|
|
32
33
|
...width_1.borderWidthFns,
|
|
33
34
|
});
|
|
35
|
+
/** @deprecated */
|
|
34
36
|
exports.borderStyleFnConfigs = [
|
|
35
37
|
...color_1.borderColorStyleFnConfigs,
|
|
36
38
|
...lineStyle_1.borderLineStyleFnConfigs,
|