@workday/canvas-kit-docs 11.1.6 → 11.1.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../lib/Value.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAQ5C,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,EACrD,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EACd,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAC9B,IAAI,CAGN;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,KAAK;IAChE,KAAK,EAAE,CAAC,CAAC;IACT,GAAG,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,eAAO,MAAM,KAAK;UAAqB,MAAM;qDAW5C,CAAC;AAEF,eAAO,MAAM,gBAAgB;gBAA+B,MAAM,cAAc,EAAE;iBA+CjF,CAAC;AAgEF,eAAO,MAAM,eAAe;gBAKd,MAAM,cAAc,EAAE;;;iBAyBnC,CAAC"}
1
+ {"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../lib/Value.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAS5C,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,EACrD,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EACd,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAC9B,IAAI,CAGN;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,KAAK;IAChE,KAAK,EAAE,CAAC,CAAC;IACT,GAAG,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,eAAO,MAAM,KAAK;UAAqB,MAAM;qDAW5C,CAAC;AAEF,eAAO,MAAM,gBAAgB;gBAA+B,MAAM,cAAc,EAAE;iBAgDjF,CAAC;AAgEF,eAAO,MAAM,eAAe;gBAKd,MAAM,cAAc,EAAE;;;iBAyBnC,CAAC"}
@@ -5,6 +5,7 @@ import { MdxJSToJSX } from './MDXElements';
5
5
  import { Table } from './Table';
6
6
  import { capitalize, IndentLevelContext, RenderContext, indent } from './widgetUtils';
7
7
  import { DescriptionTooltip } from './DescriptionTooltip';
8
+ import { colors } from '@workday/canvas-kit-react/tokens';
8
9
  const widgets = {};
