@workday/canvas-kit-docs 11.0.0-alpha.721-next.0 → 11.0.0-alpha.726-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.
@@ -114006,7 +114006,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
114006
114006
  {
114007
114007
  "name": "useThemedRing",
114008
114008
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/theming/useThemedRing.ts",
114009
- "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/core';\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```",
114009
+ "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```",
114010
114010
  "declarations": [
114011
114011
  {
114012
114012
  "name": "useThemedRing",
@@ -253056,6 +253056,23 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
253056
253056
  }
253057
253057
  }
253058
253058
  },
253059
+ {
253060
+ "name": "handleInjectGlobal",
253061
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/utils/handleInjectGlobal.ts",
253062
+ "description": "",
253063
+ "declarations": [
253064
+ {
253065
+ "name": "handleInjectGlobal",
253066
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/utils/handleInjectGlobal.ts"
253067
+ }
253068
+ ],
253069
+ "tags": {},
253070
+ "type": {
253071
+ "kind": "symbol",
253072
+ "name": "NodeTransformer",
253073
+ "value": "NodeTransformer"
253074
+ }
253075
+ },
253059
253076
  {
253060
253077
  "name": "handleKeyframes",
253061
253078
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling-transform/lib/utils/handleKeyframes.ts",
@@ -257485,10 +257502,70 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
257485
257502
  }
257486
257503
  }
257487
257504
  },
257505
+ {
257506
+ "name": "getInstance",
257507
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts",
257508
+ "description": "Gets the current Emotion CSS instance, falling back to the one from `@emotion/css` if one wasn't\nalready created. This allows a custom cache to be created as an opt-in",
257509
+ "declarations": [
257510
+ {
257511
+ "name": "getInstance",
257512
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts"
257513
+ }
257514
+ ],
257515
+ "tags": {},
257516
+ "type": {
257517
+ "kind": "function",
257518
+ "parameters": [],
257519
+ "members": [],
257520
+ "returnType": {
257521
+ "kind": "symbol",
257522
+ "name": "_createInstance"
257523
+ }
257524
+ }
257525
+ },
257526
+ {
257527
+ "name": "createInstance",
257528
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts",
257529
+ "description": "Creates a custom instance of Emotion CSS. If this function is never called, the instance will be\nwhat gets imported from `@emotion/css`. This function must be called before any Canvas Kit\ncomponent is imported or before any other `@workday/canvas-kit-styling` function is called. All\nthe style utility functions need an instance and will automatically create one if one isn't\nalready created.\n\nThe style utilities inject styles as soon as they are called which means an instance needs to be\ncreated before any Canvas Kit components are even imported. Your application bootstrap must\nimport a file that imports `@workday/canvas-kit-styling` and calls `createInstance` _before_ any\nother Canvas Kit components are imported.",
257530
+ "declarations": [
257531
+ {
257532
+ "name": "createInstance",
257533
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts"
257534
+ }
257535
+ ],
257536
+ "tags": {},
257537
+ "type": {
257538
+ "kind": "symbol",
257539
+ "name": "_createInstance",
257540
+ "value": "(options?: Options | undefined) => Emotion"
257541
+ }
257542
+ },
257543
+ {
257544
+ "name": "getCache",
257545
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts",
257546
+ "description": "Returns the cache used by all style utilities",
257547
+ "declarations": [
257548
+ {
257549
+ "name": "getCache",
257550
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts"
257551
+ }
257552
+ ],
257553
+ "tags": {},
257554
+ "type": {
257555
+ "kind": "function",
257556
+ "parameters": [],
257557
+ "members": [],
257558
+ "returnType": {
257559
+ "kind": "symbol",
257560
+ "name": "EmotionCache",
257561
+ "value": "EmotionCache"
257562
+ }
257563
+ }
257564
+ },
257488
257565
  {
257489
257566
  "name": "keyframes",
257490
257567
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts",
257491
- "description": "",
257568
+ "description": "Create static keyframes. Use as a drop-in replacement to `keyframes` found in `@emotion/css` or\n`@emotion/react`",
257492
257569
  "declarations": [
257493
257570
  {
257494
257571
  "name": "keyframes",
@@ -257592,6 +257669,23 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
257592
257669
  }
257593
257670
  }
257594
257671
  },
257672
+ {
257673
+ "name": "injectGlobal",
257674
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts",
257675
+ "description": "Allows injecting of global styles.",
257676
+ "declarations": [
257677
+ {
257678
+ "name": "injectGlobal",
257679
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/cs.ts"
257680
+ }
257681
+ ],
257682
+ "tags": {},
257683
+ "type": {
257684
+ "kind": "symbol",
257685
+ "name": "EmotionCSS.injectGlobal",
257686
+ "value": "{ (template: TemplateStringsArray, ...args: CSSInterpolation[]): void; (...args: CSSInterpolation[]): void; }"
257687
+ }
257688
+ },
257595
257689
  {
257596
257690
  "name": "px2rem",
257597
257691
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/lib/px2rem.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "11.0.0-alpha.721-next.0",
3
+ "version": "11.0.0-alpha.726-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": "^11.0.0-alpha.721-next.0",
48
- "@workday/canvas-kit-preview-react": "^11.0.0-alpha.721-next.0",
49
- "@workday/canvas-kit-react": "^11.0.0-alpha.721-next.0",
50
- "@workday/canvas-kit-styling": "^11.0.0-alpha.721-next.0",
47
+ "@workday/canvas-kit-labs-react": "^11.0.0-alpha.726-next.0",
48
+ "@workday/canvas-kit-preview-react": "^11.0.0-alpha.726-next.0",
49
+ "@workday/canvas-kit-react": "^11.0.0-alpha.726-next.0",
50
+ "@workday/canvas-kit-styling": "^11.0.0-alpha.726-next.0",
51
51
  "@workday/canvas-system-icons-web": "^3.0.0",
52
52
  "@workday/canvas-tokens-web": "^1.0.2",
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": "e7fad00a4763b2f506fc08d6c419b4b251c7d925"
62
+ "gitHead": "92313a01b7703822a67e7c7f7aff5460237f8ce7"
63
63
  }