@workday/canvas-kit-docs 16.0.0-alpha.0464-next.0 → 16.0.0-alpha.0465-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es6/lib/docs.js +812 -704
- package/dist/mdx/react/dialog/examples/Basic.tsx +4 -6
- package/dist/mdx/react/dialog/examples/DialogWithFallbackPlacements.tsx +13 -37
- package/dist/mdx/react/dialog/examples/Focus.tsx +4 -10
- package/dist/mdx/react/modal/examples/Basic.tsx +4 -5
- package/dist/mdx/react/modal/examples/BodyOverflow.tsx +3 -3
- package/dist/mdx/react/modal/examples/CustomFocus.tsx +6 -5
- package/dist/mdx/react/modal/examples/FormModal.tsx +5 -13
- package/dist/mdx/react/modal/examples/FullOverflow.tsx +3 -3
- package/dist/mdx/react/modal/examples/IframeTest.tsx +3 -5
- package/dist/mdx/react/modal/examples/ModalWithPopup.tsx +6 -8
- package/dist/mdx/react/modal/examples/ModalWithPopupRTL.tsx +6 -6
- package/dist/mdx/react/modal/examples/NoTargetRTL.tsx +3 -3
- package/dist/mdx/react/modal/examples/ReturnFocus.tsx +2 -7
- package/dist/mdx/react/modal/examples/StackedModals.tsx +6 -8
- package/dist/mdx/react/modal/examples/WithTooltips.tsx +22 -20
- package/dist/mdx/react/modal/examples/WithoutCloseIcon.tsx +3 -4
- package/dist/mdx/react/popup/examples/Basic.tsx +4 -10
- package/dist/mdx/react/popup/examples/FocusRedirect.tsx +3 -3
- package/dist/mdx/react/popup/examples/FocusTrap.tsx +3 -3
- package/dist/mdx/react/popup/examples/InitialFocus.tsx +7 -12
- package/dist/mdx/react/popup/examples/InlinePopup.tsx +2 -2
- package/dist/mdx/react/popup/examples/MultiplePopups.tsx +2 -2
- package/dist/mdx/react/popup/examples/NestedPopups.tsx +2 -2
- package/dist/mdx/react/popup/examples/PopupWithFallbackPlacements.tsx +13 -13
- package/dist/mdx/react/popup/examples/RTL.tsx +3 -3
- package/dist/mdx/react/tooltip/Tooltip.mdx +1 -1
- package/package.json +6 -6
|
@@ -30,17 +30,15 @@ export default () => {
|
|
|
30
30
|
<Dialog.Body>
|
|
31
31
|
<FormField>
|
|
32
32
|
<FormField.Label>Email</FormField.Label>
|
|
33
|
-
<FormField.Input as={TextInput} onChange={handleChange} value={value} />
|
|
33
|
+
<FormField.Input as={TextInput} grow onChange={handleChange} value={value} />
|
|
34
34
|
</FormField>
|
|
35
35
|
</Dialog.Body>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
>
|
|
36
|
+
<Dialog.ButtonGroup>
|
|
37
|
+
<Dialog.CloseButton>Cancel</Dialog.CloseButton>
|
|
39
38
|
<Dialog.CloseButton as={PrimaryButton} onClick={handleEmail}>
|
|
40
39
|
Submit
|
|
41
40
|
</Dialog.CloseButton>
|
|
42
|
-
|
|
43
|
-
</Flex>
|
|
41
|
+
</Dialog.ButtonGroup>
|
|
44
42
|
</Dialog.Card>
|
|
45
43
|
</Dialog.Popper>
|
|
46
44
|
</Dialog>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
2
2
|
import {Dialog} from '@workday/canvas-kit-react/dialog';
|
|
3
|
-
import {
|
|
3
|
+
import {Grid} from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import {calc, createStyles} from '@workday/canvas-kit-styling';
|
|
5
5
|
import {base, system} from '@workday/canvas-tokens-web';
|
|
6
6
|
|
|
@@ -50,16 +50,10 @@ export default () => {
|
|
|
50
50
|
This is dialog heading
|
|
51
51
|
</Dialog.Heading>
|
|
52
52
|
<Dialog.Body>This is dialog body.</Dialog.Body>
|
|
53
|
-
<
|
|
54
|
-
cs={{
|
|
55
|
-
gap: system.gap.sm,
|
|
56
|
-
padding: system.padding.xs,
|
|
57
|
-
marginBlockStart: system.gap.sm,
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
53
|
+
<Dialog.ButtonGroup>
|
|
61
54
|
<Dialog.CloseButton>Cancel</Dialog.CloseButton>
|
|
62
|
-
|
|
55
|
+
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
56
|
+
</Dialog.ButtonGroup>
|
|
63
57
|
</Dialog.Card>
|
|
64
58
|
</Dialog.Popper>
|
|
65
59
|
</Dialog>
|
|
@@ -74,16 +68,10 @@ export default () => {
|
|
|
74
68
|
This is dialog heading
|
|
75
69
|
</Dialog.Heading>
|
|
76
70
|
<Dialog.Body>This is dialog body.</Dialog.Body>
|
|
77
|
-
<
|
|
78
|
-
cs={{
|
|
79
|
-
gap: system.gap.sm,
|
|
80
|
-
padding: system.padding.xs,
|
|
81
|
-
marginBlockStart: system.gap.sm,
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
71
|
+
<Dialog.ButtonGroup>
|
|
85
72
|
<Dialog.CloseButton>Cancel</Dialog.CloseButton>
|
|
86
|
-
|
|
73
|
+
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
74
|
+
</Dialog.ButtonGroup>
|
|
87
75
|
</Dialog.Card>
|
|
88
76
|
</Dialog.Popper>
|
|
89
77
|
</Dialog>
|
|
@@ -98,16 +86,10 @@ export default () => {
|
|
|
98
86
|
This is dialog heading
|
|
99
87
|
</Dialog.Heading>
|
|
100
88
|
<Dialog.Body>This is dialog body.</Dialog.Body>
|
|
101
|
-
<
|
|
102
|
-
cs={{
|
|
103
|
-
gap: system.gap.sm,
|
|
104
|
-
padding: system.padding.xs,
|
|
105
|
-
marginBlockStart: system.gap.sm,
|
|
106
|
-
}}
|
|
107
|
-
>
|
|
108
|
-
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
89
|
+
<Dialog.ButtonGroup>
|
|
109
90
|
<Dialog.CloseButton>Cancel</Dialog.CloseButton>
|
|
110
|
-
|
|
91
|
+
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
92
|
+
</Dialog.ButtonGroup>
|
|
111
93
|
</Dialog.Card>
|
|
112
94
|
</Dialog.Popper>
|
|
113
95
|
</Dialog>
|
|
@@ -122,16 +104,10 @@ export default () => {
|
|
|
122
104
|
This is dialog heading
|
|
123
105
|
</Dialog.Heading>
|
|
124
106
|
<Dialog.Body>This is dialog body.</Dialog.Body>
|
|
125
|
-
<
|
|
126
|
-
cs={{
|
|
127
|
-
gap: system.gap.sm,
|
|
128
|
-
padding: system.padding.xs,
|
|
129
|
-
marginBlockStart: system.gap.sm,
|
|
130
|
-
}}
|
|
131
|
-
>
|
|
132
|
-
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
107
|
+
<Dialog.ButtonGroup>
|
|
133
108
|
<Dialog.CloseButton>Cancel</Dialog.CloseButton>
|
|
134
|
-
|
|
109
|
+
<Dialog.CloseButton as={PrimaryButton}>Submit</Dialog.CloseButton>
|
|
110
|
+
</Dialog.ButtonGroup>
|
|
135
111
|
</Dialog.Card>
|
|
136
112
|
</Dialog.Popper>
|
|
137
113
|
</Dialog>
|
|
@@ -31,21 +31,15 @@ export default () => {
|
|
|
31
31
|
<Dialog.Body>
|
|
32
32
|
<FormField>
|
|
33
33
|
<FormField.Label>Email</FormField.Label>
|
|
34
|
-
<FormField.Input as={TextInput} onChange={handleChange} value={value} />
|
|
34
|
+
<FormField.Input as={TextInput} grow onChange={handleChange} value={value} />
|
|
35
35
|
</FormField>
|
|
36
36
|
</Dialog.Body>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
padding: system.padding.xxs,
|
|
40
|
-
marginBlockStart: system.gap.xs,
|
|
41
|
-
gap: system.gap.md,
|
|
42
|
-
}}
|
|
43
|
-
>
|
|
37
|
+
<Dialog.ButtonGroup>
|
|
38
|
+
<Dialog.CloseButton>Cancel</Dialog.CloseButton>
|
|
44
39
|
<Dialog.CloseButton as={PrimaryButton} onClick={handleEmail}>
|
|
45
40
|
Submit
|
|
46
41
|
</Dialog.CloseButton>
|
|
47
|
-
|
|
48
|
-
</Flex>
|
|
42
|
+
</Dialog.ButtonGroup>
|
|
49
43
|
</Dialog.Card>
|
|
50
44
|
</Dialog.Popper>
|
|
51
45
|
</Dialog>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
2
|
-
import {Box
|
|
2
|
+
import {Box} from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import {Modal} from '@workday/canvas-kit-react/modal';
|
|
4
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
5
4
|
|
|
6
5
|
export default () => {
|
|
7
6
|
const handleAcknowledge = () => {
|
|
@@ -25,12 +24,12 @@ export default () => {
|
|
|
25
24
|
software and associated documentation files (the "Software").
|
|
26
25
|
</Box>
|
|
27
26
|
</Modal.Body>
|
|
28
|
-
<
|
|
27
|
+
<Modal.ButtonGroup>
|
|
28
|
+
<Modal.CloseButton onClick={handleCancel}>Cancel</Modal.CloseButton>
|
|
29
29
|
<Modal.CloseButton as={PrimaryButton} onClick={handleAcknowledge}>
|
|
30
30
|
Acknowledge
|
|
31
31
|
</Modal.CloseButton>
|
|
32
|
-
|
|
33
|
-
</Flex>
|
|
32
|
+
</Modal.ButtonGroup>
|
|
34
33
|
</Modal.Card>
|
|
35
34
|
</Modal.Overlay>
|
|
36
35
|
</Modal>
|
|
@@ -80,12 +80,12 @@ export default () => {
|
|
|
80
80
|
ut aliquam purus sit.
|
|
81
81
|
</p>
|
|
82
82
|
</Modal.Body>
|
|
83
|
-
<
|
|
83
|
+
<Modal.ButtonGroup>
|
|
84
|
+
<Modal.CloseButton onClick={handleCancel}>Cancel</Modal.CloseButton>
|
|
84
85
|
<Modal.CloseButton as={PrimaryButton} onClick={handleAcknowledge}>
|
|
85
86
|
Acknowledge
|
|
86
87
|
</Modal.CloseButton>
|
|
87
|
-
|
|
88
|
-
</Flex>
|
|
88
|
+
</Modal.ButtonGroup>
|
|
89
89
|
</Modal.Card>
|
|
90
90
|
</Modal.Overlay>
|
|
91
91
|
</Modal>
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
4
4
|
import {useUniqueId} from '@workday/canvas-kit-react/common';
|
|
5
5
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
6
|
-
import {Box
|
|
6
|
+
import {Box} from '@workday/canvas-kit-react/layout';
|
|
7
7
|
import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
|
|
8
8
|
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
9
9
|
import {system} from '@workday/canvas-tokens-web';
|
|
@@ -31,22 +31,23 @@ export default () => {
|
|
|
31
31
|
<Box as="p" id={longDescID} cs={{marginBlockStart: 0, marginBlockEnd: system.gap.md}}>
|
|
32
32
|
Enter your initials to acknowledge the license.
|
|
33
33
|
</Box>
|
|
34
|
-
<FormField
|
|
34
|
+
<FormField>
|
|
35
35
|
<FormField.Label>Initials</FormField.Label>
|
|
36
36
|
<FormField.Input
|
|
37
37
|
as={TextInput}
|
|
38
38
|
ref={ref}
|
|
39
39
|
value={value}
|
|
40
|
+
grow
|
|
40
41
|
onChange={e => setValue(e.currentTarget.value)}
|
|
41
42
|
/>
|
|
42
43
|
</FormField>
|
|
43
44
|
</Modal.Body>
|
|
44
|
-
<
|
|
45
|
+
<Modal.ButtonGroup>
|
|
46
|
+
<Modal.CloseButton>Cancel</Modal.CloseButton>
|
|
45
47
|
<Modal.CloseButton as={PrimaryButton} onClick={handleAcknowledge}>
|
|
46
48
|
Acknowledge
|
|
47
49
|
</Modal.CloseButton>
|
|
48
|
-
|
|
49
|
-
</Flex>
|
|
50
|
+
</Modal.ButtonGroup>
|
|
50
51
|
</Modal.Card>
|
|
51
52
|
</Modal.Overlay>
|
|
52
53
|
</Modal>
|
|
@@ -2,21 +2,13 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
4
4
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
5
|
-
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
6
5
|
import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
|
|
7
6
|
import {Select} from '@workday/canvas-kit-react/select';
|
|
8
7
|
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
9
|
-
import {createStyles} from '@workday/canvas-kit-styling';
|
|
10
8
|
import {plusIcon} from '@workday/canvas-system-icons-web';
|
|
11
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
12
9
|
|
|
13
10
|
const FAVORITE_COLOR_OPTIONS = ['Blue', 'Yellow'];
|
|
14
11
|
|
|
15
|
-
const flexStyles = createStyles({
|
|
16
|
-
gap: system.gap.md,
|
|
17
|
-
padding: system.padding.xs,
|
|
18
|
-
});
|
|
19
|
-
|
|
20
12
|
export default () => {
|
|
21
13
|
const model = useModalModel();
|
|
22
14
|
|
|
@@ -44,15 +36,15 @@ export default () => {
|
|
|
44
36
|
<Modal.CloseIcon aria-label="Close" />
|
|
45
37
|
<Modal.Heading>New User</Modal.Heading>
|
|
46
38
|
<Modal.Body>
|
|
47
|
-
<FormField>
|
|
39
|
+
<FormField grow>
|
|
48
40
|
<FormField.Label>First Name</FormField.Label>
|
|
49
41
|
<FormField.Input as={TextInput} name="first" />
|
|
50
42
|
</FormField>
|
|
51
|
-
<FormField>
|
|
43
|
+
<FormField grow>
|
|
52
44
|
<FormField.Label>Last Name</FormField.Label>
|
|
53
45
|
<FormField.Input as={TextInput} name="last" />
|
|
54
46
|
</FormField>
|
|
55
|
-
<FormField>
|
|
47
|
+
<FormField grow>
|
|
56
48
|
<FormField.Label>Favorite Color</FormField.Label>
|
|
57
49
|
<FormField.Field>
|
|
58
50
|
<Select items={FAVORITE_COLOR_OPTIONS}>
|
|
@@ -66,10 +58,10 @@ export default () => {
|
|
|
66
58
|
</FormField.Field>
|
|
67
59
|
</FormField>
|
|
68
60
|
</Modal.Body>
|
|
69
|
-
<
|
|
61
|
+
<Modal.ButtonGroup>
|
|
70
62
|
<Modal.CloseButton>Cancel</Modal.CloseButton>
|
|
71
63
|
<PrimaryButton type="submit">Submit</PrimaryButton>
|
|
72
|
-
</
|
|
64
|
+
</Modal.ButtonGroup>
|
|
73
65
|
</Modal.Card>
|
|
74
66
|
</Modal.Overlay>
|
|
75
67
|
</Modal>
|
|
@@ -80,12 +80,12 @@ export default () => {
|
|
|
80
80
|
ut aliquam purus sit.
|
|
81
81
|
</p>
|
|
82
82
|
</Modal.Body>
|
|
83
|
-
<
|
|
83
|
+
<Modal.ButtonGroup>
|
|
84
|
+
<Modal.CloseButton onClick={handleCancel}>Cancel</Modal.CloseButton>
|
|
84
85
|
<Modal.CloseButton as={PrimaryButton} onClick={handleAcknowledge}>
|
|
85
86
|
Acknowledge
|
|
86
87
|
</Modal.CloseButton>
|
|
87
|
-
|
|
88
|
-
</Flex>
|
|
88
|
+
</Modal.ButtonGroup>
|
|
89
89
|
</Modal.Card>
|
|
90
90
|
</Modal.OverflowOverlay>
|
|
91
91
|
</Modal>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
2
|
-
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
3
2
|
import {Modal} from '@workday/canvas-kit-react/modal';
|
|
4
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
5
3
|
|
|
6
4
|
export default () => {
|
|
7
5
|
return (
|
|
@@ -13,10 +11,10 @@ export default () => {
|
|
|
13
11
|
<Modal.Heading>Delete Item</Modal.Heading>
|
|
14
12
|
<Modal.Body>
|
|
15
13
|
<p>Are you sure you want to delete the item?</p>
|
|
16
|
-
<
|
|
17
|
-
<Modal.CloseButton as={DeleteButton}>Delete</Modal.CloseButton>
|
|
14
|
+
<Modal.ButtonGroup position="start">
|
|
18
15
|
<Modal.CloseButton>Cancel</Modal.CloseButton>
|
|
19
|
-
|
|
16
|
+
<Modal.CloseButton as={DeleteButton}>Delete</Modal.CloseButton>
|
|
17
|
+
</Modal.ButtonGroup>
|
|
20
18
|
<iframe
|
|
21
19
|
role="iframe"
|
|
22
20
|
srcDoc="<html><body>Hello, <b>world</b>.<button>iframe button 1</button><button data-testid='button2'>iframe button 2</button></body></html>"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
2
|
-
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
3
2
|
import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
|
|
4
3
|
import {
|
|
5
4
|
Popup,
|
|
@@ -7,7 +6,6 @@ import {
|
|
|
7
6
|
useCloseOnOutsideClick,
|
|
8
7
|
usePopupModel,
|
|
9
8
|
} from '@workday/canvas-kit-react/popup';
|
|
10
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
11
9
|
|
|
12
10
|
export default () => {
|
|
13
11
|
const modal = useModalModel();
|
|
@@ -31,17 +29,18 @@ export default () => {
|
|
|
31
29
|
<Modal.Body>
|
|
32
30
|
<p>Are you sure you want to delete the item?</p>
|
|
33
31
|
<Popup model={popup}>
|
|
34
|
-
<
|
|
35
|
-
<Popup.Target as={DeleteButton}>Yes, Delete</Popup.Target>
|
|
32
|
+
<Popup.ButtonGroup>
|
|
36
33
|
<Popup.CloseButton>Cancel</Popup.CloseButton>
|
|
37
|
-
|
|
34
|
+
<Popup.Target as={DeleteButton}>Yes, Delete</Popup.Target>
|
|
35
|
+
</Popup.ButtonGroup>
|
|
38
36
|
<Popup.Popper>
|
|
39
37
|
<Popup.Card>
|
|
40
38
|
<Popup.CloseIcon aria-label="Close" />
|
|
41
39
|
<Popup.Heading>Really Delete Item</Popup.Heading>
|
|
42
40
|
<Popup.Body>
|
|
43
41
|
<p>Are you sure you'd like to delete the item titled 'My Item'?</p>
|
|
44
|
-
<
|
|
42
|
+
<Popup.ButtonGroup>
|
|
43
|
+
<Popup.CloseButton>Cancel</Popup.CloseButton>
|
|
45
44
|
<Popup.CloseButton
|
|
46
45
|
as={DeleteButton}
|
|
47
46
|
onClick={event => {
|
|
@@ -51,8 +50,7 @@ export default () => {
|
|
|
51
50
|
>
|
|
52
51
|
Yes, Really Delete
|
|
53
52
|
</Popup.CloseButton>
|
|
54
|
-
|
|
55
|
-
</Flex>
|
|
53
|
+
</Popup.ButtonGroup>
|
|
56
54
|
</Popup.Body>
|
|
57
55
|
</Popup.Card>
|
|
58
56
|
</Popup.Popper>
|
|
@@ -32,17 +32,18 @@ export default () => {
|
|
|
32
32
|
<Modal.Body>
|
|
33
33
|
<p>Are you sure you want to delete the item?</p>
|
|
34
34
|
<Popup model={popup}>
|
|
35
|
-
<
|
|
36
|
-
<Popup.Target as={DeleteButton}>Yes, Delete</Popup.Target>
|
|
35
|
+
<Popup.ButtonGroup>
|
|
37
36
|
<Popup.CloseButton>Cancel</Popup.CloseButton>
|
|
38
|
-
|
|
37
|
+
<Popup.Target as={DeleteButton}>Yes, Delete</Popup.Target>
|
|
38
|
+
</Popup.ButtonGroup>
|
|
39
39
|
<Popup.Popper>
|
|
40
40
|
<Popup.Card>
|
|
41
41
|
<Popup.CloseIcon aria-label="Close" />
|
|
42
42
|
<Popup.Heading>Really Delete Item</Popup.Heading>
|
|
43
43
|
<Popup.Body>
|
|
44
44
|
<p>Are you sure you'd like to delete the item titled 'My Item'?</p>
|
|
45
|
-
<
|
|
45
|
+
<Popup.ButtonGroup>
|
|
46
|
+
<Popup.CloseButton>Cancel</Popup.CloseButton>
|
|
46
47
|
<Popup.CloseButton
|
|
47
48
|
as={DeleteButton}
|
|
48
49
|
onClick={event => {
|
|
@@ -52,8 +53,7 @@ export default () => {
|
|
|
52
53
|
>
|
|
53
54
|
Yes, Really Delete
|
|
54
55
|
</Popup.CloseButton>
|
|
55
|
-
|
|
56
|
-
</Flex>
|
|
56
|
+
</Popup.ButtonGroup>
|
|
57
57
|
</Popup.Body>
|
|
58
58
|
</Popup.Card>
|
|
59
59
|
</Popup.Popper>
|
|
@@ -29,7 +29,8 @@ export default () => {
|
|
|
29
29
|
("התוכנה").
|
|
30
30
|
</Box>
|
|
31
31
|
</Modal.Body>
|
|
32
|
-
<
|
|
32
|
+
<Modal.ButtonGroup>
|
|
33
|
+
<Modal.CloseButton onClick={handleCancel}>לְבַטֵל</Modal.CloseButton>
|
|
33
34
|
<Modal.CloseButton
|
|
34
35
|
as={PrimaryButton}
|
|
35
36
|
onClick={handleAcknowledge}
|
|
@@ -39,8 +40,7 @@ export default () => {
|
|
|
39
40
|
>
|
|
40
41
|
לְהוֹדוֹת
|
|
41
42
|
</Modal.CloseButton>
|
|
42
|
-
|
|
43
|
-
</Flex>
|
|
43
|
+
</Modal.ButtonGroup>
|
|
44
44
|
</Modal.Card>
|
|
45
45
|
</Modal.Overlay>
|
|
46
46
|
</Modal>
|
|
@@ -12,11 +12,6 @@ import {system} from '@workday/canvas-tokens-web';
|
|
|
12
12
|
|
|
13
13
|
const INITIAL_FILES = ['Resume.docx', 'Cover_Letter.docx', 'References.docx'];
|
|
14
14
|
|
|
15
|
-
const actionStyles = createStyles({
|
|
16
|
-
gap: system.gap.md,
|
|
17
|
-
padding: system.padding.sm,
|
|
18
|
-
});
|
|
19
|
-
|
|
20
15
|
const headingStyles = createStyles({
|
|
21
16
|
marginBlock: '0',
|
|
22
17
|
});
|
|
@@ -149,12 +144,12 @@ export default () => {
|
|
|
149
144
|
: 'Are you sure you want to delete this file?'}
|
|
150
145
|
</Text>
|
|
151
146
|
</Modal.Body>
|
|
152
|
-
<
|
|
147
|
+
<Modal.ButtonGroup>
|
|
153
148
|
<Modal.CloseButton ref={cancelButtonRef}>Cancel</Modal.CloseButton>
|
|
154
149
|
<Modal.CloseButton as={DeleteButton} onClick={handleConfirmDelete}>
|
|
155
150
|
Delete
|
|
156
151
|
</Modal.CloseButton>
|
|
157
|
-
</
|
|
152
|
+
</Modal.ButtonGroup>
|
|
158
153
|
</Modal.Card>
|
|
159
154
|
</Modal.Overlay>
|
|
160
155
|
</Modal>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
2
|
-
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
3
2
|
import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
|
|
4
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
5
3
|
|
|
6
4
|
export default () => {
|
|
7
5
|
const model = useModalModel();
|
|
@@ -19,7 +17,8 @@ export default () => {
|
|
|
19
17
|
<Modal.Heading>Delete Item</Modal.Heading>
|
|
20
18
|
<Modal.Body>
|
|
21
19
|
<p>Are you sure you want to delete the item?</p>
|
|
22
|
-
<
|
|
20
|
+
<Modal.ButtonGroup>
|
|
21
|
+
<Modal.CloseButton>Cancel</Modal.CloseButton>
|
|
23
22
|
<Modal>
|
|
24
23
|
<Modal.Target as={DeleteButton}>Yes, Delete</Modal.Target>
|
|
25
24
|
<Modal.Overlay>
|
|
@@ -30,7 +29,8 @@ export default () => {
|
|
|
30
29
|
<p>
|
|
31
30
|
Are you <em>really</em> sure you want to delete the item?
|
|
32
31
|
</p>
|
|
33
|
-
<
|
|
32
|
+
<Modal.ButtonGroup>
|
|
33
|
+
<Modal.CloseButton>Cancel</Modal.CloseButton>
|
|
34
34
|
<Modal.CloseButton
|
|
35
35
|
as={DeleteButton}
|
|
36
36
|
onClick={event => {
|
|
@@ -40,14 +40,12 @@ export default () => {
|
|
|
40
40
|
>
|
|
41
41
|
Yes, Really Delete
|
|
42
42
|
</Modal.CloseButton>
|
|
43
|
-
|
|
44
|
-
</Flex>
|
|
43
|
+
</Modal.ButtonGroup>
|
|
45
44
|
</Modal.Body>
|
|
46
45
|
</Modal.Card>
|
|
47
46
|
</Modal.Overlay>
|
|
48
47
|
</Modal>
|
|
49
|
-
|
|
50
|
-
</Flex>
|
|
48
|
+
</Modal.ButtonGroup>
|
|
51
49
|
</Modal.Body>
|
|
52
50
|
</Modal.Card>
|
|
53
51
|
</Modal.Overlay>
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
4
3
|
import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
|
|
5
4
|
import {Popup, useCloseOnOutsideClick, usePopupModel} from '@workday/canvas-kit-react/popup';
|
|
6
5
|
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
7
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
8
6
|
|
|
9
7
|
export default () => {
|
|
10
8
|
const modal = useModalModel();
|
|
@@ -24,13 +22,13 @@ export default () => {
|
|
|
24
22
|
<Modal.Heading>Open Modal</Modal.Heading>
|
|
25
23
|
<Modal.Body>
|
|
26
24
|
<p>Open a hidable and non-hidable popups</p>
|
|
27
|
-
<
|
|
28
|
-
<Popup.Target model={popup1}>Hidable Popup</Popup.Target>
|
|
29
|
-
<Popup.Target model={popup2}>Non-hidable Popup</Popup.Target>
|
|
25
|
+
<Modal.ButtonGroup>
|
|
30
26
|
<Tooltip title="Not so sure" type="muted">
|
|
31
27
|
<Popup.CloseButton onClick={closeModal}>Cancel</Popup.CloseButton>
|
|
32
28
|
</Tooltip>
|
|
33
|
-
|
|
29
|
+
<Popup.Target model={popup1}>Hidable Popup</Popup.Target>
|
|
30
|
+
<Popup.Target model={popup2}>Non-hidable Popup</Popup.Target>
|
|
31
|
+
</Modal.ButtonGroup>
|
|
34
32
|
</Modal.Body>
|
|
35
33
|
</Modal.Card>
|
|
36
34
|
</Modal.Overlay>
|
|
@@ -42,13 +40,15 @@ export default () => {
|
|
|
42
40
|
<Popup.Heading>Hidable Popup</Popup.Heading>
|
|
43
41
|
<Popup.Body>
|
|
44
42
|
<p>Pressing 'OK' will close the modal</p>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
<Modal.ButtonGroup>
|
|
44
|
+
<Tooltip
|
|
45
|
+
placement="left"
|
|
46
|
+
title="Really, Really, Really, Really, Really sure"
|
|
47
|
+
type="muted"
|
|
48
|
+
>
|
|
49
|
+
<Popup.CloseButton onClick={closeModal}>OK</Popup.CloseButton>
|
|
50
|
+
</Tooltip>
|
|
51
|
+
</Modal.ButtonGroup>
|
|
52
52
|
</Popup.Body>
|
|
53
53
|
</Popup.Card>
|
|
54
54
|
</Popup.Popper>
|
|
@@ -60,13 +60,15 @@ export default () => {
|
|
|
60
60
|
<Popup.Heading>Non-hidable Popup</Popup.Heading>
|
|
61
61
|
<Popup.Body>
|
|
62
62
|
<p>Pressing 'OK' will close the modal</p>
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
<Modal.ButtonGroup>
|
|
64
|
+
<Tooltip
|
|
65
|
+
placement="left"
|
|
66
|
+
title="Really, Really, Really, Really, Really sure"
|
|
67
|
+
type="muted"
|
|
68
|
+
>
|
|
69
|
+
<Popup.CloseButton onClick={closeModal}>OK</Popup.CloseButton>
|
|
70
|
+
</Tooltip>
|
|
71
|
+
</Modal.ButtonGroup>
|
|
70
72
|
</Popup.Body>
|
|
71
73
|
</Popup.Card>
|
|
72
74
|
</Popup.Popper>
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
4
4
|
import {useUniqueId} from '@workday/canvas-kit-react/common';
|
|
5
|
-
import {Box
|
|
5
|
+
import {Box} from '@workday/canvas-kit-react/layout';
|
|
6
6
|
import {Modal} from '@workday/canvas-kit-react/modal';
|
|
7
7
|
import {
|
|
8
8
|
useAssistiveHideSiblings,
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
usePopupModel,
|
|
13
13
|
useReturnFocus,
|
|
14
14
|
} from '@workday/canvas-kit-react/popup';
|
|
15
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
16
15
|
|
|
17
16
|
export default () => {
|
|
18
17
|
const longDescId = useUniqueId();
|
|
@@ -42,12 +41,12 @@ export default () => {
|
|
|
42
41
|
Are you sure you want to delete the item?
|
|
43
42
|
</Box>
|
|
44
43
|
</Modal.Body>
|
|
45
|
-
<
|
|
44
|
+
<Modal.ButtonGroup>
|
|
46
45
|
<Modal.CloseButton ref={cancelBtnRef}>Cancel</Modal.CloseButton>
|
|
47
46
|
<Modal.CloseButton as={DeleteButton} onClick={handleDelete}>
|
|
48
47
|
Delete
|
|
49
48
|
</Modal.CloseButton>
|
|
50
|
-
</
|
|
49
|
+
</Modal.ButtonGroup>
|
|
51
50
|
</Modal.Card>
|
|
52
51
|
</Modal.Overlay>
|
|
53
52
|
</Modal>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {DeleteButton} from '@workday/canvas-kit-react/button';
|
|
2
|
-
import {Box
|
|
2
|
+
import {Box} from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import {
|
|
4
4
|
Popup,
|
|
5
5
|
useCloseOnEscape,
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
useReturnFocus,
|
|
11
11
|
} from '@workday/canvas-kit-react/popup';
|
|
12
12
|
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
13
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
14
13
|
|
|
15
14
|
const cardStyles = createStyles({
|
|
16
15
|
width: px2rem(400),
|
|
@@ -20,11 +19,6 @@ const bodyStyles = createStyles({
|
|
|
20
19
|
marginBlock: '0',
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
const flexStyles = createStyles({
|
|
24
|
-
gap: system.gap.md,
|
|
25
|
-
padding: system.padding.xs,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
22
|
export default () => {
|
|
29
23
|
const model = usePopupModel();
|
|
30
24
|
|
|
@@ -50,12 +44,12 @@ export default () => {
|
|
|
50
44
|
Are you sure you'd like to delete the item titled 'My Item'?
|
|
51
45
|
</Box>
|
|
52
46
|
</Popup.Body>
|
|
53
|
-
<
|
|
47
|
+
<Popup.ButtonGroup>
|
|
48
|
+
<Popup.CloseButton>Cancel</Popup.CloseButton>
|
|
54
49
|
<Popup.CloseButton as={DeleteButton} onClick={handleDelete}>
|
|
55
50
|
Delete
|
|
56
51
|
</Popup.CloseButton>
|
|
57
|
-
|
|
58
|
-
</Flex>
|
|
52
|
+
</Popup.ButtonGroup>
|
|
59
53
|
</Popup.Card>
|
|
60
54
|
</Popup.Popper>
|
|
61
55
|
</Popup>
|
|
@@ -63,12 +63,12 @@ export default () => {
|
|
|
63
63
|
Are you sure you'd like to delete the item titled 'My Item'?
|
|
64
64
|
</Box>
|
|
65
65
|
</Popup.Body>
|
|
66
|
-
<
|
|
66
|
+
<Popup.ButtonGroup>
|
|
67
|
+
<Popup.CloseButton>Cancel</Popup.CloseButton>
|
|
67
68
|
<Popup.CloseButton as={DeleteButton} onClick={handleDelete}>
|
|
68
69
|
Delete
|
|
69
70
|
</Popup.CloseButton>
|
|
70
|
-
|
|
71
|
-
</Flex>
|
|
71
|
+
</Popup.ButtonGroup>
|
|
72
72
|
</Popup.Card>
|
|
73
73
|
</Popup.Popper>
|
|
74
74
|
<SecondaryButton>Next Focusable Button</SecondaryButton>
|