@devschile/chucao 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -12
- 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-9a614e82.entry.js → p-13ab5f9a.entry.js} +2 -2
- package/dist/chucao/{p-053d58a4.entry.js → p-1cc7042e.entry.js} +2 -2
- package/dist/chucao/{p-c598f978.entry.js → p-23c5220b.entry.js} +2 -2
- package/dist/chucao/p-2d7e81b2.entry.js +2 -0
- package/dist/chucao/p-2d7e81b2.entry.js.map +1 -0
- package/dist/chucao/p-421cda05.entry.js +2 -0
- package/dist/chucao/{p-0305f2eb.entry.js.map → p-421cda05.entry.js.map} +1 -1
- package/dist/chucao/p-Bvah_WQV.js +3 -0
- package/dist/chucao/p-Bvah_WQV.js.map +1 -0
- package/dist/chucao/{p-ad3206a2.entry.js → p-c16b18b7.entry.js} +2 -2
- package/dist/chucao/p-cbb2b478.entry.js +2 -0
- package/dist/chucao/p-cbb2b478.entry.js.map +1 -0
- package/dist/chucao/{p-20492b73.entry.js → p-cfb6db53.entry.js} +2 -2
- package/dist/chucao/{p-488c7838.entry.js → p-df73f786.entry.js} +2 -2
- package/dist/chucao/{p-fe8e9537.entry.js → p-e8fe65bb.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ch-alert_8.cjs.entry.js +4 -4
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +1 -1
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +167 -0
- package/dist/cjs/ch-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-radio.cjs.entry.js +1 -1
- package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ch-tooltip.cjs.entry.js +82 -0
- package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/chucao.cjs.js +2 -2
- package/dist/cjs/{index-ls4U227d.js → index-DMeDkSQU.js} +148 -5
- package/dist/cjs/index-DMeDkSQU.js.map +1 -0
- package/dist/cjs/index.cjs.js +5 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- 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-input/ch-input.js +1 -1
- package/dist/collection/components/ch-modal/ch-modal.css +69 -0
- package/dist/collection/components/ch-modal/ch-modal.js +278 -0
- package/dist/collection/components/ch-modal/ch-modal.js.map +1 -0
- package/dist/collection/components/ch-switch/ch-switch.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.css +100 -0
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +168 -0
- package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -0
- package/dist/collection/tokens/tokens.js +4 -0
- package/dist/collection/tokens/tokens.js.map +1 -1
- package/dist/collection/tokens/types.js.map +1 -1
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.js +1 -1
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-modal.d.ts +11 -0
- package/dist/components/ch-modal.js +2 -0
- package/dist/components/ch-modal.js.map +1 -0
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-spinner.js +1 -1
- 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-tooltip.d.ts +11 -0
- package/dist/components/ch-tooltip.js +2 -0
- package/dist/components/ch-tooltip.js.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-hyy-cLgi.js +2 -0
- package/dist/components/p-hyy-cLgi.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/ch-alert_8.entry.js +4 -4
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +1 -1
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +165 -0
- package/dist/esm/ch-modal.entry.js.map +1 -0
- package/dist/esm/ch-radio.entry.js +1 -1
- package/dist/esm/ch-tabs.entry.js +1 -1
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/ch-tooltip.entry.js +80 -0
- package/dist/esm/ch-tooltip.entry.js.map +1 -0
- package/dist/esm/chucao.js +3 -3
- package/dist/esm/{index-pfWAsOzE.js → index-Bvah_WQV.js} +148 -6
- package/dist/esm/index-Bvah_WQV.js.map +1 -0
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-modal/ch-modal.d.ts +67 -0
- package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +47 -0
- package/dist/types/components.d.ts +216 -0
- package/dist/types/tokens/tokens.d.ts +4 -0
- package/dist/types/tokens/types.d.ts +1 -1
- package/dist-react/components.d.ts +10 -1
- package/dist-react/components.js +21 -0
- package/dist-react/components.ts +31 -1
- package/dist-vue/index.d.ts +2 -0
- package/dist-vue/index.js +15 -0
- package/dist-vue/index.ts +19 -0
- package/hydrate/index.js +409 -8
- package/hydrate/index.mjs +409 -8
- package/package.json +1 -1
- package/dist/chucao/p-0305f2eb.entry.js +0 -2
- package/dist/chucao/p-pfWAsOzE.js +0 -3
- package/dist/chucao/p-pfWAsOzE.js.map +0 -1
- package/dist/cjs/index-ls4U227d.js.map +0 -1
- package/dist/components/p-ONE3uKkF.js +0 -2
- package/dist/components/p-ONE3uKkF.js.map +0 -1
- package/dist/esm/index-pfWAsOzE.js.map +0 -1
- /package/dist/chucao/{p-9a614e82.entry.js.map → p-13ab5f9a.entry.js.map} +0 -0
- /package/dist/chucao/{p-053d58a4.entry.js.map → p-1cc7042e.entry.js.map} +0 -0
- /package/dist/chucao/{p-c598f978.entry.js.map → p-23c5220b.entry.js.map} +0 -0
- /package/dist/chucao/{p-ad3206a2.entry.js.map → p-c16b18b7.entry.js.map} +0 -0
- /package/dist/chucao/{p-20492b73.entry.js.map → p-cfb6db53.entry.js.map} +0 -0
- /package/dist/chucao/{p-488c7838.entry.js.map → p-df73f786.entry.js.map} +0 -0
- /package/dist/chucao/{p-fe8e9537.entry.js.map → p-e8fe65bb.entry.js.map} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.anchor {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.bubble {
|
|
11
|
+
position: absolute;
|
|
12
|
+
z-index: var(--z-index-dropdown);
|
|
13
|
+
width: max-content;
|
|
14
|
+
max-width: 16rem;
|
|
15
|
+
padding: var(--spacing-md) var(--spacing-2xl);
|
|
16
|
+
border: var(--border-width) solid var(--border);
|
|
17
|
+
border-radius: var(--radius-sm);
|
|
18
|
+
background: var(--color-background-base);
|
|
19
|
+
color: var(--text);
|
|
20
|
+
font-family: var(--font-body);
|
|
21
|
+
font-size: var(--typography-size-sm);
|
|
22
|
+
line-height: 1.4;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
visibility: hidden;
|
|
25
|
+
transition:
|
|
26
|
+
opacity var(--duration-fast) var(--easing-default),
|
|
27
|
+
visibility var(--duration-fast) var(--easing-default);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.bubble--visible {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
visibility: visible;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.bubble::before {
|
|
36
|
+
content: '';
|
|
37
|
+
position: absolute;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.bubble--top {
|
|
41
|
+
bottom: 100%;
|
|
42
|
+
left: 50%;
|
|
43
|
+
transform: translateX(-50%);
|
|
44
|
+
margin-bottom: var(--spacing-md);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.bubble--top::before {
|
|
48
|
+
top: 100%;
|
|
49
|
+
left: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
height: var(--spacing-md);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.bubble--bottom {
|
|
55
|
+
top: 100%;
|
|
56
|
+
left: 50%;
|
|
57
|
+
transform: translateX(-50%);
|
|
58
|
+
margin-top: var(--spacing-md);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.bubble--bottom::before {
|
|
62
|
+
bottom: 100%;
|
|
63
|
+
left: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
height: var(--spacing-md);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.bubble--left {
|
|
69
|
+
right: 100%;
|
|
70
|
+
top: 50%;
|
|
71
|
+
transform: translateY(-50%);
|
|
72
|
+
margin-right: var(--spacing-md);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bubble--left::before {
|
|
76
|
+
left: 100%;
|
|
77
|
+
top: 0;
|
|
78
|
+
bottom: 0;
|
|
79
|
+
width: var(--spacing-md);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.bubble--right {
|
|
83
|
+
left: 100%;
|
|
84
|
+
top: 50%;
|
|
85
|
+
transform: translateY(-50%);
|
|
86
|
+
margin-left: var(--spacing-md);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.bubble--right::before {
|
|
90
|
+
right: 100%;
|
|
91
|
+
top: 0;
|
|
92
|
+
bottom: 0;
|
|
93
|
+
width: var(--spacing-md);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media (prefers-reduced-motion: reduce) {
|
|
97
|
+
.bubble {
|
|
98
|
+
transition: none;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
let tooltipIds = 0;
|
|
3
|
+
/**
|
|
4
|
+
* Short help text shown on hover and on focus.
|
|
5
|
+
*
|
|
6
|
+
* Both the trigger and the text come from the consumer's light DOM through
|
|
7
|
+
* named slots. That is what makes the accessible association work: an
|
|
8
|
+
* `aria-describedby` IDREF only resolves within a single tree, and slotted
|
|
9
|
+
* nodes stay in the document tree even though they render inside the shadow
|
|
10
|
+
* root. Keeping the text in the shadow root instead would need a reference
|
|
11
|
+
* pointing into a shadow tree, which the platform does not allow — element
|
|
12
|
+
* reflection only points outwards, and `referenceTarget` is not available yet.
|
|
13
|
+
*
|
|
14
|
+
* The trigger has to be a natively focusable element (`<button>`, `<a>`,
|
|
15
|
+
* `<input>`). A chucao component such as `ch-button` will not be described,
|
|
16
|
+
* because `aria-*` set on a custom element host does not reach the native
|
|
17
|
+
* element inside it — see the discussion in issue #47.
|
|
18
|
+
*/
|
|
19
|
+
export class ChTooltip {
|
|
20
|
+
el;
|
|
21
|
+
fallbackId = `ch-tooltip-${++tooltipIds}`;
|
|
22
|
+
/**
|
|
23
|
+
* Which side of the trigger the bubble is placed on.
|
|
24
|
+
*/
|
|
25
|
+
placement = 'top';
|
|
26
|
+
// Hover and focus are tracked apart so that neither cancels the other: a
|
|
27
|
+
// pointer passing over and away must not hide a tooltip whose trigger still
|
|
28
|
+
// holds keyboard focus.
|
|
29
|
+
hovered = false;
|
|
30
|
+
focused = false;
|
|
31
|
+
dismissed = false;
|
|
32
|
+
get visible() {
|
|
33
|
+
return (this.hovered || this.focused) && !this.dismissed;
|
|
34
|
+
}
|
|
35
|
+
componentDidLoad() {
|
|
36
|
+
this.associate();
|
|
37
|
+
}
|
|
38
|
+
handleMouseEnter() {
|
|
39
|
+
this.hovered = true;
|
|
40
|
+
this.dismissed = false;
|
|
41
|
+
}
|
|
42
|
+
handleMouseLeave() {
|
|
43
|
+
this.hovered = false;
|
|
44
|
+
}
|
|
45
|
+
handleFocusIn() {
|
|
46
|
+
this.focused = true;
|
|
47
|
+
this.dismissed = false;
|
|
48
|
+
}
|
|
49
|
+
handleFocusOut() {
|
|
50
|
+
this.focused = false;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Listens on the document because a tooltip opened by hovering leaves focus
|
|
54
|
+
* wherever it was, so a host-scoped handler would never see the key.
|
|
55
|
+
*/
|
|
56
|
+
handleKeyDown(event) {
|
|
57
|
+
if (event.key === 'Escape' && this.visible) {
|
|
58
|
+
this.dismissed = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
slotted(name) {
|
|
62
|
+
return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Points the trigger at the text with `aria-describedby`. Re-run on
|
|
66
|
+
* `slotchange` because a framework re-render can replace the slotted nodes
|
|
67
|
+
* and take the attributes with them.
|
|
68
|
+
*/
|
|
69
|
+
associate = () => {
|
|
70
|
+
const trigger = this.slotted('trigger');
|
|
71
|
+
const content = this.slotted('content');
|
|
72
|
+
if (!trigger || !content) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (!content.id) {
|
|
76
|
+
content.id = this.fallbackId;
|
|
77
|
+
}
|
|
78
|
+
content.setAttribute('role', 'tooltip');
|
|
79
|
+
trigger.setAttribute('aria-describedby', content.id);
|
|
80
|
+
};
|
|
81
|
+
render() {
|
|
82
|
+
return (h(Host, { key: '654d4a12f84c94e014691e911e7c63c6c45b8755' }, h("span", { key: '726269e02fedc37efc39f1561d8b9baf83d6a4cc', class: "anchor" }, h("slot", { key: '876cb19249032d6d1c66f22bd2c255683b6a7f66', name: "trigger", onSlotchange: this.associate }), h("span", { key: '7436eb75b40b33d0b6c8ce194245d4a08a29facb', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, h("slot", { key: '24648cc6078d61803793df011058da9515b466b5', name: "content", onSlotchange: this.associate })))));
|
|
83
|
+
}
|
|
84
|
+
static get is() { return "ch-tooltip"; }
|
|
85
|
+
static get encapsulation() { return "shadow"; }
|
|
86
|
+
static get originalStyleUrls() {
|
|
87
|
+
return {
|
|
88
|
+
"$": ["ch-tooltip.css"]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
static get styleUrls() {
|
|
92
|
+
return {
|
|
93
|
+
"$": ["ch-tooltip.css"]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
static get properties() {
|
|
97
|
+
return {
|
|
98
|
+
"placement": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"mutable": false,
|
|
101
|
+
"complexType": {
|
|
102
|
+
"original": "ChTooltipPlacement",
|
|
103
|
+
"resolved": "\"bottom\" | \"left\" | \"right\" | \"top\"",
|
|
104
|
+
"references": {
|
|
105
|
+
"ChTooltipPlacement": {
|
|
106
|
+
"location": "local",
|
|
107
|
+
"path": "/home/runner/work/chucao/chucao/src/components/ch-tooltip/ch-tooltip.tsx",
|
|
108
|
+
"id": "src/components/ch-tooltip/ch-tooltip.tsx::ChTooltipPlacement"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": "Which side of the trigger the bubble is placed on."
|
|
117
|
+
},
|
|
118
|
+
"getter": false,
|
|
119
|
+
"setter": false,
|
|
120
|
+
"reflect": false,
|
|
121
|
+
"attribute": "placement",
|
|
122
|
+
"defaultValue": "'top'"
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
static get states() {
|
|
127
|
+
return {
|
|
128
|
+
"hovered": {},
|
|
129
|
+
"focused": {},
|
|
130
|
+
"dismissed": {}
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
static get elementRef() { return "el"; }
|
|
134
|
+
static get listeners() {
|
|
135
|
+
return [{
|
|
136
|
+
"name": "mouseenter",
|
|
137
|
+
"method": "handleMouseEnter",
|
|
138
|
+
"target": undefined,
|
|
139
|
+
"capture": false,
|
|
140
|
+
"passive": true
|
|
141
|
+
}, {
|
|
142
|
+
"name": "mouseleave",
|
|
143
|
+
"method": "handleMouseLeave",
|
|
144
|
+
"target": undefined,
|
|
145
|
+
"capture": false,
|
|
146
|
+
"passive": true
|
|
147
|
+
}, {
|
|
148
|
+
"name": "focusin",
|
|
149
|
+
"method": "handleFocusIn",
|
|
150
|
+
"target": undefined,
|
|
151
|
+
"capture": false,
|
|
152
|
+
"passive": false
|
|
153
|
+
}, {
|
|
154
|
+
"name": "focusout",
|
|
155
|
+
"method": "handleFocusOut",
|
|
156
|
+
"target": undefined,
|
|
157
|
+
"capture": false,
|
|
158
|
+
"passive": false
|
|
159
|
+
}, {
|
|
160
|
+
"name": "keydown",
|
|
161
|
+
"method": "handleKeyDown",
|
|
162
|
+
"target": "document",
|
|
163
|
+
"capture": false,
|
|
164
|
+
"passive": false
|
|
165
|
+
}];
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=ch-tooltip.js.map
|
|
@@ -0,0 +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,C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C,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC;IACzF,CAAC;IAED;;;;OAIG;IACK,SAAS,GAAG,GAAG,EAAE;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACxC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;YAChB,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/B,CAAC;QACD,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACxC,OAAO,CAAC,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC;IAEF,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,6DAAM,KAAK,EAAC,QAAQ;gBAClB,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"]}
|
|
@@ -4,6 +4,7 @@ export const colorBackgroundTopGlow = '#201e40';
|
|
|
4
4
|
export const colorBackgroundBottomGlow = '#261226';
|
|
5
5
|
export const colorSurfaceDefault = 'rgba(32, 30, 64, 0.6)';
|
|
6
6
|
export const colorSurfaceHover = 'rgba(45, 212, 191, 0.08)';
|
|
7
|
+
export const colorScrimDefault = 'rgba(0, 0, 0, 0.6)';
|
|
7
8
|
export const colorBorderDefault = 'rgba(255, 255, 255, 0.08)';
|
|
8
9
|
export const colorBorderHover = 'rgba(45, 212, 191, 0.3)';
|
|
9
10
|
export const colorAccentDefault = '#2dd4bf';
|
|
@@ -73,6 +74,9 @@ export const tokens = {
|
|
|
73
74
|
default: 'rgba(32, 30, 64, 0.6)',
|
|
74
75
|
hover: 'rgba(45, 212, 191, 0.08)',
|
|
75
76
|
},
|
|
77
|
+
scrim: {
|
|
78
|
+
default: 'rgba(0, 0, 0, 0.6)',
|
|
79
|
+
},
|
|
76
80
|
border: {
|
|
77
81
|
default: 'rgba(255, 255, 255, 0.08)',
|
|
78
82
|
hover: 'rgba(45, 212, 191, 0.3)',
|
|
@@ -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,M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;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;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 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 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,iBAA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B;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;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 +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.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 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,2 +1,2 @@
|
|
|
1
|
-
import{p as e,t,H as a,c as r,h as i,d as o}from"./p-
|
|
1
|
+
import{p as e,t,H as a,c as r,h as i,d as o}from"./p-hyy-cLgi.js";const s=()=>`:host{display:block}.item{background:var(--surface);border:var(--border-width) solid var(--border);border-radius:var(--radius);transition:border-color var(--duration-normal) var(--easing-default)}.item+.item{margin-top:var(--spacing-md)}.item--open{border-color:var(--border-hover)}.item-head{margin:0}.item-toggle{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-lg);width:100%;padding:var(--spacing-2xl) var(--spacing-3xl);background:transparent;border:none;color:var(--text);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer}.item-toggle::after{content:'';width:var(--spacing-md);height:var(--spacing-md);flex-shrink:0;border-right:var(--border-width) solid var(--text-muted);border-bottom:var(--border-width) solid var(--text-muted);transform:rotate(45deg);transition:transform var(--duration-normal) var(--easing-default)}.item--open .item-toggle::after{transform:rotate(-135deg)}.item-toggle:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.item-toggle:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.item-panel{padding:0 var(--spacing-3xl) var(--spacing-3xl);color:var(--text-muted)}.item-panel[hidden]{display:none}`;let n=0;const d=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chChange=r(this,"chChange")}baseId=`ch-accordion-${++n}`;items=[];value;chChange;headerId(e){return`${this.baseId}-${e}-header`}panelId(e){return`${this.baseId}-${e}-panel`}toggle=e=>{this.value=this.value===e?undefined:e;this.chChange.emit(this.value)};render(){return i(o,{key:"a0b6859c9efc45b158825f2b44aab73a5eb63f0b"},this.items.map((e=>{const t=this.value===e.value;return i("div",{key:e.value,class:{item:true,"item--open":t}},i("h3",{class:"item-head"},i("button",{type:"button",class:"item-toggle",id:this.headerId(e.value),"data-value":e.value,"aria-expanded":t?"true":"false","aria-controls":this.panelId(e.value),disabled:e.disabled,onClick:()=>this.toggle(e.value)},e.title)),i("div",{class:"item-panel",id:this.panelId(e.value),role:"region","aria-labelledby":this.headerId(e.value),hidden:!t},i("slot",{name:`panel-${e.value}`})))})))}static get style(){return s()}},[769,"ch-accordion",{items:[16],value:[1025]}]);function l(){if(typeof customElements==="undefined"){return}const e=["ch-accordion"];e.forEach((e=>{switch(e){case"ch-accordion":if(!customElements.get(t(e))){customElements.define(t(e),d)}break}}))}l();const c=d;const h=l;export{c as ChAccordion,h as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-accordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as r,H as s,c as e,h as a,d as t,t as i}from"./p-
|
|
1
|
+
import{p as r,H as s,c as e,h as a,d as t,t as i}from"./p-hyy-cLgi.js";const o=()=>`:host{display:block}.alert{display:flex;align-items:flex-start;gap:var(--spacing-2xl);padding:var(--spacing-2xl) var(--spacing-3xl);border:var(--border-width) solid transparent;border-radius:var(--radius);font-size:var(--typography-size-sm);line-height:1.5}.alert-content{flex:1;min-width:0;overflow-wrap:anywhere}.alert--default{color:var(--text);background:var(--surface);border-color:var(--border)}.alert--positive{color:var(--color-status-positive);background:var(--color-status-positive-background);border-color:var(--color-status-positive)}.alert--warning{color:var(--color-status-warning);background:var(--color-status-warning-background);border-color:var(--color-status-warning)}.alert-dismiss{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:inherit;cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.alert-dismiss:hover{background:var(--surface-hover)}.alert-dismiss:focus-visible{outline:var(--focus-outline-width) solid currentColor;outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.alert-dismiss{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.alert-dismiss{transition:none}}`;const n=r(class r extends s{constructor(r){super();if(r!==false){this.__registerHost()}this.__attachShadow();this.chDismiss=e(this,"chDismiss")}variant="default";dismissLabel;chDismiss;handleDismiss=()=>{this.chDismiss.emit()};render(){const r=this.variant==="warning"?"alert":"status";return a(t,{key:"7d96602ad2c2b3824588f01d5b94d73098da6ce4"},a("div",{key:r,class:{alert:true,[`alert--${this.variant}`]:true},role:r},a("div",{key:"64d7af5aad0e4b103b35cc2ba3756b1a1601b148",class:"alert-content"},a("slot",{key:"44573092407161bbeafe5117bddb54168b183d90"})),this.dismissLabel&&a("button",{key:"018858ac292c0fb7f26c788f629638f533d0dfd6",class:"alert-dismiss",type:"button","aria-label":this.dismissLabel,onClick:this.handleDismiss},a("span",{key:"f6454d5285ed9c7c414d839d2d35d2ce0c271dd4","aria-hidden":"true"},"×"))))}static get style(){return o()}},[769,"ch-alert",{variant:[1],dismissLabel:[1,"dismiss-label"]}]);function d(){if(typeof customElements==="undefined"){return}const r=["ch-alert"];r.forEach((r=>{switch(r){case"ch-alert":if(!customElements.get(i(r))){customElements.define(i(r),n)}break}}))}d();const l=n;const c=d;export{l as ChAlert,c as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-alert.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as a,H as e,h as t,d as r,t as s}from"./p-
|
|
1
|
+
import{p as a,H as e,h as t,d as r,t as s}from"./p-hyy-cLgi.js";const o=()=>`:host{display:inline-block}.badge{display:inline-block;padding:var(--spacing-2xs) var(--spacing-lg);border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge--default{background:var(--color-surface-hover);color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning)}`;const c=a(class a extends e{constructor(a){super();if(a!==false){this.__registerHost()}this.__attachShadow()}variant="default";render(){return t(r,{key:"ca1fb0c9d678b6ea5b68ca131ba153116bbd577d"},t("span",{key:"929e2268094bdad7df6e3c8371896e364ebf79c3",class:{badge:true,[`badge--${this.variant}`]:true}},t("slot",{key:"64422988ad046244722755d39e564295f79a6ce1"})))}static get style(){return o()}},[769,"ch-badge",{variant:[1]}]);function n(){if(typeof customElements==="undefined"){return}const a=["ch-badge"];a.forEach((a=>{switch(a){case"ch-badge":if(!customElements.get(s(a))){customElements.define(s(a),c)}break}}))}n();const i=c;const d=n;export{i as ChBadge,d as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-badge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as a,H as r,c as t,h as e,d as o,t as n}from"./p-
|
|
1
|
+
import{p as a,H as r,c as t,h as e,d as o,t as n}from"./p-hyy-cLgi.js";const i=()=>`:host{display:inline-block}.btn{display:inline-flex;align-items:center;gap:var(--spacing-sm);border:none;cursor:pointer;font-family:inherit;font-size:inherit}.btn:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.btn:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.btn--primary{background-color:var(--accent);color:var(--color-accent-text);font-weight:var(--typography-weight-bold);padding:var(--spacing-xs) var(--spacing-xl);border-radius:var(--radius-pill);transition:background-color var(--duration-normal) var(--easing-default), transform var(--duration-fast) var(--easing-default)}.btn--primary:hover{background-color:var(--accent-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}.btn--secondary{background-color:transparent;color:var(--text);font-weight:var(--typography-weight-bold);padding:var(--spacing-xs) var(--spacing-xl);border-radius:var(--radius-pill);border:var(--border-width) solid var(--border);transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), transform var(--duration-fast) var(--easing-default)}.btn--secondary:hover{border-color:var(--border-hover);background-color:var(--surface-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}`;const s=a(class a extends r{constructor(a){super();if(a!==false){this.__registerHost()}this.__attachShadow();this.chClick=t(this,"chClick")}variant="primary";disabled=false;label;chClick;handleClick=a=>{this.chClick.emit(a)};render(){return e(o,{key:"9363b49e8d38c0fab49ed10356380ded20a8cf5e"},e("button",{key:"3c98506ae1418c4bc88f5aa72dfe058948556ed5",class:{btn:true,[`btn--${this.variant}`]:true},type:"button",disabled:this.disabled,"aria-label":this.label,onClick:this.handleClick},e("slot",{key:"cdcf4f656b995fa527d4139a41b2ea3c7086e065"})))}static get style(){return i()}},[769,"ch-button",{variant:[1],disabled:[4],label:[1]}]);function c(){if(typeof customElements==="undefined"){return}const a=["ch-button"];a.forEach((a=>{switch(a){case"ch-button":if(!customElements.get(n(a))){customElements.define(n(a),s)}break}}))}c();const l=s;const d=c;export{l as ChButton,d as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as r,H as a,h as e,d as o,t}from"./p-
|
|
1
|
+
import{p as r,H as a,h as e,d as o,t}from"./p-hyy-cLgi.js";const c=()=>`:host{display:block}::slotted(p){color:var(--text-muted)}.card{color:var(--text);background:var(--surface);border:var(--border-width) solid var(--border);border-radius:var(--radius);padding:var(--spacing-4xl) var(--spacing-5xl);backdrop-filter:blur(var(--effect-blur));position:relative;overflow:hidden;transition:border-color var(--duration-normal) var(--easing-default), transform var(--duration-fast) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.card:hover{border-color:var(--border-hover);transform:translateX(var(--spacing-shift));box-shadow:var(--shadow-card-hover)}.card:hover::before{opacity:1}`;const s=r(class r extends a{constructor(r){super();if(r!==false){this.__registerHost()}this.__attachShadow()}render(){return e(o,{key:"1541ba4361c996716356fb87cdcc73b1260d4c6a"},e("div",{key:"924070eeb79f6c8f8e6362772bbab0dcc1c6f315",class:"card"},e("slot",{key:"2fde36426395a519cb1ebe265ba0eef3aaf6ff38"})))}static get style(){return c()}},[257,"ch-card"]);function d(){if(typeof customElements==="undefined"){return}const r=["ch-card"];r.forEach((r=>{switch(r){case"ch-card":if(!customElements.get(t(r))){customElements.define(t(r),s)}break}}))}d();const n=s;const i=d;export{n as ChCard,i as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-card.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as r,c as
|
|
1
|
+
import{p as e,H as r,c as a,h as i,d as t,t as s}from"./p-hyy-cLgi.js";const n=()=>`:host{display:inline-block}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent);background:var(--accent)}.input:checked::before{content:'';width:var(--spacing-xs);height:var(--spacing-lg);border:solid var(--color-accent-text);border-width:0 var(--spacing-shift) var(--spacing-shift) 0;transform:rotate(45deg);margin-top:calc(-1 * var(--spacing-2xs))}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let o=0;const c=e(class e extends r{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chChange=a(this,"chChange")}checkboxId=`ch-checkbox-${++o}`;hintId=`${this.checkboxId}-hint`;errorId=`${this.checkboxId}-error`;label;name;value="on";checked=false;disabled=false;required=false;hint;errorMessage;invalid=false;chChange;handleChange=e=>{this.checked=e.target.checked;this.chChange.emit(this.checked)};get describedBy(){if(this.invalid&&this.errorMessage){return this.errorId}if(this.hint){return this.hintId}return undefined}render(){return i(t,{key:"130d1bf88ae8c73befe7ac288a0d4b7113fd73f7"},i("label",{key:"6a3dd5bd889a9b41dda934b7c804de3ff2a63584",class:{control:true,"control--disabled":this.disabled},htmlFor:this.checkboxId},i("input",{key:"9978d057782e3cf31a2fa7b4042b5d070e015be0",id:this.checkboxId,class:{input:true,"input--invalid":this.invalid},type:"checkbox",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.describedBy,onChange:this.handleChange}),this.label&&i("span",{key:"8b12d266d0693b6ad710c5a72df4b3c138435ef1",class:"label-text"},this.label)),this.hint&&!(this.invalid&&this.errorMessage)&&i("p",{key:"7aa3b14ccdfb216d8bc831c820e5438e166dab1c",class:"hint",id:this.hintId},this.hint),this.invalid&&this.errorMessage&&i("p",{key:"aeacbc8e1f98162182149e55fde0d8d588c97fa4",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get style(){return n()}},[513,"ch-checkbox",{label:[1],name:[1],value:[1],checked:[1028],disabled:[4],required:[4],hint:[1],errorMessage:[1,"error-message"],invalid:[4]}]);function d(){if(typeof customElements==="undefined"){return}const e=["ch-checkbox"];e.forEach((e=>{switch(e){case"ch-checkbox":if(!customElements.get(s(e))){customElements.define(s(e),c)}break}}))}d();const l=c;const h=d;export{l as ChCheckbox,h as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-checkbox.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as i,h as t,d as r,t as d}from"./p-
|
|
1
|
+
import{p as e,H as i,h as t,d as r,t as d}from"./p-hyy-cLgi.js";const s=()=>`:host{display:block}:host(.divider--vertical){display:inline-block;height:100%;align-self:stretch}.divider{margin:0;border:none;background:var(--border)}.divider--horizontal{width:100%;height:var(--border-width)}.divider--vertical{width:var(--border-width);height:100%}`;const a=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}orientation="horizontal";render(){return t(r,{key:"888debaaee690d5bbc5e276773f16ac7ead0129a",class:{"divider--vertical":this.orientation==="vertical"}},t("hr",{key:"ae175f047605cfbe2b24d50e0dab56ac362c49a1",class:{divider:true,[`divider--${this.orientation}`]:true},"aria-orientation":this.orientation}))}static get style(){return s()}},[513,"ch-divider",{orientation:[1]}]);function o(){if(typeof customElements==="undefined"){return}const e=["ch-divider"];e.forEach((e=>{switch(e){case"ch-divider":if(!customElements.get(d(e))){customElements.define(d(e),a)}break}}))}o();const c=a;const n=o;export{c as ChDivider,n as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-divider.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as r,d as a,t as s}from"./p-
|
|
1
|
+
import{p as t,H as e,c as i,h as r,d as a,t as s}from"./p-hyy-cLgi.js";const n=()=>`:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let o=0;const d=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.chInput=i(this,"chInput");this.chChange=i(this,"chChange")}inputId=`ch-input-${++o}`;hintId=`${this.inputId}-hint`;errorId=`${this.inputId}-error`;label;type="text";value="";placeholder;name;disabled=false;required=false;hint;errorMessage;invalid=false;chInput;chChange;handleInput=t=>{this.value=t.target.value;this.chInput.emit(this.value)};handleChange=t=>{this.value=t.target.value;this.chChange.emit(this.value)};get describedBy(){if(this.invalid&&this.errorMessage){return this.errorId}if(this.hint){return this.hintId}return undefined}render(){return r(a,{key:"56ef5eab354235c89214be28263cde91168f5dee"},this.label&&r("label",{key:"745fe11f607591d1c571dcf7d9429d834dfa4f2b",class:"label",htmlFor:this.inputId},this.label),r("input",{key:"18739cebe47aa1130b55fa5aaf184a1f3fad88d2",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,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)&&r("p",{key:"60a43287f6329db3f4b27ad882300fced0925645",class:"hint",id:this.hintId},this.hint),this.invalid&&this.errorMessage&&r("p",{key:"ea18e90000f1a244cbe51126441b5d260562e07a",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get style(){return n()}},[513,"ch-input",{label:[1],type:[1],value:[1025],placeholder:[1],name:[1],disabled:[4],required:[4],hint:[1],errorMessage:[1,"error-message"],invalid:[4]}]);function h(){if(typeof customElements==="undefined"){return}const t=["ch-input"];t.forEach((t=>{switch(t){case"ch-input":if(!customElements.get(s(t))){customElements.define(s(t),d)}break}}))}h();const l=d;const c=h;export{l as ChInput,c as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-input.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as r,d as n,t as a}from"./p-
|
|
1
|
+
import{p as t,H as e,c as i,h as r,d as n,t as a}from"./p-hyy-cLgi.js";const o=()=>`:host{display:inline}.link{color:var(--accent);font-weight:var(--typography-weight-semibold);text-decoration:var(--ch-link-text-decoration, underline);text-decoration-thickness:var(--border-width);text-underline-offset:var(--spacing-shift);border-radius:var(--radius-sm);transition:color var(--duration-normal) var(--easing-default), opacity var(--duration-normal) var(--easing-default)}.link:hover{color:var(--accent-hover)}.link:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.link--muted{color:var(--text-muted);text-decoration:none}.link--muted:hover{color:var(--text)}.link--disabled{color:var(--text-muted);text-decoration:none;opacity:var(--opacity-disabled);cursor:not-allowed}`;const s=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.chClick=i(this,"chClick")}href;target;variant="default";disabled=false;chClick;handleClick=t=>{this.chClick.emit(t)};render(){if(this.disabled){return r(n,null,r("span",{class:{link:true,[`link--${this.variant}`]:true,"link--disabled":true},part:"link","aria-disabled":"true"},r("slot",null)))}return r(n,null,r("a",{class:{link:true,[`link--${this.variant}`]:true},part:"link",href:this.href,target:this.target,rel:this.target==="_blank"?"noopener noreferrer":undefined,onClick:this.handleClick},r("slot",null)))}static get style(){return o()}},[769,"ch-link",{href:[1],target:[1],variant:[1],disabled:[4]}]);function l(){if(typeof customElements==="undefined"){return}const t=["ch-link"];t.forEach((t=>{switch(t){case"ch-link":if(!customElements.get(a(t))){customElements.define(a(t),s)}break}}))}l();const c=s;const d=l;export{c as ChLink,d as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-link.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ChModal extends Components.ChModal, HTMLElement {}
|
|
4
|
+
export const ChModal: {
|
|
5
|
+
prototype: ChModal;
|
|
6
|
+
new (): ChModal;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as e,H as t,c as a,h as i,d as s,t as o}from"./p-hyy-cLgi.js";const n=()=>`.modal{box-sizing:border-box;max-width:min(32rem, calc(100vw - var(--spacing-6xl)));max-height:calc(100vh - var(--spacing-6xl));padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:var(--radius);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md)}.modal::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);margin-bottom:var(--spacing-2xl)}.modal-body{overflow-y:auto}.modal-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.modal-close:hover{background:var(--surface-hover);color:var(--text)}.modal-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.modal-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.modal-close{transition:none}}`;let r=0;let l="";let d="";const c=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chOpen=a(this,"chOpen");this.chClose=a(this,"chClose")}open=false;label;closeLabel;chOpen;chClose;dialog;scrollLocked=false;pointerDownedOutside=false;componentDidLoad(){this.dialog?.addEventListener("close",this.handleNativeClose);this.dialog?.addEventListener("pointerdown",this.handlePointerDown);this.dialog?.addEventListener("click",this.handleClick);if(this.open){this.showDialog()}}disconnectedCallback(){this.dialog?.removeEventListener("close",this.handleNativeClose);this.dialog?.removeEventListener("pointerdown",this.handlePointerDown);this.dialog?.removeEventListener("click",this.handleClick);this.unlockScroll()}handleOpenChange(e){if(e){this.showDialog()}else{this.closeDialog()}}showDialog(){if(typeof this.dialog?.showModal!=="function"){return}this.lockScroll();this.dialog.showModal();this.chOpen.emit()}closeDialog(){if(typeof this.dialog?.close==="function"&&this.dialog.open){this.dialog.close()}}lockScroll(){if(this.scrollLocked){return}this.scrollLocked=true;r+=1;if(r>1){return}const e=document.documentElement;const t=window.innerWidth-e.clientWidth;l=e.style.overflow;d=e.style.paddingRight;e.style.overflow="hidden";if(t>0){e.style.paddingRight=`${t}px`}}unlockScroll(){if(!this.scrollLocked){return}this.scrollLocked=false;r-=1;if(r>0){return}const e=document.documentElement;e.style.overflow=l;e.style.paddingRight=d}isOnBackdrop(e){if(!this.dialog||e.target!==this.dialog){return false}const t=this.dialog.getBoundingClientRect();return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}handlePointerDown=e=>{this.pointerDownedOutside=this.isOnBackdrop(e)};handleClick=e=>{const t=this.pointerDownedOutside&&this.isOnBackdrop(e);this.pointerDownedOutside=false;if(t){this.closeDialog()}};handleNativeClose=()=>{this.unlockScroll();if(this.open){this.open=false}this.chClose.emit()};handleCloseClick=()=>{if(typeof this.dialog?.close==="function"&&this.dialog.open){this.dialog.close();return}this.open=false;this.chClose.emit()};render(){return i(s,{key:"92edf16d3ff079f72a4785ec9852e3e25218fd35"},i("dialog",{key:"546fc72a098e1e2d8c05fafa2f11eac19ff83fd3",class:"modal","aria-label":this.label,ref:e=>this.dialog=e},i("div",{key:"5a67aa39b6687db89d97533eb54d3a3b663bed56",class:"modal-head"},i("slot",{key:"2e44b59a7c5e6af4a110a7f86362964ddd30d215",name:"heading"}),this.closeLabel&&i("button",{key:"ce70baaa876c9f7b82865f0547e8e8cef5d5dfde",class:"modal-close",type:"button","aria-label":this.closeLabel,onClick:this.handleCloseClick},i("span",{key:"df4536a8851a1ca9d3d2c46d15d18856660a54f6","aria-hidden":"true"},"×"))),i("div",{key:"5de77062134ccd90643df17d7b0d0ddb161f6a5f",class:"modal-body"},i("slot",{key:"3b64493e9236b311a4b2f5250c5027f866bce8fd"}))))}static get watchers(){return{open:[{handleOpenChange:0}]}}static get style(){return n()}},[769,"ch-modal",{open:[1028],label:[1],closeLabel:[1,"close-label"]},undefined,{open:[{handleOpenChange:0}]}]);function h(){if(typeof customElements==="undefined"){return}const e=["ch-modal"];e.forEach((e=>{switch(e){case"ch-modal":if(!customElements.get(o(e))){customElements.define(o(e),c)}break}}))}h();const f=c;const u=h;export{f as ChModal,u as defineCustomElement};
|
|
2
|
+
//# sourceMappingURL=ch-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["chModalCss","openModals","previousOverflow","previousPaddingRight","ChModal","__stencil_proxyCustomElement","HTMLElement","open","label","closeLabel","chOpen","chClose","dialog","scrollLocked","pointerDownedOutside","componentDidLoad","this","addEventListener","handleNativeClose","handlePointerDown","handleClick","showDialog","disconnectedCallback","removeEventListener","unlockScroll","handleOpenChange","closeDialog","showModal","lockScroll","emit","close","root","document","documentElement","scrollbar","window","innerWidth","clientWidth","style","overflow","paddingRight","isOnBackdrop","event","target","box","getBoundingClientRect","clientX","left","right","clientY","top","bottom","dismiss","handleCloseClick","render","h","Host","key","class","ref","el","name","type","onClick"],"sources":["src/components/ch-modal/ch-modal.css?tag=ch-modal&encapsulation=shadow","src/components/ch-modal/ch-modal.tsx"],"sourcesContent":[".modal {\n box-sizing: border-box;\n max-width: min(32rem, calc(100vw - var(--spacing-6xl)));\n max-height: calc(100vh - var(--spacing-6xl));\n padding: var(--spacing-5xl);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius);\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-md);\n}\n\n.modal::backdrop {\n background: var(--color-scrim-default);\n backdrop-filter: blur(var(--effect-blur));\n}\n\n.modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--spacing-2xl);\n margin-bottom: var(--spacing-2xl);\n}\n\n.modal-body {\n overflow-y: auto;\n}\n\n.modal-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: var(--text-muted);\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.modal-close:hover {\n background: var(--surface-hover);\n color: var(--text);\n}\n\n.modal-close:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n@media (pointer: coarse) {\n .modal-close {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .modal-close {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\n\nlet openModals = 0;\nlet previousOverflow = '';\nlet previousPaddingRight = '';\n\n/**\n * Modal dialog, built on the native `<dialog>` element and opened with\n * `showModal()`.\n *\n * The browser therefore supplies the parts that are easy to get wrong: moving\n * focus into the dialog and returning it afterwards, marking the rest of the\n * document inert, `Escape` to close, the top layer, `::backdrop`, and the\n * implicit `dialog` role with `aria-modal=\"true\"`. Notably it does not trap\n * focus, which is deliberate — the W3C APA group concluded a modal should let\n * keyboard users reach browser UI, so a hand-rolled trap would be less\n * correct, not more.\n *\n * What the platform does not cover, and this component adds: locking the page\n * behind the dialog so it cannot scroll, and closing when the backdrop is\n * clicked. The latter is `closedby=\"any\"` in the platform, which Safari does\n * not support yet, so it is implemented here for every browser alike rather\n * than only for some.\n */\n@Component({\n tag: 'ch-modal',\n styleUrl: 'ch-modal.css',\n shadow: true,\n})\nexport class ChModal {\n /**\n * Whether the dialog is open. Kept in sync when the user closes it with\n * `Escape`, the close button or a click outside.\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * Accessible name for the dialog, set as `aria-label`. A slotted heading\n * cannot be referenced with `aria-labelledby` across the shadow boundary, so\n * the name comes through this prop — and a modal dialog needs one, so pass\n * the same text as the heading.\n */\n @Prop() label?: string;\n\n /**\n * Accessible label for the close button, set as `aria-label`. Setting it is\n * what adds the button: its only content is a decorative glyph, so without a\n * label it would have no accessible name.\n */\n @Prop() closeLabel?: string;\n\n /**\n * Emitted after the dialog opens.\n */\n @Event() chOpen: EventEmitter<void>;\n\n /**\n * Emitted after the dialog closes, however it was closed.\n */\n @Event() chClose: EventEmitter<void>;\n\n private dialog?: HTMLDialogElement;\n private scrollLocked = false;\n private pointerDownedOutside = false;\n\n componentDidLoad() {\n // Wired here rather than in JSX because Stencil derives a listener's event\n // name from whether `on<name>` exists on `window`, which differs between\n // the browser and the test environment for pointer events.\n this.dialog?.addEventListener('close', this.handleNativeClose);\n this.dialog?.addEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.addEventListener('click', this.handleClick);\n if (this.open) {\n this.showDialog();\n }\n }\n\n disconnectedCallback() {\n this.dialog?.removeEventListener('close', this.handleNativeClose);\n this.dialog?.removeEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.removeEventListener('click', this.handleClick);\n this.unlockScroll();\n }\n\n @Watch('open')\n handleOpenChange(open: boolean) {\n if (open) {\n this.showDialog();\n } else {\n this.closeDialog();\n }\n }\n\n private showDialog() {\n if (typeof this.dialog?.showModal !== 'function') {\n return;\n }\n this.lockScroll();\n this.dialog.showModal();\n this.chOpen.emit();\n }\n\n private closeDialog() {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n }\n }\n\n private lockScroll() {\n if (this.scrollLocked) {\n return;\n }\n this.scrollLocked = true;\n openModals += 1;\n if (openModals > 1) {\n return;\n }\n const root = document.documentElement;\n const scrollbar = window.innerWidth - root.clientWidth;\n previousOverflow = root.style.overflow;\n previousPaddingRight = root.style.paddingRight;\n root.style.overflow = 'hidden';\n if (scrollbar > 0) {\n root.style.paddingRight = `${scrollbar}px`;\n }\n }\n\n private unlockScroll() {\n if (!this.scrollLocked) {\n return;\n }\n this.scrollLocked = false;\n openModals -= 1;\n if (openModals > 0) {\n return;\n }\n const root = document.documentElement;\n root.style.overflow = previousOverflow;\n root.style.paddingRight = previousPaddingRight;\n }\n\n /**\n * True for a pointer event on the backdrop: the `<dialog>` is the event\n * target for its own box only, and the coordinates fall outside that box.\n */\n private isOnBackdrop(event: MouseEvent) {\n if (!this.dialog || event.target !== this.dialog) {\n return false;\n }\n const box = this.dialog.getBoundingClientRect();\n return event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom;\n }\n\n private handlePointerDown = (event: Event) => {\n this.pointerDownedOutside = this.isOnBackdrop(event as MouseEvent);\n };\n\n private handleClick = (event: Event) => {\n // Requiring the press to have started on the backdrop too keeps a\n // selection dragged out of the dialog, and a keyboard-synthesised click\n // (which reports coordinates of 0), from closing it.\n const dismiss = this.pointerDownedOutside && this.isOnBackdrop(event as MouseEvent);\n this.pointerDownedOutside = false;\n if (dismiss) {\n this.closeDialog();\n }\n };\n\n private handleNativeClose = () => {\n this.unlockScroll();\n if (this.open) {\n this.open = false;\n }\n this.chClose.emit();\n };\n\n private handleCloseClick = () => {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n return;\n }\n this.open = false;\n this.chClose.emit();\n };\n\n render() {\n return (\n <Host>\n <dialog class=\"modal\" aria-label={this.label} ref={el => (this.dialog = el as HTMLDialogElement)}>\n <div class=\"modal-head\">\n <slot name=\"heading\"></slot>\n {this.closeLabel && (\n <button class=\"modal-close\" type=\"button\" aria-label={this.closeLabel} onClick={this.handleCloseClick}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n <div class=\"modal-body\">\n <slot></slot>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"mappings":"uEAAA,MAAMA,EAAa,IAAM,6yCCEzB,IAAIC,EAAa,EACjB,IAAIC,EAAmB,GACvB,IAAIC,EAAuB,G,MAyBdC,EAAOC,EAAA,MAAAD,UAAAE,E,6IA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,MAAM,cACTH,EAAA,QAAAE,IAAA,+C","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as i,c as r,h as a,d as t,t as s}from"./p-
|
|
1
|
+
import{p as e,H as i,c as r,h as a,d as t,t as s}from"./p-hyy-cLgi.js";const o=()=>`:host{display:inline-block}.group-label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.radio-group{display:flex;flex-direction:column;gap:var(--spacing-lg)}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:50%;background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent)}.input:checked::before{content:'';width:var(--spacing-md);height:var(--spacing-md);border-radius:50%;background:var(--accent)}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let n=0;const l=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chChange=r(this,"chChange")}groupId=`ch-radio-${++n}`;labelId=`${this.groupId}-label`;hintId=`${this.groupId}-hint`;errorId=`${this.groupId}-error`;label;options=[];value;name;disabled=false;required=false;hint;errorMessage;invalid=false;chChange;handleChange=e=>{this.value=e.target.value;this.chChange.emit(this.value)};get describedBy(){if(this.invalid&&this.errorMessage){return this.errorId}if(this.hint){return this.hintId}return undefined}render(){const e=this.name||`${this.groupId}-group`;return a(t,{key:"68ce563b4a03669b76ff3822705b1ff92c4c02f2"},this.label&&a("span",{key:"1887f5b70a5bf9f049495d76588458181d3f7735",class:"group-label",id:this.labelId},this.label),a("div",{key:"c38ee340f9527e16c5587f2309f91ea463bb7cad",class:"radio-group",role:"radiogroup","aria-labelledby":this.label?this.labelId:undefined},this.options.map((i=>a("label",{class:{control:true,"control--disabled":this.disabled||i.disabled}},a("input",{class:{input:true,"input--invalid":this.invalid},type:"radio",name:e,value:i.value,checked:i.value===this.value,disabled:this.disabled||i.disabled,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.describedBy,onChange:this.handleChange}),a("span",{class:"mark"}),a("span",{class:"label-text"},i.label))))),this.hint&&!(this.invalid&&this.errorMessage)&&a("p",{key:"ad60ce772279809ee334fc30182be1d0350d5586",class:"hint",id:this.hintId},this.hint),this.invalid&&this.errorMessage&&a("p",{key:"316c911f9e1a29d17cc2d6b0e60ed35755420ae2",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get style(){return o()}},[513,"ch-radio",{label:[1],options:[16],value:[1025],name:[1],disabled:[4],required:[4],hint:[1],errorMessage:[1,"error-message"],invalid:[4]}]);function c(){if(typeof customElements==="undefined"){return}const e=["ch-radio"];e.forEach((e=>{switch(e){case"ch-radio":if(!customElements.get(s(e))){customElements.define(s(e),l)}break}}))}c();const d=l;const h=c;export{d as ChRadio,h as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-radio.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as r,c as t,h as s,d as a,t as i}from"./p-
|
|
1
|
+
import{p as e,H as r,c as t,h as s,d as a,t as i}from"./p-hyy-cLgi.js";const o=()=>`:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.select{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.select:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.select--invalid{border-color:var(--color-status-warning)}.select--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.select:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.select option{background:var(--bg);color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let l=0;const d=e(class e extends r{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chChange=t(this,"chChange")}selectId=`ch-select-${++l}`;hintId=`${this.selectId}-hint`;errorId=`${this.selectId}-error`;label;options=[];value;placeholder;name;disabled=false;required=false;hint;errorMessage;invalid=false;chChange;handleChange=e=>{this.value=e.target.value;this.chChange.emit(this.value)};get describedBy(){if(this.invalid&&this.errorMessage){return this.errorId}if(this.hint){return this.hintId}return undefined}render(){return s(a,{key:"90aaf1fa70da54071539de8a22ebe9373f2ae90a"},this.label&&s("label",{key:"8b14b4deb611c4f1eb496c6f0d3fa58b7c4342b6",class:"label",htmlFor:this.selectId},this.label),s("select",{key:"c93b4ba079e9e61ef5bb2392256545af73263665",id:this.label?this.selectId:undefined,class:{select:true,"select--invalid":this.invalid},name:this.name,disabled:this.disabled,required:this.required,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.describedBy,onChange:this.handleChange},this.placeholder&&s("option",{key:"df8e97bdb0bd3e5426558027d34c1eb63ee76f1e",value:"",disabled:true,hidden:true,selected:!this.value},this.placeholder),this.options.map((e=>s("option",{value:e.value,disabled:e.disabled,selected:e.value===this.value},e.label)))),this.hint&&!(this.invalid&&this.errorMessage)&&s("p",{key:"6b6078e31a1a2f183951f5ada63a5e7e7f582f96",class:"hint",id:this.hintId},this.hint),this.invalid&&this.errorMessage&&s("p",{key:"f7791b37b8660441a43a6b45d99472b2df7df0ab",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get style(){return o()}},[513,"ch-select",{label:[1],options:[16],value:[1025],placeholder:[1],name:[1],disabled:[4],required:[4],hint:[1],errorMessage:[1,"error-message"],invalid:[4]}]);function n(){if(typeof customElements==="undefined"){return}const e=["ch-select"];e.forEach((e=>{switch(e){case"ch-select":if(!customElements.get(i(e))){customElements.define(i(e),d)}break}}))}n();const c=d;const h=n;export{c as ChSelect,h as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-select.js.map
|