@devschile/chucao 1.0.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.
Files changed (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +358 -0
  3. package/dist/chucao/chucao.css +2 -0
  4. package/dist/chucao/chucao.esm.js +2 -0
  5. package/dist/chucao/chucao.esm.js.map +1 -0
  6. package/dist/chucao/fonts/fira-sans-latin-400-normal.woff2 +0 -0
  7. package/dist/chucao/fonts/fira-sans-latin-600-normal.woff2 +0 -0
  8. package/dist/chucao/fonts/fira-sans-latin-700-normal.woff2 +0 -0
  9. package/dist/chucao/fonts/inconsolata-latin-400-normal.woff2 +0 -0
  10. package/dist/chucao/index.esm.js +2 -0
  11. package/dist/chucao/index.esm.js.map +1 -0
  12. package/dist/chucao/p-2eeff869.entry.js +2 -0
  13. package/dist/chucao/p-2eeff869.entry.js.map +1 -0
  14. package/dist/chucao/p-QBEhw78y.js +3 -0
  15. package/dist/chucao/p-QBEhw78y.js.map +1 -0
  16. package/dist/cjs/ch-badge_5.cjs.entry.js +187 -0
  17. package/dist/cjs/ch-badge_5.cjs.entry.js.map +1 -0
  18. package/dist/cjs/chucao.cjs.js +27 -0
  19. package/dist/cjs/chucao.cjs.js.map +1 -0
  20. package/dist/cjs/index-Do8JpTKQ.js +1485 -0
  21. package/dist/cjs/index-Do8JpTKQ.js.map +1 -0
  22. package/dist/cjs/index.cjs.js +98 -0
  23. package/dist/cjs/index.cjs.js.map +1 -0
  24. package/dist/cjs/loader.cjs.js +15 -0
  25. package/dist/cjs/loader.cjs.js.map +1 -0
  26. package/dist/collection/collection-manifest.json +17 -0
  27. package/dist/collection/components/ch-badge/ch-badge.css +27 -0
  28. package/dist/collection/components/ch-badge/ch-badge.js +53 -0
  29. package/dist/collection/components/ch-badge/ch-badge.js.map +1 -0
  30. package/dist/collection/components/ch-button/ch-button.css +58 -0
  31. package/dist/collection/components/ch-button/ch-button.js +132 -0
  32. package/dist/collection/components/ch-button/ch-button.js.map +1 -0
  33. package/dist/collection/components/ch-card/ch-card.css +44 -0
  34. package/dist/collection/components/ch-card/ch-card.js +19 -0
  35. package/dist/collection/components/ch-card/ch-card.js.map +1 -0
  36. package/dist/collection/components/ch-input/ch-input.css +43 -0
  37. package/dist/collection/components/ch-input/ch-input.js +240 -0
  38. package/dist/collection/components/ch-input/ch-input.js.map +1 -0
  39. package/dist/collection/components/ch-select/ch-select.css +45 -0
  40. package/dist/collection/components/ch-select/ch-select.js +220 -0
  41. package/dist/collection/components/ch-select/ch-select.js.map +1 -0
  42. package/dist/collection/fonts/fira-sans-latin-400-normal.woff2 +0 -0
  43. package/dist/collection/fonts/fira-sans-latin-600-normal.woff2 +0 -0
  44. package/dist/collection/fonts/fira-sans-latin-700-normal.woff2 +0 -0
  45. package/dist/collection/fonts/inconsolata-latin-400-normal.woff2 +0 -0
  46. package/dist/collection/index.js +11 -0
  47. package/dist/collection/index.js.map +1 -0
  48. package/dist/collection/tokens/tokens.js +70 -0
  49. package/dist/collection/tokens/tokens.js.map +1 -0
  50. package/dist/collection/tokens/types.js +2 -0
  51. package/dist/collection/tokens/types.js.map +1 -0
  52. package/dist/components/ch-badge.d.ts +11 -0
  53. package/dist/components/ch-badge.js +2 -0
  54. package/dist/components/ch-badge.js.map +1 -0
  55. package/dist/components/ch-button.d.ts +11 -0
  56. package/dist/components/ch-button.js +2 -0
  57. package/dist/components/ch-button.js.map +1 -0
  58. package/dist/components/ch-card.d.ts +11 -0
  59. package/dist/components/ch-card.js +2 -0
  60. package/dist/components/ch-card.js.map +1 -0
  61. package/dist/components/ch-input.d.ts +11 -0
  62. package/dist/components/ch-input.js +2 -0
  63. package/dist/components/ch-input.js.map +1 -0
  64. package/dist/components/ch-select.d.ts +11 -0
  65. package/dist/components/ch-select.js +2 -0
  66. package/dist/components/ch-select.js.map +1 -0
  67. package/dist/components/index.d.ts +35 -0
  68. package/dist/components/index.js +2 -0
  69. package/dist/components/index.js.map +1 -0
  70. package/dist/components/p-BImgfbXx.js +2 -0
  71. package/dist/components/p-BImgfbXx.js.map +1 -0
  72. package/dist/esm/ch-badge_5.entry.js +181 -0
  73. package/dist/esm/ch-badge_5.entry.js.map +1 -0
  74. package/dist/esm/chucao.js +23 -0
  75. package/dist/esm/chucao.js.map +1 -0
  76. package/dist/esm/index-QBEhw78y.js +1476 -0
  77. package/dist/esm/index-QBEhw78y.js.map +1 -0
  78. package/dist/esm/index.js +74 -0
  79. package/dist/esm/index.js.map +1 -0
  80. package/dist/esm/loader.js +13 -0
  81. package/dist/esm/loader.js.map +1 -0
  82. package/dist/index.cjs.js +1 -0
  83. package/dist/index.js +1 -0
  84. package/dist/types/components/ch-badge/ch-badge.d.ts +8 -0
  85. package/dist/types/components/ch-button/ch-button.d.ts +24 -0
  86. package/dist/types/components/ch-card/ch-card.d.ts +3 -0
  87. package/dist/types/components/ch-input/ch-input.d.ts +44 -0
  88. package/dist/types/components/ch-select/ch-select.d.ts +44 -0
  89. package/dist/types/components.d.ts +348 -0
  90. package/dist/types/index.d.ts +12 -0
  91. package/dist/types/stencil-public-runtime.d.ts +1861 -0
  92. package/dist/types/tokens/tokens.d.ts +69 -0
  93. package/dist/types/tokens/types.d.ts +5 -0
  94. package/dist-react/components.d.ts +29 -0
  95. package/dist-react/components.js +51 -0
  96. package/dist-react/components.ts +81 -0
  97. package/dist-vue/index.d.ts +7 -0
  98. package/dist-vue/index.js +47 -0
  99. package/dist-vue/index.ts +63 -0
  100. package/loader/cdn.js +1 -0
  101. package/loader/index.cjs.js +1 -0
  102. package/loader/index.d.ts +24 -0
  103. package/loader/index.es2017.js +1 -0
  104. package/loader/index.js +2 -0
  105. package/package.json +125 -0
@@ -0,0 +1,74 @@
1
+ /* Generated by toki v1.10.0 — do not edit */
2
+ const colorBackgroundBase = '#100a1c';
3
+ const colorBackgroundTopGlow = '#201e40';
4
+ const colorBackgroundBottomGlow = '#261226';
5
+ const colorSurfaceDefault = 'rgba(32, 30, 64, 0.6)';
6
+ const colorSurfaceHover = 'rgba(45, 212, 191, 0.08)';
7
+ const colorBorderDefault = 'rgba(255, 255, 255, 0.08)';
8
+ const colorBorderHover = 'rgba(45, 212, 191, 0.3)';
9
+ const colorAccentDefault = '#2dd4bf';
10
+ const colorAccentHover = '#5ee8d4';
11
+ const colorStatusPositive = '#4ade80';
12
+ const colorStatusPositiveBackground = 'rgba(34, 197, 94, 0.18)';
13
+ const colorStatusWarning = '#f87171';
14
+ const colorStatusWarningBackground = 'rgba(248, 113, 113, 0.15)';
15
+ const colorTextPrimary = '#ffffff';
16
+ const colorTextSecondary = 'rgba(255, 255, 255, 0.55)';
17
+ const colorBrandHuemulDark = '#85422b';
18
+ const colorBrandHuemulLight = '#b45b38';
19
+ const colorBrandStroke = '#1d1d1b';
20
+ const typographyBody = 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif';
21
+ const typographyHeading = 'Inconsolata, monospace';
22
+ const spacingRadius = '6px';
23
+ const layoutMaxWidth = '68rem';
24
+ const tokens = {
25
+ color: {
26
+ background: {
27
+ base: '#100a1c',
28
+ topGlow: '#201e40',
29
+ bottomGlow: '#261226',
30
+ },
31
+ surface: {
32
+ default: 'rgba(32, 30, 64, 0.6)',
33
+ hover: 'rgba(45, 212, 191, 0.08)',
34
+ },
35
+ border: {
36
+ default: 'rgba(255, 255, 255, 0.08)',
37
+ hover: 'rgba(45, 212, 191, 0.3)',
38
+ },
39
+ accent: {
40
+ default: '#2dd4bf',
41
+ hover: '#5ee8d4',
42
+ },
43
+ status: {
44
+ positive: '#4ade80',
45
+ positiveBackground: 'rgba(34, 197, 94, 0.18)',
46
+ warning: '#f87171',
47
+ warningBackground: 'rgba(248, 113, 113, 0.15)',
48
+ },
49
+ text: {
50
+ primary: '#ffffff',
51
+ secondary: 'rgba(255, 255, 255, 0.55)',
52
+ },
53
+ brand: {
54
+ huemulDark: '#85422b',
55
+ huemulLight: '#b45b38',
56
+ stroke: '#1d1d1b',
57
+ },
58
+ },
59
+ typography: {
60
+ body: 'Fira Sans, Droid Sans, Helvetica Neue, sans-serif',
61
+ heading: 'Inconsolata, monospace',
62
+ },
63
+ spacing: {
64
+ radius: '6px',
65
+ },
66
+ layout: {
67
+ maxWidth: '68rem',
68
+ },
69
+ };
70
+
71
+ export { colorAccentDefault, colorAccentHover, colorBackgroundBase, colorBackgroundBottomGlow, colorBackgroundTopGlow, colorBorderDefault, colorBorderHover, colorBrandHuemulDark, colorBrandHuemulLight, colorBrandStroke, colorStatusPositive, colorStatusPositiveBackground, colorStatusWarning, colorStatusWarningBackground, colorSurfaceDefault, colorSurfaceHover, colorTextPrimary, colorTextSecondary, layoutMaxWidth, spacingRadius, tokens, typographyBody, typographyHeading };
72
+ //# sourceMappingURL=index.js.map
73
+
74
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["src/tokens/tokens.ts"],"sourcesContent":["/* Generated by toki v1.10.0 — 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 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 spacingRadius = '6px';\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 },\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 },\n spacing: {\n radius: '6px',\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;AACzB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,gBAAgB,GAAG;AACzB,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,aAAa,GAAG;AACtB,MAAM,cAAc,GAAG;AAEvB,MAAM,MAAM,GAAG;AACpB,IAAA,KAAK,EAAE;AACL,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,UAAU,EAAE,SAAS;AACtB,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,uBAAuB;AAChC,YAAA,KAAK,EAAE,0BAA0B;AAClC,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,OAAO,EAAE,2BAA2B;AACpC,YAAA,KAAK,EAAE,yBAAyB;AACjC,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,KAAK,EAAE,SAAS;AACjB,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,QAAQ,EAAE,SAAS;AACnB,YAAA,kBAAkB,EAAE,yBAAyB;AAC7C,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,iBAAiB,EAAE,2BAA2B;AAC/C,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,SAAS,EAAE,2BAA2B;AACvC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,UAAU,EAAE,SAAS;AACrB,YAAA,WAAW,EAAE,SAAS;AACtB,YAAA,MAAM,EAAE,SAAS;AAClB,SAAA;AACF,KAAA;AACD,IAAA,UAAU,EAAE;AACV,QAAA,IAAI,EAAE,mDAAmD;AACzD,QAAA,OAAO,EAAE,wBAAwB;AAClC,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,MAAM,EAAE,KAAK;AACd,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,OAAO;AAClB,KAAA;;;;;"}
@@ -0,0 +1,13 @@
1
+ import { g as globalScripts, b as bootstrapLazy } from './index-QBEhw78y.js';
2
+ export { s as setNonce } from './index-QBEhw78y.js';
3
+
4
+ const defineCustomElements = async (win, options) => {
5
+ if (typeof window === 'undefined') return undefined;
6
+ await globalScripts();
7
+ return bootstrapLazy([["ch-badge_5",[[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]}],[513,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4]}]]]], options);
8
+ };
9
+
10
+ export { defineCustomElements };
11
+ //# sourceMappingURL=loader.js.map
12
+
13
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.js","sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"names":[],"mappings":";;;AAGY,MAAC,oBAAoB,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK;AAC5D,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,SAAS;AACrD,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D;;;;"}
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1,8 @@
1
+ export type ChBadgeVariant = 'default' | 'positive' | 'warning';
2
+ export declare class ChBadge {
3
+ /**
4
+ * The visual style of the badge. Either `default`, `positive`, or `warning`.
5
+ */
6
+ variant: ChBadgeVariant;
7
+ render(): any;
8
+ }
@@ -0,0 +1,24 @@
1
+ import { type EventEmitter } from '../../stencil-public-runtime';
2
+ export type ChButtonVariant = 'primary' | 'secondary';
3
+ export declare class ChButton {
4
+ /**
5
+ * The visual style of the button. Either `primary` or `secondary`.
6
+ */
7
+ variant: ChButtonVariant;
8
+ /**
9
+ * Whether the button is disabled.
10
+ */
11
+ disabled: boolean;
12
+ /**
13
+ * Accessible label set as `aria-label` on the native `<button>`. Use it
14
+ * when the button's content doesn't convey its purpose on its own (e.g.
15
+ * an icon-only button).
16
+ */
17
+ label?: string;
18
+ /**
19
+ * Emitted when the button is clicked.
20
+ */
21
+ chClick: EventEmitter<MouseEvent>;
22
+ private handleClick;
23
+ render(): any;
24
+ }
@@ -0,0 +1,3 @@
1
+ export declare class ChCard {
2
+ render(): any;
3
+ }
@@ -0,0 +1,44 @@
1
+ import { type EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class ChInput {
3
+ private readonly inputId;
4
+ /**
5
+ * Visible label rendered above the input and associated with it via
6
+ * `for`/`id`, so assistive technology announces the input's purpose.
7
+ */
8
+ label?: string;
9
+ /**
10
+ * The type of the input, mirroring the native `<input type>` attribute.
11
+ */
12
+ type: string;
13
+ /**
14
+ * The value of the input.
15
+ */
16
+ value: string;
17
+ /**
18
+ * Placeholder text shown when the input is empty.
19
+ */
20
+ placeholder?: string;
21
+ /**
22
+ * The name of the input, submitted with form data.
23
+ */
24
+ name?: string;
25
+ /**
26
+ * Whether the input is disabled.
27
+ */
28
+ disabled: boolean;
29
+ /**
30
+ * Whether the input is required.
31
+ */
32
+ required: boolean;
33
+ /**
34
+ * Emitted on every keystroke, with the current input value.
35
+ */
36
+ chInput: EventEmitter<string>;
37
+ /**
38
+ * Emitted when the input value is committed (on native `change`).
39
+ */
40
+ chChange: EventEmitter<string>;
41
+ private handleInput;
42
+ private handleChange;
43
+ render(): any;
44
+ }
@@ -0,0 +1,44 @@
1
+ import { type EventEmitter } from '../../stencil-public-runtime';
2
+ export interface ChSelectOption {
3
+ label: string;
4
+ value: string;
5
+ disabled?: boolean;
6
+ }
7
+ export declare class ChSelect {
8
+ private readonly selectId;
9
+ /**
10
+ * Visible label rendered above the select and associated with it via
11
+ * `for`/`id`, so assistive technology announces the select's purpose.
12
+ */
13
+ label?: string;
14
+ /**
15
+ * The list of options rendered inside the select.
16
+ */
17
+ options: ChSelectOption[];
18
+ /**
19
+ * The value of the selected option.
20
+ */
21
+ value?: string;
22
+ /**
23
+ * Placeholder shown as a disabled, hidden first option when no value is selected.
24
+ */
25
+ placeholder?: string;
26
+ /**
27
+ * The name of the select, submitted with form data.
28
+ */
29
+ name?: string;
30
+ /**
31
+ * Whether the select is disabled.
32
+ */
33
+ disabled: boolean;
34
+ /**
35
+ * Whether a value is required.
36
+ */
37
+ required: boolean;
38
+ /**
39
+ * Emitted when the selected option changes, with the new value.
40
+ */
41
+ chChange: EventEmitter<string>;
42
+ private handleChange;
43
+ render(): any;
44
+ }
@@ -0,0 +1,348 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { ChBadgeVariant } from "./components/ch-badge/ch-badge";
9
+ import { ChButtonVariant } from "./components/ch-button/ch-button";
10
+ import { ChSelectOption } from "./components/ch-select/ch-select";
11
+ export { ChBadgeVariant } from "./components/ch-badge/ch-badge";
12
+ export { ChButtonVariant } from "./components/ch-button/ch-button";
13
+ export { ChSelectOption } from "./components/ch-select/ch-select";
14
+ export namespace Components {
15
+ interface ChBadge {
16
+ /**
17
+ * The visual style of the badge. Either `default`, `positive`, or `warning`.
18
+ * @default 'default'
19
+ */
20
+ "variant": ChBadgeVariant;
21
+ }
22
+ interface ChButton {
23
+ /**
24
+ * Whether the button is disabled.
25
+ * @default false
26
+ */
27
+ "disabled": boolean;
28
+ /**
29
+ * Accessible label set as `aria-label` on the native `<button>`. Use it when the button's content doesn't convey its purpose on its own (e.g. an icon-only button).
30
+ */
31
+ "label"?: string;
32
+ /**
33
+ * The visual style of the button. Either `primary` or `secondary`.
34
+ * @default 'primary'
35
+ */
36
+ "variant": ChButtonVariant;
37
+ }
38
+ interface ChCard {
39
+ }
40
+ interface ChInput {
41
+ /**
42
+ * Whether the input is disabled.
43
+ * @default false
44
+ */
45
+ "disabled": boolean;
46
+ /**
47
+ * Visible label rendered above the input and associated with it via `for`/`id`, so assistive technology announces the input's purpose.
48
+ */
49
+ "label"?: string;
50
+ /**
51
+ * The name of the input, submitted with form data.
52
+ */
53
+ "name"?: string;
54
+ /**
55
+ * Placeholder text shown when the input is empty.
56
+ */
57
+ "placeholder"?: string;
58
+ /**
59
+ * Whether the input is required.
60
+ * @default false
61
+ */
62
+ "required": boolean;
63
+ /**
64
+ * The type of the input, mirroring the native `<input type>` attribute.
65
+ * @default 'text'
66
+ */
67
+ "type": string;
68
+ /**
69
+ * The value of the input.
70
+ * @default ''
71
+ */
72
+ "value": string;
73
+ }
74
+ interface ChSelect {
75
+ /**
76
+ * Whether the select is disabled.
77
+ * @default false
78
+ */
79
+ "disabled": boolean;
80
+ /**
81
+ * Visible label rendered above the select and associated with it via `for`/`id`, so assistive technology announces the select's purpose.
82
+ */
83
+ "label"?: string;
84
+ /**
85
+ * The name of the select, submitted with form data.
86
+ */
87
+ "name"?: string;
88
+ /**
89
+ * The list of options rendered inside the select.
90
+ * @default []
91
+ */
92
+ "options": ChSelectOption[];
93
+ /**
94
+ * Placeholder shown as a disabled, hidden first option when no value is selected.
95
+ */
96
+ "placeholder"?: string;
97
+ /**
98
+ * Whether a value is required.
99
+ * @default false
100
+ */
101
+ "required": boolean;
102
+ /**
103
+ * The value of the selected option.
104
+ */
105
+ "value"?: string;
106
+ }
107
+ }
108
+ export interface ChButtonCustomEvent<T> extends CustomEvent<T> {
109
+ detail: T;
110
+ target: HTMLChButtonElement;
111
+ }
112
+ export interface ChInputCustomEvent<T> extends CustomEvent<T> {
113
+ detail: T;
114
+ target: HTMLChInputElement;
115
+ }
116
+ export interface ChSelectCustomEvent<T> extends CustomEvent<T> {
117
+ detail: T;
118
+ target: HTMLChSelectElement;
119
+ }
120
+ declare global {
121
+ interface HTMLChBadgeElement extends Components.ChBadge, HTMLStencilElement {
122
+ }
123
+ var HTMLChBadgeElement: {
124
+ prototype: HTMLChBadgeElement;
125
+ new (): HTMLChBadgeElement;
126
+ };
127
+ interface HTMLChButtonElementEventMap {
128
+ "chClick": MouseEvent;
129
+ }
130
+ interface HTMLChButtonElement extends Components.ChButton, HTMLStencilElement {
131
+ addEventListener<K extends keyof HTMLChButtonElementEventMap>(type: K, listener: (this: HTMLChButtonElement, ev: ChButtonCustomEvent<HTMLChButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
132
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
133
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
134
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
135
+ removeEventListener<K extends keyof HTMLChButtonElementEventMap>(type: K, listener: (this: HTMLChButtonElement, ev: ChButtonCustomEvent<HTMLChButtonElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
136
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
137
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
138
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
139
+ }
140
+ var HTMLChButtonElement: {
141
+ prototype: HTMLChButtonElement;
142
+ new (): HTMLChButtonElement;
143
+ };
144
+ interface HTMLChCardElement extends Components.ChCard, HTMLStencilElement {
145
+ }
146
+ var HTMLChCardElement: {
147
+ prototype: HTMLChCardElement;
148
+ new (): HTMLChCardElement;
149
+ };
150
+ interface HTMLChInputElementEventMap {
151
+ "chInput": string;
152
+ "chChange": string;
153
+ }
154
+ interface HTMLChInputElement extends Components.ChInput, HTMLStencilElement {
155
+ addEventListener<K extends keyof HTMLChInputElementEventMap>(type: K, listener: (this: HTMLChInputElement, ev: ChInputCustomEvent<HTMLChInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
156
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
157
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
158
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
159
+ removeEventListener<K extends keyof HTMLChInputElementEventMap>(type: K, listener: (this: HTMLChInputElement, ev: ChInputCustomEvent<HTMLChInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
160
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
161
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
162
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
163
+ }
164
+ var HTMLChInputElement: {
165
+ prototype: HTMLChInputElement;
166
+ new (): HTMLChInputElement;
167
+ };
168
+ interface HTMLChSelectElementEventMap {
169
+ "chChange": string;
170
+ }
171
+ interface HTMLChSelectElement extends Components.ChSelect, HTMLStencilElement {
172
+ addEventListener<K extends keyof HTMLChSelectElementEventMap>(type: K, listener: (this: HTMLChSelectElement, ev: ChSelectCustomEvent<HTMLChSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
173
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
174
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
175
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
176
+ removeEventListener<K extends keyof HTMLChSelectElementEventMap>(type: K, listener: (this: HTMLChSelectElement, ev: ChSelectCustomEvent<HTMLChSelectElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
177
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
178
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
179
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
180
+ }
181
+ var HTMLChSelectElement: {
182
+ prototype: HTMLChSelectElement;
183
+ new (): HTMLChSelectElement;
184
+ };
185
+ interface HTMLElementTagNameMap {
186
+ "ch-badge": HTMLChBadgeElement;
187
+ "ch-button": HTMLChButtonElement;
188
+ "ch-card": HTMLChCardElement;
189
+ "ch-input": HTMLChInputElement;
190
+ "ch-select": HTMLChSelectElement;
191
+ }
192
+ }
193
+ declare namespace LocalJSX {
194
+ interface ChBadge {
195
+ /**
196
+ * The visual style of the badge. Either `default`, `positive`, or `warning`.
197
+ * @default 'default'
198
+ */
199
+ "variant"?: ChBadgeVariant;
200
+ }
201
+ interface ChButton {
202
+ /**
203
+ * Whether the button is disabled.
204
+ * @default false
205
+ */
206
+ "disabled"?: boolean;
207
+ /**
208
+ * Accessible label set as `aria-label` on the native `<button>`. Use it when the button's content doesn't convey its purpose on its own (e.g. an icon-only button).
209
+ */
210
+ "label"?: string;
211
+ /**
212
+ * Emitted when the button is clicked.
213
+ */
214
+ "onChClick"?: (event: ChButtonCustomEvent<MouseEvent>) => void;
215
+ /**
216
+ * The visual style of the button. Either `primary` or `secondary`.
217
+ * @default 'primary'
218
+ */
219
+ "variant"?: ChButtonVariant;
220
+ }
221
+ interface ChCard {
222
+ }
223
+ interface ChInput {
224
+ /**
225
+ * Whether the input is disabled.
226
+ * @default false
227
+ */
228
+ "disabled"?: boolean;
229
+ /**
230
+ * Visible label rendered above the input and associated with it via `for`/`id`, so assistive technology announces the input's purpose.
231
+ */
232
+ "label"?: string;
233
+ /**
234
+ * The name of the input, submitted with form data.
235
+ */
236
+ "name"?: string;
237
+ /**
238
+ * Emitted when the input value is committed (on native `change`).
239
+ */
240
+ "onChChange"?: (event: ChInputCustomEvent<string>) => void;
241
+ /**
242
+ * Emitted on every keystroke, with the current input value.
243
+ */
244
+ "onChInput"?: (event: ChInputCustomEvent<string>) => void;
245
+ /**
246
+ * Placeholder text shown when the input is empty.
247
+ */
248
+ "placeholder"?: string;
249
+ /**
250
+ * Whether the input is required.
251
+ * @default false
252
+ */
253
+ "required"?: boolean;
254
+ /**
255
+ * The type of the input, mirroring the native `<input type>` attribute.
256
+ * @default 'text'
257
+ */
258
+ "type"?: string;
259
+ /**
260
+ * The value of the input.
261
+ * @default ''
262
+ */
263
+ "value"?: string;
264
+ }
265
+ interface ChSelect {
266
+ /**
267
+ * Whether the select is disabled.
268
+ * @default false
269
+ */
270
+ "disabled"?: boolean;
271
+ /**
272
+ * Visible label rendered above the select and associated with it via `for`/`id`, so assistive technology announces the select's purpose.
273
+ */
274
+ "label"?: string;
275
+ /**
276
+ * The name of the select, submitted with form data.
277
+ */
278
+ "name"?: string;
279
+ /**
280
+ * Emitted when the selected option changes, with the new value.
281
+ */
282
+ "onChChange"?: (event: ChSelectCustomEvent<string>) => void;
283
+ /**
284
+ * The list of options rendered inside the select.
285
+ * @default []
286
+ */
287
+ "options"?: ChSelectOption[];
288
+ /**
289
+ * Placeholder shown as a disabled, hidden first option when no value is selected.
290
+ */
291
+ "placeholder"?: string;
292
+ /**
293
+ * Whether a value is required.
294
+ * @default false
295
+ */
296
+ "required"?: boolean;
297
+ /**
298
+ * The value of the selected option.
299
+ */
300
+ "value"?: string;
301
+ }
302
+
303
+ interface ChBadgeAttributes {
304
+ "variant": ChBadgeVariant;
305
+ }
306
+ interface ChButtonAttributes {
307
+ "variant": ChButtonVariant;
308
+ "disabled": boolean;
309
+ "label": string;
310
+ }
311
+ interface ChInputAttributes {
312
+ "label": string;
313
+ "type": string;
314
+ "value": string;
315
+ "placeholder": string;
316
+ "name": string;
317
+ "disabled": boolean;
318
+ "required": boolean;
319
+ }
320
+ interface ChSelectAttributes {
321
+ "label": string;
322
+ "value": string;
323
+ "placeholder": string;
324
+ "name": string;
325
+ "disabled": boolean;
326
+ "required": boolean;
327
+ }
328
+
329
+ interface IntrinsicElements {
330
+ "ch-badge": Omit<ChBadge, keyof ChBadgeAttributes> & { [K in keyof ChBadge & keyof ChBadgeAttributes]?: ChBadge[K] } & { [K in keyof ChBadge & keyof ChBadgeAttributes as `attr:${K}`]?: ChBadgeAttributes[K] } & { [K in keyof ChBadge & keyof ChBadgeAttributes as `prop:${K}`]?: ChBadge[K] };
331
+ "ch-button": Omit<ChButton, keyof ChButtonAttributes> & { [K in keyof ChButton & keyof ChButtonAttributes]?: ChButton[K] } & { [K in keyof ChButton & keyof ChButtonAttributes as `attr:${K}`]?: ChButtonAttributes[K] } & { [K in keyof ChButton & keyof ChButtonAttributes as `prop:${K}`]?: ChButton[K] };
332
+ "ch-card": ChCard;
333
+ "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] };
334
+ "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] };
335
+ }
336
+ }
337
+ export { LocalJSX as JSX };
338
+ declare module "@stencil/core" {
339
+ export namespace JSX {
340
+ interface IntrinsicElements {
341
+ "ch-badge": LocalJSX.IntrinsicElements["ch-badge"] & JSXBase.HTMLAttributes<HTMLChBadgeElement>;
342
+ "ch-button": LocalJSX.IntrinsicElements["ch-button"] & JSXBase.HTMLAttributes<HTMLChButtonElement>;
343
+ "ch-card": LocalJSX.IntrinsicElements["ch-card"] & JSXBase.HTMLAttributes<HTMLChCardElement>;
344
+ "ch-input": LocalJSX.IntrinsicElements["ch-input"] & JSXBase.HTMLAttributes<HTMLChInputElement>;
345
+ "ch-select": LocalJSX.IntrinsicElements["ch-select"] & JSXBase.HTMLAttributes<HTMLChSelectElement>;
346
+ }
347
+ }
348
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @fileoverview entry point for your component library
3
+ *
4
+ * This is the entry point for your component library. Use this file to export utilities,
5
+ * constants or data structure that accompany your components.
6
+ *
7
+ * DO NOT use this file to export your components. Instead, use the recommended approaches
8
+ * to consume components of this package as outlined in the `README.md`.
9
+ */
10
+ export * from './tokens/tokens';
11
+ export type * from './tokens/types';
12
+ export type * from './components.d.ts';