@workday/canvas-kit-react 12.0.0-alpha.906-next.0 → 12.0.0-alpha.908-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/collection/index.ts +1 -0
- package/collection/lib/useListItemActiveDescendant.ts +26 -0
- package/combobox/lib/ComboboxMenu.tsx +1 -2
- package/combobox/lib/ComboboxMenuItem.tsx +3 -91
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +82 -10
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/avatar/lib/Avatar.js +21 -21
- package/dist/commonjs/badge/lib/CountBadge.js +3 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts +2 -2
- package/dist/commonjs/button/lib/BaseButton.js +21 -21
- package/dist/commonjs/button/lib/DeleteButton.js +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
- package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
- package/dist/commonjs/button/lib/TertiaryButton.js +18 -18
- package/dist/commonjs/card/lib/Card.js +1 -1
- package/dist/commonjs/card/lib/CardBody.js +1 -1
- package/dist/commonjs/card/lib/CardHeading.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.js +3 -3
- package/dist/commonjs/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/commonjs/collection/index.d.ts +1 -0
- package/dist/commonjs/collection/index.d.ts.map +1 -1
- package/dist/commonjs/collection/index.js +1 -0
- package/dist/commonjs/collection/lib/ListBox.js +4 -4
- package/dist/commonjs/collection/lib/useListItemActiveDescendant.d.ts +69 -0
- package/dist/commonjs/collection/lib/useListItemActiveDescendant.d.ts.map +1 -0
- package/dist/commonjs/collection/lib/useListItemActiveDescendant.js +25 -0
- package/dist/commonjs/combobox/lib/Combobox.d.ts +5 -83
- package/dist/commonjs/combobox/lib/Combobox.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/ComboboxMenu.d.ts +5 -83
- package/dist/commonjs/combobox/lib/ComboboxMenu.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/ComboboxMenu.js +1 -2
- package/dist/commonjs/combobox/lib/ComboboxMenuItem.d.ts +18 -260
- package/dist/commonjs/combobox/lib/ComboboxMenuItem.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/ComboboxMenuItem.js +3 -59
- package/dist/commonjs/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/commonjs/common/lib/AccessibleHide.js +1 -1
- package/dist/commonjs/common/lib/CanvasProvider.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldField.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/commonjs/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldHint.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +5 -5
- package/dist/commonjs/form-field/lib/formFieldStencil.js +8 -8
- package/dist/commonjs/icon/lib/AccentIcon.js +2 -2
- package/dist/commonjs/icon/lib/AppletIcon.js +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +2 -2
- package/dist/commonjs/icon/lib/Svg.js +2 -2
- package/dist/commonjs/icon/lib/SystemIcon.js +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
- package/dist/commonjs/loading-dots/lib/LoadingDots.js +3 -3
- package/dist/commonjs/menu/index.d.ts +2 -1
- package/dist/commonjs/menu/index.d.ts.map +1 -1
- package/dist/commonjs/menu/index.js +5 -1
- package/dist/commonjs/menu/lib/Menu.d.ts +89 -9
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +10 -0
- package/dist/commonjs/menu/lib/MenuCard.js +1 -1
- package/dist/commonjs/menu/lib/MenuItem.d.ts +12 -19
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +20 -91
- package/dist/commonjs/menu/lib/MenuList.js +3 -3
- package/dist/commonjs/menu/lib/MenuOption.d.ts +192 -0
- package/dist/commonjs/menu/lib/MenuOption.d.ts.map +1 -0
- package/dist/commonjs/menu/lib/MenuOption.js +89 -0
- package/dist/commonjs/modal/lib/ModalBody.js +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +1 -1
- package/dist/commonjs/modal/lib/ModalHeading.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverlay.js +2 -2
- package/dist/commonjs/popup/lib/PopupBody.js +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +2 -2
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
- package/dist/commonjs/select/lib/Select.d.ts +59 -962
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +5 -5
- package/dist/commonjs/switch/lib/Switch.js +7 -7
- package/dist/commonjs/table/lib/Table.js +1 -1
- package/dist/commonjs/table/lib/TableBody.js +1 -1
- package/dist/commonjs/table/lib/TableCaption.js +1 -1
- package/dist/commonjs/table/lib/TableCell.js +1 -1
- package/dist/commonjs/table/lib/TableFooter.js +1 -1
- package/dist/commonjs/table/lib/TableHead.js +1 -1
- package/dist/commonjs/table/lib/TableHeader.js +1 -1
- package/dist/commonjs/table/lib/TableRow.js +1 -1
- package/dist/commonjs/tabs/lib/Tabs.d.ts +82 -10
- package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/text/lib/LabelText.js +6 -6
- package/dist/commonjs/text/lib/Text.js +16 -16
- package/dist/commonjs/text/lib/TypeLevelComponents.js +4 -4
- package/dist/commonjs/text-area/lib/TextArea.js +5 -5
- package/dist/commonjs/text-input/lib/InputGroup.js +6 -6
- package/dist/commonjs/text-input/lib/TextInput.js +5 -5
- package/dist/commonjs/toast/lib/Toast.js +1 -1
- package/dist/commonjs/toast/lib/ToastBody.js +1 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastMessage.js +1 -1
- package/dist/es6/action-bar/lib/ActionBar.d.ts +82 -10
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/avatar/lib/Avatar.js +21 -21
- package/dist/es6/badge/lib/CountBadge.js +3 -3
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts +2 -2
- package/dist/es6/button/lib/BaseButton.js +21 -21
- package/dist/es6/button/lib/DeleteButton.js +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +2 -2
- package/dist/es6/button/lib/SecondaryButton.js +2 -2
- package/dist/es6/button/lib/TertiaryButton.js +18 -18
- package/dist/es6/card/lib/Card.js +1 -1
- package/dist/es6/card/lib/CardBody.js +1 -1
- package/dist/es6/card/lib/CardHeading.js +1 -1
- package/dist/es6/checkbox/lib/CheckBackground.js +3 -3
- package/dist/es6/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/es6/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/es6/collection/index.d.ts +1 -0
- package/dist/es6/collection/index.d.ts.map +1 -1
- package/dist/es6/collection/index.js +1 -0
- package/dist/es6/collection/lib/ListBox.js +4 -4
- package/dist/es6/collection/lib/useListItemActiveDescendant.d.ts +69 -0
- package/dist/es6/collection/lib/useListItemActiveDescendant.d.ts.map +1 -0
- package/dist/es6/collection/lib/useListItemActiveDescendant.js +22 -0
- package/dist/es6/combobox/lib/Combobox.d.ts +5 -83
- package/dist/es6/combobox/lib/Combobox.d.ts.map +1 -1
- package/dist/es6/combobox/lib/ComboboxMenu.d.ts +5 -83
- package/dist/es6/combobox/lib/ComboboxMenu.d.ts.map +1 -1
- package/dist/es6/combobox/lib/ComboboxMenu.js +1 -2
- package/dist/es6/combobox/lib/ComboboxMenuItem.d.ts +18 -260
- package/dist/es6/combobox/lib/ComboboxMenuItem.d.ts.map +1 -1
- package/dist/es6/combobox/lib/ComboboxMenuItem.js +3 -56
- package/dist/es6/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/es6/common/lib/AccessibleHide.js +1 -1
- package/dist/es6/common/lib/CanvasProvider.js +1 -1
- package/dist/es6/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/es6/form-field/lib/FormFieldField.js +1 -1
- package/dist/es6/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/es6/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/es6/form-field/lib/FormFieldHint.js +3 -3
- package/dist/es6/form-field/lib/FormFieldLabel.js +5 -5
- package/dist/es6/form-field/lib/formFieldStencil.js +8 -8
- package/dist/es6/icon/lib/AccentIcon.js +2 -2
- package/dist/es6/icon/lib/AppletIcon.js +1 -1
- package/dist/es6/icon/lib/Graphic.js +2 -2
- package/dist/es6/icon/lib/Svg.js +2 -2
- package/dist/es6/icon/lib/SystemIcon.js +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +1 -1
- package/dist/es6/loading-dots/lib/LoadingDots.js +3 -3
- package/dist/es6/menu/index.d.ts +2 -1
- package/dist/es6/menu/index.d.ts.map +1 -1
- package/dist/es6/menu/index.js +2 -1
- package/dist/es6/menu/lib/Menu.d.ts +89 -9
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +10 -0
- package/dist/es6/menu/lib/MenuCard.js +1 -1
- package/dist/es6/menu/lib/MenuItem.d.ts +12 -19
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.js +22 -93
- package/dist/es6/menu/lib/MenuList.js +3 -3
- package/dist/es6/menu/lib/MenuOption.d.ts +192 -0
- package/dist/es6/menu/lib/MenuOption.d.ts.map +1 -0
- package/dist/es6/menu/lib/MenuOption.js +63 -0
- package/dist/es6/modal/lib/ModalBody.js +1 -1
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- package/dist/es6/modal/lib/ModalHeading.js +1 -1
- package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/es6/modal/lib/ModalOverlay.js +2 -2
- package/dist/es6/popup/lib/PopupBody.js +1 -1
- package/dist/es6/popup/lib/PopupCard.js +2 -2
- package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/es6/popup/lib/PopupHeading.js +1 -1
- package/dist/es6/select/lib/Select.d.ts +59 -962
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +5 -5
- package/dist/es6/switch/lib/Switch.js +7 -7
- package/dist/es6/table/lib/Table.js +1 -1
- package/dist/es6/table/lib/TableBody.js +1 -1
- package/dist/es6/table/lib/TableCaption.js +1 -1
- package/dist/es6/table/lib/TableCell.js +1 -1
- package/dist/es6/table/lib/TableFooter.js +1 -1
- package/dist/es6/table/lib/TableHead.js +1 -1
- package/dist/es6/table/lib/TableHeader.js +1 -1
- package/dist/es6/table/lib/TableRow.js +1 -1
- package/dist/es6/tabs/lib/Tabs.d.ts +82 -10
- package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/text/lib/LabelText.js +6 -6
- package/dist/es6/text/lib/Text.js +16 -16
- package/dist/es6/text/lib/TypeLevelComponents.js +4 -4
- package/dist/es6/text-area/lib/TextArea.js +5 -5
- package/dist/es6/text-input/lib/InputGroup.js +6 -6
- package/dist/es6/text-input/lib/TextInput.js +5 -5
- package/dist/es6/toast/lib/Toast.js +1 -1
- package/dist/es6/toast/lib/ToastBody.js +1 -1
- package/dist/es6/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/es6/toast/lib/ToastIcon.js +1 -1
- package/dist/es6/toast/lib/ToastMessage.js +1 -1
- package/menu/index.ts +2 -1
- package/menu/lib/Menu.tsx +10 -0
- package/menu/lib/MenuItem.tsx +107 -99
- package/menu/lib/MenuOption.tsx +138 -0
- package/package.json +4 -4
- package/select/lib/Select.tsx +1 -1
|
@@ -264,7 +264,7 @@ export declare const ComboboxMenu: import("@workday/canvas-kit-react/common").El
|
|
|
264
264
|
* `Combobox.Menu.List` and will be passed to the optional `onSelect` callback of the
|
|
265
265
|
* `ComboboxModel`. `Combobox.Menu.Item` can contain any HTML.
|
|
266
266
|
*/
|
|
267
|
-
Item: import("@workday/canvas-kit-react/common").ElementComponentM<"li", import("
|
|
267
|
+
Item: import("@workday/canvas-kit-react/common").ElementComponentM<"li", import("../../menu/lib/MenuOption").MenuOptionProps, {
|
|
268
268
|
state: {
|
|
269
269
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
270
270
|
targetRef: React.RefObject<HTMLButtonElement>;
|
|
@@ -296,12 +296,8 @@ export declare const ComboboxMenu: import("@workday/canvas-kit-react/common").El
|
|
|
296
296
|
isVirtualized: boolean;
|
|
297
297
|
items: import("../..").Item<any>[];
|
|
298
298
|
mode: "multiple" | "single";
|
|
299
|
-
value: string | undefined;
|
|
300
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
301
|
-
width: number;
|
|
302
299
|
};
|
|
303
300
|
events: {
|
|
304
|
-
setWidth(width: number): void;
|
|
305
301
|
updatePlacement(data: {
|
|
306
302
|
placement: import("@popperjs/core").Placement;
|
|
307
303
|
}): void;
|
|
@@ -336,88 +332,14 @@ export declare const ComboboxMenu: import("@workday/canvas-kit-react/common").El
|
|
|
336
332
|
value: number;
|
|
337
333
|
}): void;
|
|
338
334
|
};
|
|
339
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
340
335
|
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
341
336
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
342
337
|
getId: (item: any) => string;
|
|
343
338
|
}> & {
|
|
344
|
-
Icon:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
initialFocusRef: React.RefObject<any> | undefined;
|
|
349
|
-
returnFocusRef: React.RefObject<any> | undefined;
|
|
350
|
-
placement: import("@popperjs/core").Placement;
|
|
351
|
-
id: string;
|
|
352
|
-
visibility: "hidden" | "visible";
|
|
353
|
-
selectedIds: string[] | "all";
|
|
354
|
-
unselectedIds: string[];
|
|
355
|
-
cursorId: string;
|
|
356
|
-
columnCount: number;
|
|
357
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
358
|
-
cursorIndexRef: {
|
|
359
|
-
readonly current: number;
|
|
360
|
-
};
|
|
361
|
-
UNSTABLE_virtual: {
|
|
362
|
-
virtualItems: import("../../collection/lib/react-virtual").VirtualItem[];
|
|
363
|
-
totalSize: number;
|
|
364
|
-
scrollToOffset: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
365
|
-
scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
366
|
-
measure: () => void;
|
|
367
|
-
};
|
|
368
|
-
UNSTABLE_defaultItemHeight: number;
|
|
369
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
370
|
-
orientation: "horizontal" | "vertical";
|
|
371
|
-
indexRef: React.MutableRefObject<number>;
|
|
372
|
-
nonInteractiveIds: string[];
|
|
373
|
-
isVirtualized: boolean;
|
|
374
|
-
items: import("../..").Item<any>[];
|
|
375
|
-
mode: "multiple" | "single";
|
|
376
|
-
value: string | undefined;
|
|
377
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
378
|
-
width: number;
|
|
379
|
-
};
|
|
380
|
-
events: {
|
|
381
|
-
setWidth(width: number): void;
|
|
382
|
-
updatePlacement(data: {
|
|
383
|
-
placement: import("@popperjs/core").Placement;
|
|
384
|
-
}): void;
|
|
385
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
386
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
387
|
-
select(data: {
|
|
388
|
-
id: string;
|
|
389
|
-
}): void;
|
|
390
|
-
selectAll(): void;
|
|
391
|
-
unselectAll(): void;
|
|
392
|
-
goTo(data: {
|
|
393
|
-
id: string;
|
|
394
|
-
}): void;
|
|
395
|
-
goToNext(): void;
|
|
396
|
-
goToPrevious(): void;
|
|
397
|
-
goToPreviousRow(): void;
|
|
398
|
-
goToNextRow(): void;
|
|
399
|
-
goToFirst(): void;
|
|
400
|
-
goToLast(): void;
|
|
401
|
-
goToFirstOfRow(): void;
|
|
402
|
-
goToLastOfRow(): void;
|
|
403
|
-
goToNextPage(): void;
|
|
404
|
-
goToPreviousPage(): void;
|
|
405
|
-
registerItem(data: {
|
|
406
|
-
item: any;
|
|
407
|
-
textValue: string;
|
|
408
|
-
}): void;
|
|
409
|
-
unregisterItem(data: {
|
|
410
|
-
id: string;
|
|
411
|
-
}): void;
|
|
412
|
-
updateItemHeight(data: {
|
|
413
|
-
value: number;
|
|
414
|
-
}): void;
|
|
415
|
-
};
|
|
416
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
417
|
-
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
418
|
-
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
419
|
-
getId: (item: any) => string;
|
|
420
|
-
}>;
|
|
339
|
+
Icon: (elemProps: import("../..").SystemIconProps) => React.JSX.Element;
|
|
340
|
+
Text: ({ children }: {
|
|
341
|
+
children?: React.ReactNode;
|
|
342
|
+
}) => React.JSX.Element;
|
|
421
343
|
};
|
|
422
344
|
/**
|
|
423
345
|
* `Combobox.Menu.Card` is a non-semantic element used to give the dropdown menu its distinct visual
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxMenu.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxMenu.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGrB;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;;;;;;;;;OAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAML,CAAC"}
|
|
@@ -9,7 +9,6 @@ const common_1 = require("@workday/canvas-kit-react/common");
|
|
|
9
9
|
const menu_1 = require("@workday/canvas-kit-react/menu");
|
|
10
10
|
const useComboboxModel_1 = require("./hooks/useComboboxModel");
|
|
11
11
|
const ComboboxMenuList_1 = require("./ComboboxMenuList");
|
|
12
|
-
const ComboboxMenuItem_1 = require("./ComboboxMenuItem");
|
|
13
12
|
const ComboboxCard_1 = require("./ComboboxCard");
|
|
14
13
|
const ComboboxPopper_1 = require("./ComboboxPopper");
|
|
15
14
|
exports.ComboboxMenu = (0, common_1.createSubcomponent)()({
|
|
@@ -50,7 +49,7 @@ exports.ComboboxMenu = (0, common_1.createSubcomponent)()({
|
|
|
50
49
|
* `Combobox.Menu.List` and will be passed to the optional `onSelect` callback of the
|
|
51
50
|
* `ComboboxModel`. `Combobox.Menu.Item` can contain any HTML.
|
|
52
51
|
*/
|
|
53
|
-
Item:
|
|
52
|
+
Item: menu_1.Menu.Option,
|
|
54
53
|
/**
|
|
55
54
|
* `Combobox.Menu.Card` is a non-semantic element used to give the dropdown menu its distinct visual
|
|
56
55
|
* cue that the dropdown menu is floating above other content. `Combobox.Menu.Card` usually contains a
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { StyledMenuItem } from '@workday/canvas-kit-react/menu';
|
|
4
|
-
export interface ComboboxMenuItemProps extends ExtractProps<typeof StyledMenuItem, never> {
|
|
5
|
-
}
|
|
6
1
|
/**
|
|
7
|
-
*
|
|
8
|
-
* component. It prevents focus when clicking so the focus stays on the
|
|
9
|
-
* {@link ComboboxInput Combobox.Input} component and selects an item when the user clicks on it. It
|
|
10
|
-
* also prevents items with an `aria-disabled` attribute from being selected. A `focus` CSS class is
|
|
11
|
-
* added when the item has "focus" (when the cursor is on the item).
|
|
2
|
+
* @deprecated Use `useMenuOption` instead
|
|
12
3
|
*/
|
|
13
|
-
export declare const useComboboxMenuItem: import("
|
|
4
|
+
export declare const useComboboxMenuItem: import("../..").BehaviorHook<{
|
|
14
5
|
state: {
|
|
15
|
-
stackRef:
|
|
16
|
-
targetRef:
|
|
17
|
-
initialFocusRef:
|
|
18
|
-
returnFocusRef:
|
|
6
|
+
stackRef: import("react").RefObject<HTMLDivElement>;
|
|
7
|
+
targetRef: import("react").RefObject<HTMLButtonElement>;
|
|
8
|
+
initialFocusRef: import("react").RefObject<any> | undefined;
|
|
9
|
+
returnFocusRef: import("react").RefObject<any> | undefined;
|
|
19
10
|
placement: import("@popperjs/core").Placement;
|
|
20
11
|
id: string;
|
|
21
12
|
visibility: "hidden" | "visible";
|
|
@@ -23,7 +14,7 @@ export declare const useComboboxMenuItem: import("@workday/canvas-kit-react/comm
|
|
|
23
14
|
unselectedIds: string[];
|
|
24
15
|
cursorId: string;
|
|
25
16
|
columnCount: number;
|
|
26
|
-
pageSizeRef:
|
|
17
|
+
pageSizeRef: import("react").MutableRefObject<number>;
|
|
27
18
|
cursorIndexRef: {
|
|
28
19
|
readonly current: number;
|
|
29
20
|
};
|
|
@@ -35,20 +26,20 @@ export declare const useComboboxMenuItem: import("@workday/canvas-kit-react/comm
|
|
|
35
26
|
measure: () => void;
|
|
36
27
|
};
|
|
37
28
|
UNSTABLE_defaultItemHeight: number;
|
|
38
|
-
containerRef:
|
|
29
|
+
containerRef: import("react").RefObject<HTMLDivElement>;
|
|
39
30
|
orientation: "horizontal" | "vertical";
|
|
40
|
-
indexRef:
|
|
31
|
+
indexRef: import("react").MutableRefObject<number>;
|
|
41
32
|
nonInteractiveIds: string[];
|
|
42
33
|
isVirtualized: boolean;
|
|
43
|
-
items: import("
|
|
34
|
+
items: import("../..").Item<any>[];
|
|
44
35
|
mode: "multiple" | "single";
|
|
45
36
|
};
|
|
46
37
|
events: {
|
|
47
38
|
updatePlacement(data: {
|
|
48
39
|
placement: import("@popperjs/core").Placement;
|
|
49
40
|
}): void;
|
|
50
|
-
show(event?: Event |
|
|
51
|
-
hide(event?: Event |
|
|
41
|
+
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
42
|
+
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
52
43
|
select(data: {
|
|
53
44
|
id: string;
|
|
54
45
|
}): void;
|
|
@@ -82,10 +73,11 @@ export declare const useComboboxMenuItem: import("@workday/canvas-kit-react/comm
|
|
|
82
73
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
83
74
|
getId: (item: any) => string;
|
|
84
75
|
}, {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
role: string;
|
|
77
|
+
'aria-selected': boolean;
|
|
78
|
+
onMouseDown: (event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
79
|
+
} & {
|
|
80
|
+
className: string;
|
|
89
81
|
} & {
|
|
90
82
|
ref: (instance: HTMLElement | null) => void;
|
|
91
83
|
'data-id': string;
|
|
@@ -94,241 +86,7 @@ export declare const useComboboxMenuItem: import("@workday/canvas-kit-react/comm
|
|
|
94
86
|
virtual: null;
|
|
95
87
|
'aria-setsize': number | undefined;
|
|
96
88
|
'aria-posinset': number | undefined;
|
|
97
|
-
style:
|
|
89
|
+
style: import("react").CSSProperties;
|
|
98
90
|
id: string;
|
|
99
|
-
} & {
|
|
100
|
-
'data-id'?: string | undefined;
|
|
101
|
-
}>;
|
|
102
|
-
export declare const ComboboxMenuItemIcon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("@workday/canvas-kit-react/icon").SystemIconProps & React.HTMLAttributes<HTMLSpanElement>, {
|
|
103
|
-
state: {
|
|
104
|
-
stackRef: React.RefObject<HTMLDivElement>;
|
|
105
|
-
targetRef: React.RefObject<HTMLButtonElement>;
|
|
106
|
-
initialFocusRef: React.RefObject<any> | undefined;
|
|
107
|
-
returnFocusRef: React.RefObject<any> | undefined;
|
|
108
|
-
placement: import("@popperjs/core").Placement;
|
|
109
|
-
id: string;
|
|
110
|
-
visibility: "hidden" | "visible";
|
|
111
|
-
selectedIds: string[] | "all";
|
|
112
|
-
unselectedIds: string[];
|
|
113
|
-
cursorId: string;
|
|
114
|
-
columnCount: number;
|
|
115
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
116
|
-
cursorIndexRef: {
|
|
117
|
-
readonly current: number;
|
|
118
|
-
};
|
|
119
|
-
UNSTABLE_virtual: {
|
|
120
|
-
virtualItems: import("../../collection/lib/react-virtual").VirtualItem[];
|
|
121
|
-
totalSize: number;
|
|
122
|
-
scrollToOffset: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
123
|
-
scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
124
|
-
measure: () => void;
|
|
125
|
-
};
|
|
126
|
-
UNSTABLE_defaultItemHeight: number;
|
|
127
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
128
|
-
orientation: "horizontal" | "vertical";
|
|
129
|
-
indexRef: React.MutableRefObject<number>;
|
|
130
|
-
nonInteractiveIds: string[];
|
|
131
|
-
isVirtualized: boolean;
|
|
132
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
133
|
-
mode: "multiple" | "single";
|
|
134
|
-
value: string | undefined;
|
|
135
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
136
|
-
width: number;
|
|
137
|
-
};
|
|
138
|
-
events: {
|
|
139
|
-
setWidth(width: number): void;
|
|
140
|
-
updatePlacement(data: {
|
|
141
|
-
placement: import("@popperjs/core").Placement;
|
|
142
|
-
}): void;
|
|
143
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
144
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
145
|
-
select(data: {
|
|
146
|
-
id: string;
|
|
147
|
-
}): void;
|
|
148
|
-
selectAll(): void;
|
|
149
|
-
unselectAll(): void;
|
|
150
|
-
goTo(data: {
|
|
151
|
-
id: string;
|
|
152
|
-
}): void;
|
|
153
|
-
goToNext(): void;
|
|
154
|
-
goToPrevious(): void;
|
|
155
|
-
goToPreviousRow(): void;
|
|
156
|
-
goToNextRow(): void;
|
|
157
|
-
goToFirst(): void;
|
|
158
|
-
goToLast(): void;
|
|
159
|
-
goToFirstOfRow(): void;
|
|
160
|
-
goToLastOfRow(): void;
|
|
161
|
-
goToNextPage(): void;
|
|
162
|
-
goToPreviousPage(): void;
|
|
163
|
-
registerItem(data: {
|
|
164
|
-
item: any;
|
|
165
|
-
textValue: string;
|
|
166
|
-
}): void;
|
|
167
|
-
unregisterItem(data: {
|
|
168
|
-
id: string;
|
|
169
|
-
}): void;
|
|
170
|
-
updateItemHeight(data: {
|
|
171
|
-
value: number;
|
|
172
|
-
}): void;
|
|
173
|
-
};
|
|
174
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
175
|
-
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
176
|
-
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
177
|
-
getId: (item: any) => string;
|
|
178
91
|
}>;
|
|
179
|
-
export declare const ComboboxMenuItem: import("@workday/canvas-kit-react/common").ElementComponentM<"li", ComboboxMenuItemProps, {
|
|
180
|
-
state: {
|
|
181
|
-
stackRef: React.RefObject<HTMLDivElement>;
|
|
182
|
-
targetRef: React.RefObject<HTMLButtonElement>;
|
|
183
|
-
initialFocusRef: React.RefObject<any> | undefined;
|
|
184
|
-
returnFocusRef: React.RefObject<any> | undefined;
|
|
185
|
-
placement: import("@popperjs/core").Placement;
|
|
186
|
-
id: string;
|
|
187
|
-
visibility: "hidden" | "visible";
|
|
188
|
-
selectedIds: string[] | "all";
|
|
189
|
-
unselectedIds: string[];
|
|
190
|
-
cursorId: string;
|
|
191
|
-
columnCount: number;
|
|
192
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
193
|
-
cursorIndexRef: {
|
|
194
|
-
readonly current: number;
|
|
195
|
-
};
|
|
196
|
-
UNSTABLE_virtual: {
|
|
197
|
-
virtualItems: import("../../collection/lib/react-virtual").VirtualItem[];
|
|
198
|
-
totalSize: number;
|
|
199
|
-
scrollToOffset: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
200
|
-
scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
201
|
-
measure: () => void;
|
|
202
|
-
};
|
|
203
|
-
UNSTABLE_defaultItemHeight: number;
|
|
204
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
205
|
-
orientation: "horizontal" | "vertical";
|
|
206
|
-
indexRef: React.MutableRefObject<number>;
|
|
207
|
-
nonInteractiveIds: string[];
|
|
208
|
-
isVirtualized: boolean;
|
|
209
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
210
|
-
mode: "multiple" | "single";
|
|
211
|
-
value: string | undefined;
|
|
212
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
213
|
-
width: number;
|
|
214
|
-
};
|
|
215
|
-
events: {
|
|
216
|
-
setWidth(width: number): void;
|
|
217
|
-
updatePlacement(data: {
|
|
218
|
-
placement: import("@popperjs/core").Placement;
|
|
219
|
-
}): void;
|
|
220
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
221
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
222
|
-
select(data: {
|
|
223
|
-
id: string;
|
|
224
|
-
}): void;
|
|
225
|
-
selectAll(): void;
|
|
226
|
-
unselectAll(): void;
|
|
227
|
-
goTo(data: {
|
|
228
|
-
id: string;
|
|
229
|
-
}): void;
|
|
230
|
-
goToNext(): void;
|
|
231
|
-
goToPrevious(): void;
|
|
232
|
-
goToPreviousRow(): void;
|
|
233
|
-
goToNextRow(): void;
|
|
234
|
-
goToFirst(): void;
|
|
235
|
-
goToLast(): void;
|
|
236
|
-
goToFirstOfRow(): void;
|
|
237
|
-
goToLastOfRow(): void;
|
|
238
|
-
goToNextPage(): void;
|
|
239
|
-
goToPreviousPage(): void;
|
|
240
|
-
registerItem(data: {
|
|
241
|
-
item: any;
|
|
242
|
-
textValue: string;
|
|
243
|
-
}): void;
|
|
244
|
-
unregisterItem(data: {
|
|
245
|
-
id: string;
|
|
246
|
-
}): void;
|
|
247
|
-
updateItemHeight(data: {
|
|
248
|
-
value: number;
|
|
249
|
-
}): void;
|
|
250
|
-
};
|
|
251
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
252
|
-
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
253
|
-
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
254
|
-
getId: (item: any) => string;
|
|
255
|
-
}> & {
|
|
256
|
-
Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("@workday/canvas-kit-react/icon").SystemIconProps & React.HTMLAttributes<HTMLSpanElement>, {
|
|
257
|
-
state: {
|
|
258
|
-
stackRef: React.RefObject<HTMLDivElement>;
|
|
259
|
-
targetRef: React.RefObject<HTMLButtonElement>;
|
|
260
|
-
initialFocusRef: React.RefObject<any> | undefined;
|
|
261
|
-
returnFocusRef: React.RefObject<any> | undefined;
|
|
262
|
-
placement: import("@popperjs/core").Placement;
|
|
263
|
-
id: string;
|
|
264
|
-
visibility: "hidden" | "visible";
|
|
265
|
-
selectedIds: string[] | "all";
|
|
266
|
-
unselectedIds: string[];
|
|
267
|
-
cursorId: string;
|
|
268
|
-
columnCount: number;
|
|
269
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
270
|
-
cursorIndexRef: {
|
|
271
|
-
readonly current: number;
|
|
272
|
-
};
|
|
273
|
-
UNSTABLE_virtual: {
|
|
274
|
-
virtualItems: import("../../collection/lib/react-virtual").VirtualItem[];
|
|
275
|
-
totalSize: number;
|
|
276
|
-
scrollToOffset: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
277
|
-
scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
278
|
-
measure: () => void;
|
|
279
|
-
};
|
|
280
|
-
UNSTABLE_defaultItemHeight: number;
|
|
281
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
282
|
-
orientation: "horizontal" | "vertical";
|
|
283
|
-
indexRef: React.MutableRefObject<number>;
|
|
284
|
-
nonInteractiveIds: string[];
|
|
285
|
-
isVirtualized: boolean;
|
|
286
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
287
|
-
mode: "multiple" | "single";
|
|
288
|
-
value: string | undefined;
|
|
289
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
290
|
-
width: number;
|
|
291
|
-
};
|
|
292
|
-
events: {
|
|
293
|
-
setWidth(width: number): void;
|
|
294
|
-
updatePlacement(data: {
|
|
295
|
-
placement: import("@popperjs/core").Placement;
|
|
296
|
-
}): void;
|
|
297
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
298
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
299
|
-
select(data: {
|
|
300
|
-
id: string;
|
|
301
|
-
}): void;
|
|
302
|
-
selectAll(): void;
|
|
303
|
-
unselectAll(): void;
|
|
304
|
-
goTo(data: {
|
|
305
|
-
id: string;
|
|
306
|
-
}): void;
|
|
307
|
-
goToNext(): void;
|
|
308
|
-
goToPrevious(): void;
|
|
309
|
-
goToPreviousRow(): void;
|
|
310
|
-
goToNextRow(): void;
|
|
311
|
-
goToFirst(): void;
|
|
312
|
-
goToLast(): void;
|
|
313
|
-
goToFirstOfRow(): void;
|
|
314
|
-
goToLastOfRow(): void;
|
|
315
|
-
goToNextPage(): void;
|
|
316
|
-
goToPreviousPage(): void;
|
|
317
|
-
registerItem(data: {
|
|
318
|
-
item: any;
|
|
319
|
-
textValue: string;
|
|
320
|
-
}): void;
|
|
321
|
-
unregisterItem(data: {
|
|
322
|
-
id: string;
|
|
323
|
-
}): void;
|
|
324
|
-
updateItemHeight(data: {
|
|
325
|
-
value: number;
|
|
326
|
-
}): void;
|
|
327
|
-
};
|
|
328
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
329
|
-
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
330
|
-
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
331
|
-
getId: (item: any) => string;
|
|
332
|
-
}>;
|
|
333
|
-
};
|
|
334
92
|
//# sourceMappingURL=ComboboxMenuItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxMenuItem.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenuItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComboboxMenuItem.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxMenuItem.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgB,CAAC"}
|
|
@@ -1,64 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
3
|
+
exports.useComboboxMenuItem = void 0;
|
|
9
4
|
const menu_1 = require("@workday/canvas-kit-react/menu");
|
|
10
|
-
const icon_1 = require("@workday/canvas-kit-react/icon");
|
|
11
|
-
const collection_1 = require("@workday/canvas-kit-react/collection");
|
|
12
|
-
const tooltip_1 = require("@workday/canvas-kit-react/tooltip");
|
|
13
|
-
const useComboboxModel_1 = require("./hooks/useComboboxModel");
|
|
14
|
-
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
15
|
-
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
16
|
-
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
17
5
|
/**
|
|
18
|
-
*
|
|
19
|
-
* component. It prevents focus when clicking so the focus stays on the
|
|
20
|
-
* {@link ComboboxInput Combobox.Input} component and selects an item when the user clicks on it. It
|
|
21
|
-
* also prevents items with an `aria-disabled` attribute from being selected. A `focus` CSS class is
|
|
22
|
-
* added when the item has "focus" (when the cursor is on the item).
|
|
6
|
+
* @deprecated Use `useMenuOption` instead
|
|
23
7
|
*/
|
|
24
|
-
exports.useComboboxMenuItem =
|
|
25
|
-
const id = elemProps['data-id'] || '';
|
|
26
|
-
const onMouseDown = (event) => {
|
|
27
|
-
if (event.currentTarget.getAttribute('aria-disabled') !== 'true') {
|
|
28
|
-
model.events.select({ id });
|
|
29
|
-
if (model.state.mode === 'single') {
|
|
30
|
-
model.events.hide(event);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
// prevent focus changes
|
|
34
|
-
event.preventDefault();
|
|
35
|
-
};
|
|
36
|
-
const selected = (0, collection_1.isSelected)(id, model.state);
|
|
37
|
-
return {
|
|
38
|
-
role: 'option',
|
|
39
|
-
'aria-selected': selected || undefined,
|
|
40
|
-
onMouseDown,
|
|
41
|
-
className: model.state.cursorId && model.state.cursorId === elemProps['data-id'] ? 'focus' : '',
|
|
42
|
-
};
|
|
43
|
-
}), collection_1.useListItemRegister, collection_1.useListItemAllowChildStrings);
|
|
44
|
-
const comboboxMenuItemIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
45
|
-
base: { name: "znlb46", styles: "box-sizing:border-box;align-self:start;" }
|
|
46
|
-
}, "combobox-menu-item-icon-1886be");
|
|
47
|
-
exports.ComboboxMenuItemIcon = (0, common_1.createSubcomponent)('span')({
|
|
48
|
-
modelHook: useComboboxModel_1.useComboboxModel,
|
|
49
|
-
})((elemProps, Element) => {
|
|
50
|
-
return react_1.default.createElement(icon_1.SystemIcon, { as: Element, ...(0, layout_1.mergeStyles)(elemProps, comboboxMenuItemIconStencil()) });
|
|
51
|
-
});
|
|
52
|
-
const comboboxMenuItemStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
53
|
-
base: { name: "znlb47", styles: "box-sizing:border-box;min-height:var(--cnvs-sys-space-x10);" }
|
|
54
|
-
}, "combobox-menu-item-f6da1d");
|
|
55
|
-
exports.ComboboxMenuItem = (0, common_1.createSubcomponent)('li')({
|
|
56
|
-
modelHook: useComboboxModel_1.useComboboxModel,
|
|
57
|
-
elemPropsHook: exports.useComboboxMenuItem,
|
|
58
|
-
subComponents: {
|
|
59
|
-
Icon: exports.ComboboxMenuItemIcon,
|
|
60
|
-
},
|
|
61
|
-
})(({ children, ...elemProps }, Element) => {
|
|
62
|
-
return (react_1.default.createElement(tooltip_1.OverflowTooltip, { placement: "left" },
|
|
63
|
-
react_1.default.createElement(menu_1.StyledMenuItem, { as: Element, ...(0, layout_1.mergeStyles)(elemProps, comboboxMenuItemStencil()) }, children)));
|
|
64
|
-
});
|
|
8
|
+
exports.useComboboxMenuItem = menu_1.useMenuOption;
|
|
@@ -24,7 +24,7 @@ exports.useComboboxMenuList = (0, common_1.createElemPropsHook)(menu_1.useMenuMo
|
|
|
24
24
|
};
|
|
25
25
|
});
|
|
26
26
|
const comboboxMenuListStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
27
|
-
base: { name: "
|
|
27
|
+
base: { name: "e30347", styles: "box-sizing:border-box;" },
|
|
28
28
|
extends: menu_1.menuListStencil
|
|
29
29
|
}, "combobox-menu-list-04543a");
|
|
30
30
|
exports.ComboboxMenuList = (0, common_1.createSubcomponent)('ul')({
|
|
@@ -43,7 +43,7 @@ exports.accessibleHide = {
|
|
|
43
43
|
padding: 0,
|
|
44
44
|
border: 0,
|
|
45
45
|
};
|
|
46
|
-
exports.accessibleHideStyles = (0, canvas_kit_styling_1.createStyles)({ name: "
|
|
46
|
+
exports.accessibleHideStyles = (0, canvas_kit_styling_1.createStyles)({ name: "e3032", styles: "clip:rect(1px, 1px, 1px, 1px);clip-path:polygon(0px 0px, 0px 0px, 0px 0px, 0px 0px);position:absolute;overflow:hidden;white-space:nowrap;height:1px;width:1px;margin:-1px;padding:0;border:0;" });
|
|
47
47
|
/**
|
|
48
48
|
* A convenient component wrapper to visually hide content, while still making it accessible to screen readers
|
|
49
49
|
*/
|
|
@@ -31,7 +31,7 @@ const theming_1 = require("./theming");
|
|
|
31
31
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
32
32
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
33
33
|
// copied from brand/_variables.css
|
|
34
|
-
const defaultBranding = (0, canvas_kit_styling_1.createStyles)({ name: "
|
|
34
|
+
const defaultBranding = (0, canvas_kit_styling_1.createStyles)({ name: "e3033", styles: "--cnvs-brand-error-darkest:rgba(128,22,14,1);--cnvs-brand-common-alert-inner:var(--cnvs-base-palette-cantaloupe-400);--cnvs-brand-common-error-inner:var(--cnvs-base-palette-cinnamon-500);--cnvs-brand-common-focus-outline:var(--cnvs-base-palette-blueberry-400);--cnvs-brand-neutral-accent:var(--cnvs-base-palette-french-vanilla-100);--cnvs-brand-neutral-darkest:var(--cnvs-base-palette-licorice-400);--cnvs-brand-neutral-dark:var(--cnvs-base-palette-licorice-300);--cnvs-brand-neutral-base:var(--cnvs-base-palette-soap-600);--cnvs-brand-neutral-light:var(--cnvs-base-palette-soap-300);--cnvs-brand-neutral-lightest:var(--cnvs-base-palette-soap-200);--cnvs-brand-success-accent:var(--cnvs-base-palette-french-vanilla-100);--cnvs-brand-success-darkest:var(--cnvs-base-palette-green-apple-600);--cnvs-brand-success-dark:var(--cnvs-base-palette-green-apple-500);--cnvs-brand-success-base:var(--cnvs-base-palette-green-apple-400);--cnvs-brand-success-light:var(--cnvs-base-palette-green-apple-300);--cnvs-brand-success-lightest:var(--cnvs-base-palette-green-apple-100);--cnvs-brand-error-accent:var(--cnvs-base-palette-french-vanilla-100);--cnvs-brand-error-dark:var(--cnvs-base-palette-cinnamon-600);--cnvs-brand-error-base:var(--cnvs-base-palette-cinnamon-500);--cnvs-brand-error-light:var(--cnvs-base-palette-cinnamon-200);--cnvs-brand-error-lightest:var(--cnvs-base-palette-cinnamon-100);--cnvs-brand-alert-accent:var(--cnvs-base-palette-french-vanilla-100);--cnvs-brand-alert-darkest:var(--cnvs-base-palette-cantaloupe-600);--cnvs-brand-alert-dark:var(--cnvs-base-palette-cantaloupe-500);--cnvs-brand-alert-base:var(--cnvs-base-palette-cantaloupe-400);--cnvs-brand-alert-light:var(--cnvs-base-palette-cantaloupe-200);--cnvs-brand-alert-lightest:var(--cnvs-base-palette-cantaloupe-100);--cnvs-brand-primary-accent:var(--cnvs-base-palette-french-vanilla-100);--cnvs-brand-primary-darkest:var(--cnvs-base-palette-blueberry-600);--cnvs-brand-primary-dark:var(--cnvs-base-palette-blueberry-500);--cnvs-brand-primary-base:var(--cnvs-base-palette-blueberry-400);--cnvs-brand-primary-light:var(--cnvs-base-palette-blueberry-200);--cnvs-brand-primary-lightest:var(--cnvs-base-palette-blueberry-100);--cnvs-brand-gradient-primary:linear-gradient(90deg, var(--cnvs-brand-primary-base) 0%, var(--cnvs-brand-primary-dark) 100%);" });
|
|
35
35
|
const mappedKeys = {
|
|
36
36
|
lightest: 'lightest',
|
|
37
37
|
light: 'light',
|
|
@@ -13,7 +13,7 @@ const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
|
13
13
|
* @deprecated `formFieldContainerStencil` is deprecated and will be removed in a future major version. Please use `FormField.Field` to always wrap `FormField.Input` and `FormField.Hint` to always ensure correct label and input alignment.
|
|
14
14
|
*/
|
|
15
15
|
exports.formFieldContainerStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
16
|
-
base: { name: "
|
|
16
|
+
base: { name: "e3034g", styles: "box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cnvs-sys-space-x2);" }
|
|
17
17
|
}, "form-field-container-b7ba71");
|
|
18
18
|
/**
|
|
19
19
|
* @deprecated `FormField.Container` is deprecated and will be removed in a future major version. Please use `FormField.Field` to always wrap `FormField.Input` and `FormField.Hint` to always ensure correct label and input alignment.
|
|
@@ -10,7 +10,7 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
10
10
|
const hooks_1 = require("./hooks");
|
|
11
11
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
12
12
|
exports.formFieldFieldStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
13
|
-
base: { name: "
|
|
13
|
+
base: { name: "e3034p", styles: "box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cnvs-sys-space-x2);" }
|
|
14
14
|
}, "form-field-field-fc001f");
|
|
15
15
|
exports.FormFieldField = (0, common_1.createSubcomponent)('div')({
|
|
16
16
|
displayName: 'FormField.Field',
|
|
@@ -14,15 +14,15 @@ const hooks_1 = require("./hooks");
|
|
|
14
14
|
exports.formFieldGroupLabelStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
15
15
|
extends: text_1.textStencil,
|
|
16
16
|
// @ts-ignore Still weird about CSS font variables
|
|
17
|
-
base: { name: "
|
|
17
|
+
base: { name: "e3034t", styles: "box-sizing:border-box;font-weight:var(--cnvs-sys-font-weight-medium);color:var(--cnvs-sys-color-text-default);padding-inline-start:var(--cnvs-sys-space-zero);display:flex;align-items:center;min-width:11.25rem;" },
|
|
18
18
|
modifiers: {
|
|
19
19
|
isRequired: {
|
|
20
|
-
true: { name: "
|
|
20
|
+
true: { name: "e3034u", styles: "&::after{content:\"*\";font-size:var(--cnvs-sys-font-size-body-large);font-weight:var(--cnvs-sys-font-weight-normal);color:var(--cnvs-brand-error-base);text-decoration:unset;margin-inline-start:var(--cnvs-sys-space-x1);}" }
|
|
21
21
|
},
|
|
22
22
|
orientation: {
|
|
23
|
-
vertical: { name: "
|
|
24
|
-
horizontalStart: { name: "
|
|
25
|
-
horizontalEnd: { name: "
|
|
23
|
+
vertical: { name: "e3034v", styles: "width:100%;" },
|
|
24
|
+
horizontalStart: { name: "e3034w", styles: "justify-content:flex-start;float:left;max-height:var(--cnvs-sys-space-x10);" },
|
|
25
|
+
horizontalEnd: { name: "e3034x", styles: "max-height:var(--cnvs-sys-space-x10);float:left;justify-content:flex-end;" }
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
defaultModifiers: {
|
|
@@ -10,11 +10,11 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
10
10
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
11
11
|
const hooks_1 = require("./hooks");
|
|
12
12
|
const formFieldGroupListStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
13
|
-
base: { name: "
|
|
13
|
+
base: { name: "e3034q", styles: "box-sizing:border-box;display:flex;flex-direction:column;border-radius:var(--cnvs-sys-shape-x1);gap:var(--cnvs-sys-space-x2);padding:0.625rem var(--cnvs-sys-space-x3) var(--cnvs-sys-space-x2);margin:0 calc(var(--cnvs-sys-space-x3) * -1);transition:100ms box-shadow;width:fit-content;" },
|
|
14
14
|
modifiers: {
|
|
15
15
|
error: {
|
|
16
|
-
error: { name: "
|
|
17
|
-
alert: { name: "
|
|
16
|
+
error: { name: "e3034r", styles: "box-shadow:inset 0 0 0 0.125rem var(--cnvs-brand-error-base);" },
|
|
17
|
+
alert: { name: "e3034s", styles: "box-shadow:inset 0 0 0 0.0625rem var(--cnvs-brand-alert-darkest), inset 0 0 0 0.1875rem var(--cnvs-brand-alert-base);" }
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}, "form-field-group-list-ea1ca7");
|