@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
package/dist/esm/index.js
CHANGED
|
@@ -4,6 +4,7 @@ const colorBackgroundTopGlow = '#201e40';
|
|
|
4
4
|
const colorBackgroundBottomGlow = '#261226';
|
|
5
5
|
const colorSurfaceDefault = 'rgba(32, 30, 64, 0.6)';
|
|
6
6
|
const colorSurfaceHover = 'rgba(45, 212, 191, 0.08)';
|
|
7
|
+
const colorScrimDefault = 'rgba(0, 0, 0, 0.6)';
|
|
7
8
|
const colorBorderDefault = 'rgba(255, 255, 255, 0.08)';
|
|
8
9
|
const colorBorderHover = 'rgba(45, 212, 191, 0.3)';
|
|
9
10
|
const colorAccentDefault = '#2dd4bf';
|
|
@@ -73,6 +74,9 @@ 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)',
|
|
@@ -174,7 +178,7 @@ const tokens = {
|
|
|
174
178
|
},
|
|
175
179
|
};
|
|
176
180
|
|
|
177
|
-
export { borderAccentBar, borderWidth, colorAccentDefault, colorAccentHover, colorAccentText, colorBackgroundBase, colorBackgroundBottomGlow, colorBackgroundTopGlow, colorBorderDefault, colorBorderHover, colorBrandHuemulDark, colorBrandHuemulLight, colorBrandStroke, colorStatusPositive, colorStatusPositiveBackground, colorStatusWarning, colorStatusWarningBackground, colorSurfaceDefault, colorSurfaceHover, colorTextPrimary, colorTextSecondary, durationFast, durationNormal, durationSpin, easingDefault, easingLinear, effectBlur, focusOutlineOffset, focusOutlineWidth, layoutMaxWidth, opacityDisabled, radiusMd, radiusPill, radiusSm, shadowCardHover, shadowFocusRing, spacing2xl, spacing2xs, spacing3xl, spacing4xl, spacing5xl, spacing6xl, spacingElevate, spacingLg, spacingMd, spacingShift, spacingSm, spacingXl, spacingXs, tokens, typographyBody, typographyHeading, typographySizeLg, typographySizeMd, typographySizeSm, typographySizeXl, typographySizeXs, typographyTrackingBadge, typographyWeightBold, typographyWeightRegular, typographyWeightSemibold, zIndexBase, zIndexDropdown, zIndexModal };
|
|
181
|
+
export { borderAccentBar, borderWidth, colorAccentDefault, colorAccentHover, colorAccentText, colorBackgroundBase, colorBackgroundBottomGlow, colorBackgroundTopGlow, colorBorderDefault, colorBorderHover, colorBrandHuemulDark, colorBrandHuemulLight, colorBrandStroke, colorScrimDefault, colorStatusPositive, colorStatusPositiveBackground, colorStatusWarning, colorStatusWarningBackground, colorSurfaceDefault, colorSurfaceHover, colorTextPrimary, colorTextSecondary, durationFast, durationNormal, durationSpin, easingDefault, easingLinear, effectBlur, focusOutlineOffset, focusOutlineWidth, layoutMaxWidth, opacityDisabled, radiusMd, radiusPill, radiusSm, shadowCardHover, shadowFocusRing, spacing2xl, spacing2xs, spacing3xl, spacing4xl, spacing5xl, spacing6xl, spacingElevate, spacingLg, spacingMd, spacingShift, spacingSm, spacingXl, spacingXs, tokens, typographyBody, typographyHeading, typographySizeLg, typographySizeMd, typographySizeSm, typographySizeXl, typographySizeXs, typographyTrackingBadge, typographyWeightBold, typographyWeightRegular, typographyWeightSemibold, zIndexBase, zIndexDropdown, zIndexModal };
|
|
178
182
|
//# sourceMappingURL=index.js.map
|
|
179
183
|
|
|
180
184
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.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":"AAAA;AAEO,MAAM,mBAAmB,GAAG;AAC5B,MAAM,sBAAsB,GAAG;AAC/B,MAAM,yBAAyB,GAAG;AAClC,MAAM,mBAAmB,GAAG;AAC5B,MAAM,iBAAiB,GAAG;AAC1B,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG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AAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,MAAM,EAAE,QAAQ;AACjB,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,YAAY,EAAE,KAAK;AACnB,QAAA,aAAa,EAAE,KAAK;AACrB,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,QAAQ,EAAE,GAAG;AACd,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,QAAQ,EAAE,GAAG;AACb,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,QAAQ,EAAE,OAAO;AAClB,KAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.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 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"],"names":[],"mappings":"AAAA;A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AA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,SAAS,EAAE,oCAAoC;AAC/C,QAAA,SAAS,EAAE,qCAAqC;AACjD,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE,MAAM;AACb,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,MAAM,EAAE,OAAO;AACf,QAAA,IAAI,EAAE,OAAO;AACd,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,MAAM,EAAE,QAAQ;AACjB,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,YAAY,EAAE,KAAK;AACnB,QAAA,aAAa,EAAE,KAAK;AACrB,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,QAAQ,EAAE,GAAG;AACd,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,QAAQ,EAAE,GAAG;AACb,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,QAAQ,EAAE,OAAO;AAClB,KAAA;;;;;"}
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as globalScripts, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { g as globalScripts, b as bootstrapLazy } from './index-Bvah_WQV.js';
|
|
2
|
+
export { s as setNonce } from './index-Bvah_WQV.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy([["ch-alert_8",[[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",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[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",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-radio",[[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",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[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);
|
|
7
|
+
return bootstrapLazy([["ch-alert_8",[[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",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[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",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio",[[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",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[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]}]]],["ch-tooltip",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]]], options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* Modal dialog, built on the native `<dialog>` element and opened with
|
|
4
|
+
* `showModal()`.
|
|
5
|
+
*
|
|
6
|
+
* The browser therefore supplies the parts that are easy to get wrong: moving
|
|
7
|
+
* focus into the dialog and returning it afterwards, marking the rest of the
|
|
8
|
+
* document inert, `Escape` to close, the top layer, `::backdrop`, and the
|
|
9
|
+
* implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
|
|
10
|
+
* focus, which is deliberate — the W3C APA group concluded a modal should let
|
|
11
|
+
* keyboard users reach browser UI, so a hand-rolled trap would be less
|
|
12
|
+
* correct, not more.
|
|
13
|
+
*
|
|
14
|
+
* What the platform does not cover, and this component adds: locking the page
|
|
15
|
+
* behind the dialog so it cannot scroll, and closing when the backdrop is
|
|
16
|
+
* clicked. The latter is `closedby="any"` in the platform, which Safari does
|
|
17
|
+
* not support yet, so it is implemented here for every browser alike rather
|
|
18
|
+
* than only for some.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ChModal {
|
|
21
|
+
/**
|
|
22
|
+
* Whether the dialog is open. Kept in sync when the user closes it with
|
|
23
|
+
* `Escape`, the close button or a click outside.
|
|
24
|
+
*/
|
|
25
|
+
open: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Accessible name for the dialog, set as `aria-label`. A slotted heading
|
|
28
|
+
* cannot be referenced with `aria-labelledby` across the shadow boundary, so
|
|
29
|
+
* the name comes through this prop — and a modal dialog needs one, so pass
|
|
30
|
+
* the same text as the heading.
|
|
31
|
+
*/
|
|
32
|
+
label?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Accessible label for the close button, set as `aria-label`. Setting it is
|
|
35
|
+
* what adds the button: its only content is a decorative glyph, so without a
|
|
36
|
+
* label it would have no accessible name.
|
|
37
|
+
*/
|
|
38
|
+
closeLabel?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Emitted after the dialog opens.
|
|
41
|
+
*/
|
|
42
|
+
chOpen: EventEmitter<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Emitted after the dialog closes, however it was closed.
|
|
45
|
+
*/
|
|
46
|
+
chClose: EventEmitter<void>;
|
|
47
|
+
private dialog?;
|
|
48
|
+
private scrollLocked;
|
|
49
|
+
private pointerDownedOutside;
|
|
50
|
+
componentDidLoad(): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
handleOpenChange(open: boolean): void;
|
|
53
|
+
private showDialog;
|
|
54
|
+
private closeDialog;
|
|
55
|
+
private lockScroll;
|
|
56
|
+
private unlockScroll;
|
|
57
|
+
/**
|
|
58
|
+
* True for a pointer event on the backdrop: the `<dialog>` is the event
|
|
59
|
+
* target for its own box only, and the coordinates fall outside that box.
|
|
60
|
+
*/
|
|
61
|
+
private isOnBackdrop;
|
|
62
|
+
private handlePointerDown;
|
|
63
|
+
private handleClick;
|
|
64
|
+
private handleNativeClose;
|
|
65
|
+
private handleCloseClick;
|
|
66
|
+
render(): any;
|
|
67
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type ChTooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
2
|
+
/**
|
|
3
|
+
* Short help text shown on hover and on focus.
|
|
4
|
+
*
|
|
5
|
+
* Both the trigger and the text come from the consumer's light DOM through
|
|
6
|
+
* named slots. That is what makes the accessible association work: an
|
|
7
|
+
* `aria-describedby` IDREF only resolves within a single tree, and slotted
|
|
8
|
+
* nodes stay in the document tree even though they render inside the shadow
|
|
9
|
+
* root. Keeping the text in the shadow root instead would need a reference
|
|
10
|
+
* pointing into a shadow tree, which the platform does not allow — element
|
|
11
|
+
* reflection only points outwards, and `referenceTarget` is not available yet.
|
|
12
|
+
*
|
|
13
|
+
* The trigger has to be a natively focusable element (`<button>`, `<a>`,
|
|
14
|
+
* `<input>`). A chucao component such as `ch-button` will not be described,
|
|
15
|
+
* because `aria-*` set on a custom element host does not reach the native
|
|
16
|
+
* element inside it — see the discussion in issue #47.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ChTooltip {
|
|
19
|
+
private el;
|
|
20
|
+
private readonly fallbackId;
|
|
21
|
+
/**
|
|
22
|
+
* Which side of the trigger the bubble is placed on.
|
|
23
|
+
*/
|
|
24
|
+
placement: ChTooltipPlacement;
|
|
25
|
+
hovered: boolean;
|
|
26
|
+
focused: boolean;
|
|
27
|
+
dismissed: boolean;
|
|
28
|
+
private get visible();
|
|
29
|
+
componentDidLoad(): void;
|
|
30
|
+
handleMouseEnter(): void;
|
|
31
|
+
handleMouseLeave(): void;
|
|
32
|
+
handleFocusIn(): void;
|
|
33
|
+
handleFocusOut(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Listens on the document because a tooltip opened by hovering leaves focus
|
|
36
|
+
* wherever it was, so a host-scoped handler would never see the key.
|
|
37
|
+
*/
|
|
38
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
39
|
+
private slotted;
|
|
40
|
+
/**
|
|
41
|
+
* Points the trigger at the text with `aria-describedby`. Re-run on
|
|
42
|
+
* `slotchange` because a framework re-render can replace the slotted nodes
|
|
43
|
+
* and take the attributes with them.
|
|
44
|
+
*/
|
|
45
|
+
private associate;
|
|
46
|
+
render(): any;
|
|
47
|
+
}
|
|
@@ -15,6 +15,7 @@ import { ChRadioOption } from "./components/ch-radio/ch-radio";
|
|
|
15
15
|
import { ChSelectOption } from "./components/ch-select/ch-select";
|
|
16
16
|
import { ChSpinnerSize } from "./components/ch-spinner/ch-spinner";
|
|
17
17
|
import { ChTab } from "./components/ch-tabs/ch-tabs";
|
|
18
|
+
import { ChTooltipPlacement } from "./components/ch-tooltip/ch-tooltip";
|
|
18
19
|
export { ChAccordionItem } from "./components/ch-accordion/ch-accordion";
|
|
19
20
|
export { ChAlertVariant } from "./components/ch-alert/ch-alert";
|
|
20
21
|
export { ChBadgeVariant } from "./components/ch-badge/ch-badge";
|
|
@@ -25,6 +26,7 @@ export { ChRadioOption } from "./components/ch-radio/ch-radio";
|
|
|
25
26
|
export { ChSelectOption } from "./components/ch-select/ch-select";
|
|
26
27
|
export { ChSpinnerSize } from "./components/ch-spinner/ch-spinner";
|
|
27
28
|
export { ChTab } from "./components/ch-tabs/ch-tabs";
|
|
29
|
+
export { ChTooltipPlacement } from "./components/ch-tooltip/ch-tooltip";
|
|
28
30
|
export namespace Components {
|
|
29
31
|
interface ChAccordion {
|
|
30
32
|
/**
|
|
@@ -198,6 +200,37 @@ export namespace Components {
|
|
|
198
200
|
*/
|
|
199
201
|
"variant": ChLinkVariant;
|
|
200
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Modal dialog, built on the native `<dialog>` element and opened with
|
|
205
|
+
* `showModal()`.
|
|
206
|
+
* The browser therefore supplies the parts that are easy to get wrong: moving
|
|
207
|
+
* focus into the dialog and returning it afterwards, marking the rest of the
|
|
208
|
+
* document inert, `Escape` to close, the top layer, `::backdrop`, and the
|
|
209
|
+
* implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
|
|
210
|
+
* focus, which is deliberate — the W3C APA group concluded a modal should let
|
|
211
|
+
* keyboard users reach browser UI, so a hand-rolled trap would be less
|
|
212
|
+
* correct, not more.
|
|
213
|
+
* What the platform does not cover, and this component adds: locking the page
|
|
214
|
+
* behind the dialog so it cannot scroll, and closing when the backdrop is
|
|
215
|
+
* clicked. The latter is `closedby="any"` in the platform, which Safari does
|
|
216
|
+
* not support yet, so it is implemented here for every browser alike rather
|
|
217
|
+
* than only for some.
|
|
218
|
+
*/
|
|
219
|
+
interface ChModal {
|
|
220
|
+
/**
|
|
221
|
+
* Accessible label for the close button, set as `aria-label`. Setting it is what adds the button: its only content is a decorative glyph, so without a label it would have no accessible name.
|
|
222
|
+
*/
|
|
223
|
+
"closeLabel"?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Accessible name for the dialog, set as `aria-label`. A slotted heading cannot be referenced with `aria-labelledby` across the shadow boundary, so the name comes through this prop — and a modal dialog needs one, so pass the same text as the heading.
|
|
226
|
+
*/
|
|
227
|
+
"label"?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Whether the dialog is open. Kept in sync when the user closes it with `Escape`, the close button or a click outside.
|
|
230
|
+
* @default false
|
|
231
|
+
*/
|
|
232
|
+
"open": boolean;
|
|
233
|
+
}
|
|
201
234
|
interface ChRadio {
|
|
202
235
|
/**
|
|
203
236
|
* Whether all radios in the group are disabled.
|
|
@@ -409,6 +442,27 @@ export namespace Components {
|
|
|
409
442
|
*/
|
|
410
443
|
"value": string;
|
|
411
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Short help text shown on hover and on focus.
|
|
447
|
+
* Both the trigger and the text come from the consumer's light DOM through
|
|
448
|
+
* named slots. That is what makes the accessible association work: an
|
|
449
|
+
* `aria-describedby` IDREF only resolves within a single tree, and slotted
|
|
450
|
+
* nodes stay in the document tree even though they render inside the shadow
|
|
451
|
+
* root. Keeping the text in the shadow root instead would need a reference
|
|
452
|
+
* pointing into a shadow tree, which the platform does not allow — element
|
|
453
|
+
* reflection only points outwards, and `referenceTarget` is not available yet.
|
|
454
|
+
* The trigger has to be a natively focusable element (`<button>`, `<a>`,
|
|
455
|
+
* `<input>`). A chucao component such as `ch-button` will not be described,
|
|
456
|
+
* because `aria-*` set on a custom element host does not reach the native
|
|
457
|
+
* element inside it — see the discussion in issue #47.
|
|
458
|
+
*/
|
|
459
|
+
interface ChTooltip {
|
|
460
|
+
/**
|
|
461
|
+
* Which side of the trigger the bubble is placed on.
|
|
462
|
+
* @default 'top'
|
|
463
|
+
*/
|
|
464
|
+
"placement": ChTooltipPlacement;
|
|
465
|
+
}
|
|
412
466
|
}
|
|
413
467
|
export interface ChAccordionCustomEvent<T> extends CustomEvent<T> {
|
|
414
468
|
detail: T;
|
|
@@ -434,6 +488,10 @@ export interface ChLinkCustomEvent<T> extends CustomEvent<T> {
|
|
|
434
488
|
detail: T;
|
|
435
489
|
target: HTMLChLinkElement;
|
|
436
490
|
}
|
|
491
|
+
export interface ChModalCustomEvent<T> extends CustomEvent<T> {
|
|
492
|
+
detail: T;
|
|
493
|
+
target: HTMLChModalElement;
|
|
494
|
+
}
|
|
437
495
|
export interface ChRadioCustomEvent<T> extends CustomEvent<T> {
|
|
438
496
|
detail: T;
|
|
439
497
|
target: HTMLChRadioElement;
|
|
@@ -584,6 +642,40 @@ declare global {
|
|
|
584
642
|
prototype: HTMLChLinkElement;
|
|
585
643
|
new (): HTMLChLinkElement;
|
|
586
644
|
};
|
|
645
|
+
interface HTMLChModalElementEventMap {
|
|
646
|
+
"chOpen": void;
|
|
647
|
+
"chClose": void;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Modal dialog, built on the native `<dialog>` element and opened with
|
|
651
|
+
* `showModal()`.
|
|
652
|
+
* The browser therefore supplies the parts that are easy to get wrong: moving
|
|
653
|
+
* focus into the dialog and returning it afterwards, marking the rest of the
|
|
654
|
+
* document inert, `Escape` to close, the top layer, `::backdrop`, and the
|
|
655
|
+
* implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
|
|
656
|
+
* focus, which is deliberate — the W3C APA group concluded a modal should let
|
|
657
|
+
* keyboard users reach browser UI, so a hand-rolled trap would be less
|
|
658
|
+
* correct, not more.
|
|
659
|
+
* What the platform does not cover, and this component adds: locking the page
|
|
660
|
+
* behind the dialog so it cannot scroll, and closing when the backdrop is
|
|
661
|
+
* clicked. The latter is `closedby="any"` in the platform, which Safari does
|
|
662
|
+
* not support yet, so it is implemented here for every browser alike rather
|
|
663
|
+
* than only for some.
|
|
664
|
+
*/
|
|
665
|
+
interface HTMLChModalElement extends Components.ChModal, HTMLStencilElement {
|
|
666
|
+
addEventListener<K extends keyof HTMLChModalElementEventMap>(type: K, listener: (this: HTMLChModalElement, ev: ChModalCustomEvent<HTMLChModalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
667
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
668
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
669
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
670
|
+
removeEventListener<K extends keyof HTMLChModalElementEventMap>(type: K, listener: (this: HTMLChModalElement, ev: ChModalCustomEvent<HTMLChModalElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
671
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
672
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
673
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
674
|
+
}
|
|
675
|
+
var HTMLChModalElement: {
|
|
676
|
+
prototype: HTMLChModalElement;
|
|
677
|
+
new (): HTMLChModalElement;
|
|
678
|
+
};
|
|
587
679
|
interface HTMLChRadioElementEventMap {
|
|
588
680
|
"chChange": string;
|
|
589
681
|
}
|
|
@@ -683,6 +775,26 @@ declare global {
|
|
|
683
775
|
prototype: HTMLChTextareaElement;
|
|
684
776
|
new (): HTMLChTextareaElement;
|
|
685
777
|
};
|
|
778
|
+
/**
|
|
779
|
+
* Short help text shown on hover and on focus.
|
|
780
|
+
* Both the trigger and the text come from the consumer's light DOM through
|
|
781
|
+
* named slots. That is what makes the accessible association work: an
|
|
782
|
+
* `aria-describedby` IDREF only resolves within a single tree, and slotted
|
|
783
|
+
* nodes stay in the document tree even though they render inside the shadow
|
|
784
|
+
* root. Keeping the text in the shadow root instead would need a reference
|
|
785
|
+
* pointing into a shadow tree, which the platform does not allow — element
|
|
786
|
+
* reflection only points outwards, and `referenceTarget` is not available yet.
|
|
787
|
+
* The trigger has to be a natively focusable element (`<button>`, `<a>`,
|
|
788
|
+
* `<input>`). A chucao component such as `ch-button` will not be described,
|
|
789
|
+
* because `aria-*` set on a custom element host does not reach the native
|
|
790
|
+
* element inside it — see the discussion in issue #47.
|
|
791
|
+
*/
|
|
792
|
+
interface HTMLChTooltipElement extends Components.ChTooltip, HTMLStencilElement {
|
|
793
|
+
}
|
|
794
|
+
var HTMLChTooltipElement: {
|
|
795
|
+
prototype: HTMLChTooltipElement;
|
|
796
|
+
new (): HTMLChTooltipElement;
|
|
797
|
+
};
|
|
686
798
|
interface HTMLElementTagNameMap {
|
|
687
799
|
"ch-accordion": HTMLChAccordionElement;
|
|
688
800
|
"ch-alert": HTMLChAlertElement;
|
|
@@ -693,12 +805,14 @@ declare global {
|
|
|
693
805
|
"ch-divider": HTMLChDividerElement;
|
|
694
806
|
"ch-input": HTMLChInputElement;
|
|
695
807
|
"ch-link": HTMLChLinkElement;
|
|
808
|
+
"ch-modal": HTMLChModalElement;
|
|
696
809
|
"ch-radio": HTMLChRadioElement;
|
|
697
810
|
"ch-select": HTMLChSelectElement;
|
|
698
811
|
"ch-spinner": HTMLChSpinnerElement;
|
|
699
812
|
"ch-switch": HTMLChSwitchElement;
|
|
700
813
|
"ch-tabs": HTMLChTabsElement;
|
|
701
814
|
"ch-textarea": HTMLChTextareaElement;
|
|
815
|
+
"ch-tooltip": HTMLChTooltipElement;
|
|
702
816
|
}
|
|
703
817
|
}
|
|
704
818
|
declare namespace LocalJSX {
|
|
@@ -902,6 +1016,45 @@ declare namespace LocalJSX {
|
|
|
902
1016
|
*/
|
|
903
1017
|
"variant"?: ChLinkVariant;
|
|
904
1018
|
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Modal dialog, built on the native `<dialog>` element and opened with
|
|
1021
|
+
* `showModal()`.
|
|
1022
|
+
* The browser therefore supplies the parts that are easy to get wrong: moving
|
|
1023
|
+
* focus into the dialog and returning it afterwards, marking the rest of the
|
|
1024
|
+
* document inert, `Escape` to close, the top layer, `::backdrop`, and the
|
|
1025
|
+
* implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
|
|
1026
|
+
* focus, which is deliberate — the W3C APA group concluded a modal should let
|
|
1027
|
+
* keyboard users reach browser UI, so a hand-rolled trap would be less
|
|
1028
|
+
* correct, not more.
|
|
1029
|
+
* What the platform does not cover, and this component adds: locking the page
|
|
1030
|
+
* behind the dialog so it cannot scroll, and closing when the backdrop is
|
|
1031
|
+
* clicked. The latter is `closedby="any"` in the platform, which Safari does
|
|
1032
|
+
* not support yet, so it is implemented here for every browser alike rather
|
|
1033
|
+
* than only for some.
|
|
1034
|
+
*/
|
|
1035
|
+
interface ChModal {
|
|
1036
|
+
/**
|
|
1037
|
+
* Accessible label for the close button, set as `aria-label`. Setting it is what adds the button: its only content is a decorative glyph, so without a label it would have no accessible name.
|
|
1038
|
+
*/
|
|
1039
|
+
"closeLabel"?: string;
|
|
1040
|
+
/**
|
|
1041
|
+
* Accessible name for the dialog, set as `aria-label`. A slotted heading cannot be referenced with `aria-labelledby` across the shadow boundary, so the name comes through this prop — and a modal dialog needs one, so pass the same text as the heading.
|
|
1042
|
+
*/
|
|
1043
|
+
"label"?: string;
|
|
1044
|
+
/**
|
|
1045
|
+
* Emitted after the dialog closes, however it was closed.
|
|
1046
|
+
*/
|
|
1047
|
+
"onChClose"?: (event: ChModalCustomEvent<void>) => void;
|
|
1048
|
+
/**
|
|
1049
|
+
* Emitted after the dialog opens.
|
|
1050
|
+
*/
|
|
1051
|
+
"onChOpen"?: (event: ChModalCustomEvent<void>) => void;
|
|
1052
|
+
/**
|
|
1053
|
+
* Whether the dialog is open. Kept in sync when the user closes it with `Escape`, the close button or a click outside.
|
|
1054
|
+
* @default false
|
|
1055
|
+
*/
|
|
1056
|
+
"open"?: boolean;
|
|
1057
|
+
}
|
|
905
1058
|
interface ChRadio {
|
|
906
1059
|
/**
|
|
907
1060
|
* Whether all radios in the group are disabled.
|
|
@@ -1137,6 +1290,27 @@ declare namespace LocalJSX {
|
|
|
1137
1290
|
*/
|
|
1138
1291
|
"value"?: string;
|
|
1139
1292
|
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Short help text shown on hover and on focus.
|
|
1295
|
+
* Both the trigger and the text come from the consumer's light DOM through
|
|
1296
|
+
* named slots. That is what makes the accessible association work: an
|
|
1297
|
+
* `aria-describedby` IDREF only resolves within a single tree, and slotted
|
|
1298
|
+
* nodes stay in the document tree even though they render inside the shadow
|
|
1299
|
+
* root. Keeping the text in the shadow root instead would need a reference
|
|
1300
|
+
* pointing into a shadow tree, which the platform does not allow — element
|
|
1301
|
+
* reflection only points outwards, and `referenceTarget` is not available yet.
|
|
1302
|
+
* The trigger has to be a natively focusable element (`<button>`, `<a>`,
|
|
1303
|
+
* `<input>`). A chucao component such as `ch-button` will not be described,
|
|
1304
|
+
* because `aria-*` set on a custom element host does not reach the native
|
|
1305
|
+
* element inside it — see the discussion in issue #47.
|
|
1306
|
+
*/
|
|
1307
|
+
interface ChTooltip {
|
|
1308
|
+
/**
|
|
1309
|
+
* Which side of the trigger the bubble is placed on.
|
|
1310
|
+
* @default 'top'
|
|
1311
|
+
*/
|
|
1312
|
+
"placement"?: ChTooltipPlacement;
|
|
1313
|
+
}
|
|
1140
1314
|
|
|
1141
1315
|
interface ChAccordionAttributes {
|
|
1142
1316
|
"value": string;
|
|
@@ -1185,6 +1359,11 @@ declare namespace LocalJSX {
|
|
|
1185
1359
|
"variant": ChLinkVariant;
|
|
1186
1360
|
"disabled": boolean;
|
|
1187
1361
|
}
|
|
1362
|
+
interface ChModalAttributes {
|
|
1363
|
+
"open": boolean;
|
|
1364
|
+
"label": string;
|
|
1365
|
+
"closeLabel": string;
|
|
1366
|
+
}
|
|
1188
1367
|
interface ChRadioAttributes {
|
|
1189
1368
|
"label": string;
|
|
1190
1369
|
"value": string;
|
|
@@ -1237,6 +1416,9 @@ declare namespace LocalJSX {
|
|
|
1237
1416
|
"errorMessage": string;
|
|
1238
1417
|
"invalid": boolean;
|
|
1239
1418
|
}
|
|
1419
|
+
interface ChTooltipAttributes {
|
|
1420
|
+
"placement": ChTooltipPlacement;
|
|
1421
|
+
}
|
|
1240
1422
|
|
|
1241
1423
|
interface IntrinsicElements {
|
|
1242
1424
|
"ch-accordion": Omit<ChAccordion, keyof ChAccordionAttributes> & { [K in keyof ChAccordion & keyof ChAccordionAttributes]?: ChAccordion[K] } & { [K in keyof ChAccordion & keyof ChAccordionAttributes as `attr:${K}`]?: ChAccordionAttributes[K] } & { [K in keyof ChAccordion & keyof ChAccordionAttributes as `prop:${K}`]?: ChAccordion[K] };
|
|
@@ -1248,12 +1430,14 @@ declare namespace LocalJSX {
|
|
|
1248
1430
|
"ch-divider": Omit<ChDivider, keyof ChDividerAttributes> & { [K in keyof ChDivider & keyof ChDividerAttributes]?: ChDivider[K] } & { [K in keyof ChDivider & keyof ChDividerAttributes as `attr:${K}`]?: ChDividerAttributes[K] } & { [K in keyof ChDivider & keyof ChDividerAttributes as `prop:${K}`]?: ChDivider[K] };
|
|
1249
1431
|
"ch-input": Omit<ChInput, keyof ChInputAttributes> & { [K in keyof ChInput & keyof ChInputAttributes]?: ChInput[K] } & { [K in keyof ChInput & keyof ChInputAttributes as `attr:${K}`]?: ChInputAttributes[K] } & { [K in keyof ChInput & keyof ChInputAttributes as `prop:${K}`]?: ChInput[K] };
|
|
1250
1432
|
"ch-link": Omit<ChLink, keyof ChLinkAttributes> & { [K in keyof ChLink & keyof ChLinkAttributes]?: ChLink[K] } & { [K in keyof ChLink & keyof ChLinkAttributes as `attr:${K}`]?: ChLinkAttributes[K] } & { [K in keyof ChLink & keyof ChLinkAttributes as `prop:${K}`]?: ChLink[K] };
|
|
1433
|
+
"ch-modal": Omit<ChModal, keyof ChModalAttributes> & { [K in keyof ChModal & keyof ChModalAttributes]?: ChModal[K] } & { [K in keyof ChModal & keyof ChModalAttributes as `attr:${K}`]?: ChModalAttributes[K] } & { [K in keyof ChModal & keyof ChModalAttributes as `prop:${K}`]?: ChModal[K] };
|
|
1251
1434
|
"ch-radio": Omit<ChRadio, keyof ChRadioAttributes> & { [K in keyof ChRadio & keyof ChRadioAttributes]?: ChRadio[K] } & { [K in keyof ChRadio & keyof ChRadioAttributes as `attr:${K}`]?: ChRadioAttributes[K] } & { [K in keyof ChRadio & keyof ChRadioAttributes as `prop:${K}`]?: ChRadio[K] };
|
|
1252
1435
|
"ch-select": Omit<ChSelect, keyof ChSelectAttributes> & { [K in keyof ChSelect & keyof ChSelectAttributes]?: ChSelect[K] } & { [K in keyof ChSelect & keyof ChSelectAttributes as `attr:${K}`]?: ChSelectAttributes[K] } & { [K in keyof ChSelect & keyof ChSelectAttributes as `prop:${K}`]?: ChSelect[K] };
|
|
1253
1436
|
"ch-spinner": Omit<ChSpinner, keyof ChSpinnerAttributes> & { [K in keyof ChSpinner & keyof ChSpinnerAttributes]?: ChSpinner[K] } & { [K in keyof ChSpinner & keyof ChSpinnerAttributes as `attr:${K}`]?: ChSpinnerAttributes[K] } & { [K in keyof ChSpinner & keyof ChSpinnerAttributes as `prop:${K}`]?: ChSpinner[K] };
|
|
1254
1437
|
"ch-switch": Omit<ChSwitch, keyof ChSwitchAttributes> & { [K in keyof ChSwitch & keyof ChSwitchAttributes]?: ChSwitch[K] } & { [K in keyof ChSwitch & keyof ChSwitchAttributes as `attr:${K}`]?: ChSwitchAttributes[K] } & { [K in keyof ChSwitch & keyof ChSwitchAttributes as `prop:${K}`]?: ChSwitch[K] };
|
|
1255
1438
|
"ch-tabs": Omit<ChTabs, keyof ChTabsAttributes> & { [K in keyof ChTabs & keyof ChTabsAttributes]?: ChTabs[K] } & { [K in keyof ChTabs & keyof ChTabsAttributes as `attr:${K}`]?: ChTabsAttributes[K] } & { [K in keyof ChTabs & keyof ChTabsAttributes as `prop:${K}`]?: ChTabs[K] };
|
|
1256
1439
|
"ch-textarea": Omit<ChTextarea, keyof ChTextareaAttributes> & { [K in keyof ChTextarea & keyof ChTextareaAttributes]?: ChTextarea[K] } & { [K in keyof ChTextarea & keyof ChTextareaAttributes as `attr:${K}`]?: ChTextareaAttributes[K] } & { [K in keyof ChTextarea & keyof ChTextareaAttributes as `prop:${K}`]?: ChTextarea[K] };
|
|
1440
|
+
"ch-tooltip": Omit<ChTooltip, keyof ChTooltipAttributes> & { [K in keyof ChTooltip & keyof ChTooltipAttributes]?: ChTooltip[K] } & { [K in keyof ChTooltip & keyof ChTooltipAttributes as `attr:${K}`]?: ChTooltipAttributes[K] } & { [K in keyof ChTooltip & keyof ChTooltipAttributes as `prop:${K}`]?: ChTooltip[K] };
|
|
1257
1441
|
}
|
|
1258
1442
|
}
|
|
1259
1443
|
export { LocalJSX as JSX };
|
|
@@ -1277,6 +1461,23 @@ declare module "@stencil/core" {
|
|
|
1277
1461
|
"ch-divider": LocalJSX.IntrinsicElements["ch-divider"] & JSXBase.HTMLAttributes<HTMLChDividerElement>;
|
|
1278
1462
|
"ch-input": LocalJSX.IntrinsicElements["ch-input"] & JSXBase.HTMLAttributes<HTMLChInputElement>;
|
|
1279
1463
|
"ch-link": LocalJSX.IntrinsicElements["ch-link"] & JSXBase.HTMLAttributes<HTMLChLinkElement>;
|
|
1464
|
+
/**
|
|
1465
|
+
* Modal dialog, built on the native `<dialog>` element and opened with
|
|
1466
|
+
* `showModal()`.
|
|
1467
|
+
* The browser therefore supplies the parts that are easy to get wrong: moving
|
|
1468
|
+
* focus into the dialog and returning it afterwards, marking the rest of the
|
|
1469
|
+
* document inert, `Escape` to close, the top layer, `::backdrop`, and the
|
|
1470
|
+
* implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
|
|
1471
|
+
* focus, which is deliberate — the W3C APA group concluded a modal should let
|
|
1472
|
+
* keyboard users reach browser UI, so a hand-rolled trap would be less
|
|
1473
|
+
* correct, not more.
|
|
1474
|
+
* What the platform does not cover, and this component adds: locking the page
|
|
1475
|
+
* behind the dialog so it cannot scroll, and closing when the backdrop is
|
|
1476
|
+
* clicked. The latter is `closedby="any"` in the platform, which Safari does
|
|
1477
|
+
* not support yet, so it is implemented here for every browser alike rather
|
|
1478
|
+
* than only for some.
|
|
1479
|
+
*/
|
|
1480
|
+
"ch-modal": LocalJSX.IntrinsicElements["ch-modal"] & JSXBase.HTMLAttributes<HTMLChModalElement>;
|
|
1280
1481
|
"ch-radio": LocalJSX.IntrinsicElements["ch-radio"] & JSXBase.HTMLAttributes<HTMLChRadioElement>;
|
|
1281
1482
|
"ch-select": LocalJSX.IntrinsicElements["ch-select"] & JSXBase.HTMLAttributes<HTMLChSelectElement>;
|
|
1282
1483
|
/**
|
|
@@ -1290,6 +1491,21 @@ declare module "@stencil/core" {
|
|
|
1290
1491
|
"ch-switch": LocalJSX.IntrinsicElements["ch-switch"] & JSXBase.HTMLAttributes<HTMLChSwitchElement>;
|
|
1291
1492
|
"ch-tabs": LocalJSX.IntrinsicElements["ch-tabs"] & JSXBase.HTMLAttributes<HTMLChTabsElement>;
|
|
1292
1493
|
"ch-textarea": LocalJSX.IntrinsicElements["ch-textarea"] & JSXBase.HTMLAttributes<HTMLChTextareaElement>;
|
|
1494
|
+
/**
|
|
1495
|
+
* Short help text shown on hover and on focus.
|
|
1496
|
+
* Both the trigger and the text come from the consumer's light DOM through
|
|
1497
|
+
* named slots. That is what makes the accessible association work: an
|
|
1498
|
+
* `aria-describedby` IDREF only resolves within a single tree, and slotted
|
|
1499
|
+
* nodes stay in the document tree even though they render inside the shadow
|
|
1500
|
+
* root. Keeping the text in the shadow root instead would need a reference
|
|
1501
|
+
* pointing into a shadow tree, which the platform does not allow — element
|
|
1502
|
+
* reflection only points outwards, and `referenceTarget` is not available yet.
|
|
1503
|
+
* The trigger has to be a natively focusable element (`<button>`, `<a>`,
|
|
1504
|
+
* `<input>`). A chucao component such as `ch-button` will not be described,
|
|
1505
|
+
* because `aria-*` set on a custom element host does not reach the native
|
|
1506
|
+
* element inside it — see the discussion in issue #47.
|
|
1507
|
+
*/
|
|
1508
|
+
"ch-tooltip": LocalJSX.IntrinsicElements["ch-tooltip"] & JSXBase.HTMLAttributes<HTMLChTooltipElement>;
|
|
1293
1509
|
}
|
|
1294
1510
|
}
|
|
1295
1511
|
}
|
|
@@ -3,6 +3,7 @@ export declare const colorBackgroundTopGlow = "#201e40";
|
|
|
3
3
|
export declare const colorBackgroundBottomGlow = "#261226";
|
|
4
4
|
export declare const colorSurfaceDefault = "rgba(32, 30, 64, 0.6)";
|
|
5
5
|
export declare const colorSurfaceHover = "rgba(45, 212, 191, 0.08)";
|
|
6
|
+
export declare const colorScrimDefault = "rgba(0, 0, 0, 0.6)";
|
|
6
7
|
export declare const colorBorderDefault = "rgba(255, 255, 255, 0.08)";
|
|
7
8
|
export declare const colorBorderHover = "rgba(45, 212, 191, 0.3)";
|
|
8
9
|
export declare const colorAccentDefault = "#2dd4bf";
|
|
@@ -72,6 +73,9 @@ export declare const tokens: {
|
|
|
72
73
|
readonly default: "rgba(32, 30, 64, 0.6)";
|
|
73
74
|
readonly hover: "rgba(45, 212, 191, 0.08)";
|
|
74
75
|
};
|
|
76
|
+
readonly scrim: {
|
|
77
|
+
readonly default: "rgba(0, 0, 0, 0.6)";
|
|
78
|
+
};
|
|
75
79
|
readonly border: {
|
|
76
80
|
readonly default: "rgba(255, 255, 255, 0.08)";
|
|
77
81
|
readonly hover: "rgba(45, 212, 191, 0.3)";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ColorToken = 'color.background.base' | 'color.background.top-glow' | 'color.background.bottom-glow' | 'color.surface.default' | 'color.surface.hover' | 'color.border.default' | 'color.border.hover' | 'color.accent.default' | 'color.accent.hover' | 'color.accent.text' | 'color.status.positive' | 'color.status.positive-background' | 'color.status.warning' | 'color.status.warning-background' | 'color.text.primary' | 'color.text.secondary' | 'color.brand.huemul-dark' | 'color.brand.huemul-light' | 'color.brand.stroke';
|
|
1
|
+
export type ColorToken = 'color.background.base' | 'color.background.top-glow' | 'color.background.bottom-glow' | 'color.surface.default' | 'color.surface.hover' | 'color.scrim.default' | 'color.border.default' | 'color.border.hover' | 'color.accent.default' | 'color.accent.hover' | 'color.accent.text' | 'color.status.positive' | 'color.status.positive-background' | 'color.status.warning' | 'color.status.warning-background' | 'color.text.primary' | 'color.text.secondary' | 'color.brand.huemul-dark' | 'color.brand.huemul-light' | 'color.brand.stroke';
|
|
2
2
|
export type TypographyToken = 'typography.body' | 'typography.heading' | 'typography.size.xs' | 'typography.size.sm' | 'typography.size.md' | 'typography.size.lg' | 'typography.size.xl' | 'typography.weight.regular' | 'typography.weight.semibold' | 'typography.weight.bold' | 'typography.tracking.badge';
|
|
3
3
|
export type SpacingToken = 'spacing.2xs' | 'spacing.xs' | 'spacing.sm' | 'spacing.md' | 'spacing.lg' | 'spacing.xl' | 'spacing.2xl' | 'spacing.3xl' | 'spacing.4xl' | 'spacing.5xl' | 'spacing.6xl' | 'spacing.shift' | 'spacing.elevate';
|
|
4
4
|
export type RadiusToken = 'radius.sm' | 'radius.md' | 'radius.pill';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
4
|
*/
|
|
5
5
|
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
-
import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
6
|
+
import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChModalCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
7
7
|
import type { Components } from "@devschile/chucao/dist/components";
|
|
8
8
|
import { ChAccordion as ChAccordionElement } from "@devschile/chucao/dist/components/ch-accordion.js";
|
|
9
9
|
import { ChAlert as ChAlertElement } from "@devschile/chucao/dist/components/ch-alert.js";
|
|
@@ -14,12 +14,14 @@ import { ChCheckbox as ChCheckboxElement } from "@devschile/chucao/dist/componen
|
|
|
14
14
|
import { ChDivider as ChDividerElement } from "@devschile/chucao/dist/components/ch-divider.js";
|
|
15
15
|
import { ChInput as ChInputElement } from "@devschile/chucao/dist/components/ch-input.js";
|
|
16
16
|
import { ChLink as ChLinkElement } from "@devschile/chucao/dist/components/ch-link.js";
|
|
17
|
+
import { ChModal as ChModalElement } from "@devschile/chucao/dist/components/ch-modal.js";
|
|
17
18
|
import { ChRadio as ChRadioElement } from "@devschile/chucao/dist/components/ch-radio.js";
|
|
18
19
|
import { ChSelect as ChSelectElement } from "@devschile/chucao/dist/components/ch-select.js";
|
|
19
20
|
import { ChSpinner as ChSpinnerElement } from "@devschile/chucao/dist/components/ch-spinner.js";
|
|
20
21
|
import { ChSwitch as ChSwitchElement } from "@devschile/chucao/dist/components/ch-switch.js";
|
|
21
22
|
import { ChTabs as ChTabsElement } from "@devschile/chucao/dist/components/ch-tabs.js";
|
|
22
23
|
import { ChTextarea as ChTextareaElement } from "@devschile/chucao/dist/components/ch-textarea.js";
|
|
24
|
+
import { ChTooltip as ChTooltipElement } from "@devschile/chucao/dist/components/ch-tooltip.js";
|
|
23
25
|
export type ChAccordionEvents = {
|
|
24
26
|
onChChange: EventName<ChAccordionCustomEvent<string | undefined>>;
|
|
25
27
|
};
|
|
@@ -51,6 +53,11 @@ export type ChLinkEvents = {
|
|
|
51
53
|
onChClick: EventName<ChLinkCustomEvent<MouseEvent>>;
|
|
52
54
|
};
|
|
53
55
|
export declare const ChLink: StencilReactComponent<ChLinkElement, ChLinkEvents, Components.ChLink>;
|
|
56
|
+
export type ChModalEvents = {
|
|
57
|
+
onChOpen: EventName<ChModalCustomEvent<void>>;
|
|
58
|
+
onChClose: EventName<ChModalCustomEvent<void>>;
|
|
59
|
+
};
|
|
60
|
+
export declare const ChModal: StencilReactComponent<ChModalElement, ChModalEvents, Components.ChModal>;
|
|
54
61
|
export type ChRadioEvents = {
|
|
55
62
|
onChChange: EventName<ChRadioCustomEvent<string>>;
|
|
56
63
|
};
|
|
@@ -74,3 +81,5 @@ export type ChTextareaEvents = {
|
|
|
74
81
|
onChChange: EventName<ChTextareaCustomEvent<string>>;
|
|
75
82
|
};
|
|
76
83
|
export declare const ChTextarea: StencilReactComponent<ChTextareaElement, ChTextareaEvents, Components.ChTextarea>;
|
|
84
|
+
export type ChTooltipEvents = NonNullable<unknown>;
|
|
85
|
+
export declare const ChTooltip: StencilReactComponent<ChTooltipElement, ChTooltipEvents, Components.ChTooltip>;
|