@workday/canvas-kit-docs 9.1.8 → 9.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es6/lib/docs.js
CHANGED
|
@@ -6427,8 +6427,17 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
6427
6427
|
"name": "aria-describedby",
|
|
6428
6428
|
"required": true,
|
|
6429
6429
|
"type": {
|
|
6430
|
-
"kind": "
|
|
6431
|
-
"value":
|
|
6430
|
+
"kind": "union",
|
|
6431
|
+
"value": [
|
|
6432
|
+
{
|
|
6433
|
+
"kind": "primitive",
|
|
6434
|
+
"value": "string"
|
|
6435
|
+
},
|
|
6436
|
+
{
|
|
6437
|
+
"kind": "primitive",
|
|
6438
|
+
"value": "undefined"
|
|
6439
|
+
}
|
|
6440
|
+
]
|
|
6432
6441
|
},
|
|
6433
6442
|
"description": "",
|
|
6434
6443
|
"tags": {},
|
|
@@ -6439,8 +6448,17 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
6439
6448
|
"name": "id",
|
|
6440
6449
|
"required": true,
|
|
6441
6450
|
"type": {
|
|
6442
|
-
"kind": "
|
|
6443
|
-
"value":
|
|
6451
|
+
"kind": "union",
|
|
6452
|
+
"value": [
|
|
6453
|
+
{
|
|
6454
|
+
"kind": "primitive",
|
|
6455
|
+
"value": "string"
|
|
6456
|
+
},
|
|
6457
|
+
{
|
|
6458
|
+
"kind": "primitive",
|
|
6459
|
+
"value": "undefined"
|
|
6460
|
+
}
|
|
6461
|
+
]
|
|
6444
6462
|
},
|
|
6445
6463
|
"description": "",
|
|
6446
6464
|
"tags": {},
|
|
@@ -110482,7 +110500,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
110482
110500
|
{
|
|
110483
110501
|
"name": "pickForegroundColor",
|
|
110484
110502
|
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/utils/colorUtils.ts",
|
|
110485
|
-
"description": "Chooses foreground color with
|
|
110503
|
+
"description": "Chooses foreground color with accessible contrast against background. If contrast ratio\nis greater than 4.5:1, chooses provided light or dark color (favoring light color). If neither\nhave a high enough contrast ratio, picks the first color of the following that meets 4.5:1 or higher:\n[frenchVanilla100, blackPepper300, blackPepper400, blackPepper500, blackPepper600]\n(https://www.w3.org/TR/WCAG20-TECHS/G18.html)",
|
|
110486
110504
|
"declarations": [
|
|
110487
110505
|
{
|
|
110488
110506
|
"name": "pickForegroundColor",
|
|
@@ -10,6 +10,8 @@ import LabelPositionVertical from './examples/LabelPositionVertical';
|
|
|
10
10
|
import Placeholder from './examples/Placeholder';
|
|
11
11
|
import RefForwarding from './examples/RefForwarding';
|
|
12
12
|
import Required from './examples/Required';
|
|
13
|
+
import Hidden from './examples/Hidden';
|
|
14
|
+
import ReadOnly from './examples/ReadOnly';
|
|
13
15
|
import Password from './examples/Password';
|
|
14
16
|
import HiddenLabel from './examples/HiddenLabel';
|
|
15
17
|
import ThemedAlert from './examples/ThemedAlert';
|
|
@@ -56,6 +58,21 @@ that the field is required. This will also add a red asterisk to `TextInput.Labe
|
|
|
56
58
|
|
|
57
59
|
<ExampleCodeBlock code={Required} />
|
|
58
60
|
|
|
61
|
+
### ReadOnly
|
|
62
|
+
|
|
63
|
+
Use `TextInput.Field`'s `readOnly` prop to indicate that the field can not be changed. We reccommend
|
|
64
|
+
setting the background and border color to tranparent and the cursor to default to help inform users
|
|
65
|
+
of the immutiblity.
|
|
66
|
+
|
|
67
|
+
<ExampleCodeBlock code={ReadOnly} />
|
|
68
|
+
|
|
69
|
+
### Hidden
|
|
70
|
+
|
|
71
|
+
Set `TextInput.Field`'s `type` prop to
|
|
72
|
+
`hidden` to completly hide a field while still submitting its value, often used for things like security tokens. Note: You will likely need to manually set`aria-describedby={undefined}`and`id={undefined}`
|
|
73
|
+
|
|
74
|
+
<ExampleCodeBlock code={Hidden} />
|
|
75
|
+
|
|
59
76
|
### Ref Forwarding
|
|
60
77
|
|
|
61
78
|
All the TextInput subcomponents support
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {TextInput} from '@workday/canvas-kit-preview-react/text-input';
|
|
3
|
+
|
|
4
|
+
export default () => {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<h2>Inspect Element to see the markup</h2>
|
|
8
|
+
<TextInput.Field value={'Secret'} type="hidden" />
|
|
9
|
+
</>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {TextInput} from '@workday/canvas-kit-preview-react/text-input';
|
|
3
|
+
|
|
4
|
+
export default () => {
|
|
5
|
+
return (
|
|
6
|
+
<TextInput orientation="vertical">
|
|
7
|
+
<TextInput.Label>Unwavering Opinion</TextInput.Label>
|
|
8
|
+
<TextInput.Field
|
|
9
|
+
value={'CKR is great'}
|
|
10
|
+
readOnly={true}
|
|
11
|
+
borderColor="transparent"
|
|
12
|
+
background="transparent"
|
|
13
|
+
cursor="default"
|
|
14
|
+
/>
|
|
15
|
+
</TextInput>
|
|
16
|
+
);
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.11",
|
|
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,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@storybook/csf": "0.0.1",
|
|
47
|
-
"@workday/canvas-kit-labs-react": "^9.1.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^9.1.
|
|
49
|
-
"@workday/canvas-kit-react": "^9.1.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^9.1.11",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^9.1.11",
|
|
49
|
+
"@workday/canvas-kit-react": "^9.1.11",
|
|
50
50
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
51
51
|
"markdown-to-jsx": "^6.10.3",
|
|
52
52
|
"ts-node": "^10.9.1"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"mkdirp": "^1.0.3",
|
|
58
58
|
"typescript": "4.2"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "59071fde7d7166dd786144435c1263551ed88e1f"
|
|
61
61
|
}
|