@workday/canvas-kit-react 8.0.0-alpha.192-next.1 → 8.0.0-alpha.198-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/button/index.ts +7 -1
- package/button/lib/BaseButton.tsx +7 -4
- package/button/lib/DeleteButton.tsx +2 -2
- package/button/lib/PrimaryButton.tsx +2 -2
- package/button/lib/SecondaryButton.tsx +2 -2
- package/button/lib/TertiaryButton.tsx +3 -3
- package/common/lib/utils/components.ts +5 -0
- package/dist/commonjs/button/index.d.ts +1 -1
- package/dist/commonjs/button/index.d.ts.map +1 -1
- package/dist/commonjs/button/index.js +3 -1
- package/dist/commonjs/button/lib/BaseButton.d.ts +7 -4
- package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/DeleteButton.d.ts +2 -1
- package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.d.ts +2 -1
- package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/SecondaryButton.d.ts +2 -1
- package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -1
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +1 -1
- package/dist/commonjs/common/lib/utils/components.d.ts +2 -1
- package/dist/commonjs/common/lib/utils/components.d.ts.map +1 -1
- package/dist/commonjs/layout/index.d.ts +3 -3
- package/dist/commonjs/layout/index.d.ts.map +1 -1
- package/dist/commonjs/layout/index.js +3 -3
- package/dist/commonjs/layout/lib/Column.d.ts +13 -4
- package/dist/commonjs/layout/lib/Column.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Column.js +10 -7
- package/dist/commonjs/layout/lib/Layout.d.ts +26 -9
- package/dist/commonjs/layout/lib/Layout.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Layout.js +21 -10
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +3 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +11 -2
- package/dist/es6/button/index.d.ts +1 -1
- package/dist/es6/button/index.d.ts.map +1 -1
- package/dist/es6/button/index.js +1 -1
- package/dist/es6/button/lib/BaseButton.d.ts +7 -4
- package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/es6/button/lib/DeleteButton.d.ts +2 -1
- package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/es6/button/lib/PrimaryButton.d.ts +2 -1
- package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/SecondaryButton.d.ts +2 -1
- package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.d.ts +2 -1
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +1 -1
- package/dist/es6/common/lib/utils/components.d.ts +2 -1
- package/dist/es6/common/lib/utils/components.d.ts.map +1 -1
- package/dist/es6/layout/index.d.ts +3 -3
- package/dist/es6/layout/index.d.ts.map +1 -1
- package/dist/es6/layout/index.js +3 -3
- package/dist/es6/layout/lib/Column.d.ts +13 -4
- package/dist/es6/layout/lib/Column.d.ts.map +1 -1
- package/dist/es6/layout/lib/Column.js +9 -6
- package/dist/es6/layout/lib/Layout.d.ts +26 -9
- package/dist/es6/layout/lib/Layout.d.ts.map +1 -1
- package/dist/es6/layout/lib/Layout.js +21 -10
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +3 -1
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlButton.js +12 -3
- package/layout/README.md +28 -27
- package/layout/index.ts +3 -3
- package/layout/lib/Column.tsx +22 -5
- package/layout/lib/Layout.tsx +37 -12
- package/package.json +3 -3
- package/segmented-control/lib/SegmentedControlButton.tsx +24 -5
package/button/index.ts
CHANGED
|
@@ -9,6 +9,12 @@ export {
|
|
|
9
9
|
export {ToolbarIconButton, ToolbarIconButtonProps} from './lib/ToolbarIconButton';
|
|
10
10
|
export {ToolbarDropdownButton, ToolbarDropdownButtonProps} from './lib/ToolbarDropdownButton';
|
|
11
11
|
export {Hyperlink, HyperlinkProps} from './lib/Hyperlink';
|
|
12
|
-
export {
|
|
12
|
+
export {
|
|
13
|
+
BaseButton,
|
|
14
|
+
ButtonContainerProps,
|
|
15
|
+
BaseButtonProps,
|
|
16
|
+
getMinWidthStyles,
|
|
17
|
+
getPaddingStyles,
|
|
18
|
+
} from './lib/BaseButton';
|
|
13
19
|
export {ExternalHyperlink, ExternalHyperlinkProps} from './lib/ExternalHyperlink';
|
|
14
20
|
export * from './lib/types';
|
|
@@ -29,10 +29,6 @@ export interface ButtonContainerProps extends BoxProps, GrowthBehavior {
|
|
|
29
29
|
* @default 'medium'
|
|
30
30
|
*/
|
|
31
31
|
size?: ButtonSizes;
|
|
32
|
-
/**
|
|
33
|
-
* The ref to the button that the styled component renders.
|
|
34
|
-
*/
|
|
35
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
36
32
|
/**
|
|
37
33
|
* Whether the icon should received filled (colored background layer) or regular styles.
|
|
38
34
|
* Corresponds to `toggled` in ToolbarIconButton
|
|
@@ -40,6 +36,13 @@ export interface ButtonContainerProps extends BoxProps, GrowthBehavior {
|
|
|
40
36
|
fillIcon?: boolean;
|
|
41
37
|
}
|
|
42
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Extends all the style properties from Box to our buttons as well as props from ButtonContainerProps.
|
|
41
|
+
* We omit `ref` since all of our buttons use `createComponent` and already give access to `ref`.
|
|
42
|
+
* Use this type to extend and customize any one off buttons that you want full control over styling.
|
|
43
|
+
*/
|
|
44
|
+
export interface BaseButtonProps extends Omit<ButtonContainerProps, 'ref'> {}
|
|
45
|
+
|
|
43
46
|
function getIconColorSelectors(
|
|
44
47
|
{
|
|
45
48
|
canvas: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import {ButtonColors} from './types';
|
|
3
|
-
import {BaseButton, getMinWidthStyles, getPaddingStyles} from './BaseButton';
|
|
3
|
+
import {BaseButton, BaseButtonProps, getMinWidthStyles, getPaddingStyles} from './BaseButton';
|
|
4
4
|
import {
|
|
5
5
|
GrowthBehavior,
|
|
6
6
|
useTheme,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
createComponent,
|
|
10
10
|
} from '@workday/canvas-kit-react/common';
|
|
11
11
|
|
|
12
|
-
export interface DeleteButtonProps extends Themeable, GrowthBehavior {
|
|
12
|
+
export interface DeleteButtonProps extends Themeable, GrowthBehavior, BaseButtonProps {
|
|
13
13
|
/**
|
|
14
14
|
* The size of the Button.
|
|
15
15
|
* @default 'medium'
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {colors} from '@workday/canvas-kit-react/tokens';
|
|
12
12
|
import {CanvasSystemIcon} from '@workday/design-assets-types';
|
|
13
13
|
import {ButtonSizes, IconPositions} from './types';
|
|
14
|
-
import {BaseButton, getMinWidthStyles, getPaddingStyles} from './BaseButton';
|
|
14
|
+
import {BaseButton, BaseButtonProps, getMinWidthStyles, getPaddingStyles} from './BaseButton';
|
|
15
15
|
|
|
16
16
|
const getPrimaryButtonColors = (variant: 'inverse' | undefined, theme: EmotionCanvasTheme) => {
|
|
17
17
|
const {
|
|
@@ -85,7 +85,7 @@ const getPrimaryButtonColors = (variant: 'inverse' | undefined, theme: EmotionCa
|
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
|
|
88
|
+
export interface PrimaryButtonProps extends Themeable, GrowthBehavior, BaseButtonProps {
|
|
89
89
|
/**
|
|
90
90
|
* The variant of the PrimaryButton.
|
|
91
91
|
* @default undefined
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
} from '@workday/canvas-kit-react/common';
|
|
12
12
|
import {CanvasSystemIcon} from '@workday/design-assets-types';
|
|
13
13
|
import {ButtonColors, ButtonSizes, IconPositions} from './types';
|
|
14
|
-
import {BaseButton, getMinWidthStyles, getPaddingStyles} from './BaseButton';
|
|
14
|
+
import {BaseButton, BaseButtonProps, getMinWidthStyles, getPaddingStyles} from './BaseButton';
|
|
15
15
|
|
|
16
|
-
export interface SecondaryButtonProps extends Themeable, GrowthBehavior {
|
|
16
|
+
export interface SecondaryButtonProps extends Themeable, GrowthBehavior, BaseButtonProps {
|
|
17
17
|
/**
|
|
18
18
|
* The variant of the SecondaryButton.
|
|
19
19
|
* @default undefined
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
import {borderRadius, colors, space} from '@workday/canvas-kit-react/tokens';
|
|
12
12
|
import {CanvasSystemIcon} from '@workday/design-assets-types';
|
|
13
13
|
import {ButtonColors, IconPositions, ButtonSizes} from './types';
|
|
14
|
-
import {BaseButton} from './BaseButton';
|
|
14
|
+
import {BaseButton, BaseButtonProps} from './BaseButton';
|
|
15
15
|
|
|
16
|
-
export interface TertiaryButtonProps extends Themeable {
|
|
16
|
+
export interface TertiaryButtonProps extends Themeable, BaseButtonProps {
|
|
17
17
|
/**
|
|
18
18
|
* The variant of the TertiaryButton.
|
|
19
19
|
* @default undefined
|
|
@@ -229,7 +229,7 @@ export const TertiaryButton = createComponent('button')({
|
|
|
229
229
|
size={size}
|
|
230
230
|
padding={getPaddingStyles(icon, iconPosition, children, size)}
|
|
231
231
|
minWidth={getMinWidthStyles(children, size)}
|
|
232
|
-
|
|
232
|
+
borderRadius={children ? borderRadius.m : borderRadius.circle}
|
|
233
233
|
{...elemProps}
|
|
234
234
|
>
|
|
235
235
|
{icon && iconPosition === 'start' && (
|
|
@@ -10,6 +10,9 @@ export type StyledType = {
|
|
|
10
10
|
as?: React.ElementType;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
// For React class components
|
|
14
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* Extract a Ref from T if it exists
|
|
15
18
|
* This will return the following:
|
|
@@ -20,6 +23,8 @@ export type StyledType = {
|
|
|
20
23
|
*/
|
|
21
24
|
type ExtractRef<T> = T extends undefined // test if T was even passed in
|
|
22
25
|
? never // T not passed in, we'll set the ref to `never`
|
|
26
|
+
: T extends Constructor<infer C>
|
|
27
|
+
? React.LegacyRef<C>
|
|
23
28
|
: React.Ref<
|
|
24
29
|
T extends keyof ElementTagNameMap // test if T is an element string like 'button' or 'div'
|
|
25
30
|
? ElementTagNameMap[T] // if yes, the ref should be the element interface. `'button' => HTMLButtonElement`
|
|
@@ -6,7 +6,7 @@ export { DeprecatedButton as deprecated_Button, DeprecatedButtonProps, } from '.
|
|
|
6
6
|
export { ToolbarIconButton, ToolbarIconButtonProps } from './lib/ToolbarIconButton';
|
|
7
7
|
export { ToolbarDropdownButton, ToolbarDropdownButtonProps } from './lib/ToolbarDropdownButton';
|
|
8
8
|
export { Hyperlink, HyperlinkProps } from './lib/Hyperlink';
|
|
9
|
-
export { BaseButton, ButtonContainerProps } from './lib/BaseButton';
|
|
9
|
+
export { BaseButton, ButtonContainerProps, BaseButtonProps, getMinWidthStyles, getPaddingStyles, } from './lib/BaseButton';
|
|
10
10
|
export { ExternalHyperlink, ExternalHyperlinkProps } from './lib/ExternalHyperlink';
|
|
11
11
|
export * from './lib/types';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC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AAC"}
|
|
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.ExternalHyperlink = exports.BaseButton = exports.Hyperlink = exports.ToolbarDropdownButton = exports.ToolbarIconButton = exports.deprecated_Button = exports.DeleteButton = exports.TertiaryButton = exports.SecondaryButton = exports.PrimaryButton = void 0;
|
|
13
|
+
exports.ExternalHyperlink = exports.getPaddingStyles = exports.getMinWidthStyles = exports.BaseButton = exports.Hyperlink = exports.ToolbarDropdownButton = exports.ToolbarIconButton = exports.deprecated_Button = exports.DeleteButton = exports.TertiaryButton = exports.SecondaryButton = exports.PrimaryButton = void 0;
|
|
14
14
|
var PrimaryButton_1 = require("./lib/PrimaryButton");
|
|
15
15
|
Object.defineProperty(exports, "PrimaryButton", { enumerable: true, get: function () { return PrimaryButton_1.PrimaryButton; } });
|
|
16
16
|
var SecondaryButton_1 = require("./lib/SecondaryButton");
|
|
@@ -29,6 +29,8 @@ var Hyperlink_1 = require("./lib/Hyperlink");
|
|
|
29
29
|
Object.defineProperty(exports, "Hyperlink", { enumerable: true, get: function () { return Hyperlink_1.Hyperlink; } });
|
|
30
30
|
var BaseButton_1 = require("./lib/BaseButton");
|
|
31
31
|
Object.defineProperty(exports, "BaseButton", { enumerable: true, get: function () { return BaseButton_1.BaseButton; } });
|
|
32
|
+
Object.defineProperty(exports, "getMinWidthStyles", { enumerable: true, get: function () { return BaseButton_1.getMinWidthStyles; } });
|
|
33
|
+
Object.defineProperty(exports, "getPaddingStyles", { enumerable: true, get: function () { return BaseButton_1.getPaddingStyles; } });
|
|
32
34
|
var ExternalHyperlink_1 = require("./lib/ExternalHyperlink");
|
|
33
35
|
Object.defineProperty(exports, "ExternalHyperlink", { enumerable: true, get: function () { return ExternalHyperlink_1.ExternalHyperlink; } });
|
|
34
36
|
__exportStar(require("./lib/types"), exports);
|
|
@@ -12,16 +12,19 @@ export interface ButtonContainerProps extends BoxProps, GrowthBehavior {
|
|
|
12
12
|
* @default 'medium'
|
|
13
13
|
*/
|
|
14
14
|
size?: ButtonSizes;
|
|
15
|
-
/**
|
|
16
|
-
* The ref to the button that the styled component renders.
|
|
17
|
-
*/
|
|
18
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
19
15
|
/**
|
|
20
16
|
* Whether the icon should received filled (colored background layer) or regular styles.
|
|
21
17
|
* Corresponds to `toggled` in ToolbarIconButton
|
|
22
18
|
*/
|
|
23
19
|
fillIcon?: boolean;
|
|
24
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Extends all the style properties from Box to our buttons as well as props from ButtonContainerProps.
|
|
23
|
+
* We omit `ref` since all of our buttons use `createComponent` and already give access to `ref`.
|
|
24
|
+
* Use this type to extend and customize any one off buttons that you want full control over styling.
|
|
25
|
+
*/
|
|
26
|
+
export interface BaseButtonProps extends Omit<ButtonContainerProps, 'ref'> {
|
|
27
|
+
}
|
|
25
28
|
export declare const getMinWidthStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes) => "24px" | "32px" | "40px" | "80px" | "auto" | "48px" | "112px" | "96px";
|
|
26
29
|
export declare const getPaddingStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes, icon: CanvasSystemIcon | undefined, iconPosition: IconPositions | undefined) => string | 0;
|
|
27
30
|
export declare const BaseButton: import("../../common").ElementComponent<"button", ButtonContainerProps> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/BaseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAEL,cAAc,EAMf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,QAAQ,EAAa,MAAM,kCAAkC,C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
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { BaseButtonProps } from './BaseButton';
|
|
2
3
|
import { GrowthBehavior, Themeable } from '@workday/canvas-kit-react/common';
|
|
3
|
-
export interface DeleteButtonProps extends Themeable, GrowthBehavior {
|
|
4
|
+
export interface DeleteButtonProps extends Themeable, GrowthBehavior, BaseButtonProps {
|
|
4
5
|
/**
|
|
5
6
|
* The size of the Button.
|
|
6
7
|
* @default 'medium'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/DeleteButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DeleteButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/DeleteButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAa,eAAe,EAAsC,MAAM,cAAc,CAAC;AAC9F,OAAO,EACL,cAAc,EAEd,SAAS,EAGV,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,cAAc,EAAE,eAAe;IACnF;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA0BD,eAAO,MAAM,YAAY,sEA0BvB,CAAC"}
|
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { GrowthBehavior, Themeable } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
4
|
import { ButtonSizes, IconPositions } from './types';
|
|
5
|
-
|
|
5
|
+
import { BaseButtonProps } from './BaseButton';
|
|
6
|
+
export interface PrimaryButtonProps extends Themeable, GrowthBehavior, BaseButtonProps {
|
|
6
7
|
/**
|
|
7
8
|
* The variant of the PrimaryButton.
|
|
8
9
|
* @default undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAa,eAAe,EAAsC,MAAM,cAAc,CAAC;AA0E9F,MAAM,WAAW,kBAAmB,SAAQ,SAAS,EAAE,cAAc,EAAE,eAAe;IACpF;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,uEA+CxB,CAAC"}
|
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { GrowthBehavior, Themeable, EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
4
|
import { ButtonColors, ButtonSizes, IconPositions } from './types';
|
|
5
|
-
|
|
5
|
+
import { BaseButtonProps } from './BaseButton';
|
|
6
|
+
export interface SecondaryButtonProps extends Themeable, GrowthBehavior, BaseButtonProps {
|
|
6
7
|
/**
|
|
7
8
|
* The variant of the SecondaryButton.
|
|
8
9
|
* @default undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,cAAc,EAEd,SAAS,EACT,kBAAkB,EAGnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,cAAc,EAEd,SAAS,EACT,kBAAkB,EAGnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACjE,OAAO,EAAa,eAAe,EAAsC,MAAM,cAAc,CAAC;AAE9F,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,cAAc,EAAE,eAAe;IACtF;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,yEA+C1B,CAAC;AAEH,eAAO,MAAM,wBAAwB,YAC1B,SAAS,GAAG,SAAS,SACvB,kBAAkB,KACxB,YAoFF,CAAC"}
|
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { Themeable } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
4
|
import { IconPositions, ButtonSizes } from './types';
|
|
5
|
-
|
|
5
|
+
import { BaseButtonProps } from './BaseButton';
|
|
6
|
+
export interface TertiaryButtonProps extends Themeable, BaseButtonProps {
|
|
6
7
|
/**
|
|
7
8
|
* The variant of the TertiaryButton.
|
|
8
9
|
* @default undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AACjE,OAAO,EAAa,eAAe,EAAC,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,eAAe;IACrE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAiJD,eAAO,MAAM,cAAc,wEAoDzB,CAAC"}
|
|
@@ -173,7 +173,7 @@ exports.TertiaryButton = common_1.createComponent('button')({
|
|
|
173
173
|
var _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.iconPosition, iconPosition = _c === void 0 ? 'start' : _c, _d = _a.isThemeable, isThemeable = _d === void 0 ? false : _d, variant = _a.variant, children = _a.children, icon = _a.icon, _e = _a.shouldMirrorIcon, shouldMirrorIcon = _e === void 0 ? false : _e, allCaps = _a.allCaps, elemProps = __rest(_a, ["size", "iconPosition", "isThemeable", "variant", "children", "icon", "shouldMirrorIcon", "allCaps"]);
|
|
174
174
|
var theme = common_1.useTheme();
|
|
175
175
|
var hasThemeStyles = !!children || isThemeable;
|
|
176
|
-
return (React.createElement(StyledTertiaryButtonContainer, __assign({ ref: ref, as: Element, allCaps: allCaps, colors: getTertiaryButtonColors(variant, theme, hasThemeStyles), size: size, padding: getPaddingStyles(icon, iconPosition, children, size), minWidth: getMinWidthStyles(children, size),
|
|
176
|
+
return (React.createElement(StyledTertiaryButtonContainer, __assign({ ref: ref, as: Element, allCaps: allCaps, colors: getTertiaryButtonColors(variant, theme, hasThemeStyles), size: size, padding: getPaddingStyles(icon, iconPosition, children, size), minWidth: getMinWidthStyles(children, size), borderRadius: children ? tokens_1.borderRadius.m : tokens_1.borderRadius.circle }, elemProps),
|
|
177
177
|
icon && iconPosition === 'start' && (React.createElement(BaseButton_1.BaseButton.Icon, { size: size, iconPosition: iconPosition, icon: icon, shouldMirrorIcon: shouldMirrorIcon })),
|
|
178
178
|
children && React.createElement(StyledButtonLabel, null, children),
|
|
179
179
|
icon && iconPosition === 'end' && (React.createElement(BaseButton_1.BaseButton.Icon, { size: size, iconPosition: iconPosition, icon: icon, shouldMirrorIcon: shouldMirrorIcon }))));
|
|
@@ -6,6 +6,7 @@ import { Model } from './models';
|
|
|
6
6
|
export declare type StyledType = {
|
|
7
7
|
as?: React.ElementType;
|
|
8
8
|
};
|
|
9
|
+
declare type Constructor<T> = new (...args: any[]) => T;
|
|
9
10
|
/**
|
|
10
11
|
* Extract a Ref from T if it exists
|
|
11
12
|
* This will return the following:
|
|
@@ -14,7 +15,7 @@ export declare type StyledType = {
|
|
|
14
15
|
* - `'button'` => `React.Ref<HTMLButtonElement>`
|
|
15
16
|
* - `ElementComponent<'button', ButtonProps>` => `React.Ref<HTMLButtonElement>`
|
|
16
17
|
*/
|
|
17
|
-
declare type ExtractRef<T> = T extends undefined ? never : React.Ref<T extends keyof ElementTagNameMap ? ElementTagNameMap[T] : T extends ElementComponent<infer U, any> ? U extends keyof ElementTagNameMap ? ElementTagNameMap[U] : U : T>;
|
|
18
|
+
declare type ExtractRef<T> = T extends undefined ? never : T extends Constructor<infer C> ? React.LegacyRef<C> : React.Ref<T extends keyof ElementTagNameMap ? ElementTagNameMap[T] : T extends ElementComponent<infer U, any> ? U extends keyof ElementTagNameMap ? ElementTagNameMap[U] : U : T>;
|
|
18
19
|
/**
|
|
19
20
|
* Generic component props with "as" prop
|
|
20
21
|
* @template P Additional props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAE/B;;GAEG;AACH,oBAAY,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAE/B;;GAEG;AACH,oBAAY,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,CAAC;AAGF,aAAK,WAAW,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEhD;;;;;;;GAOG;AACH,aAAK,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GACpC,KAAK,GACL,CAAC,SAAS,WAAW,CAAC,MAAM,CAAC,CAAC,GAC9B,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAClB,KAAK,CAAC,GAAG,CACP,CAAC,SAAS,MAAM,iBAAiB,GAC7B,iBAAiB,CAAC,CAAC,CAAC,GACpB,CAAC,SAAS,gBAAgB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GACxC,CAAC,SAAS,MAAM,iBAAiB,GAC/B,iBAAiB,CAAC,CAAC,CAAC,GACpB,CAAC,GACH,CAAC,CACN,CAAC;AAEN;;;;GAIG;AACH,oBAAY,cAAc,CAAC,CAAC,EAAE,WAAW,SAAS,KAAK,CAAC,WAAW,IAAI,CAAC,GACtE,IAAI,CA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DeprecatedColumn } from './lib/Column';
|
|
3
|
+
export { DeprecatedLayout, DeprecatedColumn };
|
|
4
4
|
export * from './lib/Box';
|
|
5
5
|
export * from './lib/utils/border';
|
|
6
6
|
export * from './lib/utils/color';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAC,CAAC;AAC7C,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -10,11 +10,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.DeprecatedColumn = exports.DeprecatedLayout = void 0;
|
|
14
14
|
var Layout_1 = require("./lib/Layout");
|
|
15
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "DeprecatedLayout", { enumerable: true, get: function () { return Layout_1.DeprecatedLayout; } });
|
|
16
16
|
var Column_1 = require("./lib/Column");
|
|
17
|
-
Object.defineProperty(exports, "
|
|
17
|
+
Object.defineProperty(exports, "DeprecatedColumn", { enumerable: true, get: function () { return Column_1.DeprecatedColumn; } });
|
|
18
18
|
__exportStar(require("./lib/Box"), exports);
|
|
19
19
|
__exportStar(require("./lib/utils/border"), exports);
|
|
20
20
|
__exportStar(require("./lib/utils/color"), exports);
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* ### Deprecated Layout Column Props
|
|
4
|
+
*
|
|
5
|
+
* As of Canvas Kit v8, Layout is being soft-deprecated.
|
|
6
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
7
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
8
|
+
* for more information.
|
|
9
|
+
*/
|
|
10
|
+
export interface DeprecatedColumnProps {
|
|
3
11
|
/**
|
|
4
|
-
* The children of the
|
|
12
|
+
* The children of the DeprecatedColumn (cannot be empty).
|
|
5
13
|
*/
|
|
6
14
|
children?: React.ReactNode;
|
|
7
15
|
/**
|
|
8
|
-
* The left and right padding of the
|
|
16
|
+
* The left and right padding of the DeprecatedColumn (inherits from Layout prop).
|
|
9
17
|
* @default 12
|
|
10
18
|
*/
|
|
11
19
|
spacing?: number;
|
|
@@ -18,7 +26,8 @@ export interface ColumnProps {
|
|
|
18
26
|
*/
|
|
19
27
|
width?: number | string;
|
|
20
28
|
}
|
|
21
|
-
export declare class
|
|
29
|
+
export declare class DeprecatedColumn extends React.Component<DeprecatedColumnProps> {
|
|
30
|
+
componentDidMount(): void;
|
|
22
31
|
render(): JSX.Element;
|
|
23
32
|
}
|
|
24
33
|
//# sourceMappingURL=Column.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Column.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Column.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAsCD,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAC1E,iBAAiB;IASV,MAAM;CASd"}
|
|
@@ -57,7 +57,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
57
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.
|
|
60
|
+
exports.DeprecatedColumn = void 0;
|
|
61
61
|
var React = __importStar(require("react"));
|
|
62
62
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
63
63
|
var is_prop_valid_1 = __importDefault(require("@emotion/is-prop-valid"));
|
|
@@ -92,15 +92,18 @@ var ColumnContainer = styled_1.default('div', {
|
|
|
92
92
|
}
|
|
93
93
|
return { flex: 1 };
|
|
94
94
|
});
|
|
95
|
-
var
|
|
96
|
-
__extends(
|
|
97
|
-
function
|
|
95
|
+
var DeprecatedColumn = /** @class */ (function (_super) {
|
|
96
|
+
__extends(DeprecatedColumn, _super);
|
|
97
|
+
function DeprecatedColumn() {
|
|
98
98
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
DeprecatedColumn.prototype.componentDidMount = function () {
|
|
101
|
+
console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
|
|
102
|
+
};
|
|
103
|
+
DeprecatedColumn.prototype.render = function () {
|
|
101
104
|
var _a = this.props, children = _a.children, spacing = _a.spacing, columns = _a.columns, width = _a.width, elemProps = __rest(_a, ["children", "spacing", "columns", "width"]);
|
|
102
105
|
return (React.createElement(ColumnContainer, __assign({ spacing: spacing, columns: columns, width: width }, elemProps), children));
|
|
103
106
|
};
|
|
104
|
-
return
|
|
107
|
+
return DeprecatedColumn;
|
|
105
108
|
}(React.Component));
|
|
106
|
-
exports.
|
|
109
|
+
exports.DeprecatedColumn = DeprecatedColumn;
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { DeprecatedColumn, DeprecatedColumnProps } from './Column';
|
|
3
|
+
/**
|
|
4
|
+
* ### Deprecated Layout Props
|
|
5
|
+
*
|
|
6
|
+
* As of Canvas Kit v8, Layout is being soft-deprecated.
|
|
7
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
8
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
9
|
+
* for more information.
|
|
10
|
+
*/
|
|
11
|
+
export interface DeprecatedLayoutProps {
|
|
4
12
|
/**
|
|
5
|
-
* The children of the
|
|
13
|
+
* The children of the DeprecatedLayout (cannot be empty).
|
|
6
14
|
*/
|
|
7
|
-
children: React.ReactElement<
|
|
15
|
+
children: React.ReactElement<DeprecatedColumnProps>[] | React.ReactNode;
|
|
8
16
|
/**
|
|
9
|
-
* The spacing of the
|
|
17
|
+
* The spacing of the DeprecatedLayout children.
|
|
10
18
|
*/
|
|
11
19
|
spacing?: number;
|
|
12
20
|
/**
|
|
13
|
-
* The padding of the
|
|
21
|
+
* The padding of the DeprecatedLayout's outside container.
|
|
14
22
|
* @default 12
|
|
15
23
|
*/
|
|
16
24
|
gutter?: number | string;
|
|
17
25
|
/**
|
|
18
|
-
* If true, set the max width of the
|
|
26
|
+
* If true, set the max width of the DeprecatedLayout container to `1280px`.
|
|
19
27
|
* @default false
|
|
20
28
|
*/
|
|
21
29
|
capWidth?: boolean;
|
|
22
30
|
}
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
/**
|
|
32
|
+
* ### Deprecated Layout
|
|
33
|
+
*
|
|
34
|
+
* As of Canvas Kit v8, Layout is being soft-deprecated.
|
|
35
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
36
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
37
|
+
* for more information.
|
|
38
|
+
*/
|
|
39
|
+
export declare class DeprecatedLayout extends React.Component<DeprecatedLayoutProps> {
|
|
40
|
+
componentDidMount(): void;
|
|
41
|
+
static Column: typeof DeprecatedColumn;
|
|
25
42
|
private renderChild;
|
|
26
43
|
render(): JSX.Element;
|
|
27
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,gBAAgB,EAAE,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAIjE;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,qBAAqB,CAAC,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;IACxE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkCD;;;;;;;GAOG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAC1E,iBAAiB;IASjB,OAAc,MAAM,0BAAoB;IAExC,OAAO,CAAC,WAAW,CAgBjB;IAEK,MAAM;CAed"}
|
|
@@ -57,7 +57,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
57
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.
|
|
60
|
+
exports.DeprecatedLayout = void 0;
|
|
61
61
|
var React = __importStar(require("react"));
|
|
62
62
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
63
63
|
var Column_1 = require("./Column");
|
|
@@ -89,15 +89,23 @@ var LayoutContainer = styled_1.default('div', {
|
|
|
89
89
|
margin: '0 auto',
|
|
90
90
|
};
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
/**
|
|
93
|
+
* ### Deprecated Layout
|
|
94
|
+
*
|
|
95
|
+
* As of Canvas Kit v8, Layout is being soft-deprecated.
|
|
96
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
97
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
98
|
+
* for more information.
|
|
99
|
+
*/
|
|
100
|
+
var DeprecatedLayout = /** @class */ (function (_super) {
|
|
101
|
+
__extends(DeprecatedLayout, _super);
|
|
102
|
+
function DeprecatedLayout() {
|
|
95
103
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
96
104
|
_this.renderChild = function (child, spacing) {
|
|
97
105
|
if (!React.isValidElement(child)) {
|
|
98
106
|
return;
|
|
99
107
|
}
|
|
100
|
-
if (child.type === Column_1.
|
|
108
|
+
if (child.type === Column_1.DeprecatedColumn) {
|
|
101
109
|
var childProps = child.props;
|
|
102
110
|
if (childProps.spacing || childProps.spacing === 0) {
|
|
103
111
|
return child;
|
|
@@ -108,13 +116,16 @@ var Layout = /** @class */ (function (_super) {
|
|
|
108
116
|
};
|
|
109
117
|
return _this;
|
|
110
118
|
}
|
|
111
|
-
|
|
119
|
+
DeprecatedLayout.prototype.componentDidMount = function () {
|
|
120
|
+
console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
|
|
121
|
+
};
|
|
122
|
+
DeprecatedLayout.prototype.render = function () {
|
|
112
123
|
var _this = this;
|
|
113
124
|
var _a = this.props, _b = _a.gutter, gutter = _b === void 0 ? tokens_1.canvas.space.xs : _b, _c = _a.spacing, spacing = _c === void 0 ? tokens_1.spaceNumbers.xs : _c, children = _a.children, capWidth = _a.capWidth, elemProps = __rest(_a, ["gutter", "spacing", "children", "capWidth"]);
|
|
114
125
|
return (React.createElement(LayoutContainer, __assign({ spacing: spacing, gutter: gutter, capWidth: capWidth }, elemProps), React.Children.map(children, function (child) { return _this.renderChild(child, spacing); })));
|
|
115
126
|
};
|
|
116
|
-
|
|
117
|
-
return
|
|
127
|
+
DeprecatedLayout.Column = Column_1.DeprecatedColumn;
|
|
128
|
+
return DeprecatedLayout;
|
|
118
129
|
}(React.Component));
|
|
119
|
-
exports.
|
|
120
|
-
|
|
130
|
+
exports.DeprecatedLayout = DeprecatedLayout;
|
|
131
|
+
DeprecatedLayout.Column = Column_1.DeprecatedColumn;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { ButtonContainerProps } from '@workday/canvas-kit-react/button';
|
|
1
2
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
2
|
-
export interface SegmentedControlButtonProps {
|
|
3
|
+
export interface SegmentedControlButtonProps extends ButtonContainerProps {
|
|
3
4
|
toggled?: boolean;
|
|
4
5
|
icon: CanvasSystemIcon;
|
|
5
6
|
value?: string | number;
|
|
7
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
8
|
}
|
|
7
9
|
export declare const SegmentedControlButton: import("../../common").ElementComponent<"button", SegmentedControlButtonProps>;
|
|
8
10
|
//# sourceMappingURL=SegmentedControlButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlButton.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SegmentedControlButton.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,oBAAoB,EACrB,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAyF9D,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,sBAAsB,gFAiBjC,CAAC"}
|