@workday/canvas-kit-docs 10.3.21 → 10.3.23
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 +1 -1
- package/dist/es6/lib/specs.js +26 -0
- package/package.json +6 -6
package/dist/es6/lib/docs.js
CHANGED
|
@@ -113027,7 +113027,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
113027
113027
|
{
|
|
113028
113028
|
"name": "useThemedRing",
|
|
113029
113029
|
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/theming/useThemedRing.ts",
|
|
113030
|
-
"description": "This is a way to automatically add themed colors to your input and is helpful when showing alerts, success or errors to users.\nIt supports `error`, `alert`, and `success` states. It will try and use the corresponding\n`main` colors from your `CanvasThemePalette` unless they do not meet accessibility contrast, in\nwhich case the outer ring will use the `darkest` color. This hook will also show a `focusOutline`\nring when the input is focused. Note: You should not rely on these colors alone to differentiate\nalerts, but use them in combination with icons or hint text.\n```tsx\n// Add here jsx pragma to use css\nimport {jsx} from '@emotion/
|
|
113030
|
+
"description": "This is a way to automatically add themed colors to your input and is helpful when showing alerts, success or errors to users.\nIt supports `error`, `alert`, and `success` states. It will try and use the corresponding\n`main` colors from your `CanvasThemePalette` unless they do not meet accessibility contrast, in\nwhich case the outer ring will use the `darkest` color. This hook will also show a `focusOutline`\nring when the input is focused. Note: You should not rely on these colors alone to differentiate\nalerts, but use them in combination with icons or hint text.\n```tsx\n// Add here jsx pragma to use css\nimport {jsx} from '@emotion/react';\nimport React from 'react';\nimport {TextInput} from '@workday/canvas-kit-preview-react/text-input';\nimport {useThemedRing} from '@workday/canvas-kit-react/common';\n\nexport const MyInput = ({handleChange}) => {\n const [value, setValue] = React.useState('invalid@email');\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setValue(event.target.value);\n };\n\n const alertStyles = useThemedRing('alert');\n\n return (\n <TextInput>\n <TextInput.Label>Email</TextInput.Label>\n <TextInput.Field css={alertStyles} onChange={handleChange} value={value} />\n <TextInput.Hint>Please enter a valid email.</TextInput.Hint>\n </TextInput>\n );\n};\n```",
|
|
113031
113031
|
"declarations": [
|
|
113032
113032
|
{
|
|
113033
113033
|
"name": "useThemedRing",
|
package/dist/es6/lib/specs.js
CHANGED
|
@@ -3687,6 +3687,32 @@ module.exports = {specifications: [
|
|
|
3687
3687
|
}
|
|
3688
3688
|
]
|
|
3689
3689
|
},
|
|
3690
|
+
{
|
|
3691
|
+
"type": "describe",
|
|
3692
|
+
"name": "given the [Testing/Popups/Popup, ComboboxWithinPopup] example is rendered",
|
|
3693
|
+
"children": [
|
|
3694
|
+
{
|
|
3695
|
+
"type": "describe",
|
|
3696
|
+
"name": "when the button is clicked",
|
|
3697
|
+
"children": [
|
|
3698
|
+
{
|
|
3699
|
+
"type": "it",
|
|
3700
|
+
"name": "should show the popup"
|
|
3701
|
+
},
|
|
3702
|
+
{
|
|
3703
|
+
"type": "describe",
|
|
3704
|
+
"name": "when is open and the first item is clicked",
|
|
3705
|
+
"children": [
|
|
3706
|
+
{
|
|
3707
|
+
"type": "it",
|
|
3708
|
+
"name": "should not close the popup on select"
|
|
3709
|
+
}
|
|
3710
|
+
]
|
|
3711
|
+
}
|
|
3712
|
+
]
|
|
3713
|
+
}
|
|
3714
|
+
]
|
|
3715
|
+
},
|
|
3690
3716
|
{
|
|
3691
3717
|
"type": "describe",
|
|
3692
3718
|
"name": "given the [Testing/Popups/Popup, PopupWithFallbackPlacements] example is rendered",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.23",
|
|
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": "^10.3.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^10.3.
|
|
49
|
-
"@workday/canvas-kit-react": "^10.3.
|
|
50
|
-
"@workday/canvas-kit-styling": "^10.3.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^10.3.23",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^10.3.23",
|
|
49
|
+
"@workday/canvas-kit-react": "^10.3.23",
|
|
50
|
+
"@workday/canvas-kit-styling": "^10.3.23",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^1.0.0",
|
|
53
53
|
"markdown-to-jsx": "^6.10.3",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"mkdirp": "^1.0.3",
|
|
60
60
|
"typescript": "4.2"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "5823b42e11dd2e917405f494b1899df97e615cb5"
|
|
63
63
|
}
|