@workday/canvas-kit-preview-react 10.3.11 → 10.3.13
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/commonjs/form-field/lib/FormFieldLabel.js +2 -11
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.d.ts.map +1 -1
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +3 -38
- package/dist/es6/form-field/lib/FormFieldLabel.js +2 -11
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.d.ts.map +1 -1
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +4 -39
- package/loading-sparkles/lib/LoadingSparkles.tsx +9 -3
- package/package.json +6 -7
|
@@ -12,17 +12,8 @@ const hooks_1 = require("./hooks");
|
|
|
12
12
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
13
13
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
14
14
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
15
|
-
const labelStyles = canvas_kit_styling_1.createStyles({
|
|
16
|
-
|
|
17
|
-
minWidth: '180px',
|
|
18
|
-
});
|
|
19
|
-
const asteriskStyles = canvas_kit_styling_1.createStyles({
|
|
20
|
-
marginInlineStart: tokens_1.space.xxxs,
|
|
21
|
-
fontSize: tokens_1.type.properties.fontSizes[20],
|
|
22
|
-
fontWeight: tokens_1.type.properties.fontWeights.regular,
|
|
23
|
-
textDecoration: 'unset',
|
|
24
|
-
color: canvas_tokens_web_1.brand.error.base,
|
|
25
|
-
});
|
|
15
|
+
const labelStyles = canvas_kit_styling_1.createStyles({ name: "rzi6zs", styles: "font-weight:500px;min-width:180px;" });
|
|
16
|
+
const asteriskStyles = canvas_kit_styling_1.createStyles({ name: "fmarl5", styles: "margin-inline-start:0.25rem;font-size:1.25rem;font-weight:400px;text-decoration:unset;color:var(--cnvs-brand-error-base, rgba(222,46,33,1));" });
|
|
26
17
|
exports.FormFieldLabel = common_1.createSubcomponent(text_1.LabelText)({
|
|
27
18
|
displayName: 'FormField.Label',
|
|
28
19
|
modelHook: hooks_1.useFormFieldModel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSparkles.d.ts","sourceRoot":"","sources":["../../../../loading-sparkles/lib/LoadingSparkles.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingSparkles.d.ts","sourceRoot":"","sources":["../../../../loading-sparkles/lib/LoadingSparkles.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,OAAO,EAKR,MAAM,6BAA6B,CAAC;AA8ErC;;GAEG;AACH,eAAO,MAAM,eAAe,6EAW1B,CAAC"}
|
|
@@ -21,7 +21,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.LoadingSparkles = void 0;
|
|
23
23
|
const React = __importStar(require("react"));
|
|
24
|
-
const css_1 = require("@emotion/css");
|
|
25
24
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
26
25
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
27
26
|
const icon_1 = require("@workday/canvas-kit-react/icon");
|
|
@@ -46,49 +45,15 @@ const AI_COLORS = {
|
|
|
46
45
|
/**
|
|
47
46
|
* The animation for the sparkle.
|
|
48
47
|
*/
|
|
49
|
-
const LOADING_ANIMATION =
|
|
50
|
-
|
|
51
|
-
opacity: 0.2,
|
|
52
|
-
transform: 'scale(0.55)',
|
|
53
|
-
},
|
|
54
|
-
'27%': {
|
|
55
|
-
opacity: 1,
|
|
56
|
-
transform: 'scale(1)',
|
|
57
|
-
},
|
|
58
|
-
'53%': {
|
|
59
|
-
opacity: 0.6,
|
|
60
|
-
transform: 'scale(0.7)',
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
const loadingSparklesIconStyles = canvas_kit_styling_1.createStyles({
|
|
64
|
-
animationDuration: `${ANIMATION_DURATION_MS}ms`,
|
|
65
|
-
animationFillMode: 'both',
|
|
66
|
-
animationIterationCount: 'infinite',
|
|
67
|
-
animationName: LOADING_ANIMATION,
|
|
68
|
-
animationTimingFunction: 'ease-in-out',
|
|
69
|
-
'.wd-sparkle-fill': {
|
|
70
|
-
fill: AI_COLORS.dragonFruit400,
|
|
71
|
-
},
|
|
72
|
-
'&:nth-child(1)': {
|
|
73
|
-
animationDelay: '0ms',
|
|
74
|
-
},
|
|
75
|
-
'&:nth-child(2)': {
|
|
76
|
-
animationDelay: `calc(${ANIMATION_DURATION_MS}ms * (1/3))`,
|
|
77
|
-
},
|
|
78
|
-
'&:nth-child(3)': {
|
|
79
|
-
animationDelay: `calc(${ANIMATION_DURATION_MS}ms * (2/3))`,
|
|
80
|
-
},
|
|
81
|
-
});
|
|
48
|
+
const LOADING_ANIMATION = canvas_kit_styling_1.keyframes({ name: "1lzmfb3", styles: "0%, 79%, 100%{opacity:0.2px;transform:scale(0.55);}27%{opacity:1px;transform:scale(1);}53%{opacity:0.6px;transform:scale(0.7);}" });
|
|
49
|
+
const loadingSparklesIconStyles = canvas_kit_styling_1.createStyles({ name: "5995an", styles: "animation-duration:1230pxms;animation-fill-mode:both;animation-iteration-count:infinite;animation-name:animation-1lzmfb3;animation-timing-function:ease-in-out;.wd-sparkle-fill{fill:#8C17D2;}&:nth-child(1){animation-delay:0ms;}&:nth-child(2){animation-delay:calc(1230pxms * (1/3));}&:nth-child(3){animation-delay:calc(1230pxms * (2/3));}" });
|
|
82
50
|
/**
|
|
83
51
|
* An individual loading sparkle. ✨
|
|
84
52
|
*/
|
|
85
53
|
const Sparkle = () => {
|
|
86
54
|
return (React.createElement(icon_1.SystemIcon, { icon: sparkleIcon_1.sparkleIcon, cs: [loadingSparklesIconStyles], size: canvas_kit_styling_1.cssVar(canvas_tokens_web_1.system.space.x3) }));
|
|
87
55
|
};
|
|
88
|
-
const loadingSparklesStyles = canvas_kit_styling_1.createStyles({
|
|
89
|
-
display: 'inline-flex',
|
|
90
|
-
gap: canvas_kit_styling_1.px2rem(1),
|
|
91
|
-
});
|
|
56
|
+
const loadingSparklesStyles = canvas_kit_styling_1.createStyles({ name: "14l8nwz", styles: "display:inline-flex;gap:0.0625rem;" });
|
|
92
57
|
/**
|
|
93
58
|
* A simple component that displays three horizontal sparkles, to be used when an AI operation is in progress.
|
|
94
59
|
*/
|
|
@@ -6,17 +6,8 @@ import { useFormFieldLabel, useFormFieldModel } from './hooks';
|
|
|
6
6
|
import { createStyles } from '@workday/canvas-kit-styling';
|
|
7
7
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
8
8
|
import { brand } from '@workday/canvas-tokens-web';
|
|
9
|
-
const labelStyles = createStyles({
|
|
10
|
-
|
|
11
|
-
minWidth: '180px',
|
|
12
|
-
});
|
|
13
|
-
const asteriskStyles = createStyles({
|
|
14
|
-
marginInlineStart: space.xxxs,
|
|
15
|
-
fontSize: type.properties.fontSizes[20],
|
|
16
|
-
fontWeight: type.properties.fontWeights.regular,
|
|
17
|
-
textDecoration: 'unset',
|
|
18
|
-
color: brand.error.base,
|
|
19
|
-
});
|
|
9
|
+
const labelStyles = createStyles({ name: "rzi6zs", styles: "font-weight:500px;min-width:180px;" });
|
|
10
|
+
const asteriskStyles = createStyles({ name: "fmarl5", styles: "margin-inline-start:0.25rem;font-size:1.25rem;font-weight:400px;text-decoration:unset;color:var(--cnvs-brand-error-base, rgba(222,46,33,1));" });
|
|
20
11
|
export const FormFieldLabel = createSubcomponent(LabelText)({
|
|
21
12
|
displayName: 'FormField.Label',
|
|
22
13
|
modelHook: useFormFieldModel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSparkles.d.ts","sourceRoot":"","sources":["../../../../loading-sparkles/lib/LoadingSparkles.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingSparkles.d.ts","sourceRoot":"","sources":["../../../../loading-sparkles/lib/LoadingSparkles.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,OAAO,EAKR,MAAM,6BAA6B,CAAC;AA8ErC;;GAEG;AACH,eAAO,MAAM,eAAe,6EAW1B,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { keyframes } from '@emotion/css';
|
|
3
2
|
import { system } from '@workday/canvas-tokens-web';
|
|
4
3
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
5
4
|
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
6
|
-
import { createStyles, cssVar, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
5
|
+
import { createStyles, cssVar, handleCsProp, px2rem, keyframes, } from '@workday/canvas-kit-styling';
|
|
7
6
|
import { sparkleIcon } from './sparkleIcon';
|
|
8
7
|
/**
|
|
9
8
|
* Duration of the sparkle animation (in ms).
|
|
@@ -24,49 +23,15 @@ const AI_COLORS = {
|
|
|
24
23
|
/**
|
|
25
24
|
* The animation for the sparkle.
|
|
26
25
|
*/
|
|
27
|
-
const LOADING_ANIMATION = keyframes({
|
|
28
|
-
|
|
29
|
-
opacity: 0.2,
|
|
30
|
-
transform: 'scale(0.55)',
|
|
31
|
-
},
|
|
32
|
-
'27%': {
|
|
33
|
-
opacity: 1,
|
|
34
|
-
transform: 'scale(1)',
|
|
35
|
-
},
|
|
36
|
-
'53%': {
|
|
37
|
-
opacity: 0.6,
|
|
38
|
-
transform: 'scale(0.7)',
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
const loadingSparklesIconStyles = createStyles({
|
|
42
|
-
animationDuration: `${ANIMATION_DURATION_MS}ms`,
|
|
43
|
-
animationFillMode: 'both',
|
|
44
|
-
animationIterationCount: 'infinite',
|
|
45
|
-
animationName: LOADING_ANIMATION,
|
|
46
|
-
animationTimingFunction: 'ease-in-out',
|
|
47
|
-
'.wd-sparkle-fill': {
|
|
48
|
-
fill: AI_COLORS.dragonFruit400,
|
|
49
|
-
},
|
|
50
|
-
'&:nth-child(1)': {
|
|
51
|
-
animationDelay: '0ms',
|
|
52
|
-
},
|
|
53
|
-
'&:nth-child(2)': {
|
|
54
|
-
animationDelay: `calc(${ANIMATION_DURATION_MS}ms * (1/3))`,
|
|
55
|
-
},
|
|
56
|
-
'&:nth-child(3)': {
|
|
57
|
-
animationDelay: `calc(${ANIMATION_DURATION_MS}ms * (2/3))`,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
26
|
+
const LOADING_ANIMATION = keyframes({ name: "1lzmfb3", styles: "0%, 79%, 100%{opacity:0.2px;transform:scale(0.55);}27%{opacity:1px;transform:scale(1);}53%{opacity:0.6px;transform:scale(0.7);}" });
|
|
27
|
+
const loadingSparklesIconStyles = createStyles({ name: "5995an", styles: "animation-duration:1230pxms;animation-fill-mode:both;animation-iteration-count:infinite;animation-name:animation-1lzmfb3;animation-timing-function:ease-in-out;.wd-sparkle-fill{fill:#8C17D2;}&:nth-child(1){animation-delay:0ms;}&:nth-child(2){animation-delay:calc(1230pxms * (1/3));}&:nth-child(3){animation-delay:calc(1230pxms * (2/3));}" });
|
|
60
28
|
/**
|
|
61
29
|
* An individual loading sparkle. ✨
|
|
62
30
|
*/
|
|
63
31
|
const Sparkle = () => {
|
|
64
32
|
return (React.createElement(SystemIcon, { icon: sparkleIcon, cs: [loadingSparklesIconStyles], size: cssVar(system.space.x3) }));
|
|
65
33
|
};
|
|
66
|
-
const loadingSparklesStyles = createStyles({
|
|
67
|
-
display: 'inline-flex',
|
|
68
|
-
gap: px2rem(1),
|
|
69
|
-
});
|
|
34
|
+
const loadingSparklesStyles = createStyles({ name: "14l8nwz", styles: "display:inline-flex;gap:0.0625rem;" });
|
|
70
35
|
/**
|
|
71
36
|
* A simple component that displays three horizontal sparkles, to be used when an AI operation is in progress.
|
|
72
37
|
*/
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {keyframes} from '@emotion/css';
|
|
3
2
|
import {system} from '@workday/canvas-tokens-web';
|
|
4
3
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
5
4
|
import {SystemIcon} from '@workday/canvas-kit-react/icon';
|
|
6
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
createStyles,
|
|
7
|
+
CSProps,
|
|
8
|
+
cssVar,
|
|
9
|
+
handleCsProp,
|
|
10
|
+
px2rem,
|
|
11
|
+
keyframes,
|
|
12
|
+
} from '@workday/canvas-kit-styling';
|
|
7
13
|
|
|
8
14
|
import {sparkleIcon} from './sparkleIcon';
|
|
9
15
|
|
|
@@ -23,7 +29,7 @@ const AI_COLORS = {
|
|
|
23
29
|
dragonFruit400: '#8C17D2',
|
|
24
30
|
dragonFruit500: '#6B11A3',
|
|
25
31
|
dragonFruit600: '#4A0D71',
|
|
26
|
-
};
|
|
32
|
+
} as const;
|
|
27
33
|
|
|
28
34
|
/**
|
|
29
35
|
* The animation for the sparkle.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-preview-react",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.13",
|
|
4
4
|
"description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"watch": "yarn build:es6 -w",
|
|
25
25
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
26
26
|
"clean": "rimraf dist && rimraf .build-info && mkdirp dist",
|
|
27
|
-
"build:cjs": "
|
|
28
|
-
"build:es6": "
|
|
27
|
+
"build:cjs": "ttsc -p tsconfig.cjs.json",
|
|
28
|
+
"build:es6": "ttsc -p tsconfig.es6.json",
|
|
29
29
|
"build:rebuild": "npm-run-all clean build",
|
|
30
30
|
"build": "npm-run-all --parallel build:cjs build:es6",
|
|
31
31
|
"prepack": "node ../../utils/publish.js pre preview-react",
|
|
@@ -44,11 +44,10 @@
|
|
|
44
44
|
"react": ">=16.14"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@emotion/css": "^11.7.1",
|
|
48
47
|
"@emotion/react": "^11.7.1",
|
|
49
48
|
"@emotion/styled": "^11.6.0",
|
|
50
|
-
"@workday/canvas-kit-react": "^10.3.
|
|
51
|
-
"@workday/canvas-kit-styling": "^10.3.
|
|
49
|
+
"@workday/canvas-kit-react": "^10.3.13",
|
|
50
|
+
"@workday/canvas-kit-styling": "^10.3.13",
|
|
52
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
53
52
|
"@workday/canvas-tokens-web": "^1.0.0",
|
|
54
53
|
"@workday/design-assets-types": "^0.2.8"
|
|
@@ -59,5 +58,5 @@
|
|
|
59
58
|
"react-hook-form": "7.36.1",
|
|
60
59
|
"yup": "^0.32.11"
|
|
61
60
|
},
|
|
62
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "a0e5d527ca03cec9db0d640ef97ac76bdb9ae89f"
|
|
63
62
|
}
|