@workday/canvas-kit-react 7.0.0-alpha.97-next.23 → 7.0.2
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/action-bar/index.ts +1 -0
- package/action-bar/lib/ActionBar.tsx +33 -31
- package/action-bar/lib/ActionBarItem.tsx +41 -0
- package/action-bar/lib/ActionBarList.tsx +70 -0
- package/action-bar/lib/ActionBarOverflowButton.tsx +36 -0
- package/action-bar/lib/useActionBarModel.tsx +91 -0
- package/avatar/lib/Avatar.tsx +4 -0
- package/button/index.ts +1 -0
- package/button/lib/ExternalHyperlink.tsx +59 -0
- package/button/lib/TertiaryButton.tsx +1 -0
- package/collection/lib/useListItemRovingFocus.tsx +4 -2
- package/collection/lib/useListRenderItem.tsx +3 -3
- package/common/lib/parts/_brand-assets.ts +1 -1
- package/common/lib/utils/elements.ts +5 -1
- package/dist/commonjs/action-bar/index.d.ts +1 -0
- package/dist/commonjs/action-bar/index.d.ts.map +1 -1
- package/dist/commonjs/action-bar/index.js +1 -0
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +3495 -5
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBar.js +28 -27
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +215 -0
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -0
- package/dist/commonjs/action-bar/lib/ActionBarItem.js +46 -0
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +221 -0
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -0
- package/dist/commonjs/action-bar/lib/ActionBarList.js +74 -0
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts +230 -0
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -0
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.js +57 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +1659 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.js +77 -0
- package/dist/commonjs/avatar/lib/Avatar.d.ts.map +1 -1
- package/dist/commonjs/avatar/lib/Avatar.js +3 -0
- package/dist/commonjs/button/index.d.ts +1 -0
- package/dist/commonjs/button/index.d.ts.map +1 -1
- package/dist/commonjs/button/index.js +3 -1
- package/dist/commonjs/button/lib/ExternalHyperlink.d.ts +11 -0
- package/dist/commonjs/button/lib/ExternalHyperlink.d.ts.map +1 -0
- package/dist/commonjs/button/lib/ExternalHyperlink.js +48 -0
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +1 -0
- package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts +1 -1
- package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemRovingFocus.js +2 -2
- package/dist/commonjs/collection/lib/useListRenderItem.d.ts +1 -1
- package/dist/commonjs/collection/lib/useListRenderItem.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListRenderItem.js +2 -2
- package/dist/commonjs/common/lib/parts/_brand-assets.js +1 -1
- package/dist/commonjs/common/lib/utils/elements.d.ts +2 -2
- package/dist/commonjs/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/elements.js +4 -1
- package/dist/commonjs/form-field/lib/Label.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Label.js +3 -7
- package/dist/commonjs/icon/lib/Icon.d.ts +1 -1
- package/dist/commonjs/icon/lib/Icon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Icon.js +2 -4
- package/dist/commonjs/icon/lib/SystemIcon.d.ts +1 -1
- package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +2 -0
- package/dist/commonjs/popup/lib/hooks/usePopupTarget.js +1 -1
- package/dist/commonjs/table/lib/TableRow.d.ts +4 -4
- package/dist/commonjs/table/lib/TableRow.d.ts.map +1 -1
- package/dist/commonjs/table/lib/TableRow.js +12 -26
- package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/Tabs.js +1 -2
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.js +1 -0
- package/dist/es6/action-bar/index.d.ts +1 -0
- package/dist/es6/action-bar/index.d.ts.map +1 -1
- package/dist/es6/action-bar/index.js +1 -0
- package/dist/es6/action-bar/lib/ActionBar.d.ts +3495 -5
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBar.js +29 -28
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts +215 -0
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -0
- package/dist/es6/action-bar/lib/ActionBarItem.js +24 -0
- package/dist/es6/action-bar/lib/ActionBarList.d.ts +221 -0
- package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -0
- package/dist/es6/action-bar/lib/ActionBarList.js +52 -0
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts +230 -0
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -0
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.js +32 -0
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts +1659 -0
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -0
- package/dist/es6/action-bar/lib/useActionBarModel.js +71 -0
- package/dist/es6/avatar/lib/Avatar.d.ts.map +1 -1
- package/dist/es6/avatar/lib/Avatar.js +3 -0
- package/dist/es6/button/index.d.ts +1 -0
- package/dist/es6/button/index.d.ts.map +1 -1
- package/dist/es6/button/index.js +1 -0
- package/dist/es6/button/lib/ExternalHyperlink.d.ts +11 -0
- package/dist/es6/button/lib/ExternalHyperlink.d.ts.map +1 -0
- package/dist/es6/button/lib/ExternalHyperlink.js +42 -0
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +1 -0
- package/dist/es6/collection/lib/useListItemRovingFocus.d.ts +1 -1
- package/dist/es6/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemRovingFocus.js +2 -2
- package/dist/es6/collection/lib/useListRenderItem.d.ts +1 -1
- package/dist/es6/collection/lib/useListRenderItem.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListRenderItem.js +2 -2
- package/dist/es6/common/lib/parts/_brand-assets.js +1 -1
- package/dist/es6/common/lib/utils/elements.d.ts +2 -2
- package/dist/es6/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/elements.js +4 -1
- package/dist/es6/form-field/lib/Label.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Label.js +1 -2
- package/dist/es6/icon/lib/Icon.d.ts +1 -1
- package/dist/es6/icon/lib/Icon.d.ts.map +1 -1
- package/dist/es6/icon/lib/Icon.js +2 -4
- package/dist/es6/icon/lib/SystemIcon.d.ts +1 -1
- package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +2 -0
- package/dist/es6/popup/lib/hooks/usePopupTarget.js +1 -1
- package/dist/es6/table/lib/TableRow.d.ts +4 -4
- package/dist/es6/table/lib/TableRow.d.ts.map +1 -1
- package/dist/es6/table/lib/TableRow.js +12 -26
- package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/tabs/lib/Tabs.js +1 -2
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.js +1 -0
- package/form-field/lib/Label.tsx +1 -2
- package/icon/lib/Icon.tsx +2 -1
- package/icon/lib/SystemIcon.tsx +1 -1
- package/package.json +5 -5
- package/popup/lib/hooks/useDisableBodyScroll.ts +2 -0
- package/popup/lib/hooks/usePopupTarget.ts +1 -1
- package/table/lib/TableRow.tsx +18 -11
- package/tabs/lib/Tabs.tsx +1 -5
- package/tabs/lib/TabsItem.tsx +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActionBarModel.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/useActionBarModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,iBAAiB;IAG1B;;;OAGG;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;EAwEL,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { createModelHook } from '@workday/canvas-kit-react/common';
|
|
14
|
+
import { defaultGetId, useOverflowListModel } from '@workday/canvas-kit-react/collection';
|
|
15
|
+
import { useMenuModel } from '@workday/canvas-kit-react/menu';
|
|
16
|
+
export var useActionBarModel = createModelHook({
|
|
17
|
+
defaultConfig: __assign(__assign({}, useOverflowListModel.defaultConfig), {
|
|
18
|
+
/**
|
|
19
|
+
* Optional id for the whole `ActionBar` group. If not provided, a unique id will be created.
|
|
20
|
+
* @default useUniqueId()
|
|
21
|
+
*/
|
|
22
|
+
id: '',
|
|
23
|
+
/**
|
|
24
|
+
* The default ActionBar sub-components only handle rendering of button group in a horizontal orientation,
|
|
25
|
+
* but the sub-components could be replaced to handle vertical orientations.
|
|
26
|
+
* @default 'horizontal'
|
|
27
|
+
*/
|
|
28
|
+
orientation: 'horizontal', menuConfig: {} }),
|
|
29
|
+
requiredConfig: useOverflowListModel.requiredConfig,
|
|
30
|
+
})(function (config) {
|
|
31
|
+
var getId = config.getId || defaultGetId;
|
|
32
|
+
var items = config.items;
|
|
33
|
+
var model = useOverflowListModel(useOverflowListModel.mergeConfig(config, {
|
|
34
|
+
orientation: config.orientation || 'horizontal',
|
|
35
|
+
items: items,
|
|
36
|
+
shouldVirtualize: false,
|
|
37
|
+
}));
|
|
38
|
+
var hiddenIds = model.state.hiddenIds;
|
|
39
|
+
var nonInteractiveIds = model.state.nonInteractiveIds;
|
|
40
|
+
var totalSize = model.state.items.length;
|
|
41
|
+
// Only show a maximum of 3 buttons
|
|
42
|
+
if (totalSize - hiddenIds.length >= 3) {
|
|
43
|
+
hiddenIds = items.slice(3, totalSize).map(getId);
|
|
44
|
+
}
|
|
45
|
+
// Always show the first button and make sure it is interactive
|
|
46
|
+
if (totalSize - hiddenIds.length === 0) {
|
|
47
|
+
hiddenIds = items.slice(1, totalSize).map(getId);
|
|
48
|
+
}
|
|
49
|
+
nonInteractiveIds = hiddenIds;
|
|
50
|
+
var state = __assign(__assign({}, model.state), { hiddenIds: hiddenIds,
|
|
51
|
+
nonInteractiveIds: nonInteractiveIds, orientation: config.orientation || 'horizontal' });
|
|
52
|
+
var overflowItems = React.useMemo(function () { return (items ? items.filter(function (item) { return state.hiddenIds.includes(getId(item)); }) : undefined); },
|
|
53
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
|
+
[state.hiddenIds, items]);
|
|
55
|
+
var events = __assign({}, model.events);
|
|
56
|
+
var menu = useMenuModel(useMenuModel.mergeConfig(config.menuConfig, {
|
|
57
|
+
id: "act-bar-menu-" + model.state.id,
|
|
58
|
+
items: overflowItems,
|
|
59
|
+
nonInteractiveIds: state.nonInteractiveIds.filter(function (key) { return !state.hiddenIds.includes(key); }),
|
|
60
|
+
onSelect: function () {
|
|
61
|
+
menu.events.hide();
|
|
62
|
+
},
|
|
63
|
+
onShow: function () {
|
|
64
|
+
// Always select the first item when the menu is opened
|
|
65
|
+
menu.events.goToFirst();
|
|
66
|
+
},
|
|
67
|
+
}));
|
|
68
|
+
return __assign(__assign({}, model), { state: state,
|
|
69
|
+
events: events,
|
|
70
|
+
menu: menu });
|
|
71
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAA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{
|
|
|
86
86
|
setImageLoaded(true);
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
+
React.useLayoutEffect(function () {
|
|
90
|
+
setImageLoaded(false);
|
|
91
|
+
}, [url]);
|
|
89
92
|
var background = variant === AvatarVariant.Dark ? colors.blueberry400 : colors.soap300;
|
|
90
93
|
return (React.createElement(StyledContainer, __assign({ size: size, "aria-label": altText, onClick: onClick, disabled: onClick ? false : true, ref: ref }, elemProps),
|
|
91
94
|
React.createElement(StyledStack, { size: size },
|
|
@@ -7,5 +7,6 @@ export { ToolbarIconButton, ToolbarIconButtonProps } from './lib/ToolbarIconButt
|
|
|
7
7
|
export { ToolbarDropdownButton, ToolbarDropdownButtonProps } from './lib/ToolbarDropdownButton';
|
|
8
8
|
export { Hyperlink, HyperlinkProps } from './lib/Hyperlink';
|
|
9
9
|
export { BaseButton, ButtonContainerProps } from './lib/BaseButton';
|
|
10
|
+
export { ExternalHyperlink, ExternalHyperlinkProps } from './lib/ExternalHyperlink';
|
|
10
11
|
export * from './lib/types';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAClE,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,cAAc,aAAa,CAAC"}
|
package/dist/es6/button/index.js
CHANGED
|
@@ -7,4 +7,5 @@ export { ToolbarIconButton } from './lib/ToolbarIconButton';
|
|
|
7
7
|
export { ToolbarDropdownButton } from './lib/ToolbarDropdownButton';
|
|
8
8
|
export { Hyperlink } from './lib/Hyperlink';
|
|
9
9
|
export { BaseButton } from './lib/BaseButton';
|
|
10
|
+
export { ExternalHyperlink } from './lib/ExternalHyperlink';
|
|
10
11
|
export * from './lib/types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HyperlinkProps } from './Hyperlink';
|
|
2
|
+
export interface ExternalHyperlinkProps extends HyperlinkProps {
|
|
3
|
+
/**
|
|
4
|
+
* Informs a screen reader user the link will open in a new window. It is read after the link text.
|
|
5
|
+
* This value will need to be translated.
|
|
6
|
+
* @default 'Opens link in new window'
|
|
7
|
+
*/
|
|
8
|
+
iconLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ExternalHyperlink: import("../../common").ElementComponent<"a", ExternalHyperlinkProps>;
|
|
11
|
+
//# sourceMappingURL=ExternalHyperlink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalHyperlink.d.ts","sourceRoot":"","sources":["../../../../button/lib/ExternalHyperlink.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,cAAc,EAAC,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD,eAAO,MAAM,iBAAiB,sEAsB5B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { styled, createComponent } from '@workday/canvas-kit-react/common';
|
|
25
|
+
import { extLinkIcon } from '@workday/canvas-system-icons-web';
|
|
26
|
+
import { SystemIcon, systemIconStyles } from '@workday/canvas-kit-react/icon';
|
|
27
|
+
import { Hyperlink } from './Hyperlink';
|
|
28
|
+
var iconStyles = __assign({}, systemIconStyles({ fill: 'currentColor', fillHover: 'currentColor' }));
|
|
29
|
+
var Anchor = styled(Hyperlink)(__assign(__assign({}, iconStyles), { display: 'inline-flex', flexDirection: 'row', alignItems: 'center' }));
|
|
30
|
+
var iconSize = '1em';
|
|
31
|
+
var minIconSize = '16px';
|
|
32
|
+
var StyledSystemIcon = styled(SystemIcon)(__assign(__assign({}, iconStyles), { width: "calc(" + iconSize + " - 1px)", minWidth: "calc(" + minIconSize + " - 1px)", marginLeft: '2px' }));
|
|
33
|
+
export var ExternalHyperlink = createComponent('a')({
|
|
34
|
+
displayName: 'ExternalHyperlink',
|
|
35
|
+
Component: function (_a, ref) {
|
|
36
|
+
var _b;
|
|
37
|
+
var children = _a.children, variant = _a.variant, _c = _a.iconLabel, iconLabel = _c === void 0 ? 'Opens link in new window' : _c, elemProps = __rest(_a, ["children", "variant", "iconLabel"]);
|
|
38
|
+
return (React.createElement(Anchor, __assign({ ref: ref, target: "_blank", rel: "noreferrer", variant: variant }, elemProps),
|
|
39
|
+
React.createElement("span", null, children),
|
|
40
|
+
React.createElement(StyledSystemIcon, { icon: extLinkIcon, role: "img", "aria-label": iconLabel, size: iconSize, styles: (_b = {}, _b['& svg'] = { minWidth: minIconSize, minHeight: minIconSize }, _b) })));
|
|
41
|
+
},
|
|
42
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"TertiaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/TertiaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiJD,eAAO,MAAM,cAAc,wEAkDzB,CAAC"}
|
|
@@ -83,6 +83,7 @@ var getTertiaryButtonColors = function (variant, theme, children) {
|
|
|
83
83
|
focusRing: focusRing({ innerColor: colors.blueberry400 }, theme),
|
|
84
84
|
},
|
|
85
85
|
disabled: {
|
|
86
|
+
background: 'transparent',
|
|
86
87
|
icon: children ? themePrimary.main : colors.blackPepper400,
|
|
87
88
|
label: themePrimary.main,
|
|
88
89
|
},
|
|
@@ -79,7 +79,7 @@ export declare const useListItemRovingFocus: <P extends {}, R>(model: {
|
|
|
79
79
|
onFocus(): void;
|
|
80
80
|
onBlur(): void;
|
|
81
81
|
onClick(): void;
|
|
82
|
-
id: string;
|
|
82
|
+
'data-focus-id': string;
|
|
83
83
|
tabIndex: number;
|
|
84
84
|
ref: ((instance: any) => void) | React.RefObject<any> | null | undefined;
|
|
85
85
|
} & P & (R extends HTMLOrSVGElement ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useListItemRovingFocus.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListItemRovingFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;CAqBpB,CAAC;AA+BX;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useListItemRovingFocus.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListItemRovingFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;CAqBpB,CAAC;AA+BX;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqCZ,mBAAmB;;;;;;;;;OA6CzC,CAAC"}
|
|
@@ -80,7 +80,7 @@ export var useListItemRovingFocus = createElemPropsHook(useCursorListModel)(func
|
|
|
80
80
|
requestAnimationFrame(function () {
|
|
81
81
|
var _a;
|
|
82
82
|
(_a = document
|
|
83
|
-
.querySelector("[id=\"" + state.id + "-" + getIdRef.current(item_1) + "\"]")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
83
|
+
.querySelector("[data-focus-id=\"" + (state.id + "-" + getIdRef.current(item_1)) + "\"]")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
84
84
|
});
|
|
85
85
|
keyDownRef.current = false;
|
|
86
86
|
}
|
|
@@ -123,7 +123,7 @@ export var useListItemRovingFocus = createElemPropsHook(useCursorListModel)(func
|
|
|
123
123
|
onClick: function () {
|
|
124
124
|
events.goTo({ id: elemProps['data-id'] });
|
|
125
125
|
},
|
|
126
|
-
id: state.id + "-" + elemProps['data-id'],
|
|
126
|
+
'data-focus-id': state.id + "-" + elemProps['data-id'],
|
|
127
127
|
tabIndex: !state.cursorId
|
|
128
128
|
? 0 // cursor isn't known yet, be safe and mark this as focusable
|
|
129
129
|
: !!elemProps['data-id'] && state.cursorId === elemProps['data-id']
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Generic } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { useBaseListModel } from './useBaseListModel';
|
|
4
|
-
export declare function useListRenderItems<T>(model: ReturnType<typeof useBaseListModel>, children: ((item: Generic) => React.ReactNode) | React.ReactNode): {} | null | undefined;
|
|
4
|
+
export declare function useListRenderItems<T>(model: ReturnType<typeof useBaseListModel>, children: ((item: Generic, index: number) => React.ReactNode) | React.ReactNode): {} | null | undefined;
|
|
5
5
|
//# sourceMappingURL=useListRenderItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useListRenderItem.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListRenderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EAC1C,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"useListRenderItem.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListRenderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EAC1C,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,yBAuBhF"}
|
|
@@ -4,7 +4,7 @@ export function useListRenderItems(model, children) {
|
|
|
4
4
|
? model.state.isVirtualized
|
|
5
5
|
? model.state.UNSTABLE_virtual.virtualItems.map(function (virtual) {
|
|
6
6
|
var item = model.state.items[virtual.index];
|
|
7
|
-
var child = children(item.value);
|
|
7
|
+
var child = children(item.value, virtual.index);
|
|
8
8
|
return React.cloneElement(child, {
|
|
9
9
|
// We call this `virtual` instead of `virtualItem` to avoid a React render warning
|
|
10
10
|
// about capital letters in attributes. React thinks this will be applied to the DOM
|
|
@@ -15,7 +15,7 @@ export function useListRenderItems(model, children) {
|
|
|
15
15
|
});
|
|
16
16
|
})
|
|
17
17
|
: model.state.items.map(function (item) {
|
|
18
|
-
return React.cloneElement(children(item.value), { key: item.id, item: item.value });
|
|
18
|
+
return React.cloneElement(children(item.value, item.index), { key: item.id, item: item.value });
|
|
19
19
|
})
|
|
20
20
|
: null;
|
|
21
21
|
return items || children;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var CDN_URI = '
|
|
1
|
+
var CDN_URI = 'https://design.workday.com/images/';
|
|
2
2
|
export var dubLogoBlue = "<img src=\"" + CDN_URI + "ck-dub-logo-blue.svg\" alt=\"\">";
|
|
3
3
|
export var dubLogoWhite = "<img src=\"" + CDN_URI + "ck-dub-logo-white.svg\" alt=\"\">";
|
|
4
4
|
export var wdayLogoBlue = "<img src=\"" + CDN_URI + "ck-wday-logo-blue.svg\" alt=\"\">";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Is an element focusable? This function performs various tests to see if the element in question
|
|
3
|
-
* can receive focus.
|
|
3
|
+
* can receive focus. Should skip disabled elements as they are not focusable.
|
|
4
4
|
*/
|
|
5
|
-
export declare const isFocusable: (element: HTMLElement) => boolean;
|
|
5
|
+
export declare const isFocusable: (element: HTMLElement) => boolean | null;
|
|
6
6
|
/**
|
|
7
7
|
* Get the first focusable element in a container.
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,WAAW,
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,WAAW,mBA4B/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW/E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,cAAe,WAAW,KAAG,WAAW,GAAG,IAW9E,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Is an element focusable? This function performs various tests to see if the element in question
|
|
3
|
-
* can receive focus.
|
|
3
|
+
* can receive focus. Should skip disabled elements as they are not focusable.
|
|
4
4
|
*/
|
|
5
5
|
export var isFocusable = function (element) {
|
|
6
|
+
if (element.hasAttribute('disabled')) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
6
9
|
var nodeName = element.nodeName.toLowerCase();
|
|
7
10
|
var validInput = nodeName === 'input' && element.getAttribute('type') !== 'hidden';
|
|
8
11
|
var validAnchor = nodeName === 'a' && element.hasAttribute('href');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,sBAAsB,EAAE,8BAA8B,EAAC,MAAM,SAAS,CAAC;AAE/E,MAAM,WAAW,UAAW,SAAQ,8BAA8B;IAChE;;;OAGG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAuDD,cAAM,KAAM,SAAQ,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;IAC7C,MAAM,CAAC,QAAQ,gCAA0B;IAElC,MAAM;CA8Bd;AAID,eAAe,KAAK,CAAC"}
|
|
@@ -41,9 +41,8 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
41
41
|
return r;
|
|
42
42
|
};
|
|
43
43
|
import * as React from 'react';
|
|
44
|
-
import styled from '@emotion/styled';
|
|
45
44
|
import { colors, space, type } from '@workday/canvas-kit-react/tokens';
|
|
46
|
-
import { accessibleHide as accessibleHideCSS } from '@workday/canvas-kit-react/common';
|
|
45
|
+
import { accessibleHide as accessibleHideCSS, styled } from '@workday/canvas-kit-react/common';
|
|
47
46
|
import { FormFieldLabelPosition } from './types';
|
|
48
47
|
var labelStyles = [
|
|
49
48
|
__assign(__assign({}, type.levels.subtext.large), { fontWeight: type.properties.fontWeights.medium, padding: 0 }),
|
|
@@ -2,7 +2,7 @@ import { CanvasIcon, CanvasIconTypes } from '@workday/design-assets-types';
|
|
|
2
2
|
import { SvgProps } from './Svg';
|
|
3
3
|
export interface IconProps extends SvgProps {
|
|
4
4
|
src: CanvasIcon;
|
|
5
|
-
size?: number;
|
|
5
|
+
size?: number | string;
|
|
6
6
|
type: CanvasIconTypes.Accent | CanvasIconTypes.Applet | CanvasIconTypes.System;
|
|
7
7
|
}
|
|
8
8
|
export declare const Icon: import("../../common").ElementComponent<"span", IconProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;CAChF;AAED,eAAO,MAAM,IAAI,4DAyBf,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -26,13 +26,11 @@ import { createComponent } from '@workday/canvas-kit-react/common';
|
|
|
26
26
|
export var Icon = createComponent('span')({
|
|
27
27
|
displayName: 'Icon',
|
|
28
28
|
Component: function (_a, ref, Element) {
|
|
29
|
+
var _b;
|
|
29
30
|
var src = _a.src, size = _a.size, styles = _a.styles, type = _a.type, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["src", "size", "styles", "type", "shouldMirror"]);
|
|
30
31
|
var iconStyles = __assign({}, styles);
|
|
31
32
|
if (size) {
|
|
32
|
-
iconStyles['& svg'] = {
|
|
33
|
-
width: size,
|
|
34
|
-
height: size,
|
|
35
|
-
};
|
|
33
|
+
iconStyles['& svg'] = __assign(__assign({}, ((_b = iconStyles['& svg']) !== null && _b !== void 0 ? _b : {})), { width: size, height: size });
|
|
36
34
|
}
|
|
37
35
|
return (React.createElement(Svg, __assign({ src: src, type: type, shouldMirror: shouldMirror, as: Element }, elemProps, { ref: ref, styles: iconStyles })));
|
|
38
36
|
},
|
|
@@ -47,7 +47,7 @@ export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src'
|
|
|
47
47
|
/**
|
|
48
48
|
* The size of the SystemIcon in `px`.
|
|
49
49
|
*/
|
|
50
|
-
size?: number | undefined;
|
|
50
|
+
size?: number | string | undefined;
|
|
51
51
|
className?: string;
|
|
52
52
|
}
|
|
53
53
|
export declare const systemIconStyles: ({ accent, accentHover, background, backgroundHover, color, colorHover, fill, fillHover, }: SystemIconStyles) => CSSObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAa,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;IAC1D;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAa,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;IAC1D;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,QAAA,MAAM,UAAU,kEA4Cd,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;OAwB/B,CAAC"}
|
|
@@ -18,6 +18,8 @@ export var useDisableBodyScroll = createElemPropsHook(usePopupModel)(function (m
|
|
|
18
18
|
var overflowX = document.body.style.overflowX;
|
|
19
19
|
var overflow = document.body.style.overflow;
|
|
20
20
|
document.body.style.overflow = 'hidden';
|
|
21
|
+
document.body.style.overflowY = 'hidden';
|
|
22
|
+
document.body.style.overflowX = 'hidden';
|
|
21
23
|
return function () {
|
|
22
24
|
document.body.style.overflow = overflow;
|
|
23
25
|
document.body.style.overflowY = overflowY;
|
|
@@ -13,7 +13,7 @@ export var usePopupTarget = createElemPropsHook(usePopupModel)(function (_a, ref
|
|
|
13
13
|
// `state.targetRef` manually. This ensures that custom target components don't need to handle
|
|
14
14
|
// ref forwarding since ref forwarding is only really needed to programmatically open popups
|
|
15
15
|
// around a target _before_ a user clicks. In that rare case, ref forwarding is required.
|
|
16
|
-
if (!state.targetRef.current) {
|
|
16
|
+
if (!(state.targetRef.current instanceof Element)) {
|
|
17
17
|
state.targetRef.current = event.currentTarget;
|
|
18
18
|
}
|
|
19
19
|
if (state.visibility !== 'hidden') {
|
|
@@ -18,8 +18,8 @@ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>
|
|
|
18
18
|
*/
|
|
19
19
|
header?: boolean;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
declare const TableRow: import("../../common").ElementComponent<"tr", TableRowProps> & {
|
|
22
|
+
State: typeof TableRowState;
|
|
23
|
+
};
|
|
24
|
+
export default TableRow;
|
|
25
25
|
//# sourceMappingURL=TableRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,oBAAY,aAAa;IACvB,KAAK,IAAA;IACL,KAAK,IAAA;IACL,UAAU,IAAA;IACV,UAAU,IAAA;IACV,KAAK,IAAA;IACL,QAAQ,IAAA;CACT;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC;IAC9E;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAuKD,QAAA,MAAM,QAAQ;;CAgBZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
1
|
var __assign = (this && this.__assign) || function () {
|
|
15
2
|
__assign = Object.assign || function(t) {
|
|
16
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -37,6 +24,7 @@ import * as React from 'react';
|
|
|
37
24
|
import styled from '@emotion/styled';
|
|
38
25
|
import { rgba } from 'polished';
|
|
39
26
|
import { colors, space, spaceNumbers, statusColors } from '@workday/canvas-kit-react/tokens';
|
|
27
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
40
28
|
import { borderColor, borderWidth, cellBorder } from './Table';
|
|
41
29
|
export var TableRowState;
|
|
42
30
|
(function (TableRowState) {
|
|
@@ -104,7 +92,7 @@ function makeBorderlessStyle(_bgColor) {
|
|
|
104
92
|
},
|
|
105
93
|
};
|
|
106
94
|
}
|
|
107
|
-
var
|
|
95
|
+
var StyledTableRow = styled('tr')({
|
|
108
96
|
'th, td': {
|
|
109
97
|
backgroundColor: colors.frenchVanilla100,
|
|
110
98
|
padding: space.xs + " " + space.xxs,
|
|
@@ -202,16 +190,14 @@ var Row = styled('tr')({
|
|
|
202
190
|
};
|
|
203
191
|
}
|
|
204
192
|
});
|
|
205
|
-
var TableRow =
|
|
206
|
-
|
|
207
|
-
function
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return TableRow;
|
|
216
|
-
}(React.Component));
|
|
193
|
+
var TableRow = createComponent('tr')({
|
|
194
|
+
displayName: 'TableRow',
|
|
195
|
+
Component: function (_a, ref, Element) {
|
|
196
|
+
var state = _a.state, header = _a.header, children = _a.children, elemProps = __rest(_a, ["state", "header", "children"]);
|
|
197
|
+
return (React.createElement(StyledTableRow, __assign({ as: Element, ref: ref, state: state, header: header }, elemProps), children));
|
|
198
|
+
},
|
|
199
|
+
subComponents: {
|
|
200
|
+
State: TableRowState,
|
|
201
|
+
},
|
|
202
|
+
});
|
|
217
203
|
export default TableRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../tabs/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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -34,6 +34,5 @@ export var Tabs = createContainer()({
|
|
|
34
34
|
},
|
|
35
35
|
})(function (_a, _, model) {
|
|
36
36
|
var children = _a.children;
|
|
37
|
-
return
|
|
38
|
-
React.createElement(Menu, { model: model.menu }, children)));
|
|
37
|
+
return React.createElement(Menu, { model: model.menu }, children);
|
|
39
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsItem.d.ts","sourceRoot":"","sources":["../../../../tabs/lib/TabsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAIL,UAAU,EAGV,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,GAAG,EAAE,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAYjE,MAAM,WAAW,aACf,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC,EACrC,OAAO,CAAC,IAAI,C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CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa;;;;wDAyFzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoBvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnB,CAAC"}
|
package/form-field/lib/Label.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
2
|
import {colors, space, type} from '@workday/canvas-kit-react/tokens';
|
|
4
|
-
import {accessibleHide as accessibleHideCSS} from '@workday/canvas-kit-react/common';
|
|
3
|
+
import {accessibleHide as accessibleHideCSS, styled} from '@workday/canvas-kit-react/common';
|
|
5
4
|
import {FormFieldLabelPosition, FormFieldLabelPositionBehavior} from './types';
|
|
6
5
|
|
|
7
6
|
export interface LabelProps extends FormFieldLabelPositionBehavior {
|
package/icon/lib/Icon.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import {createComponent} from '@workday/canvas-kit-react/common';
|
|
|
6
6
|
|
|
7
7
|
export interface IconProps extends SvgProps {
|
|
8
8
|
src: CanvasIcon;
|
|
9
|
-
size?: number;
|
|
9
|
+
size?: number | string;
|
|
10
10
|
type: CanvasIconTypes.Accent | CanvasIconTypes.Applet | CanvasIconTypes.System;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -17,6 +17,7 @@ export const Icon = createComponent('span')({
|
|
|
17
17
|
|
|
18
18
|
if (size) {
|
|
19
19
|
iconStyles['& svg'] = {
|
|
20
|
+
...((iconStyles['& svg'] as CSSObject) ?? {}),
|
|
20
21
|
width: size,
|
|
21
22
|
height: size,
|
|
22
23
|
};
|
package/icon/lib/SystemIcon.tsx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
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",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@emotion/styled": "^11.6.0",
|
|
49
49
|
"@popperjs/core": "^2.5.4",
|
|
50
50
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
51
|
-
"@workday/canvas-kit-labs-react": "^7.0.
|
|
52
|
-
"@workday/canvas-kit-popup-stack": "^7.0.
|
|
53
|
-
"@workday/canvas-kit-preview-react": "^7.0.
|
|
51
|
+
"@workday/canvas-kit-labs-react": "^7.0.2",
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^7.0.2",
|
|
53
|
+
"@workday/canvas-kit-preview-react": "^7.0.2",
|
|
54
54
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
55
55
|
"@workday/design-assets-types": "^0.2.4",
|
|
56
56
|
"chroma-js": "^2.1.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
70
70
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "2edf9dbdcf4e6258dd112db510037ce8affe776f"
|
|
73
73
|
}
|
|
@@ -24,6 +24,8 @@ export const useDisableBodyScroll = createElemPropsHook(usePopupModel)(model =>
|
|
|
24
24
|
const overflow = document.body.style.overflow;
|
|
25
25
|
|
|
26
26
|
document.body.style.overflow = 'hidden';
|
|
27
|
+
document.body.style.overflowY = 'hidden';
|
|
28
|
+
document.body.style.overflowX = 'hidden';
|
|
27
29
|
|
|
28
30
|
return () => {
|
|
29
31
|
document.body.style.overflow = overflow;
|