@workday/canvas-kit-labs-react 16.2.0-0652-next.0 → 16.2.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.
Files changed (72) hide show
  1. package/accessory/index.ts +6 -0
  2. package/accessory/lib/Accessory.tsx +156 -0
  3. package/accessory/lib/AccessoryCalendar.tsx +114 -0
  4. package/accessory/lib/AccessoryFavicon.tsx +156 -0
  5. package/accessory/lib/AccessoryFile.tsx +140 -0
  6. package/accessory/lib/AccessoryIcon.tsx +213 -0
  7. package/accessory/lib/AccessoryMedia.tsx +142 -0
  8. package/accessory/package.json +6 -0
  9. package/dist/commonjs/accessory/index.d.ts +7 -0
  10. package/dist/commonjs/accessory/index.d.ts.map +1 -0
  11. package/dist/commonjs/accessory/index.js +22 -0
  12. package/dist/commonjs/accessory/lib/Accessory.d.ts +157 -0
  13. package/dist/commonjs/accessory/lib/Accessory.d.ts.map +1 -0
  14. package/dist/commonjs/accessory/lib/Accessory.js +51 -0
  15. package/dist/commonjs/accessory/lib/AccessoryCalendar.d.ts +80 -0
  16. package/dist/commonjs/accessory/lib/AccessoryCalendar.d.ts.map +1 -0
  17. package/dist/commonjs/accessory/lib/AccessoryCalendar.js +48 -0
  18. package/dist/commonjs/accessory/lib/AccessoryFavicon.d.ts +75 -0
  19. package/dist/commonjs/accessory/lib/AccessoryFavicon.d.ts.map +1 -0
  20. package/dist/commonjs/accessory/lib/AccessoryFavicon.js +74 -0
  21. package/dist/commonjs/accessory/lib/AccessoryFile.d.ts +65 -0
  22. package/dist/commonjs/accessory/lib/AccessoryFile.d.ts.map +1 -0
  23. package/dist/commonjs/accessory/lib/AccessoryFile.js +58 -0
  24. package/dist/commonjs/accessory/lib/AccessoryIcon.d.ts +119 -0
  25. package/dist/commonjs/accessory/lib/AccessoryIcon.d.ts.map +1 -0
  26. package/dist/commonjs/accessory/lib/AccessoryIcon.js +61 -0
  27. package/dist/commonjs/accessory/lib/AccessoryMedia.d.ts +72 -0
  28. package/dist/commonjs/accessory/lib/AccessoryMedia.d.ts.map +1 -0
  29. package/dist/commonjs/accessory/lib/AccessoryMedia.js +59 -0
  30. package/dist/commonjs/ai-ingress-button/lib/AIIngressButton.js +5 -5
  31. package/dist/commonjs/index.d.ts +1 -0
  32. package/dist/commonjs/index.d.ts.map +1 -1
  33. package/dist/commonjs/index.js +1 -0
  34. package/dist/commonjs/kbd/lib/KBD.js +6 -6
  35. package/dist/commonjs/kbd/lib/KBDItem.js +6 -6
  36. package/dist/commonjs/selection-group/lib/SelectionGroupIcon.js +1 -1
  37. package/dist/commonjs/selection-group/lib/SelectionGroupItem.js +4 -4
  38. package/dist/commonjs/selection-group/lib/SelectionGroupList.js +6 -6
  39. package/dist/commonjs/version/lib/version.js +1 -1
  40. package/dist/es6/accessory/index.d.ts +7 -0
  41. package/dist/es6/accessory/index.d.ts.map +1 -0
  42. package/dist/es6/accessory/index.js +6 -0
  43. package/dist/es6/accessory/lib/Accessory.d.ts +157 -0
  44. package/dist/es6/accessory/lib/Accessory.d.ts.map +1 -0
  45. package/dist/es6/accessory/lib/Accessory.js +48 -0
  46. package/dist/es6/accessory/lib/AccessoryCalendar.d.ts +80 -0
  47. package/dist/es6/accessory/lib/AccessoryCalendar.d.ts.map +1 -0
  48. package/dist/es6/accessory/lib/AccessoryCalendar.js +45 -0
  49. package/dist/es6/accessory/lib/AccessoryFavicon.d.ts +75 -0
  50. package/dist/es6/accessory/lib/AccessoryFavicon.d.ts.map +1 -0
  51. package/dist/es6/accessory/lib/AccessoryFavicon.js +71 -0
  52. package/dist/es6/accessory/lib/AccessoryFile.d.ts +65 -0
  53. package/dist/es6/accessory/lib/AccessoryFile.d.ts.map +1 -0
  54. package/dist/es6/accessory/lib/AccessoryFile.js +55 -0
  55. package/dist/es6/accessory/lib/AccessoryIcon.d.ts +119 -0
  56. package/dist/es6/accessory/lib/AccessoryIcon.d.ts.map +1 -0
  57. package/dist/es6/accessory/lib/AccessoryIcon.js +58 -0
  58. package/dist/es6/accessory/lib/AccessoryMedia.d.ts +72 -0
  59. package/dist/es6/accessory/lib/AccessoryMedia.d.ts.map +1 -0
  60. package/dist/es6/accessory/lib/AccessoryMedia.js +53 -0
  61. package/dist/es6/ai-ingress-button/lib/AIIngressButton.js +5 -5
  62. package/dist/es6/index.d.ts +1 -0
  63. package/dist/es6/index.d.ts.map +1 -1
  64. package/dist/es6/index.js +1 -0
  65. package/dist/es6/kbd/lib/KBD.js +6 -6
  66. package/dist/es6/kbd/lib/KBDItem.js +6 -6
  67. package/dist/es6/selection-group/lib/SelectionGroupIcon.js +1 -1
  68. package/dist/es6/selection-group/lib/SelectionGroupItem.js +4 -4
  69. package/dist/es6/selection-group/lib/SelectionGroupList.js +6 -6
  70. package/dist/es6/version/lib/version.js +1 -1
  71. package/index.ts +1 -0
  72. package/package.json +4 -4
