@furystack/shades-common-components 14.0.0 → 15.0.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 (287) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/esm/components/accordion/accordion-item.d.ts.map +1 -1
  3. package/esm/components/accordion/accordion-item.js +6 -9
  4. package/esm/components/accordion/accordion-item.js.map +1 -1
  5. package/esm/components/accordion/accordion.d.ts +7 -0
  6. package/esm/components/accordion/accordion.d.ts.map +1 -1
  7. package/esm/components/accordion/accordion.js +4 -1
  8. package/esm/components/accordion/accordion.js.map +1 -1
  9. package/esm/components/accordion/accordion.spec.js +91 -50
  10. package/esm/components/accordion/accordion.spec.js.map +1 -1
  11. package/esm/components/carousel.js +1 -1
  12. package/esm/components/carousel.js.map +1 -1
  13. package/esm/components/chip.d.ts.map +1 -1
  14. package/esm/components/chip.js +4 -2
  15. package/esm/components/chip.js.map +1 -1
  16. package/esm/components/chip.spec.js +42 -0
  17. package/esm/components/chip.spec.js.map +1 -1
  18. package/esm/components/command-palette/index.d.ts.map +1 -1
  19. package/esm/components/command-palette/index.js +14 -1
  20. package/esm/components/command-palette/index.js.map +1 -1
  21. package/esm/components/command-palette/index.spec.js +78 -33
  22. package/esm/components/command-palette/index.spec.js.map +1 -1
  23. package/esm/components/data-grid/data-grid-row.d.ts.map +1 -1
  24. package/esm/components/data-grid/data-grid-row.js +18 -2
  25. package/esm/components/data-grid/data-grid-row.js.map +1 -1
  26. package/esm/components/data-grid/data-grid.d.ts +7 -0
  27. package/esm/components/data-grid/data-grid.d.ts.map +1 -1
  28. package/esm/components/data-grid/data-grid.js +28 -10
  29. package/esm/components/data-grid/data-grid.js.map +1 -1
  30. package/esm/components/data-grid/data-grid.spec.js +114 -34
  31. package/esm/components/data-grid/data-grid.spec.js.map +1 -1
  32. package/esm/components/data-grid/selection-cell.d.ts.map +1 -1
  33. package/esm/components/data-grid/selection-cell.js +1 -1
  34. package/esm/components/data-grid/selection-cell.js.map +1 -1
  35. package/esm/components/dialog.d.ts +11 -0
  36. package/esm/components/dialog.d.ts.map +1 -1
  37. package/esm/components/dialog.js +2 -2
  38. package/esm/components/dialog.js.map +1 -1
  39. package/esm/components/dialog.spec.js +54 -2
  40. package/esm/components/dialog.spec.js.map +1 -1
  41. package/esm/components/dropdown.d.ts.map +1 -1
  42. package/esm/components/dropdown.js +1 -1
  43. package/esm/components/dropdown.js.map +1 -1
  44. package/esm/components/dropdown.spec.js +8 -0
  45. package/esm/components/dropdown.spec.js.map +1 -1
  46. package/esm/components/image.d.ts.map +1 -1
  47. package/esm/components/image.js +15 -6
  48. package/esm/components/image.js.map +1 -1
  49. package/esm/components/image.spec.js +60 -0
  50. package/esm/components/image.spec.js.map +1 -1
  51. package/esm/components/inputs/checkbox.d.ts.map +1 -1
  52. package/esm/components/inputs/checkbox.js +1 -0
  53. package/esm/components/inputs/checkbox.js.map +1 -1
  54. package/esm/components/inputs/radio.d.ts.map +1 -1
  55. package/esm/components/inputs/radio.js +1 -0
  56. package/esm/components/inputs/radio.js.map +1 -1
  57. package/esm/components/inputs/slider.d.ts.map +1 -1
  58. package/esm/components/inputs/slider.js +1 -0
  59. package/esm/components/inputs/slider.js.map +1 -1
  60. package/esm/components/inputs/switch.d.ts.map +1 -1
  61. package/esm/components/inputs/switch.js +1 -0
  62. package/esm/components/inputs/switch.js.map +1 -1
  63. package/esm/components/list/list-item.d.ts.map +1 -1
  64. package/esm/components/list/list-item.js +21 -5
  65. package/esm/components/list/list-item.js.map +1 -1
  66. package/esm/components/list/list.d.ts +7 -0
  67. package/esm/components/list/list.d.ts.map +1 -1
  68. package/esm/components/list/list.js +28 -8
  69. package/esm/components/list/list.js.map +1 -1
  70. package/esm/components/list/list.spec.js +117 -23
  71. package/esm/components/list/list.spec.js.map +1 -1
  72. package/esm/components/markdown/markdown-display.d.ts.map +1 -1
  73. package/esm/components/markdown/markdown-display.js +11 -1
  74. package/esm/components/markdown/markdown-display.js.map +1 -1
  75. package/esm/components/markdown/markdown-display.spec.js +97 -0
  76. package/esm/components/markdown/markdown-display.spec.js.map +1 -1
  77. package/esm/components/markdown/markdown-editor.spec.js +87 -0
  78. package/esm/components/markdown/markdown-editor.spec.js.map +1 -1
  79. package/esm/components/menu/menu.js +1 -1
  80. package/esm/components/menu/menu.js.map +1 -1
  81. package/esm/components/modal.d.ts +10 -0
  82. package/esm/components/modal.d.ts.map +1 -1
  83. package/esm/components/modal.js +24 -4
  84. package/esm/components/modal.js.map +1 -1
  85. package/esm/components/modal.spec.js +86 -1
  86. package/esm/components/modal.spec.js.map +1 -1
  87. package/esm/components/page-layout/index.js +1 -1
  88. package/esm/components/page-layout/index.js.map +1 -1
  89. package/esm/components/page-layout/index.spec.js +14 -0
  90. package/esm/components/page-layout/index.spec.js.map +1 -1
  91. package/esm/components/rating.d.ts.map +1 -1
  92. package/esm/components/rating.js +28 -21
  93. package/esm/components/rating.js.map +1 -1
  94. package/esm/components/rating.spec.js +151 -4
  95. package/esm/components/rating.spec.js.map +1 -1
  96. package/esm/components/suggest/index.d.ts.map +1 -1
  97. package/esm/components/suggest/index.js +14 -1
  98. package/esm/components/suggest/index.js.map +1 -1
  99. package/esm/components/suggest/index.spec.js +98 -43
  100. package/esm/components/suggest/index.spec.js.map +1 -1
  101. package/esm/components/suggest/suggest-manager.js +2 -2
  102. package/esm/components/suggest/suggest-manager.js.map +1 -1
  103. package/esm/components/tabs.d.ts.map +1 -1
  104. package/esm/components/tabs.js +4 -0
  105. package/esm/components/tabs.js.map +1 -1
  106. package/esm/components/tree/tree-item.d.ts.map +1 -1
  107. package/esm/components/tree/tree-item.js +18 -5
  108. package/esm/components/tree/tree-item.js.map +1 -1
  109. package/esm/components/tree/tree.d.ts +7 -0
  110. package/esm/components/tree/tree.d.ts.map +1 -1
  111. package/esm/components/tree/tree.js +12 -3
  112. package/esm/components/tree/tree.js.map +1 -1
  113. package/esm/components/tree/tree.spec.js +64 -2
  114. package/esm/components/tree/tree.spec.js.map +1 -1
  115. package/esm/services/collection-service.d.ts +9 -0
  116. package/esm/services/collection-service.d.ts.map +1 -1
  117. package/esm/services/collection-service.js +33 -11
  118. package/esm/services/collection-service.js.map +1 -1
  119. package/esm/services/collection-service.spec.js +33 -24
  120. package/esm/services/collection-service.spec.js.map +1 -1
  121. package/esm/services/css-variable-theme.d.ts +7 -0
  122. package/esm/services/css-variable-theme.d.ts.map +1 -1
  123. package/esm/services/css-variable-theme.js +23 -0
  124. package/esm/services/css-variable-theme.js.map +1 -1
  125. package/esm/services/css-variable-theme.spec.js +1 -0
  126. package/esm/services/css-variable-theme.spec.js.map +1 -1
  127. package/esm/services/list-service.d.ts +9 -0
  128. package/esm/services/list-service.d.ts.map +1 -1
  129. package/esm/services/list-service.js +13 -13
  130. package/esm/services/list-service.js.map +1 -1
  131. package/esm/services/list-service.spec.js +13 -33
  132. package/esm/services/list-service.spec.js.map +1 -1
  133. package/esm/services/theme-provider-service.d.ts +3 -0
  134. package/esm/services/theme-provider-service.d.ts.map +1 -1
  135. package/esm/services/theme-provider-service.js.map +1 -1
  136. package/esm/services/tree-service.d.ts.map +1 -1
  137. package/esm/services/tree-service.js +5 -9
  138. package/esm/services/tree-service.js.map +1 -1
  139. package/esm/services/tree-service.spec.js +12 -9
  140. package/esm/services/tree-service.spec.js.map +1 -1
  141. package/esm/themes/architect-theme.d.ts +1 -0
  142. package/esm/themes/architect-theme.d.ts.map +1 -1
  143. package/esm/themes/architect-theme.js +1 -0
  144. package/esm/themes/architect-theme.js.map +1 -1
  145. package/esm/themes/auditore-theme.d.ts +1 -0
  146. package/esm/themes/auditore-theme.d.ts.map +1 -1
  147. package/esm/themes/auditore-theme.js +1 -0
  148. package/esm/themes/auditore-theme.js.map +1 -1
  149. package/esm/themes/black-mesa-theme.d.ts +1 -0
  150. package/esm/themes/black-mesa-theme.d.ts.map +1 -1
  151. package/esm/themes/black-mesa-theme.js +1 -0
  152. package/esm/themes/black-mesa-theme.js.map +1 -1
  153. package/esm/themes/chieftain-theme.d.ts +1 -0
  154. package/esm/themes/chieftain-theme.d.ts.map +1 -1
  155. package/esm/themes/chieftain-theme.js +1 -0
  156. package/esm/themes/chieftain-theme.js.map +1 -1
  157. package/esm/themes/default-dark-theme.d.ts +1 -0
  158. package/esm/themes/default-dark-theme.d.ts.map +1 -1
  159. package/esm/themes/default-dark-theme.js +1 -0
  160. package/esm/themes/default-dark-theme.js.map +1 -1
  161. package/esm/themes/default-light-theme.d.ts +1 -0
  162. package/esm/themes/default-light-theme.d.ts.map +1 -1
  163. package/esm/themes/default-light-theme.js +1 -0
  164. package/esm/themes/default-light-theme.js.map +1 -1
  165. package/esm/themes/dragonborn-theme.d.ts +1 -0
  166. package/esm/themes/dragonborn-theme.d.ts.map +1 -1
  167. package/esm/themes/dragonborn-theme.js +1 -0
  168. package/esm/themes/dragonborn-theme.js.map +1 -1
  169. package/esm/themes/hawkins-theme.d.ts +1 -0
  170. package/esm/themes/hawkins-theme.d.ts.map +1 -1
  171. package/esm/themes/hawkins-theme.js +1 -0
  172. package/esm/themes/hawkins-theme.js.map +1 -1
  173. package/esm/themes/jedi-theme.d.ts +1 -0
  174. package/esm/themes/jedi-theme.d.ts.map +1 -1
  175. package/esm/themes/jedi-theme.js +1 -0
  176. package/esm/themes/jedi-theme.js.map +1 -1
  177. package/esm/themes/neon-runner-theme.d.ts +1 -0
  178. package/esm/themes/neon-runner-theme.d.ts.map +1 -1
  179. package/esm/themes/neon-runner-theme.js +1 -0
  180. package/esm/themes/neon-runner-theme.js.map +1 -1
  181. package/esm/themes/paladin-theme.d.ts +1 -0
  182. package/esm/themes/paladin-theme.d.ts.map +1 -1
  183. package/esm/themes/paladin-theme.js +1 -0
  184. package/esm/themes/paladin-theme.js.map +1 -1
  185. package/esm/themes/plumber-theme.d.ts +1 -0
  186. package/esm/themes/plumber-theme.d.ts.map +1 -1
  187. package/esm/themes/plumber-theme.js +1 -0
  188. package/esm/themes/plumber-theme.js.map +1 -1
  189. package/esm/themes/replicant-theme.d.ts +1 -0
  190. package/esm/themes/replicant-theme.d.ts.map +1 -1
  191. package/esm/themes/replicant-theme.js +1 -0
  192. package/esm/themes/replicant-theme.js.map +1 -1
  193. package/esm/themes/sandworm-theme.d.ts +1 -0
  194. package/esm/themes/sandworm-theme.d.ts.map +1 -1
  195. package/esm/themes/sandworm-theme.js +1 -0
  196. package/esm/themes/sandworm-theme.js.map +1 -1
  197. package/esm/themes/shadow-broker-theme.d.ts +1 -0
  198. package/esm/themes/shadow-broker-theme.d.ts.map +1 -1
  199. package/esm/themes/shadow-broker-theme.js +1 -0
  200. package/esm/themes/shadow-broker-theme.js.map +1 -1
  201. package/esm/themes/sith-theme.d.ts +1 -0
  202. package/esm/themes/sith-theme.d.ts.map +1 -1
  203. package/esm/themes/sith-theme.js +1 -0
  204. package/esm/themes/sith-theme.js.map +1 -1
  205. package/esm/themes/vault-dweller-theme.d.ts +1 -0
  206. package/esm/themes/vault-dweller-theme.d.ts.map +1 -1
  207. package/esm/themes/vault-dweller-theme.js +1 -0
  208. package/esm/themes/vault-dweller-theme.js.map +1 -1
  209. package/esm/themes/wild-hunt-theme.d.ts +1 -0
  210. package/esm/themes/wild-hunt-theme.d.ts.map +1 -1
  211. package/esm/themes/wild-hunt-theme.js +1 -0
  212. package/esm/themes/wild-hunt-theme.js.map +1 -1
  213. package/esm/themes/xenomorph-theme.d.ts +1 -0
  214. package/esm/themes/xenomorph-theme.d.ts.map +1 -1
  215. package/esm/themes/xenomorph-theme.js +1 -0
  216. package/esm/themes/xenomorph-theme.js.map +1 -1
  217. package/package.json +7 -7
  218. package/src/components/accordion/accordion-item.tsx +9 -14
  219. package/src/components/accordion/accordion.spec.tsx +134 -79
  220. package/src/components/accordion/accordion.tsx +13 -1
  221. package/src/components/carousel.tsx +1 -1
  222. package/src/components/chip.spec.tsx +64 -0
  223. package/src/components/chip.tsx +4 -1
  224. package/src/components/command-palette/index.spec.tsx +95 -33
  225. package/src/components/command-palette/index.tsx +15 -3
  226. package/src/components/data-grid/data-grid-row.tsx +20 -2
  227. package/src/components/data-grid/data-grid.spec.tsx +185 -57
  228. package/src/components/data-grid/data-grid.tsx +38 -13
  229. package/src/components/data-grid/selection-cell.tsx +1 -0
  230. package/src/components/dialog.spec.tsx +77 -2
  231. package/src/components/dialog.tsx +14 -1
  232. package/src/components/dropdown.spec.tsx +9 -0
  233. package/src/components/dropdown.tsx +1 -0
  234. package/src/components/image.spec.tsx +82 -0
  235. package/src/components/image.tsx +16 -7
  236. package/src/components/inputs/checkbox.tsx +1 -0
  237. package/src/components/inputs/radio.tsx +1 -0
  238. package/src/components/inputs/slider.tsx +1 -0
  239. package/src/components/inputs/switch.tsx +1 -0
  240. package/src/components/list/list-item.tsx +22 -4
  241. package/src/components/list/list.spec.tsx +165 -32
  242. package/src/components/list/list.tsx +37 -10
  243. package/src/components/markdown/markdown-display.spec.tsx +132 -0
  244. package/src/components/markdown/markdown-display.tsx +12 -1
  245. package/src/components/markdown/markdown-editor.spec.tsx +123 -0
  246. package/src/components/menu/menu.tsx +1 -1
  247. package/src/components/modal.spec.tsx +124 -1
  248. package/src/components/modal.tsx +41 -3
  249. package/src/components/page-layout/index.spec.tsx +20 -0
  250. package/src/components/page-layout/index.tsx +1 -1
  251. package/src/components/rating.spec.tsx +199 -4
  252. package/src/components/rating.tsx +28 -22
  253. package/src/components/suggest/index.spec.tsx +147 -43
  254. package/src/components/suggest/index.tsx +15 -2
  255. package/src/components/suggest/suggest-manager.ts +2 -2
  256. package/src/components/tabs.tsx +4 -0
  257. package/src/components/tree/tree-item.tsx +19 -4
  258. package/src/components/tree/tree.spec.tsx +101 -2
  259. package/src/components/tree/tree.tsx +21 -3
  260. package/src/services/collection-service.spec.ts +33 -24
  261. package/src/services/collection-service.ts +35 -13
  262. package/src/services/css-variable-theme.spec.ts +1 -0
  263. package/src/services/css-variable-theme.ts +25 -0
  264. package/src/services/list-service.spec.ts +13 -42
  265. package/src/services/list-service.ts +15 -13
  266. package/src/services/theme-provider-service.ts +2 -0
  267. package/src/services/tree-service.spec.ts +12 -9
  268. package/src/services/tree-service.ts +5 -8
  269. package/src/themes/architect-theme.ts +1 -0
  270. package/src/themes/auditore-theme.ts +1 -0
  271. package/src/themes/black-mesa-theme.ts +1 -0
  272. package/src/themes/chieftain-theme.ts +1 -0
  273. package/src/themes/default-dark-theme.ts +1 -0
  274. package/src/themes/default-light-theme.ts +1 -0
  275. package/src/themes/dragonborn-theme.ts +1 -0
  276. package/src/themes/hawkins-theme.ts +1 -0
  277. package/src/themes/jedi-theme.ts +1 -0
  278. package/src/themes/neon-runner-theme.ts +1 -0
  279. package/src/themes/paladin-theme.ts +1 -0
  280. package/src/themes/plumber-theme.ts +1 -0
  281. package/src/themes/replicant-theme.ts +1 -0
  282. package/src/themes/sandworm-theme.ts +1 -0
  283. package/src/themes/shadow-broker-theme.ts +1 -0
  284. package/src/themes/sith-theme.ts +1 -0
  285. package/src/themes/vault-dweller-theme.ts +1 -0
  286. package/src/themes/wild-hunt-theme.ts +1 -0
  287. package/src/themes/xenomorph-theme.ts +1 -0
