@workday/canvas-kit-react 11.1.4 → 11.1.6
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/breadcrumbs/lib/BreadcrumbsItem.tsx +2 -27
- package/collection/lib/useOverflowListItemMeasure.tsx +1 -0
- package/combobox/lib/ComboboxMenuItem.tsx +2 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +1 -0
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +1 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts +0 -2
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.js +1 -8
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.js +1 -0
- package/dist/commonjs/combobox/lib/ComboboxMenuItem.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/ComboboxMenuItem.js +5 -5
- package/dist/commonjs/select/lib/hooks/useSelectInput.d.ts +1 -0
- package/dist/commonjs/select/lib/hooks/useSelectInput.d.ts.map +1 -1
- package/dist/commonjs/select/lib/hooks/useSelectInput.js +8 -7
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -0
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts +1 -0
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +1 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts +0 -2
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.js +2 -9
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListItemMeasure.js +1 -0
- package/dist/es6/combobox/lib/ComboboxMenuItem.d.ts.map +1 -1
- package/dist/es6/combobox/lib/ComboboxMenuItem.js +6 -6
- package/dist/es6/select/lib/hooks/useSelectInput.d.ts +1 -0
- package/dist/es6/select/lib/hooks/useSelectInput.d.ts.map +1 -1
- package/dist/es6/select/lib/hooks/useSelectInput.js +8 -7
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -0
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/package.json +4 -4
- package/select/lib/hooks/useSelectInput.ts +10 -7
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
composeHooks,
|
|
4
|
-
createSubcomponent,
|
|
5
|
-
createElemPropsHook,
|
|
6
|
-
useIsRTL,
|
|
7
|
-
} from '@workday/canvas-kit-react/common';
|
|
2
|
+
import {composeHooks, createSubcomponent, useIsRTL} from '@workday/canvas-kit-react/common';
|
|
8
3
|
import {
|
|
9
4
|
useListItemRegister,
|
|
10
5
|
useOverflowListItemMeasure,
|
|
@@ -33,27 +28,7 @@ export interface BreadcrumbsItemProps extends FlexProps {
|
|
|
33
28
|
'data-id'?: string;
|
|
34
29
|
}
|
|
35
30
|
|
|
36
|
-
export const useBreadcrumbsItem = composeHooks(
|
|
37
|
-
useOverflowListItemMeasure,
|
|
38
|
-
createElemPropsHook(useBreadcrumbsModel)(
|
|
39
|
-
(
|
|
40
|
-
{state},
|
|
41
|
-
_,
|
|
42
|
-
elemProps: {
|
|
43
|
-
'data-id'?: string;
|
|
44
|
-
item?: {id: string};
|
|
45
|
-
} = {}
|
|
46
|
-
) => {
|
|
47
|
-
const [localId] = React.useState(elemProps['data-id'] || elemProps.item?.id || '');
|
|
48
|
-
|
|
49
|
-
return {
|
|
50
|
-
inert: state.nonInteractiveIds.includes(localId) ? '' : undefined,
|
|
51
|
-
disabled: undefined,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
useListItemRegister
|
|
56
|
-
);
|
|
31
|
+
export const useBreadcrumbsItem = composeHooks(useOverflowListItemMeasure, useListItemRegister);
|
|
57
32
|
|
|
58
33
|
export const BreadcrumbsItem = createSubcomponent('li')({
|
|
59
34
|
displayName: 'Breadcrumbs.Item',
|
|
@@ -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',
|
|
@@ -101,6 +101,7 @@ export declare const useActionBarItem: import("@workday/canvas-kit-react/common"
|
|
|
101
101
|
ref: (instance: HTMLElement | null) => void;
|
|
102
102
|
'aria-hidden': true | undefined;
|
|
103
103
|
style: {};
|
|
104
|
+
inert: string | undefined;
|
|
104
105
|
} & {
|
|
105
106
|
ref: (instance: HTMLElement | null) => void;
|
|
106
107
|
'data-id': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgE,CAAC;AAE9F,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC"}
|
|
@@ -165,6 +165,7 @@ export declare const useBreadcrumbsItem: import("@workday/canvas-kit-react/commo
|
|
|
165
165
|
ref: (instance: HTMLElement | null) => void;
|
|
166
166
|
'aria-hidden': true | undefined;
|
|
167
167
|
style: {};
|
|
168
|
+
inert: string | undefined;
|
|
168
169
|
} & {
|
|
169
170
|
ref: (instance: HTMLElement | null) => void;
|
|
170
171
|
'data-id': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbsCurrentItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsCurrentItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAkB,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AAMxF,OAAO,EAAO,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,2BAA4B,SAAQ,SAAS;IAC5D,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"BreadcrumbsCurrentItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsCurrentItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAkB,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AAMxF,OAAO,EAAO,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,2BAA4B,SAAQ,SAAS;IAC5D,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBlC,CAAC"}
|
|
@@ -102,9 +102,7 @@ export declare const useBreadcrumbsItem: import("@workday/canvas-kit-react/commo
|
|
|
102
102
|
ref: (instance: HTMLElement | null) => void;
|
|
103
103
|
'aria-hidden': true | undefined;
|
|
104
104
|
style: {};
|
|
105
|
-
} & {
|
|
106
105
|
inert: string | undefined;
|
|
107
|
-
disabled: undefined;
|
|
108
106
|
} & {
|
|
109
107
|
ref: (instance: HTMLElement | null) => void;
|
|
110
108
|
'data-id': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbsItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BreadcrumbsItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAOjE,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgE,CAAC;AAEhG,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwB1B,CAAC"}
|
|
@@ -29,14 +29,7 @@ const canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
|
|
|
29
29
|
const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
30
30
|
const useBreadcrumbsModel_1 = require("./hooks/useBreadcrumbsModel");
|
|
31
31
|
const BreadcrumbsLink_1 = require("./BreadcrumbsLink");
|
|
32
|
-
exports.useBreadcrumbsItem = common_1.composeHooks(collection_1.useOverflowListItemMeasure,
|
|
33
|
-
var _a;
|
|
34
|
-
const [localId] = React.useState(elemProps['data-id'] || ((_a = elemProps.item) === null || _a === void 0 ? void 0 : _a.id) || '');
|
|
35
|
-
return {
|
|
36
|
-
inert: state.nonInteractiveIds.includes(localId) ? '' : undefined,
|
|
37
|
-
disabled: undefined,
|
|
38
|
-
};
|
|
39
|
-
}), collection_1.useListItemRegister);
|
|
32
|
+
exports.useBreadcrumbsItem = common_1.composeHooks(collection_1.useOverflowListItemMeasure, collection_1.useListItemRegister);
|
|
40
33
|
exports.BreadcrumbsItem = common_1.createSubcomponent('li')({
|
|
41
34
|
displayName: 'Breadcrumbs.Item',
|
|
42
35
|
modelHook: useBreadcrumbsModel_1.useBreadcrumbsModel,
|
|
@@ -95,5 +95,6 @@ export declare const useOverflowListItemMeasure: import("@workday/canvas-kit-rea
|
|
|
95
95
|
ref: (instance: HTMLElement | null) => void;
|
|
96
96
|
'aria-hidden': true | undefined;
|
|
97
97
|
style: {};
|
|
98
|
+
inert: string | undefined;
|
|
98
99
|
}>;
|
|
99
100
|
//# sourceMappingURL=useOverflowListItemMeasure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOverflowListItemMeasure.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListItemMeasure.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"useOverflowListItemMeasure.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListItemMeasure.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BtC,CAAC"}
|
|
@@ -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,
|
|
@@ -109,6 +109,7 @@ export declare const useSelectInput: import("@workday/canvas-kit-react/common").
|
|
|
109
109
|
readonly onKeyDown: (event: React.KeyboardEvent) => void;
|
|
110
110
|
readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
111
111
|
readonly autoComplete: "off";
|
|
112
|
+
readonly ref: (instance: HTMLInputElement | null) => void;
|
|
112
113
|
readonly onFocus: () => void;
|
|
113
114
|
readonly textInputProps: {
|
|
114
115
|
readonly ref: (instance: HTMLInputElement | null) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectInput.d.ts","sourceRoot":"","sources":["../../../../../select/lib/hooks/useSelectInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,iBAAS,IAAI,SAEZ;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useSelectInput.d.ts","sourceRoot":"","sources":["../../../../../select/lib/hooks/useSelectInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,iBAAS,IAAI,SAEZ;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA4HF,mBAAmB;+BAtFP,MAAM,WAAW,CAAC,gBAAgB,CAAC;;;;;;;;;;EAoIvE,CAAC"}
|
|
@@ -18,20 +18,20 @@ exports.useSelectInput = common_1.composeHooks(combobox_1.useComboboxInput, comb
|
|
|
18
18
|
const { elementRef: textInputElementRef, localRef: textInputRef } = common_1.useLocalRef(
|
|
19
19
|
// PopupModel says the targetRef is a `HTMLButtonElement`, but it is a `HTMLInputElement`
|
|
20
20
|
model.state.targetRef);
|
|
21
|
-
const { localRef, elementRef } = common_1.useLocalRef(ref);
|
|
21
|
+
const { localRef: hiddenLocalRef, elementRef: hiddenElementRef } = common_1.useLocalRef(ref);
|
|
22
22
|
// We need to create a proxy between the multiple inputs. We need to redirect a few methods to
|
|
23
23
|
// the visible input
|
|
24
|
-
react_1.default.useImperativeHandle(
|
|
25
|
-
if (
|
|
26
|
-
|
|
24
|
+
react_1.default.useImperativeHandle(hiddenElementRef, () => {
|
|
25
|
+
if (hiddenLocalRef.current) {
|
|
26
|
+
hiddenLocalRef.current.focus = (options) => {
|
|
27
27
|
textInputRef.current.focus(options);
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
hiddenLocalRef.current.blur = () => {
|
|
30
30
|
textInputRef.current.blur();
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
34
|
-
}, [textInputRef,
|
|
33
|
+
return hiddenLocalRef.current;
|
|
34
|
+
}, [textInputRef, hiddenLocalRef]);
|
|
35
35
|
// Remap the Popup model's targetRef to be the visible ref. `ref` and `model.state.targetRef` are already linked. We have to override that.
|
|
36
36
|
// Update the text value of the input
|
|
37
37
|
const handleOnChange = (event) => {
|
|
@@ -128,6 +128,7 @@ exports.useSelectInput = common_1.composeHooks(combobox_1.useComboboxInput, comb
|
|
|
128
128
|
},
|
|
129
129
|
onChange: handleOnChange,
|
|
130
130
|
autoComplete: 'off',
|
|
131
|
+
ref: hiddenElementRef,
|
|
131
132
|
// When the hidden input is focused, we want to show the focus/hover states of the input that sits below it.
|
|
132
133
|
onFocus() {
|
|
133
134
|
var _a;
|
|
@@ -233,6 +233,7 @@ export declare const useTabsItem: import("@workday/canvas-kit-react/common").Beh
|
|
|
233
233
|
ref: (instance: HTMLElement | null) => void;
|
|
234
234
|
'aria-hidden': true | undefined;
|
|
235
235
|
style: {};
|
|
236
|
+
inert: string | undefined;
|
|
236
237
|
} & {
|
|
237
238
|
onKeyDown(event: React.KeyboardEvent<Element>): void;
|
|
238
239
|
onClick(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsItem.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,UAAU,EAIV,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAYhE,MAAM,WAAW,aACf,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC,EACrC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa;;;;oDAwEzB,CAAC;AAEF,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"TabsItem.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,UAAU,EAIV,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAYhE,MAAM,WAAW,aACf,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC,EACrC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa;;;;oDAwEzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBnB,CAAC"}
|
|
@@ -101,6 +101,7 @@ export declare const useActionBarItem: import("@workday/canvas-kit-react/common"
|
|
|
101
101
|
ref: (instance: HTMLElement | null) => void;
|
|
102
102
|
'aria-hidden': true | undefined;
|
|
103
103
|
style: {};
|
|
104
|
+
inert: string | undefined;
|
|
104
105
|
} & {
|
|
105
106
|
ref: (instance: HTMLElement | null) => void;
|
|
106
107
|
'data-id': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgE,CAAC;AAE9F,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC"}
|
|
@@ -165,6 +165,7 @@ export declare const useBreadcrumbsItem: import("@workday/canvas-kit-react/commo
|
|
|
165
165
|
ref: (instance: HTMLElement | null) => void;
|
|
166
166
|
'aria-hidden': true | undefined;
|
|
167
167
|
style: {};
|
|
168
|
+
inert: string | undefined;
|
|
168
169
|
} & {
|
|
169
170
|
ref: (instance: HTMLElement | null) => void;
|
|
170
171
|
'data-id': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbsCurrentItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsCurrentItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAkB,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AAMxF,OAAO,EAAO,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,2BAA4B,SAAQ,SAAS;IAC5D,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"BreadcrumbsCurrentItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsCurrentItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAkB,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AAMxF,OAAO,EAAO,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,2BAA4B,SAAQ,SAAS;IAC5D,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBlC,CAAC"}
|
|
@@ -102,9 +102,7 @@ export declare const useBreadcrumbsItem: import("@workday/canvas-kit-react/commo
|
|
|
102
102
|
ref: (instance: HTMLElement | null) => void;
|
|
103
103
|
'aria-hidden': true | undefined;
|
|
104
104
|
style: {};
|
|
105
|
-
} & {
|
|
106
105
|
inert: string | undefined;
|
|
107
|
-
disabled: undefined;
|
|
108
106
|
} & {
|
|
109
107
|
ref: (instance: HTMLElement | null) => void;
|
|
110
108
|
'data-id': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbsItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BreadcrumbsItem.d.ts","sourceRoot":"","sources":["../../../../breadcrumbs/lib/BreadcrumbsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAOjE,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgE,CAAC;AAEhG,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwB1B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { composeHooks, createSubcomponent,
|
|
2
|
+
import { composeHooks, createSubcomponent, useIsRTL } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { useListItemRegister, useOverflowListItemMeasure, } from '@workday/canvas-kit-react/collection';
|
|
4
4
|
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
5
5
|
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
@@ -7,14 +7,7 @@ import { chevronRightSmallIcon } from '@workday/canvas-system-icons-web';
|
|
|
7
7
|
import { colors, space } from '@workday/canvas-kit-react/tokens';
|
|
8
8
|
import { useBreadcrumbsModel } from './hooks/useBreadcrumbsModel';
|
|
9
9
|
import { BreadcrumbsLink } from './BreadcrumbsLink';
|
|
10
|
-
export const useBreadcrumbsItem = composeHooks(useOverflowListItemMeasure,
|
|
11
|
-
var _a;
|
|
12
|
-
const [localId] = React.useState(elemProps['data-id'] || ((_a = elemProps.item) === null || _a === void 0 ? void 0 : _a.id) || '');
|
|
13
|
-
return {
|
|
14
|
-
inert: state.nonInteractiveIds.includes(localId) ? '' : undefined,
|
|
15
|
-
disabled: undefined,
|
|
16
|
-
};
|
|
17
|
-
}), useListItemRegister);
|
|
10
|
+
export const useBreadcrumbsItem = composeHooks(useOverflowListItemMeasure, useListItemRegister);
|
|
18
11
|
export const BreadcrumbsItem = createSubcomponent('li')({
|
|
19
12
|
displayName: 'Breadcrumbs.Item',
|
|
20
13
|
modelHook: useBreadcrumbsModel,
|
|
@@ -95,5 +95,6 @@ export declare const useOverflowListItemMeasure: import("@workday/canvas-kit-rea
|
|
|
95
95
|
ref: (instance: HTMLElement | null) => void;
|
|
96
96
|
'aria-hidden': true | undefined;
|
|
97
97
|
style: {};
|
|
98
|
+
inert: string | undefined;
|
|
98
99
|
}>;
|
|
99
100
|
//# sourceMappingURL=useOverflowListItemMeasure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOverflowListItemMeasure.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListItemMeasure.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"useOverflowListItemMeasure.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useOverflowListItemMeasure.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BtC,CAAC"}
|
|
@@ -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,
|
|
@@ -109,6 +109,7 @@ export declare const useSelectInput: import("@workday/canvas-kit-react/common").
|
|
|
109
109
|
readonly onKeyDown: (event: React.KeyboardEvent) => void;
|
|
110
110
|
readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
111
111
|
readonly autoComplete: "off";
|
|
112
|
+
readonly ref: (instance: HTMLInputElement | null) => void;
|
|
112
113
|
readonly onFocus: () => void;
|
|
113
114
|
readonly textInputProps: {
|
|
114
115
|
readonly ref: (instance: HTMLInputElement | null) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectInput.d.ts","sourceRoot":"","sources":["../../../../../select/lib/hooks/useSelectInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,iBAAS,IAAI,SAEZ;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useSelectInput.d.ts","sourceRoot":"","sources":["../../../../../select/lib/hooks/useSelectInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,iBAAS,IAAI,SAEZ;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA4HF,mBAAmB;+BAtFP,MAAM,WAAW,CAAC,gBAAgB,CAAC;;;;;;;;;;EAoIvE,CAAC"}
|
|
@@ -12,20 +12,20 @@ export const useSelectInput = composeHooks(useComboboxInput, useComboboxKeyboard
|
|
|
12
12
|
const { elementRef: textInputElementRef, localRef: textInputRef } = useLocalRef(
|
|
13
13
|
// PopupModel says the targetRef is a `HTMLButtonElement`, but it is a `HTMLInputElement`
|
|
14
14
|
model.state.targetRef);
|
|
15
|
-
const { localRef, elementRef } = useLocalRef(ref);
|
|
15
|
+
const { localRef: hiddenLocalRef, elementRef: hiddenElementRef } = useLocalRef(ref);
|
|
16
16
|
// We need to create a proxy between the multiple inputs. We need to redirect a few methods to
|
|
17
17
|
// the visible input
|
|
18
|
-
React.useImperativeHandle(
|
|
19
|
-
if (
|
|
20
|
-
|
|
18
|
+
React.useImperativeHandle(hiddenElementRef, () => {
|
|
19
|
+
if (hiddenLocalRef.current) {
|
|
20
|
+
hiddenLocalRef.current.focus = (options) => {
|
|
21
21
|
textInputRef.current.focus(options);
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
hiddenLocalRef.current.blur = () => {
|
|
24
24
|
textInputRef.current.blur();
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
return
|
|
28
|
-
}, [textInputRef,
|
|
27
|
+
return hiddenLocalRef.current;
|
|
28
|
+
}, [textInputRef, hiddenLocalRef]);
|
|
29
29
|
// Remap the Popup model's targetRef to be the visible ref. `ref` and `model.state.targetRef` are already linked. We have to override that.
|
|
30
30
|
// Update the text value of the input
|
|
31
31
|
const handleOnChange = (event) => {
|
|
@@ -122,6 +122,7 @@ export const useSelectInput = composeHooks(useComboboxInput, useComboboxKeyboard
|
|
|
122
122
|
},
|
|
123
123
|
onChange: handleOnChange,
|
|
124
124
|
autoComplete: 'off',
|
|
125
|
+
ref: hiddenElementRef,
|
|
125
126
|
// When the hidden input is focused, we want to show the focus/hover states of the input that sits below it.
|
|
126
127
|
onFocus() {
|
|
127
128
|
var _a;
|
|
@@ -233,6 +233,7 @@ export declare const useTabsItem: import("@workday/canvas-kit-react/common").Beh
|
|
|
233
233
|
ref: (instance: HTMLElement | null) => void;
|
|
234
234
|
'aria-hidden': true | undefined;
|
|
235
235
|
style: {};
|
|
236
|
+
inert: string | undefined;
|
|
236
237
|
} & {
|
|
237
238
|
onKeyDown(event: React.KeyboardEvent<Element>): void;
|
|
238
239
|
onClick(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsItem.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,UAAU,EAIV,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAYhE,MAAM,WAAW,aACf,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC,EACrC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa;;;;oDAwEzB,CAAC;AAEF,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"TabsItem.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,UAAU,EAIV,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAYhE,MAAM,WAAW,aACf,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC,EACrC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa;;;;oDAwEzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBnB,CAAC"}
|
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.6",
|
|
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.6",
|
|
53
|
+
"@workday/canvas-kit-styling": "^11.1.6",
|
|
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": "631d1ec692f362e0dfac142a038fed1fb6a97fb6"
|
|
71
71
|
}
|
|
@@ -33,25 +33,27 @@ export const useSelectInput = composeHooks(
|
|
|
33
33
|
model.state.targetRef as any as React.Ref<HTMLInputElement>
|
|
34
34
|
);
|
|
35
35
|
|
|
36
|
-
const {localRef, elementRef} = useLocalRef(
|
|
36
|
+
const {localRef: hiddenLocalRef, elementRef: hiddenElementRef} = useLocalRef(
|
|
37
|
+
ref as React.Ref<HTMLInputElement>
|
|
38
|
+
);
|
|
37
39
|
|
|
38
40
|
// We need to create a proxy between the multiple inputs. We need to redirect a few methods to
|
|
39
41
|
// the visible input
|
|
40
42
|
React.useImperativeHandle(
|
|
41
|
-
|
|
43
|
+
hiddenElementRef,
|
|
42
44
|
() => {
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
+
if (hiddenLocalRef.current) {
|
|
46
|
+
hiddenLocalRef.current.focus = (options?: FocusOptions) => {
|
|
45
47
|
textInputRef.current!.focus(options);
|
|
46
48
|
};
|
|
47
|
-
|
|
49
|
+
hiddenLocalRef.current.blur = () => {
|
|
48
50
|
textInputRef.current!.blur();
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
return
|
|
54
|
+
return hiddenLocalRef.current!;
|
|
53
55
|
},
|
|
54
|
-
[textInputRef,
|
|
56
|
+
[textInputRef, hiddenLocalRef]
|
|
55
57
|
);
|
|
56
58
|
|
|
57
59
|
// Remap the Popup model's targetRef to be the visible ref. `ref` and `model.state.targetRef` are already linked. We have to override that.
|
|
@@ -172,6 +174,7 @@ export const useSelectInput = composeHooks(
|
|
|
172
174
|
},
|
|
173
175
|
onChange: handleOnChange,
|
|
174
176
|
autoComplete: 'off',
|
|
177
|
+
ref: hiddenElementRef,
|
|
175
178
|
// When the hidden input is focused, we want to show the focus/hover states of the input that sits below it.
|
|
176
179
|
onFocus() {
|
|
177
180
|
textInputRef.current?.focus();
|