@devschile/chucao 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/chucao.esm.js.map +1 -1
- package/dist/chucao/index.esm.js +1 -1
- package/dist/chucao/index.esm.js.map +1 -1
- package/dist/chucao/p-0305f2eb.entry.js +2 -0
- package/dist/chucao/{p-af2c57b5.entry.js.map → p-0305f2eb.entry.js.map} +1 -1
- package/dist/chucao/{p-dde82d7d.entry.js → p-053d58a4.entry.js} +2 -2
- package/dist/chucao/{p-fcc70c8d.entry.js → p-20492b73.entry.js} +2 -2
- package/dist/chucao/p-488c7838.entry.js +2 -0
- package/dist/chucao/{p-175aee94.entry.js → p-9a614e82.entry.js} +2 -2
- package/dist/chucao/{p-d75eeeea.entry.js → p-ad3206a2.entry.js} +2 -2
- package/dist/chucao/p-c598f978.entry.js +2 -0
- package/dist/chucao/p-c598f978.entry.js.map +1 -0
- package/dist/chucao/{p-85a49fd7.entry.js → p-fe8e9537.entry.js} +2 -2
- package/dist/chucao/p-pfWAsOzE.js +3 -0
- package/dist/chucao/p-pfWAsOzE.js.map +1 -0
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/{ch-badge_6.cjs.entry.js → ch-alert_8.cjs.entry.js} +73 -9
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-radio.cjs.entry.js +2 -2
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/chucao.cjs.js +3 -3
- package/dist/cjs/chucao.cjs.js.map +1 -1
- package/dist/cjs/{index-CiYvuUBV.js → index-ls4U227d.js} +38 -9
- package/dist/cjs/index-ls4U227d.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ch-alert/ch-alert.css +77 -0
- package/dist/collection/components/ch-alert/ch-alert.js +118 -0
- package/dist/collection/components/ch-alert/ch-alert.js.map +1 -0
- package/dist/collection/components/ch-badge/ch-badge.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js.map +1 -1
- package/dist/collection/components/ch-card/ch-card.js +1 -1
- package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
- package/dist/collection/components/ch-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.css +39 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js +90 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js.map +1 -0
- package/dist/collection/components/ch-switch/ch-switch.js +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
- package/dist/collection/tokens/tokens.js +5 -1
- package/dist/collection/tokens/tokens.js.map +1 -1
- package/dist/collection/tokens/types.js.map +1 -1
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.d.ts +11 -0
- package/dist/components/ch-alert.js +2 -0
- package/dist/components/ch-alert.js.map +1 -0
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-button.js.map +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-card.js.map +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-spinner.d.ts +11 -0
- package/dist/components/ch-spinner.js +2 -0
- package/dist/components/ch-spinner.js.map +1 -0
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-ONE3uKkF.js +2 -0
- package/dist/components/p-ONE3uKkF.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/{ch-badge_6.entry.js → ch-alert_8.entry.js} +72 -10
- package/dist/esm/ch-alert_8.entry.js.map +1 -0
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-radio.entry.js +2 -2
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/chucao.js +4 -4
- package/dist/esm/chucao.js.map +1 -1
- package/dist/esm/{index-ImsAHlk9.js → index-pfWAsOzE.js} +38 -9
- package/dist/esm/index-pfWAsOzE.js.map +1 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-alert/ch-alert.d.ts +34 -0
- package/dist/types/components/ch-spinner/ch-spinner.d.ts +25 -0
- package/dist/types/components.d.ts +153 -0
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/dist/types/tokens/tokens.d.ts +4 -0
- package/dist/types/tokens/types.d.ts +2 -2
- package/dist-react/components.d.ts +9 -1
- package/dist-react/components.js +18 -0
- package/dist-react/components.ts +25 -1
- package/dist-vue/index.d.ts +2 -0
- package/dist-vue/index.js +13 -0
- package/dist-vue/index.ts +17 -0
- package/hydrate/index.js +138 -16
- package/hydrate/index.mjs +138 -16
- package/package.json +6 -2
- package/dist/chucao/p-ImsAHlk9.js +0 -3
- package/dist/chucao/p-ImsAHlk9.js.map +0 -1
- package/dist/chucao/p-af2c57b5.entry.js +0 -2
- package/dist/chucao/p-b4520f1c.entry.js +0 -2
- package/dist/chucao/p-b4520f1c.entry.js.map +0 -1
- package/dist/chucao/p-fe0c9320.entry.js +0 -2
- package/dist/cjs/ch-badge_6.cjs.entry.js.map +0 -1
- package/dist/cjs/index-CiYvuUBV.js.map +0 -1
- package/dist/components/p-x4aZoujY.js +0 -2
- package/dist/components/p-x4aZoujY.js.map +0 -1
- package/dist/esm/ch-badge_6.entry.js.map +0 -1
- package/dist/esm/index-ImsAHlk9.js.map +0 -1
- /package/dist/chucao/{p-dde82d7d.entry.js.map → p-053d58a4.entry.js.map} +0 -0
- /package/dist/chucao/{p-fcc70c8d.entry.js.map → p-20492b73.entry.js.map} +0 -0
- /package/dist/chucao/{p-fe0c9320.entry.js.map → p-488c7838.entry.js.map} +0 -0
- /package/dist/chucao/{p-175aee94.entry.js.map → p-9a614e82.entry.js.map} +0 -0
- /package/dist/chucao/{p-d75eeeea.entry.js.map → p-ad3206a2.entry.js.map} +0 -0
- /package/dist/chucao/{p-85a49fd7.entry.js.map → p-fe8e9537.entry.js.map} +0 -0
package/dist-react/components.ts
CHANGED
|
@@ -11,9 +11,10 @@ import type { EventName, StencilReactComponent } from '@stencil/react-output-tar
|
|
|
11
11
|
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
|
|
14
|
-
import { type ChAccordionCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
14
|
+
import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
|
|
15
15
|
import type { Components } from "@devschile/chucao/dist/components";
|
|
16
16
|
import { ChAccordion as ChAccordionElement, defineCustomElement as defineChAccordion } from "@devschile/chucao/dist/components/ch-accordion.js";
|
|
17
|
+
import { ChAlert as ChAlertElement, defineCustomElement as defineChAlert } from "@devschile/chucao/dist/components/ch-alert.js";
|
|
17
18
|
import { ChBadge as ChBadgeElement, defineCustomElement as defineChBadge } from "@devschile/chucao/dist/components/ch-badge.js";
|
|
18
19
|
import { ChButton as ChButtonElement, defineCustomElement as defineChButton } from "@devschile/chucao/dist/components/ch-button.js";
|
|
19
20
|
import { ChCard as ChCardElement, defineCustomElement as defineChCard } from "@devschile/chucao/dist/components/ch-card.js";
|
|
@@ -23,6 +24,7 @@ import { ChInput as ChInputElement, defineCustomElement as defineChInput } from
|
|
|
23
24
|
import { ChLink as ChLinkElement, defineCustomElement as defineChLink } from "@devschile/chucao/dist/components/ch-link.js";
|
|
24
25
|
import { ChRadio as ChRadioElement, defineCustomElement as defineChRadio } from "@devschile/chucao/dist/components/ch-radio.js";
|
|
25
26
|
import { ChSelect as ChSelectElement, defineCustomElement as defineChSelect } from "@devschile/chucao/dist/components/ch-select.js";
|
|
27
|
+
import { ChSpinner as ChSpinnerElement, defineCustomElement as defineChSpinner } from "@devschile/chucao/dist/components/ch-spinner.js";
|
|
26
28
|
import { ChSwitch as ChSwitchElement, defineCustomElement as defineChSwitch } from "@devschile/chucao/dist/components/ch-switch.js";
|
|
27
29
|
import { ChTabs as ChTabsElement, defineCustomElement as defineChTabs } from "@devschile/chucao/dist/components/ch-tabs.js";
|
|
28
30
|
import { ChTextarea as ChTextareaElement, defineCustomElement as defineChTextarea } from "@devschile/chucao/dist/components/ch-textarea.js";
|
|
@@ -38,6 +40,17 @@ export const ChAccordion: StencilReactComponent<ChAccordionElement, ChAccordionE
|
|
|
38
40
|
defineCustomElement: defineChAccordion
|
|
39
41
|
});
|
|
40
42
|
|
|
43
|
+
export type ChAlertEvents = { onChDismiss: EventName<ChAlertCustomEvent<void>> };
|
|
44
|
+
|
|
45
|
+
export const ChAlert: StencilReactComponent<ChAlertElement, ChAlertEvents, Components.ChAlert> = /*@__PURE__*/ createComponent<ChAlertElement, ChAlertEvents, Components.ChAlert>({
|
|
46
|
+
tagName: 'ch-alert',
|
|
47
|
+
elementClass: ChAlertElement,
|
|
48
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
49
|
+
react: React,
|
|
50
|
+
events: { onChDismiss: 'chDismiss' } as ChAlertEvents,
|
|
51
|
+
defineCustomElement: defineChAlert
|
|
52
|
+
});
|
|
53
|
+
|
|
41
54
|
export type ChBadgeEvents = NonNullable<unknown>;
|
|
42
55
|
|
|
43
56
|
export const ChBadge: StencilReactComponent<ChBadgeElement, ChBadgeEvents, Components.ChBadge> = /*@__PURE__*/ createComponent<ChBadgeElement, ChBadgeEvents, Components.ChBadge>({
|
|
@@ -143,6 +156,17 @@ export const ChSelect: StencilReactComponent<ChSelectElement, ChSelectEvents, Co
|
|
|
143
156
|
defineCustomElement: defineChSelect
|
|
144
157
|
});
|
|
145
158
|
|
|
159
|
+
export type ChSpinnerEvents = NonNullable<unknown>;
|
|
160
|
+
|
|
161
|
+
export const ChSpinner: StencilReactComponent<ChSpinnerElement, ChSpinnerEvents, Components.ChSpinner> = /*@__PURE__*/ createComponent<ChSpinnerElement, ChSpinnerEvents, Components.ChSpinner>({
|
|
162
|
+
tagName: 'ch-spinner',
|
|
163
|
+
elementClass: ChSpinnerElement,
|
|
164
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
165
|
+
react: React,
|
|
166
|
+
events: {} as ChSpinnerEvents,
|
|
167
|
+
defineCustomElement: defineChSpinner
|
|
168
|
+
});
|
|
169
|
+
|
|
146
170
|
export type ChSwitchEvents = { onChChange: EventName<ChSwitchCustomEvent<boolean>> };
|
|
147
171
|
|
|
148
172
|
export const ChSwitch: StencilReactComponent<ChSwitchElement, ChSwitchEvents, Components.ChSwitch> = /*@__PURE__*/ createComponent<ChSwitchElement, ChSwitchEvents, Components.ChSwitch>({
|
package/dist-vue/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type StencilVueComponent } from '@stencil/vue-output-target/runtime';
|
|
2
2
|
import type { JSX } from '@devschile/chucao/dist/components';
|
|
3
3
|
export declare const ChAccordion: StencilVueComponent<JSX.ChAccordion>;
|
|
4
|
+
export declare const ChAlert: StencilVueComponent<JSX.ChAlert>;
|
|
4
5
|
export declare const ChBadge: StencilVueComponent<JSX.ChBadge>;
|
|
5
6
|
export declare const ChButton: StencilVueComponent<JSX.ChButton>;
|
|
6
7
|
export declare const ChCard: StencilVueComponent<JSX.ChCard>;
|
|
@@ -10,6 +11,7 @@ export declare const ChInput: StencilVueComponent<JSX.ChInput>;
|
|
|
10
11
|
export declare const ChLink: StencilVueComponent<JSX.ChLink>;
|
|
11
12
|
export declare const ChRadio: StencilVueComponent<JSX.ChRadio>;
|
|
12
13
|
export declare const ChSelect: StencilVueComponent<JSX.ChSelect>;
|
|
14
|
+
export declare const ChSpinner: StencilVueComponent<JSX.ChSpinner>;
|
|
13
15
|
export declare const ChSwitch: StencilVueComponent<JSX.ChSwitch>;
|
|
14
16
|
export declare const ChTabs: StencilVueComponent<JSX.ChTabs>;
|
|
15
17
|
export declare const ChTextarea: StencilVueComponent<JSX.ChTextarea>;
|
package/dist-vue/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/* auto-generated vue proxies */
|
|
4
4
|
import { defineContainer } from '@stencil/vue-output-target/runtime';
|
|
5
5
|
import { defineCustomElement as defineChAccordion } from '@devschile/chucao/dist/components/ch-accordion.js';
|
|
6
|
+
import { defineCustomElement as defineChAlert } from '@devschile/chucao/dist/components/ch-alert.js';
|
|
6
7
|
import { defineCustomElement as defineChBadge } from '@devschile/chucao/dist/components/ch-badge.js';
|
|
7
8
|
import { defineCustomElement as defineChButton } from '@devschile/chucao/dist/components/ch-button.js';
|
|
8
9
|
import { defineCustomElement as defineChCard } from '@devschile/chucao/dist/components/ch-card.js';
|
|
@@ -12,6 +13,7 @@ import { defineCustomElement as defineChInput } from '@devschile/chucao/dist/com
|
|
|
12
13
|
import { defineCustomElement as defineChLink } from '@devschile/chucao/dist/components/ch-link.js';
|
|
13
14
|
import { defineCustomElement as defineChRadio } from '@devschile/chucao/dist/components/ch-radio.js';
|
|
14
15
|
import { defineCustomElement as defineChSelect } from '@devschile/chucao/dist/components/ch-select.js';
|
|
16
|
+
import { defineCustomElement as defineChSpinner } from '@devschile/chucao/dist/components/ch-spinner.js';
|
|
15
17
|
import { defineCustomElement as defineChSwitch } from '@devschile/chucao/dist/components/ch-switch.js';
|
|
16
18
|
import { defineCustomElement as defineChTabs } from '@devschile/chucao/dist/components/ch-tabs.js';
|
|
17
19
|
import { defineCustomElement as defineChTextarea } from '@devschile/chucao/dist/components/ch-textarea.js';
|
|
@@ -22,6 +24,13 @@ export const ChAccordion = /*@__PURE__*/ defineContainer('ch-accordion', defineC
|
|
|
22
24
|
], [
|
|
23
25
|
'chChange'
|
|
24
26
|
]);
|
|
27
|
+
export const ChAlert = /*@__PURE__*/ defineContainer('ch-alert', defineChAlert, [
|
|
28
|
+
'variant',
|
|
29
|
+
'dismissLabel',
|
|
30
|
+
'chDismiss'
|
|
31
|
+
], [
|
|
32
|
+
'chDismiss'
|
|
33
|
+
]);
|
|
25
34
|
export const ChBadge = /*@__PURE__*/ defineContainer('ch-badge', defineChBadge, [
|
|
26
35
|
'variant'
|
|
27
36
|
]);
|
|
@@ -106,6 +115,10 @@ export const ChSelect = /*@__PURE__*/ defineContainer('ch-select', defineChSelec
|
|
|
106
115
|
], [
|
|
107
116
|
'chChange'
|
|
108
117
|
]);
|
|
118
|
+
export const ChSpinner = /*@__PURE__*/ defineContainer('ch-spinner', defineChSpinner, [
|
|
119
|
+
'size',
|
|
120
|
+
'label'
|
|
121
|
+
]);
|
|
109
122
|
export const ChSwitch = /*@__PURE__*/ defineContainer('ch-switch', defineChSwitch, [
|
|
110
123
|
'label',
|
|
111
124
|
'name',
|
package/dist-vue/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { defineContainer, type StencilVueComponent } from '@stencil/vue-output-t
|
|
|
6
6
|
import type { JSX } from '@devschile/chucao/dist/components';
|
|
7
7
|
|
|
8
8
|
import { defineCustomElement as defineChAccordion } from '@devschile/chucao/dist/components/ch-accordion.js';
|
|
9
|
+
import { defineCustomElement as defineChAlert } from '@devschile/chucao/dist/components/ch-alert.js';
|
|
9
10
|
import { defineCustomElement as defineChBadge } from '@devschile/chucao/dist/components/ch-badge.js';
|
|
10
11
|
import { defineCustomElement as defineChButton } from '@devschile/chucao/dist/components/ch-button.js';
|
|
11
12
|
import { defineCustomElement as defineChCard } from '@devschile/chucao/dist/components/ch-card.js';
|
|
@@ -15,6 +16,7 @@ import { defineCustomElement as defineChInput } from '@devschile/chucao/dist/com
|
|
|
15
16
|
import { defineCustomElement as defineChLink } from '@devschile/chucao/dist/components/ch-link.js';
|
|
16
17
|
import { defineCustomElement as defineChRadio } from '@devschile/chucao/dist/components/ch-radio.js';
|
|
17
18
|
import { defineCustomElement as defineChSelect } from '@devschile/chucao/dist/components/ch-select.js';
|
|
19
|
+
import { defineCustomElement as defineChSpinner } from '@devschile/chucao/dist/components/ch-spinner.js';
|
|
18
20
|
import { defineCustomElement as defineChSwitch } from '@devschile/chucao/dist/components/ch-switch.js';
|
|
19
21
|
import { defineCustomElement as defineChTabs } from '@devschile/chucao/dist/components/ch-tabs.js';
|
|
20
22
|
import { defineCustomElement as defineChTextarea } from '@devschile/chucao/dist/components/ch-textarea.js';
|
|
@@ -30,6 +32,15 @@ export const ChAccordion: StencilVueComponent<JSX.ChAccordion> = /*@__PURE__*/ d
|
|
|
30
32
|
]);
|
|
31
33
|
|
|
32
34
|
|
|
35
|
+
export const ChAlert: StencilVueComponent<JSX.ChAlert> = /*@__PURE__*/ defineContainer<JSX.ChAlert>('ch-alert', defineChAlert, [
|
|
36
|
+
'variant',
|
|
37
|
+
'dismissLabel',
|
|
38
|
+
'chDismiss'
|
|
39
|
+
], [
|
|
40
|
+
'chDismiss'
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
|
|
33
44
|
export const ChBadge: StencilVueComponent<JSX.ChBadge> = /*@__PURE__*/ defineContainer<JSX.ChBadge>('ch-badge', defineChBadge, [
|
|
34
45
|
'variant'
|
|
35
46
|
]);
|
|
@@ -132,6 +143,12 @@ export const ChSelect: StencilVueComponent<JSX.ChSelect> = /*@__PURE__*/ defineC
|
|
|
132
143
|
]);
|
|
133
144
|
|
|
134
145
|
|
|
146
|
+
export const ChSpinner: StencilVueComponent<JSX.ChSpinner> = /*@__PURE__*/ defineContainer<JSX.ChSpinner>('ch-spinner', defineChSpinner, [
|
|
147
|
+
'size',
|
|
148
|
+
'label'
|
|
149
|
+
]);
|
|
150
|
+
|
|
151
|
+
|
|
135
152
|
export const ChSwitch: StencilVueComponent<JSX.ChSwitch> = /*@__PURE__*/ defineContainer<JSX.ChSwitch>('ch-switch', defineChSwitch, [
|
|
136
153
|
'label',
|
|
137
154
|
'name',
|
package/hydrate/index.js
CHANGED
|
@@ -135,7 +135,7 @@ const NAMESPACE = 'chucao';
|
|
|
135
135
|
const BUILD = /* chucao */ { hotModuleReplacement: false, prop: true, propChangeCallback: false, slotRelocation: true, updatable: true};
|
|
136
136
|
|
|
137
137
|
/*
|
|
138
|
-
Stencil Hydrate Platform v4.
|
|
138
|
+
Stencil Hydrate Platform v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
139
139
|
*/
|
|
140
140
|
var __create = Object.create;
|
|
141
141
|
var __defProp = Object.defineProperty;
|
|
@@ -465,6 +465,8 @@ var DEFAULT_DOC_DATA = {
|
|
|
465
465
|
staticComponents: /* @__PURE__ */ new Set()
|
|
466
466
|
};
|
|
467
467
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
468
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
469
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
468
470
|
|
|
469
471
|
// src/utils/style.ts
|
|
470
472
|
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
@@ -525,7 +527,7 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
525
527
|
slottedNodes.push(childNode);
|
|
526
528
|
if (typeof slotName !== "undefined") return slottedNodes;
|
|
527
529
|
}
|
|
528
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode
|
|
530
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
|
|
529
531
|
}
|
|
530
532
|
return slottedNodes;
|
|
531
533
|
}
|
|
@@ -767,6 +769,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
767
769
|
} else if (child != null && typeof child !== "boolean") {
|
|
768
770
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
769
771
|
child = String(child);
|
|
772
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
773
|
+
{
|
|
774
|
+
consoleError("Invalid vNode child");
|
|
775
|
+
}
|
|
776
|
+
continue;
|
|
770
777
|
}
|
|
771
778
|
if (simple && lastSimple) {
|
|
772
779
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -2278,7 +2285,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2278
2285
|
const slotName = childNode["s-sn"];
|
|
2279
2286
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2280
2287
|
node = hostContentNodes[j];
|
|
2281
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] &&
|
|
2288
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
|
|
2289
|
+
// `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
|
|
2290
|
+
// would trivially "match" on every re-render and force pointless re-insertion.
|
|
2291
|
+
(!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
|
|
2282
2292
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2283
2293
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2284
2294
|
checkSlotFallbackVisibility = true;
|
|
@@ -2790,10 +2800,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2790
2800
|
|
|
2791
2801
|
// src/runtime/initialize-component.ts
|
|
2792
2802
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
2803
|
+
var _a2;
|
|
2793
2804
|
let Cstr;
|
|
2794
2805
|
try {
|
|
2795
2806
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
2796
2807
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
2808
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
2797
2809
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
2798
2810
|
if (bundleId) {
|
|
2799
2811
|
const CstrImport = loadModule(cmpMeta);
|
|
@@ -2805,6 +2817,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2805
2817
|
Cstr = CstrImport;
|
|
2806
2818
|
}
|
|
2807
2819
|
if (!Cstr) {
|
|
2820
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
2821
|
+
hostRef.$loadRetryCount$ = ((_a2 = hostRef.$loadRetryCount$) != null ? _a2 : 0) + 1;
|
|
2822
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
2823
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
2824
|
+
}
|
|
2808
2825
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
2809
2826
|
}
|
|
2810
2827
|
if (!Cstr.isProxied) {
|
|
@@ -2868,7 +2885,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2868
2885
|
hostRef.$onRenderResolve$();
|
|
2869
2886
|
hostRef.$onRenderResolve$ = void 0;
|
|
2870
2887
|
}
|
|
2871
|
-
if (hostRef.$onReadyResolve$) {
|
|
2888
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
2872
2889
|
hostRef.$onReadyResolve$(elm);
|
|
2873
2890
|
}
|
|
2874
2891
|
}
|
|
@@ -2923,6 +2940,8 @@ var connectedCallback = (elm) => {
|
|
|
2923
2940
|
} else {
|
|
2924
2941
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2925
2942
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2943
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
2944
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
2926
2945
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
2927
2946
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
2928
2947
|
}
|
|
@@ -5239,6 +5258,62 @@ class ChAccordion {
|
|
|
5239
5258
|
}; }
|
|
5240
5259
|
}
|
|
5241
5260
|
|
|
5261
|
+
const chAlertCss = () => `:host{display:block}.alert{display:flex;align-items:flex-start;gap:var(--spacing-2xl);padding:var(--spacing-2xl) var(--spacing-3xl);border:var(--border-width) solid transparent;border-radius:var(--radius);font-size:var(--typography-size-sm);line-height:1.5}.alert-content{flex:1;min-width:0;overflow-wrap:anywhere}.alert--default{color:var(--text);background:var(--surface);border-color:var(--border)}.alert--positive{color:var(--color-status-positive);background:var(--color-status-positive-background);border-color:var(--color-status-positive)}.alert--warning{color:var(--color-status-warning);background:var(--color-status-warning-background);border-color:var(--color-status-warning)}.alert-dismiss{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:inherit;cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.alert-dismiss:hover{background:var(--surface-hover)}.alert-dismiss:focus-visible{outline:var(--focus-outline-width) solid currentColor;outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.alert-dismiss{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.alert-dismiss{transition:none}}`;
|
|
5262
|
+
|
|
5263
|
+
/**
|
|
5264
|
+
* Block-level status message.
|
|
5265
|
+
*
|
|
5266
|
+
* `warning` carries `role="alert"` and is announced assertively; `default` and
|
|
5267
|
+
* `positive` use `role="status"`, since a confirmation is not urgent enough to
|
|
5268
|
+
* interrupt. Both announce reliably when the alert is added to the page in
|
|
5269
|
+
* response to something — an alert already present at load may not be read out,
|
|
5270
|
+
* which is how live regions work rather than something this component controls.
|
|
5271
|
+
*/
|
|
5272
|
+
class ChAlert {
|
|
5273
|
+
constructor(hostRef) {
|
|
5274
|
+
registerInstance(this, hostRef);
|
|
5275
|
+
this.chDismiss = createEvent(this, "chDismiss");
|
|
5276
|
+
}
|
|
5277
|
+
/**
|
|
5278
|
+
* The kind of message. `default` is neutral, `positive` confirms, and
|
|
5279
|
+
* `warning` covers both warnings and errors — the token scale has a single
|
|
5280
|
+
* status colour for the two of them.
|
|
5281
|
+
*/
|
|
5282
|
+
variant = 'default';
|
|
5283
|
+
/**
|
|
5284
|
+
* Accessible label for the dismiss button, set as `aria-label`. Setting it
|
|
5285
|
+
* is what adds the button: the button's only content is a decorative glyph,
|
|
5286
|
+
* so without a label it would have no accessible name at all.
|
|
5287
|
+
*/
|
|
5288
|
+
dismissLabel;
|
|
5289
|
+
/**
|
|
5290
|
+
* Emitted when the dismiss button is clicked. The alert stays in the DOM —
|
|
5291
|
+
* whether to remove it is the consumer's decision. If you do remove it, move
|
|
5292
|
+
* focus somewhere sensible first: removing the focused button drops focus to
|
|
5293
|
+
* `<body>`.
|
|
5294
|
+
*/
|
|
5295
|
+
chDismiss;
|
|
5296
|
+
handleDismiss = () => {
|
|
5297
|
+
this.chDismiss.emit();
|
|
5298
|
+
};
|
|
5299
|
+
render() {
|
|
5300
|
+
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
5301
|
+
return (hAsync(Host, { key: '7d96602ad2c2b3824588f01d5b94d73098da6ce4' }, hAsync("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, hAsync("div", { key: '64d7af5aad0e4b103b35cc2ba3756b1a1601b148', class: "alert-content" }, hAsync("slot", { key: '44573092407161bbeafe5117bddb54168b183d90' })), this.dismissLabel && (hAsync("button", { key: '018858ac292c0fb7f26c788f629638f533d0dfd6', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, hAsync("span", { key: 'f6454d5285ed9c7c414d839d2d35d2ce0c271dd4', "aria-hidden": "true" }, "\u00D7"))))));
|
|
5302
|
+
}
|
|
5303
|
+
static get style() { return chAlertCss(); }
|
|
5304
|
+
static get cmpMeta() { return {
|
|
5305
|
+
"$flags$": 777,
|
|
5306
|
+
"$tagName$": "ch-alert",
|
|
5307
|
+
"$members$": {
|
|
5308
|
+
"variant": [1],
|
|
5309
|
+
"dismissLabel": [1, "dismiss-label"]
|
|
5310
|
+
},
|
|
5311
|
+
"$listeners$": undefined,
|
|
5312
|
+
"$lazyBundleId$": "-",
|
|
5313
|
+
"$attrsToReflect$": []
|
|
5314
|
+
}; }
|
|
5315
|
+
}
|
|
5316
|
+
|
|
5242
5317
|
const chBadgeCss = () => `:host{display:inline-block}.badge{display:inline-block;padding:var(--spacing-2xs) var(--spacing-lg);border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge--default{background:var(--color-surface-hover);color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning)}`;
|
|
5243
5318
|
|
|
5244
5319
|
class ChBadge {
|
|
@@ -5250,7 +5325,7 @@ class ChBadge {
|
|
|
5250
5325
|
*/
|
|
5251
5326
|
variant = 'default';
|
|
5252
5327
|
render() {
|
|
5253
|
-
return (hAsync(Host, { key: '
|
|
5328
|
+
return (hAsync(Host, { key: 'ca1fb0c9d678b6ea5b68ca131ba153116bbd577d' }, hAsync("span", { key: '929e2268094bdad7df6e3c8371896e364ebf79c3', class: { badge: true, [`badge--${this.variant}`]: true } }, hAsync("slot", { key: '64422988ad046244722755d39e564295f79a6ce1' }))));
|
|
5254
5329
|
}
|
|
5255
5330
|
static get style() { return chBadgeCss(); }
|
|
5256
5331
|
static get cmpMeta() { return {
|
|
@@ -5294,7 +5369,7 @@ class ChButton {
|
|
|
5294
5369
|
this.chClick.emit(ev);
|
|
5295
5370
|
};
|
|
5296
5371
|
render() {
|
|
5297
|
-
return (hAsync(Host, { key: '
|
|
5372
|
+
return (hAsync(Host, { key: '9363b49e8d38c0fab49ed10356380ded20a8cf5e' }, hAsync("button", { key: '3c98506ae1418c4bc88f5aa72dfe058948556ed5', class: { btn: true, [`btn--${this.variant}`]: true }, type: "button", disabled: this.disabled, "aria-label": this.label, onClick: this.handleClick }, hAsync("slot", { key: 'cdcf4f656b995fa527d4139a41b2ea3c7086e065' }))));
|
|
5298
5373
|
}
|
|
5299
5374
|
static get style() { return chButtonCss(); }
|
|
5300
5375
|
static get cmpMeta() { return {
|
|
@@ -5318,7 +5393,7 @@ class ChCard {
|
|
|
5318
5393
|
registerInstance(this, hostRef);
|
|
5319
5394
|
}
|
|
5320
5395
|
render() {
|
|
5321
|
-
return (hAsync(Host, { key: '
|
|
5396
|
+
return (hAsync(Host, { key: 'de99971fb6a845e8ca6c406d669abd64f7e45068' }, hAsync("div", { key: '6dcae41e636af83221f710212ed1ec16a21dcdde', class: "card" }, hAsync("slot", { key: 'b2a1354d297ce45c97f0ed4378f5710b4b0ac13d' }))));
|
|
5322
5397
|
}
|
|
5323
5398
|
static get style() { return chCardCss(); }
|
|
5324
5399
|
static get cmpMeta() { return {
|
|
@@ -5398,7 +5473,7 @@ class ChCheckbox {
|
|
|
5398
5473
|
return undefined;
|
|
5399
5474
|
}
|
|
5400
5475
|
render() {
|
|
5401
|
-
return (hAsync(Host, { key: '
|
|
5476
|
+
return (hAsync(Host, { key: '4675fecfe18e63c55133ffb78e6a6c0548804e1b' }, hAsync("label", { key: '334ddbcfd3ef1640d84dc751a127a3fb6d69e722', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.checkboxId }, hAsync("input", { key: 'a251b722681f33d3c96ce04a0ce915b6be71a81c', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && hAsync("span", { key: '2aa179c9467a1b22e7c37b16da44e677cc10bd69', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'd31d7b78cc4912b4441b0ab17eb44ed22ef67e6e', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'ae43049c16c7c61322785863d0c6e2e90e79d954', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5402
5477
|
}
|
|
5403
5478
|
static get style() { return chCheckboxCss(); }
|
|
5404
5479
|
static get cmpMeta() { return {
|
|
@@ -5432,7 +5507,7 @@ class ChDivider {
|
|
|
5432
5507
|
*/
|
|
5433
5508
|
orientation = 'horizontal';
|
|
5434
5509
|
render() {
|
|
5435
|
-
return (hAsync(Host, { key: '
|
|
5510
|
+
return (hAsync(Host, { key: '888debaaee690d5bbc5e276773f16ac7ead0129a', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: 'ae175f047605cfbe2b24d50e0dab56ac362c49a1', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
5436
5511
|
}
|
|
5437
5512
|
static get style() { return chDividerCss(); }
|
|
5438
5513
|
static get cmpMeta() { return {
|
|
@@ -5527,7 +5602,7 @@ class ChInput {
|
|
|
5527
5602
|
return undefined;
|
|
5528
5603
|
}
|
|
5529
5604
|
render() {
|
|
5530
|
-
return (hAsync(Host, { key: '
|
|
5605
|
+
return (hAsync(Host, { key: '5587a60f279a66d0610ab0dd5f9e64510fe47313' }, this.label && (hAsync("label", { key: 'cc4d3718b5eba3f87dd91be2be2d8bfcccbad7db', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'a40ed7693272f9bdbcec81afa3f6f81ea6aa3dac', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'b574a65d362071b4528f87013a5349f63f0b1768', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '061d995029cd884daa9f7c228ade06036369bb24', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5531
5606
|
}
|
|
5532
5607
|
static get style() { return chInputCss(); }
|
|
5533
5608
|
static get cmpMeta() { return {
|
|
@@ -5675,7 +5750,7 @@ class ChRadio {
|
|
|
5675
5750
|
}
|
|
5676
5751
|
render() {
|
|
5677
5752
|
const groupName = this.name || `${this.groupId}-group`;
|
|
5678
|
-
return (hAsync(Host, { key: '
|
|
5753
|
+
return (hAsync(Host, { key: '68ce563b4a03669b76ff3822705b1ff92c4c02f2' }, this.label && (hAsync("span", { key: '1887f5b70a5bf9f049495d76588458181d3f7735', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'c38ee340f9527e16c5587f2309f91ea463bb7cad', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || option.disabled } }, hAsync("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'ad60ce772279809ee334fc30182be1d0350d5586', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '316c911f9e1a29d17cc2d6b0e60ed35755420ae2', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5679
5754
|
}
|
|
5680
5755
|
static get style() { return chRadioCss(); }
|
|
5681
5756
|
static get cmpMeta() { return {
|
|
@@ -5769,7 +5844,7 @@ class ChSelect {
|
|
|
5769
5844
|
return undefined;
|
|
5770
5845
|
}
|
|
5771
5846
|
render() {
|
|
5772
|
-
return (hAsync(Host, { key: '
|
|
5847
|
+
return (hAsync(Host, { key: '90aaf1fa70da54071539de8a22ebe9373f2ae90a' }, this.label && (hAsync("label", { key: '8b14b4deb611c4f1eb496c6f0d3fa58b7c4342b6', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'c93b4ba079e9e61ef5bb2392256545af73263665', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (hAsync("option", { key: 'df8e97bdb0bd3e5426558027d34c1eb63ee76f1e', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '6b6078e31a1a2f183951f5ada63a5e7e7f582f96', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'f7791b37b8660441a43a6b45d99472b2df7df0ab', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5773
5848
|
}
|
|
5774
5849
|
static get style() { return chSelectCss(); }
|
|
5775
5850
|
static get cmpMeta() { return {
|
|
@@ -5793,6 +5868,51 @@ class ChSelect {
|
|
|
5793
5868
|
}; }
|
|
5794
5869
|
}
|
|
5795
5870
|
|
|
5871
|
+
const chSpinnerCss = () => `:host{display:inline-block;vertical-align:middle}.spinner{display:block;box-sizing:border-box;width:1em;height:1em;border:0.125em solid currentColor;border-top-color:transparent;border-radius:50%;animation:ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite}.spinner--sm{font-size:var(--typography-size-sm)}.spinner--md{font-size:var(--typography-size-lg)}.spinner--lg{font-size:var(--typography-size-xl)}@keyframes ch-spinner-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:calc(var(--duration-spin) * 4)}}`;
|
|
5872
|
+
|
|
5873
|
+
/**
|
|
5874
|
+
* Loading indicator.
|
|
5875
|
+
*
|
|
5876
|
+
* The spinner is drawn in `currentColor`, so it takes the surrounding text
|
|
5877
|
+
* colour and stays legible on any surface — inside a primary `ch-button` it
|
|
5878
|
+
* picks up the button's own text colour instead of the accent, which would be
|
|
5879
|
+
* invisible there. Set `color` on or above the element to change it.
|
|
5880
|
+
*/
|
|
5881
|
+
class ChSpinner {
|
|
5882
|
+
constructor(hostRef) {
|
|
5883
|
+
registerInstance(this, hostRef);
|
|
5884
|
+
}
|
|
5885
|
+
/**
|
|
5886
|
+
* The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a
|
|
5887
|
+
* font-size and the spinner is drawn in `em`, so it also scales with an
|
|
5888
|
+
* inherited font-size.
|
|
5889
|
+
*/
|
|
5890
|
+
size = 'md';
|
|
5891
|
+
/**
|
|
5892
|
+
* Accessible label announced while the spinner is visible, e.g. `Cargando
|
|
5893
|
+
* resultados`. When omitted the spinner is treated as decorative and hidden
|
|
5894
|
+
* from assistive technology — the right behaviour next to visible loading
|
|
5895
|
+
* text, which would otherwise be announced twice.
|
|
5896
|
+
*/
|
|
5897
|
+
label;
|
|
5898
|
+
render() {
|
|
5899
|
+
const labelled = Boolean(this.label);
|
|
5900
|
+
return (hAsync(Host, { key: 'dc7c7e19f6a6878680555b0d7dbd84f5dc5774c8' }, hAsync("span", { key: 'd29d5f3344ae578d2a28382b13b45b901d41e52b', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
5901
|
+
}
|
|
5902
|
+
static get style() { return chSpinnerCss(); }
|
|
5903
|
+
static get cmpMeta() { return {
|
|
5904
|
+
"$flags$": 521,
|
|
5905
|
+
"$tagName$": "ch-spinner",
|
|
5906
|
+
"$members$": {
|
|
5907
|
+
"size": [1],
|
|
5908
|
+
"label": [1]
|
|
5909
|
+
},
|
|
5910
|
+
"$listeners$": undefined,
|
|
5911
|
+
"$lazyBundleId$": "-",
|
|
5912
|
+
"$attrsToReflect$": []
|
|
5913
|
+
}; }
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5796
5916
|
const chSwitchCss = () => `:host{display:inline-block}.control{position:relative;display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.input:focus-visible~.track{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.track{position:relative;box-sizing:border-box;width:var(--spacing-6xl);height:var(--spacing-5xl);flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-pill);background:var(--surface);transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.thumb{position:absolute;top:50%;left:var(--spacing-2xs);width:var(--spacing-2xl);height:var(--spacing-2xl);border-radius:50%;background:var(--text-muted);transform:translateY(-50%);transition:left var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.input:checked~.track{border-color:var(--accent);background:var(--accent)}.input:checked~.track .thumb{left:calc(100% - var(--spacing-2xl) - var(--spacing-2xs));background:var(--color-accent-text)}.input--invalid~.track{border-color:var(--color-status-warning)}.input--invalid:focus-visible~.track{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
|
|
5797
5917
|
|
|
5798
5918
|
let switchIds = 0;
|
|
@@ -5860,7 +5980,7 @@ class ChSwitch {
|
|
|
5860
5980
|
return undefined;
|
|
5861
5981
|
}
|
|
5862
5982
|
render() {
|
|
5863
|
-
return (hAsync(Host, { key: '
|
|
5983
|
+
return (hAsync(Host, { key: 'a128c7c2e1585f9a71518600938ec9a3e9d8a4d4' }, hAsync("label", { key: '36f4c5cba4e01a50d2aef68c8114ea77991cd11d', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.switchId }, hAsync("input", { key: '9fbf7fc62f8e9a164c3eceb4981288d848e14165', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { key: 'b5e6e89d183871b88f423c83097c7aaed3a62fe8', class: "track" }, hAsync("span", { key: 'cd092c415e40b88f31a72c8f07df0a7d8e09f03e', class: "thumb" })), this.label && hAsync("span", { key: '58032729eae055013e19e8ac3d2acac959e0f333', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '37ee421f7d76991d1d040a04402f1da4eaf22397', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '5ecaa144451f07ecce26e839f757ee53fbdc7265', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5864
5984
|
}
|
|
5865
5985
|
static get style() { return chSwitchCss(); }
|
|
5866
5986
|
static get cmpMeta() { return {
|
|
@@ -5967,7 +6087,7 @@ class ChTabs {
|
|
|
5967
6087
|
}
|
|
5968
6088
|
render() {
|
|
5969
6089
|
const active = this.activeValue;
|
|
5970
|
-
return (hAsync(Host, { key: '
|
|
6090
|
+
return (hAsync(Host, { key: '0467e7ea24884d4c19c33b736a07303569dfaa3b' }, hAsync("div", { key: '8ad451816ef31809c82486f3c9dd36b6e89e77e5', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
5971
6091
|
const selected = tab.value === active;
|
|
5972
6092
|
return (hAsync("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
|
|
5973
6093
|
})), this.tabs.map(tab => (hAsync("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, hAsync("slot", { name: `panel-${tab.value}` }))))));
|
|
@@ -6068,7 +6188,7 @@ class ChTextarea {
|
|
|
6068
6188
|
return undefined;
|
|
6069
6189
|
}
|
|
6070
6190
|
render() {
|
|
6071
|
-
return (hAsync(Host, { key: '
|
|
6191
|
+
return (hAsync(Host, { key: '894524247096933b3d2f9cd5897da2c10133cefb' }, this.label && (hAsync("label", { key: '1e1d409f458fb7431eb2670ddf2c4146bf28060f', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: '9e2cd4f388bc31df4d498d8e32d88be063b557f1', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'cea50156d745ca55ef6da857c5302c8e04ceb483', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'ea525c23bf381f8382e134c01ea76086d84164da', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
6072
6192
|
}
|
|
6073
6193
|
static get style() { return chTextareaCss(); }
|
|
6074
6194
|
static get cmpMeta() { return {
|
|
@@ -6094,6 +6214,7 @@ class ChTextarea {
|
|
|
6094
6214
|
|
|
6095
6215
|
registerComponents([
|
|
6096
6216
|
ChAccordion,
|
|
6217
|
+
ChAlert,
|
|
6097
6218
|
ChBadge,
|
|
6098
6219
|
ChButton,
|
|
6099
6220
|
ChCard,
|
|
@@ -6103,6 +6224,7 @@ registerComponents([
|
|
|
6103
6224
|
ChLink,
|
|
6104
6225
|
ChRadio,
|
|
6105
6226
|
ChSelect,
|
|
6227
|
+
ChSpinner,
|
|
6106
6228
|
ChSwitch,
|
|
6107
6229
|
ChTabs,
|
|
6108
6230
|
ChTextarea,
|
|
@@ -6207,7 +6329,7 @@ var NAMESPACE = (
|
|
|
6207
6329
|
);
|
|
6208
6330
|
|
|
6209
6331
|
/*
|
|
6210
|
-
Stencil Hydrate Runner v4.
|
|
6332
|
+
Stencil Hydrate Runner v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
6211
6333
|
*/
|
|
6212
6334
|
var __create = Object.create;
|
|
6213
6335
|
var __defProp = Object.defineProperty;
|