@workday/canvas-kit-react 16.0.0-alpha.0462-next.0 → 16.0.0-alpha.0464-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/action-bar/lib/ActionBarList.tsx +2 -3
- package/checkbox/lib/CheckboxContainer.tsx +0 -1
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +1 -8
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarList.js +2 -2
- package/dist/commonjs/checkbox/lib/CheckboxContainer.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +6 -4
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +17 -17
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +12 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +10 -4
- package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.js +2 -2
- package/dist/commonjs/toast/lib/ToastBody.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/ToastBody.js +2 -3
- package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +3 -3
- package/dist/commonjs/toast/lib/ToastIcon.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/ToastIcon.js +3 -3
- package/dist/commonjs/tooltip/lib/TooltipContainer.d.ts +1 -4
- package/dist/commonjs/tooltip/lib/TooltipContainer.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/TooltipContainer.js +2 -2
- package/dist/es6/action-bar/lib/ActionBarList.d.ts +1 -8
- package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarList.js +3 -3
- package/dist/es6/checkbox/lib/CheckboxContainer.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +6 -4
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +19 -19
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +12 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +11 -5
- package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.js +3 -3
- package/dist/es6/toast/lib/ToastBody.d.ts.map +1 -1
- package/dist/es6/toast/lib/ToastBody.js +2 -3
- package/dist/es6/toast/lib/ToastCloseIcon.d.ts.map +1 -1
- package/dist/es6/toast/lib/ToastCloseIcon.js +4 -4
- package/dist/es6/toast/lib/ToastIcon.d.ts.map +1 -1
- package/dist/es6/toast/lib/ToastIcon.js +4 -4
- package/dist/es6/tooltip/lib/TooltipContainer.d.ts +1 -4
- package/dist/es6/tooltip/lib/TooltipContainer.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/TooltipContainer.js +2 -2
- package/package.json +4 -4
- package/segmented-control/lib/SegmentedControlItem.tsx +23 -30
- package/segmented-control/lib/SegmentedControlList.tsx +17 -4
- package/toast/lib/Toast.tsx +11 -3
- package/toast/lib/ToastBody.tsx +1 -3
- package/toast/lib/ToastCloseIcon.tsx +5 -3
- package/toast/lib/ToastIcon.tsx +9 -3
- package/tooltip/lib/TooltipContainer.tsx +14 -19
|
@@ -5,64 +5,64 @@ import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
|
5
5
|
import { systemIconStencil } from '@workday/canvas-kit-react/icon';
|
|
6
6
|
import { Text } from '@workday/canvas-kit-react/text';
|
|
7
7
|
import { Tooltip } from '@workday/canvas-kit-react/tooltip';
|
|
8
|
-
import {
|
|
9
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
8
|
+
import { createStencil, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
9
|
+
import { base, system } from '@workday/canvas-tokens-web';
|
|
10
10
|
import { useSegmentedControlItem } from './hooks/useSegmentedControlItem';
|
|
11
11
|
import { useSegmentedControlModel } from './hooks/useSegmentedControlModel';
|
|
12
12
|
export const segmentedControlItemStencil = createStencil({
|
|
13
13
|
extends: buttonStencil,
|
|
14
|
-
base: { name: "
|
|
14
|
+
base: { name: "1a5vzh", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default, \"Roboto\");font-weight:var(--cnvs-sys-font-weight-medium);line-height:var(--cnvs-sys-line-height-subtext-lg, 1.25rem);font-size:var(--cnvs-sys-font-size-subtext-lg, 0.875rem);letter-spacing:var(--cnvs-sys-letter-spacing-subtext-lg, 0.015rem);text-align:start;padding-inline:0;gap:var(--cnvs-sys-gap-xs, var(--cnvs-sys-space-x1, 0.25rem));--borderRadius-button-a19f67:var(--cnvs-sys-shape-full, var(--cnvs-sys-shape-round, 65rem));--label-button-a19f67:var(--cnvs-sys-color-fg-muted-default);--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-muted-default);&:hover, &.hover{--background-button-a19f67:var(--cnvs-sys-color-surface-overlay-hover-default);--label-button-a19f67:var(--cnvs-sys-color-fg-strong);--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-strong);}&:active, &.active{--background-button-a19f67:var(--cnvs-sys-color-surface-overlay-pressed-default);--label-button-a19f67:var(--cnvs-sys-color-fg-strong);--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-strong);}&:focus-visible, &.focus{--label-button-a19f67:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-muted-strong);}&:disabled, &.disabled{--opacity-button-a19f67:var(--cnvs-sys-opacity-disabled);--background-button-a19f67:var(--cnvs-sys-color-surface-transparent, var(--cnvs-sys-color-bg-transparent-default, oklch(0 0 0 / 0)));--label-button-a19f67:var(--cnvs-sys-color-fg-muted-default);--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-muted-default);}&[aria-pressed='true']{--background-button-a19f67:var(--cnvs-sys-color-surface-default, var(--cnvs-sys-color-bg-default, oklch(1 0 0 / 1)));--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-strong);--label-button-a19f67:var(--cnvs-sys-color-fg-strong);box-shadow:var(--cnvs-sys-depth-2);&:hover, &.hover{--color-system-icon-c9acc3:var(--cnvs-sys-color-fg-strong);--label-button-a19f67:var(--cnvs-sys-color-fg-strong);}&:focus-visible, &.focus{box-shadow:0 0 0 0.125rem var(--cnvs-sys-color-border-inverse-default, var(--cnvs-sys-color-border-inverse, oklch(1 0 0 / 1))),0 0 0 0.25rem var(--cnvs-sys-color-brand-border-primary);}&:disabled, &.disabled{--opacity-button-a19f67:var(--cnvs-sys-opacity-disabled);}}:dir(rtl){svg{transform:scaleX(-1);}}" },
|
|
15
15
|
modifiers: {
|
|
16
16
|
size: {
|
|
17
|
-
large: { name: "
|
|
18
|
-
medium: { name: "
|
|
19
|
-
small: { name: "
|
|
17
|
+
large: { name: "3ofsmr", styles: "height:var(--cnvs-sys-size-sm, var(--cnvs-sys-space-x8, 2rem));font-size:var(--cnvs-sys-font-size-subtext-lg, var(--cnvs-sys-font-size-subtext-large, 0.875rem));" },
|
|
18
|
+
medium: { name: "2vjldc", styles: "height:var(--cnvs-base-size-350, 1.75rem);font-weight:var(--cnvs-sys-font-weight-semibold, 600);" },
|
|
19
|
+
small: { name: "3hli5n", styles: "font-family:var(--cnvs-sys-font-family-default);font-size:var(--cnvs-sys-font-size-subtext-md, var(--cnvs-sys-font-size-subtext-medium, 0.75rem));line-height:var(--cnvs-sys-line-height-subtext-md, var(--cnvs-sys-line-height-subtext-medium, 1rem));letter-spacing:var(--cnvs-sys-letter-spacing-subtext-md, var(--cnvs-sys-type-letter-spacing-subtext-medium));font-weight:var(--cnvs-sys-font-weight-medium);height:var(--cnvs-sys-size-xs, var(--cnvs-sys-space-x6, 1.5rem));gap:var(--cnvs-base-size-25, 0.125rem);" }
|
|
20
20
|
},
|
|
21
21
|
variant: {
|
|
22
|
-
iconOnly: { name: "
|
|
23
|
-
textOnly: { name: "
|
|
24
|
-
iconWithText: { name: "
|
|
22
|
+
iconOnly: { name: "3j27lk", styles: "" },
|
|
23
|
+
textOnly: { name: "1k758v", styles: "" },
|
|
24
|
+
iconWithText: { name: "2kn9nw", styles: "" }
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
compound: [
|
|
28
28
|
{
|
|
29
29
|
modifiers: { size: 'large', variant: 'iconOnly' },
|
|
30
|
-
styles: { name: "
|
|
30
|
+
styles: { name: "2g2eij", styles: "min-width:var(--cnvs-sys-size-sm, var(--cnvs-sys-space-x8, 2rem));" }
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
modifiers: { size: 'large', variant: 'iconWithText' },
|
|
34
|
-
styles: { name: "
|
|
34
|
+
styles: { name: "2i43bn", styles: "padding-inline:var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem)) var(--cnvs-sys-padding-md, var(--cnvs-sys-space-x4, 1rem));" }
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
modifiers: { size: 'large', variant: 'textOnly' },
|
|
38
|
-
styles: { name: "
|
|
38
|
+
styles: { name: "2mrwg2", styles: "padding-inline:var(--cnvs-sys-padding-xl, var(--cnvs-sys-space-x6, 1.5rem));" }
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
modifiers: { size: 'medium', variant: 'iconOnly' },
|
|
42
|
-
styles: { name: "
|
|
42
|
+
styles: { name: "1w5x7w", styles: "min-width:var(--cnvs-base-size-350, 1.75rem);" }
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
modifiers: { size: 'medium', variant: 'iconWithText' },
|
|
46
|
-
styles: { name: "
|
|
46
|
+
styles: { name: "10t3qa", styles: "padding-inline:var(--cnvs-sys-padding-xs, var(--cnvs-sys-space-x2, 0.5rem)) var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem));" }
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
modifiers: { size: 'medium', variant: 'textOnly' },
|
|
50
|
-
styles: { name: "
|
|
50
|
+
styles: { name: "sgty4", styles: "padding-inline:var(--cnvs-sys-padding-lg, var(--cnvs-sys-space-x5, 1.25rem));" }
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
modifiers: { size: 'small', variant: 'iconOnly' },
|
|
54
|
-
styles: { name: "
|
|
54
|
+
styles: { name: "36lfmb", styles: "min-width:var(--cnvs-sys-size-xs, var(--cnvs-sys-space-x6, 1.5rem));" }
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
modifiers: { size: 'small', variant: 'iconWithText' },
|
|
58
|
-
styles: { name: "
|
|
58
|
+
styles: { name: "3haxrq", styles: "padding-inline:var(--cnvs-base-size-75, 0.375rem) var(--cnvs-sys-padding-xs, var(--cnvs-sys-space-x2, 0.5rem));" }
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
modifiers: { size: 'small', variant: 'textOnly' },
|
|
62
|
-
styles: { name: "
|
|
62
|
+
styles: { name: "akzny", styles: "padding-inline:var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem));" }
|
|
63
63
|
}
|
|
64
64
|
]
|
|
65
|
-
}, "segmented-control-item-
|
|
65
|
+
}, "segmented-control-item-652603");
|
|
66
66
|
const Container = ({ tooltipProps, children }) => {
|
|
67
67
|
return tooltipProps ? (_jsx(Tooltip, { ...tooltipProps, children: children })) : (_jsx(React.Fragment, { children: children }));
|
|
68
68
|
};
|
|
@@ -6,6 +6,18 @@ export interface SegmentedControlListProps<T = any> extends Omit<Partial<Extract
|
|
|
6
6
|
children: ((item: T) => React.ReactNode) | React.ReactNode;
|
|
7
7
|
}
|
|
8
8
|
export declare const segmentedControlListStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
9
|
+
size: {
|
|
10
|
+
large: {
|
|
11
|
+
padding: "var(--cnvs-sys-padding-xxs, var(--cnvs-sys-space-x1, 0.25rem))";
|
|
12
|
+
};
|
|
13
|
+
medium: {
|
|
14
|
+
padding: "var(--cnvs-base-size-25, 0.125rem)";
|
|
15
|
+
};
|
|
16
|
+
small: {
|
|
17
|
+
padding: "var(--cnvs-base-size-25, 0.125rem)";
|
|
18
|
+
gap: "var(--cnvs-base-size-25, 0.125rem)";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
9
21
|
orientation: {
|
|
10
22
|
vertical: ({ items }: {
|
|
11
23
|
items: `--${string}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlList.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAMtD,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,GAAG,CAChD,SAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"SegmentedControlList.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAMtD,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,GAAG,CAChD,SAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkCtC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB/B,CAAC"}
|
|
@@ -2,20 +2,25 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useListRenderItems } from '@workday/canvas-kit-react/collection';
|
|
3
3
|
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
4
4
|
import { createStencil, handleCsProp } from '@workday/canvas-kit-styling';
|
|
5
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
5
|
+
import { base, system } from '@workday/canvas-tokens-web';
|
|
6
6
|
import { useSegmentedControlModel } from './hooks/useSegmentedControlModel';
|
|
7
7
|
export const segmentedControlListStencil = createStencil({
|
|
8
8
|
vars: {
|
|
9
9
|
items: '',
|
|
10
10
|
},
|
|
11
|
-
base: { name: "
|
|
11
|
+
base: { name: "4d0nnu", styles: "box-sizing:border-box;display:inline-grid;background-color:var(--cnvs-sys-color-surface-alt-default, var(--cnvs-sys-color-bg-alt-soft, oklch(0.3343 0.0951 253.3 / 0.05)));border:0 solid var(--cnvs-sys-color-border-transparent);border-radius:var(--cnvs-sys-shape-full, var(--cnvs-sys-shape-round, 65rem));padding:var(--cnvs-sys-padding-xxs, var(--cnvs-sys-space-x1, 0.25rem));grid-gap:var(--cnvs-sys-gap-xs, var(--cnvs-sys-space-x1, 0.25rem));" },
|
|
12
12
|
modifiers: {
|
|
13
|
+
size: {
|
|
14
|
+
large: { name: "3qywaa", styles: "padding:var(--cnvs-sys-padding-xxs, var(--cnvs-sys-space-x1, 0.25rem));" },
|
|
15
|
+
medium: { name: "41xl8e", styles: "padding:var(--cnvs-base-size-25, 0.125rem);" },
|
|
16
|
+
small: { name: "36z2j", styles: "padding:var(--cnvs-base-size-25, 0.125rem);gap:var(--cnvs-base-size-25, 0.125rem);" }
|
|
17
|
+
},
|
|
13
18
|
orientation: {
|
|
14
|
-
vertical: { name: "
|
|
15
|
-
horizontal: { name: "
|
|
19
|
+
vertical: { name: "3pptd9", styles: "grid-template-rows:repeat(var(--items-segmented-control-list-abbea3), 1fr);" },
|
|
20
|
+
horizontal: { name: "2ocxki", styles: "grid-template-columns:repeat(var(--items-segmented-control-list-abbea3), 1fr);" }
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
|
-
}, "segmented-control-list-
|
|
23
|
+
}, "segmented-control-list-abbea3");
|
|
19
24
|
export const SegmentedControlList = createSubcomponent('div')({
|
|
20
25
|
displayName: 'SegmentedControl.List',
|
|
21
26
|
modelHook: useSegmentedControlModel,
|
|
@@ -23,5 +28,6 @@ export const SegmentedControlList = createSubcomponent('div')({
|
|
|
23
28
|
return (_jsx(Element, { role: "group", ...handleCsProp(elemProps, segmentedControlListStencil({
|
|
24
29
|
items: `${model.state.items.length}`,
|
|
25
30
|
orientation: model.state.orientation,
|
|
31
|
+
size: model.state.size,
|
|
26
32
|
})), children: useListRenderItems(model, children) }));
|
|
27
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAWtD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAWtD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC;CAAG;AAqD5F;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;IAId;;;;;;;;;OASG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;;;;;;;IAEH;;OAEG;;CAYL,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { createContainer } from '@workday/canvas-kit-react/common';
|
|
|
3
3
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { Popup } from '@workday/canvas-kit-react/popup';
|
|
5
5
|
import { createStencil, px2rem } from '@workday/canvas-kit-styling';
|
|
6
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
6
|
+
import { base, system } from '@workday/canvas-tokens-web';
|
|
7
7
|
import { ToastBody } from './ToastBody';
|
|
8
8
|
import { ToastCloseIcon } from './ToastCloseIcon';
|
|
9
9
|
import { ToastIcon } from './ToastIcon';
|
|
@@ -42,8 +42,8 @@ const getAriaAttributes = (mode, id) => {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
const toastStencil = createStencil({
|
|
45
|
-
base: { name: "
|
|
46
|
-
}, "toast-
|
|
45
|
+
base: { name: "3qkpd3", styles: "box-sizing:border-box;display:flex;flex-direction:row;width:22.5rem;padding-block:var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem));padding-inline:var(--cnvs-sys-padding-md, var(--cnvs-sys-space-x4, 1rem)) var(--cnvs-sys-padding-xl, var(--cnvs-sys-space-x6, 1.5rem));gap:var(--cnvs-base-size-150, 0.75rem);border-radius:var(--cnvs-sys-shape-xl, var(--cnvs-sys-shape-x4, 1rem));border:0.0625rem solid var(--cnvs-sys-color-border-default);background-color:var(--cnvs-sys-color-surface-default, var(--cnvs-sys-color-bg-default, oklch(1 0 0 / 1)));box-shadow:var(--cnvs-sys-depth-3);@media (forced-colors: active){outline:0.0625rem solid CanvasText;}" }
|
|
46
|
+
}, "toast-4e8aec");
|
|
47
47
|
/**
|
|
48
48
|
* Toast is a compound component that has different modes based on its contents. The modes add the proper aria attributes for accessibility
|
|
49
49
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastBody.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastBody.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ToastBody.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastBody.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAGtD,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC;CAAG;AAE1E,eAAO,MAAM,gBAAgB,iJAQ3B,CAAC;AAEH,eAAO,MAAM,SAAS,oFASpB,CAAC"}
|
|
@@ -2,10 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { Flex, mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { createStencil } from '@workday/canvas-kit-styling';
|
|
5
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
6
5
|
export const toastBodyStencil = createStencil({
|
|
7
|
-
base: { name: "
|
|
8
|
-
}, "toast-body-
|
|
6
|
+
base: { name: "3nmn23", styles: "box-sizing:border-box;align-items:flex-start;flex-direction:column;justify-content:center;flex-grow:1;gap:0;" }
|
|
7
|
+
}, "toast-body-36e90e");
|
|
9
8
|
export const ToastBody = createComponent('div')({
|
|
10
9
|
displayName: 'Toast.Body',
|
|
11
10
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastCloseIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAGtD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;CAAG;AAE3F,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ToastCloseIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAGtD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;CAAG;AAE3F,eAAO,MAAM,qBAAqB,iJAMhC,CAAC;AAEH,eAAO,MAAM,cAAc,4FAYzB,CAAC"}
|
|
@@ -2,13 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { Popup } from '@workday/canvas-kit-react/popup';
|
|
5
|
-
import { createStencil } from '@workday/canvas-kit-styling';
|
|
5
|
+
import { createStencil, px2rem } from '@workday/canvas-kit-styling';
|
|
6
6
|
export const toastCloseIconStencil = createStencil({
|
|
7
|
-
base: { name: "
|
|
8
|
-
}, "toast-close-icon-
|
|
7
|
+
base: { name: "292ls0", styles: "box-sizing:border-box;position:absolute;inset-block-start:0.125rem;inset-inline-end:0.125rem;" }
|
|
8
|
+
}, "toast-close-icon-2d1000");
|
|
9
9
|
export const ToastCloseIcon = createComponent('button')({
|
|
10
10
|
displayName: 'Toast.CloseIcon',
|
|
11
11
|
Component: (elemProps, ref, Element) => {
|
|
12
|
-
return (_jsx(Popup.CloseIcon, { as: Element, ref: ref, size: "
|
|
12
|
+
return (_jsx(Popup.CloseIcon, { as: Element, ref: ref, size: "extraSmall", ...mergeStyles(elemProps, toastCloseIconStencil()) }));
|
|
13
13
|
},
|
|
14
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAI3E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC;CAAG;AAE9E,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ToastIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAI3E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC;CAAG;AAE9E,eAAO,MAAM,gBAAgB,iJAI3B,CAAC;AAEH,eAAO,MAAM,SAAS,oFAYpB,CAAC"}
|
|
@@ -2,13 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
4
4
|
import { createStencil, handleCsProp } from '@workday/canvas-kit-styling';
|
|
5
|
-
import {
|
|
5
|
+
import { component } from '@workday/canvas-tokens-web';
|
|
6
6
|
export const toastIconStencil = createStencil({
|
|
7
|
-
base: { name: "
|
|
8
|
-
}, "toast-icon-
|
|
7
|
+
base: { name: "19wdy9", styles: "box-sizing:border-box;align-self:start;" }
|
|
8
|
+
}, "toast-icon-7830d1");
|
|
9
9
|
export const ToastIcon = createComponent('div')({
|
|
10
10
|
displayName: 'Toast.Icon',
|
|
11
11
|
Component: (elemProps, ref, Element) => {
|
|
12
|
-
return _jsx(SystemIcon, { ref: ref, as: Element, ...handleCsProp(elemProps, toastIconStencil()) });
|
|
12
|
+
return (_jsx(SystemIcon, { ref: ref, as: Element, size: component.legacy.systemIcon.size.md, ...handleCsProp(elemProps, toastIconStencil()) }));
|
|
13
13
|
},
|
|
14
14
|
});
|
|
@@ -20,10 +20,7 @@ export interface TooltipContainerProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
20
20
|
export declare const tooltipContainerStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
21
21
|
elementHasFocus: {
|
|
22
22
|
true: {
|
|
23
|
-
|
|
24
|
-
'&:before': {
|
|
25
|
-
margin: "var(--cnvs-base-size-75, 0.375rem)";
|
|
26
|
-
};
|
|
23
|
+
margin: string;
|
|
27
24
|
};
|
|
28
25
|
};
|
|
29
26
|
}, {}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContainer.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/TooltipContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,eAAe,EAGhB,MAAM,kCAAkC,CAAC;AAK1C,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACjF;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAuBD,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"TooltipContainer.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/TooltipContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,eAAe,EAGhB,MAAM,kCAAkC,CAAC;AAK1C,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACjF;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAuBD,eAAO,MAAM,uBAAuB;;;;;;;;;gBAkElC,CAAC;AAEH,eAAO,MAAM,gBAAgB,2FA4B3B,CAAC"}
|
|
@@ -17,10 +17,10 @@ export const tooltipContainerStencil = createStencil({
|
|
|
17
17
|
tooltipTransformOriginHorizontal: '',
|
|
18
18
|
tooltipTransformOriginVertical: '',
|
|
19
19
|
},
|
|
20
|
-
base: { name: "
|
|
20
|
+
base: { name: "259blp", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default, \"Roboto\");font-weight:var(--cnvs-sys-font-weight-normal, 400);line-height:var(--cnvs-sys-line-height-subtext-lg, 1.25rem);font-size:var(--cnvs-sys-font-size-subtext-lg, 0.875rem);letter-spacing:var(--cnvs-sys-letter-spacing-subtext-lg, 0.015rem);display:inline-flex;position:relative;padding:0.375rem var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3, 0.75rem));color:var(--cnvs-sys-color-fg-default);animation-name:animation-3s4los;animation-duration:150ms;animation-timing-function:ease-out;transform-origin:var(--tooltipTransformOriginVertical-tooltip-container-0d74d6) var(--tooltipTransformOriginHorizontal-tooltip-container-0d74d6);margin:var(--cnvs-sys-gap-xs, var(--cnvs-sys-space-x1, 0.25rem));a{color:var(--cnvs-sys-color-fg-default);text-decoration:underline;}&:before{content:\"\";border-radius:var(--cnvs-sys-shape-full, var(--cnvs-sys-shape-round, 65rem));border:0.0625rem solid var(--cnvs-sys-color-border-default);z-index:-1;margin:0;background-color:var(--cnvs-sys-color-surface-default, var(--cnvs-sys-color-bg-default, oklch(1 0 0 / 1)));position:absolute;top:0;left:0;right:0;bottom:0;box-shadow:var(--cnvs-sys-depth-2);}[data-popper-reference-hidden] &{visibility:hidden;pointer-events:none;}[data-popper-placement=\"top-start\"] &, [data-popper-placement=\"bottom-start\"] &{left:calc(var(--cnvs-base-size-50, 0.25rem) * -1);}[data-popper-placement=\"top-end\"] &, [data-popper-placement=\"bottom-end\"] &{right:calc(var(--cnvs-base-size-50, 0.25rem) * -1);}[data-popper-placement=\"left-start\"] &, [data-popper-placement=\"right-start\"] &{top:calc(var(--cnvs-base-size-50, 0.25rem) * -1);}[data-popper-placement=\"left-end\"] &, [data-popper-placement=\"right-end\"] &{bottom:calc(var(--cnvs-base-size-50, 0.25rem) * -1);}@media (forced-colors: active){outline:0.0625rem solid CanvasText;}" },
|
|
21
21
|
modifiers: {
|
|
22
22
|
elementHasFocus: {
|
|
23
|
-
true: { name: "
|
|
23
|
+
true: { name: "ak2vn", styles: "margin:0.375rem;" }
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}, "tooltip-container-0d74d6");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "16.0.0-alpha.
|
|
3
|
+
"version": "16.0.0-alpha.0464-next.0",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@tanstack/react-virtual": "^3.13.9",
|
|
54
54
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
55
55
|
"@workday/canvas-expressive-icons-web": "1.0.2",
|
|
56
|
-
"@workday/canvas-kit-popup-stack": "^16.0.0-alpha.
|
|
57
|
-
"@workday/canvas-kit-styling": "^16.0.0-alpha.
|
|
56
|
+
"@workday/canvas-kit-popup-stack": "^16.0.0-alpha.0464-next.0",
|
|
57
|
+
"@workday/canvas-kit-styling": "^16.0.0-alpha.0464-next.0",
|
|
58
58
|
"@workday/canvas-system-icons-web": "4.0.4",
|
|
59
59
|
"@workday/canvas-tokens-web": "4.4.0-beta.6",
|
|
60
60
|
"@workday/design-assets-types": "^0.3.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
70
70
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "e91ae68242623c9e4d24b9fbdc3ce7ea8368c425"
|
|
73
73
|
}
|
|
@@ -5,9 +5,9 @@ import {createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
|
5
5
|
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
6
6
|
import {Text} from '@workday/canvas-kit-react/text';
|
|
7
7
|
import {Tooltip, TooltipProps} from '@workday/canvas-kit-react/tooltip';
|
|
8
|
-
import {
|
|
8
|
+
import {createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
9
9
|
import {CanvasSystemIcon} from '@workday/canvas-system-icons-web';
|
|
10
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
10
|
+
import {base, system} from '@workday/canvas-tokens-web';
|
|
11
11
|
|
|
12
12
|
import {useSegmentedControlItem} from './hooks/useSegmentedControlItem';
|
|
13
13
|
import {useSegmentedControlModel} from './hooks/useSegmentedControlModel';
|
|
@@ -53,37 +53,24 @@ export interface ItemProps extends ButtonContainerProps {
|
|
|
53
53
|
export const segmentedControlItemStencil = createStencil({
|
|
54
54
|
extends: buttonStencil,
|
|
55
55
|
base: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
lineHeight: system.legacy.lineHeight.subtext.lg,
|
|
59
|
-
letterSpacing: system.legacy.letterSpacing.subtext.lg,
|
|
60
|
-
fontWeight: system.fontWeight.bold,
|
|
56
|
+
...system.legacy.type.subtext.lg,
|
|
57
|
+
fontWeight: system.fontWeight.medium,
|
|
61
58
|
textAlign: 'start',
|
|
62
59
|
paddingInline: 0,
|
|
63
60
|
gap: system.legacy.gap.xs,
|
|
64
61
|
|
|
65
|
-
[buttonStencil.vars.borderRadius]: system.legacy.shape.
|
|
62
|
+
[buttonStencil.vars.borderRadius]: system.legacy.shape.full,
|
|
66
63
|
[buttonStencil.vars.label]: system.color.fg.muted.default,
|
|
67
64
|
[systemIconStencil.vars.color]: system.color.fg.muted.default,
|
|
68
65
|
|
|
69
66
|
'&:hover, &.hover': {
|
|
70
|
-
[buttonStencil.vars.background]:
|
|
71
|
-
color: system.legacy.color.surface.alt.strong,
|
|
72
|
-
fallback: system.color.bg.alt.strong,
|
|
73
|
-
mixinColor: system.legacy.color.surface.overlay.mixin,
|
|
74
|
-
mixinValue: system.legacy.opacity.surface.hover,
|
|
75
|
-
}),
|
|
67
|
+
[buttonStencil.vars.background]: system.color.surface.overlay.hover.default,
|
|
76
68
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
77
69
|
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
78
70
|
},
|
|
79
71
|
|
|
80
72
|
'&:active, &.active': {
|
|
81
|
-
[buttonStencil.vars.background]:
|
|
82
|
-
color: system.legacy.color.surface.alt.strong,
|
|
83
|
-
fallback: system.color.bg.alt.strong,
|
|
84
|
-
mixinColor: system.legacy.color.surface.overlay.mixin,
|
|
85
|
-
mixinValue: system.legacy.opacity.surface.pressed,
|
|
86
|
-
}),
|
|
73
|
+
[buttonStencil.vars.background]: system.color.surface.overlay.pressed.default,
|
|
87
74
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
88
75
|
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
89
76
|
},
|
|
@@ -102,15 +89,19 @@ export const segmentedControlItemStencil = createStencil({
|
|
|
102
89
|
|
|
103
90
|
"&[aria-pressed='true']": {
|
|
104
91
|
[buttonStencil.vars.background]: system.legacy.color.surface.default,
|
|
105
|
-
[buttonStencil.vars.border]: system.color.border.input.default,
|
|
106
92
|
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
107
93
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
94
|
+
boxShadow: system.depth[2],
|
|
108
95
|
|
|
109
96
|
'&:hover, &.hover': {
|
|
110
97
|
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
111
98
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
112
99
|
},
|
|
113
100
|
|
|
101
|
+
'&:focus-visible, &.focus': {
|
|
102
|
+
boxShadow: `0 0 0 ${px2rem(2)} ${system.legacy.color.border.inverse.default},0 0 0 ${px2rem(4)} ${system.color.brand.border.primary}`,
|
|
103
|
+
},
|
|
104
|
+
|
|
114
105
|
'&:disabled, &.disabled': {
|
|
115
106
|
[buttonStencil.vars.opacity]: system.opacity.disabled,
|
|
116
107
|
},
|
|
@@ -124,19 +115,21 @@ export const segmentedControlItemStencil = createStencil({
|
|
|
124
115
|
modifiers: {
|
|
125
116
|
size: {
|
|
126
117
|
large: {
|
|
127
|
-
height: system.legacy.size.
|
|
128
|
-
|
|
118
|
+
height: system.legacy.size.sm,
|
|
119
|
+
fontSize: system.legacy.fontSize.subtext.lg,
|
|
129
120
|
},
|
|
130
121
|
medium: {
|
|
131
|
-
height:
|
|
122
|
+
height: base.legacy.size350,
|
|
123
|
+
fontWeight: system.sana.fontWeight.semibold,
|
|
132
124
|
},
|
|
133
125
|
small: {
|
|
134
126
|
fontFamily: system.fontFamily.default,
|
|
135
127
|
fontSize: system.legacy.fontSize.subtext.md,
|
|
136
128
|
lineHeight: system.legacy.lineHeight.subtext.md,
|
|
137
129
|
letterSpacing: system.legacy.letterSpacing.subtext.md,
|
|
138
|
-
fontWeight: system.fontWeight.
|
|
130
|
+
fontWeight: system.fontWeight.medium,
|
|
139
131
|
height: system.legacy.size.xs,
|
|
132
|
+
gap: base.legacy.size25,
|
|
140
133
|
},
|
|
141
134
|
},
|
|
142
135
|
variant: {
|
|
@@ -149,13 +142,13 @@ export const segmentedControlItemStencil = createStencil({
|
|
|
149
142
|
{
|
|
150
143
|
modifiers: {size: 'large', variant: 'iconOnly'},
|
|
151
144
|
styles: {
|
|
152
|
-
minWidth: system.legacy.size.
|
|
145
|
+
minWidth: system.legacy.size.sm,
|
|
153
146
|
},
|
|
154
147
|
},
|
|
155
148
|
{
|
|
156
149
|
modifiers: {size: 'large', variant: 'iconWithText'},
|
|
157
150
|
styles: {
|
|
158
|
-
paddingInline: `${system.legacy.padding.
|
|
151
|
+
paddingInline: `${system.legacy.padding.sm} ${system.legacy.padding.md}`,
|
|
159
152
|
},
|
|
160
153
|
},
|
|
161
154
|
{
|
|
@@ -167,13 +160,13 @@ export const segmentedControlItemStencil = createStencil({
|
|
|
167
160
|
{
|
|
168
161
|
modifiers: {size: 'medium', variant: 'iconOnly'},
|
|
169
162
|
styles: {
|
|
170
|
-
minWidth:
|
|
163
|
+
minWidth: base.legacy.size350,
|
|
171
164
|
},
|
|
172
165
|
},
|
|
173
166
|
{
|
|
174
167
|
modifiers: {size: 'medium', variant: 'iconWithText'},
|
|
175
168
|
styles: {
|
|
176
|
-
paddingInline: `${system.legacy.padding.
|
|
169
|
+
paddingInline: `${system.legacy.padding.xs} ${system.legacy.padding.sm}`,
|
|
177
170
|
},
|
|
178
171
|
},
|
|
179
172
|
{
|
|
@@ -191,7 +184,7 @@ export const segmentedControlItemStencil = createStencil({
|
|
|
191
184
|
{
|
|
192
185
|
modifiers: {size: 'small', variant: 'iconWithText'},
|
|
193
186
|
styles: {
|
|
194
|
-
paddingInline: `${
|
|
187
|
+
paddingInline: `${base.legacy.size75} ${system.legacy.padding.xs}`,
|
|
195
188
|
},
|
|
196
189
|
},
|
|
197
190
|
{
|
|
@@ -4,7 +4,7 @@ import {useListRenderItems} from '@workday/canvas-kit-react/collection';
|
|
|
4
4
|
import {ExtractProps, createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
5
5
|
import {Grid} from '@workday/canvas-kit-react/layout';
|
|
6
6
|
import {createStencil, handleCsProp} from '@workday/canvas-kit-styling';
|
|
7
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
7
|
+
import {base, system} from '@workday/canvas-tokens-web';
|
|
8
8
|
|
|
9
9
|
import {useSegmentedControlModel} from './hooks/useSegmentedControlModel';
|
|
10
10
|
|
|
@@ -20,13 +20,25 @@ export const segmentedControlListStencil = createStencil({
|
|
|
20
20
|
},
|
|
21
21
|
base: {
|
|
22
22
|
display: 'inline-grid',
|
|
23
|
-
backgroundColor: system.legacy.color.surface.alt.
|
|
23
|
+
backgroundColor: system.legacy.color.surface.alt.default,
|
|
24
24
|
border: `0 solid ${system.color.border.transparent}`,
|
|
25
|
-
borderRadius: system.legacy.shape.
|
|
25
|
+
borderRadius: system.legacy.shape.full,
|
|
26
26
|
padding: system.legacy.padding.xxs,
|
|
27
|
-
gridGap: system.legacy.gap.
|
|
27
|
+
gridGap: system.legacy.gap.xs,
|
|
28
28
|
},
|
|
29
29
|
modifiers: {
|
|
30
|
+
size: {
|
|
31
|
+
large: {
|
|
32
|
+
padding: system.legacy.padding.xxs,
|
|
33
|
+
},
|
|
34
|
+
medium: {
|
|
35
|
+
padding: base.legacy.size25,
|
|
36
|
+
},
|
|
37
|
+
small: {
|
|
38
|
+
padding: base.legacy.size25,
|
|
39
|
+
gap: base.legacy.size25,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
30
42
|
orientation: {
|
|
31
43
|
vertical: ({items}) => ({
|
|
32
44
|
gridTemplateRows: `repeat(${items}, 1fr)`,
|
|
@@ -50,6 +62,7 @@ export const SegmentedControlList = createSubcomponent('div')({
|
|
|
50
62
|
segmentedControlListStencil({
|
|
51
63
|
items: `${model.state.items.length}`,
|
|
52
64
|
orientation: model.state.orientation,
|
|
65
|
+
size: model.state.size,
|
|
53
66
|
})
|
|
54
67
|
)}
|
|
55
68
|
>
|
package/toast/lib/Toast.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import {ExtractProps, createContainer} from '@workday/canvas-kit-react/common';
|
|
|
4
4
|
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
5
5
|
import {Popup} from '@workday/canvas-kit-react/popup';
|
|
6
6
|
import {createStencil, px2rem} from '@workday/canvas-kit-styling';
|
|
7
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
7
|
+
import {base, system} from '@workday/canvas-tokens-web';
|
|
8
8
|
|
|
9
9
|
import {ToastBody} from './ToastBody';
|
|
10
10
|
import {ToastCloseIcon} from './ToastCloseIcon';
|
|
@@ -52,9 +52,17 @@ const toastStencil = createStencil({
|
|
|
52
52
|
display: 'flex',
|
|
53
53
|
flexDirection: 'row',
|
|
54
54
|
width: px2rem(360),
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
paddingBlock: system.legacy.padding.sm,
|
|
56
|
+
paddingInline: `${system.legacy.padding.md} ${system.legacy.padding.xl}`,
|
|
57
|
+
gap: base.legacy.size150,
|
|
57
58
|
borderRadius: system.legacy.shape.xl,
|
|
59
|
+
border: `${px2rem(1)} solid ${system.color.border.default}`,
|
|
60
|
+
backgroundColor: system.legacy.color.surface.default,
|
|
61
|
+
boxShadow: system.depth[3],
|
|
62
|
+
|
|
63
|
+
'@media (forced-colors: active)': {
|
|
64
|
+
outline: `${px2rem(1)} solid CanvasText`,
|
|
65
|
+
},
|
|
58
66
|
},
|
|
59
67
|
});
|
|
60
68
|
|
package/toast/lib/ToastBody.tsx
CHANGED
|
@@ -2,7 +2,6 @@ import {ExtractProps, createComponent} from '@workday/canvas-kit-react/common';
|
|
|
2
2
|
import {Flex, mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import {Popup} from '@workday/canvas-kit-react/popup';
|
|
4
4
|
import {createStencil} from '@workday/canvas-kit-styling';
|
|
5
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
6
5
|
|
|
7
6
|
export interface ToastBodyProps extends ExtractProps<typeof Popup.Body> {}
|
|
8
7
|
|
|
@@ -11,9 +10,8 @@ export const toastBodyStencil = createStencil({
|
|
|
11
10
|
alignItems: 'flex-start',
|
|
12
11
|
flexDirection: 'column',
|
|
13
12
|
justifyContent: 'center',
|
|
14
|
-
paddingBlock: system.legacy.padding.md,
|
|
15
13
|
flexGrow: 1,
|
|
16
|
-
gap:
|
|
14
|
+
gap: 0,
|
|
17
15
|
},
|
|
18
16
|
});
|
|
19
17
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {ExtractProps, createComponent} from '@workday/canvas-kit-react/common';
|
|
2
2
|
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import {Popup} from '@workday/canvas-kit-react/popup';
|
|
4
|
-
import {createStencil} from '@workday/canvas-kit-styling';
|
|
4
|
+
import {createStencil, px2rem} from '@workday/canvas-kit-styling';
|
|
5
5
|
|
|
6
6
|
export interface ToastCloseIconProps extends ExtractProps<typeof Popup.CloseIcon, never> {}
|
|
7
7
|
|
|
8
8
|
export const toastCloseIconStencil = createStencil({
|
|
9
9
|
base: {
|
|
10
|
-
position: '
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
insetBlockStart: px2rem(2),
|
|
12
|
+
insetInlineEnd: px2rem(2),
|
|
11
13
|
},
|
|
12
14
|
});
|
|
13
15
|
|
|
@@ -18,7 +20,7 @@ export const ToastCloseIcon = createComponent('button')({
|
|
|
18
20
|
<Popup.CloseIcon
|
|
19
21
|
as={Element}
|
|
20
22
|
ref={ref}
|
|
21
|
-
size="
|
|
23
|
+
size="extraSmall"
|
|
22
24
|
{...mergeStyles(elemProps, toastCloseIconStencil())}
|
|
23
25
|
/>
|
|
24
26
|
);
|