@workday/canvas-kit-docs 9.1.8 → 9.1.9

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.
@@ -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": "primitive",
6431
- "value": "string"
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": "primitive",
6443
- "value": "string"
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": {},
@@ -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.8",
3
+ "version": "9.1.9",
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.8",
48
- "@workday/canvas-kit-preview-react": "^9.1.8",
49
- "@workday/canvas-kit-react": "^9.1.8",
47
+ "@workday/canvas-kit-labs-react": "^9.1.9",
48
+ "@workday/canvas-kit-preview-react": "^9.1.9",
49
+ "@workday/canvas-kit-react": "^9.1.9",
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": "c12505777b772a702fc76b668cea0bd0b70b0a96"
60
+ "gitHead": "f610f6c7b52360efa6252ce5d16f6a732b1e5722"
61
61
  }