@devschile/chucao 2.7.1 → 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-01b6c7bf.entry.js → p-03acf096.entry.js} +2 -2
- package/dist/chucao/{p-10f6801e.entry.js → p-0ce2b15d.entry.js} +2 -2
- package/dist/chucao/p-10e37157.entry.js +2 -0
- package/dist/chucao/p-10e37157.entry.js.map +1 -0
- package/dist/chucao/{p-f917d34f.entry.js → p-12043dc1.entry.js} +2 -2
- package/dist/chucao/p-1dca55d6.entry.js +2 -0
- package/dist/chucao/{p-deb2571b.entry.js.map → p-1dca55d6.entry.js.map} +1 -1
- package/dist/chucao/{p-0c7f6f8d.entry.js → p-244d8e96.entry.js} +2 -2
- package/dist/chucao/{p-a7c674b7.entry.js → p-29841714.entry.js} +2 -2
- package/dist/chucao/{p-ffecdf25.entry.js → p-302ec527.entry.js} +2 -2
- package/dist/chucao/{p-337d7f68.entry.js → p-51f6327c.entry.js} +2 -2
- package/dist/chucao/{p-1b70e3f1.entry.js → p-5a62951e.entry.js} +2 -2
- package/dist/chucao/{p-472ec451.entry.js → p-5d0ac17a.entry.js} +2 -2
- package/dist/chucao/{p-d8b71751.entry.js → p-5e0e1012.entry.js} +2 -2
- package/dist/chucao/{p-15d27bb7.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-674c0f61.entry.js +2 -0
- package/dist/chucao/p-674c0f61.entry.js.map +1 -0
- package/dist/chucao/{p-c4b2bd1f.entry.js → p-67f0fc77.entry.js} +2 -2
- package/dist/chucao/{p-5240f5ac.entry.js → p-68e4a129.entry.js} +2 -2
- package/dist/chucao/{p-2e37c61b.entry.js → p-6e345b3f.entry.js} +2 -2
- package/dist/chucao/{p-f6ab0a11.entry.js → p-72d4dacf.entry.js} +2 -2
- package/dist/chucao/{p-8ae680a4.entry.js → p-74d9b7e5.entry.js} +2 -2
- package/dist/chucao/p-791ce537.entry.js +2 -0
- package/dist/chucao/p-791ce537.entry.js.map +1 -0
- package/dist/chucao/{p-c90da3c0.entry.js → p-79e8c10b.entry.js} +2 -2
- package/dist/chucao/{p-90284ebe.entry.js → p-7e13f725.entry.js} +2 -2
- package/dist/chucao/{p-9ebcc7be.entry.js → p-8b23d072.entry.js} +2 -2
- package/dist/chucao/{p-CIV5Gg1o.js → p-8l_6qAY9.js} +3 -3
- package/dist/chucao/p-8l_6qAY9.js.map +1 -0
- package/dist/chucao/{p-1e4cd3aa.entry.js → p-a5430e95.entry.js} +2 -2
- package/dist/chucao/{p-e77d35c3.entry.js → p-a7c66879.entry.js} +2 -2
- package/dist/chucao/p-b452d6cb.entry.js +2 -0
- package/dist/chucao/p-b7332faf.entry.js +2 -0
- package/dist/chucao/{p-60e1c1df.entry.js.map → p-b7332faf.entry.js.map} +1 -1
- package/dist/chucao/{p-42028c97.entry.js → p-f3d03388.entry.js} +2 -2
- package/dist/chucao/{p-7cdc71cc.entry.js → p-f925d45c.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ch-alert_8.cjs.entry.js +8 -8
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-cluster.cjs.entry.js +3 -3
- 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 +138 -0
- package/dist/cjs/ch-confirm-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-description-list.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-drawer.cjs.entry.js +2 -2
- package/dist/cjs/ch-emoji.cjs.entry.js +2 -2
- package/dist/cjs/ch-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/ch-grid.cjs.entry.js +2 -2
- package/dist/cjs/ch-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/ch-icon.cjs.entry.js +2 -2
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +2 -2
- package/dist/cjs/ch-number-input.cjs.entry.js +3 -3
- package/dist/cjs/ch-otp-input.cjs.entry.js +196 -0
- package/dist/cjs/ch-otp-input.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-page-header.cjs.entry.js +2 -2
- package/dist/cjs/ch-pagination.cjs.entry.js +67 -0
- package/dist/cjs/ch-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-radio.cjs.entry.js +2 -2
- package/dist/cjs/ch-segmented-control.cjs.entry.js +2 -2
- package/dist/cjs/ch-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ch-stack.cjs.entry.js +2 -2
- package/dist/cjs/ch-stat.cjs.entry.js +3 -3
- package/dist/cjs/ch-table.cjs.entry.js +2 -2
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ch-timeline.cjs.entry.js +2 -2
- package/dist/cjs/ch-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/chucao.cjs.js +2 -2
- package/dist/cjs/{index-ByZY6aTj.js → index-C6khqyw3.js} +19 -2
- package/dist/cjs/index-C6khqyw3.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -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.css +71 -0
- package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js +382 -0
- package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js.map +1 -0
- 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.css +86 -0
- package/dist/collection/components/ch-otp-input/ch-otp-input.js +478 -0
- package/dist/collection/components/ch-otp-input/ch-otp-input.js.map +1 -0
- package/dist/collection/components/ch-page-header/ch-page-header.js +1 -1
- package/dist/collection/components/ch-pagination/ch-pagination.css +63 -0
- package/dist/collection/components/ch-pagination/ch-pagination.js +228 -0
- package/dist/collection/components/ch-pagination/ch-pagination.js.map +1 -0
- 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.d.ts +11 -0
- package/dist/components/ch-confirm-dialog.js +2 -0
- package/dist/components/ch-confirm-dialog.js.map +1 -0
- 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-modal.js.map +1 -1
- package/dist/components/ch-number-input.js +1 -1
- package/dist/components/ch-otp-input.d.ts +11 -0
- package/dist/components/ch-otp-input.js +2 -0
- package/dist/components/ch-otp-input.js.map +1 -0
- package/dist/components/ch-page-header.js +1 -1
- package/dist/components/ch-pagination.d.ts +11 -0
- package/dist/components/ch-pagination.js +2 -0
- package/dist/components/ch-pagination.js.map +1 -0
- 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-DiUN1WGc.js → p-CuSstsTP.js} +2 -2
- package/dist/components/p-MBLhKofG.js +2 -0
- package/dist/components/p-MBLhKofG.js.map +1 -0
- package/dist/components/p-qP_9qshx.js.map +1 -1
- package/dist/esm/ch-accordion.entry.js +2 -2
- package/dist/esm/ch-alert_8.entry.js +8 -8
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-cluster.entry.js +3 -3
- 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 +136 -0
- package/dist/esm/ch-confirm-dialog.entry.js.map +1 -0
- package/dist/esm/ch-description-list.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-drawer.entry.js +2 -2
- package/dist/esm/ch-emoji.entry.js +2 -2
- package/dist/esm/ch-empty-state.entry.js +2 -2
- package/dist/esm/ch-grid.entry.js +2 -2
- package/dist/esm/ch-icon-button.entry.js +2 -2
- package/dist/esm/ch-icon.entry.js +2 -2
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +2 -2
- package/dist/esm/ch-number-input.entry.js +3 -3
- package/dist/esm/ch-otp-input.entry.js +194 -0
- package/dist/esm/ch-otp-input.entry.js.map +1 -0
- package/dist/esm/ch-page-header.entry.js +2 -2
- package/dist/esm/ch-pagination.entry.js +65 -0
- package/dist/esm/ch-pagination.entry.js.map +1 -0
- package/dist/esm/ch-radio.entry.js +2 -2
- package/dist/esm/ch-segmented-control.entry.js +2 -2
- package/dist/esm/ch-skeleton.entry.js +2 -2
- package/dist/esm/ch-stack.entry.js +2 -2
- package/dist/esm/ch-stat.entry.js +3 -3
- package/dist/esm/ch-table.entry.js +2 -2
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/ch-timeline.entry.js +2 -2
- package/dist/esm/ch-tooltip.entry.js +3 -3
- package/dist/esm/chucao.js +3 -3
- package/dist/esm/{index-CIV5Gg1o.js → index-8l_6qAY9.js} +19 -2
- package/dist/esm/index-8l_6qAY9.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-combobox/ch-combobox.d.ts +98 -0
- package/dist/types/components/ch-confirm-dialog/ch-confirm-dialog.d.ts +81 -0
- package/dist/types/components/ch-otp-input/ch-otp-input.d.ts +79 -0
- package/dist/types/components/ch-pagination/ch-pagination.d.ts +44 -0
- package/dist/types/components.d.ts +757 -0
- package/dist-react/components.d.ts +27 -1
- package/dist-react/components.js +45 -0
- package/dist-react/components.ts +67 -1
- package/dist-vue/index.d.ts +4 -0
- package/dist-vue/index.js +67 -0
- package/dist-vue/index.ts +75 -0
- package/hydrate/index.js +855 -35
- package/hydrate/index.mjs +855 -35
- package/package.json +17 -1
- package/dist/chucao/p-60e1c1df.entry.js +0 -2
- package/dist/chucao/p-9db118d9.entry.js +0 -2
- package/dist/chucao/p-CIV5Gg1o.js.map +0 -1
- package/dist/chucao/p-deb2571b.entry.js +0 -2
- package/dist/cjs/index-ByZY6aTj.js.map +0 -1
- package/dist/esm/index-CIV5Gg1o.js.map +0 -1
- /package/dist/chucao/{p-01b6c7bf.entry.js.map → p-03acf096.entry.js.map} +0 -0
- /package/dist/chucao/{p-10f6801e.entry.js.map → p-0ce2b15d.entry.js.map} +0 -0
- /package/dist/chucao/{p-f917d34f.entry.js.map → p-12043dc1.entry.js.map} +0 -0
- /package/dist/chucao/{p-0c7f6f8d.entry.js.map → p-244d8e96.entry.js.map} +0 -0
- /package/dist/chucao/{p-a7c674b7.entry.js.map → p-29841714.entry.js.map} +0 -0
- /package/dist/chucao/{p-ffecdf25.entry.js.map → p-302ec527.entry.js.map} +0 -0
- /package/dist/chucao/{p-337d7f68.entry.js.map → p-51f6327c.entry.js.map} +0 -0
- /package/dist/chucao/{p-1b70e3f1.entry.js.map → p-5a62951e.entry.js.map} +0 -0
- /package/dist/chucao/{p-472ec451.entry.js.map → p-5d0ac17a.entry.js.map} +0 -0
- /package/dist/chucao/{p-d8b71751.entry.js.map → p-5e0e1012.entry.js.map} +0 -0
- /package/dist/chucao/{p-15d27bb7.entry.js.map → p-61a94a4e.entry.js.map} +0 -0
- /package/dist/chucao/{p-c4b2bd1f.entry.js.map → p-67f0fc77.entry.js.map} +0 -0
- /package/dist/chucao/{p-5240f5ac.entry.js.map → p-68e4a129.entry.js.map} +0 -0
- /package/dist/chucao/{p-2e37c61b.entry.js.map → p-6e345b3f.entry.js.map} +0 -0
- /package/dist/chucao/{p-f6ab0a11.entry.js.map → p-72d4dacf.entry.js.map} +0 -0
- /package/dist/chucao/{p-8ae680a4.entry.js.map → p-74d9b7e5.entry.js.map} +0 -0
- /package/dist/chucao/{p-c90da3c0.entry.js.map → p-79e8c10b.entry.js.map} +0 -0
- /package/dist/chucao/{p-90284ebe.entry.js.map → p-7e13f725.entry.js.map} +0 -0
- /package/dist/chucao/{p-9ebcc7be.entry.js.map → p-8b23d072.entry.js.map} +0 -0
- /package/dist/chucao/{p-1e4cd3aa.entry.js.map → p-a5430e95.entry.js.map} +0 -0
- /package/dist/chucao/{p-e77d35c3.entry.js.map → p-a7c66879.entry.js.map} +0 -0
- /package/dist/chucao/{p-9db118d9.entry.js.map → p-b452d6cb.entry.js.map} +0 -0
- /package/dist/chucao/{p-42028c97.entry.js.map → p-f3d03388.entry.js.map} +0 -0
- /package/dist/chucao/{p-7cdc71cc.entry.js.map → p-f925d45c.entry.js.map} +0 -0
- /package/dist/components/{p-DiUN1WGc.js.map → p-CuSstsTP.js.map} +0 -0
|
@@ -10,6 +10,8 @@ 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";
|
|
14
|
+
import { ChConfirmDialogTone } from "./components/ch-confirm-dialog/ch-confirm-dialog";
|
|
13
15
|
import { ChDescriptionListColumns } from "./components/ch-description-list/ch-description-list";
|
|
14
16
|
import { ChDividerOrientation } from "./components/ch-divider/ch-divider";
|
|
15
17
|
import { ChDrawerSide } from "./components/ch-drawer/ch-drawer";
|
|
@@ -23,6 +25,7 @@ import { ChLinkVariant } from "./components/ch-link/ch-link";
|
|
|
23
25
|
import { ChModalSize } from "./components/ch-modal/ch-modal";
|
|
24
26
|
import { ChNumberInputFormat, ChNumberInputStep } from "./components/ch-number-input/ch-number-input";
|
|
25
27
|
import { ChPageHeaderHeadingLevel } from "./components/ch-page-header/ch-page-header";
|
|
28
|
+
import { ChPaginationSize } from "./components/ch-pagination/ch-pagination";
|
|
26
29
|
import { ChRadioOption } from "./components/ch-radio/ch-radio";
|
|
27
30
|
import { ChSegmentedControlOption, ChSegmentedControlSize } from "./components/ch-segmented-control/ch-segmented-control";
|
|
28
31
|
import { ChSelectOption } from "./components/ch-select/ch-select";
|
|
@@ -38,6 +41,8 @@ export { ChAlertVariant } from "./components/ch-alert/ch-alert";
|
|
|
38
41
|
export { ChBadgeVariant } from "./components/ch-badge/ch-badge";
|
|
39
42
|
export { ChButtonSize, ChButtonVariant } from "./components/ch-button/ch-button";
|
|
40
43
|
export { ChClusterAlign, ChClusterGap, ChClusterJustify } from "./components/ch-cluster/ch-cluster";
|
|
44
|
+
export { ChComboboxOption } from "./components/ch-combobox/ch-combobox";
|
|
45
|
+
export { ChConfirmDialogTone } from "./components/ch-confirm-dialog/ch-confirm-dialog";
|
|
41
46
|
export { ChDescriptionListColumns } from "./components/ch-description-list/ch-description-list";
|
|
42
47
|
export { ChDividerOrientation } from "./components/ch-divider/ch-divider";
|
|
43
48
|
export { ChDrawerSide } from "./components/ch-drawer/ch-drawer";
|
|
@@ -51,6 +56,7 @@ export { ChLinkVariant } from "./components/ch-link/ch-link";
|
|
|
51
56
|
export { ChModalSize } from "./components/ch-modal/ch-modal";
|
|
52
57
|
export { ChNumberInputFormat, ChNumberInputStep } from "./components/ch-number-input/ch-number-input";
|
|
53
58
|
export { ChPageHeaderHeadingLevel } from "./components/ch-page-header/ch-page-header";
|
|
59
|
+
export { ChPaginationSize } from "./components/ch-pagination/ch-pagination";
|
|
54
60
|
export { ChRadioOption } from "./components/ch-radio/ch-radio";
|
|
55
61
|
export { ChSegmentedControlOption, ChSegmentedControlSize } from "./components/ch-segmented-control/ch-segmented-control";
|
|
56
62
|
export { ChSelectOption } from "./components/ch-select/ch-select";
|
|
@@ -225,6 +231,130 @@ export namespace Components {
|
|
|
225
231
|
*/
|
|
226
232
|
"wrap": boolean;
|
|
227
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
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A confirmation dialog over `ch-modal`.
|
|
301
|
+
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
302
|
+
* The imperative `confirm()` helper is a separate concern and a separate issue,
|
|
303
|
+
* because a promise-returning helper has to own mounting, focus and unhandled
|
|
304
|
+
* rejection, none of which a component should decide for its consumer.
|
|
305
|
+
* The guarantees this adds over a plain `ch-modal` are the ones that make a
|
|
306
|
+
* confirmation safe:
|
|
307
|
+
* - exactly one outcome per interaction — a double click on Confirm emits once;
|
|
308
|
+
* - every dismissal path (Cancel, Escape, backdrop, confirm) is reported, so a
|
|
309
|
+
* consumer awaiting an answer cannot hang;
|
|
310
|
+
* - focus lands on Cancel for a destructive action, so the absent-minded Enter
|
|
311
|
+
* does not destroy anything;
|
|
312
|
+
* - `pending` is not a cancellation: a slow request keeps the dialog open.
|
|
313
|
+
*/
|
|
314
|
+
interface ChConfirmDialog {
|
|
315
|
+
/**
|
|
316
|
+
* Label of the dismissing action.
|
|
317
|
+
* @default 'Cancel'
|
|
318
|
+
*/
|
|
319
|
+
"cancelLabel": string;
|
|
320
|
+
/**
|
|
321
|
+
* Label of the confirming action.
|
|
322
|
+
* @default 'Confirm'
|
|
323
|
+
*/
|
|
324
|
+
"confirmLabel": string;
|
|
325
|
+
/**
|
|
326
|
+
* Whether Escape and the backdrop dismiss the dialog. When false, the only way out is one of the two buttons — use it only for a decision that must be answered rather than abandoned.
|
|
327
|
+
* @default true
|
|
328
|
+
*/
|
|
329
|
+
"dismissible": boolean;
|
|
330
|
+
/**
|
|
331
|
+
* Focus the safe action. Exposed so a consumer can return focus deliberately after a request settles.
|
|
332
|
+
*/
|
|
333
|
+
"focusCancel": () => Promise<void>;
|
|
334
|
+
/**
|
|
335
|
+
* The question, set as the dialog's accessible name. Required: a dialog without a name is announced as an unlabelled group.
|
|
336
|
+
*/
|
|
337
|
+
"heading": string;
|
|
338
|
+
/**
|
|
339
|
+
* Supporting text, rendered under the heading.
|
|
340
|
+
*/
|
|
341
|
+
"message"?: string;
|
|
342
|
+
/**
|
|
343
|
+
* Whether the dialog is open. Kept in sync when it is dismissed.
|
|
344
|
+
* @default false
|
|
345
|
+
*/
|
|
346
|
+
"open": boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Whether the confirm action is in flight; both buttons are then disabled.
|
|
349
|
+
* @default false
|
|
350
|
+
*/
|
|
351
|
+
"pending": boolean;
|
|
352
|
+
/**
|
|
353
|
+
* `danger` styles the confirm action as destructive and moves the initial focus to Cancel, so the safe choice is the default one.
|
|
354
|
+
* @default 'default'
|
|
355
|
+
*/
|
|
356
|
+
"tone": ChConfirmDialogTone;
|
|
357
|
+
}
|
|
228
358
|
/**
|
|
229
359
|
* Label/value pairs for detail views, on a native `<dl>`.
|
|
230
360
|
* The component renders the `<dl>` and the layout; the consumer writes the
|
|
@@ -589,6 +719,73 @@ export namespace Components {
|
|
|
589
719
|
*/
|
|
590
720
|
"value": string;
|
|
591
721
|
}
|
|
722
|
+
/**
|
|
723
|
+
* One-time-code input.
|
|
724
|
+
* One native `<input>` holds the whole code, not a box per digit. Per-digit
|
|
725
|
+
* inputs break paste, break SMS autofill (the platform fills a single field
|
|
726
|
+
* carrying `autocomplete="one-time-code"`), and give a keyboard user several
|
|
727
|
+
* tab stops for what is one value. The segmented look is drawn by the shadow
|
|
728
|
+
* CSS over the single field.
|
|
729
|
+
* It never submits on completion: a code entered is not a decision to send it,
|
|
730
|
+
* so the consumer listens to `chComplete` and submits when it decides to.
|
|
731
|
+
*/
|
|
732
|
+
interface ChOtpInput {
|
|
733
|
+
/**
|
|
734
|
+
* Whether the field is disabled.
|
|
735
|
+
* @default false
|
|
736
|
+
*/
|
|
737
|
+
"disabled": boolean;
|
|
738
|
+
/**
|
|
739
|
+
* Custom error message; wins over the built-in incomplete-code message.
|
|
740
|
+
*/
|
|
741
|
+
"errorMessage"?: string;
|
|
742
|
+
/**
|
|
743
|
+
* Helper text, replaced by `errorMessage` when invalid.
|
|
744
|
+
*/
|
|
745
|
+
"hint"?: string;
|
|
746
|
+
/**
|
|
747
|
+
* `numeric` restricts input to digits, which is the shape of nearly every one-time code and lets a phone open the number pad.
|
|
748
|
+
* @default 'numeric'
|
|
749
|
+
*/
|
|
750
|
+
"inputMode": 'numeric' | 'text';
|
|
751
|
+
/**
|
|
752
|
+
* Whether the field is marked invalid by the consumer.
|
|
753
|
+
* @default false
|
|
754
|
+
*/
|
|
755
|
+
"invalid": boolean;
|
|
756
|
+
/**
|
|
757
|
+
* Visible label, associated with the input via `for`/`id`.
|
|
758
|
+
*/
|
|
759
|
+
"label"?: string;
|
|
760
|
+
/**
|
|
761
|
+
* How many characters make a complete code.
|
|
762
|
+
* @default 6
|
|
763
|
+
*/
|
|
764
|
+
"length": number;
|
|
765
|
+
/**
|
|
766
|
+
* Name submitted with the form.
|
|
767
|
+
*/
|
|
768
|
+
"name"?: string;
|
|
769
|
+
/**
|
|
770
|
+
* Placeholder shown when empty.
|
|
771
|
+
*/
|
|
772
|
+
"placeholder"?: string;
|
|
773
|
+
/**
|
|
774
|
+
* Whether a complete code is required for the field to be valid.
|
|
775
|
+
* @default false
|
|
776
|
+
*/
|
|
777
|
+
"required": boolean;
|
|
778
|
+
/**
|
|
779
|
+
* Whether the codes are masked, as for a short-lived secret.
|
|
780
|
+
* @default false
|
|
781
|
+
*/
|
|
782
|
+
"secret": boolean;
|
|
783
|
+
/**
|
|
784
|
+
* The code without separators. Filtered to alphanumerics on every change.
|
|
785
|
+
* @default ''
|
|
786
|
+
*/
|
|
787
|
+
"value": string;
|
|
788
|
+
}
|
|
592
789
|
/**
|
|
593
790
|
* The heading block at the top of a page: title, optional eyebrow and
|
|
594
791
|
* description, and a trailing actions area.
|
|
@@ -623,6 +820,51 @@ export namespace Components {
|
|
|
623
820
|
*/
|
|
624
821
|
"title": string;
|
|
625
822
|
}
|
|
823
|
+
/**
|
|
824
|
+
* Controlled pagination for a known total.
|
|
825
|
+
* It holds no page state: `page` and `pageSize` come from the consumer and
|
|
826
|
+
* every action emits `chPageChange` with the page it wants. That matches
|
|
827
|
+
* `ch-table`, so a consumer wiring the two together has one model to reason
|
|
828
|
+
* about — the table shows the rows for `page`, the pagination asks for the
|
|
829
|
+
* next one, and nothing moves until the consumer's data does.
|
|
830
|
+
* No numbered page list. A list of numbers is wrong more often than it is
|
|
831
|
+
* right (it depends on how many pages fit, which depends on the font, the
|
|
832
|
+
* locale and the container), and it is the part consumers most often need to
|
|
833
|
+
* replace with their own. Prev/next plus a position summary covers the
|
|
834
|
+
* default case; the summary is what tells a screen-reader user where they are.
|
|
835
|
+
*/
|
|
836
|
+
interface ChPagination {
|
|
837
|
+
/**
|
|
838
|
+
* Whether the whole control is disabled.
|
|
839
|
+
* @default false
|
|
840
|
+
*/
|
|
841
|
+
"disabled": boolean;
|
|
842
|
+
/**
|
|
843
|
+
* Accessible name for the navigation landmark.
|
|
844
|
+
* @default 'Pagination'
|
|
845
|
+
*/
|
|
846
|
+
"label": string;
|
|
847
|
+
/**
|
|
848
|
+
* The current page, 1-based. Controlled by the consumer.
|
|
849
|
+
* @default 1
|
|
850
|
+
*/
|
|
851
|
+
"page": number;
|
|
852
|
+
/**
|
|
853
|
+
* How many rows a page holds. Controlled by the consumer.
|
|
854
|
+
* @default 10
|
|
855
|
+
*/
|
|
856
|
+
"pageSize": number;
|
|
857
|
+
/**
|
|
858
|
+
* Size of the controls.
|
|
859
|
+
* @default 'md'
|
|
860
|
+
*/
|
|
861
|
+
"size": ChPaginationSize;
|
|
862
|
+
/**
|
|
863
|
+
* How many rows exist in total. Zero renders a disabled, empty pager.
|
|
864
|
+
* @default 0
|
|
865
|
+
*/
|
|
866
|
+
"total": number;
|
|
867
|
+
}
|
|
626
868
|
interface ChRadio {
|
|
627
869
|
/**
|
|
628
870
|
* Whether all radios in the group are disabled.
|
|
@@ -1103,6 +1345,14 @@ export interface ChCheckboxCustomEvent<T> extends CustomEvent<T> {
|
|
|
1103
1345
|
detail: T;
|
|
1104
1346
|
target: HTMLChCheckboxElement;
|
|
1105
1347
|
}
|
|
1348
|
+
export interface ChComboboxCustomEvent<T> extends CustomEvent<T> {
|
|
1349
|
+
detail: T;
|
|
1350
|
+
target: HTMLChComboboxElement;
|
|
1351
|
+
}
|
|
1352
|
+
export interface ChConfirmDialogCustomEvent<T> extends CustomEvent<T> {
|
|
1353
|
+
detail: T;
|
|
1354
|
+
target: HTMLChConfirmDialogElement;
|
|
1355
|
+
}
|
|
1106
1356
|
export interface ChDrawerCustomEvent<T> extends CustomEvent<T> {
|
|
1107
1357
|
detail: T;
|
|
1108
1358
|
target: HTMLChDrawerElement;
|
|
@@ -1127,6 +1377,14 @@ export interface ChNumberInputCustomEvent<T> extends CustomEvent<T> {
|
|
|
1127
1377
|
detail: T;
|
|
1128
1378
|
target: HTMLChNumberInputElement;
|
|
1129
1379
|
}
|
|
1380
|
+
export interface ChOtpInputCustomEvent<T> extends CustomEvent<T> {
|
|
1381
|
+
detail: T;
|
|
1382
|
+
target: HTMLChOtpInputElement;
|
|
1383
|
+
}
|
|
1384
|
+
export interface ChPaginationCustomEvent<T> extends CustomEvent<T> {
|
|
1385
|
+
detail: T;
|
|
1386
|
+
target: HTMLChPaginationElement;
|
|
1387
|
+
}
|
|
1130
1388
|
export interface ChRadioCustomEvent<T> extends CustomEvent<T> {
|
|
1131
1389
|
detail: T;
|
|
1132
1390
|
target: HTMLChRadioElement;
|
|
@@ -1265,6 +1523,71 @@ declare global {
|
|
|
1265
1523
|
prototype: HTMLChClusterElement;
|
|
1266
1524
|
new (): HTMLChClusterElement;
|
|
1267
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
|
+
};
|
|
1558
|
+
interface HTMLChConfirmDialogElementEventMap {
|
|
1559
|
+
"chConfirm": void;
|
|
1560
|
+
"chCancel": void;
|
|
1561
|
+
}
|
|
1562
|
+
/**
|
|
1563
|
+
* A confirmation dialog over `ch-modal`.
|
|
1564
|
+
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
1565
|
+
* The imperative `confirm()` helper is a separate concern and a separate issue,
|
|
1566
|
+
* because a promise-returning helper has to own mounting, focus and unhandled
|
|
1567
|
+
* rejection, none of which a component should decide for its consumer.
|
|
1568
|
+
* The guarantees this adds over a plain `ch-modal` are the ones that make a
|
|
1569
|
+
* confirmation safe:
|
|
1570
|
+
* - exactly one outcome per interaction — a double click on Confirm emits once;
|
|
1571
|
+
* - every dismissal path (Cancel, Escape, backdrop, confirm) is reported, so a
|
|
1572
|
+
* consumer awaiting an answer cannot hang;
|
|
1573
|
+
* - focus lands on Cancel for a destructive action, so the absent-minded Enter
|
|
1574
|
+
* does not destroy anything;
|
|
1575
|
+
* - `pending` is not a cancellation: a slow request keeps the dialog open.
|
|
1576
|
+
*/
|
|
1577
|
+
interface HTMLChConfirmDialogElement extends Components.ChConfirmDialog, HTMLStencilElement {
|
|
1578
|
+
addEventListener<K extends keyof HTMLChConfirmDialogElementEventMap>(type: K, listener: (this: HTMLChConfirmDialogElement, ev: ChConfirmDialogCustomEvent<HTMLChConfirmDialogElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1579
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1580
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1581
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1582
|
+
removeEventListener<K extends keyof HTMLChConfirmDialogElementEventMap>(type: K, listener: (this: HTMLChConfirmDialogElement, ev: ChConfirmDialogCustomEvent<HTMLChConfirmDialogElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1583
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1584
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1585
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1586
|
+
}
|
|
1587
|
+
var HTMLChConfirmDialogElement: {
|
|
1588
|
+
prototype: HTMLChConfirmDialogElement;
|
|
1589
|
+
new (): HTMLChConfirmDialogElement;
|
|
1590
|
+
};
|
|
1268
1591
|
/**
|
|
1269
1592
|
* Label/value pairs for detail views, on a native `<dl>`.
|
|
1270
1593
|
* The component renders the `<dl>` and the layout; the consumer writes the
|
|
@@ -1499,6 +1822,34 @@ declare global {
|
|
|
1499
1822
|
prototype: HTMLChNumberInputElement;
|
|
1500
1823
|
new (): HTMLChNumberInputElement;
|
|
1501
1824
|
};
|
|
1825
|
+
interface HTMLChOtpInputElementEventMap {
|
|
1826
|
+
"chInput": string;
|
|
1827
|
+
"chComplete": string;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* One-time-code input.
|
|
1831
|
+
* One native `<input>` holds the whole code, not a box per digit. Per-digit
|
|
1832
|
+
* inputs break paste, break SMS autofill (the platform fills a single field
|
|
1833
|
+
* carrying `autocomplete="one-time-code"`), and give a keyboard user several
|
|
1834
|
+
* tab stops for what is one value. The segmented look is drawn by the shadow
|
|
1835
|
+
* CSS over the single field.
|
|
1836
|
+
* It never submits on completion: a code entered is not a decision to send it,
|
|
1837
|
+
* so the consumer listens to `chComplete` and submits when it decides to.
|
|
1838
|
+
*/
|
|
1839
|
+
interface HTMLChOtpInputElement extends Components.ChOtpInput, HTMLStencilElement {
|
|
1840
|
+
addEventListener<K extends keyof HTMLChOtpInputElementEventMap>(type: K, listener: (this: HTMLChOtpInputElement, ev: ChOtpInputCustomEvent<HTMLChOtpInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1841
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1842
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1843
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1844
|
+
removeEventListener<K extends keyof HTMLChOtpInputElementEventMap>(type: K, listener: (this: HTMLChOtpInputElement, ev: ChOtpInputCustomEvent<HTMLChOtpInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1845
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1846
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1847
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1848
|
+
}
|
|
1849
|
+
var HTMLChOtpInputElement: {
|
|
1850
|
+
prototype: HTMLChOtpInputElement;
|
|
1851
|
+
new (): HTMLChOtpInputElement;
|
|
1852
|
+
};
|
|
1502
1853
|
/**
|
|
1503
1854
|
* The heading block at the top of a page: title, optional eyebrow and
|
|
1504
1855
|
* description, and a trailing actions area.
|
|
@@ -1515,6 +1866,36 @@ declare global {
|
|
|
1515
1866
|
prototype: HTMLChPageHeaderElement;
|
|
1516
1867
|
new (): HTMLChPageHeaderElement;
|
|
1517
1868
|
};
|
|
1869
|
+
interface HTMLChPaginationElementEventMap {
|
|
1870
|
+
"chPageChange": { page: number; pageSize: number };
|
|
1871
|
+
}
|
|
1872
|
+
/**
|
|
1873
|
+
* Controlled pagination for a known total.
|
|
1874
|
+
* It holds no page state: `page` and `pageSize` come from the consumer and
|
|
1875
|
+
* every action emits `chPageChange` with the page it wants. That matches
|
|
1876
|
+
* `ch-table`, so a consumer wiring the two together has one model to reason
|
|
1877
|
+
* about — the table shows the rows for `page`, the pagination asks for the
|
|
1878
|
+
* next one, and nothing moves until the consumer's data does.
|
|
1879
|
+
* No numbered page list. A list of numbers is wrong more often than it is
|
|
1880
|
+
* right (it depends on how many pages fit, which depends on the font, the
|
|
1881
|
+
* locale and the container), and it is the part consumers most often need to
|
|
1882
|
+
* replace with their own. Prev/next plus a position summary covers the
|
|
1883
|
+
* default case; the summary is what tells a screen-reader user where they are.
|
|
1884
|
+
*/
|
|
1885
|
+
interface HTMLChPaginationElement extends Components.ChPagination, HTMLStencilElement {
|
|
1886
|
+
addEventListener<K extends keyof HTMLChPaginationElementEventMap>(type: K, listener: (this: HTMLChPaginationElement, ev: ChPaginationCustomEvent<HTMLChPaginationElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1887
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1888
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1889
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1890
|
+
removeEventListener<K extends keyof HTMLChPaginationElementEventMap>(type: K, listener: (this: HTMLChPaginationElement, ev: ChPaginationCustomEvent<HTMLChPaginationElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1891
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1892
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1893
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1894
|
+
}
|
|
1895
|
+
var HTMLChPaginationElement: {
|
|
1896
|
+
prototype: HTMLChPaginationElement;
|
|
1897
|
+
new (): HTMLChPaginationElement;
|
|
1898
|
+
};
|
|
1518
1899
|
interface HTMLChRadioElementEventMap {
|
|
1519
1900
|
"chChange": string;
|
|
1520
1901
|
}
|
|
@@ -1802,6 +2183,8 @@ declare global {
|
|
|
1802
2183
|
"ch-card": HTMLChCardElement;
|
|
1803
2184
|
"ch-checkbox": HTMLChCheckboxElement;
|
|
1804
2185
|
"ch-cluster": HTMLChClusterElement;
|
|
2186
|
+
"ch-combobox": HTMLChComboboxElement;
|
|
2187
|
+
"ch-confirm-dialog": HTMLChConfirmDialogElement;
|
|
1805
2188
|
"ch-description-list": HTMLChDescriptionListElement;
|
|
1806
2189
|
"ch-divider": HTMLChDividerElement;
|
|
1807
2190
|
"ch-drawer": HTMLChDrawerElement;
|
|
@@ -1814,7 +2197,9 @@ declare global {
|
|
|
1814
2197
|
"ch-link": HTMLChLinkElement;
|
|
1815
2198
|
"ch-modal": HTMLChModalElement;
|
|
1816
2199
|
"ch-number-input": HTMLChNumberInputElement;
|
|
2200
|
+
"ch-otp-input": HTMLChOtpInputElement;
|
|
1817
2201
|
"ch-page-header": HTMLChPageHeaderElement;
|
|
2202
|
+
"ch-pagination": HTMLChPaginationElement;
|
|
1818
2203
|
"ch-radio": HTMLChRadioElement;
|
|
1819
2204
|
"ch-segmented-control": HTMLChSegmentedControlElement;
|
|
1820
2205
|
"ch-select": HTMLChSelectElement;
|
|
@@ -2016,6 +2401,146 @@ declare namespace LocalJSX {
|
|
|
2016
2401
|
*/
|
|
2017
2402
|
"wrap"?: boolean;
|
|
2018
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
|
+
}
|
|
2481
|
+
/**
|
|
2482
|
+
* A confirmation dialog over `ch-modal`.
|
|
2483
|
+
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
2484
|
+
* The imperative `confirm()` helper is a separate concern and a separate issue,
|
|
2485
|
+
* because a promise-returning helper has to own mounting, focus and unhandled
|
|
2486
|
+
* rejection, none of which a component should decide for its consumer.
|
|
2487
|
+
* The guarantees this adds over a plain `ch-modal` are the ones that make a
|
|
2488
|
+
* confirmation safe:
|
|
2489
|
+
* - exactly one outcome per interaction — a double click on Confirm emits once;
|
|
2490
|
+
* - every dismissal path (Cancel, Escape, backdrop, confirm) is reported, so a
|
|
2491
|
+
* consumer awaiting an answer cannot hang;
|
|
2492
|
+
* - focus lands on Cancel for a destructive action, so the absent-minded Enter
|
|
2493
|
+
* does not destroy anything;
|
|
2494
|
+
* - `pending` is not a cancellation: a slow request keeps the dialog open.
|
|
2495
|
+
*/
|
|
2496
|
+
interface ChConfirmDialog {
|
|
2497
|
+
/**
|
|
2498
|
+
* Label of the dismissing action.
|
|
2499
|
+
* @default 'Cancel'
|
|
2500
|
+
*/
|
|
2501
|
+
"cancelLabel"?: string;
|
|
2502
|
+
/**
|
|
2503
|
+
* Label of the confirming action.
|
|
2504
|
+
* @default 'Confirm'
|
|
2505
|
+
*/
|
|
2506
|
+
"confirmLabel"?: string;
|
|
2507
|
+
/**
|
|
2508
|
+
* Whether Escape and the backdrop dismiss the dialog. When false, the only way out is one of the two buttons — use it only for a decision that must be answered rather than abandoned.
|
|
2509
|
+
* @default true
|
|
2510
|
+
*/
|
|
2511
|
+
"dismissible"?: boolean;
|
|
2512
|
+
/**
|
|
2513
|
+
* The question, set as the dialog's accessible name. Required: a dialog without a name is announced as an unlabelled group.
|
|
2514
|
+
*/
|
|
2515
|
+
"heading": string;
|
|
2516
|
+
/**
|
|
2517
|
+
* Supporting text, rendered under the heading.
|
|
2518
|
+
*/
|
|
2519
|
+
"message"?: string;
|
|
2520
|
+
/**
|
|
2521
|
+
* Emitted once when the dialog is dismissed without confirming.
|
|
2522
|
+
*/
|
|
2523
|
+
"onChCancel"?: (event: ChConfirmDialogCustomEvent<void>) => void;
|
|
2524
|
+
/**
|
|
2525
|
+
* Emitted once when the user confirms.
|
|
2526
|
+
*/
|
|
2527
|
+
"onChConfirm"?: (event: ChConfirmDialogCustomEvent<void>) => void;
|
|
2528
|
+
/**
|
|
2529
|
+
* Whether the dialog is open. Kept in sync when it is dismissed.
|
|
2530
|
+
* @default false
|
|
2531
|
+
*/
|
|
2532
|
+
"open"?: boolean;
|
|
2533
|
+
/**
|
|
2534
|
+
* Whether the confirm action is in flight; both buttons are then disabled.
|
|
2535
|
+
* @default false
|
|
2536
|
+
*/
|
|
2537
|
+
"pending"?: boolean;
|
|
2538
|
+
/**
|
|
2539
|
+
* `danger` styles the confirm action as destructive and moves the initial focus to Cancel, so the safe choice is the default one.
|
|
2540
|
+
* @default 'default'
|
|
2541
|
+
*/
|
|
2542
|
+
"tone"?: ChConfirmDialogTone;
|
|
2543
|
+
}
|
|
2019
2544
|
/**
|
|
2020
2545
|
* Label/value pairs for detail views, on a native `<dl>`.
|
|
2021
2546
|
* The component renders the `<dl>` and the layout; the consumer writes the
|
|
@@ -2428,6 +2953,85 @@ declare namespace LocalJSX {
|
|
|
2428
2953
|
*/
|
|
2429
2954
|
"value"?: string;
|
|
2430
2955
|
}
|
|
2956
|
+
/**
|
|
2957
|
+
* One-time-code input.
|
|
2958
|
+
* One native `<input>` holds the whole code, not a box per digit. Per-digit
|
|
2959
|
+
* inputs break paste, break SMS autofill (the platform fills a single field
|
|
2960
|
+
* carrying `autocomplete="one-time-code"`), and give a keyboard user several
|
|
2961
|
+
* tab stops for what is one value. The segmented look is drawn by the shadow
|
|
2962
|
+
* CSS over the single field.
|
|
2963
|
+
* It never submits on completion: a code entered is not a decision to send it,
|
|
2964
|
+
* so the consumer listens to `chComplete` and submits when it decides to.
|
|
2965
|
+
*/
|
|
2966
|
+
interface ChOtpInput {
|
|
2967
|
+
/**
|
|
2968
|
+
* Whether the field is disabled.
|
|
2969
|
+
* @default false
|
|
2970
|
+
*/
|
|
2971
|
+
"disabled"?: boolean;
|
|
2972
|
+
/**
|
|
2973
|
+
* Custom error message; wins over the built-in incomplete-code message.
|
|
2974
|
+
*/
|
|
2975
|
+
"errorMessage"?: string;
|
|
2976
|
+
/**
|
|
2977
|
+
* The `id` of a `<form>` element to associate this element with.
|
|
2978
|
+
*/
|
|
2979
|
+
"form"?: string;
|
|
2980
|
+
/**
|
|
2981
|
+
* Helper text, replaced by `errorMessage` when invalid.
|
|
2982
|
+
*/
|
|
2983
|
+
"hint"?: string;
|
|
2984
|
+
/**
|
|
2985
|
+
* `numeric` restricts input to digits, which is the shape of nearly every one-time code and lets a phone open the number pad.
|
|
2986
|
+
* @default 'numeric'
|
|
2987
|
+
*/
|
|
2988
|
+
"inputMode"?: 'numeric' | 'text';
|
|
2989
|
+
/**
|
|
2990
|
+
* Whether the field is marked invalid by the consumer.
|
|
2991
|
+
* @default false
|
|
2992
|
+
*/
|
|
2993
|
+
"invalid"?: boolean;
|
|
2994
|
+
/**
|
|
2995
|
+
* Visible label, associated with the input via `for`/`id`.
|
|
2996
|
+
*/
|
|
2997
|
+
"label"?: string;
|
|
2998
|
+
/**
|
|
2999
|
+
* How many characters make a complete code.
|
|
3000
|
+
* @default 6
|
|
3001
|
+
*/
|
|
3002
|
+
"length"?: number;
|
|
3003
|
+
/**
|
|
3004
|
+
* Name submitted with the form.
|
|
3005
|
+
*/
|
|
3006
|
+
"name"?: string;
|
|
3007
|
+
/**
|
|
3008
|
+
* Emitted once, when the code becomes complete and valid after not being so. Never fires again while it stays complete, so holding a code cannot resubmit it.
|
|
3009
|
+
*/
|
|
3010
|
+
"onChComplete"?: (event: ChOtpInputCustomEvent<string>) => void;
|
|
3011
|
+
/**
|
|
3012
|
+
* Emitted on every change with the current (possibly partial) code.
|
|
3013
|
+
*/
|
|
3014
|
+
"onChInput"?: (event: ChOtpInputCustomEvent<string>) => void;
|
|
3015
|
+
/**
|
|
3016
|
+
* Placeholder shown when empty.
|
|
3017
|
+
*/
|
|
3018
|
+
"placeholder"?: string;
|
|
3019
|
+
/**
|
|
3020
|
+
* Whether a complete code is required for the field to be valid.
|
|
3021
|
+
* @default false
|
|
3022
|
+
*/
|
|
3023
|
+
"required"?: boolean;
|
|
3024
|
+
/**
|
|
3025
|
+
* Whether the codes are masked, as for a short-lived secret.
|
|
3026
|
+
* @default false
|
|
3027
|
+
*/
|
|
3028
|
+
"secret"?: boolean;
|
|
3029
|
+
/**
|
|
3030
|
+
* The code without separators. Filtered to alphanumerics on every change.
|
|
3031
|
+
* @default ''
|
|
3032
|
+
*/
|
|
3033
|
+
"value"?: string;
|
|
3034
|
+
}
|
|
2431
3035
|
/**
|
|
2432
3036
|
* The heading block at the top of a page: title, optional eyebrow and
|
|
2433
3037
|
* description, and a trailing actions area.
|
|
@@ -2462,6 +3066,55 @@ declare namespace LocalJSX {
|
|
|
2462
3066
|
*/
|
|
2463
3067
|
"title": string;
|
|
2464
3068
|
}
|
|
3069
|
+
/**
|
|
3070
|
+
* Controlled pagination for a known total.
|
|
3071
|
+
* It holds no page state: `page` and `pageSize` come from the consumer and
|
|
3072
|
+
* every action emits `chPageChange` with the page it wants. That matches
|
|
3073
|
+
* `ch-table`, so a consumer wiring the two together has one model to reason
|
|
3074
|
+
* about — the table shows the rows for `page`, the pagination asks for the
|
|
3075
|
+
* next one, and nothing moves until the consumer's data does.
|
|
3076
|
+
* No numbered page list. A list of numbers is wrong more often than it is
|
|
3077
|
+
* right (it depends on how many pages fit, which depends on the font, the
|
|
3078
|
+
* locale and the container), and it is the part consumers most often need to
|
|
3079
|
+
* replace with their own. Prev/next plus a position summary covers the
|
|
3080
|
+
* default case; the summary is what tells a screen-reader user where they are.
|
|
3081
|
+
*/
|
|
3082
|
+
interface ChPagination {
|
|
3083
|
+
/**
|
|
3084
|
+
* Whether the whole control is disabled.
|
|
3085
|
+
* @default false
|
|
3086
|
+
*/
|
|
3087
|
+
"disabled"?: boolean;
|
|
3088
|
+
/**
|
|
3089
|
+
* Accessible name for the navigation landmark.
|
|
3090
|
+
* @default 'Pagination'
|
|
3091
|
+
*/
|
|
3092
|
+
"label"?: string;
|
|
3093
|
+
/**
|
|
3094
|
+
* Emitted when the user asks for another page. The consumer applies it.
|
|
3095
|
+
*/
|
|
3096
|
+
"onChPageChange"?: (event: ChPaginationCustomEvent<{ page: number; pageSize: number }>) => void;
|
|
3097
|
+
/**
|
|
3098
|
+
* The current page, 1-based. Controlled by the consumer.
|
|
3099
|
+
* @default 1
|
|
3100
|
+
*/
|
|
3101
|
+
"page"?: number;
|
|
3102
|
+
/**
|
|
3103
|
+
* How many rows a page holds. Controlled by the consumer.
|
|
3104
|
+
* @default 10
|
|
3105
|
+
*/
|
|
3106
|
+
"pageSize"?: number;
|
|
3107
|
+
/**
|
|
3108
|
+
* Size of the controls.
|
|
3109
|
+
* @default 'md'
|
|
3110
|
+
*/
|
|
3111
|
+
"size"?: ChPaginationSize;
|
|
3112
|
+
/**
|
|
3113
|
+
* How many rows exist in total. Zero renders a disabled, empty pager.
|
|
3114
|
+
* @default 0
|
|
3115
|
+
*/
|
|
3116
|
+
"total"?: number;
|
|
3117
|
+
}
|
|
2465
3118
|
interface ChRadio {
|
|
2466
3119
|
/**
|
|
2467
3120
|
* Whether all radios in the group are disabled.
|
|
@@ -3016,6 +3669,28 @@ declare namespace LocalJSX {
|
|
|
3016
3669
|
"justify": ChClusterJustify;
|
|
3017
3670
|
"wrap": boolean;
|
|
3018
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
|
+
}
|
|
3684
|
+
interface ChConfirmDialogAttributes {
|
|
3685
|
+
"open": boolean;
|
|
3686
|
+
"heading": string;
|
|
3687
|
+
"message": string;
|
|
3688
|
+
"confirmLabel": string;
|
|
3689
|
+
"cancelLabel": string;
|
|
3690
|
+
"tone": ChConfirmDialogTone;
|
|
3691
|
+
"pending": boolean;
|
|
3692
|
+
"dismissible": boolean;
|
|
3693
|
+
}
|
|
3019
3694
|
interface ChDescriptionListAttributes {
|
|
3020
3695
|
"columns": ChDescriptionListColumns;
|
|
3021
3696
|
}
|
|
@@ -3095,6 +3770,20 @@ declare namespace LocalJSX {
|
|
|
3095
3770
|
"errorMessage": string;
|
|
3096
3771
|
"invalid": boolean;
|
|
3097
3772
|
}
|
|
3773
|
+
interface ChOtpInputAttributes {
|
|
3774
|
+
"label": string;
|
|
3775
|
+
"value": string;
|
|
3776
|
+
"length": number;
|
|
3777
|
+
"inputMode": 'numeric' | 'text';
|
|
3778
|
+
"secret": boolean;
|
|
3779
|
+
"placeholder": string;
|
|
3780
|
+
"name": string;
|
|
3781
|
+
"disabled": boolean;
|
|
3782
|
+
"required": boolean;
|
|
3783
|
+
"hint": string;
|
|
3784
|
+
"errorMessage": string;
|
|
3785
|
+
"invalid": boolean;
|
|
3786
|
+
}
|
|
3098
3787
|
interface ChPageHeaderAttributes {
|
|
3099
3788
|
"title": string;
|
|
3100
3789
|
"headingLevel": ChPageHeaderHeadingLevel;
|
|
@@ -3102,6 +3791,14 @@ declare namespace LocalJSX {
|
|
|
3102
3791
|
"description": string;
|
|
3103
3792
|
"actionsStacked": boolean;
|
|
3104
3793
|
}
|
|
3794
|
+
interface ChPaginationAttributes {
|
|
3795
|
+
"page": number;
|
|
3796
|
+
"pageSize": number;
|
|
3797
|
+
"total": number;
|
|
3798
|
+
"label": string;
|
|
3799
|
+
"size": ChPaginationSize;
|
|
3800
|
+
"disabled": boolean;
|
|
3801
|
+
}
|
|
3105
3802
|
interface ChRadioAttributes {
|
|
3106
3803
|
"label": string;
|
|
3107
3804
|
"value": string;
|
|
@@ -3199,6 +3896,8 @@ declare namespace LocalJSX {
|
|
|
3199
3896
|
"ch-card": ChCard;
|
|
3200
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] };
|
|
3201
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] };
|
|
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"]>;
|
|
3202
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] };
|
|
3203
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] };
|
|
3204
3903
|
"ch-drawer": Omit<ChDrawer, keyof ChDrawerAttributes> & { [K in keyof ChDrawer & keyof ChDrawerAttributes]?: ChDrawer[K] } & { [K in keyof ChDrawer & keyof ChDrawerAttributes as `attr:${K}`]?: ChDrawerAttributes[K] } & { [K in keyof ChDrawer & keyof ChDrawerAttributes as `prop:${K}`]?: ChDrawer[K] };
|
|
@@ -3211,7 +3910,9 @@ declare namespace LocalJSX {
|
|
|
3211
3910
|
"ch-link": Omit<ChLink, keyof ChLinkAttributes> & { [K in keyof ChLink & keyof ChLinkAttributes]?: ChLink[K] } & { [K in keyof ChLink & keyof ChLinkAttributes as `attr:${K}`]?: ChLinkAttributes[K] } & { [K in keyof ChLink & keyof ChLinkAttributes as `prop:${K}`]?: ChLink[K] };
|
|
3212
3911
|
"ch-modal": Omit<ChModal, keyof ChModalAttributes> & { [K in keyof ChModal & keyof ChModalAttributes]?: ChModal[K] } & { [K in keyof ChModal & keyof ChModalAttributes as `attr:${K}`]?: ChModalAttributes[K] } & { [K in keyof ChModal & keyof ChModalAttributes as `prop:${K}`]?: ChModal[K] };
|
|
3213
3912
|
"ch-number-input": Omit<ChNumberInput, keyof ChNumberInputAttributes> & { [K in keyof ChNumberInput & keyof ChNumberInputAttributes]?: ChNumberInput[K] } & { [K in keyof ChNumberInput & keyof ChNumberInputAttributes as `attr:${K}`]?: ChNumberInputAttributes[K] } & { [K in keyof ChNumberInput & keyof ChNumberInputAttributes as `prop:${K}`]?: ChNumberInput[K] };
|
|
3913
|
+
"ch-otp-input": Omit<ChOtpInput, keyof ChOtpInputAttributes> & { [K in keyof ChOtpInput & keyof ChOtpInputAttributes]?: ChOtpInput[K] } & { [K in keyof ChOtpInput & keyof ChOtpInputAttributes as `attr:${K}`]?: ChOtpInputAttributes[K] } & { [K in keyof ChOtpInput & keyof ChOtpInputAttributes as `prop:${K}`]?: ChOtpInput[K] };
|
|
3214
3914
|
"ch-page-header": Omit<ChPageHeader, keyof ChPageHeaderAttributes> & { [K in keyof ChPageHeader & keyof ChPageHeaderAttributes]?: ChPageHeader[K] } & { [K in keyof ChPageHeader & keyof ChPageHeaderAttributes as `attr:${K}`]?: ChPageHeaderAttributes[K] } & { [K in keyof ChPageHeader & keyof ChPageHeaderAttributes as `prop:${K}`]?: ChPageHeader[K] } & OneOf<"title", ChPageHeader["title"], ChPageHeaderAttributes["title"]>;
|
|
3915
|
+
"ch-pagination": Omit<ChPagination, keyof ChPaginationAttributes> & { [K in keyof ChPagination & keyof ChPaginationAttributes]?: ChPagination[K] } & { [K in keyof ChPagination & keyof ChPaginationAttributes as `attr:${K}`]?: ChPaginationAttributes[K] } & { [K in keyof ChPagination & keyof ChPaginationAttributes as `prop:${K}`]?: ChPagination[K] };
|
|
3215
3916
|
"ch-radio": Omit<ChRadio, keyof ChRadioAttributes> & { [K in keyof ChRadio & keyof ChRadioAttributes]?: ChRadio[K] } & { [K in keyof ChRadio & keyof ChRadioAttributes as `attr:${K}`]?: ChRadioAttributes[K] } & { [K in keyof ChRadio & keyof ChRadioAttributes as `prop:${K}`]?: ChRadio[K] };
|
|
3216
3917
|
"ch-segmented-control": Omit<ChSegmentedControl, keyof ChSegmentedControlAttributes> & { [K in keyof ChSegmentedControl & keyof ChSegmentedControlAttributes]?: ChSegmentedControl[K] } & { [K in keyof ChSegmentedControl & keyof ChSegmentedControlAttributes as `attr:${K}`]?: ChSegmentedControlAttributes[K] } & { [K in keyof ChSegmentedControl & keyof ChSegmentedControlAttributes as `prop:${K}`]?: ChSegmentedControl[K] };
|
|
3217
3918
|
"ch-select": Omit<ChSelect, keyof ChSelectAttributes> & { [K in keyof ChSelect & keyof ChSelectAttributes]?: ChSelect[K] } & { [K in keyof ChSelect & keyof ChSelectAttributes as `attr:${K}`]?: ChSelectAttributes[K] } & { [K in keyof ChSelect & keyof ChSelectAttributes as `prop:${K}`]?: ChSelect[K] };
|
|
@@ -3261,6 +3962,37 @@ declare module "@stencil/core" {
|
|
|
3261
3962
|
* gap in both axes — the layout a toolbar, a tag list or a button row needs.
|
|
3262
3963
|
*/
|
|
3263
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>;
|
|
3980
|
+
/**
|
|
3981
|
+
* A confirmation dialog over `ch-modal`.
|
|
3982
|
+
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
3983
|
+
* The imperative `confirm()` helper is a separate concern and a separate issue,
|
|
3984
|
+
* because a promise-returning helper has to own mounting, focus and unhandled
|
|
3985
|
+
* rejection, none of which a component should decide for its consumer.
|
|
3986
|
+
* The guarantees this adds over a plain `ch-modal` are the ones that make a
|
|
3987
|
+
* confirmation safe:
|
|
3988
|
+
* - exactly one outcome per interaction — a double click on Confirm emits once;
|
|
3989
|
+
* - every dismissal path (Cancel, Escape, backdrop, confirm) is reported, so a
|
|
3990
|
+
* consumer awaiting an answer cannot hang;
|
|
3991
|
+
* - focus lands on Cancel for a destructive action, so the absent-minded Enter
|
|
3992
|
+
* does not destroy anything;
|
|
3993
|
+
* - `pending` is not a cancellation: a slow request keeps the dialog open.
|
|
3994
|
+
*/
|
|
3995
|
+
"ch-confirm-dialog": LocalJSX.IntrinsicElements["ch-confirm-dialog"] & JSXBase.HTMLAttributes<HTMLChConfirmDialogElement>;
|
|
3264
3996
|
/**
|
|
3265
3997
|
* Label/value pairs for detail views, on a native `<dl>`.
|
|
3266
3998
|
* The component renders the `<dl>` and the layout; the consumer writes the
|
|
@@ -3365,6 +4097,17 @@ declare module "@stencil/core" {
|
|
|
3365
4097
|
* boundary for Chilean pesos, the only case with a real consumer.
|
|
3366
4098
|
*/
|
|
3367
4099
|
"ch-number-input": LocalJSX.IntrinsicElements["ch-number-input"] & JSXBase.HTMLAttributes<HTMLChNumberInputElement>;
|
|
4100
|
+
/**
|
|
4101
|
+
* One-time-code input.
|
|
4102
|
+
* One native `<input>` holds the whole code, not a box per digit. Per-digit
|
|
4103
|
+
* inputs break paste, break SMS autofill (the platform fills a single field
|
|
4104
|
+
* carrying `autocomplete="one-time-code"`), and give a keyboard user several
|
|
4105
|
+
* tab stops for what is one value. The segmented look is drawn by the shadow
|
|
4106
|
+
* CSS over the single field.
|
|
4107
|
+
* It never submits on completion: a code entered is not a decision to send it,
|
|
4108
|
+
* so the consumer listens to `chComplete` and submits when it decides to.
|
|
4109
|
+
*/
|
|
4110
|
+
"ch-otp-input": LocalJSX.IntrinsicElements["ch-otp-input"] & JSXBase.HTMLAttributes<HTMLChOtpInputElement>;
|
|
3368
4111
|
/**
|
|
3369
4112
|
* The heading block at the top of a page: title, optional eyebrow and
|
|
3370
4113
|
* description, and a trailing actions area.
|
|
@@ -3376,6 +4119,20 @@ declare module "@stencil/core" {
|
|
|
3376
4119
|
* the actions so reading and focus order still start with the title.
|
|
3377
4120
|
*/
|
|
3378
4121
|
"ch-page-header": LocalJSX.IntrinsicElements["ch-page-header"] & JSXBase.HTMLAttributes<HTMLChPageHeaderElement>;
|
|
4122
|
+
/**
|
|
4123
|
+
* Controlled pagination for a known total.
|
|
4124
|
+
* It holds no page state: `page` and `pageSize` come from the consumer and
|
|
4125
|
+
* every action emits `chPageChange` with the page it wants. That matches
|
|
4126
|
+
* `ch-table`, so a consumer wiring the two together has one model to reason
|
|
4127
|
+
* about — the table shows the rows for `page`, the pagination asks for the
|
|
4128
|
+
* next one, and nothing moves until the consumer's data does.
|
|
4129
|
+
* No numbered page list. A list of numbers is wrong more often than it is
|
|
4130
|
+
* right (it depends on how many pages fit, which depends on the font, the
|
|
4131
|
+
* locale and the container), and it is the part consumers most often need to
|
|
4132
|
+
* replace with their own. Prev/next plus a position summary covers the
|
|
4133
|
+
* default case; the summary is what tells a screen-reader user where they are.
|
|
4134
|
+
*/
|
|
4135
|
+
"ch-pagination": LocalJSX.IntrinsicElements["ch-pagination"] & JSXBase.HTMLAttributes<HTMLChPaginationElement>;
|
|
3379
4136
|
"ch-radio": LocalJSX.IntrinsicElements["ch-radio"] & JSXBase.HTMLAttributes<HTMLChRadioElement>;
|
|
3380
4137
|
/**
|
|
3381
4138
|
* Compact control for switching between a few mutually exclusive options
|