@workday/canvas-kit-react 10.3.2 → 10.3.5

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 (85) hide show
  1. package/collection/lib/useCursorListModel.tsx +86 -90
  2. package/collection/lib/useListItemAllowChildStrings.ts +3 -3
  3. package/collection/lib/useListRenderItem.tsx +1 -1
  4. package/combobox/lib/hooks/useComboboxKeyboardTypeAhead.ts +3 -3
  5. package/combobox/lib/hooks/useComboboxModel.tsx +1 -2
  6. package/common/README.md +32 -14
  7. package/common/lib/styles/errorRing.ts +2 -2
  8. package/common/lib/styles/focusRing.ts +4 -17
  9. package/dist/commonjs/avatar/lib/Avatar.js +1 -1
  10. package/dist/commonjs/banner/lib/Banner.js +1 -1
  11. package/dist/commonjs/button/lib/BaseButton.js +22 -22
  12. package/dist/commonjs/button/lib/DeleteButton.js +1 -1
  13. package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
  14. package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
  15. package/dist/commonjs/button/lib/TertiaryButton.js +15 -15
  16. package/dist/commonjs/button/lib/ToolbarDropdownButton.js +6 -1
  17. package/dist/commonjs/button/lib/ToolbarIconButton.js +6 -1
  18. package/dist/commonjs/button/lib/deprecated_Button.js +2 -2
  19. package/dist/commonjs/checkbox/lib/Checkbox.js +14 -2
  20. package/dist/commonjs/collection/lib/useCursorListModel.d.ts.map +1 -1
  21. package/dist/commonjs/collection/lib/useListItemAllowChildStrings.d.ts +2 -1
  22. package/dist/commonjs/collection/lib/useListItemAllowChildStrings.d.ts.map +1 -1
  23. package/dist/commonjs/collection/lib/useListItemAllowChildStrings.js +1 -1
  24. package/dist/commonjs/collection/lib/useListRenderItem.js +1 -1
  25. package/dist/commonjs/combobox/lib/hooks/useComboboxKeyboardTypeAhead.js +2 -3
  26. package/dist/commonjs/combobox/lib/hooks/useComboboxModel.d.ts.map +1 -1
  27. package/dist/commonjs/combobox/lib/hooks/useComboboxModel.js +1 -2
  28. package/dist/commonjs/common/lib/AccessibleHide.js +1 -1
  29. package/dist/commonjs/common/lib/CanvasProvider.js +1 -1
  30. package/dist/commonjs/common/lib/styles/errorRing.js +2 -2
  31. package/dist/commonjs/common/lib/styles/focusRing.d.ts.map +1 -1
  32. package/dist/commonjs/common/lib/styles/focusRing.js +5 -16
  33. package/dist/commonjs/radio/lib/Radio.js +17 -3
  34. package/dist/commonjs/select/lib/Select.d.ts +2 -1
  35. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  36. package/dist/commonjs/select/lib/Select.js +5 -3
  37. package/dist/commonjs/select/lib/hooks/useSelectInput.d.ts +6 -1
  38. package/dist/commonjs/select/lib/hooks/useSelectInput.d.ts.map +1 -1
  39. package/dist/commonjs/select/lib/hooks/useSelectInput.js +45 -4
  40. package/dist/commonjs/select/lib/hooks/useSelectModel.d.ts.map +1 -1
  41. package/dist/commonjs/select/lib/hooks/useSelectModel.js +1 -2
  42. package/dist/commonjs/switch/lib/Switch.js +2 -2
  43. package/dist/commonjs/tabs/lib/TabsItem.js +1 -1
  44. package/dist/commonjs/text-input/lib/TextInput.js +3 -3
  45. package/dist/es6/avatar/lib/Avatar.js +1 -1
  46. package/dist/es6/banner/lib/Banner.js +1 -1
  47. package/dist/es6/button/lib/BaseButton.js +22 -22
  48. package/dist/es6/button/lib/DeleteButton.js +1 -1
  49. package/dist/es6/button/lib/PrimaryButton.js +2 -2
  50. package/dist/es6/button/lib/SecondaryButton.js +2 -2
  51. package/dist/es6/button/lib/TertiaryButton.js +15 -15
  52. package/dist/es6/button/lib/ToolbarDropdownButton.js +6 -1
  53. package/dist/es6/button/lib/ToolbarIconButton.js +6 -1
  54. package/dist/es6/button/lib/deprecated_Button.js +2 -2
  55. package/dist/es6/checkbox/lib/Checkbox.js +14 -2
  56. package/dist/es6/collection/lib/useCursorListModel.d.ts.map +1 -1
  57. package/dist/es6/collection/lib/useListItemAllowChildStrings.d.ts +2 -1
  58. package/dist/es6/collection/lib/useListItemAllowChildStrings.d.ts.map +1 -1
  59. package/dist/es6/collection/lib/useListItemAllowChildStrings.js +1 -1
  60. package/dist/es6/collection/lib/useListRenderItem.js +1 -1
  61. package/dist/es6/combobox/lib/hooks/useComboboxKeyboardTypeAhead.js +2 -3
  62. package/dist/es6/combobox/lib/hooks/useComboboxModel.d.ts.map +1 -1
  63. package/dist/es6/combobox/lib/hooks/useComboboxModel.js +1 -2
  64. package/dist/es6/common/lib/AccessibleHide.js +1 -1
  65. package/dist/es6/common/lib/CanvasProvider.js +1 -1
  66. package/dist/es6/common/lib/styles/errorRing.js +2 -2
  67. package/dist/es6/common/lib/styles/focusRing.d.ts.map +1 -1
  68. package/dist/es6/common/lib/styles/focusRing.js +5 -16
  69. package/dist/es6/radio/lib/Radio.js +17 -3
  70. package/dist/es6/select/lib/Select.d.ts +2 -1
  71. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  72. package/dist/es6/select/lib/Select.js +5 -3
  73. package/dist/es6/select/lib/hooks/useSelectInput.d.ts +6 -1
  74. package/dist/es6/select/lib/hooks/useSelectInput.d.ts.map +1 -1
  75. package/dist/es6/select/lib/hooks/useSelectInput.js +43 -5
  76. package/dist/es6/select/lib/hooks/useSelectModel.d.ts.map +1 -1
  77. package/dist/es6/select/lib/hooks/useSelectModel.js +1 -2
  78. package/dist/es6/switch/lib/Switch.js +2 -2
  79. package/dist/es6/tabs/lib/TabsItem.js +1 -1
  80. package/dist/es6/text-input/lib/TextInput.js +3 -3
  81. package/package.json +4 -4
  82. package/select/lib/Select.tsx +50 -4
  83. package/select/lib/hooks/useSelectInput.ts +86 -44
  84. package/select/lib/hooks/useSelectModel.tsx +1 -2
  85. package/text-input/lib/TextInput.tsx +3 -3
