@instructure/ui-tree-browser 11.7.3-snapshot-7 → 11.7.3-snapshot-26

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 (33) hide show
  1. package/CHANGELOG.md +5 -2
  2. package/es/TreeBrowser/v1/TreeButton/index.js +56 -49
  3. package/es/TreeBrowser/v1/TreeButton/styles.js +7 -5
  4. package/es/TreeBrowser/v1/TreeButton/theme.js +32 -31
  5. package/es/TreeBrowser/v1/TreeCollection/index.js +115 -104
  6. package/es/TreeBrowser/v1/TreeCollection/styles.js +4 -2
  7. package/es/TreeBrowser/v1/TreeCollection/theme.js +11 -10
  8. package/es/TreeBrowser/v1/TreeNode/index.js +39 -37
  9. package/es/TreeBrowser/v1/index.js +94 -82
  10. package/es/TreeBrowser/v1/theme.js +8 -7
  11. package/es/TreeBrowser/v2/TreeButton/index.js +82 -71
  12. package/es/TreeBrowser/v2/TreeButton/styles.js +10 -8
  13. package/es/TreeBrowser/v2/TreeCollection/index.js +115 -104
  14. package/es/TreeBrowser/v2/TreeCollection/styles.js +4 -2
  15. package/es/TreeBrowser/v2/TreeNode/index.js +64 -58
  16. package/es/TreeBrowser/v2/index.js +112 -99
  17. package/lib/TreeBrowser/v1/TreeButton/index.js +56 -49
  18. package/lib/TreeBrowser/v1/TreeButton/styles.js +7 -5
  19. package/lib/TreeBrowser/v1/TreeButton/theme.js +32 -31
  20. package/lib/TreeBrowser/v1/TreeCollection/index.js +115 -104
  21. package/lib/TreeBrowser/v1/TreeCollection/styles.js +4 -2
  22. package/lib/TreeBrowser/v1/TreeCollection/theme.js +11 -10
  23. package/lib/TreeBrowser/v1/TreeNode/index.js +39 -37
  24. package/lib/TreeBrowser/v1/index.js +94 -82
  25. package/lib/TreeBrowser/v1/theme.js +8 -7
  26. package/lib/TreeBrowser/v2/TreeButton/index.js +82 -71
  27. package/lib/TreeBrowser/v2/TreeButton/styles.js +10 -8
  28. package/lib/TreeBrowser/v2/TreeCollection/index.js +115 -104
  29. package/lib/TreeBrowser/v2/TreeCollection/styles.js +4 -2
  30. package/lib/TreeBrowser/v2/TreeNode/index.js +64 -58
  31. package/lib/TreeBrowser/v2/index.js +112 -99
  32. package/package.json +12 -12
  33. package/tsconfig.build.tsbuildinfo +1 -1
@@ -1,4 +1,5 @@
1
- var _dec, _class, _TreeBrowser;
1
+ var _dec, _class;
2
+ import "core-js/modules/es.array.includes.js";
2
3
  /*
3
4
  * The MIT License (MIT)
4
5
  *
@@ -40,76 +41,32 @@ category: components
40
41
  ---
41
42
  **/
