@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
|
@@ -1,49 +1,74 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CanvasSpaceValues } from '@workday/canvas-kit-react/tokens';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* ### Deprecated Drawer Props
|
|
5
|
+
*
|
|
6
|
+
* As of Canvas Kit v8, Drawer is being soft-deprecated.
|
|
7
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
8
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
9
|
+
* for more information.
|
|
10
|
+
*/
|
|
11
|
+
export interface DeprecatedDrawerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
12
|
/**
|
|
5
|
-
* The padding of the
|
|
13
|
+
* The padding of the DeprecatedDrawer contents.
|
|
6
14
|
* @default space.s
|
|
7
15
|
*/
|
|
8
16
|
padding?: CanvasSpaceValues;
|
|
9
17
|
/**
|
|
10
|
-
* The direction from which the
|
|
11
|
-
* @default
|
|
18
|
+
* The direction from which the DeprecatedDrawer opens. Accepts `Left` or `Right`.
|
|
19
|
+
* @default DeprecatedDrawerDirection.Right
|
|
12
20
|
*/
|
|
13
|
-
openDirection?:
|
|
21
|
+
openDirection?: DeprecatedDrawerDirection;
|
|
14
22
|
/**
|
|
15
|
-
* The width of the
|
|
23
|
+
* The width of the DeprecatedDrawer in `px`.
|
|
16
24
|
* @default 360
|
|
17
25
|
*/
|
|
18
26
|
width?: number;
|
|
19
27
|
/**
|
|
20
|
-
* If true, render the
|
|
28
|
+
* If true, render the DeprecatedDrawer with a drop shadow.
|
|
21
29
|
* @default false
|
|
22
30
|
*/
|
|
23
31
|
showDropShadow?: boolean;
|
|
24
32
|
/**
|
|
25
|
-
* The optional
|
|
33
|
+
* The optional DeprecatedDrawerHeader component of the DeprecatedDrawer. Shows an optional string and close button.
|
|
26
34
|
*/
|
|
27
35
|
header?: React.ReactElement;
|
|
28
36
|
/**
|
|
29
|
-
* The `aria-labelledby` of the
|
|
37
|
+
* The `aria-labelledby` of the DeprecatedDrawer. Set this when there is a `header` for accessibility. The `role` attribute should also be used when this attribute is present. This value should be the same as the `id` attribute of the `header` element.
|
|
30
38
|
*/
|
|
31
39
|
'aria-labelledby'?: string;
|
|
32
40
|
/**
|
|
33
|
-
* The `aria-label` for the
|
|
41
|
+
* The `aria-label` for the DeprecatedDrawer. Set this when there is NO `header` for accessibility.
|
|
34
42
|
*/
|
|
35
43
|
'aria-label'?: string;
|
|
36
44
|
/**
|
|
37
|
-
* The role of the
|
|
45
|
+
* The role of the DeprecatedDrawer. If `role` is provided, you must also set `aria-labelledby` to link `header` to the `role`.
|
|
38
46
|
*/
|
|
39
47
|
role?: string;
|
|
40
48
|
}
|
|
41
|
-
|
|
49
|
+
/**
|
|
50
|
+
* ### Deprecated Drawer Direction
|
|
51
|
+
*
|
|
52
|
+
* As of Canvas Kit v8, Drawer is being soft-deprecated.
|
|
53
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
54
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
55
|
+
* for more information.
|
|
56
|
+
*/
|
|
57
|
+
export declare enum DeprecatedDrawerDirection {
|
|
42
58
|
Left = 0,
|
|
43
59
|
Right = 1
|
|
44
60
|
}
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
/**
|
|
62
|
+
* ### Deprecated Drawer
|
|
63
|
+
*
|
|
64
|
+
* As of Canvas Kit v8, this component is being soft-deprecated.
|
|
65
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
66
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
67
|
+
* for more information.
|
|
68
|
+
*/
|
|
69
|
+
export declare class DeprecatedDrawer extends React.Component<DeprecatedDrawerProps, {}> {
|
|
70
|
+
static OpenDirection: typeof DeprecatedDrawerDirection;
|
|
71
|
+
componentDidMount(): void;
|
|
47
72
|
render(): JSX.Element;
|
|
48
73
|
}
|
|
49
74
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../drawer/lib/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAgB,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAElF,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../drawer/lib/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAgB,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAElF;;;;;;;GAOG;AAEH,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACjF;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAC1C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AAEH,oBAAY,yBAAyB;IACnC,IAAI,IAAA;IACJ,KAAK,IAAA;CACN;AA6CD;;;;;;;GAOG;AAEH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,SAAS,CAAC,qBAAqB,EAAE,EAAE,CAAC;IAC9E,MAAM,CAAC,aAAa,mCAA6B;IAEjD,iBAAiB;IASV,MAAM;CAyBd"}
|
|
@@ -57,15 +57,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
57
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.
|
|
60
|
+
exports.DeprecatedDrawer = exports.DeprecatedDrawerDirection = void 0;
|
|
61
61
|
var React = __importStar(require("react"));
|
|
62
62
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
63
63
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
/**
|
|
65
|
+
* ### Deprecated Drawer Direction
|
|
66
|
+
*
|
|
67
|
+
* As of Canvas Kit v8, Drawer is being soft-deprecated.
|
|
68
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
69
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
70
|
+
* for more information.
|
|
71
|
+
*/
|
|
72
|
+
var DeprecatedDrawerDirection;
|
|
73
|
+
(function (DeprecatedDrawerDirection) {
|
|
74
|
+
DeprecatedDrawerDirection[DeprecatedDrawerDirection["Left"] = 0] = "Left";
|
|
75
|
+
DeprecatedDrawerDirection[DeprecatedDrawerDirection["Right"] = 1] = "Right";
|
|
76
|
+
})(DeprecatedDrawerDirection = exports.DeprecatedDrawerDirection || (exports.DeprecatedDrawerDirection = {}));
|
|
69
77
|
var DrawerContainer = styled_1.default('div')({
|
|
70
78
|
height: '100%',
|
|
71
79
|
backgroundColor: 'white',
|
|
@@ -80,26 +88,25 @@ var DrawerContainer = styled_1.default('div')({
|
|
|
80
88
|
}, function (_a) {
|
|
81
89
|
var showDropShadow = _a.showDropShadow, openDirection = _a.openDirection;
|
|
82
90
|
return ({
|
|
83
|
-
boxShadow: openDirection ===
|
|
91
|
+
boxShadow: openDirection === DeprecatedDrawerDirection.Right && showDropShadow
|
|
84
92
|
? '-8px 0px 16px 0 rgba(0,0,0,0.12)'
|
|
85
|
-
: openDirection ===
|
|
93
|
+
: openDirection === DeprecatedDrawerDirection.Left && showDropShadow
|
|
86
94
|
? '8px 0px 16px 0 rgba(0,0,0,0.12)'
|
|
87
95
|
: undefined,
|
|
88
96
|
});
|
|
89
97
|
}, function (_a) {
|
|
90
98
|
var openDirection = _a.openDirection;
|
|
91
99
|
return ({
|
|
92
|
-
borderLeft: openDirection ===
|
|
93
|
-
borderRight: openDirection ===
|
|
94
|
-
right: openDirection ===
|
|
95
|
-
left: openDirection ===
|
|
100
|
+
borderLeft: openDirection === DeprecatedDrawerDirection.Right ? "1px solid " + tokens_1.colors.soap400 : undefined,
|
|
101
|
+
borderRight: openDirection === DeprecatedDrawerDirection.Left ? "1px solid " + tokens_1.colors.soap400 : undefined,
|
|
102
|
+
right: openDirection === DeprecatedDrawerDirection.Right ? tokens_1.space.zero : undefined,
|
|
103
|
+
left: openDirection === DeprecatedDrawerDirection.Left ? tokens_1.space.zero : undefined,
|
|
96
104
|
});
|
|
97
105
|
});
|
|
98
106
|
var ChildrenContainer = styled_1.default('div')({
|
|
99
107
|
height: '100%',
|
|
100
108
|
overflowY: 'auto',
|
|
101
109
|
wordBreak: 'break-word',
|
|
102
|
-
wordWrap: 'break-word',
|
|
103
110
|
position: 'relative',
|
|
104
111
|
}, function (_a) {
|
|
105
112
|
var padding = _a.padding;
|
|
@@ -107,18 +114,29 @@ var ChildrenContainer = styled_1.default('div')({
|
|
|
107
114
|
padding: padding,
|
|
108
115
|
});
|
|
109
116
|
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
/**
|
|
118
|
+
* ### Deprecated Drawer
|
|
119
|
+
*
|
|
120
|
+
* As of Canvas Kit v8, this component is being soft-deprecated.
|
|
121
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
122
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
123
|
+
* for more information.
|
|
124
|
+
*/
|
|
125
|
+
var DeprecatedDrawer = /** @class */ (function (_super) {
|
|
126
|
+
__extends(DeprecatedDrawer, _super);
|
|
127
|
+
function DeprecatedDrawer() {
|
|
113
128
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
114
129
|
}
|
|
115
|
-
|
|
116
|
-
|
|
130
|
+
DeprecatedDrawer.prototype.componentDidMount = function () {
|
|
131
|
+
console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
|
|
132
|
+
};
|
|
133
|
+
DeprecatedDrawer.prototype.render = function () {
|
|
134
|
+
var _a = this.props, _b = _a.padding, padding = _b === void 0 ? tokens_1.space.s : _b, _c = _a.width, width = _c === void 0 ? 360 : _c, _d = _a.openDirection, openDirection = _d === void 0 ? DeprecatedDrawerDirection.Right : _d, _e = _a.showDropShadow, showDropShadow = _e === void 0 ? false : _e, children = _a.children, header = _a.header, role = _a.role, elemProps = __rest(_a, ["padding", "width", "openDirection", "showDropShadow", "children", "header", "role"]);
|
|
117
135
|
return (React.createElement(DrawerContainer, __assign({ role: role }, elemProps, { showDropShadow: showDropShadow, width: width, openDirection: openDirection }),
|
|
118
136
|
header,
|
|
119
137
|
React.createElement(ChildrenContainer, { padding: padding }, children)));
|
|
120
138
|
};
|
|
121
|
-
|
|
122
|
-
return
|
|
139
|
+
DeprecatedDrawer.OpenDirection = DeprecatedDrawerDirection;
|
|
140
|
+
return DeprecatedDrawer;
|
|
123
141
|
}(React.Component));
|
|
124
|
-
exports.
|
|
142
|
+
exports.DeprecatedDrawer = DeprecatedDrawer;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CanvasColor } from '@workday/canvas-kit-react/tokens';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* ### Deprecated Drawer Header Props
|
|
5
|
+
*
|
|
6
|
+
* As of Canvas Kit v8, this component is being soft-deprecated.
|
|
7
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
8
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
9
|
+
* for more information.
|
|
10
|
+
*/
|
|
11
|
+
export interface DeprecatedDrawerHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
12
|
/**
|
|
5
|
-
* The text of the
|
|
13
|
+
* The text of the DeprecatedDrawerHeader. This text will also be applied as the `title` attribute of the header element.
|
|
6
14
|
*/
|
|
7
15
|
title?: string;
|
|
8
16
|
/**
|
|
9
|
-
* The function called when the
|
|
17
|
+
* The function called when the DeprecatedDrawerHeader close button is clicked.
|
|
10
18
|
*/
|
|
11
19
|
onClose?: React.MouseEventHandler<HTMLButtonElement>;
|
|
12
20
|
/**
|
|
@@ -15,11 +23,11 @@ export interface DrawerHeaderProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
15
23
|
*/
|
|
16
24
|
closeIconAriaLabel?: string;
|
|
17
25
|
/**
|
|
18
|
-
* The background color of the
|
|
26
|
+
* The background color of the DeprecatedDrawerHeader.
|
|
19
27
|
*/
|
|
20
28
|
headerColor?: CanvasColor | string;
|
|
21
29
|
/**
|
|
22
|
-
* The border color of the
|
|
30
|
+
* The border color of the DeprecatedDrawerHeader. This should match something close to `headerColor`.
|
|
23
31
|
*/
|
|
24
32
|
borderColor?: CanvasColor | string;
|
|
25
33
|
/**
|
|
@@ -28,11 +36,20 @@ export interface DrawerHeaderProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
28
36
|
*/
|
|
29
37
|
inverse?: boolean;
|
|
30
38
|
/**
|
|
31
|
-
* The unique id of the
|
|
39
|
+
* The unique id of the DeprecatedDrawerHeader for accessibility.
|
|
32
40
|
*/
|
|
33
41
|
id?: string;
|
|
34
42
|
}
|
|
35
|
-
|
|
43
|
+
/**
|
|
44
|
+
* ### Deprecated Drawer Header
|
|
45
|
+
*
|
|
46
|
+
* As of Canvas Kit v8, this component is being soft-deprecated.
|
|
47
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
48
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
49
|
+
* for more information.
|
|
50
|
+
*/
|
|
51
|
+
export declare class DeprecatedDrawerHeader extends React.Component<DeprecatedDrawerHeaderProps, {}> {
|
|
52
|
+
componentDidMount(): void;
|
|
36
53
|
render(): JSX.Element;
|
|
37
54
|
}
|
|
38
55
|
//# sourceMappingURL=DrawerHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerHeader.d.ts","sourceRoot":"","sources":["../../../../drawer/lib/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"DrawerHeader.d.ts","sourceRoot":"","sources":["../../../../drawer/lib/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAgB,WAAW,EAAa,MAAM,kCAAkC,CAAC;AAKxF;;;;;;;GAOG;AAEH,MAAM,WAAW,2BAA4B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AA0BD;;;;;;;GAOG;AAEH,qBAAa,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CAAC,2BAA2B,EAAE,EAAE,CAAC;IAC1F,iBAAiB;IASV,MAAM;CAwCd"}
|
|
@@ -57,10 +57,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
57
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
+
exports.DeprecatedDrawerHeader = void 0;
|
|
60
61
|
var React = __importStar(require("react"));
|
|
61
62
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
62
63
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
63
64
|
var button_1 = require("@workday/canvas-kit-react/button");
|
|
65
|
+
var text_1 = require("@workday/canvas-kit-react/text");
|
|
64
66
|
var canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
|
|
65
67
|
var headerHeight = 56;
|
|
66
68
|
var HeaderContainer = styled_1.default('div')({
|
|
@@ -80,26 +82,32 @@ var HeaderContainer = styled_1.default('div')({
|
|
|
80
82
|
backgroundColor: headerColor,
|
|
81
83
|
});
|
|
82
84
|
});
|
|
83
|
-
var HeaderTitle = styled_1.default('h4')(__assign(__assign({}, tokens_1.type.levels.body.small), { fontWeight: tokens_1.type.properties.fontWeights.bold, whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', paddingRight: tokens_1.space.xxxs }), function (_a) {
|
|
84
|
-
var inverse = _a.inverse;
|
|
85
|
-
return ({
|
|
86
|
-
color: inverse ? tokens_1.colors.frenchVanilla100 : tokens_1.typeColors.heading,
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
85
|
var CloseButton = styled_1.default(button_1.TertiaryButton)({
|
|
90
86
|
margin: '-8px',
|
|
91
87
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
/**
|
|
89
|
+
* ### Deprecated Drawer Header
|
|
90
|
+
*
|
|
91
|
+
* As of Canvas Kit v8, this component is being soft-deprecated.
|
|
92
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
93
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
94
|
+
* for more information.
|
|
95
|
+
*/
|
|
96
|
+
var DeprecatedDrawerHeader = /** @class */ (function (_super) {
|
|
97
|
+
__extends(DeprecatedDrawerHeader, _super);
|
|
98
|
+
function DeprecatedDrawerHeader() {
|
|
95
99
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
96
100
|
}
|
|
97
|
-
|
|
101
|
+
DeprecatedDrawerHeader.prototype.componentDidMount = function () {
|
|
102
|
+
console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
|
|
103
|
+
};
|
|
104
|
+
DeprecatedDrawerHeader.prototype.render = function () {
|
|
98
105
|
var _a = this.props, _b = _a.closeIconAriaLabel, closeIconAriaLabel = _b === void 0 ? 'Close' : _b, _c = _a.headerColor, headerColor = _c === void 0 ? tokens_1.colors.soap100 : _c, _d = _a.borderColor, borderColor = _d === void 0 ? tokens_1.colors.soap500 : _d, _e = _a.inverse, inverse = _e === void 0 ? false : _e, onClose = _a.onClose, title = _a.title, id = _a.id, elemProps = __rest(_a, ["closeIconAriaLabel", "headerColor", "borderColor", "inverse", "onClose", "title", "id"]);
|
|
106
|
+
var variant = inverse ? 'inverse' : undefined;
|
|
99
107
|
return (React.createElement(HeaderContainer, __assign({ borderColor: borderColor }, elemProps, { headerColor: headerColor }),
|
|
100
|
-
React.createElement(
|
|
101
|
-
onClose && closeIconAriaLabel && (React.createElement(CloseButton, { variant:
|
|
108
|
+
React.createElement(text_1.Text, { as: "h4", typeLevel: "body.small", title: title, fontWeight: "bold", color: tokens_1.typeColors.heading, variant: variant, paddingInlineEnd: "xxxs", whiteSpace: "nowrap", textOverflow: "ellipsis", overflow: "hidden" }, title),
|
|
109
|
+
onClose && closeIconAriaLabel && (React.createElement(CloseButton, { variant: variant, onClick: onClose, "aria-label": closeIconAriaLabel, icon: canvas_system_icons_web_1.xIcon }))));
|
|
102
110
|
};
|
|
103
|
-
return
|
|
111
|
+
return DeprecatedDrawerHeader;
|
|
104
112
|
}(React.Component));
|
|
105
|
-
exports.
|
|
113
|
+
exports.DeprecatedDrawerHeader = DeprecatedDrawerHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../expandable/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./lib/Expandable"), exports);
|
|
14
|
+
__exportStar(require("./lib/hooks"), exports);
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
Target: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./ExpandableTarget").ExpandableTargetProps, {
|
|
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
|
+
Content: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./ExpandableContent").ExpandableContentProps, {
|
|
53
|
+
state: {
|
|
54
|
+
id: string;
|
|
55
|
+
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
56
|
+
};
|
|
57
|
+
events: {
|
|
58
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
59
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./ExpandableIcon").ExpandableIconProps, {
|
|
63
|
+
state: {
|
|
64
|
+
id: string;
|
|
65
|
+
visibility: import("@workday/canvas-kit-react/disclosure").Visibility;
|
|
66
|
+
};
|
|
67
|
+
events: {
|
|
68
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
69
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
70
|
+
};
|
|
71
|
+
}>;
|
|
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
|
+
};
|
|
75
|
+
//# sourceMappingURL=Expandable.d.ts.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Expandable = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var common_1 = require("@workday/canvas-kit-react/common");
|
|
31
|
+
var ExpandableContent_1 = require("./ExpandableContent");
|
|
32
|
+
var ExpandableTarget_1 = require("./ExpandableTarget");
|
|
33
|
+
var ExpandableIcon_1 = require("./ExpandableIcon");
|
|
34
|
+
var ExpandableTitle_1 = require("./ExpandableTitle");
|
|
35
|
+
var ExpandableAvatar_1 = require("./ExpandableAvatar");
|
|
36
|
+
var layout_1 = require("@workday/canvas-kit-react/layout");
|
|
37
|
+
var useExpandableModel_1 = require("./useExpandableModel");
|
|
38
|
+
exports.Expandable = common_1.createContainer('div')({
|
|
39
|
+
modelHook: useExpandableModel_1.useExpandableModel,
|
|
40
|
+
subComponents: {
|
|
41
|
+
Target: ExpandableTarget_1.ExpandableTarget,
|
|
42
|
+
Content: ExpandableContent_1.ExpandableContent,
|
|
43
|
+
Icon: ExpandableIcon_1.ExpandableIcon,
|
|
44
|
+
Avatar: ExpandableAvatar_1.ExpandableAvatar,
|
|
45
|
+
Title: ExpandableTitle_1.ExpandableTitle,
|
|
46
|
+
},
|
|
47
|
+
})(function (_a, Element) {
|
|
48
|
+
var children = _a.children, elementProps = __rest(_a, ["children"]);
|
|
49
|
+
return (react_1.default.createElement(layout_1.Flex, __assign({ as: Element, flexDirection: 'column', padding: 'xxs' }, elementProps), children));
|
|
50
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandableAvatar.d.ts","sourceRoot":"","sources":["../../../../expandable/lib/ExpandableAvatar.tsx"],"names":[],"mappings":"AAAA,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;AAUN,eAAO,MAAM,gBAAgB,8FAK3B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.ExpandableAvatar = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var common_1 = require("@workday/canvas-kit-react/common");
|
|
31
|
+
var avatar_1 = require("@workday/canvas-kit-react/avatar");
|
|
32
|
+
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
33
|
+
var StyledAvatar = common_1.styled(avatar_1.Avatar)({
|
|
34
|
+
marginRight: tokens_1.space.xxs,
|
|
35
|
+
flexShrink: 0,
|
|
36
|
+
});
|
|
37
|
+
// When the component is created, it needs to be a button element to match AvatarProps.
|
|
38
|
+
// Once Avatar becomes a `createComponent` we can default the element type to a `div`
|
|
39
|
+
// and the types should be properly extracted
|
|
40
|
+
exports.ExpandableAvatar = common_1.createComponent('button')({
|
|
41
|
+
displayName: 'Expandable.Avatar',
|
|
42
|
+
Component: function (_a, ref) {
|
|
43
|
+
var altText = _a.altText, elemProps = __rest(_a, ["altText"]);
|
|
44
|
+
return react_1.default.createElement(StyledAvatar, __assign({ altText: undefined, as: "div", ref: ref, size: 32 }, elemProps));
|
|
45
|
+
},
|
|
46
|
+
});
|
|
@@ -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,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.ExpandableContent = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
31
|
+
var common_1 = require("@workday/canvas-kit-react/common");
|
|
32
|
+
var useExpandableContent_1 = require("./hooks/useExpandableContent");
|
|
33
|
+
var layout_1 = require("@workday/canvas-kit-react/layout");
|
|
34
|
+
var useExpandableModel_1 = require("./useExpandableModel");
|
|
35
|
+
exports.ExpandableContent = common_1.createSubcomponent('div')({
|
|
36
|
+
modelHook: useExpandableModel_1.useExpandableModel,
|
|
37
|
+
elemPropsHook: useExpandableContent_1.useExpandableContent,
|
|
38
|
+
})(function (_a, Element) {
|
|
39
|
+
var children = _a.children, elementProps = __rest(_a, ["children"]);
|
|
40
|
+
return (react_1.default.createElement(layout_1.Box, __assign({ as: Element, background: "none", padding: tokens_1.space.s + " " + tokens_1.space.xxs + " " + tokens_1.space.xxs }, elementProps), children));
|
|
41
|
+
});
|
|
@@ -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
|