@@ -135,112 +135,108 @@ const getItem: (id: string, model: NavigationInput) => Item<Generic> = (id, {sta
135
135
  return item;
136
136
  };
137
137
 
138
- export const getWrappingOffsetItem = (offset: number) => (
139
- index: number,
140
- {state}: NavigationInput,
141
- tries = state.items.length
142
- ): number => {
143
- if (Number.isNaN(index)) {
144
- // we have no valid index. If the offset is positive, we'll return the first item
145
- if (offset === 1) {
146
- return getFirst(index, {state});
147
- }
148
- if (offset === -1) {
149
- return getLast(index, {state});
150
- }
151
- }
152
- const items = state.items;
153
-
154
- let nextIndex = index + offset;
155
-
156
- // calculate idealLength as in if the grid was a perfect rectangle
157
- const rows = Math.ceil(items.length / state.columnCount);
158
- const idealLength = rows * state.columnCount;
159
- if (nextIndex < 0) {
160
- if (offset === -1) {
161
- // if the offset is -1, we want to wrap to the end
162
- nextIndex = items.length - 1;
163
- } else {
164
- // if the offset is smaller than -1, we want to wrap by column
165
- if (idealLength + nextIndex >= items.length) {
166
- // we'll overflow the grid because there isn't enough items. Move `nextIndex` up so we wrap in
167
- // the right spot
168
- nextIndex -= state.columnCount;
138
+ export const getWrappingOffsetItem =
139
+ (offset: number) =>
140
+ (index: number, {state}: NavigationInput, tries = state.items.length): number => {
141
+ if (Number.isNaN(index)) {
142
+ // we have no valid index. If the offset is positive, we'll return the first item
143
+ if (offset === 1) {
144
+ return getFirst(index, {state});
145
+ }
146
+ if (offset === -1) {
147
+ return getLast(index, {state});
169
148
  }
170
- nextIndex = idealLength + nextIndex;
171
149
  }
172
- } else if (nextIndex >= items.length) {
173
- if (offset === 1) {
174
- // if the offset is 1, we want to wrap to the beginning
175
- nextIndex = 0;
176
- } else {
177
- // if the offset is larger than 1, we want to wrap by column
178
- if (nextIndex - idealLength < 0) {
179
- // we're going to overflow the grid because there isn't enough items. Move `nextIndex` down to
180
- // the missing item in the next row. This way we'll end up wrapping in the right spot
181
- nextIndex += state.columnCount;
150
+ const items = state.items;
151
+
152
+ let nextIndex = index + offset;
153
+
154
+ // calculate idealLength as in if the grid was a perfect rectangle
155
+ const rows = Math.ceil(items.length / state.columnCount);
156
+ const idealLength = rows * state.columnCount;
157
+ if (nextIndex < 0) {
158
+ if (offset === -1) {
159
+ // if the offset is -1, we want to wrap to the end
160
+ nextIndex = items.length - 1;
161
+ } else {
162
+ // if the offset is smaller than -1, we want to wrap by column
163
+ if (idealLength + nextIndex >= items.length) {
164
+ // we'll overflow the grid because there isn't enough items. Move `nextIndex` up so we wrap in
165
+ // the right spot
166
+ nextIndex -= state.columnCount;
167
+ }
168
+ nextIndex = idealLength + nextIndex;
169
+ }
170
+ } else if (nextIndex >= items.length) {
171
+ if (offset === 1) {
172
+ // if the offset is 1, we want to wrap to the beginning
173
+ nextIndex = 0;
174
+ } else {
175
+ // if the offset is larger than 1, we want to wrap by column
176
+ if (nextIndex - idealLength < 0) {
177
+ // we're going to overflow the grid because there isn't enough items. Move `nextIndex` down to
178
+ // the missing item in the next row. This way we'll end up wrapping in the right spot
179
+ nextIndex += state.columnCount;
180
+ }
181
+ nextIndex = nextIndex - idealLength;
182
182
  }
183
- nextIndex = nextIndex - idealLength;
184
183
  }
185
- }
186
184
 
187
- if (items.length > 1 && state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
188
- // The next item is disabled, try again, but only if we haven't already tried everything.
189
- // Avoid an infinite loop with `tries`
190
- return getWrappingOffsetItem(offset)(nextIndex, {state}, tries - 1);
191
- }
185
+ if (items.length > 1 && state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
186
+ // The next item is disabled, try again, but only if we haven't already tried everything.
187
+ // Avoid an infinite loop with `tries`
188
+ return getWrappingOffsetItem(offset)(nextIndex, {state}, tries - 1);
189
+ }
192
190
 
193
- return nextIndex;
194
- };
191
+ return nextIndex;
192
+ };
195
193
 
196
- export const getOffsetItem = (offset: number) => (
197
- index: number,
198
- {state}: NavigationInput,
199
- tries = state.items.length
200
- ): number => {
201
- const {items, columnCount} = state;
194
+ export const getOffsetItem =
195
+ (offset: number) =>
196
+ (index: number, {state}: NavigationInput, tries = state.items.length): number => {
197
+ const {items, columnCount} = state;
202
198
 
203
- let nextIndex = index + offset;
199
+ let nextIndex = index + offset;
204
200
 
205
- if (Math.abs(offset) < columnCount) {
206
- // if we're here, the columnCount is non-zero and the absolute value of offset is less than the
207
- // column count. We don't want to wrap, so we'll bound within the row
201
+ if (Math.abs(offset) < columnCount) {
202
+ // if we're here, the columnCount is non-zero and the absolute value of offset is less than the
203
+ // column count. We don't want to wrap, so we'll bound within the row
208
204
 
209
- const currentIndexInRow = index % columnCount;
210
- const nextIndexInRow = nextIndex - index + currentIndexInRow;
211
- if (nextIndexInRow >= columnCount || nextIndexInRow < 0) {
212
- nextIndex = index;
213
- }
214
- } else if (columnCount) {
215
- // if we're here, there's a column count, but the offset will move into another row. We need to
216
- // bound to row values
217
- const nextRow = Math.floor(nextIndex / columnCount);
205
+ const currentIndexInRow = index % columnCount;
206
+ const nextIndexInRow = nextIndex - index + currentIndexInRow;
207
+ if (nextIndexInRow >= columnCount || nextIndexInRow < 0) {
208
+ nextIndex = index;
209
+ }
210
+ } else if (columnCount) {
211
+ // if we're here, there's a column count, but the offset will move into another row. We need to
212
+ // bound to row values
213
+ const nextRow = Math.floor(nextIndex / columnCount);
218
214
 
219
- if (nextRow < 0 || nextRow >= columnCount) {
220
- nextIndex = index;
221
- }
215
+ if (nextRow < 0 || nextRow >= columnCount) {
216
+ nextIndex = index;
217
+ }
222
218
 
223
- // make sure we don't go out of bounds if the grid isn't a perfect rectangle
224
- if (nextIndex > items.length - 1) {
225
- nextIndex = index;
219
+ // make sure we don't go out of bounds if the grid isn't a perfect rectangle
220
+ if (nextIndex > items.length - 1) {
221
+ nextIndex = index;
222
+ }
226
223
  }
227
- }
228
224
 
229
- // make sure we're always in bounds
230
- if (nextIndex < 0) {
231
- nextIndex = 0;
232
- } else if (nextIndex >= items.length) {
233
- nextIndex = items.length - 1;
234
- }
225
+ // make sure we're always in bounds
226
+ if (nextIndex < 0) {
227
+ nextIndex = 0;
228
+ } else if (nextIndex >= items.length) {
229
+ nextIndex = items.length - 1;
230
+ }
235
231
 
236
- if (state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
237
- // The next item is disabled, try again, but only if we haven't already tried everything.
238
- // Avoid an infinite loop with `tries`
239
- return getOffsetItem(offset)(nextIndex, {state}, tries - 1);
240
- }
232
+ if (state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
233
+ // The next item is disabled, try again, but only if we haven't already tried everything.
234
+ // Avoid an infinite loop with `tries`
235
+ return getOffsetItem(offset)(nextIndex, {state}, tries - 1);
236
+ }
241
237
 
242
- return nextIndex;
243
- };
238
+ return nextIndex;
239
+ };
244
240
 
245
241
  /**
246
242
  * The default navigation manager of lists. This navigation manager will wrap around when the edge
@@ -1,5 +1,5 @@
1
1
  import {createElemPropsHook} from '@workday/canvas-kit-react/common';
2
- import {useListModel} from '@workday/canvas-kit-react/collection';
2
+ import {useListModel, Item} from '@workday/canvas-kit-react/collection';
3
3
 
4
4
  /**
5
5
  * This elemProps hook allows for children values to be considered identifiers if the children are
@@ -27,9 +27,9 @@ import {useListModel} from '@workday/canvas-kit-react/collection';
27
27
  * ```
28
28
  */
29
29
  export const useListItemAllowChildStrings = createElemPropsHook(useListModel)(
30
- (_, __, elemProps: {'data-id'?: string; children?: React.ReactNode} = {}) => {
30
+ (_, __, elemProps: {'data-id'?: string; children?: React.ReactNode; item?: Item<any>} = {}) => {
31
31
  const props: {'data-id'?: string} = {};
32
- if (!elemProps['data-id'] && typeof elemProps.children === 'string') {
32
+ if (!elemProps['data-id'] && !elemProps.item && typeof elemProps.children === 'string') {
33
33
  props['data-id'] = elemProps.children;
34
34
  }
35
35
 
@@ -45,7 +45,7 @@ export function useListRenderItems<T>(
45
45
  if (React.isValidElement(child)) {
46
46
  return React.cloneElement(child, {
47
47
  key: item.id || item.index,
48
- item: item.value,
48
+ item: item,
49
49
  });
50
50
  }
51
51
  return child;
@@ -57,13 +57,13 @@ export const useComboboxKeyboardTypeAhead = createElemPropsHook(useComboboxModel
57
57
  return -1;
58
58
  };
59
59
 
60
- const currentItem = model.navigation.getItem(model.state.cursorId, model);
61
- const cursorFocusedIndex = currentItem.index;
60
+ const currentItemIndex =
61
+ model.state.items.length > 0 ? model.navigation.getItem(model.state.cursorId, model).index : 0;
62
62
 
63
63
  const handleKeyboardTypeAhead = (key: string, numOptions: number) => {
64
64
  // If the starting point is beyond the list of options, reset it
65
65
  // to the beginning of the list
66
- const startNumber = keySofar.current.length === 0 ? cursorFocusedIndex + 1 : cursorFocusedIndex;
66
+ const startNumber = keySofar.current.length === 0 ? currentItemIndex + 1 : currentItemIndex;
67
67
 
68
68
  const start = startNumber === numOptions ? 0 : startNumber;
69
69
 
@@ -56,8 +56,7 @@ export const useComboboxModel = createModelHook({
56
56
  const menu = useMenuModel(
57
57
  useMenuModel.mergeConfig(config, {
58
58
  onSelect({id}) {
59
- const textValue = menu.navigation.getItem(id, menu).textValue || id;
60
- dispatchInputEvent(menu.state.targetRef.current, textValue);
59
+ dispatchInputEvent(menu.state.targetRef.current, id);
61
60
  },
62
61
  })
63
62
  );
package/common/README.md CHANGED
@@ -10,16 +10,32 @@ yarn add @workday/canvas-kit-react
10
10
 
11
11
  Includes:
12
12
 
13
- - [CanvasProvider](#canvasprovider)
14
- - [InputProvider](#inputprovider)
15
- - [Theming](#theming)
16
- - [Bidirectionality](#bidirectionality)
17
- - [Component Functions](#component-functions)
18
- - [createComponent](#createcomponent)
19
- - [ExtractProps](#extractprops)
20
- - [Common Hooks](#common-hooks)
21
- - [useUniqueId](#useuniqueid)
22
- - [Utility Functions](#utility-functions)
13
+ - [Canvas Kit Common](#canvas-kit-common)
14
+ - [Installation](#installation)
15
+ - [CanvasProvider](#canvasprovider)
16
+ - [Storybook Decorator](#storybook-decorator)
17
+ - [Input Provider](#input-provider)
18
+ - [Definitions](#definitions)
19
+ - [Usage](#usage)
20
+ - [Static Properties](#static-properties)
21
+ - [`InputTypes`](#inputtypes)
22
+ - [Component Props](#component-props)
23
+ - [Required](#required)
24
+ - [Optional](#optional)
25
+ - [`provideIntent: boolean`](#provideintent-boolean)
26
+ - [`container: HTMLElement | React.RefObject<HTMLElement>`](#container-htmlelement--reactrefobjecthtmlelement)
27
+ - [Storybook Decorator](#storybook-decorator-1)
28
+ - [Theming](#theming)
29
+ - [Bidirectionality](#bidirectionality)
30
+ - [Component Functions](#component-functions)
31
+ - [`createComponent`](#createcomponent)
32
+ - [`ExtractProps`](#extractprops)
33
+ - [Common Hooks](#common-hooks)
34
+ - [useUniqueId](#useuniqueid)
35
+ - [Utility Functions](#utility-functions)
36
+ - [generateUniqueId](#generateuniqueid)
37
+ - [setUniqueSeed](#setuniqueseed)
38
+ - [resetUniqueIdCount](#resetuniqueidcount)
23
39
 
24
40
  ## CanvasProvider
25
41
 
@@ -71,7 +87,7 @@ MyStory.decorators = [CanvasProviderDecorator];
71
87
  ### Input Provider
72
88
 
73
89
  This is a higher order (wrapping) component for providing css-referencable data attributes for the
74
- users current input. Focus outlines are required for accesibility, but they can be unnecessary
90
+ users current input. Focus outlines are required for accessibility, but they can be unnecessary
75
91
  visual noise when using a mouse. This allows us to hide focus outlines (as desired) while the user
76
92
  is interacting with components using a mouse, touch, etc. and show them when keyboard navigation
77
93
  begins. This logic is heavily influenced by [what-input](https://github.com/ten1seven/what-input).
@@ -344,7 +360,7 @@ this example, `onClick` doesn't exist on `MyComponent`, but since `MyComponent`
344
360
  If we inspect the `MyNewComponentProps` type, it will return the following:
345
361
 
346
362
  ```tsx
347
- MyComponentProps & React.HTMLAttributes<HTMLElement>
363
+ MyComponentProps & React.HTMLAttributes<HTMLElement>;
348
364
  ```
349
365
 
350
366
  Inside Canvas Kit components, we use `ExtractProps` when we need to extend from the interfaces of
@@ -377,9 +393,11 @@ be returned since there is not HTML attribute interface associated with `Compone
377
393
 
378
394
  ### useUniqueId
379
395
 
380
- A hook to generate a unique identifier for an element. Most commonly used for accessibility. The
396
+ A hook to generate a unique identifier for an element most commonly used for accessibility. The
381
397
  hook will generate a unique id the first render and always return the same id every render. This
382
- uses [generateUniqueId](#generateuniqueid) internally.
398
+ uses [generateUniqueId](#generateuniqueid) internally. You should use `useUniqueId` when you need to
399
+ create a unique ID within a component's render loop. Otherwise, you should opt for
400
+ `generateUniqueId`.
383
401
 
384
402
  ```tsx
385
403
  const MyComponent = () => {
@@ -53,10 +53,10 @@ export function errorRing(error?: ErrorType, theme?: EmotionCanvasTheme): CSSObj
53
53
  borderColor: errorColors.outer,
54
54
  transition: '100ms box-shadow',
55
55
  boxShadow: errorBoxShadow,
56
- '&:hover, &:disabled': {
56
+ '&:hover, &:disabled, &.hover, &.disabled': {
57
57
  borderColor: errorColors.outer,
58
58
  },
59
- '&:focus:not([disabled])': {
59
+ '&:focus-visible:not([disabled]), &.focus:not([disabled])': {
60
60
  borderColor: errorColors.outer,
61
61
  boxShadow: `${errorBoxShadow},
62
62
  0 0 0 2px ${colors.frenchVanilla100},
@@ -1,7 +1,6 @@
1
- import {keyframes, Theme, CSSObject} from '@emotion/react';
2
- import {canvas} from '@workday/canvas-kit-react/tokens';
1
+ import {Theme, CSSObject} from '@emotion/react';
3
2
  import {cssVar} from '@workday/canvas-kit-styling';
4
- import {defaultCanvasTheme} from '../theming/index';
3
+ import {base, brand} from '@workday/canvas-tokens-web';
5
4
 
6
5
  interface FocusRingOptions {
7
6
  width?: number;
@@ -21,7 +20,6 @@ interface FocusRingOptions {
21
20
  function calculateFocusRing({
22
21
  width,
23
22
  separation,
24
- animate,
25
23
  inset,
26
24
  innerColor,
27
25
  outerColor,
@@ -57,15 +55,6 @@ function calculateFocusRing({
57
55
  break;
58
56
  }
59
57
 
60
- if (animate) {
61
- const fadeIn = keyframes({
62
- '0%': {boxShadow},
63
- '100%': {boxShadow},
64
- });
65
-
66
- return {animation: `${fadeIn} 100ms`, boxShadow};
67
- }
68
-
69
58
  return {boxShadow};
70
59
  }
71
60
 
@@ -97,10 +86,8 @@ export function focusRing(options: FocusRingOptions = {}, theme?: Theme): CSSObj
97
86
  width = 2,
98
87
  separation = 0,
99
88
  animate = true,
100
- innerColor = canvas.colors.frenchVanilla100,
101
- outerColor = theme && theme.canvas
102
- ? theme.canvas.palette.common.focusOutline
103
- : defaultCanvasTheme.palette.common.focusOutline,
89
+ innerColor = base.frenchVanilla100,
90
+ outerColor = brand.common.focusOutline,
104
91
  inset,
105
92
  } = options;
106
93
 
@@ -51,7 +51,7 @@ const StyledContainer = common_1.styled('button', {
51
51
  '&:not([disabled])': {
52
52
  '&:focus': {
53
53
  outline: 'none',
54
- ...{ boxShadow: `0 0 0 ${2} ${"--cnvs-base-palette-french-vanilla-100"}, 0 0 0 calc(${"2px"} + ${2}) ${"--cnvs-brand-common-focus-outline"}` },
54
+ ...common_1.focusRing({ separation: 2 }),
55
55
  },
56
56
  },
57
57
  ...common_1.hideMouseFocus,
@@ -16,7 +16,7 @@ const styles = {
16
16
  transition: 'background-color 120ms',
17
17
  '&:focus': {
18
18
  outline: 'none',
19
- ...{ boxShadow: `0 0 0 ${2} ${"--cnvs-base-palette-french-vanilla-100"}, 0 0 0 calc(${"2px"} + ${2}) ${"--cnvs-brand-common-focus-outline"}` },
19
+ ...common_1.focusRing({ separation: 2 }),
20
20
  },
21
21
  ...common_1.hideMouseFocus,
22
22
  };
@@ -31,16 +31,16 @@ const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
31
31
  * Temporary css variables to be used across all Buttons.
32
32
  */
33
33
  exports.buttonVars = {
34
- default: canvas_kit_styling_1.createVars({ id: "css-button-default", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
35
- hover: canvas_kit_styling_1.createVars({ id: "css-button-hover", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
36
- active: canvas_kit_styling_1.createVars({ id: "css-button-active", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
37
- focus: canvas_kit_styling_1.createVars({ id: "css-button-focus", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
38
- disabled: canvas_kit_styling_1.createVars({ id: "css-button-disabled", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
34
+ default: canvas_kit_styling_1.createVars({ id: "cnvs-button-default", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
35
+ hover: canvas_kit_styling_1.createVars({ id: "cnvs-button-hover", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
36
+ active: canvas_kit_styling_1.createVars({ id: "cnvs-button-active", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
37
+ focus: canvas_kit_styling_1.createVars({ id: "cnvs-button-focus", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
38
+ disabled: canvas_kit_styling_1.createVars({ id: "cnvs-button-disabled", args: ["background", "border", "boxShadowInner", "boxShadowOuter", "icon", "label", "opacity", "borderRadius"] }),
39
39
  };
40
40
  /**
41
41
  * Base styles for Buttons.
42
42
  */
43
- const baseButtonStyles = canvas_kit_styling_1.createStyles({ name: "usvn2", styles: "font-family:\"Roboto\", \"Helvetica Neue\", \"Helvetica\", Arial, sans-serif;font-size:0.875rem;line-height:normal;letter-spacing:0.015rem;font-weight:bold;background-color:var(--css-button-default-background, transparent);color:var(--css-button-default-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));border-width:1px;border-style:solid;gap:var(--cnvs-sys-space-x2, calc(0.25rem * 2));border-color:var(--css-button-default-border, transparent);cursor:pointer;display:inline-flex;box-shadow:none;align-items:center;justify-content:center;box-sizing:border-box;outline:2px transparent;white-space:nowrap;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:var(--css-button-default-borderRadius, var(--cnvs-sys-shape-round, calc(0.25rem * 250)));position:relative;vertical-align:middle;overflow:hidden;transition:box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear;&:disabled, &:disabled:active, &.disabled{cursor:default;box-shadow:none;opacity:var(--css-button-disabled-opacity, 1);}& span .wd-icon-fill{transition-duration:40ms;fill:var(--css-button-default-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-default-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}&:focus-visible, &.focus{background-color:var(--css-button-focus-background, transparent);border-color:var(--css-button-focus-border, transparent);color:var(--css-button-focus-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));& span .wd-icon-fill{fill:var(--css-button-focus-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-focus-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}box-shadow:0 0 0 2px var(--css-button-focus-boxShadowInner, var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1))), 0 0 0 calc(2px + 2px) var(--css-button-focus-boxShadowOuter, var(--cnvs-brand-primary-base, rgba(8,117,225,1)));}&:hover, &.hover{background-color:var(--css-button-hover-background, var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1)));border-color:var(--css-button-hover-border, transparent);color:var(--css-button-hover-label-emotion-safe, var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1)));& span .wd-icon-fill{fill:var(--css-button-hover-icon, var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1)));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-hover-icon, var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1)));}}&:hover:active{transition-duration:40ms;}&:active, &.active{background-color:var(--css-button-active-background, transparent);border-color:var(--css-button-active-border, transparent);color:var(--css-button-active-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));& span .wd-icon-fill{fill:var(--css-button-active-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-active-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}}&:disabled, &.disabled{background-color:var(--css-button-disabled-background, transparent);border-color:var(--css-button-disabled-border, transparent);color:var(--css-button-disabled-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));& span .wd-icon-fill{fill:var(--css-button-disabled-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-disabled-icon, var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1)));}}" });
43
+ const baseButtonStyles = canvas_kit_styling_1.createStyles({ name: "ejxkmr", styles: "font-family:\"Roboto\", \"Helvetica Neue\", \"Helvetica\", Arial, sans-serif;font-size:0.875rem;line-height:normal;letter-spacing:0.015rem;font-weight:bold;background-color:var(--cnvs-button-default-background, transparent);color:var(--cnvs-button-default-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400));border-width:1px;border-style:solid;gap:var(--cnvs-sys-space-x2, calc(0.25rem * 2));border-color:var(--cnvs-button-default-border, transparent);cursor:pointer;display:inline-flex;box-shadow:none;align-items:center;justify-content:center;box-sizing:border-box;outline:2px transparent;white-space:nowrap;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:var(--cnvs-button-default-borderRadius, var(--cnvs-sys-shape-round));position:relative;vertical-align:middle;overflow:hidden;transition:box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear;&:disabled, &:disabled:active, &.disabled{cursor:default;box-shadow:none;opacity:var(--cnvs-button-disabled-opacity, 1);}& span .wd-icon-fill{transition-duration:40ms;fill:var(--cnvs-button-default-icon, var(--cnvs-base-palette-black-pepper-400));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--cnvs-button-default-icon, var(--cnvs-base-palette-black-pepper-400));}&:focus-visible, &.focus{background-color:var(--cnvs-button-focus-background, transparent);border-color:var(--cnvs-button-focus-border, transparent);color:var(--cnvs-button-focus-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400));& span .wd-icon-fill{fill:var(--cnvs-button-focus-icon, var(--cnvs-base-palette-black-pepper-400));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--cnvs-button-focus-icon, var(--cnvs-base-palette-black-pepper-400));}box-shadow:0 0 0 2px var(--cnvs-button-focus-boxShadowInner, var(--cnvs-base-palette-french-vanilla-100)), 0 0 0 4px var(--cnvs-button-focus-boxShadowOuter, var(--cnvs-brand-primary-base));}&:hover, &.hover{background-color:var(--cnvs-button-hover-background, var(--cnvs-base-palette-black-pepper-500));border-color:var(--cnvs-button-hover-border, transparent);color:var(--cnvs-button-hover-label-emotion-safe, var(--cnvs-base-palette-black-pepper-500));& span .wd-icon-fill{fill:var(--cnvs-button-hover-icon, var(--cnvs-base-palette-black-pepper-500));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--cnvs-button-hover-icon, var(--cnvs-base-palette-black-pepper-500));}}&:hover:active{transition-duration:40ms;}&:active, &.active{background-color:var(--cnvs-button-active-background, transparent);border-color:var(--cnvs-button-active-border, transparent);color:var(--cnvs-button-active-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400));& span .wd-icon-fill{fill:var(--cnvs-button-active-icon, var(--cnvs-base-palette-black-pepper-400));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--cnvs-button-active-icon, var(--cnvs-base-palette-black-pepper-400));}}&:disabled, &.disabled{background-color:var(--cnvs-button-disabled-background, transparent);border-color:var(--cnvs-button-disabled-border, transparent);color:var(--cnvs-button-disabled-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400));& span .wd-icon-fill{fill:var(--cnvs-button-disabled-icon, var(--cnvs-base-palette-black-pepper-400));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--cnvs-button-disabled-icon, var(--cnvs-base-palette-black-pepper-400));}}" });
44
44
  /**
45
45
  * Button modifiers that will overwrite the base styles of Buttons.
46
46
  * - `Size`: These modifiers will dictate a size of a Button and has a set of styles to associated with it.
@@ -49,24 +49,24 @@ const baseButtonStyles = canvas_kit_styling_1.createStyles({ name: "usvn2", styl
49
49
  */
50
50
  exports.buttonModifiers = canvas_kit_styling_1.createModifiers({
51
51
  size: {
52
- large: canvas_kit_styling_1.createStyles({ name: "usvn3", styles: "font-size:var(--cnvs-sys-space-x4, calc(0.25rem * 4));line-height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));letter-spacing:0.01rem;height:48px;padding-inline:var(--cnvs-sys-space-x8, calc(0.25rem * 8));min-width:112px;" }),
53
- medium: canvas_kit_styling_1.createStyles({ name: "usvn4", styles: "font-size:0.875rem;letter-spacing:0.015rem;min-width:96px;padding-inline:var(--cnvs-sys-space-x6, calc(0.25rem * 6));height:var(--cnvs-sys-space-x10, calc(0.25rem * 10));" }),
54
- small: canvas_kit_styling_1.createStyles({ name: "usvn5", styles: "font-size:0.875rem;letter-spacing:0.015rem;height:var(--cnvs-sys-space-x8, calc(0.25rem * 8));min-width:var(--cnvs-sys-space-x20, calc(0.25rem * 20));padding-inline:var(--cnvs-sys-space-x4, calc(0.25rem * 4));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
55
- extraSmall: canvas_kit_styling_1.createStyles({ name: "usvn6", styles: "font-size:0.75rem;line-height:var(--cnvs-sys-space-x4, calc(0.25rem * 4));letter-spacing:0.02rem;height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));min-width:auto;padding-inline:var(--cnvs-sys-space-x3, calc(0.25rem * 3));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
52
+ large: canvas_kit_styling_1.createStyles({ name: "1vuu82a", styles: "font-size:var(--cnvs-sys-space-x4, calc(0.25rem * 4));line-height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));letter-spacing:0.01rem;height:48px;padding-inline:var(--cnvs-sys-space-x8, calc(0.25rem * 8));min-width:112px;" }),
53
+ medium: canvas_kit_styling_1.createStyles({ name: "1tv5kp2", styles: "font-size:0.875rem;letter-spacing:0.015rem;min-width:96px;padding-inline:var(--cnvs-sys-space-x6, calc(0.25rem * 6));height:var(--cnvs-sys-space-x10, calc(0.25rem * 10));" }),
54
+ small: canvas_kit_styling_1.createStyles({ name: "1bibd9a", styles: "font-size:0.875rem;letter-spacing:0.015rem;height:var(--cnvs-sys-space-x8, calc(0.25rem * 8));min-width:var(--cnvs-sys-space-x20, calc(0.25rem * 20));padding-inline:var(--cnvs-sys-space-x4, calc(0.25rem * 4));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
55
+ extraSmall: canvas_kit_styling_1.createStyles({ name: "jxl8ry", styles: "font-size:0.75rem;line-height:var(--cnvs-sys-space-x4, calc(0.25rem * 4));letter-spacing:0.02rem;height:var(--cnvs-sys-space-x6, calc(0.25rem * 6));min-width:auto;padding-inline:var(--cnvs-sys-space-x3, calc(0.25rem * 3));gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
56
56
  },
57
57
  iconPosition: {
58
- largeOnly: canvas_kit_styling_1.createStyles({ name: "usvn7", styles: "padding:0;min-width:calc(var(--cnvs-sys-space-x4, calc(0.25rem * 4)) * 3);" }),
59
- largeStart: canvas_kit_styling_1.createStyles({ name: "usvn8", styles: "padding-inline-start:var(--cnvs-sys-space-x6, calc(0.25rem * 6));padding-inline-end:var(--cnvs-sys-space-x8, calc(0.25rem * 8));" }),
60
- largeEnd: canvas_kit_styling_1.createStyles({ name: "usvn9", styles: "padding-inline-start:var(--cnvs-sys-space-x8, calc(0.25rem * 8));padding-inline-end:var(--cnvs-sys-space-x6, calc(0.25rem * 6));" }),
61
- mediumOnly: canvas_kit_styling_1.createStyles({ name: "usvna", styles: "padding:0;min-width:var(--cnvs-sys-space-x10, calc(0.25rem * 10));" }),
62
- mediumStart: canvas_kit_styling_1.createStyles({ name: "usvnb", styles: "padding-inline-start:calc(var(--cnvs-sys-space-x1, 0.25rem) * 5);padding-inline-end:var(--cnvs-sys-space-x6, calc(0.25rem * 6));" }),
63
- mediumEnd: canvas_kit_styling_1.createStyles({ name: "usvnc", styles: "padding-inline-start:var(--cnvs-sys-space-x6, calc(0.25rem * 6));padding-inline-end:calc(var(--cnvs-sys-space-x1, 0.25rem) * 5);" }),
64
- smallOnly: canvas_kit_styling_1.createStyles({ name: "usvnd", styles: "padding:0;min-width:var(--cnvs-sys-space-x8, calc(0.25rem * 8));" }),
65
- smallStart: canvas_kit_styling_1.createStyles({ name: "usvne", styles: "padding-inline-start:var(--cnvs-sys-space-x3, calc(0.25rem * 3));padding-inline-end:var(--cnvs-sys-space-x4, calc(0.25rem * 4));" }),
66
- smallEnd: canvas_kit_styling_1.createStyles({ name: "usvnf", styles: "padding-inline-start:var(--cnvs-sys-space-x4, calc(0.25rem * 4));padding-inline-end:var(--cnvs-sys-space-x3, calc(0.25rem * 3));" }),
67
- extraSmallOnly: canvas_kit_styling_1.createStyles({ name: "usvng", styles: "padding:0;min-width:var(--cnvs-sys-space-x6, calc(0.25rem * 6));" }),
68
- extraSmallStart: canvas_kit_styling_1.createStyles({ name: "usvnh", styles: "padding-inline-start:var(--cnvs-sys-space-x2, calc(0.25rem * 2));padding-inline-end:var(--cnvs-sys-space-x3, calc(0.25rem * 3));" }),
69
- extraSmallEnd: canvas_kit_styling_1.createStyles({ name: "usvni", styles: "padding-inline-start:var(--cnvs-sys-space-x3, calc(0.25rem * 3));padding-inline-end:var(--cnvs-sys-space-x2, calc(0.25rem * 2));" }),
58
+ largeOnly: canvas_kit_styling_1.createStyles({ name: "17x7zv9", styles: "padding:0;min-width:calc(var(--cnvs-sys-space-x4, calc(0.25rem * 4)) * 3);" }),
59
+ largeStart: canvas_kit_styling_1.createStyles({ name: "6nuy87", styles: "padding-inline-start:var(--cnvs-sys-space-x6, calc(0.25rem * 6));padding-inline-end:var(--cnvs-sys-space-x8, calc(0.25rem * 8));" }),
60
+ largeEnd: canvas_kit_styling_1.createStyles({ name: "sco5n0", styles: "padding-inline-start:var(--cnvs-sys-space-x8, calc(0.25rem * 8));padding-inline-end:var(--cnvs-sys-space-x6, calc(0.25rem * 6));" }),
61
+ mediumOnly: canvas_kit_styling_1.createStyles({ name: "184b2d3", styles: "padding:0;min-width:var(--cnvs-sys-space-x10, calc(0.25rem * 10));" }),
62
+ mediumStart: canvas_kit_styling_1.createStyles({ name: "1spsu3s", styles: "padding-inline-start:calc(var(--cnvs-sys-space-x1, 0.25rem) * 5);padding-inline-end:var(--cnvs-sys-space-x6, calc(0.25rem * 6));" }),
63
+ mediumEnd: canvas_kit_styling_1.createStyles({ name: "aawort", styles: "padding-inline-start:var(--cnvs-sys-space-x6, calc(0.25rem * 6));padding-inline-end:calc(var(--cnvs-sys-space-x1, 0.25rem) * 5);" }),
64
+ smallOnly: canvas_kit_styling_1.createStyles({ name: "4un8za", styles: "padding:0;min-width:var(--cnvs-sys-space-x8, calc(0.25rem * 8));" }),
65
+ smallStart: canvas_kit_styling_1.createStyles({ name: "996eys", styles: "padding-inline-start:var(--cnvs-sys-space-x3, calc(0.25rem * 3));padding-inline-end:var(--cnvs-sys-space-x4, calc(0.25rem * 4));" }),
66
+ smallEnd: canvas_kit_styling_1.createStyles({ name: "1khaens", styles: "padding-inline-start:var(--cnvs-sys-space-x4, calc(0.25rem * 4));padding-inline-end:var(--cnvs-sys-space-x3, calc(0.25rem * 3));" }),
67
+ extraSmallOnly: canvas_kit_styling_1.createStyles({ name: "uyhf8a", styles: "padding:0;min-width:var(--cnvs-sys-space-x6, calc(0.25rem * 6));" }),
68
+ extraSmallStart: canvas_kit_styling_1.createStyles({ name: "1m2nnkm", styles: "padding-inline-start:var(--cnvs-sys-space-x2, calc(0.25rem * 2));padding-inline-end:var(--cnvs-sys-space-x3, calc(0.25rem * 3));" }),
69
+ extraSmallEnd: canvas_kit_styling_1.createStyles({ name: "11knxyn", styles: "padding-inline-start:var(--cnvs-sys-space-x3, calc(0.25rem * 3));padding-inline-end:var(--cnvs-sys-space-x2, calc(0.25rem * 2));" }),
70
70
  },
71
71
  });
72
72
  function capitalize(string = '') {
@@ -27,7 +27,7 @@ const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
27
27
  const layout_1 = require("@workday/canvas-kit-react/layout");
28
28
  const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
29
29
  const Button_1 = require("./Button");
30
- const deleteStyles = canvas_kit_styling_1.createStyles({ name: "usvn12", styles: "--css-button-default-background:var(--cnvs-brand-error-base, rgba(222,46,33,1));--css-button-default-border:transparent;--css-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--css-button-default-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--css-button-default-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));&:hover, &.hover{--css-button-hover-background:var(--cnvs-brand-error-dark, rgba(163,27,18,1));--css-button-hover-border:transparent;--css-button-hover-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--css-button-hover-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));}&:focus-visible, &.focus{--css-button-focus-background:var(--cnvs-brand-error-base, rgba(222,46,33,1));--css-button-focus-border:transparent;--css-button-focus-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--css-button-focus-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--css-button-focus-boxShadowInner:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-focus-boxShadowOuter:var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));}&:active, &.active{--css-button-active-background:var(--cnvs-brand-error-darkest, rgba(128,22,14,1));--css-button-active-border:transparent;--css-button-active-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--css-button-active-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));}&:disabled, &:active:disabled, &:focus:disabled, &:hover:disabled{--css-button-disabled-background:var(--cnvs-brand-error-light, rgba(252,201,197,1));--css-button-disabled-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--css-button-disabled-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));opacity:1px;}" });
30
+ const deleteStyles = canvas_kit_styling_1.createStyles({ name: "vj7j6z", styles: "--cnvs-button-default-background:var(--cnvs-brand-error-base, rgba(222,46,33,1));--cnvs-button-default-border:transparent;--cnvs-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--cnvs-button-default-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--cnvs-button-default-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));&:hover, &.hover{--cnvs-button-hover-background:var(--cnvs-brand-error-dark, rgba(163,27,18,1));--cnvs-button-hover-border:transparent;--cnvs-button-hover-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--cnvs-button-hover-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));}&:focus-visible, &.focus{--cnvs-button-focus-background:var(--cnvs-brand-error-base, rgba(222,46,33,1));--cnvs-button-focus-border:transparent;--cnvs-button-focus-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--cnvs-button-focus-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--cnvs-button-focus-boxShadowInner:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-focus-boxShadowOuter:var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));}&:active, &.active{--cnvs-button-active-background:var(--cnvs-brand-error-darkest, rgba(128,22,14,1));--cnvs-button-active-border:transparent;--cnvs-button-active-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--cnvs-button-active-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));}&:disabled, &:active:disabled, &:focus:disabled, &:hover:disabled{--cnvs-button-disabled-background:var(--cnvs-brand-error-light, rgba(252,201,197,1));--cnvs-button-disabled-label-emotion-safe:var(--cnvs-brand-error-accent, rgba(255,255,255,1));--cnvs-button-disabled-icon:var(--cnvs-brand-error-accent, rgba(255,255,255,1));opacity:1px;}" });
31
31
  /**
32
32
  * Use sparingly for destructive actions that will result in data loss, can’t be undone, or will
33
33
  * have significant consequences. They commonly appear in confirmation dialogs as the final
@@ -27,10 +27,10 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
27
27
  const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
28
28
  const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
29
29
  const Button_1 = require("./Button");
30
- const primaryStyles = canvas_kit_styling_1.createStyles({ name: "usvny", styles: "--css-button-default-background:var(--cnvs-brand-primary-base, rgba(8,117,225,1));--css-button-default-border:transparent;--css-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--css-button-default-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-default-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-hover-background:var(--cnvs-brand-primary-dark, rgba(0,92,185,1));--css-button-hover-border:transparent;--css-button-hover-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-hover-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-focus-background:var(--cnvs-brand-primary-base, rgba(8,117,225,1));--css-button-focus-border:transparent;--css-button-focus-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-focus-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-focus-boxShadowInner:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-focus-boxShadowOuter:var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));--css-button-active-background:var(--cnvs-brand-primary-darkest, rgba(0,67,135,1));--css-button-active-border:transparent;--css-button-active-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-active-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-disabled-background:var(--cnvs-brand-primary-base, rgba(8,117,225,1));--css-button-disabled-border:transparent;--css-button-disabled-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-disabled-opacity:0.4;--css-button-disabled-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));" });
30
+ const primaryStyles = canvas_kit_styling_1.createStyles({ name: "1pt3ej4", styles: "--cnvs-button-default-background:var(--cnvs-brand-primary-base, rgba(8,117,225,1));--cnvs-button-default-border:transparent;--cnvs-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--cnvs-button-default-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-default-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-hover-background:var(--cnvs-brand-primary-dark, rgba(0,92,185,1));--cnvs-button-hover-border:transparent;--cnvs-button-hover-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-hover-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-focus-background:var(--cnvs-brand-primary-base, rgba(8,117,225,1));--cnvs-button-focus-border:transparent;--cnvs-button-focus-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-focus-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-focus-boxShadowInner:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-focus-boxShadowOuter:var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));--cnvs-button-active-background:var(--cnvs-brand-primary-darkest, rgba(0,67,135,1));--cnvs-button-active-border:transparent;--cnvs-button-active-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-active-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-disabled-background:var(--cnvs-brand-primary-base, rgba(8,117,225,1));--cnvs-button-disabled-border:transparent;--cnvs-button-disabled-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-disabled-opacity:0.4;--cnvs-button-disabled-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));" });
31
31
  exports.primaryButtonModifiers = canvas_kit_styling_1.createModifiers({
32
32
  variant: {
33
- inverse: canvas_kit_styling_1.createStyles({ name: "usvnz", styles: "--css-button-default-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--css-button-default-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-default-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-hover-background:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));--css-button-hover-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-hover-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-focus-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-focus-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-focus-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-focus-boxShadowInner:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-focus-boxShadowOuter:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-active-background:var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));--css-button-active-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-active-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-disabled-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-disabled-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-disabled-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));" }),
33
+ inverse: canvas_kit_styling_1.createStyles({ name: "a2rvr", styles: "--cnvs-button-default-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--cnvs-button-default-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-default-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-hover-background:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));--cnvs-button-hover-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-hover-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-focus-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-focus-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-focus-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-focus-boxShadowInner:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-focus-boxShadowOuter:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-active-background:var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));--cnvs-button-active-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-active-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-disabled-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-disabled-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-disabled-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));" }),
34
34
  },
35
35
  });
36
36
  exports.PrimaryButton = common_1.createComponent('button')({
@@ -27,10 +27,10 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
27
27
  const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
28
28
  const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
29
29
  const Button_1 = require("./Button");
30
- const secondaryStyles = canvas_kit_styling_1.createStyles({ name: "usvn10", styles: "--css-button-default-background:transparent;--css-button-default-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--css-button-default-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-default-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-hover-background:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-hover-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-hover-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-hover-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-focus-background:transparent;--css-button-focus-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-focus-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-focus-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-focus-boxShadowInner:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-focus-boxShadowOuter:var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));--css-button-active-background:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-active-border:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-active-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-active-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--css-button-disabled-background:transparent;--css-button-disabled-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-disabled-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--css-button-disabled-opacity:0.4;--css-button-disabled-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));" });
30
+ const secondaryStyles = canvas_kit_styling_1.createStyles({ name: "193160q", styles: "--cnvs-button-default-background:transparent;--cnvs-button-default-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-default-borderRadius:var(--cnvs-sys-shape-round, calc(0.25rem * 250));--cnvs-button-default-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-default-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-hover-background:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-hover-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-hover-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-hover-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-focus-background:transparent;--cnvs-button-focus-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-focus-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-focus-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-focus-boxShadowInner:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-focus-boxShadowOuter:var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));--cnvs-button-active-background:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-active-border:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-active-label-emotion-safe:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-active-icon:var(--cnvs-brand-primary-accent, rgba(255,255,255,1));--cnvs-button-disabled-background:transparent;--cnvs-button-disabled-border:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-disabled-label-emotion-safe:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));--cnvs-button-disabled-opacity:0.4;--cnvs-button-disabled-icon:var(--cnvs-base-palette-black-pepper-400, rgba(51,51,51,1));" });
31
31
  exports.secondaryButtonModifiers = canvas_kit_styling_1.createModifiers({
32
32
  variant: {
33
- inverse: canvas_kit_styling_1.createStyles({ name: "usvn11", styles: "--css-button-default-background:transparent;--css-button-default-border:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-default-label-emotion-safe:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-default-icon:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-hover-background:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));--css-button-hover-border:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));--css-button-hover-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-hover-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-focus-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-focus-border:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-focus-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-focus-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-focus-boxShadowInner:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-focus-boxShadowOuter:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-active-background:var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));--css-button-active-border:var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));--css-button-active-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-active-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--css-button-disabled-background:transparent;--css-button-disabled-border:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-disabled-label-emotion-safe:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--css-button-disabled-icon:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));" }),
33
+ inverse: canvas_kit_styling_1.createStyles({ name: "tuwrzc", styles: "--cnvs-button-default-background:transparent;--cnvs-button-default-border:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-default-label-emotion-safe:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-default-icon:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-hover-background:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));--cnvs-button-hover-border:var(--cnvs-base-palette-soap-300, rgba(232,235,237,1));--cnvs-button-hover-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-hover-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-focus-background:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-focus-border:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-focus-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-focus-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-focus-boxShadowInner:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-focus-boxShadowOuter:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-active-background:var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));--cnvs-button-active-border:var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));--cnvs-button-active-label-emotion-safe:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-active-icon:var(--cnvs-base-palette-black-pepper-500, rgba(30,30,30,1));--cnvs-button-disabled-background:transparent;--cnvs-button-disabled-border:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-disabled-label-emotion-safe:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));--cnvs-button-disabled-icon:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));" }),
34
34
  },
35
35
  });
36
36
  exports.SecondaryButton = common_1.createComponent('button')({