@workday/canvas-kit-docs 10.3.0-646-next.0 → 10.3.0-649-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.
@@ -7434,6 +7434,118 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
7434
7434
  }
7435
7435
  }
7436
7436
  },
7437
+ {
7438
+ "name": "LoadingSparkles",
7439
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/loading-sparkles/lib/LoadingSparkles.tsx",
7440
+ "description": "A simple component that displays three horizontal sparkles, to be used when an AI operation is in progress.",
7441
+ "declarations": [
7442
+ {
7443
+ "name": "LoadingSparkles",
7444
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/loading-sparkles/lib/LoadingSparkles.tsx"
7445
+ }
7446
+ ],
7447
+ "tags": {},
7448
+ "type": {
7449
+ "kind": "enhancedComponent",
7450
+ "componentType": "regular",
7451
+ "displayName": "LoadingSparkles",
7452
+ "props": [
7453
+ {
7454
+ "kind": "property",
7455
+ "name": "cs",
7456
+ "required": false,
7457
+ "type": {
7458
+ "kind": "symbol",
7459
+ "name": "CSToPropsInput",
7460
+ "value": "CSToPropsInput"
7461
+ },
7462
+ "description": "The `cs` prop takes in a single value or an array of values. You can pass the CSS class name\nreturned by {@link createStyles}, or the result of {@link createVars} and\n{@link createModifiers}. If you're extending a component already using `cs`, you can merge that\nprop in as well. Any style that is passed to the `cs` prop will override style props. If you\nwish to have styles that are overridden by the `css` prop, or styles added via the `styled`\nAPI, use {@link handleCsProp} wherever `elemProps` is used. If your component needs to also\nhandle style props, use {@link mergeStyles} instead.\n\n\n```tsx\nimport {handleCsProp} from '@workday/canvas-kit-styling';\nimport {mergeStyles} from '@workday/canvas-kit-react/layout';\n\n// ...\n\n// `handleCsProp` handles compat mode with Emotion's runtime APIs. `mergeStyles` has the same\n// function signature, but adds support for style props.\n\nreturn (\n <Element\n {...handleCsProp(elemProps, [\n myStyles,\n myModifiers({ size: 'medium' }),\n myVars({ backgroundColor: 'red' })\n ])}\n >\n {children}\n </Element>\n)\n```",
7463
+ "declarations": [
7464
+ {
7465
+ "name": "cs",
7466
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/styling/dist/es6/lib/cs.d.ts"
7467
+ }
7468
+ ],
7469
+ "tags": {}
7470
+ },
7471
+ {
7472
+ "kind": "property",
7473
+ "name": "children",
7474
+ "description": "",
7475
+ "tags": {},
7476
+ "declarations": [],
7477
+ "type": {
7478
+ "kind": "external",
7479
+ "name": "React.ReactNode",
7480
+ "url": "https://reactjs.org/docs/rendering-elements.html"
7481
+ }
7482
+ },
7483
+ {
7484
+ "kind": "property",
7485
+ "name": "as",
7486
+ "description": "Optional override of the default element used by the component. Any valid tag or Component. If you provided a Component, this component should forward the ref using `React.forwardRef`and spread extra props to a root element.\n\n**Note:** Not all elements make sense and some elements may cause accessibility issues. Change this value with care.",
7487
+ "tags": {},
7488
+ "declarations": [],
7489
+ "type": {
7490
+ "kind": "external",
7491
+ "name": "React.ElementType",
7492
+ "url": "https://developer.mozilla.org/en-US/docs/Web/API/element"
7493
+ },
7494
+ "defaultValue": {
7495
+ "kind": "external",
7496
+ "name": "div",
7497
+ "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div"
7498
+ }
7499
+ },
7500
+ {
7501
+ "kind": "property",
7502
+ "name": "ref",
7503
+ "description": "Optional ref. If the component represents an element, this ref will be a reference to the real DOM element of the component. If `as` is set to an element, it will be that element. If `as` is a component, the reference will be to that component (or element if the component uses `React.forwardRef`).",
7504
+ "tags": {},
7505
+ "declarations": [],
7506
+ "type": {
7507
+ "kind": "external",
7508
+ "name": "React.Ref",
7509
+ "url": "https://reactjs.org/docs/refs-and-the-dom.html",
7510
+ "typeParameters": [
7511
+ {
7512
+ "kind": "typeParameter",
7513
+ "name": "R",
7514
+ "required": true,
7515
+ "defaultValue": {
7516
+ "kind": "external",
7517
+ "name": "div",
7518
+ "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div"
7519
+ }
7520
+ }
7521
+ ]
7522
+ }
7523
+ }
7524
+ ],
7525
+ "baseElement": {
7526
+ "kind": "external",
7527
+ "name": "div",
7528
+ "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div"
7529
+ }
7530
+ }
7531
+ },
7532
+ {
7533
+ "name": "sparkleIcon",
7534
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/loading-sparkles/lib/sparkleIcon.ts",
7535
+ "description": "",
7536
+ "declarations": [
7537
+ {
7538
+ "name": "sparkleIcon",
7539
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/loading-sparkles/lib/sparkleIcon.ts"
7540
+ }
7541
+ ],
7542
+ "tags": {},
7543
+ "type": {
7544
+ "kind": "symbol",
7545
+ "name": "CanvasSystemIcon",
7546
+ "value": "CanvasSystemIcon"
7547
+ }
7548
+ },
7437
7549
  {
7438
7550
  "name": "DeprecatedMenuProps",
7439
7551
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/menu/lib/Menu.tsx",
@@ -251859,9 +251971,9 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
251859
251971
  "value": "SerializedStyles"
251860
251972
  },
