@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-description-list.js","sourceRoot":"","sources":["../../../../src/components/ch-description-list/ch-description-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIzD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,MAAM,OAAO,iBAAiB;IAC5B;;;OAGG;IACK,OAAO,GAA6B,GAAG,CAAC;IAEhD,IAAY,WAAW;QACrB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACxD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,2DAAI,KAAK,EAAE,sBAAsB,IAAI,CAAC,WAAW,EAAE;gBACjD,8DAAa,CACV,CACA,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChDescriptionListColumns = '1' | '2' | '3';\n\nconst COLUMNS = new Set(['1', '2', '3']);\n\n/**\n * Label/value pairs for detail views, on a native `<dl>`.\n *\n * The component renders the `<dl>` and the layout; the consumer writes the\n * terms and descriptions. Group each pair in a `<div>` (valid HTML 5.2\n * grouping) — the group is the grid item, which is what keeps a pair from\n * splitting across columns:\n *\n * ```html\n * <ch-description-list columns=\"2\">\n * <div><dt>Cliente</dt><dd>Aurora SpA</dd></div>\n * <div><dt>Pedido</dt><dd>#1523</dd></div>\n * </ch-description-list>\n * ```\n *\n * The markup stays native in the light DOM, so the `term` role reaches the\n * accessibility tree untouched — the shape decision on #81 measured that a\n * custom wrapper adds nothing in Chromium while risking other browsers. No\n * `ch-description-item` element exists for the same reason.\n */\n@Component({\n tag: 'ch-description-list',\n styleUrl: 'ch-description-list.css',\n shadow: true,\n})\nexport class ChDescriptionList {\n /**\n * How many pairs share a row on a wide viewport. One column is the stacked\n * layout. An unknown value falls back to one column.\n */\n @Prop() columns: ChDescriptionListColumns = '1';\n\n private get columnCount() {\n return COLUMNS.has(this.columns) ? this.columns : '1';\n }\n\n render() {\n return (\n <Host>\n <dl class={`list list--columns-${this.columnCount}`}>\n <slot></slot>\n </dl>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ export class ChDivider {
|
|
|
5
5
|
*/
|
|
6
6
|
orientation = 'horizontal';
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'c18cffa051e3fde189ed358a748e58d0af534357', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: '2a6fe2c3a2b61eecd03e0b5d2830695328e77453', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "ch-divider"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: 'a0406608e57614c79a23673f040191e2d94cdd48' }, h("dialog", { key: '84072ff1a87f1033c5b4911089c8c0819fe087ea', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '57cddba1e04471dc6d0fe6e86311c38bb4329969', class: "drawer-head" }, h("slot", { key: 'b77179dec88ae4d1b9975b7e6b16184a8aa8bb79', name: "header" }), this.closeLabel && (h("button", { key: '88daedc7a80418e3480b577639e80ef31ff02486', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'e5bb3e74f1b4365b0e32e2b8e70bdc46ac882c78', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'd81831510dd6a0d9e97eddffac99bc0689bf3d31', class: "drawer-body" }, h("slot", { key: 'f3d72a55ad19021369e117ec5bf9693bc6d72c85' })), h("slot", { key: '339e8989a2ea9f580a756ff89e10c40e55904c11', 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: '4a5c5b2a917227ab3fb9aabe560718a84dd17730' }, h("img", { key: 'dbc09e58cd1a6ce899ce82dd1ec13ba15955b4ad', 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: '73a168213e3f62b73d859dd6e1ad35eff6694746', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, h("div", { key: '81bbad48af38acd640a67673132773a66d06c35b', class: "empty-state__inner" }, h("div", { key: '1f9f8953beba68951163a5081ada1254ee6de61c', class: "empty-state__icon", "aria-hidden": "true" }, h("slot", { key: '70c2b38f1a780b4c39a676d6b4cf4fe9d80a45c5', name: "icon" })), h("h3", { key: '964501021ac65c7edb96c60b9e6f6dc7aece2ebe', class: "empty-state__title" }, this.title), this.description && h("p", { key: 'a6effa9b7a24875938fc18ee9e6a7acf1c35b0ba', class: "empty-state__description" }, this.description), h("div", { key: '0052d3c169569b96ee73b481f44b669715f90771', class: "empty-state__actions" }, h("slot", { key: '3fa51fed8e5f49e02a9f588a3c0577ce9c2c5797' })))));
|
|
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: '09a37640189b353bd109bce97ad684396f91a06d', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, h("slot", { key: 'e309fee76ea499e4c3b22082218d12fc94cb8fb8' })));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "ch-grid"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
line-height: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.icon {
|
|
7
|
+
display: block;
|
|
8
|
+
flex: none;
|
|
9
|
+
color: inherit;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.icon--sm {
|
|
13
|
+
width: var(--icon-size-sm);
|
|
14
|
+
height: var(--icon-size-sm);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.icon--md {
|
|
18
|
+
width: var(--icon-size-md);
|
|
19
|
+
height: var(--icon-size-md);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon--lg {
|
|
23
|
+
width: var(--icon-size-lg);
|
|
24
|
+
height: var(--icon-size-lg);
|
|
25
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { chIcons } from "../../utils/icons";
|
|
3
|
+
/**
|
|
4
|
+
* A single Lucide glyph.
|
|
5
|
+
*
|
|
6
|
+
* Decorative by default: the icon is hidden from assistive technology unless
|
|
7
|
+
* you give it a `label`, because most icons sit next to text that already says
|
|
8
|
+
* what they mean and a second announcement is noise. Set `label` only when the
|
|
9
|
+
* icon carries meaning on its own; a control whose only content is an icon
|
|
10
|
+
* should use `ch-icon-button`, which requires the name.
|
|
11
|
+
*/
|
|
12
|
+
export class ChIcon {
|
|
13
|
+
/**
|
|
14
|
+
* Which glyph to draw. Unknown values render nothing rather than throwing,
|
|
15
|
+
* so a stale name in a data payload cannot break the page.
|
|
16
|
+
*/
|
|
17
|
+
name;
|
|
18
|
+
/**
|
|
19
|
+
* `sm` is 16px, `md` is 20px and `lg` is 24px — the sizes the scale's line
|
|
20
|
+
* heights were built around.
|
|
21
|
+
*/
|
|
22
|
+
size = 'md';
|
|
23
|
+
/**
|
|
24
|
+
* Accessible name. When set, the icon becomes `role="img"` and is announced;
|
|
25
|
+
* when omitted it is `aria-hidden`.
|
|
26
|
+
*/
|
|
27
|
+
label;
|
|
28
|
+
render() {
|
|
29
|
+
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
30
|
+
const decorative = !this.label;
|
|
31
|
+
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)))));
|
|
32
|
+
}
|
|
33
|
+
static get is() { return "ch-icon"; }
|
|
34
|
+
static get encapsulation() { return "shadow"; }
|
|
35
|
+
static get originalStyleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["ch-icon.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get styleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["ch-icon.css"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get properties() {
|
|
46
|
+
return {
|
|
47
|
+
"name": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "ChIconName",
|
|
52
|
+
"resolved": "\"alert\" | \"arrowRight\" | \"check\" | \"chevronDown\" | \"chevronRight\" | \"close\" | \"copy\" | \"delete\" | \"download\" | \"error\" | \"externalLink\" | \"info\" | \"menu\" | \"plus\" | \"search\" | \"spinner\" | \"success\" | \"upload\"",
|
|
53
|
+
"references": {
|
|
54
|
+
"ChIconName": {
|
|
55
|
+
"location": "import",
|
|
56
|
+
"path": "../../utils/icons",
|
|
57
|
+
"id": "src/utils/icons.ts::ChIconName",
|
|
58
|
+
"referenceLocation": "ChIconName"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": true,
|
|
63
|
+
"optional": false,
|
|
64
|
+
"docs": {
|
|
65
|
+
"tags": [],
|
|
66
|
+
"text": "Which glyph to draw. Unknown values render nothing rather than throwing,\nso a stale name in a data payload cannot break the page."
|
|
67
|
+
},
|
|
68
|
+
"getter": false,
|
|
69
|
+
"setter": false,
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"attribute": "name"
|
|
72
|
+
},
|
|
73
|
+
"size": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "ChIconSize",
|
|
78
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
79
|
+
"references": {
|
|
80
|
+
"ChIconSize": {
|
|
81
|
+
"location": "local",
|
|
82
|
+
"path": "/home/runner/work/chucao/chucao/src/components/ch-icon/ch-icon.tsx",
|
|
83
|
+
"id": "src/components/ch-icon/ch-icon.tsx::ChIconSize"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": "`sm` is 16px, `md` is 20px and `lg` is 24px \u2014 the sizes the scale's line\nheights were built around."
|
|
92
|
+
},
|
|
93
|
+
"getter": false,
|
|
94
|
+
"setter": false,
|
|
95
|
+
"reflect": false,
|
|
96
|
+
"attribute": "size",
|
|
97
|
+
"defaultValue": "'md'"
|
|
98
|
+
},
|
|
99
|
+
"label": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": true,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "Accessible name. When set, the icon becomes `role=\"img\"` and is announced;\nwhen omitted it is `aria-hidden`."
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"attribute": "label"
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=ch-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-icon.js","sourceRoot":"","sources":["../../../../src/components/ch-icon/ch-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAmB,MAAM,mBAAmB,CAAC;AAI7D;;;;;;;;GAQG;AAMH,MAAM,OAAO,MAAM;IACjB;;;OAGG;IACK,IAAI,CAAc;IAE1B;;;OAGG;IACK,IAAI,GAAe,IAAI,CAAC;IAEhC;;;OAGG;IACK,KAAK,CAAU;IAEvB,MAAM;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QAE/B,OAAO,CACL,EAAC,IAAI;YACH,4DACE,KAAK,EAAE,cAAc,IAAI,CAAC,IAAI,EAAE,EAChC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,kBACR,GAAG,oBACD,OAAO,qBACN,OAAO,EACvB,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,gBACxB,IAAI,CAAC,KAAK,iBACT,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC5C,SAAS,EAAC,OAAO,IAEhB,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACnD,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.button {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
border: var(--border-width) solid var(--border);
|
|
11
|
+
border-radius: var(--radius-pill);
|
|
12
|
+
background: transparent;
|
|
13
|
+
color: var(--text);
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition:
|
|
16
|
+
background-color var(--duration-normal) var(--easing-default),
|
|
17
|
+
border-color var(--duration-normal) var(--easing-default),
|
|
18
|
+
color var(--duration-normal) var(--easing-default);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Square hit area at each size, matching the height of the same-size ch-button
|
|
22
|
+
so the two line up in a toolbar. */
|
|
23
|
+
.button--sm {
|
|
24
|
+
width: calc(var(--icon-size-sm) + 2 * var(--spacing-md));
|
|
25
|
+
height: calc(var(--icon-size-sm) + 2 * var(--spacing-md));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.button--md {
|
|
29
|
+
width: calc(var(--icon-size-md) + 2 * var(--spacing-xl));
|
|
30
|
+
height: calc(var(--icon-size-md) + 2 * var(--spacing-xl));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.button--lg {
|
|
34
|
+
width: calc(var(--icon-size-lg) + 2 * var(--spacing-2xl));
|
|
35
|
+
height: calc(var(--icon-size-lg) + 2 * var(--spacing-2xl));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.button--sm .icon {
|
|
39
|
+
width: var(--icon-size-sm);
|
|
40
|
+
height: var(--icon-size-sm);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.button--md .icon {
|
|
44
|
+
width: var(--icon-size-md);
|
|
45
|
+
height: var(--icon-size-md);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.button--lg .icon {
|
|
49
|
+
width: var(--icon-size-lg);
|
|
50
|
+
height: var(--icon-size-lg);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.button:hover:not([aria-disabled='true']) {
|
|
54
|
+
border-color: var(--border-hover);
|
|
55
|
+
background: var(--surface-hover);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.button:focus-visible {
|
|
59
|
+
outline: var(--focus-outline-width) solid var(--accent);
|
|
60
|
+
outline-offset: var(--focus-outline-offset);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Disabled stays focusable on purpose: dropping focus to <body> when an action
|
|
64
|
+
completes is worse than a button that can still be read. */
|
|
65
|
+
.button[aria-disabled='true'] {
|
|
66
|
+
opacity: var(--opacity-disabled);
|
|
67
|
+
cursor: not-allowed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.button[aria-busy='true'] {
|
|
71
|
+
cursor: progress;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.button[aria-busy='true'] .icon {
|
|
75
|
+
animation: ch-icon-button-spin var(--duration-spin) linear infinite;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes ch-icon-button-spin {
|
|
79
|
+
to {
|
|
80
|
+
transform: rotate(360deg);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (pointer: coarse) {
|
|
85
|
+
.button--sm {
|
|
86
|
+
min-width: 44px;
|
|
87
|
+
min-height: 44px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
.button {
|
|
93
|
+
transition: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.button[aria-busy='true'] .icon {
|
|
97
|
+
animation: none;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { chIcons } from "../../utils/icons";
|
|
3
|
+
/**
|
|
4
|
+
* A button whose only content is an icon.
|
|
5
|
+
*
|
|
6
|
+
* The label is required rather than optional. An icon-only button without an
|
|
7
|
+
* accessible name is unusable by voice, screen reader or automation, and there
|
|
8
|
+
* is no adjacent text to fall back on — the same reasoning as `ch-modal`, and
|
|
9
|
+
* the reason this component exists instead of letting consumers bolt an icon
|
|
10
|
+
* slot onto `ch-button` and forget the name.
|
|
11
|
+
*/
|
|
12
|
+
export class ChIconButton {
|
|
13
|
+
/** The glyph to draw. */
|
|
14
|
+
name;
|
|
15
|
+
/**
|
|
16
|
+
* Accessible name, set as `aria-label`. Required: say what the button does
|
|
17
|
+
* ("Eliminar producto"), not what the glyph is ("papelera").
|
|
18
|
+
*/
|
|
19
|
+
label;
|
|
20
|
+
/** Visual size. `md` matches the height of a default `ch-button`. */
|
|
21
|
+
size = 'md';
|
|
22
|
+
/** Native button type, defaulting to `button` so it never submits a form by accident. */
|
|
23
|
+
type = 'button';
|
|
24
|
+
disabled = false;
|
|
25
|
+
/**
|
|
26
|
+
* Blocks pointer and keyboard activation and marks the button `aria-busy`
|
|
27
|
+
* while keeping it focusable, so focus does not fall to `<body>` when an
|
|
28
|
+
* action completes.
|
|
29
|
+
*/
|
|
30
|
+
loading = false;
|
|
31
|
+
/** Emitted on click. A click while disabled or loading emits nothing. */
|
|
32
|
+
chClick;
|
|
33
|
+
handleClick = (event) => {
|
|
34
|
+
if (this.disabled || this.loading) {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
event.stopImmediatePropagation();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.chClick.emit(event);
|
|
40
|
+
};
|
|
41
|
+
render() {
|
|
42
|
+
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
43
|
+
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))))));
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "ch-icon-button"; }
|
|
46
|
+
static get encapsulation() { return "shadow"; }
|
|
47
|
+
static get originalStyleUrls() {
|
|
48
|
+
return {
|
|
49
|
+
"$": ["ch-icon-button.css"]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static get styleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["ch-icon-button.css"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get properties() {
|
|
58
|
+
return {
|
|
59
|
+
"name": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "ChIconName",
|
|
64
|
+
"resolved": "\"alert\" | \"arrowRight\" | \"check\" | \"chevronDown\" | \"chevronRight\" | \"close\" | \"copy\" | \"delete\" | \"download\" | \"error\" | \"externalLink\" | \"info\" | \"menu\" | \"plus\" | \"search\" | \"spinner\" | \"success\" | \"upload\"",
|
|
65
|
+
"references": {
|
|
66
|
+
"ChIconName": {
|
|
67
|
+
"location": "import",
|
|
68
|
+
"path": "../../utils/icons",
|
|
69
|
+
"id": "src/utils/icons.ts::ChIconName",
|
|
70
|
+
"referenceLocation": "ChIconName"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": true,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": "The glyph to draw."
|
|
79
|
+
},
|
|
80
|
+
"getter": false,
|
|
81
|
+
"setter": false,
|
|
82
|
+
"reflect": false,
|
|
83
|
+
"attribute": "name"
|
|
84
|
+
},
|
|
85
|
+
"label": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"mutable": false,
|
|
88
|
+
"complexType": {
|
|
89
|
+
"original": "string",
|
|
90
|
+
"resolved": "string",
|
|
91
|
+
"references": {}
|
|
92
|
+
},
|
|
93
|
+
"required": true,
|
|
94
|
+
"optional": false,
|
|
95
|
+
"docs": {
|
|
96
|
+
"tags": [],
|
|
97
|
+
"text": "Accessible name, set as `aria-label`. Required: say what the button does\n(\"Eliminar producto\"), not what the glyph is (\"papelera\")."
|
|
98
|
+
},
|
|
99
|
+
"getter": false,
|
|
100
|
+
"setter": false,
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"attribute": "label"
|
|
103
|
+
},
|
|
104
|
+
"size": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "ChIconButtonSize",
|
|
109
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
110
|
+
"references": {
|
|
111
|
+
"ChIconButtonSize": {
|
|
112
|
+
"location": "local",
|
|
113
|
+
"path": "/home/runner/work/chucao/chucao/src/components/ch-icon-button/ch-icon-button.tsx",
|
|
114
|
+
"id": "src/components/ch-icon-button/ch-icon-button.tsx::ChIconButtonSize"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Visual size. `md` matches the height of a default `ch-button`."
|
|
123
|
+
},
|
|
124
|
+
"getter": false,
|
|
125
|
+
"setter": false,
|
|
126
|
+
"reflect": false,
|
|
127
|
+
"attribute": "size",
|
|
128
|
+
"defaultValue": "'md'"
|
|
129
|
+
},
|
|
130
|
+
"type": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "'button' | 'submit' | 'reset'",
|
|
135
|
+
"resolved": "\"button\" | \"reset\" | \"submit\"",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "Native button type, defaulting to `button` so it never submits a form by accident."
|
|
143
|
+
},
|
|
144
|
+
"getter": false,
|
|
145
|
+
"setter": false,
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"attribute": "type",
|
|
148
|
+
"defaultValue": "'button'"
|
|
149
|
+
},
|
|
150
|
+
"disabled": {
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "boolean",
|
|
155
|
+
"resolved": "boolean",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"reflect": false,
|
|
167
|
+
"attribute": "disabled",
|
|
168
|
+
"defaultValue": "false"
|
|
169
|
+
},
|
|
170
|
+
"loading": {
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "boolean",
|
|
175
|
+
"resolved": "boolean",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Blocks pointer and keyboard activation and marks the button `aria-busy`\nwhile keeping it focusable, so focus does not fall to `<body>` when an\naction completes."
|
|
183
|
+
},
|
|
184
|
+
"getter": false,
|
|
185
|
+
"setter": false,
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"attribute": "loading",
|
|
188
|
+
"defaultValue": "false"
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
static get events() {
|
|
193
|
+
return [{
|
|
194
|
+
"method": "chClick",
|
|
195
|
+
"name": "chClick",
|
|
196
|
+
"bubbles": true,
|
|
197
|
+
"cancelable": true,
|
|
198
|
+
"composed": true,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "Emitted on click. A click while disabled or loading emits nothing."
|
|
202
|
+
},
|
|
203
|
+
"complexType": {
|
|
204
|
+
"original": "MouseEvent",
|
|
205
|
+
"resolved": "MouseEvent",
|
|
206
|
+
"references": {
|
|
207
|
+
"MouseEvent": {
|
|
208
|
+
"location": "global",
|
|
209
|
+
"id": "global::MouseEvent"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=ch-icon-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-icon-button.js","sourceRoot":"","sources":["../../../../src/components/ch-icon-button/ch-icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAE,OAAO,EAAmB,MAAM,mBAAmB,CAAC;AAI7D;;;;;;;;GAQG;AAMH,MAAM,OAAO,YAAY;IACvB,yBAAyB;IACjB,IAAI,CAAc;IAE1B;;;OAGG;IACK,KAAK,CAAU;IAEvB,qEAAqE;IAC7D,IAAI,GAAqB,IAAI,CAAC;IAEtC,yFAAyF;IACjF,IAAI,GAAkC,QAAQ,CAAC;IAE/C,QAAQ,GAAG,KAAK,CAAC;IAEzB;;;;OAIG;IACK,OAAO,GAAG,KAAK,CAAC;IAExB,yEAAyE;IAChE,OAAO,CAA2B;IAEnC,WAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;QAC1C,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,MAAM;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE1D,OAAO,CACL,EAAC,IAAI;YACH,+DACE,KAAK,EAAE,kBAAkB,IAAI,CAAC,IAAI,EAAE,EACpC,IAAI,EAAE,IAAI,CAAC,IAAI,gBACH,IAAI,CAAC,KAAK,eACX,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,mBAC7B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACjD,OAAO,EAAE,IAAI,CAAC,WAAW;gBAEzB,4DACE,KAAK,EAAC,MAAM,EACZ,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,kBACR,GAAG,oBACD,OAAO,qBACN,OAAO,iBACX,MAAM,EAClB,SAAS,EAAC,OAAO,IAEhB,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACnD,CACC,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -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: 'd85d2773a340ee1a46f7f76a0d287ff1194d0e0b' }, this.label && (h("label", { key: '9ad19457232c703a59eab1062e12c17e8c2b8327', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'f88fe669d2afa183230b1286dd88ccc894eaee5e', 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: '31bdbb81ba537cc7d84b8cf7fc24055890b9b000', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '50a7cb03654f5deaa70af64ee14d774e94f77816', 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: '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' })))));
|
|
156
156
|
}
|
|
157
157
|
static get is() { return "ch-modal"; }
|
|
158
158
|
static get encapsulation() { return "shadow"; }
|