@workday/canvas-kit-labs-react 8.5.0-339-next.0 → 8.5.0-342-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/dist/commonjs/combobox/lib/AutocompleteList.js +5 -7
- package/dist/commonjs/common/lib/theming/useThemeRTL.js +5 -7
- package/dist/commonjs/drawer/lib/Drawer.js +2 -0
- package/dist/commonjs/drawer/lib/DrawerHeader.js +3 -1
- 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 +36 -2
- package/dist/commonjs/expandable/lib/ExpandableContent.d.ts +1 -1
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts +1 -1
- 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/hooks/useExpandableContent.d.ts +2 -2
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts +2 -2
- package/dist/commonjs/expandable/lib/hooks/useExpandableModel.d.ts +10 -7
- package/dist/commonjs/expandable/lib/hooks/useExpandableModel.d.ts.map +1 -1
- package/dist/commonjs/expandable/lib/hooks/useExpandableModel.js +3 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts +2 -2
- package/dist/commonjs/search-form/lib/SearchForm.js +2 -0
- package/dist/commonjs/toast/lib/Toast.d.ts +39 -1
- package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.js +39 -1
- package/dist/es6/combobox/lib/AutocompleteList.js +5 -7
- package/dist/es6/common/lib/theming/useThemeRTL.js +5 -7
- package/dist/es6/drawer/lib/Drawer.js +2 -0
- package/dist/es6/drawer/lib/DrawerHeader.js +3 -1
- 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 +36 -2
- package/dist/es6/expandable/lib/ExpandableContent.d.ts +1 -1
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts +1 -1
- 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/hooks/useExpandableContent.d.ts +2 -2
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts +2 -2
- package/dist/es6/expandable/lib/hooks/useExpandableModel.d.ts +10 -7
- package/dist/es6/expandable/lib/hooks/useExpandableModel.d.ts.map +1 -1
- package/dist/es6/expandable/lib/hooks/useExpandableModel.js +3 -0
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts +2 -2
- package/dist/es6/search-form/lib/SearchForm.js +2 -0
- package/dist/es6/toast/lib/Toast.d.ts +39 -1
- package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.js +39 -1
- package/expandable/lib/Expandable.tsx +36 -2
- package/expandable/lib/hooks/useExpandableModel.tsx +3 -0
- package/package.json +3 -3
- package/toast/lib/Toast.tsx +39 -1
|
@@ -29,12 +29,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
29
|
__setModuleDefault(result, mod);
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
|
-
var
|
|
33
|
-
for (var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
r[k] = a[j];
|
|
37
|
-
return r;
|
|
32
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
33
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
34
|
+
to[j] = from[i];
|
|
35
|
+
return to;
|
|
38
36
|
};
|
|
39
37
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
38
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -64,7 +62,7 @@ var AutocompleteList = function (_a) {
|
|
|
64
62
|
'aria-labelledby': labelId,
|
|
65
63
|
};
|
|
66
64
|
var createListItem = function (listboxItem, itemIndex, groupMessage) {
|
|
67
|
-
var children =
|
|
65
|
+
var children = __spreadArray([
|
|
68
66
|
react_1.default.createElement(AccessibleHide, { key: "group-message-" + itemIndex }, groupMessage)
|
|
69
67
|
], react_1.default.Children.toArray(listboxItem.props.children));
|
|
70
68
|
return (react_1.default.createElement(react_1.Fragment, { key: itemIndex }, react_1.default.cloneElement(listboxItem, {
|
|
@@ -10,12 +10,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
r[k] = a[j];
|
|
18
|
-
return r;
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
14
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
15
|
+
to[j] = from[i];
|
|
16
|
+
return to;
|
|
19
17
|
};
|
|
20
18
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
19
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -74,7 +72,7 @@ function useThemeRTL() {
|
|
|
74
72
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
75
73
|
cssObject[_i] = arguments[_i];
|
|
76
74
|
}
|
|
77
|
-
var styles = getDirectionalStyles.apply(void 0,
|
|
75
|
+
var styles = getDirectionalStyles.apply(void 0, __spreadArray([direction], cssObject));
|
|
78
76
|
return styles.reduce(function (first, second) {
|
|
79
77
|
var convertedFirst = getConvertedStyles(first, convertFunc);
|
|
80
78
|
var convertedSecond = getConvertedStyles(second, convertFunc);
|
|
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -83,7 +85,7 @@ var HeaderContainer = styled_1.default('div')({
|
|
|
83
85
|
});
|
|
84
86
|
});
|
|
85
87
|
var CloseButton = styled_1.default(button_1.TertiaryButton)({
|
|
86
|
-
margin: '-8px',
|
|
88
|
+
margin: '-8px', // for inverse and plain button, we always want this margin
|
|
87
89
|
});
|
|
88
90
|
/**
|
|
89
91
|
* ### Deprecated Drawer Header
|
|
@@ -8,68 +8,101 @@ export interface ExpandableProps extends ExtractProps<typeof Flex, never> {
|
|
|
8
8
|
*/
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* `Expandable` wraps an `Expandable.Target` and an `Expandable.Content`. By default, it provides a
|
|
13
|
+
* `DisclosureModel` for its subcomponents. Alternatively, a model may be passed in using the
|
|
14
|
+
* hoisted model pattern.
|
|
15
|
+
*/
|
|
11
16
|
export declare const Expandable: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ExpandableProps & Partial<{
|
|
12
17
|
id: string;
|
|
13
18
|
initialVisibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
14
19
|
}> & {
|
|
15
20
|
onShow?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
16
21
|
id: string;
|
|
17
|
-
visibility:
|
|
22
|
+
visibility: "hidden" | "visible";
|
|
18
23
|
}) => void) | undefined;
|
|
19
24
|
onHide?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
20
25
|
id: string;
|
|
21
|
-
visibility:
|
|
26
|
+
visibility: "hidden" | "visible";
|
|
22
27
|
}) => void) | undefined;
|
|
23
28
|
} & {
|
|
24
29
|
shouldShow?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, state: {
|
|
25
30
|
id: string;
|
|
26
|
-
visibility:
|
|
31
|
+
visibility: "hidden" | "visible";
|
|
27
32
|
}) => boolean) | undefined;
|
|
28
33
|
shouldHide?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, state: {
|
|
29
34
|
id: string;
|
|
30
|
-
visibility:
|
|
35
|
+
visibility: "hidden" | "visible";
|
|
31
36
|
}) => boolean) | undefined;
|
|
32
37
|
}, {
|
|
33
38
|
state: {
|
|
34
39
|
id: string;
|
|
35
|
-
visibility:
|
|
40
|
+
visibility: "hidden" | "visible";
|
|
36
41
|
};
|
|
37
42
|
events: {
|
|
38
43
|
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
39
44
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
40
45
|
};
|
|
41
46
|
}> & {
|
|
47
|
+
/**
|
|
48
|
+
* `Expandable.Target` creates a heading and a button. The heading is a semantic heading to
|
|
49
|
+
* describe the associated content. The button provides users the ability to toggle the
|
|
50
|
+
* associated content.
|
|
51
|
+
*
|
|
52
|
+
* As according to the [W3 disclosure
|
|
53
|
+
* specification](https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure), the button has
|
|
54
|
+
* `aria-expanded` and `aria-controls` attributes set by default
|
|
55
|
+
*
|
|
56
|
+
* This component should hold an `Expandable.Icon`, an optional `Expandable.Avatar`, and an
|
|
57
|
+
* `Expandable.Title`.
|
|
58
|
+
*/
|
|
42
59
|
Target: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./ExpandableTarget").ExpandableTargetProps, {
|
|
43
60
|
state: {
|
|
44
61
|
id: string;
|
|
45
|
-
visibility:
|
|
62
|
+
visibility: "hidden" | "visible";
|
|
46
63
|
};
|
|
47
64
|
events: {
|
|
48
65
|
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
49
66
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
50
67
|
};
|
|
51
68
|
}>;
|
|
52
|
-
|
|
69
|
+
/**
|
|
70
|
+
* `Expandable.Title` styles the target text that describes the content.
|
|
71
|
+
*/
|
|
72
|
+
Title: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./ExpandableTitle").ExpandableTitleProps>;
|
|
73
|
+
/**
|
|
74
|
+
* `Expandable.Icon` creates an icon to visually indicate the state of the content. It takes an
|
|
75
|
+
* `iconPosition` prop to determine which chevron icon to use.
|
|
76
|
+
*/
|
|
77
|
+
Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./ExpandableIcon").ExpandableIconProps, {
|
|
53
78
|
state: {
|
|
54
79
|
id: string;
|
|
55
|
-
visibility:
|
|
80
|
+
visibility: "hidden" | "visible";
|
|
56
81
|
};
|
|
57
82
|
events: {
|
|
58
83
|
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
59
84
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
60
85
|
};
|
|
61
86
|
}>;
|
|
62
|
-
|
|
87
|
+
/**
|
|
88
|
+
* `Expandable.Avatar` is an optional component that creates an `Avatar` to display a decorative
|
|
89
|
+
* image.
|
|
90
|
+
*/
|
|
91
|
+
Avatar: import("@workday/canvas-kit-react/common").ElementComponent<"button", import("./ExpandableAvatar").ExpandableAvatarProps>;
|
|
92
|
+
/**
|
|
93
|
+
* `Expandable.Content` holds the content that will be conditionally expanded and collapsed. It
|
|
94
|
+
* has an `id` to ensure the `Expandable.Target` properly set it to the `aria-controls`
|
|
95
|
+
* attribute.
|
|
96
|
+
*/
|
|
97
|
+
Content: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./ExpandableContent").ExpandableContentProps, {
|
|
63
98
|
state: {
|
|
64
99
|
id: string;
|
|
65
|
-
visibility:
|
|
100
|
+
visibility: "hidden" | "visible";
|
|
66
101
|
};
|
|
67
102
|
events: {
|
|
68
103
|
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
69
104
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
70
105
|
};
|
|
71
106
|
}>;
|
|
72
|
-
Avatar: import("@workday/canvas-kit-react/common").ElementComponent<"button", import("./ExpandableAvatar").ExpandableAvatarProps>;
|
|
73
|
-
Title: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./ExpandableTitle").ExpandableTitleProps>;
|
|
74
107
|
};
|
|
75
108
|
//# sourceMappingURL=Expandable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expandable.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/Expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAStD,MAAM,WAAW,eAAgB,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IACvE;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"Expandable.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/Expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAStD,MAAM,WAAW,eAAgB,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IACvE;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAInB;;;;;;;;;;;OAWG;;;;;;;;;;;IAEH;;OAEG;;IAEH;;;OAGG;;;;;;;;;;;IAEH;;;OAGG;;IAEH;;;;OAIG;;;;;;;;;;;CAOL,CAAC"}
|
|
@@ -35,14 +35,48 @@ var ExpandableIcon_1 = require("./ExpandableIcon");
|
|
|
35
35
|
var ExpandableTitle_1 = require("./ExpandableTitle");
|
|
36
36
|
var ExpandableAvatar_1 = require("./ExpandableAvatar");
|
|
37
37
|
var useExpandableModel_1 = require("./hooks/useExpandableModel");
|
|
38
|
+
/**
|
|
39
|
+
* `Expandable` wraps an `Expandable.Target` and an `Expandable.Content`. By default, it provides a
|
|
40
|
+
* `DisclosureModel` for its subcomponents. Alternatively, a model may be passed in using the
|
|
41
|
+
* hoisted model pattern.
|
|
42
|
+
*/
|
|
38
43
|
exports.Expandable = common_1.createContainer('div')({
|
|
44
|
+
displayName: 'Expandable',
|
|
39
45
|
modelHook: useExpandableModel_1.useExpandableModel,
|
|
40
46
|
subComponents: {
|
|
47
|
+
/**
|
|
48
|
+
* `Expandable.Target` creates a heading and a button. The heading is a semantic heading to
|
|
49
|
+
* describe the associated content. The button provides users the ability to toggle the
|
|
50
|
+
* associated content.
|
|
51
|
+
*
|
|
52
|
+
* As according to the [W3 disclosure
|
|
53
|
+
* specification](https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure), the button has
|
|
54
|
+
* `aria-expanded` and `aria-controls` attributes set by default
|
|
55
|
+
*
|
|
56
|
+
* This component should hold an `Expandable.Icon`, an optional `Expandable.Avatar`, and an
|
|
57
|
+
* `Expandable.Title`.
|
|
58
|
+
*/
|
|
41
59
|
Target: ExpandableTarget_1.ExpandableTarget,
|
|
42
|
-
|
|
60
|
+
/**
|
|
61
|
+
* `Expandable.Title` styles the target text that describes the content.
|
|
62
|
+
*/
|
|
63
|
+
Title: ExpandableTitle_1.ExpandableTitle,
|
|
64
|
+
/**
|
|
65
|
+
* `Expandable.Icon` creates an icon to visually indicate the state of the content. It takes an
|
|
66
|
+
* `iconPosition` prop to determine which chevron icon to use.
|
|
67
|
+
*/
|
|
43
68
|
Icon: ExpandableIcon_1.ExpandableIcon,
|
|
69
|
+
/**
|
|
70
|
+
* `Expandable.Avatar` is an optional component that creates an `Avatar` to display a decorative
|
|
71
|
+
* image.
|
|
72
|
+
*/
|
|
44
73
|
Avatar: ExpandableAvatar_1.ExpandableAvatar,
|
|
45
|
-
|
|
74
|
+
/**
|
|
75
|
+
* `Expandable.Content` holds the content that will be conditionally expanded and collapsed. It
|
|
76
|
+
* has an `id` to ensure the `Expandable.Target` properly set it to the `aria-controls`
|
|
77
|
+
* attribute.
|
|
78
|
+
*/
|
|
79
|
+
Content: ExpandableContent_1.ExpandableContent,
|
|
46
80
|
},
|
|
47
81
|
})(function (_a, Element) {
|
|
48
82
|
var children = _a.children, elementProps = __rest(_a, ["children"]);
|
|
@@ -11,7 +11,7 @@ export interface ExpandableContentProps extends ExtractProps<typeof Box, never>
|
|
|
11
11
|
export declare const ExpandableContent: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ExpandableContentProps, {
|
|
12
12
|
state: {
|
|
13
13
|
id: string;
|
|
14
|
-
visibility:
|
|
14
|
+
visibility: "hidden" | "visible";
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
17
17
|
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
@@ -19,7 +19,7 @@ export interface ExpandableIconProps extends Omit<ExtractProps<typeof SystemIcon
|
|
|
19
19
|
export declare const ExpandableIcon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", ExpandableIconProps, {
|
|
20
20
|
state: {
|
|
21
21
|
id: string;
|
|
22
|
-
visibility:
|
|
22
|
+
visibility: "hidden" | "visible";
|
|
23
23
|
};
|
|
24
24
|
events: {
|
|
25
25
|
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
@@ -18,8 +18,13 @@ export interface ExpandableTargetProps extends ExtractProps<typeof Flex, never>
|
|
|
18
18
|
export declare const ExpandableTarget: import("@workday/canvas-kit-react/common").ElementComponentM<"button", ExpandableTargetProps, {
|
|
19
19
|
state: {
|
|
20
20
|
id: string;
|
|
21
|
-
visibility:
|
|
22
|
-
};
|
|
21
|
+
visibility: "hidden" | "visible";
|
|
22
|
+
}; /**
|
|
23
|
+
* Children of the `Expandable.Target`. Should contain `Target.Title`, an optional `Target.Avatar`
|
|
24
|
+
* and `Target.Icon` with an `iconPosition` prop that takes a value of either `start` or `end`.
|
|
25
|
+
* `Target.Icon` with `start` is meant to be placed before the `Target.Title` and `Target.Icon`
|
|
26
|
+
* `end` should be placed after.
|
|
27
|
+
*/
|
|
23
28
|
events: {
|
|
24
29
|
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
25
30
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableTarget.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableTarget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAMtD,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IAC7E;;;;;OAKG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACxD;AAiBD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"ExpandableTarget.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableTarget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAMtD,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IAC7E;;;;;OAKG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACxD;AAiBD,eAAO,MAAM,gBAAgB;;;;OA7B3B;;;;;OAKG;;;;;EA4CH,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const useExpandableContent: <P extends {}, R>(model: {
|
|
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
|
-
}, elemProps?: P | undefined, ref?:
|
|
10
|
+
}, elemProps?: P | undefined, ref?: import("react").Ref<R> | undefined) => {
|
|
11
11
|
style: {
|
|
12
12
|
display?: undefined;
|
|
13
13
|
} | {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const useExpandableIcon: <P extends {}, R>(model: {
|
|
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
|
-
}, elemProps?: P | undefined, ref?:
|
|
10
|
+
}, elemProps?: P | undefined, ref?: import("react").Ref<R> | undefined) => {
|
|
11
11
|
visible: boolean;
|
|
12
12
|
} & P & (R extends HTMLOrSVGElement ? {
|
|
13
13
|
ref: import("react").Ref<R>;
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableModel.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableModel.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"useExpandableModel.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableModel.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC"}
|
|
@@ -14,6 +14,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.useExpandableModel = void 0;
|
|
15
15
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
16
16
|
var disclosure_1 = require("@workday/canvas-kit-react/disclosure");
|
|
17
|
+
/**
|
|
18
|
+
* The `ExpandableModel` extends the `DisclosureModel`
|
|
19
|
+
*/
|
|
17
20
|
exports.useExpandableModel = common_1.createModelHook({
|
|
18
21
|
defaultConfig: __assign({}, disclosure_1.useDisclosureModel.defaultConfig),
|
|
19
22
|
})(function (config) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const useExpandableTarget: <P extends {}, R>(model: {
|
|
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
|
-
}, elemProps?: P | undefined, ref?:
|
|
10
|
+
}, elemProps?: P | undefined, ref?: import("react").Ref<R> | undefined) => {
|
|
11
11
|
'aria-controls': string;
|
|
12
12
|
'aria-expanded': boolean;
|
|
13
13
|
onClick: (event: React.MouseEvent) => void;
|
|
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -2,6 +2,13 @@ import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
|
2
2
|
import { Popup } from '@workday/canvas-kit-react/popup';
|
|
3
3
|
export interface ToastProps extends Omit<ExtractProps<typeof Popup.Card, never>, 'model'> {
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* `Toast` defines a container for all `Toast` subcomponents. `Toast` will render with the appropriate
|
|
7
|
+
* ARIA attributes based on which `mode` is selected. It also accepts a `model` if you wish to provide
|
|
8
|
+
* a specific `id`.
|
|
9
|
+
*
|
|
10
|
+
* `Toast` renders a {@link PopupCard Popup.Card} under the hood.
|
|
11
|
+
*/
|
|
5
12
|
export declare const Toast: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ToastProps & Partial<{
|
|
6
13
|
mode: import("./hooks/useToastModel").AriaRoleMode;
|
|
7
14
|
id: string;
|
|
@@ -12,9 +19,28 @@ export declare const Toast: import("@workday/canvas-kit-react/common").ElementCo
|
|
|
12
19
|
};
|
|
13
20
|
events: {};
|
|
14
21
|
}> & {
|
|
22
|
+
/**
|
|
23
|
+
* `Toast.Body` defines a container for the contents of the `Toast`, including
|
|
24
|
+
* {@link ToastMessage Toast.Message} and {@link ToastLink Toast.Link}.
|
|
25
|
+
*
|
|
26
|
+
* `Toast.Body` renders a {@link PopupBody Popup.Body} under the hood.
|
|
27
|
+
*/
|
|
15
28
|
Body: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./ToastBody").ToastBodyProps>;
|
|
16
|
-
|
|
29
|
+
/**
|
|
30
|
+
* `Toast.Icon` renders a decorative icon for the `Toast`. When using `Toast.Icon`, be sure to
|
|
31
|
+
* set a complementary `mode` to the `Toast`. For example, if the icon conveys an error, set the
|
|
32
|
+
* `mode` to `'alert'`.
|
|
33
|
+
*
|
|
34
|
+
* `Toast.Icon` renders a {@link SystemIcon} under the hood.
|
|
35
|
+
*/
|
|
17
36
|
Icon: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./ToastIcon").ToastIconProps>;
|
|
37
|
+
/**
|
|
38
|
+
* `Toast.Message` defines a container for the message of the `Toast`. It accepts any
|
|
39
|
+
* {@link React.ReactNode} as its children. `Toast.Message` is assigned a unique `id` so that it
|
|
40
|
+
* may be read aloud by screen readers when the `Toast` `mode` is set to `dialog`.
|
|
41
|
+
*
|
|
42
|
+
* `Toast.Message` renders a {@link Box} under the hood.
|
|
43
|
+
*/
|
|
18
44
|
Message: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./ToastMessage").ToastMessageProps, {
|
|
19
45
|
state: {
|
|
20
46
|
id: string;
|
|
@@ -22,6 +48,18 @@ export declare const Toast: import("@workday/canvas-kit-react/common").ElementCo
|
|
|
22
48
|
};
|
|
23
49
|
events: {};
|
|
24
50
|
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Use `Toast.Link` to provide an action in the `Toast`. `Toast.Link` should always be used in
|
|
53
|
+
* conjunction with `dialog` `mode` to provide an accessible experience.
|
|
54
|
+
*
|
|
55
|
+
* `Toast.Link` renders a {@link Hyperlink} under the hood.
|
|
56
|
+
*/
|
|
25
57
|
Link: import("@workday/canvas-kit-react/common").ElementComponent<"a", import("./ToastLink").ToastLinkProps>;
|
|
58
|
+
/**
|
|
59
|
+
* Use `Toast.CloseIcon` to provide a close button to dismiss the `Toast`.
|
|
60
|
+
*
|
|
61
|
+
* `Toast.Link` renders a {@link PopupCloseIcon Popup.CloseIcon} under the hood.
|
|
62
|
+
*/
|
|
63
|
+
CloseIcon: import("@workday/canvas-kit-react/common").ElementComponent<"button", import("./ToastCloseIcon").ToastCloseIconProps>;
|
|
26
64
|
};
|
|
27
65
|
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAStD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC;CAAG;AAE5F,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAStD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC;CAAG;AAE5F;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;IAId;;;;;OAKG;;IAEH;;;;;;OAMG;;IAEH;;;;;;OAMG;;;;;;;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;CAwCL,CAAC"}
|
|
@@ -36,15 +36,53 @@ var ToastMessage_1 = require("./ToastMessage");
|
|
|
36
36
|
var ToastLink_1 = require("./ToastLink");
|
|
37
37
|
var ToastBody_1 = require("./ToastBody");
|
|
38
38
|
var useToastModel_1 = require("./hooks/useToastModel");
|
|
39
|
+
/**
|
|
40
|
+
* `Toast` defines a container for all `Toast` subcomponents. `Toast` will render with the appropriate
|
|
41
|
+
* ARIA attributes based on which `mode` is selected. It also accepts a `model` if you wish to provide
|
|
42
|
+
* a specific `id`.
|
|
43
|
+
*
|
|
44
|
+
* `Toast` renders a {@link PopupCard Popup.Card} under the hood.
|
|
45
|
+
*/
|
|
39
46
|
exports.Toast = common_1.createContainer('div')({
|
|
40
47
|
displayName: 'Toast',
|
|
41
48
|
modelHook: useToastModel_1.useToastModel,
|
|
42
49
|
subComponents: {
|
|
50
|
+
/**
|
|
51
|
+
* `Toast.Body` defines a container for the contents of the `Toast`, including
|
|
52
|
+
* {@link ToastMessage Toast.Message} and {@link ToastLink Toast.Link}.
|
|
53
|
+
*
|
|
54
|
+
* `Toast.Body` renders a {@link PopupBody Popup.Body} under the hood.
|
|
55
|
+
*/
|
|
43
56
|
Body: ToastBody_1.ToastBody,
|
|
44
|
-
|
|
57
|
+
/**
|
|
58
|
+
* `Toast.Icon` renders a decorative icon for the `Toast`. When using `Toast.Icon`, be sure to
|
|
59
|
+
* set a complementary `mode` to the `Toast`. For example, if the icon conveys an error, set the
|
|
60
|
+
* `mode` to `'alert'`.
|
|
61
|
+
*
|
|
62
|
+
* `Toast.Icon` renders a {@link SystemIcon} under the hood.
|
|
63
|
+
*/
|
|
45
64
|
Icon: ToastIcon_1.ToastIcon,
|
|
65
|
+
/**
|
|
66
|
+
* `Toast.Message` defines a container for the message of the `Toast`. It accepts any
|
|
67
|
+
* {@link React.ReactNode} as its children. `Toast.Message` is assigned a unique `id` so that it
|
|
68
|
+
* may be read aloud by screen readers when the `Toast` `mode` is set to `dialog`.
|
|
69
|
+
*
|
|
70
|
+
* `Toast.Message` renders a {@link Box} under the hood.
|
|
71
|
+
*/
|
|
46
72
|
Message: ToastMessage_1.ToastMessage,
|
|
73
|
+
/**
|
|
74
|
+
* Use `Toast.Link` to provide an action in the `Toast`. `Toast.Link` should always be used in
|
|
75
|
+
* conjunction with `dialog` `mode` to provide an accessible experience.
|
|
76
|
+
*
|
|
77
|
+
* `Toast.Link` renders a {@link Hyperlink} under the hood.
|
|
78
|
+
*/
|
|
47
79
|
Link: ToastLink_1.ToastLink,
|
|
80
|
+
/**
|
|
81
|
+
* Use `Toast.CloseIcon` to provide a close button to dismiss the `Toast`.
|
|
82
|
+
*
|
|
83
|
+
* `Toast.Link` renders a {@link PopupCloseIcon Popup.CloseIcon} under the hood.
|
|
84
|
+
*/
|
|
85
|
+
CloseIcon: ToastCloseIcon_1.ToastCloseIcon,
|
|
48
86
|
},
|
|
49
87
|
})(function (_a, Element, model) {
|
|
50
88
|
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
@@ -9,12 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
for (var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
r[k] = a[j];
|
|
17
|
-
return r;
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
14
|
+
to[j] = from[i];
|
|
15
|
+
return to;
|
|
18
16
|
};
|
|
19
17
|
import React, { Fragment, useState } from 'react';
|
|
20
18
|
import styled from '@emotion/styled';
|
|
@@ -39,7 +37,7 @@ export var AutocompleteList = function (_a) {
|
|
|
39
37
|
'aria-labelledby': labelId,
|
|
40
38
|
};
|
|
41
39
|
var createListItem = function (listboxItem, itemIndex, groupMessage) {
|
|
42
|
-
var children =
|
|
40
|
+
var children = __spreadArray([
|
|
43
41
|
React.createElement(AccessibleHide, { key: "group-message-" + itemIndex }, groupMessage)
|
|
44
42
|
], React.Children.toArray(listboxItem.props.children));
|
|
45
43
|
return (React.createElement(Fragment, { key: itemIndex }, React.cloneElement(listboxItem, {
|
|
@@ -9,12 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
for (var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
r[k] = a[j];
|
|
17
|
-
return r;
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
14
|
+
to[j] = from[i];
|
|
15
|
+
return to;
|
|
18
16
|
};
|
|
19
17
|
import { useIsRTL, useTheme } from '@workday/canvas-kit-react/common';
|
|
20
18
|
import { useMemo } from 'react';
|
|
@@ -68,7 +66,7 @@ export function useThemeRTL() {
|
|
|
68
66
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
69
67
|
cssObject[_i] = arguments[_i];
|
|
70
68
|
}
|
|
71
|
-
var styles = getDirectionalStyles.apply(void 0,
|
|
69
|
+
var styles = getDirectionalStyles.apply(void 0, __spreadArray([direction], cssObject));
|
|
72
70
|
return styles.reduce(function (first, second) {
|
|
73
71
|
var convertedFirst = getConvertedStyles(first, convertFunc);
|
|
74
72
|
var convertedSecond = getConvertedStyles(second, convertFunc);
|
|
@@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|