@workday/canvas-kit-preview-react 7.0.0-alpha.106-next.2 → 7.0.0-alpha.129-next.3

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 (150) hide show
  1. package/breadcrumbs/index.ts +0 -4
  2. package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +3 -5
  3. package/breadcrumbs/package.json +2 -1
  4. package/color-picker/README.md +1 -1
  5. package/color-picker/index.ts +1 -1
  6. package/color-picker/lib/ColorPicker.tsx +2 -3
  7. package/color-picker/package.json +2 -1
  8. package/dist/commonjs/breadcrumbs/index.d.ts +0 -3
  9. package/dist/commonjs/breadcrumbs/index.d.ts.map +1 -1
  10. package/dist/commonjs/breadcrumbs/index.js +0 -4
  11. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
  12. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +2 -14
  13. package/dist/commonjs/color-picker/index.d.ts +1 -1
  14. package/dist/commonjs/color-picker/index.d.ts.map +1 -1
  15. package/dist/commonjs/color-picker/index.js +2 -6
  16. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts +1 -2
  17. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
  18. package/dist/commonjs/color-picker/lib/ColorPicker.js +5 -4
  19. package/dist/commonjs/menu/index.d.ts +1 -4
  20. package/dist/commonjs/menu/index.d.ts.map +1 -1
  21. package/dist/commonjs/menu/index.js +1 -9
  22. package/dist/commonjs/menu/lib/Menu.d.ts +1 -1
  23. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  24. package/dist/commonjs/menu/lib/Menu.js +3 -2
  25. package/dist/commonjs/menu/lib/MenuItem.d.ts +1 -2
  26. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  27. package/dist/commonjs/menu/lib/MenuItem.js +2 -1
  28. package/dist/commonjs/pill/lib/Pill.d.ts +7 -0
  29. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
  30. package/dist/commonjs/pill/lib/Pill.js +11 -4
  31. package/dist/commonjs/pill/lib/PillAvatar.d.ts +1 -0
  32. package/dist/commonjs/pill/lib/PillAvatar.d.ts.map +1 -1
  33. package/dist/commonjs/pill/lib/PillAvatar.js +1 -1
  34. package/dist/commonjs/pill/lib/PillIcon.d.ts +1 -0
  35. package/dist/commonjs/pill/lib/PillIcon.d.ts.map +1 -1
  36. package/dist/commonjs/pill/lib/PillIcon.js +1 -1
  37. package/dist/commonjs/pill/lib/PillIconButton.d.ts +6 -0
  38. package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -1
  39. package/dist/commonjs/pill/lib/PillIconButton.js +17 -24
  40. package/dist/commonjs/pill/lib/PillLabel.d.ts +1 -0
  41. package/dist/commonjs/pill/lib/PillLabel.d.ts.map +1 -1
  42. package/dist/commonjs/pill/lib/PillLabel.js +1 -1
  43. package/dist/commonjs/pill/lib/usePillModel.d.ts +13 -0
  44. package/dist/commonjs/pill/lib/usePillModel.d.ts.map +1 -1
  45. package/dist/commonjs/pill/lib/usePillModel.js +7 -1
  46. package/dist/commonjs/select/index.d.ts +0 -3
  47. package/dist/commonjs/select/index.d.ts.map +1 -1
  48. package/dist/commonjs/select/index.js +0 -7
  49. package/dist/commonjs/select/lib/Select.d.ts +0 -1
  50. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  51. package/dist/commonjs/select/lib/Select.js +2 -6
  52. package/dist/commonjs/select/lib/SelectBase.d.ts +2 -2
  53. package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
  54. package/dist/commonjs/select/lib/SelectBase.js +6 -9
  55. package/dist/commonjs/select/lib/SelectMenu.d.ts +2 -2
  56. package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
  57. package/dist/commonjs/select/lib/SelectMenu.js +2 -2
  58. package/dist/commonjs/select/lib/SelectOption.d.ts +1 -2
  59. package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
  60. package/dist/commonjs/select/lib/SelectOption.js +2 -1
  61. package/dist/commonjs/side-panel/index.d.ts +0 -3
  62. package/dist/commonjs/side-panel/index.d.ts.map +1 -1
  63. package/dist/commonjs/side-panel/index.js +0 -7
  64. package/dist/commonjs/side-panel/lib/SidePanel.d.ts +1 -2
  65. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  66. package/dist/commonjs/side-panel/lib/SidePanel.js +3 -3
  67. package/dist/es6/breadcrumbs/index.d.ts +0 -3
  68. package/dist/es6/breadcrumbs/index.d.ts.map +1 -1
  69. package/dist/es6/breadcrumbs/index.js +0 -3
  70. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
  71. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +2 -14
  72. package/dist/es6/color-picker/index.d.ts +1 -1
  73. package/dist/es6/color-picker/index.d.ts.map +1 -1
  74. package/dist/es6/color-picker/index.js +1 -1
  75. package/dist/es6/color-picker/lib/ColorPicker.d.ts +1 -2
  76. package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
  77. package/dist/es6/color-picker/lib/ColorPicker.js +2 -3
  78. package/dist/es6/menu/index.d.ts +1 -4
  79. package/dist/es6/menu/index.d.ts.map +1 -1
  80. package/dist/es6/menu/index.js +1 -4
  81. package/dist/es6/menu/lib/Menu.d.ts +1 -1
  82. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  83. package/dist/es6/menu/lib/Menu.js +2 -2
  84. package/dist/es6/menu/lib/MenuItem.d.ts +1 -2
  85. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  86. package/dist/es6/menu/lib/MenuItem.js +1 -1
  87. package/dist/es6/pill/lib/Pill.d.ts +14 -7
  88. package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
  89. package/dist/es6/pill/lib/Pill.js +11 -4
  90. package/dist/es6/pill/lib/PillAvatar.d.ts +2 -2
  91. package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -1
  92. package/dist/es6/pill/lib/PillAvatar.js +1 -1
  93. package/dist/es6/pill/lib/PillIcon.d.ts +2 -2
  94. package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -1
  95. package/dist/es6/pill/lib/PillIcon.js +1 -1
  96. package/dist/es6/pill/lib/PillIconButton.d.ts +7 -2
  97. package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
  98. package/dist/es6/pill/lib/PillIconButton.js +18 -25
  99. package/dist/es6/pill/lib/PillLabel.d.ts +2 -2
  100. package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -1
  101. package/dist/es6/pill/lib/PillLabel.js +1 -1
  102. package/dist/es6/pill/lib/usePillModel.d.ts +18 -5
  103. package/dist/es6/pill/lib/usePillModel.d.ts.map +1 -1
  104. package/dist/es6/pill/lib/usePillModel.js +8 -2
  105. package/dist/es6/select/index.d.ts +0 -3
  106. package/dist/es6/select/index.d.ts.map +1 -1
  107. package/dist/es6/select/index.js +0 -3
  108. package/dist/es6/select/lib/Select.d.ts +0 -1
  109. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  110. package/dist/es6/select/lib/Select.js +1 -2
  111. package/dist/es6/select/lib/SelectBase.d.ts +2 -2
  112. package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
  113. package/dist/es6/select/lib/SelectBase.js +3 -4
  114. package/dist/es6/select/lib/SelectMenu.d.ts +2 -2
  115. package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
  116. package/dist/es6/select/lib/SelectMenu.js +1 -2
  117. package/dist/es6/select/lib/SelectOption.d.ts +1 -2
  118. package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
  119. package/dist/es6/select/lib/SelectOption.js +1 -2
  120. package/dist/es6/side-panel/index.d.ts +0 -3
  121. package/dist/es6/side-panel/index.d.ts.map +1 -1
  122. package/dist/es6/side-panel/index.js +0 -3
  123. package/dist/es6/side-panel/lib/SidePanel.d.ts +1 -2
  124. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  125. package/dist/es6/side-panel/lib/SidePanel.js +1 -2
  126. package/form-field/package.json +2 -1
  127. package/menu/index.ts +1 -6
  128. package/menu/lib/Menu.tsx +2 -2
  129. package/menu/lib/MenuItem.tsx +1 -3
  130. package/menu/package.json +2 -1
  131. package/package.json +8 -7
  132. package/pill/lib/Pill.tsx +10 -2
  133. package/pill/lib/PillAvatar.tsx +1 -0
  134. package/pill/lib/PillIcon.tsx +2 -0
  135. package/pill/lib/PillIconButton.tsx +36 -32
  136. package/pill/lib/PillLabel.tsx +1 -0
  137. package/pill/lib/usePillModel.tsx +8 -1
  138. package/pill/package.json +2 -1
  139. package/select/README.md +7 -7
  140. package/select/index.ts +0 -3
  141. package/select/lib/Select.tsx +1 -3
  142. package/select/lib/SelectBase.tsx +3 -5
  143. package/select/lib/SelectMenu.tsx +1 -3
  144. package/select/lib/SelectOption.tsx +1 -3
  145. package/select/package.json +2 -1
  146. package/side-panel/index.ts +0 -4
  147. package/side-panel/lib/SidePanel.tsx +1 -2
  148. package/side-panel/package.json +2 -1
  149. package/text-area/package.json +2 -1
  150. package/text-input/package.json +2 -1
