@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
|
@@ -145,7 +145,7 @@ export class ChDrawer {
|
|
|
145
145
|
if (!this.label) {
|
|
146
146
|
warnMissingName(this.el, 'ch-drawer', 'pass label with the same text as the header');
|
|
147
147
|
}
|
|
148
|
-
return (h(Host, { key: '
|
|
148
|
+
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" }))));
|
|
149
149
|
}
|
|
150
150
|
static get is() { return "ch-drawer"; }
|
|
151
151
|
static get encapsulation() { return "shadow"; }
|
|
@@ -49,7 +49,7 @@ export class ChEmoji {
|
|
|
49
49
|
this.loaded = true;
|
|
50
50
|
};
|
|
51
51
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: 'fd0f1f45a986a2668adb3cda893e4f6666f78eeb' }, h("img", { key: '207a6d2d6111fd13d724e4f3ce5dcc1d299f1228', class: {
|
|
53
53
|
'emoji': true,
|
|
54
54
|
[`emoji--${this.size}`]: true,
|
|
55
55
|
'emoji--hidden': !this.loaded,
|
|
@@ -22,7 +22,7 @@ export class ChEmptyState {
|
|
|
22
22
|
*/
|
|
23
23
|
size = 'md';
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
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' })))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "ch-empty-state"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,7 +48,7 @@ export class ChGrid {
|
|
|
48
48
|
this.el.style.setProperty('--ch-grid-columns', template);
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '7e22752629d6e8dae0dd6ae05eb12aba96c97fc2', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, h("slot", { key: 'dc7286fa1b34610aa802afc7298422147d936cbd' })));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "ch-grid"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -28,7 +28,7 @@ export class ChIcon {
|
|
|
28
28
|
render() {
|
|
29
29
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
30
30
|
const decorative = !this.label;
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
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)))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "ch-icon"; }
|
|
34
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,7 +40,7 @@ export class ChIconButton {
|
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
42
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
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))))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "ch-icon-button"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|
|
@@ -107,7 +107,7 @@ export class ChInput {
|
|
|
107
107
|
return undefined;
|
|
108
108
|
}
|
|
109
109
|
render() {
|
|
110
|
-
return (h(Host, { key: '
|
|
110
|
+
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))));
|
|
111
111
|
}
|
|
112
112
|
static get is() { return "ch-input"; }
|
|
113
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -152,7 +152,7 @@ export class ChModal {
|
|
|
152
152
|
if (!this.label) {
|
|
153
153
|
warnMissingName(this.el, 'ch-modal', 'pass label with the same text as the heading');
|
|
154
154
|
}
|
|
155
|
-
return (h(Host, { key: '
|
|
155
|
+
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' })))));
|
|
156
156
|
}
|
|
157
157
|
static get is() { return "ch-modal"; }
|
|
158
158
|
static get encapsulation() { return "shadow"; }
|
|
@@ -204,10 +204,10 @@ export class ChNumberInput {
|
|
|
204
204
|
}
|
|
205
205
|
render() {
|
|
206
206
|
const showError = this.isInvalid && this.errorMessage;
|
|
207
|
-
return (h(Host, { key: '
|
|
207
|
+
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 },
|
|
208
208
|
// `text` with `inputmode`, not `type="number"`: a number input drops
|
|
209
209
|
// partial values and cannot show grouped digits.
|
|
210
|
-
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: '
|
|
210
|
+
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))));
|
|
211
211
|
}
|
|
212
212
|
static get is() { return "ch-number-input"; }
|
|
213
213
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.label {
|
|
7
|
+
display: block;
|
|
8
|
+
margin-bottom: var(--spacing-sm);
|
|
9
|
+
font-size: var(--typography-size-sm);
|
|
10
|
+
font-weight: var(--typography-weight-semibold);
|
|
11
|
+
color: var(--text);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.input {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding: var(--spacing-xl) var(--spacing-3xl);
|
|
18
|
+
border-radius: var(--radius);
|
|
19
|
+
border: var(--border-width) solid var(--border);
|
|
20
|
+
background: var(--surface);
|
|
21
|
+
color: var(--text);
|
|
22
|
+
backdrop-filter: blur(var(--effect-blur));
|
|
23
|
+
font-family: inherit;
|
|
24
|
+
font-size: inherit;
|
|
25
|
+
transition:
|
|
26
|
+
border-color var(--duration-normal) var(--easing-default),
|
|
27
|
+
box-shadow var(--duration-normal) var(--easing-default);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.input::placeholder {
|
|
31
|
+
color: var(--text-muted);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.input:focus {
|
|
35
|
+
border-color: var(--accent);
|
|
36
|
+
box-shadow: var(--shadow-focus-ring);
|
|
37
|
+
outline: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.input--invalid {
|
|
41
|
+
border-color: var(--color-status-warning);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.input--invalid:focus {
|
|
45
|
+
border-color: var(--color-status-warning);
|
|
46
|
+
box-shadow: 0 0 0 3px var(--color-status-warning-background);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([data-touched]:invalid) .input,
|
|
50
|
+
:host(:user-invalid) .input {
|
|
51
|
+
border-color: var(--color-status-warning);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([data-touched]:invalid) .input:focus,
|
|
55
|
+
:host(:user-invalid) .input:focus {
|
|
56
|
+
border-color: var(--color-status-warning);
|
|
57
|
+
box-shadow: 0 0 0 3px var(--color-status-warning-background);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.input:disabled {
|
|
61
|
+
opacity: var(--opacity-disabled);
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.hint,
|
|
66
|
+
.error {
|
|
67
|
+
margin: var(--spacing-sm) 0 0;
|
|
68
|
+
font-size: var(--typography-size-sm);
|
|
69
|
+
color: var(--text-muted);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.error {
|
|
73
|
+
color: var(--color-status-warning);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*
|
|
77
|
+
* One field, segmented by letter-spacing rather than by separate boxes: the
|
|
78
|
+
* value stays a single string the platform can autofill and people can paste.
|
|
79
|
+
*/
|
|
80
|
+
.input {
|
|
81
|
+
font-family: var(--typography-heading);
|
|
82
|
+
font-size: var(--typography-size-lg);
|
|
83
|
+
letter-spacing: 0.4em;
|
|
84
|
+
text-align: center;
|
|
85
|
+
font-variant-numeric: tabular-nums;
|
|
86
|
+
}
|