@workday/canvas-kit-labs-react 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/combobox/README.md +4 -4
- package/combobox/index.ts +0 -4
- package/combobox/lib/AutocompleteList.tsx +5 -8
- package/combobox/lib/Combobox.tsx +14 -20
- package/combobox/lib/Status.tsx +1 -3
- package/common/index.ts +0 -2
- package/common/lib/theming/useThemeRTL.ts +11 -13
- package/dist/commonjs/combobox/index.d.ts +0 -3
- package/dist/commonjs/combobox/index.d.ts.map +1 -1
- package/dist/commonjs/combobox/index.js +0 -7
- package/dist/commonjs/combobox/lib/AutocompleteList.d.ts +4 -5
- package/dist/commonjs/combobox/lib/AutocompleteList.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/AutocompleteList.js +2 -1
- package/dist/commonjs/combobox/lib/Combobox.d.ts +4 -6
- package/dist/commonjs/combobox/lib/Combobox.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/Combobox.js +8 -12
- package/dist/commonjs/combobox/lib/Status.d.ts +1 -2
- package/dist/commonjs/combobox/lib/Status.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/Status.js +2 -1
- package/dist/commonjs/common/index.d.ts +0 -2
- package/dist/commonjs/common/index.d.ts.map +1 -1
- package/dist/commonjs/common/index.js +0 -5
- package/dist/commonjs/common/lib/theming/useThemeRTL.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/useThemeRTL.js +6 -8
- package/dist/commonjs/drawer/index.d.ts +1 -4
- package/dist/commonjs/drawer/index.d.ts.map +1 -1
- package/dist/commonjs/drawer/index.js +3 -9
- package/dist/commonjs/drawer/lib/Drawer.d.ts +39 -14
- package/dist/commonjs/drawer/lib/Drawer.d.ts.map +1 -1
- package/dist/commonjs/drawer/lib/Drawer.js +39 -21
- package/dist/commonjs/drawer/lib/DrawerHeader.d.ts +24 -7
- package/dist/commonjs/drawer/lib/DrawerHeader.d.ts.map +1 -1
- package/dist/commonjs/drawer/lib/DrawerHeader.js +22 -14
- package/dist/commonjs/expandable/index.d.ts +3 -0
- package/dist/commonjs/expandable/index.d.ts.map +1 -0
- package/dist/commonjs/expandable/index.js +14 -0
- package/dist/commonjs/expandable/lib/Expandable.d.ts +75 -0
- package/dist/commonjs/expandable/lib/Expandable.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/Expandable.js +50 -0
- package/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts +7 -0
- package/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/ExpandableAvatar.js +46 -0
- package/dist/commonjs/expandable/lib/ExpandableContent.d.ts +19 -0
- package/dist/commonjs/expandable/lib/ExpandableContent.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/ExpandableContent.js +41 -0
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts +29 -0
- package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/ExpandableIcon.js +62 -0
- package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts +28 -0
- package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/ExpandableTarget.js +48 -0
- package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts +9 -0
- package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/ExpandableTitle.js +39 -0
- package/dist/commonjs/expandable/lib/hooks/index.d.ts +4 -0
- package/dist/commonjs/expandable/lib/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/hooks/index.js +15 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts +20 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableContent.js +12 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts +15 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.js +11 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts +17 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.js +20 -0
- package/dist/commonjs/expandable/lib/useExpandableModel.d.ts +50 -0
- package/dist/commonjs/expandable/lib/useExpandableModel.d.ts.map +1 -0
- package/dist/commonjs/expandable/lib/useExpandableModel.js +24 -0
- package/dist/commonjs/index.d.ts +2 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -0
- package/dist/commonjs/search-form/lib/SearchForm.d.ts +1 -2
- package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/commonjs/search-form/lib/SearchForm.js +2 -4
- package/dist/commonjs/toast/index.d.ts +3 -0
- package/dist/commonjs/toast/index.d.ts.map +1 -0
- package/dist/commonjs/toast/index.js +14 -0
- package/dist/commonjs/toast/lib/Toast.d.ts +27 -0
- package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -0
- package/dist/commonjs/toast/lib/Toast.js +78 -0
- package/dist/commonjs/toast/lib/ToastBody.d.ts +6 -0
- package/dist/commonjs/toast/lib/ToastBody.d.ts.map +1 -0
- package/dist/commonjs/toast/lib/ToastBody.js +40 -0
- package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts +6 -0
- package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts.map +1 -0
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +43 -0
- package/dist/commonjs/toast/lib/ToastIcon.d.ts +5 -0
- package/dist/commonjs/toast/lib/ToastIcon.d.ts.map +1 -0
- package/dist/commonjs/toast/lib/ToastIcon.js +26 -0
- package/dist/commonjs/toast/lib/ToastLink.d.ts +9 -0
- package/dist/commonjs/toast/lib/ToastLink.d.ts.map +1 -0
- package/dist/commonjs/toast/lib/ToastLink.js +42 -0
- package/dist/commonjs/toast/lib/ToastMessage.d.ts +11 -0
- package/dist/commonjs/toast/lib/ToastMessage.d.ts.map +1 -0
- package/dist/commonjs/toast/lib/ToastMessage.js +41 -0
- package/dist/commonjs/toast/lib/hooks/useToastModel.d.ts +65 -0
- package/dist/commonjs/toast/lib/hooks/useToastModel.d.ts.map +1 -0
- package/dist/commonjs/toast/lib/hooks/useToastModel.js +35 -0
- package/dist/es6/combobox/index.d.ts +0 -3
- package/dist/es6/combobox/index.d.ts.map +1 -1
- package/dist/es6/combobox/index.js +0 -3
- package/dist/es6/combobox/lib/AutocompleteList.d.ts +4 -5
- package/dist/es6/combobox/lib/AutocompleteList.d.ts.map +1 -1
- package/dist/es6/combobox/lib/AutocompleteList.js +1 -2
- package/dist/es6/combobox/lib/Combobox.d.ts +4 -6
- package/dist/es6/combobox/lib/Combobox.d.ts.map +1 -1
- package/dist/es6/combobox/lib/Combobox.js +5 -10
- package/dist/es6/combobox/lib/Status.d.ts +1 -2
- package/dist/es6/combobox/lib/Status.d.ts.map +1 -1
- package/dist/es6/combobox/lib/Status.js +1 -2
- package/dist/es6/common/index.d.ts +0 -2
- package/dist/es6/common/index.d.ts.map +1 -1
- package/dist/es6/common/index.js +0 -2
- package/dist/es6/common/lib/theming/useThemeRTL.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/useThemeRTL.js +7 -9
- package/dist/es6/drawer/index.d.ts +1 -4
- package/dist/es6/drawer/index.d.ts.map +1 -1
- package/dist/es6/drawer/index.js +1 -4
- package/dist/es6/drawer/lib/Drawer.d.ts +39 -14
- package/dist/es6/drawer/lib/Drawer.d.ts.map +1 -1
- package/dist/es6/drawer/lib/Drawer.js +38 -20
- package/dist/es6/drawer/lib/DrawerHeader.d.ts +24 -7
- package/dist/es6/drawer/lib/DrawerHeader.d.ts.map +1 -1
- package/dist/es6/drawer/lib/DrawerHeader.js +22 -15
- package/dist/es6/expandable/index.d.ts +3 -0
- package/dist/es6/expandable/index.d.ts.map +1 -0
- package/dist/es6/expandable/index.js +2 -0
- package/dist/es6/expandable/lib/Expandable.d.ts +75 -0
- package/dist/es6/expandable/lib/Expandable.d.ts.map +1 -0
- package/dist/es6/expandable/lib/Expandable.js +44 -0
- package/dist/es6/expandable/lib/ExpandableAvatar.d.ts +7 -0
- package/dist/es6/expandable/lib/ExpandableAvatar.d.ts.map +1 -0
- package/dist/es6/expandable/lib/ExpandableAvatar.js +40 -0
- package/dist/es6/expandable/lib/ExpandableContent.d.ts +19 -0
- package/dist/es6/expandable/lib/ExpandableContent.d.ts.map +1 -0
- package/dist/es6/expandable/lib/ExpandableContent.js +35 -0
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts +29 -0
- package/dist/es6/expandable/lib/ExpandableIcon.d.ts.map +1 -0
- package/dist/es6/expandable/lib/ExpandableIcon.js +56 -0
- package/dist/es6/expandable/lib/ExpandableTarget.d.ts +28 -0
- package/dist/es6/expandable/lib/ExpandableTarget.d.ts.map +1 -0
- package/dist/es6/expandable/lib/ExpandableTarget.js +42 -0
- package/dist/es6/expandable/lib/ExpandableTitle.d.ts +9 -0
- package/dist/es6/expandable/lib/ExpandableTitle.d.ts.map +1 -0
- package/dist/es6/expandable/lib/ExpandableTitle.js +33 -0
- package/dist/es6/expandable/lib/hooks/index.d.ts +4 -0
- package/dist/es6/expandable/lib/hooks/index.d.ts.map +1 -0
- package/dist/es6/expandable/lib/hooks/index.js +3 -0
- package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts +20 -0
- package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts.map +1 -0
- package/dist/es6/expandable/lib/hooks/useExpandableContent.js +9 -0
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts +15 -0
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts.map +1 -0
- package/dist/es6/expandable/lib/hooks/useExpandableIcon.js +8 -0
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts +17 -0
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts.map +1 -0
- package/dist/es6/expandable/lib/hooks/useExpandableTarget.js +17 -0
- package/dist/es6/expandable/lib/useExpandableModel.d.ts +50 -0
- package/dist/es6/expandable/lib/useExpandableModel.d.ts.map +1 -0
- package/dist/es6/expandable/lib/useExpandableModel.js +21 -0
- package/dist/es6/index.d.ts +2 -0
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +2 -0
- package/dist/es6/search-form/lib/SearchForm.d.ts +1 -2
- package/dist/es6/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/es6/search-form/lib/SearchForm.js +2 -4
- package/dist/es6/toast/index.d.ts +3 -0
- package/dist/es6/toast/index.d.ts.map +1 -0
- package/dist/es6/toast/index.js +2 -0
- package/dist/es6/toast/lib/Toast.d.ts +27 -0
- package/dist/es6/toast/lib/Toast.d.ts.map +1 -0
- package/dist/es6/toast/lib/Toast.js +72 -0
- package/dist/es6/toast/lib/ToastBody.d.ts +6 -0
- package/dist/es6/toast/lib/ToastBody.d.ts.map +1 -0
- package/dist/es6/toast/lib/ToastBody.js +34 -0
- package/dist/es6/toast/lib/ToastCloseIcon.d.ts +6 -0
- package/dist/es6/toast/lib/ToastCloseIcon.d.ts.map +1 -0
- package/dist/es6/toast/lib/ToastCloseIcon.js +37 -0
- package/dist/es6/toast/lib/ToastIcon.d.ts +5 -0
- package/dist/es6/toast/lib/ToastIcon.d.ts.map +1 -0
- package/dist/es6/toast/lib/ToastIcon.js +20 -0
- package/dist/es6/toast/lib/ToastLink.d.ts +9 -0
- package/dist/es6/toast/lib/ToastLink.d.ts.map +1 -0
- package/dist/es6/toast/lib/ToastLink.js +36 -0
- package/dist/es6/toast/lib/ToastMessage.d.ts +11 -0
- package/dist/es6/toast/lib/ToastMessage.d.ts.map +1 -0
- package/dist/es6/toast/lib/ToastMessage.js +35 -0
- package/dist/es6/toast/lib/hooks/useToastModel.d.ts +65 -0
- package/dist/es6/toast/lib/hooks/useToastModel.d.ts.map +1 -0
- package/dist/es6/toast/lib/hooks/useToastModel.js +32 -0
- package/drawer/index.ts +1 -4
- package/drawer/lib/Drawer.tsx +61 -24
- package/drawer/lib/DrawerHeader.tsx +54 -26
- package/expandable/LICENSE +52 -0
- package/expandable/README.md +11 -0
- package/expandable/index.ts +2 -0
- package/expandable/lib/Expandable.tsx +34 -0
- package/expandable/lib/ExpandableAvatar.tsx +26 -0
- package/expandable/lib/ExpandableContent.tsx +32 -0
- package/expandable/lib/ExpandableIcon.tsx +74 -0
- package/expandable/lib/ExpandableTarget.tsx +67 -0
- package/expandable/lib/ExpandableTitle.tsx +34 -0
- package/expandable/lib/hooks/index.ts +3 -0
- package/expandable/lib/hooks/useExpandableContent.ts +9 -0
- package/expandable/lib/hooks/useExpandableIcon.ts +8 -0
- package/expandable/lib/hooks/useExpandableTarget.ts +16 -0
- package/expandable/lib/useExpandableModel.tsx +17 -0
- package/expandable/package.json +6 -0
- package/index.ts +2 -0
- package/package.json +5 -5
- package/search-form/lib/SearchForm.tsx +2 -6
- package/toast/LICENSE +52 -0
- package/toast/README.md +5 -0
- package/toast/index.ts +2 -0
- package/toast/lib/Toast.tsx +63 -0
- package/toast/lib/ToastBody.tsx +34 -0
- package/toast/lib/ToastCloseIcon.tsx +18 -0
- package/toast/lib/ToastIcon.tsx +24 -0
- package/toast/lib/ToastLink.tsx +27 -0
- package/toast/lib/ToastMessage.tsx +21 -0
- package/toast/lib/hooks/useToastModel.tsx +27 -0
- package/toast/package.json +6 -0
- package/common/lib/storybook-utils/ComponentStatesTable.tsx +0 -80
- package/common/lib/storybook-utils/permutateProps.ts +0 -47
- package/common/lib/storybook-utils/propTypes.ts +0 -15
- package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.d.ts +0 -26
- package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.d.ts.map +0 -1
- package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.js +0 -48
- package/dist/commonjs/common/lib/storybook-utils/permutateProps.d.ts +0 -5
- package/dist/commonjs/common/lib/storybook-utils/permutateProps.d.ts.map +0 -1
- package/dist/commonjs/common/lib/storybook-utils/permutateProps.js +0 -47
- package/dist/commonjs/common/lib/storybook-utils/propTypes.d.ts +0 -15
- package/dist/commonjs/common/lib/storybook-utils/propTypes.d.ts.map +0 -1
- package/dist/commonjs/common/lib/storybook-utils/propTypes.js +0 -2
- package/dist/es6/common/lib/storybook-utils/ComponentStatesTable.d.ts +0 -26
- package/dist/es6/common/lib/storybook-utils/ComponentStatesTable.d.ts.map +0 -1
- package/dist/es6/common/lib/storybook-utils/ComponentStatesTable.js +0 -41
- package/dist/es6/common/lib/storybook-utils/permutateProps.d.ts +0 -5
- package/dist/es6/common/lib/storybook-utils/permutateProps.d.ts.map +0 -1
- package/dist/es6/common/lib/storybook-utils/permutateProps.js +0 -43
- package/dist/es6/common/lib/storybook-utils/propTypes.d.ts +0 -15
- package/dist/es6/common/lib/storybook-utils/propTypes.d.ts.map +0 -1
- package/dist/es6/common/lib/storybook-utils/propTypes.js +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { 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
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { createComponent } from '@workday/canvas-kit-react/common';
|
|
25
|
+
import { Box } from '@workday/canvas-kit-react/layout';
|
|
26
|
+
import { colors, space, type } from '@workday/canvas-kit-react/tokens';
|
|
27
|
+
export var ExpandableTitle = createComponent('div')({
|
|
28
|
+
displayName: 'Expandable.Title',
|
|
29
|
+
Component: function (_a, ref, Element) {
|
|
30
|
+
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
31
|
+
return (React.createElement(Box, __assign({ as: Element, ref: ref, padding: "2px " + space.zero + " 2px", color: colors.blackPepper400, style: __assign(__assign({}, type.levels.body.medium), { fontWeight: type.properties.fontWeights.bold, textAlign: 'left' }) }, elemProps), children));
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpandableContent.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableContent.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;OAK/B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useExpandableModel } from '../useExpandableModel';
|
|
3
|
+
export var useExpandableContent = createElemPropsHook(useExpandableModel)(function (_a) {
|
|
4
|
+
var state = _a.state;
|
|
5
|
+
return {
|
|
6
|
+
style: state.visibility !== 'hidden' ? {} : { display: 'none' },
|
|
7
|
+
id: state.id,
|
|
8
|
+
};
|
|
9
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpandableIcon.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableIcon.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;OAI5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useExpandableModel } from '../useExpandableModel';
|
|
3
|
+
export var useExpandableIcon = createElemPropsHook(useExpandableModel)(function (_a) {
|
|
4
|
+
var state = _a.state;
|
|
5
|
+
return {
|
|
6
|
+
visible: state.visibility !== 'hidden',
|
|
7
|
+
};
|
|
8
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpandableTarget.d.ts","sourceRoot":"","sources":["../../../../../expandable/lib/hooks/useExpandableTarget.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;qBAIX,gBAAgB;;;OAQnC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useExpandableModel } from '../useExpandableModel';
|
|
3
|
+
export var useExpandableTarget = createElemPropsHook(useExpandableModel)(function (_a) {
|
|
4
|
+
var state = _a.state, events = _a.events;
|
|
5
|
+
return {
|
|
6
|
+
'aria-controls': state.id,
|
|
7
|
+
'aria-expanded': state.visibility !== 'hidden',
|
|
8
|
+
onClick: function (event) {
|
|
9
|
+
if (state.visibility !== 'hidden') {
|
|
10
|
+
events.hide(event);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
events.show(event);
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpandableModel.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/useExpandableModel.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { createModelHook } from '@workday/canvas-kit-react/common';
|
|
13
|
+
import { useDisclosureModel } from '@workday/canvas-kit-react/disclosure';
|
|
14
|
+
export var useExpandableModel = createModelHook({
|
|
15
|
+
defaultConfig: __assign({}, useDisclosureModel.defaultConfig),
|
|
16
|
+
})(function (config) {
|
|
17
|
+
var disclosure = useDisclosureModel(config);
|
|
18
|
+
var state = __assign({}, disclosure.state);
|
|
19
|
+
var events = __assign({}, disclosure.events);
|
|
20
|
+
return { state: state, events: events };
|
|
21
|
+
});
|
package/dist/es6/index.d.ts
CHANGED
package/dist/es6/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
package/dist/es6/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { TertiaryButtonProps } from '@workday/canvas-kit-react/button';
|
|
4
|
-
import { MenuItemProps } from '@workday/canvas-kit-preview-react/menu';
|
|
5
4
|
import { SearchTheme, SearchThemeAttributes } from './themes';
|
|
6
5
|
export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttributes<HTMLFormElement> {
|
|
7
6
|
/**
|
|
@@ -20,7 +19,7 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
|
|
|
20
19
|
/**
|
|
21
20
|
* The autocomplete items of the SearchForm. This array of menu items is shown under the search bar.
|
|
22
21
|
*/
|
|
23
|
-
autocompleteItems?: React.ReactElement<
|
|
22
|
+
autocompleteItems?: React.ReactElement<any>[];
|
|
24
23
|
/**
|
|
25
24
|
* The theme of the header the search input is being rendered in.
|
|
26
25
|
*/
|
|
@@ -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,
|
|
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,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAmLD,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAC/E,MAAM,CAAC,KAAK,qBAAe;IAE3B,OAAO,CAAC,QAAQ,CAAuC;IACvD,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,OAAO,CAAsB;IAErC,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAI9B;IAEF,OAAO,CAAC,QAAQ,CAUd;IAEF,OAAO,CAAC,cAAc,CAMpB;IAEF,iBAAiB,QAAO,mBAAmB,CAAC,SAAS,CAAC,CAOpD;IAEF,YAAY,UAAW,MAAM,SAAS,CAAC,eAAe,CAAC,KAAG,IAAI,CAO5D;IAEF,mBAAmB,QAAO,IAAI,CAI5B;IAEF,oBAAoB,QAAO,IAAI,CAI7B;IAEF,kBAAkB,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe;IAWzE,UAAU,QAAO,IAAI,CAInB;IAEF,SAAS,QAAO,IAAI,CAIlB;IAEF,WAAW,QAAO,IAAI,CAEpB;IAEF,UAAU,QAAO,IAAI,CAEnB;IAEF,uBAAuB,UAAW,MAAM,WAAW,CAAC,gBAAgB,CAAC,KAAG,IAAI,CAM1E;IAEF,MAAM;CAmGP"}
|
|
@@ -59,7 +59,7 @@ var maxWidth = 480;
|
|
|
59
59
|
var minWidth = 120;
|
|
60
60
|
var StyledSearchForm = styled('form')({
|
|
61
61
|
position: 'relative',
|
|
62
|
-
|
|
62
|
+
flexGrow: 1,
|
|
63
63
|
display: 'flex',
|
|
64
64
|
alignItems: 'center',
|
|
65
65
|
marginLeft: space.m,
|
|
@@ -100,7 +100,6 @@ var SearchContainer = styled('div')({
|
|
|
100
100
|
var height = _a.height;
|
|
101
101
|
return ({
|
|
102
102
|
minHeight: height,
|
|
103
|
-
height: height,
|
|
104
103
|
});
|
|
105
104
|
});
|
|
106
105
|
var SearchCombobox = styled(Combobox)({
|
|
@@ -148,7 +147,6 @@ var SearchInput = styled(TextInput)(function (_a) {
|
|
|
148
147
|
var collapseStyles = isCollapsed
|
|
149
148
|
? {
|
|
150
149
|
fontSize: '20px',
|
|
151
|
-
lineHeight: '20px',
|
|
152
150
|
paddingLeft: spaceNumbers.xl + spaceNumbers.s,
|
|
153
151
|
paddingRight: spaceNumbers.xl + spaceNumbers.s,
|
|
154
152
|
maxWidth: 'none',
|
|
@@ -164,7 +162,7 @@ var SearchInput = styled(TextInput)(function (_a) {
|
|
|
164
162
|
backgroundColor: inputColors.background,
|
|
165
163
|
height: height,
|
|
166
164
|
};
|
|
167
|
-
return __assign({ fontSize: '14px',
|
|
165
|
+
return __assign({ fontSize: '14px', boxShadow: inputColors.boxShadow, color: inputColors.color, border: 'none', WebkitAppearance: 'none', transition: 'background-color 120ms, color 120ms, box-shadow 200ms, border-color 200ms', zIndex: 2, width: '100%', '&::-webkit-search-cancel-button': {
|
|
168
166
|
display: 'none',
|
|
169
167
|
}, '&::placeholder': {
|
|
170
168
|
color: inputColors.placeholderColor,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../toast/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { Popup } from '@workday/canvas-kit-react/popup';
|
|
3
|
+
export interface ToastProps extends Omit<ExtractProps<typeof Popup.Card, never>, 'model'> {
|
|
4
|
+
}
|
|
5
|
+
export declare const Toast: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ToastProps & Partial<{
|
|
6
|
+
mode: import("./hooks/useToastModel").AriaRoleMode;
|
|
7
|
+
id: string;
|
|
8
|
+
}> & {} & {}, {
|
|
9
|
+
state: {
|
|
10
|
+
id: string;
|
|
11
|
+
mode: import("./hooks/useToastModel").AriaRoleMode;
|
|
12
|
+
};
|
|
13
|
+
events: {};
|
|
14
|
+
}> & {
|
|
15
|
+
Body: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./ToastBody").ToastBodyProps>;
|
|
16
|
+
CloseIcon: import("@workday/canvas-kit-react/common").ElementComponent<"button", import("./ToastCloseIcon").ToastCloseIconProps>;
|
|
17
|
+
Icon: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./ToastIcon").ToastIconProps>;
|
|
18
|
+
Message: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./ToastMessage").ToastMessageProps, {
|
|
19
|
+
state: {
|
|
20
|
+
id: string;
|
|
21
|
+
mode: import("./hooks/useToastModel").AriaRoleMode;
|
|
22
|
+
};
|
|
23
|
+
events: {};
|
|
24
|
+
}>;
|
|
25
|
+
Link: import("@workday/canvas-kit-react/common").ElementComponent<"a", import("./ToastLink").ToastLinkProps>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;CA+ChB,CAAC"}
|