@workday/canvas-kit-react 16.0.0-alpha.0485-next.0 → 16.0.0-alpha.0486-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/badge/lib/CountBadge.tsx +5 -8
- package/banner/lib/Banner.tsx +23 -16
- package/banner/lib/hooks/useBannerIcon.tsx +1 -1
- package/dist/commonjs/badge/lib/CountBadge.d.ts.map +1 -1
- package/dist/commonjs/badge/lib/CountBadge.js +5 -5
- package/dist/commonjs/banner/lib/Banner.d.ts +5 -1
- package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
- package/dist/commonjs/banner/lib/Banner.js +11 -7
- package/dist/commonjs/banner/lib/hooks/useBannerIcon.d.ts +1 -1
- package/dist/commonjs/banner/lib/hooks/useBannerIcon.js +1 -1
- package/dist/commonjs/information-highlight/lib/InformationHighlight.d.ts +83 -13
- package/dist/commonjs/information-highlight/lib/InformationHighlight.d.ts.map +1 -1
- package/dist/commonjs/information-highlight/lib/InformationHighlight.js +28 -10
- package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +26 -5
- package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.d.ts.map +1 -1
- package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.js +11 -1
- package/dist/commonjs/information-highlight/lib/parts/Body.d.ts +8 -1
- package/dist/commonjs/information-highlight/lib/parts/Body.d.ts.map +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Body.js +16 -6
- package/dist/commonjs/information-highlight/lib/parts/Heading.d.ts +8 -1
- package/dist/commonjs/information-highlight/lib/parts/Heading.d.ts.map +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Heading.js +16 -6
- package/dist/commonjs/information-highlight/lib/parts/Icon.d.ts +2 -1
- package/dist/commonjs/information-highlight/lib/parts/Icon.d.ts.map +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Icon.js +3 -2
- package/dist/commonjs/information-highlight/lib/parts/Link.d.ts +8 -1
- package/dist/commonjs/information-highlight/lib/parts/Link.d.ts.map +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Link.js +16 -6
- package/dist/commonjs/pill/lib/Pill.d.ts +1 -11
- package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/Pill.js +3 -3
- package/dist/commonjs/pill/lib/PillIcon.js +1 -1
- package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/PillIconButton.js +2 -2
- package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.d.ts +10 -2
- package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.d.ts.map +1 -1
- package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.js +3 -2
- package/dist/commonjs/skeleton/lib/parts/SkeletonShape.d.ts +16 -2
- package/dist/commonjs/skeleton/lib/parts/SkeletonShape.d.ts.map +1 -1
- package/dist/commonjs/skeleton/lib/parts/SkeletonShape.js +11 -3
- package/dist/commonjs/skeleton/lib/parts/SkeletonText.d.ts +12 -3
- package/dist/commonjs/skeleton/lib/parts/SkeletonText.d.ts.map +1 -1
- package/dist/commonjs/skeleton/lib/parts/SkeletonText.js +10 -5
- package/dist/es6/badge/lib/CountBadge.d.ts.map +1 -1
- package/dist/es6/badge/lib/CountBadge.js +5 -5
- package/dist/es6/banner/lib/Banner.d.ts +5 -1
- package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
- package/dist/es6/banner/lib/Banner.js +12 -8
- package/dist/es6/banner/lib/hooks/useBannerIcon.d.ts +1 -1
- package/dist/es6/banner/lib/hooks/useBannerIcon.js +1 -1
- package/dist/es6/information-highlight/lib/InformationHighlight.d.ts +83 -13
- package/dist/es6/information-highlight/lib/InformationHighlight.d.ts.map +1 -1
- package/dist/es6/information-highlight/lib/InformationHighlight.js +30 -12
- package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +26 -5
- package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.d.ts.map +1 -1
- package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.js +11 -1
- package/dist/es6/information-highlight/lib/parts/Body.d.ts +8 -1
- package/dist/es6/information-highlight/lib/parts/Body.d.ts.map +1 -1
- package/dist/es6/information-highlight/lib/parts/Body.js +17 -7
- package/dist/es6/information-highlight/lib/parts/Heading.d.ts +8 -1
- package/dist/es6/information-highlight/lib/parts/Heading.d.ts.map +1 -1
- package/dist/es6/information-highlight/lib/parts/Heading.js +17 -7
- package/dist/es6/information-highlight/lib/parts/Icon.d.ts +2 -1
- package/dist/es6/information-highlight/lib/parts/Icon.d.ts.map +1 -1
- package/dist/es6/information-highlight/lib/parts/Icon.js +4 -3
- package/dist/es6/information-highlight/lib/parts/Link.d.ts +8 -1
- package/dist/es6/information-highlight/lib/parts/Link.d.ts.map +1 -1
- package/dist/es6/information-highlight/lib/parts/Link.js +17 -7
- package/dist/es6/pill/lib/Pill.d.ts +1 -11
- package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
- package/dist/es6/pill/lib/Pill.js +3 -3
- package/dist/es6/pill/lib/PillIcon.js +1 -1
- package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillIconButton.js +3 -3
- package/dist/es6/skeleton/lib/parts/SkeletonHeader.d.ts +10 -2
- package/dist/es6/skeleton/lib/parts/SkeletonHeader.d.ts.map +1 -1
- package/dist/es6/skeleton/lib/parts/SkeletonHeader.js +4 -3
- package/dist/es6/skeleton/lib/parts/SkeletonShape.d.ts +16 -2
- package/dist/es6/skeleton/lib/parts/SkeletonShape.d.ts.map +1 -1
- package/dist/es6/skeleton/lib/parts/SkeletonShape.js +10 -2
- package/dist/es6/skeleton/lib/parts/SkeletonText.d.ts +12 -3
- package/dist/es6/skeleton/lib/parts/SkeletonText.d.ts.map +1 -1
- package/dist/es6/skeleton/lib/parts/SkeletonText.js +10 -5
- package/information-highlight/lib/InformationHighlight.tsx +67 -14
- package/information-highlight/lib/hooks/useInformationHighlightModel.ts +11 -1
- package/information-highlight/lib/parts/Body.tsx +32 -19
- package/information-highlight/lib/parts/Heading.tsx +32 -19
- package/information-highlight/lib/parts/Icon.tsx +4 -1
- package/information-highlight/lib/parts/Link.tsx +33 -18
- package/package.json +4 -4
- package/pill/lib/Pill.tsx +21 -23
- package/pill/lib/PillIcon.tsx +1 -1
- package/pill/lib/PillIconButton.tsx +21 -15
- package/skeleton/lib/parts/SkeletonHeader.tsx +5 -5
- package/skeleton/lib/parts/SkeletonShape.tsx +20 -3
- package/skeleton/lib/parts/SkeletonText.tsx +24 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { buttonStencil } from '@workday/canvas-kit-react/button';
|
|
3
|
-
import { createSubcomponent
|
|
3
|
+
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
4
4
|
import { SystemIcon, systemIconStencil } from '@workday/canvas-kit-react/icon';
|
|
5
5
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
6
6
|
import { calc, createStencil, px2rem } from '@workday/canvas-kit-styling';
|
|
@@ -9,8 +9,8 @@ import { component, system } from '@workday/canvas-tokens-web';
|
|
|
9
9
|
import { usePillModel } from './usePillModel';
|
|
10
10
|
export const pillIconButtonStencil = createStencil({
|
|
11
11
|
extends: buttonStencil,
|
|
12
|
-
base: { name: "
|
|
13
|
-
}, "pill-icon-button-
|
|
12
|
+
base: { name: "21irrl", styles: "box-sizing:border-box;margin-inline-end:calc(0.4375rem * -1);margin-inline-start:0;--borderRadius-button-a19f67:var(--cnvs-sys-shape-sm, var(--cnvs-sys-shape-x1, 0.25rem));height:var(--cnvs-sys-size-xxxs, var(--cnvs-sys-space-x4, 1rem));width:var(--cnvs-sys-size-xxxs, var(--cnvs-sys-space-x4, 1rem));padding:0;overflow:visible;flex:0 0 auto;--border-button-a19f67:var(--cnvs-sys-color-border-transparent);--background-button-a19f67:var(--cnvs-sys-color-surface-transparent, var(--cnvs-sys-color-bg-transparent-default, oklch(0 0 0 / 0)));--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-default);--size-svg-bca693:var(--cnvs-component-system-icon-size-xs, var(--cnvs-sys-space-x4, 1rem));::after{content:\"\";box-sizing:border-box;position:absolute;top:calc(0.3125rem * -1);right:calc(0.3125rem * -1);bottom:calc(0.3125rem * -1);left:calc(0.3125rem * -1);margin:0;pointer-events:all;border-radius:var(--cnvs-sys-shape-sm, var(--cnvs-sys-shape-x1, 0.25rem));border-style:solid;border-width:0.125rem;border-color:transparent;}&:focus-visible, &.focus{--border-button-a19f67:var(--cnvs-sys-color-border-transparent);box-shadow:none;::after{border-color:var(--cnvs-sys-color-brand-border-primary, oklch(0.6023 0.2032 255.68 / 1));}}&:hover, &.hover{--border-button-a19f67:var(--cnvs-sys-color-border-transparent);}&:active, &.active{--border-button-a19f67:var(--cnvs-sys-color-border-transparent);}&:disabled, &.disabled{--border-button-a19f67:var(--cnvs-sys-color-border-transparent);--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-strong);}" }
|
|
13
|
+
}, "pill-icon-button-81e81c");
|
|
14
14
|
export const PillIconButton = createSubcomponent('button')({
|
|
15
15
|
modelHook: usePillModel,
|
|
16
16
|
})(({ size, icon, children, 'aria-label': ariaLabel = '', ...elemProps }, Element, model) => {
|
|
@@ -2,7 +2,7 @@ import { CSProps } from '@workday/canvas-kit-styling';
|
|
|
2
2
|
export interface SkeletonHeaderProps extends CSProps {
|
|
3
3
|
/**
|
|
4
4
|
* The background color of the skeleton
|
|
5
|
-
* @default `
|
|
5
|
+
* @default Surface shimmer gradient (`surface.alt.strong` → `surface.loading`); override with a solid color
|
|
6
6
|
*/
|
|
7
7
|
backgroundColor?: string;
|
|
8
8
|
/**
|
|
@@ -20,10 +20,18 @@ export declare const skeletonHeaderStencil: import("@workday/canvas-kit-styling"
|
|
|
20
20
|
width: string;
|
|
21
21
|
height: string;
|
|
22
22
|
backgroundColor: string;
|
|
23
|
+
}, import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
24
|
+
backgroundColor: string;
|
|
23
25
|
}, never>, {}, {
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
}, never, never>>, {}, {
|
|
24
28
|
width: string;
|
|
25
29
|
height: string;
|
|
26
30
|
backgroundColor: string;
|
|
27
|
-
},
|
|
31
|
+
}, import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
32
|
+
backgroundColor: string;
|
|
33
|
+
}, never>, {}, {
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
}, never, never>, never>;
|
|
28
36
|
export declare const SkeletonHeader: import("@workday/canvas-kit-react/common").ElementComponent<"div", SkeletonHeaderProps>;
|
|
29
37
|
//# sourceMappingURL=SkeletonHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonHeader.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/SkeletonHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAA8C,MAAM,6BAA6B,CAAC;AAKjG,MAAM,WAAW,mBAAoB,SAAQ,OAAO;IAClD;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"SkeletonHeader.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/SkeletonHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAA8C,MAAM,6BAA6B,CAAC;AAKjG,MAAM,WAAW,mBAAoB,SAAQ,OAAO;IAClD;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;wBAahC,CAAC;AAEH,eAAO,MAAM,cAAc,yFAoBzB,CAAC"}
|
|
@@ -2,15 +2,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { createStencil, cssVar, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
4
4
|
import { system } from '@workday/canvas-tokens-web';
|
|
5
|
-
import { SkeletonShape } from './SkeletonShape';
|
|
5
|
+
import { SkeletonShape, skeletonSurfaceFillStencil } from './SkeletonShape';
|
|
6
6
|
export const skeletonHeaderStencil = createStencil({
|
|
7
|
+
extends: skeletonSurfaceFillStencil,
|
|
7
8
|
vars: {
|
|
8
9
|
width: '',
|
|
9
10
|
height: '',
|
|
10
11
|
backgroundColor: '',
|
|
11
12
|
},
|
|
12
|
-
base: { name: "
|
|
13
|
-
}, "skeleton-header-
|
|
13
|
+
base: { name: "3kkoto", styles: "box-sizing:border-box;border-radius:var(--cnvs-sys-shape-sm, var(--cnvs-sys-shape-x1, 0.25rem));height:var(--height-skeleton-header-5b02f8, var(--cnvs-sys-size-xs, var(--cnvs-sys-space-x6, 1.5rem)));width:var(--width-skeleton-header-5b02f8);margin-block-end:var(--cnvs-sys-size-xxxs, var(--cnvs-sys-space-x4, 1rem));" }
|
|
14
|
+
}, "skeleton-header-5b02f8");
|
|
14
15
|
export const SkeletonHeader = createComponent('div')({
|
|
15
16
|
displayName: 'Skeleton.Header',
|
|
16
17
|
Component: ({ width = '100%', backgroundColor, height, ...elemProps }, ref, Element) => (_jsx(SkeletonShape, { ref: ref, as: Element, ...handleCsProp(elemProps, skeletonHeaderStencil({
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { CSProps } from '@workday/canvas-kit-styling';
|
|
2
|
+
/** Default Surface/Shimmer fill for skeleton placeholders (Shape, Header, Text lines). */
|
|
3
|
+
export declare const skeletonSurfaceFillStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
}, never>, {}, {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
}, never, never>;
|
|
2
8
|
export interface SkeletonShapeProps extends CSProps {
|
|
3
9
|
/**
|
|
4
10
|
* The width of the shape in `px` or `%`.
|
|
@@ -17,7 +23,7 @@ export interface SkeletonShapeProps extends CSProps {
|
|
|
17
23
|
borderRadius?: number | string;
|
|
18
24
|
/**
|
|
19
25
|
* The background color of the skeleton
|
|
20
|
-
* @default `
|
|
26
|
+
* @default Surface shimmer gradient (`surface.alt.strong` → `surface.loading`); override with a solid color
|
|
21
27
|
*/
|
|
22
28
|
backgroundColor?: string;
|
|
23
29
|
}
|
|
@@ -26,11 +32,19 @@ export declare const skeletonShapeStencil: import("@workday/canvas-kit-styling")
|
|
|
26
32
|
height: string;
|
|
27
33
|
borderRadius: string;
|
|
28
34
|
backgroundColor: string;
|
|
35
|
+
}, import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
36
|
+
backgroundColor: string;
|
|
29
37
|
}, never>, {}, {
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
}, never, never>>, {}, {
|
|
30
40
|
width: string;
|
|
31
41
|
height: string;
|
|
32
42
|
borderRadius: string;
|
|
33
43
|
backgroundColor: string;
|
|
34
|
-
},
|
|
44
|
+
}, import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
45
|
+
backgroundColor: string;
|
|
46
|
+
}, never>, {}, {
|
|
47
|
+
backgroundColor: string;
|
|
48
|
+
}, never, never>, never>;
|
|
35
49
|
export declare const SkeletonShape: import("@workday/canvas-kit-react/common").ElementComponent<"div", SkeletonShapeProps>;
|
|
36
50
|
//# sourceMappingURL=SkeletonShape.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonShape.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/SkeletonShape.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAA8C,MAAM,6BAA6B,CAAC;AAGjG,MAAM,WAAW,kBAAmB,SAAQ,OAAO;IACjD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"SkeletonShape.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/SkeletonShape.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAA8C,MAAM,6BAA6B,CAAC;AAGjG,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B;;;;gBAcrC,CAAC;AAEH,MAAM,WAAW,kBAAmB,SAAQ,OAAO;IACjD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;wBAc/B,CAAC;AAEH,eAAO,MAAM,aAAa,wFAsBxB,CAAC"}
|
|
@@ -2,15 +2,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { createStencil, cssVar, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
4
4
|
import { system } from '@workday/canvas-tokens-web';
|
|
5
|
+
/** Default Surface/Shimmer fill for skeleton placeholders (Shape, Header, Text lines). */
|
|
6
|
+
export const skeletonSurfaceFillStencil = createStencil({
|
|
7
|
+
vars: {
|
|
8
|
+
backgroundColor: '',
|
|
9
|
+
},
|
|
10
|
+
base: { name: "4aw72", styles: "box-sizing:border-box;background:var(--backgroundColor-skeleton-surface-fill-2acf91, linear-gradient(to left, var(--cnvs-sys-color-surface-alt-strong, var(--cnvs-sys-color-bg-alt-default, oklch(0.3337 0.0688 250.79 / 0.09))), var(--cnvs-sys-color-surface-loading, oklch(0.3057 0.079 256.22 / 0.13))));border:0.0625rem solid transparent;@media (forced-colors: active){border-color:CanvasText;}" }
|
|
11
|
+
}, "skeleton-surface-fill-2acf91");
|
|
5
12
|
export const skeletonShapeStencil = createStencil({
|
|
13
|
+
extends: skeletonSurfaceFillStencil,
|
|
6
14
|
vars: {
|
|
7
15
|
width: '',
|
|
8
16
|
height: '',
|
|
9
17
|
borderRadius: '',
|
|
10
18
|
backgroundColor: '',
|
|
11
19
|
},
|
|
12
|
-
base: { name: "
|
|
13
|
-
}, "skeleton-shape-
|
|
20
|
+
base: { name: "39irtf", styles: "box-sizing:border-box;border-radius:var(--borderRadius-skeleton-shape-068fb0, 0);height:var(--height-skeleton-shape-068fb0, 100%);width:var(--width-skeleton-shape-068fb0);margin-block-end:var(--cnvs-sys-size-xxxs, var(--cnvs-sys-space-x4, 1rem));" }
|
|
21
|
+
}, "skeleton-shape-068fb0");
|
|
14
22
|
export const SkeletonShape = createComponent('div')({
|
|
15
23
|
displayName: 'Skeleton.Shape',
|
|
16
24
|
Component: ({ width = '100%', height, backgroundColor, borderRadius, ...elemProps }, ref, Element) => {
|
|
@@ -7,14 +7,23 @@ export interface SkeletonTextProps extends CSProps {
|
|
|
7
7
|
lineCount?: number;
|
|
8
8
|
/**
|
|
9
9
|
* The background color of the skeleton
|
|
10
|
-
* @default `
|
|
10
|
+
* @default Surface shimmer gradient (`surface.alt.strong` → `surface.loading`); override with a solid color
|
|
11
11
|
*/
|
|
12
12
|
backgroundColor?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const skeletonTextLineStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
}, import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
}, never>, {}, {
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
}, never, never>>, {}, {
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
}, import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {
|
|
15
23
|
backgroundColor: string;
|
|
16
24
|
}, never>, {}, {
|
|
17
25
|
backgroundColor: string;
|
|
18
|
-
}, never, never>;
|
|
26
|
+
}, never, never>, never>;
|
|
27
|
+
export declare const skeletonTextStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {}, never>, {}, {}, never, never>;
|
|
19
28
|
export declare const SkeletonText: import("@workday/canvas-kit-react/common").ElementComponent<"div", SkeletonTextProps>;
|
|
20
29
|
//# sourceMappingURL=SkeletonText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/SkeletonText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"SkeletonText.d.ts","sourceRoot":"","sources":["../../../../../skeleton/lib/parts/SkeletonText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAA8B,MAAM,6BAA6B,CAAC;AAKjF,MAAM,WAAW,iBAAkB,SAAQ,OAAO;IAChD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;wBAalC,CAAC;AAEH,eAAO,MAAM,mBAAmB,iJAO9B,CAAC;AAEH,eAAO,MAAM,YAAY,uFAgBvB,CAAC"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { createStencil,
|
|
3
|
+
import { createStencil, handleCsProp } from '@workday/canvas-kit-styling';
|
|
4
4
|
import { system } from '@workday/canvas-tokens-web';
|
|
5
|
-
|
|
5
|
+
import { skeletonSurfaceFillStencil } from './SkeletonShape';
|
|
6
|
+
export const skeletonTextLineStencil = createStencil({
|
|
7
|
+
extends: skeletonSurfaceFillStencil,
|
|
6
8
|
vars: {
|
|
7
9
|
backgroundColor: '',
|
|
8
10
|
},
|
|
9
|
-
base: { name: "
|
|
10
|
-
}, "skeleton-text-
|
|
11
|
+
base: { name: "7qscx", styles: "box-sizing:border-box;height:var(--cnvs-sys-size-xxxs, var(--cnvs-sys-space-x4, 1rem));margin-block-end:var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem));border-radius:var(--cnvs-sys-shape-xxxl, 2rem);width:100%;display:block;" }
|
|
12
|
+
}, "skeleton-text-line-318cd1");
|
|
13
|
+
export const skeletonTextStencil = createStencil({
|
|
14
|
+
base: { name: "1az8g", styles: "box-sizing:border-box;margin-block-end:var(--cnvs-sys-size-xs, var(--cnvs-sys-space-x6, 1.5rem));& [data-part=\"skeleton-text-lines\"]:last-child{width:60%;}" }
|
|
15
|
+
}, "skeleton-text-175643");
|
|
11
16
|
export const SkeletonText = createComponent('div')({
|
|
12
17
|
displayName: 'Skeleton.Text',
|
|
13
18
|
Component: ({ backgroundColor, lineCount = 2, ...elemProps }, ref, Element) => {
|
|
14
19
|
const lines = new Array(lineCount).fill(null);
|
|
15
|
-
return lineCount > 0 ? (_jsx(Element, { ref: ref, ...handleCsProp(elemProps, skeletonTextStencil(
|
|
20
|
+
return lineCount > 0 ? (_jsx(Element, { ref: ref, ...handleCsProp(elemProps, skeletonTextStencil()), children: lines.map((_value, index) => (_jsx("div", { "data-part": "skeleton-text-lines", ...handleCsProp({}, skeletonTextLineStencil({ backgroundColor })) }, index))) })) : null;
|
|
16
21
|
},
|
|
17
22
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {createContainer} from '@workday/canvas-kit-react/common';
|
|
1
|
+
import {cornerShapeStencil, createContainer} from '@workday/canvas-kit-react/common';
|
|
2
2
|
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
3
3
|
import {CSProps, createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
4
|
-
import {
|
|
4
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
5
5
|
|
|
6
6
|
import {useInformationHighlightModel} from './hooks/useInformationHighlightModel';
|
|
7
7
|
import {Body} from './parts/Body';
|
|
@@ -9,22 +9,35 @@ import {InformationHighlightHeading} from './parts/Heading';
|
|
|
9
9
|
import {Icon} from './parts/Icon';
|
|
10
10
|
import {Link} from './parts/Link';
|
|
11
11
|
|
|
12
|
-
interface InformationHighlightProps extends CSProps {
|
|
12
|
+
interface InformationHighlightProps extends CSProps {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const defaultVariantStyles = {
|
|
17
|
+
backgroundColor: system.legacy.color.surface.alt.default,
|
|
18
|
+
'& [data-part="information-highlight-icon"]': {
|
|
19
|
+
[systemIconStencil.vars.color]: system.color.fg.default,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
13
22
|
|
|
14
23
|
export const informationHighlightStencil = createStencil({
|
|
24
|
+
extends: cornerShapeStencil,
|
|
15
25
|
base: {
|
|
16
26
|
display: 'grid',
|
|
17
27
|
gridTemplateColumns: 'min-content',
|
|
18
|
-
gap:
|
|
28
|
+
gap: `0 ${px2rem(12)}`,
|
|
19
29
|
padding: system.legacy.padding.md,
|
|
20
30
|
borderRadius: system.legacy.shape.sm,
|
|
21
31
|
outline: `${px2rem(1)} solid transparent`,
|
|
22
|
-
|
|
32
|
+
[cornerShapeStencil.vars.shape]: system.legacy.shape.xxl,
|
|
23
33
|
},
|
|
24
34
|
modifiers: {
|
|
35
|
+
default: {
|
|
36
|
+
low: defaultVariantStyles,
|
|
37
|
+
high: defaultVariantStyles,
|
|
38
|
+
},
|
|
25
39
|
informational: {
|
|
26
40
|
low: {
|
|
27
|
-
borderInlineStartColor: system.legacy.color.border.info.default,
|
|
28
41
|
backgroundColor: system.legacy.color.surface.alt.default,
|
|
29
42
|
'& [data-part="information-highlight-icon"]': {
|
|
30
43
|
[systemIconStencil.vars.accentColor]: system.color.fg.inverse,
|
|
@@ -33,7 +46,6 @@ export const informationHighlightStencil = createStencil({
|
|
|
33
46
|
},
|
|
34
47
|
},
|
|
35
48
|
high: {
|
|
36
|
-
borderInlineStartColor: system.legacy.color.border.info.default,
|
|
37
49
|
backgroundColor: system.legacy.color.surface.info.default,
|
|
38
50
|
'& [data-part="information-highlight-icon"]': {
|
|
39
51
|
[systemIconStencil.vars.accentColor]: system.color.fg.inverse,
|
|
@@ -44,7 +56,6 @@ export const informationHighlightStencil = createStencil({
|
|
|
44
56
|
},
|
|
45
57
|
caution: {
|
|
46
58
|
low: {
|
|
47
|
-
borderInlineStartColor: system.legacy.color.border.warning,
|
|
48
59
|
backgroundColor: system.legacy.color.surface.alt.default,
|
|
49
60
|
'& [data-part="information-highlight-icon"]': {
|
|
50
61
|
[systemIconStencil.vars.accentColor]: system.color.fg.inverse,
|
|
@@ -53,7 +64,6 @@ export const informationHighlightStencil = createStencil({
|
|
|
53
64
|
},
|
|
54
65
|
},
|
|
55
66
|
high: {
|
|
56
|
-
borderInlineStartColor: system.legacy.color.border.warning,
|
|
57
67
|
backgroundColor: system.legacy.color.surface.warning.default,
|
|
58
68
|
'& [data-part="information-highlight-icon"]': {
|
|
59
69
|
[systemIconStencil.vars.accentColor]: system.color.fg.inverse,
|
|
@@ -64,7 +74,6 @@ export const informationHighlightStencil = createStencil({
|
|
|
64
74
|
},
|
|
65
75
|
critical: {
|
|
66
76
|
low: {
|
|
67
|
-
borderInlineStartColor: system.legacy.color.border.danger,
|
|
68
77
|
backgroundColor: system.legacy.color.surface.alt.default,
|
|
69
78
|
'& [data-part="information-highlight-icon"]': {
|
|
70
79
|
[systemIconStencil.vars.accentColor]: system.color.fg.inverse,
|
|
@@ -74,7 +83,6 @@ export const informationHighlightStencil = createStencil({
|
|
|
74
83
|
},
|
|
75
84
|
},
|
|
76
85
|
high: {
|
|
77
|
-
borderInlineStartColor: system.legacy.color.border.danger,
|
|
78
86
|
backgroundColor: system.legacy.color.surface.danger.default,
|
|
79
87
|
'& [data-part="information-highlight-icon"]': {
|
|
80
88
|
[systemIconStencil.vars.accentColor]: system.color.fg.inverse,
|
|
@@ -83,6 +91,46 @@ export const informationHighlightStencil = createStencil({
|
|
|
83
91
|
},
|
|
84
92
|
},
|
|
85
93
|
},
|
|
94
|
+
actionPlacement: {
|
|
95
|
+
bottom: {},
|
|
96
|
+
end: {
|
|
97
|
+
width: '100%',
|
|
98
|
+
minWidth: 0,
|
|
99
|
+
containerType: 'inline-size',
|
|
100
|
+
gridTemplateColumns: 'min-content minmax(0, 1fr)',
|
|
101
|
+
gridTemplateAreas: `
|
|
102
|
+
"icon heading"
|
|
103
|
+
"icon body"
|
|
104
|
+
"icon link"
|
|
105
|
+
`,
|
|
106
|
+
'& [data-part="information-highlight-icon"]': {
|
|
107
|
+
gridArea: 'icon',
|
|
108
|
+
alignSelf: 'start',
|
|
109
|
+
},
|
|
110
|
+
'& [data-part="information-highlight-heading"]': {
|
|
111
|
+
gridArea: 'heading',
|
|
112
|
+
},
|
|
113
|
+
'& [data-part="information-highlight-body"]': {
|
|
114
|
+
gridArea: 'body',
|
|
115
|
+
},
|
|
116
|
+
'& [data-part="information-highlight-link"]': {
|
|
117
|
+
gridArea: 'link',
|
|
118
|
+
justifySelf: 'end',
|
|
119
|
+
marginBlockStart: system.legacy.gap.md,
|
|
120
|
+
},
|
|
121
|
+
'@container (min-width: 28rem)': {
|
|
122
|
+
gridTemplateColumns: 'min-content minmax(0, 1fr) minmax(0, max-content)',
|
|
123
|
+
gridTemplateAreas: `
|
|
124
|
+
"icon heading link"
|
|
125
|
+
"icon body link"
|
|
126
|
+
`,
|
|
127
|
+
'& [data-part="information-highlight-link"]': {
|
|
128
|
+
alignSelf: 'center',
|
|
129
|
+
marginBlockStart: 0,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
86
134
|
},
|
|
87
135
|
});
|
|
88
136
|
|
|
@@ -95,13 +143,18 @@ export const InformationHighlight = createContainer('section')({
|
|
|
95
143
|
Body: Body,
|
|
96
144
|
Link: Link,
|
|
97
145
|
},
|
|
98
|
-
})(({...elemProps}: InformationHighlightProps, Element, model) => {
|
|
146
|
+
})(({children, ...elemProps}: InformationHighlightProps, Element, model) => {
|
|
99
147
|
return (
|
|
100
148
|
<Element
|
|
101
149
|
{...handleCsProp(
|
|
102
150
|
elemProps,
|
|
103
|
-
informationHighlightStencil({
|
|
151
|
+
informationHighlightStencil({
|
|
152
|
+
[model.state.variant]: model.state.emphasis,
|
|
153
|
+
actionPlacement: model.state.actionPlacement,
|
|
154
|
+
})
|
|
104
155
|
)}
|
|
105
|
-
|
|
156
|
+
>
|
|
157
|
+
{children}
|
|
158
|
+
</Element>
|
|
106
159
|
);
|
|
107
160
|
});
|
|
@@ -2,14 +2,24 @@ import {createModelHook} from '@workday/canvas-kit-react/common';
|
|
|
2
2
|
|
|
3
3
|
export const useInformationHighlightModel = createModelHook({
|
|
4
4
|
defaultConfig: {
|
|
5
|
-
variant: '
|
|
5
|
+
variant: 'default' as 'default' | 'informational' | 'caution' | 'critical',
|
|
6
6
|
emphasis: 'low' as 'low' | 'high',
|
|
7
|
+
/**
|
|
8
|
+
* Controls where `InformationHighlight.Link` is placed relative to heading and body.
|
|
9
|
+
* - `bottom` (default): link stacks below heading and body.
|
|
10
|
+
* - `end`: link is visually placed at the inline end beside content when the container is wide
|
|
11
|
+
* enough; in narrower containers it stacks below the body. Placement uses CSS Grid
|
|
12
|
+
* only—DOM, keyboard tab order, and screen reader order remain heading, body, then link.
|
|
13
|
+
* @default 'bottom'
|
|
14
|
+
*/
|
|
15
|
+
actionPlacement: 'bottom' as 'bottom' | 'end',
|
|
7
16
|
},
|
|
8
17
|
})(config => {
|
|
9
18
|
return {
|
|
10
19
|
state: {
|
|
11
20
|
variant: config.variant,
|
|
12
21
|
emphasis: config.emphasis,
|
|
22
|
+
actionPlacement: config.actionPlacement,
|
|
13
23
|
},
|
|
14
24
|
events: {},
|
|
15
25
|
};
|
|
@@ -1,32 +1,45 @@
|
|
|
1
|
-
import {ExtractProps,
|
|
1
|
+
import {ExtractProps, createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
2
2
|
import {Text} from '@workday/canvas-kit-react/text';
|
|
3
3
|
import {createStencil, handleCsProp} from '@workday/canvas-kit-styling';
|
|
4
4
|
import {system} from '@workday/canvas-tokens-web';
|
|
5
5
|
|
|
6
|
+
import {useInformationHighlightModel} from '../hooks/useInformationHighlightModel';
|
|
7
|
+
|
|
6
8
|
const informationHighlightBodyStencil = createStencil({
|
|
9
|
+
parts: {
|
|
10
|
+
body: 'information-highlight-body',
|
|
11
|
+
},
|
|
7
12
|
base: () => {
|
|
8
13
|
return {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fontSize: system.legacy.fontSize.subtext.lg,
|
|
13
|
-
letterSpacing: system.legacy.letterSpacing.subtext.lg,
|
|
14
|
-
color: system.color.fg.default,
|
|
15
|
-
gridColumn: '2',
|
|
16
|
-
marginBlockEnd: system.legacy.gap.sm,
|
|
14
|
+
...system.legacy.type.subtext.lg,
|
|
15
|
+
color: system.color.fg.muted.default,
|
|
16
|
+
marginBlockEnd: system.legacy.gap.md,
|
|
17
17
|
};
|
|
18
18
|
},
|
|
19
|
+
modifiers: {
|
|
20
|
+
actionPlacement: {
|
|
21
|
+
bottom: {
|
|
22
|
+
gridColumn: '2',
|
|
23
|
+
},
|
|
24
|
+
end: {
|
|
25
|
+
marginBlockEnd: 0,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
19
29
|
});
|
|
20
30
|
|
|
21
|
-
export const Body =
|
|
31
|
+
export const Body = createSubcomponent('div')({
|
|
22
32
|
displayName: 'Body',
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
modelHook: useInformationHighlightModel,
|
|
34
|
+
})(({...elemProps}: ExtractProps<typeof Text, never>, Element, model) => {
|
|
35
|
+
return (
|
|
36
|
+
<Text
|
|
37
|
+
as={Element}
|
|
38
|
+
{...informationHighlightBodyStencil.parts.body}
|
|
39
|
+
{...handleCsProp(
|
|
40
|
+
elemProps,
|
|
41
|
+
informationHighlightBodyStencil({actionPlacement: model.state.actionPlacement})
|
|
42
|
+
)}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
32
45
|
});
|
|
@@ -1,36 +1,49 @@
|
|
|
1
|
-
import {ExtractProps,
|
|
1
|
+
import {ExtractProps, createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
2
2
|
import {Heading} from '@workday/canvas-kit-react/text';
|
|
3
3
|
import {createStencil, handleCsProp} from '@workday/canvas-kit-styling';
|
|
4
4
|
import {system} from '@workday/canvas-tokens-web';
|
|
5
5
|
|
|
6
|
+
import {useInformationHighlightModel} from '../hooks/useInformationHighlightModel';
|
|
7
|
+
|
|
6
8
|
const informationHighlightHeadingStencil = createStencil({
|
|
9
|
+
parts: {
|
|
10
|
+
heading: 'information-highlight-heading',
|
|
11
|
+
},
|
|
7
12
|
base: () => {
|
|
8
13
|
return {
|
|
9
|
-
|
|
10
|
-
fontWeight: system.fontWeight.
|
|
11
|
-
|
|
12
|
-
fontSize: system.legacy.fontSize.body.sm,
|
|
13
|
-
letterSpacing: system.legacy.letterSpacing.body.sm,
|
|
14
|
-
color: system.color.fg.default,
|
|
15
|
-
gridColumn: '2',
|
|
14
|
+
...system.legacy.type.subtext.lg,
|
|
15
|
+
fontWeight: system.fontWeight.medium,
|
|
16
|
+
color: system.color.fg.strong,
|
|
16
17
|
margin: 0,
|
|
18
|
+
marginBlockEnd: system.legacy.gap.xs,
|
|
17
19
|
};
|
|
18
20
|
},
|
|
21
|
+
modifiers: {
|
|
22
|
+
actionPlacement: {
|
|
23
|
+
bottom: {
|
|
24
|
+
gridColumn: '2',
|
|
25
|
+
},
|
|
26
|
+
end: {},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
19
29
|
});
|
|
20
30
|
|
|
21
31
|
export interface InformationHighlightHeadingProps
|
|
22
32
|
extends Partial<ExtractProps<typeof Heading, never>> {}
|
|
23
33
|
|
|
24
|
-
export const InformationHighlightHeading =
|
|
34
|
+
export const InformationHighlightHeading = createSubcomponent('h3')({
|
|
25
35
|
displayName: 'Heading',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
modelHook: useInformationHighlightModel,
|
|
37
|
+
})(({size = 'small', ...elemProps}: InformationHighlightHeadingProps, Element, model) => {
|
|
38
|
+
return (
|
|
39
|
+
<Heading
|
|
40
|
+
as={Element}
|
|
41
|
+
size={size}
|
|
42
|
+
{...informationHighlightHeadingStencil.parts.heading}
|
|
43
|
+
{...handleCsProp(
|
|
44
|
+
elemProps,
|
|
45
|
+
informationHighlightHeadingStencil({actionPlacement: model.state.actionPlacement})
|
|
46
|
+
)}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
36
49
|
});
|
|
@@ -4,12 +4,14 @@ import {
|
|
|
4
4
|
exclamationCircleIcon,
|
|
5
5
|
exclamationTriangleIcon,
|
|
6
6
|
infoIcon,
|
|
7
|
+
layersIcon,
|
|
7
8
|
} from '@workday/canvas-system-icons-web';
|
|
8
9
|
|
|
9
10
|
import {useInformationHighlightModel} from '../hooks/useInformationHighlightModel';
|
|
10
11
|
|
|
11
12
|
export interface IconProps extends Partial<ExtractProps<typeof SystemIcon, never>> {}
|
|
12
13
|
const defaultIcons = {
|
|
14
|
+
default: layersIcon,
|
|
13
15
|
informational: infoIcon,
|
|
14
16
|
caution: exclamationTriangleIcon,
|
|
15
17
|
critical: exclamationCircleIcon,
|
|
@@ -18,11 +20,12 @@ const defaultIcons = {
|
|
|
18
20
|
export const Icon = createSubcomponent('span')({
|
|
19
21
|
displayName: 'Icon',
|
|
20
22
|
modelHook: useInformationHighlightModel,
|
|
21
|
-
})(({icon, ...props}: IconProps, Element, model) => {
|
|
23
|
+
})(({icon, size = 'md', ...props}: IconProps, Element, model) => {
|
|
22
24
|
return (
|
|
23
25
|
<SystemIcon
|
|
24
26
|
as={Element}
|
|
25
27
|
icon={icon ? icon : defaultIcons[model.state.variant]}
|
|
28
|
+
size={size}
|
|
26
29
|
data-part="information-highlight-icon"
|
|
27
30
|
{...props}
|
|
28
31
|
/>
|
|
@@ -1,32 +1,47 @@
|
|
|
1
1
|
import {Hyperlink} from '@workday/canvas-kit-react/button';
|
|
2
|
-
import {ExtractProps,
|
|
2
|
+
import {ExtractProps, createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
3
3
|
import {createStencil, handleCsProp} from '@workday/canvas-kit-styling';
|
|
4
4
|
import {system} from '@workday/canvas-tokens-web';
|
|
5
5
|
|
|
6
|
+
import {useInformationHighlightModel} from '../hooks/useInformationHighlightModel';
|
|
7
|
+
|
|
6
8
|
const informationHighlightLinkStencil = createStencil({
|
|
9
|
+
parts: {
|
|
10
|
+
link: 'information-highlight-link',
|
|
11
|
+
},
|
|
7
12
|
base: () => {
|
|
8
13
|
return {
|
|
9
|
-
|
|
10
|
-
fontWeight: system.fontWeight.bold,
|
|
11
|
-
lineHeight: system.legacy.lineHeight.subtext.lg,
|
|
12
|
-
fontSize: system.legacy.fontSize.subtext.lg,
|
|
13
|
-
letterSpacing: system.legacy.letterSpacing.subtext.lg,
|
|
14
|
-
gridColumn: '2',
|
|
15
|
-
justifySelf: 'start',
|
|
14
|
+
...system.legacy.type.subtext.lg,
|
|
16
15
|
color: system.color.fg.default,
|
|
17
16
|
};
|
|
18
17
|
},
|
|
18
|
+
modifiers: {
|
|
19
|
+
actionPlacement: {
|
|
20
|
+
bottom: {
|
|
21
|
+
gridColumn: '2',
|
|
22
|
+
justifySelf: 'start',
|
|
23
|
+
},
|
|
24
|
+
end: {
|
|
25
|
+
margin: 0,
|
|
26
|
+
maxWidth: '100%',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
19
30
|
});
|
|
20
31
|
|
|
21
|
-
export const Link =
|
|
32
|
+
export const Link = createSubcomponent('a')({
|
|
22
33
|
displayName: 'Link',
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
modelHook: useInformationHighlightModel,
|
|
35
|
+
})(({...elemProps}: ExtractProps<typeof Hyperlink, never>, Element, model) => {
|
|
36
|
+
return (
|
|
37
|
+
<Hyperlink
|
|
38
|
+
as={Element}
|
|
39
|
+
{...informationHighlightLinkStencil.parts.link}
|
|
40
|
+
{...handleCsProp(
|
|
41
|
+
elemProps,
|
|
42
|
+
informationHighlightLinkStencil({actionPlacement: model.state.actionPlacement})
|
|
43
|
+
)}
|
|
44
|
+
variant="secondary"
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
32
47
|
});
|