@wikicasa-dev/components 2.9.1 → 2.10.0
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.
- package/dist/UIKit/BaseSnackbar.vue.js +1 -1
- package/dist/assets/AccessibleSelect.css +1 -1
- package/dist/assets/BaseBadge.css +1 -1
- package/dist/assets/BaseComplexToggle2.css +1 -1
- package/dist/assets/BaseDropDown.css +1 -1
- package/dist/assets/BaseFloatingLabel2.css +1 -1
- package/dist/assets/BaseSlider2.css +1 -1
- package/dist/assets/BaseSnackbar.css +1 -1
- package/dist/assets/BaseTabs.css +1 -1
- package/dist/assets/BaseTextarea2.css +1 -1
- package/dist/assets/BaseTooltip2.css +1 -1
- package/dist/assets/baseAlert.css +1 -1
- package/dist/assets/baseComplexToggle.css +1 -1
- package/dist/assets/baseFloatingLabel.css +1 -1
- package/dist/assets/baseSlider.css +1 -1
- package/dist/assets/baseTextarea.css +1 -1
- package/dist/assets/baseTooltip.css +1 -1
- package/dist/assets/tailwind.css +1 -1
- package/dist/assets/tokens.css +1 -0
- package/dist/docs/AccessibleSelect.md +121 -0
- package/dist/docs/AccordionContentPrimitive.md +70 -0
- package/dist/docs/AccordionHeaderPrimitive.md +70 -0
- package/dist/docs/AccordionItemPrimitive.md +98 -0
- package/dist/docs/AccordionTriggerPrimitive.md +71 -0
- package/dist/docs/BaseAccordion.md +98 -0
- package/dist/docs/BaseAccordionItem.md +100 -0
- package/dist/docs/BaseAlert.md +83 -0
- package/dist/docs/BaseAutocomplete.md +125 -0
- package/dist/docs/BaseBadge.md +92 -0
- package/dist/docs/BaseBreadcrumb.md +83 -0
- package/dist/docs/BaseButton.md +129 -0
- package/dist/docs/BaseCard.md +110 -0
- package/dist/docs/BaseComplexToggle.md +99 -0
- package/dist/docs/BaseDropDown.md +122 -0
- package/dist/docs/BaseFloatingLabel.md +89 -0
- package/dist/docs/BaseInput.md +130 -0
- package/dist/docs/BaseModal.md +129 -0
- package/dist/docs/BasePagination.md +109 -0
- package/dist/docs/BaseShimmerLoader.md +86 -0
- package/dist/docs/BaseSlider.md +87 -0
- package/dist/docs/BaseSnackbar.md +120 -0
- package/dist/docs/BaseTab.md +84 -0
- package/dist/docs/BaseTabView.md +90 -0
- package/dist/docs/BaseTabs.md +116 -0
- package/dist/docs/BaseTabsContent.md +71 -0
- package/dist/docs/BaseTabsIndicator.md +73 -0
- package/dist/docs/BaseTabsList.md +76 -0
- package/dist/docs/BaseTabsTrigger.md +70 -0
- package/dist/docs/BaseTextarea.md +99 -0
- package/dist/docs/BaseToggle.md +88 -0
- package/dist/docs/BaseTooltip.md +87 -0
- package/dist/docs/BaseUploadFile.md +96 -0
- package/dist/docs/CardDescriptionPrimitive.md +73 -0
- package/dist/docs/CardImagePrimitive.md +73 -0
- package/dist/docs/CardRootPrimitive.md +99 -0
- package/dist/docs/CheckboxBtn.md +96 -0
- package/dist/docs/CheckboxButtonGroup.md +115 -0
- package/dist/docs/CheckboxGroup.md +102 -0
- package/dist/docs/CheckboxGroupItemPrimitive.md +104 -0
- package/dist/docs/CheckboxGroupPrimitive.md +105 -0
- package/dist/docs/ClearableAutocomplete.md +135 -0
- package/dist/docs/DoughnutChart.md +88 -0
- package/dist/docs/INDEX.md +133 -0
- package/dist/docs/IntersectionObservable.md +78 -0
- package/dist/docs/IntersectionObserver.md +84 -0
- package/dist/docs/IntersectionObserverProvider.md +98 -0
- package/dist/docs/IntersectionObserverTarget.md +73 -0
- package/dist/docs/LineChart.md +98 -0
- package/dist/docs/ProgressIndicatorPrimitive.md +70 -0
- package/dist/docs/ProgressRootPrimitive.md +106 -0
- package/dist/docs/RadioButton.md +86 -0
- package/dist/docs/RadioButtonGroup.md +107 -0
- package/dist/docs/RadioButtonItem.md +101 -0
- package/dist/docs/RadioGroup.md +95 -0
- package/dist/docs/RadioGroupItemPrimitive.md +102 -0
- package/dist/docs/SelectItem.md +100 -0
- package/dist/docs/ShimmerMultiLine.md +79 -0
- package/dist/docs/SimpleSlider.md +80 -0
- package/dist/docs/StaticSpinner.md +76 -0
- package/dist/docs/SwiperCarousel.md +126 -0
- package/dist/docs/SwiperNavigationPrimitive.md +83 -0
- package/dist/docs/SwiperPaginationPrimitive.md +80 -0
- package/dist/docs/SwiperPrimitive.md +77 -0
- package/dist/docs/SwiperRootPrimitive.md +123 -0
- package/dist/docs/SwiperSlide.md +75 -0
- package/dist/docs/SwiperSlideImagePrimitive.md +98 -0
- package/dist/docs/SwiperThumbnailPrimitive.md +96 -0
- package/dist/docs/TOKENS.md +50 -0
- package/dist/docs/agent-index.md +86 -0
- package/dist/lazyModules/Swiper/Autoplay/index.js +1 -1
- package/dist/lazyModules/Swiper/Controller/index.js +1 -1
- package/dist/lazyModules/Swiper/Keyboard/index.js +1 -1
- package/dist/lazyModules/Swiper/Thumbs/index.js +1 -1
- package/package.json +9 -8
- /package/dist/assets/{swiper-thumbs.css → swiper-autoplay.css} +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CheckboxBtn
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Forms
|
|
5
|
+
summary: Single accessible checkbox with a clickable text label, bound to a boolean.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Checkbox/CheckboxBtn
|
|
7
|
+
version: 2.10.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CheckboxBtn
|
|
11
|
+
|
|
12
|
+
Single accessible checkbox with a clickable text label, bound to a boolean.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import CheckboxBtn from "@wikicasa-dev/components/UIKit/Checkbox/CheckboxBtn";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use for one on/off choice submitted with a form, such as accepting the privacy policy or "Solo annunci con foto", and as the item inside a `CheckboxButtonGroup` when you render the group's items yourself. For a list of options bound to one array use `CheckboxButtonGroup`; for chip-style toggle buttons compose `CheckboxGroupPrimitive` + `CheckboxGroupItemPrimitive`; for a setting that applies immediately use `BaseToggle`.
|
|
19
|
+
|
|
20
|
+
The whole row is a `<label>`, so clicking the text toggles the box. The text comes from the `label` prop or the `label` slot (for links or truncation).
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import { ref } from "vue";
|
|
27
|
+
import CheckboxBtn from "@wikicasa-dev/components/UIKit/Checkbox/CheckboxBtn";
|
|
28
|
+
|
|
29
|
+
const onlyWithPhotos = ref(false);
|
|
30
|
+
const privacyAccepted = ref(false);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<CheckboxBtn v-model="onlyWithPhotos" data-cy="filter-photos" label="Solo annunci con foto" />
|
|
35
|
+
|
|
36
|
+
<CheckboxBtn v-model="privacyAccepted" data-cy="privacy-checkbox">
|
|
37
|
+
<template #label>
|
|
38
|
+
<span>Ho letto e accetto l'<a href="/privacy" target="_blank">informativa privacy</a></span>
|
|
39
|
+
</template>
|
|
40
|
+
</CheckboxBtn>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Do / Don't
|
|
45
|
+
|
|
46
|
+
- Do use `v-model`; the `checked` prop is deprecated.
|
|
47
|
+
- Do always provide label text (prop or slot); it is the checkbox's accessible name.
|
|
48
|
+
- Do use `disabled` to lock it; `inputClass` styles the 20px box.
|
|
49
|
+
- Do listen to `change` if you need `{ id, label, checked }` in one payload (`id` is the `id` prop, or a generated one).
|
|
50
|
+
- Don't rely on `required` for validation: it is not applied to the control. Validate yourself.
|
|
51
|
+
- Don't use it for mutually exclusive options; use `RadioButtonGroup`.
|
|
52
|
+
|
|
53
|
+
## Styling hooks
|
|
54
|
+
|
|
55
|
+
- `.uikit-checkbox-btn { --font-size }` (default `16px`): label text size.
|
|
56
|
+
- `class` goes on the `<label>` row (flex, 12px gap); the box exposes `data-state="checked|unchecked"`.
|
|
57
|
+
|
|
58
|
+
## API
|
|
59
|
+
|
|
60
|
+
_Generated from the component's types. Do not edit by hand._
|
|
61
|
+
|
|
62
|
+
### Props
|
|
63
|
+
|
|
64
|
+
| Name | Type | Default | Required | Description |
|
|
65
|
+
| --- | --- | --- | --- | --- |
|
|
66
|
+
| `id` | `TID` | | | |
|
|
67
|
+
| `dataCy` | `string` | | | |
|
|
68
|
+
| `disabled` | `boolean` | | | |
|
|
69
|
+
| `checked` | `boolean` | `undefined` | | |
|
|
70
|
+
| `required` | `boolean` | | | |
|
|
71
|
+
| `inputClass` | `ClassTypeProp` | | | |
|
|
72
|
+
| `label` | `TLabel` | `""` | | |
|
|
73
|
+
| `value` | `AcceptableValue` | | | |
|
|
74
|
+
| `modelValue` | `boolean` | `false` | | |
|
|
75
|
+
|
|
76
|
+
### Events
|
|
77
|
+
|
|
78
|
+
| Name | Payload |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| `click` | `[MouseEvent]` |
|
|
81
|
+
| `change` | `[EventPayload]` |
|
|
82
|
+
| `update:modelValue` | `[value: boolean]` |
|
|
83
|
+
|
|
84
|
+
### v-model
|
|
85
|
+
|
|
86
|
+
- `v-model` binds `modelValue` (`boolean`)
|
|
87
|
+
|
|
88
|
+
### Slots
|
|
89
|
+
|
|
90
|
+
| Name | Slot props |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| `label` | |
|
|
93
|
+
|
|
94
|
+
### Exposed (template ref)
|
|
95
|
+
|
|
96
|
+
None.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CheckboxButtonGroup
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Selection
|
|
5
|
+
summary: Group of CheckboxBtn bound to one array of selected values, with an optional "select all" reset option.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxButtonGroup
|
|
7
|
+
version: 2.10.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CheckboxButtonGroup
|
|
11
|
+
|
|
12
|
+
Group of CheckboxBtn bound to one array of selected values, with an optional "select all" reset option.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import CheckboxButtonGroup from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxButtonGroup";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use for multi-select lists of options: property features, zones of a city, typologies. `v-model` is the array of checked values. For chip/button-style options compose `CheckboxGroupPrimitive` + `CheckboxGroupItemPrimitive`; for a single checkbox use `CheckboxBtn`.
|
|
19
|
+
|
|
20
|
+
Two ways to render:
|
|
21
|
+
|
|
22
|
+
- Simple: pass `items` (`{ value, label, dataCy?, required? }[]`) and it renders a `CheckboxBtn` per item.
|
|
23
|
+
- Custom: use the default slot, which receives `isChecked(value)`, `handleCheck(value, checked)` and `handleResetCheck(checked)`, and render `CheckboxBtn`s yourself (needed for the reset option below).
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```vue
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { ref } from "vue";
|
|
30
|
+
import CheckboxButtonGroup from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxButtonGroup";
|
|
31
|
+
import CheckboxBtn from "@wikicasa-dev/components/UIKit/Checkbox/CheckboxBtn";
|
|
32
|
+
|
|
33
|
+
const features = ref<string[]>([]);
|
|
34
|
+
|
|
35
|
+
// "Tutta Milano" is the reset option: it is checked when nothing or everything else is
|
|
36
|
+
const zones = [
|
|
37
|
+
{ value: "centro", label: "Centro" },
|
|
38
|
+
{ value: "navigli", label: "Navigli" },
|
|
39
|
+
{ value: "citta-studi", label: "Città Studi" },
|
|
40
|
+
];
|
|
41
|
+
const selectedZones = ref<string[]>(["milano"]);
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<CheckboxButtonGroup
|
|
46
|
+
v-model="features"
|
|
47
|
+
:items="[
|
|
48
|
+
{ value: 'balcone', label: 'Balcone' },
|
|
49
|
+
{ value: 'box', label: 'Box auto' },
|
|
50
|
+
{ value: 'ascensore', label: 'Ascensore' },
|
|
51
|
+
]"
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<CheckboxButtonGroup v-model="selectedZones" reset-value="milano">
|
|
55
|
+
<template #default="{ isChecked, handleCheck, handleResetCheck }">
|
|
56
|
+
<CheckboxBtn value="milano" label="Tutta Milano" :model-value="isChecked('milano')" @update:model-value="handleResetCheck" />
|
|
57
|
+
<CheckboxBtn
|
|
58
|
+
v-for="zone in zones"
|
|
59
|
+
:key="zone.value"
|
|
60
|
+
:value="zone.value"
|
|
61
|
+
:label="zone.label"
|
|
62
|
+
:model-value="isChecked(zone.value)"
|
|
63
|
+
@update:model-value="(checked) => handleCheck(zone.value, checked)"
|
|
64
|
+
/>
|
|
65
|
+
</template>
|
|
66
|
+
</CheckboxButtonGroup>
|
|
67
|
+
</template>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Do / Don't
|
|
71
|
+
|
|
72
|
+
- Do use truthy values (non-empty strings, non-zero numbers): `0`, `""` and `false` are ignored.
|
|
73
|
+
- Do use `resetValue` only with the custom slot, passing `:value` to every `CheckboxBtn` (the reset one included) and wiring the reset one to `handleResetCheck`. With `items`, `resetValue` doesn't work correctly.
|
|
74
|
+
- Do clear the selection by setting `v-model:reset` to `true` (it switches itself back to `false`), or by setting `v-model` to `[]`.
|
|
75
|
+
- Don't use it for mutually exclusive options; use `RadioButtonGroup`.
|
|
76
|
+
|
|
77
|
+
## Styling hooks
|
|
78
|
+
|
|
79
|
+
None of its own: the root is a plain `<div>` (style it with `class`). Item styling is `CheckboxBtn`'s (`--font-size`, `class`, `inputClass`).
|
|
80
|
+
|
|
81
|
+
## API
|
|
82
|
+
|
|
83
|
+
_Generated from the component's types. Do not edit by hand._
|
|
84
|
+
|
|
85
|
+
### Props
|
|
86
|
+
|
|
87
|
+
| Name | Type | Default | Required | Description |
|
|
88
|
+
| --- | --- | --- | --- | --- |
|
|
89
|
+
| `dataCy` | `string` | | | |
|
|
90
|
+
| `items` | `CheckboxButtonItem<T>[]` | `[]` | | |
|
|
91
|
+
| `resetValue` | `T` | | | Value of the reset button |
|
|
92
|
+
| `modelValue` | `NonNullable<T>[]` | `[]` | | |
|
|
93
|
+
| `reset` | `boolean` | `false` | | |
|
|
94
|
+
|
|
95
|
+
### Events
|
|
96
|
+
|
|
97
|
+
| Name | Payload |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| `update:modelValue` | `[value: NonNullable<T>[]]` |
|
|
100
|
+
| `update:reset` | `[value: boolean]` |
|
|
101
|
+
|
|
102
|
+
### v-model
|
|
103
|
+
|
|
104
|
+
- `v-model` binds `modelValue` (`NonNullable<T>[]`)
|
|
105
|
+
- `v-model:reset` (`boolean`)
|
|
106
|
+
|
|
107
|
+
### Slots
|
|
108
|
+
|
|
109
|
+
| Name | Slot props |
|
|
110
|
+
| --- | --- |
|
|
111
|
+
| `default` | `{ isChecked: (value: T) => boolean; handleCheck: (value: T, checked: boolean) => void; handleResetCheck: (checked: boolean) => void; }` |
|
|
112
|
+
|
|
113
|
+
### Exposed (template ref)
|
|
114
|
+
|
|
115
|
+
None.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CheckboxGroup
|
|
3
|
+
status: legacy
|
|
4
|
+
category: Selection
|
|
5
|
+
summary: Older checkbox list driven by checkboxData objects, emitting the checked objects, with optional reset checkbox.
|
|
6
|
+
useInstead: CheckboxButtonGroup
|
|
7
|
+
import: @wikicasa-dev/components/UIKit/Checkbox/CheckboxGroup
|
|
8
|
+
version: 2.10.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# CheckboxGroup
|
|
12
|
+
|
|
13
|
+
> **Legacy.** Don't use in new designs. Use `CheckboxButtonGroup` instead.
|
|
14
|
+
|
|
15
|
+
Older checkbox list driven by checkboxData objects, emitting the checked objects, with optional reset checkbox.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import CheckboxGroup from "@wikicasa-dev/components/UIKit/Checkbox/CheckboxGroup";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Kept for existing screens. In new work use `CheckboxButtonGroup`, which binds a plain array of values with `v-model` and covers the same "list with a select-all/reset option" case through `resetValue`.
|
|
22
|
+
|
|
23
|
+
How it differs, if you have to maintain one:
|
|
24
|
+
|
|
25
|
+
- It has no `modelValue` input: initial checks come from `checkboxData[].checked`, and it only emits `update:modelValue` with the checked objects (also once on mount).
|
|
26
|
+
- To re-read `checkboxData` after changing it, set `v-model:refresh` to `true`. To clear, switch `reset` to `true`.
|
|
27
|
+
- One item may have `reset: true`; `autoCheckResetAll`, `autoCheckResetEmpty` and `manualToggleResetButton` control when it checks itself.
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```vue
|
|
32
|
+
<script setup lang="ts">
|
|
33
|
+
import CheckboxGroup from "@wikicasa-dev/components/UIKit/Checkbox/CheckboxGroup";
|
|
34
|
+
import type { CheckboxButtonType } from "@wikicasa-dev/components";
|
|
35
|
+
|
|
36
|
+
const typologies: CheckboxButtonType<number, string>[] = [
|
|
37
|
+
{ id: 0, label: "Tutte le residenziali", reset: true, checked: true },
|
|
38
|
+
{ id: 1, label: "Appartamento" },
|
|
39
|
+
{ id: 2, label: "Villa" },
|
|
40
|
+
{ id: 3, label: "Attico" },
|
|
41
|
+
];
|
|
42
|
+
const onChange = (checked: CheckboxButtonType[]) => console.log(checked.map((c) => c.id));
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<CheckboxGroup :checkbox-data="typologies" auto-check-reset-all auto-check-reset-empty @update:model-value="onChange" />
|
|
47
|
+
</template>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Do / Don't
|
|
51
|
+
|
|
52
|
+
- Don't use it in new designs; use `CheckboxButtonGroup`.
|
|
53
|
+
- Do keep item `id`s unique; they are the keys of the checked state.
|
|
54
|
+
- Do use the `checkbox_elements` slot (`isActive`, `handleChange`, `reset`) only to restyle items in an existing screen.
|
|
55
|
+
|
|
56
|
+
## Styling hooks
|
|
57
|
+
|
|
58
|
+
- `class` goes on the `.checkbox-group-container` wrapper; `checkboxContainerClasses` on each `CheckboxBtn`.
|
|
59
|
+
|
|
60
|
+
## API
|
|
61
|
+
|
|
62
|
+
_Generated from the component's types. Do not edit by hand._
|
|
63
|
+
|
|
64
|
+
### Props
|
|
65
|
+
|
|
66
|
+
| Name | Type | Default | Required | Description |
|
|
67
|
+
| --- | --- | --- | --- | --- |
|
|
68
|
+
| `checkboxData` | `CheckboxButtonType<TID, TLabel, TPayload>[]` | | | |
|
|
69
|
+
| `formCheckInline` | `boolean` | `false` | | |
|
|
70
|
+
| `reset` | `boolean` | `false` | | |
|
|
71
|
+
| `checkboxContainerClasses` | `ClassTypeProp` | `""` | | |
|
|
72
|
+
| `autoCheckResetAll` | `boolean` | `false` | | [ResetCheckbox required] If true, when you check all the checkboxes, the reset one will be checked |
|
|
73
|
+
| `autoCheckResetEmpty` | `boolean` | `false` | | [ResetCheckbox required] If true, when you uncheck all the checkboxes, the reset one will be checked |
|
|
74
|
+
| `manualToggleResetButton` | `boolean` | `false` | | [ResetCheckbox required] If true, you can manually toggle the reset button. Otherwise, if autoCheckResetEmpty is false, the reset button would never be unchecked when the user clicks on it |
|
|
75
|
+
| `getKey` | `GetterIdType<string \| number \| CheckboxButtonType<TID, TLabel, TPayload>>` | `(checkBtn: CheckboxType \| string \| number): string => { if (typeof checkBtn === "string" \|\| typeof checkBtn === "number") return `${checkBtn}`; return `${checkBtn.id}`; }` | | |
|
|
76
|
+
| `groupId` | `string` | `""` | | |
|
|
77
|
+
| `dataCy` | `string` | `""` | | |
|
|
78
|
+
| `refresh` | `boolean` | `false` | | If true, we will reinitialized the inner data of the component |
|
|
79
|
+
|
|
80
|
+
### Events
|
|
81
|
+
|
|
82
|
+
| Name | Payload |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `update:modelValue` | `[CheckboxButtonType<TID, TLabel, TPayload>[]]` |
|
|
85
|
+
| `resetted` | |
|
|
86
|
+
| `checkedGroup` | `[string]` |
|
|
87
|
+
| `update:refresh` | `[value: boolean]` |
|
|
88
|
+
|
|
89
|
+
### v-model
|
|
90
|
+
|
|
91
|
+
- `v-model:refresh` (`boolean`)
|
|
92
|
+
|
|
93
|
+
### Slots
|
|
94
|
+
|
|
95
|
+
| Name | Slot props |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `default` | `{ isActive: (elem: string \| number \| CheckboxButtonType<TID, TLabel, TPayload>) => boolean; handleChange: (checkboxValue: CheckboxButtonType<TID, TLabel, TPayload>) => void; checkboxesData: CheckboxButtonType<TID, TLabel, TPayload>[]; }` |
|
|
98
|
+
| `checkbox_elements` | `{ isActive: (elem: string \| number \| CheckboxButtonType<TID, TLabel, TPayload>) => boolean; handleChange: (checkboxValue: CheckboxButtonType<TID, TLabel, TPayload>) => void; checkboxesData: CheckboxButtonType<TID, TLabel, TPayload>[]; reset: () => void; }` |
|
|
99
|
+
|
|
100
|
+
### Exposed (template ref)
|
|
101
|
+
|
|
102
|
+
None.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CheckboxGroupItemPrimitive
|
|
3
|
+
status: primitive
|
|
4
|
+
category: Selection
|
|
5
|
+
summary: Unstyled checkbox item (reka-ui CheckboxRoot) for building custom chips or tiles inside CheckboxGroupPrimitive.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive
|
|
7
|
+
version: 2.10.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CheckboxGroupItemPrimitive
|
|
11
|
+
|
|
12
|
+
> **Primitive.** A low-level building block. Prefer a `preferred` component; use primitives only to compose something that doesn't exist yet.
|
|
13
|
+
|
|
14
|
+
Unstyled checkbox item (reka-ui CheckboxRoot) for building custom chips or tiles inside CheckboxGroupPrimitive.
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import CheckboxGroupItemPrimitive from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
One option of a `CheckboxGroupPrimitive`. It renders an unstyled `<button role="checkbox">` whose content is your default slot, so it can look like a chip, a tile with an icon, or anything else. Checking it adds its `value` to the group's `v-model` array. For a classic checkbox with a box and label use `CheckboxBtn`.
|
|
21
|
+
|
|
22
|
+
The default slot receives `{ modelValue, state }` (`state` is `true`, `false` or `"indeterminate"`), handy for swapping an icon when checked.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```vue
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { ref } from "vue";
|
|
29
|
+
import CheckboxGroupPrimitive from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupPrimitive";
|
|
30
|
+
import CheckboxGroupItemPrimitive from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive";
|
|
31
|
+
|
|
32
|
+
const heating = ref<string[]>(["autonomo"]);
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<CheckboxGroupPrimitive v-model="heating" class="tiles">
|
|
37
|
+
<CheckboxGroupItemPrimitive value="autonomo" data-cy="heating-autonomo" class="tile" v-slot="{ state }">
|
|
38
|
+
<span aria-hidden="true">{{ state === true ? "✓" : "+" }}</span> Riscaldamento autonomo
|
|
39
|
+
</CheckboxGroupItemPrimitive>
|
|
40
|
+
<CheckboxGroupItemPrimitive value="centralizzato" data-cy="heating-centralizzato" class="tile">
|
|
41
|
+
Riscaldamento centralizzato
|
|
42
|
+
</CheckboxGroupItemPrimitive>
|
|
43
|
+
</CheckboxGroupPrimitive>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<style scoped>
|
|
47
|
+
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
|
48
|
+
.tile { padding: 12px; border: 1px solid rgb(var(--uikit-color-w-secondary)); border-radius: var(--uikit-radius-xs); background: #fff; }
|
|
49
|
+
.tile[data-state="checked"] { border-color: rgb(var(--uikit-color-w-primary)); background: rgb(var(--uikit-color-w-lavender)); }
|
|
50
|
+
.tile:focus-visible { outline: 2px solid rgb(var(--uikit-color-w-primary)); }
|
|
51
|
+
</style>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Do / Don't
|
|
55
|
+
|
|
56
|
+
- Do always place it inside `CheckboxGroupPrimitive` and give it a `value` unique within the group.
|
|
57
|
+
- Do put readable text in the slot: it is the button's accessible name. Icon-only items need an `aria-label`.
|
|
58
|
+
- Do style the checked and disabled looks with `[data-state="checked"]` and `[data-disabled]`, and add a visible `:focus-visible` style.
|
|
59
|
+
- Don't add a click handler to toggle it; the group manages the state.
|
|
60
|
+
|
|
61
|
+
## Styling hooks
|
|
62
|
+
|
|
63
|
+
None: it is an unstyled `<button>`; `class` goes on it. Use `data-state` / `data-disabled` selectors and the design tokens.
|
|
64
|
+
|
|
65
|
+
## API
|
|
66
|
+
|
|
67
|
+
_Generated from the component's types. Do not edit by hand._
|
|
68
|
+
|
|
69
|
+
### Props
|
|
70
|
+
|
|
71
|
+
| Name | Type | Default | Required | Description |
|
|
72
|
+
| --- | --- | --- | --- | --- |
|
|
73
|
+
| `dataCy` | `string` | | | |
|
|
74
|
+
| `value` | `TValue` | | yes | |
|
|
75
|
+
| `modelValue` | `T \| "indeterminate" \| null` | | | The controlled value of the checkbox. Can be binded with v-model. |
|
|
76
|
+
| `defaultValue` | `T \| "indeterminate"` | | | The value of the checkbox when it is initially rendered. Use when you do not need to control its value. |
|
|
77
|
+
| `disabled` | `boolean` | | | When `true`, prevents the user from interacting with the checkbox |
|
|
78
|
+
| `asChild` | `boolean` | | | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
|
|
79
|
+
| `as` | `AsTag \| Component` | | | The element or component this component should render as. Can be overwritten by `asChild`. |
|
|
80
|
+
| `required` | `boolean` | | | When `true`, indicates that the user must set the value before the owning form can be submitted. |
|
|
81
|
+
| `id` | `string` | | | Id of the element |
|
|
82
|
+
| `name` | `string` | | | The name of the field. Submitted with its owning form as part of a name/value pair. |
|
|
83
|
+
| `trueValue` | `T` | | | The value used when the checkbox is checked. Defaults to `true`. |
|
|
84
|
+
| `falseValue` | `T` | | | The value used when the checkbox is unchecked. Defaults to `false`. |
|
|
85
|
+
|
|
86
|
+
### Events
|
|
87
|
+
|
|
88
|
+
| Name | Payload |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `update:modelValue` | `[value: T \| "indeterminate"]` |
|
|
91
|
+
|
|
92
|
+
### v-model
|
|
93
|
+
|
|
94
|
+
- `v-model` binds `modelValue` (`T \| "indeterminate" \| null`)
|
|
95
|
+
|
|
96
|
+
### Slots
|
|
97
|
+
|
|
98
|
+
| Name | Slot props |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| `default` | `{ modelValue: T \| "indeterminate"; state: CheckedState; }` |
|
|
101
|
+
|
|
102
|
+
### Exposed (template ref)
|
|
103
|
+
|
|
104
|
+
None.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CheckboxGroupPrimitive
|
|
3
|
+
status: primitive
|
|
4
|
+
category: Selection
|
|
5
|
+
summary: Unstyled multi-select group root (reka-ui CheckboxGroupRoot) holding an array of checked values.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupPrimitive
|
|
7
|
+
version: 2.10.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CheckboxGroupPrimitive
|
|
11
|
+
|
|
12
|
+
> **Primitive.** A low-level building block. Prefer a `preferred` component; use primitives only to compose something that doesn't exist yet.
|
|
13
|
+
|
|
14
|
+
Unstyled multi-select group root (reka-ui CheckboxGroupRoot) holding an array of checked values.
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import CheckboxGroupPrimitive from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupPrimitive";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The root of a custom-looking multi-select, such as chip/pill toggles ("Vicino a: Scuole, Metro, Supermercati") or icon tiles. It renders no visuals; its children are `CheckboxGroupItemPrimitive`s, each contributing its `value` to the `v-model` array. For a standard list of checkboxes use `CheckboxButtonGroup`.
|
|
21
|
+
|
|
22
|
+
Each item is a focusable button reached with Tab. Add `roving-focus` to move between items with the arrow keys instead (tuned by `loop`, `orientation`, `dir`); it is off unless you set it. Group-level `disabled`, `required` and `name` are also available.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```vue
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { ref } from "vue";
|
|
29
|
+
import CheckboxGroupPrimitive from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupPrimitive";
|
|
30
|
+
import CheckboxGroupItemPrimitive from "@wikicasa-dev/components/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive";
|
|
31
|
+
|
|
32
|
+
const nearTo = ref<string[]>([]);
|
|
33
|
+
const services = [
|
|
34
|
+
{ value: "schools", label: "Scuole" },
|
|
35
|
+
{ value: "metro", label: "Metropolitana" },
|
|
36
|
+
{ value: "shops", label: "Supermercati" },
|
|
37
|
+
];
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<CheckboxGroupPrimitive v-model="nearTo" class="chips" data-cy="near-to">
|
|
42
|
+
<CheckboxGroupItemPrimitive v-for="s in services" :key="s.value" :value="s.value" class="chip">
|
|
43
|
+
{{ s.label }}
|
|
44
|
+
</CheckboxGroupItemPrimitive>
|
|
45
|
+
</CheckboxGroupPrimitive>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style scoped>
|
|
49
|
+
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
|
|
50
|
+
.chip { padding: 8px 16px; border: 1px solid rgb(var(--uikit-color-w-secondary)); border-radius: var(--uikit-radius-xs); background: #fff; }
|
|
51
|
+
.chip[data-state="checked"] { border-color: rgb(var(--uikit-color-w-primary)); background: rgb(var(--uikit-color-w-lavender)); }
|
|
52
|
+
</style>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Do / Don't
|
|
56
|
+
|
|
57
|
+
- Do put `CheckboxGroupItemPrimitive`s with unique `value`s inside it (wrapping layout elements are fine).
|
|
58
|
+
- Do provide a visible group heading next to it ("Vicino a"); the root has no label of its own.
|
|
59
|
+
- Do style checked items with `[data-state="checked"]`.
|
|
60
|
+
- Don't use it when the standard checkbox look is fine; use `CheckboxButtonGroup`.
|
|
61
|
+
|
|
62
|
+
## Styling hooks
|
|
63
|
+
|
|
64
|
+
None: it renders a plain `<div>` you style with `class`. Use the design tokens (`--uikit-color-*`, `--uikit-radius-*`) for colors and radii.
|
|
65
|
+
|
|
66
|
+
## API
|
|
67
|
+
|
|
68
|
+
_Generated from the component's types. Do not edit by hand._
|
|
69
|
+
|
|
70
|
+
### Props
|
|
71
|
+
|
|
72
|
+
| Name | Type | Default | Required | Description |
|
|
73
|
+
| --- | --- | --- | --- | --- |
|
|
74
|
+
| `dataCy` | `string` | | | |
|
|
75
|
+
| `defaultValue` | `T[]` | | | The value of the checkbox when it is initially rendered. Use when you do not need to control its value. |
|
|
76
|
+
| `modelValue` | `T[]` | | | The controlled value of the checkbox. Can be binded with v-model. |
|
|
77
|
+
| `rovingFocus` | `boolean` | | | When `false`, navigating through the items using arrow keys will be disabled. |
|
|
78
|
+
| `disabled` | `boolean` | | | When `true`, prevents the user from interacting with the checkboxes |
|
|
79
|
+
| `dir` | `Direction$5` | | | The direction of navigation between items. |
|
|
80
|
+
| `orientation` | `Orientation$1` | | | The orientation of the group. Mainly so arrow navigation is done accordingly (left & right vs. up & down) |
|
|
81
|
+
| `asChild` | `boolean` | | | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
|
|
82
|
+
| `as` | `AsTag \| Component` | | | The element or component this component should render as. Can be overwritten by `asChild`. |
|
|
83
|
+
| `loop` | `boolean` | | | Whether keyboard navigation should loop around |
|
|
84
|
+
| `name` | `string` | | | The name of the field. Submitted with its owning form as part of a name/value pair. |
|
|
85
|
+
| `required` | `boolean` | | | When `true`, indicates that the user must set the value before the owning form can be submitted. |
|
|
86
|
+
|
|
87
|
+
### Events
|
|
88
|
+
|
|
89
|
+
| Name | Payload |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| `update:modelValue` | `[value: T[]]` |
|
|
92
|
+
|
|
93
|
+
### v-model
|
|
94
|
+
|
|
95
|
+
- `v-model` binds `modelValue` (`T[]`)
|
|
96
|
+
|
|
97
|
+
### Slots
|
|
98
|
+
|
|
99
|
+
| Name | Slot props |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `default` | |
|
|
102
|
+
|
|
103
|
+
### Exposed (template ref)
|
|
104
|
+
|
|
105
|
+
None.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ClearableAutocomplete
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Forms
|
|
5
|
+
summary: Unstyled search-as-you-type input with an inline clear button, loading slot and race-safe async results.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Autocomplete/ClearableAutocomplete
|
|
7
|
+
version: 2.10.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ClearableAutocomplete
|
|
11
|
+
|
|
12
|
+
Unstyled search-as-you-type input with an inline clear button, loading slot and race-safe async results.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import ClearableAutocomplete from "@wikicasa-dev/components/UIKit/Autocomplete/ClearableAutocomplete";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use for any search-as-you-type field: the place search ("Cerca comune, zona o indirizzo") in a hero or header, or a field in a form, where you style the trigger yourself. It is a bare `<input>` with no label, border or validation: you supply the look through class props and slots. After a selection, a clear button appears right after the typed text.
|
|
19
|
+
|
|
20
|
+
It is the search-as-you-type component for every case, forms included: style the trigger to match the other fields of the form. It replaces the legacy `BaseAutocomplete`.
|
|
21
|
+
|
|
22
|
+
`onInputChangeCb(query)` runs 300 ms after typing stops and must resolve to `{ id, label }[]`; stale responses are discarded automatically. `v-model` is the selected option, or `null`. `v-model:inputValue` is the raw text; `v-model:open` the list state.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```vue
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { ref } from "vue";
|
|
29
|
+
import ClearableAutocomplete from "@wikicasa-dev/components/UIKit/Autocomplete/ClearableAutocomplete";
|
|
30
|
+
import type { AccessibleSelectOptions } from "@wikicasa-dev/components";
|
|
31
|
+
|
|
32
|
+
type Place = AccessibleSelectOptions<{ province: string }, number>;
|
|
33
|
+
|
|
34
|
+
const PLACES: Place[] = [
|
|
35
|
+
{ id: 1, label: "Milano", province: "MI" },
|
|
36
|
+
{ id: 2, label: "Milano Marittima", province: "RA" },
|
|
37
|
+
{ id: 3, label: "Monza", province: "MB" },
|
|
38
|
+
];
|
|
39
|
+
// Mock search: replace with your data source
|
|
40
|
+
const searchPlaces = async (q: string) =>
|
|
41
|
+
PLACES.filter((p) => p.label.toLowerCase().startsWith(q.toLowerCase()));
|
|
42
|
+
|
|
43
|
+
const place = ref<Place | null>(null);
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<ClearableAutocomplete
|
|
48
|
+
v-model="place"
|
|
49
|
+
placeholder="Cerca comune, zona o indirizzo"
|
|
50
|
+
:on-input-change-cb="searchPlaces"
|
|
51
|
+
trigger-wrapper-classes="search-trigger"
|
|
52
|
+
:clear-button="{ offset: 10 }"
|
|
53
|
+
>
|
|
54
|
+
<template #option-content="{ option }">
|
|
55
|
+
{{ option.label }} <small>({{ option.province }})</small>
|
|
56
|
+
</template>
|
|
57
|
+
<template #loading-state>
|
|
58
|
+
<li style="padding: 10px 20px">Caricamento…</li>
|
|
59
|
+
</template>
|
|
60
|
+
</ClearableAutocomplete>
|
|
61
|
+
</template>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Do / Don't
|
|
65
|
+
|
|
66
|
+
- Do always set `placeholder`: the input has no label, so the placeholder is the only text that tells users (and screen readers) what to type.
|
|
67
|
+
- Do style the field via `triggerWrapperClasses` (row containing icons + input), `inputWrapperClasses`, `inputClasses` and `dropdownClasses`; put icons in `left-icon` / `right-icon` and a custom clear glyph in `clear-icon` (default "X").
|
|
68
|
+
- Do use `onOptionSelectedCb(option, { trigger })` to react to a choice; `trigger` is `"click"` or `"enter"`.
|
|
69
|
+
- Do call the exposed `clearSuggestions()` when you hide (not unmount) the component, and `focus()` / `select()` to move focus into it.
|
|
70
|
+
- Do set `:enable-keyboard-controller="false"` only if a parent handles arrow keys itself.
|
|
71
|
+
- Don't call a real API in mockups; use a mock function like the one above.
|
|
72
|
+
- Don't expect `aria-*` or other attributes to reach the `<input>`: only `class` is forwarded (to the root).
|
|
73
|
+
|
|
74
|
+
## Styling hooks
|
|
75
|
+
|
|
76
|
+
- `.uikit-clearable-autocomplete`: `--input-padding` and `--input-margin` (both `0`) for the `<input>`.
|
|
77
|
+
- `.uikit-clear-btn { --bg-color }` (default `transparent`); also `clearButton.classes`, `width`, `height`, `offset` (gap after the text, px).
|
|
78
|
+
- The list uses `BaseDropDown`'s `.uikit-dropdown-content` variables (`--dropdown-max-height`, borders, radii).
|
|
79
|
+
|
|
80
|
+
## API
|
|
81
|
+
|
|
82
|
+
_Generated from the component's types. Do not edit by hand._
|
|
83
|
+
|
|
84
|
+
### Props
|
|
85
|
+
|
|
86
|
+
| Name | Type | Default | Required | Description |
|
|
87
|
+
| --- | --- | --- | --- | --- |
|
|
88
|
+
| `dataCy` | `string` | | | |
|
|
89
|
+
| `placeholder` | `string` | | | |
|
|
90
|
+
| `enableKeyboardController` | `boolean` | `true` | | |
|
|
91
|
+
| `triggerWrapperClasses` | `ClassTypeProp` | | | |
|
|
92
|
+
| `inputWrapperClasses` | `ClassTypeProp` | | | |
|
|
93
|
+
| `inputClasses` | `ClassTypeProp` | | | |
|
|
94
|
+
| `hiddenTextClasses` | `ClassTypeProp` | | | |
|
|
95
|
+
| `dropdownClasses` | `ClassTypeProp` | | | |
|
|
96
|
+
| `clearButton` | `{ classes?: ClassTypeProp; offset?: number \| undefined; width?: number \| undefined; height?: number \| undefined; dataCy?: string \| undefined; }` | | | |
|
|
97
|
+
| `keepState` | `Nullable<"open" \| "closed">` | | | |
|
|
98
|
+
| `disableCb` | `boolean` | `false` | | |
|
|
99
|
+
| `onInputChangeCb` | `(v: string) => Promise<AccessibleSelectOptions<TPayload, TID>[]>` | | yes | |
|
|
100
|
+
| `onOptionSelectedCb` | `Nullable<(v: AccessibleSelectOptions<TPayload, TID>, meta: ClearableAutocompleteSelectionMeta) => void>` | | | |
|
|
101
|
+
| `open` | `boolean` | `false` | | |
|
|
102
|
+
| `modelValue` | `Nullable<AccessibleSelectOptions<TPayload, TID>>` | `null` | | |
|
|
103
|
+
| `inputValue` | `string` | `""` | | |
|
|
104
|
+
|
|
105
|
+
### Events
|
|
106
|
+
|
|
107
|
+
| Name | Payload |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `input` | `[InputEvent]` |
|
|
110
|
+
| `click` | `[MouseEvent]` |
|
|
111
|
+
| `keydown` | `[KeyboardEvent]` |
|
|
112
|
+
| `inputClick` | `[MouseEvent]` |
|
|
113
|
+
| `update:modelValue` | `[value: Nullable<AccessibleSelectOptions<TPayload, TID>>]` |
|
|
114
|
+
| `update:open` | `[value: boolean]` |
|
|
115
|
+
| `update:inputValue` | `[value: string]` |
|
|
116
|
+
|
|
117
|
+
### v-model
|
|
118
|
+
|
|
119
|
+
- `v-model:open` (`boolean`)
|
|
120
|
+
- `v-model` binds `modelValue` (`Nullable<AccessibleSelectOptions<TPayload, TID>>`)
|
|
121
|
+
- `v-model:inputValue` (`string`)
|
|
122
|
+
|
|
123
|
+
### Slots
|
|
124
|
+
|
|
125
|
+
| Name | Slot props |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `left-icon` | |
|
|
128
|
+
| `clear-icon` | |
|
|
129
|
+
| `right-icon` | |
|
|
130
|
+
| `loading-state` | |
|
|
131
|
+
| `option-content` | `{ option: AccessibleSelectOptions<TPayload, TID>; idx: number; }` |
|
|
132
|
+
|
|
133
|
+
### Exposed (template ref)
|
|
134
|
+
|
|
135
|
+
None.
|