@devschile/chucao 2.4.0 → 2.6.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/README.md +17 -16
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/index.esm.js +1 -1
- package/dist/chucao/index.esm.js.map +1 -1
- package/dist/chucao/p-0409c063.entry.js +2 -0
- package/dist/chucao/p-0409c063.entry.js.map +1 -0
- package/dist/chucao/{p-1ebd9dc4.entry.js → p-090d26f1.entry.js} +2 -2
- package/dist/chucao/{p-84d875e9.entry.js → p-207648f9.entry.js} +2 -2
- package/dist/chucao/{p-b5552b50.entry.js → p-20ea1b18.entry.js} +2 -2
- package/dist/chucao/p-21ca2235.entry.js +2 -0
- package/dist/chucao/p-21ca2235.entry.js.map +1 -0
- package/dist/chucao/{p-1778a313.entry.js → p-2c1bc8bd.entry.js} +2 -2
- package/dist/chucao/{p-6e95f31f.entry.js → p-337d7f68.entry.js} +2 -2
- package/dist/chucao/p-370d9629.entry.js +2 -0
- package/dist/chucao/p-370d9629.entry.js.map +1 -0
- package/dist/chucao/{p-d0533af6.entry.js → p-50cbea7f.entry.js} +2 -2
- package/dist/chucao/p-66ae9e2c.entry.js +2 -0
- package/dist/chucao/p-66ae9e2c.entry.js.map +1 -0
- package/dist/chucao/p-79f20bfd.entry.js +2 -0
- package/dist/chucao/p-79f20bfd.entry.js.map +1 -0
- package/dist/chucao/{p-56d64d84.entry.js → p-7d4336bd.entry.js} +2 -2
- package/dist/chucao/p-81b6622f.entry.js +2 -0
- package/dist/chucao/p-81b6622f.entry.js.map +1 -0
- package/dist/chucao/{p-17451d92.entry.js → p-925af6b8.entry.js} +2 -2
- package/dist/chucao/p-95061461.entry.js +2 -0
- package/dist/chucao/{p-34a9d1f4.entry.js → p-9794a3fa.entry.js} +2 -2
- package/dist/chucao/p-CIV5Gg1o.js +3 -0
- package/dist/chucao/p-CIV5Gg1o.js.map +1 -0
- package/dist/chucao/p-CnivhwvG.js +2 -0
- package/dist/chucao/p-CnivhwvG.js.map +1 -0
- package/dist/chucao/{p-85db779c.entry.js → p-b56f4a29.entry.js} +2 -2
- package/dist/chucao/p-b9b47942.entry.js +2 -0
- package/dist/chucao/p-b9b47942.entry.js.map +1 -0
- package/dist/chucao/{p-449e1ba0.entry.js → p-c1b35f1b.entry.js} +2 -2
- package/dist/chucao/{p-0e3c83a6.entry.js → p-e2f725bd.entry.js} +2 -2
- package/dist/chucao/{p-7c85f5fe.entry.js → p-e6f959f4.entry.js} +2 -2
- package/dist/chucao/{p-907195ff.entry.js → p-f0aea6ed.entry.js} +2 -2
- package/dist/chucao/{p-a07e0e97.entry.js → p-f7305552.entry.js} +2 -2
- package/dist/chucao/p-ffaf1a31.entry.js +2 -0
- package/dist/chucao/p-ffaf1a31.entry.js.map +1 -0
- package/dist/cjs/ch-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ch-alert_8.cjs.entry.js +34 -10
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-cluster.cjs.entry.js +3 -3
- package/dist/cjs/ch-description-list.cjs.entry.js +29 -0
- package/dist/cjs/ch-description-list.cjs.entry.js.map +1 -0
- 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 +51 -0
- package/dist/cjs/ch-icon-button.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-icon.cjs.entry.js +38 -0
- package/dist/cjs/ch-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +2 -2
- package/dist/cjs/ch-page-header.cjs.entry.js +45 -0
- package/dist/cjs/ch-page-header.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 +46 -0
- package/dist/cjs/ch-stat.cjs.entry.js.map +1 -0
- 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 +20 -0
- package/dist/cjs/ch-timeline.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-tooltip.cjs.entry.js +206 -5
- package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/chucao.cjs.js +2 -2
- package/dist/cjs/icons-CNyDgV-q.js +88 -0
- package/dist/cjs/icons-CNyDgV-q.js.map +1 -0
- package/dist/cjs/{index-ysucLiAq.js → index-ByZY6aTj.js} +81 -5
- package/dist/cjs/index-ByZY6aTj.js.map +1 -0
- package/dist/cjs/index.cjs.js +16 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +12 -6
- package/dist/collection/components/ch-accordion/ch-accordion.js +1 -1
- package/dist/collection/components/ch-alert/ch-alert.css +13 -0
- package/dist/collection/components/ch-alert/ch-alert.js +44 -1
- package/dist/collection/components/ch-alert/ch-alert.js.map +1 -1
- package/dist/collection/components/ch-badge/ch-badge.css +30 -1
- package/dist/collection/components/ch-badge/ch-badge.js +35 -1
- package/dist/collection/components/ch-badge/ch-badge.js.map +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-description-list/ch-description-list.css +60 -0
- package/dist/collection/components/ch-description-list/ch-description-list.js +78 -0
- package/dist/collection/components/ch-description-list/ch-description-list.js.map +1 -0
- 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.css +25 -0
- package/dist/collection/components/ch-icon/ch-icon.js +121 -0
- package/dist/collection/components/ch-icon/ch-icon.js.map +1 -0
- package/dist/collection/components/ch-icon-button/ch-icon-button.css +99 -0
- package/dist/collection/components/ch-icon-button/ch-icon-button.js +216 -0
- package/dist/collection/components/ch-icon-button/ch-icon-button.js.map +1 -0
- 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-page-header/ch-page-header.css +84 -0
- package/dist/collection/components/ch-page-header/ch-page-header.js +162 -0
- package/dist/collection/components/ch-page-header/ch-page-header.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.css +68 -0
- package/dist/collection/components/ch-stat/ch-stat.js +151 -0
- package/dist/collection/components/ch-stat/ch-stat.js.map +1 -0
- package/dist/collection/components/ch-switch/ch-switch.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.css +54 -0
- package/dist/collection/components/ch-timeline/ch-timeline.js +43 -0
- package/dist/collection/components/ch-timeline/ch-timeline.js.map +1 -0
- package/dist/collection/components/ch-tooltip/ch-tooltip.css +29 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +127 -6
- package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -1
- package/dist/collection/tokens/tokens.js +12 -0
- package/dist/collection/tokens/tokens.js.map +1 -1
- package/dist/collection/tokens/types.js.map +1 -1
- package/dist/collection/utils/icons.js +82 -0
- package/dist/collection/utils/icons.js.map +1 -0
- package/dist/collection/utils/overlay.js +101 -0
- package/dist/collection/utils/overlay.js.map +1 -0
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.js +1 -1
- package/dist/components/ch-alert.js.map +1 -1
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-badge.js.map +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-card.js.map +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-cluster.js +1 -1
- package/dist/components/ch-description-list.d.ts +11 -0
- package/dist/components/ch-description-list.js +2 -0
- package/dist/components/ch-description-list.js.map +1 -0
- 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.d.ts +11 -0
- package/dist/components/ch-icon-button.js +2 -0
- package/dist/components/ch-icon-button.js.map +1 -0
- package/dist/components/ch-icon.d.ts +11 -0
- package/dist/components/ch-icon.js +2 -0
- package/dist/components/ch-icon.js.map +1 -0
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-modal.js +1 -1
- package/dist/components/ch-page-header.d.ts +11 -0
- package/dist/components/ch-page-header.js +2 -0
- package/dist/components/ch-page-header.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.d.ts +11 -0
- package/dist/components/ch-stat.js +2 -0
- package/dist/components/ch-stat.js.map +1 -0
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/ch-timeline.d.ts +11 -0
- package/dist/components/ch-timeline.js +2 -0
- package/dist/components/ch-timeline.js.map +1 -0
- package/dist/components/ch-tooltip.js +1 -1
- package/dist/components/ch-tooltip.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-CnivhwvG.js +2 -0
- package/dist/components/p-CnivhwvG.js.map +1 -0
- package/dist/components/{p-no2_9Jk-.js → p-Cw0b4OGc.js} +2 -2
- package/dist/components/p-qP_9qshx.js +2 -0
- package/dist/components/p-qP_9qshx.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +2 -2
- package/dist/esm/ch-alert_8.entry.js +34 -10
- package/dist/esm/ch-alert_8.entry.js.map +1 -1
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-cluster.entry.js +3 -3
- package/dist/esm/ch-description-list.entry.js +27 -0
- package/dist/esm/ch-description-list.entry.js.map +1 -0
- 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 +49 -0
- package/dist/esm/ch-icon-button.entry.js.map +1 -0
- package/dist/esm/ch-icon.entry.js +36 -0
- package/dist/esm/ch-icon.entry.js.map +1 -0
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +2 -2
- package/dist/esm/ch-page-header.entry.js +43 -0
- package/dist/esm/ch-page-header.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 +44 -0
- package/dist/esm/ch-stat.entry.js.map +1 -0
- 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 +18 -0
- package/dist/esm/ch-timeline.entry.js.map +1 -0
- package/dist/esm/ch-tooltip.entry.js +206 -5
- package/dist/esm/ch-tooltip.entry.js.map +1 -1
- package/dist/esm/chucao.js +3 -3
- package/dist/esm/icons-CnivhwvG.js +86 -0
- package/dist/esm/icons-CnivhwvG.js.map +1 -0
- package/dist/esm/{index-DVKZbUp9.js → index-CIV5Gg1o.js} +81 -6
- package/dist/esm/index-CIV5Gg1o.js.map +1 -0
- package/dist/esm/index.js +13 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-alert/ch-alert.d.ts +11 -0
- package/dist/types/components/ch-badge/ch-badge.d.ts +14 -0
- package/dist/types/components/ch-description-list/ch-description-list.d.ts +30 -0
- package/dist/types/components/ch-icon/ch-icon.d.ts +29 -0
- package/dist/types/components/ch-icon-button/ch-icon-button.d.ts +36 -0
- package/dist/types/components/ch-page-header/ch-page-header.d.ts +39 -0
- package/dist/types/components/ch-stat/ch-stat.d.ts +42 -0
- package/dist/types/components/ch-timeline/ch-timeline.d.ts +27 -0
- package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +34 -2
- package/dist/types/components.d.ts +718 -2
- package/dist/types/tokens/tokens.d.ts +12 -0
- package/dist/types/tokens/types.d.ts +2 -1
- package/dist/types/utils/icons.d.ts +15 -0
- package/dist/types/utils/overlay.d.ts +49 -0
- package/dist-react/components.d.ts +21 -1
- package/dist-react/components.js +54 -0
- package/dist-react/components.ts +73 -1
- package/dist-vue/index.d.ts +6 -0
- package/dist-vue/index.js +42 -1
- package/dist-vue/index.ts +54 -1
- package/hydrate/index.js +772 -35
- package/hydrate/index.mjs +772 -35
- package/package.json +104 -5
- package/dist/chucao/p-82216381.entry.js +0 -2
- package/dist/chucao/p-82216381.entry.js.map +0 -1
- package/dist/chucao/p-DVKZbUp9.js +0 -3
- package/dist/chucao/p-DVKZbUp9.js.map +0 -1
- package/dist/chucao/p-b392021c.entry.js +0 -2
- package/dist/chucao/p-b392021c.entry.js.map +0 -1
- package/dist/chucao/p-d776b092.entry.js +0 -2
- package/dist/cjs/index-ysucLiAq.js.map +0 -1
- package/dist/components/p-DQOKq7af.js +0 -2
- package/dist/components/p-DQOKq7af.js.map +0 -1
- package/dist/esm/index-DVKZbUp9.js.map +0 -1
- /package/dist/chucao/{p-1ebd9dc4.entry.js.map → p-090d26f1.entry.js.map} +0 -0
- /package/dist/chucao/{p-84d875e9.entry.js.map → p-207648f9.entry.js.map} +0 -0
- /package/dist/chucao/{p-b5552b50.entry.js.map → p-20ea1b18.entry.js.map} +0 -0
- /package/dist/chucao/{p-1778a313.entry.js.map → p-2c1bc8bd.entry.js.map} +0 -0
- /package/dist/chucao/{p-6e95f31f.entry.js.map → p-337d7f68.entry.js.map} +0 -0
- /package/dist/chucao/{p-d0533af6.entry.js.map → p-50cbea7f.entry.js.map} +0 -0
- /package/dist/chucao/{p-56d64d84.entry.js.map → p-7d4336bd.entry.js.map} +0 -0
- /package/dist/chucao/{p-17451d92.entry.js.map → p-925af6b8.entry.js.map} +0 -0
- /package/dist/chucao/{p-d776b092.entry.js.map → p-95061461.entry.js.map} +0 -0
- /package/dist/chucao/{p-34a9d1f4.entry.js.map → p-9794a3fa.entry.js.map} +0 -0
- /package/dist/chucao/{p-85db779c.entry.js.map → p-b56f4a29.entry.js.map} +0 -0
- /package/dist/chucao/{p-449e1ba0.entry.js.map → p-c1b35f1b.entry.js.map} +0 -0
- /package/dist/chucao/{p-0e3c83a6.entry.js.map → p-e2f725bd.entry.js.map} +0 -0
- /package/dist/chucao/{p-7c85f5fe.entry.js.map → p-e6f959f4.entry.js.map} +0 -0
- /package/dist/chucao/{p-907195ff.entry.js.map → p-f0aea6ed.entry.js.map} +0 -0
- /package/dist/chucao/{p-a07e0e97.entry.js.map → p-f7305552.entry.js.map} +0 -0
- /package/dist/components/{p-no2_9Jk-.js.map → p-Cw0b4OGc.js.map} +0 -0
|
@@ -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-CIV5Gg1o.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: '09a37640189b353bd109bce97ad684396f91a06d', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, h("slot", { key: 'e309fee76ea499e4c3b22082218d12fc94cb8fb8' })));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
ChGrid.style = chGridCss();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-CIV5Gg1o.js';
|
|
2
|
+
import { c as chIcons } from './icons-CnivhwvG.js';
|
|
3
|
+
|
|
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}}`;
|
|
5
|
+
|
|
6
|
+
const ChIconButton = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.chClick = createEvent(this, "chClick");
|
|
10
|
+
}
|
|
11
|
+
/** The glyph to draw. */
|
|
12
|
+
name;
|
|
13
|
+
/**
|
|
14
|
+
* Accessible name, set as `aria-label`. Required: say what the button does
|
|
15
|
+
* ("Eliminar producto"), not what the glyph is ("papelera").
|
|
16
|
+
*/
|
|
17
|
+
label;
|
|
18
|
+
/** Visual size. `md` matches the height of a default `ch-button`. */
|
|
19
|
+
size = 'md';
|
|
20
|
+
/** Native button type, defaulting to `button` so it never submits a form by accident. */
|
|
21
|
+
type = 'button';
|
|
22
|
+
disabled = false;
|
|
23
|
+
/**
|
|
24
|
+
* Blocks pointer and keyboard activation and marks the button `aria-busy`
|
|
25
|
+
* while keeping it focusable, so focus does not fall to `<body>` when an
|
|
26
|
+
* action completes.
|
|
27
|
+
*/
|
|
28
|
+
loading = false;
|
|
29
|
+
/** Emitted on click. A click while disabled or loading emits nothing. */
|
|
30
|
+
chClick;
|
|
31
|
+
handleClick = (event) => {
|
|
32
|
+
if (this.disabled || this.loading) {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
event.stopImmediatePropagation();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
this.chClick.emit(event);
|
|
38
|
+
};
|
|
39
|
+
render() {
|
|
40
|
+
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
41
|
+
return (h(Host, { key: '201ad628b28588bdf40baf822abc60b2c8b7c6f2' }, h("button", { key: '21fb01a8b6deef9e330ee2e3805834f5f2b8a953', 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: 'c003a3643d5968f08cf9227f768aea7b4817ab7d', 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
|
+
}
|
|
43
|
+
};
|
|
44
|
+
ChIconButton.style = chIconButtonCss();
|
|
45
|
+
|
|
46
|
+
export { ChIconButton as ch_icon_button };
|
|
47
|
+
//# sourceMappingURL=ch-icon-button.entry.js.map
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=ch-icon-button.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-icon-button.entry.js","sources":["src/components/ch-icon-button/ch-icon-button.css?tag=ch-icon-button&encapsulation=shadow","src/components/ch-icon-button/ch-icon-button.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius-pill);\n background: transparent;\n color: var(--text);\n cursor: pointer;\n transition:\n background-color var(--duration-normal) var(--easing-default),\n border-color var(--duration-normal) var(--easing-default),\n color var(--duration-normal) var(--easing-default);\n}\n\n/* Square hit area at each size, matching the height of the same-size ch-button\n so the two line up in a toolbar. */\n.button--sm {\n width: calc(var(--icon-size-sm) + 2 * var(--spacing-md));\n height: calc(var(--icon-size-sm) + 2 * var(--spacing-md));\n}\n\n.button--md {\n width: calc(var(--icon-size-md) + 2 * var(--spacing-xl));\n height: calc(var(--icon-size-md) + 2 * var(--spacing-xl));\n}\n\n.button--lg {\n width: calc(var(--icon-size-lg) + 2 * var(--spacing-2xl));\n height: calc(var(--icon-size-lg) + 2 * var(--spacing-2xl));\n}\n\n.button--sm .icon {\n width: var(--icon-size-sm);\n height: var(--icon-size-sm);\n}\n\n.button--md .icon {\n width: var(--icon-size-md);\n height: var(--icon-size-md);\n}\n\n.button--lg .icon {\n width: var(--icon-size-lg);\n height: var(--icon-size-lg);\n}\n\n.button:hover:not([aria-disabled='true']) {\n border-color: var(--border-hover);\n background: var(--surface-hover);\n}\n\n.button:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n/* Disabled stays focusable on purpose: dropping focus to <body> when an action\n completes is worse than a button that can still be read. */\n.button[aria-disabled='true'] {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.button[aria-busy='true'] {\n cursor: progress;\n}\n\n.button[aria-busy='true'] .icon {\n animation: ch-icon-button-spin var(--duration-spin) linear infinite;\n}\n\n@keyframes ch-icon-button-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (pointer: coarse) {\n .button--sm {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n\n .button[aria-busy='true'] .icon {\n animation: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nimport { chIcons, type ChIconName } from '../../utils/icons';\n\nexport type ChIconButtonSize = 'sm' | 'md' | 'lg';\n\n/**\n * A button whose only content is an icon.\n *\n * The label is required rather than optional. An icon-only button without an\n * accessible name is unusable by voice, screen reader or automation, and there\n * is no adjacent text to fall back on — the same reasoning as `ch-modal`, and\n * the reason this component exists instead of letting consumers bolt an icon\n * slot onto `ch-button` and forget the name.\n */\n@Component({\n tag: 'ch-icon-button',\n styleUrl: 'ch-icon-button.css',\n shadow: true,\n})\nexport class ChIconButton {\n /** The glyph to draw. */\n @Prop() name!: ChIconName;\n\n /**\n * Accessible name, set as `aria-label`. Required: say what the button does\n * (\"Eliminar producto\"), not what the glyph is (\"papelera\").\n */\n @Prop() label!: string;\n\n /** Visual size. `md` matches the height of a default `ch-button`. */\n @Prop() size: ChIconButtonSize = 'md';\n\n /** Native button type, defaulting to `button` so it never submits a form by accident. */\n @Prop() type: 'button' | 'submit' | 'reset' = 'button';\n\n @Prop() disabled = false;\n\n /**\n * Blocks pointer and keyboard activation and marks the button `aria-busy`\n * while keeping it focusable, so focus does not fall to `<body>` when an\n * action completes.\n */\n @Prop() loading = false;\n\n /** Emitted on click. A click while disabled or loading emits nothing. */\n @Event() chClick: EventEmitter<MouseEvent>;\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return;\n }\n this.chClick.emit(event);\n };\n\n render() {\n const shapes = this.name ? chIcons[this.name] : undefined;\n\n return (\n <Host>\n <button\n class={`button button--${this.size}`}\n type={this.type}\n aria-label={this.label}\n aria-busy={this.loading ? 'true' : undefined}\n aria-disabled={this.disabled ? 'true' : undefined}\n onClick={this.handleClick}\n >\n <svg\n class=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {(shapes ?? []).map(shape => h(shape.tag, shape.attrs))}\n </svg>\n </button>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,eAAe,GAAG,MAAM,CAAC,+rDAA+rD,CAAC;;MCoBltD,YAAY,GAAA,MAAA;;;;;;AAEf,IAAA,IAAI;AAEZ;;;AAGG;AACK,IAAA,KAAK;;IAGL,IAAI,GAAqB,IAAI;;IAG7B,IAAI,GAAkC,QAAQ;IAE9C,QAAQ,GAAG,KAAK;AAExB;;;;AAIG;IACK,OAAO,GAAG,KAAK;;AAGd,IAAA,OAAO;AAER,IAAA,WAAW,GAAG,CAAC,KAAiB,KAAI;QAC1C,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;YACjC,KAAK,CAAC,cAAc,EAAE;YACtB,KAAK,CAAC,wBAAwB,EAAE;YAChC;;AAEF,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1B,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS;AAEzD,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,eAAA,EAAkB,IAAI,CAAC,IAAI,CAAA,CAAE,EACpC,IAAI,EAAE,IAAI,CAAC,IAAI,gBACH,IAAI,CAAC,KAAK,EAAA,WAAA,EACX,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,mBAC7B,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,EACjD,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,EAEzB,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,MAAM,EACZ,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EAAA,cAAA,EACR,GAAG,EAAA,gBAAA,EACD,OAAO,EAAA,iBAAA,EACN,OAAO,EAAA,aAAA,EACX,MAAM,EAClB,SAAS,EAAC,OAAO,IAEhB,CAAC,MAAM,IAAI,EAAE,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACnD,CACC,CACJ;;;;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CIV5Gg1o.js';
|
|
2
|
+
import { c as chIcons } from './icons-CnivhwvG.js';
|
|
3
|
+
|
|
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)}`;
|
|
5
|
+
|
|
6
|
+
const ChIcon = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Which glyph to draw. Unknown values render nothing rather than throwing,
|
|
12
|
+
* so a stale name in a data payload cannot break the page.
|
|
13
|
+
*/
|
|
14
|
+
name;
|
|
15
|
+
/**
|
|
16
|
+
* `sm` is 16px, `md` is 20px and `lg` is 24px — the sizes the scale's line
|
|
17
|
+
* heights were built around.
|
|
18
|
+
*/
|
|
19
|
+
size = 'md';
|
|
20
|
+
/**
|
|
21
|
+
* Accessible name. When set, the icon becomes `role="img"` and is announced;
|
|
22
|
+
* when omitted it is `aria-hidden`.
|
|
23
|
+
*/
|
|
24
|
+
label;
|
|
25
|
+
render() {
|
|
26
|
+
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
27
|
+
const decorative = !this.label;
|
|
28
|
+
return (h(Host, { key: 'c5f0c415136db62b88cfdd17b1535ccabda92060' }, h("svg", { key: '55e4f5604d9a6b3e7727fb8354658928104ea156', 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
|
+
}
|
|
30
|
+
};
|
|
31
|
+
ChIcon.style = chIconCss();
|
|
32
|
+
|
|
33
|
+
export { ChIcon as ch_icon };
|
|
34
|
+
//# sourceMappingURL=ch-icon.entry.js.map
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ch-icon.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-icon.entry.js","sources":["src/components/ch-icon/ch-icon.css?tag=ch-icon&encapsulation=shadow","src/components/ch-icon/ch-icon.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n line-height: 0;\n}\n\n.icon {\n display: block;\n flex: none;\n color: inherit;\n}\n\n.icon--sm {\n width: var(--icon-size-sm);\n height: var(--icon-size-sm);\n}\n\n.icon--md {\n width: var(--icon-size-md);\n height: var(--icon-size-md);\n}\n\n.icon--lg {\n width: var(--icon-size-lg);\n height: var(--icon-size-lg);\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nimport { chIcons, type ChIconName } from '../../utils/icons';\n\nexport type ChIconSize = 'sm' | 'md' | 'lg';\n\n/**\n * A single Lucide glyph.\n *\n * Decorative by default: the icon is hidden from assistive technology unless\n * you give it a `label`, because most icons sit next to text that already says\n * what they mean and a second announcement is noise. Set `label` only when the\n * icon carries meaning on its own; a control whose only content is an icon\n * should use `ch-icon-button`, which requires the name.\n */\n@Component({\n tag: 'ch-icon',\n styleUrl: 'ch-icon.css',\n shadow: true,\n})\nexport class ChIcon {\n /**\n * Which glyph to draw. Unknown values render nothing rather than throwing,\n * so a stale name in a data payload cannot break the page.\n */\n @Prop() name!: ChIconName;\n\n /**\n * `sm` is 16px, `md` is 20px and `lg` is 24px — the sizes the scale's line\n * heights were built around.\n */\n @Prop() size: ChIconSize = 'md';\n\n /**\n * Accessible name. When set, the icon becomes `role=\"img\"` and is announced;\n * when omitted it is `aria-hidden`.\n */\n @Prop() label?: string;\n\n render() {\n const shapes = this.name ? chIcons[this.name] : undefined;\n const decorative = !this.label;\n\n return (\n <Host>\n <svg\n class={`icon icon--${this.size}`}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n role={decorative ? undefined : 'img'}\n aria-label={this.label}\n aria-hidden={decorative ? 'true' : undefined}\n focusable=\"false\"\n >\n {(shapes ?? []).map(shape => h(shape.tag, shape.attrs))}\n </svg>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,SAAS,GAAG,MAAM,CAAC,iRAAiR,CAAC;;MCoB9R,MAAM,GAAA,MAAA;;;;AACjB;;;AAGG;AACK,IAAA,IAAI;AAEZ;;;AAGG;IACK,IAAI,GAAe,IAAI;AAE/B;;;AAGG;AACK,IAAA,KAAK;IAEb,MAAM,GAAA;AACJ,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS;AACzD,QAAA,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,KAAK;QAE9B,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,IAAI,CAAA,CAAE,EAChC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EAAA,cAAA,EACR,GAAG,oBACD,OAAO,EAAA,iBAAA,EACN,OAAO,EACvB,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,KAAK,EAAA,YAAA,EACxB,IAAI,CAAC,KAAK,EAAA,aAAA,EACT,UAAU,GAAG,MAAM,GAAG,SAAS,EAC5C,SAAS,EAAC,OAAO,EAAA,EAEhB,CAAC,MAAM,IAAI,EAAE,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACnD,CACD;;;;;;;"}
|
|
@@ -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-CIV5Gg1o.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-CIV5Gg1o.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: '01e01a6927352410f85cb7022aa653482e52f010' }, h("dialog", { key: '166798e913c662fad6c517d3c5ac957b3d9a44cf', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '3d0766206306e7efe1c613313a99d049aea168ef', class: "modal-head" }, h("slot", { key: '9b50ec72180b64e7eef52dab2f9246eee1cbe788', name: "heading" }), this.closeLabel && (h("button", { key: 'd6c375363d9debb0c3858bb0dc1a67c816b24442', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: '128216aa8fca200775cd7ab28b23555bd516d1db', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'eebabfd71be502cc99e8337526cd31d4406d5eb8', class: "modal-body" }, h("slot", { key: '1bbc38d606a23c6b499a80a6695a1ee6334c414f' })))));
|
|
142
142
|
}
|
|
143
143
|
static get watchers() { return {
|
|
144
144
|
"open": [{
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CIV5Gg1o.js';
|
|
2
|
+
|
|
3
|
+
const chPageHeaderCss = () => `:host{display:block}.header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);padding-bottom:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.header-text{display:flex;flex-direction:column;gap:var(--spacing-xs);flex:1 1 20rem;min-width:0}.header-eyebrow{margin:0;color:var(--text-secondary);font-family:var(--font-heading);font-size:var(--typography-size-xs);letter-spacing:var(--typography-tracking-badge);text-transform:uppercase}.header-title{margin:0;color:var(--text);font-family:var(--font-heading);font-size:var(--typography-size-xl);font-weight:var(--typography-weight-bold);line-height:1.2;overflow-wrap:anywhere}.header-description{margin:0;color:var(--text-secondary);font-size:var(--typography-size-sm);line-height:1.5;overflow-wrap:anywhere}.header-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-md);max-width:100%}.header-actions:empty{display:none}.header--stacked .header-actions{flex-basis:100%}@media (max-width: 30rem){.header{flex-direction:column}.header-actions{width:100%}}@media (forced-colors: active){.header{border-bottom-color:CanvasText}}`;
|
|
4
|
+
|
|
5
|
+
const ChPageHeader = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The page title. Rendered as a real heading, so it also works as the
|
|
11
|
+
* accessible name of the page region.
|
|
12
|
+
*/
|
|
13
|
+
title;
|
|
14
|
+
/**
|
|
15
|
+
* Heading element to render. Use `h2` (or `h3`) when the page already has a
|
|
16
|
+
* higher-level heading above this block, so the document outline stays valid.
|
|
17
|
+
*/
|
|
18
|
+
headingLevel = 'h1';
|
|
19
|
+
/**
|
|
20
|
+
* Optional small label above the title, as slotted content. Use it for a
|
|
21
|
+
* section or entity kind ("Proyecto", "Factura #1042"), not for the title.
|
|
22
|
+
*/
|
|
23
|
+
eyebrow;
|
|
24
|
+
/**
|
|
25
|
+
* Optional supporting line under the title.
|
|
26
|
+
*/
|
|
27
|
+
description;
|
|
28
|
+
/**
|
|
29
|
+
* Puts the actions below the title instead of beside it. Use it when the
|
|
30
|
+
* actions are too wide to sit on the same row even after wrapping.
|
|
31
|
+
*/
|
|
32
|
+
actionsStacked = false;
|
|
33
|
+
render() {
|
|
34
|
+
const Heading = this.headingLevel;
|
|
35
|
+
return (h(Host, { key: '0e2bc8c10790e1f6f36a4c679579ac775f6ec3a4' }, h("div", { key: '8ef9876c61f0ff325fedfb899d2e09c02b8e5e53', class: { 'header': true, 'header--stacked': this.actionsStacked } }, h("div", { key: '3bef4d66f8d69397c4117e9d4a0637e978abbe2e', class: "header-text" }, this.eyebrow && h("p", { key: '1ae504669807c48d95d12ce5b7d488f85e5dc864', class: "header-eyebrow" }, this.eyebrow), h(Heading, { key: '9b6374d6b1d18124e49acf67af08443175f4bbaa', class: "header-title" }, this.title), this.description && h("p", { key: '9c3d2d58f1c2dde2c70fc5f86eb2d580a13f8594', class: "header-description" }, this.description)), h("div", { key: '3b48c89c2a8c4c5d3e42f6b78db80b3e9c2e0c50', class: "header-actions" }, h("slot", { key: '77b2010fec0113af7c8ee7c7bcd884dd11b05138', name: "actions" })))));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
ChPageHeader.style = chPageHeaderCss();
|
|
39
|
+
|
|
40
|
+
export { ChPageHeader as ch_page_header };
|
|
41
|
+
//# sourceMappingURL=ch-page-header.entry.js.map
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=ch-page-header.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-page-header.entry.js","sources":["src/components/ch-page-header/ch-page-header.css?tag=ch-page-header&encapsulation=shadow","src/components/ch-page-header/ch-page-header.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.header {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--spacing-2xl);\n padding-bottom: var(--spacing-2xl);\n border-bottom: var(--border-width) solid var(--border);\n}\n\n.header-text {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-xs);\n /* Lets a long, unbroken title shrink instead of pushing the actions off the\n row at narrow widths. */\n flex: 1 1 20rem;\n min-width: 0;\n}\n\n.header-eyebrow {\n margin: 0;\n color: var(--text-secondary);\n font-family: var(--font-heading);\n font-size: var(--typography-size-xs);\n letter-spacing: var(--typography-tracking-badge);\n text-transform: uppercase;\n}\n\n.header-title {\n margin: 0;\n color: var(--text);\n font-family: var(--font-heading);\n font-size: var(--typography-size-xl);\n font-weight: var(--typography-weight-bold);\n line-height: 1.2;\n overflow-wrap: anywhere;\n}\n\n.header-description {\n margin: 0;\n color: var(--text-secondary);\n font-size: var(--typography-size-sm);\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n.header-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-md);\n /* Never wider than the row: the actions wrap inside it rather than forcing\n horizontal overflow on a 390px screen. */\n max-width: 100%;\n}\n\n.header-actions:empty {\n display: none;\n}\n\n.header--stacked .header-actions {\n flex-basis: 100%;\n}\n\n@media (max-width: 30rem) {\n .header {\n flex-direction: column;\n }\n\n .header-actions {\n width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n .header {\n border-bottom-color: CanvasText;\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChPageHeaderHeadingLevel = 'h1' | 'h2' | 'h3';\n\n/**\n * The heading block at the top of a page: title, optional eyebrow and\n * description, and a trailing actions area.\n *\n * The title is a `title` prop rather than a slot so the heading level always\n * matches the page. A slotted heading lets a consumer nest a second `h1`, and\n * \"one top-level heading per page\" then depends on every caller remembering it;\n * here the level is explicit and defaults to `h1`. The actions wrap rather than\n * push the page sideways at 390px, and the DOM order keeps the heading before\n * the actions so reading and focus order still start with the title.\n */\n@Component({\n tag: 'ch-page-header',\n styleUrl: 'ch-page-header.css',\n shadow: true,\n})\nexport class ChPageHeader {\n /**\n * The page title. Rendered as a real heading, so it also works as the\n * accessible name of the page region.\n */\n @Prop() title!: string;\n\n /**\n * Heading element to render. Use `h2` (or `h3`) when the page already has a\n * higher-level heading above this block, so the document outline stays valid.\n */\n @Prop() headingLevel: ChPageHeaderHeadingLevel = 'h1';\n\n /**\n * Optional small label above the title, as slotted content. Use it for a\n * section or entity kind (\"Proyecto\", \"Factura #1042\"), not for the title.\n */\n @Prop() eyebrow?: string;\n\n /**\n * Optional supporting line under the title.\n */\n @Prop() description?: string;\n\n /**\n * Puts the actions below the title instead of beside it. Use it when the\n * actions are too wide to sit on the same row even after wrapping.\n */\n @Prop() actionsStacked = false;\n\n render() {\n const Heading = this.headingLevel;\n\n return (\n <Host>\n <div class={{ 'header': true, 'header--stacked': this.actionsStacked }}>\n <div class=\"header-text\">\n {this.eyebrow && <p class=\"header-eyebrow\">{this.eyebrow}</p>}\n <Heading class=\"header-title\">{this.title}</Heading>\n {this.description && <p class=\"header-description\">{this.description}</p>}\n </div>\n <div class=\"header-actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,eAAe,GAAG,MAAM,CAAC,opCAAopC,CAAC;;MCoBvqC,YAAY,GAAA,MAAA;;;;AACvB;;;AAGG;AACK,IAAA,KAAK;AAEb;;;AAGG;IACK,YAAY,GAA6B,IAAI;AAErD;;;AAGG;AACK,IAAA,OAAO;AAEf;;AAEG;AACK,IAAA,WAAW;AAEnB;;;AAGG;IACK,cAAc,GAAG,KAAK;IAE9B,MAAM,GAAA;AACJ,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY;AAEjC,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,cAAc,EAAE,EAAA,EACpE,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,aAAa,EAAA,EACrB,IAAI,CAAC,OAAO,IAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,gBAAgB,EAAA,EAAE,IAAI,CAAC,OAAO,CAAK,EAC7D,CAAA,CAAC,OAAO,qDAAC,KAAK,EAAC,cAAc,EAAA,EAAE,IAAI,CAAC,KAAK,CAAW,EACnD,IAAI,CAAC,WAAW,IAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,oBAAoB,EAAA,EAAE,IAAI,CAAC,WAAW,CAAK,CACrE,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,gBAAgB,EAAA,EACzB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,CACxB,CACF,CACD;;;;;;;"}
|
|
@@ -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-CIV5Gg1o.js';
|
|
2
2
|
import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
|
|
3
3
|
|
|
4
4
|
const chRadioCss = () => `:host{display:inline-block}.group-label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.radio-group{display:flex;flex-direction:column;gap:var(--spacing-lg)}.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:50%;background:var(--surface);cursor:pointer;transition:border-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)}.input:checked::before{content:'';width:var(--spacing-md);height:var(--spacing-md);border-radius:50%;background:var(--accent)}.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)}`;
|
|
@@ -112,7 +112,7 @@ const ChRadio = class {
|
|
|
112
112
|
}
|
|
113
113
|
render() {
|
|
114
114
|
const groupName = this.name || `${this.groupId}-group`;
|
|
115
|
-
return (h(Host, { key: '
|
|
115
|
+
return (h(Host, { key: 'f55466f6bcbe3283d294161c02498419066ca958' }, this.label && (h("span", { key: '789131e7d8812ee930db5e0a0c6dc7f7e353249f', class: "group-label", id: this.labelId }, this.label)), h("div", { key: 'fc0a7adbde7feaaca99d156d45aacb6d18d5588e', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, h("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { class: "mark" }), h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '53f3e9d368cfefa9a4d85010b65f002a3b92e0f4', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '517b7204ebf91042d293be294d7e936954eb80fb', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
116
116
|
}
|
|
117
117
|
static get formAssociated() { return true; }
|
|
118
118
|
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-CIV5Gg1o.js';
|
|
2
2
|
import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
|
|
3
3
|
|
|
4
4
|
const chSegmentedControlCss = () => `:host{display:inline-block;max-width:100%}.group-label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.segmented{display:inline-flex;align-items:stretch;max-width:100%;padding:var(--spacing-2xs);border:var(--border-width) solid var(--border);border-radius:var(--radius-pill);background:var(--surface)}.control{position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-pill);cursor:pointer;transition:background-color var(--duration-normal) var(--easing-default)}.control:hover:not(.control--disabled){background:var(--surface-hover)}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{position:absolute;inset:0;margin:0;opacity:0;cursor:inherit}.input:checked~.label-text{background:var(--accent);color:var(--color-accent-text);font-weight:var(--typography-weight-semibold)}.input:focus-visible~.label-text{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.label-text{display:block;padding:var(--spacing-2xs) var(--spacing-3xl);border-radius:inherit;font-size:var(--typography-size-sm);white-space:nowrap;transition:background-color var(--duration-normal) var(--easing-default), color var(--duration-normal) var(--easing-default)}.segmented--sm .label-text{padding:var(--spacing-2xs) var(--spacing-2xl);font-size:var(--typography-size-xs)}:host([data-touched]:invalid) .segmented,:host(:user-invalid) .segmented{border-color:var(--color-status-warning)}@media (prefers-reduced-motion: reduce){.control,.label-text{transition:none}}`;
|
|
@@ -91,7 +91,7 @@ const ChSegmentedControl = class {
|
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
93
|
const groupName = this.name || `${this.groupId}-group`;
|
|
94
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: 'a8782886fd0c20fa96a5a54c9997fe9d91d3e670' }, this.label && (h("span", { key: '99a2727035a62f71d01f07e0cf222becb118d3b2', class: "group-label", id: this.labelId }, this.label)), h("div", { key: '31b293c379a996e06650c1a6c9fe9c46c32097a2', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, h("input", { class: "input", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), h("span", { class: "label-text" }, option.label)))))));
|
|
95
95
|
}
|
|
96
96
|
static get formAssociated() { return true; }
|
|
97
97
|
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-CIV5Gg1o.js';
|
|
2
2
|
|
|
3
3
|
const chSkeletonCss = () => `:host{display:block;width:100%}:host([hidden]){display:none}:host(.skeleton--circle){width:auto;display:inline-flex}.skeleton__item{display:block;background:var(--color-surface-default);border-radius:var(--radius-sm)}.skeleton--circle .skeleton__item{border-radius:50%}.skeleton--rect .skeleton__item{border-radius:var(--radius-md)}.skeleton--animated .skeleton__item{background-image:linear-gradient(90deg, transparent 0%, var(--color-surface-hover) 50%, transparent 100%);background-size:200% 100%;background-repeat:no-repeat;animation:ch-skeleton-shimmer 1.4s ease-in-out infinite}@keyframes ch-skeleton-shimmer{from{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.skeleton--animated .skeleton__item{animation:none;background-image:none}}`;
|
|
4
4
|
|
|
@@ -45,7 +45,7 @@ const ChSkeleton = class {
|
|
|
45
45
|
return { width: this.width, height: this.height };
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '705e4cd6dac9c8c8578cb8133a700c3297d9fffe', "aria-hidden": "true", class: { 'skeleton': true, [`skeleton--${this.shape}`]: true, 'skeleton--animated': this.animated } }, Array.from({ length: this.items }).map((value, index) => (h("span", { class: "skeleton__item", style: this.sizeStyle, key: index, "data-index": String(value) })))));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
ChSkeleton.style = chSkeletonCss();
|
|
@@ -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-CIV5Gg1o.js';
|
|
2
2
|
|
|
3
3
|
const chStackCss = () => `:host{display:flex;flex-direction:column;box-sizing:border-box}:host([hidden]){display:none}.stack--gap-none{gap:0}.stack--gap-2xs{gap:var(--spacing-2xs)}.stack--gap-xs{gap:var(--spacing-xs)}.stack--gap-sm{gap:var(--spacing-sm)}.stack--gap-md{gap:var(--spacing-md)}.stack--gap-lg{gap:var(--spacing-lg)}.stack--gap-xl{gap:var(--spacing-xl)}.stack--gap-2xl{gap:var(--spacing-2xl)}.stack--gap-3xl{gap:var(--spacing-3xl)}.stack--gap-4xl{gap:var(--spacing-4xl)}.stack--gap-5xl{gap:var(--spacing-5xl)}.stack--gap-6xl{gap:var(--spacing-6xl)}.stack--align-stretch{align-items:stretch}.stack--align-start{align-items:flex-start}.stack--align-center{align-items:center}.stack--align-end{align-items:flex-end}.stack--justify-start{justify-content:flex-start}.stack--justify-center{justify-content:center}.stack--justify-end{justify-content:flex-end}.stack--justify-between{justify-content:space-between}.stack--justify-around{justify-content:space-around}`;
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ const ChStack = class {
|
|
|
24
24
|
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: 'd4ee90331cd1ff0d65eb9c80aa684d3b2f5e2876', class: { stack: true, [`stack--gap-${this.gapStep}`]: true, [`stack--align-${this.align}`]: true, [`stack--justify-${this.justify}`]: true } }, h("slot", { key: 'bdfe358adc457ed6ba79ca80b9e96f17597fbcb5' })));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
ChStack.style = chStackCss();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CIV5Gg1o.js';
|
|
2
|
+
|
|
3
|
+
const chStatCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-primary)}:host([hidden]){display:none}.stat__inner{display:flex;flex-direction:column;gap:var(--spacing-2xs);padding:var(--spacing-md) var(--spacing-lg);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-md);background:var(--color-surface-default)}.stat__label{font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);letter-spacing:0.06em;text-transform:uppercase;color:var(--color-text-secondary)}.stat__value{font-family:var(--typography-heading);font-size:var(--typography-size-xl);font-weight:var(--typography-weight-bold);font-variant-numeric:tabular-nums;display:flex;align-items:baseline;gap:var(--spacing-2xs)}.stat__cue{font-size:var(--typography-size-md)}.stat__value--positive{color:var(--color-status-positive)}.stat__value--negative{color:var(--color-status-negative)}.stat__value--unavailable{color:var(--color-text-tertiary);font-style:italic}.stat__hint{font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.stat__footer:empty{display:none}.stat__footer{margin-top:var(--spacing-2xs)}`;
|
|
4
|
+
|
|
5
|
+
const TONES = new Set(['default', 'positive', 'negative', 'unavailable']);
|
|
6
|
+
const ChStat = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Short label naming the metric, rendered in small caps above the value.
|
|
12
|
+
*/
|
|
13
|
+
label;
|
|
14
|
+
/**
|
|
15
|
+
* The metric value, already formatted by the consumer. Shown verbatim.
|
|
16
|
+
*/
|
|
17
|
+
value;
|
|
18
|
+
/**
|
|
19
|
+
* Secondary line under the value — a comparison or a unit note.
|
|
20
|
+
*/
|
|
21
|
+
hint;
|
|
22
|
+
/**
|
|
23
|
+
* Visual tone of the value. `positive` and `negative` add a sign cue so
|
|
24
|
+
* the tone survives greyscale; `unavailable` dims the value for the
|
|
25
|
+
* "could not be measured" case. An unknown value falls back to `default`.
|
|
26
|
+
*/
|
|
27
|
+
tone = 'default';
|
|
28
|
+
get toneClass() {
|
|
29
|
+
return TONES.has(this.tone) ? this.tone : 'default';
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
const cue = this.toneClass === 'positive' ? '+' : this.toneClass === 'negative' ? '−' : null;
|
|
33
|
+
return (h(Host, { key: '5a43c713faab1513866d8f06899bb3fd3184cf09', class: "stat" }, h("div", { key: '9c24e9774cfe0a70b8ba37c06ce7f264b34a9d8c', class: "stat__inner" }, h("span", { key: '1a9330c2b31ec6de29f1b8c77761d7eb16160aae', class: "stat__label" }, this.label), h("span", { key: '3f6c5e76f5c062effcb9793206a949942bcdfb9a', class: {
|
|
34
|
+
stat__value: true,
|
|
35
|
+
[`stat__value--${this.toneClass}`]: this.toneClass !== 'default',
|
|
36
|
+
} }, cue && (h("span", { key: 'b5f79899ec52e7e2b3ec3c00295f755f770a8bca', class: "stat__cue", "aria-hidden": "true" }, cue)), h("slot", { key: 'b64083aa5738b4088cf9029650286b2564649ec9', name: "value" }, this.value)), this.hint && h("span", { key: '9f560c1f1fd23f08ea63eccc9076066a7fd1a0f9', class: "stat__hint" }, this.hint), h("div", { key: '77f3fe1f87e3abc2cce829e06b21f6b2c5f9aa15', class: "stat__footer" }, h("slot", { key: 'd75204702eab0ab1f55df92e9c13c899235f6840', name: "footer" })))));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
ChStat.style = chStatCss();
|
|
40
|
+
|
|
41
|
+
export { ChStat as ch_stat };
|
|
42
|
+
//# sourceMappingURL=ch-stat.entry.js.map
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=ch-stat.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-stat.entry.js","sources":["src/components/ch-stat/ch-stat.css?tag=ch-stat&encapsulation=shadow","src/components/ch-stat/ch-stat.tsx"],"sourcesContent":[":host {\n display: block;\n font-family: var(--typography-body);\n color: var(--color-text-primary);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.stat__inner {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2xs);\n padding: var(--spacing-md) var(--spacing-lg);\n border: var(--border-width) solid var(--color-border-default);\n border-radius: var(--radius-md);\n background: var(--color-surface-default);\n}\n\n.stat__label {\n font-size: var(--typography-size-xs);\n font-weight: var(--typography-weight-semibold);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--color-text-secondary);\n}\n\n.stat__value {\n font-family: var(--typography-heading);\n font-size: var(--typography-size-xl);\n font-weight: var(--typography-weight-bold);\n font-variant-numeric: tabular-nums;\n display: flex;\n align-items: baseline;\n gap: var(--spacing-2xs);\n}\n\n/* The sign cue carries the tone in greyscale; colour only reinforces it. */\n.stat__cue {\n font-size: var(--typography-size-md);\n}\n\n.stat__value--positive {\n color: var(--color-status-positive);\n}\n\n.stat__value--negative {\n color: var(--color-status-negative);\n}\n\n.stat__value--unavailable {\n color: var(--color-text-tertiary);\n font-style: italic;\n}\n\n.stat__hint {\n font-size: var(--typography-size-sm);\n color: var(--color-text-secondary);\n}\n\n.stat__footer:empty {\n display: none;\n}\n\n.stat__footer {\n margin-top: var(--spacing-2xs);\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChStatTone = 'default' | 'positive' | 'negative' | 'unavailable';\n\nconst TONES = new Set(['default', 'positive', 'negative', 'unavailable']);\n\n/**\n * One dashboard metric: a label, a value and an optional hint.\n *\n * The value is a string the consumer has already formatted — the component\n * never parses numbers, so locale, currency and precision stay where the\n * data comes from. On a fetch error, pass the em dash and the unavailable\n * tone rather than a zero that would read as a real measurement:\n *\n * ```html\n * <ch-stat label=\"Ventas del mes\" value=\"$1.250.000\" tone=\"positive\"></ch-stat>\n * <ch-stat label=\"Ticket promedio\" value=\"—\" tone=\"unavailable\"></ch-stat>\n * ```\n *\n * A tone is never carried by colour alone: positive and negative values get\n * a visible sign cue, so the three states stay distinguishable in greyscale\n * and for colour-blind users. The `value` slot replaces the rendered value\n * for composed content (a link, a spinner), and the `footer` slot sits under\n * the hint for a comparison line or a sparkline.\n */\n@Component({\n tag: 'ch-stat',\n styleUrl: 'ch-stat.css',\n shadow: true,\n})\nexport class ChStat {\n /**\n * Short label naming the metric, rendered in small caps above the value.\n */\n @Prop() label!: string;\n\n /**\n * The metric value, already formatted by the consumer. Shown verbatim.\n */\n @Prop() value!: string;\n\n /**\n * Secondary line under the value — a comparison or a unit note.\n */\n @Prop() hint?: string;\n\n /**\n * Visual tone of the value. `positive` and `negative` add a sign cue so\n * the tone survives greyscale; `unavailable` dims the value for the\n * \"could not be measured\" case. An unknown value falls back to `default`.\n */\n @Prop() tone: ChStatTone = 'default';\n\n private get toneClass() {\n return TONES.has(this.tone) ? this.tone : 'default';\n }\n\n render() {\n const cue = this.toneClass === 'positive' ? '+' : this.toneClass === 'negative' ? '−' : null;\n\n return (\n <Host class=\"stat\">\n <div class=\"stat__inner\">\n <span class=\"stat__label\">{this.label}</span>\n <span\n class={{\n stat__value: true,\n [`stat__value--${this.toneClass}`]: this.toneClass !== 'default',\n }}\n >\n {cue && (\n <span class=\"stat__cue\" aria-hidden=\"true\">\n {cue}\n </span>\n )}\n <slot name=\"value\">{this.value}</slot>\n </span>\n {this.hint && <span class=\"stat__hint\">{this.hint}</span>}\n <div class=\"stat__footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,SAAS,GAAG,MAAM,CAAC,soCAAsoC,CAAC;;ACIhqC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;MA0B5D,MAAM,GAAA,MAAA;;;;AACjB;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;AACK,IAAA,IAAI;AAEZ;;;;AAIG;IACK,IAAI,GAAe,SAAS;AAEpC,IAAA,IAAY,SAAS,GAAA;AACnB,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS;;IAGrD,MAAM,GAAA;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,KAAK,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,KAAK,UAAU,GAAG,GAAG,GAAG,IAAI;QAE5F,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAC,MAAM,EAAA,EAChB,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,aAAa,EAAA,EACtB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,KAAK,CAAQ,EAC7C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,IAAI;gBACjB,CAAC,CAAA,aAAA,EAAgB,IAAI,CAAC,SAAS,CAAA,CAAE,GAAG,IAAI,CAAC,SAAS,KAAK,SAAS;aACjE,EAAA,EAEA,GAAG,KACF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,WAAW,EAAA,aAAA,EAAa,MAAM,EAAA,EACvC,GAAG,CACC,CACR,EACD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,OAAO,EAAA,EAAE,IAAI,CAAC,KAAK,CAAQ,CACjC,EACN,IAAI,CAAC,IAAI,IAAI,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,YAAY,EAAA,EAAE,IAAI,CAAC,IAAI,CAAQ,EACzD,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,cAAc,EAAA,EACvB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,EAAA,CAAQ,CACvB,CACF,CACD;;;;;;;"}
|
|
@@ -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-CIV5Gg1o.js';
|
|
2
2
|
|
|
3
3
|
const chTabsCss = () => `:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;
|
|
4
4
|
|
|
@@ -84,7 +84,7 @@ const ChTabs = class {
|
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
86
|
const active = this.activeValue;
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: 'de167280c159345631f84f5eb7a3dc165396f361' }, h("div", { key: '62c008bcf9eafd1c5f5121540b2841e2a6ada541', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
88
88
|
const selected = tab.value === active;
|
|
89
89
|
return (h("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
|
|
90
90
|
})), this.tabs.map(tab => (h("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, h("slot", { name: `panel-${tab.value}` }))))));
|
|
@@ -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-CIV5Gg1o.js';
|
|
2
2
|
import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
|
|
3
3
|
|
|
4
4
|
const chTextareaCss = () => `: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)}.textarea{box-sizing:border-box;width:100%;min-height:var(--spacing-6xl);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;line-height:var(--spacing-5xl);resize:vertical;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.textarea::placeholder{color:var(--text-muted)}.textarea:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.textarea--invalid{border-color:var(--color-status-warning)}.textarea--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .textarea,:host(:user-invalid) .textarea{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .textarea:focus,:host(:user-invalid) .textarea:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.textarea: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)}`;
|
|
@@ -123,7 +123,7 @@ const ChTextarea = class {
|
|
|
123
123
|
return undefined;
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: 'c4334a23f6ad2394d410498726f3f422a654ffe3' }, this.label && (h("label", { key: 'd935613b40c6c52be41e258aad2a3c17a290a506', class: "label", htmlFor: this.textareaId }, this.label)), h("textarea", { key: 'ab27ae9a6be7d2bcc17638c209ef23eb3757c102', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, 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: 'eb488704ac6ff76534308aefd0938d848d14608f', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '04c084b29d102f06bf15efc4c416b6ba0967ba8d', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
127
127
|
}
|
|
128
128
|
static get formAssociated() { return true; }
|
|
129
129
|
static get watchers() { return {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CIV5Gg1o.js';
|
|
2
|
+
|
|
3
|
+
const chTimelineCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary)}:host([hidden]){display:none}.list{margin:0;padding:0;display:grid;gap:var(--spacing-md);list-style:none}::slotted(li){position:relative;padding-left:var(--spacing-2xl);min-width:0}::slotted(li)::before{content:'';position:absolute;left:0;top:0.35em;width:var(--spacing-sm);height:var(--spacing-sm);border-radius:50%;background:var(--color-border-default)}::slotted(li:not(:last-of-type))::after{content:'';position:absolute;left:calc(var(--spacing-sm) / 2 - var(--border-width));top:calc(0.35em + var(--spacing-sm));bottom:calc(0px - var(--spacing-md));width:var(--border-width);background:var(--color-border-default)}::slotted(time){font-variant-numeric:tabular-nums}`;
|
|
4
|
+
|
|
5
|
+
const ChTimeline = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, { key: 'da3288af540acb92113ba83d08fc5e1693e83b3e', class: "timeline" }, h("ol", { key: '1aaee846703dd0a67d6df04945eb4a62e2bbf711', class: "list" }, h("slot", { key: '394cfd03640a2cf78bd620338de9ed9ef7b9d9f5' }))));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
ChTimeline.style = chTimelineCss();
|
|
14
|
+
|
|
15
|
+
export { ChTimeline as ch_timeline };
|
|
16
|
+
//# sourceMappingURL=ch-timeline.entry.js.map
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=ch-timeline.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-timeline.entry.js","sources":["src/components/ch-timeline/ch-timeline.css?tag=ch-timeline&encapsulation=shadow","src/components/ch-timeline/ch-timeline.tsx"],"sourcesContent":[":host {\n display: block;\n font-family: var(--typography-body);\n color: var(--color-text-secondary);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.list {\n margin: 0;\n padding: 0;\n display: grid;\n gap: var(--spacing-md);\n /* Reserve the rail: every item indents past its marker. */\n list-style: none;\n}\n\n/* Each slotted item indents past its dot; pseudo-elements on slotted\n * content are part of the shadow stylesheet's remit here. */\n::slotted(li) {\n position: relative;\n padding-left: var(--spacing-2xl);\n min-width: 0;\n}\n\n/* The marker dot, vertically on the item's first line. */\n::slotted(li)::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0.35em;\n width: var(--spacing-sm);\n height: var(--spacing-sm);\n border-radius: 50%;\n background: var(--color-border-default);\n}\n\n/* The connector to the next item; the last item never gets one, so the\n * timeline does not trail off into nothing. */\n::slotted(li:not(:last-of-type))::after {\n content: '';\n position: absolute;\n left: calc(var(--spacing-sm) / 2 - var(--border-width));\n top: calc(0.35em + var(--spacing-sm));\n bottom: calc(0px - var(--spacing-md));\n width: var(--border-width);\n background: var(--color-border-default);\n}\n\n::slotted(time) {\n font-variant-numeric: tabular-nums;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * Chronological history: a native ordered list with a marker dot per item\n * and a connector line between items — the last item never gets a trailing\n * connector.\n *\n * The component renders the `<ol>` and owns the rail; the consumer writes\n * plain `<li>` items with whatever content each entry needs — a preformatted\n * date, a title, a description, and a non-colour state cue from `ch-icon`:\n *\n * ```html\n * <ch-timeline>\n * <li>\n * <ch-icon name=\"check\"></ch-icon>\n * <time datetime=\"2026-11-02\">2 nov 2026</time> — Creado el pedido\n * </li>\n * <li><ch-icon name=\"spinner\"></ch-icon> Esperando despacho</li>\n * </ch-timeline>\n * ```\n *\n * The list semantics survive untouched because the `li` elements stay native\n * in the light DOM — measured on #83: a wrapped item still counts as a\n * `listitem`, so nothing is gained by a `ch-timeline-item` element, and\n * native markup is the safe bet across browsers.\n */\n@Component({\n tag: 'ch-timeline',\n styleUrl: 'ch-timeline.css',\n shadow: true,\n})\nexport class ChTimeline {\n render() {\n return (\n <Host class=\"timeline\">\n <ol class=\"list\">\n <slot></slot>\n </ol>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,aAAa,GAAG,MAAM,CAAC,svBAAsvB,CAAC;;MC+BvwB,UAAU,GAAA,MAAA;;;;IACrB,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAC,UAAU,EAAA,EACpB,CAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAC,MAAM,EAAA,EACd,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACV,CACA;;;;;;;"}
|