@workday/canvas-kit-react 10.3.48 → 10.3.50

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.
@@ -5,7 +5,7 @@ import {
5
5
  createSubcomponent,
6
6
  ExtractProps,
7
7
  } from '@workday/canvas-kit-react/common';
8
- import {Box, Flex} from '@workday/canvas-kit-react/layout';
8
+ import {Box, Flex, FlexProps} from '@workday/canvas-kit-react/layout';
9
9
 
10
10
  import {useListModel} from './useListModel';
11
11
  import {useListRenderItems} from './useListRenderItem';
@@ -13,6 +13,24 @@ import {useListItemRegister} from './useListItemRegister';
13
13
 
14
14
  export interface ListBoxProps<T = any> extends Omit<ExtractProps<typeof Flex, never>, 'children'> {
15
15
  children?: React.ReactNode | ((item: T, index: number) => React.ReactNode);
16
+ /**
17
+ * Set the margin top of the list box. You must use this prop and not style any other way. The
18
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
19
+ * proper rendering. If a `marginTop` is not provided, the value falls back to `marginY`.
20
+ */
21
+ marginTop?: FlexProps['marginTop'];
22
+ /**
23
+ * Set the margin bottom of the list box. You must use this prop and not style any other way. The
24
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
25
+ * proper rendering. If a `marginBottom` is not provided, the value falls back to `marginY`.
26
+ */
27
+ marginBottom?: FlexProps['marginBottom'];
28
+ /**
29
+ * Set the margin top and bottom of the list box. You must use this prop and not style any other way. The
30
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
31
+ * proper rendering.
32
+ */
33
+ marginY?: FlexProps['marginY'];
16
34
  }
17
35
 
18
36
  export const ListBoxItem = createSubcomponent('li')({
@@ -65,21 +83,24 @@ export const ListBox = createContainer('ul')({
65
83
  */
66
84
  Item: ListBoxItem,
67
85
  },
68
- })<ListBoxProps>(({height, maxHeight, marginY, ...elemProps}, Element, model) => {
69
- // We're moving `marginY` to the container to not interfere with the virtualization size. We set
70
- // the `marginY` on the Flex to `0` to avoid inaccurate scrollbars
86
+ })<ListBoxProps>(
87
+ ({height, maxHeight, marginTop, marginBottom, marginY, ...elemProps}, Element, model) => {
88
+ // We're moving `marginY` to the container to not interfere with the virtualization size. We set
89
+ // the `marginY` on the Flex to `0` to avoid inaccurate scrollbars
71
90
 
72
- // TODO figure out what style props should go to which `Box`
73
- return (
74
- <Box
75
- ref={model.state.containerRef}
76
- marginY={marginY}
77
- maxHeight={maxHeight}
78
- overflowY={model.state.orientation === 'vertical' ? 'auto' : undefined}
79
- >
80
- <Flex as={Element} flexDirection="column" {...elemProps} marginY={0}>
81
- {useListRenderItems(model, elemProps.children)}
82
- </Flex>
83
- </Box>
84
- );
85
- });
91
+ // TODO figure out what style props should go to which `Box`
92
+ return (
93
+ <Box
94
+ ref={model.state.containerRef}
95
+ marginTop={marginTop ?? marginY}
96
+ marginBottom={marginBottom ?? marginY}
97
+ maxHeight={maxHeight}
98
+ overflowY={model.state.orientation === 'vertical' ? 'auto' : undefined}
99
+ >
100
+ <Flex as={Element} flexDirection="column" {...elemProps} marginY={0}>
101
+ {useListRenderItems(model, elemProps.children)}
102
+ </Flex>
103
+ </Box>
104
+ );
105
+ }
106
+ );
@@ -44,7 +44,7 @@ export const useComboboxMenuItem = composeHooks(
44
44
  event.preventDefault();
45
45
  };
46
46
 
47
- const selected = model.state.cursorId === id;
47
+ const selected = model.state.selectedIds[0] === id;
48
48
 
