@workday/canvas-kit-react 11.0.0-alpha.761-next.0 → 11.0.0-alpha.764-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.
- package/checkbox/lib/CheckBackground.tsx +17 -15
- package/checkbox/lib/CheckboxCheck.tsx +15 -18
- package/checkbox/lib/CheckboxContainer.tsx +22 -22
- package/checkbox/lib/CheckboxInput.tsx +37 -78
- package/checkbox/lib/CheckboxRipple.tsx +12 -10
- package/dist/commonjs/checkbox/lib/CheckBackground.d.ts +19 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.js +10 -7
- package/dist/commonjs/checkbox/lib/CheckboxCheck.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxCheck.js +8 -6
- package/dist/commonjs/checkbox/lib/CheckboxContainer.d.ts +0 -1
- package/dist/commonjs/checkbox/lib/CheckboxContainer.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxContainer.js +5 -4
- package/dist/commonjs/checkbox/lib/CheckboxInput.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxInput.js +7 -12
- package/dist/commonjs/checkbox/lib/CheckboxRipple.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxRipple.js +4 -2
- package/dist/commonjs/select/lib/Select.d.ts +61 -1030
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +4 -4
- package/dist/es6/checkbox/lib/CheckBackground.d.ts +19 -1
- package/dist/es6/checkbox/lib/CheckBackground.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/CheckBackground.js +10 -7
- package/dist/es6/checkbox/lib/CheckboxCheck.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/CheckboxCheck.js +10 -8
- package/dist/es6/checkbox/lib/CheckboxContainer.d.ts +0 -1
- package/dist/es6/checkbox/lib/CheckboxContainer.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/CheckboxContainer.js +5 -4
- package/dist/es6/checkbox/lib/CheckboxInput.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/CheckboxInput.js +10 -15
- package/dist/es6/checkbox/lib/CheckboxRipple.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/CheckboxRipple.js +5 -3
- package/dist/es6/select/lib/Select.d.ts +61 -1030
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +4 -4
- package/package.json +4 -4
- package/select/lib/Select.tsx +4 -4
|
@@ -26,27 +26,22 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
26
26
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
27
27
|
const CheckBackground_1 = require("./CheckBackground");
|
|
28
28
|
const checkboxInputStencil = canvas_kit_styling_1.createStencil({
|
|
29
|
-
base: { name: "
|
|
29
|
+
base: { name: "b01bc2", styles: "border-radius:var(--cnvs-sys-shape-half);width:var(--cnvs-sys-space-x6);height:var(--cnvs-sys-space-x6);margin:var(--cnvs-sys-space-zero);margin-top:calc(0.1875rem * -1);margin-inline-start:calc(0.1875rem * -1);position:absolute;opacity:var(--cnvs-sys-opacity-zero);&:not(:disabled){cursor:pointer;}&:where(:hover,.hover) ~ span:first-of-type{box-shadow:0 0 0 0.4375rem var(--cnvs-sys-color-bg-alt-soft);}&:not(:where(:checked, :indeterminate, :disabled, :focus-visible, .focus)):where(:hover, .hover, :active, .active) ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-strong);}&:where(:checked, :indeterminate) ~ div:first-of-type{border-color:var(--cnvs-brand-primary-base);background-color:var(--cnvs-brand-primary-base);}&:disabled ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-disabled);background-color:var(--cnvs-sys-color-bg-alt-softer);opacity:var(--cnvs-sys-opacity-full);}&:disabled:where(:checked, :indeterminate) ~ div:first-of-type{border-color:var(--cnvs-brand-primary-light);background-color:var(--cnvs-brand-primary-light);}&:where(:focus-visible, :active, .focus, .active){outline:none;}&:where(:focus-visible, .focus) ~ div:first-of-type{border-color:var(--cnvs-brand-primary-base);border-width:0.125rem;box-shadow:0 0 0 0px var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1)), 0 0 0 0px var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));}&:checked:focus-visible, &:indeterminate:focus-visible, &:checked.focus, &:indeterminate.focus{& ~ div:first-of-type{box-shadow:0 0 0 2px var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1)), 0 0 0 4px var(--cnvs-brand-common-focus-outline);border-color:var(--cnvs-brand-primary-base);border-width:0.125rem;span{margin-inline-start:calc(0.4375rem * -1);}}}" },
|
|
30
30
|
modifiers: {
|
|
31
31
|
variant: {
|
|
32
|
-
inverse: { name: "
|
|
32
|
+
inverse: { name: "edefb9", styles: "& ~ span:first-of-type{opacity:var(--cnvs-sys-opacity-disabled);}& ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-inverse);}&:not(:where(:checked, :indeterminate, :disabled, :focus-visible, .focus)):where(:hover, .hover, :active, .active) ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-inverse);}&:where(:checked, :indeterminate) ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-inverse);background-color:var(--cnvs-sys-color-bg-default);}&:disabled ~ div:first-of-type{background-color:var(--cnvs-sys-color-bg-alt-default);opacity:var(--cnvs-sys-opacity-disabled);}&:disabled:where(:checked, :indeterminate) ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-inverse);background-color:var(--cnvs-sys-color-bg-alt-default);}&:where(:focus-visible, .focus) ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-contrast-default);box-shadow:0 0 0 0px var(--cnvs-sys-color-fg-strong), 0 0 0 2px var(--cnvs-sys-color-fg-inverse);}&:checked:focus-visible, &:checked.focus, &:indeterminate:focus-visible, &:indeterminate.focus{& ~ div:first-of-type{box-shadow:0 0 0 2px var(--cnvs-sys-color-fg-strong), 0 0 0 4px var(--cnvs-sys-color-fg-inverse);border-color:var(--cnvs-sys-color-border-inverse);}}" }
|
|
33
33
|
},
|
|
34
34
|
disabled: {
|
|
35
|
-
true: { name: "
|
|
35
|
+
true: { name: "66eb53", styles: "&:where(:hover, .hover) ~ span:first-of-type{box-shadow:none;}" }
|
|
36
36
|
},
|
|
37
37
|
error: {
|
|
38
|
-
|
|
39
|
-
alert: { name: "b5c214", styles: "&:not(:where(:focus-visible, .focus)) ~ div:first-of-type{border:0.0625rem solid var(--cnvs-background-inner);box-shadow:\n 0 0 0 0.0625rem var(--cnvs-background-inner), \n 0 0 0 0.125rem var(--cnvs-background-outer);}&:not(where(:checked, :indeterminate, :disabled, :focus-visible, .focus)):where(:hover, .hover, :active, .active) ~ div:first-of-type{border-color:var(--cnvs-background-inner);}&:where(:checked, :indeterminate) ~ div:first-of-type{border-color:transparent;box-shadow:\n 0 0 0 0.125rem var(--cnvs-base-palette-french-vanilla-100),\n 0 0 0 0.25rem var(--cnvs-background-inner),\n 0 0 0 0.3125rem var(--cnvs-background-outer);}" }
|
|
38
|
+
true: { name: "21e17a", styles: "&:not(:where(:focus-visible, .focus)) ~ div:first-of-type{border-color:var(--cnvs-checkbox-background-errorRingColorInner);box-shadow:\n 0 0 0 0.0625rem var(--cnvs-checkbox-background-errorRingColorInner), \n 0 0 0 0.125rem var(--cnvs-checkbox-background-errorRingColorOuter);}&:where(:checked, :indeterminate) ~ div:first-of-type{border-color:transparent;box-shadow:\n 0 0 0 0.125rem var(--cnvs-sys-color-fg-inverse),\n 0 0 0 0.25rem var(--cnvs-checkbox-background-errorRingColorInner),\n 0 0 0 0.3125rem var(--cnvs-checkbox-background-errorRingColorOuter);}&:not(:where(:checked, :indeterminate, :disabled, :focus-visible, .focus)):where(:hover, .hover, :active, .active) ~ div:first-of-type{border-color:var(--cnvs-checkbox-background-errorRingColorInner);}" }
|
|
40
39
|
}
|
|
41
40
|
},
|
|
42
41
|
compound: [
|
|
43
42
|
{
|
|
44
|
-
modifiers: { variant: 'inverse', error:
|
|
45
|
-
styles: { name: "
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
modifiers: { variant: 'inverse', error: 'alert' },
|
|
49
|
-
styles: { name: "bdcc4f", styles: "&:not(:where(:focus-visible, .focus)) ~ div:first-of-type{border:0.0625rem solid var(--cnvs-base-palette-soap-300);}&:not(where(:checked, :indeterminate, :disabled, :focus-visible, .focus)):where(:hover, .hover, :active, .active) ~ div:first-of-type{border-color:var(--cnvs-base-palette-soap-300);}&:where(:checked, :indeterminate) ~ div:first-of-type{border-color:var(--cnvs-base-palette-soap-300);}" }
|
|
43
|
+
modifiers: { variant: 'inverse', error: true },
|
|
44
|
+
styles: { name: "9266ac", styles: "&:not(:where(:focus-visible, .focus)) ~ div:first-of-type{border:0.0625rem solid var(--cnvs-sys-color-border-input-inverse);}&:not(where(:checked, :indeterminate, :disabled, :focus-visible, .focus)):where(:hover, .hover, :active, .active) ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-inverse);}&:where(:checked, :indeterminate) ~ div:first-of-type{border-color:var(--cnvs-sys-color-border-input-inverse);}" }
|
|
50
45
|
}
|
|
51
46
|
]
|
|
52
47
|
}, "cnvs-checkbox-input");
|
|
@@ -54,6 +49,6 @@ exports.CheckboxInput = common_1.createComponent('input')({
|
|
|
54
49
|
displayName: 'CheckboxInput',
|
|
55
50
|
Component: ({ variant, error, ...elemProps }, ref, Element) => {
|
|
56
51
|
const { checked, disabled, indeterminate } = elemProps;
|
|
57
|
-
return (React.createElement(Element, Object.assign({ type: "checkbox", ref: ref, "aria-checked": indeterminate ? 'mixed' : checked }, canvas_kit_styling_1.handleCsProp(elemProps, checkboxInputStencil({ variant, disabled, error })))));
|
|
52
|
+
return (React.createElement(Element, Object.assign({ type: "checkbox", ref: ref, "aria-checked": indeterminate ? 'mixed' : checked }, canvas_kit_styling_1.handleCsProp(elemProps, checkboxInputStencil({ variant, disabled, error: !!error })))));
|
|
58
53
|
},
|
|
59
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxRipple.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/CheckboxRipple.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckboxRipple.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/CheckboxRipple.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,cAAc,8EAKzB,CAAC"}
|
|
@@ -24,10 +24,12 @@ const React = __importStar(require("react"));
|
|
|
24
24
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
25
25
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
26
26
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
27
|
-
const
|
|
27
|
+
const checkboxRippleStencil = canvas_kit_styling_1.createStencil({
|
|
28
|
+
base: { name: "d00565", styles: "border-radius:var(--cnvs-sys-shape-round);box-shadow:none;height:calc(var(--cnvs-sys-space-x4) + 0.125rem);width:calc(var(--cnvs-sys-space-x4) + 0.125rem);transition:box-shadow 150ms ease-out;position:absolute;pointer-events:none;" }
|
|
29
|
+
}, "cnvs-checkbox-ripple");
|
|
28
30
|
exports.CheckboxRipple = common_1.createComponent('span')({
|
|
29
31
|
displayName: 'CheckboxRipple',
|
|
30
32
|
Component: elemProps => {
|
|
31
|
-
return React.createElement("span", Object.assign({
|
|
33
|
+
return React.createElement("span", Object.assign({}, checkboxRippleStencil()));
|
|
32
34
|
},
|
|
33
35
|
});
|