@workday/canvas-kit-docs 13.0.0-alpha.978-next.0 → 13.0.0-alpha.996-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.
Files changed (46) hide show
  1. package/dist/es6/index.d.ts +0 -1
  2. package/dist/es6/index.d.ts.map +1 -1
  3. package/dist/es6/index.js +0 -1
  4. package/dist/es6/lib/docs.js +2058 -189
  5. package/dist/es6/mdx/versionsTable.d.ts.map +1 -1
  6. package/dist/es6/mdx/versionsTable.js +4 -0
  7. package/dist/mdx/preview-react/InformationHighlight/InformationHighlight.mdx +109 -0
  8. package/dist/mdx/preview-react/InformationHighlight/examples/Basic.tsx +18 -0
  9. package/dist/mdx/preview-react/InformationHighlight/examples/Body.tsx +13 -0
  10. package/dist/mdx/preview-react/InformationHighlight/examples/Caution.tsx +27 -0
  11. package/dist/mdx/preview-react/InformationHighlight/examples/Critical.tsx +33 -0
  12. package/dist/mdx/preview-react/InformationHighlight/examples/CustomIconCritical.tsx +28 -0
  13. package/dist/mdx/preview-react/InformationHighlight/examples/Heading.tsx +11 -0
  14. package/dist/mdx/preview-react/InformationHighlight/examples/Informational.tsx +27 -0
  15. package/dist/mdx/preview-react/InformationHighlight/examples/RTL.tsx +42 -0
  16. package/dist/mdx/react/tokens/Tokens.mdx +2 -1
  17. package/index.ts +0 -1
  18. package/package.json +6 -6
  19. package/dist/es6/lib/InformationHighlight/Base.d.ts +0 -5
  20. package/dist/es6/lib/InformationHighlight/Base.d.ts.map +0 -1
  21. package/dist/es6/lib/InformationHighlight/Base.js +0 -9
  22. package/dist/es6/lib/InformationHighlight/Body.d.ts +0 -2
  23. package/dist/es6/lib/InformationHighlight/Body.d.ts.map +0 -1
  24. package/dist/es6/lib/InformationHighlight/Body.js +0 -18
  25. package/dist/es6/lib/InformationHighlight/Heading.d.ts +0 -2
  26. package/dist/es6/lib/InformationHighlight/Heading.d.ts.map +0 -1
  27. package/dist/es6/lib/InformationHighlight/Heading.js +0 -17
  28. package/dist/es6/lib/InformationHighlight/Icon.d.ts +0 -13
  29. package/dist/es6/lib/InformationHighlight/Icon.d.ts.map +0 -1
  30. package/dist/es6/lib/InformationHighlight/Icon.js +0 -44
  31. package/dist/es6/lib/InformationHighlight/Link.d.ts +0 -2
  32. package/dist/es6/lib/InformationHighlight/Link.d.ts.map +0 -1
  33. package/dist/es6/lib/InformationHighlight/Link.js +0 -18
  34. package/dist/es6/lib/InformationHighlight/index.d.ts +0 -25
  35. package/dist/es6/lib/InformationHighlight/index.d.ts.map +0 -1
  36. package/dist/es6/lib/InformationHighlight/index.js +0 -44
  37. package/dist/es6/lib/InformationHighlight/modelHook.d.ts +0 -19
  38. package/dist/es6/lib/InformationHighlight/modelHook.d.ts.map +0 -1
  39. package/dist/es6/lib/InformationHighlight/modelHook.js +0 -13
  40. package/lib/InformationHighlight/Base.tsx +0 -12
  41. package/lib/InformationHighlight/Body.tsx +0 -21
  42. package/lib/InformationHighlight/Heading.tsx +0 -20
  43. package/lib/InformationHighlight/Icon.tsx +0 -65
  44. package/lib/InformationHighlight/Link.tsx +0 -20
  45. package/lib/InformationHighlight/index.tsx +0 -62
  46. package/lib/InformationHighlight/modelHook.ts +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"versionsTable.d.ts","sourceRoot":"","sources":["../../../mdx/versionsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkE1B,eAAO,MAAM,YAAY,yBAgCxB,CAAC"}
