@workday/canvas-kit-docs 14.3.9 → 14.3.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/ExampleCodeBlock.d.ts.map +1 -1
- package/dist/es6/lib/ExampleCodeBlock.js +12 -3
- package/dist/es6/lib/docs.js +15500 -5241
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +5 -5
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +5 -5
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePopupNoPortal.d.ts +2 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePopupNoPortal.d.ts.map +1 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePopupNoPortal.js +62 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePortalPopup.d.ts +7 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePortalPopup.d.ts.map +1 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePortalPopup.js +63 -0
- package/dist/es6/mdx/accessibility/examples/Popups/PopupAriaOwns.d.ts +7 -0
- package/dist/es6/mdx/accessibility/examples/Popups/PopupAriaOwns.d.ts.map +1 -0
- package/dist/es6/mdx/accessibility/examples/Popups/PopupAriaOwns.js +46 -0
- package/dist/mdx/accessibility/InlinePortals.mdx +20 -0
- package/dist/mdx/accessibility/Popups.mdx +71 -0
- package/dist/mdx/react/dialog/Dialog.mdx +51 -20
- package/dist/mdx/react/modal/Modal.mdx +87 -9
- package/dist/mdx/react/modal/examples/FormModal.tsx +26 -1
- package/dist/mdx/react/modal/examples/ReturnFocus.tsx +137 -39
- package/dist/mdx/react/popup/Popup.mdx +55 -28
- package/dist/mdx/react/popup/examples/Basic.tsx +20 -3
- package/dist/mdx/react/popup/examples/FocusRedirect.tsx +24 -9
- package/dist/mdx/react/popup/examples/InitialFocus.tsx +113 -9
- package/dist/mdx/react/popup/examples/InlinePopup.tsx +125 -0
- package/dist/mdx/react/popup/examples/MultiplePopups.tsx +34 -22
- package/lib/ExampleCodeBlock.tsx +12 -3
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleCodeBlock.d.ts","sourceRoot":"","sources":["../../../lib/ExampleCodeBlock.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleCodeBlock.d.ts","sourceRoot":"","sources":["../../../lib/ExampleCodeBlock.tsx"],"names":[],"mappings":"AA6EA,eAAO,MAAM,gBAAgB,aAAY,GAAG,4CAoH3C,CAAC"}
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
4
4
|
import { TertiaryButton } from '@workday/canvas-kit-react/button';
|
|
5
5
|
import { Card } from '@workday/canvas-kit-react/card';
|
|
6
|
-
import {
|
|
6
|
+
import { createStencil, cssVar } from '@workday/canvas-kit-styling';
|
|
7
7
|
import { system } from '@workday/canvas-tokens-web';
|
|
8
8
|
import { vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism';
|
|
9
9
|
import { checkCircleIcon, copyIcon } from '@workday/canvas-system-icons-web';
|
|
@@ -21,14 +21,20 @@ import viteEnvFile from '!!raw-loader!./stackblitzFiles/vite-env.d.ts';
|
|
|
21
21
|
import { CanvasProvider, defaultBranding } from '@workday/canvas-kit-react/common';
|
|
22
22
|
const cardStencil = createStencil({
|
|
23
23
|
base: {
|
|
24
|
+
// Lets the block shrink inside flex/grid doc layouts so content width does not force overflow.
|
|
25
|
+
minWidth: 0,
|
|
26
|
+
maxWidth: '100%',
|
|
24
27
|
'[data-part="example-block"]': {
|
|
25
28
|
boxShadow: system.depth[1],
|
|
26
29
|
borderRadius: system.shape.x1,
|
|
27
30
|
position: 'relative',
|
|
31
|
+
minWidth: 0,
|
|
28
32
|
overflow: 'auto', // This allows for the entire ExampleCodeBlock to scroll on smaller viewports
|
|
29
33
|
},
|
|
30
34
|
'[data-part="example-block-container"]': {
|
|
35
|
+
minWidth: 0,
|
|
31
36
|
overflow: 'auto',
|
|
37
|
+
padding: system.space.x1,
|
|
32
38
|
},
|
|
33
39
|
'[data-part="code-block"]': {
|
|
34
40
|
display: 'none',
|
|
@@ -37,8 +43,9 @@ const cardStencil = createStencil({
|
|
|
37
43
|
},
|
|
38
44
|
'[data-part="code-toggle-stackblitz-btn-container"]': {
|
|
39
45
|
position: 'absolute',
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
// Keep inside the padding box; negative inset was expanding scroll overflow by ~1px.
|
|
47
|
+
right: system.space.zero,
|
|
48
|
+
bottom: system.space.zero,
|
|
42
49
|
display: 'flex',
|
|
43
50
|
gap: system.space.x2,
|
|
44
51
|
},
|
|
@@ -119,5 +126,7 @@ export const ExampleCodeBlock = ({ code }) => {
|
|
|
119
126
|
lineHeight: cssVar(system.lineHeight.subtext.large),
|
|
120
127
|
margin: '0',
|
|
121
128
|
padding: `${cssVar(system.space.x8)} ${cssVar(system.space.x10)}`,
|
|
129
|
+
boxSizing: 'border-box',
|
|
130
|
+
maxWidth: '100%',
|
|
122
131
|
}, children: code.__RAW__ }) })), _jsx(Tooltip, { title: copied ? 'Copied!' : 'Copy Source Code', children: _jsx(TertiaryButton, { "aria-label": "Copy Code", size: "large", "data-part": "copy-btn", variant: "inverse", iconPosition: "end", icon: copied ? checkCircleIcon : copyIcon, onClick: onCopy }) })] }) }) })] }));
|
|
123
132
|
};
|