@workday/canvas-kit-labs-react 8.0.0-alpha.253-next.22 → 8.0.0-alpha.428-next.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/common/lib/theming/index.ts +0 -1
- package/common/lib/theming/useThemeRTL.ts +3 -0
- package/dist/commonjs/combobox/lib/AutocompleteList.js +31 -52
- package/dist/commonjs/combobox/lib/Combobox.js +105 -133
- package/dist/commonjs/combobox/lib/Status.js +9 -10
- package/dist/commonjs/common/lib/theming/index.d.ts +0 -1
- package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/index.js +0 -1
- package/dist/commonjs/common/lib/theming/useThemeRTL.d.ts +3 -0
- package/dist/commonjs/common/lib/theming/useThemeRTL.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/useThemeRTL.js +19 -42
- package/dist/commonjs/expandable/lib/Expandable.d.ts +45 -12
- package/dist/commonjs/expandable/lib/Expandable.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/Expandable.js +46 -37
- package/dist/commonjs/expandable/lib/ExpandableAvatar.js +7 -30
- package/dist/commonjs/expandable/lib/ExpandableContent.d.ts +4 -2
- package/dist/commonjs/expandable/lib/ExpandableContent.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/ExpandableContent.js +8 -31
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts +1 -1
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/ExpandableIcon.js +20 -51
- package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts +7 -2
- package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/ExpandableTarget.js +18 -34
- package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts +3 -1
- package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/ExpandableTitle.js +6 -29
- package/dist/commonjs/expandable/lib/hooks/index.d.ts +1 -0
- package/dist/commonjs/expandable/lib/hooks/index.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/hooks/index.js +1 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts +4 -6
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.js +3 -4
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts +4 -6
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.js +3 -4
- package/dist/{es6/expandable/lib → commonjs/expandable/lib/hooks}/useExpandableModel.d.ts +10 -7
- package/dist/commonjs/expandable/lib/hooks/useExpandableModel.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableModel.js +22 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts +4 -6
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.js +4 -5
- package/dist/commonjs/index.d.ts +0 -3
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -3
- package/dist/commonjs/search-form/lib/SearchForm.d.ts +6 -1
- package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/commonjs/search-form/lib/SearchForm.js +117 -142
- package/dist/commonjs/search-form/lib/themes.js +7 -8
- package/dist/es6/combobox/lib/AutocompleteList.js +26 -47
- package/dist/es6/combobox/lib/Combobox.js +95 -123
- package/dist/es6/combobox/lib/Status.js +6 -7
- package/dist/es6/common/lib/theming/index.d.ts +0 -1
- package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/index.js +0 -1
- package/dist/es6/common/lib/theming/useThemeRTL.d.ts +3 -0
- package/dist/es6/common/lib/theming/useThemeRTL.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/useThemeRTL.js +16 -39
- package/dist/es6/expandable/lib/Expandable.d.ts +45 -12
- package/dist/es6/expandable/lib/Expandable.d.ts.map +1 -1
- package/dist/es6/expandable/lib/Expandable.js +40 -31
- package/dist/es6/expandable/lib/ExpandableAvatar.js +4 -27
- package/dist/es6/expandable/lib/ExpandableContent.d.ts +4 -2
- package/dist/es6/expandable/lib/ExpandableContent.d.ts.map +1 -1
- package/dist/es6/expandable/lib/ExpandableContent.js +5 -28
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts +1 -1
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts.map +1 -1
- package/dist/es6/expandable/lib/ExpandableIcon.js +15 -46
- package/dist/es6/expandable/lib/ExpandableTarget.d.ts +7 -2
- package/dist/es6/expandable/lib/ExpandableTarget.d.ts.map +1 -1
- package/dist/es6/expandable/lib/ExpandableTarget.js +15 -31
- package/dist/es6/expandable/lib/ExpandableTitle.d.ts +3 -1
- package/dist/es6/expandable/lib/ExpandableTitle.d.ts.map +1 -1
- package/dist/es6/expandable/lib/ExpandableTitle.js +3 -26
- package/dist/es6/expandable/lib/hooks/index.d.ts +1 -0
- package/dist/es6/expandable/lib/hooks/index.d.ts.map +1 -1
- package/dist/es6/expandable/lib/hooks/index.js +1 -0
- package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts +4 -6
- package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts.map +1 -1
- package/dist/es6/expandable/lib/hooks/useExpandableContent.js +2 -3
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts +4 -6
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts.map +1 -1
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.js +2 -3
- package/dist/{commonjs/expandable/lib → es6/expandable/lib/hooks}/useExpandableModel.d.ts +10 -7
- package/dist/es6/expandable/lib/hooks/useExpandableModel.d.ts.map +1 -0
- package/dist/es6/expandable/lib/hooks/useExpandableModel.js +19 -0
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts +4 -6
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts.map +1 -1
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.js +3 -4
- package/dist/es6/index.d.ts +0 -3
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +0 -3
- package/dist/es6/search-form/lib/SearchForm.d.ts +6 -1
- package/dist/es6/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/es6/search-form/lib/SearchForm.js +107 -133
- package/dist/es6/search-form/lib/themes.js +5 -6
- package/expandable/lib/Expandable.tsx +38 -4
- package/expandable/lib/ExpandableContent.tsx +4 -4
- package/expandable/lib/ExpandableIcon.tsx +2 -1
- package/expandable/lib/ExpandableTarget.tsx +3 -3
- package/expandable/lib/ExpandableTitle.tsx +6 -8
- package/expandable/lib/hooks/index.ts +1 -0
- package/expandable/lib/hooks/useExpandableContent.ts +1 -1
- package/expandable/lib/hooks/useExpandableIcon.ts +1 -1
- package/expandable/lib/{useExpandableModel.tsx → hooks/useExpandableModel.tsx} +3 -0
- package/expandable/lib/hooks/useExpandableTarget.ts +1 -1
- package/index.ts +0 -3
- package/package.json +4 -4
- package/search-form/lib/SearchForm.tsx +11 -5
- package/common/lib/theming/useThemedRing.ts +0 -82
- package/dist/commonjs/common/lib/theming/useThemedRing.d.ts +0 -11
- package/dist/commonjs/common/lib/theming/useThemedRing.d.ts.map +0 -1
- package/dist/commonjs/common/lib/theming/useThemedRing.js +0 -67
- package/dist/commonjs/drawer/index.d.ts +0 -3
- package/dist/commonjs/drawer/index.d.ts.map +0 -1
- package/dist/commonjs/drawer/index.js +0 -16
- package/dist/commonjs/drawer/lib/Drawer.d.ts +0 -74
- package/dist/commonjs/drawer/lib/Drawer.d.ts.map +0 -1
- package/dist/commonjs/drawer/lib/Drawer.js +0 -142
- package/dist/commonjs/drawer/lib/DrawerHeader.d.ts +0 -55
- package/dist/commonjs/drawer/lib/DrawerHeader.d.ts.map +0 -1
- package/dist/commonjs/drawer/lib/DrawerHeader.js +0 -113
- package/dist/commonjs/expandable/lib/useExpandableModel.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/useExpandableModel.js +0 -24
- package/dist/commonjs/toast/index.d.ts +0 -3
- package/dist/commonjs/toast/index.d.ts.map +0 -1
- package/dist/commonjs/toast/index.js +0 -14
- package/dist/commonjs/toast/lib/Toast.d.ts +0 -27
- package/dist/commonjs/toast/lib/Toast.d.ts.map +0 -1
- package/dist/commonjs/toast/lib/Toast.js +0 -78
- package/dist/commonjs/toast/lib/ToastBody.d.ts +0 -6
- package/dist/commonjs/toast/lib/ToastBody.d.ts.map +0 -1
- package/dist/commonjs/toast/lib/ToastBody.js +0 -40
- package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts +0 -6
- package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts.map +0 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +0 -43
- package/dist/commonjs/toast/lib/ToastIcon.d.ts +0 -5
- package/dist/commonjs/toast/lib/ToastIcon.d.ts.map +0 -1
- package/dist/commonjs/toast/lib/ToastIcon.js +0 -26
- package/dist/commonjs/toast/lib/ToastLink.d.ts +0 -9
- package/dist/commonjs/toast/lib/ToastLink.d.ts.map +0 -1
- package/dist/commonjs/toast/lib/ToastLink.js +0 -42
- package/dist/commonjs/toast/lib/ToastMessage.d.ts +0 -11
- package/dist/commonjs/toast/lib/ToastMessage.d.ts.map +0 -1
- package/dist/commonjs/toast/lib/ToastMessage.js +0 -41
- package/dist/commonjs/toast/lib/hooks/useToastModel.d.ts +0 -65
- package/dist/commonjs/toast/lib/hooks/useToastModel.d.ts.map +0 -1
- package/dist/commonjs/toast/lib/hooks/useToastModel.js +0 -35
- package/dist/es6/common/lib/theming/useThemedRing.d.ts +0 -11
- package/dist/es6/common/lib/theming/useThemedRing.d.ts.map +0 -1
- package/dist/es6/common/lib/theming/useThemedRing.js +0 -59
- package/dist/es6/drawer/index.d.ts +0 -3
- package/dist/es6/drawer/index.d.ts.map +0 -1
- package/dist/es6/drawer/index.js +0 -2
- package/dist/es6/drawer/lib/Drawer.d.ts +0 -74
- package/dist/es6/drawer/lib/Drawer.d.ts.map +0 -1
- package/dist/es6/drawer/lib/Drawer.js +0 -117
- package/dist/es6/drawer/lib/DrawerHeader.d.ts +0 -55
- package/dist/es6/drawer/lib/DrawerHeader.d.ts.map +0 -1
- package/dist/es6/drawer/lib/DrawerHeader.js +0 -88
- package/dist/es6/expandable/lib/useExpandableModel.d.ts.map +0 -1
- package/dist/es6/expandable/lib/useExpandableModel.js +0 -21
- package/dist/es6/toast/index.d.ts +0 -3
- package/dist/es6/toast/index.d.ts.map +0 -1
- package/dist/es6/toast/index.js +0 -2
- package/dist/es6/toast/lib/Toast.d.ts +0 -27
- package/dist/es6/toast/lib/Toast.d.ts.map +0 -1
- package/dist/es6/toast/lib/Toast.js +0 -72
- package/dist/es6/toast/lib/ToastBody.d.ts +0 -6
- package/dist/es6/toast/lib/ToastBody.d.ts.map +0 -1
- package/dist/es6/toast/lib/ToastBody.js +0 -34
- package/dist/es6/toast/lib/ToastCloseIcon.d.ts +0 -6
- package/dist/es6/toast/lib/ToastCloseIcon.d.ts.map +0 -1
- package/dist/es6/toast/lib/ToastCloseIcon.js +0 -37
- package/dist/es6/toast/lib/ToastIcon.d.ts +0 -5
- package/dist/es6/toast/lib/ToastIcon.d.ts.map +0 -1
- package/dist/es6/toast/lib/ToastIcon.js +0 -20
- package/dist/es6/toast/lib/ToastLink.d.ts +0 -9
- package/dist/es6/toast/lib/ToastLink.d.ts.map +0 -1
- package/dist/es6/toast/lib/ToastLink.js +0 -36
- package/dist/es6/toast/lib/ToastMessage.d.ts +0 -11
- package/dist/es6/toast/lib/ToastMessage.d.ts.map +0 -1
- package/dist/es6/toast/lib/ToastMessage.js +0 -35
- package/dist/es6/toast/lib/hooks/useToastModel.d.ts +0 -65
- package/dist/es6/toast/lib/hooks/useToastModel.d.ts.map +0 -1
- package/dist/es6/toast/lib/hooks/useToastModel.js +0 -32
- package/drawer/LICENSE +0 -51
- package/drawer/README.md +0 -35
- package/drawer/index.ts +0 -2
- package/drawer/lib/Drawer.tsx +0 -156
- package/drawer/lib/DrawerHeader.tsx +0 -133
- package/drawer/package.json +0 -6
- package/toast/LICENSE +0 -52
- package/toast/README.md +0 -5
- package/toast/index.ts +0 -2
- package/toast/lib/Toast.tsx +0 -63
- package/toast/lib/ToastBody.tsx +0 -34
- package/toast/lib/ToastCloseIcon.tsx +0 -18
- package/toast/lib/ToastIcon.tsx +0 -24
- package/toast/lib/ToastLink.tsx +0 -27
- package/toast/lib/ToastMessage.tsx +0 -21
- package/toast/lib/hooks/useToastModel.tsx +0 -27
- package/toast/package.json +0 -6
|
@@ -18,6 +18,9 @@ const getConvertedStyles = (
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
+
* @deprecated Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties)
|
|
22
|
+
*
|
|
23
|
+
*
|
|
21
24
|
* A helpful hook for supporting bidirectional styles.
|
|
22
25
|
* * Read below for more detail or [view the docs](https://github.com/Workday/canvas-kit/blob/master/modules/labs-react/common/README.md#useThemeRTL).
|
|
23
26
|
*
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -29,55 +18,48 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
18
|
__setModuleDefault(result, mod);
|
|
30
19
|
return result;
|
|
31
20
|
};
|
|
32
|
-
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
33
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
34
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
35
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
36
|
-
r[k] = a[j];
|
|
37
|
-
return r;
|
|
38
|
-
};
|
|
39
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
41
23
|
};
|
|
42
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
25
|
exports.AutocompleteList = void 0;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
27
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
28
|
+
const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
29
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
30
|
+
const Combobox_1 = require("./Combobox");
|
|
31
|
+
const Autocomplete = styled_1.default('ul')({
|
|
50
32
|
margin: 0,
|
|
51
33
|
maxHeight: 200,
|
|
52
34
|
boxSizing: 'border-box',
|
|
53
35
|
overflowY: 'auto',
|
|
54
|
-
padding: tokens_1.space.xxs
|
|
36
|
+
padding: `${tokens_1.space.xxs} 0`,
|
|
55
37
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var listBoxProps = {
|
|
38
|
+
const AccessibleHide = styled_1.default('span')(common_1.accessibleHide);
|
|
39
|
+
const AutocompleteList = ({ autocompleteItems, comboboxId, selectedIndex, handleAutocompleteClick, labelId, showGroupText, }) => {
|
|
40
|
+
const [randomComponentId] = react_1.useState(common_1.generateUniqueId); // https://codesandbox.io/s/p2ndq
|
|
41
|
+
const componentId = comboboxId || randomComponentId;
|
|
42
|
+
const listBoxProps = {
|
|
62
43
|
role: 'listbox',
|
|
63
|
-
id: componentId
|
|
44
|
+
id: `${componentId}-${Combobox_1.listBoxIdPart}`,
|
|
64
45
|
'aria-labelledby': labelId,
|
|
65
46
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
react_1.default.createElement(AccessibleHide, { key:
|
|
69
|
-
|
|
47
|
+
const createListItem = (listboxItem, itemIndex, groupMessage) => {
|
|
48
|
+
const children = [
|
|
49
|
+
react_1.default.createElement(AccessibleHide, { key: `group-message-${itemIndex}` }, groupMessage),
|
|
50
|
+
...react_1.default.Children.toArray(listboxItem.props.children),
|
|
51
|
+
];
|
|
70
52
|
return (react_1.default.createElement(react_1.Fragment, { key: itemIndex }, react_1.default.cloneElement(listboxItem, {
|
|
71
53
|
children: children,
|
|
72
54
|
id: Combobox_1.getOptionId(componentId, itemIndex),
|
|
73
55
|
role: 'option',
|
|
74
56
|
isFocused: selectedIndex === itemIndex,
|
|
75
57
|
'aria-selected': selectedIndex === itemIndex ? true : undefined,
|
|
76
|
-
onMouseDown:
|
|
58
|
+
onMouseDown: (event) => {
|
|
77
59
|
// prevent focus from shifting away from the the combobox
|
|
78
60
|
event.preventDefault();
|
|
79
61
|
},
|
|
80
|
-
onClick:
|
|
62
|
+
onClick: (event) => {
|
|
81
63
|
event.preventDefault();
|
|
82
64
|
handleAutocompleteClick(event, listboxItem.props);
|
|
83
65
|
},
|
|
@@ -87,30 +69,27 @@ var AutocompleteList = function (_a) {
|
|
|
87
69
|
return null;
|
|
88
70
|
}
|
|
89
71
|
else if (autocompleteItems[0].hasOwnProperty('header')) {
|
|
90
|
-
|
|
91
|
-
return (react_1.default.createElement(Autocomplete,
|
|
92
|
-
|
|
93
|
-
var groupLabel = "itemGroup-" + componentId + "-" + groupIndex;
|
|
72
|
+
let itemIndex = 0;
|
|
73
|
+
return (react_1.default.createElement(Autocomplete, Object.assign({}, listBoxProps), autocompleteItems.map(({ header, items }, groupIndex) => {
|
|
74
|
+
const groupLabel = `itemGroup-${componentId}-${groupIndex}`;
|
|
94
75
|
return (react_1.default.createElement(react_1.Fragment, { key: groupLabel },
|
|
95
76
|
react_1.default.cloneElement(header, {
|
|
96
77
|
role: 'presentation',
|
|
97
|
-
style: { pointerEvents:
|
|
78
|
+
style: { pointerEvents: `none` },
|
|
98
79
|
}),
|
|
99
|
-
items.map(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
?
|
|
80
|
+
items.map((listboxItem) => {
|
|
81
|
+
const headerName = Combobox_1.getTextFromElement(header);
|
|
82
|
+
const groupMessage = showGroupText
|
|
83
|
+
? `Entering group ${headerName}, with ${items.length} options.`
|
|
103
84
|
: undefined;
|
|
104
|
-
|
|
105
|
-
|
|
85
|
+
const item = createListItem(listboxItem, itemIndex, groupMessage);
|
|
86
|
+
itemIndex++;
|
|
106
87
|
return item;
|
|
107
88
|
})));
|
|
108
89
|
})));
|
|
109
90
|
}
|
|
110
91
|
else {
|
|
111
|
-
return (react_1.default.createElement(Autocomplete,
|
|
112
|
-
return createListItem(listboxItem, index);
|
|
113
|
-
})));
|
|
92
|
+
return (react_1.default.createElement(Autocomplete, Object.assign({}, listBoxProps), autocompleteItems.map((listboxItem, index) => createListItem(listboxItem, index))));
|
|
114
93
|
}
|
|
115
94
|
};
|
|
116
95
|
exports.AutocompleteList = AutocompleteList;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -29,46 +18,32 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
18
|
__setModuleDefault(result, mod);
|
|
30
19
|
return result;
|
|
31
20
|
};
|
|
32
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
-
var t = {};
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
-
t[p[i]] = s[p[i]];
|
|
40
|
-
}
|
|
41
|
-
return t;
|
|
42
|
-
};
|
|
43
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
23
|
};
|
|
46
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
25
|
exports.Combobox = exports.getTextFromElement = exports.getOptionId = exports.listBoxIdPart = void 0;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
27
|
+
const react_2 = require("@emotion/react");
|
|
28
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
29
|
+
const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
30
|
+
const card_1 = require("@workday/canvas-kit-react/card");
|
|
31
|
+
const button_1 = require("@workday/canvas-kit-react/button");
|
|
32
|
+
const canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
|
|
33
|
+
const lodash_flatten_1 = __importDefault(require("lodash.flatten"));
|
|
34
|
+
const AutocompleteList_1 = require("./AutocompleteList");
|
|
35
|
+
const Status_1 = require("./Status");
|
|
36
|
+
const Container = common_1.styled('div')({
|
|
59
37
|
display: 'inline-block',
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var InputContainer = common_1.styled('div')({
|
|
67
|
-
display: "flex",
|
|
68
|
-
alignItems: "center",
|
|
38
|
+
}, ({ grow }) => ({
|
|
39
|
+
width: grow ? '100%' : 'auto',
|
|
40
|
+
}));
|
|
41
|
+
const InputContainer = common_1.styled('div')({
|
|
42
|
+
display: `flex`,
|
|
43
|
+
alignItems: `center`,
|
|
69
44
|
position: 'relative',
|
|
70
45
|
});
|
|
71
|
-
|
|
46
|
+
const fadeInKeyframes = react_2.keyframes({
|
|
72
47
|
'0%': {
|
|
73
48
|
opacity: 0,
|
|
74
49
|
},
|
|
@@ -76,46 +51,41 @@ var fadeInKeyframes = react_2.keyframes({
|
|
|
76
51
|
opacity: 1,
|
|
77
52
|
},
|
|
78
53
|
});
|
|
79
|
-
|
|
54
|
+
const MenuContainer = common_1.styled(card_1.Card)({
|
|
80
55
|
position: 'absolute',
|
|
81
56
|
zIndex: 1,
|
|
82
57
|
left: 0,
|
|
83
58
|
top: '100%',
|
|
84
59
|
borderRadius: tokens_1.borderRadius.m,
|
|
85
60
|
background: tokens_1.commonColors.background,
|
|
86
|
-
border:
|
|
87
|
-
marginTop:
|
|
61
|
+
border: `none`,
|
|
62
|
+
marginTop: `-${tokens_1.borderRadius.m}`,
|
|
88
63
|
width: '100%',
|
|
89
64
|
minWidth: 0,
|
|
90
|
-
animation: fadeInKeyframes
|
|
65
|
+
animation: `${fadeInKeyframes} 200ms ease-out`,
|
|
91
66
|
maxHeight: 200,
|
|
92
67
|
overflow: 'hidden',
|
|
93
68
|
});
|
|
94
|
-
|
|
69
|
+
const ResetButton = common_1.styled(button_1.TertiaryButton)({
|
|
95
70
|
position: 'absolute',
|
|
96
|
-
margin:
|
|
71
|
+
margin: `auto ${tokens_1.space.xxxs}`,
|
|
97
72
|
top: 0,
|
|
98
73
|
bottom: 0,
|
|
99
74
|
right: 0,
|
|
100
75
|
padding: 0,
|
|
101
76
|
zIndex: 2,
|
|
102
77
|
transition: 'opacity 120ms',
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
exports.listBoxIdPart = "listbox";
|
|
111
|
-
var optionIdPart = "option";
|
|
112
|
-
var getOptionId = function (baseId, index) {
|
|
113
|
-
return baseId + "-" + optionIdPart + "-" + index;
|
|
114
|
-
};
|
|
78
|
+
}, ({ shouldShow }) => ({
|
|
79
|
+
visibility: shouldShow ? 'visible' : 'hidden',
|
|
80
|
+
opacity: shouldShow ? 1 : 0,
|
|
81
|
+
}));
|
|
82
|
+
exports.listBoxIdPart = `listbox`;
|
|
83
|
+
const optionIdPart = `option`;
|
|
84
|
+
const getOptionId = (baseId, index) => `${baseId}-${optionIdPart}-${index}`;
|
|
115
85
|
exports.getOptionId = getOptionId;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
react_1.default.Children.map(children,
|
|
86
|
+
const getTextFromElement = (children) => {
|
|
87
|
+
let text = '';
|
|
88
|
+
react_1.default.Children.map(children, child => {
|
|
119
89
|
if (child == null || typeof child === 'boolean') {
|
|
120
90
|
text += '';
|
|
121
91
|
}
|
|
@@ -132,89 +102,88 @@ var getTextFromElement = function (children) {
|
|
|
132
102
|
return text;
|
|
133
103
|
};
|
|
134
104
|
exports.getTextFromElement = getTextFromElement;
|
|
135
|
-
|
|
136
|
-
return
|
|
105
|
+
const buildStatusString = (listCount) => {
|
|
106
|
+
return `There ${listCount === 1 ? 'is' : 'are'} ${listCount} suggestion${listCount === 1 ? '' : 's'}.`;
|
|
137
107
|
};
|
|
138
|
-
|
|
108
|
+
const isValidSingleChild = (child) => {
|
|
139
109
|
return react_1.default.isValidElement(child) && react_1.default.Children.only(child);
|
|
140
110
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
var _k = react_1.useState(''), announcementText = _k[0], setAnnouncementText = _k[1];
|
|
111
|
+
const Combobox = ({ autocompleteItems, children, grow, initialValue, onChange, onFocus, onBlur, showClearButton, clearButtonVariant = undefined, clearButtonAriaLabel = `Reset Search Input`, labelId, getStatusText = buildStatusString, id, ...elemProps }) => {
|
|
112
|
+
const [isOpened, setIsOpened] = react_1.useState(false);
|
|
113
|
+
const [value, _setValue] = react_1.useState(''); // Don't call _setValue directly instead call setInputValue to make sure onChange fires correctly
|
|
114
|
+
const [showingAutocomplete, setShowingAutocomplete] = react_1.useState(false);
|
|
115
|
+
const [selectedAutocompleteIndex, setSelectedAutocompleteIndex] = react_1.useState(null);
|
|
116
|
+
const [interactiveAutocompleteItems, setInteractiveAutocompleteItems] = react_1.useState([]);
|
|
117
|
+
const [announcementText, setAnnouncementText] = react_1.useState('');
|
|
149
118
|
// Create a ref to the soon-to-be-created TextInput clone for internal use.
|
|
150
119
|
// Use useForkRef to combine it with the ref already assigned to the original
|
|
151
120
|
// TextInput (if it exists) to create a single callback ref which can be
|
|
152
121
|
// forwarded to the TextInput clone.
|
|
153
|
-
|
|
122
|
+
const inputRef = react_1.useRef(null);
|
|
154
123
|
// We need access to the original TextInput's ref _property_ (not prop) so we
|
|
155
124
|
// can combine it with the internal inputRef using useForkRef. ref isn't
|
|
156
125
|
// listed in the ReactElement interface, but it's there, so we cast children
|
|
157
126
|
// to satisfy TS.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
127
|
+
const elementRef = common_1.useForkRef(children.ref, inputRef);
|
|
128
|
+
const comboboxRef = react_1.useRef(null);
|
|
129
|
+
const randomComponentId = common_1.useUniqueId();
|
|
130
|
+
const randomLabelId = common_1.useUniqueId();
|
|
131
|
+
const componentId = id || randomComponentId;
|
|
132
|
+
const formLabelId = labelId || randomLabelId;
|
|
133
|
+
const [showGroupText, setShowGroupText] = react_1.useState(false);
|
|
165
134
|
// We're using LayoutEffect here because of an issue with the Synthetic event system and typing a key
|
|
166
135
|
// after the listbox has been closed. Somehow the key is ignored unless we use `useLayoutEffect`
|
|
167
|
-
react_1.useLayoutEffect(
|
|
168
|
-
|
|
136
|
+
react_1.useLayoutEffect(() => {
|
|
137
|
+
const shouldShow = interactiveAutocompleteItems.length > 0 && isOpened;
|
|
169
138
|
setShowingAutocomplete(shouldShow);
|
|
170
139
|
if (shouldShow) {
|
|
171
140
|
setAnnouncementText(getStatusText(interactiveAutocompleteItems.length));
|
|
172
141
|
}
|
|
173
142
|
}, [getStatusText, interactiveAutocompleteItems, isOpened]);
|
|
174
143
|
// Used to set the position of the reset button and the padding direction inside the input container
|
|
175
|
-
|
|
176
|
-
|
|
144
|
+
const isRTL = common_1.useIsRTL();
|
|
145
|
+
const setInputValue = react_1.useCallback((newValue) => {
|
|
177
146
|
_setValue(newValue);
|
|
178
|
-
|
|
147
|
+
const inputDomElement = inputRef.current;
|
|
179
148
|
// Changing value prop programmatically doesn't fire an Synthetic event or trigger native onChange.
|
|
180
149
|
// We can not just update .value= in setState because React library overrides input value setter
|
|
181
150
|
// but we can call the function directly on the input as context.
|
|
182
151
|
// This will cause onChange events to fire no matter how value is updated.
|
|
183
152
|
if (inputDomElement) {
|
|
184
|
-
|
|
153
|
+
const nativeInputValue = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(inputDomElement), 'value');
|
|
185
154
|
if (nativeInputValue && nativeInputValue.set) {
|
|
186
155
|
nativeInputValue.set.call(inputDomElement, newValue);
|
|
187
156
|
}
|
|
188
|
-
|
|
157
|
+
let event;
|
|
189
158
|
if (typeof Event === 'function') {
|
|
190
159
|
// modern browsers
|
|
191
|
-
|
|
160
|
+
event = new Event('input', { bubbles: true });
|
|
192
161
|
}
|
|
193
162
|
else {
|
|
194
163
|
// IE 11
|
|
195
|
-
|
|
196
|
-
|
|
164
|
+
event = document.createEvent('Event');
|
|
165
|
+
event.initEvent('input', true, true);
|
|
197
166
|
}
|
|
198
|
-
inputDomElement.dispatchEvent(
|
|
167
|
+
inputDomElement.dispatchEvent(event);
|
|
199
168
|
}
|
|
200
169
|
}, [inputRef]);
|
|
201
|
-
react_1.useEffect(
|
|
170
|
+
react_1.useEffect(() => {
|
|
202
171
|
if (initialValue !== null && initialValue !== undefined) {
|
|
203
172
|
setInputValue(initialValue);
|
|
204
173
|
}
|
|
205
174
|
}, [initialValue, setInputValue]);
|
|
206
|
-
react_1.useEffect(
|
|
207
|
-
|
|
175
|
+
react_1.useEffect(() => {
|
|
176
|
+
const getInteractiveAutocompleteItems = () => {
|
|
208
177
|
if (autocompleteItems &&
|
|
209
178
|
autocompleteItems.length &&
|
|
210
179
|
autocompleteItems[0].hasOwnProperty('header')) {
|
|
211
|
-
return lodash_flatten_1.default(autocompleteItems.map(
|
|
180
|
+
return lodash_flatten_1.default(autocompleteItems.map(group => group.items));
|
|
212
181
|
}
|
|
213
182
|
return autocompleteItems || [];
|
|
214
183
|
};
|
|
215
184
|
setInteractiveAutocompleteItems(getInteractiveAutocompleteItems());
|
|
216
185
|
}, [autocompleteItems]);
|
|
217
|
-
|
|
186
|
+
const handleAutocompleteClick = (event, menuItemProps) => {
|
|
218
187
|
if (menuItemProps.isDisabled) {
|
|
219
188
|
return;
|
|
220
189
|
}
|
|
@@ -225,25 +194,25 @@ var Combobox = function (_a) {
|
|
|
225
194
|
menuItemProps.onClick(event);
|
|
226
195
|
}
|
|
227
196
|
};
|
|
228
|
-
|
|
197
|
+
const focusInput = () => {
|
|
229
198
|
if (inputRef.current) {
|
|
230
199
|
inputRef.current.focus();
|
|
231
200
|
}
|
|
232
201
|
};
|
|
233
|
-
|
|
202
|
+
const handleClick = (event) => {
|
|
234
203
|
if (!showingAutocomplete) {
|
|
235
204
|
setShowingAutocomplete(true);
|
|
236
205
|
}
|
|
237
206
|
};
|
|
238
|
-
|
|
207
|
+
const handleFocus = (event) => {
|
|
239
208
|
setIsOpened(true);
|
|
240
209
|
if (onFocus) {
|
|
241
210
|
onFocus(event);
|
|
242
211
|
}
|
|
243
212
|
};
|
|
244
|
-
|
|
213
|
+
const handleBlur = (event) => {
|
|
245
214
|
if (comboboxRef.current) {
|
|
246
|
-
|
|
215
|
+
const target = event.relatedTarget;
|
|
247
216
|
if (target && comboboxRef.current.contains(target)) {
|
|
248
217
|
return;
|
|
249
218
|
}
|
|
@@ -253,45 +222,45 @@ var Combobox = function (_a) {
|
|
|
253
222
|
onBlur(event);
|
|
254
223
|
}
|
|
255
224
|
};
|
|
256
|
-
|
|
225
|
+
const resetSearchInput = () => {
|
|
257
226
|
setInputValue('');
|
|
258
227
|
focusInput();
|
|
259
228
|
};
|
|
260
|
-
|
|
229
|
+
const getGroupIndex = (itemIndex) => {
|
|
261
230
|
if (itemIndex != null &&
|
|
262
231
|
autocompleteItems &&
|
|
263
232
|
autocompleteItems.length &&
|
|
264
233
|
autocompleteItems[0].hasOwnProperty('header')) {
|
|
265
|
-
|
|
266
|
-
return autocompleteItems.findIndex(
|
|
267
|
-
|
|
268
|
-
return
|
|
234
|
+
let count = 0;
|
|
235
|
+
return autocompleteItems.findIndex(groups => {
|
|
236
|
+
count += groups.items.length;
|
|
237
|
+
return count > itemIndex;
|
|
269
238
|
});
|
|
270
239
|
}
|
|
271
240
|
else {
|
|
272
241
|
return -1;
|
|
273
242
|
}
|
|
274
243
|
};
|
|
275
|
-
|
|
244
|
+
const handleKeyboardShortcuts = (event) => {
|
|
276
245
|
if (event.ctrlKey || event.altKey || event.metaKey || !interactiveAutocompleteItems.length) {
|
|
277
246
|
return;
|
|
278
247
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
248
|
+
const autoCompleteItemCount = interactiveAutocompleteItems.length;
|
|
249
|
+
const firstItem = 0;
|
|
250
|
+
const lastItem = autoCompleteItemCount - 1;
|
|
251
|
+
let nextIndex = null;
|
|
283
252
|
setIsOpened(true);
|
|
284
253
|
switch (event.key) {
|
|
285
254
|
case 'ArrowUp':
|
|
286
255
|
case 'Up': // IE/Edge specific value
|
|
287
|
-
|
|
256
|
+
const upIndex = selectedAutocompleteIndex !== null ? selectedAutocompleteIndex - 1 : lastItem;
|
|
288
257
|
nextIndex = upIndex < 0 ? lastItem : upIndex;
|
|
289
258
|
event.stopPropagation();
|
|
290
259
|
event.preventDefault();
|
|
291
260
|
break;
|
|
292
261
|
case 'ArrowDown':
|
|
293
262
|
case 'Down': // IE/Edge specific value
|
|
294
|
-
|
|
263
|
+
const downIndex = selectedAutocompleteIndex !== null ? selectedAutocompleteIndex + 1 : firstItem;
|
|
295
264
|
nextIndex = downIndex >= autoCompleteItemCount ? firstItem : downIndex;
|
|
296
265
|
event.stopPropagation();
|
|
297
266
|
event.preventDefault();
|
|
@@ -302,7 +271,7 @@ var Combobox = function (_a) {
|
|
|
302
271
|
break;
|
|
303
272
|
case 'Enter':
|
|
304
273
|
if (selectedAutocompleteIndex != null) {
|
|
305
|
-
|
|
274
|
+
const item = interactiveAutocompleteItems[selectedAutocompleteIndex];
|
|
306
275
|
handleAutocompleteClick(event, item.props);
|
|
307
276
|
if (item.props.isDisabled) {
|
|
308
277
|
nextIndex = selectedAutocompleteIndex;
|
|
@@ -313,25 +282,27 @@ var Combobox = function (_a) {
|
|
|
313
282
|
break;
|
|
314
283
|
default:
|
|
315
284
|
}
|
|
316
|
-
|
|
317
|
-
|
|
285
|
+
const lastGroupIndex = getGroupIndex(selectedAutocompleteIndex);
|
|
286
|
+
const nextGroupIndex = getGroupIndex(nextIndex);
|
|
318
287
|
setShowGroupText(lastGroupIndex !== nextGroupIndex);
|
|
319
288
|
setSelectedAutocompleteIndex(nextIndex);
|
|
320
289
|
};
|
|
321
|
-
|
|
290
|
+
const handleSearchInputChange = (event) => {
|
|
322
291
|
if (onChange) {
|
|
323
292
|
onChange(event);
|
|
324
293
|
}
|
|
325
294
|
_setValue(event.target.value); // Calling set value directly only for on change event
|
|
326
295
|
};
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
var cssOverride = { ':focus': { zIndex: 2 } };
|
|
296
|
+
const renderChildren = (inputElement) => {
|
|
297
|
+
let cssOverride = { ':focus': { zIndex: 2 } };
|
|
330
298
|
if (showClearButton) {
|
|
331
|
-
|
|
332
|
-
cssOverride =
|
|
299
|
+
const paddingDirection = isRTL ? 'paddingLeft' : 'paddingRight';
|
|
300
|
+
cssOverride = {
|
|
301
|
+
...cssOverride,
|
|
302
|
+
[paddingDirection]: tokens_1.space.xl,
|
|
303
|
+
};
|
|
333
304
|
}
|
|
334
|
-
|
|
305
|
+
const newTextInputProps = {
|
|
335
306
|
type: 'text',
|
|
336
307
|
id: componentId,
|
|
337
308
|
grow: grow,
|
|
@@ -348,16 +319,17 @@ var Combobox = function (_a) {
|
|
|
348
319
|
onBlur: handleBlur,
|
|
349
320
|
css: cssOverride,
|
|
350
321
|
role: 'combobox',
|
|
351
|
-
'aria-owns': showingAutocomplete ? componentId
|
|
322
|
+
'aria-owns': showingAutocomplete ? `${componentId}-${exports.listBoxIdPart}` : undefined,
|
|
352
323
|
'aria-haspopup': true,
|
|
353
324
|
'aria-expanded': showingAutocomplete,
|
|
354
325
|
};
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
326
|
+
const cloneElement = (element, props) => react_2.jsx(element.type, {
|
|
327
|
+
...element.props,
|
|
328
|
+
...props,
|
|
329
|
+
});
|
|
330
|
+
return cloneElement(inputElement, { ...inputElement.props, ...newTextInputProps });
|
|
359
331
|
};
|
|
360
|
-
return (react_1.default.createElement(Container,
|
|
332
|
+
return (react_1.default.createElement(Container, Object.assign({ grow: grow }, elemProps),
|
|
361
333
|
react_1.default.createElement(InputContainer, { ref: comboboxRef },
|
|
362
334
|
isValidSingleChild(children) && react_1.default.Children.map(children, renderChildren),
|
|
363
335
|
showClearButton && (react_1.default.createElement(ResetButton, { shouldShow: !!value, "aria-label": clearButtonAriaLabel, icon: canvas_system_icons_web_1.xSmallIcon, variant: clearButtonVariant, onClick: resetSearchInput, onBlur: handleBlur, size: "small", type: "button" })),
|
|
@@ -23,20 +23,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Status = void 0;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
react_1.useEffect(function () {
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
27
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
28
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
29
|
+
const Container = styled_1.default('div')(common_1.accessibleHide);
|
|
30
|
+
const Status = ({ ariaLive = 'polite', role = 'status', ariaRelevant = 'additions', expireMilliseconds = 500, announcementText = '', ariaAtomic, }) => {
|
|
31
|
+
const [displayText, setDisplayText] = react_1.useState(announcementText);
|
|
32
|
+
react_1.useEffect(() => {
|
|
34
33
|
if (!announcementText) {
|
|
35
34
|
return;
|
|
36
35
|
}
|
|
37
36
|
setDisplayText(announcementText);
|
|
38
|
-
|
|
39
|
-
return
|
|
37
|
+
const clearText = setTimeout(() => setDisplayText(''), expireMilliseconds);
|
|
38
|
+
return () => {
|
|
40
39
|
clearTimeout(clearText);
|
|
41
40
|
};
|
|
42
41
|
}, [announcementText, expireMilliseconds]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from '@workday/canvas-kit-react/tokens';
|
|
2
2
|
export declare type ComponentStyles = Record<string, CSSProperties>;
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated Now that IE11 is no longer supported, we encourage consumers to use [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties)
|
|
5
|
+
*
|
|
6
|
+
*
|
|
4
7
|
* A helpful hook for supporting bidirectional styles.
|
|
5
8
|
* * Read below for more detail or [view the docs](https://github.com/Workday/canvas-kit/blob/master/modules/labs-react/common/README.md#useThemeRTL).
|
|
6
9
|
*
|