@workday/canvas-kit-docs 14.0.0-alpha.1181-next.0 → 14.0.0-alpha.1185-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.
@@ -252794,6 +252794,23 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
252794
252794
  "value": "`40ms`"
252795
252795
  }
252796
252796
  },
252797
+ {
252798
+ "kind": "property",
252799
+ "name": "variant",
252800
+ "required": false,
252801
+ "type": {
252802
+ "kind": "string",
252803
+ "value": "inverse"
252804
+ },
252805
+ "description": "",
252806
+ "declarations": [
252807
+ {
252808
+ "name": "variant",
252809
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/loading-dots/lib/LoadingDots.tsx"
252810
+ }
252811
+ ],
252812
+ "tags": {}
252813
+ },
252797
252814
  {
252798
252815
  "kind": "property",
252799
252816
  "name": "cs",
@@ -9,10 +9,11 @@ any questions.
9
9
  - [Codemod](#codemod)
10
10
  - [Instructions](#instructions)
11
11
  - [Component Updates](#component-updates)
12
- - [Styling Changes](#styling-changes)
12
+ - [Branding Changes](#branding-changes)
13
13
  - [Card](#card)
14
14
  - [Expandable](#expandable)
15
15
  - [Hyperlink & ExternalHyperlink](#hyperlink-and-externalhyperlink)
16
+ - [Loading Dots](#loading-dots)
16
17
  - [SearchForm](#search-form)
17
18
  - [Removals](#removals)
18
19
  - [Menu (preview)](#menu-preview)
@@ -85,19 +86,16 @@ yarn remove @workday/canvas-kit-codemod
85
86
 
86
87
  ## Component Updates
87
88
 
88
- ### Styling Changes 💅
89
+ ### Branding Changes 💅
89
90
 
90
- Several components have been refactored to use our Canvas tokens and styling API. The React
91
- interface has not changed, but Canvas Tokens are now used for dynamic properties.
92
-
93
- > **Note:** These components also support our cs prop for styling. Learn more about styling with cs
94
- > in our documentation.
91
+ Several components have been refactored to reflect our new brand direction. Most of these changes revolve around the use of our new bran colors.
95
92
 
96
93
  The following components have been updated:
97
94
 
98
95
  - `Breadcrumbs` [#3270](https://github.com/Workday/canvas-kit/pull/3270)
99
- - `ColorPicker` (main) [#3307](https://github.com/Workday/canvas-kit/pull/3307)
96
+ - `ColorPicker` (Main) [#3307](https://github.com/Workday/canvas-kit/pull/3307)
100
97
  - `ColorPicker` (preview) [#3307](https://github.com/Workday/canvas-kit/pull/3307)
98
+ - `LoadingDots` (Main) [#3393](https://github.com/Workday/canvas-kit/pull/3393)
101
99
  - `Pagination` (Preview) [#3300](https://github.com/Workday/canvas-kit/pull/3300)
102
100
  - `SearchForm` (Labs) [#3303](https://github.com/Workday/canvas-kit/pull/3303)
103
101
  - `SegmentedControl` (Main) [#3278](https://github.com/Workday/canvas-kit/pull/3278)
@@ -220,6 +218,17 @@ These changes are only **visual** and should not affect the functionality of the
220
218
 
221
219
  > **Note:** Only use the `standalone` or `standalone-inverse` variant in cases where the `<HyperLink>` and `<ExternalHyperlink>` are used outside the context of body text.
222
220
 
221
+ ### Loading Dots
222
+
223
+ **PR:** [#3393](https://github.com/Workday/canvas-kit/pull/3393)
224
+
225
+ - We've updated the colors to match brand refresh. The default color changes from `system.color.bg.alt.strong` to `system.color.bg.muted.strong`.
226
+ - `LoadingDots` now has a `inverse` variant. Use this variant when the Loading Dots are on a dark background or image.
227
+
228
+ ```tsx
229
+ <LoadingDots variant="inverse" />
230
+ ```
231
+
223
232
  ### Search Form 🚨
224
233
 
225
234
  **PR:** [#3303](https://github.com/Workday/canvas-kit/pull/3303)
@@ -4,6 +4,7 @@ import RTL from './examples/RTL';
4
4
  import Accessible from './examples/Accessible';
5
5
  import CustomShape from './examples/CustomShape';
6
6
  import CustomColorAndAnimation from './examples/CustomColorAndAnimation';
7
+ import Inverse from './examples/Inverse';
7
8
 
8
9
  # Canvas Kit Loading Dots
9
10
 
@@ -22,8 +23,16 @@ yarn add @workday/canvas-kit-react
22
23
 
23
24
  ### Basic Example
24
25
 
26
+ Use Loading Dots to identify when a specific area of the page is loading (i.e. the content within a card).
27
+
25
28
  <ExampleCodeBlock code={Basic} />
26
29
 
30
+ ### Inverse Variant
31
+
32
+ Use the `variant="inverse"` prop when the loading dots are on a dark background or image.
33
+
34
+ <ExampleCodeBlock code={Inverse} />
35
+
27
36
  ### Right-to-Left (RTL)
28
37
 
29
38
  <ExampleCodeBlock code={RTL} />
@@ -39,11 +48,11 @@ yarn add @workday/canvas-kit-react
39
48
  ### Custom Styles
40
49
 
41
50
  Loading Dots supports custom styling via the `cs` prop. For more information, check our
42
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
51
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
43
52
 
44
53
  Custom styling is also supported through the [Loading Dots documented props below](#props).
45
54
 
46
- ### Adding screen reader support to loading animations
55
+ ### Accessibility
47
56
 
48
57
  Sometimes, letting users know when content has finished loading is just as important as asking users
49
58
  to "please wait" while content is loading. The disappearance of an animation is information that
@@ -40,7 +40,12 @@ export default () => {
40
40
  <SecondaryButton onClick={handleLoad}>Start</SecondaryButton>
41
41
  <AriaLiveRegion aria-label="Loading">
42
42
  {loadingState === 'loading' && (
43
- <LoadingDots cs={styleOverrides.loadingStyles} role="img" aria-label="Please wait..." />
43
+ <LoadingDots
44
+ cs={styleOverrides.loadingStyles}
45
+ role="img"
46
+ variant="inverse"
47
+ aria-label="Please wait..."
48
+ />
44
49
  )}
45
50
  {loadingState === 'success' && <AccessibleHide>Complete.</AccessibleHide>}
46
51
  </AriaLiveRegion>
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import {LoadingDots, loadingDotsStencil} from '@workday/canvas-kit-react/loading-dots';
1
+ import {LoadingDots} from '@workday/canvas-kit-react/loading-dots';
3
2
  import {system} from '@workday/canvas-tokens-web';
4
3
  import {createStyles, createStencil} from '@workday/canvas-kit-styling';
5
4
 
@@ -13,20 +12,19 @@ const styleOverrides = {
13
12
  const loadingStencil = createStencil({
14
13
  base: {
15
14
  borderRadius: system.shape.round,
16
- backgroundColor: system.color.bg.overlay,
15
+ backgroundColor: system.color.bg.contrast.strong,
17
16
  height: 80,
18
17
  width: 80,
19
18
  alignItems: 'center',
20
19
  justifyContent: 'center',
21
20
  display: 'flex',
22
- [loadingDotsStencil.vars.loadingDotColor]: system.color.icon.inverse,
23
21
  },
24
22
  });
25
23
 
26
24
  export default () => {
27
25
  return (
28
26
  <div className={styleOverrides.parentContainer}>
29
- <LoadingDots cs={loadingStencil()} />
27
+ <LoadingDots variant="inverse" cs={loadingStencil()} />
30
28
  </div>
31
29
  );
32
30
  };
@@ -0,0 +1,41 @@
1
+ import {LoadingDots} from '@workday/canvas-kit-react/loading-dots';
2
+ import {createStencil, createStyles, px2rem} from '@workday/canvas-kit-styling';
3
+ import {system} from '@workday/canvas-tokens-web';
4
+ import {Graphic} from '@workday/canvas-kit-react/icon';
5
+
6
+ const loadingStencil = createStencil({
7
+ base: {
8
+ background: system.color.bg.overlay,
9
+ alignItems: 'center',
10
+ justifyContent: 'center',
11
+ display: 'flex',
12
+ position: 'absolute',
13
+ top: '50%',
14
+ left: '50%',
15
+ transform: 'translate(-50%, -50%)',
16
+ width: '100%',
17
+ height: '100%',
18
+ },
19
+ });
20
+
21
+ const containerStyles = createStyles({
22
+ position: 'relative',
23
+ width: px2rem(200),
24
+ height: px2rem(200),
25
+ });
26
+
27
+ export default () => {
28
+ return (
29
+ <div className={containerStyles}>
30
+ <LoadingDots variant="inverse" cs={loadingStencil()} />
31
+ <Graphic
32
+ alt="A magnifying glass"
33
+ width={200}
34
+ src={{
35
+ url: 'https://picsum.photos/200',
36
+ }}
37
+ srcset="https://picsum.photos/200 200w, https://picsum.photos/200 200w, https://picsum.photos/800 800w, https://picsum.photos/1200 1200w"
38
+ />
39
+ </div>
40
+ );
41
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "14.0.0-alpha.1181-next.0",
3
+ "version": "14.0.0-alpha.1185-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",
@@ -45,10 +45,10 @@
45
45
  "@emotion/styled": "^11.6.0",
46
46
  "@stackblitz/sdk": "^1.11.0",
47
47
  "@storybook/csf": "0.0.1",
48
- "@workday/canvas-kit-labs-react": "^14.0.0-alpha.1181-next.0",
49
- "@workday/canvas-kit-preview-react": "^14.0.0-alpha.1181-next.0",
50
- "@workday/canvas-kit-react": "^14.0.0-alpha.1181-next.0",
51
- "@workday/canvas-kit-styling": "^14.0.0-alpha.1181-next.0",
48
+ "@workday/canvas-kit-labs-react": "^14.0.0-alpha.1185-next.0",
49
+ "@workday/canvas-kit-preview-react": "^14.0.0-alpha.1185-next.0",
50
+ "@workday/canvas-kit-react": "^14.0.0-alpha.1185-next.0",
51
+ "@workday/canvas-kit-styling": "^14.0.0-alpha.1185-next.0",
52
52
  "@workday/canvas-system-icons-web": "^3.0.35",
53
53
  "@workday/canvas-tokens-web": "3.0.0-alpha.10",
54
54
  "markdown-to-jsx": "^7.2.0",
@@ -61,5 +61,5 @@
61
61
  "mkdirp": "^1.0.3",
62
62
  "typescript": "5.0"
63
63
  },
64
- "gitHead": "9c514e387c2e6862acf6c77ba2ff9ad257b9e78e"
64
+ "gitHead": "9e540576d16adbd28a834f86cfcc6d327105db67"
65
65
  }