@workday/canvas-kit-react 10.3.41 → 10.3.43

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.
@@ -236,6 +236,12 @@ export const buttonModifiers = createModifiers({
236
236
  gap: system.space.x1,
237
237
  }),
238
238
  },
239
+ grow: {
240
+ true: createStyles({
241
+ width: '100%',
242
+ maxWidth: '100%',
243
+ }),
244
+ },
239
245
  iconPosition: {
240
246
  largeOnly: createStyles({
241
247
  padding: '0',
@@ -301,6 +307,7 @@ export const BaseButton = createComponent('button')({
301
307
  children,
302
308
  size,
303
309
  fillIcon,
310
+ grow,
304
311
  iconPosition,
305
312
  icon,
306
313
  colors,
@@ -318,6 +325,7 @@ export const BaseButton = createComponent('button')({
318
325
  baseButtonStyles,
319
326
  buttonModifiers({
320
327
  size: size,
328
+ grow: grow,
321
329
  iconPosition: getIconPosition(size, iconPosition, children),
322
330
  }),
323
331
  buttonVars.default(colors?.default || {}),
@@ -69,6 +69,9 @@ export declare const buttonModifiers: import("@workday/canvas-kit-styling").Modi
69
69
  small: string;
70
70
  extraSmall: string;
71
71
  };
72
+ grow: {
73
+ true: string;
74
+ };
72
75
  iconPosition: {
73
76
  largeOnly: string;
74
77
  largeStart: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/BaseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAkB,cAAc,EAAY,MAAM,kCAAkC,CAAC;AAG5F,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACjE,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,eAAe,CAAC,EAAE,cAAc;IACpF;;OAEG;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;AAE9D,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,eAAe,CAAC,EAAE,cAAc;IACpF;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC;CAAG;AAE7E;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;CAmDtB,CAAC;AAsFF;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;EAkF1B,CAAC;AAEH,wBAAgB,UAAU,CAAC,MAAM,GAAE,MAAW,UAE7C;AAED,wBAAgB,eAAe,CAC7B,IAAI,CAAC,EAAE,MAAM,OAAO,eAAe,CAAC,IAAI,EACxC,YAAY,CAAC,EAAE,aAAa,EAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GACzB,MAAM,OAAO,eAAe,CAAC,YAAY,CAE3C;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;CA2CrB,CAAC"}
@@ -54,6 +54,9 @@ exports.buttonModifiers = canvas_kit_styling_1.createModifiers({
54
54
  small: canvas_kit_styling_1.createStyles({ name: "1bibd9a", styles: "font-size:0.875rem;letter-spacing:0.015rem;height:var(--cnvs-sys-space-x8, calc(0.25rem * 8));min-width:var(--cnvs-sys-space-x20, calc(0.25rem * 20));padding-inline:var(--cnvs-sys-space-x4, calc(0.25rem * 4));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
55
55
  extraSmall: canvas_kit_styling_1.createStyles({ name: "jxl8ry", styles: "font-size:0.75rem;line-height:var(--cnvs-sys-space-x4, calc(0.25rem * 4));letter-spacing:0.02rem;height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));min-width:auto;padding-inline:var(--cnvs-sys-space-x3, calc(0.25rem * 3));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
56
56
  },
57
+ grow: {
58
+ true: canvas_kit_styling_1.createStyles({ name: "5yrx54", styles: "width:100%;max-width:100%;" }),
59
+ },
57
60
  iconPosition: {
58
61
  largeOnly: canvas_kit_styling_1.createStyles({ name: "17x7zv9", styles: "padding:0;min-width:calc(var(--cnvs-sys-space-x4, calc(0.25rem * 4)) * 3);" }),
59
62
  largeStart: canvas_kit_styling_1.createStyles({ name: "6nuy87", styles: "padding-inline-start:var(--cnvs-sys-space-x6, calc(0.25rem * 6));padding-inline-end:var(--cnvs-sys-space-x8, calc(0.25rem * 8));" }),
@@ -82,11 +85,12 @@ exports.getIconPosition = getIconPosition;
82
85
  */
83
86
  exports.BaseButton = common_1.createComponent('button')({
84
87
  displayName: 'BaseButton',
85
- Component: ({ children, size, fillIcon, iconPosition, icon, colors, shouldMirrorIcon = false, ...elemProps }, ref, Element) => {
88
+ Component: ({ children, size, fillIcon, grow, iconPosition, icon, colors, shouldMirrorIcon = false, ...elemProps }, ref, Element) => {
86
89
  return (React.createElement(Element, Object.assign({ ref: ref, type: "button" }, layout_1.mergeStyles(elemProps, [
87
90
  baseButtonStyles,
88
91
  exports.buttonModifiers({
89
92
  size: size,
93
+ grow: grow,
90
94
  iconPosition: getIconPosition(size, iconPosition, children),
91
95
  }),
92
96
  exports.buttonVars.default((colors === null || colors === void 0 ? void 0 : colors.default) || {}),
@@ -80,21 +80,6 @@ export declare const useSelectInput: import("@workday/canvas-kit-react/common").
80
80
  navigation: import("../../../collection/lib/useCursorListModel").NavigationManager;
81
81
  getId: (item: any) => string;
82
82
  }, {
83
- readonly onKeyDown: (event: React.KeyboardEvent) => void;
84
- readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
85
- readonly autoComplete: "off";
86
- readonly onFocus: () => void;
87
- readonly textInputProps: {
88
- readonly ref: React.RefObject<HTMLInputElement>;
89
- readonly onChange: typeof noop;
90
- readonly value: string;
91
- };
92
- readonly ref: (instance: HTMLInputElement | null) => void;
93
- readonly 'aria-haspopup': "menu";
94
- } & {
95
- onKeyDown(event: React.KeyboardEvent<Element>): void;
96
- keySofar: string;
97
- } & {
98
83
  readonly onKeyDown: (event: React.KeyboardEvent<Element>) => void;
99
84
  readonly onBlur: (event: React.FocusEvent<Element, Element>) => void;
100
85
  readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -117,6 +102,21 @@ export declare const useSelectInput: import("@workday/canvas-kit-react/common").
117
102
  } & {
118
103
  ref: (instance: unknown) => void;
119
104
  onClick: (event: React.MouseEvent<Element, MouseEvent>) => void;
105
+ } & {
106
+ onKeyDown(event: React.KeyboardEvent<Element>): void;
107
+ keySofar: string;
108
+ } & {
109
+ readonly onKeyDown: (event: React.KeyboardEvent) => void;
110
+ readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
111
+ readonly autoComplete: "off";
112
+ readonly onFocus: () => void;
113
+ readonly textInputProps: {
114
+ readonly ref: React.RefObject<HTMLInputElement>;
115
+ readonly onChange: typeof noop;
116
+ readonly value: string;
117
+ };
118
+ readonly ref: (instance: HTMLInputElement | null) => void;
119
+ readonly 'aria-haspopup': "menu";
120
120
  }>;
121
121
  export {};
122
122
  //# sourceMappingURL=useSelectInput.d.ts.map
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA4FF,mBAAmB;+BArFP,MAAM,WAAW,CAAC,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuIvE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgGF,mBAAmB;+BArFP,MAAM,WAAW,CAAC,gBAAgB,CAAC;;;;;;;;;;EAmIvE,CAAC"}
@@ -14,7 +14,7 @@ function noop() {
14
14
  /**
15
15
  * `useSelectInput` extends {@link useComboboxInput useComboboxInput} and {@link useComboboxKeyboardTypeAhead useComboboxKeyboardTypeAhead} and adds type ahead functionality and Select-specific [keyboard support](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/).
16
16
  */
17
- exports.useSelectInput = common_1.composeHooks(common_1.createElemPropsHook(useSelectModel_1.useSelectModel)((model, ref, elemProps = {}) => {
17
+ exports.useSelectInput = common_1.composeHooks(combobox_1.useComboboxInput, combobox_1.useComboboxKeyboardTypeAhead, combobox_1.useComboboxResetCursorToSelected, combobox_1.useComboboxMoveCursorToSelected, common_1.createElemPropsHook(useSelectModel_1.useSelectModel)((model, ref, elemProps = {}) => {
18
18
  const { elementRef } = common_1.useLocalRef(ref);
19
19
  const textInputRef = react_1.default.useRef(null);
20
20
  // Update the text value of the input
@@ -126,4 +126,4 @@ exports.useSelectInput = common_1.composeHooks(common_1.createElemPropsHook(useS
126
126
  ref: elementRef,
127
127
  'aria-haspopup': 'menu',
128
128
  };
129
- }), combobox_1.useComboboxKeyboardTypeAhead, combobox_1.useComboboxResetCursorToSelected, combobox_1.useComboboxMoveCursorToSelected, combobox_1.useComboboxInput);
129
+ }));
@@ -69,6 +69,9 @@ export declare const buttonModifiers: import("@workday/canvas-kit-styling").Modi
69
69
  small: string;
70
70
  extraSmall: string;
71
71
  };
72
+ grow: {
73
+ true: string;
74
+ };
72
75
  iconPosition: {
73
76
  largeOnly: string;
74
77
  largeStart: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/BaseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAkB,cAAc,EAAY,MAAM,kCAAkC,CAAC;AAG5F,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACjE,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,eAAe,CAAC,EAAE,cAAc;IACpF;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC;CAAG;AAE7E;;GAEG;AACH,eAAO,MAAM,UAAU;;;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,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC;CAAG;AAE7E;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;CAmDtB,CAAC;AAsFF;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;EAkF1B,CAAC;AAEH,wBAAgB,UAAU,CAAC,MAAM,GAAE,MAAW,UAE7C;AAED,wBAAgB,eAAe,CAC7B,IAAI,CAAC,EAAE,MAAM,OAAO,eAAe,CAAC,IAAI,EACxC,YAAY,CAAC,EAAE,aAAa,EAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GACzB,MAAM,OAAO,eAAe,CAAC,YAAY,CAE3C;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;CA2CrB,CAAC"}
@@ -32,6 +32,9 @@ export const buttonModifiers = createModifiers({
32
32
  small: createStyles({ name: "1bibd9a", styles: "font-size:0.875rem;letter-spacing:0.015rem;height:var(--cnvs-sys-space-x8, calc(0.25rem * 8));min-width:var(--cnvs-sys-space-x20, calc(0.25rem * 20));padding-inline:var(--cnvs-sys-space-x4, calc(0.25rem * 4));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
33
33
  extraSmall: createStyles({ name: "jxl8ry", styles: "font-size:0.75rem;line-height:var(--cnvs-sys-space-x4, calc(0.25rem * 4));letter-spacing:0.02rem;height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));min-width:auto;padding-inline:var(--cnvs-sys-space-x3, calc(0.25rem * 3));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
34
34
  },
35
+ grow: {
36
+ true: createStyles({ name: "5yrx54", styles: "width:100%;max-width:100%;" }),
37
+ },
35
38
  iconPosition: {
36
39
  largeOnly: createStyles({ name: "17x7zv9", styles: "padding:0;min-width:calc(var(--cnvs-sys-space-x4, calc(0.25rem * 4)) * 3);" }),
37
40
  largeStart: createStyles({ name: "6nuy87", styles: "padding-inline-start:var(--cnvs-sys-space-x6, calc(0.25rem * 6));padding-inline-end:var(--cnvs-sys-space-x8, calc(0.25rem * 8));" }),
@@ -58,11 +61,12 @@ export function getIconPosition(size, iconPosition, children) {
58
61
  */
59
62
  export const BaseButton = createComponent('button')({
60
63
  displayName: 'BaseButton',
61
- Component: ({ children, size, fillIcon, iconPosition, icon, colors, shouldMirrorIcon = false, ...elemProps }, ref, Element) => {
64
+ Component: ({ children, size, fillIcon, grow, iconPosition, icon, colors, shouldMirrorIcon = false, ...elemProps }, ref, Element) => {
62
65
  return (React.createElement(Element, Object.assign({ ref: ref, type: "button" }, mergeStyles(elemProps, [
63
66
  baseButtonStyles,
64
67
  buttonModifiers({
65
68
  size: size,
69
+ grow: grow,
66
70
  iconPosition: getIconPosition(size, iconPosition, children),
67
71
  }),
68
72
  buttonVars.default((colors === null || colors === void 0 ? void 0 : colors.default) || {}),
@@ -80,21 +80,6 @@ export declare const useSelectInput: import("@workday/canvas-kit-react/common").
80
80
  navigation: import("../../../collection/lib/useCursorListModel").NavigationManager;
81
81
  getId: (item: any) => string;
82
82
  }, {
83
- readonly onKeyDown: (event: React.KeyboardEvent) => void;
84
- readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
85
- readonly autoComplete: "off";
86
- readonly onFocus: () => void;
87
- readonly textInputProps: {
88
- readonly ref: React.RefObject<HTMLInputElement>;
89
- readonly onChange: typeof noop;
90
- readonly value: string;
91
- };
92
- readonly ref: (instance: HTMLInputElement | null) => void;
93
- readonly 'aria-haspopup': "menu";
94
- } & {
95
- onKeyDown(event: React.KeyboardEvent<Element>): void;
96
- keySofar: string;
97
- } & {
98
83
  readonly onKeyDown: (event: React.KeyboardEvent<Element>) => void;
99
84
  readonly onBlur: (event: React.FocusEvent<Element, Element>) => void;
100
85
  readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -117,6 +102,21 @@ export declare const useSelectInput: import("@workday/canvas-kit-react/common").
117
102
  } & {
118
103
  ref: (instance: unknown) => void;
119
104
  onClick: (event: React.MouseEvent<Element, MouseEvent>) => void;
105
+ } & {
106
+ onKeyDown(event: React.KeyboardEvent<Element>): void;
107
+ keySofar: string;
108
+ } & {
109
+ readonly onKeyDown: (event: React.KeyboardEvent) => void;
110
+ readonly onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
111
+ readonly autoComplete: "off";
112
+ readonly onFocus: () => void;
113
+ readonly textInputProps: {
114
+ readonly ref: React.RefObject<HTMLInputElement>;
115
+ readonly onChange: typeof noop;
116
+ readonly value: string;
117
+ };
118
+ readonly ref: (instance: HTMLInputElement | null) => void;
119
+ readonly 'aria-haspopup': "menu";
120
120
  }>;
121
121
  export {};
122
122
  //# sourceMappingURL=useSelectInput.d.ts.map
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA4FF,mBAAmB;+BArFP,MAAM,WAAW,CAAC,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuIvE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgGF,mBAAmB;+BArFP,MAAM,WAAW,CAAC,gBAAgB,CAAC;;;;;;;;;;EAmIvE,CAAC"}
@@ -8,7 +8,7 @@ function noop() {
8
8
  /**
9
9
  * `useSelectInput` extends {@link useComboboxInput useComboboxInput} and {@link useComboboxKeyboardTypeAhead useComboboxKeyboardTypeAhead} and adds type ahead functionality and Select-specific [keyboard support](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/).
10
10
  */
11
- export const useSelectInput = composeHooks(createElemPropsHook(useSelectModel)((model, ref, elemProps = {}) => {
11
+ export const useSelectInput = composeHooks(useComboboxInput, useComboboxKeyboardTypeAhead, useComboboxResetCursorToSelected, useComboboxMoveCursorToSelected, createElemPropsHook(useSelectModel)((model, ref, elemProps = {}) => {
12
12
  const { elementRef } = useLocalRef(ref);
13
13
  const textInputRef = React.useRef(null);
14
14
  // Update the text value of the input
@@ -120,4 +120,4 @@ export const useSelectInput = composeHooks(createElemPropsHook(useSelectModel)((
120
120
  ref: elementRef,
121
121
  'aria-haspopup': 'menu',
122
122
  };
123
- }), useComboboxKeyboardTypeAhead, useComboboxResetCursorToSelected, useComboboxMoveCursorToSelected, useComboboxInput);
123
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "10.3.41",
3
+ "version": "10.3.43",
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.41",
53
- "@workday/canvas-kit-styling": "^10.3.41",
52
+ "@workday/canvas-kit-popup-stack": "^10.3.43",
53
+ "@workday/canvas-kit-styling": "^10.3.43",
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": "021b245569b7646be89bea64c1efbb375c80ed97"
71
+ "gitHead": "61c7386af9f26e01b4830836e4bb99d2dfa1c102"
72
72
  }
@@ -22,6 +22,10 @@ function noop() {
22
22
  * `useSelectInput` extends {@link useComboboxInput useComboboxInput} and {@link useComboboxKeyboardTypeAhead useComboboxKeyboardTypeAhead} and adds type ahead functionality and Select-specific [keyboard support](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/).
23
23
  */
24
24
  export const useSelectInput = composeHooks(
25
+ useComboboxInput,
26
+ useComboboxKeyboardTypeAhead,
27
+ useComboboxResetCursorToSelected,
28
+ useComboboxMoveCursorToSelected,
25
29
  createElemPropsHook(useSelectModel)(
26
30
  (model, ref, elemProps: {keySofar?: string; placeholder?: string; value?: string} = {}) => {
27
31
  const {elementRef} = useLocalRef<HTMLInputElement>(ref as any);
@@ -158,9 +162,5 @@ export const useSelectInput = composeHooks(
158
162
  'aria-haspopup': 'menu',
159
163
  } as const;
160
164
  }
161
- ),
162
- useComboboxKeyboardTypeAhead,
163
- useComboboxResetCursorToSelected,
164
- useComboboxMoveCursorToSelected,
165
- useComboboxInput
165
+ )
166
166
  );