42
43
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
43
- let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser = class TreeBrowser extends Component {
44
+ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = class TreeBrowser extends Component {
45
+ static displayName = "TreeBrowser";
46
+ static componentId = 'TreeBrowser';
47
+ static allowedProps = allowedProps;
48
+ static defaultProps = {
49
+ size: 'medium',
50
+ variant: 'folderTree',
51
+ showRootCollection: true,
52
+ collectionIcon: FolderClosedInstUIIcon,
53
+ collectionIconExpanded: FolderClosedInstUIIcon,
54
+ itemIcon: FileTextInstUIIcon,
55
+ getItemProps: props => props,
56
+ getCollectionProps: props => props,
57
+ defaultExpanded: [],
58
+ selectionType: 'none',
59
+ sortOrder: function () {
60
+ return 0;
61
+ },
62
+ animation: true
63
+ };
64
+ static Node = TreeNode;
65
+ static Collection = TreeCollection;
66
+ static Button = TreeButton;
67
+ ref = null;
44
68
  constructor(props) {
45
69
  super(props);
46
- this.ref = null;
47
- this.handleCollectionClick = (e, collection, expand = true) => {
48
- e.stopPropagation();
49
- const onCollectionClick = this.props.onCollectionClick;
50
- if (expand) this.expandOrCollapseNode(collection);
51
- onCollectionClick === null || onCollectionClick === void 0 ? void 0 : onCollectionClick(collection.id, collection); // TODO: this should pass the event as the first arg
52
- this.handleSelection(collection.id, 'collection');
53
- };
54
- this.handleItemClick = (e, item) => {
55
- var _this$props$onItemCli, _this$props;
56
- e.stopPropagation();
57
- (_this$props$onItemCli = (_this$props = this.props).onItemClick) === null || _this$props$onItemCli === void 0 ? void 0 : _this$props$onItemCli.call(_this$props, item);
58
- this.handleSelection(item.id, 'item');
59
- };
60
- this.handleKeyDown = (event, node) => {
61
- switch (event.keyCode) {
62
- case keycode.codes.down:
63
- case keycode.codes.j:
64
- event.stopPropagation();
65
- this.moveFocus(1);
66
- break;
67
- case keycode.codes.up:
68
- case keycode.codes.k:
69
- event.stopPropagation();
70
- this.moveFocus(-1);
71
- break;
72
- case keycode.codes.home:
73
- case keycode.codes.end:
74
- event.stopPropagation();
75
- this.homeOrEnd(event.keyCode);
76
- break;
77
- case keycode.codes.left:
78
- case keycode.codes.right:
79
- event.stopPropagation();
80
- this.handleLeftOrRightArrow(event.keyCode, node);
81
- break;
82
- case keycode.codes.enter:
83
- case keycode.codes.space:
84
- event.stopPropagation();
85
- this.handleActivation(event, node);
86
- break;
87
- default:
88
- return;
89
- }
90
- event.preventDefault();
91
- };
92
- this.clearSelection = () => {
93
- const onSelectionChange = this.props.onSelectionChange;
94
-
95
- // Call the callback if provided (for controlled selection)
96
- if (onSelectionChange) {
97
- onSelectionChange('', 'item', void 0);
98
- }
99
-
100
- // Update internal state only if uncontrolled
101
- if (typeof this.props.selection === 'undefined') {
102
- this.setState({
103
- selection: ''
104
- });
105
- }
106
- };
107
- this.getIsFlattened = collection => {
108
- const _this$props2 = this.props,
109
- rootId = _this$props2.rootId,
110
- showRootCollection = _this$props2.showRootCollection;
111
- return !showRootCollection && typeof rootId !== 'undefined' && collection.id === rootId;
112
- };
113
70
  const initialState = {
114
71
  selection: ''
115
72
  };
@@ -126,20 +83,65 @@ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser
126
83
  this.state = initialState;
127
84
  }
128
85
  componentDidMount() {
129
- var _this$props$makeStyle, _this$props3;
130
- (_this$props$makeStyle = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props3);
86
+ this.props.makeStyles?.();
131
87
  }
132
88
  componentDidUpdate() {
133
- var _this$props$makeStyle2, _this$props4;
134
- (_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
89
+ this.props.makeStyles?.();
135
90
  }
136
91
  get _root() {
137
92
  return this.ref;
138
93
  }
94
+ handleCollectionClick = (e, collection, expand = true) => {
95
+ e.stopPropagation();
96
+ const {
97
+ onCollectionClick
98
+ } = this.props;
99
+ if (expand) this.expandOrCollapseNode(collection);
100
+ onCollectionClick?.(collection.id, collection); // TODO: this should pass the event as the first arg
101
+ this.handleSelection(collection.id, 'collection');
102
+ };
103
+ handleItemClick = (e, item) => {
104
+ e.stopPropagation();
105
+ this.props.onItemClick?.(item);
106
+ this.handleSelection(item.id, 'item');
107
+ };
108
+ handleKeyDown = (event, node) => {
109
+ switch (event.keyCode) {
110
+ case keycode.codes.down:
111
+ case keycode.codes.j:
112
+ event.stopPropagation();
113
+ this.moveFocus(1);
114
+ break;
115
+ case keycode.codes.up:
116
+ case keycode.codes.k:
117
+ event.stopPropagation();
118
+ this.moveFocus(-1);
119
+ break;
120
+ case keycode.codes.home:
121
+ case keycode.codes.end:
122
+ event.stopPropagation();
123
+ this.homeOrEnd(event.keyCode);
124
+ break;
125
+ case keycode.codes.left:
126
+ case keycode.codes.right:
127
+ event.stopPropagation();
128
+ this.handleLeftOrRightArrow(event.keyCode, node);
129
+ break;
130
+ case keycode.codes.enter:
131
+ case keycode.codes.space:
132
+ event.stopPropagation();
133
+ this.handleActivation(event, node);
134
+ break;
135
+ default:
136
+ return;
137
+ }
138
+ event.preventDefault();
139
+ };
139
140
  get collections() {
140
- const _this$props5 = this.props,
141
- collections = _this$props5.collections,
142
- rootId = _this$props5.rootId;
141
+ const {
142
+ collections,
143
+ rootId
144
+ } = this.props;
143
145
  if (typeof rootId !== 'undefined') {
144
146
  return [collections[rootId]];
145
147
  } else {
@@ -159,8 +161,7 @@ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser
159
161
  return typeof props.selection === 'undefined' ? state.selection : props.selection;
160
162
  }
161
163
  expandOrCollapseNode(collection) {
162
- var _this$props$onCollect, _this$props6;
163
- (_this$props$onCollect = (_this$props6 = this.props).onCollectionToggle) === null || _this$props$onCollect === void 0 ? void 0 : _this$props$onCollect.call(_this$props6, collection);
164
+ this.props.onCollectionToggle?.(collection);
164
165
  if (typeof this.props.expanded === 'undefined') {
165
166
  this.setState((state, props) => {
166
167
  const expanded = [...this.getExpanded(state, props)];
@@ -177,9 +178,10 @@ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser
177
178
  }
178
179
  }
179
180
  handleSelection(id, type) {
180
- const _this$props7 = this.props,
181
- selectionType = _this$props7.selectionType,
182
- onSelectionChange = _this$props7.onSelectionChange;
181
+ const {
182
+ selectionType,
183
+ onSelectionChange
184
+ } = this.props;
183
185
  if (selectionType !== 'single') return;
184
186
  const selection = `${type}_${id}`;
185
187
 
@@ -201,6 +203,23 @@ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser
201
203
  });
202
204
  }
203
205
  }
206
+ clearSelection = () => {
207
+ const {
208
+ onSelectionChange
209
+ } = this.props;
210
+
211
+ // Call the callback if provided (for controlled selection)
212
+ if (onSelectionChange) {
213
+ onSelectionChange('', 'item', undefined);
214
+ }
215
+
216
+ // Update internal state only if uncontrolled
217
+ if (typeof this.props.selection === 'undefined') {
218
+ this.setState({
219
+ selection: ''
220
+ });
221
+ }
222
+ };
204
223
  getNavigableNodes() {
205
224
  return Array.from(this.ref.querySelectorAll('[role="treeitem"]'));
206
225
  }
@@ -274,6 +293,13 @@ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser
274
293
  return [];
275
294
  }
276
295
  }
296
+ getIsFlattened = collection => {
297
+ const {
298
+ rootId,
299
+ showRootCollection
300
+ } = this.props;
301
+ return !showRootCollection && typeof rootId !== 'undefined' && collection.id === rootId;
302
+ };
277
303
  getCollectionProps(collection) {
278
304
  return {
279
305
  id: collection.id,
@@ -307,14 +333,16 @@ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser
307
333
  }, i));