@@ -0,0 +1,80 @@
1
+ import { AccessoryProps } from './Accessory';
2
+ export interface AccessoryCalendarProps extends AccessoryProps {
3
+ /**
4
+ * The month label, such as `Apr`.
5
+ */
6
+ month: string;
7
+ /**
8
+ * The day of the month, such as `30`.
9
+ */
10
+ date: number | string;
11
+ }
12
+ /**
13
+ * Calendar treatment for `AccessoryCalendar`. The month uses a critical color. The day uses the
14
+ * default foreground color. `size` scales both. `color` overrides the month. `background`
15
+ * overrides the tile fill.
16
+ */
17
+ export declare const accessoryCalendarStencil: import("@workday/canvas-kit-styling").Stencil<{
18
+ /**
19
+ * The icon part's font size matches the tile so month (`0.25em`) and day (`0.4em`) stay in
20
+ * proportion. At `extraLarge` that is 10px and 16px (`subtext.sm` and `body.sm`). Type tokens
21
+ * do not go below 10px, so smaller tiles keep the ratio instead of a fixed type level.
22
+ */
23
+ size: {
24
+ extraSmall: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
25
+ readonly icon: "accessory-icon";
26
+ readonly month: "accessory-calendar-month";
27
+ readonly date: "accessory-calendar-date";
28
+ }>) => {
29
+ "[data-part=\"accessory-icon\"]": {
30
+ fontSize: "var(--cnvs-sys-font-size-body-sm, var(--cnvs-sys-font-size-body-small, 1rem))";
31
+ };
32
+ };
33
+ small: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
34
+ readonly icon: "accessory-icon";
35
+ readonly month: "accessory-calendar-month";
36
+ readonly date: "accessory-calendar-date";
37
+ }>) => {
38
+ "[data-part=\"accessory-icon\"]": {
39
+ fontSize: "var(--cnvs-sys-font-size-body-lg, var(--cnvs-sys-font-size-body-large, 1.25rem))";
40
+ };
41
+ };
42
+ medium: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
43
+ readonly icon: "accessory-icon";
44
+ readonly month: "accessory-calendar-month";
45
+ readonly date: "accessory-calendar-date";
46
+ }>) => {
47
+ "[data-part=\"accessory-icon\"]": {
48
+ fontSize: "var(--cnvs-sys-font-size-heading-sm, var(--cnvs-sys-font-size-heading-small, 1.5rem))";
49
+ };
50
+ };
51
+ large: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
52
+ readonly icon: "accessory-icon";
53
+ readonly month: "accessory-calendar-month";
54
+ readonly date: "accessory-calendar-date";
55
+ }>) => {
56
+ "[data-part=\"accessory-icon\"]": {
57
+ fontSize: "var(--cnvs-sys-font-size-heading-lg, var(--cnvs-sys-font-size-heading-large, 2rem))";
58
+ };
59
+ };
60
+ extraLarge: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
61
+ readonly icon: "accessory-icon";
62
+ readonly month: "accessory-calendar-month";
63
+ readonly date: "accessory-calendar-date";
64
+ }>) => {
65
+ "[data-part=\"accessory-icon\"]": {
66
+ fontSize: "var(--cnvs-sys-font-size-title-sm, var(--cnvs-sys-font-size-title-small, 2.5rem))";
67
+ };
68
+ };
69
+ };
70
+ }, {
71
+ readonly icon: "accessory-icon";
72
+ readonly month: "accessory-calendar-month";
73
+ readonly date: "accessory-calendar-date";
74
+ }, {}, never, never>;
75
+ /**
76
+ * `AccessoryCalendar` renders a month and day in an accessory tile. The month is critical and the
77
+ * day is the default foreground color. Both scale with `size`. Always decorative.
78
+ */
79
+ export declare const AccessoryCalendar: import("@workday/canvas-kit-react/common").ElementComponent<"span", AccessoryCalendarProps>;
80
+ //# sourceMappingURL=AccessoryCalendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessoryCalendar.d.ts","sourceRoot":"","sources":["../../../../accessory/lib/AccessoryCalendar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,cAAc,EAAmB,MAAM,aAAa,CAAC;AAExE,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;IAoCjC;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAsBL,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,6FAuB5B,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createComponent } from '@workday/canvas-kit-react/common';
3
+ import { createStencil, cssVar, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
4
+ import { system } from '@workday/canvas-tokens-web';
5
+ import { Accessory, accessoryStencil } from './Accessory';
6
+ /**
7
+ * Calendar treatment for `AccessoryCalendar`. The month uses a critical color. The day uses the
8
+ * default foreground color. `size` scales both. `color` overrides the month. `background`
9
+ * overrides the tile fill.
10
+ */
11
+ export const accessoryCalendarStencil = createStencil({
12
+ parts: {
13
+ icon: 'accessory-icon',
14
+ month: 'accessory-calendar-month',
15
+ date: 'accessory-calendar-date',
16
+ },
17
+ base: { name: "4d8j2e", styles: "box-sizing:border-box;[data-part=\"accessory-icon\"]{flex-direction:column;gap:0.075em;overflow:hidden;background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-default, var(--cnvs-sys-color-bg-default, oklch(1 0 0 / 1))));border-width:0.0625rem;border-style:solid;border-color:var(--cnvs-sys-color-border-default, var(--cnvs-sys-color-border-divider, oklch(0.3057 0.079 256.22 / 0.13)));}[data-part=\"accessory-calendar-month\"]{color:var(--iconColor-accessory-05fc46, var(--cnvs-sys-color-fg-danger-default, var(--cnvs-sys-color-fg-critical-default, oklch(0.5342 0.2172 29.53 / 1))));font-size:0.25em;font-weight:var(--cnvs-sys-font-weight-medium);line-height:1;white-space:nowrap;}[data-part=\"accessory-calendar-date\"]{color:var(--cnvs-sys-color-fg-default);font-size:0.4em;font-weight:var(--cnvs-sys-font-weight-normal);line-height:1;white-space:nowrap;}" },
18
+ modifiers: {
19
+ /**
20
+ * The icon part's font size matches the tile so month (`0.25em`) and day (`0.4em`) stay in
21
+ * proportion. At `extraLarge` that is 10px and 16px (`subtext.sm` and `body.sm`). Type tokens
22
+ * do not go below 10px, so smaller tiles keep the ratio instead of a fixed type level.
23
+ */
24
+ size: {
25
+ extraSmall: { name: "1ditle", styles: "[data-part=\"accessory-icon\"]{font-size:var(--cnvs-sys-font-size-body-sm, var(--cnvs-sys-font-size-body-small, 1rem));}" },
26
+ small: { name: "2s6myj", styles: "[data-part=\"accessory-icon\"]{font-size:var(--cnvs-sys-font-size-body-lg, var(--cnvs-sys-font-size-body-large, 1.25rem));}" },
27
+ medium: { name: "3m80c5", styles: "[data-part=\"accessory-icon\"]{font-size:var(--cnvs-sys-font-size-heading-sm, var(--cnvs-sys-font-size-heading-small, 1.5rem));}" },
28
+ large: { name: "2ij8js", styles: "[data-part=\"accessory-icon\"]{font-size:var(--cnvs-sys-font-size-heading-lg, var(--cnvs-sys-font-size-heading-large, 2rem));}" },
29
+ extraLarge: { name: "3d450k", styles: "[data-part=\"accessory-icon\"]{font-size:var(--cnvs-sys-font-size-title-sm, var(--cnvs-sys-font-size-title-small, 2.5rem));}" }
30
+ }
31
+ },
32
+ defaultModifiers: {
33
+ size: 'extraLarge',
34
+ }
35
+ }, "accessory-calendar-63f1cc");
36
+ /**
37
+ * `AccessoryCalendar` renders a month and day in an accessory tile. The month is critical and the
38
+ * day is the default foreground color. Both scale with `size`. Always decorative.
39
+ */
40
+ export const AccessoryCalendar = createComponent('span')({
41
+ displayName: 'AccessoryCalendar',
42
+ Component: ({ month, date, size = 'extraLarge', color, background, ...elemProps }, ref, Element) => {
43
+ return (_jsx(Accessory, { as: Element, ref: ref, background: background, color: color, size: size, ...handleCsProp(elemProps, accessoryCalendarStencil({ size })), children: _jsxs("span", { ...accessoryStencil.parts.icon, children: [_jsx("span", { ...accessoryCalendarStencil.parts.month, children: month }), _jsx("span", { ...accessoryCalendarStencil.parts.date, children: date })] }) }));
44
+ },
45
+ });
@@ -0,0 +1,75 @@
1
+ import { AccessoryProps } from './Accessory';
2
+ export interface AccessoryFaviconProps extends AccessoryProps {
3
+ /**
4
+ * The site URL or bare domain, such as `https://design.workday.com` or `workday.com`. The hostname is
5
+ * used to resolve the favicon.
6
+ */
7
+ url: string;
8
+ }
9
+ /**
10
+ * Favicon treatment for `AccessoryFavicon`. At `large` and `extraLarge` the mark is inset in an
11
+ * outlined tile. At `medium` and smaller the mark fills the tile and the frame is removed.
12
+ * `background` overrides the tile fill.
13
+ */
14
+ export declare const accessoryFaviconStencil: import("@workday/canvas-kit-styling").Stencil<{
15
+ size: {
16
+ extraSmall: ({ iconPart, imagePart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
17
+ readonly icon: "accessory-icon";
18
+ readonly image: "accessory-favicon-image";
19
+ }>) => {
20
+ "[data-part=\"accessory-icon\"]": {
21
+ backgroundColor: `var(--${string}, transparent)`;
22
+ borderWidth: number;
23
+ };
24
+ "[data-part=\"accessory-favicon-image\"]": {
25
+ width: string;
26
+ height: string;
27
+ borderRadius: number;
28
+ };
29
+ };
30
+ small: ({ iconPart, imagePart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
31
+ readonly icon: "accessory-icon";
32
+ readonly image: "accessory-favicon-image";
33
+ }>) => {
34
+ "[data-part=\"accessory-icon\"]": {
35
+ backgroundColor: `var(--${string}, transparent)`;
36
+ borderWidth: number;
37
+ };
38
+ "[data-part=\"accessory-favicon-image\"]": {
39
+ width: string;
40
+ height: string;
41
+ borderRadius: number;
42
+ };
43
+ };
44
+ medium: ({ iconPart, imagePart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
45
+ readonly icon: "accessory-icon";
46
+ readonly image: "accessory-favicon-image";
47
+ }>) => {
48
+ "[data-part=\"accessory-icon\"]": {
49
+ backgroundColor: `var(--${string}, transparent)`;
50
+ borderWidth: number;
51
+ };
52
+ "[data-part=\"accessory-favicon-image\"]": {
53
+ width: string;
54
+ height: string;
55
+ borderRadius: number;
56
+ };
57
+ };
58
+ large: {};
59
+ extraLarge: {};
60
+ };
61
+ }, {
62
+ readonly icon: "accessory-icon";
63
+ readonly image: "accessory-favicon-image";
64
+ }, {}, never, never>;
65
+ /**
66
+ * `AccessoryFavicon` renders a site favicon in an accessory tile. Pass a site URL or domain as
67
+ * `url`. The mark is inset in an outlined frame at `large` and `extraLarge`, and fills the tile at
68
+ * smaller sizes. Always decorative.
69
+ *
70
+ * The image is requested from the user's browser at `https://www.google.com/s2/favicons`. Google
71
+ * receives the hostname and the user's IP address. `referrerPolicy="no-referrer"` keeps the app
72
+ * origin off that request. It does not proxy the request.
73
+ */
74
+ export declare const AccessoryFavicon: import("@workday/canvas-kit-react/common").ElementComponent<"span", AccessoryFaviconProps>;
75
+ //# sourceMappingURL=AccessoryFavicon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessoryFavicon.d.ts","sourceRoot":"","sources":["../../../../accessory/lib/AccessoryFavicon.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,cAAc,EAAkC,MAAM,aAAa,CAAC;AA+BvF,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAkElC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,4FA8B3B,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createComponent } from '@workday/canvas-kit-react/common';
3
+ import { createStencil, cssVar, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
4
+ import { system } from '@workday/canvas-tokens-web';
5
+ import { Accessory, accessoryStencil } from './Accessory';
6
+ /** Hostname from a site URL or a bare domain such as `workday.com`. */
7
+ function hostnameFromSiteUrl(siteUrl) {
8
+ const trimmed = siteUrl.trim();
9
+ if (!trimmed) {
10
+ return '';
11
+ }
12
+ try {
13
+ const withProtocol = /^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`;
14
+ return new URL(withProtocol).hostname || '';
15
+ }
16
+ catch {
17
+ return '';
18
+ }
19
+ }
20
+ /**
21
+ * Brand favicon URL for a site, resolved through the public Google favicon endpoint. Tiles larger
22
+ * than 32px request a 180px source. Smaller tiles request 64px.
23
+ */
24
+ function faviconSrcFromSiteUrl(siteUrl, size) {
25
+ const host = hostnameFromSiteUrl(siteUrl);
26
+ if (!host) {
27
+ return '';
28
+ }
29
+ const sourceSize = size === 'extraLarge' ? 180 : 64;
30
+ return `https://www.google.com/s2/favicons?domain=${encodeURIComponent(host)}&sz=${sourceSize}`;
31
+ }
32
+ /**
33
+ * Favicon treatment for `AccessoryFavicon`. At `large` and `extraLarge` the mark is inset in an
34
+ * outlined tile. At `medium` and smaller the mark fills the tile and the frame is removed.
35
+ * `background` overrides the tile fill.
36
+ */
37
+ export const accessoryFaviconStencil = createStencil({
38
+ parts: {
39
+ icon: 'accessory-icon',
40
+ image: 'accessory-favicon-image',
41
+ },
42
+ base: { name: "29b8tl", styles: "box-sizing:border-box;[data-part=\"accessory-icon\"]{overflow:hidden;background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-default, var(--cnvs-sys-color-bg-default, oklch(1 0 0 / 1))));border-width:0.0625rem;border-style:solid;border-color:var(--cnvs-sys-color-border-default, var(--cnvs-sys-color-border-divider, oklch(0.3057 0.079 256.22 / 0.13)));}[data-part=\"accessory-favicon-image\"]{width:calc(100% - var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem)));height:calc(100% - var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem)));object-fit:contain;border-radius:var(--cnvs-sys-shape-md, var(--cnvs-sys-shape-x2, 0.5rem));corner-shape:superellipse(1.1);}" },
43
+ modifiers: {
44
+ size: {
45
+ extraSmall: { name: "1z0gca", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, transparent);border-width:0;}[data-part=\"accessory-favicon-image\"]{width:100%;height:100%;border-radius:0;}" },
46
+ small: { name: "37ajxg", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, transparent);border-width:0;}[data-part=\"accessory-favicon-image\"]{width:100%;height:100%;border-radius:0;}" },
47
+ medium: { name: "3j0w15", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, transparent);border-width:0;}[data-part=\"accessory-favicon-image\"]{width:100%;height:100%;border-radius:0;}" },
48
+ large: { name: "2c23tr", styles: "" },
49
+ extraLarge: { name: "3tbd1b", styles: "" }
50
+ }
51
+ },
52
+ defaultModifiers: {
53
+ size: 'extraLarge',
54
+ }
55
+ }, "accessory-favicon-77a3ef");
56
+ /**
57
+ * `AccessoryFavicon` renders a site favicon in an accessory tile. Pass a site URL or domain as
58
+ * `url`. The mark is inset in an outlined frame at `large` and `extraLarge`, and fills the tile at
59
+ * smaller sizes. Always decorative.
60
+ *
61
+ * The image is requested from the user's browser at `https://www.google.com/s2/favicons`. Google
62
+ * receives the hostname and the user's IP address. `referrerPolicy="no-referrer"` keeps the app
63
+ * origin off that request. It does not proxy the request.
64
+ */
65
+ export const AccessoryFavicon = createComponent('span')({
66
+ displayName: 'AccessoryFavicon',
67
+ Component: ({ url, size = 'extraLarge', background, ...elemProps }, ref, Element) => {
68
+ const src = faviconSrcFromSiteUrl(url, size);
69
+ return (_jsx(Accessory, { as: Element, ref: ref, background: background, size: size, ...handleCsProp(elemProps, accessoryFaviconStencil({ size })), children: src ? (_jsx("span", { ...accessoryStencil.parts.icon, children: _jsx("img", { alt: "", src: src, ...accessoryFaviconStencil.parts.image, referrerPolicy: "no-referrer" }) })) : null }));
70
+ },
71
+ });
@@ -0,0 +1,65 @@
1
+ import { AccessoryProps } from './Accessory';
2
+ /**
3
+ * The kind of file `AccessoryFile` represents.
4
+ */
5
+ export type AccessoryFileType = 'pdf' | 'spreadsheet' | 'document' | 'presentation' | 'video' | 'file' | 'txt';
6
+ export interface AccessoryFileProps extends AccessoryProps {
7
+ /**
8
+ * The file type. Chooses the glyph and sets the tile fill and icon color through a stencil
9
+ * modifier. Colored types keep their accent fill at every size. `file` and `txt` use
10
+ * `surface.alt` with a `border.default` stroke. `video` uses `surface.alt` and an inverse icon.
11
+ * `color` and `background` override the type colors.
12
+ * @default 'file'
13
+ */
14
+ type?: AccessoryFileType;
15
+ }
16
+ /**
17
+ * File-type treatment for `AccessoryFile`. Each `type` sets the tile fill and icon color.
18
+ * `outline` adds the default border used by `file` and `txt`. `color` and `background` on
19
+ * `Accessory` still override the type colors.
20
+ */
21
+ export declare const accessoryFileStencil: import("@workday/canvas-kit-styling").Stencil<{
22
+ type: {
23
+ pdf: {
24
+ [x: string]: "--cnvs-sys-color-fg-inverse" | "var(--cnvs-sys-color-accent-danger, var(--cnvs-sys-color-bg-critical-default, oklch(0.5342 0.2172 29.53 / 1)))";
25
+ };
26
+ spreadsheet: {
27
+ [x: string]: "--cnvs-sys-color-fg-inverse" | "var(--cnvs-sys-color-accent-success, var(--cnvs-sys-color-bg-positive-default, oklch(0.5069 0.1569 145.56 / 1)))";
28
+ };
29
+ document: {
30
+ [x: string]: "--cnvs-sys-color-fg-inverse" | "var(--cnvs-sys-color-accent-info, var(--cnvs-sys-color-bg-info-default, oklch(0.5198 0.1782 256.11 / 1)))";
31
+ };
32
+ presentation: {
33
+ [x: string]: "var(--cnvs-sys-color-accent-contrast, oklch(0.0969 0 0 / 0.84))" | "var(--cnvs-sys-color-accent-warning, oklch(0.7909 0.1711 70.15 / 1))";
34
+ };
35
+ video: {
36
+ [x: string]: "var(--cnvs-sys-color-surface-alt-default, var(--cnvs-sys-color-bg-alt-soft, oklch(0.3343 0.0951 253.3 / 0.05)))" | "--cnvs-sys-color-fg-default";
37
+ };
38
+ file: {
39
+ [x: string]: "var(--cnvs-sys-color-surface-alt-default, var(--cnvs-sys-color-bg-alt-soft, oklch(0.3343 0.0951 253.3 / 0.05)))" | "--cnvs-sys-color-fg-default";
40
+ };
41
+ txt: {
42
+ [x: string]: "var(--cnvs-sys-color-surface-alt-default, var(--cnvs-sys-color-bg-alt-soft, oklch(0.3343 0.0951 253.3 / 0.05)))" | "--cnvs-sys-color-fg-default";
43
+ };
44
+ };
45
+ outline: {
46
+ true: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
47
+ readonly icon: "accessory-icon";
48
+ }>) => {
49
+ "[data-part=\"accessory-icon\"]": {
50
+ borderWidth: string;
51
+ borderStyle: string;
52
+ borderColor: "var(--cnvs-sys-color-border-default, var(--cnvs-sys-color-border-divider, oklch(0.3057 0.079 256.22 / 0.13)))";
53
+ };
54
+ };
55
+ };
56
+ }, {
57
+ readonly icon: "accessory-icon";
58
+ }, {}, never, never>;
59
+ /**
60
+ * `AccessoryFile` renders a file-type tile. `type` chooses the glyph and sets the fill and icon
61
+ * color. Colored types keep their fill at every size. Generic file and text use `surface.alt` and
62
+ * a `border.default` stroke. Always decorative.
63
+ */
64
+ export declare const AccessoryFile: import("@workday/canvas-kit-react/common").ElementComponent<"span", AccessoryFileProps>;
65
+ //# sourceMappingURL=AccessoryFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessoryFile.d.ts","sourceRoot":"","sources":["../../../../accessory/lib/AccessoryFile.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAY,cAAc,EAAmB,MAAM,aAAa,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,KAAK,GACL,aAAa,GACb,UAAU,GACV,cAAc,GACd,OAAO,GACP,MAAM,GACN,KAAK,CAAC;AAEV,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAwD/B,CAAC;AAYH;;;;GAIG;AACH,eAAO,MAAM,aAAa,yFAuBxB,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createComponent } from '@workday/canvas-kit-react/common';
3
+ import { SystemIcon, systemIconStencil } from '@workday/canvas-kit-react/icon';
4
+ import { createStencil, cssVar, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
5
+ import { documentIcon, pdfIcon, playCircleIcon, stackIcon, tableExpandIcon, txtIcon, } from '@workday/canvas-system-icons-web';
6
+ import { system } from '@workday/canvas-tokens-web';
7
+ import { Accessory, accessoryStencil } from './Accessory';
8
+ /**
9
+ * File-type treatment for `AccessoryFile`. Each `type` sets the tile fill and icon color.
10
+ * `outline` adds the default border used by `file` and `txt`. `color` and `background` on
11
+ * `Accessory` still override the type colors.
12
+ */
13
+ export const accessoryFileStencil = createStencil({
14
+ parts: {
15
+ icon: 'accessory-icon',
16
+ },
17
+ base: { name: "4bgcjs", styles: "box-sizing:border-box;[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46);--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46);}" },
18
+ modifiers: {
19
+ type: {
20
+ pdf: { name: "4cpm7x", styles: "--iconColor-accessory-05fc46:var(--cnvs-sys-color-fg-inverse);--tileBackground-accessory-05fc46:var(--cnvs-sys-color-accent-danger, var(--cnvs-sys-color-bg-critical-default, oklch(0.5342 0.2172 29.53 / 1)));" },
21
+ spreadsheet: { name: "2hxiqb", styles: "--iconColor-accessory-05fc46:var(--cnvs-sys-color-fg-inverse);--tileBackground-accessory-05fc46:var(--cnvs-sys-color-accent-success, var(--cnvs-sys-color-bg-positive-default, oklch(0.5069 0.1569 145.56 / 1)));" },
22
+ document: { name: "2fxzmb", styles: "--iconColor-accessory-05fc46:var(--cnvs-sys-color-fg-inverse);--tileBackground-accessory-05fc46:var(--cnvs-sys-color-accent-info, var(--cnvs-sys-color-bg-info-default, oklch(0.5198 0.1782 256.11 / 1)));" },
23
+ presentation: { name: "1ky992", styles: "--iconColor-accessory-05fc46:var(--cnvs-sys-color-accent-contrast, oklch(0.0969 0 0 / 0.84));--tileBackground-accessory-05fc46:var(--cnvs-sys-color-accent-warning, oklch(0.7909 0.1711 70.15 / 1));" },
24
+ video: { name: "1mgn37", styles: "--iconColor-accessory-05fc46:var(--cnvs-sys-color-fg-default);--tileBackground-accessory-05fc46:var(--cnvs-sys-color-surface-alt-default, var(--cnvs-sys-color-bg-alt-soft, oklch(0.3343 0.0951 253.3 / 0.05)));" },
25
+ file: { name: "419agi", styles: "--iconColor-accessory-05fc46:var(--cnvs-sys-color-fg-default);--tileBackground-accessory-05fc46:var(--cnvs-sys-color-surface-alt-default, var(--cnvs-sys-color-bg-alt-soft, oklch(0.3343 0.0951 253.3 / 0.05)));" },
26
+ txt: { name: "1qcw2", styles: "--iconColor-accessory-05fc46:var(--cnvs-sys-color-fg-default);--tileBackground-accessory-05fc46:var(--cnvs-sys-color-surface-alt-default, var(--cnvs-sys-color-bg-alt-soft, oklch(0.3343 0.0951 253.3 / 0.05)));" }
27
+ },
28
+ outline: {
29
+ true: { name: "2oh73y", styles: "[data-part=\"accessory-icon\"]{border-width:0.0625rem;border-style:solid;border-color:var(--cnvs-sys-color-border-default, var(--cnvs-sys-color-border-divider, oklch(0.3057 0.079 256.22 / 0.13)));}" }
30
+ }
31
+ },
32
+ defaultModifiers: {
33
+ type: 'file',
34
+ }
35
+ }, "accessory-file-3a7be4");
36
+ const fileIcons = {
37
+ pdf: pdfIcon,
38
+ spreadsheet: tableExpandIcon,
39
+ document: documentIcon,
40
+ presentation: stackIcon,
41
+ video: playCircleIcon,
42
+ file: documentIcon,
43
+ txt: txtIcon,
44
+ };
45
+ /**
46
+ * `AccessoryFile` renders a file-type tile. `type` chooses the glyph and sets the fill and icon
47
+ * color. Colored types keep their fill at every size. Generic file and text use `surface.alt` and
48
+ * a `border.default` stroke. Always decorative.
49
+ */
50
+ export const AccessoryFile = createComponent('span')({
51
+ displayName: 'AccessoryFile',
52
+ Component: ({ type = 'file', size = 'extraLarge', color, background, ...elemProps }, ref, Element) => {
53
+ return (_jsx(Accessory, { as: Element, ref: ref, background: background, color: color, size: size, ...handleCsProp(elemProps, accessoryFileStencil({ type, outline: type === 'file' || type === 'txt' })), children: _jsx(SystemIcon, { icon: fileIcons[type], ...accessoryStencil.parts.icon }) }));
54
+ },
55
+ });
@@ -0,0 +1,119 @@
1
+ import { SystemIconProps } from '@workday/canvas-kit-react/icon';
2
+ import { AccessoryProps } from './Accessory';
3
+ /**
4
+ * The color treatment of `AccessoryIcon`.
5
+ */
6
+ export type AccessoryIconVariant = 'grey' | 'green' | 'blue' | 'purple' | 'amber' | 'magenta' | 'red' | 'orange' | 'outline';
7
+ export interface AccessoryIconProps extends AccessoryProps {
8
+ /**
9
+ * The icon to display from `@workday/canvas-system-icons-web`.
10
+ */
11
+ icon: SystemIconProps['icon'];
12
+ /**
13
+ * The color treatment of the icon and, at `medium` and above, the tile fill. `color` and
14
+ * `background` from `Accessory` override these. Variant fills stay hidden at `small` and
15
+ * `extraSmall` unless `background` is set.
16
+ * @default 'grey'
17
+ */
18
+ variant?: AccessoryIconVariant;
19
+ }
20
+ /**
21
+ * Color treatment for `AccessoryIcon`. `variant` paints the icon part. `extraSmall` and `small`
22
+ * clear that fill and border unless `background` sets the tile variable. `color` and `background`
23
+ * on `Accessory` still override the variant.
24
+ */
25
+ export declare const accessoryIconStencil: import("@workday/canvas-kit-styling").Stencil<{
26
+ variant: {
27
+ grey: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
28
+ readonly icon: "accessory-icon";
29
+ }>) => {
30
+ "[data-part=\"accessory-icon\"]": {
31
+ [x: string]: `var(--${string}, var(--cnvs-sys-color-surface-alt-strong, var(--cnvs-sys-color-bg-alt-default, oklch(0.3337 0.0688 250.79 / 0.09))))` | `var(--${string}, var(--cnvs-base-palette-slate-800, oklch(0.3685 0.0218 256.4 / 1)))`;
32
+ backgroundColor: `var(--${string}, var(--cnvs-sys-color-surface-alt-strong, var(--cnvs-sys-color-bg-alt-default, oklch(0.3337 0.0688 250.79 / 0.09))))`;
33
+ };
34
+ };
35
+ green: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
36
+ readonly icon: "accessory-icon";
37
+ }>) => {
38
+ "[data-part=\"accessory-icon\"]": {
39
+ [x: string]: `var(--${string}, var(--cnvs-sys-color-surface-success-strong, oklch(0.8685 0.2814 143.77 / 0.15)))` | `var(--${string}, var(--cnvs-base-palette-green-800, oklch(0.3955 0.1156 147.66 / 1)))`;
40
+ backgroundColor: `var(--${string}, var(--cnvs-sys-color-surface-success-strong, oklch(0.8685 0.2814 143.77 / 0.15)))`;
41
+ };
42
+ };
43
+ blue: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
44
+ readonly icon: "accessory-icon";
45
+ }>) => {
46
+ "[data-part=\"accessory-icon\"]": {
47
+ [x: string]: `var(--${string}, var(--cnvs-sys-color-surface-info-strong, var(--cnvs-sys-color-bg-info-softer, oklch(0.6152 0.2108 256.1 / 0.11))))` | `var(--${string}, var(--cnvs-sys-color-fg-info-strong, var(--cnvs-sys-color-fg-primary-strong, oklch(0.4658 0.1562 255.5 / 1))))`;
48
+ backgroundColor: `var(--${string}, var(--cnvs-sys-color-surface-info-strong, var(--cnvs-sys-color-bg-info-softer, oklch(0.6152 0.2108 256.1 / 0.11))))`;
49
+ };
50
+ };
51
+ purple: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
52
+ readonly icon: "accessory-icon";
53
+ }>) => {
54
+ "[data-part=\"accessory-icon\"]": {
55
+ [x: string]: `var(--${string}, var(--cnvs-base-palette-purple-a50, oklch(0.5645 0.2935 302.36 / 0.09)))` | `var(--${string}, var(--cnvs-base-palette-purple-700, oklch(0.476 0.156 313.2 / 1)))`;
56
+ backgroundColor: `var(--${string}, var(--cnvs-base-palette-purple-a50, oklch(0.5645 0.2935 302.36 / 0.09)))`;
57
+ };
58
+ };
59
+ amber: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
60
+ readonly icon: "accessory-icon";
61
+ }>) => {
62
+ "[data-part=\"accessory-icon\"]": {
63
+ [x: string]: `var(--${string}, var(--cnvs-sys-color-surface-warning-strong, var(--cnvs-sys-color-static-amber-stronger, oklch(0.8864 0.1845 100.28 / 0.22))))` | `var(--${string}, var(--cnvs-sys-color-fg-warning-strong, oklch(0.4824 0.1353 46.11 / 1)))`;
64
+ backgroundColor: `var(--${string}, var(--cnvs-sys-color-surface-warning-strong, var(--cnvs-sys-color-static-amber-stronger, oklch(0.8864 0.1845 100.28 / 0.22))))`;
65
+ };
66
+ };
67
+ magenta: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
68
+ readonly icon: "accessory-icon";
69
+ }>) => {
70
+ "[data-part=\"accessory-icon\"]": {
71
+ [x: string]: `var(--${string}, var(--cnvs-base-palette-magenta-a50, oklch(0.7044 0.3188 328.33 / 0.08)))` | `var(--${string}, var(--cnvs-base-palette-magenta-800, oklch(0.4011 0.1269 344.4 / 1)))`;
72
+ backgroundColor: `var(--${string}, var(--cnvs-base-palette-magenta-a50, oklch(0.7044 0.3188 328.33 / 0.08)))`;
73
+ };
74
+ };
75
+ red: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
76
+ readonly icon: "accessory-icon";
77
+ }>) => {
78
+ "[data-part=\"accessory-icon\"]": {
79
+ [x: string]: `var(--${string}, var(--cnvs-sys-color-surface-danger-strong, oklch(0.6434 0.2428 30.17 / 0.1)))` | `var(--${string}, var(--cnvs-sys-color-fg-danger-strong, var(--cnvs-sys-color-fg-critical-strong, oklch(0.4517 0.1847 28.2 / 1))))`;
80
+ backgroundColor: `var(--${string}, var(--cnvs-sys-color-surface-danger-strong, oklch(0.6434 0.2428 30.17 / 0.1)))`;
81
+ };
82
+ };
83
+ orange: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
84
+ readonly icon: "accessory-icon";
85
+ }>) => {
86
+ "[data-part=\"accessory-icon\"]": {
87
+ [x: string]: `var(--${string}, var(--cnvs-base-palette-orange-a50, oklch(0.7555 0.1769 59.35 / 0.17)))` | `var(--${string}, var(--cnvs-base-palette-orange-700, oklch(0.4689 0.1456 40.5 / 1)))`;
88
+ backgroundColor: `var(--${string}, var(--cnvs-base-palette-orange-a50, oklch(0.7555 0.1769 59.35 / 0.17)))`;
89
+ };
90
+ };
91
+ outline: ({ iconPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
92
+ readonly icon: "accessory-icon";
93
+ }>) => {
94
+ "[data-part=\"accessory-icon\"]": {
95
+ [x: string]: string;
96
+ backgroundColor: `var(--${string}, var(--cnvs-sys-color-surface-transparent, var(--cnvs-sys-color-bg-transparent-default, oklch(0 0 0 / 0))))`;
97
+ borderWidth: string;
98
+ borderStyle: string;
99
+ borderColor: "var(--cnvs-sys-color-border-default, var(--cnvs-sys-color-border-divider, oklch(0.3057 0.079 256.22 / 0.13)))";
100
+ };
101
+ };
102
+ };
103
+ size: {
104
+ extraSmall: {};
105
+ small: {};
106
+ medium: {};
107
+ large: {};
108
+ extraLarge: {};
109
+ };
110
+ }, {
111
+ readonly icon: "accessory-icon";
112
+ }, Record<string, string> | Record<string, Record<string, string>>, never, never>;
113
+ /**
114
+ * `AccessoryIcon` renders a system icon in an accessory tile. `variant` sets the tile fill and
115
+ * icon color. `color` and `background` on the shared `Accessory` props override the variant. The
116
+ * glyph size comes from `size` on `Accessory` through the icon `data-part`. Always decorative.
117
+ */
118
+ export declare const AccessoryIcon: import("@workday/canvas-kit-react/common").ElementComponent<"span", AccessoryIconProps>;
119
+ //# sourceMappingURL=AccessoryIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessoryIcon.d.ts","sourceRoot":"","sources":["../../../../accessory/lib/AccessoryIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAoB,MAAM,gCAAgC,CAAC;AAI9F,OAAO,EAAY,cAAc,EAAmB,MAAM,aAAa,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,SAAS,GACT,KAAK,GACL,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFA0I/B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,aAAa,yFA2BxB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createComponent } from '@workday/canvas-kit-react/common';
3
+ import { SystemIcon, systemIconStencil } from '@workday/canvas-kit-react/icon';
4
+ import { createStencil, cssVar, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
5
+ import { base, system } from '@workday/canvas-tokens-web';
6
+ import { Accessory, accessoryStencil } from './Accessory';
7
+ /**
8
+ * Color treatment for `AccessoryIcon`. `variant` paints the icon part. `extraSmall` and `small`
9
+ * clear that fill and border unless `background` sets the tile variable. `color` and `background`
10
+ * on `Accessory` still override the variant.
11
+ */
12
+ export const accessoryIconStencil = createStencil({
13
+ parts: {
14
+ icon: 'accessory-icon',
15
+ },
16
+ base: { name: "2s7ez2", styles: "box-sizing:border-box;" },
17
+ modifiers: {
18
+ variant: {
19
+ grey: { name: "g74z5", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-alt-strong, var(--cnvs-sys-color-bg-alt-default, oklch(0.3337 0.0688 250.79 / 0.09))));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-base-palette-slate-800, oklch(0.3685 0.0218 256.4 / 1)));}" },
20
+ green: { name: "1mud8r", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-success-strong, oklch(0.8685 0.2814 143.77 / 0.15)));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-base-palette-green-800, oklch(0.3955 0.1156 147.66 / 1)));}" },
21
+ blue: { name: "3iocgz", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-info-strong, var(--cnvs-sys-color-bg-info-softer, oklch(0.6152 0.2108 256.1 / 0.11))));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-sys-color-fg-info-strong, var(--cnvs-sys-color-fg-primary-strong, oklch(0.4658 0.1562 255.5 / 1))));}" },
22
+ purple: { name: "2mo4l6", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-base-palette-purple-a50, oklch(0.5645 0.2935 302.36 / 0.09)));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-base-palette-purple-700, oklch(0.476 0.156 313.2 / 1)));}" },
23
+ amber: { name: "1ocl8c", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-warning-strong, var(--cnvs-sys-color-static-amber-stronger, oklch(0.8864 0.1845 100.28 / 0.22))));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-sys-color-fg-warning-strong, oklch(0.4824 0.1353 46.11 / 1)));}" },
24
+ magenta: { name: "2cl0k0", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-base-palette-magenta-a50, oklch(0.7044 0.3188 328.33 / 0.08)));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-base-palette-magenta-800, oklch(0.4011 0.1269 344.4 / 1)));}" },
25
+ red: { name: "efcts", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-danger-strong, oklch(0.6434 0.2428 30.17 / 0.1)));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-sys-color-fg-danger-strong, var(--cnvs-sys-color-fg-critical-strong, oklch(0.4517 0.1847 28.2 / 1))));}" },
26
+ orange: { name: "46543d", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-base-palette-orange-a50, oklch(0.7555 0.1769 59.35 / 0.17)));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-base-palette-orange-700, oklch(0.4689 0.1456 40.5 / 1)));}" },
27
+ outline: { name: "ptq8f", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, var(--cnvs-sys-color-surface-transparent, var(--cnvs-sys-color-bg-transparent-default, oklch(0 0 0 / 0))));--color-system-icon-c9acc3:var(--iconColor-accessory-05fc46, var(--cnvs-base-palette-slate-800, oklch(0.3685 0.0218 256.4 / 1)));border-width:0.0625rem;border-style:solid;border-color:var(--cnvs-sys-color-border-default, var(--cnvs-sys-color-border-divider, oklch(0.3057 0.079 256.22 / 0.13)));}" }
28
+ },
29
+ size: {
30
+ extraSmall: { name: "3ltait", styles: "" },
31
+ small: { name: "3c3m26", styles: "" },
32
+ medium: { name: "10gyd9", styles: "" },
33
+ large: { name: "1400i", styles: "" },
34
+ extraLarge: { name: "16bn4a", styles: "" }
35
+ }
36
+ },
37
+ compound: [
38
+ {
39
+ modifiers: { size: 'extraSmall' },
40
+ styles: { name: "1wn8kx", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, transparent);border-width:0;}" }
41
+ },
42
+ {
43
+ modifiers: { size: 'small' },
44
+ styles: { name: "3s7fcb", styles: "[data-part=\"accessory-icon\"]{background-color:var(--tileBackground-accessory-05fc46, transparent);border-width:0;}" }
45
+ }
46
+ ]
47
+ }, "accessory-icon-b2d5b9");
48
+ /**
49
+ * `AccessoryIcon` renders a system icon in an accessory tile. `variant` sets the tile fill and
50
+ * icon color. `color` and `background` on the shared `Accessory` props override the variant. The
51
+ * glyph size comes from `size` on `Accessory` through the icon `data-part`. Always decorative.
52
+ */
53
+ export const AccessoryIcon = createComponent('span')({
54
+ displayName: 'AccessoryIcon',
55
+ Component: ({ icon, size = 'extraLarge', variant = 'grey', color, background, ...elemProps }, ref, Element) => {
56
+ return (_jsx(Accessory, { as: Element, ref: ref, background: background, color: color, size: size, ...handleCsProp(elemProps, accessoryIconStencil({ size, variant })), children: _jsx(SystemIcon, { icon: icon, ...accessoryStencil.parts.icon }) }));
57
+ },
58
+ });