@devschile/chucao 1.6.0 → 1.7.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 +5 -3
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/chucao.esm.js.map +1 -1
- package/dist/chucao/index.esm.js +1 -1
- package/dist/chucao/index.esm.js.map +1 -1
- package/dist/chucao/p-0305f2eb.entry.js +2 -0
- package/dist/chucao/{p-af2c57b5.entry.js.map → p-0305f2eb.entry.js.map} +1 -1
- package/dist/chucao/{p-dde82d7d.entry.js → p-053d58a4.entry.js} +2 -2
- package/dist/chucao/{p-fcc70c8d.entry.js → p-20492b73.entry.js} +2 -2
- package/dist/chucao/p-488c7838.entry.js +2 -0
- package/dist/chucao/{p-175aee94.entry.js → p-9a614e82.entry.js} +2 -2
- package/dist/chucao/{p-d75eeeea.entry.js → p-ad3206a2.entry.js} +2 -2
- package/dist/chucao/p-c598f978.entry.js +2 -0
- package/dist/chucao/p-c598f978.entry.js.map +1 -0
- package/dist/chucao/{p-85a49fd7.entry.js → p-fe8e9537.entry.js} +2 -2
- package/dist/chucao/p-pfWAsOzE.js +3 -0
- package/dist/chucao/p-pfWAsOzE.js.map +1 -0
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/{ch-badge_6.cjs.entry.js → ch-alert_8.cjs.entry.js} +73 -9
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-radio.cjs.entry.js +2 -2
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/chucao.cjs.js +3 -3
- package/dist/cjs/chucao.cjs.js.map +1 -1
- package/dist/cjs/{index-CiYvuUBV.js → index-ls4U227d.js} +38 -9
- package/dist/cjs/index-ls4U227d.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ch-alert/ch-alert.css +77 -0
- package/dist/collection/components/ch-alert/ch-alert.js +118 -0
- package/dist/collection/components/ch-alert/ch-alert.js.map +1 -0
- package/dist/collection/components/ch-badge/ch-badge.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js +1 -1
- package/dist/collection/components/ch-button/ch-button.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-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.css +39 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js +90 -0
- package/dist/collection/components/ch-spinner/ch-spinner.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/tokens/tokens.js +5 -1
- 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.d.ts +11 -0
- package/dist/components/ch-alert.js +2 -0
- package/dist/components/ch-alert.js.map +1 -0
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-button.js.map +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-divider.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-spinner.d.ts +11 -0
- package/dist/components/ch-spinner.js +2 -0
- package/dist/components/ch-spinner.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/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-ONE3uKkF.js +2 -0
- package/dist/components/p-ONE3uKkF.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/{ch-badge_6.entry.js → ch-alert_8.entry.js} +72 -10
- package/dist/esm/ch-alert_8.entry.js.map +1 -0
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-radio.entry.js +2 -2
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/chucao.js +4 -4
- package/dist/esm/chucao.js.map +1 -1
- package/dist/esm/{index-ImsAHlk9.js → index-pfWAsOzE.js} +38 -9
- package/dist/esm/index-pfWAsOzE.js.map +1 -0
- package/dist/esm/index.js +6 -2
- 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 +34 -0
- package/dist/types/components/ch-spinner/ch-spinner.d.ts +25 -0
- package/dist/types/components.d.ts +153 -0
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/dist/types/tokens/tokens.d.ts +4 -0
- package/dist/types/tokens/types.d.ts +2 -2
- package/dist-react/components.d.ts +9 -1
- package/dist-react/components.js +18 -0
- package/dist-react/components.ts +25 -1
- package/dist-vue/index.d.ts +2 -0
- package/dist-vue/index.js +13 -0
- package/dist-vue/index.ts +17 -0
- package/hydrate/index.js +138 -16
- package/hydrate/index.mjs +138 -16
- package/package.json +6 -2
- package/dist/chucao/p-ImsAHlk9.js +0 -3
- package/dist/chucao/p-ImsAHlk9.js.map +0 -1
- package/dist/chucao/p-af2c57b5.entry.js +0 -2
- package/dist/chucao/p-b4520f1c.entry.js +0 -2
- package/dist/chucao/p-b4520f1c.entry.js.map +0 -1
- package/dist/chucao/p-fe0c9320.entry.js +0 -2
- package/dist/cjs/ch-badge_6.cjs.entry.js.map +0 -1
- package/dist/cjs/index-CiYvuUBV.js.map +0 -1
- package/dist/components/p-x4aZoujY.js +0 -2
- package/dist/components/p-x4aZoujY.js.map +0 -1
- package/dist/esm/ch-badge_6.entry.js.map +0 -1
- package/dist/esm/index-ImsAHlk9.js.map +0 -1
- /package/dist/chucao/{p-dde82d7d.entry.js.map → p-053d58a4.entry.js.map} +0 -0
- /package/dist/chucao/{p-fcc70c8d.entry.js.map → p-20492b73.entry.js.map} +0 -0
- /package/dist/chucao/{p-fe0c9320.entry.js.map → p-488c7838.entry.js.map} +0 -0
- /package/dist/chucao/{p-175aee94.entry.js.map → p-9a614e82.entry.js.map} +0 -0
- /package/dist/chucao/{p-d75eeeea.entry.js.map → p-ad3206a2.entry.js.map} +0 -0
- /package/dist/chucao/{p-85a49fd7.entry.js.map → p-fe8e9537.entry.js.map} +0 -0
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
/* Generated by toki v1.
|
|
3
|
+
/* Generated by toki v1.12.1 — do not edit */
|
|
4
4
|
const colorBackgroundBase = '#100a1c';
|
|
5
5
|
const colorBackgroundTopGlow = '#201e40';
|
|
6
6
|
const colorBackgroundBottomGlow = '#261226';
|
|
@@ -54,7 +54,9 @@ const shadowCardHover = '0 4px 20px rgba(45, 212, 191, 0.06)';
|
|
|
54
54
|
const effectBlur = '10px';
|
|
55
55
|
const durationFast = '150ms';
|
|
56
56
|
const durationNormal = '200ms';
|
|
57
|
+
const durationSpin = '800ms';
|
|
57
58
|
const easingDefault = 'ease';
|
|
59
|
+
const easingLinear = 'linear';
|
|
58
60
|
const focusOutlineWidth = '2px';
|
|
59
61
|
const focusOutlineOffset = '2px';
|
|
60
62
|
const opacityDisabled = 0.5;
|
|
@@ -151,9 +153,11 @@ const tokens = {
|
|
|
151
153
|
'duration': {
|
|
152
154
|
fast: '150ms',
|
|
153
155
|
normal: '200ms',
|
|
156
|
+
spin: '800ms',
|
|
154
157
|
},
|
|
155
158
|
'easing': {
|
|
156
159
|
default: 'ease',
|
|
160
|
+
linear: 'linear',
|
|
157
161
|
},
|
|
158
162
|
'focus': {
|
|
159
163
|
outlineWidth: '2px',
|
|
@@ -195,7 +199,9 @@ exports.colorTextPrimary = colorTextPrimary;
|
|
|
195
199
|
exports.colorTextSecondary = colorTextSecondary;
|
|
196
200
|
exports.durationFast = durationFast;
|
|
197
201
|
exports.durationNormal = durationNormal;
|
|
202
|
+
exports.durationSpin = durationSpin;
|
|
198
203
|
exports.easingDefault = easingDefault;
|
|
204
|
+
exports.easingLinear = easingLinear;
|
|
199
205
|
exports.effectBlur = effectBlur;
|
|
200
206
|
exports.focusOutlineOffset = focusOutlineOffset;
|
|
201
207
|
exports.focusOutlineWidth = focusOutlineWidth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["src/tokens/tokens.ts"],"sourcesContent":["/* Generated by toki v1.
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["src/tokens/tokens.ts"],"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"],"names":[],"mappings":"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"}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-ls4U227d.js');
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["ch-
|
|
8
|
+
return index.bootstrapLazy([["ch-alert_8.cjs",[[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[769,"ch-button",{"variant":[1],"disabled":[4],"label":[1]}],[257,"ch-card"],[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]}],[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]}],[513,"ch-spinner",{"size":[1],"label":[1]}],[513,"ch-switch",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-accordion.cjs",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox.cjs",[[513,"ch-checkbox",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-divider.cjs",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link.cjs",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-radio.cjs",[[513,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tabs.cjs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea.cjs",[[513,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
3
|
"components/ch-accordion/ch-accordion.js",
|
|
4
|
+
"components/ch-alert/ch-alert.js",
|
|
4
5
|
"components/ch-badge/ch-badge.js",
|
|
5
6
|
"components/ch-button/ch-button.js",
|
|
6
7
|
"components/ch-divider/ch-divider.js",
|
|
7
8
|
"components/ch-link/ch-link.js",
|
|
8
9
|
"components/ch-radio/ch-radio.js",
|
|
9
10
|
"components/ch-select/ch-select.js",
|
|
11
|
+
"components/ch-spinner/ch-spinner.js",
|
|
10
12
|
"components/ch-tabs/ch-tabs.js",
|
|
11
13
|
"components/ch-card/ch-card.js",
|
|
12
14
|
"components/ch-checkbox/ch-checkbox.js",
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
"mixins": [],
|
|
18
20
|
"compiler": {
|
|
19
21
|
"name": "@stencil/core",
|
|
20
|
-
"version": "4.
|
|
22
|
+
"version": "4.44.0",
|
|
21
23
|
"typescriptVersion": "5.8.3"
|
|
22
24
|
},
|
|
23
25
|
"collections": [],
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.alert {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
gap: var(--spacing-2xl);
|
|
9
|
+
padding: var(--spacing-2xl) var(--spacing-3xl);
|
|
10
|
+
border: var(--border-width) solid transparent;
|
|
11
|
+
border-radius: var(--radius);
|
|
12
|
+
font-size: var(--typography-size-sm);
|
|
13
|
+
line-height: 1.5;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.alert-content {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
overflow-wrap: anywhere;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.alert--default {
|
|
23
|
+
color: var(--text);
|
|
24
|
+
background: var(--surface);
|
|
25
|
+
border-color: var(--border);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.alert--positive {
|
|
29
|
+
color: var(--color-status-positive);
|
|
30
|
+
background: var(--color-status-positive-background);
|
|
31
|
+
border-color: var(--color-status-positive);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.alert--warning {
|
|
35
|
+
color: var(--color-status-warning);
|
|
36
|
+
background: var(--color-status-warning-background);
|
|
37
|
+
border-color: var(--color-status-warning);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.alert-dismiss {
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
flex: none;
|
|
45
|
+
padding: var(--spacing-2xs) var(--spacing-md);
|
|
46
|
+
border: 0;
|
|
47
|
+
border-radius: var(--radius);
|
|
48
|
+
background: none;
|
|
49
|
+
color: inherit;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
font-family: var(--font-heading);
|
|
52
|
+
font-size: var(--typography-size-lg);
|
|
53
|
+
line-height: 1;
|
|
54
|
+
transition: background-color var(--duration-normal) var(--easing-default);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.alert-dismiss:hover {
|
|
58
|
+
background: var(--surface-hover);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.alert-dismiss:focus-visible {
|
|
62
|
+
outline: var(--focus-outline-width) solid currentColor;
|
|
63
|
+
outline-offset: var(--focus-outline-offset);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (pointer: coarse) {
|
|
67
|
+
.alert-dismiss {
|
|
68
|
+
min-width: 44px;
|
|
69
|
+
min-height: 44px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (prefers-reduced-motion: reduce) {
|
|
74
|
+
.alert-dismiss {
|
|
75
|
+
transition: none;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Block-level status message.
|
|
4
|
+
*
|
|
5
|
+
* `warning` carries `role="alert"` and is announced assertively; `default` and
|
|
6
|
+
* `positive` use `role="status"`, since a confirmation is not urgent enough to
|
|
7
|
+
* interrupt. Both announce reliably when the alert is added to the page in
|
|
8
|
+
* response to something — an alert already present at load may not be read out,
|
|
9
|
+
* which is how live regions work rather than something this component controls.
|
|
10
|
+
*/
|
|
11
|
+
export class ChAlert {
|
|
12
|
+
/**
|
|
13
|
+
* The kind of message. `default` is neutral, `positive` confirms, and
|
|
14
|
+
* `warning` covers both warnings and errors — the token scale has a single
|
|
15
|
+
* status colour for the two of them.
|
|
16
|
+
*/
|
|
17
|
+
variant = 'default';
|
|
18
|
+
/**
|
|
19
|
+
* Accessible label for the dismiss button, set as `aria-label`. Setting it
|
|
20
|
+
* is what adds the button: the button's only content is a decorative glyph,
|
|
21
|
+
* so without a label it would have no accessible name at all.
|
|
22
|
+
*/
|
|
23
|
+
dismissLabel;
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when the dismiss button is clicked. The alert stays in the DOM —
|
|
26
|
+
* whether to remove it is the consumer's decision. If you do remove it, move
|
|
27
|
+
* focus somewhere sensible first: removing the focused button drops focus to
|
|
28
|
+
* `<body>`.
|
|
29
|
+
*/
|
|
30
|
+
chDismiss;
|
|
31
|
+
handleDismiss = () => {
|
|
32
|
+
this.chDismiss.emit();
|
|
33
|
+
};
|
|
34
|
+
render() {
|
|
35
|
+
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
36
|
+
return (h(Host, { key: '7d96602ad2c2b3824588f01d5b94d73098da6ce4' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, h("div", { key: '64d7af5aad0e4b103b35cc2ba3756b1a1601b148', class: "alert-content" }, h("slot", { key: '44573092407161bbeafe5117bddb54168b183d90' })), this.dismissLabel && (h("button", { key: '018858ac292c0fb7f26c788f629638f533d0dfd6', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: 'f6454d5285ed9c7c414d839d2d35d2ce0c271dd4', "aria-hidden": "true" }, "\u00D7"))))));
|
|
37
|
+
}
|
|
38
|
+
static get is() { return "ch-alert"; }
|
|
39
|
+
static get encapsulation() { return "shadow"; }
|
|
40
|
+
static get originalStyleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["ch-alert.css"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get styleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["ch-alert.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get properties() {
|
|
51
|
+
return {
|
|
52
|
+
"variant": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "ChAlertVariant",
|
|
57
|
+
"resolved": "\"default\" | \"positive\" | \"warning\"",
|
|
58
|
+
"references": {
|
|
59
|
+
"ChAlertVariant": {
|
|
60
|
+
"location": "local",
|
|
61
|
+
"path": "/home/runner/work/chucao/chucao/src/components/ch-alert/ch-alert.tsx",
|
|
62
|
+
"id": "src/components/ch-alert/ch-alert.tsx::ChAlertVariant"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "The kind of message. `default` is neutral, `positive` confirms, and\n`warning` covers both warnings and errors \u2014 the token scale has a single\nstatus colour for the two of them."
|
|
71
|
+
},
|
|
72
|
+
"getter": false,
|
|
73
|
+
"setter": false,
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"attribute": "variant",
|
|
76
|
+
"defaultValue": "'default'"
|
|
77
|
+
},
|
|
78
|
+
"dismissLabel": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "string",
|
|
83
|
+
"resolved": "string",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": true,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "Accessible label for the dismiss button, set as `aria-label`. Setting it\nis what adds the button: the button's only content is a decorative glyph,\nso without a label it would have no accessible name at all."
|
|
91
|
+
},
|
|
92
|
+
"getter": false,
|
|
93
|
+
"setter": false,
|
|
94
|
+
"reflect": false,
|
|
95
|
+
"attribute": "dismiss-label"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static get events() {
|
|
100
|
+
return [{
|
|
101
|
+
"method": "chDismiss",
|
|
102
|
+
"name": "chDismiss",
|
|
103
|
+
"bubbles": true,
|
|
104
|
+
"cancelable": true,
|
|
105
|
+
"composed": true,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "Emitted when the dismiss button is clicked. The alert stays in the DOM \u2014\nwhether to remove it is the consumer's decision. If you do remove it, move\nfocus somewhere sensible first: removing the focused button drops focus to\n`<body>`."
|
|
109
|
+
},
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "void",
|
|
112
|
+
"resolved": "void",
|
|
113
|
+
"references": {}
|
|
114
|
+
}
|
|
115
|
+
}];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=ch-alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-alert.js","sourceRoot":"","sources":["../../../../src/components/ch-alert/ch-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAInF;;;;;;;;GAQG;AAMH,MAAM,OAAO,OAAO;IAClB;;;;OAIG;IACK,OAAO,GAAmB,SAAS,CAAC;IAE5C;;;;OAIG;IACK,YAAY,CAAU;IAE9B;;;;;OAKG;IACM,SAAS,CAAqB;IAE/B,aAAa,GAAG,GAAG,EAAE;QAC3B,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;QAE7D,OAAO,CACL,EAAC,IAAI;YAIH,WAAK,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,UAAU,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI;gBAClF,4DAAK,KAAK,EAAC,eAAe;oBACxB,8DAAa,CACT;gBACL,IAAI,CAAC,YAAY,IAAI,CACpB,+DAAQ,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,QAAQ,gBAAa,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa;oBACpG,4EAAkB,MAAM,aAAS,CAC1B,CACV,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChAlertVariant = 'default' | 'positive' | 'warning';\n\n/**\n * Block-level status message.\n *\n * `warning` carries `role=\"alert\"` and is announced assertively; `default` and\n * `positive` use `role=\"status\"`, since a confirmation is not urgent enough to\n * interrupt. Both announce reliably when the alert is added to the page in\n * response to something — an alert already present at load may not be read out,\n * which is how live regions work rather than something this component controls.\n */\n@Component({\n tag: 'ch-alert',\n styleUrl: 'ch-alert.css',\n shadow: true,\n})\nexport class ChAlert {\n /**\n * The kind of message. `default` is neutral, `positive` confirms, and\n * `warning` covers both warnings and errors — the token scale has a single\n * status colour for the two of them.\n */\n @Prop() variant: ChAlertVariant = 'default';\n\n /**\n * Accessible label for the dismiss button, set as `aria-label`. Setting it\n * is what adds the button: the button's only content is a decorative glyph,\n * so without a label it would have no accessible name at all.\n */\n @Prop() dismissLabel?: string;\n\n /**\n * Emitted when the dismiss button is clicked. The alert stays in the DOM —\n * whether to remove it is the consumer's decision. If you do remove it, move\n * focus somewhere sensible first: removing the focused button drops focus to\n * `<body>`.\n */\n @Event() chDismiss: EventEmitter<void>;\n\n private handleDismiss = () => {\n this.chDismiss.emit();\n };\n\n render() {\n const role = this.variant === 'warning' ? 'alert' : 'status';\n\n return (\n <Host>\n {/* Keyed on the role so a variant change replaces the node instead of\n mutating its role in place, which assistive technology does not\n reliably re-announce. */}\n <div key={role} class={{ alert: true, [`alert--${this.variant}`]: true }} role={role}>\n <div class=\"alert-content\">\n <slot></slot>\n </div>\n {this.dismissLabel && (\n <button class=\"alert-dismiss\" type=\"button\" aria-label={this.dismissLabel} onClick={this.handleDismiss}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ export class ChBadge {
|
|
|
5
5
|
*/
|
|
6
6
|
variant = 'default';
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'ca1fb0c9d678b6ea5b68ca131ba153116bbd577d' }, h("span", { key: '929e2268094bdad7df6e3c8371896e364ebf79c3', class: { badge: true, [`badge--${this.variant}`]: true } }, h("slot", { key: '64422988ad046244722755d39e564295f79a6ce1' }))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "ch-badge"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,7 +22,7 @@ export class ChButton {
|
|
|
22
22
|
this.chClick.emit(ev);
|
|
23
23
|
};
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '9363b49e8d38c0fab49ed10356380ded20a8cf5e' }, h("button", { key: '3c98506ae1418c4bc88f5aa72dfe058948556ed5', class: { btn: true, [`btn--${this.variant}`]: true }, type: "button", disabled: this.disabled, "aria-label": this.label, onClick: this.handleClick }, h("slot", { key: 'cdcf4f656b995fa527d4139a41b2ea3c7086e065' }))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "ch-button"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ch-button.js","sourceRoot":"","sources":["../../../../src/components/ch-button/ch-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AASnF,MAAM,OAAO,QAAQ;IACnB;;OAEG;IACK,OAAO,GAAoB,SAAS,CAAC;IAE7C;;OAEG;IACK,QAAQ,GAAG,KAAK,CAAC;IAEzB;;;;OAIG;IACK,KAAK,CAAU;IAEvB;;OAEG;IACM,OAAO,CAA2B;IAEnC,WAAW,GAAG,CAAC,EAAc,EAAE,EAAE;QACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,+
|
|
1
|
+
{"version":3,"file":"ch-button.js","sourceRoot":"","sources":["../../../../src/components/ch-button/ch-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AASnF,MAAM,OAAO,QAAQ;IACnB;;OAEG;IACK,OAAO,GAAoB,SAAS,CAAC;IAE7C;;OAEG;IACK,QAAQ,GAAG,KAAK,CAAC;IAEzB;;;;OAIG;IACK,KAAK,CAAU;IAEvB;;OAEG;IACM,OAAO,CAA2B;IAEnC,WAAW,GAAG,CAAC,EAAc,EAAE,EAAE;QACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,+DAAQ,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW;gBACpJ,8DAAa,CACN,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChButtonVariant = 'primary' | 'secondary';\n\n@Component({\n tag: 'ch-button',\n styleUrl: 'ch-button.css',\n shadow: true,\n})\nexport class ChButton {\n /**\n * The visual style of the button. Either `primary` or `secondary`.\n */\n @Prop() variant: ChButtonVariant = 'primary';\n\n /**\n * Whether the button is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Accessible label set as `aria-label` on the native `<button>`. Use it\n * when the button's content doesn't convey its purpose on its own (e.g.\n * an icon-only button).\n */\n @Prop() label?: string;\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() chClick: EventEmitter<MouseEvent>;\n\n private handleClick = (ev: MouseEvent) => {\n this.chClick.emit(ev);\n };\n\n render() {\n return (\n <Host>\n <button class={{ btn: true, [`btn--${this.variant}`]: true }} type=\"button\" disabled={this.disabled} aria-label={this.label} onClick={this.handleClick}>\n <slot></slot>\n </button>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class ChCard {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: 'de99971fb6a845e8ca6c406d669abd64f7e45068' }, h("div", { key: '6dcae41e636af83221f710212ed1ec16a21dcdde', class: "card" }, h("slot", { key: 'b2a1354d297ce45c97f0ed4378f5710b4b0ac13d' }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "ch-card"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -60,7 +60,7 @@ export class ChCheckbox {
|
|
|
60
60
|
return undefined;
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: '4675fecfe18e63c55133ffb78e6a6c0548804e1b' }, h("label", { key: '334ddbcfd3ef1640d84dc751a127a3fb6d69e722', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.checkboxId }, h("input", { key: 'a251b722681f33d3c96ce04a0ce915b6be71a81c', 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 && h("span", { key: '2aa179c9467a1b22e7c37b16da44e677cc10bd69', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'd31d7b78cc4912b4441b0ab17eb44ed22ef67e6e', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'ae43049c16c7c61322785863d0c6e2e90e79d954', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
64
64
|
}
|
|
65
65
|
static get is() { return "ch-checkbox"; }
|
|
66
66
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,7 +5,7 @@ export class ChDivider {
|
|
|
5
5
|
*/
|
|
6
6
|
orientation = 'horizontal';
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '888debaaee690d5bbc5e276773f16ac7ead0129a', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: 'ae175f047605cfbe2b24d50e0dab56ac362c49a1', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "ch-divider"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -72,7 +72,7 @@ export class ChInput {
|
|
|
72
72
|
return undefined;
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '5587a60f279a66d0610ab0dd5f9e64510fe47313' }, this.label && (h("label", { key: 'cc4d3718b5eba3f87dd91be2be2d8bfcccbad7db', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'a40ed7693272f9bdbcec81afa3f6f81ea6aa3dac', 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) && (h("p", { key: 'b574a65d362071b4528f87013a5349f63f0b1768', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '061d995029cd884daa9f7c228ade06036369bb24', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
76
76
|
}
|
|
77
77
|
static get is() { return "ch-input"; }
|
|
78
78
|
static get encapsulation() { return "shadow"; }
|
|
@@ -63,7 +63,7 @@ export class ChRadio {
|
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
65
|
const groupName = this.name || `${this.groupId}-group`;
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: '68ce563b4a03669b76ff3822705b1ff92c4c02f2' }, this.label && (h("span", { key: '1887f5b70a5bf9f049495d76588458181d3f7735', class: "group-label", id: this.labelId }, this.label)), h("div", { key: 'c38ee340f9527e16c5587f2309f91ea463bb7cad', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || option.disabled } }, h("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { class: "mark" }), h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'ad60ce772279809ee334fc30182be1d0350d5586', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '316c911f9e1a29d17cc2d6b0e60ed35755420ae2', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
67
67
|
}
|
|
68
68
|
static get is() { return "ch-radio"; }
|
|
69
69
|
static get encapsulation() { return "shadow"; }
|
|
@@ -64,7 +64,7 @@ export class ChSelect {
|
|
|
64
64
|
return undefined;
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: '90aaf1fa70da54071539de8a22ebe9373f2ae90a' }, this.label && (h("label", { key: '8b14b4deb611c4f1eb496c6f0d3fa58b7c4342b6', class: "label", htmlFor: this.selectId }, this.label)), h("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 && (h("option", { key: 'df8e97bdb0bd3e5426558027d34c1eb63ee76f1e', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '6b6078e31a1a2f183951f5ada63a5e7e7f582f96', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'f7791b37b8660441a43a6b45d99472b2df7df0ab', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
68
68
|
}
|
|
69
69
|
static get is() { return "ch-select"; }
|
|
70
70
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
vertical-align: middle;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.spinner {
|
|
7
|
+
display: block;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
width: 1em;
|
|
10
|
+
height: 1em;
|
|
11
|
+
border: 0.125em solid currentColor;
|
|
12
|
+
border-top-color: transparent;
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
animation: ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.spinner--sm {
|
|
18
|
+
font-size: var(--typography-size-sm);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.spinner--md {
|
|
22
|
+
font-size: var(--typography-size-lg);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.spinner--lg {
|
|
26
|
+
font-size: var(--typography-size-xl);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes ch-spinner-rotate {
|
|
30
|
+
to {
|
|
31
|
+
transform: rotate(360deg);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: reduce) {
|
|
36
|
+
.spinner {
|
|
37
|
+
animation-duration: calc(var(--duration-spin) * 4);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Loading indicator.
|
|
4
|
+
*
|
|
5
|
+
* The spinner is drawn in `currentColor`, so it takes the surrounding text
|
|
6
|
+
* colour and stays legible on any surface — inside a primary `ch-button` it
|
|
7
|
+
* picks up the button's own text colour instead of the accent, which would be
|
|
8
|
+
* invisible there. Set `color` on or above the element to change it.
|
|
9
|
+
*/
|
|
10
|
+
export class ChSpinner {
|
|
11
|
+
/**
|
|
12
|
+
* The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a
|
|
13
|
+
* font-size and the spinner is drawn in `em`, so it also scales with an
|
|
14
|
+
* inherited font-size.
|
|
15
|
+
*/
|
|
16
|
+
size = 'md';
|
|
17
|
+
/**
|
|
18
|
+
* Accessible label announced while the spinner is visible, e.g. `Cargando
|
|
19
|
+
* resultados`. When omitted the spinner is treated as decorative and hidden
|
|
20
|
+
* from assistive technology — the right behaviour next to visible loading
|
|
21
|
+
* text, which would otherwise be announced twice.
|
|
22
|
+
*/
|
|
23
|
+
label;
|
|
24
|
+
render() {
|
|
25
|
+
const labelled = Boolean(this.label);
|
|
26
|
+
return (h(Host, { key: 'dc7c7e19f6a6878680555b0d7dbd84f5dc5774c8' }, h("span", { key: 'd29d5f3344ae578d2a28382b13b45b901d41e52b', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
27
|
+
}
|
|
28
|
+
static get is() { return "ch-spinner"; }
|
|
29
|
+
static get encapsulation() { return "shadow"; }
|
|
30
|
+
static get originalStyleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["ch-spinner.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get styleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["ch-spinner.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get properties() {
|
|
41
|
+
return {
|
|
42
|
+
"size": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "ChSpinnerSize",
|
|
47
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
48
|
+
"references": {
|
|
49
|
+
"ChSpinnerSize": {
|
|
50
|
+
"location": "local",
|
|
51
|
+
"path": "/home/runner/work/chucao/chucao/src/components/ch-spinner/ch-spinner.tsx",
|
|
52
|
+
"id": "src/components/ch-spinner/ch-spinner.tsx::ChSpinnerSize"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"optional": false,
|
|
58
|
+
"docs": {
|
|
59
|
+
"tags": [],
|
|
60
|
+
"text": "The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a\nfont-size and the spinner is drawn in `em`, so it also scales with an\ninherited font-size."
|
|
61
|
+
},
|
|
62
|
+
"getter": false,
|
|
63
|
+
"setter": false,
|
|
64
|
+
"reflect": false,
|
|
65
|
+
"attribute": "size",
|
|
66
|
+
"defaultValue": "'md'"
|
|
67
|
+
},
|
|
68
|
+
"label": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"mutable": false,
|
|
71
|
+
"complexType": {
|
|
72
|
+
"original": "string",
|
|
73
|
+
"resolved": "string",
|
|
74
|
+
"references": {}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": true,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": "Accessible label announced while the spinner is visible, e.g. `Cargando\nresultados`. When omitted the spinner is treated as decorative and hidden\nfrom assistive technology \u2014 the right behaviour next to visible loading\ntext, which would otherwise be announced twice."
|
|
81
|
+
},
|
|
82
|
+
"getter": false,
|
|
83
|
+
"setter": false,
|
|
84
|
+
"reflect": false,
|
|
85
|
+
"attribute": "label"
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=ch-spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch-spinner.js","sourceRoot":"","sources":["../../../../src/components/ch-spinner/ch-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIzD;;;;;;;GAOG;AAMH,MAAM,OAAO,SAAS;IACpB;;;;OAIG;IACK,IAAI,GAAkB,IAAI,CAAC;IAEnC;;;;;OAKG;IACK,KAAK,CAAU;IAEvB,MAAM;QACJ,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAErC,OAAO,CACL,EAAC,IAAI;YACH,6DACE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,YAAY,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EACzD,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,gBACzB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,iBAChC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GACpC,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChSpinnerSize = 'sm' | 'md' | 'lg';\n\n/**\n * Loading indicator.\n *\n * The spinner is drawn in `currentColor`, so it takes the surrounding text\n * colour and stays legible on any surface — inside a primary `ch-button` it\n * picks up the button's own text colour instead of the accent, which would be\n * invisible there. Set `color` on or above the element to change it.\n */\n@Component({\n tag: 'ch-spinner',\n styleUrl: 'ch-spinner.css',\n shadow: true,\n})\nexport class ChSpinner {\n /**\n * The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a\n * font-size and the spinner is drawn in `em`, so it also scales with an\n * inherited font-size.\n */\n @Prop() size: ChSpinnerSize = 'md';\n\n /**\n * Accessible label announced while the spinner is visible, e.g. `Cargando\n * resultados`. When omitted the spinner is treated as decorative and hidden\n * from assistive technology — the right behaviour next to visible loading\n * text, which would otherwise be announced twice.\n */\n @Prop() label?: string;\n\n render() {\n const labelled = Boolean(this.label);\n\n return (\n <Host>\n <span\n class={{ spinner: true, [`spinner--${this.size}`]: true }}\n role={labelled ? 'status' : undefined}\n aria-label={labelled ? this.label : undefined}\n aria-hidden={labelled ? undefined : 'true'}\n ></span>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -60,7 +60,7 @@ export class ChSwitch {
|
|
|
60
60
|
return undefined;
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: 'a128c7c2e1585f9a71518600938ec9a3e9d8a4d4' }, h("label", { key: '36f4c5cba4e01a50d2aef68c8114ea77991cd11d', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.switchId }, h("input", { key: '9fbf7fc62f8e9a164c3eceb4981288d848e14165', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: 'b5e6e89d183871b88f423c83097c7aaed3a62fe8', class: "track" }, h("span", { key: 'cd092c415e40b88f31a72c8f07df0a7d8e09f03e', class: "thumb" })), this.label && h("span", { key: '58032729eae055013e19e8ac3d2acac959e0f333', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '37ee421f7d76991d1d040a04402f1da4eaf22397', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '5ecaa144451f07ecce26e839f757ee53fbdc7265', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
64
64
|
}
|
|
65
65
|
static get is() { return "ch-switch"; }
|
|
66
66
|
static get encapsulation() { return "shadow"; }
|
|
@@ -77,7 +77,7 @@ export class ChTabs {
|
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
79
|
const active = this.activeValue;
|
|
80
|
-
return (h(Host, { key: '
|
|
80
|
+
return (h(Host, { key: '0467e7ea24884d4c19c33b736a07303569dfaa3b' }, h("div", { key: '8ad451816ef31809c82486f3c9dd36b6e89e77e5', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
81
81
|
const selected = tab.value === active;
|
|
82
82
|
return (h("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
|
|
83
83
|
})), this.tabs.map(tab => (h("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, h("slot", { name: `panel-${tab.value}` }))))));
|