From 145c5b7c5a050b22c6e4d329264c650cb03c4c1a Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Thu, 1 Aug 2024 13:35:19 -0400 Subject: [PATCH] backport 2063 --- docs/docs/components/select.md | 27 ++++++++++++++++++++++++++ docs/docs/resources/changelog.md | 2 +- src/components/avatar/avatar.ts | 2 +- src/components/dropdown/dropdown.ts | 2 +- src/components/select/select.styles.ts | 8 ++++++++ src/components/select/select.ts | 6 +++++- 6 files changed, 43 insertions(+), 4 deletions(-) diff --git a/docs/docs/components/select.md b/docs/docs/components/select.md index f08a44994..2894d9484 100644 --- a/docs/docs/components/select.md +++ b/docs/docs/components/select.md @@ -224,6 +224,33 @@ Use the `prefix` slot to prepend an icon to the control. ``` +### Suffix Icons + +Use the `suffix` slot to append an icon to the control. + +```html {.example} + + + Option 1 + Option 2 + Option 3 + +
+ + + Option 1 + Option 2 + Option 3 + +
+ + + Option 1 + Option 2 + Option 3 + +``` + ### Custom Tags When multiple options can be selected, you can provide custom tags by passing a function to the `getTag` property. Your function can return a string of HTML, a Lit Template, or an [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement). The `getTag()` function will be called for each option. The first argument is an `` element and the second argument is the tag's index (its position in the tag list). diff --git a/docs/docs/resources/changelog.md b/docs/docs/resources/changelog.md index 5e4150711..e742141c6 100644 --- a/docs/docs/resources/changelog.md +++ b/docs/docs/resources/changelog.md @@ -35,7 +35,7 @@ Here's a list of some of the things that have changed since Shoelace v2. For que - Added the `active` attribute to `` - Added an easier way to close dialogs by applying `data-dialog="close"` to any button in the dialog - Added an easier way to close drawers by applying `data-dialog="close"` to any button in the drawer -- Added the `--show-duration` and `--hide-duration` custom properties to ``, ``, ``, ``, and `` +- Added the `--show-duration` and `--hide-duration` custom properties to ``, ``, ``, ``, and `` - Added visible labels to `` - Changed the attribute for setting the base path declaratively to `data-webawesome` instead of `data-shoelace`; additionally, you can place it on any element now instead of just the associated `