1
+ {"version":3,"file":"versionsTable.d.ts","sourceRoot":"","sources":["../../../mdx/versionsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsE1B,eAAO,MAAM,YAAY,yBAgCxB,CAAC"}
@@ -9,6 +9,10 @@ const allVersions = [
9
9
  versionNumber: version,
10
10
  documentation: 'https://github.com/Workday/canvas-kit',
11
11
  },
12
+ {
13
+ versionNumber: 11,
14
+ documentation: 'https://d2krrudi3mmzzw.cloudfront.net/v11/?path=/docs/welcome--page',
15
+ },
12
16
  {
13
17
  versionNumber: 10,
14
18
  documentation: 'https://d2krrudi3mmzzw.cloudfront.net/v10/?path=/docs/welcome--page',
@@ -0,0 +1,109 @@
1
+ import {
2
+ ExampleCodeBlock,
3
+ SymbolDoc,
4
+ Specifications,
5
+ } from '@workday/canvas-kit-docs';
6
+
7
+ import * as InformationHighlight from './InformationHighlight.stories.ts';
8
+ import Basic from './examples/Basic';
9
+ import Body from './examples/Body';
10
+ import Heading from './examples/Heading';
11
+ import Informational from './examples/Informational';
12
+ import Caution from './examples/Caution';
13
+ import Critical from './examples/Critical';
14
+ import IconCritical from './examples/CustomIconCritical';
15
+ import RTL from './examples/RTL';
16
+
17
+
18
+ # Canvas Kit Information Highlight
19
+
20
+ A container to call out important information on a page or a section of a page that the user should be aware of.
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ yarn add @workday/canvas-kit-preview-react
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ `InformationHighlight` should be used to call out important information to the user and are paired with a meaningful
31
+ icon and color to differentiate information type. It should not be removed from the interface until some system or admin level action has been taken to do so.
32
+
33
+ You can use an `InformationHighlight` to:
34
+ - Prevent unwanted consequences from destructive actions
35
+ - Reassure users in their next steps
36
+ - Provide detail into information on the page
37
+ - Show changes in page content
38
+
39
+ ### When to Consider Something Else
40
+ - Consider a [Banner](https://workday.github.io/canvas-kit/?path=/docs/components-indicators-banner--docs) if the message is about system-wide errors or alerts, or if the message appears in response to user action.
41
+ - Consider a [Dialog](https://workday.github.io/canvas-kit/?path=/docs/components-popups-dialog--docs) if the message is critical and requires user action or decision before proceeding
42
+ - Consider a [Toast](https://workday.github.io/canvas-kit/?path=/docs/components-popups-toast--docs) if the message is timely, such as communicating updates on the process of an application.
43
+ ### Basic Example
44
+ <ExampleCodeBlock code={Basic} />
45
+
46
+
47
+ ## Variants
48
+ `InformationHighlight` has three variants and each `variant` has two types of `emphasis`.
49
+
50
+
51
+ Variants: `informational`, `caution`, `critical`
52
+
53
+ Emphasis: `low`, `high`
54
+
55
+
56
+ The variants have different icons and colors to convey severity and the emphasis changes the background color to have a
57
+ lower or higher contrast. If no `variant` or `emphasis` is selected the layout will default to
58
+ `Variant: informational, Emphasis: low`.
59
+
60
+
61
+ The following examples will show the `low` and `high` emphasis of the three variants.
62
+ `low` Emphasis will be shown first and should be used when there is other more important information on the page.
63
+ `high` Emphasis will be shown second, and should be used when the highlight is not competing with other, more important information.
64
+
65
+ ### Informational
66
+ The informational variant is for _nice to have_ information, such as related features or opportunities.
67
+ <ExampleCodeBlock code={Informational} />
68
+
69
+ ### Caution
70
+ The caution variant is for _important to know_ information, such as the potential consequences of specific actions.
71
+
72
+ <ExampleCodeBlock code={Caution} />
73
+
74
+
75
+ ### Critical
76
+ The critical variant is for _must know_ information that could otherwise cause failure if the user is unaware
77
+
78
+ <ExampleCodeBlock code={Critical} />
79
+
80
+
81
+ ### RTL Example
82
+ Information Highlight also supports RTL Languages. To enable RTL, add a custom theme with direction set to 'ContentDirection.RTL'
83
+ <ExampleCodeBlock code={RTL} />
84
+
85
+ ## Partial and Custom Information Highlights
86
+
87
+ `InformationHighlight` can use custom icons or be designed to only use some of its components.
88
+
89
+ ### Custom Icon: Critical
90
+ <ExampleCodeBlock code={IconCritical} />
91
+
92
+ ### Body Only Example
93
+ <ExampleCodeBlock code={Body} />
94
+
95
+ ### Heading Only Example
96
+ <ExampleCodeBlock code={Heading} />
97
+
98
+ ### Accessible Use of the `as` Prop
99
+ Like many of our components, `InformationHighlight` and it's subcomponents accept an `as` prop, which lets you change
100
+ the underlying semantic element. For `InformationHighlight.Heading`, you can change the heading level if you were
101
+ needing to define a different level of importance. This should be done with caution to ensure the best accessibility.
102
+
103
+ ## Component API
104
+
105
+ <SymbolDoc name="InformationHighlight" fileName="/preview-react/" />
106
+
107
+ ## Specifications
108
+
109
+ <Specifications file="InformationHighlight.spec.tsx" name="InformationHighlight" />
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
4
+
5
+ export default () => {
6
+ return (
7
+ <InformationHighlight>
8
+ <InformationHighlight.Icon />
9
+ <InformationHighlight.Heading>Information Highlight</InformationHighlight.Heading>
10
+ <InformationHighlight.Body>
11
+ {' '}
12
+ This is what an information highlight would look like with with the default settings and
13
+ every field filled in{' '}
14
+ </InformationHighlight.Body>
15
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
16
+ </InformationHighlight>
17
+ );
18
+ };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
4
+
5
+ export default () => {
6
+ return (
7
+ <InformationHighlight>
8
+ <InformationHighlight.Body>
9
+ Only the body of an information highlight
10
+ </InformationHighlight.Body>
11
+ </InformationHighlight>
12
+ );
13
+ };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import {Flex} from '@workday/canvas-kit-react/layout';
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
4
+ import {system} from '@workday/canvas-tokens-web';
5
+
6
+ export default () => {
7
+ return (
8
+ <Flex flexDirection={'column'} gap={system.space.x2}>
9
+ <InformationHighlight variant={'caution'}>
10
+ <InformationHighlight.Icon />
11
+ <InformationHighlight.Heading> Caution: Highlight Something </InformationHighlight.Heading>
12
+ <InformationHighlight.Body>
13
+ If you select the link below, nothing will happen
14
+ </InformationHighlight.Body>
15
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
16
+ </InformationHighlight>
17
+ <InformationHighlight variant={'caution'} emphasis={'high'}>
18
+ <InformationHighlight.Icon />
19
+ <InformationHighlight.Heading> Caution: Highlight Something </InformationHighlight.Heading>
20
+ <InformationHighlight.Body>
21
+ If you select the link below, nothing will happen
22
+ </InformationHighlight.Body>
23
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
24
+ </InformationHighlight>
25
+ </Flex>
26
+ );
27
+ };
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import {Flex} from '@workday/canvas-kit-react/layout';
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
4
+ import {system} from '@workday/canvas-tokens-web';
5
+
6
+ export default () => {
7
+ return (
8
+ <Flex flexDirection={'column'} gap={system.space.x2}>
9
+ <InformationHighlight variant={'critical'}>
10
+ <InformationHighlight.Icon />
11
+ <InformationHighlight.Heading>
12
+ {' '}
13
+ Attention! Highlight Something{' '}
14
+ </InformationHighlight.Heading>
15
+ <InformationHighlight.Body>
16
+ If you select the link below it will just reroute you back to this page
17
+ </InformationHighlight.Body>
18
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
19
+ </InformationHighlight>
20
+ <InformationHighlight variant={'critical'} emphasis={'high'}>
21
+ <InformationHighlight.Icon />
22
+ <InformationHighlight.Heading>
23
+ {' '}
24
+ Attention! Highlight Something{' '}
25
+ </InformationHighlight.Heading>
26
+ <InformationHighlight.Body>
27
+ If you select the link below it will just reroute you back to this page
28
+ </InformationHighlight.Body>
29
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
30
+ </InformationHighlight>
31
+ </Flex>
32
+ );
33
+ };
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
3
+ import {chartIcon} from '@workday/canvas-system-icons-web';
4
+ import {Flex} from '@workday/canvas-kit-react/layout';
5
+ import {system} from '@workday/canvas-tokens-web';
6
+
7
+ export default () => {
8
+ return (
9
+ <Flex flexDirection={'column'} gap={system.space.x2}>
10
+ <InformationHighlight variant={'critical'} emphasis={'low'}>
11
+ <InformationHighlight.Icon icon={chartIcon} />
12
+ <InformationHighlight.Heading> Attention! Custom Highlight </InformationHighlight.Heading>
13
+ <InformationHighlight.Body>
14
+ A custom Icon can be added to the Information Highlight component
15
+ </InformationHighlight.Body>
16
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
17
+ </InformationHighlight>
18
+ <InformationHighlight variant={'critical'} emphasis={'high'}>
19
+ <InformationHighlight.Icon icon={chartIcon} />
20
+ <InformationHighlight.Heading> Attention! Custom Highlight </InformationHighlight.Heading>
21
+ <InformationHighlight.Body>
22
+ A custom Icon can be added to the Information Highlight component
23
+ </InformationHighlight.Body>
24
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
25
+ </InformationHighlight>
26
+ </Flex>
27
+ );
28
+ };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
4
+
5
+ export default () => {
6
+ return (
7
+ <InformationHighlight>
8
+ <InformationHighlight.Heading> Only Heading </InformationHighlight.Heading>
9
+ </InformationHighlight>
10
+ );
11
+ };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import {Flex} from '@workday/canvas-kit-react/layout';
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
4
+ import {system} from '@workday/canvas-tokens-web';
5
+
6
+ export default () => {
7
+ return (
8
+ <Flex flexDirection={'column'} gap={system.space.x2}>
9
+ <InformationHighlight variant={'informational'}>
10
+ <InformationHighlight.Icon />
11
+ <InformationHighlight.Heading> Informational Highlight </InformationHighlight.Heading>
12
+ <InformationHighlight.Body>
13
+ If you select the link below it will just reroute you back to this page
14
+ </InformationHighlight.Body>
15
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
16
+ </InformationHighlight>
17
+ <InformationHighlight variant={'informational'} emphasis={'high'}>
18
+ <InformationHighlight.Icon />
19
+ <InformationHighlight.Heading> Informational Highlight </InformationHighlight.Heading>
20
+ <InformationHighlight.Body>
21
+ If you select the link below it will just reroute you back to this page
22
+ </InformationHighlight.Body>
23
+ <InformationHighlight.Link href="#hyperlink">View the Docs</InformationHighlight.Link>
24
+ </InformationHighlight>
25
+ </Flex>
26
+ );
27
+ };
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import {Flex} from '@workday/canvas-kit-react/layout';
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
4
+ import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common';
5
+ import {system} from '@workday/canvas-tokens-web';
6
+ export default () => {
7
+ const theme = {
8
+ canvas: {
9
+ direction: ContentDirection.RTL,
10
+ },
11
+ };
12
+ return (
13
+ <Flex flexDirection={'column'} gap={system.space.x2}>
14
+ <CanvasProvider theme={theme}>
15
+ <InformationHighlight variant={'caution'} emphasis={'low'}>
16
+ <InformationHighlight.Icon />
17
+ <InformationHighlight.Heading>
18
+ {' '}
19
+ انتباه! من اليمين إلى اليسار{' '}
20
+ </InformationHighlight.Heading>
21
+ <InformationHighlight.Body>
22
+ نحن ندعم اللغات من اليمين إلى اليسار
23
+ </InformationHighlight.Body>
24
+ <InformationHighlight.Link href="#hyperlink">وثائق</InformationHighlight.Link>
25
+ </InformationHighlight>
26
+ </CanvasProvider>
27
+ <CanvasProvider theme={theme}>
28
+ <InformationHighlight variant={'caution'} emphasis={'high'}>
29
+ <InformationHighlight.Icon />
30
+ <InformationHighlight.Heading>
31
+ {' '}
32
+ انتباه! من اليمين إلى اليسار{' '}
33
+ </InformationHighlight.Heading>
34
+ <InformationHighlight.Body>
35
+ نحن ندعم اللغات من اليمين إلى اليسار
36
+ </InformationHighlight.Body>
37
+ <InformationHighlight.Link href="#hyperlink">وثائق</InformationHighlight.Link>
38
+ </InformationHighlight>
39
+ </CanvasProvider>
40
+ </Flex>
41
+ );
42
+ };
@@ -1,4 +1,5 @@
1
- import {ExampleCodeBlock, InformationHighlight} from '@workday/canvas-kit-docs';import {BorderRadius, Space, Depth, Colors, Type} from './examples/Tokens';
1
+ import {ExampleCodeBlock} from '@workday/canvas-kit-docs';
2
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';import {BorderRadius, Space, Depth, Colors, Type} from './examples/Tokens';
2
3
  import Overview from './examples/Overview';
3
4
 
4
5
 
package/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export {ExampleCodeBlock} from './lib/ExampleCodeBlock';
2
2
  export * from './lib/specs';
3
- export * from './lib/InformationHighlight';
4
3
  export * from './lib/Specifications';
5
4
  export * from './lib/StylePropsTable';
6
5
  export * from './lib/docs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "13.0.0-alpha.978-next.0",
3
+ "version": "13.0.0-alpha.996-next.0",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -44,10 +44,10 @@
44
44
  "dependencies": {
45
45
  "@emotion/styled": "^11.6.0",
46
46
  "@storybook/csf": "0.0.1",
47
- "@workday/canvas-kit-labs-react": "^13.0.0-alpha.978-next.0",
48
- "@workday/canvas-kit-preview-react": "^13.0.0-alpha.978-next.0",
49
- "@workday/canvas-kit-react": "^13.0.0-alpha.978-next.0",
50
- "@workday/canvas-kit-styling": "^13.0.0-alpha.978-next.0",
47
+ "@workday/canvas-kit-labs-react": "^13.0.0-alpha.996-next.0",
48
+ "@workday/canvas-kit-preview-react": "^13.0.0-alpha.996-next.0",
49
+ "@workday/canvas-kit-react": "^13.0.0-alpha.996-next.0",
50
+ "@workday/canvas-kit-styling": "^13.0.0-alpha.996-next.0",
51
51
  "@workday/canvas-system-icons-web": "^3.0.0",
52
52
  "@workday/canvas-tokens-web": "^2.0.1",
53
53
  "markdown-to-jsx": "^7.2.0",
@@ -60,5 +60,5 @@
60
60
  "mkdirp": "^1.0.3",
61
61
  "typescript": "5.0"
62
62
  },
63
- "gitHead": "e9eabae8567dfb68fc849f0d966c67711bef438b"
63
+ "gitHead": "340f917ae60082f246c1ac4201408bf32fa4741f"
64
64
  }
@@ -1,5 +0,0 @@
1
- import { CSProps } from '@workday/canvas-kit-styling';
2
- export interface BaseProps extends CSProps {
3
- }
4
- export declare const Base: import("@workday/canvas-kit-react/common").ElementComponent<"div", BaseProps>;
5
- //# sourceMappingURL=Base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../../../../lib/InformationHighlight/Base.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,EAAe,MAAM,6BAA6B,CAAC;AAElE,MAAM,WAAW,SAAU,SAAQ,OAAO;CAAG;AAE7C,eAAO,MAAM,IAAI,+EAKf,CAAC"}
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import { createComponent } from '@workday/canvas-kit-react/common';
3
- import { handleCsProp } from '@workday/canvas-kit-styling';
4
- export const Base = createComponent('div')({
5
- displayName: 'Base',
6
- Component: (props, ref, Element) => {
7
- return React.createElement(Element, { ref: ref, ...handleCsProp(props) });
8
- },
9
- });
@@ -1,2 +0,0 @@
1
- export declare const Body: import("@workday/canvas-kit-react/common").ElementComponent<"p", unknown>;
2
- //# sourceMappingURL=Body.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../lib/InformationHighlight/Body.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,IAAI,2EAKf,CAAC"}
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
- import { createComponent } from '@workday/canvas-kit-react/common';
3
- import { createStyles } from '@workday/canvas-kit-styling';
4
- import { base, system } from '@workday/canvas-tokens-web';
5
- import { Base } from './Base';
6
- const bodyStyles = createStyles({
7
- ...system.type.subtext.large,
8
- color: base.blackPepper300,
9
- gridColumn: '2',
10
- fontWeight: 400,
11
- margin: 0,
12
- });
13
- export const Body = createComponent('p')({
14
- displayName: 'Body',
15
- Component: (props, ref, Element) => {
16
- return React.createElement(Base, { as: Element, ref: ref, cs: bodyStyles, ...props });
17
- },
18
- });
@@ -1,2 +0,0 @@
1
- export declare const Heading: import("@workday/canvas-kit-react/common").ElementComponent<"div", unknown>;
2
- //# sourceMappingURL=Heading.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../lib/InformationHighlight/Heading.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO,6EAKlB,CAAC"}
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import { createComponent } from '@workday/canvas-kit-react/common';
3
- import { createStyles } from '@workday/canvas-kit-styling';
4
- import { base, system } from '@workday/canvas-tokens-web';
5
- import { Base } from './Base';
6
- const headingStyles = createStyles({
7
- ...system.type.body.small,
8
- color: base.blackPepper400,
9
- gridColumn: '2',
10
- fontWeight: 700, // should use system.fontWeight.bold
11
- });
12
- export const Heading = createComponent('div')({
13
- displayName: 'Heading',
14
- Component: (props, ref, Element) => {
15
- return React.createElement(Base, { as: Element, ref: ref, cs: headingStyles, ...props });
16
- },
17
- });
@@ -1,13 +0,0 @@
1
- import { SystemIconProps } from '@workday/canvas-kit-react/icon';
2
- type Variant = 'emphasis' | 'caution' | 'attention';
3
- export interface IconProps extends SystemIconProps {
4
- variant: Variant;
5
- }
6
- export declare const Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", IconProps, {
7
- state: {
8
- variant: import("./modelHook").Variant;
9
- };
10
- events: {};
11
- }>;
12
- export {};
13
- //# sourceMappingURL=Icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../lib/InformationHighlight/Icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAY3E,KAAK,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC;AA6BpD,MAAM,WAAW,SAAU,SAAQ,eAAe;IAChD,OAAO,EAAE,OAAO,CAAC;CAClB;AAQD,eAAO,MAAM,IAAI;;;;;EAYf,CAAC"}
@@ -1,44 +0,0 @@
1
- import * as React from 'react';
2
- import { SystemIcon } from '@workday/canvas-kit-react/icon';
3
- import { createSubcomponent } from '@workday/canvas-kit-react/common';
4
- import { cssVar } from '@workday/canvas-kit-styling';
5
- import { infoIcon, exclamationCircleIcon, exclamationTriangleIcon, } from '@workday/canvas-system-icons-web';
6
- import { base } from '@workday/canvas-tokens-web';
7
- import { useInformationHighlightModel } from './modelHook';
8
- const iconStyles = {
9
- emphasis: {
10
- accent: cssVar(base.blueberry400),
11
- fill: cssVar(base.blueberry400),
12
- background: 'none',
13
- accentHover: cssVar(base.blueberry400),
14
- fillHover: cssVar(base.blueberry400),
15
- backgroundHover: 'none',
16
- },
17
- caution: {
18
- accent: cssVar(base.blackPepper400),
19
- fill: cssVar(base.blackPepper400),
20
- background: 'none',
21
- accentHover: cssVar(base.blackPepper400),
22
- fillHover: cssVar(base.blackPepper400),
23
- backgroundHover: 'none',
24
- },
25
- attention: {
26
- accent: cssVar(base.cinnamon500),
27
- fill: cssVar(base.cinnamon500),
28
- background: 'none',
29
- accentHover: cssVar(base.cinnamon500),
30
- fillHover: cssVar(base.cinnamon500),
31
- backgroundHover: 'none',
32
- },
33
- };
34
- const defaultIcons = {
35
- emphasis: infoIcon,
36
- caution: exclamationTriangleIcon,
37
- attention: exclamationCircleIcon,
38
- };
39
- export const Icon = createSubcomponent('span')({
40
- displayName: 'Icon',
41
- modelHook: useInformationHighlightModel,
42
- })(({ icon, ...props }, Element, model) => {
43
- return (React.createElement(SystemIcon, { as: Element, icon: icon ? icon : defaultIcons[model.state.variant], ...iconStyles[model.state.variant], ...props }));
44
- });
@@ -1,2 +0,0 @@
1
- export declare const Link: import("@workday/canvas-kit-react/common").ElementComponent<"div", unknown>;
2
- //# sourceMappingURL=Link.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../lib/InformationHighlight/Link.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,IAAI,6EAKf,CAAC"}
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
- import { ExternalHyperlink } from '@workday/canvas-kit-react/button';
3
- import { createComponent } from '@workday/canvas-kit-react/common';
4
- import { createStyles, cssVar } from '@workday/canvas-kit-styling';
5
- import { base, system } from '@workday/canvas-tokens-web';
6
- const linkStyles = createStyles({
7
- ...system.type.subtext.large,
8
- gridColumn: '2',
9
- justifySelf: 'start',
10
- color: `${cssVar(base.blueberry500)} !important`,
11
- fontWeight: 500, // should use system.fontWeight.bold
12
- });
13
- export const Link = createComponent('div')({
14
- displayName: 'Link',
15
- Component: (props, ref, Element) => {
16
- return React.createElement(ExternalHyperlink, { as: Element, ref: ref, className: linkStyles, ...props });
17
- },
18
- });
@@ -1,25 +0,0 @@
1
- import { BaseProps } from './Base';
2
- type Variant = 'emphasis' | 'caution' | 'attention';
3
- interface InformationHighlightProps extends BaseProps {
4
- variant?: Variant;
5
- }
6
- export declare const InformationHighlight: import("@workday/canvas-kit-react/common").ElementComponentM<"section", InformationHighlightProps & Partial<{
7
- variant: import("./modelHook").Variant;
8
- }> & {} & {}, {
9
- state: {
10
- variant: import("./modelHook").Variant;
11
- };
12
- events: {};
13
- }> & {
14
- Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./Icon").IconProps, {
15
- state: {
16
- variant: import("./modelHook").Variant;
17
- };
18
- events: {};
19
- }>;
20
- Heading: import("@workday/canvas-kit-react/common").ElementComponent<"div", unknown>;
21
- Body: import("@workday/canvas-kit-react/common").ElementComponent<"p", unknown>;
22
- Link: import("@workday/canvas-kit-react/common").ElementComponent<"div", unknown>;
23
- };
24
- export {};
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/InformationHighlight/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAOvC,KAAK,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC;AAEpD,UAAU,yBAA0B,SAAQ,SAAS;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA4BD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAiB/B,CAAC"}
@@ -1,44 +0,0 @@
1
- import * as React from 'react';
2
- import { createContainer } from '@workday/canvas-kit-react/common';
3
- import { createModifiers, createStyles, cssVar } from '@workday/canvas-kit-styling';
4
- import { base, system } from '@workday/canvas-tokens-web';
5
- import { Base } from './Base';
6
- import { Heading } from './Heading';
7
- import { Body } from './Body';
8
- import { Icon } from './Icon';
9
- import { Link } from './Link';
10
- import { useInformationHighlightModel } from './modelHook';
11
- const containerStyles = createStyles({
12
- backgroundColor: base.soap100,
13
- display: 'grid',
14
- gridTemplateColumns: 'min-content',
15
- columnGap: system.space.x4,
16
- rowGap: system.space.x2,
17
- padding: system.space.x4,
18
- borderRadius: system.shape.x1,
19
- });
20
- const containerModifiers = createModifiers({
21
- variant: {
22
- emphasis: createStyles({
23
- borderInlineStart: `solid ${cssVar(system.space.x1)} ${cssVar(base.blueberry400)}`,
24
- }),
25
- caution: createStyles({
26
- borderInlineStart: `solid ${cssVar(system.space.x1)} ${cssVar(base.cantaloupe400)}`,
27
- }),
28
- attention: createStyles({
29
- borderInlineStart: `solid ${cssVar(system.space.x1)} ${cssVar(base.cinnamon500)}`,
30
- }),
31
- },
32
- });
33
- export const InformationHighlight = createContainer('section')({
34
- displayName: 'InformationHighlight',
35
- modelHook: useInformationHighlightModel,
36
- subComponents: {
37
- Icon: Icon,
38
- Heading: Heading,
39
- Body: Body,
40
- Link: Link,
41
- },
42
- })((props, Element, model) => {
43
- return (React.createElement(Base, { as: Element, cs: [containerStyles, containerModifiers({ variant: model.state.variant })], ...props }));
44
- });
@@ -1,19 +0,0 @@
1
- export type Variant = 'emphasis' | 'caution' | 'attention';
2
- export declare const useInformationHighlightModel: (<TT_Special_Generic>(config?: (Partial<{
3
- variant: Variant;
4
- }> & {} & {}) | undefined) => {
5
- state: {
6
- variant: Variant;
7
- };
8
- events: {};
9
- }) & import("@workday/canvas-kit-react/common").ModelExtras<{
10
- variant: Variant;
11
- }, {}, {
12
- variant: Variant;
13
- }, {}, {
14
- state: {
15
- variant: Variant;
16
- };
17
- events: {};
18
- }>;
19
- //# sourceMappingURL=modelHook.d.ts.map