@devschile/chucao 2.7.0 → 2.8.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-10109256.entry.js → p-0831c6f2.entry.js} +2 -2
- package/dist/chucao/p-0d7fc720.entry.js +2 -0
- package/dist/chucao/{p-62e762f7.entry.js.map → p-0d7fc720.entry.js.map} +1 -1
- package/dist/chucao/{p-999dba28.entry.js → p-19d90f87.entry.js} +2 -2
- package/dist/chucao/{p-afe45116.entry.js → p-25f4f815.entry.js} +2 -2
- package/dist/chucao/{p-14184080.entry.js → p-3e0d7585.entry.js} +2 -2
- package/dist/chucao/{p-afacd489.entry.js → p-46dae34b.entry.js} +2 -2
- package/dist/chucao/{p-d1e9f563.entry.js → p-5093c486.entry.js} +2 -2
- package/dist/chucao/{p-337d7f68.entry.js → p-51f6327c.entry.js} +2 -2
- package/dist/chucao/{p-bf036509.entry.js → p-5577e0a0.entry.js} +2 -2
- package/dist/chucao/{p-339e3c30.entry.js → p-56e41372.entry.js} +2 -2
- package/dist/chucao/{p-a84d4493.entry.js → p-6c2e5931.entry.js} +2 -2
- package/dist/chucao/{p-1e8d921d.entry.js → p-6e93c392.entry.js} +2 -2
- package/dist/chucao/{p-93f25dd5.entry.js → p-7f99ae48.entry.js} +2 -2
- package/dist/chucao/p-8b09ad3c.entry.js +2 -0
- package/dist/chucao/p-8b09ad3c.entry.js.map +1 -0
- package/dist/chucao/{p-e2fe7c5d.entry.js → p-8fcf6d36.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-d2077ae4.entry.js → p-920d5727.entry.js} +2 -2
- package/dist/chucao/{p-1852dfdb.entry.js → p-ad41da02.entry.js} +2 -2
- package/dist/chucao/p-af088ffd.entry.js +2 -0
- package/dist/chucao/p-af088ffd.entry.js.map +1 -0
- package/dist/chucao/{p-08d90a3d.entry.js → p-b42ec9bf.entry.js} +2 -2
- package/dist/chucao/{p-36c59ad1.entry.js → p-b80c39c3.entry.js} +2 -2
- package/dist/chucao/{p-507d4b69.entry.js → p-ba589c2f.entry.js} +2 -2
- package/dist/chucao/{p-39815ee2.entry.js → p-c4d68ab7.entry.js} +2 -2
- package/dist/chucao/{p-3e6614ee.entry.js → p-c98e2a50.entry.js} +2 -2
- package/dist/chucao/{p-4c8838a0.entry.js → p-ca3179ae.entry.js} +2 -2
- package/dist/chucao/{p-3f9894a4.entry.js → p-d630f662.entry.js} +2 -2
- package/dist/chucao/{p-4cda7f71.entry.js → p-d868bdbc.entry.js} +2 -2
- package/dist/chucao/{p-f17b186f.entry.js → p-e6b7b2da.entry.js} +2 -2
- package/dist/chucao/p-eb39b9c2.entry.js +2 -0
- package/dist/chucao/p-eb39b9c2.entry.js.map +1 -0
- package/dist/chucao/p-f0c288db.entry.js +2 -0
- package/dist/chucao/p-f0c288db.entry.js.map +1 -0
- 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-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 +25 -8
- package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -1
- 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 +3 -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-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.css +11 -0
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +23 -6
- package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -1
- package/dist/collection/utils/overlay.js.map +1 -1
- 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-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/ch-tooltip.js.map +1 -1
- package/dist/components/{p-CuczWSQU.js → p-CF1yV0aa.js} +2 -2
- package/dist/components/p-CmMN-UuJ.js +2 -0
- package/dist/components/p-CmMN-UuJ.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-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 +25 -8
- package/dist/esm/ch-tooltip.entry.js.map +1 -1
- 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-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/ch-tooltip/ch-tooltip.d.ts +7 -0
- package/dist/types/components.d.ts +548 -0
- package/dist/types/utils/overlay.d.ts +1 -1
- package/dist-react/components.d.ts +21 -1
- package/dist-react/components.js +33 -0
- package/dist-react/components.ts +49 -1
- package/dist-vue/index.d.ts +3 -0
- package/dist-vue/index.js +48 -0
- package/dist-vue/index.ts +54 -0
- package/hydrate/index.js +540 -40
- package/hydrate/index.mjs +540 -40
- package/package.json +13 -1
- package/dist/chucao/p-5c253fa0.entry.js +0 -2
- package/dist/chucao/p-5c253fa0.entry.js.map +0 -1
- package/dist/chucao/p-62e762f7.entry.js +0 -2
- package/dist/chucao/p-CIV5Gg1o.js.map +0 -1
- package/dist/cjs/index-ByZY6aTj.js.map +0 -1
- package/dist/esm/index-CIV5Gg1o.js.map +0 -1
- /package/dist/chucao/{p-10109256.entry.js.map → p-0831c6f2.entry.js.map} +0 -0
- /package/dist/chucao/{p-999dba28.entry.js.map → p-19d90f87.entry.js.map} +0 -0
- /package/dist/chucao/{p-afe45116.entry.js.map → p-25f4f815.entry.js.map} +0 -0
- /package/dist/chucao/{p-14184080.entry.js.map → p-3e0d7585.entry.js.map} +0 -0
- /package/dist/chucao/{p-afacd489.entry.js.map → p-46dae34b.entry.js.map} +0 -0
- /package/dist/chucao/{p-d1e9f563.entry.js.map → p-5093c486.entry.js.map} +0 -0
- /package/dist/chucao/{p-337d7f68.entry.js.map → p-51f6327c.entry.js.map} +0 -0
- /package/dist/chucao/{p-bf036509.entry.js.map → p-5577e0a0.entry.js.map} +0 -0
- /package/dist/chucao/{p-339e3c30.entry.js.map → p-56e41372.entry.js.map} +0 -0
- /package/dist/chucao/{p-a84d4493.entry.js.map → p-6c2e5931.entry.js.map} +0 -0
- /package/dist/chucao/{p-1e8d921d.entry.js.map → p-6e93c392.entry.js.map} +0 -0
- /package/dist/chucao/{p-93f25dd5.entry.js.map → p-7f99ae48.entry.js.map} +0 -0
- /package/dist/chucao/{p-e2fe7c5d.entry.js.map → p-8fcf6d36.entry.js.map} +0 -0
- /package/dist/chucao/{p-d2077ae4.entry.js.map → p-920d5727.entry.js.map} +0 -0
- /package/dist/chucao/{p-1852dfdb.entry.js.map → p-ad41da02.entry.js.map} +0 -0
- /package/dist/chucao/{p-08d90a3d.entry.js.map → p-b42ec9bf.entry.js.map} +0 -0
- /package/dist/chucao/{p-36c59ad1.entry.js.map → p-b80c39c3.entry.js.map} +0 -0
- /package/dist/chucao/{p-507d4b69.entry.js.map → p-ba589c2f.entry.js.map} +0 -0
- /package/dist/chucao/{p-39815ee2.entry.js.map → p-c4d68ab7.entry.js.map} +0 -0
- /package/dist/chucao/{p-3e6614ee.entry.js.map → p-c98e2a50.entry.js.map} +0 -0
- /package/dist/chucao/{p-4c8838a0.entry.js.map → p-ca3179ae.entry.js.map} +0 -0
- /package/dist/chucao/{p-3f9894a4.entry.js.map → p-d630f662.entry.js.map} +0 -0
- /package/dist/chucao/{p-4cda7f71.entry.js.map → p-d868bdbc.entry.js.map} +0 -0
- /package/dist/chucao/{p-f17b186f.entry.js.map → p-e6b7b2da.entry.js.map} +0 -0
- /package/dist/components/{p-CuczWSQU.js.map → p-CF1yV0aa.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const chAccordionCss = () => `:host{display:block}.item{background:var(--surface);border:var(--border-width) solid var(--border);border-radius:var(--radius);transition:border-color var(--duration-normal) var(--easing-default)}.item+.item{margin-top:var(--spacing-md)}.item--open{border-color:var(--border-hover)}.item-head{margin:0}.item-toggle{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-lg);width:100%;padding:var(--spacing-2xl) var(--spacing-3xl);background:transparent;border:none;color:var(--text);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer}.item-toggle::after{content:'';width:var(--spacing-md);height:var(--spacing-md);flex-shrink:0;border-right:var(--border-width) solid var(--text-muted);border-bottom:var(--border-width) solid var(--text-muted);transform:rotate(45deg);transition:transform var(--duration-normal) var(--easing-default)}.item--open .item-toggle::after{transform:rotate(-135deg)}.item-toggle:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.item-toggle:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.item-panel{padding:0 var(--spacing-3xl) var(--spacing-3xl);color:var(--text-muted)}.item-panel[hidden]{display:none}`;
|
|
4
4
|
|
|
@@ -32,7 +32,7 @@ const ChAccordion = class {
|
|
|
32
32
|
this.chChange.emit(this.value);
|
|
33
33
|
};
|
|
34
34
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'da264a6faa4d8da510d2964bef410d7c733bc507' }, this.items.map(item => {
|
|
36
36
|
const open = this.value === item.value;
|
|
37
37
|
return (h("div", { key: item.value, class: { 'item': true, 'item--open': open } }, h("h3", { class: "item-head" }, h("button", { type: "button", class: "item-toggle", id: this.headerId(item.value), "data-value": item.value, "aria-expanded": open ? 'true' : 'false', "aria-controls": this.panelId(item.value), disabled: item.disabled, onClick: () => this.toggle(item.value) }, item.title)), h("div", { class: "item-panel", id: this.panelId(item.value), role: "region", "aria-labelledby": this.headerId(item.value), hidden: !open }, h("slot", { name: `panel-${item.value}` }))));
|
|
38
38
|
})));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-8l_6qAY9.js';
|
|
2
2
|
import { c as chIcons } from './icons-CnivhwvG.js';
|
|
3
3
|
import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
|
|
4
4
|
|
|
@@ -50,7 +50,7 @@ const ChAlert = class {
|
|
|
50
50
|
render() {
|
|
51
51
|
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
52
52
|
const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: 'c7fb041416b2958fcda758a3297a0f9546456ef3' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (h("svg", { key: '1a89cc6797bd6b425920f61f545f407326422e93', class: "alert-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, shapes.map(shape => h(shape.tag, shape.attrs)))), h("div", { key: 'd30f1b3897d3ce681789507aa2677b29a83e8346', class: "alert-content" }, h("slot", { key: 'a4bc52ace056a573b21ecec083d017b3c5c22245' })), this.dismissLabel && (h("button", { key: '571947bd96a9c2f22b7af7989abd406dff860256', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: 'e8d282730aa25aad78f05ce118cb65fce9ea85c5', "aria-hidden": "true" }, "\u00D7"))))));
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
ChAlert.style = chAlertCss();
|
|
@@ -72,7 +72,7 @@ const ChBadge = class {
|
|
|
72
72
|
*/
|
|
73
73
|
statusCue = true;
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '712c653d4047845d6afce4655271f2c80e3fe6a8' }, h("span", { key: 'dd24bf1f555b229bee277b77c175b485f4a10680', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && h("span", { key: 'cef4173e40dac2798c2a26381763bb470cf0bacc', class: "badge-dot", "aria-hidden": "true" }), h("slot", { key: '6e8c09dd9260d80c9fda09b402dfc3b1cef53907' }))));
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
ChBadge.style = chBadgeCss();
|
|
@@ -176,7 +176,7 @@ const ChCard = class {
|
|
|
176
176
|
registerInstance(this, hostRef);
|
|
177
177
|
}
|
|
178
178
|
render() {
|
|
179
|
-
return (h(Host, { key: '
|
|
179
|
+
return (h(Host, { key: 'f237dce6afd9f9c88f52784de63073d3b4dc31fd' }, h("div", { key: '2256360ad3b736aaf595cb0440903eb90ffc9968', class: "card" }, h("slot", { key: '5ce63027b9e1abd925b4a1d7261752a4b579b336' }))));
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
182
|
ChCard.style = chCardCss();
|
|
@@ -302,7 +302,7 @@ const ChInput = class {
|
|
|
302
302
|
return undefined;
|
|
303
303
|
}
|
|
304
304
|
render() {
|
|
305
|
-
return (h(Host, { key: '
|
|
305
|
+
return (h(Host, { key: '2a892c87f8c2d7840c89b546e53b1cd4274de6d1' }, this.label && (h("label", { key: '7c10ad2de5992e8e96accb3752bb62a7ecc5a562', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '746c04af3a66f8bd3789f037d77560f30b79ae67', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '5c1985773e1ec0de670e5fa0d94b33cea81b9e63', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '48a2823957aba104c6a6599dbd409824c2f60f79', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
306
306
|
}
|
|
307
307
|
static get formAssociated() { return true; }
|
|
308
308
|
static get watchers() { return {
|
|
@@ -434,7 +434,7 @@ const ChSelect = class {
|
|
|
434
434
|
return undefined;
|
|
435
435
|
}
|
|
436
436
|
render() {
|
|
437
|
-
return (h(Host, { key: '
|
|
437
|
+
return (h(Host, { key: '21825ec1b83a93617413179ec79ba42ef2e980fe' }, this.label && (h("label", { key: 'e41e1268d92384f93bf492f90c6a727ddd5a05e0', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: '25160df5f7628bf89d6d7bb1f2736b44d02455d9', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '6e6977e6c5d120a2bf28b1b05892ff90ca32e1ff', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '92cb97df6b5ff80857fa6463d189e366697d6fd5', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '08d3f5deefd5d155c0fd54f06a0f6f5c60db8873', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
438
438
|
}
|
|
439
439
|
static get formAssociated() { return true; }
|
|
440
440
|
static get watchers() { return {
|
|
@@ -475,7 +475,7 @@ const ChSpinner = class {
|
|
|
475
475
|
label;
|
|
476
476
|
render() {
|
|
477
477
|
const labelled = Boolean(this.label);
|
|
478
|
-
return (h(Host, { key: '
|
|
478
|
+
return (h(Host, { key: 'ed67d11ad7efe04c34372852f5c4b81c71bf2327' }, h("span", { key: 'fff47dcd59f6e8881ea6295f5d062f888328a081', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
481
|
ChSpinner.style = chSpinnerCss();
|
|
@@ -588,7 +588,7 @@ const ChSwitch = class {
|
|
|
588
588
|
return undefined;
|
|
589
589
|
}
|
|
590
590
|
render() {
|
|
591
|
-
return (h(Host, { key: '
|
|
591
|
+
return (h(Host, { key: 'f0ad3dab1049febb1e4506c538a938eec237b6ee' }, h("label", { key: '0ec252ff6c58a79c3d1054312f6f92dd03352f69', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, h("input", { key: 'a2471b09c6e1a026ec6189b3b542edc7147b8759', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: 'dbcf0512d51e71c0072e4d159e23d822a7676da2', class: "track" }, h("span", { key: 'e7ef5934e2c03ba12e320fe963b4904237bf05d5', class: "thumb" })), this.label && h("span", { key: '90e1fc7560f839ec50014648235cc753c955b82a', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'c5150070147fcf40364925a5c164ec80d511b411', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'c9cc633cd70f53aa62425faf92e760cf8cb816fd', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
592
592
|
}
|
|
593
593
|
static get formAssociated() { return true; }
|
|
594
594
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
|
|
3
3
|
|
|
4
4
|
const chCheckboxCss = () => `:host{display:inline-block}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent);background:var(--accent)}.input:checked::before{content:'';width:var(--spacing-xs);height:var(--spacing-lg);border:solid var(--color-accent-text);border-width:0 var(--spacing-shift) var(--spacing-shift) 0;transform:rotate(45deg);margin-top:calc(-1 * var(--spacing-2xs))}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible,:host(:user-invalid) .input:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
|
|
@@ -109,7 +109,7 @@ const ChCheckbox = class {
|
|
|
109
109
|
return undefined;
|
|
110
110
|
}
|
|
111
111
|
render() {
|
|
112
|
-
return (h(Host, { key: '
|
|
112
|
+
return (h(Host, { key: '3e0f2f162d1ec1a4715b44a37211a30c63f830b2' }, h("label", { key: '8042cb81ab53a9451a8757dfa63ef8cea8f41954', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: '0d55f22c4625f48c8bf2eee15a7710cfb80c4328', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: '146e3b4fa88237da4af8f8b0a408909b4d11555e', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'd82032ae57e8e818a91fa04cfd5e505dea47c22d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '9f418c648d4929086a77ca868a7c13cdccb328cb', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
113
113
|
}
|
|
114
114
|
static get formAssociated() { return true; }
|
|
115
115
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const chClusterCss = () => `:host{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;box-sizing:border-box}:host([hidden]){display:none}.cluster--nowrap{flex-wrap:nowrap}.cluster--gap-none{gap:0}.cluster--gap-2xs{gap:var(--spacing-2xs)}.cluster--gap-xs{gap:var(--spacing-xs)}.cluster--gap-sm{gap:var(--spacing-sm)}.cluster--gap-md{gap:var(--spacing-md)}.cluster--gap-lg{gap:var(--spacing-lg)}.cluster--gap-xl{gap:var(--spacing-xl)}.cluster--gap-2xl{gap:var(--spacing-2xl)}.cluster--gap-3xl{gap:var(--spacing-3xl)}.cluster--gap-4xl{gap:var(--spacing-4xl)}.cluster--gap-5xl{gap:var(--spacing-5xl)}.cluster--gap-6xl{gap:var(--spacing-6xl)}.cluster--align-stretch{align-items:stretch}.cluster--align-start{align-items:flex-start}.cluster--align-center{align-items:center}.cluster--align-end{align-items:flex-end}.cluster--align-baseline{align-items:baseline}.cluster--justify-start{justify-content:flex-start}.cluster--justify-center{justify-content:center}.cluster--justify-end{justify-content:flex-end}.cluster--justify-between{justify-content:space-between}.cluster--justify-around{justify-content:space-around}`;
|
|
4
4
|
|
|
@@ -28,13 +28,13 @@ const ChCluster = class {
|
|
|
28
28
|
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: 'd1852bc490835eb559f31039e14b87d59b151b11', class: {
|
|
32
32
|
'cluster': true,
|
|
33
33
|
[`cluster--gap-${this.gapStep}`]: true,
|
|
34
34
|
[`cluster--align-${this.align}`]: true,
|
|
35
35
|
[`cluster--justify-${this.justify}`]: true,
|
|
36
36
|
'cluster--nowrap': !this.wrap,
|
|
37
|
-
} }, h("slot", { key: '
|
|
37
|
+
} }, h("slot", { key: '7dc3c83e40d8e0d5dd18052bb9c36898a443ce23' })));
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
ChCluster.style = chClusterCss();
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
|
+
|
|
3
|
+
const chConfirmDialogCss = () => `:host{display:contents;font-family:var(--typography-body)}.confirm__heading{margin:0;font-family:var(--typography-heading);font-size:var(--typography-size-lg);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.confirm__message{margin:0;font-size:var(--typography-size-sm);color:var(--color-text-secondary);overflow-wrap:break-word}.confirm__actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--spacing-md);margin-top:var(--spacing-2xl)}.confirm__button{display:inline-flex;align-items:center;justify-content:center;min-height:2.25rem;padding:0 var(--spacing-lg);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);color:var(--color-text-primary);font-family:var(--typography-body);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);cursor:pointer}.confirm__button:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:2px}.confirm__button:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.confirm__button--confirm{border-color:var(--color-accent-default);background:var(--color-accent-default);color:var(--color-accent-text)}.confirm__button--danger{border-color:var(--color-status-warning);background:var(--color-status-warning);color:var(--color-text-primary)}.confirm__button--danger::before{content:'⚠';margin-right:var(--spacing-xs)}`;
|
|
4
|
+
|
|
5
|
+
const ChConfirmDialog = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.chConfirm = createEvent(this, "chConfirm");
|
|
9
|
+
this.chCancel = createEvent(this, "chCancel");
|
|
10
|
+
}
|
|
11
|
+
get el() { return getElement(this); }
|
|
12
|
+
/** Whether the dialog is open. Kept in sync when it is dismissed. */
|
|
13
|
+
open = false;
|
|
14
|
+
/**
|
|
15
|
+
* The question, set as the dialog's accessible name. Required: a dialog
|
|
16
|
+
* without a name is announced as an unlabelled group.
|
|
17
|
+
*/
|
|
18
|
+
heading;
|
|
19
|
+
/** Supporting text, rendered under the heading. */
|
|
20
|
+
message;
|
|
21
|
+
/** Label of the confirming action. */
|
|
22
|
+
confirmLabel = 'Confirm';
|
|
23
|
+
/** Label of the dismissing action. */
|
|
24
|
+
cancelLabel = 'Cancel';
|
|
25
|
+
/**
|
|
26
|
+
* `danger` styles the confirm action as destructive and moves the initial
|
|
27
|
+
* focus to Cancel, so the safe choice is the default one.
|
|
28
|
+
*/
|
|
29
|
+
tone = 'default';
|
|
30
|
+
/** Whether the confirm action is in flight; both buttons are then disabled. */
|
|
31
|
+
pending = false;
|
|
32
|
+
/**
|
|
33
|
+
* Whether Escape and the backdrop dismiss the dialog. When false, the only
|
|
34
|
+
* way out is one of the two buttons — use it only for a decision that must
|
|
35
|
+
* be answered rather than abandoned.
|
|
36
|
+
*/
|
|
37
|
+
dismissible = true;
|
|
38
|
+
/** Emitted once when the user confirms. */
|
|
39
|
+
chConfirm;
|
|
40
|
+
/** Emitted once when the dialog is dismissed without confirming. */
|
|
41
|
+
chCancel;
|
|
42
|
+
/** `true` once an outcome has been emitted for the current opening. */
|
|
43
|
+
settled = false;
|
|
44
|
+
cancelButton;
|
|
45
|
+
confirmButton;
|
|
46
|
+
componentDidLoad() {
|
|
47
|
+
if (this.open) {
|
|
48
|
+
this.onOpening();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
handleOpenChange(open) {
|
|
52
|
+
if (open) {
|
|
53
|
+
this.onOpening();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.settled = false;
|
|
57
|
+
}
|
|
58
|
+
onOpening() {
|
|
59
|
+
this.settled = false;
|
|
60
|
+
// Focus is moved once the dialog is actually shown; the modal handles
|
|
61
|
+
// moving focus into itself, and this refines where it lands.
|
|
62
|
+
requestAnimationFrame(() => {
|
|
63
|
+
const target = this.tone === 'danger' ? this.cancelButton : this.confirmButton;
|
|
64
|
+
target?.focus();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
settle(outcome) {
|
|
68
|
+
if (this.settled) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.settled = true;
|
|
72
|
+
if (outcome === 'confirm') {
|
|
73
|
+
this.chConfirm.emit();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.chCancel.emit();
|
|
77
|
+
}
|
|
78
|
+
handleConfirm = () => {
|
|
79
|
+
if (this.pending) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.settle('confirm');
|
|
83
|
+
};
|
|
84
|
+
handleCancel = () => {
|
|
85
|
+
if (this.pending) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.open = false;
|
|
89
|
+
this.settle('cancel');
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* `ch-modal` reports every close that was not requested by the consumer —
|
|
93
|
+
* Escape and the backdrop. A close while `pending` is the consumer's own
|
|
94
|
+
* doing and is not a cancellation.
|
|
95
|
+
*/
|
|
96
|
+
handleModalClose = () => {
|
|
97
|
+
this.open = false;
|
|
98
|
+
if (this.pending) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.settle('cancel');
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Escape is a platform close request on the inner `<dialog>`, so a
|
|
105
|
+
* non-dismissible dialog cancels it before it takes effect. The backdrop is
|
|
106
|
+
* handled by `ch-modal` and is suppressed the same way.
|
|
107
|
+
*/
|
|
108
|
+
handleKeyDown = (event) => {
|
|
109
|
+
if (this.dismissible || event.key !== 'Escape') {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Focus the safe action. Exposed so a consumer can return focus deliberately
|
|
117
|
+
* after a request settles.
|
|
118
|
+
*/
|
|
119
|
+
async focusCancel() {
|
|
120
|
+
this.cancelButton?.focus();
|
|
121
|
+
}
|
|
122
|
+
render() {
|
|
123
|
+
return (h(Host, { key: '7aa8fd72a281369f47ce7f1eb99c52ab60ba4ee0', onKeyDown: this.handleKeyDown }, h("ch-modal", { key: '019663f042f5c2ce3dd1f58433faee170c01e8e6', open: this.open, label: this.heading, size: "sm", onChClose: this.handleModalClose, onChOpen: () => this.onOpening() }, h("h2", { key: '9d97f437e535a3a9feb181e9807dc9c532efd872', slot: "heading", class: "confirm__heading" }, this.heading), this.message && h("p", { key: 'a0d64b2b915624473162557972eabdf80b445d58', class: "confirm__message" }, this.message), h("div", { key: '0b44308d6eb7a4aea2c1166f8a7f6f19c41cdbb7', class: "confirm__actions" }, h("button", { key: '7908d0db96e7c59c7b4673220aa62c2170b29d54', class: { 'confirm__button': true, 'confirm__button--cancel': true }, type: "button", ref: el => (this.cancelButton = el), disabled: this.pending, onClick: this.handleCancel }, this.cancelLabel), h("button", { key: '43657105b474b303160da19e1fa5fda47f63207c', class: { 'confirm__button': true, 'confirm__button--confirm': true, 'confirm__button--danger': this.tone === 'danger' }, type: "button", ref: el => (this.confirmButton = el), disabled: this.pending, "aria-busy": this.pending ? 'true' : undefined, onClick: this.handleConfirm }, this.confirmLabel)))));
|
|
124
|
+
}
|
|
125
|
+
static get watchers() { return {
|
|
126
|
+
"open": [{
|
|
127
|
+
"handleOpenChange": 0
|
|
128
|
+
}]
|
|
129
|
+
}; }
|
|
130
|
+
};
|
|
131
|
+
ChConfirmDialog.style = chConfirmDialogCss();
|
|
132
|
+
|
|
133
|
+
export { ChConfirmDialog as ch_confirm_dialog };
|
|
134
|
+
//# sourceMappingURL=ch-confirm-dialog.entry.js.map
|
|
135
|
+
|
|
136
|
+
//# sourceMappingURL=ch-confirm-dialog.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-confirm-dialog.entry.js","sources":["src/components/ch-confirm-dialog/ch-confirm-dialog.css?tag=ch-confirm-dialog&encapsulation=shadow","src/components/ch-confirm-dialog/ch-confirm-dialog.tsx"],"sourcesContent":[":host {\n display: contents;\n font-family: var(--typography-body);\n}\n\n.confirm__heading {\n margin: 0;\n font-family: var(--typography-heading);\n font-size: var(--typography-size-lg);\n font-weight: var(--typography-weight-semibold);\n color: var(--color-text-primary);\n}\n\n.confirm__message {\n margin: 0;\n font-size: var(--typography-size-sm);\n color: var(--color-text-secondary);\n overflow-wrap: break-word;\n}\n\n.confirm__actions {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: var(--spacing-md);\n margin-top: var(--spacing-2xl);\n}\n\n.confirm__button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 2.25rem;\n padding: 0 var(--spacing-lg);\n border: var(--border-width) solid var(--color-border-default);\n border-radius: var(--radius-sm);\n background: var(--color-surface-default);\n color: var(--color-text-primary);\n font-family: var(--typography-body);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n cursor: pointer;\n}\n\n.confirm__button:focus-visible {\n outline: 2px solid var(--color-accent-default);\n outline-offset: 2px;\n}\n\n.confirm__button:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.confirm__button--confirm {\n border-color: var(--color-accent-default);\n background: var(--color-accent-default);\n color: var(--color-accent-text);\n}\n\n/* Destructive intent is carried by weight and iconography as well as colour. */\n.confirm__button--danger {\n border-color: var(--color-status-warning);\n background: var(--color-status-warning);\n color: var(--color-text-primary);\n}\n\n.confirm__button--danger::before {\n content: '⚠';\n margin-right: var(--spacing-xs);\n}\n","import { Component, Element, Event, type EventEmitter, Host, Method, Prop, State, Watch, h } from '@stencil/core';\n\nexport type ChConfirmDialogTone = 'default' | 'danger';\n\n/**\n * A confirmation dialog over `ch-modal`.\n *\n * Declarative only: the consumer opens it with `open` and handles the outcome.\n * The imperative `confirm()` helper is a separate concern and a separate issue,\n * because a promise-returning helper has to own mounting, focus and unhandled\n * rejection, none of which a component should decide for its consumer.\n *\n * The guarantees this adds over a plain `ch-modal` are the ones that make a\n * confirmation safe:\n *\n * - exactly one outcome per interaction — a double click on Confirm emits once;\n * - every dismissal path (Cancel, Escape, backdrop, confirm) is reported, so a\n * consumer awaiting an answer cannot hang;\n * - focus lands on Cancel for a destructive action, so the absent-minded Enter\n * does not destroy anything;\n * - `pending` is not a cancellation: a slow request keeps the dialog open.\n */\n@Component({\n tag: 'ch-confirm-dialog',\n styleUrl: 'ch-confirm-dialog.css',\n shadow: true,\n})\nexport class ChConfirmDialog {\n @Element() el: HTMLElement;\n\n /** Whether the dialog is open. Kept in sync when it is dismissed. */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The question, set as the dialog's accessible name. Required: a dialog\n * without a name is announced as an unlabelled group.\n */\n @Prop() heading!: string;\n\n /** Supporting text, rendered under the heading. */\n @Prop() message?: string;\n\n /** Label of the confirming action. */\n @Prop() confirmLabel = 'Confirm';\n\n /** Label of the dismissing action. */\n @Prop() cancelLabel = 'Cancel';\n\n /**\n * `danger` styles the confirm action as destructive and moves the initial\n * focus to Cancel, so the safe choice is the default one.\n */\n @Prop() tone: ChConfirmDialogTone = 'default';\n\n /** Whether the confirm action is in flight; both buttons are then disabled. */\n @Prop() pending = false;\n\n /**\n * Whether Escape and the backdrop dismiss the dialog. When false, the only\n * way out is one of the two buttons — use it only for a decision that must\n * be answered rather than abandoned.\n */\n @Prop() dismissible = true;\n\n /** Emitted once when the user confirms. */\n @Event() chConfirm: EventEmitter<void>;\n\n /** Emitted once when the dialog is dismissed without confirming. */\n @Event() chCancel: EventEmitter<void>;\n\n /** `true` once an outcome has been emitted for the current opening. */\n @State() private settled = false;\n\n private cancelButton?: HTMLButtonElement;\n private confirmButton?: HTMLButtonElement;\n\n componentDidLoad() {\n if (this.open) {\n this.onOpening();\n }\n }\n\n @Watch('open')\n handleOpenChange(open: boolean) {\n if (open) {\n this.onOpening();\n return;\n }\n this.settled = false;\n }\n\n private onOpening() {\n this.settled = false;\n // Focus is moved once the dialog is actually shown; the modal handles\n // moving focus into itself, and this refines where it lands.\n requestAnimationFrame(() => {\n const target = this.tone === 'danger' ? this.cancelButton : this.confirmButton;\n target?.focus();\n });\n }\n\n private settle(outcome: 'confirm' | 'cancel') {\n if (this.settled) {\n return;\n }\n this.settled = true;\n if (outcome === 'confirm') {\n this.chConfirm.emit();\n return;\n }\n this.chCancel.emit();\n }\n\n private handleConfirm = () => {\n if (this.pending) {\n return;\n }\n this.settle('confirm');\n };\n\n private handleCancel = () => {\n if (this.pending) {\n return;\n }\n this.open = false;\n this.settle('cancel');\n };\n\n /**\n * `ch-modal` reports every close that was not requested by the consumer —\n * Escape and the backdrop. A close while `pending` is the consumer's own\n * doing and is not a cancellation.\n */\n private handleModalClose = () => {\n this.open = false;\n if (this.pending) {\n return;\n }\n this.settle('cancel');\n };\n\n /**\n * Escape is a platform close request on the inner `<dialog>`, so a\n * non-dismissible dialog cancels it before it takes effect. The backdrop is\n * handled by `ch-modal` and is suppressed the same way.\n */\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.dismissible || event.key !== 'Escape') {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n };\n\n /**\n * Focus the safe action. Exposed so a consumer can return focus deliberately\n * after a request settles.\n */\n @Method()\n async focusCancel(): Promise<void> {\n this.cancelButton?.focus();\n }\n\n render() {\n return (\n <Host onKeyDown={this.handleKeyDown}>\n <ch-modal open={this.open} label={this.heading} size=\"sm\" onChClose={this.handleModalClose} onChOpen={() => this.onOpening()}>\n <h2 slot=\"heading\" class=\"confirm__heading\">\n {this.heading}\n </h2>\n {this.message && <p class=\"confirm__message\">{this.message}</p>}\n <div class=\"confirm__actions\">\n <button\n class={{ 'confirm__button': true, 'confirm__button--cancel': true }}\n type=\"button\"\n ref={el => (this.cancelButton = el as HTMLButtonElement)}\n disabled={this.pending}\n onClick={this.handleCancel}\n >\n {this.cancelLabel}\n </button>\n <button\n class={{ 'confirm__button': true, 'confirm__button--confirm': true, 'confirm__button--danger': this.tone === 'danger' }}\n type=\"button\"\n ref={el => (this.confirmButton = el as HTMLButtonElement)}\n disabled={this.pending}\n aria-busy={this.pending ? 'true' : undefined}\n onClick={this.handleConfirm}\n >\n {this.confirmLabel}\n </button>\n </div>\n </ch-modal>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const chDescriptionListCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary)}:host([hidden]){display:none}.list{margin:0;display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:var(--spacing-sm) var(--spacing-2xl)}.list--columns-2,.list--columns-3{grid-template-columns:repeat(2, minmax(0, 1fr))}.list--columns-3{grid-template-columns:repeat(3, minmax(0, 1fr))}@media (max-width: 48rem){.list--columns-2,.list--columns-3{grid-template-columns:minmax(0, 1fr)}}::slotted(div){display:grid;grid-template-columns:fit-content(min(12rem, 40%)) minmax(0, 1fr);gap:var(--spacing-sm);align-items:baseline}::slotted(dt){font-family:var(--typography-heading);font-weight:var(--typography-weight-semibold);font-size:var(--typography-size-sm);color:var(--color-text-primary)}::slotted(dd){margin:0;font-size:var(--typography-size-sm);min-width:0;overflow-wrap:break-word}`;
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ const ChDescriptionList = class {
|
|
|
16
16
|
return COLUMNS.has(this.columns) ? this.columns : '1';
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '590fc24614ba9240d7708cff6cb6027eca5904bf' }, h("dl", { key: '868ee275cd6c792bff933c2429fe23985b9c30e3', class: `list list--columns-${this.columnCount}` }, h("slot", { key: '7433fcda6f0e6b2c738c790839169669c31bd266' }))));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
ChDescriptionList.style = chDescriptionListCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const chDividerCss = () => `:host{display:block}:host(.divider--vertical){display:inline-block;height:100%;align-self:stretch}.divider{margin:0;border:none;background:var(--border)}.divider--horizontal{width:100%;height:var(--border-width)}.divider--vertical{width:var(--border-width);height:100%}`;
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ const ChDivider = class {
|
|
|
11
11
|
*/
|
|
12
12
|
orientation = 'horizontal';
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '068a29854d312d17f5f5b768975996e1b8db9317', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: 'c2dca357f717b822caa028fae4c1d5e4709ae75c', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
ChDivider.style = chDividerCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
import { l as lockScroll, u as unlockScroll } from './scroll-lock-d8DfpzMR.js';
|
|
3
3
|
|
|
4
4
|
const chDrawerCss = () => `.drawer{position:fixed;inset:0;margin:0;box-sizing:border-box;flex-direction:column;gap:var(--spacing-2xl);width:min(24rem, 100vw);height:100vh;height:100dvh;max-width:100vw;max-height:100dvh;padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:0;background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md);overflow:hidden}.drawer[open]{display:flex}.drawer--start{inset:0 auto 0 0;border-inline-start:none;animation:drawer-in-start var(--duration-normal) var(--easing-default)}.drawer--end{inset:0 0 0 auto;border-inline-end:none;animation:drawer-in-end var(--duration-normal) var(--easing-default)}.drawer--top{inset:0 0 auto 0;width:100vw;height:auto;max-height:80dvh;border-block-start:none;animation:drawer-in-top var(--duration-normal) var(--easing-default)}.drawer--bottom{inset:auto 0 0 0;width:100vw;height:auto;max-height:80dvh;border-block-end:none;animation:drawer-in-bottom var(--duration-normal) var(--easing-default)}.drawer::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);flex:none}.drawer-body{flex:1;min-height:0;overflow-y:auto}::slotted([slot='footer']){display:flex;align-items:center;justify-content:flex-end;gap:var(--spacing-md);flex:none;padding-top:var(--spacing-2xl);border-top:var(--border-width) solid var(--border)}.drawer-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.drawer-close:hover{background:var(--surface-hover);color:var(--text)}.drawer-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@keyframes drawer-in-start{from{transform:translateX(-100%)}}@keyframes drawer-in-end{from{transform:translateX(100%)}}@keyframes drawer-in-top{from{transform:translateY(-100%)}}@keyframes drawer-in-bottom{from{transform:translateY(100%)}}@media (pointer: coarse){.drawer-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.drawer{animation:none}.drawer-close{transition:none}}`;
|
|
@@ -136,7 +136,7 @@ const ChDrawer = class {
|
|
|
136
136
|
this.chClose.emit();
|
|
137
137
|
};
|
|
138
138
|
render() {
|
|
139
|
-
return (h(Host, { key: '
|
|
139
|
+
return (h(Host, { key: 'f20d997fbaec9bcb5a4435c53bc893513e07bf05' }, h("dialog", { key: '216248a651d9fbd61c659da772cb2c1cd9cdb029', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '2d0f9c5a66ae0f609185479722236bfa35fc15ff', class: "drawer-head" }, h("slot", { key: '3e3fc15109e4e463cfcff4a96cffd943a0c48f3d', name: "header" }), this.closeLabel && (h("button", { key: 'a6e3b3d7ab9955cb9e84405c3313c85389bb1b5a', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: '2dcb7632e635f763c0973cdb4fb7fe8dfa09fd4b', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: '0a73837b9dcae4d31d7abb4cec14d93a9bbdec4a', class: "drawer-body" }, h("slot", { key: 'f9786b2da1062eeb7d7019b849508eb3a5fc83b7' })), h("slot", { key: '85e518742d2c5435ce50c52100d24576caae9a8b', name: "footer" }))));
|
|
140
140
|
}
|
|
141
141
|
static get watchers() { return {
|
|
142
142
|
"open": [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const aaaa = "aaaa";
|
|
4
4
|
const ameno = "ameno";
|
|
@@ -82,7 +82,7 @@ const ChEmoji = class {
|
|
|
82
82
|
this.loaded = true;
|
|
83
83
|
};
|
|
84
84
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: 'fd0f1f45a986a2668adb3cda893e4f6666f78eeb' }, h("img", { key: '207a6d2d6111fd13d724e4f3ce5dcc1d299f1228', class: {
|
|
86
86
|
'emoji': true,
|
|
87
87
|
[`emoji--${this.size}`]: true,
|
|
88
88
|
'emoji--hidden': !this.loaded,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const chEmptyStateCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary);text-align:center}:host([hidden]){display:none}.empty-state__inner{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-6xl) var(--spacing-2xl);border:var(--border-width) dashed var(--color-border-default);border-radius:var(--radius-md);background:var(--color-surface-default)}.empty-state--sm .empty-state__inner{padding:var(--spacing-3xl) var(--spacing-xl);gap:var(--spacing-xs)}.empty-state__icon{display:contents;font-size:var(--typography-size-xl);line-height:1}.empty-state__icon:empty{display:none}.empty-state__title{margin:0;font-family:var(--typography-heading);font-size:var(--typography-size-md);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.empty-state--md .empty-state__title{font-size:var(--typography-size-lg)}.empty-state__description{margin:0;max-width:36ch;font-size:var(--typography-size-sm);line-height:1.5}.empty-state__actions:empty{display:none}.empty-state__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm);justify-content:center;margin-top:var(--spacing-xs)}`;
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ const ChEmptyState = class {
|
|
|
21
21
|
*/
|
|
22
22
|
size = 'md';
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'ad3644cfbad791e9684b20b9776c8c68d15036e2', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, h("div", { key: '88479d9470be1db6d4d9968ad656297f06a2526c', class: "empty-state__inner" }, h("div", { key: '07b46c4f6e086921367b466df1b40eb3f49aeeac', class: "empty-state__icon", "aria-hidden": "true" }, h("slot", { key: 'f2b769787d5b2aaa04493157f39e20c164df2322', name: "icon" })), h("h3", { key: '83131b17b5dac383141f2997ac2dfdde2b620d16', class: "empty-state__title" }, this.title), this.description && h("p", { key: 'ca76152650118f55229ebac53c2963cb84982e77', class: "empty-state__description" }, this.description), h("div", { key: '552f1319198b0c182cace7956e84ddc9e837043e', class: "empty-state__actions" }, h("slot", { key: 'b99db3bfac784acf8389f100362371c3a44f4ace' })))));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
ChEmptyState.style = chEmptyStateCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const chGridCss = () => `:host{display:grid;grid-template-columns:var(--ch-grid-columns, repeat(auto-fit, minmax(min(16rem, 100%), 1fr)));box-sizing:border-box}:host([hidden]){display:none}.grid--gap-none{gap:0}.grid--gap-2xs{gap:var(--spacing-2xs)}.grid--gap-xs{gap:var(--spacing-xs)}.grid--gap-sm{gap:var(--spacing-sm)}.grid--gap-md{gap:var(--spacing-md)}.grid--gap-lg{gap:var(--spacing-lg)}.grid--gap-xl{gap:var(--spacing-xl)}.grid--gap-2xl{gap:var(--spacing-2xl)}.grid--gap-3xl{gap:var(--spacing-3xl)}.grid--gap-4xl{gap:var(--spacing-4xl)}.grid--gap-5xl{gap:var(--spacing-5xl)}.grid--gap-6xl{gap:var(--spacing-6xl)}`;
|
|
4
4
|
|
|
@@ -46,7 +46,7 @@ const ChGrid = class {
|
|
|
46
46
|
this.el.style.setProperty('--ch-grid-columns', template);
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '7e22752629d6e8dae0dd6ae05eb12aba96c97fc2', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, h("slot", { key: 'dc7286fa1b34610aa802afc7298422147d936cbd' })));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
ChGrid.style = chGridCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
import { c as chIcons } from './icons-CnivhwvG.js';
|
|
3
3
|
|
|
4
4
|
const chIconButtonCss = () => `:host{display:inline-block}.button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:var(--border-width) solid var(--border);border-radius:var(--radius-pill);background:transparent;color:var(--text);cursor:pointer;transition:background-color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default), color var(--duration-normal) var(--easing-default)}.button--sm{width:calc(var(--icon-size-sm) + 2 * var(--spacing-md));height:calc(var(--icon-size-sm) + 2 * var(--spacing-md))}.button--md{width:calc(var(--icon-size-md) + 2 * var(--spacing-xl));height:calc(var(--icon-size-md) + 2 * var(--spacing-xl))}.button--lg{width:calc(var(--icon-size-lg) + 2 * var(--spacing-2xl));height:calc(var(--icon-size-lg) + 2 * var(--spacing-2xl))}.button--sm .icon{width:var(--icon-size-sm);height:var(--icon-size-sm)}.button--md .icon{width:var(--icon-size-md);height:var(--icon-size-md)}.button--lg .icon{width:var(--icon-size-lg);height:var(--icon-size-lg)}.button:hover:not([aria-disabled='true']){border-color:var(--border-hover);background:var(--surface-hover)}.button:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.button[aria-disabled='true']{opacity:var(--opacity-disabled);cursor:not-allowed}.button[aria-busy='true']{cursor:progress}.button[aria-busy='true'] .icon{animation:ch-icon-button-spin var(--duration-spin) linear infinite}@keyframes ch-icon-button-spin{to{transform:rotate(360deg)}}@media (pointer: coarse){.button--sm{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.button{transition:none}.button[aria-busy='true'] .icon{animation:none}}`;
|
|
@@ -38,7 +38,7 @@ const ChIconButton = class {
|
|
|
38
38
|
};
|
|
39
39
|
render() {
|
|
40
40
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'eb744fa706b32c5ffca8b174f5cfc5e5cb546879' }, h("button", { key: 'a0923d38dc46adce13ae3d8e12426a419fe37c4a', class: `button button--${this.size}`, type: this.type, "aria-label": this.label, "aria-busy": this.loading ? 'true' : undefined, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.handleClick }, h("svg", { key: 'db67ffae9402ea67849f8b4aa487bf3fb152da63', class: "icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, (shapes ?? []).map(shape => h(shape.tag, shape.attrs))))));
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
ChIconButton.style = chIconButtonCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
import { c as chIcons } from './icons-CnivhwvG.js';
|
|
3
3
|
|
|
4
4
|
const chIconCss = () => `:host{display:inline-flex;line-height:0}.icon{display:block;flex:none;color:inherit}.icon--sm{width:var(--icon-size-sm);height:var(--icon-size-sm)}.icon--md{width:var(--icon-size-md);height:var(--icon-size-md)}.icon--lg{width:var(--icon-size-lg);height:var(--icon-size-lg)}`;
|
|
@@ -25,7 +25,7 @@ const ChIcon = class {
|
|
|
25
25
|
render() {
|
|
26
26
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
27
27
|
const decorative = !this.label;
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '4d1ec8879f2715fa6973c1e06de4109f68f7b439' }, h("svg", { key: 'e2a72cd9a83a9672e04484f042801041f80a2b81', class: `icon icon--${this.size}`, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", role: decorative ? undefined : 'img', "aria-label": this.label, "aria-hidden": decorative ? 'true' : undefined, focusable: "false" }, (shapes ?? []).map(shape => h(shape.tag, shape.attrs)))));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
ChIcon.style = chIconCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
|
|
3
3
|
const chLinkCss = () => `:host{display:inline}.link{color:var(--accent);font-weight:var(--typography-weight-semibold);text-decoration:var(--ch-link-text-decoration, underline);text-decoration-thickness:var(--border-width);text-underline-offset:var(--spacing-shift);border-radius:var(--radius-sm);transition:color var(--duration-normal) var(--easing-default), opacity var(--duration-normal) var(--easing-default)}.link:hover{color:var(--accent-hover)}.link:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.link--muted{color:var(--text-muted);text-decoration:none}.link--muted:hover{color:var(--text)}.link--disabled{color:var(--text-muted);text-decoration:none;opacity:var(--opacity-disabled);cursor:not-allowed}`;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
import { l as lockScroll, u as unlockScroll } from './scroll-lock-d8DfpzMR.js';
|
|
3
3
|
|
|
4
4
|
const chModalCss = () => `.modal{box-sizing:border-box;max-height:calc(100vh - var(--spacing-6xl));padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:var(--radius);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md)}.modal--sm{max-width:min(var(--ch-modal-width, 24rem), calc(100vw - var(--spacing-6xl)))}.modal--md{max-width:min(var(--ch-modal-width, 32rem), calc(100vw - var(--spacing-6xl)))}.modal--lg{max-width:min(var(--ch-modal-width, 48rem), calc(100vw - var(--spacing-6xl)))}.modal::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);margin-bottom:var(--spacing-2xl)}.modal-body{overflow-y:auto}.modal-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.modal-close:hover{background:var(--surface-hover);color:var(--text)}.modal-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.modal-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.modal-close{transition:none}}`;
|
|
@@ -138,7 +138,7 @@ const ChModal = class {
|
|
|
138
138
|
this.chClose.emit();
|
|
139
139
|
};
|
|
140
140
|
render() {
|
|
141
|
-
return (h(Host, { key: '
|
|
141
|
+
return (h(Host, { key: 'e9b0fe7e84f3de036e01f836bb431849b4486ab3' }, h("dialog", { key: '0c5017b5e773534c11a74504a0773ae555b32322', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: 'ae8988208ac3856792eff026e8ebd1f9e696b175', class: "modal-head" }, h("slot", { key: 'f7f231f4a5b8541ce2da8ea000b5ce95d58484b3', name: "heading" }), this.closeLabel && (h("button", { key: 'dbf0962e6244cff373887fa1e1501aaae6e15250', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'e7e1493a5eca9afb0f9fef279efdd5692157755a', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: '95b719095bac72ce64e6201ef4465c1173dfb16f', class: "modal-body" }, h("slot", { key: 'bad31888a31219e6dffd294ca18a749e9916c0f2' })))));
|
|
142
142
|
}
|
|
143
143
|
static get watchers() { return {
|
|
144
144
|
"open": [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
|
|
2
2
|
import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
|
|
3
3
|
|
|
4
4
|
const chNumberInputCss = () => `:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus,:host(:user-invalid) .input:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
|
|
@@ -203,10 +203,10 @@ const ChNumberInput = class {
|
|
|
203
203
|
}
|
|
204
204
|
render() {
|
|
205
205
|
const showError = this.isInvalid && this.errorMessage;
|
|
206
|
-
return (h(Host, { key: '
|
|
206
|
+
return (h(Host, { key: 'cf109ceb6d832f6c9dcedd666beee69fb4e434f6' }, this.label && (h("label", { key: 'cc6bb3e172738febaf91777499bd8f9c9e6c9701', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '44f4199e9d18f4dd3600183f2a4ba4e451013bc6', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid },
|
|
207
207
|
// `text` with `inputmode`, not `type="number"`: a number input drops
|
|
208
208
|
// partial values and cannot show grouped digits.
|
|
209
|
-
type: "text", inputMode: this.decimals ? 'decimal' : 'numeric', name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.typing ? this.draft : this.formatDisplay(this.value), "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur }), this.hint && !showError && (h("p", { key: '
|
|
209
|
+
type: "text", inputMode: this.decimals ? 'decimal' : 'numeric', name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.typing ? this.draft : this.formatDisplay(this.value), "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur }), this.hint && !showError && (h("p", { key: '30c755eee77a4fce6c04350e61ffa084a33a085d', class: "hint", id: this.hintId }, this.hint)), showError && (h("p", { key: '3bd96e7dae46ba2a16b23db0d7d1d528590468c9', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
210
210
|
}
|
|
211
211
|
static get formAssociated() { return true; }
|
|
212
212
|
static get watchers() { return {
|