* [RFC] Proof-of-concept commit for submenu support
This is a Request For Comments to seek directional guidance towards
implementing the submenu slot of menu-item.
Includes:
- SubmenuController to manage event listeners on menu-item.
- Example usage in menu-item documentation.
- Trivial tests to check rendering.
Outstanding questions include:
- Accessibility concerns. E.g. where to handle 'ArrowRight',
'ArrowLeft'?
- Should selection of menu-item denoting submenu be possible or
customizable?
- How to parameterize contained popup?
- Implementation concerns:
- Use of ref / id
- delegation of some rendering to the controller
- What to test
Related to [#620](https://github.com/shoelace-style/shoelace/issues/620).
* Update submenu-controller.ts
Removed extraneous `console.log()`.
* PoC working of ArrowRight to focus on submenu.
* Revert "PoC working of ArrowRight to focus on submenu."
(Didn't mean to publish this.)
This reverts commit be04e9a221.
* [WIP] Submenu WIP continues.
- Submenus now close on change-of-focus, not a timeout.
- Keyboard navigation support added.
- Skidding fix for better alignment.
- Submenu documentation moved to Menu page.
- Tests for accessibility, right and left arrow keys.
* Cleanup: Removed dead code and dead code comments.
* style: Eslint warnings and errors fixed. npm run verify now passes.
* fix: 2 changes to menu / submenu on-click behavior:
1. Close submenu on click explicitly, so this occurs even if the menu is
not inside of an sl-dropdown.
2. In menu, ignore clicks that do not explicitly target a menu-item.
Clicks that were on (e.g. a menu-border) were emitting select events.
* fix: Prevent menu's extraneous Enter / space key propagation.
Menu's handleKeyDown calls item.click (to emit the selection).
Propagating the keyboard event on Enter / space would the cause re-entry
into a submenu, so prevent the needless propagation.
* Submenu tweaks ...
- 100 ms delay when opening submenus on mouseover
- Shadows added
- Distance added to popup to have submenus overlap menu slightly.
* polish up submenu stuff
* stay highlighted when submenu is open
* update changelog
* resolve feedback
---------
Co-authored-by: Bryce Moore <bryce.moore@gmail.com>
* Never select tree items when clicking the chevron
This changes the behaviour of sl-tree so that clicking on the expand/collapse icon will not select/deselect the item, only toggle it's expanded state.
* Refactor: inline SlTree.syncTreeItems
This was only called from 2 places, and they each had different
behaviour anyways.
* SlTree: separate expand/collapse from selection
This makes 'multi' and 'single' mode consistent with each other, and
with native file managers.
* feat(clipboard): add new component sl-clipboard
* using slots
* using a single copyStatus
* feat(clipboard): support inputs/textarea/links and shadow dom
* fix(clipboard): add area-live to announce copied
* feat(clipboard): support any component with a value property
* initial attempt at not auto defining
* add files with -
* continued work on removing auto-define
* fix component definitions
* update with new tag stuff
* fix lots of things
* fix improper scoped elements
* working through side effects
* continued react wrapper work
* update changelog
* formatting
* fixes
* update changelog
* lint / formatting
* fix version injection
* fix version injection, work on test
* fix version injection, work on test
* fix merge conflicts
* fix jsdoc null issue
* fix templates
* use exports
* working on tests
* working on registration mocking
* fix customElements test
* linting
* fix some test stuff
* clean up test
* clean up comment
* rename scopedElements to dependencies
* linting / formatting
* linting / formatting
* mark all packages external and still bundle
* set bundle false
* set bundle true
* dont minify
* fix merge conflicts
* use built shoelace-element
* fix lint errors
* prettier
* appease eslint
* appease eslint gods
* appease eslint gods
* appease eslint gods
* appease eslint gods
* add shoelace-autoloader
* move it all into 1 function
* add exportmaps note
* prettier
* add jsdelivr entrypoint
* read as utf8
* update docs with .component.js importS
* prettier
* Move keydown handler for sl-drawer back to base div
This restores the stacking behaviour of drawers
See: #1457
* Autofocus panel of sl-drawer when it is open on firstUpdate
* update base path docs
* fix examples
* fix broken CEM data in <sl-popup>
* Update docs/pages/getting-started/installation.md
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
---------
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
* Rename SlSlideChange for consistency with other events
* Setup React event types for events used by Shoelace components
Means that consumers of Shoelace via the React wrapper will be able to
use callback methods with the correct event type, instead of having to
rely on casting and friends when using Typescript.
* Add docs demonstrating importing event types for React callbacks
* add modal tab tracking
* prettier
* sort by tabindex
* sort by tabindex
* add a dialog test case for shadow roots
* add a changelog note
* add a changelog note
* prettier + test fixes
* prettier + test fixes
* Add tests for qr-code
* Fix a small bug in qr-code
The background color was not passed to the
qr code
---------
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
* Added tests for sl-split-panel
test for horizontal arrangement
* Added tests for sl-split-panel
tests for vertical arrangement
---------
Co-authored-by: stefanie.hellgartner <stefanie.hellgartner@in-tech.com>
* add regression test for checkbox focusing
* change number of checkboxes / switches
* change max-height to 400px so it fails
* re-add positon: relative;
* Improve performance of sl-icon by caching later
* Fixed error handling
* Don't use requestInclude in sl-icon
* Separate sl-icon errors into cacheable and retryable errors