@workday/canvas-kit-docs 16.0.0-alpha.0463-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.
Files changed (37) hide show
  1. package/dist/es6/lib/docs.js +812 -704
  2. package/dist/mdx/16.0-UPGRADE-GUIDE.mdx +34 -1
  3. package/dist/mdx/labs-react/kbd/KBD.mdx +13 -0
  4. package/dist/mdx/labs-react/kbd/examples/InTooltip.tsx +38 -0
  5. package/dist/mdx/react/dialog/examples/Basic.tsx +4 -6
  6. package/dist/mdx/react/dialog/examples/DialogWithFallbackPlacements.tsx +13 -37
  7. package/dist/mdx/react/dialog/examples/Focus.tsx +4 -10
  8. package/dist/mdx/react/modal/examples/Basic.tsx +4 -5
  9. package/dist/mdx/react/modal/examples/BodyOverflow.tsx +3 -3
  10. package/dist/mdx/react/modal/examples/CustomFocus.tsx +6 -5
  11. package/dist/mdx/react/modal/examples/FormModal.tsx +5 -13
  12. package/dist/mdx/react/modal/examples/FullOverflow.tsx +3 -3
  13. package/dist/mdx/react/modal/examples/IframeTest.tsx +3 -5
  14. package/dist/mdx/react/modal/examples/ModalWithPopup.tsx +6 -8
  15. package/dist/mdx/react/modal/examples/ModalWithPopupRTL.tsx +6 -6
  16. package/dist/mdx/react/modal/examples/NoTargetRTL.tsx +3 -3
  17. package/dist/mdx/react/modal/examples/ReturnFocus.tsx +2 -7
  18. package/dist/mdx/react/modal/examples/StackedModals.tsx +6 -8
  19. package/dist/mdx/react/modal/examples/WithTooltips.tsx +22 -20
  20. package/dist/mdx/react/modal/examples/WithoutCloseIcon.tsx +3 -4
  21. package/dist/mdx/react/popup/examples/Basic.tsx +4 -10
  22. package/dist/mdx/react/popup/examples/FocusRedirect.tsx +3 -3
  23. package/dist/mdx/react/popup/examples/FocusTrap.tsx +3 -3
  24. package/dist/mdx/react/popup/examples/InitialFocus.tsx +7 -12
  25. package/dist/mdx/react/popup/examples/InlinePopup.tsx +2 -2
  26. package/dist/mdx/react/popup/examples/MultiplePopups.tsx +2 -2
  27. package/dist/mdx/react/popup/examples/NestedPopups.tsx +2 -2
  28. package/dist/mdx/react/popup/examples/PopupWithFallbackPlacements.tsx +13 -13
  29. package/dist/mdx/react/popup/examples/RTL.tsx +3 -3
  30. package/dist/mdx/react/toast/examples/Basic.tsx +1 -1
  31. package/dist/mdx/react/toast/examples/RTL.tsx +1 -1
  32. package/dist/mdx/react/toast/examples/ToastAlert.tsx +1 -1
  33. package/dist/mdx/react/toast/examples/ToastDialog.tsx +1 -1
  34. package/dist/mdx/react/toast/examples/WithActionLinkAndCloseIcon.tsx +1 -1
  35. package/dist/mdx/react/toast/examples/WithPopper.tsx +1 -1
  36. package/dist/mdx/react/tooltip/Tooltip.mdx +1 -1
  37. package/package.json +6 -6
