@workday/canvas-kit-react 7.1.0-next.0 → 7.1.0-next.1

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 (72) hide show
  1. package/action-bar/lib/ActionBarItem.tsx +1 -6
  2. package/checkbox/lib/Checkbox.tsx +106 -54
  3. package/collection/lib/useOverflowListModel.tsx +11 -2
  4. package/common/lib/utils/index.ts +1 -0
  5. package/common/lib/utils/useModalityType.ts +65 -0
  6. package/dist/commonjs/action-bar/lib/ActionBar.d.ts +2 -4
  7. package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
  8. package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +1 -4
  9. package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
  10. package/dist/commonjs/action-bar/lib/ActionBarItem.js +0 -5
  11. package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +2 -0
  12. package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
  13. package/dist/commonjs/checkbox/lib/Checkbox.d.ts +4 -0
  14. package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
  15. package/dist/commonjs/checkbox/lib/Checkbox.js +65 -34
  16. package/dist/commonjs/collection/lib/useOverflowListModel.d.ts +10 -0
  17. package/dist/commonjs/collection/lib/useOverflowListModel.d.ts.map +1 -1
  18. package/dist/commonjs/collection/lib/useOverflowListModel.js +10 -4
  19. package/dist/commonjs/common/lib/utils/index.d.ts +1 -0
  20. package/dist/commonjs/common/lib/utils/index.d.ts.map +1 -1
  21. package/dist/commonjs/common/lib/utils/index.js +1 -0
  22. package/dist/commonjs/common/lib/utils/useModalityType.d.ts +17 -0
  23. package/dist/commonjs/common/lib/utils/useModalityType.d.ts.map +1 -0
  24. package/dist/commonjs/common/lib/utils/useModalityType.js +63 -0
  25. package/dist/commonjs/radio/lib/Radio.d.ts +1 -0
  26. package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
  27. package/dist/commonjs/radio/lib/Radio.js +74 -26
  28. package/dist/commonjs/tabs/lib/Tabs.d.ts +1 -0
  29. package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
  30. package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
  31. package/dist/commonjs/tabs/lib/TabsItem.js +4 -3
  32. package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
  33. package/dist/commonjs/tabs/lib/TabsList.js +17 -2
  34. package/dist/commonjs/tabs/lib/useTabsModel.d.ts +55 -159
  35. package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
  36. package/dist/commonjs/tabs/lib/useTabsModel.js +2 -0
  37. package/dist/es6/action-bar/lib/ActionBar.d.ts +2 -4
  38. package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
  39. package/dist/es6/action-bar/lib/ActionBarItem.d.ts +1 -4
  40. package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
  41. package/dist/es6/action-bar/lib/ActionBarItem.js +1 -6
  42. package/dist/es6/action-bar/lib/useActionBarModel.d.ts +2 -0
  43. package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
  44. package/dist/es6/checkbox/lib/Checkbox.d.ts +4 -0
  45. package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
  46. package/dist/es6/checkbox/lib/Checkbox.js +65 -34
  47. package/dist/es6/collection/lib/useOverflowListModel.d.ts +10 -0
  48. package/dist/es6/collection/lib/useOverflowListModel.d.ts.map +1 -1
  49. package/dist/es6/collection/lib/useOverflowListModel.js +10 -4
  50. package/dist/es6/common/lib/utils/index.d.ts +1 -0
  51. package/dist/es6/common/lib/utils/index.d.ts.map +1 -1
  52. package/dist/es6/common/lib/utils/index.js +1 -0
  53. package/dist/es6/common/lib/utils/useModalityType.d.ts +17 -0
  54. package/dist/es6/common/lib/utils/useModalityType.d.ts.map +1 -0
  55. package/dist/es6/common/lib/utils/useModalityType.js +56 -0
  56. package/dist/es6/radio/lib/Radio.d.ts +1 -0
  57. package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
  58. package/dist/es6/radio/lib/Radio.js +74 -26
  59. package/dist/es6/tabs/lib/Tabs.d.ts +1 -0
  60. package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
  61. package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
  62. package/dist/es6/tabs/lib/TabsItem.js +5 -4
  63. package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
  64. package/dist/es6/tabs/lib/TabsList.js +18 -3
  65. package/dist/es6/tabs/lib/useTabsModel.d.ts +55 -159
  66. package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
  67. package/dist/es6/tabs/lib/useTabsModel.js +3 -1
  68. package/package.json +5 -5
  69. package/radio/lib/Radio.tsx +98 -29
  70. package/tabs/lib/TabsItem.tsx +4 -3
  71. package/tabs/lib/TabsList.tsx +23 -4
  72. package/tabs/lib/useTabsModel.tsx +3 -1
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
- import {composeHooks, EllipsisText, createSubcomponent} from '@workday/canvas-kit-react/common';
3
- import {SystemIcon} from '@workday/canvas-kit-react/icon';
2
+ import {composeHooks, createSubcomponent} from '@workday/canvas-kit-react/common';
4
3
  import {SecondaryButton} from '@workday/canvas-kit-react/button';
