@devschile/chucao 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/index.esm.js +1 -1
- package/dist/chucao/index.esm.js.map +1 -1
- package/dist/chucao/{p-1ebd9dc4.entry.js → p-0bc141a2.entry.js} +2 -2
- package/dist/chucao/{p-449e1ba0.entry.js → p-0e044eff.entry.js} +2 -2
- package/dist/chucao/{p-a07e0e97.entry.js → p-1108062e.entry.js} +2 -2
- package/dist/chucao/{p-85db779c.entry.js → p-26e144ff.entry.js} +2 -2
- package/dist/chucao/p-2c681cc0.entry.js +2 -0
- package/dist/chucao/p-2c681cc0.entry.js.map +1 -0
- package/dist/chucao/p-2e785177.entry.js +2 -0
- package/dist/chucao/{p-0e3c83a6.entry.js.map → p-2e785177.entry.js.map} +1 -1
- package/dist/chucao/{p-6e95f31f.entry.js → p-337d7f68.entry.js} +2 -2
- package/dist/chucao/{p-7c85f5fe.entry.js → p-350f974d.entry.js} +2 -2
- package/dist/chucao/p-4846cac4.entry.js +2 -0
- package/dist/chucao/{p-d0533af6.entry.js → p-6345c9e1.entry.js} +2 -2
- package/dist/chucao/p-957acf39.entry.js +2 -0
- package/dist/chucao/p-957acf39.entry.js.map +1 -0
- package/dist/chucao/{p-34a9d1f4.entry.js → p-97655c41.entry.js} +2 -2
- package/dist/chucao/{p-b5552b50.entry.js → p-9f73855e.entry.js} +2 -2
- package/dist/chucao/p-CIV5Gg1o.js +3 -0
- package/dist/chucao/p-CIV5Gg1o.js.map +1 -0
- package/dist/chucao/p-CnivhwvG.js +2 -0
- package/dist/chucao/p-CnivhwvG.js.map +1 -0
- package/dist/chucao/{p-17451d92.entry.js → p-b53d954e.entry.js} +2 -2
- package/dist/chucao/{p-d776b092.entry.js → p-b6cc08f0.entry.js} +2 -2
- package/dist/chucao/p-be7b5c21.entry.js +2 -0
- package/dist/chucao/p-be7b5c21.entry.js.map +1 -0
- package/dist/chucao/p-c165f839.entry.js +2 -0
- package/dist/chucao/p-c165f839.entry.js.map +1 -0
- package/dist/chucao/{p-56d64d84.entry.js → p-c251b0d1.entry.js} +2 -2
- package/dist/chucao/p-f5b74bca.entry.js +2 -0
- package/dist/chucao/p-f5b74bca.entry.js.map +1 -0
- package/dist/chucao/{p-84d875e9.entry.js → p-f9fe752c.entry.js} +2 -2
- package/dist/chucao/{p-1778a313.entry.js → p-fdf065e6.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ch-alert_8.cjs.entry.js +34 -10
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-cluster.cjs.entry.js +3 -3
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-drawer.cjs.entry.js +2 -2
- package/dist/cjs/ch-emoji.cjs.entry.js +2 -2
- package/dist/cjs/ch-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/ch-grid.cjs.entry.js +2 -2
- package/dist/cjs/ch-icon-button.cjs.entry.js +51 -0
- package/dist/cjs/ch-icon-button.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-icon.cjs.entry.js +38 -0
- package/dist/cjs/ch-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +2 -2
- package/dist/cjs/ch-page-header.cjs.entry.js +45 -0
- package/dist/cjs/ch-page-header.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-radio.cjs.entry.js +2 -2
- package/dist/cjs/ch-segmented-control.cjs.entry.js +2 -2
- package/dist/cjs/ch-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ch-stack.cjs.entry.js +2 -2
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ch-tooltip.cjs.entry.js +204 -5
- package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/chucao.cjs.js +2 -2
- package/dist/cjs/icons-CNyDgV-q.js +88 -0
- package/dist/cjs/icons-CNyDgV-q.js.map +1 -0
- package/dist/cjs/{index-ysucLiAq.js → index-ByZY6aTj.js} +81 -5
- package/dist/cjs/index-ByZY6aTj.js.map +1 -0
- package/dist/cjs/index.cjs.js +16 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/ch-alert/ch-alert.css +13 -0
- package/dist/collection/components/ch-alert/ch-alert.js +44 -1
- package/dist/collection/components/ch-alert/ch-alert.js.map +1 -1
- package/dist/collection/components/ch-badge/ch-badge.css +30 -1
- package/dist/collection/components/ch-badge/ch-badge.js +35 -1
- package/dist/collection/components/ch-badge/ch-badge.js.map +1 -1
- package/dist/collection/components/ch-card/ch-card.js +1 -1
- package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
- package/dist/collection/components/ch-cluster/ch-cluster.js +2 -2
- package/dist/collection/components/ch-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-drawer/ch-drawer.js +1 -1
- package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
- package/dist/collection/components/ch-empty-state/ch-empty-state.js +1 -1
- package/dist/collection/components/ch-grid/ch-grid.js +1 -1
- package/dist/collection/components/ch-icon/ch-icon.css +25 -0
- package/dist/collection/components/ch-icon/ch-icon.js +121 -0
- package/dist/collection/components/ch-icon/ch-icon.js.map +1 -0
- package/dist/collection/components/ch-icon-button/ch-icon-button.css +99 -0
- package/dist/collection/components/ch-icon-button/ch-icon-button.js +216 -0
- package/dist/collection/components/ch-icon-button/ch-icon-button.js.map +1 -0
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-modal/ch-modal.js +1 -1
- package/dist/collection/components/ch-page-header/ch-page-header.css +84 -0
- package/dist/collection/components/ch-page-header/ch-page-header.js +162 -0
- package/dist/collection/components/ch-page-header/ch-page-header.js.map +1 -0
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-skeleton/ch-skeleton.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
- package/dist/collection/components/ch-stack/ch-stack.js +1 -1
- package/dist/collection/components/ch-switch/ch-switch.js +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.css +29 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +125 -6
- package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -1
- package/dist/collection/tokens/tokens.js +12 -0
- package/dist/collection/tokens/tokens.js.map +1 -1
- package/dist/collection/tokens/types.js.map +1 -1
- package/dist/collection/utils/icons.js +82 -0
- package/dist/collection/utils/icons.js.map +1 -0
- package/dist/collection/utils/overlay.js +101 -0
- package/dist/collection/utils/overlay.js.map +1 -0
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.js +1 -1
- package/dist/components/ch-alert.js.map +1 -1
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-badge.js.map +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-cluster.js +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-drawer.js +1 -1
- package/dist/components/ch-emoji.js +1 -1
- package/dist/components/ch-empty-state.js +1 -1
- package/dist/components/ch-grid.js +1 -1
- package/dist/components/ch-icon-button.d.ts +11 -0
- package/dist/components/ch-icon-button.js +2 -0
- package/dist/components/ch-icon-button.js.map +1 -0
- package/dist/components/ch-icon.d.ts +11 -0
- package/dist/components/ch-icon.js +2 -0
- package/dist/components/ch-icon.js.map +1 -0
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-modal.js +1 -1
- package/dist/components/ch-page-header.d.ts +11 -0
- package/dist/components/ch-page-header.js +2 -0
- package/dist/components/ch-page-header.js.map +1 -0
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-segmented-control.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-skeleton.js +1 -1
- package/dist/components/ch-spinner.js +1 -1
- package/dist/components/ch-stack.js +1 -1
- package/dist/components/ch-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.js +1 -1
- package/dist/components/ch-tooltip.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-no2_9Jk-.js → p-CV0rD-fF.js} +2 -2
- package/dist/components/p-CnivhwvG.js +2 -0
- package/dist/components/p-CnivhwvG.js.map +1 -0
- package/dist/components/p-qP_9qshx.js +2 -0
- package/dist/components/p-qP_9qshx.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/ch-alert_8.entry.js +34 -10
- package/dist/esm/ch-alert_8.entry.js.map +1 -1
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-cluster.entry.js +3 -3
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-drawer.entry.js +2 -2
- package/dist/esm/ch-emoji.entry.js +2 -2
- package/dist/esm/ch-empty-state.entry.js +2 -2
- package/dist/esm/ch-grid.entry.js +2 -2
- package/dist/esm/ch-icon-button.entry.js +49 -0
- package/dist/esm/ch-icon-button.entry.js.map +1 -0
- package/dist/esm/ch-icon.entry.js +36 -0
- package/dist/esm/ch-icon.entry.js.map +1 -0
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +2 -2
- package/dist/esm/ch-page-header.entry.js +43 -0
- package/dist/esm/ch-page-header.entry.js.map +1 -0
- package/dist/esm/ch-radio.entry.js +2 -2
- package/dist/esm/ch-segmented-control.entry.js +2 -2
- package/dist/esm/ch-skeleton.entry.js +2 -2
- package/dist/esm/ch-stack.entry.js +2 -2
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/ch-tooltip.entry.js +204 -5
- package/dist/esm/ch-tooltip.entry.js.map +1 -1
- package/dist/esm/chucao.js +3 -3
- package/dist/esm/icons-CnivhwvG.js +86 -0
- package/dist/esm/icons-CnivhwvG.js.map +1 -0
- package/dist/esm/{index-DVKZbUp9.js → index-CIV5Gg1o.js} +81 -6
- package/dist/esm/index-CIV5Gg1o.js.map +1 -0
- package/dist/esm/index.js +13 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-alert/ch-alert.d.ts +11 -0
- package/dist/types/components/ch-badge/ch-badge.d.ts +14 -0
- package/dist/types/components/ch-icon/ch-icon.d.ts +29 -0
- package/dist/types/components/ch-icon-button/ch-icon-button.d.ts +36 -0
- package/dist/types/components/ch-page-header/ch-page-header.d.ts +39 -0
- package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +32 -2
- package/dist/types/components.d.ts +406 -2
- package/dist/types/tokens/tokens.d.ts +12 -0
- package/dist/types/tokens/types.d.ts +2 -1
- package/dist/types/utils/icons.d.ts +15 -0
- package/dist/types/utils/overlay.d.ts +49 -0
- package/dist-react/components.d.ts +12 -1
- package/dist-react/components.js +27 -0
- package/dist-react/components.ts +37 -1
- package/dist-vue/index.d.ts +3 -0
- package/dist-vue/index.js +29 -1
- package/dist-vue/index.ts +35 -1
- package/hydrate/index.js +601 -34
- package/hydrate/index.mjs +601 -34
- package/package.json +91 -4
- package/dist/chucao/p-0e3c83a6.entry.js +0 -2
- package/dist/chucao/p-82216381.entry.js +0 -2
- package/dist/chucao/p-82216381.entry.js.map +0 -1
- package/dist/chucao/p-907195ff.entry.js +0 -2
- package/dist/chucao/p-DVKZbUp9.js +0 -3
- package/dist/chucao/p-DVKZbUp9.js.map +0 -1
- package/dist/chucao/p-b392021c.entry.js +0 -2
- package/dist/chucao/p-b392021c.entry.js.map +0 -1
- package/dist/cjs/index-ysucLiAq.js.map +0 -1
- package/dist/components/p-DQOKq7af.js +0 -2
- package/dist/components/p-DQOKq7af.js.map +0 -1
- package/dist/esm/index-DVKZbUp9.js.map +0 -1
- /package/dist/chucao/{p-1ebd9dc4.entry.js.map → p-0bc141a2.entry.js.map} +0 -0
- /package/dist/chucao/{p-449e1ba0.entry.js.map → p-0e044eff.entry.js.map} +0 -0
- /package/dist/chucao/{p-a07e0e97.entry.js.map → p-1108062e.entry.js.map} +0 -0
- /package/dist/chucao/{p-85db779c.entry.js.map → p-26e144ff.entry.js.map} +0 -0
- /package/dist/chucao/{p-6e95f31f.entry.js.map → p-337d7f68.entry.js.map} +0 -0
- /package/dist/chucao/{p-7c85f5fe.entry.js.map → p-350f974d.entry.js.map} +0 -0
- /package/dist/chucao/{p-907195ff.entry.js.map → p-4846cac4.entry.js.map} +0 -0
- /package/dist/chucao/{p-d0533af6.entry.js.map → p-6345c9e1.entry.js.map} +0 -0
- /package/dist/chucao/{p-34a9d1f4.entry.js.map → p-97655c41.entry.js.map} +0 -0
- /package/dist/chucao/{p-b5552b50.entry.js.map → p-9f73855e.entry.js.map} +0 -0
- /package/dist/chucao/{p-17451d92.entry.js.map → p-b53d954e.entry.js.map} +0 -0
- /package/dist/chucao/{p-d776b092.entry.js.map → p-b6cc08f0.entry.js.map} +0 -0
- /package/dist/chucao/{p-56d64d84.entry.js.map → p-c251b0d1.entry.js.map} +0 -0
- /package/dist/chucao/{p-84d875e9.entry.js.map → p-f9fe752c.entry.js.map} +0 -0
- /package/dist/chucao/{p-1778a313.entry.js.map → p-fdf065e6.entry.js.map} +0 -0
- /package/dist/components/{p-no2_9Jk-.js.map → p-CV0rD-fF.js.map} +0 -0
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -65,6 +65,10 @@ const zIndexBase = 0;
|
|
|
65
65
|
const zIndexDropdown = 100;
|
|
66
66
|
const zIndexModal = 1000;
|
|
67
67
|
const layoutMaxWidth = '68rem';
|
|
68
|
+
const iconSizeSm = '16px';
|
|
69
|
+
const iconSizeMd = '20px';
|
|
70
|
+
const iconSizeLg = '24px';
|
|
71
|
+
const iconStroke = '2px';
|
|
68
72
|
const tokens = {
|
|
69
73
|
'color': {
|
|
70
74
|
background: {
|
|
@@ -178,6 +182,14 @@ const tokens = {
|
|
|
178
182
|
'layout': {
|
|
179
183
|
maxWidth: '68rem',
|
|
180
184
|
},
|
|
185
|
+
'icon': {
|
|
186
|
+
size: {
|
|
187
|
+
sm: '16px',
|
|
188
|
+
md: '20px',
|
|
189
|
+
lg: '24px',
|
|
190
|
+
},
|
|
191
|
+
stroke: '2px',
|
|
192
|
+
},
|
|
181
193
|
};
|
|
182
194
|
|
|
183
195
|
exports.borderAccentBar = borderAccentBar;
|
|
@@ -210,6 +222,10 @@ exports.easingLinear = easingLinear;
|
|
|
210
222
|
exports.effectBlur = effectBlur;
|
|
211
223
|
exports.focusOutlineOffset = focusOutlineOffset;
|
|
212
224
|
exports.focusOutlineWidth = focusOutlineWidth;
|
|
225
|
+
exports.iconSizeLg = iconSizeLg;
|
|
226
|
+
exports.iconSizeMd = iconSizeMd;
|
|
227
|
+
exports.iconSizeSm = iconSizeSm;
|
|
228
|
+
exports.iconStroke = iconStroke;
|
|
213
229
|
exports.layoutMaxWidth = layoutMaxWidth;
|
|
214
230
|
exports.opacityDisabled = opacityDisabled;
|
|
215
231
|
exports.radiusMd = radiusMd;
|
|
@@ -1 +1 @@
|
|
|
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 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;AAEO,MAAM,mBAAmB,GAAG;AAC5B,MAAM,sBAAsB,GAAG;AAC/B,MAAM,yBAAyB,GAAG;AAClC,MAAM,mBAAmB,GAAG;AAC5B,MAAM,iBAAiB,GAAG;AAC1B,MAAM,iBAAiB,GAAG;AAC1B,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG;AACzB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG;AACzB,MAAM,eAAe,GAAG;AACxB,MAAM,mBAAmB,GAAG;AAC5B,MAAM,6BAA6B,GAAG;AACtC,MAAM,kBAAkB,GAAG;AAC3B,MAAM,4BAA4B,GAAG;AACrC,MAAM,gBAAgB,GAAG;AACzB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,oBAAoB,GAAG;AAC7B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,gBAAgB,GAAG;AACzB,MAAM,cAAc,GAAG;AACvB,MAAM,iBAAiB,GAAG;AAC1B,MAAM,gBAAgB,GAAG;AACzB,MAAM,gBAAgB,GAAG;AACzB,MAAM,gBAAgB,GAAG;AACzB,MAAM,gBAAgB,GAAG;AACzB,MAAM,gBAAgB,GAAG;AACzB,MAAM,uBAAuB,GAAG;AAChC,MAAM,wBAAwB,GAAG;AACjC,MAAM,oBAAoB,GAAG;AAC7B,MAAM,uBAAuB,GAAG;AAChC,MAAM,UAAU,GAAG;AACnB,MAAM,SAAS,GAAG;AAClB,MAAM,SAAS,GAAG;AAClB,MAAM,SAAS,GAAG;AAClB,MAAM,SAAS,GAAG;AAClB,MAAM,SAAS,GAAG;AAClB,MAAM,UAAU,GAAG;AACnB,MAAM,UAAU,GAAG;AACnB,MAAM,UAAU,GAAG;AACnB,MAAM,UAAU,GAAG;AACnB,MAAM,UAAU,GAAG;AACnB,MAAM,YAAY,GAAG;AACrB,MAAM,cAAc,GAAG;AACvB,MAAM,QAAQ,GAAG;AACjB,MAAM,QAAQ,GAAG;AACjB,MAAM,UAAU,GAAG;AACnB,MAAM,WAAW,GAAG;AACpB,MAAM,eAAe,GAAG;AACxB,MAAM,eAAe,GAAG;AACxB,MAAM,eAAe,GAAG;AACxB,MAAM,UAAU,GAAG;AACnB,MAAM,YAAY,GAAG;AACrB,MAAM,cAAc,GAAG;AACvB,MAAM,YAAY,GAAG;AACrB,MAAM,aAAa,GAAG;AACtB,MAAM,YAAY,GAAG;AACrB,MAAM,iBAAiB,GAAG;AAC1B,MAAM,kBAAkB,GAAG;AAC3B,MAAM,eAAe,GAAG;AACxB,MAAM,UAAU,GAAG;AACnB,MAAM,cAAc,GAAG;AACvB,MAAM,WAAW,GAAG;AACpB,MAAM,cAAc,GAAG;
|
|
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 colorScrimDefault = 'rgba(0, 0, 0, 0.6)';\nexport const colorBorderDefault = 'rgba(255, 255, 255, 0.08)';\nexport const colorBorderHover = 'rgba(45, 212, 191, 0.3)';\nexport const colorAccentDefault = '#2dd4bf';\nexport const colorAccentHover = '#5ee8d4';\nexport const colorAccentText = '#06210f';\nexport const colorStatusPositive = '#4ade80';\nexport const colorStatusPositiveBackground = 'rgba(34, 197, 94, 0.18)';\nexport const colorStatusWarning = '#f87171';\nexport const colorStatusWarningBackground = 'rgba(248, 113, 113, 0.15)';\nexport const colorTextPrimary = '#ffffff';\nexport const colorTextSecondary = 'rgba(255, 255, 255, 0.55)';\nexport const colorBrandHuemulDark = '#85422b';\nexport const colorBrandHuemulLight = '#b45b38';\nexport const colorBrandStroke = '#1d1d1b';\nexport const typographyBody = 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif';\nexport const typographyHeading = 'Inconsolata, monospace';\nexport const typographySizeXs = '0.68rem';\nexport const typographySizeSm = '0.85rem';\nexport const typographySizeMd = '1rem';\nexport const typographySizeLg = '1.25rem';\nexport const typographySizeXl = '1.5rem';\nexport const typographyWeightRegular = '400';\nexport const typographyWeightSemibold = '600';\nexport const typographyWeightBold = '700';\nexport const typographyTrackingBadge = '0.03em';\nexport const spacing2xs = '0.18rem';\nexport const spacingXs = '0.25rem';\nexport const spacingSm = '0.35rem';\nexport const spacingMd = '0.5rem';\nexport const spacingLg = '0.6rem';\nexport const spacingXl = '0.8rem';\nexport const spacing2xl = '1rem';\nexport const spacing3xl = '1.25rem';\nexport const spacing4xl = '1.35rem';\nexport const spacing5xl = '1.5rem';\nexport const spacing6xl = '2rem';\nexport const spacingShift = '2px';\nexport const spacingElevate = '1px';\nexport const radiusSm = '6px';\nexport const radiusMd = '8px';\nexport const radiusPill = '999px';\nexport const borderWidth = '1px';\nexport const borderAccentBar = '3px';\nexport const shadowFocusRing = '0 0 0 3px rgba(45, 212, 191, 0.12)';\nexport const shadowCardHover = '0 4px 20px rgba(45, 212, 191, 0.06)';\nexport const effectBlur = '10px';\nexport const durationFast = '150ms';\nexport const durationNormal = '200ms';\nexport const durationSpin = '800ms';\nexport const easingDefault = 'ease';\nexport const easingLinear = 'linear';\nexport const focusOutlineWidth = '2px';\nexport const focusOutlineOffset = '2px';\nexport const opacityDisabled = 0.5;\nexport const zIndexBase = 0;\nexport const zIndexDropdown = 100;\nexport const zIndexModal = 1000;\nexport const layoutMaxWidth = '68rem';\nexport const iconSizeSm = '16px';\nexport const iconSizeMd = '20px';\nexport const iconSizeLg = '24px';\nexport const iconStroke = '2px';\n\nexport const tokens = {\n 'color': {\n background: {\n base: '#100a1c',\n topGlow: '#201e40',\n bottomGlow: '#261226',\n },\n surface: {\n default: 'rgba(32, 30, 64, 0.6)',\n hover: 'rgba(45, 212, 191, 0.08)',\n },\n scrim: {\n default: 'rgba(0, 0, 0, 0.6)',\n },\n border: {\n default: 'rgba(255, 255, 255, 0.08)',\n hover: 'rgba(45, 212, 191, 0.3)',\n },\n accent: {\n default: '#2dd4bf',\n hover: '#5ee8d4',\n text: '#06210f',\n },\n status: {\n positive: '#4ade80',\n positiveBackground: 'rgba(34, 197, 94, 0.18)',\n warning: '#f87171',\n warningBackground: 'rgba(248, 113, 113, 0.15)',\n },\n text: {\n primary: '#ffffff',\n secondary: 'rgba(255, 255, 255, 0.55)',\n },\n brand: {\n huemulDark: '#85422b',\n huemulLight: '#b45b38',\n stroke: '#1d1d1b',\n },\n },\n 'typography': {\n body: 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif',\n heading: 'Inconsolata, monospace',\n size: {\n xs: '0.68rem',\n sm: '0.85rem',\n md: '1rem',\n lg: '1.25rem',\n xl: '1.5rem',\n },\n weight: {\n regular: '400',\n semibold: '600',\n bold: '700',\n },\n tracking: {\n badge: '0.03em',\n },\n },\n 'spacing': {\n '2xs': '0.18rem',\n 'xs': '0.25rem',\n 'sm': '0.35rem',\n 'md': '0.5rem',\n 'lg': '0.6rem',\n 'xl': '0.8rem',\n '2xl': '1rem',\n '3xl': '1.25rem',\n '4xl': '1.35rem',\n '5xl': '1.5rem',\n '6xl': '2rem',\n 'shift': '2px',\n 'elevate': '1px',\n },\n 'radius': {\n sm: '6px',\n md: '8px',\n pill: '999px',\n },\n 'border': {\n width: '1px',\n accentBar: '3px',\n },\n 'shadow': {\n focusRing: '0 0 0 3px rgba(45, 212, 191, 0.12)',\n cardHover: '0 4px 20px rgba(45, 212, 191, 0.06)',\n },\n 'effect': {\n blur: '10px',\n },\n 'duration': {\n fast: '150ms',\n normal: '200ms',\n spin: '800ms',\n },\n 'easing': {\n default: 'ease',\n linear: 'linear',\n },\n 'focus': {\n outlineWidth: '2px',\n outlineOffset: '2px',\n },\n 'opacity': {\n disabled: 0.5,\n },\n 'z-index': {\n base: 0,\n dropdown: 100,\n modal: 1000,\n },\n 'layout': {\n maxWidth: '68rem',\n },\n 'icon': {\n size: {\n sm: '16px',\n md: '20px',\n lg: '24px',\n },\n stroke: '2px',\n },\n} as const;\n\nexport type TokenCategory = keyof typeof tokens;\n"],"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,iBAAiB,GAAG;AAC1B,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG;AACzB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG;AACzB,MAAM,eAAe,GAAG;AACxB,MAAM,mBAAmB,GAAG;AAC5B,MAAM,6BAA6B,GAAG;AACtC,MAAM,kBAAkB,GAAG;AAC3B,MAAM,4BAA4B,GAAG;AACrC,MAAM,gBAAgB,GAAG;AACzB,MAAM,kBAAkB,GAA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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;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,MAAM;AACV,YAAA,EAAE,EAAE,MAAM;AACV,YAAA,EAAE,EAAE,MAAM;AACX,SAAA;AACD,QAAA,MAAM,EAAE,KAAK;AACd,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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-ByZY6aTj.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-accordion.cjs",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox.cjs",[[577,"ch-checkbox",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-cluster.cjs",[[769,"ch-cluster",{"gap":[1],"align":[1],"justify":[1],"wrap":[4]}]]],["ch-divider.cjs",[[513,"ch-divider",{"orientation":[1]}]]],["ch-drawer.cjs",[[769,"ch-drawer",{"open":[1028],"side":[1],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-emoji.cjs",[[513,"ch-emoji",{"name":[1],"alt":[1],"size":[1],"extIndex":[32],"loaded":[32]},null,{"name":[{"handleNameChange":0}]}]]],["ch-empty-state.cjs",[[769,"ch-empty-state",{"title":[1],"description":[1],"size":[1]}]]],["ch-grid.cjs",[[769,"ch-grid",{"columns":[1],"gap":[1],"minItemWidth":[1,"min-item-width"]}]]],["ch-link.cjs",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal.cjs",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"],"size":[1]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio.cjs",[[577,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-segmented-control.cjs",[[577,"ch-segmented-control",{"label":[1],"options":[16],"value":[1025],"size":[1],"name":[513],"disabled":[516],"required":[516],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}]}]]],["ch-skeleton.cjs",[[513,"ch-skeleton",{"width":[1],"height":[1],"shape":[1],"count":[2],"animated":[4]}]]],["ch-stack.cjs",[[769,"ch-stack",{"gap":[1],"align":[1],"justify":[1]}]]],["ch-tabs.cjs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea.cjs",[[577,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-tooltip.cjs",[[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"]]]]],["ch-alert_8.cjs",[[769,"ch-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"href":[1],"target":[1],"label":[1]}],[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[257,"ch-card"],[577,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-switch",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[513,"ch-spinner",{"size":[1],"label":[1]}]]]], options);
|
|
8
|
+
return index.bootstrapLazy([["ch-accordion.cjs",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox.cjs",[[577,"ch-checkbox",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-cluster.cjs",[[769,"ch-cluster",{"gap":[1],"align":[1],"justify":[1],"wrap":[4]}]]],["ch-divider.cjs",[[513,"ch-divider",{"orientation":[1]}]]],["ch-drawer.cjs",[[769,"ch-drawer",{"open":[1028],"side":[1],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-emoji.cjs",[[513,"ch-emoji",{"name":[1],"alt":[1],"size":[1],"extIndex":[32],"loaded":[32]},null,{"name":[{"handleNameChange":0}]}]]],["ch-empty-state.cjs",[[769,"ch-empty-state",{"title":[1],"description":[1],"size":[1]}]]],["ch-grid.cjs",[[769,"ch-grid",{"columns":[1],"gap":[1],"minItemWidth":[1,"min-item-width"]}]]],["ch-icon.cjs",[[513,"ch-icon",{"name":[1],"size":[1],"label":[1]}]]],["ch-icon-button.cjs",[[513,"ch-icon-button",{"name":[1],"label":[1],"size":[1],"type":[1],"disabled":[4],"loading":[4]}]]],["ch-link.cjs",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal.cjs",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"],"size":[1]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-page-header.cjs",[[769,"ch-page-header",{"title":[1],"headingLevel":[1,"heading-level"],"eyebrow":[1],"description":[1],"actionsStacked":[4,"actions-stacked"]}]]],["ch-radio.cjs",[[577,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-segmented-control.cjs",[[577,"ch-segmented-control",{"label":[1],"options":[16],"value":[1025],"size":[1],"name":[513],"disabled":[516],"required":[516],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}]}]]],["ch-skeleton.cjs",[[513,"ch-skeleton",{"width":[1],"height":[1],"shape":[1],"count":[2],"animated":[4]}]]],["ch-stack.cjs",[[769,"ch-stack",{"gap":[1],"align":[1],"justify":[1]}]]],["ch-tabs.cjs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea.cjs",[[577,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-tooltip.cjs",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32],"resolvedPlacement":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"],[11,"scroll","handleScroll"],[9,"resize","handleResize"]]]]],["ch-alert_8.cjs",[[769,"ch-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"href":[1],"target":[1],"label":[1]}],[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"],"statusCue":[4,"status-cue"]}],[769,"ch-badge",{"variant":[1],"statusCue":[4,"status-cue"]}],[257,"ch-card"],[577,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-switch",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[513,"ch-spinner",{"size":[1],"label":[1]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
"components/ch-emoji/ch-emoji.js",
|
|
11
11
|
"components/ch-empty-state/ch-empty-state.js",
|
|
12
12
|
"components/ch-grid/ch-grid.js",
|
|
13
|
+
"components/ch-icon/ch-icon.js",
|
|
14
|
+
"components/ch-icon-button/ch-icon-button.js",
|
|
13
15
|
"components/ch-link/ch-link.js",
|
|
14
16
|
"components/ch-modal/ch-modal.js",
|
|
17
|
+
"components/ch-page-header/ch-page-header.js",
|
|
15
18
|
"components/ch-radio/ch-radio.js",
|
|
16
19
|
"components/ch-segmented-control/ch-segmented-control.js",
|
|
17
20
|
"components/ch-select/ch-select.js",
|
|
@@ -7,12 +7,22 @@
|
|
|
7
7
|
align-items: flex-start;
|
|
8
8
|
gap: var(--spacing-2xl);
|
|
9
9
|
padding: var(--spacing-2xl) var(--spacing-3xl);
|
|
10
|
+
/* The leading edge is thicker on every variant, so the block still reads as
|
|
11
|
+
a status message in grayscale or with colour-vision deficiency. */
|
|
10
12
|
border: var(--border-width) solid transparent;
|
|
13
|
+
border-left: var(--border-accent-bar) solid transparent;
|
|
11
14
|
border-radius: var(--radius);
|
|
12
15
|
font-size: var(--typography-size-sm);
|
|
13
16
|
line-height: 1.5;
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
.alert-icon {
|
|
20
|
+
width: var(--icon-size-md);
|
|
21
|
+
height: var(--icon-size-md);
|
|
22
|
+
flex: none;
|
|
23
|
+
margin-top: 1px;
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
.alert-content {
|
|
17
27
|
flex: 1;
|
|
18
28
|
min-width: 0;
|
|
@@ -23,18 +33,21 @@
|
|
|
23
33
|
color: var(--text);
|
|
24
34
|
background: var(--surface);
|
|
25
35
|
border-color: var(--border);
|
|
36
|
+
border-left-color: var(--color-text-secondary);
|
|
26
37
|
}
|
|
27
38
|
|
|
28
39
|
.alert--positive {
|
|
29
40
|
color: var(--color-status-positive);
|
|
30
41
|
background: var(--color-status-positive-background);
|
|
31
42
|
border-color: var(--color-status-positive);
|
|
43
|
+
border-left-color: var(--color-status-positive);
|
|
32
44
|
}
|
|
33
45
|
|
|
34
46
|
.alert--warning {
|
|
35
47
|
color: var(--color-status-warning);
|
|
36
48
|
background: var(--color-status-warning-background);
|
|
37
49
|
border-color: var(--color-status-warning);
|
|
50
|
+
border-left-color: var(--color-status-warning);
|
|
38
51
|
}
|
|
39
52
|
|
|
40
53
|
.alert-dismiss {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { chIcons } from "../../utils/icons";
|
|
3
|
+
/**
|
|
4
|
+
* The glyph paired with each variant. It is what makes the variants
|
|
5
|
+
* distinguishable without colour: `default` is informational, `positive`
|
|
6
|
+
* confirms and `warning` warns, and each reads differently in grayscale.
|
|
7
|
+
*/
|
|
8
|
+
const VARIANT_ICON = {
|
|
9
|
+
default: 'info',
|
|
10
|
+
positive: 'success',
|
|
11
|
+
warning: 'alert',
|
|
12
|
+
};
|
|
2
13
|
/**
|
|
3
14
|
* Block-level status message.
|
|
4
15
|
*
|
|
@@ -7,6 +18,11 @@ import { Host, h } from "@stencil/core";
|
|
|
7
18
|
* interrupt. Both announce reliably when the alert is added to the page in
|
|
8
19
|
* response to something — an alert already present at load may not be read out,
|
|
9
20
|
* which is how live regions work rather than something this component controls.
|
|
21
|
+
*
|
|
22
|
+
* Every variant also carries an icon and a thicker leading edge, so the three
|
|
23
|
+
* states stay distinguishable without colour vision. The icon is decorative:
|
|
24
|
+
* the text next to it already says what happened, and announcing "check
|
|
25
|
+
* circle" before it would only add noise.
|
|
10
26
|
*/
|
|
11
27
|
export class ChAlert {
|
|
12
28
|
/**
|
|
@@ -21,6 +37,12 @@ export class ChAlert {
|
|
|
21
37
|
* so without a label it would have no accessible name at all.
|
|
22
38
|
*/
|
|
23
39
|
dismissLabel;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to show the variant's icon. On by default so the status is not
|
|
42
|
+
* colour-only; turn it off when the surrounding copy already carries the cue
|
|
43
|
+
* and a second marker would be redundant.
|
|
44
|
+
*/
|
|
45
|
+
statusCue = true;
|
|
24
46
|
/**
|
|
25
47
|
* Emitted when the dismiss button is clicked. The alert stays in the DOM —
|
|
26
48
|
* whether to remove it is the consumer's decision. If you do remove it, move
|
|
@@ -33,7 +55,8 @@ export class ChAlert {
|
|
|
33
55
|
};
|
|
34
56
|
render() {
|
|
35
57
|
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
36
|
-
|
|
58
|
+
const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
|
|
59
|
+
return (h(Host, { key: '5a14801af29be0634bd35cf8706446a3a5d33286' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (h("svg", { key: 'dbaf65b9d7dc08e2ba51b60b273a16ae42eacb02', class: "alert-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, shapes.map(shape => h(shape.tag, shape.attrs)))), h("div", { key: 'ad1c508dea9e3f9e718ec8104f8236065f3eb0e8', class: "alert-content" }, h("slot", { key: '6f906d355fa416b674994716a3ca896ae517f492' })), this.dismissLabel && (h("button", { key: '165af98fa093bda95c785e86c078b69aee2c0580', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: '0a05eff2d077559dc267bd72898299c5d42eaf8a', "aria-hidden": "true" }, "\u00D7"))))));
|
|
37
60
|
}
|
|
38
61
|
static get is() { return "ch-alert"; }
|
|
39
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -93,6 +116,26 @@ export class ChAlert {
|
|
|
93
116
|
"setter": false,
|
|
94
117
|
"reflect": false,
|
|
95
118
|
"attribute": "dismiss-label"
|
|
119
|
+
},
|
|
120
|
+
"statusCue": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"mutable": false,
|
|
123
|
+
"complexType": {
|
|
124
|
+
"original": "boolean",
|
|
125
|
+
"resolved": "boolean",
|
|
126
|
+
"references": {}
|
|
127
|
+
},
|
|
128
|
+
"required": false,
|
|
129
|
+
"optional": false,
|
|
130
|
+
"docs": {
|
|
131
|
+
"tags": [],
|
|
132
|
+
"text": "Whether to show the variant's icon. On by default so the status is not\ncolour-only; turn it off when the surrounding copy already carries the cue\nand a second marker would be redundant."
|
|
133
|
+
},
|
|
134
|
+
"getter": false,
|
|
135
|
+
"setter": false,
|
|
136
|
+
"reflect": false,
|
|
137
|
+
"attribute": "status-cue",
|
|
138
|
+
"defaultValue": "true"
|
|
96
139
|
}
|
|
97
140
|
};
|
|
98
141
|
}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"ch-alert.js","sourceRoot":"","sources":["../../../../src/components/ch-alert/ch-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK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,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAC3C,CACP;gBACD,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\nimport { chIcons, type ChIconName } from '../../utils/icons';\n\nexport type ChAlertVariant = 'default' | 'positive' | 'warning';\n\n/**\n * The glyph paired with each variant. It is what makes the variants\n * distinguishable without colour: `default` is informational, `positive`\n * confirms and `warning` warns, and each reads differently in grayscale.\n */\nconst VARIANT_ICON: Record<ChAlertVariant, ChIconName> = {\n default: 'info',\n positive: 'success',\n warning: 'alert',\n};\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 * Every variant also carries an icon and a thicker leading edge, so the three\n * states stay distinguishable without colour vision. The icon is decorative:\n * the text next to it already says what happened, and announcing \"check\n * circle\" before it would only add noise.\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 * Whether to show the variant's icon. On by default so the status is not\n * colour-only; turn it off when the surrounding copy already carries the cue\n * and a second marker would be redundant.\n */\n @Prop() statusCue = true;\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 const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;\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 {shapes && (\n <svg\n class=\"alert-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {shapes.map(shape => h(shape.tag, shape.attrs))}\n </svg>\n )}\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"]}
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.badge {
|
|
6
|
-
display: inline-
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: var(--spacing-xs);
|
|
7
9
|
padding: var(--spacing-2xs) var(--spacing-lg);
|
|
10
|
+
border: var(--border-width) solid transparent;
|
|
8
11
|
border-radius: var(--radius-pill);
|
|
9
12
|
font-size: var(--typography-size-xs);
|
|
10
13
|
font-weight: var(--typography-weight-semibold);
|
|
@@ -12,16 +15,42 @@
|
|
|
12
15
|
letter-spacing: var(--typography-tracking-badge);
|
|
13
16
|
}
|
|
14
17
|
|
|
18
|
+
/* The cue is shape first: a badge must not depend on hue to say what state it
|
|
19
|
+
is in, and shape survives grayscale printing and every form of colour-vision
|
|
20
|
+
deficiency. Colour repeats the cue rather than carrying it alone. */
|
|
21
|
+
.badge-dot {
|
|
22
|
+
display: block;
|
|
23
|
+
flex: none;
|
|
24
|
+
width: 0.45em;
|
|
25
|
+
height: 0.45em;
|
|
26
|
+
background: currentColor;
|
|
27
|
+
border-radius: var(--radius-pill);
|
|
28
|
+
}
|
|
29
|
+
|
|
15
30
|
.badge--default {
|
|
16
31
|
background: var(--color-surface-hover);
|
|
17
32
|
color: var(--accent);
|
|
33
|
+
border-color: var(--accent);
|
|
18
34
|
}
|
|
19
35
|
|
|
20
36
|
.badge--positive {
|
|
21
37
|
background: var(--color-status-positive-background);
|
|
22
38
|
color: var(--color-status-positive);
|
|
39
|
+
border-color: var(--color-status-positive);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.badge--positive .badge-dot {
|
|
43
|
+
background: transparent;
|
|
44
|
+
border: var(--border-width) solid currentColor;
|
|
45
|
+
border-radius: var(--radius-pill);
|
|
23
46
|
}
|
|
47
|
+
|
|
24
48
|
.badge--warning {
|
|
25
49
|
background: var(--color-status-warning-background);
|
|
26
50
|
color: var(--color-status-warning);
|
|
51
|
+
border-color: var(--color-status-warning);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.badge--warning .badge-dot {
|
|
55
|
+
border-radius: 0;
|
|
27
56
|
}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Small status label.
|
|
4
|
+
*
|
|
5
|
+
* Variants are not colour-only: each one also changes the leading dot's shape
|
|
6
|
+
* and adds a matching border, so a badge still says which state it is in when
|
|
7
|
+
* printed in grayscale or seen with colour-vision deficiency. `default` uses a
|
|
8
|
+
* filled dot, `positive` a ring, and `warning` a filled square.
|
|
9
|
+
*/
|
|
2
10
|
export class ChBadge {
|
|
3
11
|
/**
|
|
4
12
|
* The visual style of the badge. Either `default`, `positive`, or `warning`.
|
|
5
13
|
*/
|
|
6
14
|
variant = 'default';
|
|
15
|
+
/**
|
|
16
|
+
* Whether to show the variant marker. On by default so the state does not
|
|
17
|
+
* depend on colour; turn it off for a badge that only repeats text already
|
|
18
|
+
* carrying the meaning.
|
|
19
|
+
*/
|
|
20
|
+
statusCue = true;
|
|
7
21
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '4690e03d920f9fd89afc7a37cab1e2c57d26f1f2' }, h("span", { key: '73bac91869bb6e37d1434e7318fd716ffedc2120', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && h("span", { key: '8272f087de323e6d729a1820d971da6c5dc7c5b5', class: "badge-dot", "aria-hidden": "true" }), h("slot", { key: 'bafc32e7a928fa7c458efb12a08fa0bbf18e83e6' }))));
|
|
9
23
|
}
|
|
10
24
|
static get is() { return "ch-badge"; }
|
|
11
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -46,6 +60,26 @@ export class ChBadge {
|
|
|
46
60
|
"reflect": false,
|
|
47
61
|
"attribute": "variant",
|
|
48
62
|
"defaultValue": "'default'"
|
|
63
|
+
},
|
|
64
|
+
"statusCue": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "boolean",
|
|
69
|
+
"resolved": "boolean",
|
|
70
|
+
"references": {}
|
|
71
|
+
},
|
|
72
|
+
"required": false,
|
|
73
|
+
"optional": false,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": "Whether to show the variant marker. On by default so the state does not\ndepend on colour; turn it off for a badge that only repeats text already\ncarrying the meaning."
|
|
77
|
+
},
|
|
78
|
+
"getter": false,
|
|
79
|
+
"setter": false,
|
|
80
|
+
"reflect": false,
|
|
81
|
+
"attribute": "status-cue",
|
|
82
|
+
"defaultValue": "true"
|
|
49
83
|
}
|
|
50
84
|
};
|
|
51
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ch-badge.js","sourceRoot":"","sources":["../../../../src/components/ch-badge/ch-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ch-badge.js","sourceRoot":"","sources":["../../../../src/components/ch-badge/ch-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIzD;;;;;;;GAOG;AAMH,MAAM,OAAO,OAAO;IAClB;;OAEG;IACK,OAAO,GAAmB,SAAS,CAAC;IAE5C;;;;OAIG;IACK,SAAS,GAAG,IAAI,CAAC;IAEzB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,6DAAM,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,UAAU,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE;gBAC3D,IAAI,CAAC,SAAS,IAAI,6DAAM,KAAK,EAAC,WAAW,iBAAa,MAAM,GAAQ;gBACrE,8DAAa,CACR,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChBadgeVariant = 'default' | 'positive' | 'warning';\n\n/**\n * Small status label.\n *\n * Variants are not colour-only: each one also changes the leading dot's shape\n * and adds a matching border, so a badge still says which state it is in when\n * printed in grayscale or seen with colour-vision deficiency. `default` uses a\n * filled dot, `positive` a ring, and `warning` a filled square.\n */\n@Component({\n tag: 'ch-badge',\n styleUrl: 'ch-badge.css',\n shadow: true,\n})\nexport class ChBadge {\n /**\n * The visual style of the badge. Either `default`, `positive`, or `warning`.\n */\n @Prop() variant: ChBadgeVariant = 'default';\n\n /**\n * Whether to show the variant marker. On by default so the state does not\n * depend on colour; turn it off for a badge that only repeats text already\n * carrying the meaning.\n */\n @Prop() statusCue = true;\n\n render() {\n return (\n <Host>\n <span class={{ badge: true, [`badge--${this.variant}`]: true }}>\n {this.statusCue && <span class=\"badge-dot\" aria-hidden=\"true\"></span>}\n <slot></slot>\n </span>\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: 'b3952612583c8f61076164d3795b56d54b023a77' }, h("div", { key: 'd0f58a9f84006c942ef9b27926f8cfa3138ad7d2', class: "card" }, h("slot", { key: '9b1b54af6c5ff58417732764d4fcb8a8114348c4' }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "ch-card"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -95,7 +95,7 @@ export class ChCheckbox {
|
|
|
95
95
|
return undefined;
|
|
96
96
|
}
|
|
97
97
|
render() {
|
|
98
|
-
return (h(Host, { key: '
|
|
98
|
+
return (h(Host, { key: '5246c3e6798a4ad0407f3b817ca1b83ab786ca1e' }, h("label", { key: 'c3fda492b9c61c81fd3c7afe62e5c379f783ff28', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: 'd77cdf632cbe58c74719567a52fbe224fcceca0b', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: 'b2707475cc9b3f1e70044566e16ce1b90facabc6', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'f597fbea344370911f71f2360db4eb0e57d3999d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '75082edd8a5a477c7c95365e6e2da66f6b69d6cc', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "ch-checkbox"; }
|
|
101
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -26,13 +26,13 @@ export class ChCluster {
|
|
|
26
26
|
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'f55b938f1f3e898b63646945af934258bf87b1af', class: {
|
|
30
30
|
'cluster': true,
|
|
31
31
|
[`cluster--gap-${this.gapStep}`]: true,
|
|
32
32
|
[`cluster--align-${this.align}`]: true,
|
|
33
33
|
[`cluster--justify-${this.justify}`]: true,
|
|
34
34
|
'cluster--nowrap': !this.wrap,
|
|
35
|
-
} }, h("slot", { key: '
|
|
35
|
+
} }, h("slot", { key: 'b4c3adf66aa275eac6f60c512454a9b4391e14d3' })));
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "ch-cluster"; }
|
|
38
38
|
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: 'bf9e60345f2958ac334df8e8b3cf135363a4cd84', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: '9a6348a2e46fa30c7b58a96f875c438468866b44', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "ch-divider"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -145,7 +145,7 @@ export class ChDrawer {
|
|
|
145
145
|
if (!this.label) {
|
|
146
146
|
warnMissingName(this.el, 'ch-drawer', 'pass label with the same text as the header');
|
|
147
147
|
}
|
|
148
|
-
return (h(Host, { key: '
|
|
148
|
+
return (h(Host, { key: '38cbc3aa6b3c94202a4809193415b7ace9a4b377' }, h("dialog", { key: '1c130ab25aabe596b87711ff5e61f121281ec98e', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '7307a0835d140253a7ac6070cdd26eb82deb45e4', class: "drawer-head" }, h("slot", { key: '371e0df2e6152642ae90763387985647fbf45794', name: "header" }), this.closeLabel && (h("button", { key: 'e568aae38a6440e873342c931e0db9f6f933e20f', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'cf5e72590342726586bd1d4e10e879531e70aba7', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'c832d23ce2be0e3cfd8e07a23a807cf4bc9163db', class: "drawer-body" }, h("slot", { key: '16850f131819ae59d07893f40296cefd2bd4ce70' })), h("slot", { key: '1682090d53ce7df009caa7d3360fc39e7bc5e47c', name: "footer" }))));
|
|
149
149
|
}
|
|
150
150
|
static get is() { return "ch-drawer"; }
|
|
151
151
|
static get encapsulation() { return "shadow"; }
|
|
@@ -49,7 +49,7 @@ export class ChEmoji {
|
|
|
49
49
|
this.loaded = true;
|
|
50
50
|
};
|
|
51
51
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '403f04792b293ef20f1e01c201bc530e5bd4429c' }, h("img", { key: '00b8c6f0cc5a048d21cca594472f17bcbc9882a5', class: {
|
|
53
53
|
'emoji': true,
|
|
54
54
|
[`emoji--${this.size}`]: true,
|
|
55
55
|
'emoji--hidden': !this.loaded,
|
|
@@ -22,7 +22,7 @@ export class ChEmptyState {
|
|
|
22
22
|
*/
|
|
23
23
|
size = 'md';
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '7438cc3c538a3d789fb3c4832d5483ce7032fcdb', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, h("div", { key: '29d06044057fc95e977fba87ce0965628509e6ef', class: "empty-state__inner" }, h("div", { key: 'c49c5331ab11c03a5a0ea42fd3e622ee0093c5d6', class: "empty-state__icon", "aria-hidden": "true" }, h("slot", { key: 'c5f1e5dd26438b66df8ca46c1ff7830606af2742', name: "icon" })), h("h3", { key: '9604df7541e0a03c99045b93bd771a27251dbea2', class: "empty-state__title" }, this.title), this.description && h("p", { key: '10800f7b89bb93c979566b657a17fb36dbb9bce8', class: "empty-state__description" }, this.description), h("div", { key: '38ecef67b8c7e264acf460f715299fa21c4d7dea', class: "empty-state__actions" }, h("slot", { key: '1d266f2914232f16b9e212c7cf3b2eb13d4a0fe2' })))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "ch-empty-state"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,7 +48,7 @@ export class ChGrid {
|
|
|
48
48
|
this.el.style.setProperty('--ch-grid-columns', template);
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: 'a453ec09920d782d4ad324a773b1e67634e2012f', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, h("slot", { key: 'b0efb94df64941d5a94c06ae04d299e1b04f6109' })));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "ch-grid"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
line-height: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.icon {
|
|
7
|
+
display: block;
|
|
8
|
+
flex: none;
|
|
9
|
+
color: inherit;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.icon--sm {
|
|
13
|
+
width: var(--icon-size-sm);
|
|
14
|
+
height: var(--icon-size-sm);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.icon--md {
|
|
18
|
+
width: var(--icon-size-md);
|
|
19
|
+
height: var(--icon-size-md);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon--lg {
|
|
23
|
+
width: var(--icon-size-lg);
|
|
24
|
+
height: var(--icon-size-lg);
|
|
25
|
+
}
|