package/menu/package.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/menu",
3
3
  "module": "../dist/es6/menu",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/menu"
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-preview-react",
3
- "version": "7.0.0-alpha.106-next.2+ab2883e3",
3
+ "version": "7.0.0-alpha.129-next.3+f4cdec5a",
4
4
  "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -10,7 +10,8 @@
10
10
  "types": "dist/es6/index.d.ts",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "http://github.com/Workday/canvas-kit/tree/master/modules/canvas-kit-preview-react"
13
+ "url": "https://github.com/workday/canvas-kit.git",
14
+ "directory": "modules/preview-react"
14
15
  },
15
16
  "files": [
16
17
  "*/package.json",
@@ -40,20 +41,20 @@
40
41
  "workday"
41
42
  ],
42
43
  "peerDependencies": {
43
- "react": "^16.8 || ^17.0"
44
+ "react": "^17.0 || ^18.0"
44
45
  },
45
46
  "dependencies": {
46
47
  "@emotion/react": "^11.7.1",
47
48
  "@emotion/styled": "^11.6.0",
48
- "@workday/canvas-kit-react": "^7.0.0-alpha.106-next.2+ab2883e3",
49
+ "@workday/canvas-kit-react": "^7.0.0-alpha.129-next.3+f4cdec5a",
49
50
  "@workday/canvas-system-icons-web": "^3.0.0",
50
- "@workday/design-assets-types": "^0.2.4"
51
+ "@workday/design-assets-types": "^0.2.8"
51
52
  },