5
4
  import {
6
5
  useListItemRegister,
@@ -37,10 +36,6 @@ export const ActionBarItem = createSubcomponent(SecondaryButton)({
37
36
  displayName: 'ActionBar.Item',
38
37
  modelHook: useActionBarModel,
39
38
  elemPropsHook: useActionBarItem,
40
- subComponents: {
41
- Icon: SystemIcon,
42
- Text: EllipsisText,
43
- },
44
39
  })<ActionBarItemProps>((elemProps, Element) => {
45
40
  return <Element {...elemProps} />;
46
41
  });
@@ -58,6 +58,10 @@ export interface CheckboxProps extends Themeable {
58
58
  * @default false
59
59
  */
60
60
  indeterminate?: boolean;
61
+ /**
62
+ * The variant for the checkbox
63
+ */
64
+ variant?: 'inverse' | undefined;
61
65
  }
62
66
 
63
67
  const checkboxHeight = 18;
@@ -87,16 +91,20 @@ const CheckboxInputWrapper = styled('div')<Pick<CheckboxProps, 'disabled'>>({
87
91
  alignSelf: 'flex-start',
88
92
  });
89
93
 
90
- const CheckboxRipple = styled('span')<Pick<CheckboxProps, 'disabled'>>({
91
- borderRadius: borderRadius.circle,
92
- boxShadow: `0 0 0 0 ${colors.soap200}`,
93
- height: checkboxHeight,
94
- transition: 'box-shadow 150ms ease-out',
95
- width: checkboxWidth,
96
- position: 'absolute',
97
- pointerEvents: 'none', // This is a decorative element we don't want it to block clicks to input
98
- zIndex: -1,
99
- });
94
+ const CheckboxRipple = styled('span')<Pick<CheckboxProps, 'disabled' | 'variant'>>(
95
+ {
96
+ borderRadius: borderRadius.circle,
97
+ boxShadow: `0 0 0 0 ${colors.soap200}`,
98
+ height: checkboxHeight,
99
+ transition: 'box-shadow 150ms ease-out',
100
+ width: checkboxWidth,
101
+ position: 'absolute',
102
+ pointerEvents: 'none', // This is a decorative element we don't want it to block clicks to input
103
+ },
104
+ ({variant}) => ({
105
+ opacity: variant === 'inverse' ? '0.4' : '1',
106
+ })
107
+ );
100
108
 
101
109
  /**
102
110
  * Note: `~ div:first-of-type` refers to `CheckboxBackground`
@@ -112,6 +120,7 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
112
120
  },
113
121
  },
114
122
  },
123
+ variant,
115
124
  }) => ({
116
125
  borderRadius: borderRadius.s,
117
126
  width: checkboxTapArea,
@@ -129,20 +138,21 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
129
138
  // States
130
139
  '&:not(:checked):not(:disabled):not(:focus):hover, &:not(:checked):not(:disabled):active': {
131
140
  '~ div:first-of-type': {
132
- borderColor: inputColors.hoverBorder,
141
+ borderColor: variant === 'inverse' ? colors.soap300 : inputColors.hoverBorder,
133
142
  },
134
143
  },
135
144
  '&:checked ~ div:first-of-type': {
136
- borderColor: themePrimary.main,
137
- backgroundColor: themePrimary.main,
145
+ borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.main,
146
+ backgroundColor: variant === 'inverse' ? colors.frenchVanilla100 : themePrimary.main,
138
147
  },
139
148
  '&:disabled ~ div:first-of-type': {
140
149
  borderColor: inputColors.disabled.border,
141
- backgroundColor: inputColors.disabled.background,
150
+ backgroundColor: variant === 'inverse' ? colors.soap300 : inputColors.disabled.background,
151
+ opacity: variant === 'inverse' ? '.4' : '1',
142
152
  },
143
153
  '&:disabled:checked ~ div:first-of-type': {
144
- borderColor: themePrimary.light,
145
- backgroundColor: themePrimary.light,
154
+ borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
155
+ backgroundColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
146
156
  },
147
157
 
148
158
  // Focus
@@ -150,30 +160,48 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
150
160
  outline: 'none',
151
161
  },
152
162
  '&:focus ~ div:first-of-type': {
153
- borderColor: themePrimary.main,
163
+ borderColor: variant === 'inverse' ? colors.blackPepper400 : themePrimary.main,
154
164
  borderWidth: '2px',
155
165
  boxShadow: 'none',
166
+ ...focusRing({
167
+ width: variant === 'inverse' ? 2 : 0,
168
+ separation: 0,
169
+ animate: false,
170
+ innerColor: variant === 'inverse' ? colors.blackPepper400 : undefined,
171
+ outerColor: variant === 'inverse' ? colors.frenchVanilla100 : undefined,
172
+ }),
156
173
  },
157
174
  '&:checked:focus ~ div:first-of-type': {
158
- ...focusRing({width: 2, separation: 2, animate: false, outerColor: themeFocusOutline}),
175
+ ...focusRing({
176
+ width: 2,
177
+ separation: 2,
178
+ animate: false,
179
+ innerColor: variant === 'inverse' ? colors.blackPepper400 : undefined,
180
+ outerColor: variant === 'inverse' ? colors.frenchVanilla100 : themeFocusOutline,
181
+ }),
182
+ borderColor: variant === 'inverse' ? colors.frenchVanilla100 : themePrimary.main,
183
+ borderWidth: '2px',
159
184
  '& span': {
160
185
  marginLeft: '-7px',
161
186
  },
162
187
  },
163
188
  ...mouseFocusBehavior({
164
189
  '&:focus ~ div:first-of-type': {
165
- border: `1px solid ${inputColors.hoverBorder}`,
190
+ border:
191
+ variant === 'inverse'
192
+ ? `1px solid ${colors.soap300}`
193
+ : `1px solid ${inputColors.hoverBorder}`,
166
194
  boxShadow: 'none',
167
195
  '& span': {
168
196
  marginLeft: '-6px',
169
197
  },
170
198
  },
171
199
  '&:checked ~ div:first-of-type': {
172
- borderColor: themePrimary.main,
200
+ borderColor: variant === 'inverse' ? colors.soap300 : themePrimary.main,
173
201
  },
174
202
  '&:disabled:checked ~ div:first-of-type': {
175
203
  borderColor: themePrimary.light,
176
- backgroundColor: themePrimary.light,
204
+ backgroundColor: variant === 'inverse' ? colors.soap300 : themePrimary.light,
177
205
  },
178
206
  }),
179
207
  }),
@@ -182,7 +210,7 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
182
210
  boxShadow: disabled ? undefined : `0 0 0 ${rippleRadius}px ${colors.soap200}`,
183
211
  },
184
212
  }),
185
- ({theme, error}) => {
213
+ ({theme, error, variant}) => {
186
214
  const errorColors = getErrorColors(error, theme);
187
215
 
188
216
  if (errorColors.outer === errorColors.inner) {
@@ -191,24 +219,24 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
191
219
 
192
220
  const errorStyles = {
193
221
  '& ~ div:first-of-type': {
194
- border: `1px solid ${errorColors.inner}`,
222
+ border:
223
+ variant === 'inverse' ? `1px solid ${colors.soap300}` : `1px solid ${errorColors.inner}`,
195
224
  boxShadow: `0 0 0 1px ${errorColors.inner}, 0 0 0 2px ${errorColors.outer}`,
196
225
  },
197
226
  '&:not(:checked):not(:disabled):not(:focus):hover, &:not(:checked):not(:disabled):active': {
198
227
  '~ div:first-of-type': {
199
- borderColor: errorColors.inner,
228
+ borderColor: variant === 'inverse' ? `1px solid ${colors.soap300}` : errorColors.inner,
200
229
  },
201
230
  },
202
231
  '&:checked ~ div:first-of-type': {
203
- borderColor: theme.canvas.palette.primary.main,
232
+ borderColor: variant === 'inverse' ? colors.soap300 : theme.canvas.palette.primary.main,
204
233
  boxShadow: `
205
- 0 0 0 2px ${colors.frenchVanilla100},
206
- 0 0 0 4px ${errorColors.inner},
207
- 0 0 0 5px ${errorColors.outer}`,
234
+ 0 0 0 2px ${colors.frenchVanilla100},
235
+ 0 0 0 4px ${errorColors.inner},
236
+ 0 0 0 5px ${errorColors.outer}`,
208
237
  },
209
238
  };
210
239
  return {
211
- ...errorStyles,
212
240
  // Error rings take precedence over focus
213
241
  ...mouseFocusBehavior({
214
242
  ...errorStyles,
@@ -217,25 +245,30 @@ const CheckboxInput = styled('input')<CheckboxProps & StyledType>(
217
245
  boxShadow: `0 0 0 1px ${errorColors.inner}, 0 0 0 2px ${errorColors.outer}`,
218
246
  },
219
247
  }),
248
+ ...errorStyles,
220
249
  };
221
250
  }
222
251
  );
223
252
 
224
- const CheckboxBackground = styled('div')<CheckboxProps>({
225
- alignItems: 'center',
226
- backgroundColor: colors.frenchVanilla100,
227
- borderRadius: borderRadius.s,
228
- border: '1px solid ' + inputColors.border,
229
- boxSizing: 'border-box',
230
- display: 'flex',
231
- height: checkboxHeight,
232
- justifyContent: 'center',
233
- padding: '0px 2px',
234
- pointerEvents: 'none',
235
- position: 'absolute',
236
- transition: 'border 200ms ease, background 200ms',
237
- width: checkboxWidth,
238
- });
253
+ const CheckboxBackground = styled('div')<CheckboxProps>(
254
+ {
255
+ alignItems: 'center',
256
+ backgroundColor: colors.frenchVanilla100,
257
+ borderRadius: borderRadius.s,
258
+ boxSizing: 'border-box',
259
+ display: 'flex',
260
+ height: checkboxHeight,
261
+ justifyContent: 'center',
262
+ padding: '0px 2px',
263
+ pointerEvents: 'none',
264
+ position: 'absolute',
265
+ transition: 'border 200ms ease, background 200ms',
266
+ width: checkboxWidth,
267
+ },
268
+ ({variant}) => ({
269
+ border: `1px solid ${variant === 'inverse' ? colors.soap300 : inputColors.border}`,
270
+ })
271
+ );
239
272
 
240
273
  const CheckboxCheck = styled('div')<Pick<CheckboxProps, 'checked'>>(
241
274
  {
@@ -261,22 +294,32 @@ const CheckboxCheck = styled('div')<Pick<CheckboxProps, 'checked'>>(
261
294
  })
262
295
  );
263
296
 
264
- const IndeterminateBox = styled('div')(
297
+ const IndeterminateBox = styled('div')<CheckboxProps>(
265
298
  {
266
299
  width: '10px',
267
300
  height: '2px',
268
301
  },
269
- ({theme}) => ({
270
- backgroundColor: theme.canvas.palette.primary.contrast,
302
+ ({theme, variant}) => ({
303
+ backgroundColor:
304
+ variant === 'inverse'
305
+ ? theme.canvas.palette.primary.main
306
+ : theme.canvas.palette.primary.contrast,
271
307
  })
272
308
  );
273
309
 
274
- const CheckboxLabel = styled('label')<{disabled?: boolean}>(
310
+ const CheckboxLabel = styled('label')<{disabled?: boolean; variant?: string}>(
275
311
  {
276
312
  ...canvas.type.levels.subtext.large,
277
313
  paddingLeft: checkboxLabelDistance,
278
314
  },
279
- ({disabled}) => (disabled ? {color: inputColors.disabled.text} : {cursor: 'pointer'})
315
+ ({variant}) => (variant === 'inverse' ? {color: colors.frenchVanilla100} : undefined),
316
+ ({disabled, variant}) =>
317
+ disabled
318
+ ? {
319
+ color: variant === 'inverse' ? colors.frenchVanilla100 : inputColors.disabled.text,
320
+ opacity: variant === 'inverse' ? '.4' : '1',
321
+ }
322
+ : {cursor: 'pointer'}
280
323
  );
281
324
 
282
325
  export const Checkbox = createComponent('input')({
@@ -294,6 +337,7 @@ export const Checkbox = createComponent('input')({
294
337
  value,
295
338
  error,
296
339
  indeterminate,
340
+ variant,
297
341
  ...elemProps
298
342
  }: CheckboxProps,
299
343
  ref,
@@ -313,22 +357,30 @@ export const Checkbox = createComponent('input')({
313
357
  type="checkbox"
314
358
  value={value}
315
359
  error={error}
360
+ variant={variant}
316
361
  aria-checked={indeterminate ? 'mixed' : checked}
317
362
  {...elemProps}
318
363
  />
319
- <CheckboxRipple />
320
- <CheckboxBackground checked={checked} disabled={disabled}>
364
+ <CheckboxRipple variant={variant} />
365
+ <CheckboxBackground variant={variant} checked={checked} disabled={disabled}>
321
366
  <CheckboxCheck checked={checked}>
322
367
  {indeterminate ? (
323
- <IndeterminateBox />
368
+ <IndeterminateBox variant={variant} />
324
369
  ) : (
325
- <SystemIcon icon={checkSmallIcon} color={theme.canvas.palette.primary.contrast} />
370
+ <SystemIcon
371
+ icon={checkSmallIcon}
372
+ color={
373
+ variant === 'inverse'
374
+ ? theme.canvas.palette.primary.main
375
+ : theme.canvas.palette.primary.contrast
376
+ }
377
+ />
326
378
  )}
327
379
  </CheckboxCheck>
328
380
  </CheckboxBackground>
329
381
  </CheckboxInputWrapper>
330
382
  {label && (
331
- <CheckboxLabel htmlFor={inputId} disabled={disabled}>
383
+ <CheckboxLabel variant={variant} htmlFor={inputId} disabled={disabled}>
332
384
  {label}
333
385
  </CheckboxLabel>
334
386
  )}
@@ -55,10 +55,17 @@ export const useOverflowListModel = createModelHook({
55
55
  ...useSelectionListModel.defaultConfig,
56
56
  initialHiddenIds: [] as string[],
57
57
  containerWidth: 0,
58
+ /**
59
+ * Determines if overflow should actually occur. For example, touch devices are better at
60
+ * side-scrolling than mouse devices. In these cases, it makes sense to disable overflowing.
61
+ * @default true
62
+ */ shouldCalculateOverflow: true,
58
63
  },
