@workday/canvas-kit-react 11.0.0-alpha.805-next.0 → 11.0.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/dist/commonjs/icon/lib/AccentIcon.d.ts +2 -0
- package/dist/commonjs/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AccentIcon.js +1 -1
- package/dist/commonjs/icon/lib/AppletIcon.d.ts +2 -4
- package/dist/commonjs/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AppletIcon.js +1 -1
- package/dist/commonjs/icon/lib/Graphic.d.ts +12 -7
- package/dist/commonjs/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +9 -14
- package/dist/commonjs/icon/lib/Svg.d.ts +5 -1
- package/dist/commonjs/icon/lib/Svg.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Svg.js +8 -4
- package/dist/commonjs/icon/lib/SystemIcon.d.ts +2 -0
- package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
- package/dist/commonjs/text/lib/TypeLevelComponents.d.ts.map +1 -1
- package/dist/commonjs/text/lib/TypeLevelComponents.js +25 -8
- package/dist/es6/icon/lib/AccentIcon.d.ts +2 -0
- package/dist/es6/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AccentIcon.js +1 -1
- package/dist/es6/icon/lib/AppletIcon.d.ts +2 -4
- package/dist/es6/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AppletIcon.js +1 -1
- package/dist/es6/icon/lib/Graphic.d.ts +12 -7
- package/dist/es6/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/es6/icon/lib/Graphic.js +11 -16
- package/dist/es6/icon/lib/Svg.d.ts +5 -1
- package/dist/es6/icon/lib/Svg.d.ts.map +1 -1
- package/dist/es6/icon/lib/Svg.js +9 -5
- package/dist/es6/icon/lib/SystemIcon.d.ts +2 -0
- package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +1 -1
- package/dist/es6/text/lib/TypeLevelComponents.d.ts.map +1 -1
- package/dist/es6/text/lib/TypeLevelComponents.js +26 -9
- package/icon/lib/Graphic.tsx +13 -26
- package/icon/lib/Svg.tsx +9 -5
- package/package.json +4 -4
- package/text/lib/TypeLevelComponents.tsx +30 -9
|
@@ -50,6 +50,8 @@ export declare const accentIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
}, {
|
|
53
|
+
width: string;
|
|
54
|
+
height: string;
|
|
53
55
|
size: string;
|
|
54
56
|
}, never, never>, never>;
|
|
55
57
|
export declare const AccentIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", AccentIconProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAC;IACvF;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAC;IACvF;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;wBAuB5B,CAAC;AAEH,eAAO,MAAM,UAAU,sFAwBrB,CAAC"}
|
|
@@ -44,7 +44,7 @@ exports.accentIconStencil = canvas_kit_styling_1.createStencil({
|
|
|
44
44
|
vars: {
|
|
45
45
|
color: '',
|
|
46
46
|
},
|
|
47
|
-
base: { name: "8ab799", styles: "box-sizing:border-box;--size-svg-
|
|
47
|
+
base: { name: "8ab799", styles: "box-sizing:border-box;--size-svg-a30d66:3.5rem;& .color-500{fill:var(--color-accent-icon-f47b2a, var(--cnvs-base-palette-blueberry-500));}& .french-vanilla-100{fill:var(--cnvs-base-palette-french-vanilla-100);}" },
|
|
48
48
|
modifiers: {
|
|
49
49
|
transparent: {
|
|
50
50
|
true: { name: "0b6c92", styles: "& .french-vanilla-100{fill:transparent;}" }
|
|
@@ -44,10 +44,8 @@ export declare const appletIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
}, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* @default AppletIcon.Colors.Blueberry
|
|
50
|
-
*/
|
|
47
|
+
width: string;
|
|
48
|
+
height: string;
|
|
51
49
|
size: string;
|
|
52
50
|
}, never, never>, never>;
|
|
53
51
|
export declare const AppletIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", AppletIconProps> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppletIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AppletIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAKhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAE1B,gBAAgB,KAAG,SAsCrB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9F;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"AppletIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AppletIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAKhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAE1B,gBAAgB,KAAG,SAsCrB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9F;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;wBA6B5B,CAAC;AAEH,eAAO,MAAM,UAAU;;CAyBrB,CAAC"}
|
|
@@ -74,7 +74,7 @@ exports.appletIconStencil = canvas_kit_styling_1.createStencil({
|
|
|
74
74
|
color400: '',
|
|
75
75
|
color500: '',
|
|
76
76
|
},
|
|
77
|
-
base: { name: "ce2e64", styles: "box-sizing:border-box;--size-svg-
|
|
77
|
+
base: { name: "ce2e64", styles: "box-sizing:border-box;--size-svg-a30d66:5.75rem;& .color-100{fill:var(--cnvs-base-palette-french-vanilla-100);}& .color-200{fill:var(--color200-applet-icon-757179, var(--cnvs-base-palette-blueberry-200));}& .color-300{fill:var(--color300-applet-icon-757179, var(--cnvs-base-palette-blueberry-300));}& .color-400{fill:var(--color400-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}& .color-400-alpha-20{fill:var(--color400-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}& .color-500{fill:var(--color500-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}" }
|
|
78
78
|
}, "applet-icon-757179");
|
|
79
79
|
exports.AppletIcon = common_1.createComponent('span')({
|
|
80
80
|
displayName: 'AppletIcon',
|
|
@@ -8,13 +8,11 @@ export interface GraphicStyles {
|
|
|
8
8
|
/**
|
|
9
9
|
* The width of the Graphic in `px`. The Graphic's `width` takes precedence over its `height` in order to preserve its proportions.
|
|
10
10
|
* @default width of graphic
|
|
11
|
-
* @deprecated Use `cs` to set width, `cs={{"& svg": {width: '1rem'}}}`
|
|
12
11
|
*/
|
|
13
12
|
width?: number | string;
|
|
14
13
|
/**
|
|
15
14
|
* The height of the Graphic in `px`. If the Graphic's `height` is set, its `width` will be set to `100%`.
|
|
16
15
|
* @default height of graphic
|
|
17
|
-
* @deprecated Use `cs` to set height, `cs={{"& svg": {height: '1rem'}}}`
|
|
18
16
|
*/
|
|
19
17
|
height?: number | string;
|
|
20
18
|
/**
|
|
@@ -36,13 +34,20 @@ export declare const graphicStyles: ({ width, height, grow }: GraphicStyles) =>
|
|
|
36
34
|
export declare const graphicStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
37
35
|
grow: {
|
|
38
36
|
true: {
|
|
37
|
+
[x: string]: string;
|
|
39
38
|
width: string;
|
|
40
|
-
'& svg': {
|
|
41
|
-
width: string;
|
|
42
|
-
height: string;
|
|
43
|
-
};
|
|
44
39
|
};
|
|
45
40
|
};
|
|
46
|
-
}, {},
|
|
41
|
+
}, {}, import("@workday/canvas-kit-styling").Stencil<{
|
|
42
|
+
shouldMirror: {
|
|
43
|
+
true: {
|
|
44
|
+
transform: "scaleX(-1)";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
width: string;
|
|
49
|
+
height: string;
|
|
50
|
+
size: string;
|
|
51
|
+
}, never, never>, never>;
|
|
47
52
|
export declare const Graphic: import("@workday/canvas-kit-react/common").ElementComponent<"span", GraphicProps>;
|
|
48
53
|
//# sourceMappingURL=Graphic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Graphic.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAkB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Graphic.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAkB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IACxF;;OAEG;IACH,GAAG,EAAE,aAAa,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,4BAA2B,aAAa,KAAG,SA4BpE,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;wBAWzB,CAAC;AAEH,eAAO,MAAM,OAAO,mFAmBlB,CAAC"}
|
|
@@ -57,27 +57,22 @@ const graphicStyles = ({ width, height, grow }) => {
|
|
|
57
57
|
return {};
|
|
58
58
|
};
|
|
59
59
|
exports.graphicStyles = graphicStyles;
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated Part of supporting deprecated `height` and `width` props
|
|
62
|
-
*/
|
|
63
|
-
const graphicVars = canvas_kit_styling_1.createVars({ id: "32acc9", args: ["height", "width"] });
|
|
64
60
|
exports.graphicStencil = canvas_kit_styling_1.createStencil({
|
|
65
|
-
|
|
61
|
+
extends: Svg_1.svgStencil,
|
|
62
|
+
base: { name: "61ea39", styles: "box-sizing:border-box;" },
|
|
66
63
|
modifiers: {
|
|
67
64
|
grow: {
|
|
68
|
-
true: { name: "
|
|
65
|
+
true: { name: "fd9f26", styles: "width:100%;--width-svg-a30d66:100%;" }
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
|
-
}, "graphic-
|
|
68
|
+
}, "graphic-ee386a");
|
|
72
69
|
exports.Graphic = common_1.createComponent('span')({
|
|
73
70
|
displayName: 'Graphic',
|
|
74
71
|
Component: ({ grow, width, height, ...elemProps }, ref, Element) => {
|
|
75
|
-
return (React.createElement(Svg_1.Svg, Object.assign({ type: design_assets_types_1.CanvasIconTypes.Graphic, as: Element, ref: ref }, canvas_kit_styling_1.handleCsProp(elemProps,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
]))));
|
|
72
|
+
return (React.createElement(Svg_1.Svg, Object.assign({ type: design_assets_types_1.CanvasIconTypes.Graphic, as: Element, ref: ref }, canvas_kit_styling_1.handleCsProp(elemProps, exports.graphicStencil({
|
|
73
|
+
grow,
|
|
74
|
+
width: typeof width === 'number' ? canvas_kit_styling_1.px2rem(width) : width,
|
|
75
|
+
height: typeof height === 'number' ? canvas_kit_styling_1.px2rem(height) : height,
|
|
76
|
+
})))));
|
|
82
77
|
},
|
|
83
78
|
});
|
|
@@ -16,7 +16,11 @@ export declare const svgStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
}, {
|
|
19
|
-
/**
|
|
19
|
+
/** sets width of svg element */
|
|
20
|
+
width: string;
|
|
21
|
+
/** sets height of svg element */
|
|
22
|
+
height: string;
|
|
23
|
+
/** sets width and height of svg element */
|
|
20
24
|
size: string;
|
|
21
25
|
}, never, never>;
|
|
22
26
|
/** @deprecated */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAC,QAAQ,EAAc,MAAM,kCAAkC,CAAC;AAIvE,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,UAAU;;;;;;;IAEnB,
|
|
1
|
+
{"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAC,QAAQ,EAAc,MAAM,kCAAkC,CAAC;AAIvE,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,UAAU;;;;;;;IAEnB,gCAAgC;;IAEhC,iCAAiC;;IAEjC,2CAA2C;;gBAkB7C,CAAC;AAEH,kBAAkB;AAClB,eAAO,MAAM,yBAAyB,oDAKrC,CAAC;AAEF,eAAO,MAAM,GAAG,+EAkBd,CAAC"}
|
|
@@ -28,16 +28,20 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
28
28
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
29
29
|
exports.svgStencil = canvas_kit_styling_1.createStencil({
|
|
30
30
|
vars: {
|
|
31
|
-
/**
|
|
31
|
+
/** sets width of svg element */
|
|
32
|
+
width: '',
|
|
33
|
+
/** sets height of svg element */
|
|
34
|
+
height: '',
|
|
35
|
+
/** sets width and height of svg element */
|
|
32
36
|
size: '',
|
|
33
37
|
},
|
|
34
|
-
base: { name: "
|
|
38
|
+
base: { name: "003268", styles: "box-sizing:border-box;display:inline-block;> svg{display:block;width:var(--width-svg-a30d66, var(--size-svg-a30d66));height:var(--height-svg-a30d66, var(--size-svg-a30d66));}" },
|
|
35
39
|
modifiers: {
|
|
36
40
|
shouldMirror: {
|
|
37
|
-
true: { name: "
|
|
41
|
+
true: { name: "d9e55d", styles: "transform:scaleX(-1);" }
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
|
-
}, "svg-
|
|
44
|
+
}, "svg-a30d66");
|
|
41
45
|
/** @deprecated */
|
|
42
46
|
const transformColorNameToToken = (color) => {
|
|
43
47
|
if (color && color in canvas_tokens_web_1.base) {
|
|
@@ -112,6 +112,8 @@ export declare const systemIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
114
|
}, {
|
|
115
|
+
width: string;
|
|
116
|
+
height: string;
|
|
115
117
|
size: string;
|
|
116
118
|
}, never, never>, never>;
|
|
117
119
|
export declare const SystemIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", SystemIconProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAI1C,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAiBH,eAAO,MAAM,iBAAiB;IAG1B;;;;OAIG;;;;;IAJH;;;;OAIG
|
|
1
|
+
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAI1C,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAiBH,eAAO,MAAM,iBAAiB;IAG1B;;;;OAIG;;;;;IAJH;;;;OAIG;;;;;;;;;;;;;;wBAoCL,CAAC;AAEH,eAAO,MAAM,UAAU,sFA0CrB,CAAC"}
|
|
@@ -42,7 +42,7 @@ const systemIconCircleStencil = canvas_kit_styling_1.createStencil({
|
|
|
42
42
|
backgroundColor: '',
|
|
43
43
|
iconColor: '',
|
|
44
44
|
},
|
|
45
|
-
base: { name: "8a694b", styles: "box-sizing:border-box;background:var(--backgroundColor-system-icon-circle-554859, var(--cnvs-base-palette-soap-200));display:flex;align-items:center;justify-content:center;padding:var(--cnvs-sys-space-zero);border:none;border-radius:var(--cnvs-sys-shape-round);overflow:hidden;width:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));height:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));--size-svg-
|
|
45
|
+
base: { name: "8a694b", styles: "box-sizing:border-box;background:var(--backgroundColor-system-icon-circle-554859, var(--cnvs-base-palette-soap-200));display:flex;align-items:center;justify-content:center;padding:var(--cnvs-sys-space-zero);border:none;border-radius:var(--cnvs-sys-shape-round);overflow:hidden;width:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));height:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));--size-svg-a30d66:calc(var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10)) * 0.625);--color-system-icon-53c273:var(--iconColor-system-icon-circle-554859);& img{width:100%;height:100%;}" }
|
|
46
46
|
}, "system-icon-circle-554859");
|
|
47
47
|
exports.SystemIconCircle = common_1.createComponent('span')({
|
|
48
48
|
displayName: 'SystemIconCircle',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeLevelComponents.d.ts","sourceRoot":"","sources":["../../../../text/lib/TypeLevelComponents.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"TypeLevelComponents.d.ts","sourceRoot":"","sources":["../../../../text/lib/TypeLevelComponents.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAc,MAAM,QAAQ,CAAC;AAI9C,aAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzC;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ;AAOD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,kFAMlB,CAAC;AAOH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,QAAQ,kFAMnB,CAAC;AAOH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,mFAMlB,CAAC;AAOH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,KAAK,mFAMhB,CAAC"}
|
|
@@ -24,6 +24,11 @@ const React = __importStar(require("react"));
|
|
|
24
24
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
25
25
|
const Text_1 = require("./Text");
|
|
26
26
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
27
|
+
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
28
|
+
const subtextStencil = canvas_kit_styling_1.createStencil({
|
|
29
|
+
extends: Text_1.textStencil,
|
|
30
|
+
base: { name: "26be9a", styles: "box-sizing:border-box;" }
|
|
31
|
+
}, "subtext-4e8604");
|
|
27
32
|
/**
|
|
28
33
|
* This component is intended to be used for small subtext content or in tight spaces.
|
|
29
34
|
* By default, it renders a semantic `p` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -50,11 +55,15 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
50
55
|
*/
|
|
51
56
|
exports.Subtext = common_1.createComponent('p')({
|
|
52
57
|
displayName: 'Subtext',
|
|
53
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
58
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
54
59
|
const typeLevel = `subtext.${size}`;
|
|
55
|
-
return React.createElement(
|
|
60
|
+
return React.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, subtextStencil({ typeLevel, variant }))));
|
|
56
61
|
},
|
|
57
62
|
});
|
|
63
|
+
const bodyTextStencil = canvas_kit_styling_1.createStencil({
|
|
64
|
+
extends: Text_1.textStencil,
|
|
65
|
+
base: { name: "b117dc", styles: "box-sizing:border-box;" }
|
|
66
|
+
}, "body-text-44de3e");
|
|
58
67
|
/**
|
|
59
68
|
* This component is intended to be used for standard body text.
|
|
60
69
|
* By default, it renders a semantic `p` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -81,11 +90,15 @@ exports.Subtext = common_1.createComponent('p')({
|
|
|
81
90
|
*/
|
|
82
91
|
exports.BodyText = common_1.createComponent('p')({
|
|
83
92
|
displayName: 'BodyText',
|
|
84
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
93
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
85
94
|
const typeLevel = `body.${size}`;
|
|
86
|
-
return React.createElement(
|
|
95
|
+
return React.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, bodyTextStencil({ typeLevel, variant }))));
|
|
87
96
|
},
|
|
88
97
|
});
|
|
98
|
+
const headingStencil = canvas_kit_styling_1.createStencil({
|
|
99
|
+
extends: Text_1.textStencil,
|
|
100
|
+
base: { name: "7ba7e1", styles: "box-sizing:border-box;" }
|
|
101
|
+
}, "heading-5a3efc");
|
|
89
102
|
/**
|
|
90
103
|
* This component is intended to be used for headings and large text.
|
|
91
104
|
* By default, it renders a semantic `h2` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -112,11 +125,15 @@ exports.BodyText = common_1.createComponent('p')({
|
|
|
112
125
|
*/
|
|
113
126
|
exports.Heading = common_1.createComponent('h2')({
|
|
114
127
|
displayName: 'Heading',
|
|
115
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
128
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
116
129
|
const typeLevel = `heading.${size}`;
|
|
117
|
-
return React.createElement(
|
|
130
|
+
return React.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, headingStencil({ typeLevel, variant }))));
|
|
118
131
|
},
|
|
119
132
|
});
|
|
133
|
+
const titleStencil = canvas_kit_styling_1.createStencil({
|
|
134
|
+
extends: Text_1.textStencil,
|
|
135
|
+
base: { name: "23b801", styles: "box-sizing:border-box;" }
|
|
136
|
+
}, "title-2c12c2");
|
|
120
137
|
/**
|
|
121
138
|
* This component is intended to be used large page titles.
|
|
122
139
|
* By default, it renders a semantic `h1` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -143,8 +160,8 @@ exports.Heading = common_1.createComponent('h2')({
|
|
|
143
160
|
*/
|
|
144
161
|
exports.Title = common_1.createComponent('h1')({
|
|
145
162
|
displayName: 'Title',
|
|
146
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
163
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
147
164
|
const typeLevel = `title.${size}`;
|
|
148
|
-
return React.createElement(
|
|
165
|
+
return React.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, titleStencil({ typeLevel, variant }))));
|
|
149
166
|
},
|
|
150
167
|
});
|
|
@@ -50,6 +50,8 @@ export declare const accentIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
}, {
|
|
53
|
+
width: string;
|
|
54
|
+
height: string;
|
|
53
55
|
size: string;
|
|
54
56
|
}, never, never>, never>;
|
|
55
57
|
export declare const AccentIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", AccentIconProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAC;IACvF;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAC;IACvF;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;wBAuB5B,CAAC;AAEH,eAAO,MAAM,UAAU,sFAwBrB,CAAC"}
|
|
@@ -21,7 +21,7 @@ export const accentIconStencil = createStencil({
|
|
|
21
21
|
vars: {
|
|
22
22
|
color: '',
|
|
23
23
|
},
|
|
24
|
-
base: { name: "8ab799", styles: "box-sizing:border-box;--size-svg-
|
|
24
|
+
base: { name: "8ab799", styles: "box-sizing:border-box;--size-svg-a30d66:3.5rem;& .color-500{fill:var(--color-accent-icon-f47b2a, var(--cnvs-base-palette-blueberry-500));}& .french-vanilla-100{fill:var(--cnvs-base-palette-french-vanilla-100);}" },
|
|
25
25
|
modifiers: {
|
|
26
26
|
transparent: {
|
|
27
27
|
true: { name: "0b6c92", styles: "& .french-vanilla-100{fill:transparent;}" }
|
|
@@ -44,10 +44,8 @@ export declare const appletIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
}, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* @default AppletIcon.Colors.Blueberry
|
|
50
|
-
*/
|
|
47
|
+
width: string;
|
|
48
|
+
height: string;
|
|
51
49
|
size: string;
|
|
52
50
|
}, never, never>, never>;
|
|
53
51
|
export declare const AppletIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", AppletIconProps> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppletIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AppletIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAKhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAE1B,gBAAgB,KAAG,SAsCrB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9F;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"AppletIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AppletIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAKhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAE1B,gBAAgB,KAAG,SAsCrB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9F;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;wBA6B5B,CAAC;AAEH,eAAO,MAAM,UAAU;;CAyBrB,CAAC"}
|
|
@@ -51,7 +51,7 @@ export const appletIconStencil = createStencil({
|
|
|
51
51
|
color400: '',
|
|
52
52
|
color500: '',
|
|
53
53
|
},
|
|
54
|
-
base: { name: "ce2e64", styles: "box-sizing:border-box;--size-svg-
|
|
54
|
+
base: { name: "ce2e64", styles: "box-sizing:border-box;--size-svg-a30d66:5.75rem;& .color-100{fill:var(--cnvs-base-palette-french-vanilla-100);}& .color-200{fill:var(--color200-applet-icon-757179, var(--cnvs-base-palette-blueberry-200));}& .color-300{fill:var(--color300-applet-icon-757179, var(--cnvs-base-palette-blueberry-300));}& .color-400{fill:var(--color400-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}& .color-400-alpha-20{fill:var(--color400-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}& .color-500{fill:var(--color500-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}" }
|
|
55
55
|
}, "applet-icon-757179");
|
|
56
56
|
export const AppletIcon = createComponent('span')({
|
|
57
57
|
displayName: 'AppletIcon',
|
|
@@ -8,13 +8,11 @@ export interface GraphicStyles {
|
|
|
8
8
|
/**
|
|
9
9
|
* The width of the Graphic in `px`. The Graphic's `width` takes precedence over its `height` in order to preserve its proportions.
|
|
10
10
|
* @default width of graphic
|
|
11
|
-
* @deprecated Use `cs` to set width, `cs={{"& svg": {width: '1rem'}}}`
|
|
12
11
|
*/
|
|
13
12
|
width?: number | string;
|
|
14
13
|
/**
|
|
15
14
|
* The height of the Graphic in `px`. If the Graphic's `height` is set, its `width` will be set to `100%`.
|
|
16
15
|
* @default height of graphic
|
|
17
|
-
* @deprecated Use `cs` to set height, `cs={{"& svg": {height: '1rem'}}}`
|
|
18
16
|
*/
|
|
19
17
|
height?: number | string;
|
|
20
18
|
/**
|
|
@@ -36,13 +34,20 @@ export declare const graphicStyles: ({ width, height, grow }: GraphicStyles) =>
|
|
|
36
34
|
export declare const graphicStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
37
35
|
grow: {
|
|
38
36
|
true: {
|
|
37
|
+
[x: string]: string;
|
|
39
38
|
width: string;
|
|
40
|
-
'& svg': {
|
|
41
|
-
width: string;
|
|
42
|
-
height: string;
|
|
43
|
-
};
|
|
44
39
|
};
|
|
45
40
|
};
|
|
46
|
-
}, {},
|
|
41
|
+
}, {}, import("@workday/canvas-kit-styling").Stencil<{
|
|
42
|
+
shouldMirror: {
|
|
43
|
+
true: {
|
|
44
|
+
transform: "scaleX(-1)";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
width: string;
|
|
49
|
+
height: string;
|
|
50
|
+
size: string;
|
|
51
|
+
}, never, never>, never>;
|
|
47
52
|
export declare const Graphic: import("@workday/canvas-kit-react/common").ElementComponent<"span", GraphicProps>;
|
|
48
53
|
//# sourceMappingURL=Graphic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Graphic.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAkB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Graphic.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAkB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IACxF;;OAEG;IACH,GAAG,EAAE,aAAa,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,4BAA2B,aAAa,KAAG,SA4BpE,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;wBAWzB,CAAC;AAEH,eAAO,MAAM,OAAO,mFAmBlB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CanvasIconTypes } from '@workday/design-assets-types';
|
|
3
|
-
import { Svg } from './Svg';
|
|
3
|
+
import { Svg, svgStencil } from './Svg';
|
|
4
4
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
5
|
-
import { createStencil,
|
|
5
|
+
import { createStencil, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated `graphicStyles` will be removed in in a future version as a part of implementation of stencils and new tokens. Consider to use `graphicStencil` instead.
|
|
8
8
|
*/
|
|
@@ -34,27 +34,22 @@ export const graphicStyles = ({ width, height, grow }) => {
|
|
|
34
34
|
}
|
|
35
35
|
return {};
|
|
36
36
|
};
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated Part of supporting deprecated `height` and `width` props
|
|
39
|
-
*/
|
|
40
|
-
const graphicVars = createVars({ id: "32acc9", args: ["height", "width"] });
|
|
41
37
|
export const graphicStencil = createStencil({
|
|
42
|
-
|
|
38
|
+
extends: svgStencil,
|
|
39
|
+
base: { name: "61ea39", styles: "box-sizing:border-box;" },
|
|
43
40
|
modifiers: {
|
|
44
41
|
grow: {
|
|
45
|
-
true: { name: "
|
|
42
|
+
true: { name: "fd9f26", styles: "width:100%;--width-svg-a30d66:100%;" }
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
|
-
}, "graphic-
|
|
45
|
+
}, "graphic-ee386a");
|
|
49
46
|
export const Graphic = createComponent('span')({
|
|
50
47
|
displayName: 'Graphic',
|
|
51
48
|
Component: ({ grow, width, height, ...elemProps }, ref, Element) => {
|
|
52
|
-
return (React.createElement(Svg, Object.assign({ type: CanvasIconTypes.Graphic, as: Element, ref: ref }, handleCsProp(elemProps,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
]))));
|
|
49
|
+
return (React.createElement(Svg, Object.assign({ type: CanvasIconTypes.Graphic, as: Element, ref: ref }, handleCsProp(elemProps, graphicStencil({
|
|
50
|
+
grow,
|
|
51
|
+
width: typeof width === 'number' ? px2rem(width) : width,
|
|
52
|
+
height: typeof height === 'number' ? px2rem(height) : height,
|
|
53
|
+
})))));
|
|
59
54
|
},
|
|
60
55
|
});
|
|
@@ -16,7 +16,11 @@ export declare const svgStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
}, {
|
|
19
|
-
/**
|
|
19
|
+
/** sets width of svg element */
|
|
20
|
+
width: string;
|
|
21
|
+
/** sets height of svg element */
|
|
22
|
+
height: string;
|
|
23
|
+
/** sets width and height of svg element */
|
|
20
24
|
size: string;
|
|
21
25
|
}, never, never>;
|
|
22
26
|
/** @deprecated */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAC,QAAQ,EAAc,MAAM,kCAAkC,CAAC;AAIvE,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,UAAU;;;;;;;IAEnB,
|
|
1
|
+
{"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAC,QAAQ,EAAc,MAAM,kCAAkC,CAAC;AAIvE,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,UAAU;;;;;;;IAEnB,gCAAgC;;IAEhC,iCAAiC;;IAEjC,2CAA2C;;gBAkB7C,CAAC;AAEH,kBAAkB;AAClB,eAAO,MAAM,yBAAyB,oDAKrC,CAAC;AAEF,eAAO,MAAM,GAAG,+EAkBd,CAAC"}
|
package/dist/es6/icon/lib/Svg.js
CHANGED
|
@@ -2,20 +2,24 @@ import * as React from 'react';
|
|
|
2
2
|
import { validateIconType } from './utils';
|
|
3
3
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
4
4
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
5
|
-
import { createStencil } from '@workday/canvas-kit-styling';
|
|
5
|
+
import { createStencil, cssVar } from '@workday/canvas-kit-styling';
|
|
6
6
|
import { base } from '@workday/canvas-tokens-web';
|
|
7
7
|
export const svgStencil = createStencil({
|
|
8
8
|
vars: {
|
|
9
|
-
/**
|
|
9
|
+
/** sets width of svg element */
|
|
10
|
+
width: '',
|
|
11
|
+
/** sets height of svg element */
|
|
12
|
+
height: '',
|
|
13
|
+
/** sets width and height of svg element */
|
|
10
14
|
size: '',
|
|
11
15
|
},
|
|
12
|
-
base: { name: "
|
|
16
|
+
base: { name: "003268", styles: "box-sizing:border-box;display:inline-block;> svg{display:block;width:var(--width-svg-a30d66, var(--size-svg-a30d66));height:var(--height-svg-a30d66, var(--size-svg-a30d66));}" },
|
|
13
17
|
modifiers: {
|
|
14
18
|
shouldMirror: {
|
|
15
|
-
true: { name: "
|
|
19
|
+
true: { name: "d9e55d", styles: "transform:scaleX(-1);" }
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
}, "svg-
|
|
22
|
+
}, "svg-a30d66");
|
|
19
23
|
/** @deprecated */
|
|
20
24
|
export const transformColorNameToToken = (color) => {
|
|
21
25
|
if (color && color in base) {
|
|
@@ -112,6 +112,8 @@ export declare const systemIconStencil: import("@workday/canvas-kit-styling").St
|
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
114
|
}, {
|
|
115
|
+
width: string;
|
|
116
|
+
height: string;
|
|
115
117
|
size: string;
|
|
116
118
|
}, never, never>, never>;
|
|
117
119
|
export declare const SystemIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", SystemIconProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAI1C,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAiBH,eAAO,MAAM,iBAAiB;IAG1B;;;;OAIG;;;;;IAJH;;;;OAIG
|
|
1
|
+
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAI1C,OAAO,EAAM,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAiBH,eAAO,MAAM,iBAAiB;IAG1B;;;;OAIG;;;;;IAJH;;;;OAIG;;;;;;;;;;;;;;wBAoCL,CAAC;AAEH,eAAO,MAAM,UAAU,sFA0CrB,CAAC"}
|
|
@@ -20,7 +20,7 @@ const systemIconCircleStencil = createStencil({
|
|
|
20
20
|
backgroundColor: '',
|
|
21
21
|
iconColor: '',
|
|
22
22
|
},
|
|
23
|
-
base: { name: "8a694b", styles: "box-sizing:border-box;background:var(--backgroundColor-system-icon-circle-554859, var(--cnvs-base-palette-soap-200));display:flex;align-items:center;justify-content:center;padding:var(--cnvs-sys-space-zero);border:none;border-radius:var(--cnvs-sys-shape-round);overflow:hidden;width:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));height:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));--size-svg-
|
|
23
|
+
base: { name: "8a694b", styles: "box-sizing:border-box;background:var(--backgroundColor-system-icon-circle-554859, var(--cnvs-base-palette-soap-200));display:flex;align-items:center;justify-content:center;padding:var(--cnvs-sys-space-zero);border:none;border-radius:var(--cnvs-sys-shape-round);overflow:hidden;width:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));height:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));--size-svg-a30d66:calc(var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10)) * 0.625);--color-system-icon-53c273:var(--iconColor-system-icon-circle-554859);& img{width:100%;height:100%;}" }
|
|
24
24
|
}, "system-icon-circle-554859");
|
|
25
25
|
export const SystemIconCircle = createComponent('span')({
|
|
26
26
|
displayName: 'SystemIconCircle',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeLevelComponents.d.ts","sourceRoot":"","sources":["../../../../text/lib/TypeLevelComponents.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"TypeLevelComponents.d.ts","sourceRoot":"","sources":["../../../../text/lib/TypeLevelComponents.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAc,MAAM,QAAQ,CAAC;AAI9C,aAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzC;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ;AAOD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,kFAMlB,CAAC;AAOH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,QAAQ,kFAMnB,CAAC;AAOH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,mFAMlB,CAAC;AAOH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,KAAK,mFAMhB,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import {
|
|
3
|
+
import { textStencil } from './Text';
|
|
4
4
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import { createStencil } from '@workday/canvas-kit-styling';
|
|
6
|
+
const subtextStencil = createStencil({
|
|
7
|
+
extends: textStencil,
|
|
8
|
+
base: { name: "26be9a", styles: "box-sizing:border-box;" }
|
|
9
|
+
}, "subtext-4e8604");
|
|
5
10
|
/**
|
|
6
11
|
* This component is intended to be used for small subtext content or in tight spaces.
|
|
7
12
|
* By default, it renders a semantic `p` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -28,11 +33,15 @@ import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
|
28
33
|
*/
|
|
29
34
|
export const Subtext = createComponent('p')({
|
|
30
35
|
displayName: 'Subtext',
|
|
31
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
36
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
32
37
|
const typeLevel = `subtext.${size}`;
|
|
33
|
-
return React.createElement(
|
|
38
|
+
return React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, subtextStencil({ typeLevel, variant }))));
|
|
34
39
|
},
|
|
35
40
|
});
|
|
41
|
+
const bodyTextStencil = createStencil({
|
|
42
|
+
extends: textStencil,
|
|
43
|
+
base: { name: "b117dc", styles: "box-sizing:border-box;" }
|
|
44
|
+
}, "body-text-44de3e");
|
|
36
45
|
/**
|
|
37
46
|
* This component is intended to be used for standard body text.
|
|
38
47
|
* By default, it renders a semantic `p` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -59,11 +68,15 @@ export const Subtext = createComponent('p')({
|
|
|
59
68
|
*/
|
|
60
69
|
export const BodyText = createComponent('p')({
|
|
61
70
|
displayName: 'BodyText',
|
|
62
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
71
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
63
72
|
const typeLevel = `body.${size}`;
|
|
64
|
-
return React.createElement(
|
|
73
|
+
return React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, bodyTextStencil({ typeLevel, variant }))));
|
|
65
74
|
},
|
|
66
75
|
});
|
|
76
|
+
const headingStencil = createStencil({
|
|
77
|
+
extends: textStencil,
|
|
78
|
+
base: { name: "7ba7e1", styles: "box-sizing:border-box;" }
|
|
79
|
+
}, "heading-5a3efc");
|
|
67
80
|
/**
|
|
68
81
|
* This component is intended to be used for headings and large text.
|
|
69
82
|
* By default, it renders a semantic `h2` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -90,11 +103,15 @@ export const BodyText = createComponent('p')({
|
|
|
90
103
|
*/
|
|
91
104
|
export const Heading = createComponent('h2')({
|
|
92
105
|
displayName: 'Heading',
|
|
93
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
106
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
94
107
|
const typeLevel = `heading.${size}`;
|
|
95
|
-
return React.createElement(
|
|
108
|
+
return React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, headingStencil({ typeLevel, variant }))));
|
|
96
109
|
},
|
|
97
110
|
});
|
|
111
|
+
const titleStencil = createStencil({
|
|
112
|
+
extends: textStencil,
|
|
113
|
+
base: { name: "23b801", styles: "box-sizing:border-box;" }
|
|
114
|
+
}, "title-2c12c2");
|
|
98
115
|
/**
|
|
99
116
|
* This component is intended to be used large page titles.
|
|
100
117
|
* By default, it renders a semantic `h1` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -121,8 +138,8 @@ export const Heading = createComponent('h2')({
|
|
|
121
138
|
*/
|
|
122
139
|
export const Title = createComponent('h1')({
|
|
123
140
|
displayName: 'Title',
|
|
124
|
-
Component: ({ size, ...elemProps }, ref, Element) => {
|
|
141
|
+
Component: ({ size, variant, ...elemProps }, ref, Element) => {
|
|
125
142
|
const typeLevel = `title.${size}`;
|
|
126
|
-
return React.createElement(
|
|
143
|
+
return React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, titleStencil({ typeLevel, variant }))));
|
|
127
144
|
},
|
|
128
145
|
});
|
package/icon/lib/Graphic.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import {CanvasGraphic, CanvasIconTypes} from '@workday/design-assets-types';
|
|
3
3
|
import {CSSObject} from '@emotion/styled';
|
|
4
|
-
import {Svg, SvgProps} from './Svg';
|
|
4
|
+
import {Svg, SvgProps, svgStencil} from './Svg';
|
|
5
5
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
6
|
-
import {createStencil,
|
|
6
|
+
import {createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @deprecated Interface `GraphicStyles` will be removed in a future version. `grow` prop will be moved inside `GraphicProps`.
|
|
@@ -12,13 +12,11 @@ export interface GraphicStyles {
|
|
|
12
12
|
/**
|
|
13
13
|
* The width of the Graphic in `px`. The Graphic's `width` takes precedence over its `height` in order to preserve its proportions.
|
|
14
14
|
* @default width of graphic
|
|
15
|
-
* @deprecated Use `cs` to set width, `cs={{"& svg": {width: '1rem'}}}`
|
|
16
15
|
*/
|
|
17
16
|
width?: number | string;
|
|
18
17
|
/**
|
|
19
18
|
* The height of the Graphic in `px`. If the Graphic's `height` is set, its `width` will be set to `100%`.
|
|
20
19
|
* @default height of graphic
|
|
21
|
-
* @deprecated Use `cs` to set height, `cs={{"& svg": {height: '1rem'}}}`
|
|
22
20
|
*/
|
|
23
21
|
height?: number | string;
|
|
24
22
|
/**
|
|
@@ -68,26 +66,14 @@ export const graphicStyles = ({width, height, grow}: GraphicStyles): CSSObject =
|
|
|
68
66
|
return {};
|
|
69
67
|
};
|
|
70
68
|
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Part of supporting deprecated `height` and `width` props
|
|
73
|
-
*/
|
|
74
|
-
const graphicVars = createVars('height', 'width');
|
|
75
|
-
|
|
76
69
|
export const graphicStencil = createStencil({
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
width: cssVar(graphicVars.width, '100%'),
|
|
80
|
-
height: cssVar(graphicVars.height, '100%'),
|
|
81
|
-
},
|
|
82
|
-
},
|
|
70
|
+
extends: svgStencil,
|
|
71
|
+
base: {},
|
|
83
72
|
modifiers: {
|
|
84
73
|
grow: {
|
|
85
74
|
true: {
|
|
86
75
|
width: '100%',
|
|
87
|
-
|
|
88
|
-
width: '100%',
|
|
89
|
-
height: '100%',
|
|
90
|
-
},
|
|
76
|
+
[svgStencil.vars.width]: '100%',
|
|
91
77
|
},
|
|
92
78
|
},
|
|
93
79
|
},
|
|
@@ -101,13 +87,14 @@ export const Graphic = createComponent('span')({
|
|
|
101
87
|
type={CanvasIconTypes.Graphic}
|
|
102
88
|
as={Element}
|
|
103
89
|
ref={ref}
|
|
104
|
-
{...handleCsProp(
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
90
|
+
{...handleCsProp(
|
|
91
|
+
elemProps,
|
|
92
|
+
graphicStencil({
|
|
93
|
+
grow,
|
|
94
|
+
width: typeof width === 'number' ? px2rem(width) : width,
|
|
95
|
+
height: typeof height === 'number' ? px2rem(height) : height,
|
|
96
|
+
})
|
|
97
|
+
)}
|
|
111
98
|
/>
|
|
112
99
|
);
|
|
113
100
|
},
|
package/icon/lib/Svg.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import {CanvasIcon, CanvasIconTypes} from '@workday/design-assets-types';
|
|
|
3
3
|
import {validateIconType} from './utils';
|
|
4
4
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
5
5
|
import {BoxProps, mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
6
|
-
import {createStencil} from '@workday/canvas-kit-styling';
|
|
6
|
+
import {createStencil, cssVar} from '@workday/canvas-kit-styling';
|
|
7
7
|
import {base} from '@workday/canvas-tokens-web';
|
|
8
8
|
|
|
9
9
|
export interface SvgProps extends BoxProps {
|
|
@@ -18,15 +18,19 @@ export interface SvgProps extends BoxProps {
|
|
|
18
18
|
|
|
19
19
|
export const svgStencil = createStencil({
|
|
20
20
|
vars: {
|
|
21
|
-
/**
|
|
21
|
+
/** sets width of svg element */
|
|
22
|
+
width: '',
|
|
23
|
+
/** sets height of svg element */
|
|
24
|
+
height: '',
|
|
25
|
+
/** sets width and height of svg element */
|
|
22
26
|
size: '',
|
|
23
27
|
},
|
|
24
|
-
base: ({size}) => ({
|
|
28
|
+
base: ({width, height, size}) => ({
|
|
25
29
|
display: 'inline-block',
|
|
26
30
|
'> svg': {
|
|
27
31
|
display: 'block',
|
|
28
|
-
width: size,
|
|
29
|
-
height: size,
|
|
32
|
+
width: cssVar(width, size),
|
|
33
|
+
height: cssVar(height, size),
|
|
30
34
|
},
|
|
31
35
|
}),
|
|
32
36
|
modifiers: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "11.0.0
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@emotion/styled": "^11.6.0",
|
|
50
50
|
"@popperjs/core": "^2.5.4",
|
|
51
51
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
52
|
-
"@workday/canvas-kit-popup-stack": "^11.0.0
|
|
53
|
-
"@workday/canvas-kit-styling": "^11.0.0
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^11.0.0",
|
|
53
|
+
"@workday/canvas-kit-styling": "^11.0.0",
|
|
54
54
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
55
55
|
"@workday/canvas-tokens-web": "^1.3.1",
|
|
56
56
|
"@workday/design-assets-types": "^0.2.8",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
68
68
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "60ab75c33942c15bb1fd116ca19bdebeb005a99d"
|
|
71
71
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
3
|
-
import {
|
|
3
|
+
import {TextProps, textStencil} from './Text';
|
|
4
4
|
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import {createStencil} from '@workday/canvas-kit-styling';
|
|
5
6
|
|
|
6
7
|
type Size = 'large' | 'medium' | 'small';
|
|
7
8
|
|
|
@@ -16,6 +17,11 @@ export interface TypeLevelProps extends Omit<TextProps, 'typeLevel'> {
|
|
|
16
17
|
size: Size;
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
const subtextStencil = createStencil({
|
|
21
|
+
extends: textStencil,
|
|
22
|
+
base: {},
|
|
23
|
+
});
|
|
24
|
+
|
|
19
25
|
/**
|
|
20
26
|
* This component is intended to be used for small subtext content or in tight spaces.
|
|
21
27
|
* By default, it renders a semantic `p` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -42,12 +48,17 @@ export interface TypeLevelProps extends Omit<TextProps, 'typeLevel'> {
|
|
|
42
48
|
*/
|
|
43
49
|
export const Subtext = createComponent('p')({
|
|
44
50
|
displayName: 'Subtext',
|
|
45
|
-
Component: ({size, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
51
|
+
Component: ({size, variant, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
46
52
|
const typeLevel = `subtext.${size}` as TextProps['typeLevel'];
|
|
47
|
-
return <
|
|
53
|
+
return <Element ref={ref} {...mergeStyles(elemProps, subtextStencil({typeLevel, variant}))} />;
|
|
48
54
|
},
|
|
49
55
|
});
|
|
50
56
|
|
|
57
|
+
const bodyTextStencil = createStencil({
|
|
58
|
+
extends: textStencil,
|
|
59
|
+
base: {},
|
|
60
|
+
});
|
|
61
|
+
|
|
51
62
|
/**
|
|
52
63
|
* This component is intended to be used for standard body text.
|
|
53
64
|
* By default, it renders a semantic `p` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -74,12 +85,17 @@ export const Subtext = createComponent('p')({
|
|
|
74
85
|
*/
|
|
75
86
|
export const BodyText = createComponent('p')({
|
|
76
87
|
displayName: 'BodyText',
|
|
77
|
-
Component: ({size, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
88
|
+
Component: ({size, variant, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
78
89
|
const typeLevel = `body.${size}` as TextProps['typeLevel'];
|
|
79
|
-
return <
|
|
90
|
+
return <Element ref={ref} {...mergeStyles(elemProps, bodyTextStencil({typeLevel, variant}))} />;
|
|
80
91
|
},
|
|
81
92
|
});
|
|
82
93
|
|
|
94
|
+
const headingStencil = createStencil({
|
|
95
|
+
extends: textStencil,
|
|
96
|
+
base: {},
|
|
97
|
+
});
|
|
98
|
+
|
|
83
99
|
/**
|
|
84
100
|
* This component is intended to be used for headings and large text.
|
|
85
101
|
* By default, it renders a semantic `h2` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -106,12 +122,17 @@ export const BodyText = createComponent('p')({
|
|
|
106
122
|
*/
|
|
107
123
|
export const Heading = createComponent('h2')({
|
|
108
124
|
displayName: 'Heading',
|
|
109
|
-
Component: ({size, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
125
|
+
Component: ({size, variant, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
110
126
|
const typeLevel = `heading.${size}` as TextProps['typeLevel'];
|
|
111
|
-
return <
|
|
127
|
+
return <Element ref={ref} {...mergeStyles(elemProps, headingStencil({typeLevel, variant}))} />;
|
|
112
128
|
},
|
|
113
129
|
});
|
|
114
130
|
|
|
131
|
+
const titleStencil = createStencil({
|
|
132
|
+
extends: textStencil,
|
|
133
|
+
base: {},
|
|
134
|
+
});
|
|
135
|
+
|
|
115
136
|
/**
|
|
116
137
|
* This component is intended to be used large page titles.
|
|
117
138
|
* By default, it renders a semantic `h1` element, but you can adjust this as needed with the `as` prop.
|
|
@@ -138,8 +159,8 @@ export const Heading = createComponent('h2')({
|
|
|
138
159
|
*/
|
|
139
160
|
export const Title = createComponent('h1')({
|
|
140
161
|
displayName: 'Title',
|
|
141
|
-
Component: ({size, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
162
|
+
Component: ({size, variant, ...elemProps}: TypeLevelProps, ref, Element) => {
|
|
142
163
|
const typeLevel = `title.${size}` as TextProps['typeLevel'];
|
|
143
|
-
return <
|
|
164
|
+
return <Element ref={ref} {...mergeStyles(elemProps, titleStencil({typeLevel, variant}))} />;
|
|
144
165
|
},
|
|
145
166
|
});
|