@workday/canvas-kit-preview-react 11.0.0-alpha.697-next.0 → 11.0.0-alpha.700-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/dist/commonjs/form-field/lib/FormField.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +2 -2
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +2 -2
- package/dist/commonjs/radio/lib/RadioGroup.js +3 -3
- package/dist/commonjs/radio/lib/RadioLabel.js +3 -3
- package/dist/commonjs/radio/lib/RadioText.js +3 -3
- package/dist/commonjs/radio/lib/StyledRadioButton.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/StyledRadioButton.js +4 -4
- package/dist/commonjs/table/lib/Table.d.ts.map +1 -1
- package/dist/commonjs/table/lib/Table.js +4 -2
- package/dist/commonjs/table/lib/TableBody.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableBody.js +4 -2
- package/dist/commonjs/table/lib/TableCaption.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableCaption.js +4 -2
- package/dist/commonjs/table/lib/TableCell.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableCell.js +4 -2
- package/dist/commonjs/table/lib/TableFooter.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableFooter.js +4 -2
- package/dist/commonjs/table/lib/TableHead.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableHead.js +4 -2
- package/dist/commonjs/table/lib/TableHeader.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableHeader.js +4 -2
- package/dist/commonjs/table/lib/TableRow.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableRow.js +4 -2
- package/dist/es6/form-field/lib/FormField.js +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.js +2 -2
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +2 -2
- package/dist/es6/radio/lib/RadioGroup.js +3 -3
- package/dist/es6/radio/lib/RadioLabel.js +3 -3
- package/dist/es6/radio/lib/RadioText.js +3 -3
- package/dist/es6/radio/lib/StyledRadioButton.d.ts.map +1 -1
- package/dist/es6/radio/lib/StyledRadioButton.js +6 -6
- package/dist/es6/table/lib/Table.d.ts.map +1 -1
- package/dist/es6/table/lib/Table.js +5 -3
- package/dist/es6/table/lib/TableBody.d.ts.map +1 -1
- package/dist/es6/table/lib/TableBody.js +5 -3
- package/dist/es6/table/lib/TableCaption.d.ts.map +1 -1
- package/dist/es6/table/lib/TableCaption.js +5 -3
- package/dist/es6/table/lib/TableCell.d.ts.map +1 -1
- package/dist/es6/table/lib/TableCell.js +5 -3
- package/dist/es6/table/lib/TableFooter.d.ts.map +1 -1
- package/dist/es6/table/lib/TableFooter.js +5 -3
- package/dist/es6/table/lib/TableHead.d.ts.map +1 -1
- package/dist/es6/table/lib/TableHead.js +5 -3
- package/dist/es6/table/lib/TableHeader.d.ts.map +1 -1
- package/dist/es6/table/lib/TableHeader.js +5 -3
- package/dist/es6/table/lib/TableRow.d.ts.map +1 -1
- package/dist/es6/table/lib/TableRow.js +5 -3
- package/package.json +4 -4
- package/radio/lib/RadioGroup.tsx +2 -2
- package/radio/lib/RadioLabel.tsx +2 -2
- package/radio/lib/RadioText.tsx +2 -2
- package/radio/lib/StyledRadioButton.tsx +5 -5
- package/table/lib/Table.tsx +12 -10
- package/table/lib/TableBody.tsx +22 -20
- package/table/lib/TableCaption.tsx +9 -7
- package/table/lib/TableCell.tsx +15 -13
- package/table/lib/TableFooter.tsx +7 -5
- package/table/lib/TableHead.tsx +15 -13
- package/table/lib/TableHeader.tsx +15 -13
- package/table/lib/TableRow.tsx +9 -7
|
@@ -15,7 +15,7 @@ const FormFieldLabel_1 = require("./FormFieldLabel");
|
|
|
15
15
|
const FormFieldHint_1 = require("./FormFieldHint");
|
|
16
16
|
const FormFieldContainer_1 = require("./FormFieldContainer");
|
|
17
17
|
const formFieldStencil = canvas_kit_styling_1.createStencil({
|
|
18
|
-
base: { name: "
|
|
18
|
+
base: { name: "1elbum1", styles: "border:none;padding:0;margin:0 0 var(--cnvs-sys-space-x6, calc(0.25rem * 6));" },
|
|
19
19
|
modifiers: {
|
|
20
20
|
modifiers: {
|
|
21
21
|
true: { name: "6316w2", styles: "width:100%;[data-width=\"ck-formfield-width\"]{width:100%;}" }
|
|
@@ -12,9 +12,9 @@ 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 asteriskStyles = canvas_kit_styling_1.createStyles({ name: "
|
|
15
|
+
const asteriskStyles = canvas_kit_styling_1.createStyles({ name: "1iydue3", styles: "margin-inline-start:var(--cnvs-sys-space-x1, 0.25rem);font-size:1.25rem;font-weight:400;text-decoration:unset;color:var(--cnvs-brand-error-base, rgba(222,46,33,1));" });
|
|
16
16
|
const labelStencil = canvas_kit_styling_1.createStencil({
|
|
17
|
-
base: { name: "
|
|
17
|
+
base: { name: "9lgv5i", styles: "font-family:var(--cnvs-base-font-family-50, \"Roboto\");font-weight:var(--cnvs-sys-font-weight-medium, 500);line-height:var(--cnvs-base-line-height-100, 1.25rem);font-size:var(--cnvs-base-font-size-75, 0.875rem);letter-spacing:var(--cnvs-base-letter-spacing-150, 0.015rem);color:var(--cnvs-base-palette-black-pepper-300, rgba(73,73,73,1));padding-inline-start:0;margin-bottom:var(--cnvs-sys-space-x1, 0.25rem);display:flex;align-items:center;min-width:180px;" },
|
|
18
18
|
modifiers: {
|
|
19
19
|
modifiers: {
|
|
20
20
|
horizontal: { name: "1hnsmpu", styles: "float:left;max-height:var(--cnvs-sys-space-x10, calc(0.25rem * 10));" },
|
|
@@ -45,8 +45,8 @@ const AI_COLORS = {
|
|
|
45
45
|
/**
|
|
46
46
|
* The animation for the sparkle.
|
|
47
47
|
*/
|
|
48
|
-
const LOADING_ANIMATION = canvas_kit_styling_1.keyframes({ name: "
|
|
49
|
-
const loadingSparklesIconStyles = canvas_kit_styling_1.createStyles({ name: "
|
|
48
|
+
const LOADING_ANIMATION = canvas_kit_styling_1.keyframes({ name: "1w9fjo1", styles: "0%, 79%, 100%{opacity:0.2;transform:scale(0.55);}27%{opacity:1;transform:scale(1);}53%{opacity:0.6;transform:scale(0.7);}" });
|
|
49
|
+
const loadingSparklesIconStyles = canvas_kit_styling_1.createStyles({ name: "1m6e4ch", styles: "animation-duration:1230ms;animation-fill-mode:both;animation-iteration-count:infinite;animation-name:animation-1w9fjo1;animation-timing-function:ease-in-out;.wd-sparkle-fill{fill:#8C17D2;}&:nth-child(1){animation-delay:0ms;}&:nth-child(2){animation-delay:calc(1230ms * (1/3));}&:nth-child(3){animation-delay:calc(1230ms * (2/3));}" });
|
|
50
50
|
/**
|
|
51
51
|
* An individual loading sparkle. ✨
|
|
52
52
|
*/
|
|
@@ -15,7 +15,7 @@ const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
|
15
15
|
/**
|
|
16
16
|
* Styles for RadioGroup
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const radioGroupStencil = canvas_kit_styling_1.createStencil({
|
|
19
19
|
base: { name: "1lnyyji", styles: "display:flex;flex-direction:column;border-radius:var(--cnvs-sys-shape-x1, 0.25rem);gap:var(--cnvs-sys-space-x2, calc(0.25rem * 2));padding:0.625rem var(--cnvs-sys-space-x3, calc(0.25rem * 3)) var(--cnvs-sys-space-x2, calc(0.25rem * 2));margin:calc(var(--cnvs-sys-space-x1) * -1) calc(var(--cnvs-sys-space-x3) * -1);transition:100ms box-shadow;width:fit-content;" },
|
|
20
20
|
modifiers: {
|
|
21
21
|
modifiers: {
|
|
@@ -23,7 +23,7 @@ const radioGroupStyles = canvas_kit_styling_1.createStencil({
|
|
|
23
23
|
alert: { name: "qmneoc", styles: "box-shadow:inset 0 0 0 0.0625rem var(--cnvs-brand-alert-darkest, rgba(192,108,0,1)), inset 0 0 0 0.1875rem var(--cnvs-brand-alert-base, rgba(255,161,38,1));" }
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
}, "radio-group
|
|
26
|
+
}, "radio-group");
|
|
27
27
|
/**
|
|
28
28
|
* Use `RadioGroup` to group a collection of `RadioGroup.RadioButton` components under a common `name`.
|
|
29
29
|
*
|
|
@@ -66,5 +66,5 @@ exports.RadioGroup = common_1.createContainer('div')({
|
|
|
66
66
|
Label: RadioLabel_1.RadioLabel,
|
|
67
67
|
},
|
|
68
68
|
})(({ children, error, theme, ...elemProps }, Element) => {
|
|
69
|
-
return react_1.default.createElement(Element, Object.assign({}, layout_1.mergeStyles(elemProps,
|
|
69
|
+
return react_1.default.createElement(Element, Object.assign({}, layout_1.mergeStyles(elemProps, radioGroupStencil({ error }))), children);
|
|
70
70
|
});
|
|
@@ -12,9 +12,9 @@ const RadioInput_1 = require("./RadioInput");
|
|
|
12
12
|
const RadioText_1 = require("./RadioText");
|
|
13
13
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
14
14
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
15
|
-
const
|
|
15
|
+
const radioLabelStencil = canvas_kit_styling_1.createStencil({
|
|
16
16
|
base: { name: "1ak69fu", styles: "align-items:flex-start;min-height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));position:relative;gap:var(--cnvs-sys-space-x3, calc(0.25rem * 3));" }
|
|
17
|
-
}, "radio-label
|
|
17
|
+
}, "radio-label");
|
|
18
18
|
exports.RadioLabelContext = react_1.default.createContext({});
|
|
19
19
|
exports.RadioLabel = common_1.createSubcomponent('label')({
|
|
20
20
|
displayName: 'Radio.Label',
|
|
@@ -49,5 +49,5 @@ exports.RadioLabel = common_1.createSubcomponent('label')({
|
|
|
49
49
|
},
|
|
50
50
|
})(({ children, variant, disabled, value, ...elemProps }, Element) => {
|
|
51
51
|
return (react_1.default.createElement(exports.RadioLabelContext.Provider, { value: { variant, disabled } },
|
|
52
|
-
react_1.default.createElement(layout_1.Flex, Object.assign({ as: Element }, layout_1.mergeStyles(elemProps,
|
|
52
|
+
react_1.default.createElement(layout_1.Flex, Object.assign({ as: Element }, layout_1.mergeStyles(elemProps, radioLabelStencil({ variant }))), children)));
|
|
53
53
|
});
|
|
@@ -12,7 +12,7 @@ const text_1 = require("@workday/canvas-kit-react/text");
|
|
|
12
12
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
13
13
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
14
14
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
15
|
-
const
|
|
15
|
+
const radioTextStencil = canvas_kit_styling_1.createStencil({
|
|
16
16
|
base: { name: "nwt3co", styles: "font-family:var(--cnvs-base-font-family-50, \"Roboto\");font-weight:var(--cnvs-base-font-weight-400, 400);line-height:var(--cnvs-base-line-height-100, 1.25rem);font-size:var(--cnvs-base-font-size-75, 0.875rem);letter-spacing:var(--cnvs-base-letter-spacing-150, 0.015rem);cursor:pointer;opacity:1;color:var(--cnvs-base-palette-black-pepper-300, rgba(73,73,73,1));" },
|
|
17
17
|
modifiers: {
|
|
18
18
|
modifiers: {
|
|
@@ -28,11 +28,11 @@ const radioTextStyles = canvas_kit_styling_1.createStencil({
|
|
|
28
28
|
styles: { name: "1c0ay3d", styles: "color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));opacity:var(--cnvs-sys-opacity-disabled, 0.4);" }
|
|
29
29
|
}
|
|
30
30
|
]
|
|
31
|
-
}, "radio-text
|
|
31
|
+
}, "radio-text");
|
|
32
32
|
exports.RadioText = common_1.createSubcomponent('span')({
|
|
33
33
|
displayName: 'RadioButton.Text',
|
|
34
34
|
modelHook: useRadioModel_1.useRadioModel,
|
|
35
35
|
})(({ children, ...elemProps }, Element) => {
|
|
36
36
|
const { variant, disabled } = react_1.default.useContext(RadioLabel_1.RadioLabelContext);
|
|
37
|
-
return (react_1.default.createElement(text_1.Text, Object.assign({ as: Element }, layout_1.mergeStyles(elemProps,
|
|
37
|
+
return (react_1.default.createElement(text_1.Text, Object.assign({ as: Element }, layout_1.mergeStyles(elemProps, radioTextStencil({ variant, disabled }))), children));
|
|
38
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,GAAG,EAAoB,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAC,OAAO,EAA8B,MAAM,6BAA6B,CAAC;AAOjF,MAAM,WAAW,sBAAuB,SAAQ,OAAO;IACrD,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AA8MD,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC;IAC/E,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8FAY5B,CAAC"}
|
|
@@ -12,18 +12,18 @@ const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
|
12
12
|
const RadioLabel_1 = require("./RadioLabel");
|
|
13
13
|
const radioWidth = 18;
|
|
14
14
|
const radioHeight = 18;
|
|
15
|
-
const
|
|
15
|
+
const radioInputStencil = canvas_kit_styling_1.createStencil({
|
|
16
16
|
base: { name: "17rixmy", styles: "cursor:pointer;opacity:1;height:1.125rem;width:1.125rem;border-radius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));position:absolute;margin:0;&:focus-visible, &.focus, &:active{outline:transparent;}&:disabled, &.disabled{cursor:auto;+ .cnvs-radio-check{border-color:var(--cnvs-base-palette-licorice-100, rgba(161,170,179,1));background-color:var(--cnvs-base-palette-soap-100, rgba(246,247,248,1));}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-base-palette-licorice-100, rgba(161,170,179,1));}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));border:5px solid var(--cnvs-brand-primary-base, rgba(8,117,225,1));}}+ .cnvs-radio-check{display:flex;flex-direction:column;align-items:center;background-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));border-radius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));box-sizing:border-box;border:0.0625rem solid var(--cnvs-base-palette-licorice-200, rgba(123,133,143,1));height:1.125rem;width:1.125rem;justify-content:center;pointer-events:none;position:absolute;transition:border 200ms ease, background 200ms;opacity:1;}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-base-palette-licorice-500, rgba(51,61,71,1));}&:focus-visible + .cnvs-radio-check, &.focus + .cnvs-radio-check{border-color:var(--cnvs-base-palette-blueberry-400, rgba(8,117,225,1));box-shadow:0 0 0 0px var(--cnvs-base-palette-french-vanilla-100), 0 0 0 1px var(--cnvs-brand-common-focus-outline);}&:focus-visible:hover + .cnvs-radio-check, &.focus:hover + .cnvs-radio-check{outline:transparent;}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));border:0.3125rem solid var(--cnvs-brand-primary-base, rgba(8,117,225,1));}&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check{outline:transparent;box-shadow:0 0 0 2px var(--cnvs-base-palette-french-vanilla-100), 0 0 0 4px var(--cnvs-brand-common-focus-outline);}" },
|
|
17
17
|
modifiers: {
|
|
18
18
|
modifiers: {
|
|
19
19
|
inverse: { name: "1e4i6j2", styles: "+ .cnvs-radio-check{background-color:var(--cnvs-base-palette-soap-100, rgba(246,247,248,1));border-color:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));}&:disabled, &.disabled{opacity:var(--cnvs-sys-opacity-disabled, 0.4);+ .cnvs-radio-check{background-color:var(--cnvs-base-palette-soap-100, rgba(246,247,248,1));border-color:var(--cnvs-base-palette-licorice-100, rgba(161,170,179,1));opacity:var(--cnvs-sys-opacity-disabled, 0.4);}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-base, rgba(8,117,225,1));border-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));}}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));}&:focus-visible + .cnvs-radio-check, &.focus + .cnvs-radio-check{border-color:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-base, rgba(8,117,225,1));border-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));}&:focus-visible + .cnvs-radio-check, &:focus-visible:hover + .cnvs-radio-check, &.focus + .cnvs-radio-check, &.focus:hover + .cnvs-radio-check{box-shadow:0 0 0 0px var(--cnvs-base-palette-black-pepper-400), 0 0 0 2px var(--cnvs-base-palette-french-vanilla-100);}&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check{box-shadow:0 0 0 2px var(--cnvs-base-palette-black-pepper-400), 0 0 0 4px var(--cnvs-base-palette-french-vanilla-100);}" }
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
}, "radio-input
|
|
22
|
+
}, "radio-input");
|
|
23
23
|
const StyledRadioInput = common_1.createComponent('input')({
|
|
24
24
|
displayName: 'StyledRadioInput',
|
|
25
25
|
Component: ({ children, variant, ...elemProps }, ref, Element) => {
|
|
26
|
-
return react_1.default.createElement(Element, Object.assign({ ref: ref },
|
|
26
|
+
return react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, radioInputStencil({ variant }))));
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
const radioInputWrapperStyles = canvas_kit_styling_1.createStencil({
|
|
@@ -41,7 +41,7 @@ const RadioInputWrapper = common_1.createComponent(layout_1.Flex)({
|
|
|
41
41
|
displayName: 'RadioInputWrapper',
|
|
42
42
|
Component: ({ children, variant, ...elemProps }, ref, Element) => {
|
|
43
43
|
const { disabled } = react_1.default.useContext(RadioLabel_1.RadioLabelContext);
|
|
44
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref },
|
|
44
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, radioInputWrapperStyles({ variant, disabled }))), children));
|
|
45
45
|
},
|
|
46
46
|
});
|
|
47
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../table/lib/Table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../table/lib/Table.tsx"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,KAAK;IAUd;;;;;;;;;;;;;;;;;;;;;MAqBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;CAGJ,CAAC"}
|
|
@@ -16,7 +16,9 @@ const TableFooter_1 = require("./TableFooter");
|
|
|
16
16
|
const TableCaption_1 = require("./TableCaption");
|
|
17
17
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
18
18
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
19
|
-
const
|
|
19
|
+
const tableStencil = canvas_kit_styling_1.createStencil({
|
|
20
|
+
base: { name: "1jt00fi", styles: "font-family:var(--cnvs-base-font-family-50, \"Roboto\");font-weight:var(--cnvs-base-font-weight-400, 400);line-height:var(--cnvs-base-line-height-100, 1.25rem);font-size:var(--cnvs-base-font-size-75, 0.875rem);letter-spacing:var(--cnvs-base-letter-spacing-150, 0.015rem);display:grid;border:0.0625rem solid var(--cnvs-base-palette-soap-500, rgba(206,211,217,1));border-radius:var(--cnvs-sys-shape-x2, calc(0.25rem * 2));overflow:auto;color:var(--cnvs-base-palette-black-pepper-300, rgba(73,73,73,1));box-sizing:border-box;" }
|
|
21
|
+
}, "table");
|
|
20
22
|
/**
|
|
21
23
|
* `Table` is a simple styled compound component that renders a [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) element. It is used to present information in a two-dimensional table comprised of rows and columns of cells containing data.
|
|
22
24
|
*
|
|
@@ -62,7 +64,7 @@ export default function App() {
|
|
|
62
64
|
exports.Table = common_1.createComponent('table')({
|
|
63
65
|
displayName: 'Table',
|
|
64
66
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
65
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps,
|
|
67
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableStencil())), children));
|
|
66
68
|
},
|
|
67
69
|
subComponents: {
|
|
68
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableBody.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableBody.tsx"],"names":[],"mappings":"AAgCA,eAAO,MAAM,SAAS,wMASpB,CAAC"}
|
|
@@ -8,10 +8,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
10
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
|
-
const
|
|
11
|
+
const tableBodyStencil = canvas_kit_styling_1.createStencil({
|
|
12
|
+
base: { name: "1aq46he", styles: "display:grid;box-sizing:border-box;tr {&:last-of-type{td, th{border-bottom:none;}}&:first-of-type{td, th{border-top:none;}}}td {&:last-of-type{border-inline-end:none;}&:first-of-type{border-inline-start:none;}}" }
|
|
13
|
+
}, "table-body");
|
|
12
14
|
exports.TableBody = common_1.createComponent('tbody')({
|
|
13
15
|
displayName: 'Table.Body',
|
|
14
16
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
15
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps,
|
|
17
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableBodyStencil())), children));
|
|
16
18
|
},
|
|
17
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCaption.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCaption.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableCaption.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCaption.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,YAAY,0MASvB,CAAC"}
|
|
@@ -9,10 +9,12 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
10
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
11
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
12
|
-
const
|
|
12
|
+
const tableCaptionStencil = canvas_kit_styling_1.createStencil({
|
|
13
|
+
base: { name: "mnuok4", styles: "display:flex;border-bottom:0.0625rem solid var(--cnvs-base-palette-soap-500, rgba(206,211,217,1));padding:var(--cnvs-sys-space-x2, calc(0.25rem * 2)) var(--cnvs-sys-space-x4, calc(0.25rem * 4));box-sizing:border-box;" }
|
|
14
|
+
}, "table-caption");
|
|
13
15
|
exports.TableCaption = common_1.createComponent('caption')({
|
|
14
16
|
displayName: 'Table.Caption',
|
|
15
17
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
16
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps,
|
|
18
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableCaptionStencil())), children));
|
|
17
19
|
},
|
|
18
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCell.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS,qMASpB,CAAC"}
|
|
@@ -9,10 +9,12 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
10
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
11
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
12
|
-
const
|
|
12
|
+
const tableCellStencil = canvas_kit_styling_1.createStencil({
|
|
13
|
+
base: { name: "iww62y", styles: "display:grid;align-items:center;background-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));border-bottom:0.0625rem solid var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));grid-template-columns:1fr;justify-content:start;min-height:3.5rem;padding:var(--cnvs-sys-space-x2, calc(0.25rem * 2)) var(--cnvs-sys-space-x4, calc(0.25rem * 4));word-break:break-word;box-sizing:border-box;" }
|
|
14
|
+
}, "table-cell");
|
|
13
15
|
exports.TableCell = common_1.createComponent('td')({
|
|
14
16
|
displayName: 'Table.Cell',
|
|
15
17
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
16
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps,
|
|
18
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableCellStencil())), children));
|
|
17
19
|
},
|
|
18
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFooter.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableFooter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableFooter.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableFooter.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW,wMAStB,CAAC"}
|
|
@@ -8,10 +8,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
10
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
|
-
const
|
|
11
|
+
const tableFooterStencil = canvas_kit_styling_1.createStencil({
|
|
12
|
+
base: { name: "197vc7s", styles: "display:grid;box-sizing:border-box;" }
|
|
13
|
+
}, "table-footer");
|
|
12
14
|
exports.TableFooter = common_1.createComponent('tfoot')({
|
|
13
15
|
displayName: 'Table.Footer',
|
|
14
16
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
15
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps,
|
|
17
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableFooterStencil())), children));
|
|
16
18
|
},
|
|
17
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHead.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableHead.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableHead.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableHead.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,SAAS,wMASpB,CAAC"}
|
|
@@ -9,10 +9,12 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
10
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
11
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
12
|
-
const
|
|
12
|
+
const tableHeadStencil = canvas_kit_styling_1.createStencil({
|
|
13
|
+
base: { name: "sv3y8l", styles: "display:grid;background-color:var(--cnvs-base-palette-soap-100, rgba(246,247,248,1));min-height:3rem;box-sizing:border-box;th {&:first-of-type{border-inline-start:none;}&:last-of-type{border-inline-end:none;}}" }
|
|
14
|
+
}, "table-head");
|
|
13
15
|
exports.TableHead = common_1.createComponent('thead')({
|
|
14
16
|
displayName: 'Table.Head',
|
|
15
17
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
16
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps,
|
|
18
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableHeadStencil())), children));
|
|
17
19
|
},
|
|
18
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableHeader.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,WAAW,qMAStB,CAAC"}
|
|
@@ -9,10 +9,12 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
10
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
11
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
12
|
-
const
|
|
12
|
+
const tableHeaderStencil = canvas_kit_styling_1.createStencil({
|
|
13
|
+
base: { name: "mt03mc", styles: "display:grid;align-items:center;background-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));border-bottom:0.0625rem solid var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));justify-content:start;min-height:3.5rem;padding:var(--cnvs-sys-space-x2, calc(0.25rem * 2)) var(--cnvs-sys-space-x4, calc(0.25rem * 4));word-break:break-word;font-weight:var(--cnvs-sys-font-weight-medium, 500);box-sizing:border-box;" }
|
|
14
|
+
}, "table-header");
|
|
13
15
|
exports.TableHeader = common_1.createComponent('th')({
|
|
14
16
|
displayName: 'Table.Header',
|
|
15
17
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
16
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps,
|
|
18
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableHeaderStencil())), children));
|
|
17
19
|
},
|
|
18
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableRow.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,QAAQ,qMAuBnB,CAAC"}
|
|
@@ -10,7 +10,9 @@ const common_1 = require("@workday/canvas-kit-react/common");
|
|
|
10
10
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
11
|
const childrenVars = canvas_kit_styling_1.createVars({ id: "cnvs-children", args: ["cellNumber"] });
|
|
12
12
|
// Styles for rows including dynamic sizing for amount of cells within a row
|
|
13
|
-
const
|
|
13
|
+
const tableRowStencil = canvas_kit_styling_1.createStencil({
|
|
14
|
+
base: { name: "s9e95c", styles: "display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--cnvs-children-cellNumber), minmax(10rem, 1fr));box-sizing:border-box;" }
|
|
15
|
+
}, "table-row");
|
|
14
16
|
exports.TableRow = common_1.createComponent('tr')({
|
|
15
17
|
displayName: 'Table.Row',
|
|
16
18
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
@@ -22,6 +24,6 @@ exports.TableRow = common_1.createComponent('tr')({
|
|
|
22
24
|
* This is the calculated amount of valid React children
|
|
23
25
|
*/
|
|
24
26
|
const childrenArray = validChildren(children).length;
|
|
25
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, [
|
|
27
|
+
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, [tableRowStencil(), { [childrenVars.cellNumber]: childrenArray }])), children));
|
|
26
28
|
},
|
|
27
29
|
});
|
|
@@ -9,7 +9,7 @@ import { FormFieldLabel } from './FormFieldLabel';
|
|
|
9
9
|
import { FormFieldHint } from './FormFieldHint';
|
|
10
10
|
import { FormFieldContainer } from './FormFieldContainer';
|
|
11
11
|
const formFieldStencil = createStencil({
|
|
12
|
-
base: { name: "
|
|
12
|
+
base: { name: "1elbum1", styles: "border:none;padding:0;margin:0 0 var(--cnvs-sys-space-x6, calc(0.25rem * 6));" },
|
|
13
13
|
modifiers: {
|
|
14
14
|
modifiers: {
|
|
15
15
|
true: { name: "6316w2", styles: "width:100%;[data-width=\"ck-formfield-width\"]{width:100%;}" }
|
|
@@ -6,9 +6,9 @@ import { useFormFieldLabel, useFormFieldModel } from './hooks';
|
|
|
6
6
|
import { createStencil, createStyles } from '@workday/canvas-kit-styling';
|
|
7
7
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
8
8
|
import { base, brand, system } from '@workday/canvas-tokens-web';
|
|
9
|
-
const asteriskStyles = createStyles({ name: "
|
|
9
|
+
const asteriskStyles = createStyles({ name: "1iydue3", styles: "margin-inline-start:var(--cnvs-sys-space-x1, 0.25rem);font-size:1.25rem;font-weight:400;text-decoration:unset;color:var(--cnvs-brand-error-base, rgba(222,46,33,1));" });
|
|
10
10
|
const labelStencil = createStencil({
|
|
11
|
-
base: { name: "
|
|
11
|
+
base: { name: "9lgv5i", styles: "font-family:var(--cnvs-base-font-family-50, \"Roboto\");font-weight:var(--cnvs-sys-font-weight-medium, 500);line-height:var(--cnvs-base-line-height-100, 1.25rem);font-size:var(--cnvs-base-font-size-75, 0.875rem);letter-spacing:var(--cnvs-base-letter-spacing-150, 0.015rem);color:var(--cnvs-base-palette-black-pepper-300, rgba(73,73,73,1));padding-inline-start:0;margin-bottom:var(--cnvs-sys-space-x1, 0.25rem);display:flex;align-items:center;min-width:180px;" },
|
|
12
12
|
modifiers: {
|
|
13
13
|
modifiers: {
|
|
14
14
|
horizontal: { name: "1hnsmpu", styles: "float:left;max-height:var(--cnvs-sys-space-x10, calc(0.25rem * 10));" },
|
|
@@ -23,8 +23,8 @@ const AI_COLORS = {
|
|
|
23
23
|
/**
|
|
24
24
|
* The animation for the sparkle.
|
|
25
25
|
*/
|
|
26
|
-
const LOADING_ANIMATION = keyframes({ name: "
|
|
27
|
-
const loadingSparklesIconStyles = createStyles({ name: "
|
|
26
|
+
const LOADING_ANIMATION = keyframes({ name: "1w9fjo1", styles: "0%, 79%, 100%{opacity:0.2;transform:scale(0.55);}27%{opacity:1;transform:scale(1);}53%{opacity:0.6;transform:scale(0.7);}" });
|
|
27
|
+
const loadingSparklesIconStyles = createStyles({ name: "1m6e4ch", styles: "animation-duration:1230ms;animation-fill-mode:both;animation-iteration-count:infinite;animation-name:animation-1w9fjo1;animation-timing-function:ease-in-out;.wd-sparkle-fill{fill:#8C17D2;}&:nth-child(1){animation-delay:0ms;}&:nth-child(2){animation-delay:calc(1230ms * (1/3));}&:nth-child(3){animation-delay:calc(1230ms * (2/3));}" });
|
|
28
28
|
/**
|
|
29
29
|
* An individual loading sparkle. ✨
|
|
30
30
|
*/
|
|
@@ -9,7 +9,7 @@ import { brand, system } from '@workday/canvas-tokens-web';
|
|
|
9
9
|
/**
|
|
10
10
|
* Styles for RadioGroup
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const radioGroupStencil = createStencil({
|
|
13
13
|
base: { name: "1lnyyji", styles: "display:flex;flex-direction:column;border-radius:var(--cnvs-sys-shape-x1, 0.25rem);gap:var(--cnvs-sys-space-x2, calc(0.25rem * 2));padding:0.625rem var(--cnvs-sys-space-x3, calc(0.25rem * 3)) var(--cnvs-sys-space-x2, calc(0.25rem * 2));margin:calc(var(--cnvs-sys-space-x1) * -1) calc(var(--cnvs-sys-space-x3) * -1);transition:100ms box-shadow;width:fit-content;" },
|
|
14
14
|
modifiers: {
|
|
15
15
|
modifiers: {
|
|
@@ -17,7 +17,7 @@ const radioGroupStyles = createStencil({
|
|
|
17
17
|
alert: { name: "qmneoc", styles: "box-shadow:inset 0 0 0 0.0625rem var(--cnvs-brand-alert-darkest, rgba(192,108,0,1)), inset 0 0 0 0.1875rem var(--cnvs-brand-alert-base, rgba(255,161,38,1));" }
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
}, "radio-group
|
|
20
|
+
}, "radio-group");
|
|
21
21
|
/**
|
|
22
22
|
* Use `RadioGroup` to group a collection of `RadioGroup.RadioButton` components under a common `name`.
|
|
23
23
|
*
|
|
@@ -60,5 +60,5 @@ export const RadioGroup = createContainer('div')({
|
|
|
60
60
|
Label: RadioLabel,
|
|
61
61
|
},
|
|
62
62
|
})(({ children, error, theme, ...elemProps }, Element) => {
|
|
63
|
-
return React.createElement(Element, Object.assign({}, mergeStyles(elemProps,
|
|
63
|
+
return React.createElement(Element, Object.assign({}, mergeStyles(elemProps, radioGroupStencil({ error }))), children);
|
|
64
64
|
});
|
|
@@ -6,9 +6,9 @@ import { RadioInput } from './RadioInput';
|
|
|
6
6
|
import { RadioText } from './RadioText';
|
|
7
7
|
import { createStencil } from '@workday/canvas-kit-styling';
|
|
8
8
|
import { system } from '@workday/canvas-tokens-web';
|
|
9
|
-
const
|
|
9
|
+
const radioLabelStencil = createStencil({
|
|
10
10
|
base: { name: "1ak69fu", styles: "align-items:flex-start;min-height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));position:relative;gap:var(--cnvs-sys-space-x3, calc(0.25rem * 3));" }
|
|
11
|
-
}, "radio-label
|
|
11
|
+
}, "radio-label");
|
|
12
12
|
export const RadioLabelContext = React.createContext({});
|
|
13
13
|
export const RadioLabel = createSubcomponent('label')({
|
|
14
14
|
displayName: 'Radio.Label',
|
|
@@ -43,5 +43,5 @@ export const RadioLabel = createSubcomponent('label')({
|
|
|
43
43
|
},
|
|
44
44
|
})(({ children, variant, disabled, value, ...elemProps }, Element) => {
|
|
45
45
|
return (React.createElement(RadioLabelContext.Provider, { value: { variant, disabled } },
|
|
46
|
-
React.createElement(Flex, Object.assign({ as: Element }, mergeStyles(elemProps,
|
|
46
|
+
React.createElement(Flex, Object.assign({ as: Element }, mergeStyles(elemProps, radioLabelStencil({ variant }))), children)));
|
|
47
47
|
});
|
|
@@ -6,7 +6,7 @@ import { Text } from '@workday/canvas-kit-react/text';
|
|
|
6
6
|
import { createStencil } from '@workday/canvas-kit-styling';
|
|
7
7
|
import { base, system } from '@workday/canvas-tokens-web';
|
|
8
8
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
9
|
-
const
|
|
9
|
+
const radioTextStencil = createStencil({
|
|
10
10
|
base: { name: "nwt3co", styles: "font-family:var(--cnvs-base-font-family-50, \"Roboto\");font-weight:var(--cnvs-base-font-weight-400, 400);line-height:var(--cnvs-base-line-height-100, 1.25rem);font-size:var(--cnvs-base-font-size-75, 0.875rem);letter-spacing:var(--cnvs-base-letter-spacing-150, 0.015rem);cursor:pointer;opacity:1;color:var(--cnvs-base-palette-black-pepper-300, rgba(73,73,73,1));" },
|
|
11
11
|
modifiers: {
|
|
12
12
|
modifiers: {
|
|
@@ -22,11 +22,11 @@ const radioTextStyles = createStencil({
|
|
|
22
22
|
styles: { name: "1c0ay3d", styles: "color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));opacity:var(--cnvs-sys-opacity-disabled, 0.4);" }
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
|
-
}, "radio-text
|
|
25
|
+
}, "radio-text");
|
|
26
26
|
export const RadioText = createSubcomponent('span')({
|
|
27
27
|
displayName: 'RadioButton.Text',
|
|
28
28
|
modelHook: useRadioModel,
|
|
29
29
|
})(({ children, ...elemProps }, Element) => {
|
|
30
30
|
const { variant, disabled } = React.useContext(RadioLabelContext);
|
|
31
|
-
return (React.createElement(Text, Object.assign({ as: Element }, mergeStyles(elemProps,
|
|
31
|
+
return (React.createElement(Text, Object.assign({ as: Element }, mergeStyles(elemProps, radioTextStencil({ variant, disabled }))), children));
|
|
32
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,GAAG,EAAoB,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAC,OAAO,EAA8B,MAAM,6BAA6B,CAAC;AAOjF,MAAM,WAAW,sBAAuB,SAAQ,OAAO;IACrD,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AA8MD,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC;IAC/E,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8FAY5B,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { focusRing, createComponent, } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
import { calc, createStencil,
|
|
3
|
+
import { Flex, mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
4
|
+
import { calc, createStencil, px2rem } from '@workday/canvas-kit-styling';
|
|
5
5
|
import { base, brand, system } from '@workday/canvas-tokens-web';
|
|
6
6
|
import { RadioLabelContext } from './RadioLabel';
|
|
7
7
|
const radioWidth = 18;
|
|
8
8
|
const radioHeight = 18;
|
|
9
|
-
const
|
|
9
|
+
const radioInputStencil = createStencil({
|
|
10
10
|
base: { name: "17rixmy", styles: "cursor:pointer;opacity:1;height:1.125rem;width:1.125rem;border-radius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));position:absolute;margin:0;&:focus-visible, &.focus, &:active{outline:transparent;}&:disabled, &.disabled{cursor:auto;+ .cnvs-radio-check{border-color:var(--cnvs-base-palette-licorice-100, rgba(161,170,179,1));background-color:var(--cnvs-base-palette-soap-100, rgba(246,247,248,1));}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-base-palette-licorice-100, rgba(161,170,179,1));}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));border:5px solid var(--cnvs-brand-primary-base, rgba(8,117,225,1));}}+ .cnvs-radio-check{display:flex;flex-direction:column;align-items:center;background-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));border-radius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));box-sizing:border-box;border:0.0625rem solid var(--cnvs-base-palette-licorice-200, rgba(123,133,143,1));height:1.125rem;width:1.125rem;justify-content:center;pointer-events:none;position:absolute;transition:border 200ms ease, background 200ms;opacity:1;}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-base-palette-licorice-500, rgba(51,61,71,1));}&:focus-visible + .cnvs-radio-check, &.focus + .cnvs-radio-check{border-color:var(--cnvs-base-palette-blueberry-400, rgba(8,117,225,1));box-shadow:0 0 0 0px var(--cnvs-base-palette-french-vanilla-100), 0 0 0 1px var(--cnvs-brand-common-focus-outline);}&:focus-visible:hover + .cnvs-radio-check, &.focus:hover + .cnvs-radio-check{outline:transparent;}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));border:0.3125rem solid var(--cnvs-brand-primary-base, rgba(8,117,225,1));}&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check{outline:transparent;box-shadow:0 0 0 2px var(--cnvs-base-palette-french-vanilla-100), 0 0 0 4px var(--cnvs-brand-common-focus-outline);}" },
|
|
11
11
|
modifiers: {
|
|
12
12
|
modifiers: {
|
|
13
13
|
inverse: { name: "1e4i6j2", styles: "+ .cnvs-radio-check{background-color:var(--cnvs-base-palette-soap-100, rgba(246,247,248,1));border-color:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));}&:disabled, &.disabled{opacity:var(--cnvs-sys-opacity-disabled, 0.4);+ .cnvs-radio-check{background-color:var(--cnvs-base-palette-soap-100, rgba(246,247,248,1));border-color:var(--cnvs-base-palette-licorice-100, rgba(161,170,179,1));opacity:var(--cnvs-sys-opacity-disabled, 0.4);}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-base, rgba(8,117,225,1));border-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));}}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));}&:focus-visible + .cnvs-radio-check, &.focus + .cnvs-radio-check{border-color:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-base, rgba(8,117,225,1));border-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));}&:focus-visible + .cnvs-radio-check, &:focus-visible:hover + .cnvs-radio-check, &.focus + .cnvs-radio-check, &.focus:hover + .cnvs-radio-check{box-shadow:0 0 0 0px var(--cnvs-base-palette-black-pepper-400), 0 0 0 2px var(--cnvs-base-palette-french-vanilla-100);}&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check{box-shadow:0 0 0 2px var(--cnvs-base-palette-black-pepper-400), 0 0 0 4px var(--cnvs-base-palette-french-vanilla-100);}" }
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
}, "radio-input
|
|
16
|
+
}, "radio-input");
|
|
17
17
|
const StyledRadioInput = createComponent('input')({
|
|
18
18
|
displayName: 'StyledRadioInput',
|
|
19
19
|
Component: ({ children, variant, ...elemProps }, ref, Element) => {
|
|
20
|
-
return React.createElement(Element, Object.assign({ ref: ref },
|
|
20
|
+
return React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, radioInputStencil({ variant }))));
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
const radioInputWrapperStyles = createStencil({
|
|
@@ -35,7 +35,7 @@ const RadioInputWrapper = createComponent(Flex)({
|
|
|
35
35
|
displayName: 'RadioInputWrapper',
|
|
36
36
|
Component: ({ children, variant, ...elemProps }, ref, Element) => {
|
|
37
37
|
const { disabled } = React.useContext(RadioLabelContext);
|
|
38
|
-
return (React.createElement(Element, Object.assign({ ref: ref },
|
|
38
|
+
return (React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, radioInputWrapperStyles({ variant, disabled }))), children));
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../table/lib/Table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../table/lib/Table.tsx"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,KAAK;IAUd;;;;;;;;;;;;;;;;;;;;;MAqBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;CAGJ,CAAC"}
|
|
@@ -8,9 +8,11 @@ import { TableHeader } from './TableHeader';
|
|
|
8
8
|
import { TableCell } from './TableCell';
|
|
9
9
|
import { TableFooter } from './TableFooter';
|
|
10
10
|
import { TableCaption } from './TableCaption';
|
|
11
|
-
import {
|
|
11
|
+
import { createStencil, px2rem } from '@workday/canvas-kit-styling';
|
|
12
12
|
import { base, system } from '@workday/canvas-tokens-web';
|
|
13
|
-
const
|
|
13
|
+
const tableStencil = createStencil({
|
|
14
|
+
base: { name: "1jt00fi", styles: "font-family:var(--cnvs-base-font-family-50, \"Roboto\");font-weight:var(--cnvs-base-font-weight-400, 400);line-height:var(--cnvs-base-line-height-100, 1.25rem);font-size:var(--cnvs-base-font-size-75, 0.875rem);letter-spacing:var(--cnvs-base-letter-spacing-150, 0.015rem);display:grid;border:0.0625rem solid var(--cnvs-base-palette-soap-500, rgba(206,211,217,1));border-radius:var(--cnvs-sys-shape-x2, calc(0.25rem * 2));overflow:auto;color:var(--cnvs-base-palette-black-pepper-300, rgba(73,73,73,1));box-sizing:border-box;" }
|
|
15
|
+
}, "table");
|
|
14
16
|
/**
|
|
15
17
|
* `Table` is a simple styled compound component that renders a [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) element. It is used to present information in a two-dimensional table comprised of rows and columns of cells containing data.
|
|
16
18
|
*
|
|
@@ -56,7 +58,7 @@ export default function App() {
|
|
|
56
58
|
export const Table = createComponent('table')({
|
|
57
59
|
displayName: 'Table',
|
|
58
60
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
59
|
-
return (React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps,
|
|
61
|
+
return (React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, tableStencil())), children));
|
|
60
62
|
},
|
|
61
63
|
subComponents: {
|
|
62
64
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableBody.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableBody.tsx"],"names":[],"mappings":"AAgCA,eAAO,MAAM,SAAS,wMASpB,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
4
|
+
import { createStencil } from '@workday/canvas-kit-styling';
|
|
5
|
+
const tableBodyStencil = createStencil({
|
|
6
|
+
base: { name: "1aq46he", styles: "display:grid;box-sizing:border-box;tr {&:last-of-type{td, th{border-bottom:none;}}&:first-of-type{td, th{border-top:none;}}}td {&:last-of-type{border-inline-end:none;}&:first-of-type{border-inline-start:none;}}" }
|
|
7
|
+
}, "table-body");
|
|
6
8
|
export const TableBody = createComponent('tbody')({
|
|
7
9
|
displayName: 'Table.Body',
|
|
8
10
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
9
|
-
return (React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps,
|
|
11
|
+
return (React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, tableBodyStencil())), children));
|
|
10
12
|
},
|
|
11
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCaption.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCaption.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableCaption.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCaption.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,YAAY,0MASvB,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
4
|
-
import {
|
|
4
|
+
import { createStencil, px2rem } from '@workday/canvas-kit-styling';
|
|
5
5
|
import { base, system } from '@workday/canvas-tokens-web';
|
|
6
|
-
const
|
|
6
|
+
const tableCaptionStencil = createStencil({
|
|
7
|
+
base: { name: "mnuok4", styles: "display:flex;border-bottom:0.0625rem solid var(--cnvs-base-palette-soap-500, rgba(206,211,217,1));padding:var(--cnvs-sys-space-x2, calc(0.25rem * 2)) var(--cnvs-sys-space-x4, calc(0.25rem * 4));box-sizing:border-box;" }
|
|
8
|
+
}, "table-caption");
|
|
7
9
|
export const TableCaption = createComponent('caption')({
|
|
8
10
|
displayName: 'Table.Caption',
|
|
9
11
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
10
|
-
return (React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps,
|
|
12
|
+
return (React.createElement(Element, Object.assign({ ref: ref }, mergeStyles(elemProps, tableCaptionStencil())), children));
|
|
11
13
|
},
|
|
12
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCell.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS,qMASpB,CAAC"}
|