@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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { Box } from '@workday/canvas-kit-react/layout';
|
|
4
|
+
export interface ExpandableTitleProps extends ExtractProps<typeof Box, never> {
|
|
3
5
|
/**
|
|
4
6
|
* Children of the `Expandable.Title`. This should contain a string for the title
|
|
5
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableTitle.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpandableTitle.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,GAAG,EAAC,MAAM,kCAAkC,CAAC;AAGrD,MAAM,WAAW,oBAAqB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC;IAC3E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,eAAe,0FAkB1B,CAAC"}
|
|
@@ -1,39 +1,16 @@
|
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
4
|
};
|
|
27
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
6
|
exports.ExpandableTitle = void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
9
|
+
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
10
|
+
const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
33
11
|
exports.ExpandableTitle = common_1.createComponent('div')({
|
|
34
12
|
displayName: 'Expandable.Title',
|
|
35
|
-
Component:
|
|
36
|
-
|
|
37
|
-
return (react_1.default.createElement(layout_1.Box, __assign({ as: Element, ref: ref, padding: "2px " + tokens_1.space.zero + " 2px", color: tokens_1.colors.blackPepper400, style: __assign(__assign({}, tokens_1.type.levels.body.medium), { fontWeight: tokens_1.type.properties.fontWeights.bold, textAlign: 'left' }) }, elemProps), children));
|
|
13
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
14
|
+
return (react_1.default.createElement(layout_1.Box, Object.assign({ as: Element, ref: ref }, tokens_1.type.levels.body.medium, { fontWeight: tokens_1.type.properties.fontWeights.bold, color: tokens_1.colors.blackPepper400, padding: `2px ${tokens_1.space.zero} 2px`, textAlign: "left" }, elemProps), children));
|
|
38
15
|
},
|
|
39
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
@@ -12,4 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./useExpandableContent"), exports);
|
|
14
14
|
__exportStar(require("./useExpandableIcon"), exports);
|
|
15
|
+
__exportStar(require("./useExpandableModel"), exports);
|
|
15
16
|
__exportStar(require("./useExpandableTarget"), exports);
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
export declare const useExpandableContent: <
|
|
1
|
+
export declare const useExpandableContent: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
2
2
|
state: {
|
|
3
3
|
id: string;
|
|
4
|
-
visibility:
|
|
4
|
+
visibility: "hidden" | "visible";
|
|
5
5
|
};
|
|
6
6
|
events: {
|
|
7
7
|
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
8
8
|
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
9
9
|
};
|
|
10
|
-
},
|
|
10
|
+
}, {
|
|
11
11
|
style: {
|
|
12
12
|
display?: undefined;
|
|
13
13
|
} | {
|
|
14
14
|
display: string;
|
|
15
15
|
};
|
|
16
16
|
id: string;
|
|
17
|
-
}
|
|
18
|
-
ref: import("react").Ref<R>;
|
|
19
|
-
} : {});
|
|
17
|
+
}>;
|
|
20
18
|
//# sourceMappingURL=useExpandableContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableContent.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableContent.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"useExpandableContent.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableContent.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;EAK/B,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useExpandableContent = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.useExpandableContent = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(
|
|
7
|
-
var state = _a.state;
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
const useExpandableModel_1 = require("./useExpandableModel");
|
|
6
|
+
exports.useExpandableContent = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(({ state }) => {
|
|
8
7
|
return {
|
|
9
8
|
style: state.visibility !== 'hidden' ? {} : { display: 'none' },
|
|
10
9
|
id: state.id,
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
export declare const useExpandableIcon: <
|
|
1
|
+
export declare const useExpandableIcon: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
2
2
|
state: {
|
|
3
3
|
id: string;
|
|
4
|
-
visibility:
|
|
4
|
+
visibility: "hidden" | "visible";
|
|
5
5
|
};
|
|
6
6
|
events: {
|
|
7
7
|
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
8
8
|
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
9
9
|
};
|
|
10
|
-
},
|
|
10
|
+
}, {
|
|
11
11
|
visible: boolean;
|
|
12
|
-
}
|
|
13
|
-
ref: import("react").Ref<R>;
|
|
14
|
-
} : {});
|
|
12
|
+
}>;
|
|
15
13
|
//# sourceMappingURL=useExpandableIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableIcon.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableIcon.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"useExpandableIcon.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableIcon.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;;;;;;EAI5B,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useExpandableIcon = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.useExpandableIcon = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(
|
|
7
|
-
var state = _a.state;
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
const useExpandableModel_1 = require("./useExpandableModel");
|
|
6
|
+
exports.useExpandableIcon = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(({ state }) => {
|
|
8
7
|
return {
|
|
9
8
|
visible: state.visibility !== 'hidden',
|
|
10
9
|
};
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ExpandableModel` extends the `DisclosureModel`
|
|
3
|
+
*/
|
|
1
4
|
export declare const useExpandableModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
2
5
|
id: string;
|
|
3
6
|
initialVisibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
4
7
|
}> & {
|
|
5
8
|
onShow?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
6
9
|
id: string;
|
|
7
|
-
visibility:
|
|
10
|
+
visibility: "hidden" | "visible";
|
|
8
11
|
}) => void) | undefined;
|
|
9
12
|
onHide?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
10
13
|
id: string;
|
|
11
|
-
visibility:
|
|
14
|
+
visibility: "hidden" | "visible";
|
|
12
15
|
}) => void) | undefined;
|
|
13
16
|
} & {
|
|
14
17
|
shouldShow?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, state: {
|
|
15
18
|
id: string;
|
|
16
|
-
visibility:
|
|
19
|
+
visibility: "hidden" | "visible";
|
|
17
20
|
}) => boolean) | undefined;
|
|
18
21
|
shouldHide?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, state: {
|
|
19
22
|
id: string;
|
|
20
|
-
visibility:
|
|
23
|
+
visibility: "hidden" | "visible";
|
|
21
24
|
}) => boolean) | undefined;
|
|
22
25
|
}) | undefined) => {
|
|
23
26
|
state: {
|
|
24
27
|
id: string;
|
|
25
|
-
visibility:
|
|
28
|
+
visibility: "hidden" | "visible";
|
|
26
29
|
};
|
|
27
30
|
events: {
|
|
28
31
|
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
@@ -33,14 +36,14 @@ export declare const useExpandableModel: (<TT_Special_Generic>(config?: (Partial
|
|
|
33
36
|
initialVisibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
34
37
|
}, {}, {
|
|
35
38
|
id: string;
|
|
36
|
-
visibility:
|
|
39
|
+
visibility: "hidden" | "visible";
|
|
37
40
|
}, {
|
|
38
41
|
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
39
42
|
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
40
43
|
}, {
|
|
41
44
|
state: {
|
|
42
45
|
id: string;
|
|
43
|
-
visibility:
|
|
46
|
+
visibility: "hidden" | "visible";
|
|
44
47
|
};
|
|
45
48
|
events: {
|
|
46
49
|
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpandableModel.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableModel.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useExpandableModel = void 0;
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
const disclosure_1 = require("@workday/canvas-kit-react/disclosure");
|
|
6
|
+
/**
|
|
7
|
+
* The `ExpandableModel` extends the `DisclosureModel`
|
|
8
|
+
*/
|
|
9
|
+
exports.useExpandableModel = common_1.createModelHook({
|
|
10
|
+
defaultConfig: {
|
|
11
|
+
...disclosure_1.useDisclosureModel.defaultConfig,
|
|
12
|
+
},
|
|
13
|
+
})(config => {
|
|
14
|
+
const disclosure = disclosure_1.useDisclosureModel(config);
|
|
15
|
+
const state = {
|
|
16
|
+
...disclosure.state,
|
|
17
|
+
};
|
|
18
|
+
const events = {
|
|
19
|
+
...disclosure.events,
|
|
20
|
+
};
|
|
21
|
+
return { state, events };
|
|
22
|
+
});
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
export declare const useExpandableTarget: <
|
|
1
|
+
export declare const useExpandableTarget: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
2
2
|
state: {
|
|
3
3
|
id: string;
|
|
4
|
-
visibility:
|
|
4
|
+
visibility: "hidden" | "visible";
|
|
5
5
|
};
|
|
6
6
|
events: {
|
|
7
7
|
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
8
8
|
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
9
9
|
};
|
|
10
|
-
},
|
|
10
|
+
}, {
|
|
11
11
|
'aria-controls': string;
|
|
12
12
|
'aria-expanded': boolean;
|
|
13
13
|
onClick: (event: React.MouseEvent) => void;
|
|
14
|
-
}
|
|
15
|
-
ref: import("react").Ref<R>;
|
|
16
|
-
} : {});
|
|
14
|
+
}>;
|
|
17
15
|
//# sourceMappingURL=useExpandableTarget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableTarget.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableTarget.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;qBAIX,gBAAgB
|
|
1
|
+
{"version":3,"file":"useExpandableTarget.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableTarget.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;qBAIX,gBAAgB;EAQnC,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useExpandableTarget = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.useExpandableTarget = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(
|
|
7
|
-
var state = _a.state, events = _a.events;
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
const useExpandableModel_1 = require("./useExpandableModel");
|
|
6
|
+
exports.useExpandableTarget = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(({ state, events }) => {
|
|
8
7
|
return {
|
|
9
8
|
'aria-controls': state.id,
|
|
10
9
|
'aria-expanded': state.visibility !== 'hidden',
|
|
11
|
-
onClick:
|
|
10
|
+
onClick: (event) => {
|
|
12
11
|
if (state.visibility !== 'hidden') {
|
|
13
12
|
events.hide(event);
|
|
14
13
|
}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -11,8 +11,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./combobox"), exports);
|
|
14
|
-
__exportStar(require("./common"), exports);
|
|
15
|
-
__exportStar(require("./drawer"), exports);
|
|
16
14
|
__exportStar(require("./expandable"), exports);
|
|
17
15
|
__exportStar(require("./search-form"), exports);
|
|
18
|
-
__exportStar(require("./toast"), exports);
|
|
@@ -78,6 +78,11 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
|
|
|
78
78
|
* @default false
|
|
79
79
|
*/
|
|
80
80
|
allowEmptyStringSearch?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the `id` for the label
|
|
83
|
+
* @default unique identifier
|
|
84
|
+
*/
|
|
85
|
+
labelId?: string;
|
|
81
86
|
}
|
|
82
87
|
export interface SearchFormState {
|
|
83
88
|
showForm: boolean;
|
|
@@ -88,7 +93,7 @@ export declare class SearchForm extends React.Component<SearchFormProps, SearchF
|
|
|
88
93
|
static Theme: typeof SearchTheme;
|
|
89
94
|
private inputRef;
|
|
90
95
|
private openRef;
|
|
91
|
-
private
|
|
96
|
+
private defaultLabelId;
|
|
92
97
|
state: Readonly<SearchFormState>;
|
|
93
98
|
private getTheme;
|
|
94
99
|
private getThemeColors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../../search-form/lib/SearchForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,cAAc,EAA2B,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAAiB,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AAKrF,OAAO,EAAe,WAAW,EAAE,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAG1E,MAAM,WAAW,eAAgB,SAAQ,cAAc,EAAE,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC;IAChG;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAC3D;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IAC9C;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,qBAAqB,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CA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