@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
|
@@ -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,58 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { composeHooks, createElemPropsHook, createSubcomponent, } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { StyledMenuItem, useMenuModel } from '@workday/canvas-kit-react/menu';
|
|
4
|
-
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
5
|
-
import { useListItemAllowChildStrings, useListItemRegister, isSelected, } from '@workday/canvas-kit-react/collection';
|
|
6
|
-
import { OverflowTooltip } from '@workday/canvas-kit-react/tooltip';
|
|
7
|
-
import { useComboboxModel } from './hooks/useComboboxModel';
|
|
8
|
-
import { createStencil } from '@workday/canvas-kit-styling';
|
|
9
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
10
|
-
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
1
|
+
import { useMenuOption } from '@workday/canvas-kit-react/menu';
|
|
11
2
|
/**
|
|
12
|
-
*
|
|
13
|
-
* component. It prevents focus when clicking so the focus stays on the
|
|
14
|
-
* {@link ComboboxInput Combobox.Input} component and selects an item when the user clicks on it. It
|
|
15
|
-
* also prevents items with an `aria-disabled` attribute from being selected. A `focus` CSS class is
|
|
16
|
-
* added when the item has "focus" (when the cursor is on the item).
|
|
3
|
+
* @deprecated Use `useMenuOption` instead
|
|
17
4
|
*/
|
|
18
|
-
export const useComboboxMenuItem =
|
|
19
|
-
const id = elemProps['data-id'] || '';
|
|
20
|
-
const onMouseDown = (event) => {
|
|
21
|
-
if (event.currentTarget.getAttribute('aria-disabled') !== 'true') {
|
|
22
|
-
model.events.select({ id });
|
|
23
|
-
if (model.state.mode === 'single') {
|
|
24
|
-
model.events.hide(event);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
// prevent focus changes
|
|
28
|
-
event.preventDefault();
|
|
29
|
-
};
|
|
30
|
-
const selected = isSelected(id, model.state);
|
|
31
|
-
return {
|
|
32
|
-
role: 'option',
|
|
33
|
-
'aria-selected': selected || undefined,
|
|
34
|
-
onMouseDown,
|
|
35
|
-
className: model.state.cursorId && model.state.cursorId === elemProps['data-id'] ? 'focus' : '',
|
|
36
|
-
};
|
|
37
|
-
}), useListItemRegister, useListItemAllowChildStrings);
|
|
38
|
-
const comboboxMenuItemIconStencil = createStencil({
|
|
39
|
-
base: { name: "n4fo46", styles: "box-sizing:border-box;align-self:start;" }
|
|
40
|
-
}, "combobox-menu-item-icon-1886be");
|
|
41
|
-
export const ComboboxMenuItemIcon = createSubcomponent('span')({
|
|
42
|
-
modelHook: useComboboxModel,
|
|
43
|
-
})((elemProps, Element) => {
|
|
44
|
-
return React.createElement(SystemIcon, { as: Element, ...mergeStyles(elemProps, comboboxMenuItemIconStencil()) });
|
|
45
|
-
});
|
|
46
|
-
const comboboxMenuItemStencil = createStencil({
|
|
47
|
-
base: { name: "n4fo47", styles: "box-sizing:border-box;min-height:var(--cnvs-sys-space-x10);" }
|
|
48
|
-
}, "combobox-menu-item-f6da1d");
|
|
49
|
-
export const ComboboxMenuItem = createSubcomponent('li')({
|
|
50
|
-
modelHook: useComboboxModel,
|
|
51
|
-
elemPropsHook: useComboboxMenuItem,
|
|
52
|
-
subComponents: {
|
|
53
|
-
Icon: ComboboxMenuItemIcon,
|
|
54
|
-
},
|
|
55
|
-
})(({ children, ...elemProps }, Element) => {
|
|
56
|
-
return (React.createElement(OverflowTooltip, { placement: "left" },
|
|
57
|
-
React.createElement(StyledMenuItem, { as: Element, ...mergeStyles(elemProps, comboboxMenuItemStencil()) }, children)));
|
|
58
|
-
});
|
|
5
|
+
export const useComboboxMenuItem = useMenuOption;
|
|
@@ -18,7 +18,7 @@ export const useComboboxMenuList = createElemPropsHook(useMenuModel)(model => {
|
|
|
18
18
|
};
|
|
19
19
|
});
|
|
20
20
|
const comboboxMenuListStencil = createStencil({
|
|
21
|
-
base: { name: "
|
|
21
|
+
base: { name: "xgsx47", styles: "box-sizing:border-box;" },
|
|
22
22
|
extends: menuListStencil
|
|
23
23
|
}, "combobox-menu-list-04543a");
|
|
24
24
|
export const ComboboxMenuList = createSubcomponent('ul')({
|
|
@@ -17,7 +17,7 @@ export const accessibleHide = {
|
|
|
17
17
|
padding: 0,
|
|
18
18
|
border: 0,
|
|
19
19
|
};
|
|
20
|
-
export const accessibleHideStyles = createStyles({ name: "
|
|
20
|
+
export const accessibleHideStyles = createStyles({ name: "xgsx2", 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;" });
|
|
21
21
|
/**
|
|
22
22
|
* A convenient component wrapper to visually hide content, while still making it accessible to screen readers
|
|
23
23
|
*/
|
|
@@ -5,7 +5,7 @@ import { defaultCanvasTheme, useTheme } from './theming';
|
|
|
5
5
|
import { brand, base } from '@workday/canvas-tokens-web';
|
|
6
6
|
import { createStyles, getCache } from '@workday/canvas-kit-styling';
|
|
7
7
|
// copied from brand/_variables.css
|
|
8
|
-
const defaultBranding = createStyles({ name: "
|
|
8
|
+
const defaultBranding = createStyles({ name: "xgsx3", 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%);" });
|
|
9
9
|
const mappedKeys = {
|
|
10
10
|
lightest: 'lightest',
|
|
11
11
|
light: 'light',
|
|
@@ -7,7 +7,7 @@ import { system } from '@workday/canvas-tokens-web';
|
|
|
7
7
|
* @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.
|
|
8
8
|
*/
|
|
9
9
|
export const formFieldContainerStencil = createStencil({
|
|
10
|
-
base: { name: "
|
|
10
|
+
base: { name: "xgsx4g", styles: "box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cnvs-sys-space-x2);" }
|
|
11
11
|
}, "form-field-container-b7ba71");
|
|
12
12
|
/**
|
|
13
13
|
* @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.
|
|
@@ -4,7 +4,7 @@ import { handleCsProp, createStencil } from '@workday/canvas-kit-styling';
|
|
|
4
4
|
import { useFormFieldModel } from './hooks';
|
|
5
5
|
import { system } from '@workday/canvas-tokens-web';
|
|
6
6
|
export const formFieldFieldStencil = createStencil({
|
|
7
|
-
base: { name: "
|
|
7
|
+
base: { name: "xgsx4p", styles: "box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cnvs-sys-space-x2);" }
|
|
8
8
|
}, "form-field-field-fc001f");
|
|
9
9
|
export const FormFieldField = createSubcomponent('div')({
|
|
10
10
|
displayName: 'FormField.Field',
|
|
@@ -8,15 +8,15 @@ import { useFormFieldModel } from './hooks';
|
|
|
8
8
|
export const formFieldGroupLabelStencil = createStencil({
|
|
9
9
|
extends: textStencil,
|
|
10
10
|
// @ts-ignore Still weird about CSS font variables
|
|
11
|
-
base: { name: "
|
|
11
|
+
base: { name: "xgsx4t", 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;" },
|
|
12
12
|
modifiers: {
|
|
13
13
|
isRequired: {
|
|
14
|
-
true: { name: "
|
|
14
|
+
true: { name: "xgsx4u", 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);}" }
|
|
15
15
|
},
|
|
16
16
|
orientation: {
|
|
17
|
-
vertical: { name: "
|
|
18
|
-
horizontalStart: { name: "
|
|
19
|
-
horizontalEnd: { name: "
|
|
17
|
+
vertical: { name: "xgsx4v", styles: "width:100%;" },
|
|
18
|
+
horizontalStart: { name: "xgsx4w", styles: "justify-content:flex-start;float:left;max-height:var(--cnvs-sys-space-x10);" },
|
|
19
|
+
horizontalEnd: { name: "xgsx4x", styles: "max-height:var(--cnvs-sys-space-x10);float:left;justify-content:flex-end;" }
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
defaultModifiers: {
|
|
@@ -4,11 +4,11 @@ import { createStencil, calc, px2rem, handleCsProp } from '@workday/canvas-kit-s
|
|
|
4
4
|
import { brand, system } from '@workday/canvas-tokens-web';
|
|
5
5
|
import { useFormFieldModel } from './hooks';
|
|
6
6
|
const formFieldGroupListStencil = createStencil({
|
|
7
|
-
base: { name: "
|
|
7
|
+
base: { name: "xgsx4q", 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;" },
|
|
8
8
|
modifiers: {
|
|
9
9
|
error: {
|
|
10
|
-
error: { name: "
|
|
11
|
-
alert: { name: "
|
|
10
|
+
error: { name: "xgsx4r", styles: "box-shadow:inset 0 0 0 0.125rem var(--cnvs-brand-error-base);" },
|
|
11
|
+
alert: { name: "xgsx4s", 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);" }
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}, "form-field-group-list-ea1ca7");
|
|
@@ -7,11 +7,11 @@ import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
|
7
7
|
import { useFormFieldHint, useFormFieldModel } from './hooks';
|
|
8
8
|
export const formFieldHintStencil = createStencil({
|
|
9
9
|
extends: textStencil,
|
|
10
|
-
base: { name: "
|
|
10
|
+
base: { name: "xgsx4d", styles: "box-sizing:border-box;margin:var(--cnvs-sys-space-zero);" },
|
|
11
11
|
modifiers: {
|
|
12
12
|
error: {
|
|
13
|
-
error: { name: "
|
|
14
|
-
alert: { name: "
|
|
13
|
+
error: { name: "xgsx4e", styles: "color:var(--cnvs-brand-error-base);" },
|
|
14
|
+
alert: { name: "xgsx4f", styles: "" }
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
defaultModifiers: {
|
|
@@ -8,15 +8,15 @@ import { useFormFieldLabel, useFormFieldModel } from './hooks';
|
|
|
8
8
|
export const formFieldLabelStencil = createStencil({
|
|
9
9
|
extends: textStencil,
|
|
10
10
|
// @ts-ignore Still weird about CSS font variables
|
|
11
|
-
base: { name: "
|
|
11
|
+
base: { name: "xgsx48", 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;" },
|
|
12
12
|
modifiers: {
|
|
13
13
|
isRequired: {
|
|
14
|
-
true: { name: "
|
|
14
|
+
true: { name: "xgsx49", 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);}" }
|
|
15
15
|
},
|
|
16
16
|
orientation: {
|
|
17
|
-
horizontalStart: { name: "
|
|
18
|
-
horizontalEnd: { name: "
|
|
19
|
-
vertical: { name: "
|
|
17
|
+
horizontalStart: { name: "xgsx4a", styles: "justify-content:flex-start;float:left;max-height:var(--cnvs-sys-space-x10);" },
|
|
18
|
+
horizontalEnd: { name: "xgsx4b", styles: "max-height:var(--cnvs-sys-space-x10);float:left;justify-content:flex-end;" },
|
|
19
|
+
vertical: { name: "xgsx4c", styles: "width:100%;" }
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
defaultModifiers: {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { createStencil } from '@workday/canvas-kit-styling';
|
|
2
2
|
import { system } from '@workday/canvas-tokens-web';
|
|
3
3
|
export const formFieldStencil = createStencil({
|
|
4
|
-
base: { name: "
|
|
4
|
+
base: { name: "xgsx4h", styles: "box-sizing:border-box;display:flex;border:none;padding:var(--cnvs-sys-space-zero);margin:var(--cnvs-sys-space-zero) var(--cnvs-sys-space-zero) var(--cnvs-sys-space-x6);" },
|
|
5
5
|
modifiers: {
|
|
6
6
|
grow: {
|
|
7
|
-
true: { name: "
|
|
7
|
+
true: { name: "xgsx4i", styles: "width:100%;[data-width=\"ck-formfield-width\"]{width:100%;}&:has(div[data-width=\"ck-formfield-width\"]){width:100%;}" }
|
|
8
8
|
},
|
|
9
9
|
orientation: {
|
|
10
|
-
horizontalStart: { name: "
|
|
11
|
-
horizontalEnd: { name: "
|
|
12
|
-
vertical: { name: "
|
|
10
|
+
horizontalStart: { name: "xgsx4j", styles: "flex-direction:row;gap:var(--cnvs-sys-space-x8);" },
|
|
11
|
+
horizontalEnd: { name: "xgsx4k", styles: "flex-direction:row;gap:var(--cnvs-sys-space-x8);" },
|
|
12
|
+
vertical: { name: "xgsx4l", styles: "flex-direction:column;gap:var(--cnvs-sys-space-x1);align-items:flex-start;" }
|
|
13
13
|
},
|
|
14
14
|
required: {
|
|
15
|
-
true: { name: "
|
|
15
|
+
true: { name: "xgsx4m", styles: "" }
|
|
16
16
|
},
|
|
17
17
|
error: {
|
|
18
|
-
error: { name: "
|
|
19
|
-
alert: { name: "
|
|
18
|
+
error: { name: "xgsx4n", styles: "" },
|
|
19
|
+
alert: { name: "xgsx4o", styles: "" }
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
defaultModifiers: {
|
|
@@ -21,10 +21,10 @@ export const accentIconStencil = createStencil({
|
|
|
21
21
|
vars: {
|
|
22
22
|
color: '',
|
|
23
23
|
},
|
|
24
|
-
base: { name: "
|
|
24
|
+
base: { name: "xgsx11", styles: "box-sizing:border-box;--size-svg-a30d66:3.5rem;& .color-500{fill:var(--color-accent-icon-f47b2a, var(--cnvs-base-palette-blueberry-500));}& .french-vanilla-100{fill:var(--cnvs-base-palette-french-vanilla-100);}" },
|
|
25
25
|
modifiers: {
|
|
26
26
|
transparent: {
|
|
27
|
-
true: { name: "
|
|
27
|
+
true: { name: "xgsx12", styles: "& .french-vanilla-100{fill:transparent;}" }
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}, "accent-icon-f47b2a");
|
|
@@ -51,7 +51,7 @@ export const appletIconStencil = createStencil({
|
|
|
51
51
|
color400: '',
|
|
52
52
|
color500: '',
|
|
53
53
|
},
|
|
54
|
-
base: { name: "
|
|
54
|
+
base: { name: "xgsx13", styles: "box-sizing:border-box;--size-svg-a30d66:5.75rem;& .color-100{fill:var(--cnvs-base-palette-french-vanilla-100);}& .color-200{fill:var(--color200-applet-icon-757179, var(--cnvs-base-palette-blueberry-200));}& .color-300{fill:var(--color300-applet-icon-757179, var(--cnvs-base-palette-blueberry-300));}& .color-400{fill:var(--color400-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}& .color-400-alpha-20{fill:var(--color400-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}& .color-500{fill:var(--color500-applet-icon-757179, var(--cnvs-base-palette-blueberry-400));}" }
|
|
55
55
|
}, "applet-icon-757179");
|
|
56
56
|
export const AppletIcon = createComponent('span')({
|
|
57
57
|
displayName: 'AppletIcon',
|
|
@@ -36,10 +36,10 @@ export const graphicStyles = ({ width, height, grow }) => {
|
|
|
36
36
|
};
|
|
37
37
|
export const graphicStencil = createStencil({
|
|
38
38
|
extends: svgStencil,
|
|
39
|
-
base: { name: "
|
|
39
|
+
base: { name: "xgsx16", styles: "box-sizing:border-box;" },
|
|
40
40
|
modifiers: {
|
|
41
41
|
grow: {
|
|
42
|
-
true: { name: "
|
|
42
|
+
true: { name: "xgsx17", styles: "width:100%;--width-svg-a30d66:100%;" }
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}, "graphic-ee386a");
|
package/dist/es6/icon/lib/Svg.js
CHANGED
|
@@ -13,10 +13,10 @@ export const svgStencil = createStencil({
|
|
|
13
13
|
/** sets width and height of svg element */
|
|
14
14
|
size: '',
|
|
15
15
|
},
|
|
16
|
-
base: { name: "
|
|
16
|
+
base: { name: "xgsxz", styles: "box-sizing:border-box;display:inline-block;> svg{display:block;width:var(--width-svg-a30d66, var(--size-svg-a30d66));height:var(--height-svg-a30d66, var(--size-svg-a30d66));}" },
|
|
17
17
|
modifiers: {
|
|
18
18
|
shouldMirror: {
|
|
19
|
-
true: { name: "
|
|
19
|
+
true: { name: "xgsx10", styles: "transform:scaleX(-1);" }
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}, "svg-a30d66");
|
|
@@ -55,7 +55,7 @@ export const systemIconStencil = createStencil({
|
|
|
55
55
|
accentColor: '',
|
|
56
56
|
backgroundColor: '',
|
|
57
57
|
},
|
|
58
|
-
base: { name: "
|
|
58
|
+
base: { name: "xgsx14", styles: "box-sizing:border-box;--backgroundColor-system-icon-583fae:var(--backgroundColor-system-icon-583fae, transparent);& .wd-icon-fill{fill:var(--color-system-icon-583fae, var(--cnvs-base-palette-licorice-200));}& .wd-icon-accent, & .wd-icon-accent2{fill:var(--accentColor-system-icon-583fae, var(--color-system-icon-583fae, var(--cnvs-base-palette-licorice-200)));}& .wd-icon-background{fill:var(--backgroundColor-system-icon-583fae, transparent);}&:where(:hover, .hover) .wd-icon-fill{fill:var(--fillHover-193ff4, var(--colorHover-193ff4, var(--color-system-icon-583fae, var(--cnvs-base-palette-licorice-200))));}&:where(:hover, .hover) .wd-icon-accent, & .wd-icon-accent2{fill:var(--accentHover-193ff4, var(--colorHover-193ff4, var(--accentColor-system-icon-583fae, var(--color-system-icon-583fae, var(--cnvs-base-palette-licorice-200)))));}&:where(:hover, .hover) .wd-icon-background{fill:var(--backgroundHover-193ff4, var(--backgroundColor-system-icon-583fae, transparent));}" }
|
|
59
59
|
}, "system-icon-583fae");
|
|
60
60
|
export const SystemIcon = createComponent('span')({
|
|
61
61
|
displayName: 'SystemIcon',
|