@devschile/chucao 2.8.0 → 2.9.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/chucao/chucao.esm.js +1 -1
- package/dist/chucao/{p-5093c486.entry.js → p-03acf096.entry.js} +2 -2
- package/dist/chucao/{p-f0c288db.entry.js → p-0ce2b15d.entry.js} +2 -2
- package/dist/chucao/{p-af088ffd.entry.js → p-10e37157.entry.js} +2 -2
- package/dist/chucao/{p-46dae34b.entry.js → p-12043dc1.entry.js} +2 -2
- package/dist/chucao/p-1dca55d6.entry.js +2 -0
- package/dist/chucao/{p-0831c6f2.entry.js.map → p-1dca55d6.entry.js.map} +1 -1
- package/dist/chucao/{p-c4d68ab7.entry.js → p-244d8e96.entry.js} +2 -2
- package/dist/chucao/{p-ba589c2f.entry.js → p-29841714.entry.js} +2 -2
- package/dist/chucao/{p-5577e0a0.entry.js → p-302ec527.entry.js} +2 -2
- package/dist/chucao/{p-25f4f815.entry.js → p-5a62951e.entry.js} +2 -2
- package/dist/chucao/{p-3e0d7585.entry.js → p-5d0ac17a.entry.js} +2 -2
- package/dist/chucao/{p-b42ec9bf.entry.js → p-5e0e1012.entry.js} +2 -2
- package/dist/chucao/{p-56e41372.entry.js → p-61a94a4e.entry.js} +2 -2
- package/dist/chucao/p-649c2cef.entry.js +2 -0
- package/dist/chucao/p-649c2cef.entry.js.map +1 -0
- package/dist/chucao/{p-eb39b9c2.entry.js → p-674c0f61.entry.js} +2 -2
- package/dist/chucao/{p-d868bdbc.entry.js → p-67f0fc77.entry.js} +2 -2
- package/dist/chucao/{p-d630f662.entry.js → p-68e4a129.entry.js} +2 -2
- package/dist/chucao/{p-b80c39c3.entry.js → p-6e345b3f.entry.js} +2 -2
- package/dist/chucao/{p-6e93c392.entry.js → p-72d4dacf.entry.js} +2 -2
- package/dist/chucao/{p-ca3179ae.entry.js → p-74d9b7e5.entry.js} +2 -2
- package/dist/chucao/{p-8b09ad3c.entry.js → p-791ce537.entry.js} +2 -2
- package/dist/chucao/{p-ad41da02.entry.js → p-79e8c10b.entry.js} +2 -2
- package/dist/chucao/{p-c98e2a50.entry.js → p-7e13f725.entry.js} +2 -2
- package/dist/chucao/{p-6c2e5931.entry.js → p-8b23d072.entry.js} +2 -2
- package/dist/chucao/{p-920d5727.entry.js → p-a5430e95.entry.js} +2 -2
- package/dist/chucao/{p-e6b7b2da.entry.js → p-a7c66879.entry.js} +2 -2
- package/dist/chucao/p-b452d6cb.entry.js +2 -0
- package/dist/chucao/{p-0d7fc720.entry.js → p-b7332faf.entry.js} +2 -2
- package/dist/chucao/{p-19d90f87.entry.js → p-f3d03388.entry.js} +2 -2
- package/dist/chucao/{p-8fcf6d36.entry.js → p-f925d45c.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ch-alert_8.cjs.entry.js +7 -7
- package/dist/cjs/ch-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ch-cluster.cjs.entry.js +2 -2
- package/dist/cjs/ch-combobox.cjs.entry.js +304 -0
- package/dist/cjs/ch-combobox.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-confirm-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ch-description-list.cjs.entry.js +1 -1
- package/dist/cjs/ch-divider.cjs.entry.js +1 -1
- package/dist/cjs/ch-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ch-emoji.cjs.entry.js +1 -1
- package/dist/cjs/ch-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ch-grid.cjs.entry.js +1 -1
- package/dist/cjs/ch-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ch-icon.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +1 -1
- package/dist/cjs/ch-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ch-otp-input.cjs.entry.js +2 -2
- package/dist/cjs/ch-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ch-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ch-radio.cjs.entry.js +1 -1
- package/dist/cjs/ch-segmented-control.cjs.entry.js +1 -1
- package/dist/cjs/ch-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ch-stack.cjs.entry.js +1 -1
- package/dist/cjs/ch-stat.cjs.entry.js +2 -2
- package/dist/cjs/ch-table.cjs.entry.js +1 -1
- package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ch-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ch-timeline.cjs.entry.js +1 -1
- package/dist/cjs/ch-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/chucao.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ch-accordion/ch-accordion.js +1 -1
- package/dist/collection/components/ch-alert/ch-alert.js +1 -1
- package/dist/collection/components/ch-badge/ch-badge.js +1 -1
- package/dist/collection/components/ch-card/ch-card.js +1 -1
- package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
- package/dist/collection/components/ch-cluster/ch-cluster.js +2 -2
- package/dist/collection/components/ch-combobox/ch-combobox.css +153 -0
- package/dist/collection/components/ch-combobox/ch-combobox.js +577 -0
- package/dist/collection/components/ch-combobox/ch-combobox.js.map +1 -0
- package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js +1 -1
- package/dist/collection/components/ch-description-list/ch-description-list.js +1 -1
- package/dist/collection/components/ch-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-drawer/ch-drawer.js +1 -1
- package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
- package/dist/collection/components/ch-empty-state/ch-empty-state.js +1 -1
- package/dist/collection/components/ch-grid/ch-grid.js +1 -1
- package/dist/collection/components/ch-icon/ch-icon.js +1 -1
- package/dist/collection/components/ch-icon-button/ch-icon-button.js +1 -1
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-modal/ch-modal.js +1 -1
- package/dist/collection/components/ch-number-input/ch-number-input.js +2 -2
- package/dist/collection/components/ch-otp-input/ch-otp-input.js +2 -2
- package/dist/collection/components/ch-page-header/ch-page-header.js +1 -1
- package/dist/collection/components/ch-pagination/ch-pagination.js +1 -1
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-skeleton/ch-skeleton.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
- package/dist/collection/components/ch-stack/ch-stack.js +1 -1
- package/dist/collection/components/ch-stat/ch-stat.js +2 -2
- package/dist/collection/components/ch-switch/ch-switch.js +1 -1
- package/dist/collection/components/ch-table/ch-table.js +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
- package/dist/collection/components/ch-timeline/ch-timeline.js +1 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +2 -2
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.js +1 -1
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-cluster.js +1 -1
- package/dist/components/ch-combobox.d.ts +11 -0
- package/dist/components/ch-combobox.js +2 -0
- package/dist/components/ch-combobox.js.map +1 -0
- package/dist/components/ch-confirm-dialog.js +1 -1
- package/dist/components/ch-description-list.js +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-drawer.js +1 -1
- package/dist/components/ch-emoji.js +1 -1
- package/dist/components/ch-empty-state.js +1 -1
- package/dist/components/ch-grid.js +1 -1
- package/dist/components/ch-icon-button.js +1 -1
- package/dist/components/ch-icon.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-modal.js +1 -1
- package/dist/components/ch-number-input.js +1 -1
- package/dist/components/ch-otp-input.js +1 -1
- package/dist/components/ch-page-header.js +1 -1
- package/dist/components/ch-pagination.js +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-segmented-control.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-skeleton.js +1 -1
- package/dist/components/ch-spinner.js +1 -1
- package/dist/components/ch-stack.js +1 -1
- package/dist/components/ch-stat.js +1 -1
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-table.js +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/ch-timeline.js +1 -1
- package/dist/components/ch-tooltip.js +1 -1
- package/dist/components/{p-CF1yV0aa.js → p-CuSstsTP.js} +2 -2
- package/dist/components/{p-CmMN-UuJ.js → p-MBLhKofG.js} +2 -2
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/ch-alert_8.entry.js +7 -7
- package/dist/esm/ch-checkbox.entry.js +1 -1
- package/dist/esm/ch-cluster.entry.js +2 -2
- package/dist/esm/ch-combobox.entry.js +302 -0
- package/dist/esm/ch-combobox.entry.js.map +1 -0
- package/dist/esm/ch-confirm-dialog.entry.js +1 -1
- package/dist/esm/ch-description-list.entry.js +1 -1
- package/dist/esm/ch-divider.entry.js +1 -1
- package/dist/esm/ch-drawer.entry.js +1 -1
- package/dist/esm/ch-emoji.entry.js +1 -1
- package/dist/esm/ch-empty-state.entry.js +1 -1
- package/dist/esm/ch-grid.entry.js +1 -1
- package/dist/esm/ch-icon-button.entry.js +1 -1
- package/dist/esm/ch-icon.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +1 -1
- package/dist/esm/ch-number-input.entry.js +2 -2
- package/dist/esm/ch-otp-input.entry.js +2 -2
- package/dist/esm/ch-page-header.entry.js +1 -1
- package/dist/esm/ch-pagination.entry.js +1 -1
- package/dist/esm/ch-radio.entry.js +1 -1
- package/dist/esm/ch-segmented-control.entry.js +1 -1
- package/dist/esm/ch-skeleton.entry.js +1 -1
- package/dist/esm/ch-stack.entry.js +1 -1
- package/dist/esm/ch-stat.entry.js +2 -2
- package/dist/esm/ch-table.entry.js +1 -1
- package/dist/esm/ch-tabs.entry.js +1 -1
- package/dist/esm/ch-textarea.entry.js +1 -1
- package/dist/esm/ch-timeline.entry.js +1 -1
- package/dist/esm/ch-tooltip.entry.js +2 -2
- package/dist/esm/chucao.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ch-combobox/ch-combobox.d.ts +98 -0
- package/dist/types/components.d.ts +209 -0
- package/dist-react/components.d.ts +7 -1
- package/dist-react/components.js +12 -0
- package/dist-react/components.ts +19 -1
- package/dist-vue/index.d.ts +1 -0
- package/dist-vue/index.js +19 -0
- package/dist-vue/index.ts +21 -0
- package/hydrate/index.js +376 -39
- package/hydrate/index.mjs +376 -39
- package/package.json +5 -1
- package/dist/chucao/p-0831c6f2.entry.js +0 -2
- package/dist/chucao/p-7f99ae48.entry.js +0 -2
- /package/dist/chucao/{p-5093c486.entry.js.map → p-03acf096.entry.js.map} +0 -0
- /package/dist/chucao/{p-f0c288db.entry.js.map → p-0ce2b15d.entry.js.map} +0 -0
- /package/dist/chucao/{p-af088ffd.entry.js.map → p-10e37157.entry.js.map} +0 -0
- /package/dist/chucao/{p-46dae34b.entry.js.map → p-12043dc1.entry.js.map} +0 -0
- /package/dist/chucao/{p-c4d68ab7.entry.js.map → p-244d8e96.entry.js.map} +0 -0
- /package/dist/chucao/{p-ba589c2f.entry.js.map → p-29841714.entry.js.map} +0 -0
- /package/dist/chucao/{p-5577e0a0.entry.js.map → p-302ec527.entry.js.map} +0 -0
- /package/dist/chucao/{p-25f4f815.entry.js.map → p-5a62951e.entry.js.map} +0 -0
- /package/dist/chucao/{p-3e0d7585.entry.js.map → p-5d0ac17a.entry.js.map} +0 -0
- /package/dist/chucao/{p-b42ec9bf.entry.js.map → p-5e0e1012.entry.js.map} +0 -0
- /package/dist/chucao/{p-56e41372.entry.js.map → p-61a94a4e.entry.js.map} +0 -0
- /package/dist/chucao/{p-eb39b9c2.entry.js.map → p-674c0f61.entry.js.map} +0 -0
- /package/dist/chucao/{p-d868bdbc.entry.js.map → p-67f0fc77.entry.js.map} +0 -0
- /package/dist/chucao/{p-d630f662.entry.js.map → p-68e4a129.entry.js.map} +0 -0
- /package/dist/chucao/{p-b80c39c3.entry.js.map → p-6e345b3f.entry.js.map} +0 -0
- /package/dist/chucao/{p-6e93c392.entry.js.map → p-72d4dacf.entry.js.map} +0 -0
- /package/dist/chucao/{p-ca3179ae.entry.js.map → p-74d9b7e5.entry.js.map} +0 -0
- /package/dist/chucao/{p-8b09ad3c.entry.js.map → p-791ce537.entry.js.map} +0 -0
- /package/dist/chucao/{p-ad41da02.entry.js.map → p-79e8c10b.entry.js.map} +0 -0
- /package/dist/chucao/{p-c98e2a50.entry.js.map → p-7e13f725.entry.js.map} +0 -0
- /package/dist/chucao/{p-6c2e5931.entry.js.map → p-8b23d072.entry.js.map} +0 -0
- /package/dist/chucao/{p-920d5727.entry.js.map → p-a5430e95.entry.js.map} +0 -0
- /package/dist/chucao/{p-e6b7b2da.entry.js.map → p-a7c66879.entry.js.map} +0 -0
- /package/dist/chucao/{p-7f99ae48.entry.js.map → p-b452d6cb.entry.js.map} +0 -0
- /package/dist/chucao/{p-0d7fc720.entry.js.map → p-b7332faf.entry.js.map} +0 -0
- /package/dist/chucao/{p-19d90f87.entry.js.map → p-f3d03388.entry.js.map} +0 -0
- /package/dist/chucao/{p-8fcf6d36.entry.js.map → p-f925d45c.entry.js.map} +0 -0
- /package/dist/components/{p-CF1yV0aa.js.map → p-CuSstsTP.js.map} +0 -0
- /package/dist/components/{p-CmMN-UuJ.js.map → p-MBLhKofG.js.map} +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface ChComboboxOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Optional grouping label; consecutive options with the same group are announced together. */
|
|
7
|
+
group?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A text field that filters a list of options and commits a choice.
|
|
11
|
+
*
|
|
12
|
+
* The input is a native `<input>` rather than `ch-input`: the combobox role
|
|
13
|
+
* and its `aria-*` state have to sit on the element that owns the interaction,
|
|
14
|
+
* and ARIA does not forward through a wrapper component.
|
|
15
|
+
*
|
|
16
|
+
* Single and multiple are one component. `multiple` changes the value shape
|
|
17
|
+
* (`string` vs `string[]`), renders the chosen values as removable chips, and
|
|
18
|
+
* keeps the list open after a pick; single commits and closes. Everything else
|
|
19
|
+
* — filtering, the active option, keyboard behaviour, validity — is shared, so
|
|
20
|
+
* the two cannot drift apart.
|
|
21
|
+
*
|
|
22
|
+
* The consumer owns the options and, if it fetches them, their ordering: this
|
|
23
|
+
* component never sorts, debounces or requests anything. It filters what it is
|
|
24
|
+
* given, and reports what the user asked for.
|
|
25
|
+
*/
|
|
26
|
+
export declare class ChCombobox {
|
|
27
|
+
private readonly inputId;
|
|
28
|
+
private readonly listId;
|
|
29
|
+
private readonly hintId;
|
|
30
|
+
private readonly errorId;
|
|
31
|
+
private initialValue;
|
|
32
|
+
internals: ElementInternals;
|
|
33
|
+
formDisabled: boolean;
|
|
34
|
+
private host;
|
|
35
|
+
/** Visible label, associated with the input via `for`/`id`. */
|
|
36
|
+
label?: string;
|
|
37
|
+
/** The options to filter and choose from. */
|
|
38
|
+
options: ChComboboxOption[];
|
|
39
|
+
/** The committed value. An array when `multiple`. */
|
|
40
|
+
value?: string | string[];
|
|
41
|
+
/** Whether the user can pick more than one option. */
|
|
42
|
+
multiple: boolean;
|
|
43
|
+
/** Placeholder shown while the field is empty. */
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
/** Name submitted with the form. Repeated once per value when `multiple`. */
|
|
46
|
+
name?: string;
|
|
47
|
+
/** Whether the field is disabled. */
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
/** Whether at least one value is required. */
|
|
50
|
+
required: boolean;
|
|
51
|
+
/** Helper text, replaced by `errorMessage` when invalid. */
|
|
52
|
+
hint?: string;
|
|
53
|
+
/** Custom error message; wins over the built-in messages. */
|
|
54
|
+
errorMessage?: string;
|
|
55
|
+
/** Whether the field is marked invalid by the consumer. */
|
|
56
|
+
invalid: boolean;
|
|
57
|
+
/** Text the user has typed to filter with. */
|
|
58
|
+
private query;
|
|
59
|
+
/** Whether the list is rendered. */
|
|
60
|
+
private expanded;
|
|
61
|
+
/** Index into `visibleOptions` of the option under the keyboard cursor. */
|
|
62
|
+
private activeIndex;
|
|
63
|
+
/** Emitted whenever the committed value changes. */
|
|
64
|
+
chChange: EventEmitter<string | string[]>;
|
|
65
|
+
/** Emitted as the user types, with the raw query, so a consumer can filter remotely. */
|
|
66
|
+
chFilter: EventEmitter<string>;
|
|
67
|
+
/** The committed values as an array, whatever the mode. */
|
|
68
|
+
private get selected();
|
|
69
|
+
/** Options that match the current query. */
|
|
70
|
+
private get visibleOptions();
|
|
71
|
+
/** Options that are still choosable: already-picked ones drop out in multiple mode. */
|
|
72
|
+
private get choosable();
|
|
73
|
+
private labelFor;
|
|
74
|
+
componentDidLoad(): void;
|
|
75
|
+
disconnectedCallback(): void;
|
|
76
|
+
private markTouched;
|
|
77
|
+
/**
|
|
78
|
+
* Closing on blur is deferred: clicking an option also blurs the input, and
|
|
79
|
+
* the click must be allowed to land first.
|
|
80
|
+
*/
|
|
81
|
+
private handleFocusOut;
|
|
82
|
+
protected syncForm(): void;
|
|
83
|
+
formResetCallback(): void;
|
|
84
|
+
formDisabledCallback(isDisabled: boolean): void;
|
|
85
|
+
private commit;
|
|
86
|
+
private remove;
|
|
87
|
+
private open;
|
|
88
|
+
private moveActive;
|
|
89
|
+
private handleInput;
|
|
90
|
+
private handleKeyDown;
|
|
91
|
+
private handleFocus;
|
|
92
|
+
private handleBlur;
|
|
93
|
+
private get isInvalid();
|
|
94
|
+
private get describedBy();
|
|
95
|
+
/** The option id for `aria-activedescendant`. */
|
|
96
|
+
private optionId;
|
|
97
|
+
render(): any;
|
|
98
|
+
}
|
|
@@ -10,6 +10,7 @@ import { ChAlertVariant } from "./components/ch-alert/ch-alert";
|
|
|
10
10
|
import { ChBadgeVariant } from "./components/ch-badge/ch-badge";
|
|
11
11
|
import { ChButtonSize, ChButtonVariant } from "./components/ch-button/ch-button";
|
|
12
12
|
import { ChClusterAlign, ChClusterGap, ChClusterJustify } from "./components/ch-cluster/ch-cluster";
|
|
13
|
+
import { ChComboboxOption } from "./components/ch-combobox/ch-combobox";
|
|
13
14
|
import { ChConfirmDialogTone } from "./components/ch-confirm-dialog/ch-confirm-dialog";
|
|
14
15
|
import { ChDescriptionListColumns } from "./components/ch-description-list/ch-description-list";
|
|
15
16
|
import { ChDividerOrientation } from "./components/ch-divider/ch-divider";
|
|
@@ -40,6 +41,7 @@ export { ChAlertVariant } from "./components/ch-alert/ch-alert";
|
|
|
40
41
|
export { ChBadgeVariant } from "./components/ch-badge/ch-badge";
|
|
41
42
|
export { ChButtonSize, ChButtonVariant } from "./components/ch-button/ch-button";
|
|
42
43
|
export { ChClusterAlign, ChClusterGap, ChClusterJustify } from "./components/ch-cluster/ch-cluster";
|
|
44
|
+
export { ChComboboxOption } from "./components/ch-combobox/ch-combobox";
|
|
43
45
|
export { ChConfirmDialogTone } from "./components/ch-confirm-dialog/ch-confirm-dialog";
|
|
44
46
|
export { ChDescriptionListColumns } from "./components/ch-description-list/ch-description-list";
|
|
45
47
|
export { ChDividerOrientation } from "./components/ch-divider/ch-divider";
|
|
@@ -229,6 +231,71 @@ export namespace Components {
|
|
|
229
231
|
*/
|
|
230
232
|
"wrap": boolean;
|
|
231
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* A text field that filters a list of options and commits a choice.
|
|
236
|
+
* The input is a native `<input>` rather than `ch-input`: the combobox role
|
|
237
|
+
* and its `aria-*` state have to sit on the element that owns the interaction,
|
|
238
|
+
* and ARIA does not forward through a wrapper component.
|
|
239
|
+
* Single and multiple are one component. `multiple` changes the value shape
|
|
240
|
+
* (`string` vs `string[]`), renders the chosen values as removable chips, and
|
|
241
|
+
* keeps the list open after a pick; single commits and closes. Everything else
|
|
242
|
+
* — filtering, the active option, keyboard behaviour, validity — is shared, so
|
|
243
|
+
* the two cannot drift apart.
|
|
244
|
+
* The consumer owns the options and, if it fetches them, their ordering: this
|
|
245
|
+
* component never sorts, debounces or requests anything. It filters what it is
|
|
246
|
+
* given, and reports what the user asked for.
|
|
247
|
+
*/
|
|
248
|
+
interface ChCombobox {
|
|
249
|
+
/**
|
|
250
|
+
* Whether the field is disabled.
|
|
251
|
+
* @default false
|
|
252
|
+
*/
|
|
253
|
+
"disabled": boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Custom error message; wins over the built-in messages.
|
|
256
|
+
*/
|
|
257
|
+
"errorMessage"?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Helper text, replaced by `errorMessage` when invalid.
|
|
260
|
+
*/
|
|
261
|
+
"hint"?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Whether the field is marked invalid by the consumer.
|
|
264
|
+
* @default false
|
|
265
|
+
*/
|
|
266
|
+
"invalid": boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Visible label, associated with the input via `for`/`id`.
|
|
269
|
+
*/
|
|
270
|
+
"label"?: string;
|
|
271
|
+
/**
|
|
272
|
+
* Whether the user can pick more than one option.
|
|
273
|
+
* @default false
|
|
274
|
+
*/
|
|
275
|
+
"multiple": boolean;
|
|
276
|
+
/**
|
|
277
|
+
* Name submitted with the form. Repeated once per value when `multiple`.
|
|
278
|
+
*/
|
|
279
|
+
"name"?: string;
|
|
280
|
+
/**
|
|
281
|
+
* The options to filter and choose from.
|
|
282
|
+
* @default []
|
|
283
|
+
*/
|
|
284
|
+
"options": ChComboboxOption[];
|
|
285
|
+
/**
|
|
286
|
+
* Placeholder shown while the field is empty.
|
|
287
|
+
*/
|
|
288
|
+
"placeholder"?: string;
|
|
289
|
+
/**
|
|
290
|
+
* Whether at least one value is required.
|
|
291
|
+
* @default false
|
|
292
|
+
*/
|
|
293
|
+
"required": boolean;
|
|
294
|
+
/**
|
|
295
|
+
* The committed value. An array when `multiple`.
|
|
296
|
+
*/
|
|
297
|
+
"value"?: string | string[];
|
|
298
|
+
}
|
|
232
299
|
/**
|
|
233
300
|
* A confirmation dialog over `ch-modal`.
|
|
234
301
|
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
@@ -1278,6 +1345,10 @@ export interface ChCheckboxCustomEvent<T> extends CustomEvent<T> {
|
|
|
1278
1345
|
detail: T;
|
|
1279
1346
|
target: HTMLChCheckboxElement;
|
|
1280
1347
|
}
|
|
1348
|
+
export interface ChComboboxCustomEvent<T> extends CustomEvent<T> {
|
|
1349
|
+
detail: T;
|
|
1350
|
+
target: HTMLChComboboxElement;
|
|
1351
|
+
}
|
|
1281
1352
|
export interface ChConfirmDialogCustomEvent<T> extends CustomEvent<T> {
|
|
1282
1353
|
detail: T;
|
|
1283
1354
|
target: HTMLChConfirmDialogElement;
|
|
@@ -1452,6 +1523,38 @@ declare global {
|
|
|
1452
1523
|
prototype: HTMLChClusterElement;
|
|
1453
1524
|
new (): HTMLChClusterElement;
|
|
1454
1525
|
};
|
|
1526
|
+
interface HTMLChComboboxElementEventMap {
|
|
1527
|
+
"chChange": string | string[];
|
|
1528
|
+
"chFilter": string;
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* A text field that filters a list of options and commits a choice.
|
|
1532
|
+
* The input is a native `<input>` rather than `ch-input`: the combobox role
|
|
1533
|
+
* and its `aria-*` state have to sit on the element that owns the interaction,
|
|
1534
|
+
* and ARIA does not forward through a wrapper component.
|
|
1535
|
+
* Single and multiple are one component. `multiple` changes the value shape
|
|
1536
|
+
* (`string` vs `string[]`), renders the chosen values as removable chips, and
|
|
1537
|
+
* keeps the list open after a pick; single commits and closes. Everything else
|
|
1538
|
+
* — filtering, the active option, keyboard behaviour, validity — is shared, so
|
|
1539
|
+
* the two cannot drift apart.
|
|
1540
|
+
* The consumer owns the options and, if it fetches them, their ordering: this
|
|
1541
|
+
* component never sorts, debounces or requests anything. It filters what it is
|
|
1542
|
+
* given, and reports what the user asked for.
|
|
1543
|
+
*/
|
|
1544
|
+
interface HTMLChComboboxElement extends Components.ChCombobox, HTMLStencilElement {
|
|
1545
|
+
addEventListener<K extends keyof HTMLChComboboxElementEventMap>(type: K, listener: (this: HTMLChComboboxElement, ev: ChComboboxCustomEvent<HTMLChComboboxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1546
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1547
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1548
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1549
|
+
removeEventListener<K extends keyof HTMLChComboboxElementEventMap>(type: K, listener: (this: HTMLChComboboxElement, ev: ChComboboxCustomEvent<HTMLChComboboxElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1550
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1551
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1552
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1553
|
+
}
|
|
1554
|
+
var HTMLChComboboxElement: {
|
|
1555
|
+
prototype: HTMLChComboboxElement;
|
|
1556
|
+
new (): HTMLChComboboxElement;
|
|
1557
|
+
};
|
|
1455
1558
|
interface HTMLChConfirmDialogElementEventMap {
|
|
1456
1559
|
"chConfirm": void;
|
|
1457
1560
|
"chCancel": void;
|
|
@@ -2080,6 +2183,7 @@ declare global {
|
|
|
2080
2183
|
"ch-card": HTMLChCardElement;
|
|
2081
2184
|
"ch-checkbox": HTMLChCheckboxElement;
|
|
2082
2185
|
"ch-cluster": HTMLChClusterElement;
|
|
2186
|
+
"ch-combobox": HTMLChComboboxElement;
|
|
2083
2187
|
"ch-confirm-dialog": HTMLChConfirmDialogElement;
|
|
2084
2188
|
"ch-description-list": HTMLChDescriptionListElement;
|
|
2085
2189
|
"ch-divider": HTMLChDividerElement;
|
|
@@ -2297,6 +2401,83 @@ declare namespace LocalJSX {
|
|
|
2297
2401
|
*/
|
|
2298
2402
|
"wrap"?: boolean;
|
|
2299
2403
|
}
|
|
2404
|
+
/**
|
|
2405
|
+
* A text field that filters a list of options and commits a choice.
|
|
2406
|
+
* The input is a native `<input>` rather than `ch-input`: the combobox role
|
|
2407
|
+
* and its `aria-*` state have to sit on the element that owns the interaction,
|
|
2408
|
+
* and ARIA does not forward through a wrapper component.
|
|
2409
|
+
* Single and multiple are one component. `multiple` changes the value shape
|
|
2410
|
+
* (`string` vs `string[]`), renders the chosen values as removable chips, and
|
|
2411
|
+
* keeps the list open after a pick; single commits and closes. Everything else
|
|
2412
|
+
* — filtering, the active option, keyboard behaviour, validity — is shared, so
|
|
2413
|
+
* the two cannot drift apart.
|
|
2414
|
+
* The consumer owns the options and, if it fetches them, their ordering: this
|
|
2415
|
+
* component never sorts, debounces or requests anything. It filters what it is
|
|
2416
|
+
* given, and reports what the user asked for.
|
|
2417
|
+
*/
|
|
2418
|
+
interface ChCombobox {
|
|
2419
|
+
/**
|
|
2420
|
+
* Whether the field is disabled.
|
|
2421
|
+
* @default false
|
|
2422
|
+
*/
|
|
2423
|
+
"disabled"?: boolean;
|
|
2424
|
+
/**
|
|
2425
|
+
* Custom error message; wins over the built-in messages.
|
|
2426
|
+
*/
|
|
2427
|
+
"errorMessage"?: string;
|
|
2428
|
+
/**
|
|
2429
|
+
* The `id` of a `<form>` element to associate this element with.
|
|
2430
|
+
*/
|
|
2431
|
+
"form"?: string;
|
|
2432
|
+
/**
|
|
2433
|
+
* Helper text, replaced by `errorMessage` when invalid.
|
|
2434
|
+
*/
|
|
2435
|
+
"hint"?: string;
|
|
2436
|
+
/**
|
|
2437
|
+
* Whether the field is marked invalid by the consumer.
|
|
2438
|
+
* @default false
|
|
2439
|
+
*/
|
|
2440
|
+
"invalid"?: boolean;
|
|
2441
|
+
/**
|
|
2442
|
+
* Visible label, associated with the input via `for`/`id`.
|
|
2443
|
+
*/
|
|
2444
|
+
"label"?: string;
|
|
2445
|
+
/**
|
|
2446
|
+
* Whether the user can pick more than one option.
|
|
2447
|
+
* @default false
|
|
2448
|
+
*/
|
|
2449
|
+
"multiple"?: boolean;
|
|
2450
|
+
/**
|
|
2451
|
+
* Name submitted with the form. Repeated once per value when `multiple`.
|
|
2452
|
+
*/
|
|
2453
|
+
"name"?: string;
|
|
2454
|
+
/**
|
|
2455
|
+
* Emitted whenever the committed value changes.
|
|
2456
|
+
*/
|
|
2457
|
+
"onChChange"?: (event: ChComboboxCustomEvent<string | string[]>) => void;
|
|
2458
|
+
/**
|
|
2459
|
+
* Emitted as the user types, with the raw query, so a consumer can filter remotely.
|
|
2460
|
+
*/
|
|
2461
|
+
"onChFilter"?: (event: ChComboboxCustomEvent<string>) => void;
|
|
2462
|
+
/**
|
|
2463
|
+
* The options to filter and choose from.
|
|
2464
|
+
* @default []
|
|
2465
|
+
*/
|
|
2466
|
+
"options"?: ChComboboxOption[];
|
|
2467
|
+
/**
|
|
2468
|
+
* Placeholder shown while the field is empty.
|
|
2469
|
+
*/
|
|
2470
|
+
"placeholder"?: string;
|
|
2471
|
+
/**
|
|
2472
|
+
* Whether at least one value is required.
|
|
2473
|
+
* @default false
|
|
2474
|
+
*/
|
|
2475
|
+
"required"?: boolean;
|
|
2476
|
+
/**
|
|
2477
|
+
* The committed value. An array when `multiple`.
|
|
2478
|
+
*/
|
|
2479
|
+
"value"?: string | string[];
|
|
2480
|
+
}
|
|
2300
2481
|
/**
|
|
2301
2482
|
* A confirmation dialog over `ch-modal`.
|
|
2302
2483
|
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
@@ -3488,6 +3669,18 @@ declare namespace LocalJSX {
|
|
|
3488
3669
|
"justify": ChClusterJustify;
|
|
3489
3670
|
"wrap": boolean;
|
|
3490
3671
|
}
|
|
3672
|
+
interface ChComboboxAttributes {
|
|
3673
|
+
"label": string;
|
|
3674
|
+
"value": string | string[];
|
|
3675
|
+
"multiple": boolean;
|
|
3676
|
+
"placeholder": string;
|
|
3677
|
+
"name": string;
|
|
3678
|
+
"disabled": boolean;
|
|
3679
|
+
"required": boolean;
|
|
3680
|
+
"hint": string;
|
|
3681
|
+
"errorMessage": string;
|
|
3682
|
+
"invalid": boolean;
|
|
3683
|
+
}
|
|
3491
3684
|
interface ChConfirmDialogAttributes {
|
|
3492
3685
|
"open": boolean;
|
|
3493
3686
|
"heading": string;
|
|
@@ -3703,6 +3896,7 @@ declare namespace LocalJSX {
|
|
|
3703
3896
|
"ch-card": ChCard;
|
|
3704
3897
|
"ch-checkbox": Omit<ChCheckbox, keyof ChCheckboxAttributes> & { [K in keyof ChCheckbox & keyof ChCheckboxAttributes]?: ChCheckbox[K] } & { [K in keyof ChCheckbox & keyof ChCheckboxAttributes as `attr:${K}`]?: ChCheckboxAttributes[K] } & { [K in keyof ChCheckbox & keyof ChCheckboxAttributes as `prop:${K}`]?: ChCheckbox[K] };
|
|
3705
3898
|
"ch-cluster": Omit<ChCluster, keyof ChClusterAttributes> & { [K in keyof ChCluster & keyof ChClusterAttributes]?: ChCluster[K] } & { [K in keyof ChCluster & keyof ChClusterAttributes as `attr:${K}`]?: ChClusterAttributes[K] } & { [K in keyof ChCluster & keyof ChClusterAttributes as `prop:${K}`]?: ChCluster[K] };
|
|
3899
|
+
"ch-combobox": Omit<ChCombobox, keyof ChComboboxAttributes> & { [K in keyof ChCombobox & keyof ChComboboxAttributes]?: ChCombobox[K] } & { [K in keyof ChCombobox & keyof ChComboboxAttributes as `attr:${K}`]?: ChComboboxAttributes[K] } & { [K in keyof ChCombobox & keyof ChComboboxAttributes as `prop:${K}`]?: ChCombobox[K] };
|
|
3706
3900
|
"ch-confirm-dialog": Omit<ChConfirmDialog, keyof ChConfirmDialogAttributes> & { [K in keyof ChConfirmDialog & keyof ChConfirmDialogAttributes]?: ChConfirmDialog[K] } & { [K in keyof ChConfirmDialog & keyof ChConfirmDialogAttributes as `attr:${K}`]?: ChConfirmDialogAttributes[K] } & { [K in keyof ChConfirmDialog & keyof ChConfirmDialogAttributes as `prop:${K}`]?: ChConfirmDialog[K] } & OneOf<"heading", ChConfirmDialog["heading"], ChConfirmDialogAttributes["heading"]>;
|
|
3707
3901
|
"ch-description-list": Omit<ChDescriptionList, keyof ChDescriptionListAttributes> & { [K in keyof ChDescriptionList & keyof ChDescriptionListAttributes]?: ChDescriptionList[K] } & { [K in keyof ChDescriptionList & keyof ChDescriptionListAttributes as `attr:${K}`]?: ChDescriptionListAttributes[K] } & { [K in keyof ChDescriptionList & keyof ChDescriptionListAttributes as `prop:${K}`]?: ChDescriptionList[K] };
|
|
3708
3902
|
"ch-divider": Omit<ChDivider, keyof ChDividerAttributes> & { [K in keyof ChDivider & keyof ChDividerAttributes]?: ChDivider[K] } & { [K in keyof ChDivider & keyof ChDividerAttributes as `attr:${K}`]?: ChDividerAttributes[K] } & { [K in keyof ChDivider & keyof ChDividerAttributes as `prop:${K}`]?: ChDivider[K] };
|
|
@@ -3768,6 +3962,21 @@ declare module "@stencil/core" {
|
|
|
3768
3962
|
* gap in both axes — the layout a toolbar, a tag list or a button row needs.
|
|
3769
3963
|
*/
|
|
3770
3964
|
"ch-cluster": LocalJSX.IntrinsicElements["ch-cluster"] & JSXBase.HTMLAttributes<HTMLChClusterElement>;
|
|
3965
|
+
/**
|
|
3966
|
+
* A text field that filters a list of options and commits a choice.
|
|
3967
|
+
* The input is a native `<input>` rather than `ch-input`: the combobox role
|
|
3968
|
+
* and its `aria-*` state have to sit on the element that owns the interaction,
|
|
3969
|
+
* and ARIA does not forward through a wrapper component.
|
|
3970
|
+
* Single and multiple are one component. `multiple` changes the value shape
|
|
3971
|
+
* (`string` vs `string[]`), renders the chosen values as removable chips, and
|
|
3972
|
+
* keeps the list open after a pick; single commits and closes. Everything else
|
|
3973
|
+
* — filtering, the active option, keyboard behaviour, validity — is shared, so
|
|
3974
|
+
* the two cannot drift apart.
|
|
3975
|
+
* The consumer owns the options and, if it fetches them, their ordering: this
|
|
3976
|
+
* component never sorts, debounces or requests anything. It filters what it is
|
|
3977
|
+
* given, and reports what the user asked for.
|
|
3978
|
+
*/
|
|
3979
|
+
"ch-combobox": LocalJSX.IntrinsicElements["ch-combobox"] & JSXBase.HTMLAttributes<HTMLChComboboxElement>;
|
|
3771
3980
|
/**
|
|
3772
3981
|
* A confirmation dialog over `ch-modal`.
|
|
3773
3982
|
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
4
|
*/
|
|
5
5
|
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
-
import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChConfirmDialogCustomEvent, type ChDrawerCustomEvent, type ChIconButtonCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChModalCustomEvent, type ChNumberInputCustomEvent, type ChOtpInputCustomEvent, type ChPaginationCustomEvent, type ChRadioCustomEvent, type ChSegmentedControlCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTableCustomEvent, type ChTableSortDirection, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
6
|
+
import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChComboboxCustomEvent, type ChConfirmDialogCustomEvent, type ChDrawerCustomEvent, type ChIconButtonCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChModalCustomEvent, type ChNumberInputCustomEvent, type ChOtpInputCustomEvent, type ChPaginationCustomEvent, type ChRadioCustomEvent, type ChSegmentedControlCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTableCustomEvent, type ChTableSortDirection, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
7
7
|
import type { Components } from "@devschile/chucao/dist/components";
|
|
8
8
|
import { ChAccordion as ChAccordionElement } from "@devschile/chucao/dist/components/ch-accordion.js";
|
|
9
9
|
import { ChAlert as ChAlertElement } from "@devschile/chucao/dist/components/ch-alert.js";
|
|
@@ -12,6 +12,7 @@ import { ChButton as ChButtonElement } from "@devschile/chucao/dist/components/c
|
|
|
12
12
|
import { ChCard as ChCardElement } from "@devschile/chucao/dist/components/ch-card.js";
|
|
13
13
|
import { ChCheckbox as ChCheckboxElement } from "@devschile/chucao/dist/components/ch-checkbox.js";
|
|
14
14
|
import { ChCluster as ChClusterElement } from "@devschile/chucao/dist/components/ch-cluster.js";
|
|
15
|
+
import { ChCombobox as ChComboboxElement } from "@devschile/chucao/dist/components/ch-combobox.js";
|
|
15
16
|
import { ChConfirmDialog as ChConfirmDialogElement } from "@devschile/chucao/dist/components/ch-confirm-dialog.js";
|
|
16
17
|
import { ChDescriptionList as ChDescriptionListElement } from "@devschile/chucao/dist/components/ch-description-list.js";
|
|
17
18
|
import { ChDivider as ChDividerElement } from "@devschile/chucao/dist/components/ch-divider.js";
|
|
@@ -63,6 +64,11 @@ export type ChCheckboxEvents = {
|
|
|
63
64
|
export declare const ChCheckbox: StencilReactComponent<ChCheckboxElement, ChCheckboxEvents, Components.ChCheckbox>;
|
|
64
65
|
export type ChClusterEvents = NonNullable<unknown>;
|
|
65
66
|
export declare const ChCluster: StencilReactComponent<ChClusterElement, ChClusterEvents, Components.ChCluster>;
|
|
67
|
+
export type ChComboboxEvents = {
|
|
68
|
+
onChChange: EventName<ChComboboxCustomEvent<string | string[]>>;
|
|
69
|
+
onChFilter: EventName<ChComboboxCustomEvent<string>>;
|
|
70
|
+
};
|
|
71
|
+
export declare const ChCombobox: StencilReactComponent<ChComboboxElement, ChComboboxEvents, Components.ChCombobox>;
|
|
66
72
|
export type ChConfirmDialogEvents = {
|
|
67
73
|
onChConfirm: EventName<ChConfirmDialogCustomEvent<void>>;
|
|
68
74
|
onChCancel: EventName<ChConfirmDialogCustomEvent<void>>;
|
package/dist-react/components.js
CHANGED
|
@@ -8,6 +8,7 @@ import { ChButton as ChButtonElement, defineCustomElement as defineChButton } fr
|
|
|
8
8
|
import { ChCard as ChCardElement, defineCustomElement as defineChCard } from "@devschile/chucao/dist/components/ch-card.js";
|
|
9
9
|
import { ChCheckbox as ChCheckboxElement, defineCustomElement as defineChCheckbox } from "@devschile/chucao/dist/components/ch-checkbox.js";
|
|
10
10
|
import { ChCluster as ChClusterElement, defineCustomElement as defineChCluster } from "@devschile/chucao/dist/components/ch-cluster.js";
|
|
11
|
+
import { ChCombobox as ChComboboxElement, defineCustomElement as defineChCombobox } from "@devschile/chucao/dist/components/ch-combobox.js";
|
|
11
12
|
import { ChConfirmDialog as ChConfirmDialogElement, defineCustomElement as defineChConfirmDialog } from "@devschile/chucao/dist/components/ch-confirm-dialog.js";
|
|
12
13
|
import { ChDescriptionList as ChDescriptionListElement, defineCustomElement as defineChDescriptionList } from "@devschile/chucao/dist/components/ch-description-list.js";
|
|
13
14
|
import { ChDivider as ChDividerElement, defineCustomElement as defineChDivider } from "@devschile/chucao/dist/components/ch-divider.js";
|
|
@@ -93,6 +94,17 @@ export const ChCluster = /*@__PURE__*/ createComponent({
|
|
|
93
94
|
events: {},
|
|
94
95
|
defineCustomElement: defineChCluster
|
|
95
96
|
});
|
|
97
|
+
export const ChCombobox = /*@__PURE__*/ createComponent({
|
|
98
|
+
tagName: 'ch-combobox',
|
|
99
|
+
elementClass: ChComboboxElement,
|
|
100
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
101
|
+
react: React,
|
|
102
|
+
events: {
|
|
103
|
+
onChChange: 'chChange',
|
|
104
|
+
onChFilter: 'chFilter'
|
|
105
|
+
},
|
|
106
|
+
defineCustomElement: defineChCombobox
|
|
107
|
+
});
|
|
96
108
|
export const ChConfirmDialog = /*@__PURE__*/ createComponent({
|
|
97
109
|
tagName: 'ch-confirm-dialog',
|
|
98
110
|
elementClass: ChConfirmDialogElement,
|
package/dist-react/components.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { EventName, StencilReactComponent } from '@stencil/react-output-tar
|
|
|
11
11
|
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
|
|
14
|
-
import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChConfirmDialogCustomEvent, type ChDrawerCustomEvent, type ChIconButtonCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChModalCustomEvent, type ChNumberInputCustomEvent, type ChOtpInputCustomEvent, type ChPaginationCustomEvent, type ChRadioCustomEvent, type ChSegmentedControlCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTableCustomEvent, type ChTableSortDirection, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
14
|
+
import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChComboboxCustomEvent, type ChConfirmDialogCustomEvent, type ChDrawerCustomEvent, type ChIconButtonCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChModalCustomEvent, type ChNumberInputCustomEvent, type ChOtpInputCustomEvent, type ChPaginationCustomEvent, type ChRadioCustomEvent, type ChSegmentedControlCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTableCustomEvent, type ChTableSortDirection, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
15
15
|
import type { Components } from "@devschile/chucao/dist/components";
|
|
16
16
|
import { ChAccordion as ChAccordionElement, defineCustomElement as defineChAccordion } from "@devschile/chucao/dist/components/ch-accordion.js";
|
|
17
17
|
import { ChAlert as ChAlertElement, defineCustomElement as defineChAlert } from "@devschile/chucao/dist/components/ch-alert.js";
|
|
@@ -20,6 +20,7 @@ import { ChButton as ChButtonElement, defineCustomElement as defineChButton } fr
|
|
|
20
20
|
import { ChCard as ChCardElement, defineCustomElement as defineChCard } from "@devschile/chucao/dist/components/ch-card.js";
|
|
21
21
|
import { ChCheckbox as ChCheckboxElement, defineCustomElement as defineChCheckbox } from "@devschile/chucao/dist/components/ch-checkbox.js";
|
|
22
22
|
import { ChCluster as ChClusterElement, defineCustomElement as defineChCluster } from "@devschile/chucao/dist/components/ch-cluster.js";
|
|
23
|
+
import { ChCombobox as ChComboboxElement, defineCustomElement as defineChCombobox } from "@devschile/chucao/dist/components/ch-combobox.js";
|
|
23
24
|
import { ChConfirmDialog as ChConfirmDialogElement, defineCustomElement as defineChConfirmDialog } from "@devschile/chucao/dist/components/ch-confirm-dialog.js";
|
|
24
25
|
import { ChDescriptionList as ChDescriptionListElement, defineCustomElement as defineChDescriptionList } from "@devschile/chucao/dist/components/ch-description-list.js";
|
|
25
26
|
import { ChDivider as ChDividerElement, defineCustomElement as defineChDivider } from "@devschile/chucao/dist/components/ch-divider.js";
|
|
@@ -127,6 +128,23 @@ export const ChCluster: StencilReactComponent<ChClusterElement, ChClusterEvents,
|
|
|
127
128
|
defineCustomElement: defineChCluster
|
|
128
129
|
});
|
|
129
130
|
|
|
131
|
+
export type ChComboboxEvents = {
|
|
132
|
+
onChChange: EventName<ChComboboxCustomEvent<string | string[]>>,
|
|
133
|
+
onChFilter: EventName<ChComboboxCustomEvent<string>>
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const ChCombobox: StencilReactComponent<ChComboboxElement, ChComboboxEvents, Components.ChCombobox> = /*@__PURE__*/ createComponent<ChComboboxElement, ChComboboxEvents, Components.ChCombobox>({
|
|
137
|
+
tagName: 'ch-combobox',
|
|
138
|
+
elementClass: ChComboboxElement,
|
|
139
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
140
|
+
react: React,
|
|
141
|
+
events: {
|
|
142
|
+
onChChange: 'chChange',
|
|
143
|
+
onChFilter: 'chFilter'
|
|
144
|
+
} as ChComboboxEvents,
|
|
145
|
+
defineCustomElement: defineChCombobox
|
|
146
|
+
});
|
|
147
|
+
|
|
130
148
|
export type ChConfirmDialogEvents = {
|
|
131
149
|
onChConfirm: EventName<ChConfirmDialogCustomEvent<void>>,
|
|
132
150
|
onChCancel: EventName<ChConfirmDialogCustomEvent<void>>
|
package/dist-vue/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const ChButton: StencilVueComponent<JSX.ChButton>;
|
|
|
7
7
|
export declare const ChCard: StencilVueComponent<JSX.ChCard>;
|
|
8
8
|
export declare const ChCheckbox: StencilVueComponent<JSX.ChCheckbox>;
|
|
9
9
|
export declare const ChCluster: StencilVueComponent<JSX.ChCluster>;
|
|
10
|
+
export declare const ChCombobox: StencilVueComponent<JSX.ChCombobox>;
|
|
10
11
|
export declare const ChConfirmDialog: StencilVueComponent<JSX.ChConfirmDialog>;
|
|
11
12
|
export declare const ChDescriptionList: StencilVueComponent<JSX.ChDescriptionList>;
|
|
12
13
|
export declare const ChDivider: StencilVueComponent<JSX.ChDivider>;
|
package/dist-vue/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { defineCustomElement as defineChButton } from '@devschile/chucao/dist/co
|
|
|
9
9
|
import { defineCustomElement as defineChCard } from '@devschile/chucao/dist/components/ch-card.js';
|
|
10
10
|
import { defineCustomElement as defineChCheckbox } from '@devschile/chucao/dist/components/ch-checkbox.js';
|
|
11
11
|
import { defineCustomElement as defineChCluster } from '@devschile/chucao/dist/components/ch-cluster.js';
|
|
12
|
+
import { defineCustomElement as defineChCombobox } from '@devschile/chucao/dist/components/ch-combobox.js';
|
|
12
13
|
import { defineCustomElement as defineChConfirmDialog } from '@devschile/chucao/dist/components/ch-confirm-dialog.js';
|
|
13
14
|
import { defineCustomElement as defineChDescriptionList } from '@devschile/chucao/dist/components/ch-description-list.js';
|
|
14
15
|
import { defineCustomElement as defineChDivider } from '@devschile/chucao/dist/components/ch-divider.js';
|
|
@@ -90,6 +91,24 @@ export const ChCluster = /*@__PURE__*/ defineContainer('ch-cluster', defineChClu
|
|
|
90
91
|
'justify',
|
|
91
92
|
'wrap'
|
|
92
93
|
]);
|
|
94
|
+
export const ChCombobox = /*@__PURE__*/ defineContainer('ch-combobox', defineChCombobox, [
|
|
95
|
+
'label',
|
|
96
|
+
'options',
|
|
97
|
+
'value',
|
|
98
|
+
'multiple',
|
|
99
|
+
'placeholder',
|
|
100
|
+
'name',
|
|
101
|
+
'disabled',
|
|
102
|
+
'required',
|
|
103
|
+
'hint',
|
|
104
|
+
'errorMessage',
|
|
105
|
+
'invalid',
|
|
106
|
+
'chChange',
|
|
107
|
+
'chFilter'
|
|
108
|
+
], [
|
|
109
|
+
'chChange',
|
|
110
|
+
'chFilter'
|
|
111
|
+
]);
|
|
93
112
|
export const ChConfirmDialog = /*@__PURE__*/ defineContainer('ch-confirm-dialog', defineChConfirmDialog, [
|
|
94
113
|
'open',
|
|
95
114
|
'heading',
|
package/dist-vue/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { defineCustomElement as defineChButton } from '@devschile/chucao/dist/co
|
|
|
12
12
|
import { defineCustomElement as defineChCard } from '@devschile/chucao/dist/components/ch-card.js';
|
|
13
13
|
import { defineCustomElement as defineChCheckbox } from '@devschile/chucao/dist/components/ch-checkbox.js';
|
|
14
14
|
import { defineCustomElement as defineChCluster } from '@devschile/chucao/dist/components/ch-cluster.js';
|
|
15
|
+
import { defineCustomElement as defineChCombobox } from '@devschile/chucao/dist/components/ch-combobox.js';
|
|
15
16
|
import { defineCustomElement as defineChConfirmDialog } from '@devschile/chucao/dist/components/ch-confirm-dialog.js';
|
|
16
17
|
import { defineCustomElement as defineChDescriptionList } from '@devschile/chucao/dist/components/ch-description-list.js';
|
|
17
18
|
import { defineCustomElement as defineChDivider } from '@devschile/chucao/dist/components/ch-divider.js';
|
|
@@ -110,6 +111,26 @@ export const ChCluster: StencilVueComponent<JSX.ChCluster> = /*@__PURE__*/ defin
|
|
|
110
111
|
]);
|
|
111
112
|
|
|
112
113
|
|
|
114
|
+
export const ChCombobox: StencilVueComponent<JSX.ChCombobox> = /*@__PURE__*/ defineContainer<JSX.ChCombobox>('ch-combobox', defineChCombobox, [
|
|
115
|
+
'label',
|
|
116
|
+
'options',
|
|
117
|
+
'value',
|
|
118
|
+
'multiple',
|
|
119
|
+
'placeholder',
|
|
120
|
+
'name',
|
|
121
|
+
'disabled',
|
|
122
|
+
'required',
|
|
123
|
+
'hint',
|
|
124
|
+
'errorMessage',
|
|
125
|
+
'invalid',
|
|
126
|
+
'chChange',
|
|
127
|
+
'chFilter'
|
|
128
|
+
], [
|
|
129
|
+
'chChange',
|
|
130
|
+
'chFilter'
|
|
131
|
+
]);
|
|
132
|
+
|
|
133
|
+
|
|
113
134
|
export const ChConfirmDialog: StencilVueComponent<JSX.ChConfirmDialog> = /*@__PURE__*/ defineContainer<JSX.ChConfirmDialog>('ch-confirm-dialog', defineChConfirmDialog, [
|
|
114
135
|
'open',
|
|
115
136
|
'heading',
|