308
334
  }
309
335
  render() {
310
- const styles = this.props.styles;
336
+ const {
337
+ styles
338
+ } = this.props;
311
339
  return _jsx(TreeBrowserContext.Provider, {
312
340
  value: {
313
341
  animation: this.props.animation,
314
342
  clearSelection: this.clearSelection
315
343
  },
316
344
  children: _jsx("ul", {
317
- css: styles === null || styles === void 0 ? void 0 : styles.treeBrowser,
345
+ css: styles?.treeBrowser,
318
346
  tabIndex: 0,
319
347
  role: "tree",
320
348
  onKeyDown: this.handleKeyDown,
@@ -327,21 +355,6 @@ let TreeBrowser = (_dec = withStyle(generateStyles), _dec(_class = (_TreeBrowser
327
355
  })
328
356
  });
329
357
  }
330
- }, _TreeBrowser.displayName = "TreeBrowser", _TreeBrowser.componentId = 'TreeBrowser', _TreeBrowser.allowedProps = allowedProps, _TreeBrowser.defaultProps = {
331
- size: 'medium',
332
- variant: 'folderTree',
333
- showRootCollection: true,
334
- collectionIcon: FolderClosedInstUIIcon,
335
- collectionIconExpanded: FolderClosedInstUIIcon,
336
- itemIcon: FileTextInstUIIcon,
337
- getItemProps: props => props,
338
- getCollectionProps: props => props,
339
- defaultExpanded: [],
340
- selectionType: 'none',
341
- sortOrder: function () {
342
- return 0;
343
- },
344
- animation: true
345
- }, _TreeBrowser.Node = TreeNode, _TreeBrowser.Collection = TreeCollection, _TreeBrowser.Button = TreeButton, _TreeBrowser)) || _class);
358
+ }) || _class);
346
359
  export default TreeBrowser;
