@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
|
@@ -13,11 +13,11 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
13
13
|
const hooks_1 = require("./hooks");
|
|
14
14
|
exports.formFieldHintStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
15
15
|
extends: text_1.textStencil,
|
|
16
|
-
base: { name: "
|
|
16
|
+
base: { name: "e3034d", styles: "box-sizing:border-box;margin:var(--cnvs-sys-space-zero);" },
|
|
17
17
|
modifiers: {
|
|
18
18
|
error: {
|
|
19
|
-
error: { name: "
|
|
20
|
-
alert: { name: "
|
|
19
|
+
error: { name: "e3034e", styles: "color:var(--cnvs-brand-error-base);" },
|
|
20
|
+
alert: { name: "e3034f", styles: "" }
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
defaultModifiers: {
|
|
@@ -14,15 +14,15 @@ const hooks_1 = require("./hooks");
|
|
|
14
14
|
exports.formFieldLabelStencil = (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: "e30348", 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: "e30349", 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
|
-
horizontalStart: { name: "
|
|
24
|
-
horizontalEnd: { name: "
|
|
25
|
-
vertical: { name: "
|
|
23
|
+
horizontalStart: { name: "e3034a", styles: "justify-content:flex-start;float:left;max-height:var(--cnvs-sys-space-x10);" },
|
|
24
|
+
horizontalEnd: { name: "e3034b", styles: "max-height:var(--cnvs-sys-space-x10);float:left;justify-content:flex-end;" },
|
|
25
|
+
vertical: { name: "e3034c", styles: "width:100%;" }
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
defaultModifiers: {
|
|
@@ -4,22 +4,22 @@ exports.formFieldStencil = void 0;
|
|
|
4
4
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
5
5
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
6
6
|
exports.formFieldStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
7
|
-
base: { name: "
|
|
7
|
+
base: { name: "e3034h", 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);" },
|
|
8
8
|
modifiers: {
|
|
9
9
|
grow: {
|
|
10
|
-
true: { name: "
|
|
10
|
+
true: { name: "e3034i", styles: "width:100%;[data-width=\"ck-formfield-width\"]{width:100%;}&:has(div[data-width=\"ck-formfield-width\"]){width:100%;}" }
|
|
11
11
|
},
|
|
12
12
|
orientation: {
|
|
13
|
-
horizontalStart: { name: "
|
|
14
|
-
horizontalEnd: { name: "
|
|
15
|
-
vertical: { name: "
|
|
13
|
+
horizontalStart: { name: "e3034j", styles: "flex-direction:row;gap:var(--cnvs-sys-space-x8);" },
|
|
14
|
+
horizontalEnd: { name: "e3034k", styles: "flex-direction:row;gap:var(--cnvs-sys-space-x8);" },
|
|
15
|
+
vertical: { name: "e3034l", styles: "flex-direction:column;gap:var(--cnvs-sys-space-x1);align-items:flex-start;" }
|
|
16
16
|
},
|
|
17
17
|
required: {
|
|
18
|
-
true: { name: "
|
|
18
|
+
true: { name: "e3034m", styles: "" }
|
|
19
19
|
},
|
|
20
20
|
error: {
|
|
21
|
-
error: { name: "
|
|
22
|
-
alert: { name: "
|
|
21
|
+
error: { name: "e3034n", styles: "" },
|
|
22
|
+
alert: { name: "e3034o", styles: "" }
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
defaultModifiers: {
|
|
@@ -48,10 +48,10 @@ exports.accentIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
48
48
|
vars: {
|
|
49
49
|
color: '',
|
|
50
50
|
},
|
|
51
|
-
base: { name: "
|
|
51
|
+
base: { name: "e30311", 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);}" },
|
|
52
52
|
modifiers: {
|
|
53
53
|
transparent: {
|
|
54
|
-
true: { name: "
|
|
54
|
+
true: { name: "e30312", styles: "& .french-vanilla-100{fill:transparent;}" }
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}, "accent-icon-f47b2a");
|
|
@@ -78,7 +78,7 @@ exports.appletIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
78
78
|
color400: '',
|
|
79
79
|
color500: '',
|
|
80
80
|
},
|
|
81
|
-
base: { name: "
|
|
81
|
+
base: { name: "e30313", 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));}" }
|
|
82
82
|
}, "applet-icon-757179");
|
|
83
83
|
exports.AppletIcon = (0, common_1.createComponent)('span')({
|
|
84
84
|
displayName: 'AppletIcon',
|
|
@@ -63,10 +63,10 @@ const graphicStyles = ({ width, height, grow }) => {
|
|
|
63
63
|
exports.graphicStyles = graphicStyles;
|
|
64
64
|
exports.graphicStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
65
65
|
extends: Svg_1.svgStencil,
|
|
66
|
-
base: { name: "
|
|
66
|
+
base: { name: "e30316", styles: "box-sizing:border-box;" },
|
|
67
67
|
modifiers: {
|
|
68
68
|
grow: {
|
|
69
|
-
true: { name: "
|
|
69
|
+
true: { name: "e30317", styles: "width:100%;--width-svg-a30d66:100%;" }
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}, "graphic-ee386a");
|
|
@@ -39,10 +39,10 @@ exports.svgStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
39
39
|
/** sets width and height of svg element */
|
|
40
40
|
size: '',
|
|
41
41
|
},
|
|
42
|
-
base: { name: "
|
|
42
|
+
base: { name: "e303z", 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));}" },
|
|
43
43
|
modifiers: {
|
|
44
44
|
shouldMirror: {
|
|
45
|
-
true: { name: "
|
|
45
|
+
true: { name: "e30310", styles: "transform:scaleX(-1);" }
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}, "svg-a30d66");
|
|
@@ -82,7 +82,7 @@ exports.systemIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
82
82
|
accentColor: '',
|
|
83
83
|
backgroundColor: '',
|
|
84
84
|
},
|
|
85
|
-
base: { name: "
|
|
85
|
+
base: { name: "e30314", 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));}" }
|
|
86
86
|
}, "system-icon-583fae");
|
|
87
87
|
exports.SystemIcon = (0, common_1.createComponent)('span')({
|
|
88
88
|
displayName: 'SystemIcon',
|
|
@@ -46,7 +46,7 @@ const systemIconCircleStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
46
46
|
backgroundColor: '',
|
|
47
47
|
iconColor: '',
|
|
48
48
|
},
|
|
49
|
-
base: { name: "
|
|
49
|
+
base: { name: "e30315", styles: "box-sizing:border-box;background:var(--backgroundColor-system-icon-circle-554859, var(--cnvs-base-palette-soap-200));display:flex;align-items:center;justify-content:center;padding:var(--cnvs-sys-space-zero);border:none;border-radius:var(--cnvs-sys-shape-round);overflow:hidden;width:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));height:var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10));--size-svg-a30d66:calc(var(--containerSize-system-icon-circle-554859, var(--cnvs-sys-space-x10)) * 0.625);--color-system-icon-583fae:var(--iconColor-system-icon-circle-554859);& img{width:100%;height:100%;}" }
|
|
50
50
|
}, "system-icon-circle-554859");
|
|
51
51
|
exports.SystemIconCircle = (0, common_1.createComponent)('span')({
|
|
52
52
|
displayName: 'SystemIconCircle',
|
|
@@ -31,12 +31,12 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
|
31
31
|
/**
|
|
32
32
|
* Keyframe for the dots loading animation.
|
|
33
33
|
*/
|
|
34
|
-
const keyframesLoading = (0, canvas_kit_styling_1.keyframes)({ name: "
|
|
34
|
+
const keyframesLoading = (0, canvas_kit_styling_1.keyframes)({ name: "e3034y", styles: "0%, 80%, 100%{transform:scale(0);}40%{transform:scale(1);}" });
|
|
35
35
|
const singleLoadingDotStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
36
36
|
vars: {
|
|
37
37
|
animationDurationMs: '40ms',
|
|
38
38
|
},
|
|
39
|
-
base: { name: "
|
|
39
|
+
base: { name: "e3034z", styles: "--animationDurationMs-single-loading-dot-dec117:40ms;box-sizing:border-box;background-color:var(--cnvs-sys-color-bg-alt-strong);width:var(--cnvs-sys-space-x4);height:var(--cnvs-sys-space-x4);font-size:var(--cnvs-sys-space-zero);border-radius:var(--cnvs-sys-shape-round);transform:scale(0);display:inline-block;animation-name:animation-e3034y;animation-duration:calc(var(--animationDurationMs-single-loading-dot-dec117) * 35);animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-fill-mode:both;&:nth-child(1){animation-delay:0ms;}&:nth-child(2){animation-delay:calc(var(--animationDurationMs-single-loading-dot-dec117) * 4);}&:nth-child(3){animation-delay:calc(var(--animationDurationMs-single-loading-dot-dec117) * 8);}" }
|
|
40
40
|
}, "single-loading-dot-dec117");
|
|
41
41
|
/**
|
|
42
42
|
* The actual loading dot div.
|
|
@@ -46,7 +46,7 @@ const LoadingAnimationDot = () => React.createElement("div", { ...singleLoadingD
|
|
|
46
46
|
* A simple container for the loading dots.
|
|
47
47
|
*/
|
|
48
48
|
const loadingDotsStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
49
|
-
base: { name: "
|
|
49
|
+
base: { name: "e30350", styles: "box-sizing:border-box;display:inline-flex;gap:var(--cnvs-sys-space-x2);" }
|
|
50
50
|
}, "loading-dots-268f58");
|
|
51
51
|
/**
|
|
52
52
|
* A simple component that displays three horizontal dots, to be used when some data is loading.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { useMenuModel } from './lib/useMenuModel';
|
|
2
2
|
export { Menu } from './lib/Menu';
|
|
3
3
|
export { useMenuCard } from './lib/MenuCard';
|
|
4
|
-
export { useMenuItem,
|
|
4
|
+
export { useMenuItem, menuItemStencil, StyledMenuItem } from './lib/MenuItem';
|
|
5
|
+
export { useMenuOption, menuOptionStencil } from './lib/MenuOption';
|
|
5
6
|
export { useMenuList, menuListStencil } from './lib/MenuList';
|
|
6
7
|
export { useMenuPopper } from './lib/MenuPopper';
|
|
7
8
|
export { useMenuTarget, useMenuTargetContext } from './lib/MenuTarget';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAC,aAAa,EAAE,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,aAAa,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMenuTargetContext = exports.useMenuTarget = exports.useMenuPopper = exports.menuListStencil = exports.useMenuList = exports.StyledMenuItem = exports.useMenuItem = exports.useMenuCard = exports.Menu = exports.useMenuModel = void 0;
|
|
3
|
+
exports.useMenuTargetContext = exports.useMenuTarget = exports.useMenuPopper = exports.menuListStencil = exports.useMenuList = exports.menuOptionStencil = exports.useMenuOption = exports.StyledMenuItem = exports.menuItemStencil = exports.useMenuItem = exports.useMenuCard = exports.Menu = exports.useMenuModel = void 0;
|
|
4
4
|
var useMenuModel_1 = require("./lib/useMenuModel");
|
|
5
5
|
Object.defineProperty(exports, "useMenuModel", { enumerable: true, get: function () { return useMenuModel_1.useMenuModel; } });
|
|
6
6
|
var Menu_1 = require("./lib/Menu");
|
|
@@ -9,7 +9,11 @@ var MenuCard_1 = require("./lib/MenuCard");
|
|
|
9
9
|
Object.defineProperty(exports, "useMenuCard", { enumerable: true, get: function () { return MenuCard_1.useMenuCard; } });
|
|
10
10
|
var MenuItem_1 = require("./lib/MenuItem");
|
|
11
11
|
Object.defineProperty(exports, "useMenuItem", { enumerable: true, get: function () { return MenuItem_1.useMenuItem; } });
|
|
12
|
+
Object.defineProperty(exports, "menuItemStencil", { enumerable: true, get: function () { return MenuItem_1.menuItemStencil; } });
|
|
12
13
|
Object.defineProperty(exports, "StyledMenuItem", { enumerable: true, get: function () { return MenuItem_1.StyledMenuItem; } });
|
|
14
|
+
var MenuOption_1 = require("./lib/MenuOption");
|
|
15
|
+
Object.defineProperty(exports, "useMenuOption", { enumerable: true, get: function () { return MenuOption_1.useMenuOption; } });
|
|
16
|
+
Object.defineProperty(exports, "menuOptionStencil", { enumerable: true, get: function () { return MenuOption_1.menuOptionStencil; } });
|
|
13
17
|
var MenuList_1 = require("./lib/MenuList");
|
|
14
18
|
Object.defineProperty(exports, "useMenuList", { enumerable: true, get: function () { return MenuList_1.useMenuList; } });
|
|
15
19
|
Object.defineProperty(exports, "menuListStencil", { enumerable: true, get: function () { return MenuList_1.menuListStencil; } });
|
|
@@ -1767,15 +1767,95 @@ export declare const Menu: import("@workday/canvas-kit-react/common").ComponentM
|
|
|
1767
1767
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
1768
1768
|
getId: (item: any) => string;
|
|
1769
1769
|
}> & {
|
|
1770
|
-
Icon:
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1770
|
+
Icon: (elemProps: import("../..").SystemIconProps) => React.JSX.Element;
|
|
1771
|
+
Text: ({ children }: {
|
|
1772
|
+
children?: React.ReactNode;
|
|
1773
|
+
}) => React.JSX.Element;
|
|
1774
|
+
};
|
|
1775
|
+
/**
|
|
1776
|
+
* A `Menu.Option` is similar to the `Menu.Item`, but has a `role=option` and works with
|
|
1777
|
+
* `aria-activedescendant` and is selectable with a selected checkmark. It adds the
|
|
1778
|
+
* `aria-selected="true/false"` attribute. `Menu.Option` requires much more accessibility
|
|
1779
|
+
* behavior composed into the `Menu.Target` and `Menu.List` component. The `Combobox` and
|
|
1780
|
+
* `Select` components make use of the `Menu.Option`. See those components for a better idea of
|
|
1781
|
+
* how behavior is composed.
|
|
1782
|
+
*/
|
|
1783
|
+
Option: import("@workday/canvas-kit-react/common").ElementComponentM<"li", import("./MenuOption").MenuOptionProps, {
|
|
1784
|
+
state: {
|
|
1785
|
+
stackRef: React.RefObject<HTMLDivElement>;
|
|
1786
|
+
targetRef: React.RefObject<HTMLButtonElement>;
|
|
1787
|
+
initialFocusRef: React.RefObject<any> | undefined;
|
|
1788
|
+
returnFocusRef: React.RefObject<any> | undefined;
|
|
1789
|
+
placement: import("@popperjs/core").Placement;
|
|
1790
|
+
id: string;
|
|
1791
|
+
visibility: "hidden" | "visible";
|
|
1792
|
+
selectedIds: string[] | "all";
|
|
1793
|
+
unselectedIds: string[];
|
|
1794
|
+
cursorId: string;
|
|
1795
|
+
columnCount: number;
|
|
1796
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
1797
|
+
cursorIndexRef: {
|
|
1798
|
+
readonly current: number;
|
|
1799
|
+
};
|
|
1800
|
+
UNSTABLE_virtual: {
|
|
1801
|
+
virtualItems: import("../../collection/lib/react-virtual").VirtualItem[];
|
|
1802
|
+
totalSize: number;
|
|
1803
|
+
scrollToOffset: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToOffsetOptions | undefined) => void;
|
|
1804
|
+
scrollToIndex: (index: number, options?: import("../../collection/lib/react-virtual").ScrollToIndexOptions | undefined) => void;
|
|
1805
|
+
measure: () => void;
|
|
1806
|
+
};
|
|
1807
|
+
UNSTABLE_defaultItemHeight: number;
|
|
1808
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
1809
|
+
orientation: "horizontal" | "vertical";
|
|
1810
|
+
indexRef: React.MutableRefObject<number>;
|
|
1811
|
+
nonInteractiveIds: string[];
|
|
1812
|
+
isVirtualized: boolean;
|
|
1813
|
+
items: import("../..").Item<any>[];
|
|
1814
|
+
mode: "multiple" | "single";
|
|
1815
|
+
};
|
|
1816
|
+
events: {
|
|
1817
|
+
updatePlacement(data: {
|
|
1818
|
+
placement: import("@popperjs/core").Placement;
|
|
1819
|
+
}): void;
|
|
1820
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
1821
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
1822
|
+
select(data: {
|
|
1823
|
+
id: string;
|
|
1824
|
+
}): void;
|
|
1825
|
+
selectAll(): void;
|
|
1826
|
+
unselectAll(): void;
|
|
1827
|
+
goTo(data: {
|
|
1828
|
+
id: string;
|
|
1829
|
+
}): void;
|
|
1830
|
+
goToNext(): void;
|
|
1831
|
+
goToPrevious(): void;
|
|
1832
|
+
goToPreviousRow(): void;
|
|
1833
|
+
goToNextRow(): void;
|
|
1834
|
+
goToFirst(): void;
|
|
1835
|
+
goToLast(): void;
|
|
1836
|
+
goToFirstOfRow(): void;
|
|
1837
|
+
goToLastOfRow(): void;
|
|
1838
|
+
goToNextPage(): void;
|
|
1839
|
+
goToPreviousPage(): void;
|
|
1840
|
+
registerItem(data: {
|
|
1841
|
+
item: any;
|
|
1842
|
+
textValue: string;
|
|
1843
|
+
}): void;
|
|
1844
|
+
unregisterItem(data: {
|
|
1845
|
+
id: string;
|
|
1846
|
+
}): void;
|
|
1847
|
+
updateItemHeight(data: {
|
|
1848
|
+
value: number;
|
|
1849
|
+
}): void;
|
|
1850
|
+
};
|
|
1851
|
+
selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
|
|
1852
|
+
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
1853
|
+
getId: (item: any) => string;
|
|
1854
|
+
}> & {
|
|
1855
|
+
Icon: (elemProps: import("../..").SystemIconProps) => React.JSX.Element;
|
|
1856
|
+
Text: ({ children }: {
|
|
1857
|
+
children?: React.ReactNode;
|
|
1858
|
+
}) => React.JSX.Element;
|
|
1779
1859
|
};
|
|
1780
1860
|
Divider: import("@workday/canvas-kit-react/common").ElementComponent<"hr", unknown>;
|
|
1781
1861
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIb;;;;;;;;;;;;;;;OAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;OAsBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -13,6 +13,7 @@ const MenuItem_1 = require("./MenuItem");
|
|
|
13
13
|
const MenuCard_1 = require("./MenuCard");
|
|
14
14
|
const MenuList_1 = require("./MenuList");
|
|
15
15
|
const MenuDivider_1 = require("./MenuDivider");
|
|
16
|
+
const MenuOption_1 = require("./MenuOption");
|
|
16
17
|
/**
|
|
17
18
|
* `Menu` is a combination of a popup and a list. It usually has some type of target element that
|
|
18
19
|
* expands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed
|
|
@@ -95,6 +96,15 @@ exports.Menu = (0, common_1.createContainer)()({
|
|
|
95
96
|
* the model.
|
|
96
97
|
*/
|
|
97
98
|
Item: MenuItem_1.MenuItem,
|
|
99
|
+
/**
|
|
100
|
+
* A `Menu.Option` is similar to the `Menu.Item`, but has a `role=option` and works with
|
|
101
|
+
* `aria-activedescendant` and is selectable with a selected checkmark. It adds the
|
|
102
|
+
* `aria-selected="true/false"` attribute. `Menu.Option` requires much more accessibility
|
|
103
|
+
* behavior composed into the `Menu.Target` and `Menu.List` component. The `Combobox` and
|
|
104
|
+
* `Select` components make use of the `Menu.Option`. See those components for a better idea of
|
|
105
|
+
* how behavior is composed.
|
|
106
|
+
*/
|
|
107
|
+
Option: MenuOption_1.MenuOption,
|
|
98
108
|
Divider: MenuDivider_1.MenuDivider,
|
|
99
109
|
/**
|
|
100
110
|
* A `Menu.TargetContext` is the same as a {@link MenuTarget Menu.Target}, except it adds a
|
|
@@ -38,7 +38,7 @@ exports.menuCardStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
38
38
|
transformOriginVertical: 'top',
|
|
39
39
|
transformOriginHorizontal: 'left',
|
|
40
40
|
},
|
|
41
|
-
base: { name: "
|
|
41
|
+
base: { name: "e3032o", styles: "--minWidth-menu-card-07ca6c:0.0625rem;--transformOriginVertical-menu-card-07ca6c:top;--transformOriginHorizontal-menu-card-07ca6c:left;box-sizing:border-box;font-family:var(--cnvs-base-font-family-50);font-weight:var(--cnvs-base-font-weight-400);line-height:var(--cnvs-base-line-height-100);font-size:var(--cnvs-base-font-size-75);letter-spacing:var(--cnvs-base-letter-spacing-150);color:var(--cnvs-base-palette-black-pepper-300);position:relative;display:flex;flex-direction:column;transition:transform ease-out 150ms;padding:var(--cnvs-sys-space-zero);max-width:calc(100vw - var(--cnvs-sys-space-x8));box-shadow:var(--cnvs-sys-depth-3);min-width:var(--minWidth-menu-card-07ca6c);transform-origin:var(--transformOriginVertical-menu-card-07ca6c) var(--transformOriginHorizontal-menu-card-07ca6c);.wd-no-animation &{animation:none;}" }
|
|
42
42
|
}, "menu-card-07ca6c");
|
|
43
43
|
exports.useMenuCard = (0, common_1.createElemPropsHook)(useMenuModel_1.useMenuModel)(() => {
|
|
44
44
|
return {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SystemIconProps } from '@workday/canvas-kit-react/icon';
|
|
3
3
|
export interface MenuItemProps {
|
|
4
4
|
/**
|
|
5
5
|
* Optionally pass index to menu item. This should be done if `Menu.Item` components were created
|
|
@@ -10,27 +10,28 @@ export interface MenuItemProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* The label text of the MenuItem.
|
|
12
12
|
*/
|
|
13
|
-
children
|
|
13
|
+
children?: React.ReactNode;
|
|
14
14
|
/**
|
|
15
15
|
* The name of the menu item. This name will be used in the `onSelect` callback in the model. If
|
|
16
16
|
* this property is not provided, it will default to a string representation of the the zero-based
|
|
17
17
|
* index of the Tab when it was initialized.
|
|
18
18
|
*/
|
|
19
19
|
'data-id'?: string;
|
|
20
|
+
/**
|
|
21
|
+
* `aria-disabled` is used for keyboard and screen reader users to discover disabled content with
|
|
22
|
+
* the keyboard or screen reader caret tool. For more information, see
|
|
23
|
+
* https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls
|
|
24
|
+
*/
|
|
20
25
|
'aria-disabled'?: boolean;
|
|
21
|
-
}
|
|
22
|
-
interface StyledMenuProps {
|
|
23
26
|
/**
|
|
24
27
|
* If true, set the StyledMenuItem to the disabled state so it is not clickable.
|
|
25
28
|
* @default false
|
|
29
|
+
* @deprecated Use `aria-disabled` instead
|
|
26
30
|
*/
|
|
27
31
|
isDisabled?: boolean;
|
|
28
32
|
}
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
31
|
-
} & {
|
|
32
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
33
|
-
} & StyledType & StyledMenuProps, {}, {}>;
|
|
33
|
+
export declare const menuItemStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, never>, {}, never, never>;
|
|
34
|
+
export declare const StyledMenuItem: import("@workday/canvas-kit-react/common").ElementComponent<"button", MenuItemProps>;
|
|
34
35
|
export declare const useMenuItem: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
35
36
|
state: {
|
|
36
37
|
stackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -196,15 +197,7 @@ export declare const MenuItem: import("@workday/canvas-kit-react/common").Elemen
|
|
|
196
197
|
navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
|
|
197
198
|
getId: (item: any) => string;
|
|
198
199
|
}> & {
|
|
199
|
-
Icon:
|
|
200
|
-
|
|
201
|
-
} & {
|
|
202
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
203
|
-
}, {}, {}>;
|
|
204
|
-
Text: import("@emotion/styled").StyledComponent<{
|
|
205
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
206
|
-
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
207
|
-
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
200
|
+
Icon: (elemProps: SystemIconProps) => React.JSX.Element;
|
|
201
|
+
Text: ({ children }: React.PropsWithChildren) => React.JSX.Element;
|
|
208
202
|
};
|
|
209
|
-
export {};
|
|
210
203
|
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,EAAa,eAAe,EAAoB,MAAM,gCAAgC,CAAC;AAW9F,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,yIAqE1B,CAAC;AAUH,eAAO,MAAM,cAAc,sFAazB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAuBF,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAazC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA7DY,eAAe;yBAId,MAAM,iBAAiB;CAyEvD,CAAC"}
|
|
@@ -23,101 +23,30 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.MenuItem = exports.useMenuItem = exports.StyledMenuItem = void 0;
|
|
26
|
+
exports.MenuItem = exports.useMenuItem = exports.StyledMenuItem = exports.menuItemStencil = void 0;
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
|
-
const
|
|
28
|
+
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
29
|
+
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
29
30
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
30
31
|
const icon_1 = require("@workday/canvas-kit-react/icon");
|
|
31
32
|
const tooltip_1 = require("@workday/canvas-kit-react/tooltip");
|
|
32
33
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
33
34
|
const collection_1 = require("@workday/canvas-kit-react/collection");
|
|
34
35
|
const useMenuModel_1 = require("./useMenuModel");
|
|
35
|
-
exports.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
'&:hover, &[aria-selected=true]': {
|
|
50
|
-
backgroundColor: theme.canvas.palette.primary.lightest,
|
|
51
|
-
color: tokens_1.colors.blackPepper300,
|
|
52
|
-
'.wd-icon-fill, .wd-icon-accent, .wd-icon-accent2': {
|
|
53
|
-
fill: tokens_1.iconColors.hover,
|
|
54
|
-
},
|
|
55
|
-
'.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2': {
|
|
56
|
-
fill: tokens_1.iconColors.hover,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
'&:focus, &.focus': {
|
|
60
|
-
outline: 'none',
|
|
61
|
-
backgroundColor: theme.canvas.palette.primary.main,
|
|
62
|
-
color: tokens_1.typeColors.inverse,
|
|
63
|
-
'.wd-icon-fill, .wd-icon-accent, .wd-icon-accent2': {
|
|
64
|
-
fill: tokens_1.iconColors.inverse,
|
|
65
|
-
},
|
|
66
|
-
'*:hover .wd-icon-fill': {
|
|
67
|
-
fill: tokens_1.iconColors.inverse,
|
|
68
|
-
},
|
|
69
|
-
'.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2': {
|
|
70
|
-
fill: tokens_1.iconColors.inverse,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
// We want the focus styles no matter what
|
|
74
|
-
[`[data-whatinput]`]: {
|
|
75
|
-
backgroundColor: 'inherit',
|
|
76
|
-
color: tokens_1.colors.blackPepper300,
|
|
77
|
-
'&:hover, &[aria-selected=true]': {
|
|
78
|
-
backgroundColor: theme.canvas.palette.primary.lightest,
|
|
79
|
-
'.wd-icon-fill, .wd-icon-accent, .wd-icon-accent2': {
|
|
80
|
-
fill: tokens_1.iconColors.hover,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
'&:focus, &.focus': {
|
|
84
|
-
'.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2': {
|
|
85
|
-
fill: tokens_1.iconColors.hover,
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
backgroundColor: 'inherit',
|
|
90
|
-
'&:disabled, &[aria-disabled=true]': {
|
|
91
|
-
color: tokens_1.colors.licorice100,
|
|
92
|
-
cursor: 'default',
|
|
93
|
-
'.wd-icon-fill, .wd-icon-accent, .wd-icon-accent2': {
|
|
94
|
-
fill: tokens_1.iconColors.disabled,
|
|
95
|
-
},
|
|
96
|
-
'&:focus, &.focus': {
|
|
97
|
-
backgroundColor: tokens_1.colors.blueberry200,
|
|
98
|
-
'.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2': {
|
|
99
|
-
fill: tokens_1.iconColors.disabled,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
'&:hover, &[aria-selected=true]': {
|
|
103
|
-
'.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2': {
|
|
104
|
-
fill: tokens_1.iconColors.disabled,
|
|
105
|
-
},
|
|
106
|
-
'*:hover .wd-icon-fill': {
|
|
107
|
-
fill: tokens_1.iconColors.disabled,
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
}, ({ children }) => {
|
|
113
|
-
if (typeof children === 'string') {
|
|
114
|
-
return {};
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
return {
|
|
118
|
-
display: 'flex',
|
|
119
|
-
};
|
|
120
|
-
}
|
|
36
|
+
exports.menuItemStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
37
|
+
base: { name: "e3032n", styles: "box-sizing:border-box;font-family:var(--cnvs-base-font-family-50);font-weight:var(--cnvs-base-font-weight-400);line-height:var(--cnvs-base-line-height-100);font-size:var(--cnvs-base-font-size-75);letter-spacing:var(--cnvs-base-letter-spacing-150);display:flex;align-items:center;width:100%;gap:var(--cnvs-sys-space-x4);padding:var(--cnvs-sys-space-x2) var(--cnvs-sys-space-x4);cursor:pointer;color:var(--cnvs-sys-color-fg-default);border-width:0;text-align:start;transition:background-color 80ms, color 80ms;background-color:inherit;min-height:var(--cnvs-sys-space-x10);--color-system-icon-583fae:currentcolor;& :where([data-part=\"menu-item-selected\"]){transition:opacity 80ms linear;opacity:var(--cnvs-sys-opacity-zero);}&:where(:has(span)){display:flex;}&:is([aria-selected=true]){color:var(--cnvs-brand-primary-dark);background-color:var(--cnvs-brand-primary-lightest);}&:is(.hover, :hover){color:var(--cnvs-sys-color-fg-strong);background-color:var(--cnvs-brand-neutral-lightest);}&:is(.focus, :focus){color:var(--cnvs-brand-primary-accent);outline:none;background-color:var(--cnvs-brand-primary-base);}&:is(:disabled, [aria-disabled=true]){color:var(--cnvs-sys-color-text-disabled);cursor:default;&:where(.focus, :focus){background-color:var(--cnvs-brand-primary-light);}}& :where([data-part=\"menu-item-text\"]){flex-grow:1;align-self:center;}& :where([data-part=\"menu-icon-icon\"]){align-self:start;}" }
|
|
38
|
+
}, "menu-item-7213c6");
|
|
39
|
+
const MenuItemIcon = (elemProps) => {
|
|
40
|
+
return React.createElement(icon_1.SystemIcon, { "data-part": "menu-item-icon", ...elemProps });
|
|
41
|
+
};
|
|
42
|
+
const MenuItemText = ({ children }) => {
|
|
43
|
+
return React.createElement("span", { "data-part": "menu-item-text" }, children);
|
|
44
|
+
};
|
|
45
|
+
exports.StyledMenuItem = (0, common_1.createComponent)('button')({
|
|
46
|
+
displayName: 'MenuItem',
|
|
47
|
+
Component: ({ children, isDisabled, ...elemProps }, ref, Element) => {
|
|
48
|
+
return (React.createElement(Element, { ref: ref, "aria-disabled": isDisabled, ...(0, layout_1.mergeStyles)(elemProps, (0, exports.menuItemStencil)({})) }, typeof children === 'string' ? React.createElement(MenuItemText, null, children) : children));
|
|
49
|
+
},
|
|
121
50
|
});
|
|
122
51
|
exports.useMenuItem = (0, common_1.composeHooks)((0, common_1.createElemPropsHook)(useMenuModel_1.useMenuModel)((model, ref, elemProps = { 'data-id': '' }) => {
|
|
123
52
|
const { localRef, elementRef } = (0, common_1.useLocalRef)(ref);
|
|
@@ -152,10 +81,10 @@ exports.MenuItem = (0, common_1.createSubcomponent)('button')({
|
|
|
152
81
|
modelHook: useMenuModel_1.useMenuModel,
|
|
153
82
|
elemPropsHook: exports.useMenuItem,
|
|
154
83
|
subComponents: {
|
|
155
|
-
Icon:
|
|
156
|
-
Text:
|
|
84
|
+
Icon: MenuItemIcon,
|
|
85
|
+
Text: MenuItemText,
|
|
157
86
|
},
|
|
158
87
|
})(({ children, ...elemProps }, Element) => {
|
|
159
88
|
return (React.createElement(tooltip_1.OverflowTooltip, { placement: "left" },
|
|
160
|
-
React.createElement(exports.StyledMenuItem, {
|
|
89
|
+
React.createElement(exports.StyledMenuItem, { as: Element, ...elemProps }, children)));
|
|
161
90
|
});
|
|
@@ -38,11 +38,11 @@ exports.useMenuList = (0, common_1.composeHooks)((0, common_1.createElemPropsHoo
|
|
|
38
38
|
};
|
|
39
39
|
}), popup_1.useReturnFocus, popup_1.useFocusRedirect);
|
|
40
40
|
exports.menuListStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
41
|
-
base: { name: "
|
|
41
|
+
base: { name: "e3032p", styles: "box-sizing:border-box;background:var(--cnvs-base-palette-french-vanilla-100);border-radius:var(--cnvs-sys-shape-zero);padding:var(--cnvs-sys-space-zero);gap:var(--cnvs-sys-space-zero);" },
|
|
42
42
|
modifiers: {
|
|
43
43
|
orientation: {
|
|
44
|
-
vertical: { name: "
|
|
45
|
-
horizontal: { name: "
|
|
44
|
+
vertical: { name: "e3032q", styles: "flex-direction:column;" },
|
|
45
|
+
horizontal: { name: "e3032r", styles: "flex-direction:row;" }
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}, "menu-list-b9b420");
|