This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Commit 5324ba9
feat(menu): Submenu (#539)
* feat(menuItem: add menu prop)
* Only one submenu open at a time
* Fix bug: submenu noe closes on clicking a menuItem with no submenu
* Code cleanup
* Remove the activeIndex prop passed to the menuItem
* Remove Popup and implement submenu without it
* initial keyboard support
* left/right arrow handling
* simplify keyboard handlers
* -fixed import in the MenuItem
* -added submenuIndicator
-small fixes in the styles and the way the submenu is generated
* -clicking on leaf element should close the submenus (the same should be done for enter/space)
-applied consistent (left-right) navigation for horizontal menu and (up-down) navigation for vertical menu
* -implemented outside click to close all menus
-implemented enter key on leaf menu item to close the menu
* -fixed import
* -refactored MenuItem handlers - fixed issues
-removed onClick handler for the Menu (not necessary for now)
-added onKeyDown in the creation of the MenuItem in the Menu component for handling the action prop
* -added setActiveIndex callback and removed onKeyDown in the creation of MenuItems in the Menu component
* -right arrow key is closing the submenus and goes to the next element if the menu is horizontal, or is focusing the first MenuItem if it is vertical
* -handled left arrow key
* -changed ref
-focus trap wip
* -added Ref component instead of using the itemRef on the ElementType
-removed subscription for focus
* -fixes
* -moved ref //TODO: figure out tests failing
* -close menu on outside focus
* -improved comments
* -fixed escape key not focusing the active element
-changed parentRef to inSubmenu boolean
* -fixing key problems
-added dependency for generating id
* -refactored submenuRef element
* fix broken tests
* -added comments in the tests
-changed the submenuDomElement so submenuRef
* -renamed inSubmenu to submenu prop in the Menu
* -fixed with the auto-controlled prop in the Menu
* -added state interface in the Menu
-improved menu variables' names
* -fixed variables in examples
* -remove state initialization in the MenuItem component
* -added new handler for escape
-changed submenu examples titles
* -refactored conditions using doesNodeContainClick
* -renamed submenu* props to menu in the MenuItem component
-changed setActiveIndex with onActiveChanged
-introduced different styles for the hovering vs active elements
* -improved example
-fixed issue with the condition for the active prop
* -exported MenuState
-added correct typings to the menuStyles
* -fixed underlined active + hovered style
* -fixed border corner clipped by adding custom styles for the first child menu items and the last child menu items in vertical menu
* -addressed comments on PR
* chore: prepare release 0.15.0 [ci skip]
* 0.15.0
* fix(Prototype): Fix Popover prototype after breaking changes (#623)
* chore: cache results of vulnerability scans (#621)
* implement caching strategy
* adjust file name of scan marker
* add yarn lock hash to marker file name
* add change to build config
* fix dir name in build config
* improve caching strategy
* just restore cache
* temporary remove lint and tests
* try
* fix caching strategy
* try
* try
* try
* try epoch
* create file on scan
* return lint and test steps
* introduce comment for the caching approach taken
* remove unnecessary function
* simplify expression for marker file name
* feat(text): color prop (#597)
* feat(text): color prop
* addressed comments
* changelog
* amended changelog
* made text color override other props that change color
* feat(header): header and header description color prop (#628)
* feat(header): header and header description color prop
* changelog
* fixed examples
* addressed PR comments
* fix(Popup): allow to 'detach' from trigger and RTL adjustments (#612)
* introduce offset prop
* correct description of supported values
* update changelog
* introduce fix
* ensure RTL is properly applied to complex offset expressions
* rename method to make logic more expressive
* add unit tests
* remove unnecessary grid props from offset example
* update changelog
* fix(SelectableList): Items in list should be selectable (#566)
* Reflect which item is selected in list
* Make list derived from autocontrolled component
* small fix
* Update ListExampleSelection.tsx
* Update ListExampleSelection.shorthand.tsx
* Small improvement
* Rename *ItemIndex -> *Index
* Names refactoring
* Minor improvements
* update changelog
* Add onSelectedIndexChange
* Add some tests
* Small improvements afer CR
* Small improvements afer CR
* Small improvements afer CR
* create focus handler when List is constructed
* fix changelog
* changelog
* docs(Examples): allow to use TS in examples (#617)
* docs(Examples): allow to use TS in examples
* add jsdoc
* fix typo
* rename file
* add comment
* `createExample` to `createExampleSourceCode`
* rework with `path.relative()`
* remove JSON files on remove tsx
* create getRelativePathToSource function
* -updated changelog
* -updated changelog
* -updated changelog with breaking changes
-removed TODO comment
* -fixed imports in examples1 parent c9cfb51 commit 5324ba9
File tree
19 files changed
+500
-82
lines changed- docs/src
- components
- examples/components/Menu
- Types
- Variations
- src
- components/Menu
- lib/accessibility
- Behaviors/Menu
- themes/teams/components/Menu
- test/specs
- behaviors
- commonTests
- components/Menu
19 files changed
+500
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
68 | | - | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
| |||
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| 99 | + | |
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
| |||
107 | 116 | | |
108 | 117 | | |
109 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
110 | 128 | | |
111 | 129 | | |
112 | 130 | | |
| |||
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| 140 | + | |
122 | 141 | | |
123 | 142 | | |
124 | 143 | | |
125 | | - | |
126 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
127 | 148 | | |
128 | 149 | | |
129 | 150 | | |
| |||
134 | 155 | | |
135 | 156 | | |
136 | 157 | | |
137 | | - | |
| 158 | + | |
| 159 | + | |
138 | 160 | | |
139 | 161 | | |
140 | | - | |
141 | | - | |
| 162 | + | |
| 163 | + | |
142 | 164 | | |
143 | 165 | | |
144 | 166 | | |
| |||
151 | 173 | | |
152 | 174 | | |
153 | 175 | | |
| 176 | + | |
| 177 | + | |
154 | 178 | | |
0 commit comments