@workday/canvas-kit-preview-react 15.0.0-alpha.0075-next.0 → 15.0.0-alpha.0077-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/dist/commonjs/index.d.ts +1 -2
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -2
- package/dist/es6/index.d.ts +1 -2
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +1 -2
- package/index.ts +1 -2
- package/package.json +4 -4
- package/avatar/index.ts +0 -5
- package/avatar/lib/Avatar.tsx +0 -156
- package/avatar/lib/AvatarImage.tsx +0 -20
- package/avatar/lib/AvatarName.tsx +0 -32
- package/avatar/lib/BaseAvatar.tsx +0 -127
- package/avatar/lib/getInitialsFromName.ts +0 -11
- package/avatar/package.json +0 -6
- package/dist/commonjs/avatar/index.d.ts +0 -6
- package/dist/commonjs/avatar/index.d.ts.map +0 -1
- package/dist/commonjs/avatar/index.js +0 -21
- package/dist/commonjs/avatar/lib/Avatar.d.ts +0 -281
- package/dist/commonjs/avatar/lib/Avatar.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/Avatar.js +0 -53
- package/dist/commonjs/avatar/lib/AvatarImage.d.ts +0 -6
- package/dist/commonjs/avatar/lib/AvatarImage.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/AvatarImage.js +0 -15
- package/dist/commonjs/avatar/lib/AvatarName.d.ts +0 -14
- package/dist/commonjs/avatar/lib/AvatarName.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/AvatarName.js +0 -16
- package/dist/commonjs/avatar/lib/BaseAvatar.d.ts +0 -148
- package/dist/commonjs/avatar/lib/BaseAvatar.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/BaseAvatar.js +0 -47
- package/dist/commonjs/avatar/lib/getInitialsFromName.d.ts +0 -2
- package/dist/commonjs/avatar/lib/getInitialsFromName.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/getInitialsFromName.js +0 -13
- package/dist/commonjs/select/index.d.ts +0 -3
- package/dist/commonjs/select/index.d.ts.map +0 -1
- package/dist/commonjs/select/index.js +0 -17
- package/dist/commonjs/select/lib/Select.d.ts +0 -31
- package/dist/commonjs/select/lib/Select.d.ts.map +0 -1
- package/dist/commonjs/select/lib/Select.js +0 -486
- package/dist/commonjs/select/lib/SelectBase.d.ts +0 -165
- package/dist/commonjs/select/lib/SelectBase.d.ts.map +0 -1
- package/dist/commonjs/select/lib/SelectBase.js +0 -235
- package/dist/commonjs/select/lib/SelectMenu.d.ts +0 -45
- package/dist/commonjs/select/lib/SelectMenu.d.ts.map +0 -1
- package/dist/commonjs/select/lib/SelectMenu.js +0 -195
- package/dist/commonjs/select/lib/SelectOption.d.ts +0 -38
- package/dist/commonjs/select/lib/SelectOption.d.ts.map +0 -1
- package/dist/commonjs/select/lib/SelectOption.js +0 -73
- package/dist/commonjs/select/lib/scrolling.d.ts +0 -5
- package/dist/commonjs/select/lib/scrolling.d.ts.map +0 -1
- package/dist/commonjs/select/lib/scrolling.js +0 -36
- package/dist/commonjs/select/lib/types.d.ts +0 -37
- package/dist/commonjs/select/lib/types.d.ts.map +0 -1
- package/dist/commonjs/select/lib/types.js +0 -2
- package/dist/commonjs/select/lib/utils.d.ts +0 -10
- package/dist/commonjs/select/lib/utils.d.ts.map +0 -1
- package/dist/commonjs/select/lib/utils.js +0 -27
- package/dist/es6/avatar/index.d.ts +0 -6
- package/dist/es6/avatar/index.d.ts.map +0 -1
- package/dist/es6/avatar/index.js +0 -5
- package/dist/es6/avatar/lib/Avatar.d.ts +0 -281
- package/dist/es6/avatar/lib/Avatar.d.ts.map +0 -1
- package/dist/es6/avatar/lib/Avatar.js +0 -47
- package/dist/es6/avatar/lib/AvatarImage.d.ts +0 -6
- package/dist/es6/avatar/lib/AvatarImage.d.ts.map +0 -1
- package/dist/es6/avatar/lib/AvatarImage.js +0 -12
- package/dist/es6/avatar/lib/AvatarName.d.ts +0 -14
- package/dist/es6/avatar/lib/AvatarName.d.ts.map +0 -1
- package/dist/es6/avatar/lib/AvatarName.js +0 -13
- package/dist/es6/avatar/lib/BaseAvatar.d.ts +0 -148
- package/dist/es6/avatar/lib/BaseAvatar.d.ts.map +0 -1
- package/dist/es6/avatar/lib/BaseAvatar.js +0 -44
- package/dist/es6/avatar/lib/getInitialsFromName.d.ts +0 -2
- package/dist/es6/avatar/lib/getInitialsFromName.d.ts.map +0 -1
- package/dist/es6/avatar/lib/getInitialsFromName.js +0 -9
- package/dist/es6/select/index.d.ts +0 -3
- package/dist/es6/select/index.d.ts.map +0 -1
- package/dist/es6/select/index.js +0 -1
- package/dist/es6/select/lib/Select.d.ts +0 -31
- package/dist/es6/select/lib/Select.d.ts.map +0 -1
- package/dist/es6/select/lib/Select.js +0 -460
- package/dist/es6/select/lib/SelectBase.d.ts +0 -165
- package/dist/es6/select/lib/SelectBase.d.ts.map +0 -1
- package/dist/es6/select/lib/SelectBase.js +0 -208
- package/dist/es6/select/lib/SelectMenu.d.ts +0 -45
- package/dist/es6/select/lib/SelectMenu.d.ts.map +0 -1
- package/dist/es6/select/lib/SelectMenu.js +0 -191
- package/dist/es6/select/lib/SelectOption.d.ts +0 -38
- package/dist/es6/select/lib/SelectOption.d.ts.map +0 -1
- package/dist/es6/select/lib/SelectOption.js +0 -69
- package/dist/es6/select/lib/scrolling.d.ts +0 -5
- package/dist/es6/select/lib/scrolling.d.ts.map +0 -1
- package/dist/es6/select/lib/scrolling.js +0 -32
- package/dist/es6/select/lib/types.d.ts +0 -37
- package/dist/es6/select/lib/types.d.ts.map +0 -1
- package/dist/es6/select/lib/types.js +0 -1
- package/dist/es6/select/lib/utils.d.ts +0 -10
- package/dist/es6/select/lib/utils.d.ts.map +0 -1
- package/dist/es6/select/lib/utils.js +0 -22
- package/select/index.ts +0 -8
- package/select/lib/Select.tsx +0 -595
- package/select/lib/SelectBase.tsx +0 -493
- package/select/lib/SelectMenu.tsx +0 -304
- package/select/lib/SelectOption.tsx +0 -133
- package/select/lib/scrolling.ts +0 -42
- package/select/lib/types.ts +0 -37
- package/select/lib/utils.ts +0 -30
- package/select/package.json +0 -6
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { handleCsProp, createStencil } from '@workday/canvas-kit-styling';
|
|
4
|
-
import { getInitialsFromName } from './getInitialsFromName';
|
|
5
|
-
export const avatarNameStencil = createStencil({
|
|
6
|
-
base: { name: "2ezy3g", styles: "box-sizing:border-box;text-transform:uppercase;cursor:default;" }
|
|
7
|
-
}, "avatar-name-ead534");
|
|
8
|
-
export const AvatarName = createComponent('span')({
|
|
9
|
-
displayName: 'AvatarName',
|
|
10
|
-
Component: ({ name, preferredInitials, ...elemProps }, ref, Element) => {
|
|
11
|
-
return (_jsx(Element, { ref: ref, ...handleCsProp(elemProps, avatarNameStencil()), children: preferredInitials || getInitialsFromName(name) }));
|
|
12
|
-
},
|
|
13
|
-
});
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CSProps } from '@workday/canvas-kit-styling';
|
|
3
|
-
export interface BaseAvatarProps extends CSProps {
|
|
4
|
-
/**
|
|
5
|
-
* Children of the BaseAvatar.
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* The variant of the Avatar.
|
|
10
|
-
* @default "blue"
|
|
11
|
-
*/
|
|
12
|
-
variant?: 'blue' | 'amber' | 'teal' | 'purple';
|
|
13
|
-
/**
|
|
14
|
-
* The size of the Avatar.
|
|
15
|
-
* `extraExtraSmall` is 24px x 24px
|
|
16
|
-
* `extraSmall` is 32px x 32px
|
|
17
|
-
* `small` is 40px x 40px
|
|
18
|
-
* `medium` is 48px x 48px
|
|
19
|
-
* `large` is 72px x 72px
|
|
20
|
-
* `extraLarge` is 96px x 96px
|
|
21
|
-
* `extraExtraLarge` is 120px x 120px
|
|
22
|
-
* @default "medium"
|
|
23
|
-
*/
|
|
24
|
-
size?: 'extraExtraSmall' | 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'extraExtraLarge' | (string & {});
|
|
25
|
-
}
|
|
26
|
-
export declare const baseAvatarStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
27
|
-
variant: {
|
|
28
|
-
blue: ({ backgroundColor, color }: {
|
|
29
|
-
backgroundColor: `--${string}`;
|
|
30
|
-
color: `--${string}`;
|
|
31
|
-
size: `--${string}`;
|
|
32
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
33
|
-
backgroundColor: `var(--${string}, var(--cnvs-base-palette-blue-300))`;
|
|
34
|
-
color: `var(--${string}, var(--cnvs-base-palette-blue-800))`;
|
|
35
|
-
};
|
|
36
|
-
amber: ({ backgroundColor, color }: {
|
|
37
|
-
backgroundColor: `--${string}`;
|
|
38
|
-
color: `--${string}`;
|
|
39
|
-
size: `--${string}`;
|
|
40
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
41
|
-
backgroundColor: `var(--${string}, var(--cnvs-base-palette-amber-200))`;
|
|
42
|
-
color: `var(--${string}, var(--cnvs-base-palette-amber-700))`;
|
|
43
|
-
};
|
|
44
|
-
teal: ({ backgroundColor, color }: {
|
|
45
|
-
backgroundColor: `--${string}`;
|
|
46
|
-
color: `--${string}`;
|
|
47
|
-
size: `--${string}`;
|
|
48
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
49
|
-
backgroundColor: `var(--${string}, var(--cnvs-base-palette-teal-300))`;
|
|
50
|
-
color: `var(--${string}, var(--cnvs-base-palette-teal-800))`;
|
|
51
|
-
};
|
|
52
|
-
purple: ({ backgroundColor, color }: {
|
|
53
|
-
backgroundColor: `--${string}`;
|
|
54
|
-
color: `--${string}`;
|
|
55
|
-
size: `--${string}`;
|
|
56
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
57
|
-
backgroundColor: `var(--${string}, var(--cnvs-base-palette-purple-300))`;
|
|
58
|
-
color: `var(--${string}, var(--cnvs-base-palette-purple-800))`;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
size: {
|
|
62
|
-
extraExtraSmall: ({ size }: {
|
|
63
|
-
backgroundColor: `--${string}`;
|
|
64
|
-
color: `--${string}`;
|
|
65
|
-
size: `--${string}`;
|
|
66
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
67
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
68
|
-
fontWeight: "--cnvs-sys-font-weight-normal";
|
|
69
|
-
lineHeight: "--cnvs-sys-line-height-subtext-small";
|
|
70
|
-
fontSize: "--cnvs-sys-font-size-subtext-small";
|
|
71
|
-
letterSpacing: "--cnvs-base-letter-spacing-50";
|
|
72
|
-
};
|
|
73
|
-
extraSmall: ({ size }: {
|
|
74
|
-
backgroundColor: `--${string}`;
|
|
75
|
-
color: `--${string}`;
|
|
76
|
-
size: `--${string}`;
|
|
77
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
78
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
79
|
-
fontWeight: "--cnvs-sys-font-weight-normal";
|
|
80
|
-
lineHeight: "--cnvs-sys-line-height-subtext-medium";
|
|
81
|
-
fontSize: "--cnvs-sys-font-size-subtext-medium";
|
|
82
|
-
letterSpacing: "--cnvs-base-letter-spacing-100";
|
|
83
|
-
};
|
|
84
|
-
small: ({ size }: {
|
|
85
|
-
backgroundColor: `--${string}`;
|
|
86
|
-
color: `--${string}`;
|
|
87
|
-
size: `--${string}`;
|
|
88
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
89
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
90
|
-
fontWeight: "--cnvs-sys-font-weight-normal";
|
|
91
|
-
lineHeight: "--cnvs-sys-line-height-body-small";
|
|
92
|
-
fontSize: "--cnvs-sys-font-size-body-small";
|
|
93
|
-
letterSpacing: "--cnvs-base-letter-spacing-200";
|
|
94
|
-
};
|
|
95
|
-
medium: ({ size }: {
|
|
96
|
-
backgroundColor: `--${string}`;
|
|
97
|
-
color: `--${string}`;
|
|
98
|
-
size: `--${string}`;
|
|
99
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
100
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
101
|
-
fontWeight: "--cnvs-sys-font-weight-normal";
|
|
102
|
-
lineHeight: "--cnvs-sys-line-height-body-medium";
|
|
103
|
-
fontSize: "--cnvs-sys-font-size-body-medium";
|
|
104
|
-
};
|
|
105
|
-
large: ({ size }: {
|
|
106
|
-
backgroundColor: `--${string}`;
|
|
107
|
-
color: `--${string}`;
|
|
108
|
-
size: `--${string}`;
|
|
109
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
110
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
111
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
112
|
-
lineHeight: "--cnvs-sys-line-height-heading-medium";
|
|
113
|
-
fontSize: "--cnvs-sys-font-size-heading-medium";
|
|
114
|
-
};
|
|
115
|
-
extraLarge: ({ size }: {
|
|
116
|
-
backgroundColor: `--${string}`;
|
|
117
|
-
color: `--${string}`;
|
|
118
|
-
size: `--${string}`;
|
|
119
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
120
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
121
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
122
|
-
lineHeight: "--cnvs-sys-line-height-title-small";
|
|
123
|
-
fontSize: "--cnvs-sys-font-size-title-small";
|
|
124
|
-
};
|
|
125
|
-
extraExtraLarge: ({ size }: {
|
|
126
|
-
backgroundColor: `--${string}`;
|
|
127
|
-
color: `--${string}`;
|
|
128
|
-
size: `--${string}`;
|
|
129
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
130
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
131
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
132
|
-
lineHeight: "--cnvs-sys-line-height-title-medium";
|
|
133
|
-
fontSize: "--cnvs-sys-font-size-title-medium";
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
}, {}, {
|
|
137
|
-
backgroundColor: string;
|
|
138
|
-
color: string;
|
|
139
|
-
size: string;
|
|
140
|
-
}, never, never>;
|
|
141
|
-
/**
|
|
142
|
-
* JSDoc for Avatar. Will be part of the Component API docs
|
|
143
|
-
*/
|
|
144
|
-
export declare const BaseAvatar: import("@workday/canvas-kit-react/common").ElementComponent<"div", BaseAvatarProps> & {
|
|
145
|
-
Image: import("@workday/canvas-kit-react/common").ElementComponent<"img", import("./AvatarImage").AvatarImageProps>;
|
|
146
|
-
Name: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("./AvatarName").AvatarNameProps>;
|
|
147
|
-
};
|
|
148
|
-
//# sourceMappingURL=BaseAvatar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAvatar.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/BaseAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAA4C,OAAO,EAAC,MAAM,6BAA6B,CAAC;AAG/F,MAAM,WAAW,eAAgB,SAAQ,OAAO;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAE/C;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EACD,iBAAiB,GACjB,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAsE5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;CASrB,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { AvatarImage } from './AvatarImage';
|
|
4
|
-
import { AvatarName } from './AvatarName';
|
|
5
|
-
import { createStencil, cssVar, calc, handleCsProp } from '@workday/canvas-kit-styling';
|
|
6
|
-
import { system, base } from '@workday/canvas-tokens-web';
|
|
7
|
-
export const baseAvatarStencil = createStencil({
|
|
8
|
-
vars: {
|
|
9
|
-
backgroundColor: '',
|
|
10
|
-
color: '',
|
|
11
|
-
size: '',
|
|
12
|
-
},
|
|
13
|
-
base: { name: "2276l2", styles: "box-sizing:border-box;border-radius:var(--cnvs-sys-shape-round);width:var(--size-base-avatar-b2787e, calc(var(--cnvs-sys-space-x10) + var(--cnvs-sys-space-x2)));height:var(--size-base-avatar-b2787e, calc(var(--cnvs-sys-space-x10) + var(--cnvs-sys-space-x2)));background-color:var(--backgroundColor-base-avatar-b2787e, var(--cnvs-base-palette-blue-300));color:var(--color-base-avatar-b2787e, var(--cnvs-base-palette-blue-800));display:flex;align-items:center;justify-content:center;overflow:hidden;border:none;font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-body-medium);font-size:var(--cnvs-sys-font-size-body-medium);" },
|
|
14
|
-
modifiers: {
|
|
15
|
-
variant: {
|
|
16
|
-
blue: { name: "1monu3", styles: "background-color:var(--backgroundColor-base-avatar-b2787e, var(--cnvs-base-palette-blue-300));color:var(--color-base-avatar-b2787e, var(--cnvs-base-palette-blue-800));" },
|
|
17
|
-
amber: { name: "6vl7x", styles: "background-color:var(--backgroundColor-base-avatar-b2787e, var(--cnvs-base-palette-amber-200));color:var(--color-base-avatar-b2787e, var(--cnvs-base-palette-amber-700));" },
|
|
18
|
-
teal: { name: "1uu1i2", styles: "background-color:var(--backgroundColor-base-avatar-b2787e, var(--cnvs-base-palette-teal-300));color:var(--color-base-avatar-b2787e, var(--cnvs-base-palette-teal-800));" },
|
|
19
|
-
purple: { name: "zp8v4", styles: "background-color:var(--backgroundColor-base-avatar-b2787e, var(--cnvs-base-palette-purple-300));color:var(--color-base-avatar-b2787e, var(--cnvs-base-palette-purple-800));" }
|
|
20
|
-
},
|
|
21
|
-
size: {
|
|
22
|
-
extraExtraSmall: { name: "3oglon", styles: "--size-base-avatar-b2787e:var(--cnvs-sys-space-x6);font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-subtext-small);font-size:var(--cnvs-sys-font-size-subtext-small);letter-spacing:var(--cnvs-base-letter-spacing-50);" },
|
|
23
|
-
extraSmall: { name: "48lf34", styles: "--size-base-avatar-b2787e:var(--cnvs-sys-space-x8);font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-subtext-medium);font-size:var(--cnvs-sys-font-size-subtext-medium);letter-spacing:var(--cnvs-base-letter-spacing-100);" },
|
|
24
|
-
small: { name: "3p0m0i", styles: "--size-base-avatar-b2787e:var(--cnvs-sys-space-x10);font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-body-small);font-size:var(--cnvs-sys-font-size-body-small);letter-spacing:var(--cnvs-base-letter-spacing-200);" },
|
|
25
|
-
medium: { name: "4cjxsy", styles: "--size-base-avatar-b2787e:calc(var(--cnvs-sys-space-x10) + var(--cnvs-sys-space-x2));font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-body-medium);font-size:var(--cnvs-sys-font-size-body-medium);" },
|
|
26
|
-
large: { name: "2fjoig", styles: "--size-base-avatar-b2787e:calc(var(--cnvs-sys-space-x16) + var(--cnvs-sys-space-x2));font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-bold);line-height:var(--cnvs-sys-line-height-heading-medium);font-size:var(--cnvs-sys-font-size-heading-medium);" },
|
|
27
|
-
extraLarge: { name: "4d4sqz", styles: "--size-base-avatar-b2787e:calc(var(--cnvs-sys-space-x20) + var(--cnvs-sys-space-x4));font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-bold);line-height:var(--cnvs-sys-line-height-title-small);font-size:var(--cnvs-sys-font-size-title-small);" },
|
|
28
|
-
extraExtraLarge: { name: "8j63u", styles: "--size-base-avatar-b2787e:calc(var(--cnvs-sys-space-x10) * 3);font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-bold);line-height:var(--cnvs-sys-line-height-title-medium);font-size:var(--cnvs-sys-font-size-title-medium);" }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}, "base-avatar-b2787e");
|
|
32
|
-
/**
|
|
33
|
-
* JSDoc for Avatar. Will be part of the Component API docs
|
|
34
|
-
*/
|
|
35
|
-
export const BaseAvatar = createComponent('div')({
|
|
36
|
-
displayName: 'BaseAvatar',
|
|
37
|
-
subComponents: {
|
|
38
|
-
Image: AvatarImage,
|
|
39
|
-
Name: AvatarName,
|
|
40
|
-
},
|
|
41
|
-
Component: ({ variant, size, ...elemProps }, ref, Element) => {
|
|
42
|
-
return _jsx(Element, { ref: ref, ...handleCsProp(elemProps, baseAvatarStencil({ variant, size })) });
|
|
43
|
-
},
|
|
44
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getInitialsFromName.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/getInitialsFromName.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,SAAU,MAAM,WAU/C,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const getInitialsFromName = (name) => {
|
|
2
|
-
// Trim and split by one or more whitespace characters
|
|
3
|
-
const nameParts = name.trim().split(/\s+/).filter(Boolean);
|
|
4
|
-
const first = nameParts[0];
|
|
5
|
-
const firstInitial = (first === null || first === void 0 ? void 0 : first[0]) || '';
|
|
6
|
-
const last = nameParts.length > 1 ? nameParts[nameParts.length - 1] : undefined;
|
|
7
|
-
const lastInitial = (last === null || last === void 0 ? void 0 : last[0]) || '';
|
|
8
|
-
return `${firstInitial}${lastInitial}`;
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../select/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC"}
|
package/dist/es6/select/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/Select';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ErrorType } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { CoreSelectBaseProps, Option } from './SelectBase';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated ⚠️ `SelectProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--docs) instead.
|
|
5
|
-
*/
|
|
6
|
-
export interface SelectProps extends CoreSelectBaseProps {
|
|
7
|
-
/**
|
|
8
|
-
* The options of the Select. `options` may be an array of objects, an array of strings,
|
|
9
|
-
* or an array that contains both objects and strings.
|
|
10
|
-
*
|
|
11
|
-
* If `options` includes objects, each included object must adhere to the `Option` interface:
|
|
12
|
-
*
|
|
13
|
-
* * `data: object` (optional)
|
|
14
|
-
* * `disabled: boolean` (optional)
|
|
15
|
-
* * `id: string` (optional, a random `id` will be assigned to the object if one isn't provided)
|
|
16
|
-
* * `label: string` (optional, analogous to the text content of an `<option>`)
|
|
17
|
-
* * `value: string` (required, analogous to the `value` attribute of an `<option>`)
|
|
18
|
-
*
|
|
19
|
-
* If `label` is omitted, the `value` will be used to render the option.
|
|
20
|
-
*
|
|
21
|
-
* The `data` object is carried over to the `option` passed into the `renderOption` function where it may then be used to customize how each option is rendered.
|
|
22
|
-
*/
|
|
23
|
-
options: (Option | string)[];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated ⚠️ `Select` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--docs) instead.
|
|
27
|
-
*/
|
|
28
|
-
export declare const Select: import("@workday/canvas-kit-react/common").ElementComponent<"button", SelectProps> & {
|
|
29
|
-
ErrorType: typeof ErrorType;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAa,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAGvF;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;;OAeG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAoiBD;;GAEG;AACH,eAAO,MAAM,MAAM;;CAUjB,CAAC"}
|