@workday/canvas-kit-labs-react 8.0.0-alpha.166-next.1 → 8.0.0-alpha.167-next.0
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/index.d.ts +0 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -1
- package/dist/es6/index.d.ts +0 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +0 -1
- package/index.ts +0 -1
- package/package.json +3 -4
- package/dist/commonjs/expandable/index.d.ts +0 -3
- package/dist/commonjs/expandable/index.d.ts.map +0 -1
- package/dist/commonjs/expandable/index.js +0 -14
- package/dist/commonjs/expandable/lib/Expandable.d.ts +0 -86
- package/dist/commonjs/expandable/lib/Expandable.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/Expandable.js +0 -50
- package/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts +0 -7
- package/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/ExpandableAvatar.js +0 -42
- package/dist/commonjs/expandable/lib/ExpandableContent.d.ts +0 -19
- package/dist/commonjs/expandable/lib/ExpandableContent.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/ExpandableContent.js +0 -41
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts +0 -29
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/ExpandableIcon.js +0 -62
- package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts +0 -28
- package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/ExpandableTarget.js +0 -48
- package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts +0 -9
- package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/ExpandableTitle.js +0 -39
- package/dist/commonjs/expandable/lib/hooks/index.d.ts +0 -4
- package/dist/commonjs/expandable/lib/hooks/index.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/hooks/index.js +0 -15
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts +0 -20
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.js +0 -12
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts +0 -15
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.js +0 -11
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts +0 -17
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.js +0 -20
- package/dist/commonjs/expandable/lib/useExpandableModel.d.ts +0 -50
- package/dist/commonjs/expandable/lib/useExpandableModel.d.ts.map +0 -1
- package/dist/commonjs/expandable/lib/useExpandableModel.js +0 -24
- package/dist/es6/expandable/index.d.ts +0 -3
- package/dist/es6/expandable/index.d.ts.map +0 -1
- package/dist/es6/expandable/index.js +0 -2
- package/dist/es6/expandable/lib/Expandable.d.ts +0 -86
- package/dist/es6/expandable/lib/Expandable.d.ts.map +0 -1
- package/dist/es6/expandable/lib/Expandable.js +0 -44
- package/dist/es6/expandable/lib/ExpandableAvatar.d.ts +0 -7
- package/dist/es6/expandable/lib/ExpandableAvatar.d.ts.map +0 -1
- package/dist/es6/expandable/lib/ExpandableAvatar.js +0 -39
- package/dist/es6/expandable/lib/ExpandableContent.d.ts +0 -19
- package/dist/es6/expandable/lib/ExpandableContent.d.ts.map +0 -1
- package/dist/es6/expandable/lib/ExpandableContent.js +0 -35
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts +0 -29
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts.map +0 -1
- package/dist/es6/expandable/lib/ExpandableIcon.js +0 -56
- package/dist/es6/expandable/lib/ExpandableTarget.d.ts +0 -28
- package/dist/es6/expandable/lib/ExpandableTarget.d.ts.map +0 -1
- package/dist/es6/expandable/lib/ExpandableTarget.js +0 -42
- package/dist/es6/expandable/lib/ExpandableTitle.d.ts +0 -9
- package/dist/es6/expandable/lib/ExpandableTitle.d.ts.map +0 -1
- package/dist/es6/expandable/lib/ExpandableTitle.js +0 -33
- package/dist/es6/expandable/lib/hooks/index.d.ts +0 -4
- package/dist/es6/expandable/lib/hooks/index.d.ts.map +0 -1
- package/dist/es6/expandable/lib/hooks/index.js +0 -3
- package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts +0 -20
- package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts.map +0 -1
- package/dist/es6/expandable/lib/hooks/useExpandableContent.js +0 -9
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts +0 -15
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts.map +0 -1
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.js +0 -8
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts +0 -17
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts.map +0 -1
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.js +0 -17
- package/dist/es6/expandable/lib/useExpandableModel.d.ts +0 -50
- package/dist/es6/expandable/lib/useExpandableModel.d.ts.map +0 -1
- package/dist/es6/expandable/lib/useExpandableModel.js +0 -21
- package/expandable/LICENSE +0 -52
- package/expandable/README.md +0 -11
- package/expandable/index.ts +0 -2
- package/expandable/lib/Expandable.tsx +0 -34
- package/expandable/lib/ExpandableAvatar.tsx +0 -27
- package/expandable/lib/ExpandableContent.tsx +0 -32
- package/expandable/lib/ExpandableIcon.tsx +0 -74
- package/expandable/lib/ExpandableTarget.tsx +0 -67
- package/expandable/lib/ExpandableTitle.tsx +0 -34
- package/expandable/lib/hooks/index.ts +0 -3
- package/expandable/lib/hooks/useExpandableContent.ts +0 -9
- package/expandable/lib/hooks/useExpandableIcon.ts +0 -8
- package/expandable/lib/hooks/useExpandableTarget.ts +0 -16
- package/expandable/lib/useExpandableModel.tsx +0 -17
- package/expandable/package.json +0 -6
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const useExpandableContent: <P extends {}, R>(model: {
|
|
2
|
-
state: {
|
|
3
|
-
id: string;
|
|
4
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
5
|
-
};
|
|
6
|
-
events: {
|
|
7
|
-
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
8
|
-
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
9
|
-
};
|
|
10
|
-
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
11
|
-
style: {
|
|
12
|
-
display?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
display: string;
|
|
15
|
-
};
|
|
16
|
-
id: string;
|
|
17
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
18
|
-
ref: import("react").Ref<R>;
|
|
19
|
-
} : {});
|
|
20
|
-
//# sourceMappingURL=useExpandableContent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableContent.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableContent.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;OAK/B,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useExpandableContent = void 0;
|
|
4
|
-
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
-
var useExpandableModel_1 = require("../useExpandableModel");
|
|
6
|
-
exports.useExpandableContent = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(function (_a) {
|
|
7
|
-
var state = _a.state;
|
|
8
|
-
return {
|
|
9
|
-
style: state.visibility !== 'hidden' ? {} : { display: 'none' },
|
|
10
|
-
id: state.id,
|
|
11
|
-
};
|
|
12
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const useExpandableIcon: <P extends {}, R>(model: {
|
|
2
|
-
state: {
|
|
3
|
-
id: string;
|
|
4
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
5
|
-
};
|
|
6
|
-
events: {
|
|
7
|
-
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
8
|
-
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
9
|
-
};
|
|
10
|
-
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
11
|
-
visible: boolean;
|
|
12
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
13
|
-
ref: import("react").Ref<R>;
|
|
14
|
-
} : {});
|
|
15
|
-
//# sourceMappingURL=useExpandableIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableIcon.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableIcon.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;OAI5B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useExpandableIcon = void 0;
|
|
4
|
-
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
-
var useExpandableModel_1 = require("../useExpandableModel");
|
|
6
|
-
exports.useExpandableIcon = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(function (_a) {
|
|
7
|
-
var state = _a.state;
|
|
8
|
-
return {
|
|
9
|
-
visible: state.visibility !== 'hidden',
|
|
10
|
-
};
|
|
11
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const useExpandableTarget: <P extends {}, R>(model: {
|
|
2
|
-
state: {
|
|
3
|
-
id: string;
|
|
4
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
5
|
-
};
|
|
6
|
-
events: {
|
|
7
|
-
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
8
|
-
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
9
|
-
};
|
|
10
|
-
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
11
|
-
'aria-controls': string;
|
|
12
|
-
'aria-expanded': boolean;
|
|
13
|
-
onClick: (event: React.MouseEvent) => void;
|
|
14
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
15
|
-
ref: import("react").Ref<R>;
|
|
16
|
-
} : {});
|
|
17
|
-
//# sourceMappingURL=useExpandableTarget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableTarget.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableTarget.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;qBAIX,gBAAgB;;;OAQnC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useExpandableTarget = void 0;
|
|
4
|
-
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
-
var useExpandableModel_1 = require("../useExpandableModel");
|
|
6
|
-
exports.useExpandableTarget = common_1.createElemPropsHook(useExpandableModel_1.useExpandableModel)(function (_a) {
|
|
7
|
-
var state = _a.state, events = _a.events;
|
|
8
|
-
return {
|
|
9
|
-
'aria-controls': state.id,
|
|
10
|
-
'aria-expanded': state.visibility !== 'hidden',
|
|
11
|
-
onClick: function (event) {
|
|
12
|
-
if (state.visibility !== 'hidden') {
|
|
13
|
-
events.hide(event);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
events.show(event);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export declare const useExpandableModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
2
|
-
id: string;
|
|
3
|
-
initialVisibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
4
|
-
}> & {
|
|
5
|
-
onShow?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
6
|
-
id: string;
|
|
7
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
8
|
-
}) => void) | undefined;
|
|
9
|
-
onHide?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
10
|
-
id: string;
|
|
11
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
12
|
-
}) => void) | undefined;
|
|
13
|
-
} & {
|
|
14
|
-
shouldShow?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, state: {
|
|
15
|
-
id: string;
|
|
16
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
17
|
-
}) => boolean) | undefined;
|
|
18
|
-
shouldHide?: ((data: Event | import("react").SyntheticEvent<Element, Event> | undefined, state: {
|
|
19
|
-
id: string;
|
|
20
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
21
|
-
}) => boolean) | undefined;
|
|
22
|
-
}) | undefined) => {
|
|
23
|
-
state: {
|
|
24
|
-
id: string;
|
|
25
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
26
|
-
};
|
|
27
|
-
events: {
|
|
28
|
-
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
29
|
-
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
30
|
-
};
|
|
31
|
-
}) & import("@workday/canvas-kit-react/common").ModelExtras<{
|
|
32
|
-
id: string;
|
|
33
|
-
initialVisibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
34
|
-
}, {}, {
|
|
35
|
-
id: string;
|
|
36
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
37
|
-
}, {
|
|
38
|
-
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
39
|
-
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
40
|
-
}, {
|
|
41
|
-
state: {
|
|
42
|
-
id: string;
|
|
43
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
44
|
-
};
|
|
45
|
-
events: {
|
|
46
|
-
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
47
|
-
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
48
|
-
};
|
|
49
|
-
}>;
|
|
50
|
-
//# sourceMappingURL=useExpandableModel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExpandableModel.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/useExpandableModel.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.useExpandableModel = void 0;
|
|
15
|
-
var common_1 = require("@workday/canvas-kit-react/common");
|
|
16
|
-
var disclosure_1 = require("@workday/canvas-kit-react/disclosure");
|
|
17
|
-
exports.useExpandableModel = common_1.createModelHook({
|
|
18
|
-
defaultConfig: __assign({}, disclosure_1.useDisclosureModel.defaultConfig),
|
|
19
|
-
})(function (config) {
|
|
20
|
-
var disclosure = disclosure_1.useDisclosureModel(config);
|
|
21
|
-
var state = __assign({}, disclosure.state);
|
|
22
|
-
var events = __assign({}, disclosure.events);
|
|
23
|
-
return { state: state, events: events };
|
|
24
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../expandable/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
export interface ExpandableProps extends ExtractProps<typeof Flex, never> {
|
|
5
|
-
/**
|
|
6
|
-
* The children of the `Expandable` container. This should contain `Expandable.Target` and
|
|
7
|
-
* `Expandable.Container`
|
|
8
|
-
*/
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export declare const Expandable: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ExpandableProps & Partial<{
|
|
12
|
-
id: string;
|
|
13
|
-
initialVisibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
14
|
-
}> & {
|
|
15
|
-
onShow?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
16
|
-
id: string;
|
|
17
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
18
|
-
}) => void) | undefined;
|
|
19
|
-
onHide?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, prevState: {
|
|
20
|
-
id: string;
|
|
21
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
22
|
-
}) => void) | undefined;
|
|
23
|
-
} & {
|
|
24
|
-
shouldShow?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, state: {
|
|
25
|
-
id: string;
|
|
26
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
27
|
-
}) => boolean) | undefined;
|
|
28
|
-
shouldHide?: ((data: Event | React.SyntheticEvent<Element, Event> | undefined, state: {
|
|
29
|
-
id: string;
|
|
30
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
31
|
-
}) => boolean) | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
state: {
|
|
34
|
-
id: string;
|
|
35
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
36
|
-
};
|
|
37
|
-
events: {
|
|
38
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
39
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
40
|
-
};
|
|
41
|
-
}> & {
|
|
42
|
-
Context: React.Context<{
|
|
43
|
-
state: {
|
|
44
|
-
id: string;
|
|
45
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
46
|
-
};
|
|
47
|
-
events: {
|
|
48
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
49
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
50
|
-
};
|
|
51
|
-
}>;
|
|
52
|
-
} & {
|
|
53
|
-
Target: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./ExpandableTarget").ExpandableTargetProps, {
|
|
54
|
-
state: {
|
|
55
|
-
id: string;
|
|
56
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
57
|
-
};
|
|
58
|
-
events: {
|
|
59
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
60
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
61
|
-
};
|
|
62
|
-
}>;
|
|
63
|
-
Content: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./ExpandableContent").ExpandableContentProps, {
|
|
64
|
-
state: {
|
|
65
|
-
id: string;
|
|
66
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
67
|
-
};
|
|
68
|
-
events: {
|
|
69
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
70
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
71
|
-
};
|
|
72
|
-
}>;
|
|
73
|
-
Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./ExpandableIcon").ExpandableIconProps, {
|
|
74
|
-
state: {
|
|
75
|
-
id: string;
|
|
76
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
77
|
-
};
|
|
78
|
-
events: {
|
|
79
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
80
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
81
|
-
};
|
|
82
|
-
}>;
|
|
83
|
-
Avatar: import("@workday/canvas-kit-react/common").ElementComponent<"button", import("./ExpandableAvatar").ExpandableAvatarProps>;
|
|
84
|
-
Title: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./ExpandableTitle").ExpandableTitleProps>;
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=Expandable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAO/E,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAGtD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAarB,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React from 'react';
|
|
24
|
-
import { createContainer } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import { ExpandableContent } from './ExpandableContent';
|
|
26
|
-
import { ExpandableTarget } from './ExpandableTarget';
|
|
27
|
-
import { ExpandableIcon } from './ExpandableIcon';
|
|
28
|
-
import { ExpandableTitle } from './ExpandableTitle';
|
|
29
|
-
import { ExpandableAvatar } from './ExpandableAvatar';
|
|
30
|
-
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
31
|
-
import { useExpandableModel } from './useExpandableModel';
|
|
32
|
-
export var Expandable = createContainer('div')({
|
|
33
|
-
modelHook: useExpandableModel,
|
|
34
|
-
subComponents: {
|
|
35
|
-
Target: ExpandableTarget,
|
|
36
|
-
Content: ExpandableContent,
|
|
37
|
-
Icon: ExpandableIcon,
|
|
38
|
-
Avatar: ExpandableAvatar,
|
|
39
|
-
Title: ExpandableTitle,
|
|
40
|
-
},
|
|
41
|
-
})(function (_a, Element) {
|
|
42
|
-
var children = _a.children, elementProps = __rest(_a, ["children"]);
|
|
43
|
-
return (React.createElement(Flex, __assign({ as: Element, flexDirection: 'column', padding: 'xxs' }, elementProps), children));
|
|
44
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Avatar } from '@workday/canvas-kit-react/avatar';
|
|
4
|
-
export interface ExpandableAvatarProps extends Omit<ExtractProps<typeof Avatar, never>, keyof React.ButtonHTMLAttributes<HTMLButtonElement>> {
|
|
5
|
-
}
|
|
6
|
-
export declare const ExpandableAvatar: import("@workday/canvas-kit-react/common").ElementComponent<"button", ExpandableAvatarProps>;
|
|
7
|
-
//# sourceMappingURL=ExpandableAvatar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableAvatar.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableAvatar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAGxD,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAClC,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CACpD;CAAG;AAON,eAAO,MAAM,gBAAgB,8FAK3B,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
/** @jsxRuntime classic */
|
|
24
|
-
/** @jsx jsx */
|
|
25
|
-
import { jsx } from '@emotion/react';
|
|
26
|
-
import { createComponent, styled } from '@workday/canvas-kit-react/common';
|
|
27
|
-
import { Avatar } from '@workday/canvas-kit-react/avatar';
|
|
28
|
-
import { space } from '@workday/canvas-kit-react/tokens';
|
|
29
|
-
var StyledAvatar = styled(Avatar)({
|
|
30
|
-
marginRight: space.xxs,
|
|
31
|
-
flexShrink: 0,
|
|
32
|
-
});
|
|
33
|
-
export var ExpandableAvatar = createComponent('button')({
|
|
34
|
-
displayName: 'Expandable.Avatar',
|
|
35
|
-
Component: function (_a, ref, Element) {
|
|
36
|
-
var elemProps = __rest(_a, []);
|
|
37
|
-
return jsx(StyledAvatar, __assign({ altText: undefined, as: Element, ref: ref, size: 32 }, elemProps));
|
|
38
|
-
},
|
|
39
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ExpandableContentProps {
|
|
3
|
-
/**
|
|
4
|
-
* The children of the `Expandable.Content` whose visibility is controlled by the associated
|
|
5
|
-
* `Expandable.Target`
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare const ExpandableContent: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ExpandableContentProps, {
|
|
10
|
-
state: {
|
|
11
|
-
id: string;
|
|
12
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
13
|
-
};
|
|
14
|
-
events: {
|
|
15
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
16
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
17
|
-
};
|
|
18
|
-
}>;
|
|
19
|
-
//# sourceMappingURL=ExpandableContent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableContent.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;EAc5B,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React from 'react';
|
|
24
|
-
import { space } from '@workday/canvas-kit-react/tokens';
|
|
25
|
-
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
26
|
-
import { useExpandableContent } from './hooks/useExpandableContent';
|
|
27
|
-
import { Box } from '@workday/canvas-kit-react/layout';
|
|
28
|
-
import { useExpandableModel } from './useExpandableModel';
|
|
29
|
-
export var ExpandableContent = createSubcomponent('div')({
|
|
30
|
-
modelHook: useExpandableModel,
|
|
31
|
-
elemPropsHook: useExpandableContent,
|
|
32
|
-
})(function (_a, Element) {
|
|
33
|
-
var children = _a.children, elementProps = __rest(_a, ["children"]);
|
|
34
|
-
return (React.createElement(Box, __assign({ as: Element, background: "none", padding: space.s + " " + space.xxs + " " + space.xxs }, elementProps), children));
|
|
35
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
|
-
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
5
|
-
import { IconPositions } from '@workday/canvas-kit-react/button';
|
|
6
|
-
export interface ExpandableIconProps extends Omit<ExtractProps<typeof SystemIcon, never>, 'icon'> {
|
|
7
|
-
/**
|
|
8
|
-
* Icon to display from `@workday/canvas-accent-icons-web`
|
|
9
|
-
* @default chevronUpIcon
|
|
10
|
-
*/
|
|
11
|
-
icon?: CanvasSystemIcon;
|
|
12
|
-
/**
|
|
13
|
-
* Button icon positions can either be `start` or `end`.
|
|
14
|
-
* If no value is provided, it defaults to `start`.
|
|
15
|
-
* @default 'start'
|
|
16
|
-
*/
|
|
17
|
-
iconPosition?: IconPositions;
|
|
18
|
-
}
|
|
19
|
-
export declare const ExpandableIcon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", ExpandableIconProps, {
|
|
20
|
-
state: {
|
|
21
|
-
id: string;
|
|
22
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
23
|
-
};
|
|
24
|
-
events: {
|
|
25
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
26
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
27
|
-
};
|
|
28
|
-
}>;
|
|
29
|
-
//# sourceMappingURL=ExpandableIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableIcon.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAI/D,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAC/F;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAwBD,eAAO,MAAM,cAAc;;;;;;;;;EAqB1B,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React from 'react';
|
|
24
|
-
import { createSubcomponent, styled, } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import { chevronUpIcon, chevronDownIcon } from '@workday/canvas-system-icons-web';
|
|
26
|
-
import { useExpandableIcon } from './hooks/useExpandableIcon';
|
|
27
|
-
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
28
|
-
import { colors, space } from '@workday/canvas-kit-react/tokens';
|
|
29
|
-
import { useExpandableModel } from './useExpandableModel';
|
|
30
|
-
var StyledEndIcon = styled(SystemIcon)({
|
|
31
|
-
marginLeft: 'auto',
|
|
32
|
-
}, function (_a) {
|
|
33
|
-
var visible = _a.visible;
|
|
34
|
-
return ({
|
|
35
|
-
transform: !visible ? 'rotate(-180deg)' : undefined,
|
|
36
|
-
padding: !visible
|
|
37
|
-
? space.xxxs + " " + space.xs + " " + space.xxxs + " " + space.xxxs
|
|
38
|
-
: space.xxxs + " " + space.xxxs + " " + space.xxxs + " " + space.xs,
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
var StyledStartIcon = styled(SystemIcon)({
|
|
42
|
-
margin: "0 " + space.xxs + " 0 0",
|
|
43
|
-
padding: space.xxxs,
|
|
44
|
-
}, function (_a) {
|
|
45
|
-
var visible = _a.visible;
|
|
46
|
-
return ({
|
|
47
|
-
transform: !visible ? 'rotate(-90deg)' : undefined,
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
export var ExpandableIcon = createSubcomponent('span')({
|
|
51
|
-
modelHook: useExpandableModel,
|
|
52
|
-
elemPropsHook: useExpandableIcon,
|
|
53
|
-
})(function (_a, Element) {
|
|
54
|
-
var icon = _a.icon, visible = _a.visible, _b = _a.iconPosition, iconPosition = _b === void 0 ? 'start' : _b, elementProps = __rest(_a, ["icon", "visible", "iconPosition"]);
|
|
55
|
-
return iconPosition === 'end' ? (React.createElement(StyledEndIcon, __assign({ as: Element, fill: colors.licorice200, icon: icon || chevronUpIcon, visible: visible }, elementProps))) : (React.createElement(StyledStartIcon, __assign({ as: Element, fill: colors.licorice200, icon: icon || chevronDownIcon, visible: visible }, elementProps)));
|
|
56
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
export interface ExpandableTargetProps extends ExtractProps<typeof Flex, never> {
|
|
5
|
-
/**
|
|
6
|
-
* Children of the `Expandable.Target`. Should contain `Target.Title`, an optional `Target.Avatar`
|
|
7
|
-
* and `Target.Icon` with an `iconPosition` prop that takes a value of either `start` or `end`.
|
|
8
|
-
* `Target.Icon` with `start` is meant to be placed before the `Target.Title` and `Target.Icon`
|
|
9
|
-
* `end` should be placed after.
|
|
10
|
-
*/
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* This specifies the semantic heading level that will wrap the `Expandable.Target`'s button. If not
|
|
14
|
-
* defined, then nothing will wrap the button.
|
|
15
|
-
*/
|
|
16
|
-
headingLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
17
|
-
}
|
|
18
|
-
export declare const ExpandableTarget: import("@workday/canvas-kit-react/common").ElementComponentM<"button", ExpandableTargetProps, {
|
|
19
|
-
state: {
|
|
20
|
-
id: string;
|
|
21
|
-
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
22
|
-
};
|
|
23
|
-
events: {
|
|
24
|
-
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
25
|
-
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
26
|
-
};
|
|
27
|
-
}>;
|
|
28
|
-
//# sourceMappingURL=ExpandableTarget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAG1C,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAItD,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;;;;;;;;;EAoB3B,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React from 'react';
|
|
24
|
-
import { createSubcomponent, focusRing, hideMouseFocus, styled, } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import { useExpandableTarget } from './hooks/useExpandableTarget';
|
|
26
|
-
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
27
|
-
import { colors } from '@workday/canvas-kit-react/tokens';
|
|
28
|
-
import { useExpandableModel } from './useExpandableModel';
|
|
29
|
-
var StyledButton = styled(Flex.as('button'))(__assign({ cursor: 'pointer', '&:focus': __assign({}, focusRing()), '&:hover': {
|
|
30
|
-
background: colors.soap300,
|
|
31
|
-
} }, hideMouseFocus));
|
|
32
|
-
var Heading = styled('h1')({
|
|
33
|
-
margin: 0,
|
|
34
|
-
});
|
|
35
|
-
export var ExpandableTarget = createSubcomponent('button')({
|
|
36
|
-
modelHook: useExpandableModel,
|
|
37
|
-
elemPropsHook: useExpandableTarget,
|
|
38
|
-
})(function (_a, Element) {
|
|
39
|
-
var children = _a.children, headingLevel = _a.headingLevel, elementProps = __rest(_a, ["children", "headingLevel"]);
|
|
40
|
-
var button = (React.createElement(StyledButton, __assign({ as: Element, background: "none", border: "none", borderRadius: "m", flexDirection: "row", padding: "xxs", width: "100%" }, elementProps), children));
|
|
41
|
-
return !!headingLevel ? React.createElement(Heading, { as: headingLevel }, button) : button;
|
|
42
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ExpandableTitleProps {
|
|
3
|
-
/**
|
|
4
|
-
* Children of the `Expandable.Title`. This should contain a string for the title
|
|
5
|
-
*/
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const ExpandableTitle: import("@workday/canvas-kit-react/common").ElementComponent<"div", ExpandableTitleProps>;
|
|
9
|
-
//# sourceMappingURL=ExpandableTitle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableTitle.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,eAAe,0FAoB1B,CAAC"}
|