discourse/app/assets/stylesheets/common/form-kit
Joffrey JAFFEUX cbc0ece6e8
DEV: <DSelect /> (#30224)
`<DSelect />` is a wrapper similar to our existing `<DButton />` over the html element `<select>`. The code is ported from form kit which is now directly using `<DSelect />`. Note this component has also been used in edit topic timer modal.

This component is recommended for a small list of text items (no icons, no rich formatting...).

Usage:

```gjs
<DSelect class="my-select" @onChange={{this.handleChange}} as |select|>
  <select.Option @value="foo" class="my-favorite-option">Foo</select.Option>
  <select.Option @value="bar">Bar</select.Option>
</DSelect>
```

This commit comes with a set of assertions:

```gjs
import dselect from "discourse/tests/helpers/d-select-helper";
import { select } from "@ember/test-helpers";

assert
  .dselect(".my-select")
  .hasOption({ value: "bar", label: "Bar" })
  .hasOption({ value: "foo", label: "Foo" })
  .hasNoOption("baz");

await select(".my-select", "foo");

assert.dselect(".my-select").hasSelectedOption({value: "foo", label: "Foo"});
```
2024-12-13 10:40:06 +01:00
..
_alert.scss UX: move admin flag form to form-kit (#28187) 2024-08-05 11:01:25 +10:00
_char-counter.scss
_checkbox-group.scss DEV: Convert admin user fields to FormKit (#29070) 2024-10-14 13:19:53 +08:00
_col.scss
_collection.scss
_conditional-display.scss
_container.scss DEV: Migrate about config area to Form Kit (#28021) 2024-07-25 19:07:38 +03:00
_control-checkbox.scss UX: move admin flag form to form-kit (#28187) 2024-08-05 11:01:25 +10:00
_control-code.scss FIX: correctly render ace editor in FormKit (#28601) 2024-08-28 16:24:44 +02:00
_control-composer.scss
_control-custom-value-list.scss DEV: Convert admin user fields to FormKit (#29070) 2024-10-14 13:19:53 +08:00
_control-custom.scss DEV: Migrate about config area to Form Kit (#28021) 2024-07-25 19:07:38 +03:00
_control-icon.scss DEV: Convert group SMTP settings form to FormKit (#27965) 2024-07-24 09:52:52 +10:00
_control-image.scss
_control-input-group.scss
_control-input.scss DEV: <DSelect /> (#30224) 2024-12-13 10:40:06 +01:00
_control-menu.scss UX: DMenu list buttons default styling (#29250) 2024-10-21 05:05:38 +02:00
_control-password.scss DEV: Convert group SMTP settings form to FormKit (#27965) 2024-07-24 09:52:52 +10:00
_control-radio.scss UX: move admin flag form to form-kit (#28187) 2024-08-05 11:01:25 +10:00
_control-select.scss DEV: <DSelect /> (#30224) 2024-12-13 10:40:06 +01:00
_control-textarea.scss UX: fix textarea height on mobile (#28495) 2024-08-22 16:31:48 -04:00
_default-input-mixin.scss DEV: <DSelect /> (#30224) 2024-12-13 10:40:06 +01:00
_errors-summary.scss DEV: remap all core icons for fontawesome 6 upgrade (#28715) 2024-09-13 16:50:52 +01:00
_errors.scss
_field.scss FIX: applies full class to field (#29190) 2024-10-15 10:24:39 +09:00
_fieldset.scss UX: move admin flag form to form-kit (#28187) 2024-08-05 11:01:25 +10:00
_form-kit.scss
_index.scss DEV: Convert admin user fields to FormKit (#29070) 2024-10-14 13:19:53 +08:00
_meta.scss
_row.scss
_section.scss
_variables.scss