@workday/canvas-kit-react 11.1.4 → 11.1.5
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/combobox/lib/ComboboxMenuItem.tsx +2 -1
- package/dist/commonjs/combobox/lib/ComboboxMenuItem.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/ComboboxMenuItem.js +5 -5
- package/dist/es6/combobox/lib/ComboboxMenuItem.d.ts.map +1 -1
- package/dist/es6/combobox/lib/ComboboxMenuItem.js +6 -6
- package/package.json +4 -4
|
@@ -11,6 +11,7 @@ import {SystemIcon} from '@workday/canvas-kit-react/icon';
|
|
|
11
11
|
import {
|
|
12
12
|
useListItemAllowChildStrings,
|
|
13
13
|
useListItemRegister,
|
|
14
|
+
isSelected,
|
|
14
15
|
} from '@workday/canvas-kit-react/collection';
|
|
15
16
|
import {OverflowTooltip} from '@workday/canvas-kit-react/tooltip';
|
|
16
17
|
|
|
@@ -45,7 +46,7 @@ export const useComboboxMenuItem = composeHooks(
|
|
|
45
46
|
event.preventDefault();
|
|
46
47
|
};
|
|
47
48
|
|
|
48
|
-
const selected = model.state
|
|
49
|
+
const selected = isSelected(id, model.state);
|
|
49
50
|
|
|
50
51
|
return {
|
|
51
52
|
role: 'option',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxMenuItem.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAe,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxMenuItem.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAe,MAAM,gCAAgC,CAAC;AAc5E,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,OAAO,cAAc,EAAE,KAAK,CAAC;CAAG;AAE5F;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAIA,gBAAgB,CAAC,WAAW,CAAC;;;;;;;;;;;;;;EAyB5D,CAAC;AAOF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAQH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc3B,CAAC"}
|
|
@@ -33,7 +33,7 @@ exports.useComboboxMenuItem = common_1.composeHooks(common_1.createElemPropsHook
|
|
|
33
33
|
// prevent focus changes
|
|
34
34
|
event.preventDefault();
|
|
35
35
|
};
|
|
36
|
-
const selected = model.state
|
|
36
|
+
const selected = collection_1.isSelected(id, model.state);
|
|
37
37
|
return {
|
|
38
38
|
role: 'option',
|
|
39
39
|
'aria-selected': selected || undefined,
|
|
@@ -42,16 +42,16 @@ exports.useComboboxMenuItem = common_1.composeHooks(common_1.createElemPropsHook
|
|
|
42
42
|
};
|
|
43
43
|
}), collection_1.useListItemRegister, collection_1.useListItemAllowChildStrings);
|
|
44
44
|
const comboboxMenuItemIconStencil = canvas_kit_styling_1.createStencil({
|
|
45
|
-
base: { name: "
|
|
46
|
-
}, "combobox-menu-item-icon-
|
|
45
|
+
base: { name: "1758ca", styles: "box-sizing:border-box;align-self:start;" }
|
|
46
|
+
}, "combobox-menu-item-icon-1886be");
|
|
47
47
|
exports.ComboboxMenuItemIcon = common_1.createSubcomponent('span')({
|
|
48
48
|
modelHook: useComboboxModel_1.useComboboxModel,
|
|
49
49
|
})((elemProps, Element) => {
|
|
50
50
|
return react_1.default.createElement(icon_1.SystemIcon, Object.assign({ as: Element }, layout_1.mergeStyles(elemProps, comboboxMenuItemIconStencil())));
|
|
51
51
|
});
|
|
52
52
|
const comboboxMenuItemStencil = canvas_kit_styling_1.createStencil({
|
|
53
|
-
base: { name: "
|
|
54
|
-
}, "combobox-menu-item-
|
|
53
|
+
base: { name: "c698ab", styles: "box-sizing:border-box;min-height:var(--cnvs-sys-space-x10);" }
|
|
54
|
+
}, "combobox-menu-item-f6da1d");
|
|
55
55
|
exports.ComboboxMenuItem = common_1.createSubcomponent('li')({
|
|
56
56
|
modelHook: useComboboxModel_1.useComboboxModel,
|
|
57
57
|
elemPropsHook: exports.useComboboxMenuItem,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxMenuItem.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAe,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxMenuItem.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAIL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAe,MAAM,gCAAgC,CAAC;AAc5E,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,OAAO,cAAc,EAAE,KAAK,CAAC;CAAG;AAE5F;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAIA,gBAAgB,CAAC,WAAW,CAAC;;;;;;;;;;;;;;EAyB5D,CAAC;AAOF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAQH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc3B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { composeHooks, createElemPropsHook, createSubcomponent, } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { StyledMenuItem, useMenuModel } from '@workday/canvas-kit-react/menu';
|
|
4
4
|
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
5
|
-
import { useListItemAllowChildStrings, useListItemRegister, } from '@workday/canvas-kit-react/collection';
|
|
5
|
+
import { useListItemAllowChildStrings, useListItemRegister, isSelected, } from '@workday/canvas-kit-react/collection';
|
|
6
6
|
import { OverflowTooltip } from '@workday/canvas-kit-react/tooltip';
|
|
7
7
|
import { useComboboxModel } from './hooks/useComboboxModel';
|
|
8
8
|
import { createStencil } from '@workday/canvas-kit-styling';
|
|
@@ -27,7 +27,7 @@ export const useComboboxMenuItem = composeHooks(createElemPropsHook(useMenuModel
|
|
|
27
27
|
// prevent focus changes
|
|
28
28
|
event.preventDefault();
|
|
29
29
|
};
|
|
30
|
-
const selected = model.state
|
|
30
|
+
const selected = isSelected(id, model.state);
|
|
31
31
|
return {
|
|
32
32
|
role: 'option',
|
|
33
33
|
'aria-selected': selected || undefined,
|
|
@@ -36,16 +36,16 @@ export const useComboboxMenuItem = composeHooks(createElemPropsHook(useMenuModel
|
|
|
36
36
|
};
|
|
37
37
|
}), useListItemRegister, useListItemAllowChildStrings);
|
|
38
38
|
const comboboxMenuItemIconStencil = createStencil({
|
|
39
|
-
base: { name: "
|
|
40
|
-
}, "combobox-menu-item-icon-
|
|
39
|
+
base: { name: "1758ca", styles: "box-sizing:border-box;align-self:start;" }
|
|
40
|
+
}, "combobox-menu-item-icon-1886be");
|
|
41
41
|
export const ComboboxMenuItemIcon = createSubcomponent('span')({
|
|
42
42
|
modelHook: useComboboxModel,
|
|
43
43
|
})((elemProps, Element) => {
|
|
44
44
|
return React.createElement(SystemIcon, Object.assign({ as: Element }, mergeStyles(elemProps, comboboxMenuItemIconStencil())));
|
|
45
45
|
});
|
|
46
46
|
const comboboxMenuItemStencil = createStencil({
|
|
47
|
-
base: { name: "
|
|
48
|
-
}, "combobox-menu-item-
|
|
47
|
+
base: { name: "c698ab", styles: "box-sizing:border-box;min-height:var(--cnvs-sys-space-x10);" }
|
|
48
|
+
}, "combobox-menu-item-f6da1d");
|
|
49
49
|
export const ComboboxMenuItem = createSubcomponent('li')({
|
|
50
50
|
modelHook: useComboboxModel,
|
|
51
51
|
elemPropsHook: useComboboxMenuItem,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.5",
|
|
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": "^11.1.
|
|
53
|
-
"@workday/canvas-kit-styling": "^11.1.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^11.1.5",
|
|
53
|
+
"@workday/canvas-kit-styling": "^11.1.5",
|
|
54
54
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
55
55
|
"@workday/canvas-tokens-web": "^2.0.0",
|
|
56
56
|
"@workday/design-assets-types": "^0.2.8",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
68
68
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "deb1fdc2d7f4d17c80dcc0013804c14a21133b3d"
|
|
71
71
|
}
|