@workday/canvas-kit-react 8.5.0-345-next.1 → 8.5.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmD/B;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,EACtD,IAAc,EACd,SAAc,EACd,SAAe,EACf,SAAe,GAChB,GAAE;IACD;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACf;
|
|
1
|
+
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmD/B;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,EACtD,IAAc,EACd,SAAc,EACd,SAAe,EACf,SAAe,GAChB,GAAE;IACD;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACf;IA+DF,2EAA2E;;;;8BA7C5C,MAAM,cAAc;;6BAazB,gBAAgB;yBARpB,gBAAgB;;;IA0CtC,uDAAuD;;;;;;IAMvD,iEAAiE;;;;;;;EAQpE"}
|
|
@@ -99,19 +99,24 @@ function useTooltip(_a) {
|
|
|
99
99
|
popup_1.useCloseOnFullscreenExit(popupModel);
|
|
100
100
|
popup_1.useCloseOnTargetHidden(popupModel);
|
|
101
101
|
var visible = popupModel.state.visibility !== 'hidden';
|
|
102
|
+
var targetProps = {
|
|
103
|
+
// extra description of the target element for assistive technology
|
|
104
|
+
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
105
|
+
// This will replace the accessible name of the target element
|
|
106
|
+
'aria-label': type === 'label' ? titleText : undefined,
|
|
107
|
+
onMouseEnter: onOpenFromTarget,
|
|
108
|
+
onMouseLeave: onHide,
|
|
109
|
+
onMouseDown: onMouseDown,
|
|
110
|
+
onFocus: onFocus,
|
|
111
|
+
onBlur: onHide,
|
|
112
|
+
};
|
|
113
|
+
// remove `aria-describedby` if undefined to not override what's provided
|
|
114
|
+
if (targetProps['aria-describedby'] === undefined) {
|
|
115
|
+
delete targetProps['aria-describedby'];
|
|
116
|
+
}
|
|
102
117
|
return {
|
|
103
118
|
/** Mix these properties into the target element. **Must be an Element** */
|
|
104
|
-
targetProps:
|
|
105
|
-
// extra description of the target element for assistive technology
|
|
106
|
-
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
107
|
-
// This will replace the accessible name of the target element
|
|
108
|
-
'aria-label': type === 'label' ? titleText : undefined,
|
|
109
|
-
onMouseEnter: onOpenFromTarget,
|
|
110
|
-
onMouseLeave: onHide,
|
|
111
|
-
onMouseDown: onMouseDown,
|
|
112
|
-
onFocus: onFocus,
|
|
113
|
-
onBlur: onHide,
|
|
114
|
-
},
|
|
119
|
+
targetProps: targetProps,
|
|
115
120
|
/** Mix these properties into the `Popper` component */
|
|
116
121
|
popperProps: {
|
|
117
122
|
open: visible,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmD/B;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,EACtD,IAAc,EACd,SAAc,EACd,SAAe,EACf,SAAe,GAChB,GAAE;IACD;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACf;
|
|
1
|
+
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmD/B;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,EACtD,IAAc,EACd,SAAc,EACd,SAAe,EACf,SAAe,GAChB,GAAE;IACD;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACf;IA+DF,2EAA2E;;;;8BA7C5C,MAAM,cAAc;;6BAazB,gBAAgB;yBARpB,gBAAgB;;;IA0CtC,uDAAuD;;;;;;IAMvD,iEAAiE;;;;;;;EAQpE"}
|
|
@@ -77,19 +77,24 @@ export function useTooltip(_a) {
|
|
|
77
77
|
useCloseOnFullscreenExit(popupModel);
|
|
78
78
|
useCloseOnTargetHidden(popupModel);
|
|
79
79
|
var visible = popupModel.state.visibility !== 'hidden';
|
|
80
|
+
var targetProps = {
|
|
81
|
+
// extra description of the target element for assistive technology
|
|
82
|
+
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
83
|
+
// This will replace the accessible name of the target element
|
|
84
|
+
'aria-label': type === 'label' ? titleText : undefined,
|
|
85
|
+
onMouseEnter: onOpenFromTarget,
|
|
86
|
+
onMouseLeave: onHide,
|
|
87
|
+
onMouseDown: onMouseDown,
|
|
88
|
+
onFocus: onFocus,
|
|
89
|
+
onBlur: onHide,
|
|
90
|
+
};
|
|
91
|
+
// remove `aria-describedby` if undefined to not override what's provided
|
|
92
|
+
if (targetProps['aria-describedby'] === undefined) {
|
|
93
|
+
delete targetProps['aria-describedby'];
|
|
94
|
+
}
|
|
80
95
|
return {
|
|
81
96
|
/** Mix these properties into the target element. **Must be an Element** */
|
|
82
|
-
targetProps:
|
|
83
|
-
// extra description of the target element for assistive technology
|
|
84
|
-
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
85
|
-
// This will replace the accessible name of the target element
|
|
86
|
-
'aria-label': type === 'label' ? titleText : undefined,
|
|
87
|
-
onMouseEnter: onOpenFromTarget,
|
|
88
|
-
onMouseLeave: onHide,
|
|
89
|
-
onMouseDown: onMouseDown,
|
|
90
|
-
onFocus: onFocus,
|
|
91
|
-
onBlur: onHide,
|
|
92
|
-
},
|
|
97
|
+
targetProps: targetProps,
|
|
93
98
|
/** Mix these properties into the `Popper` component */
|
|
94
99
|
popperProps: {
|
|
95
100
|
open: visible,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.1",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@emotion/styled": "^11.6.0",
|
|
50
50
|
"@popperjs/core": "^2.5.4",
|
|
51
51
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
52
|
-
"@workday/canvas-kit-popup-stack": "^8.5.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^8.5.1",
|
|
53
53
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
54
54
|
"@workday/design-assets-types": "^0.2.8",
|
|
55
55
|
"chroma-js": "^2.1.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
68
68
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "df295e38e05178aa9f627ca71318987718113415"
|
|
71
71
|
}
|
|
@@ -133,19 +133,26 @@ export function useTooltip<T extends Element = Element>({
|
|
|
133
133
|
|
|
134
134
|
const visible = popupModel.state.visibility !== 'hidden';
|
|
135
135
|
|
|
136
|
+
const targetProps = {
|
|
137
|
+
// extra description of the target element for assistive technology
|
|
138
|
+
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
139
|
+
// This will replace the accessible name of the target element
|
|
140
|
+
'aria-label': type === 'label' ? titleText : undefined,
|
|
141
|
+
onMouseEnter: onOpenFromTarget,
|
|
142
|
+
onMouseLeave: onHide,
|
|
143
|
+
onMouseDown,
|
|
144
|
+
onFocus,
|
|
145
|
+
onBlur: onHide,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
// remove `aria-describedby` if undefined to not override what's provided
|
|
149
|
+
if (targetProps['aria-describedby'] === undefined) {
|
|
150
|
+
delete targetProps['aria-describedby'];
|
|
151
|
+
}
|
|
152
|
+
|
|
136
153
|
return {
|
|
137
154
|
/** Mix these properties into the target element. **Must be an Element** */
|
|
138
|
-
targetProps
|
|
139
|
-
// extra description of the target element for assistive technology
|
|
140
|
-
'aria-describedby': type === 'describe' && visible ? id : undefined,
|
|
141
|
-
// This will replace the accessible name of the target element
|
|
142
|
-
'aria-label': type === 'label' ? titleText : undefined,
|
|
143
|
-
onMouseEnter: onOpenFromTarget,
|
|
144
|
-
onMouseLeave: onHide,
|
|
145
|
-
onMouseDown,
|
|
146
|
-
onFocus,
|
|
147
|
-
onBlur: onHide,
|
|
148
|
-
},
|
|
155
|
+
targetProps,
|
|
149
156
|
/** Mix these properties into the `Popper` component */
|
|
150
157
|
popperProps: {
|
|
151
158
|
open: visible,
|