@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,54 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
font-family: var(--typography-body);
|
|
4
|
+
color: var(--color-text-secondary);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host([hidden]) {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.list {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
display: grid;
|
|
15
|
+
gap: var(--spacing-md);
|
|
16
|
+
/* Reserve the rail: every item indents past its marker. */
|
|
17
|
+
list-style: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Each slotted item indents past its dot; pseudo-elements on slotted
|
|
21
|
+
* content are part of the shadow stylesheet's remit here. */
|
|
22
|
+
::slotted(li) {
|
|
23
|
+
position: relative;
|
|
24
|
+
padding-left: var(--spacing-2xl);
|
|
25
|
+
min-width: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* The marker dot, vertically on the item's first line. */
|
|
29
|
+
::slotted(li)::before {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: 0;
|
|
33
|
+
top: 0.35em;
|
|
34
|
+
width: var(--spacing-sm);
|
|
35
|
+
height: var(--spacing-sm);
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
background: var(--color-border-default);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* The connector to the next item; the last item never gets one, so the
|
|
41
|
+
* timeline does not trail off into nothing. */
|
|
42
|
+
::slotted(li:not(:last-of-type))::after {
|
|
43
|
+
content: '';
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: calc(var(--spacing-sm) / 2 - var(--border-width));
|
|
46
|
+
top: calc(0.35em + var(--spacing-sm));
|
|
47
|
+
bottom: calc(0px - var(--spacing-md));
|
|
48
|
+
width: var(--border-width);
|
|
49
|
+
background: var(--color-border-default);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
::slotted(time) {
|
|
53
|
+
font-variant-numeric: tabular-nums;
|
|
54
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Chronological history: a native ordered list with a marker dot per item
|
|
4
|
+
* and a connector line between items — the last item never gets a trailing
|
|
5
|
+
* connector.
|
|
6
|
+
*
|
|
7
|
+
* The component renders the `<ol>` and owns the rail; the consumer writes
|
|
8
|
+
* plain `<li>` items with whatever content each entry needs — a preformatted
|
|
9
|
+
* date, a title, a description, and a non-colour state cue from `ch-icon`:
|
|
10
|
+
*
|
|
11
|
+
* ```html
|
|
12
|
+
* <ch-timeline>
|
|
13
|
+
* <li>
|
|
14
|
+
* <ch-icon name="check"></ch-icon>
|
|
15
|
+
* <time datetime="2026-11-02">2 nov 2026</time> — Creado el pedido
|
|
16
|
+
* </li>
|
|
17
|
+
* <li><ch-icon name="spinner"></ch-icon> Esperando despacho</li>
|
|
18
|
+
* </ch-timeline>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* The list semantics survive untouched because the `li` elements stay native
|
|
22
|
+
* in the light DOM — measured on #83: a wrapped item still counts as a
|
|
23
|
+
* `listitem`, so nothing is gained by a `ch-timeline-item` element, and
|
|
24
|
+
* native markup is the safe bet across browsers.
|
|
25
|
+
*/
|
|
26
|
+
export class ChTimeline {
|
|
27
|
+
render() {
|
|
28
|
+
return (h(Host, { key: 'da3288af540acb92113ba83d08fc5e1693e83b3e', class: "timeline" }, h("ol", { key: '1aaee846703dd0a67d6df04945eb4a62e2bbf711', class: "list" }, h("slot", { key: '394cfd03640a2cf78bd620338de9ed9ef7b9d9f5' }))));
|
|
29
|
+
}
|
|
30
|
+
static get is() { return "ch-timeline"; }
|
|
31
|
+
static get encapsulation() { return "shadow"; }
|
|
32
|
+
static get originalStyleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["ch-timeline.css"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get styleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["ch-timeline.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=ch-timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-timeline.js","sourceRoot":"","sources":["../../../../src/components/ch-timeline/ch-timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,OAAO,UAAU;IACrB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAC,UAAU;YACpB,2DAAI,KAAK,EAAC,MAAM;gBACd,8DAAa,CACV,CACA,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
position: absolute;
|
|
12
12
|
z-index: var(--z-index-dropdown);
|
|
13
13
|
width: max-content;
|
|
14
|
-
max-width: 16rem;
|
|
14
|
+
max-width: min(16rem, calc(100vw - 2 * var(--spacing-2xl)));
|
|
15
15
|
padding: var(--spacing-md) var(--spacing-2xl);
|
|
16
16
|
border: var(--border-width) solid var(--border);
|
|
17
17
|
border-radius: var(--radius-sm);
|
|
@@ -37,6 +37,19 @@
|
|
|
37
37
|
position: absolute;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/*
|
|
41
|
+
* Once the component has measured the anchor, the bubble is placed with fixed
|
|
42
|
+
* coordinates. Viewport coordinates do not depend on ancestors' transforms or
|
|
43
|
+
* overflow, so a tooltip inside a scrolling drawer or modal stays anchored.
|
|
44
|
+
*/
|
|
45
|
+
.bubble--positioned {
|
|
46
|
+
position: fixed;
|
|
47
|
+
top: var(--ch-tooltip-offset-top);
|
|
48
|
+
left: var(--ch-tooltip-offset-left);
|
|
49
|
+
transform: none;
|
|
50
|
+
margin: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
40
53
|
.bubble--top {
|
|
41
54
|
bottom: 100%;
|
|
42
55
|
left: 50%;
|
|
@@ -44,6 +57,21 @@
|
|
|
44
57
|
margin-bottom: var(--spacing-md);
|
|
45
58
|
}
|
|
46
59
|
|
|
60
|
+
/* Stencil scopes each rule by doubling its classes, so a three-class selector
|
|
61
|
+
is what actually outranks the single-class placement rules above. */
|
|
62
|
+
.bubble.bubble--positioned.bubble--top,
|
|
63
|
+
.bubble.bubble--positioned.bubble--bottom,
|
|
64
|
+
.bubble.bubble--positioned.bubble--left,
|
|
65
|
+
.bubble.bubble--positioned.bubble--right {
|
|
66
|
+
inset: auto;
|
|
67
|
+
top: var(--ch-tooltip-offset-top);
|
|
68
|
+
left: var(--ch-tooltip-offset-left);
|
|
69
|
+
right: auto;
|
|
70
|
+
bottom: auto;
|
|
71
|
+
transform: none;
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
47
75
|
.bubble--top::before {
|
|
48
76
|
top: 100%;
|
|
49
77
|
left: 0;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
1
|
+
import { forceUpdate, Host, h } from "@stencil/core";
|
|
2
|
+
import { placeOverlay } from "../../utils/overlay";
|
|
2
3
|
let tooltipIds = 0;
|
|
4
|
+
/** Space between the trigger and the bubble, matching `--spacing-md`. */
|
|
5
|
+
const GAP = 8;
|
|
3
6
|
/**
|
|
4
7
|
* Short help text shown on hover and on focus.
|
|
5
8
|
*
|
|
@@ -15,12 +18,22 @@ let tooltipIds = 0;
|
|
|
15
18
|
* `<input>`). A chucao component such as `ch-button` will not be described,
|
|
16
19
|
* because `aria-*` set on a custom element host does not reach the native
|
|
17
20
|
* element inside it — see the discussion in issue #47.
|
|
21
|
+
*
|
|
22
|
+
* Positioning is measured, not purely CSS: `placement` is the preferred side,
|
|
23
|
+
* and the bubble flips to the opposite side when the preferred one does not
|
|
24
|
+
* fit, then shifts along the other axis to stay inside the viewport. It
|
|
25
|
+
* re-measures on scroll, resize and visual-viewport changes, which is what
|
|
26
|
+
* keeps it correct inside a scrolling modal or drawer and when a mobile
|
|
27
|
+
* keyboard shrinks the visible area.
|
|
18
28
|
*/
|
|
19
29
|
export class ChTooltip {
|
|
20
30
|
el;
|
|
21
31
|
fallbackId = `ch-tooltip-${++tooltipIds}`;
|
|
32
|
+
bubbleEl;
|
|
33
|
+
cleanup;
|
|
22
34
|
/**
|
|
23
|
-
*
|
|
35
|
+
* The side the bubble is placed on. It is a preference: when that side has no
|
|
36
|
+
* room the bubble flips to the opposite one.
|
|
24
37
|
*/
|
|
25
38
|
placement = 'top';
|
|
26
39
|
// Hover and focus are tracked apart so that neither cancels the other: a
|
|
@@ -29,15 +42,26 @@ export class ChTooltip {
|
|
|
29
42
|
hovered = false;
|
|
30
43
|
focused = false;
|
|
31
44
|
dismissed = false;
|
|
45
|
+
/** The placement actually used, which may differ from the prop after a flip. */
|
|
46
|
+
resolvedPlacement;
|
|
47
|
+
/** Offset applied to the bubble once it has been measured. */
|
|
48
|
+
offset;
|
|
32
49
|
get visible() {
|
|
33
50
|
return (this.hovered || this.focused) && !this.dismissed;
|
|
34
51
|
}
|
|
35
52
|
componentDidLoad() {
|
|
36
53
|
this.associate();
|
|
37
54
|
}
|
|
55
|
+
connectedCallback() {
|
|
56
|
+
this.watchViewport();
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
this.cleanup?.();
|
|
60
|
+
}
|
|
38
61
|
handleMouseEnter() {
|
|
39
62
|
this.hovered = true;
|
|
40
63
|
this.dismissed = false;
|
|
64
|
+
this.position();
|
|
41
65
|
}
|
|
42
66
|
handleMouseLeave() {
|
|
43
67
|
this.hovered = false;
|
|
@@ -45,6 +69,7 @@ export class ChTooltip {
|
|
|
45
69
|
handleFocusIn() {
|
|
46
70
|
this.focused = true;
|
|
47
71
|
this.dismissed = false;
|
|
72
|
+
this.position();
|
|
48
73
|
}
|
|
49
74
|
handleFocusOut() {
|
|
50
75
|
this.focused = false;
|
|
@@ -52,15 +77,85 @@ export class ChTooltip {
|
|
|
52
77
|
/**
|
|
53
78
|
* Listens on the document because a tooltip opened by hovering leaves focus
|
|
54
79
|
* wherever it was, so a host-scoped handler would never see the key.
|
|
80
|
+
*
|
|
81
|
+
* `preventDefault()` dismisses only the innermost surface: the platform's
|
|
82
|
+
* close request for an open native `<dialog>` is the default action of this
|
|
83
|
+
* same keydown, so cancelling it keeps an enclosing `ch-modal` open. Proven
|
|
84
|
+
* against a real `ch-modal` in `tests/browser/ch-tooltip.browser.spec.ts`.
|
|
55
85
|
*/
|
|
56
86
|
handleKeyDown(event) {
|
|
57
|
-
if (event.key === 'Escape' && this.visible) {
|
|
87
|
+
if (event.key === 'Escape' && this.visible && !event.defaultPrevented) {
|
|
88
|
+
event.preventDefault();
|
|
58
89
|
this.dismissed = true;
|
|
59
90
|
}
|
|
60
91
|
}
|
|
92
|
+
/** Cheap guard so scroll frames do not measure while nothing is shown. */
|
|
93
|
+
handleScroll() {
|
|
94
|
+
if (this.visible && this.offset) {
|
|
95
|
+
this.position();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
handleResize() {
|
|
99
|
+
this.position();
|
|
100
|
+
}
|
|
101
|
+
watchViewport() {
|
|
102
|
+
if (typeof window === 'undefined') {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const viewport = window.visualViewport;
|
|
106
|
+
if (!viewport || this.cleanup) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const update = () => this.position();
|
|
110
|
+
viewport.addEventListener('resize', update);
|
|
111
|
+
viewport.addEventListener('scroll', update);
|
|
112
|
+
this.cleanup = () => {
|
|
113
|
+
viewport.removeEventListener('resize', update);
|
|
114
|
+
viewport.removeEventListener('scroll', update);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
61
117
|
slotted(name) {
|
|
62
118
|
return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);
|
|
63
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Measures the anchor and the bubble and stores the offset that keeps the
|
|
122
|
+
* bubble inside the viewport. Nothing is measured before the bubble has a
|
|
123
|
+
* box to measure, so the pre-paint render uses plain CSS.
|
|
124
|
+
*/
|
|
125
|
+
position() {
|
|
126
|
+
if (typeof window === 'undefined') {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const bubble = this.bubbleEl ?? (this.bubbleEl = this.el.shadowRoot?.querySelector('.bubble') ?? undefined);
|
|
130
|
+
if (!bubble || bubble.offsetWidth === 0) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const anchorRect = this.slotted('trigger')?.getBoundingClientRect?.();
|
|
134
|
+
if (!anchorRect) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const surface = {
|
|
138
|
+
width: bubble.offsetWidth + horizontalMargin(bubble),
|
|
139
|
+
height: bubble.offsetHeight,
|
|
140
|
+
};
|
|
141
|
+
const viewport = window.visualViewport;
|
|
142
|
+
const { placement, top, left } = placeOverlay({
|
|
143
|
+
anchor: { top: anchorRect.top, left: anchorRect.left, width: anchorRect.width, height: anchorRect.height },
|
|
144
|
+
surface,
|
|
145
|
+
viewport: viewport
|
|
146
|
+
? { top: viewport.offsetTop, left: viewport.offsetLeft, width: viewport.width, height: viewport.height }
|
|
147
|
+
: { top: 0, left: 0, width: window.innerWidth, height: window.innerHeight },
|
|
148
|
+
preferred: this.placement,
|
|
149
|
+
gap: GAP,
|
|
150
|
+
});
|
|
151
|
+
const current = this.offset;
|
|
152
|
+
const unchanged = current?.top === top && current?.left === left && this.resolvedPlacement === placement;
|
|
153
|
+
this.resolvedPlacement = placement;
|
|
154
|
+
this.offset = { top, left };
|
|
155
|
+
if (!unchanged) {
|
|
156
|
+
forceUpdate(this);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
64
159
|
/**
|
|
65
160
|
* Points the trigger at the text with `aria-describedby`. Re-run on
|
|
66
161
|
* `slotchange` because a framework re-render can replace the slotted nodes
|
|
@@ -79,7 +174,16 @@ export class ChTooltip {
|
|
|
79
174
|
trigger.setAttribute('aria-describedby', content.id);
|
|
80
175
|
};
|
|
81
176
|
render() {
|
|
82
|
-
|
|
177
|
+
const { offset } = this;
|
|
178
|
+
return (h(Host, { key: '676e431d0100ecc9ea688b7e37bc87e8295bb24d' }, h("span", { key: '20a388681252e9c4d52e662c014efd9a198efbd7', class: "anchor" }, h("slot", { key: 'a06cbe31dd04cba38ef09788359783d816fc1a5b', name: "trigger", onSlotchange: this.associate }), h("span", { key: '13cb5b782a7029fc82c10b9b6765de62b94b9afa', ref: el => (this.bubbleEl = el), style: {
|
|
179
|
+
'--ch-tooltip-offset-top': offset ? `${offset.top}px` : null,
|
|
180
|
+
'--ch-tooltip-offset-left': offset ? `${offset.left}px` : null,
|
|
181
|
+
}, class: {
|
|
182
|
+
'bubble': true,
|
|
183
|
+
'bubble--positioned': Boolean(this.offset),
|
|
184
|
+
[`bubble--${this.resolvedPlacement ?? this.placement}`]: true,
|
|
185
|
+
'bubble--visible': this.visible,
|
|
186
|
+
} }, h("slot", { key: '6610bbf299354bb3be07bb273fab3f8fd91fd254', name: "content", onSlotchange: this.associate })))));
|
|
83
187
|
}
|
|
84
188
|
static get is() { return "ch-tooltip"; }
|
|
85
189
|
static get encapsulation() { return "shadow"; }
|
|
@@ -113,7 +217,7 @@ export class ChTooltip {
|
|
|
113
217
|
"optional": false,
|
|
114
218
|
"docs": {
|
|
115
219
|
"tags": [],
|
|
116
|
-
"text": "
|
|
220
|
+
"text": "The side the bubble is placed on. It is a preference: when that side has no\nroom the bubble flips to the opposite one."
|
|
117
221
|
},
|
|
118
222
|
"getter": false,
|
|
119
223
|
"setter": false,
|
|
@@ -127,7 +231,8 @@ export class ChTooltip {
|
|
|
127
231
|
return {
|
|
128
232
|
"hovered": {},
|
|
129
233
|
"focused": {},
|
|
130
|
-
"dismissed": {}
|
|
234
|
+
"dismissed": {},
|
|
235
|
+
"resolvedPlacement": {}
|
|
131
236
|
};
|
|
132
237
|
}
|
|
133
238
|
static get elementRef() { return "el"; }
|
|
@@ -162,7 +267,23 @@ export class ChTooltip {
|
|
|
162
267
|
"target": "document",
|
|
163
268
|
"capture": false,
|
|
164
269
|
"passive": false
|
|
270
|
+
}, {
|
|
271
|
+
"name": "scroll",
|
|
272
|
+
"method": "handleScroll",
|
|
273
|
+
"target": "window",
|
|
274
|
+
"capture": true,
|
|
275
|
+
"passive": true
|
|
276
|
+
}, {
|
|
277
|
+
"name": "resize",
|
|
278
|
+
"method": "handleResize",
|
|
279
|
+
"target": "window",
|
|
280
|
+
"capture": false,
|
|
281
|
+
"passive": true
|
|
165
282
|
}];
|
|
166
283
|
}
|
|
167
284
|
}
|
|
285
|
+
function horizontalMargin(el) {
|
|
286
|
+
const style = getComputedStyle(el);
|
|
287
|
+
return (parseFloat(style.marginLeft) || 0) + (parseFloat(style.marginRight) || 0);
|
|
288
|
+
}
|
|
168
289
|
//# sourceMappingURL=ch-tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ch-tooltip.js","sourceRoot":"","sources":["../../../../src/components/ch-tooltip/ch-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIjF,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB;;;;;;;;;;;;;;;GAeG;AAMH,MAAM,OAAO,SAAS;IACD,EAAE,CAAc;IAElB,UAAU,GAAG,cAAc,EAAE,UAAU,EAAE,CAAC;IAE3D;;OAEG;IACK,SAAS,GAAuB,KAAK,CAAC;IAE9C,yEAAyE;IACzE,4EAA4E;IAC5E,wBAAwB;IACf,OAAO,GAAG,KAAK,CAAC;IAChB,OAAO,GAAG,KAAK,CAAC;IAChB,SAAS,GAAG,KAAK,CAAC;IAE3B,IAAY,OAAO;QACjB,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;IAC3D,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAGD,gBAAgB;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAG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6DAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,GAAS;gBAC1D,6DAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,EAAE;oBACnG,6DAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,GAAS,CACrD,CACF,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Listen, Prop, State, h } from '@stencil/core';\n\nexport type ChTooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nlet tooltipIds = 0;\n\n/**\n * Short help text shown on hover and on focus.\n *\n * Both the trigger and the text come from the consumer's light DOM through\n * named slots. That is what makes the accessible association work: an\n * `aria-describedby` IDREF only resolves within a single tree, and slotted\n * nodes stay in the document tree even though they render inside the shadow\n * root. Keeping the text in the shadow root instead would need a reference\n * pointing into a shadow tree, which the platform does not allow — element\n * reflection only points outwards, and `referenceTarget` is not available yet.\n *\n * The trigger has to be a natively focusable element (`<button>`, `<a>`,\n * `<input>`). A chucao component such as `ch-button` will not be described,\n * because `aria-*` set on a custom element host does not reach the native\n * element inside it — see the discussion in issue #47.\n */\n@Component({\n tag: 'ch-tooltip',\n styleUrl: 'ch-tooltip.css',\n shadow: true,\n})\nexport class ChTooltip {\n @Element() private el: HTMLElement;\n\n private readonly fallbackId = `ch-tooltip-${++tooltipIds}`;\n\n /**\n * Which side of the trigger the bubble is placed on.\n */\n @Prop() placement: ChTooltipPlacement = 'top';\n\n // Hover and focus are tracked apart so that neither cancels the other: a\n // pointer passing over and away must not hide a tooltip whose trigger still\n // holds keyboard focus.\n @State() hovered = false;\n @State() focused = false;\n @State() dismissed = false;\n\n private get visible() {\n return (this.hovered || this.focused) && !this.dismissed;\n }\n\n componentDidLoad() {\n this.associate();\n }\n\n @Listen('mouseenter')\n handleMouseEnter() {\n this.hovered = true;\n this.dismissed = false;\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Listen('focusin')\n handleFocusIn() {\n this.focused = true;\n this.dismissed = false;\n }\n\n @Listen('focusout')\n handleFocusOut() {\n this.focused = false;\n }\n\n /**\n * Listens on the document because a tooltip opened by hovering leaves focus\n * wherever it was, so a host-scoped handler would never see the key.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible) {\n this.dismissed = true;\n }\n }\n\n private slotted(name: string) {\n return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);\n }\n\n /**\n * Points the trigger at the text with `aria-describedby`. Re-run on\n * `slotchange` because a framework re-render can replace the slotted nodes\n * and take the attributes with them.\n */\n private associate = () => {\n const trigger = this.slotted('trigger');\n const content = this.slotted('content');\n if (!trigger || !content) {\n return;\n }\n if (!content.id) {\n content.id = this.fallbackId;\n }\n content.setAttribute('role', 'tooltip');\n trigger.setAttribute('aria-describedby', content.id);\n };\n\n render() {\n return (\n <Host>\n <span class=\"anchor\">\n <slot name=\"trigger\" onSlotchange={this.associate}></slot>\n <span class={{ 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible }}>\n <slot name=\"content\" onSlotchange={this.associate}></slot>\n </span>\n </span>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ch-tooltip.js","sourceRoot":"","sources":["../../../../src/components/ch-tooltip/ch-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE9F,OAAO,EAAE,YAAY,EAA2B,MAAM,qBAAqB,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EAAC,IAAI;YACH,6DAAM,KAAK,EAAC,QAAQ;gBAGlB,6DAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,GAAS;gBAC1D,6DACE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,EAC/B,KAAK,EAAE;wBACL,yBAAyB,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI;wBAC5D,0BAA0B,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI;qBAC/D,EACD,KAAK,EAAE;wBACL,QAAQ,EAAE,IAAI;wBACd,oBAAoB,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;wBAC1C,CAAC,WAAW,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI;wBAC7D,iBAAiB,EAAE,IAAI,CAAC,OAAO;qBAChC;oBAED,6DAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,GAAS,CACrD,CACF,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,SAAS,gBAAgB,CAAC,EAAe;IACvC,MAAM,KAAK,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACnC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import { Component, Element, forceUpdate, Host, Listen, Prop, State, h } from '@stencil/core';\n\nimport { placeOverlay, type ChOverlayPlacement } from '../../utils/overlay';\n\nexport type ChTooltipPlacement = ChOverlayPlacement;\n\nlet tooltipIds = 0;\n\n/** Space between the trigger and the bubble, matching `--spacing-md`. */\nconst GAP = 8;\n\n/**\n * Short help text shown on hover and on focus.\n *\n * Both the trigger and the text come from the consumer's light DOM through\n * named slots. That is what makes the accessible association work: an\n * `aria-describedby` IDREF only resolves within a single tree, and slotted\n * nodes stay in the document tree even though they render inside the shadow\n * root. Keeping the text in the shadow root instead would need a reference\n * pointing into a shadow tree, which the platform does not allow — element\n * reflection only points outwards, and `referenceTarget` is not available yet.\n *\n * The trigger has to be a natively focusable element (`<button>`, `<a>`,\n * `<input>`). A chucao component such as `ch-button` will not be described,\n * because `aria-*` set on a custom element host does not reach the native\n * element inside it — see the discussion in issue #47.\n *\n * Positioning is measured, not purely CSS: `placement` is the preferred side,\n * and the bubble flips to the opposite side when the preferred one does not\n * fit, then shifts along the other axis to stay inside the viewport. It\n * re-measures on scroll, resize and visual-viewport changes, which is what\n * keeps it correct inside a scrolling modal or drawer and when a mobile\n * keyboard shrinks the visible area.\n */\n@Component({\n tag: 'ch-tooltip',\n styleUrl: 'ch-tooltip.css',\n shadow: true,\n})\nexport class ChTooltip {\n @Element() private el: HTMLElement;\n\n private readonly fallbackId = `ch-tooltip-${++tooltipIds}`;\n\n private bubbleEl?: HTMLElement;\n\n private cleanup?: () => void;\n\n /**\n * The side the bubble is placed on. It is a preference: when that side has no\n * room the bubble flips to the opposite one.\n */\n @Prop() placement: ChTooltipPlacement = 'top';\n\n // Hover and focus are tracked apart so that neither cancels the other: a\n // pointer passing over and away must not hide a tooltip whose trigger still\n // holds keyboard focus.\n @State() hovered = false;\n @State() focused = false;\n @State() dismissed = false;\n\n /** The placement actually used, which may differ from the prop after a flip. */\n @State() resolvedPlacement?: ChTooltipPlacement;\n\n /** Offset applied to the bubble once it has been measured. */\n private offset?: { top: number; left: number };\n\n private get visible() {\n return (this.hovered || this.focused) && !this.dismissed;\n }\n\n componentDidLoad() {\n this.associate();\n }\n\n connectedCallback() {\n this.watchViewport();\n }\n\n disconnectedCallback() {\n this.cleanup?.();\n }\n\n @Listen('mouseenter')\n handleMouseEnter() {\n this.hovered = true;\n this.dismissed = false;\n this.position();\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Listen('focusin')\n handleFocusIn() {\n this.focused = true;\n this.dismissed = false;\n this.position();\n }\n\n @Listen('focusout')\n handleFocusOut() {\n this.focused = false;\n }\n\n /**\n * Listens on the document because a tooltip opened by hovering leaves focus\n * wherever it was, so a host-scoped handler would never see the key.\n *\n * `preventDefault()` dismisses only the innermost surface: the platform's\n * close request for an open native `<dialog>` is the default action of this\n * same keydown, so cancelling it keeps an enclosing `ch-modal` open. Proven\n * against a real `ch-modal` in `tests/browser/ch-tooltip.browser.spec.ts`.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible && !event.defaultPrevented) {\n event.preventDefault();\n this.dismissed = true;\n }\n }\n\n /** Cheap guard so scroll frames do not measure while nothing is shown. */\n @Listen('scroll', { target: 'window', capture: true, passive: true })\n handleScroll() {\n if (this.visible && this.offset) {\n this.position();\n }\n }\n\n @Listen('resize', { target: 'window', passive: true })\n handleResize() {\n this.position();\n }\n\n private watchViewport() {\n if (typeof window === 'undefined') {\n return;\n }\n const viewport = window.visualViewport;\n if (!viewport || this.cleanup) {\n return;\n }\n const update = () => this.position();\n viewport.addEventListener('resize', update);\n viewport.addEventListener('scroll', update);\n this.cleanup = () => {\n viewport.removeEventListener('resize', update);\n viewport.removeEventListener('scroll', update);\n };\n }\n\n private slotted(name: string) {\n return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);\n }\n\n /**\n * Measures the anchor and the bubble and stores the offset that keeps the\n * bubble inside the viewport. Nothing is measured before the bubble has a\n * box to measure, so the pre-paint render uses plain CSS.\n */\n private position() {\n if (typeof window === 'undefined') {\n return;\n }\n const bubble = this.bubbleEl ?? (this.bubbleEl = this.el.shadowRoot?.querySelector<HTMLElement>('.bubble') ?? undefined);\n if (!bubble || bubble.offsetWidth === 0) {\n return;\n }\n\n const anchorRect = (this.slotted('trigger') as HTMLElement | undefined)?.getBoundingClientRect?.();\n if (!anchorRect) {\n return;\n }\n\n const surface = {\n width: bubble.offsetWidth + horizontalMargin(bubble),\n height: bubble.offsetHeight,\n };\n const viewport = window.visualViewport;\n\n const { placement, top, left } = placeOverlay({\n anchor: { top: anchorRect.top, left: anchorRect.left, width: anchorRect.width, height: anchorRect.height },\n surface,\n viewport: viewport\n ? { top: viewport.offsetTop, left: viewport.offsetLeft, width: viewport.width, height: viewport.height }\n : { top: 0, left: 0, width: window.innerWidth, height: window.innerHeight },\n preferred: this.placement,\n gap: GAP,\n });\n\n const current = this.offset;\n const unchanged = current?.top === top && current?.left === left && this.resolvedPlacement === placement;\n this.resolvedPlacement = placement;\n this.offset = { top, left };\n if (!unchanged) {\n forceUpdate(this);\n }\n }\n\n /**\n * Points the trigger at the text with `aria-describedby`. Re-run on\n * `slotchange` because a framework re-render can replace the slotted nodes\n * and take the attributes with them.\n */\n private associate = () => {\n const trigger = this.slotted('trigger');\n const content = this.slotted('content');\n if (!trigger || !content) {\n return;\n }\n if (!content.id) {\n content.id = this.fallbackId;\n }\n content.setAttribute('role', 'tooltip');\n trigger.setAttribute('aria-describedby', content.id);\n };\n\n render() {\n const { offset } = this;\n\n return (\n <Host>\n <span class=\"anchor\">\n {/* Pre-measure render uses the preferred side so the bubble never\n jumps from the wrong edge on its first frame. */}\n <slot name=\"trigger\" onSlotchange={this.associate}></slot>\n <span\n ref={el => (this.bubbleEl = el)}\n style={{\n '--ch-tooltip-offset-top': offset ? `${offset.top}px` : null,\n '--ch-tooltip-offset-left': offset ? `${offset.left}px` : null,\n }}\n class={{\n 'bubble': true,\n 'bubble--positioned': Boolean(this.offset),\n [`bubble--${this.resolvedPlacement ?? this.placement}`]: true,\n 'bubble--visible': this.visible,\n }}\n >\n <slot name=\"content\" onSlotchange={this.associate}></slot>\n </span>\n </span>\n </Host>\n );\n }\n}\n\nfunction horizontalMargin(el: HTMLElement) {\n const style = getComputedStyle(el);\n return (parseFloat(style.marginLeft) || 0) + (parseFloat(style.marginRight) || 0);\n}\n"]}
|
|
@@ -63,6 +63,10 @@ export const zIndexBase = 0;
|
|
|
63
63
|
export const zIndexDropdown = 100;
|
|
64
64
|
export const zIndexModal = 1000;
|
|
65
65
|
export const layoutMaxWidth = '68rem';
|
|
66
|
+
export const iconSizeSm = '16px';
|
|
67
|
+
export const iconSizeMd = '20px';
|
|
68
|
+
export const iconSizeLg = '24px';
|
|
69
|
+
export const iconStroke = '2px';
|
|
66
70
|
export const tokens = {
|
|
67
71
|
'color': {
|
|
68
72
|
background: {
|
|
@@ -176,5 +180,13 @@ export const tokens = {
|
|
|
176
180
|
'layout': {
|
|
177
181
|
maxWidth: '68rem',
|
|
178
182
|
},
|
|
183
|
+
'icon': {
|
|
184
|
+
size: {
|
|
185
|
+
sm: '16px',
|
|
186
|
+
md: '20px',
|
|
187
|
+
lg: '24px',
|
|
188
|
+
},
|
|
189
|
+
stroke: '2px',
|
|
190
|
+
},
|
|
179
191
|
};
|
|
180
192
|
//# sourceMappingURL=tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/tokens/tokens.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAC7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAChD,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AACtD,MAAM,CAAC,MAAM,kBAAkB,GAAG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,KAAK,EAAE,IAAI;KACZ;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,OAAO;KAClB;CACO,CAAC","sourcesContent":["/* Generated by toki v1.12.1 — do not edit */\n\nexport const colorBackgroundBase = '#100a1c';\nexport const colorBackgroundTopGlow = '#201e40';\nexport const colorBackgroundBottomGlow = '#261226';\nexport const colorSurfaceDefault = 'rgba(32, 30, 64, 0.6)';\nexport const colorSurfaceHover = 'rgba(45, 212, 191, 0.08)';\nexport const colorScrimDefault = 'rgba(0, 0, 0, 0.6)';\nexport const colorBorderDefault = 'rgba(255, 255, 255, 0.08)';\nexport const colorBorderHover = 'rgba(45, 212, 191, 0.3)';\nexport const colorAccentDefault = '#2dd4bf';\nexport const colorAccentHover = '#5ee8d4';\nexport const colorAccentText = '#06210f';\nexport const colorStatusPositive = '#4ade80';\nexport const colorStatusPositiveBackground = 'rgba(34, 197, 94, 0.18)';\nexport const colorStatusWarning = '#f87171';\nexport const colorStatusWarningBackground = 'rgba(248, 113, 113, 0.15)';\nexport const colorTextPrimary = '#ffffff';\nexport const colorTextSecondary = 'rgba(255, 255, 255, 0.55)';\nexport const colorBrandHuemulDark = '#85422b';\nexport const colorBrandHuemulLight = '#b45b38';\nexport const colorBrandStroke = '#1d1d1b';\nexport const typographyBody = 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif';\nexport const typographyHeading = 'Inconsolata, monospace';\nexport const typographySizeXs = '0.68rem';\nexport const typographySizeSm = '0.85rem';\nexport const typographySizeMd = '1rem';\nexport const typographySizeLg = '1.25rem';\nexport const typographySizeXl = '1.5rem';\nexport const typographyWeightRegular = '400';\nexport const typographyWeightSemibold = '600';\nexport const typographyWeightBold = '700';\nexport const typographyTrackingBadge = '0.03em';\nexport const spacing2xs = '0.18rem';\nexport const spacingXs = '0.25rem';\nexport const spacingSm = '0.35rem';\nexport const spacingMd = '0.5rem';\nexport const spacingLg = '0.6rem';\nexport const spacingXl = '0.8rem';\nexport const spacing2xl = '1rem';\nexport const spacing3xl = '1.25rem';\nexport const spacing4xl = '1.35rem';\nexport const spacing5xl = '1.5rem';\nexport const spacing6xl = '2rem';\nexport const spacingShift = '2px';\nexport const spacingElevate = '1px';\nexport const radiusSm = '6px';\nexport const radiusMd = '8px';\nexport const radiusPill = '999px';\nexport const borderWidth = '1px';\nexport const borderAccentBar = '3px';\nexport const shadowFocusRing = '0 0 0 3px rgba(45, 212, 191, 0.12)';\nexport const shadowCardHover = '0 4px 20px rgba(45, 212, 191, 0.06)';\nexport const effectBlur = '10px';\nexport const durationFast = '150ms';\nexport const durationNormal = '200ms';\nexport const durationSpin = '800ms';\nexport const easingDefault = 'ease';\nexport const easingLinear = 'linear';\nexport const focusOutlineWidth = '2px';\nexport const focusOutlineOffset = '2px';\nexport const opacityDisabled = 0.5;\nexport const zIndexBase = 0;\nexport const zIndexDropdown = 100;\nexport const zIndexModal = 1000;\nexport const layoutMaxWidth = '68rem';\n\nexport const tokens = {\n 'color': {\n background: {\n base: '#100a1c',\n topGlow: '#201e40',\n bottomGlow: '#261226',\n },\n surface: {\n default: 'rgba(32, 30, 64, 0.6)',\n hover: 'rgba(45, 212, 191, 0.08)',\n },\n scrim: {\n default: 'rgba(0, 0, 0, 0.6)',\n },\n border: {\n default: 'rgba(255, 255, 255, 0.08)',\n hover: 'rgba(45, 212, 191, 0.3)',\n },\n accent: {\n default: '#2dd4bf',\n hover: '#5ee8d4',\n text: '#06210f',\n },\n status: {\n positive: '#4ade80',\n positiveBackground: 'rgba(34, 197, 94, 0.18)',\n warning: '#f87171',\n warningBackground: 'rgba(248, 113, 113, 0.15)',\n },\n text: {\n primary: '#ffffff',\n secondary: 'rgba(255, 255, 255, 0.55)',\n },\n brand: {\n huemulDark: '#85422b',\n huemulLight: '#b45b38',\n stroke: '#1d1d1b',\n },\n },\n 'typography': {\n body: 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif',\n heading: 'Inconsolata, monospace',\n size: {\n xs: '0.68rem',\n sm: '0.85rem',\n md: '1rem',\n lg: '1.25rem',\n xl: '1.5rem',\n },\n weight: {\n regular: '400',\n semibold: '600',\n bold: '700',\n },\n tracking: {\n badge: '0.03em',\n },\n },\n 'spacing': {\n '2xs': '0.18rem',\n 'xs': '0.25rem',\n 'sm': '0.35rem',\n 'md': '0.5rem',\n 'lg': '0.6rem',\n 'xl': '0.8rem',\n '2xl': '1rem',\n '3xl': '1.25rem',\n '4xl': '1.35rem',\n '5xl': '1.5rem',\n '6xl': '2rem',\n 'shift': '2px',\n 'elevate': '1px',\n },\n 'radius': {\n sm: '6px',\n md: '8px',\n pill: '999px',\n },\n 'border': {\n width: '1px',\n accentBar: '3px',\n },\n 'shadow': {\n focusRing: '0 0 0 3px rgba(45, 212, 191, 0.12)',\n cardHover: '0 4px 20px rgba(45, 212, 191, 0.06)',\n },\n 'effect': {\n blur: '10px',\n },\n 'duration': {\n fast: '150ms',\n normal: '200ms',\n spin: '800ms',\n },\n 'easing': {\n default: 'ease',\n linear: 'linear',\n },\n 'focus': {\n outlineWidth: '2px',\n outlineOffset: '2px',\n },\n 'opacity': {\n disabled: 0.5,\n },\n 'z-index': {\n base: 0,\n dropdown: 100,\n modal: 1000,\n },\n 'layout': {\n maxWidth: '68rem',\n },\n} as const;\n\nexport type TokenCategory = keyof typeof tokens;\n"]}
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/tokens/tokens.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAC7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAChD,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AACtD,MAAM,CAAC,MAAM,kBAAk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AE,QAAQ;KACjB;IACD,OAAO,EAAE;QACP,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;KACrB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,GAAG;KACd;IACD,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,GAAG;QACb,KAAK,EAAE,IAAI;KACZ;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,OAAO;KAClB;IACD,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;YACV,EAAE,EAAE,MAAM;SACX;QACD,MAAM,EAAE,KAAK;KACd;CACO,CAAC","sourcesContent":["/* Generated by toki v1.12.1 — do not edit */\n\nexport const colorBackgroundBase = '#100a1c';\nexport const colorBackgroundTopGlow = '#201e40';\nexport const colorBackgroundBottomGlow = '#261226';\nexport const colorSurfaceDefault = 'rgba(32, 30, 64, 0.6)';\nexport const colorSurfaceHover = 'rgba(45, 212, 191, 0.08)';\nexport const colorScrimDefault = 'rgba(0, 0, 0, 0.6)';\nexport const colorBorderDefault = 'rgba(255, 255, 255, 0.08)';\nexport const colorBorderHover = 'rgba(45, 212, 191, 0.3)';\nexport const colorAccentDefault = '#2dd4bf';\nexport const colorAccentHover = '#5ee8d4';\nexport const colorAccentText = '#06210f';\nexport const colorStatusPositive = '#4ade80';\nexport const colorStatusPositiveBackground = 'rgba(34, 197, 94, 0.18)';\nexport const colorStatusWarning = '#f87171';\nexport const colorStatusWarningBackground = 'rgba(248, 113, 113, 0.15)';\nexport const colorTextPrimary = '#ffffff';\nexport const colorTextSecondary = 'rgba(255, 255, 255, 0.55)';\nexport const colorBrandHuemulDark = '#85422b';\nexport const colorBrandHuemulLight = '#b45b38';\nexport const colorBrandStroke = '#1d1d1b';\nexport const typographyBody = 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif';\nexport const typographyHeading = 'Inconsolata, monospace';\nexport const typographySizeXs = '0.68rem';\nexport const typographySizeSm = '0.85rem';\nexport const typographySizeMd = '1rem';\nexport const typographySizeLg = '1.25rem';\nexport const typographySizeXl = '1.5rem';\nexport const typographyWeightRegular = '400';\nexport const typographyWeightSemibold = '600';\nexport const typographyWeightBold = '700';\nexport const typographyTrackingBadge = '0.03em';\nexport const spacing2xs = '0.18rem';\nexport const spacingXs = '0.25rem';\nexport const spacingSm = '0.35rem';\nexport const spacingMd = '0.5rem';\nexport const spacingLg = '0.6rem';\nexport const spacingXl = '0.8rem';\nexport const spacing2xl = '1rem';\nexport const spacing3xl = '1.25rem';\nexport const spacing4xl = '1.35rem';\nexport const spacing5xl = '1.5rem';\nexport const spacing6xl = '2rem';\nexport const spacingShift = '2px';\nexport const spacingElevate = '1px';\nexport const radiusSm = '6px';\nexport const radiusMd = '8px';\nexport const radiusPill = '999px';\nexport const borderWidth = '1px';\nexport const borderAccentBar = '3px';\nexport const shadowFocusRing = '0 0 0 3px rgba(45, 212, 191, 0.12)';\nexport const shadowCardHover = '0 4px 20px rgba(45, 212, 191, 0.06)';\nexport const effectBlur = '10px';\nexport const durationFast = '150ms';\nexport const durationNormal = '200ms';\nexport const durationSpin = '800ms';\nexport const easingDefault = 'ease';\nexport const easingLinear = 'linear';\nexport const focusOutlineWidth = '2px';\nexport const focusOutlineOffset = '2px';\nexport const opacityDisabled = 0.5;\nexport const zIndexBase = 0;\nexport const zIndexDropdown = 100;\nexport const zIndexModal = 1000;\nexport const layoutMaxWidth = '68rem';\nexport const iconSizeSm = '16px';\nexport const iconSizeMd = '20px';\nexport const iconSizeLg = '24px';\nexport const iconStroke = '2px';\n\nexport const tokens = {\n 'color': {\n background: {\n base: '#100a1c',\n topGlow: '#201e40',\n bottomGlow: '#261226',\n },\n surface: {\n default: 'rgba(32, 30, 64, 0.6)',\n hover: 'rgba(45, 212, 191, 0.08)',\n },\n scrim: {\n default: 'rgba(0, 0, 0, 0.6)',\n },\n border: {\n default: 'rgba(255, 255, 255, 0.08)',\n hover: 'rgba(45, 212, 191, 0.3)',\n },\n accent: {\n default: '#2dd4bf',\n hover: '#5ee8d4',\n text: '#06210f',\n },\n status: {\n positive: '#4ade80',\n positiveBackground: 'rgba(34, 197, 94, 0.18)',\n warning: '#f87171',\n warningBackground: 'rgba(248, 113, 113, 0.15)',\n },\n text: {\n primary: '#ffffff',\n secondary: 'rgba(255, 255, 255, 0.55)',\n },\n brand: {\n huemulDark: '#85422b',\n huemulLight: '#b45b38',\n stroke: '#1d1d1b',\n },\n },\n 'typography': {\n body: 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif',\n heading: 'Inconsolata, monospace',\n size: {\n xs: '0.68rem',\n sm: '0.85rem',\n md: '1rem',\n lg: '1.25rem',\n xl: '1.5rem',\n },\n weight: {\n regular: '400',\n semibold: '600',\n bold: '700',\n },\n tracking: {\n badge: '0.03em',\n },\n },\n 'spacing': {\n '2xs': '0.18rem',\n 'xs': '0.25rem',\n 'sm': '0.35rem',\n 'md': '0.5rem',\n 'lg': '0.6rem',\n 'xl': '0.8rem',\n '2xl': '1rem',\n '3xl': '1.25rem',\n '4xl': '1.35rem',\n '5xl': '1.5rem',\n '6xl': '2rem',\n 'shift': '2px',\n 'elevate': '1px',\n },\n 'radius': {\n sm: '6px',\n md: '8px',\n pill: '999px',\n },\n 'border': {\n width: '1px',\n accentBar: '3px',\n },\n 'shadow': {\n focusRing: '0 0 0 3px rgba(45, 212, 191, 0.12)',\n cardHover: '0 4px 20px rgba(45, 212, 191, 0.06)',\n },\n 'effect': {\n blur: '10px',\n },\n 'duration': {\n fast: '150ms',\n normal: '200ms',\n spin: '800ms',\n },\n 'easing': {\n default: 'ease',\n linear: 'linear',\n },\n 'focus': {\n outlineWidth: '2px',\n outlineOffset: '2px',\n },\n 'opacity': {\n disabled: 0.5,\n },\n 'z-index': {\n base: 0,\n dropdown: 100,\n modal: 1000,\n },\n 'layout': {\n maxWidth: '68rem',\n },\n 'icon': {\n size: {\n sm: '16px',\n md: '20px',\n lg: '24px',\n },\n stroke: '2px',\n },\n} as const;\n\nexport type TokenCategory = keyof typeof tokens;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tokens/types.ts"],"names":[],"mappings":"AAAA,6CAA6C","sourcesContent":["/* Generated by toki v1.12.1 — do not edit */\n\nexport type ColorToken =\n | 'color.background.base'\n | 'color.background.top-glow'\n | 'color.background.bottom-glow'\n | 'color.surface.default'\n | 'color.surface.hover'\n | 'color.scrim.default'\n | 'color.border.default'\n | 'color.border.hover'\n | 'color.accent.default'\n | 'color.accent.hover'\n | 'color.accent.text'\n | 'color.status.positive'\n | 'color.status.positive-background'\n | 'color.status.warning'\n | 'color.status.warning-background'\n | 'color.text.primary'\n | 'color.text.secondary'\n | 'color.brand.huemul-dark'\n | 'color.brand.huemul-light'\n | 'color.brand.stroke';\n\nexport type TypographyToken =\n | 'typography.body'\n | 'typography.heading'\n | 'typography.size.xs'\n | 'typography.size.sm'\n | 'typography.size.md'\n | 'typography.size.lg'\n | 'typography.size.xl'\n | 'typography.weight.regular'\n | 'typography.weight.semibold'\n | 'typography.weight.bold'\n | 'typography.tracking.badge';\n\nexport type SpacingToken =\n | 'spacing.2xs'\n | 'spacing.xs'\n | 'spacing.sm'\n | 'spacing.md'\n | 'spacing.lg'\n | 'spacing.xl'\n | 'spacing.2xl'\n | 'spacing.3xl'\n | 'spacing.4xl'\n | 'spacing.5xl'\n | 'spacing.6xl'\n | 'spacing.shift'\n | 'spacing.elevate';\n\nexport type RadiusToken = 'radius.sm' | 'radius.md' | 'radius.pill';\n\nexport type BorderToken = 'border.width' | 'border.accent-bar';\n\nexport type ShadowToken = 'shadow.focus-ring' | 'shadow.card-hover';\n\nexport type EffectToken = 'effect.blur';\n\nexport type DurationToken = 'duration.fast' | 'duration.normal' | 'duration.spin';\n\nexport type EasingToken = 'easing.default' | 'easing.linear';\n\nexport type FocusToken = 'focus.outline-width' | 'focus.outline-offset';\n\nexport type OpacityToken = 'opacity.disabled';\n\nexport type ZIndexToken = 'z-index.base' | 'z-index.dropdown' | 'z-index.modal';\n\nexport type LayoutToken = 'layout.max-width';\n\nexport type TokenName =\n | ColorToken\n | TypographyToken\n | SpacingToken\n | RadiusToken\n | BorderToken\n | ShadowToken\n | EffectToken\n | DurationToken\n | EasingToken\n | FocusToken\n | OpacityToken\n | ZIndexToken\n | LayoutToken;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tokens/types.ts"],"names":[],"mappings":"AAAA,6CAA6C","sourcesContent":["/* Generated by toki v1.12.1 — do not edit */\n\nexport type ColorToken =\n | 'color.background.base'\n | 'color.background.top-glow'\n | 'color.background.bottom-glow'\n | 'color.surface.default'\n | 'color.surface.hover'\n | 'color.scrim.default'\n | 'color.border.default'\n | 'color.border.hover'\n | 'color.accent.default'\n | 'color.accent.hover'\n | 'color.accent.text'\n | 'color.status.positive'\n | 'color.status.positive-background'\n | 'color.status.warning'\n | 'color.status.warning-background'\n | 'color.text.primary'\n | 'color.text.secondary'\n | 'color.brand.huemul-dark'\n | 'color.brand.huemul-light'\n | 'color.brand.stroke';\n\nexport type TypographyToken =\n | 'typography.body'\n | 'typography.heading'\n | 'typography.size.xs'\n | 'typography.size.sm'\n | 'typography.size.md'\n | 'typography.size.lg'\n | 'typography.size.xl'\n | 'typography.weight.regular'\n | 'typography.weight.semibold'\n | 'typography.weight.bold'\n | 'typography.tracking.badge';\n\nexport type SpacingToken =\n | 'spacing.2xs'\n | 'spacing.xs'\n | 'spacing.sm'\n | 'spacing.md'\n | 'spacing.lg'\n | 'spacing.xl'\n | 'spacing.2xl'\n | 'spacing.3xl'\n | 'spacing.4xl'\n | 'spacing.5xl'\n | 'spacing.6xl'\n | 'spacing.shift'\n | 'spacing.elevate';\n\nexport type RadiusToken = 'radius.sm' | 'radius.md' | 'radius.pill';\n\nexport type BorderToken = 'border.width' | 'border.accent-bar';\n\nexport type ShadowToken = 'shadow.focus-ring' | 'shadow.card-hover';\n\nexport type EffectToken = 'effect.blur';\n\nexport type DurationToken = 'duration.fast' | 'duration.normal' | 'duration.spin';\n\nexport type EasingToken = 'easing.default' | 'easing.linear';\n\nexport type FocusToken = 'focus.outline-width' | 'focus.outline-offset';\n\nexport type OpacityToken = 'opacity.disabled';\n\nexport type ZIndexToken = 'z-index.base' | 'z-index.dropdown' | 'z-index.modal';\n\nexport type LayoutToken = 'layout.max-width';\n\nexport type IconToken = 'icon.size.sm' | 'icon.size.md' | 'icon.size.lg' | 'icon.stroke';\n\nexport type TokenName =\n | ColorToken\n | TypographyToken\n | SpacingToken\n | RadiusToken\n | BorderToken\n | ShadowToken\n | EffectToken\n | DurationToken\n | EasingToken\n | FocusToken\n | OpacityToken\n | ZIndexToken\n | LayoutToken\n | IconToken;\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const chIcons = {
|
|
2
|
+
alert: [
|
|
3
|
+
{ tag: 'path', attrs: { d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3' } },
|
|
4
|
+
{ tag: 'path', attrs: { d: 'M12 9v4' } },
|
|
5
|
+
{ tag: 'path', attrs: { d: 'M12 17h.01' } },
|
|
6
|
+
],
|
|
7
|
+
arrowRight: [
|
|
8
|
+
{ tag: 'path', attrs: { d: 'M5 12h14' } },
|
|
9
|
+
{ tag: 'path', attrs: { d: 'm12 5 7 7-7 7' } },
|
|
10
|
+
],
|
|
11
|
+
check: [{ tag: 'path', attrs: { d: 'M20 6 9 17l-5-5' } }],
|
|
12
|
+
chevronDown: [{ tag: 'path', attrs: { d: 'm6 9 6 6 6-6' } }],
|
|
13
|
+
chevronRight: [{ tag: 'path', attrs: { d: 'm9 18 6-6-6-6' } }],
|
|
14
|
+
close: [
|
|
15
|
+
{ tag: 'path', attrs: { d: 'M18 6 6 18' } },
|
|
16
|
+
{ tag: 'path', attrs: { d: 'm6 6 12 12' } },
|
|
17
|
+
],
|
|
18
|
+
copy: [
|
|
19
|
+
{ tag: 'rect', attrs: { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2' } },
|
|
20
|
+
{ tag: 'path', attrs: { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2' } },
|
|
21
|
+
],
|
|
22
|
+
delete: [
|
|
23
|
+
{ tag: 'path', attrs: { d: 'M10 11v6' } },
|
|
24
|
+
{ tag: 'path', attrs: { d: 'M14 11v6' } },
|
|
25
|
+
{ tag: 'path', attrs: { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6' } },
|
|
26
|
+
{ tag: 'path', attrs: { d: 'M3 6h18' } },
|
|
27
|
+
{ tag: 'path', attrs: { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2' } },
|
|
28
|
+
],
|
|
29
|
+
download: [
|
|
30
|
+
{ tag: 'path', attrs: { d: 'M12 15V3' } },
|
|
31
|
+
{ tag: 'path', attrs: { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' } },
|
|
32
|
+
{ tag: 'path', attrs: { d: 'm7 10 5 5 5-5' } },
|
|
33
|
+
],
|
|
34
|
+
error: [
|
|
35
|
+
{ tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },
|
|
36
|
+
{ tag: 'line', attrs: {} },
|
|
37
|
+
{ tag: 'line', attrs: {} },
|
|
38
|
+
],
|
|
39
|
+
externalLink: [
|
|
40
|
+
{ tag: 'path', attrs: { d: 'M15 3h6v6' } },
|
|
41
|
+
{ tag: 'path', attrs: { d: 'M10 14 21 3' } },
|
|
42
|
+
{ tag: 'path', attrs: { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6' } },
|
|
43
|
+
],
|
|
44
|
+
info: [
|
|
45
|
+
{ tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },
|
|
46
|
+
{ tag: 'path', attrs: { d: 'M12 16v-4' } },
|
|
47
|
+
{ tag: 'path', attrs: { d: 'M12 8h.01' } },
|
|
48
|
+
],
|
|
49
|
+
menu: [
|
|
50
|
+
{ tag: 'path', attrs: { d: 'M4 5h16' } },
|
|
51
|
+
{ tag: 'path', attrs: { d: 'M4 12h16' } },
|
|
52
|
+
{ tag: 'path', attrs: { d: 'M4 19h16' } },
|
|
53
|
+
],
|
|
54
|
+
plus: [
|
|
55
|
+
{ tag: 'path', attrs: { d: 'M5 12h14' } },
|
|
56
|
+
{ tag: 'path', attrs: { d: 'M12 5v14' } },
|
|
57
|
+
],
|
|
58
|
+
search: [
|
|
59
|
+
{ tag: 'path', attrs: { d: 'm21 21-4.34-4.34' } },
|
|
60
|
+
{ tag: 'circle', attrs: { cx: '11', cy: '11', r: '8' } },
|
|
61
|
+
],
|
|
62
|
+
spinner: [
|
|
63
|
+
{ tag: 'path', attrs: { d: 'M12 2v4' } },
|
|
64
|
+
{ tag: 'path', attrs: { d: 'm16.2 7.8 2.9-2.9' } },
|
|
65
|
+
{ tag: 'path', attrs: { d: 'M18 12h4' } },
|
|
66
|
+
{ tag: 'path', attrs: { d: 'm16.2 16.2 2.9 2.9' } },
|
|
67
|
+
{ tag: 'path', attrs: { d: 'M12 18v4' } },
|
|
68
|
+
{ tag: 'path', attrs: { d: 'm4.9 19.1 2.9-2.9' } },
|
|
69
|
+
{ tag: 'path', attrs: { d: 'M2 12h4' } },
|
|
70
|
+
{ tag: 'path', attrs: { d: 'm4.9 4.9 2.9 2.9' } },
|
|
71
|
+
],
|
|
72
|
+
success: [
|
|
73
|
+
{ tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },
|
|
74
|
+
{ tag: 'path', attrs: { d: 'm16 9-5.5 5.5L8 12' } },
|
|
75
|
+
],
|
|
76
|
+
upload: [
|
|
77
|
+
{ tag: 'path', attrs: { d: 'M12 3v12' } },
|
|
78
|
+
{ tag: 'path', attrs: { d: 'm17 8-5-5-5 5' } },
|
|
79
|
+
{ tag: 'path', attrs: { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' } },
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/utils/icons.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAC,MAAM,OAAO,GAAsC;IACxD,KAAK,EAAE;QACL,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,0EAA0E,EAAE,EAAE;QACzG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE;QACxC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE;KAC5C;IACD,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE;QACzC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE;KAC/C;IACD,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,iBAAiB,EAAE,EAAE,CAAC;IACzD,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,CAAC;IAC5D,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,CAAC;IAC9D,KAAK,EAAE;QACL,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE;QAC3C,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,E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E,UAAU,EAAE,EAAE;QACzC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE;QAC9C,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,2CAA2C,EAAE,EAAE;KAC3E;CACF,CAAC","sourcesContent":["/**\n * Icon geometry, copied from Lucide v1.82.0 (https://lucide.dev), ISC licensed.\n *\n * Only the shapes are vendored, not the package: a dependency would ship a\n * whole icon set to consumers who need six of them, and the set has to be\n * frozen so an upstream rename cannot silently break a public `name` value.\n * Each entry keeps Lucide's 24x24 viewBox, so stroke width stays consistent\n * across sizes.\n */\nexport type ChIconName =\n | 'alert'\n | 'arrowRight'\n | 'check'\n | 'chevronDown'\n | 'chevronRight'\n | 'close'\n | 'copy'\n | 'delete'\n | 'download'\n | 'error'\n | 'externalLink'\n | 'info'\n | 'menu'\n | 'plus'\n | 'search'\n | 'spinner'\n | 'success'\n | 'upload';\n\nexport interface ChIconShape {\n tag: 'path' | 'circle' | 'rect' | 'line' | 'polyline' | 'polygon';\n attrs: Record<string, string>;\n}\n\nexport const chIcons: Record<ChIconName, ChIconShape[]> = {\n alert: [\n { tag: 'path', attrs: { d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3' } },\n { tag: 'path', attrs: { d: 'M12 9v4' } },\n { tag: 'path', attrs: { d: 'M12 17h.01' } },\n ],\n arrowRight: [\n { tag: 'path', attrs: { d: 'M5 12h14' } },\n { tag: 'path', attrs: { d: 'm12 5 7 7-7 7' } },\n ],\n check: [{ tag: 'path', attrs: { d: 'M20 6 9 17l-5-5' } }],\n chevronDown: [{ tag: 'path', attrs: { d: 'm6 9 6 6 6-6' } }],\n chevronRight: [{ tag: 'path', attrs: { d: 'm9 18 6-6-6-6' } }],\n close: [\n { tag: 'path', attrs: { d: 'M18 6 6 18' } },\n { tag: 'path', attrs: { d: 'm6 6 12 12' } },\n ],\n copy: [\n { tag: 'rect', attrs: { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2' } },\n { tag: 'path', attrs: { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2' } },\n ],\n delete: [\n { tag: 'path', attrs: { d: 'M10 11v6' } },\n { tag: 'path', attrs: { d: 'M14 11v6' } },\n { tag: 'path', attrs: { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6' } },\n { tag: 'path', attrs: { d: 'M3 6h18' } },\n { tag: 'path', attrs: { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2' } },\n ],\n download: [\n { tag: 'path', attrs: { d: 'M12 15V3' } },\n { tag: 'path', attrs: { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' } },\n { tag: 'path', attrs: { d: 'm7 10 5 5 5-5' } },\n ],\n error: [\n { tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },\n { tag: 'line', attrs: {} },\n { tag: 'line', attrs: {} },\n ],\n externalLink: [\n { tag: 'path', attrs: { d: 'M15 3h6v6' } },\n { tag: 'path', attrs: { d: 'M10 14 21 3' } },\n { tag: 'path', attrs: { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6' } },\n ],\n info: [\n { tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },\n { tag: 'path', attrs: { d: 'M12 16v-4' } },\n { tag: 'path', attrs: { d: 'M12 8h.01' } },\n ],\n menu: [\n { tag: 'path', attrs: { d: 'M4 5h16' } },\n { tag: 'path', attrs: { d: 'M4 12h16' } },\n { tag: 'path', attrs: { d: 'M4 19h16' } },\n ],\n plus: [\n { tag: 'path', attrs: { d: 'M5 12h14' } },\n { tag: 'path', attrs: { d: 'M12 5v14' } },\n ],\n search: [\n { tag: 'path', attrs: { d: 'm21 21-4.34-4.34' } },\n { tag: 'circle', attrs: { cx: '11', cy: '11', r: '8' } },\n ],\n spinner: [\n { tag: 'path', attrs: { d: 'M12 2v4' } },\n { tag: 'path', attrs: { d: 'm16.2 7.8 2.9-2.9' } },\n { tag: 'path', attrs: { d: 'M18 12h4' } },\n { tag: 'path', attrs: { d: 'm16.2 16.2 2.9 2.9' } },\n { tag: 'path', attrs: { d: 'M12 18v4' } },\n { tag: 'path', attrs: { d: 'm4.9 19.1 2.9-2.9' } },\n { tag: 'path', attrs: { d: 'M2 12h4' } },\n { tag: 'path', attrs: { d: 'm4.9 4.9 2.9 2.9' } },\n ],\n success: [\n { tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },\n { tag: 'path', attrs: { d: 'm16 9-5.5 5.5L8 12' } },\n ],\n upload: [\n { tag: 'path', attrs: { d: 'M12 3v12' } },\n { tag: 'path', attrs: { d: 'm17 8-5-5-5 5' } },\n { tag: 'path', attrs: { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' } },\n ],\n};\n"]}
|