@@ -17,7 +17,8 @@ Soon to be...
17
17
  - [Component Updates](#component-updates)
18
18
  - [Action Bar](#action-bar)
19
19
  - [Avatar](#avatar)
20
- - [Buttons](#buttons) - [Delete Button Outline Variant](#delete-button-outline-variant)
20
+ - [Buttons](#buttons)
21
+ - [Delete Button Outline Variant](#delete-button-outline-variant)
21
22
  - [Card](#card)
22
23
  - [Form Field](#form-field)
23
24
  - [Inputs](#inputs)
@@ -32,6 +33,8 @@ Soon to be...
32
33
  - [Text Input](#text-input)
33
34
  - [Menu](#menu)
34
35
  - [Segmented Control](#segmented-control)
36
+ - [Toast](#toast)
37
+ - [Tooltip](#tooltip)
35
38
  - [New Utilities](#new-utilities)
36
39
  - [cornerShapeStencil](#cornershapestencil)
37
40
  - [Deprecations](#deprecations)
@@ -342,6 +345,36 @@ If you customize `brand.success.base` in your theme, please verify the following
342
345
  - Error and caution states no longer display a status background color; only the standard background
343
346
  is shown.
344
347
 
348
+ ### Toast
349
+
350
+ **PR:** [#4053](https://github.com/Workday/canvas-kit/pull/4053)
351
+
352
+ #### Visual Updates
353
+
354
+ - Padding is now applied to the `Toast` container itself instead of being distributed across
355
+ `Toast.Body` and `Toast.Icon`.
356
+ - Gap between the icon, body, and close icon is now `base.size150` (12px).
357
+ - Shape uses `system.shape.xl`.
358
+ - `Toast.Body` no longer has a gap between text and link.
359
+ - `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
360
+ LTR).
361
+ - `Toast.CloseIcon` was changed to be `extraSmall` tertiary button.
362
+
363
+ ### Tooltip
364
+
365
+ **PR:** [#4053](https://github.com/Workday/canvas-kit/pull/4053)
366
+
367
+ #### Visual Updates
368
+
369
+ - The default tooltip has been restyled from a dark surface to a light surface.
370
+ - A visible border (`system.color.border.default`) is now applied to the container, replacing the
371
+ previous transparent outline.
372
+ - Tooltip boundaries remain visible in Windows High Contrast mode: when High Contrast is detected,
373
+ Tooltip uses a solid outline (`outline: solid 1px CanvasText`) to ensure clear visibility.
374
+ - Shape is now fully rounded using `system.shape.full`.
375
+ - Type level is now `subtext.lg` (previously `subtext.md`).
376
+ - Padding and spacing have been adjusted to accommodate the new styling.
377
+
345
378
  ### Menu
346
379
 
347
380
  **PR:** [#3987](https://github.com/Workday/canvas-kit/pull/3987)
@@ -2,6 +2,7 @@ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
 
3
3
  import {KBD} from '@workday/canvas-kit-labs-react/kbd';
4
4
  import Basic from './examples/Basic';
5
+ import InTooltip from './examples/InTooltip';
5
6
  import Items from './examples/Items';
6
7
  import RTL from './examples/RTL';
7
8
  import Size from './examples/Size';
@@ -66,6 +67,13 @@ standard style or `plain` for a more minimal appearance. The `variant` is shared
66
67
 
67
68
  <ExampleCodeBlock code={Variant} />
68
69
 
70
+ ### In Tooltip
71
+
72
+ `KBD` can be used inside a `Tooltip` to communicate the keyboard shortcut associated with an
73
+ interactive control. Pair it with descriptive text so the shortcut is easy to understand.
74
+
75
+ <ExampleCodeBlock code={InTooltip} />
76
+
69
77
  ## Accessibility
70
78
 
71
79
  `KBD` is **presentational and semantic text**. It renders a `kbd` element so assistive technology
@@ -73,6 +81,11 @@ can recognize the content as keyboard input, but it does **not** make a keyboard
73
81
  expose it to the browser. It is the visual/semantic representation of a key, not the accessibility
74
82
  contract for a functioning shortcut.
75
83
 
84
+ - `aria-keyshortcuts` isn't supposed to go on the presentational KBD wrapper, it should be on the interactive control with the key listener.
85
+ - The `<KBD.Item>` components that use glyphs need translated aria-label strings. (E.g. "Command", "Control", etc.)
86
+
87
+
88
+
76
89
  ### Provide spoken labels for symbolic or abbreviated keys
77
90
 
78
91
  Glyphs and abbreviations such as <kbd>⌘</kbd>, <kbd>⌥</kbd>, <kbd>⇧</kbd>, and arrow keys are **not
@@ -0,0 +1,38 @@
1
+ import {KBD} from '@workday/canvas-kit-labs-react/kbd';
2
+ import {SecondaryButton} from '@workday/canvas-kit-react/button';
3
+ import {Subtext} from '@workday/canvas-kit-react/text';
4
+ import {Tooltip} from '@workday/canvas-kit-react/tooltip';
5
+ import {createStyles} from '@workday/canvas-kit-styling';
6
+ import {copyIcon} from '@workday/canvas-system-icons-web';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const flexContainer = createStyles({
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ gap: system.gap.xs,
13
+ p: {
14
+ margin: 0,
15
+ },
16
+ });
17
+
18
+ export default () => {
19
+ return (
20
+ <Tooltip
21
+ title={
22
+ <div className={flexContainer}>
23
+ <Subtext size="large">Copy to clipboard</Subtext>
24
+ <KBD>
25
+ <KBD.Item>
26
+ <KBD variant="plain">
27
+ <KBD.Item aria-label="Command">⌘</KBD.Item>
28
+ <KBD.Item>C</KBD.Item>
29
+ </KBD>
30
+ </KBD.Item>
31
+ </KBD>
32
+ </div>
33
+ }
34
+ >
35
+ <SecondaryButton icon={copyIcon} aria-keyshortcuts="Command+C" />
36
+ </Tooltip>
37
+ );
38
+ };
@@ -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
- <Flex
37
- cs={{padding: system.padding.xxs, marginBlockStart: system.gap.xs, gap: system.gap.md}}
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
- <Dialog.CloseButton>Cancel</Dialog.CloseButton>
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 {Flex, Grid} from '@workday/canvas-kit-react/layout';
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
- <Flex
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
- </Flex>
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
- <Flex
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
- </Flex>
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
- <Flex
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
- </Flex>
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
- <Flex
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
- </Flex>
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
- <Flex
38
- cs={{
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
- <Dialog.CloseButton>Cancel</Dialog.CloseButton>
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, Flex} from '@workday/canvas-kit-react/layout';
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
- <Flex cs={{gap: system.gap.md, paddingBlock: system.padding.xs}}>
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
- <Modal.CloseButton onClick={handleCancel}>Cancel</Modal.CloseButton>
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
- <Flex cs={{gap: system.gap.md, paddingBlock: system.padding.xs}}>
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
- <Modal.CloseButton onClick={handleCancel}>Cancel</Modal.CloseButton>
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, Flex} from '@workday/canvas-kit-react/layout';
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 cs={{marginBlockEnd: 0}}>
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
- <Flex cs={{gap: system.gap.md, paddingBlock: system.padding.xs}}>
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
- <Modal.CloseButton>Cancel</Modal.CloseButton>
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
- <Flex cs={flexStyles}>
61
+ <Modal.ButtonGroup>
70
62
  <Modal.CloseButton>Cancel</Modal.CloseButton>
71
63
  <PrimaryButton type="submit">Submit</PrimaryButton>
72
- </Flex>
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
- <Flex cs={{gap: system.gap.md, paddingBlock: system.padding.xs}}>
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
- <Modal.CloseButton onClick={handleCancel}>Cancel</Modal.CloseButton>
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
- <Flex cs={{gap: system.gap.md}}>
17
- <Modal.CloseButton as={DeleteButton}>Delete</Modal.CloseButton>
14
+ <Modal.ButtonGroup position="start">
18
15
  <Modal.CloseButton>Cancel</Modal.CloseButton>
19
- </Flex>
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
- <Flex cs={{gap: system.gap.md}}>
35
- <Popup.Target as={DeleteButton}>Yes, Delete</Popup.Target>
32
+ <Popup.ButtonGroup>
36
33
  <Popup.CloseButton>Cancel</Popup.CloseButton>
37
- </Flex>
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
- <Flex cs={{gap: system.gap.md}}>
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
- <Popup.CloseButton>Cancel</Popup.CloseButton>
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
- <Flex cs={{gap: system.gap.md}}>
36
- <Popup.Target as={DeleteButton}>Yes, Delete</Popup.Target>
35
+ <Popup.ButtonGroup>
37
36
  <Popup.CloseButton>Cancel</Popup.CloseButton>
38
- </Flex>
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
- <Flex cs={{gap: system.gap.md}}>
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
- <Popup.CloseButton>Cancel</Popup.CloseButton>
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
- <Flex cs={{gap: system.gap.md, paddingBlock: system.padding.xs}}>
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
- <Modal.CloseButton onClick={handleCancel}>לְבַטֵל</Modal.CloseButton>
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
- <Flex cs={actionStyles}>
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
- </Flex>
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
- <Flex cs={{gap: system.gap.md}}>
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
- <Flex cs={{gap: system.gap.md}}>
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
- <Modal.CloseButton>Cancel</Modal.CloseButton>
44
- </Flex>
43
+ </Modal.ButtonGroup>
45
44
  </Modal.Body>
46
45
  </Modal.Card>
47
46
  </Modal.Overlay>
48
47
  </Modal>
49
- <Modal.CloseButton>Cancel</Modal.CloseButton>
50
- </Flex>
48
+ </Modal.ButtonGroup>
51
49
  </Modal.Body>
52
50
  </Modal.Card>
53
51
  </Modal.Overlay>