251861
251973
  {
251862
- "kind": "external",
251863
- "name": "CSSObject",
251864
- "url": "https://emotion.sh/docs/object-styles"
251974
+ "kind": "symbol",
251975
+ "name": "CSSObjectWithVars",
251976
+ "value": "CSSObjectWithVars<CSSObject>"
251865
251977
  }
251866
251978
  ]
251867
251979
  },
@@ -0,0 +1,33 @@
1
+ import {SymbolDoc} from '@workday/canvas-kit-docs';
2
+ import {LoadingSparkles} from '@workday/canvas-kit-preview-react/loading-sparkles';
3
+
4
+ import Basic from './examples/Basic';
5
+ import RTL from './examples/RTL';
6
+
7
+
8
+ # Canvas Kit Loading Sparkles
9
+
10
+ `LoadingSparkles` is a loading animation that makes users aware an AI operation is in progress.
11
+
12
+ ## Installation
13
+
14
+ ```sh
15
+ yarn add @workday/canvas-kit-react
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ### Basic Example
21
+
22
+ `LoadingSparkles` is designed to work out-of-the-box, but you'll need to add `aria-live="polite"`
23
+ and a descriptive `aria-label` for screen reader accesibility.
24
+
25
+ <ExampleCodeBlock code={Basic} />
26
+
27
+ ### Right-to-Left (RTL)
28
+
29
+ <ExampleCodeBlock code={RTL} />
30
+
31
+ ## Component API
32
+
33
+ <SymbolDoc name="LoadingSparkles" fileName="/preview-react/" />
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import {LoadingSparkles} from '@workday/canvas-kit-preview-react/loading-sparkles';
3
+
4
+ export default () => {
5
+ return <LoadingSparkles aria-live="polite" aria-label="Generating content" />;
6
+ };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import {LoadingSparkles} from '@workday/canvas-kit-preview-react/loading-sparkles';
3
+ import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common';
4
+
5
+ export default () => {
6
+ const theme = {
7
+ canvas: {
8
+ direction: ContentDirection.RTL,
9
+ },
10
+ };
11
+ return (
12
+ <CanvasProvider theme={theme}>
13
+ <LoadingSparkles />
14
+ </CanvasProvider>
15
+ );
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "10.3.0-646-next.0",
3
+ "version": "10.3.0-649-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": "^10.3.0-646-next.0",
48
- "@workday/canvas-kit-preview-react": "^10.3.0-646-next.0",
49
- "@workday/canvas-kit-react": "^10.3.0-646-next.0",
50
- "@workday/canvas-kit-styling": "^10.3.0-646-next.0",
47
+ "@workday/canvas-kit-labs-react": "^10.3.0-649-next.0",
48
+ "@workday/canvas-kit-preview-react": "^10.3.0-649-next.0",
49
+ "@workday/canvas-kit-react": "^10.3.0-649-next.0",
50
+ "@workday/canvas-kit-styling": "^10.3.0-649-next.0",
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": "99b5f95ef4d26c34b68bfb57d27a74bd468948e5"
62
+ "gitHead": "b3d01b2eebf049527f7b3254a9871c531d7e60d4"
63
63
  }