347
360
  export { TreeBrowser };
@@ -14,7 +14,7 @@ var _theme = _interopRequireDefault(require("./theme"));
14
14
  var _props = require("./props");
15
15
  var _TreeBrowserContext = _interopRequireDefault(require("../TreeBrowserContext"));
16
16
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
17
- var _dec, _class, _TreeButton;
17
+ var _dec, _class;
18
18
  /*
19
19
  * The MIT License (MIT)
20
20
  *
@@ -45,33 +45,36 @@ parent: TreeBrowser
45
45
  id: TreeBrowser.Button
46
46
  ---
47
47
  **/
48
- let TreeButton = exports.TreeButton = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_TreeButton = class TreeButton extends _react.Component {
49
- constructor(...args) {
50
- super(...args);
51
- this.ref = null;
52
- this.handleRef = el => {
53
- if (el && typeof this.props.containerRef === 'function') {
54
- this.props.containerRef(el.parentElement);
55
- }
56
- this.ref = el;
57
- };
58
- }
48
+ let TreeButton = exports.TreeButton = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = class TreeButton extends _react.Component {
49
+ static displayName = "TreeButton";
50
+ static componentId = 'TreeBrowser.Button';
51
+ static allowedProps = _props.allowedProps;
52
+ static contextType = _TreeBrowserContext.default;
53
+ static defaultProps = {
54
+ type: 'treeButton',
55
+ size: 'medium',
56
+ variant: 'folderTree',
57
+ selected: false,
58
+ focused: false,
59
+ expanded: false
60
+ };
61
+ ref = null;
59
62
  componentDidMount() {
60
- var _this$props$makeStyle, _this$props, _this$context;
61
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, {
62
- animation: (_this$context = this.context) === null || _this$context === void 0 ? void 0 : _this$context.animation
63
+ this.props.makeStyles?.({
64
+ animation: this.context?.animation
63
65
  });
64
66
  }
65
67
  componentDidUpdate() {
66
- var _this$props$makeStyle2, _this$props2, _this$context2;
67
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, {
68
- animation: (_this$context2 = this.context) === null || _this$context2 === void 0 ? void 0 : _this$context2.animation
68
+ this.props.makeStyles?.({
69
+ animation: this.context?.animation
69
70
  });
70
71
  }
71
72
  defaultContentRenderer(props) {
72
- const name = props.name,
73
- descriptor = props.descriptor,
74
- styles = props.styles;
73
+ const {
74
+ name,
75
+ descriptor,
76
+ styles
77
+ } = props;
75
78
  return (0, _jsxRuntime.jsxs)("span", {
76
79
  css: styles.layout,
77
80
  children: [this.renderImage(), (0, _jsxRuntime.jsxs)("span", {
@@ -88,7 +91,9 @@ let TreeButton = exports.TreeButton = (_dec = (0, _emotion.withStyleLegacy)(_sty
88
91
  });
89
92
  }
90
93
  renderImage() {
91
- const type = this.props.type;
94
+ const {
95
+ type
96
+ } = this.props;
92
97
  switch (type) {
93
98
  case 'collection':
94
99
  return this.renderCollectionIcon();
@@ -97,30 +102,32 @@ let TreeButton = exports.TreeButton = (_dec = (0, _emotion.withStyleLegacy)(_sty
97
102
  default:
98
103
  break;
99
104
  }
100
- return void 0;
105
+ return undefined;
101
106
  }
102
107
  renderCollectionIcon() {
103
- const _this$props3 = this.props,
104
- expanded = _this$props3.expanded,
105
- collectionIcon = _this$props3.collectionIcon,
106
- collectionIconExpanded = _this$props3.collectionIconExpanded,
107
- styles = _this$props3.styles;
108
+ const {
109
+ expanded,
110
+ collectionIcon,
111
+ collectionIconExpanded,
112
+ styles
113
+ } = this.props;
108
114
  if (collectionIcon || collectionIconExpanded) {
109
115
  return (0, _jsxRuntime.jsx)("div", {
110
- css: styles === null || styles === void 0 ? void 0 : styles.icon,
116
+ css: styles?.icon,
111
117
  children: (0, _callRenderProp.callRenderProp)(expanded ? collectionIconExpanded : collectionIcon)
112
118
  });
113
119
  }
114
- return void 0;
120
+ return undefined;
115
121
  }
116
122
  renderItemImage() {
117
- const _this$props4 = this.props,
118
- thumbnail = _this$props4.thumbnail,
119
- itemIcon = _this$props4.itemIcon,
120
- styles = _this$props4.styles;
123
+ const {
124
+ thumbnail,
125
+ itemIcon,
126
+ styles
127
+ } = this.props;
121
128
  if (thumbnail) {
122
129
  return (0, _jsxRuntime.jsx)("div", {
123
- css: styles === null || styles === void 0 ? void 0 : styles.thumbnail,
130
+ css: styles?.thumbnail,
124
131
  children: (0, _jsxRuntime.jsx)(_v11_.Img, {
125
132
  src: thumbnail,
126
133
  constrain: "cover",
@@ -130,33 +137,33 @@ let TreeButton = exports.TreeButton = (_dec = (0, _emotion.withStyleLegacy)(_sty
130
137
  }
131
138
  if (itemIcon) {
132
139
  return (0, _jsxRuntime.jsx)("div", {
133
- css: styles === null || styles === void 0 ? void 0 : styles.icon,
140
+ css: styles?.icon,
134
141
  children: (0, _callRenderProp.callRenderProp)(itemIcon)
135
142
  });
136
143
  }
137
- return void 0;
144
+ return undefined;
138
145
  }
146
+ handleRef = el => {
147
+ if (el && typeof this.props.containerRef === 'function') {
148
+ this.props.containerRef(el.parentElement);
149
+ }
150
+ this.ref = el;
151
+ };
139
152
  render() {
140
- const _this$props5 = this.props,
141
- styles = _this$props5.styles,
142
- renderContent = _this$props5.renderContent;
153
+ const {
154
+ styles,
155
+ renderContent
156
+ } = this.props;
143
157
  const buttonContent = renderContent ? renderContent(this.props) : this.defaultContentRenderer(this.props);
144
158
  // VoiceOver can't navigate without the buttons, even though they don't do anything
145
159
  return (0, _jsxRuntime.jsx)("button", {
146
160
  ref: this.handleRef,
147
161
  tabIndex: -1,
148
162
  type: "button",
149
- css: styles === null || styles === void 0 ? void 0 : styles.treeButton,
163
+ css: styles?.treeButton,
150
164
  "data-cid": "TreeButton",
151
165
  children: buttonContent
152
166
  });
153
167
  }
154
- }, _TreeButton.displayName = "TreeButton", _TreeButton.componentId = 'TreeBrowser.Button', _TreeButton.allowedProps = _props.allowedProps, _TreeButton.contextType = _TreeBrowserContext.default, _TreeButton.defaultProps = {
155
- type: 'treeButton',
156
- size: 'medium',
157
- variant: 'folderTree',
158
- selected: false,
159
- focused: false,
160
- expanded: false
161
- }, _TreeButton)) || _class);
168
+ }) || _class);
162
169
  var _default = exports.default = TreeButton;
@@ -51,11 +51,13 @@ const transform = (0, _emotion.keyframes)`
51
51
  * @return {Object} The final style object, which will be used in the component
52
52
  */
53
53
  const generateStyles = (componentTheme, props, state) => {
54
- const size = props.size,
55
- variant = props.variant,
56
- selected = props.selected,
57
- focused = props.focused,
58
- level = props.level;
54
+ const {
55
+ size,
56
+ variant,
57
+ selected,
58
+ focused,
59
+ level
60
+ } = props;
59
61
  const isRootButton = level && level === 1;
60
62
  const sizeMap = {
61
63
  small: {
@@ -34,12 +34,13 @@ exports.default = void 0;
34
34
  * @return {Object} The final theme object with the overrides and component variables
35
35
  */
36
36
  const generateComponentTheme = theme => {
37
- var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8, _colors$contrasts9;
38
- const colors = theme.colors,
39
- borders = theme.borders,
40
- typography = theme.typography,
41
- themeName = theme.key,
42
- spacing = theme.spacing;
37
+ const {
38
+ colors,
39
+ borders,
40
+ typography,
41
+ key: themeName,
42
+ spacing
43
+ } = theme;
43
44
  const themeSpecificStyles = {
44
45
  canvas: {
45
46
  iconColor: theme['ic-brand-font-color-dark'],
@@ -50,32 +51,32 @@ const generateComponentTheme = theme => {
50
51
  }
51
52
  };
52
53
  const componentVariables = {
53
- hoverBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.blue4570,
54
- hoverTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
55
- focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
56
- focusOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.blue4570,
57
- focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style,
58
- iconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey125125,
59
- iconsMarginRight: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
60
- descriptorMarginTop: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
61
- descriptorTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey125125,
62
- descriptorFontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
63
- descriptorFontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
64
- descriptorFontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
65
- nameTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.blue4570,
66
- nameFontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
67
- nameFontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
68
- nameFontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
69
- baseSpacingSmall: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
70
- baseSpacingMedium: spacing === null || spacing === void 0 ? void 0 : spacing.small,
54
+ hoverBackgroundColor: colors?.contrasts?.blue4570,
55
+ hoverTextColor: colors?.contrasts?.white1010,
56
+ focusOutlineWidth: borders?.widthMedium,
57
+ focusOutlineColor: colors?.contrasts?.blue4570,
58
+ focusOutlineStyle: borders?.style,
59
+ iconColor: colors?.contrasts?.grey125125,
60
+ iconsMarginRight: spacing?.xSmall,
61
+ descriptorMarginTop: spacing?.xxxSmall,
62
+ descriptorTextColor: colors?.contrasts?.grey125125,
63
+ descriptorFontSizeSmall: typography?.fontSizeXSmall,
64
+ descriptorFontSizeMedium: typography?.fontSizeXSmall,
65
+ descriptorFontSizeLarge: typography?.fontSizeSmall,
66
+ nameTextColor: colors?.contrasts?.blue4570,
67
+ nameFontSizeSmall: typography?.fontSizeXSmall,
68
+ nameFontSizeMedium: typography?.fontSizeSmall,
69
+ nameFontSizeLarge: typography?.fontSizeMedium,
70
+ baseSpacingSmall: spacing?.xSmall,
71
+ baseSpacingMedium: spacing?.small,
71
72
  baseSpacingLarge: '1rem',
72
- borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
73
- borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
74
- borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570,
75
- textLineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
76
- selectedTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.white1010,
77
- selectedBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts9 = colors.contrasts) === null || _colors$contrasts9 === void 0 ? void 0 : _colors$contrasts9.grey4570,
78
- selectedOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthLarge
73
+ borderWidth: borders?.widthSmall,
74
+ borderRadius: borders?.radiusMedium,
75
+ borderColor: colors?.contrasts?.grey4570,
76
+ textLineHeight: typography?.lineHeightCondensed,
77
+ selectedTextColor: colors?.contrasts?.white1010,
78
+ selectedBackgroundColor: colors?.contrasts?.grey4570,
79
+ selectedOutlineWidth: borders?.widthLarge
79
80
  };
80
81
  return {
81
82
  ...componentVariables,