59
64
  requiredConfig: useSelectionListModel.requiredConfig,
60
65
  contextOverride: useSelectionListModel.Context,
61
66
  })(config => {
67
+ const shouldCalculateOverflow =
68
+ config.shouldCalculateOverflow === undefined ? true : config.shouldCalculateOverflow;
62
69
  const [hiddenIds, setHiddenIds] = React.useState(config.initialHiddenIds);
63
70
  const [itemWidthCache, setItemWidthCache] = React.useState<Record<string, number>>({});
64
71
  const [containerWidth, setContainerWidth] = React.useState(0);
@@ -67,9 +74,11 @@ export const useOverflowListModel = createModelHook({
67
74
  const [overflowTargetWidth, setOverflowTargetWidth] = React.useState(0);
68
75
  const overflowTargetWidthRef = React.useRef(0);
69
76
 
77
+ const internalHiddenIds = shouldCalculateOverflow ? hiddenIds : [];
78
+
70
79
  // Cursors skip over disabled ids, but know nothing of hidden ids. We'll go ahead and disable
71
80
  // hidden ids as well
72
- const nonInteractiveIds = (config.nonInteractiveIds || []).concat(hiddenIds);
81
+ const nonInteractiveIds = (config.nonInteractiveIds || []).concat(internalHiddenIds);
73
82
 
74
83
  const model = useSelectionListModel({
75
84
  ...config,
@@ -78,7 +87,7 @@ export const useOverflowListModel = createModelHook({
78
87
 
79
88
  const state = {
80
89
  ...model.state,
81
- hiddenIds,
90
+ hiddenIds: internalHiddenIds,
82
91
  itemWidthCache,
83
92
  containerWidth,
84
93
  overflowTargetWidth,
@@ -12,6 +12,7 @@ export * from './models';
12
12
  export * from './elements';
13
13
  export * from './useConstant';
14
14
  export * from './useIsFullscreen';
15
+ export * from './useModalityType';
15
16
  export * from './useWindowSize';
16
17
  export * from './useResizeObserver';
17
18
  export * from './StaticStates';
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+
3
+ type Modality = 'mouse' | 'touch' | 'pen';
4
+
5
+ // Use this shared global value to reduce calls to localStorage which is a synchronous API to a
6
+ // drive which could be slow (spinning disks could be hundreds of ms). We read only once this way.
7
+ // The following initialization is very difficult to test via automation. Don't mess with it unless
8
+ // you plan to manually test.
9
+ //
10
+ // 1. Initialize modality to localStorage
11
+ // a. if localStorage isn't primed, use clientWidth of the browsers
12
+ // b. if < 768, default to 'touch'
13
+ // c. else default to 'mouse'
14
+ const localStorageValue = 'mouse' as Modality; //((typeof localStorage !== 'undefined'
15
+ // ? localStorage.getItem('modality')
16
+ // : '') ||
17
+ // (typeof document !== 'undefined'
18
+ // ? document.documentElement.clientWidth < 768
19
+ // ? 'touch'
20
+ // : ''
21
+ // : '') ||
22
+ // 'mouse') as Modality;
23
+
24
+ // Update the `localStorageValue`, but conditionally update localStorage only if the value has
25
+ // changed. This prevents too many calls to `localStorage` which can be costly on spinning disk
26
+ // drives
27
+ const updateLocalStorage = (value: Modality) => {
28
+ // if (localStorageValue !== value) {
29
+ // localStorage.setItem('modality', value);
30
+ // }
31
+ // localStorageValue = value;
32
+ };
33
+
34
+ /**
35
+ * Uses heuristics to determine if the user is on a touch device, uses a pen, or a mouse. This hook
36
+ * is useful if you have styles or behaviors that depend on the user's interaction type. For
37
+ * example, touch users can scroll horizontally easier than mouse users, so horizontal overflow
38
+ * might be more desired than overflow menus on touch devices. For devices that support multiple
39
+ * input types, the last used input type is saved. For these devices, consider the possibility this
40
+ * value could change after your component is rendered, so make sure you component rerenders
41
+ * properly in this case.
42
+ *
43
+ * Uses `PointerEvent.pointerType` to determine last used input.
44
+ *
45
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType
46
+ */
47
+ export const useModalityType = (): Modality => {
48
+ const [modality, setModality] = React.useState(localStorageValue);
49
+
50
+ React.useEffect(() => {
51
+ const handlePointerDown = (event: PointerEvent) => {
52
+ const value = event.pointerType as Modality;
53
+ setModality(value);
54
+ updateLocalStorage(value);
55
+ };
56
+
57
+ document.addEventListener('pointerdown', handlePointerDown);
58
+
59
+ return () => {
60
+ document.removeEventListener('pointerdown', handlePointerDown);
61
+ };
62
+ }, []);
63
+
64
+ return modality;
65
+ };
@@ -30,6 +30,7 @@ export declare const ActionBar: import("../../common").ComponentM<ActionBarProps
30
30
  }>;
31
31
  initialHiddenIds: string[];
32
32
  containerWidth: number;
33
+ shouldCalculateOverflow: boolean;
33
34
  initialSelectedIds: import("../../collection/lib/useSelectionListModel").SelectedIds;
34
35
  initialUnselectedIds: string[];
35
36
  selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
@@ -1682,10 +1683,7 @@ export declare const ActionBar: import("../../common").ComponentM<ActionBarProps
1682
1683
  selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
1683
1684
  navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
1684
1685
  getId: (item: any) => string;
1685
- }> & {
1686
- Icon: import("../../common").ElementComponent<"span", import("../..").SystemIconProps>;
1687
- Text: import("../../common").ElementComponent<"span", {}>;
1688
- };
1686
+ }>;
1689
1687
  OverflowButton: import("../../common").ElementCom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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
@@ -211,8 +211,5 @@ export declare const ActionBarItem: import("../../common").ElementComponentM<imp
211
211
  selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
212
212
  navigation: import("../../collection/lib/useCursorListModel").NavigationManager;
213
213
  getId: (item: any) => string;
214
- }> & {
215
- Icon: import("../../common").ElementComponent<"span", import("../../icon").SystemIconProps>;
216
- Text: import("../../common").ElementComponent<"span", {}>;
217
- };
214
+ }>;
218
215
  //# sourceMappingURL=ActionBarItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAI5B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUxB,CAAC"}
1
+ {"version":3,"file":"ActionBarItem.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAI5B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC"}
@@ -33,7 +33,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
33
33
  exports.ActionBarItem = exports.useActionBarItem = void 0;
34
34
  var React = __importStar(require("react"));
35
35
  var common_1 = require("@workday/canvas-kit-react/common");
36
- var icon_1 = require("@workday/canvas-kit-react/icon");
37
36
  var button_1 = require("@workday/canvas-kit-react/button");
38
37
  var collection_1 = require("@workday/canvas-kit-react/collection");
39
38
  var useActionBarModel_1 = require("./useActionBarModel");
@@ -42,10 +41,6 @@ exports.ActionBarItem = common_1.createSubcomponent(button_1.SecondaryButton)({
42
41
  displayName: 'ActionBar.Item',
43
42
  modelHook: useActionBarModel_1.useActionBarModel,
44
43
  elemPropsHook: exports.useActionBarItem,
45
- subComponents: {
46
- Icon: icon_1.SystemIcon,
47
- Text: common_1.EllipsisText,
48
- },
49
44
  })(function (elemProps, Element) {
50
45
  return React.createElement(Element, __assign({}, elemProps));
51
46
  });
@@ -33,6 +33,7 @@ export declare const useActionBarModel: (<TT_Special_Generic>(config?: (Partial<
33
33
  }>;
34
34
  initialHiddenIds: string[];
35
35
  containerWidth: number;
36
+ shouldCalculateOverflow: boolean;
36
37
  initialSelectedIds: import("../../collection/lib/useSelectionListModel").SelectedIds;
37
38
  initialUnselectedIds: string[];
38
39
  selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
@@ -1425,6 +1426,7 @@ export declare const useActionBarModel: (<TT_Special_Generic>(config?: (Partial<
1425
1426
  }>;
1426
1427
  initialHiddenIds: string[];
1427
1428
  containerWidth: number;
1429
+ shouldCalculateOverflow: boolean;
1428
1430
  initialSelectedIds: import("../../collection/lib/useSelectionListModel").SelectedIds;
1429
1431
  initialUnselectedIds: string[];
1430
1432
  selection: import("../../collection/lib/useSelectionListModel").SelectionManager;
@@ -1 +1 @@
1
- {"version":3,"file":"useActionBarModel.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/useActionBarModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,iBAAiB;IAG1B;;;OAGG;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ckboxProps extends Themeable {
38
38
  * @default false
39
39
  */
40
40
  indeterminate?: boolean;
41
+ /**
42
+ * The variant for the checkbox
43
+ */
44
+ variant?: 'inverse' | undefined;
41
45
  }
42
46
  export declare const Checkbox: import("../../common").ElementComponent<"input", CheckboxProps> & {
43
47
  ErrorType: typeof ErrorType;
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAOT,SAAS,EACV,MAAM,kCAAkC,CAAC;AAU1C,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA6ND,eAAO,MAAM,QAAQ;;CA2DnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../checkbox/lib/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,SAAS,EAOT,SAAS,EACV,MAAM,kCAAkC,CAAC;AAU1C,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,OAAO,CA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