9
10
  export function registerWidget(key, widget) {
10
11
  widget.displayName = `${capitalize(key)}Widget`;
@@ -30,11 +31,12 @@ export const PropertiesInline = ({ properties }) => {
30
31
  return (React.createElement(React.Fragment, { key: index },
31
32
  React.createElement("br", null),
32
33
  indent(level + 1),
33
- p.description ? (React.createElement(DescriptionTooltip, { type: "describe", style: { maxWidth: '50em' }, title: React.createElement(MdxJSToJSX, null, p.description) },
34
+ p.description || p.tags.deprecated ? (React.createElement(DescriptionTooltip, { type: "describe", style: { maxWidth: '50em' }, title: React.createElement(MdxJSToJSX, null, p.description || p.tags.deprecated) },
34
35
  React.createElement("span", { className: "token property", style: {
35
36
  cursor: 'pointer',
36
- textDecoration: 'underline',
37
+ textDecoration: p.tags.deprecated ? 'line-through' : 'underline',
37
38
  textDecorationStyle: 'dotted',
39
+ color: p.tags.deprecated ? colors.cinnamon600 : colors.plum600,
38
40
  } }, p.name))) : (React.createElement("span", { className: "token property" }, p.name)),
39
41
  React.createElement("span", { className: "token punctuation" }, ":"),
40
42
  "\u00A0",
@@ -5248,11 +5248,24 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
5248
5248
  "name": "colorSet",
5249
5249
  "required": false,
5250
5250
  "type": {
5251
- "kind": "array",
5252
- "value": {
5253
- "kind": "primitive",
5254
- "value": "string"
5255
- }
5251
+ "kind": "union",
5252
+ "value": [
5253
+ {
5254
+ "kind": "array",
5255
+ "value": {
5256
+ "kind": "primitive",
5257
+ "value": "string"
5258
+ }
5259
+ },
5260
+ {
5261
+ "kind": "array",
5262
+ "value": {
5263
+ "kind": "symbol",
5264
+ "name": "SwatchBookColorObject",
5265
+ "value": "SwatchBookColorObject"
5266
+ }
5267
+ }
5268
+ ]
5256
5269
  },
5257
5270
  "description": "The array of colors to be rendered in the swatchbook.",
5258
5271
  "declarations": [
@@ -5566,6 +5579,57 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
5566
5579
  ]
5567
5580
  }
5568
5581
  },
5582
+ {
5583
+ "name": "SwatchBookColorObject",
5584
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/color-picker/lib/parts/SwatchBook.tsx",
5585
+ "description": "",
5586
+ "declarations": [
5587
+ {
5588
+ "name": "SwatchBookColorObject",
5589
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/color-picker/lib/parts/SwatchBook.tsx"
5590
+ }
5591
+ ],
5592
+ "tags": {},
5593
+ "type": {
5594
+ "kind": "object",
5595
+ "properties": [
5596
+ {
5597
+ "kind": "property",
5598
+ "name": "value",
5599
+ "required": true,
5600
+ "type": {
5601
+ "kind": "primitive",
5602
+ "value": "string"
5603
+ },
5604
+ "description": "",
5605
+ "declarations": [
5606
+ {
5607
+ "name": "value",
5608
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/color-picker/lib/parts/SwatchBook.tsx"
5609
+ }
5610
+ ],
5611
+ "tags": {}
5612
+ },
5613
+ {
5614
+ "kind": "property",
5615
+ "name": "label",
5616
+ "required": true,
5617
+ "type": {
5618
+ "kind": "primitive",
5619
+ "value": "string"
5620
+ },
5621
+ "description": "",
5622
+ "declarations": [
5623
+ {
5624
+ "name": "label",
5625
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/color-picker/lib/parts/SwatchBook.tsx"
5626
+ }
5627
+ ],
5628
+ "tags": {}
5629
+ }
5630
+ ]
5631
+ }
5632
+ },
5569
5633
  {
5570
5634
  "name": "SwatchBookProps",
5571
5635
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/color-picker/lib/parts/SwatchBook.tsx",
@@ -5603,8 +5667,21 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
5603
5667
  "type": {
5604
5668
  "kind": "array",
5605
5669
  "value": {
5606
- "kind": "primitive",
5607
- "value": "string"
5670
+ "kind": "parenthesis",
5671
+ "value": {
5672
+ "kind": "union",
5673
+ "value": [
5674
+ {
5675
+ "kind": "primitive",
5676
+ "value": "string"
5677
+ },
5678
+ {
5679
+ "kind": "symbol",
5680
+ "name": "SwatchBookColorObject",
5681
+ "value": "SwatchBookColorObject"
5682
+ }
5683
+ ]
5684
+ }
5608
5685
  }
5609
5686
  },
5610
5687
  "description": "",
@@ -61923,6 +62000,42 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
61923
62000
  "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/button/lib/types.ts"
61924
62001
  }
61925
62002
  ],
62003
+ "tags": {
62004
+ "deprecated": "This option is no longer supported at run time and will be removed from the type interface in a v12. If you want to customize the focus ring, use `boxShadowInner` and `boxShadowOuter` to update the inner and outer colors of the focus ring. Use with caution."
62005
+ }
62006
+ },
62007
+ {
62008
+ "kind": "property",
62009
+ "name": "boxShadowInner",
62010
+ "required": false,
62011
+ "type": {
62012
+ "kind": "primitive",
62013
+ "value": "string"
62014
+ },
62015
+ "description": "Updates the color of the inner `box-shadow` within a focus ring.",
62016
+ "declarations": [
62017
+ {
62018
+ "name": "boxShadowInner",
62019
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/button/lib/types.ts"
62020
+ }
62021
+ ],
62022
+ "tags": {}
62023
+ },
62024
+ {
62025
+ "kind": "property",
62026
+ "name": "boxShadowOuter",
62027
+ "required": false,
62028
+ "type": {
62029
+ "kind": "primitive",
62030
+ "value": "string"
62031
+ },
62032
+ "description": "Updates the color of the outer `box-shadow` within a focus ring.",
62033
+ "declarations": [
62034
+ {
62035
+ "name": "boxShadowOuter",
62036
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/button/lib/types.ts"
62037
+ }
62038
+ ],
61926
62039
  "tags": {}
61927
62040
  }
61928
62041
  ]
@@ -15,6 +15,11 @@ const myButtonStencil = createStencil({
15
15
  [systemIconStencil.vars.color]: system.color.static.green.strong,
16
16
  [buttonStencil.vars.borderRadius]: system.shape.half,
17
17
  border: `${px2rem(3)} solid transparent`,
18
+ '&:focus-visible': {
19
+ [buttonStencil.vars.background]: system.color.static.green.strong,
20
+ [buttonStencil.vars.boxShadowInner]: system.color.static.green.soft,
21
+ [buttonStencil.vars.boxShadowOuter]: system.color.static.green.strong,
22
+ },
18
23
  '&:hover': {
19
24
  [buttonStencil.vars.background]: system.color.static.green.default,
20
25
  border: `${px2rem(3)} dotted ${system.color.static.green.strong}`,
@@ -29,8 +34,8 @@ const myButtonStencil = createStencil({
29
34
  });
30
35
 
31
36
  const MyCustomButton = createComponent('button')({
32
- Component: ({children, size, ...elemProps}: PrimaryButtonProps, ref, Element) => (
33
- <PrimaryButton ref={ref} {...handleCsProp(elemProps, myButtonStencil({size}))}>
37
+ Component: ({children, ...elemProps}: PrimaryButtonProps, ref, Element) => (
38
+ <PrimaryButton as={Element} ref={ref} {...handleCsProp(elemProps, myButtonStencil())}>
34
39
  {children}
35
40
  </PrimaryButton>
36
41
  ),
@@ -43,14 +48,23 @@ const myCustomStyles = createStyles({
43
48
 
44
49
  const customColors = {
45
50
  default: {
46
- background: system.color.static.green.soft,
47
- icon: system.color.static.green.strong,
48
- label: system.color.static.green.strong,
51
+ background: system.color.static.orange.soft,
52
+ icon: system.color.static.orange.strong,
53
+ label: system.color.static.orange.strong,
49
54
  },
50
55
  hover: {
51
- background: system.color.static.green.default,
52
- icon: system.color.static.green.strong,
56
+ background: system.color.static.orange.default,
57
+ icon: system.color.static.orange.strong,
58
+ },
59
+ active: {
60
+ background: system.color.static.orange.strong,
61
+ },
62
+ focus: {
63
+ background: system.color.static.orange.strong,
64
+ boxShadowInner: system.color.static.orange.soft,
65
+ boxShadowOuter: system.color.static.orange.strong,
53
66
  },
67
+ disabled: {},
54
68
  };
55
69
 
56
70
  export default () => (
package/lib/Value.tsx CHANGED
@@ -8,6 +8,7 @@ import {MdxJSToJSX} from './MDXElements';
8
8
  import {Table} from './Table';
9
9
  import {capitalize, IndentLevelContext, RenderContext, indent} from './widgetUtils';
10
10
  import {DescriptionTooltip} from './DescriptionTooltip';
11
+ import {colors} from '@workday/canvas-kit-react/tokens';
11
12
 
12
13
  const widgets: Record<string, React.FC<ValueProps>> = {};
13
14
 
@@ -52,18 +53,19 @@ export const PropertiesInline = ({properties}: {properties: types.ObjectProperty
52
53
  <React.Fragment key={index}>
53
54
  <br />
54
55
  {indent(level + 1)}
55
- {p.description ? (
56
+ {p.description || p.tags.deprecated ? (
56
57
  <DescriptionTooltip
57
58
  type="describe"
58
59
  style={{maxWidth: '50em'}}
59
- title={<MdxJSToJSX>{p.description}</MdxJSToJSX>}
60
+ title={<MdxJSToJSX>{p.description || p.tags.deprecated}</MdxJSToJSX>}
60
61
  >
61
62
  <span
62
63
  className="token property"
63
64
  style={{
64
65
  cursor: 'pointer',
65
- textDecoration: 'underline',
66
+ textDecoration: p.tags.deprecated ? 'line-through' : 'underline',
66
67
  textDecorationStyle: 'dotted',
68
+ color: p.tags.deprecated ? colors.cinnamon600 : colors.plum600,
67
69
  }}
68
70
  >
69
71
  {p.name}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "11.1.6",
3
+ "version": "11.1.8",
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": "^11.1.6",
48
- "@workday/canvas-kit-preview-react": "^11.1.6",
49
- "@workday/canvas-kit-react": "^11.1.6",
50
- "@workday/canvas-kit-styling": "^11.1.6",
47
+ "@workday/canvas-kit-labs-react": "^11.1.8",
48
+ "@workday/canvas-kit-preview-react": "^11.1.8",
49
+ "@workday/canvas-kit-react": "^11.1.8",
50
+ "@workday/canvas-kit-styling": "^11.1.8",
51
51
  "@workday/canvas-system-icons-web": "^3.0.0",
52
52
  "@workday/canvas-tokens-web": "^2.0.0",
53
53
  "markdown-to-jsx": "^7.2.0",
@@ -59,5 +59,5 @@
59
59
  "mkdirp": "^1.0.3",
60
60
  "typescript": "4.2"
61
61
  },
62
- "gitHead": "631d1ec692f362e0dfac142a038fed1fb6a97fb6"
62
+ "gitHead": "6a3bca7c56f654e282109430f4918d5bc89f2d21"
63
63
  }