52
53
  "devDependencies": {
53
54
  "@workday/canvas-accent-icons-web": "^3.0.0",
54
- "@workday/canvas-kit-labs-react": "^7.0.0-alpha.106-next.2+ab2883e3",
55
+ "@workday/canvas-kit-labs-react": "^7.0.0-alpha.129-next.3+f4cdec5a",
55
56
  "formik": "^2.2.9",
56
57
  "yup": "^0.31.1"
57
58
  },
58
- "gitHead": "ab2883e3305013c8a9048ea7b67d4012659c2516"
59
+ "gitHead": "f4cdec5aa17c18b03695a3c99417e384fd9aecdc"
59
60
  }
package/pill/lib/Pill.tsx CHANGED
@@ -92,6 +92,7 @@ const getRemovablePillColors = (disabled?: boolean) => {
92
92
  icon: colors.licorice200,
93
93
  background: colors.soap300,
94
94
  label: colors.blackPepper400,
95
+
95
96
  focusRing: focusRing({
96
97
  width: 0,
97
98
  innerColor: 'transparent',
@@ -124,7 +125,6 @@ const StyledBasePill = styled(BaseButton.as('button'))<StyledType & PillProps>(
124
125
  {
125
126
  ...pillBaseStyles,
126
127
  '&:focus': {
127
- borderColor: colors.blueberry400,
128
128
  'span[data-count="ck-pill-count"]': {
129
129
  borderTop: `1px solid ${colors.blueberry400}`,
130
130
  borderBottom: `1px solid ${colors.blueberry400}`,
@@ -146,12 +146,18 @@ const StyledBasePill = styled(BaseButton.as('button'))<StyledType & PillProps>(
146
146
  },
147
147
  }),
148
148
  },
149
+ ({variant}) => ({
150
+ '&:focus': {
151
+ borderColor: variant === 'removable' ? undefined : colors.blueberry400,
152
+ },
153
+ }),
149
154
  boxStyleFn
150
155
  );
151
156
 
152
- const StyledNonInteractivePill = styled(StyledBasePill)({
157
+ const StyledNonInteractivePill = styled(StyledBasePill)<StyledType>({
153
158
  cursor: 'default',
154
159
  overflow: 'revert', // override BaseButton overflow styles so the click target exists outside the pill for removable
160
+ position: 'relative',
155
161
  });
156
162
 
157
163
  export const Pill = createContainer('button')({
@@ -171,6 +177,7 @@ export const Pill = createContainer('button')({
171
177
  maxWidth={model.state.maxWidth}
172
178
  as={Element !== 'button' ? Element : 'span'}
173
179
  border={`1px solid ${colors.licorice200}`}
180
+ id={model.state.id}
174
181
  {...elemProps}
175
182
  >
176
183
  <PillLabel>{elemProps.children}</PillLabel>
@@ -201,6 +208,7 @@ export const Pill = createContainer('button')({
201
208
  <StyledNonInteractivePill
202
209
  colors={getRemovablePillColors(model.state.disabled)}
203
210
  as={Element !== 'button' ? Element : 'span'}
211
+ variant={variant}
204
212
  {...elemProps}
205
213
  >
206
214
  <HStack spacing="xxxs" display="inline-flex" alignItems="center" justifyContent="center">
@@ -17,6 +17,7 @@ export const PillAvatar = createSubcomponent('button')({
17
17
  style={{opacity: model.state.disabled ? '.7' : '1'}}
18
18
  as="div"
19
19
  size={18}
20
+ altText={undefined}
20
21
  {...elemProps}
21
22
  disabled={model.state.disabled}
22
23
  >
@@ -25,6 +25,8 @@ export const PillIcon = createSubcomponent('span')({
25
25
  display="flex"
26
26
  as={Element}
27
27
  size={20}
28
+ role="img"
29
+ aria-label="add"
28
30
  icon={icon || plusIcon}
29
31
  {...elemProps}
30
32
  />
@@ -6,7 +6,7 @@ import {SystemIcon, SystemIconProps} from '@workday/canvas-kit-react/icon';
6
6
  import {usePillModel} from './usePillModel';
7
7
  import {xSmallIcon} from '@workday/canvas-system-icons-web';
8
8
  import {CanvasSystemIcon} from '@workday/design-assets-types';
9
- import {borderRadius, colors, space} from '@workday/canvas-kit-react/tokens';
9
+ import {colors, space} from '@workday/canvas-kit-react/tokens';
10
10
  import {BaseButton} from '@workday/canvas-kit-react/button';
11
11
 
12
12
  export interface PillIconButtonProps extends Omit<SystemIconProps, 'icon'> {
@@ -15,6 +15,11 @@ export interface PillIconButtonProps extends Omit<SystemIconProps, 'icon'> {
15
15
  * @default `xSmallIcon`
16
16
  */
17
17
  icon?: CanvasSystemIcon;
18
+ /**
19
+ * The aria label for the removable icon
20
+ * @default 'remove'
21
+ */
22
+ 'aria-label'?: string;
18
23
  }
19
24
 
20
25
  const getIconColors = () => {
@@ -33,9 +38,7 @@ const getIconColors = () => {
33
38
  icon: colors.licorice500,
34
39
 
35
40
  focusRing: focusRing({
36
- width: 0,
37
41
  innerColor: 'transparent',
38
- outerColor: 'transparent',
39
42
  }),
40
43
  },
41
44
  disabled: {
@@ -45,51 +48,52 @@ const getIconColors = () => {
45
48
  };
46
49
  };
47
50
 
48
- const StyledFocusTarget = styled('span')<StyledType & PillIconButtonProps>({
49
- height: 20,
50
- position: 'absolute',
51
- right: '5px',
52
- left: space.xxxs,
53
- margin: 0,
54
- borderRadius: borderRadius.m,
55
- '&:focus': {
56
- outline: 'none',
57
- ...focusRing({
58
- outerColor: colors.blueberry400,
59
- innerColor: 'transparent',
60
- separation: 0,
61
- width: 2,
62
- inset: 'inner',
63
- }),
64
- },
65
- });
66
-
67
51
  const StyledIconButton = styled(BaseButton)<StyledType & PillIconButtonProps>({
68
- marginInlineEnd: '-14px !important', // visually pull in the pill to the right size
69
- paddingInlineEnd: space.xxxs, // add 4px padding outside the pill for click target
70
- marginInlineStart: `-${space.xxs} !important`, // visually create space between label and the button
52
+ marginInlineEnd: '-7px', // visually pull in the pill to the right size
53
+ marginInlineStart: `-2px`, // visually create space between label and the button
54
+ overflow: 'visible',
55
+ '::after': {
56
+ content: '""',
57
+ height: space.l,
58
+ width: space.l,
59
+ position: 'absolute',
60
+ left: '-7px',
61
+ bottom: '-7px',
62
+ margin: 0,
63
+ pointerEvents: 'all',
64
+ cursor: 'pointer',
65
+ },
71
66
  });
72
67
 
73
68
  export const PillIconButton = createSubcomponent('button')({
74
69
  modelHook: usePillModel,
75
70
  })<PillIconButtonProps>(
76
- ({size, icon = xSmallIcon, maxWidth, children, ...elemProps}, Element, model) => {
71
+ (
72
+ {size, icon = xSmallIcon, maxWidth, children, 'aria-label': ariaLabel = 'remove', ...elemProps},
73
+ Element,
74
+ model
75
+ ) => {
77
76
  return (
78
77
  <StyledIconButton
79
78
  borderRadius="s"
80
- height={space.l}
81
- width={space.l}
79
+ height={20}
80
+ width={20}
82
81
  padding="zero"
83
82
  disabled={model.state.disabled}
84
83
  colors={getIconColors()}
85
- tabIndex={-1}
84
+ aria-labelledby={`removable-${model.state.id} label-${model.state.id}`}
86
85
  as={Element}
87
86
  position="relative"
88
87
  {...elemProps}
89
88
  >
90
- {/* We made the clickable element in this case the button larger, and have the span be the visible focus area */}
91
- <StyledFocusTarget aria-hidden="true" tabIndex={model.state.disabled ? -1 : 0} />
92
- <SystemIcon icon={icon} size={24} />
89
+ <SystemIcon
90
+ aria-label={ariaLabel}
91
+ id={`removable-${model.state.id}`}
92
+ icon={icon}
93
+ size={space.m}
94
+ aria-hidden // This works for Chrome but not needed in Safari
95
+ role="img"
96
+ />
93
97
  </StyledIconButton>
94
98
  );
95
99
  }
@@ -26,6 +26,7 @@ export const PillLabel = createSubcomponent('span')({
26
26
  color={model.state.disabled ? colors.licorice100 : 'inherit'}
27
27
  maxWidth={model.state.maxWidth}
28
28
  as={Element}
29
+ id={`label-${model.state.id}`}
29
30
  {...elemProps}
30
31
  >
31
32
  {elemProps.children}
@@ -1,4 +1,4 @@
1
- import {createModelHook} from '@workday/canvas-kit-react/common';
1
+ import {createModelHook, useUniqueId} from '@workday/canvas-kit-react/common';
2
2
 
3
3
  export const usePillModel = createModelHook({
4
4
  defaultConfig: {
@@ -11,10 +11,17 @@ export const usePillModel = createModelHook({
11
11
  * Use to disable a pill.
12
12
  */
13
13
  disabled: false,
14
+ /**
15
+ * ID used to add accessibility labels to pill elements.
16
+ * @default `useUniqueId()`
17
+ */
18
+ id: '',
14
19
  },
15
20
  })(config => {
21
+ const id = useUniqueId(config.id);
16
22
  const state = {
17
23
  ...config,
24
+ id,
18
25
  };
19
26
 
20
27
  return {state, events: {}};
package/pill/package.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/pill",
3
3
  "module": "../dist/es6/pill",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/pill"
5
6
  }
package/select/README.md CHANGED
@@ -34,7 +34,7 @@ fully accessible (see below).
34
34
 
35
35
  ```tsx
36
36
  import * as React from 'react';
37
- import Select from '@workday/canvas-kit-preview-react/select';
37
+ import {Select} from '@workday/canvas-kit-preview-react/select';
38
38
 
39
39
  function Example() {
40
40
  const options = [
@@ -58,8 +58,8 @@ function Example() {
58
58
 
59
59
  ```tsx
60
60
  import * as React from 'react';
61
- import Select from '@workday/canvas-kit-preview-react/select';
62
- import FormField from '@workday/canvas-kit-react/form-field';
61
+ import {Select} from '@workday/canvas-kit-preview-react/select';
62
+ import {FormField} from '@workday/canvas-kit-react/form-field';
63
63
 
64
64
  function Example() {
65
65
  const options = [
@@ -89,8 +89,8 @@ function Example() {
89
89
 
90
90
  ```tsx
91
91
  import * as React from 'react';
92
- import Select from '@workday/canvas-kit-preview-react/select';
93
- import FormField from '@workday/canvas-kit-react/form-field';
92
+ import {Select} from '@workday/canvas-kit-preview-react/select';
93
+ import {FormField} from '@workday/canvas-kit-react/form-field';
94
94
 
95
95
  function Example() {
96
96
  const options = ['California', 'Florida', 'New York', 'Pennsylvania', 'Texas'];
@@ -117,8 +117,8 @@ used to customize how each option is rendered.
117
117
 
118
118
  ```tsx
119
119
  import * as React from 'react';
120
- import Select from '@workday/canvas-kit-preview-react/select';
121
- import FormField from '@workday/canvas-kit-react/form-field';
120
+ import {Select} from '@workday/canvas-kit-preview-react/select';
121
+ import {FormField} from '@workday/canvas-kit-react/form-field';
122
122
  import {colors, typeColors} from '@workday/canvas-kit-react/tokens';
123
123
  import {
124
124
  activityStreamIcon,
package/select/index.ts CHANGED
@@ -1,7 +1,4 @@
1
- import Select from './lib/Select';
2
1
 
3
- export default Select;
4
- export {Select};
5
2
  export * from './lib/Select';
6
3
 
7
4
  export {
@@ -7,7 +7,7 @@ import {
7
7
  generateUniqueId,
8
8
  } from '@workday/canvas-kit-react/common';
9
9
  import {menuAnimationDuration} from './SelectMenu';
10
- import SelectBase, {CoreSelectBaseProps, Option, NormalizedOption} from './SelectBase';
10
+ import {SelectBase, CoreSelectBaseProps, Option, NormalizedOption} from './SelectBase';
11
11
  import {MenuVisibility} from './types';
12
12
  import {getCorrectedIndexByValue} from './utils';
13
13
 
@@ -587,5 +587,3 @@ export const Select = createComponent('button')({
587
587
  ErrorType,
588
588
  },
589
589
  });
590
-
591
- export default Select;
@@ -20,8 +20,8 @@ import {
20
20
  import {caretDownSmallIcon} from '@workday/canvas-system-icons-web';
21
21
  import {SystemIcon} from '@workday/canvas-kit-react/icon';
22
22
 
23
- import SelectMenu from './SelectMenu';
24
- import SelectOption from './SelectOption';
23
+ import {SelectMenu} from './SelectMenu';
24
+ import {SelectOption} from './SelectOption';
25
25
  import {scrollIntoViewIfNeeded} from './scrolling';
26
26
  import {MenuPlacement, MenuVisibility} from './types';
27
27
  import {getCorrectedIndexByValue} from './utils';
@@ -288,7 +288,7 @@ const defaultRenderSelected: RenderSelectedFunction = option => {
288
288
  return option.label;
289
289
  };
290
290
 
291
- const SelectBase = ({
291
+ export const SelectBase = ({
292
292
  'aria-labelledby': ariaLabelledBy,
293
293
  'aria-required': ariaRequired,
294
294
  as,
@@ -475,5 +475,3 @@ const SelectBase = ({
475
475
  </SelectWrapper>
476
476
  );
477
477
  };
478
-
479
- export default SelectBase;
@@ -223,7 +223,7 @@ const generatePopperOptions = (
223
223
  };
224
224
  };
225
225
 
226
- const SelectMenu = ({
226
+ export const SelectMenu = ({
227
227
  buttonRef,
228
228
  children,
229
229
  error,
@@ -294,5 +294,3 @@ const SelectMenu = ({
294
294
  </Popper>
295
295
  );
296
296
  };
297
-
298
- export default SelectMenu;
@@ -105,7 +105,7 @@ const Option = styled('li')<SelectOptionProps>(
105
105
  })
106
106
  );
107
107
 
108
- const SelectOption = ({
108
+ export const SelectOption = ({
109
109
  children,
110
110
  focused = false,
111
111
  interactive = true,
@@ -126,5 +126,3 @@ const SelectOption = ({
126
126
  </Option>
127
127
  );
128
128
  };
129
-
130
- export default SelectOption;
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/select",
3
3
  "module": "../dist/es6/select",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/select"
5
6
  }
@@ -1,6 +1,2 @@
1
- import SidePanel from './lib/SidePanel';
2
-
3
- export default SidePanel;
4
- export {SidePanel};
5
1
  export * from './lib/hooks';
6
2
  export * from './lib/SidePanel';
@@ -110,7 +110,7 @@ export const SidePanelContext = React.createContext({
110
110
  origin: 'left',
111
111
  });
112
112
 
113
- const SidePanel = ({
113
+ export const SidePanel = ({
114
114
  as = 'section',
115
115
  children,
116
116
  collapsedWidth = 64,
@@ -267,4 +267,3 @@ const ToggleButton = ({
267
267
  };
268
268
 
269
269
  SidePanel.ToggleButton = ToggleButton;
270
- export default SidePanel;
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/side-panel",
3
3
  "module": "../dist/es6/side-panel",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/side-panel"
5
6
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/text-area",
3
3
  "module": "../dist/es6/text-area",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/text-area"
5
6
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/text-input",
3
3
  "module": "../dist/es6/text-input",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/text-input"
5
6
  }