@@ -41,6 +41,19 @@ export class ListService<T> implements Disposable {
41
41
 
42
42
  public focusedItem = new ObservableValue<T | undefined>(undefined)
43
43
 
44
+ /**
45
+ * Stores the focused item captured on pointerdown, before the focus event
46
+ * can update focusedItem. Used as the anchor for SHIFT+click range selection.
47
+ * Call {@link setFocusAnchor} from `onpointerdown` to snapshot the anchor
48
+ * before focus shifts.
49
+ */
50
+ private focusAnchor: T | undefined = undefined
51
+
52
+ /** Snapshot the current focused item as the anchor for SHIFT+click range selection. */
53
+ public setFocusAnchor(): void {
54
+ this.focusAnchor = this.focusedItem.getValue()
55
+ }
56
+
44
57
  public selection = new ObservableValue<T[]>([])
45
58
 
46
59
  public searchTerm = new ObservableValue('')
@@ -89,14 +102,6 @@ export class ListService<T> implements Disposable {
89
102
  this.focusedItem.setValue(items[items.findIndex((e) => e === this.focusedItem.getValue()) + 1])
90
103
  }
91
104
  break
92
- case 'ArrowUp':
93
- ev.preventDefault()
94
- this.focusedItem.setValue(items[Math.max(0, items.findIndex((e) => e === focusedItem) - 1)])
95
- break
96
- case 'ArrowDown':
97
- ev.preventDefault()
98
- this.focusedItem.setValue(items[Math.min(items.length - 1, items.findIndex((e) => e === focusedItem) + 1)])
99
- break
100
105
  case 'Home': {
101
106
  ev.preventDefault()
102
107
  this.focusedItem.setValue(items[0])
@@ -107,10 +112,6 @@ export class ListService<T> implements Disposable {
107
112
  this.focusedItem.setValue(items[items.length - 1])
108
113
  break
109
114
  }
110
- case 'Tab': {
111
- this.hasFocus.setValue(!hasFocus)
112
- break
113
- }
114
115
  case 'Escape': {
115
116
  ev.preventDefault()
116
117
  this.searchTerm.setValue('')
@@ -134,7 +135,8 @@ export class ListService<T> implements Disposable {
134
135
 
135
136
  public handleItemClick(item: T, ev: MouseEvent) {
136
137
  const currentSelectionValue = this.selection.getValue()
137
- const lastFocused = this.focusedItem.getValue()
138
+ const lastFocused = this.focusAnchor ?? this.focusedItem.getValue()
139
+ this.focusAnchor = undefined
138
140
  if (ev.ctrlKey) {
139
141
  if (currentSelectionValue.includes(item)) {
140
142
  this.selection.setValue(currentSelectionValue.filter((s) => s !== item))
@@ -101,6 +101,8 @@ export type ActionColors = {
101
101
  activeBackground: Color
102
102
  /** Box-shadow value for focus ring indicators */
103
103
  focusRing: string
104
+ /** CSS outline value for keyboard/spatial focus indicators (e.g. '2px solid #3f51b5') */
105
+ focusOutline: string
104
106
  /** Opacity value for disabled elements (e.g. '0.6') */
105
107
  disabledOpacity: string
106
108
  /** Overlay background color for backdrops (drawers, modals) */
@@ -226,16 +226,17 @@ describe('TreeService', () => {
226
226
  })
227
227
  })
228
228
 
229
- it('should move focus to first child on ArrowRight when already expanded', () => {
229
+ it('should not move focus on ArrowRight when already expanded (delegated to spatial navigation)', () => {
230
230
  const { service, rootItems } = createTestService()
231
231
  using(service, () => {
232
232
  service.hasFocus.setValue(true)
233
233
  service.expand(rootItems[0])
234
234
  service.focusedItem.setValue(rootItems[0])
235
235
 
236
- service.handleKeyDown(new KeyboardEvent('keydown', { key: 'ArrowRight' }))
236
+ const ev = new KeyboardEvent('keydown', { key: 'ArrowRight', cancelable: true })
237
+ service.handleKeyDown(ev)
237
238
 
238
- expect(service.focusedItem.getValue()).toBe(rootItems[0].children![0])
239
+ expect(service.focusedItem.getValue()).toBe(rootItems[0])
239
240
  })
240
241
  })
241
242
 
@@ -303,27 +304,29 @@ describe('TreeService', () => {
303
304
  })
304
305
 
305
306
  describe('inherited ListService keyboard navigation', () => {
306
- it('should handle ArrowDown to move focus to next visible item', () => {
307
+ it('should not handle ArrowDown (delegated to spatial navigation)', () => {
307
308
  const { service, rootItems } = createTestService()
308
309
  using(service, () => {
309
310
  service.hasFocus.setValue(true)
310
311
  service.focusedItem.setValue(rootItems[0])
311
312
 
312
- service.handleKeyDown(new KeyboardEvent('keydown', { key: 'ArrowDown' }))
313
+ const ev = new KeyboardEvent('keydown', { key: 'ArrowDown', cancelable: true })
314
+ service.handleKeyDown(ev)
313
315
 
314
- expect(service.focusedItem.getValue()).toBe(rootItems[1])
316
+ expect(service.focusedItem.getValue()).toBe(rootItems[0])
315
317
  })
316
318
  })
317
319
 
318
- it('should handle ArrowUp to move focus to previous visible item', () => {
320
+ it('should not handle ArrowUp (delegated to spatial navigation)', () => {
319
321
  const { service, rootItems } = createTestService()
320
322
  using(service, () => {
321
323
  service.hasFocus.setValue(true)
322
324
  service.focusedItem.setValue(rootItems[1])
323
325
 
324
- service.handleKeyDown(new KeyboardEvent('keydown', { key: 'ArrowUp' }))
326
+ const ev = new KeyboardEvent('keydown', { key: 'ArrowUp', cancelable: true })
327
+ service.handleKeyDown(ev)
325
328
 
326
- expect(service.focusedItem.getValue()).toBe(rootItems[0])
329
+ expect(service.focusedItem.getValue()).toBe(rootItems[1])
327
330
  })
328
331
  })
329
332
 
@@ -134,24 +134,21 @@ export class TreeService<T> extends ListService<T> {
134
134
  if (hasFocus && focusedItem) {
135
135
  switch (ev.key) {
136
136
  case 'ArrowRight': {
137
- ev.preventDefault()
138
137
  const children = this.treeOptions.getChildren(focusedItem)
139
- if (children.length > 0) {
140
- if (this.isExpanded(focusedItem)) {
141
- this.focusedItem.setValue(children[0])
142
- } else {
143
- this.expand(focusedItem)
144
- }
138
+ if (children.length > 0 && !this.isExpanded(focusedItem)) {
139
+ ev.preventDefault()
140
+ this.expand(focusedItem)
145
141
  }
146
142
  return
147
143
  }
148
144
  case 'ArrowLeft': {
149
- ev.preventDefault()
150
145
  if (this.isExpanded(focusedItem)) {
146
+ ev.preventDefault()
151
147
  this.collapse(focusedItem)
152
148
  } else {
153
149
  const parent = this.getParent(focusedItem)
154
150
  if (parent) {
151
+ ev.preventDefault()
155
152
  this.focusedItem.setValue(parent)
156
153
  }
157
154
  }
@@ -36,6 +36,7 @@ export const architectTheme = {
36
36
  selectedBackground: 'rgba(0, 255, 65, 0.14)',
37
37
  activeBackground: 'rgba(0, 255, 65, 0.22)',
38
38
  focusRing: '0 0 0 2px rgba(0, 255, 65, 0.5)',
39
+ focusOutline: '2px solid #00ff41',
39
40
  disabledOpacity: '0.35',
40
41
  backdrop: 'rgba(0, 0, 0, 0.9)',
41
42
  subtleBorder: 'rgba(0, 255, 65, 0.15)',
@@ -36,6 +36,7 @@ export const auditoreTheme = {
36
36
  selectedBackground: 'rgba(176, 16, 48, 0.1)',
37
37
  activeBackground: 'rgba(176, 16, 48, 0.16)',
38
38
  focusRing: '0 0 0 3px rgba(176, 16, 48, 0.2)',
39
+ focusOutline: '2px solid #b01030',
39
40
  disabledOpacity: '0.45',
40
41
  backdrop: 'rgba(42, 32, 40, 0.5)',
41
42
  subtleBorder: 'rgba(42, 32, 40, 0.15)',
@@ -36,6 +36,7 @@ export const blackMesaTheme = {
36
36
  selectedBackground: 'rgba(255, 140, 0, 0.14)',
37
37
  activeBackground: 'rgba(255, 140, 0, 0.22)',
38
38
  focusRing: '0 0 0 2px rgba(255, 140, 0, 0.5)',
39
+ focusOutline: '2px solid #ff8c00',
39
40
  disabledOpacity: '0.4',
40
41
  backdrop: 'rgba(10, 10, 12, 0.88)',
41
42
  subtleBorder: 'rgba(255, 140, 0, 0.18)',
@@ -36,6 +36,7 @@ export const chieftainTheme = {
36
36
  selectedBackground: 'rgba(184, 48, 48, 0.15)',
37
37
  activeBackground: 'rgba(184, 48, 48, 0.22)',
38
38
  focusRing: '0 0 0 3px rgba(184, 48, 48, 0.3)',
39
+ focusOutline: '2px solid #b83030',
39
40
  disabledOpacity: '0.5',
40
41
  backdrop: 'rgba(20, 14, 8, 0.8)',
41
42
  subtleBorder: 'rgba(160, 120, 80, 0.28)',
@@ -31,6 +31,7 @@ export const defaultDarkTheme = {
31
31
  selectedBackground: 'rgba(255, 255, 255, 0.15)',
32
32
  activeBackground: 'rgba(255, 255, 255, 0.2)',
33
33
  focusRing: '0 0 0 3px rgba(255, 255, 255, 0.15)',
34
+ focusOutline: '2px solid #7986cb',
34
35
  disabledOpacity: '0.6',
35
36
  backdrop: 'rgba(0, 0, 0, 0.65)',
36
37
  subtleBorder: 'rgba(255, 255, 255, 0.2)',
@@ -31,6 +31,7 @@ export const defaultLightTheme = {
31
31
  selectedBackground: 'rgba(128, 128, 128, 0.15)',
32
32
  activeBackground: 'rgba(128, 128, 128, 0.2)',
33
33
  focusRing: '0 0 0 3px rgba(128, 128, 128, 0.15)',
34
+ focusOutline: '2px solid #3f51b5',
34
35
  disabledOpacity: '0.6',
35
36
  backdrop: 'rgba(0, 0, 0, 0.5)',
36
37
  subtleBorder: 'rgba(128, 128, 128, 0.2)',
@@ -36,6 +36,7 @@ export const dragonbornTheme = {
36
36
  selectedBackground: 'rgba(200, 160, 80, 0.14)',
37
37
  activeBackground: 'rgba(200, 160, 80, 0.22)',
38
38
  focusRing: '0 0 0 3px rgba(200, 160, 80, 0.3)',
39
+ focusOutline: '2px solid #c8a050',
39
40
  disabledOpacity: '0.5',
40
41
  backdrop: 'rgba(10, 12, 14, 0.8)',
41
42
  subtleBorder: 'rgba(140, 154, 170, 0.22)',
@@ -36,6 +36,7 @@ export const hawkinsTheme = {
36
36
  selectedBackground: 'rgba(204, 51, 51, 0.14)',
37
37
  activeBackground: 'rgba(204, 51, 51, 0.22)',
38
38
  focusRing: '0 0 0 2px rgba(204, 51, 51, 0.45)',
39
+ focusOutline: '2px solid #cc3333',
39
40
  disabledOpacity: '0.4',
40
41
  backdrop: 'rgba(8, 6, 4, 0.9)',
41
42
  subtleBorder: 'rgba(204, 51, 51, 0.18)',
@@ -36,6 +36,7 @@ export const jediTheme = {
36
36
  selectedBackground: 'rgba(74, 144, 217, 0.12)',
37
37
  activeBackground: 'rgba(74, 144, 217, 0.18)',
38
38
  focusRing: '0 0 0 3px rgba(74, 144, 217, 0.3)',
39
+ focusOutline: '2px solid #4a90d9',
39
40
  disabledOpacity: '0.5',
40
41
  backdrop: 'rgba(30, 26, 20, 0.45)',
41
42
  subtleBorder: 'rgba(74, 144, 217, 0.18)',
@@ -33,6 +33,7 @@ export const neonRunnerTheme = {
33
33
  selectedBackground: 'rgba(0, 240, 255, 0.14)',
34
34
  activeBackground: 'rgba(0, 240, 255, 0.22)',
35
35
  focusRing: '0 0 0 2px rgba(0, 240, 255, 0.5)',
36
+ focusOutline: '2px solid #00f0ff',
36
37
  disabledOpacity: '0.4',
37
38
  backdrop: 'rgba(4, 6, 14, 0.85)',
38
39
  subtleBorder: 'rgba(0, 240, 255, 0.2)',
@@ -36,6 +36,7 @@ export const paladinTheme = {
36
36
  selectedBackground: 'rgba(200, 168, 78, 0.15)',
37
37
  activeBackground: 'rgba(200, 168, 78, 0.22)',
38
38
  focusRing: '0 0 0 3px rgba(200, 168, 78, 0.3)',
39
+ focusOutline: '2px solid #c8a84e',
39
40
  disabledOpacity: '0.5',
40
41
  backdrop: 'rgba(14, 18, 22, 0.8)',
41
42
  subtleBorder: 'rgba(180, 192, 205, 0.28)',
@@ -34,6 +34,7 @@ export const plumberTheme = {
34
34
  selectedBackground: 'rgba(230, 0, 18, 0.1)',
35
35
  activeBackground: 'rgba(230, 0, 18, 0.16)',
36
36
  focusRing: '0 0 0 3px rgba(230, 0, 18, 0.25)',
37
+ focusOutline: '2px solid #e60012',
37
38
  disabledOpacity: '0.45',
38
39
  backdrop: 'rgba(26, 26, 46, 0.5)',
39
40
  subtleBorder: 'rgba(26, 26, 46, 0.15)',
@@ -36,6 +36,7 @@ export const replicantTheme = {
36
36
  selectedBackground: 'rgba(255, 158, 0, 0.13)',
37
37
  activeBackground: 'rgba(255, 158, 0, 0.2)',
38
38
  focusRing: '0 0 0 2px rgba(255, 158, 0, 0.4)',
39
+ focusOutline: '2px solid #ff9e00',
39
40
  disabledOpacity: '0.4',
40
41
  backdrop: 'rgba(6, 8, 12, 0.85)',
41
42
  subtleBorder: 'rgba(42, 138, 148, 0.2)',
@@ -36,6 +36,7 @@ export const sandwormTheme = {
36
36
  selectedBackground: 'rgba(212, 130, 10, 0.14)',
37
37
  activeBackground: 'rgba(212, 130, 10, 0.22)',
38
38
  focusRing: '0 0 0 3px rgba(212, 130, 10, 0.3)',
39
+ focusOutline: '2px solid #d4820a',
39
40
  disabledOpacity: '0.5',
40
41
  backdrop: 'rgba(12, 10, 6, 0.8)',
41
42
  subtleBorder: 'rgba(160, 128, 96, 0.25)',
@@ -34,6 +34,7 @@ export const shadowBrokerTheme = {
34
34
  selectedBackground: 'rgba(255, 109, 0, 0.14)',
35
35
  activeBackground: 'rgba(255, 109, 0, 0.22)',
36
36
  focusRing: '0 0 0 2px rgba(255, 109, 0, 0.5)',
37
+ focusOutline: '2px solid #ff6d00',
37
38
  disabledOpacity: '0.4',
38
39
  backdrop: 'rgba(4, 6, 14, 0.85)',
39
40
  subtleBorder: 'rgba(48, 128, 224, 0.2)',
@@ -36,6 +36,7 @@ export const sithTheme = {
36
36
  selectedBackground: 'rgba(204, 32, 32, 0.14)',
37
37
  activeBackground: 'rgba(204, 32, 32, 0.22)',
38
38
  focusRing: '0 0 0 2px rgba(204, 32, 32, 0.5)',
39
+ focusOutline: '2px solid #cc2020',
39
40
  disabledOpacity: '0.4',
40
41
  backdrop: 'rgba(6, 4, 4, 0.9)',
41
42
  subtleBorder: 'rgba(204, 32, 32, 0.2)',
@@ -36,6 +36,7 @@ export const vaultDwellerTheme = {
36
36
  selectedBackground: 'rgba(48, 255, 80, 0.14)',
37
37
  activeBackground: 'rgba(48, 255, 80, 0.22)',
38
38
  focusRing: '0 0 0 2px rgba(48, 255, 80, 0.5)',
39
+ focusOutline: '2px solid #30ff50',
39
40
  disabledOpacity: '0.4',
40
41
  backdrop: 'rgba(0, 0, 0, 0.85)',
41
42
  subtleBorder: 'rgba(48, 255, 80, 0.2)',
@@ -36,6 +36,7 @@ export const wildHuntTheme = {
36
36
  selectedBackground: 'rgba(168, 32, 32, 0.14)',
37
37
  activeBackground: 'rgba(168, 32, 32, 0.22)',
38
38
  focusRing: '0 0 0 3px rgba(168, 176, 188, 0.3)',
39
+ focusOutline: '2px solid #a8b0bc',
39
40
  disabledOpacity: '0.5',
40
41
  backdrop: 'rgba(6, 8, 12, 0.85)',
41
42
  subtleBorder: 'rgba(168, 176, 188, 0.2)',
@@ -34,6 +34,7 @@ export const xenomorphTheme = {
34
34
  selectedBackground: 'rgba(126, 200, 80, 0.13)',
35
35
  activeBackground: 'rgba(126, 200, 80, 0.2)',
36
36
  focusRing: '0 0 0 2px rgba(126, 200, 80, 0.45)',
37
+ focusOutline: '2px solid #7ec850',
37
38
  disabledOpacity: '0.4',
38
39
  backdrop: 'rgba(6, 8, 10, 0.9)',
39
40
  subtleBorder: 'rgba(126, 200, 80, 0.18)',