49
49
  return {
50
50
  role: 'option',
@@ -1,8 +1,26 @@
1
1
  import React from 'react';
2
2
  import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { Flex } from '@workday/canvas-kit-react/layout';
3
+ import { Flex, FlexProps } from '@workday/canvas-kit-react/layout';
4
4
  export interface ListBoxProps<T = any> extends Omit<ExtractProps<typeof Flex, never>, 'children'> {
5
5
  children?: React.ReactNode | ((item: T, index: number) => React.ReactNode);
6
+ /**
7
+ * Set the margin top of the list box. You must use this prop and not style any other way. The
8
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
9
+ * proper rendering. If a `marginTop` is not provided, the value falls back to `marginY`.
10
+ */
11
+ marginTop?: FlexProps['marginTop'];
12
+ /**
13
+ * Set the margin bottom of the list box. You must use this prop and not style any other way. The
14
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
15
+ * proper rendering. If a `marginBottom` is not provided, the value falls back to `marginY`.
16
+ */
17
+ marginBottom?: FlexProps['marginBottom'];
18
+ /**
19
+ * Set the margin top and bottom of the list box. You must use this prop and not style any other way. The
20
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
21
+ * proper rendering.
22
+ */
23
+ marginY?: FlexProps['marginY'];
6
24
  }
7
25
  export declare const ListBoxItem: import("@workday/canvas-kit-react/common").ElementComponentM<"li", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").FlexStyleProps, {
8
26
  state: {
@@ -1 +1 @@
1
- {"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../../../../collection/lib/ListBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAM,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAM3D,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAC/F,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC5E;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ps }, Element, model) => {
61
+ })(({ height, maxHeight, marginTop, marginBottom, marginY, ...elemProps }, Element, model) => {
62
62
  // We're moving `marginY` to the container to not interfere with the virtualization size. We set
63
63
  // the `marginY` on the Flex to `0` to avoid inaccurate scrollbars
64
64
  // TODO figure out what style props should go to which `Box`
65
- return (react_1.default.createElement(layout_1.Box, { ref: model.state.containerRef, marginY: marginY, maxHeight: maxHeight, overflowY: model.state.orientation === 'vertical' ? 'auto' : undefined },
65
+ return (react_1.default.createElement(layout_1.Box, { ref: model.state.containerRef, marginTop: marginTop !== null && marginTop !== void 0 ? marginTop : marginY, marginBottom: marginBottom !== null && marginBottom !== void 0 ? marginBottom : marginY, maxHeight: maxHeight, overflowY: model.state.orientation === 'vertical' ? 'auto' : undefined },
66
66
  react_1.default.createElement(layout_1.Flex, Object.assign({ as: Element, flexDirection: "column" }, elemProps, { marginY: 0 }), useListRenderItem_1.useListRenderItems(model, elemProps.children))));
67
67
  });
@@ -30,7 +30,7 @@ exports.useComboboxMenuItem = common_1.composeHooks(common_1.createElemPropsHook
30
30
  // prevent focus changes
31
31
  event.preventDefault();
32
32
  };
33
- const selected = model.state.cursorId === id;
33
+ const selected = model.state.selectedIds[0] === id;
34
34
  return {
35
35
  role: 'option',
36
36
  'aria-selected': selected || undefined,
@@ -1,8 +1,26 @@
1
1
  import React from 'react';
2
2
  import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { Flex } from '@workday/canvas-kit-react/layout';
3
+ import { Flex, FlexProps } from '@workday/canvas-kit-react/layout';
4
4
  export interface ListBoxProps<T = any> extends Omit<ExtractProps<typeof Flex, never>, 'children'> {
5
5
  children?: React.ReactNode | ((item: T, index: number) => React.ReactNode);
6
+ /**
7
+ * Set the margin top of the list box. You must use this prop and not style any other way. The
8
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
9
+ * proper rendering. If a `marginTop` is not provided, the value falls back to `marginY`.
10
+ */
11
+ marginTop?: FlexProps['marginTop'];
12
+ /**
13
+ * Set the margin bottom of the list box. You must use this prop and not style any other way. The
14
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
15
+ * proper rendering. If a `marginBottom` is not provided, the value falls back to `marginY`.
16
+ */
17
+ marginBottom?: FlexProps['marginBottom'];
18
+ /**
19
+ * Set the margin top and bottom of the list box. You must use this prop and not style any other way. The
20
+ * `Menu` uses virtualization and needs margins to be set on the correct element. This ensure
21
+ * proper rendering.
22
+ */
23
+ marginY?: FlexProps['marginY'];
6
24
  }
7
25
  export declare const ListBoxItem: import("@workday/canvas-kit-react/common").ElementComponentM<"li", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").FlexStyleProps, {
8
26
  state: {
@@ -1 +1 @@
1
- {"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../../../../collection/lib/ListBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAM,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAM3D,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAC/F,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC5E;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrB,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKhB;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBN,CAAC"}
@@ -52,10 +52,10 @@ export const ListBox = createContainer('ul')({
52
52
  */
53
53
  Item: ListBoxItem,
54
54
  },
55
- })(({ height, maxHeight, marginY, ...elemProps }, Element, model) => {
55
+ })(({ height, maxHeight, marginTop, marginBottom, marginY, ...elemProps }, Element, model) => {
56
56
  // We're moving `marginY` to the container to not interfere with the virtualization size. We set
57
57
  // the `marginY` on the Flex to `0` to avoid inaccurate scrollbars
58
58
  // TODO figure out what style props should go to which `Box`
59
- return (React.createElement(Box, { ref: model.state.containerRef, marginY: marginY, maxHeight: maxHeight, overflowY: model.state.orientation === 'vertical' ? 'auto' : undefined },
59
+ return (React.createElement(Box, { ref: model.state.containerRef, marginTop: marginTop !== null && marginTop !== void 0 ? marginTop : marginY, marginBottom: marginBottom !== null && marginBottom !== void 0 ? marginBottom : marginY, maxHeight: maxHeight, overflowY: model.state.orientation === 'vertical' ? 'auto' : undefined },
60
60
  React.createElement(Flex, Object.assign({ as: Element, flexDirection: "column" }, elemProps, { marginY: 0 }), useListRenderItems(model, elemProps.children))));
61
61
  });
@@ -24,7 +24,7 @@ export const useComboboxMenuItem = composeHooks(createElemPropsHook(useMenuModel
24
24
  // prevent focus changes
25
25
  event.preventDefault();
26
26
  };
27
- const selected = model.state.cursorId === id;
27
+ const selected = model.state.selectedIds[0] === id;
28
28
  return {
29
29
  role: 'option',
30
30
  'aria-selected': selected || undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "10.3.48",
3
+ "version": "10.3.50",
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",
@@ -49,8 +49,8 @@
49
49
  "@emotion/styled": "^11.6.0",
50
50
  "@popperjs/core": "^2.5.4",
51
51
  "@workday/canvas-colors-web": "^2.0.0",
52
- "@workday/canvas-kit-popup-stack": "^10.3.48",
53
- "@workday/canvas-kit-styling": "^10.3.48",
52
+ "@workday/canvas-kit-popup-stack": "^10.3.50",
53
+ "@workday/canvas-kit-styling": "^10.3.50",
54
54
  "@workday/canvas-system-icons-web": "^3.0.0",
55
55
  "@workday/canvas-tokens-web": "^1.0.0",
56
56
  "@workday/design-assets-types": "^0.2.8",
@@ -68,5 +68,5 @@
68
68
  "@workday/canvas-accent-icons-web": "^3.0.0",
69
69
  "@workday/canvas-applet-icons-web": "^2.0.0"
70
70
  },
71
- "gitHead": "b91f5e0598705f0a1d8ffa6ac29db9bd52600a2b"
71
+ "gitHead": "419f977a18c6952dca36a9490b4eb2c3de9d1309"
72
72
  }