@devschile/chucao 2.2.0 → 2.4.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/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/chucao.esm.js.map +1 -1
- package/dist/chucao/p-0e3c83a6.entry.js +2 -0
- package/dist/chucao/p-0e3c83a6.entry.js.map +1 -0
- package/dist/chucao/p-17451d92.entry.js +2 -0
- package/dist/chucao/p-17451d92.entry.js.map +1 -0
- package/dist/chucao/p-1778a313.entry.js +2 -0
- package/dist/chucao/p-1778a313.entry.js.map +1 -0
- package/dist/chucao/p-1ebd9dc4.entry.js +2 -0
- package/dist/chucao/p-1ebd9dc4.entry.js.map +1 -0
- package/dist/chucao/p-34a9d1f4.entry.js +2 -0
- package/dist/chucao/p-34a9d1f4.entry.js.map +1 -0
- package/dist/chucao/p-449e1ba0.entry.js +2 -0
- package/dist/chucao/p-449e1ba0.entry.js.map +1 -0
- package/dist/chucao/p-56d64d84.entry.js +2 -0
- package/dist/chucao/p-56d64d84.entry.js.map +1 -0
- package/dist/chucao/{p-04dbcfa0.entry.js → p-6e95f31f.entry.js} +2 -2
- package/dist/chucao/p-7c85f5fe.entry.js +2 -0
- package/dist/chucao/p-7c85f5fe.entry.js.map +1 -0
- package/dist/chucao/p-82216381.entry.js +2 -0
- package/dist/chucao/p-82216381.entry.js.map +1 -0
- package/dist/chucao/p-84d875e9.entry.js +2 -0
- package/dist/chucao/p-84d875e9.entry.js.map +1 -0
- package/dist/chucao/p-85db779c.entry.js +2 -0
- package/dist/chucao/p-85db779c.entry.js.map +1 -0
- package/dist/chucao/{p-bb2445d1.entry.js → p-907195ff.entry.js} +2 -2
- package/dist/chucao/p-BXzZsX2r.js +2 -0
- package/dist/chucao/p-BXzZsX2r.js.map +1 -0
- package/dist/chucao/{p-DWC12BJ-.js → p-DVKZbUp9.js} +2 -2
- package/dist/chucao/p-DVKZbUp9.js.map +1 -0
- package/dist/chucao/{p-ff5f5c1f.entry.js → p-a07e0e97.entry.js} +2 -2
- package/dist/chucao/{p-077dc2a6.entry.js → p-b392021c.entry.js} +2 -2
- package/dist/chucao/{p-5ae89a19.entry.js → p-b5552b50.entry.js} +2 -2
- package/dist/chucao/p-d0533af6.entry.js +2 -0
- package/dist/chucao/p-d0533af6.entry.js.map +1 -0
- package/dist/chucao/p-d776b092.entry.js +2 -0
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ch-alert_8.cjs.entry.js +41 -34
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-checkbox.cjs.entry.js +9 -11
- package/dist/cjs/ch-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-cluster.cjs.entry.js +47 -0
- package/dist/cjs/ch-cluster.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-drawer.cjs.entry.js +4 -3
- package/dist/cjs/ch-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-emoji.cjs.entry.js +2 -2
- package/dist/cjs/ch-empty-state.cjs.entry.js +34 -0
- package/dist/cjs/ch-empty-state.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-grid.cjs.entry.js +59 -0
- package/dist/cjs/ch-grid.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +12 -4
- package/dist/cjs/ch-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-radio.cjs.entry.js +9 -11
- package/dist/cjs/ch-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-segmented-control.cjs.entry.js +8 -7
- package/dist/cjs/ch-segmented-control.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-skeleton.cjs.entry.js +58 -0
- package/dist/cjs/ch-skeleton.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-stack.cjs.entry.js +37 -0
- package/dist/cjs/ch-stack.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +9 -11
- package/dist/cjs/ch-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-tooltip.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-C9cpLteP.js → index-ysucLiAq.js} +40 -13
- package/dist/cjs/index-ysucLiAq.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/validation-message-bbtJ2sa_.js +26 -0
- package/dist/cjs/validation-message-bbtJ2sa_.js.map +1 -0
- package/dist/collection/collection-manifest.json +7 -2
- package/dist/collection/components/ch-button/ch-button.js +9 -2
- 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 +8 -10
- package/dist/collection/components/ch-checkbox/ch-checkbox.js.map +1 -1
- package/dist/collection/components/ch-cluster/ch-cluster.css +93 -0
- package/dist/collection/components/ch-cluster/ch-cluster.js +152 -0
- package/dist/collection/components/ch-cluster/ch-cluster.js.map +1 -0
- package/dist/collection/components/ch-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-drawer/ch-drawer.js +9 -3
- package/dist/collection/components/ch-drawer/ch-drawer.js.map +1 -1
- package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
- package/dist/collection/components/ch-empty-state/ch-empty-state.css +67 -0
- package/dist/collection/components/ch-empty-state/ch-empty-state.js +108 -0
- package/dist/collection/components/ch-empty-state/ch-empty-state.js.map +1 -0
- package/dist/collection/components/ch-grid/ch-grid.css +47 -0
- package/dist/collection/components/ch-grid/ch-grid.js +137 -0
- package/dist/collection/components/ch-grid/ch-grid.js.map +1 -0
- package/dist/collection/components/ch-input/ch-input.js +8 -10
- package/dist/collection/components/ch-input/ch-input.js.map +1 -1
- package/dist/collection/components/ch-modal/ch-modal.css +12 -1
- package/dist/collection/components/ch-modal/ch-modal.js +42 -3
- package/dist/collection/components/ch-modal/ch-modal.js.map +1 -1
- package/dist/collection/components/ch-radio/ch-radio.js +8 -10
- package/dist/collection/components/ch-radio/ch-radio.js.map +1 -1
- package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +7 -6
- package/dist/collection/components/ch-segmented-control/ch-segmented-control.js.map +1 -1
- package/dist/collection/components/ch-select/ch-select.js +8 -10
- package/dist/collection/components/ch-select/ch-select.js.map +1 -1
- package/dist/collection/components/ch-skeleton/ch-skeleton.css +50 -0
- package/dist/collection/components/ch-skeleton/ch-skeleton.js +175 -0
- package/dist/collection/components/ch-skeleton/ch-skeleton.js.map +1 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
- package/dist/collection/components/ch-stack/ch-stack.css +83 -0
- package/dist/collection/components/ch-stack/ch-stack.js +124 -0
- package/dist/collection/components/ch-stack/ch-stack.js.map +1 -0
- package/dist/collection/components/ch-switch/ch-switch.js +8 -10
- package/dist/collection/components/ch-switch/ch-switch.js.map +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +8 -10
- package/dist/collection/components/ch-textarea/ch-textarea.js.map +1 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +1 -1
- package/dist/collection/utils/accessibility.js +24 -0
- package/dist/collection/utils/accessibility.js.map +1 -0
- package/dist/collection/utils/validation-message.js +20 -0
- package/dist/collection/utils/validation-message.js.map +1 -0
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.js +1 -1
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-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-checkbox.js.map +1 -1
- package/dist/components/ch-cluster.d.ts +11 -0
- package/dist/components/ch-cluster.js +2 -0
- package/dist/components/ch-cluster.js.map +1 -0
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-drawer.js +1 -1
- package/dist/components/ch-drawer.js.map +1 -1
- package/dist/components/ch-emoji.js +1 -1
- package/dist/components/ch-empty-state.d.ts +11 -0
- package/dist/components/ch-empty-state.js +2 -0
- package/dist/components/ch-empty-state.js.map +1 -0
- package/dist/components/ch-grid.d.ts +11 -0
- package/dist/components/ch-grid.js +2 -0
- package/dist/components/ch-grid.js.map +1 -0
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-input.js.map +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-modal.js +1 -1
- package/dist/components/ch-modal.js.map +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-radio.js.map +1 -1
- package/dist/components/ch-segmented-control.js +1 -1
- package/dist/components/ch-segmented-control.js.map +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-select.js.map +1 -1
- package/dist/components/ch-skeleton.d.ts +11 -0
- package/dist/components/ch-skeleton.js +2 -0
- package/dist/components/ch-skeleton.js.map +1 -0
- package/dist/components/ch-spinner.js +1 -1
- package/dist/components/ch-stack.d.ts +11 -0
- package/dist/components/ch-stack.js +2 -0
- package/dist/components/ch-stack.js.map +1 -0
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-switch.js.map +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/ch-textarea.js.map +1 -1
- package/dist/components/ch-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BXzZsX2r.js +2 -0
- package/dist/components/p-BXzZsX2r.js.map +1 -0
- package/dist/components/{p-BhAZrOxf.js → p-DQOKq7af.js} +2 -2
- package/dist/components/p-DQOKq7af.js.map +1 -0
- package/dist/components/{p-C4eGmLcE.js → p-no2_9Jk-.js} +2 -2
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/ch-alert_8.entry.js +41 -34
- package/dist/esm/ch-alert_8.entry.js.map +1 -1
- package/dist/esm/ch-checkbox.entry.js +9 -11
- package/dist/esm/ch-checkbox.entry.js.map +1 -1
- package/dist/esm/ch-cluster.entry.js +45 -0
- package/dist/esm/ch-cluster.entry.js.map +1 -0
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-drawer.entry.js +4 -3
- package/dist/esm/ch-drawer.entry.js.map +1 -1
- package/dist/esm/ch-emoji.entry.js +2 -2
- package/dist/esm/ch-empty-state.entry.js +32 -0
- package/dist/esm/ch-empty-state.entry.js.map +1 -0
- package/dist/esm/ch-grid.entry.js +57 -0
- package/dist/esm/ch-grid.entry.js.map +1 -0
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +12 -4
- package/dist/esm/ch-modal.entry.js.map +1 -1
- package/dist/esm/ch-radio.entry.js +9 -11
- package/dist/esm/ch-radio.entry.js.map +1 -1
- package/dist/esm/ch-segmented-control.entry.js +8 -7
- package/dist/esm/ch-segmented-control.entry.js.map +1 -1
- package/dist/esm/ch-skeleton.entry.js +56 -0
- package/dist/esm/ch-skeleton.entry.js.map +1 -0
- package/dist/esm/ch-stack.entry.js +35 -0
- package/dist/esm/ch-stack.entry.js.map +1 -0
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +9 -11
- package/dist/esm/ch-textarea.entry.js.map +1 -1
- package/dist/esm/ch-tooltip.entry.js +2 -2
- package/dist/esm/chucao.js +4 -4
- package/dist/esm/chucao.js.map +1 -1
- package/dist/esm/{index-DWC12BJ-.js → index-DVKZbUp9.js} +40 -13
- package/dist/esm/index-DVKZbUp9.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/validation-message-BXzZsX2r.js +24 -0
- package/dist/esm/validation-message-BXzZsX2r.js.map +1 -0
- package/dist/types/components/ch-button/ch-button.d.ts +3 -1
- package/dist/types/components/ch-cluster/ch-cluster.d.ts +28 -0
- package/dist/types/components/ch-drawer/ch-drawer.d.ts +2 -1
- package/dist/types/components/ch-empty-state/ch-empty-state.d.ts +25 -0
- package/dist/types/components/ch-grid/ch-grid.d.ts +38 -0
- package/dist/types/components/ch-modal/ch-modal.d.ts +10 -1
- package/dist/types/components/ch-skeleton/ch-skeleton.d.ts +39 -0
- package/dist/types/components/ch-stack/ch-stack.d.ts +26 -0
- package/dist/types/components.d.ts +414 -6
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/dist/types/utils/accessibility.d.ts +2 -0
- package/dist/types/utils/validation-message.d.ts +20 -0
- package/dist-react/components.d.ts +15 -0
- package/dist-react/components.js +45 -0
- package/dist-react/components.ts +60 -0
- package/dist-vue/index.d.ts +5 -0
- package/dist-vue/index.js +34 -0
- package/dist-vue/index.ts +44 -0
- package/hydrate/index.js +544 -121
- package/hydrate/index.mjs +544 -121
- package/package.json +22 -2
- package/dist/chucao/p-079c2017.entry.js +0 -2
- package/dist/chucao/p-079c2017.entry.js.map +0 -1
- package/dist/chucao/p-37e7f9cc.entry.js +0 -2
- package/dist/chucao/p-37e7f9cc.entry.js.map +0 -1
- package/dist/chucao/p-70285203.entry.js +0 -2
- package/dist/chucao/p-70285203.entry.js.map +0 -1
- package/dist/chucao/p-9c072600.entry.js +0 -2
- package/dist/chucao/p-9c072600.entry.js.map +0 -1
- package/dist/chucao/p-DWC12BJ-.js.map +0 -1
- package/dist/chucao/p-b678a7e2.entry.js +0 -2
- package/dist/chucao/p-b678a7e2.entry.js.map +0 -1
- package/dist/chucao/p-b8bd0310.entry.js +0 -2
- package/dist/chucao/p-b8bd0310.entry.js.map +0 -1
- package/dist/chucao/p-c986036f.entry.js +0 -2
- package/dist/chucao/p-e3265e38.entry.js +0 -2
- package/dist/chucao/p-e3265e38.entry.js.map +0 -1
- package/dist/cjs/index-C9cpLteP.js.map +0 -1
- package/dist/components/p-BhAZrOxf.js.map +0 -1
- package/dist/esm/index-DWC12BJ-.js.map +0 -1
- /package/dist/chucao/{p-04dbcfa0.entry.js.map → p-6e95f31f.entry.js.map} +0 -0
- /package/dist/chucao/{p-bb2445d1.entry.js.map → p-907195ff.entry.js.map} +0 -0
- /package/dist/chucao/{p-ff5f5c1f.entry.js.map → p-a07e0e97.entry.js.map} +0 -0
- /package/dist/chucao/{p-077dc2a6.entry.js.map → p-b392021c.entry.js.map} +0 -0
- /package/dist/chucao/{p-5ae89a19.entry.js.map → p-b5552b50.entry.js.map} +0 -0
- /package/dist/chucao/{p-c986036f.entry.js.map → p-d776b092.entry.js.map} +0 -0
- /package/dist/components/{p-C4eGmLcE.js.map → p-no2_9Jk-.js.map} +0 -0
package/hydrate/index.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Readable } from 'stream';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const modeResolver = [];
|
|
4
|
+
|
|
5
|
+
// captured here, at true module scope, before hydrateFactory shadows the
|
|
6
|
+
// AbortController identifier for component code below.
|
|
7
|
+
var $stencilNativeAbortController = AbortController;
|
|
4
8
|
|
|
5
9
|
function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve) {
|
|
6
10
|
var globalThis = $stencilWindow;
|
|
@@ -93,8 +97,46 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
93
97
|
|
|
94
98
|
var fetch, FetchError, Headers, Request, Response;
|
|
95
99
|
|
|
100
|
+
// Aborted when the render times out or errors, so in-flight fetch() calls
|
|
101
|
+
// made by component code stop holding the render's window/results alive
|
|
102
|
+
// instead of running to completion against a torn-down window. See #6864.
|
|
103
|
+
var $stencilAbortController = new $stencilNativeAbortController();
|
|
104
|
+
|
|
105
|
+
// Any AbortController a component creates itself is transparently wired to
|
|
106
|
+
// cascade-abort when the render times out too, so component code using the
|
|
107
|
+
// standard AbortController convention for its own cancellable work (axios,
|
|
108
|
+
// aws-sdk v3, the mongodb driver, etc.) gets cancelled automatically.
|
|
109
|
+
var AbortController = function () {
|
|
110
|
+
var controller = new $stencilNativeAbortController();
|
|
111
|
+
$stencilAbortController.signal.addEventListener(
|
|
112
|
+
'abort',
|
|
113
|
+
function () {
|
|
114
|
+
controller.abort();
|
|
115
|
+
},
|
|
116
|
+
{ once: true },
|
|
117
|
+
);
|
|
118
|
+
return controller;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
function $stencilFetchSignal(callerSignal) {
|
|
122
|
+
if (!callerSignal) {
|
|
123
|
+
return $stencilAbortController.signal;
|
|
124
|
+
}
|
|
125
|
+
if (callerSignal.aborted || $stencilAbortController.signal.aborted) {
|
|
126
|
+
return callerSignal.aborted ? callerSignal : $stencilAbortController.signal;
|
|
127
|
+
}
|
|
128
|
+
var merged = new $stencilNativeAbortController();
|
|
129
|
+
var onAbort = function () { merged.abort(); };
|
|
130
|
+
callerSignal.addEventListener('abort', onAbort, { once: true });
|
|
131
|
+
$stencilAbortController.signal.addEventListener('abort', onAbort, { once: true });
|
|
132
|
+
return merged.signal;
|
|
133
|
+
}
|
|
134
|
+
|
|
96
135
|
if (typeof $stencilWindow.fetch === 'function') {
|
|
97
|
-
|
|
136
|
+
var $stencilRawFetch = $stencilWindow.fetch;
|
|
137
|
+
fetch = $stencilWindow.fetch = function(input, init) {
|
|
138
|
+
return $stencilRawFetch(input, Object.assign({}, init, { signal: $stencilFetchSignal(init && init.signal) }));
|
|
139
|
+
};
|
|
98
140
|
} else {
|
|
99
141
|
fetch = $stencilWindow.fetch = function() { throw new Error('fetch() is not implemented'); };
|
|
100
142
|
}
|
|
@@ -133,7 +175,7 @@ const NAMESPACE = 'chucao';
|
|
|
133
175
|
const BUILD = /* chucao */ { hotModuleReplacement: false, slotRelocation: true, state: true, updatable: true};
|
|
134
176
|
|
|
135
177
|
/*
|
|
136
|
-
Stencil Hydrate Platform v4.
|
|
178
|
+
Stencil Hydrate Platform v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
137
179
|
*/
|
|
138
180
|
var __create = Object.create;
|
|
139
181
|
var __defProp = Object.defineProperty;
|
|
@@ -1525,13 +1567,14 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
|
|
|
1525
1567
|
}
|
|
1526
1568
|
}).join(", ");
|
|
1527
1569
|
};
|
|
1570
|
+
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
|
|
1528
1571
|
var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
1529
1572
|
return processRules(cssText, (rule) => {
|
|
1530
1573
|
let selector = rule.selector;
|
|
1531
1574
|
let content = rule.content;
|
|
1532
1575
|
if (rule.selector[0] !== "@") {
|
|
1533
1576
|
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
|
1534
|
-
} else if (
|
|
1577
|
+
} else if (isScopableAtRule(rule.selector)) {
|
|
1535
1578
|
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
|
|
1536
1579
|
}
|
|
1537
1580
|
const cssRule = {
|
|
@@ -1610,15 +1653,16 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
1610
1653
|
rule.selector = placeholder + rule.selector;
|
|
1611
1654
|
return rule;
|
|
1612
1655
|
};
|
|
1613
|
-
|
|
1656
|
+
const commentSelectors = (input) => processRules(input, (rule) => {
|
|
1614
1657
|
if (rule.selector[0] !== "@") {
|
|
1615
1658
|
return processCommentedSelector(rule);
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1659
|
+
}
|
|
1660
|
+
if (isScopableAtRule(rule.selector)) {
|
|
1661
|
+
rule.content = commentSelectors(rule.content);
|
|
1619
1662
|
}
|
|
1620
1663
|
return rule;
|
|
1621
1664
|
});
|
|
1665
|
+
cssText = commentSelectors(cssText);
|
|
1622
1666
|
}
|
|
1623
1667
|
const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId);
|
|
1624
1668
|
cssText = [scoped.cssText, ...commentsWithHash].join("\n");
|
|
@@ -1634,6 +1678,8 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
1634
1678
|
cssText = expandPartSelectors(cssText);
|
|
1635
1679
|
return cssText;
|
|
1636
1680
|
};
|
|
1681
|
+
var setMode = (handler) => {
|
|
1682
|
+
};
|
|
1637
1683
|
|
|
1638
1684
|
// src/runtime/normalize-watchers.ts
|
|
1639
1685
|
var normalizeWatchers = (raw) => {
|
|
@@ -1841,6 +1887,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
1841
1887
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
1842
1888
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
1843
1889
|
}
|
|
1890
|
+
} else if (memberName === "style") {
|
|
1891
|
+
{
|
|
1892
|
+
for (const prop in oldValue) {
|
|
1893
|
+
if (!newValue || newValue[prop] == null) {
|
|
1894
|
+
{
|
|
1895
|
+
elm.style[prop] = "";
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
for (const prop in newValue) {
|
|
1901
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1902
|
+
{
|
|
1903
|
+
elm.style[prop] = newValue[prop];
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1844
1907
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1845
1908
|
if (newValue) {
|
|
1846
1909
|
queueRefAttachment(newValue, elm);
|
|
@@ -2211,7 +2274,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2211
2274
|
if (idxInOld >= 0) {
|
|
2212
2275
|
elmToMove = oldCh[idxInOld];
|
|
2213
2276
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
2214
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
2277
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
2215
2278
|
} else {
|
|
2216
2279
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
2217
2280
|
oldCh[idxInOld] = void 0;
|
|
@@ -4949,7 +5012,7 @@ function forceUpdate2() {
|
|
|
4949
5012
|
}
|
|
4950
5013
|
|
|
4951
5014
|
// src/hydrate/platform/hydrate-app.ts
|
|
4952
|
-
function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
5015
|
+
function hydrateApp(win2, opts, results, afterHydrate, resolve, abortController) {
|
|
4953
5016
|
const connectedElements = /* @__PURE__ */ new Set();
|
|
4954
5017
|
const createdElements = /* @__PURE__ */ new Set();
|
|
4955
5018
|
const waitingElements = /* @__PURE__ */ new Set();
|
|
@@ -4959,6 +5022,13 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
4959
5022
|
setScopedSSR(opts);
|
|
4960
5023
|
let tmrId;
|
|
4961
5024
|
let ranCompleted = false;
|
|
5025
|
+
const abortedPromise = new Promise((res) => {
|
|
5026
|
+
if (abortController.signal.aborted) {
|
|
5027
|
+
res();
|
|
5028
|
+
} else {
|
|
5029
|
+
abortController.signal.addEventListener("abort", () => res(), { once: true });
|
|
5030
|
+
}
|
|
5031
|
+
});
|
|
4962
5032
|
function hydratedComplete() {
|
|
4963
5033
|
globalThis.clearTimeout(tmrId);
|
|
4964
5034
|
createdElements.clear();
|
|
@@ -4980,6 +5050,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
4980
5050
|
}
|
|
4981
5051
|
function hydratedError(err2) {
|
|
4982
5052
|
renderCatchError(opts, results, err2);
|
|
5053
|
+
abortController.abort();
|
|
4983
5054
|
hydratedComplete();
|
|
4984
5055
|
}
|
|
4985
5056
|
function timeoutExceeded() {
|
|
@@ -5025,7 +5096,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
5025
5096
|
if (isValidComponent(elm, opts) && results.hydratedCount < opts.maxHydrateCount) {
|
|
5026
5097
|
if (!connectedElements.has(elm) && shouldHydrate(elm)) {
|
|
5027
5098
|
connectedElements.add(elm);
|
|
5028
|
-
return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements);
|
|
5099
|
+
return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements, abortedPromise);
|
|
5029
5100
|
}
|
|
5030
5101
|
}
|
|
5031
5102
|
return resolved2;
|
|
@@ -5048,13 +5119,16 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
5048
5119
|
};
|
|
5049
5120
|
tmrId = globalThis.setTimeout(timeoutExceeded, opts.timeout);
|
|
5050
5121
|
plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./", win2.document.baseURI).href;
|
|
5122
|
+
if (Array.isArray(opts.modes)) {
|
|
5123
|
+
opts.modes.forEach((mode) => setMode());
|
|
5124
|
+
}
|
|
5051
5125
|
patchChild2(win2.document.body);
|
|
5052
5126
|
waitLoop2().then(hydratedComplete).catch(hydratedError);
|
|
5053
5127
|
} catch (e) {
|
|
5054
5128
|
hydratedError(e);
|
|
5055
5129
|
}
|
|
5056
5130
|
}
|
|
5057
|
-
async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
|
|
5131
|
+
async function hydrateComponent(win2, results, tagName, elm, waitingElements, aborted) {
|
|
5058
5132
|
tagName = tagName.toLowerCase();
|
|
5059
5133
|
const Cstr = loadModule(
|
|
5060
5134
|
{
|
|
@@ -5070,17 +5144,19 @@ async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
|
|
|
5070
5144
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
5071
5145
|
try {
|
|
5072
5146
|
connectedCallback(elm);
|
|
5073
|
-
await elm.componentOnReady();
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
results.components.
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5147
|
+
const wasAborted = await Promise.race([elm.componentOnReady().then(() => false), aborted.then(() => true)]);
|
|
5148
|
+
if (!wasAborted) {
|
|
5149
|
+
results.hydratedCount++;
|
|
5150
|
+
const ref = getHostRef(elm);
|
|
5151
|
+
const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
|
|
5152
|
+
if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
|
|
5153
|
+
results.components.push({
|
|
5154
|
+
tag: tagName,
|
|
5155
|
+
mode: modeName,
|
|
5156
|
+
count: 0,
|
|
5157
|
+
depth: -1
|
|
5158
|
+
});
|
|
5159
|
+
}
|
|
5084
5160
|
}
|
|
5085
5161
|
} catch (e) {
|
|
5086
5162
|
win2.console.error(e);
|
|
@@ -5459,6 +5535,18 @@ class ChBadge {
|
|
|
5459
5535
|
}; }
|
|
5460
5536
|
}
|
|
5461
5537
|
|
|
5538
|
+
function hasLightDomText(host) {
|
|
5539
|
+
return Array.from(host.childNodes).some(child => {
|
|
5540
|
+
if (child.nodeType !== 3 && child.nodeType !== 1) {
|
|
5541
|
+
return false;
|
|
5542
|
+
}
|
|
5543
|
+
if (child.nodeType === 1 && child.hasAttribute('slot')) {
|
|
5544
|
+
return false;
|
|
5545
|
+
}
|
|
5546
|
+
return (child.textContent ?? '').trim() !== '';
|
|
5547
|
+
});
|
|
5548
|
+
}
|
|
5549
|
+
|
|
5462
5550
|
const chButtonCss = () => `:host{display:inline-block}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-sm);box-sizing:border-box;border:var(--border-width) solid transparent;border-radius:var(--radius-pill);cursor:pointer;font-family:inherit;font-weight:var(--typography-weight-bold);text-decoration:none;line-height:1.2;transition:background-color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default), color var(--duration-normal) var(--easing-default), transform var(--duration-fast) var(--easing-default)}.btn--sm{padding:var(--spacing-2xs) var(--spacing-lg);font-size:var(--typography-size-sm)}.btn--md{padding:var(--spacing-xs) var(--spacing-xl);font-size:inherit}.btn--lg{padding:var(--spacing-sm) var(--spacing-2xl);font-size:var(--typography-size-lg)}.btn:disabled,.btn--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.btn--loading:disabled,.btn--loading.btn--disabled{opacity:1;cursor:progress}.btn:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.btn--primary{background-color:var(--accent);color:var(--color-accent-text)}.btn--primary:hover:not(:disabled){background-color:var(--accent-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}.btn--secondary{background-color:transparent;color:var(--text);border-color:var(--border)}.btn--secondary:hover:not(:disabled){border-color:var(--border-hover);background-color:var(--surface-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}.btn--ghost{background-color:transparent;color:var(--text)}.btn--ghost:hover:not(:disabled){background-color:var(--surface-hover)}.btn--danger{background-color:var(--color-status-warning);color:var(--bg)}.btn--danger:hover:not(:disabled){filter:brightness(0.92);transform:translateY(calc(-1 * var(--spacing-elevate)))}`;
|
|
5463
5551
|
|
|
5464
5552
|
class ChButton {
|
|
@@ -5466,6 +5554,7 @@ class ChButton {
|
|
|
5466
5554
|
registerInstance(this, hostRef);
|
|
5467
5555
|
this.chClick = createEvent(this, "chClick");
|
|
5468
5556
|
}
|
|
5557
|
+
get el() { return getElement(this); }
|
|
5469
5558
|
/**
|
|
5470
5559
|
* The visual style of the button. One of `primary`, `secondary`, `ghost`,
|
|
5471
5560
|
* or `danger`.
|
|
@@ -5498,7 +5587,8 @@ class ChButton {
|
|
|
5498
5587
|
/**
|
|
5499
5588
|
* Accessible label set as `aria-label` on the native element. Use it when
|
|
5500
5589
|
* the button's content doesn't convey its purpose on its own (e.g. an
|
|
5501
|
-
* icon-only button).
|
|
5590
|
+
* icon-only button). Omitting it on an icon-only button logs a warning in
|
|
5591
|
+
* development builds.
|
|
5502
5592
|
*/
|
|
5503
5593
|
label;
|
|
5504
5594
|
/**
|
|
@@ -5519,6 +5609,7 @@ class ChButton {
|
|
|
5519
5609
|
return [this.loading ? hAsync("ch-spinner", { size: this.spinnerSize }) : hAsync("slot", { name: "start" }), hAsync("slot", null), hAsync("slot", { name: "end" })];
|
|
5520
5610
|
}
|
|
5521
5611
|
render() {
|
|
5612
|
+
if (!this.label && !hasLightDomText(this.el)) ;
|
|
5522
5613
|
const classes = {
|
|
5523
5614
|
'btn': true,
|
|
5524
5615
|
[`btn--${this.variant}`]: true,
|
|
@@ -5559,7 +5650,7 @@ class ChCard {
|
|
|
5559
5650
|
registerInstance(this, hostRef);
|
|
5560
5651
|
}
|
|
5561
5652
|
render() {
|
|
5562
|
-
return (hAsync(Host, { key: '
|
|
5653
|
+
return (hAsync(Host, { key: '6c580300a397e9ebdab80b8fe470c000bdde13c2' }, hAsync("div", { key: '9601023775e7dea48da78b45c6743df8d3d88f44', class: "card" }, hAsync("slot", { key: '16fff3c0a071db7b54a69fd661513647463072fc' }))));
|
|
5563
5654
|
}
|
|
5564
5655
|
static get style() { return chCardCss(); }
|
|
5565
5656
|
static get cmpMeta() { return {
|
|
@@ -5572,6 +5663,26 @@ class ChCard {
|
|
|
5572
5663
|
}; }
|
|
5573
5664
|
}
|
|
5574
5665
|
|
|
5666
|
+
const VALUE_MISSING_MESSAGE = 'Please fill out this field.';
|
|
5667
|
+
/**
|
|
5668
|
+
* Turns a form control's state into the flags and message passed to
|
|
5669
|
+
* `ElementInternals.setValidity()`, so the six controls that mirror their
|
|
5670
|
+
* props into constraint validation cannot drift apart.
|
|
5671
|
+
*
|
|
5672
|
+
* A custom error wins over `valueMissing` for the message, matching the native
|
|
5673
|
+
* rule order, while both flags are reported when both apply.
|
|
5674
|
+
*/
|
|
5675
|
+
function resolveValidity({ required, empty, invalid, errorMessage }) {
|
|
5676
|
+
const flags = {};
|
|
5677
|
+
if (required && empty) {
|
|
5678
|
+
flags.valueMissing = true;
|
|
5679
|
+
}
|
|
5680
|
+
if (invalid && errorMessage) {
|
|
5681
|
+
flags.customError = true;
|
|
5682
|
+
}
|
|
5683
|
+
return { flags, message: errorMessage || (flags.valueMissing ? VALUE_MISSING_MESSAGE : undefined) };
|
|
5684
|
+
}
|
|
5685
|
+
|
|
5575
5686
|
const chCheckboxCss = () => `:host{display:inline-block}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent);background:var(--accent)}.input:checked::before{content:'';width:var(--spacing-xs);height:var(--spacing-lg);border:solid var(--color-accent-text);border-width:0 var(--spacing-shift) var(--spacing-shift) 0;transform:rotate(45deg);margin-top:calc(-1 * var(--spacing-2xs))}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible,:host(:user-invalid) .input:focus-visible{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)}`;
|
|
5576
5687
|
|
|
5577
5688
|
let checkboxIds = 0;
|
|
@@ -5646,15 +5757,12 @@ class ChCheckbox {
|
|
|
5646
5757
|
return;
|
|
5647
5758
|
}
|
|
5648
5759
|
internals.setFormValue(this.checked ? this.value : null);
|
|
5649
|
-
const flags = {
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
flags.customError = true;
|
|
5656
|
-
}
|
|
5657
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
5760
|
+
const { flags, message } = resolveValidity({
|
|
5761
|
+
required: this.required,
|
|
5762
|
+
empty: !this.checked,
|
|
5763
|
+
invalid: this.invalid,
|
|
5764
|
+
errorMessage: this.errorMessage,
|
|
5765
|
+
});
|
|
5658
5766
|
internals.setValidity(flags, message);
|
|
5659
5767
|
}
|
|
5660
5768
|
componentDidLoad() {
|
|
@@ -5683,7 +5791,7 @@ class ChCheckbox {
|
|
|
5683
5791
|
return undefined;
|
|
5684
5792
|
}
|
|
5685
5793
|
render() {
|
|
5686
|
-
return (hAsync(Host, { key: '
|
|
5794
|
+
return (hAsync(Host, { key: '01fd2ade9c7f4ea66da87f86c7a6c1caed1dc44a' }, hAsync("label", { key: 'cf934d4041f667dbd460dc93a61a122811be0870', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("input", { key: 'ed4730fd47f1c5efb913dd6b37c05baab4625b61', 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 && hAsync("span", { key: '5ceb7c535a4a9f0205a3ca47d64c23059bac67a0', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'c15dd0674bf82cfceee6666cd0dbb00740a41452', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'b7a262120f9f2909bedb57b30af1f85920626240', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5687
5795
|
}
|
|
5688
5796
|
static get formAssociated() { return true; }
|
|
5689
5797
|
static get watchers() { return {
|
|
@@ -5722,6 +5830,62 @@ class ChCheckbox {
|
|
|
5722
5830
|
}; }
|
|
5723
5831
|
}
|
|
5724
5832
|
|
|
5833
|
+
const chClusterCss = () => `:host{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;box-sizing:border-box}:host([hidden]){display:none}.cluster--nowrap{flex-wrap:nowrap}.cluster--gap-none{gap:0}.cluster--gap-2xs{gap:var(--spacing-2xs)}.cluster--gap-xs{gap:var(--spacing-xs)}.cluster--gap-sm{gap:var(--spacing-sm)}.cluster--gap-md{gap:var(--spacing-md)}.cluster--gap-lg{gap:var(--spacing-lg)}.cluster--gap-xl{gap:var(--spacing-xl)}.cluster--gap-2xl{gap:var(--spacing-2xl)}.cluster--gap-3xl{gap:var(--spacing-3xl)}.cluster--gap-4xl{gap:var(--spacing-4xl)}.cluster--gap-5xl{gap:var(--spacing-5xl)}.cluster--gap-6xl{gap:var(--spacing-6xl)}.cluster--align-stretch{align-items:stretch}.cluster--align-start{align-items:flex-start}.cluster--align-center{align-items:center}.cluster--align-end{align-items:flex-end}.cluster--align-baseline{align-items:baseline}.cluster--justify-start{justify-content:flex-start}.cluster--justify-center{justify-content:center}.cluster--justify-end{justify-content:flex-end}.cluster--justify-between{justify-content:space-between}.cluster--justify-around{justify-content:space-around}`;
|
|
5834
|
+
|
|
5835
|
+
const GAPS$2 = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
|
|
5836
|
+
/**
|
|
5837
|
+
* Horizontal flow that wraps when it runs out of room, with a token-driven
|
|
5838
|
+
* gap in both axes — the layout a toolbar, a tag list or a button row needs.
|
|
5839
|
+
*/
|
|
5840
|
+
class ChCluster {
|
|
5841
|
+
constructor(hostRef) {
|
|
5842
|
+
registerInstance(this, hostRef);
|
|
5843
|
+
}
|
|
5844
|
+
/**
|
|
5845
|
+
* Space between children in both axes, as a step of the spacing scale
|
|
5846
|
+
* (`2xs` … `6xl`), or `none`. An unknown value falls back to `md`.
|
|
5847
|
+
*/
|
|
5848
|
+
gap = 'md';
|
|
5849
|
+
/**
|
|
5850
|
+
* Cross-axis alignment of the children.
|
|
5851
|
+
*/
|
|
5852
|
+
align = 'center';
|
|
5853
|
+
/**
|
|
5854
|
+
* Main-axis distribution of the children.
|
|
5855
|
+
*/
|
|
5856
|
+
justify = 'start';
|
|
5857
|
+
/**
|
|
5858
|
+
* Whether the children wrap onto a new line when they run out of room.
|
|
5859
|
+
*/
|
|
5860
|
+
wrap = true;
|
|
5861
|
+
get gapStep() {
|
|
5862
|
+
return GAPS$2.has(this.gap) ? this.gap : 'md';
|
|
5863
|
+
}
|
|
5864
|
+
render() {
|
|
5865
|
+
return (hAsync(Host, { key: 'c1220f3c278df07c4b2008684b0dd44830cc8654', class: {
|
|
5866
|
+
'cluster': true,
|
|
5867
|
+
[`cluster--gap-${this.gapStep}`]: true,
|
|
5868
|
+
[`cluster--align-${this.align}`]: true,
|
|
5869
|
+
[`cluster--justify-${this.justify}`]: true,
|
|
5870
|
+
'cluster--nowrap': !this.wrap,
|
|
5871
|
+
} }, hAsync("slot", { key: 'b25c1b342bf5edf9202395cffc9abf427113c076' })));
|
|
5872
|
+
}
|
|
5873
|
+
static get style() { return chClusterCss(); }
|
|
5874
|
+
static get cmpMeta() { return {
|
|
5875
|
+
"$flags$": 777,
|
|
5876
|
+
"$tagName$": "ch-cluster",
|
|
5877
|
+
"$members$": {
|
|
5878
|
+
"gap": [1],
|
|
5879
|
+
"align": [1],
|
|
5880
|
+
"justify": [1],
|
|
5881
|
+
"wrap": [4]
|
|
5882
|
+
},
|
|
5883
|
+
"$listeners$": undefined,
|
|
5884
|
+
"$lazyBundleId$": "-",
|
|
5885
|
+
"$attrsToReflect$": []
|
|
5886
|
+
}; }
|
|
5887
|
+
}
|
|
5888
|
+
|
|
5725
5889
|
const chDividerCss = () => `:host{display:block}:host(.divider--vertical){display:inline-block;height:100%;align-self:stretch}.divider{margin:0;border:none;background:var(--border)}.divider--horizontal{width:100%;height:var(--border-width)}.divider--vertical{width:var(--border-width);height:100%}`;
|
|
5726
5890
|
|
|
5727
5891
|
class ChDivider {
|
|
@@ -5733,7 +5897,7 @@ class ChDivider {
|
|
|
5733
5897
|
*/
|
|
5734
5898
|
orientation = 'horizontal';
|
|
5735
5899
|
render() {
|
|
5736
|
-
return (hAsync(Host, { key: '
|
|
5900
|
+
return (hAsync(Host, { key: '7ca20c79741d6f4362f71c919fecfb4d8c1e0f35', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: '0528f5fb6e758686707d5fd7edc368cca31a7388', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
5737
5901
|
}
|
|
5738
5902
|
static get style() { return chDividerCss(); }
|
|
5739
5903
|
static get cmpMeta() { return {
|
|
@@ -5811,6 +5975,7 @@ class ChDrawer {
|
|
|
5811
5975
|
this.chOpen = createEvent(this, "chOpen");
|
|
5812
5976
|
this.chClose = createEvent(this, "chClose");
|
|
5813
5977
|
}
|
|
5978
|
+
get el() { return getElement(this); }
|
|
5814
5979
|
/**
|
|
5815
5980
|
* Whether the drawer is open. Kept in sync when the user closes it with
|
|
5816
5981
|
* `Escape`, the close button or a click outside.
|
|
@@ -5825,7 +5990,7 @@ class ChDrawer {
|
|
|
5825
5990
|
* Accessible name for the drawer, set as `aria-label`. A slotted heading
|
|
5826
5991
|
* cannot be referenced with `aria-labelledby` across the shadow boundary, so
|
|
5827
5992
|
* the name comes through this prop — and a modal dialog needs one, so pass
|
|
5828
|
-
* the same text as the heading.
|
|
5993
|
+
* the same text as the heading. Omitting it logs a warning in development builds.
|
|
5829
5994
|
*/
|
|
5830
5995
|
label;
|
|
5831
5996
|
/**
|
|
@@ -5937,7 +6102,7 @@ class ChDrawer {
|
|
|
5937
6102
|
this.chClose.emit();
|
|
5938
6103
|
};
|
|
5939
6104
|
render() {
|
|
5940
|
-
return (hAsync(Host, { key: '
|
|
6105
|
+
return (hAsync(Host, { key: 'e253493315b0a21d46277a2cf49e10c8f570b3ad' }, hAsync("dialog", { key: '4ede2cb014fa3f0af057007e9786438553c9a6a9', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '039390c74b51fcb6ed4a3dd878ddd869cb67fd24', class: "drawer-head" }, hAsync("slot", { key: 'bef8432179380e812402172494da5176d9341df1', name: "header" }), this.closeLabel && (hAsync("button", { key: '19b93c1a532774ff8cce1df0c88608d5e9ba40be', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: 'd209f75fc16bb002e1fee76987e09ee25098fc57', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'a6268eff7e5d27673660d9b333ed2664a9b76fbf', class: "drawer-body" }, hAsync("slot", { key: 'df6f9d7a029eabf129ba3170ba02b5547df8568d' })), hAsync("slot", { key: '98be7bc85c7378effcddf44a4bd072df8e139947', name: "footer" }))));
|
|
5941
6106
|
}
|
|
5942
6107
|
static get watchers() { return {
|
|
5943
6108
|
"open": [{
|
|
@@ -6049,7 +6214,7 @@ class ChEmoji {
|
|
|
6049
6214
|
this.loaded = true;
|
|
6050
6215
|
};
|
|
6051
6216
|
render() {
|
|
6052
|
-
return (hAsync(Host, { key: '
|
|
6217
|
+
return (hAsync(Host, { key: '42f3336ba7ebd388abb55fc7b7cfbc65f6771c83' }, hAsync("img", { key: '6984f725514653ccaf36ebcb06bbb6ba79c8877f', class: {
|
|
6053
6218
|
'emoji': true,
|
|
6054
6219
|
[`emoji--${this.size}`]: true,
|
|
6055
6220
|
'emoji--hidden': !this.loaded,
|
|
@@ -6077,6 +6242,122 @@ class ChEmoji {
|
|
|
6077
6242
|
}; }
|
|
6078
6243
|
}
|
|
6079
6244
|
|
|
6245
|
+
const chEmptyStateCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary);text-align:center}:host([hidden]){display:none}.empty-state__inner{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-6xl) var(--spacing-2xl);border:var(--border-width) dashed var(--color-border-default);border-radius:var(--radius-md);background:var(--color-surface-default)}.empty-state--sm .empty-state__inner{padding:var(--spacing-3xl) var(--spacing-xl);gap:var(--spacing-xs)}.empty-state__icon{display:contents;font-size:var(--typography-size-xl);line-height:1}.empty-state__icon:empty{display:none}.empty-state__title{margin:0;font-family:var(--typography-heading);font-size:var(--typography-size-md);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.empty-state--md .empty-state__title{font-size:var(--typography-size-lg)}.empty-state__description{margin:0;max-width:36ch;font-size:var(--typography-size-sm);line-height:1.5}.empty-state__actions:empty{display:none}.empty-state__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm);justify-content:center;margin-top:var(--spacing-xs)}`;
|
|
6246
|
+
|
|
6247
|
+
/**
|
|
6248
|
+
* The standard "there is nothing here" block: an optional visual, a title, a
|
|
6249
|
+
* description and an action, laid out the same way everywhere.
|
|
6250
|
+
*
|
|
6251
|
+
* It works both inside a table cell and as a whole-page view: it fills its
|
|
6252
|
+
* container but never claims a fixed height.
|
|
6253
|
+
*/
|
|
6254
|
+
class ChEmptyState {
|
|
6255
|
+
constructor(hostRef) {
|
|
6256
|
+
registerInstance(this, hostRef);
|
|
6257
|
+
}
|
|
6258
|
+
/**
|
|
6259
|
+
* Short heading stating what is missing, used as the accessible name of the
|
|
6260
|
+
* block.
|
|
6261
|
+
*/
|
|
6262
|
+
title;
|
|
6263
|
+
/**
|
|
6264
|
+
* One or two sentences explaining what the user can do about it.
|
|
6265
|
+
*/
|
|
6266
|
+
description;
|
|
6267
|
+
/**
|
|
6268
|
+
* Visual density. `sm` is for a region inside a page (a card, a table cell),
|
|
6269
|
+
* `md` for a whole view.
|
|
6270
|
+
*/
|
|
6271
|
+
size = 'md';
|
|
6272
|
+
render() {
|
|
6273
|
+
return (hAsync(Host, { key: 'b24a998a9985c80ac0a8a99678818da152f9fe81', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, hAsync("div", { key: '6492a352e3fcf4311c05b263fa517d73b90a9393', class: "empty-state__inner" }, hAsync("div", { key: 'd05f61e5397dc6e3483a46b4af0144960d26e16a', class: "empty-state__icon", "aria-hidden": "true" }, hAsync("slot", { key: '41af9a743d77e85ea3ef853f83d8f7e318f99dd6', name: "icon" })), hAsync("h3", { key: '315709535c3741c9d19850d46f2340fc89779594', class: "empty-state__title" }, this.title), this.description && hAsync("p", { key: 'e4c94a1f6cc0e0477847165d33e12c90f7f5e0b3', class: "empty-state__description" }, this.description), hAsync("div", { key: '89e9f85245e85aebdbe538aec4e966783de0769f', class: "empty-state__actions" }, hAsync("slot", { key: '8749c517ae31f94b112afe919ad4c28323f62844' })))));
|
|
6274
|
+
}
|
|
6275
|
+
static get style() { return chEmptyStateCss(); }
|
|
6276
|
+
static get cmpMeta() { return {
|
|
6277
|
+
"$flags$": 777,
|
|
6278
|
+
"$tagName$": "ch-empty-state",
|
|
6279
|
+
"$members$": {
|
|
6280
|
+
"title": [1],
|
|
6281
|
+
"description": [1],
|
|
6282
|
+
"size": [1]
|
|
6283
|
+
},
|
|
6284
|
+
"$listeners$": undefined,
|
|
6285
|
+
"$lazyBundleId$": "-",
|
|
6286
|
+
"$attrsToReflect$": []
|
|
6287
|
+
}; }
|
|
6288
|
+
}
|
|
6289
|
+
|
|
6290
|
+
const chGridCss = () => `:host{display:grid;grid-template-columns:var(--ch-grid-columns, repeat(auto-fit, minmax(min(16rem, 100%), 1fr)));box-sizing:border-box}:host([hidden]){display:none}.grid--gap-none{gap:0}.grid--gap-2xs{gap:var(--spacing-2xs)}.grid--gap-xs{gap:var(--spacing-xs)}.grid--gap-sm{gap:var(--spacing-sm)}.grid--gap-md{gap:var(--spacing-md)}.grid--gap-lg{gap:var(--spacing-lg)}.grid--gap-xl{gap:var(--spacing-xl)}.grid--gap-2xl{gap:var(--spacing-2xl)}.grid--gap-3xl{gap:var(--spacing-3xl)}.grid--gap-4xl{gap:var(--spacing-4xl)}.grid--gap-5xl{gap:var(--spacing-5xl)}.grid--gap-6xl{gap:var(--spacing-6xl)}`;
|
|
6291
|
+
|
|
6292
|
+
const GAPS$1 = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
|
|
6293
|
+
/**
|
|
6294
|
+
* Responsive grid of equal cells.
|
|
6295
|
+
*
|
|
6296
|
+
* `columns` takes a fixed count (`1`…`12`) or `auto-fit`, which fits as many
|
|
6297
|
+
* columns as `min-item-width` allows into the available width. That second mode
|
|
6298
|
+
* is the one a card list almost always wants: it needs no breakpoints and no
|
|
6299
|
+
* media queries of its own.
|
|
6300
|
+
*/
|
|
6301
|
+
class ChGrid {
|
|
6302
|
+
constructor(hostRef) {
|
|
6303
|
+
registerInstance(this, hostRef);
|
|
6304
|
+
}
|
|
6305
|
+
get el() { return getElement(this); }
|
|
6306
|
+
/**
|
|
6307
|
+
* Number of equal columns (`1`…`12`), or `auto-fit` to fit as many as
|
|
6308
|
+
* `min-item-width` allows. An unknown value falls back to `auto-fit`.
|
|
6309
|
+
*/
|
|
6310
|
+
columns = 'auto-fit';
|
|
6311
|
+
/**
|
|
6312
|
+
* Space between cells in both axes, as a step of the spacing scale
|
|
6313
|
+
* (`2xs` … `6xl`), or `none`. An unknown value falls back to `md`.
|
|
6314
|
+
*/
|
|
6315
|
+
gap = 'md';
|
|
6316
|
+
/**
|
|
6317
|
+
* Smallest width a cell may take in `auto-fit` mode, as a CSS length. It also
|
|
6318
|
+
* caps the column count in fixed mode, so a cell never gets narrower than it.
|
|
6319
|
+
*/
|
|
6320
|
+
minItemWidth = '16rem';
|
|
6321
|
+
get gapStep() {
|
|
6322
|
+
return GAPS$1.has(this.gap) ? this.gap : 'md';
|
|
6323
|
+
}
|
|
6324
|
+
get fixedColumns() {
|
|
6325
|
+
const count = Number(this.columns);
|
|
6326
|
+
return Number.isInteger(count) && count >= 1 && count <= 12 ? count : null;
|
|
6327
|
+
}
|
|
6328
|
+
componentWillLoad() {
|
|
6329
|
+
this.applyColumns();
|
|
6330
|
+
}
|
|
6331
|
+
componentDidUpdate() {
|
|
6332
|
+
this.applyColumns();
|
|
6333
|
+
}
|
|
6334
|
+
/**
|
|
6335
|
+
* The column template is written as a CSS custom property rather than an
|
|
6336
|
+
* inline style: the template carries a comma and an internal `1fr`, and a
|
|
6337
|
+
* custom property keeps it out of the style string Stencil parses.
|
|
6338
|
+
*/
|
|
6339
|
+
applyColumns() {
|
|
6340
|
+
const template = this.fixedColumns === null ? `repeat(auto-fit, minmax(min(${this.minItemWidth}, 100%), 1fr))` : `repeat(${this.fixedColumns}, minmax(0, 1fr))`;
|
|
6341
|
+
this.el.style.setProperty('--ch-grid-columns', template);
|
|
6342
|
+
}
|
|
6343
|
+
render() {
|
|
6344
|
+
return (hAsync(Host, { key: '62473c599b185ea190f3d1349c5ac096cc07f453', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, hAsync("slot", { key: 'a05391e90211544058afcea9353a232617e2edfd' })));
|
|
6345
|
+
}
|
|
6346
|
+
static get style() { return chGridCss(); }
|
|
6347
|
+
static get cmpMeta() { return {
|
|
6348
|
+
"$flags$": 777,
|
|
6349
|
+
"$tagName$": "ch-grid",
|
|
6350
|
+
"$members$": {
|
|
6351
|
+
"columns": [1],
|
|
6352
|
+
"gap": [1],
|
|
6353
|
+
"minItemWidth": [1, "min-item-width"]
|
|
6354
|
+
},
|
|
6355
|
+
"$listeners$": undefined,
|
|
6356
|
+
"$lazyBundleId$": "-",
|
|
6357
|
+
"$attrsToReflect$": []
|
|
6358
|
+
}; }
|
|
6359
|
+
}
|
|
6360
|
+
|
|
6080
6361
|
const chInputCss = () => `:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus,:host(:user-invalid) .input:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
|
|
6081
6362
|
|
|
6082
6363
|
let inputIds = 0;
|
|
@@ -6164,15 +6445,12 @@ class ChInput {
|
|
|
6164
6445
|
return;
|
|
6165
6446
|
}
|
|
6166
6447
|
internals.setFormValue(this.value);
|
|
6167
|
-
const flags = {
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
flags.customError = true;
|
|
6174
|
-
}
|
|
6175
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
6448
|
+
const { flags, message } = resolveValidity({
|
|
6449
|
+
required: this.required,
|
|
6450
|
+
empty: this.value === '',
|
|
6451
|
+
invalid: this.invalid,
|
|
6452
|
+
errorMessage: this.errorMessage,
|
|
6453
|
+
});
|
|
6176
6454
|
internals.setValidity(flags, message);
|
|
6177
6455
|
}
|
|
6178
6456
|
componentDidLoad() {
|
|
@@ -6201,7 +6479,7 @@ class ChInput {
|
|
|
6201
6479
|
return undefined;
|
|
6202
6480
|
}
|
|
6203
6481
|
render() {
|
|
6204
|
-
return (hAsync(Host, { key: '
|
|
6482
|
+
return (hAsync(Host, { key: '786207fea62db161a1905539d59b172e54661ca2' }, this.label && (hAsync("label", { key: 'ed308712f2e2fd9341127d820e2ea6a1e0886468', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: '857dfd3bf115d4846b84f9ea0587d501d20d4a2f', 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 || this.formDisabled, 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: 'fad0f9d1c32ac29d1dade62d7d39a0902e10e5e6', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '8e5a4d966cefc2171888496c19abb4002c9839e0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
6205
6483
|
}
|
|
6206
6484
|
static get formAssociated() { return true; }
|
|
6207
6485
|
static get watchers() { return {
|
|
@@ -6295,7 +6573,7 @@ class ChLink {
|
|
|
6295
6573
|
}; }
|
|
6296
6574
|
}
|
|
6297
6575
|
|
|
6298
|
-
const chModalCss = () => `.modal{box-sizing:border-box;max-
|
|
6576
|
+
const chModalCss = () => `.modal{box-sizing:border-box;max-height:calc(100vh - var(--spacing-6xl));padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:var(--radius);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md)}.modal--sm{max-width:min(var(--ch-modal-width, 24rem), calc(100vw - var(--spacing-6xl)))}.modal--md{max-width:min(var(--ch-modal-width, 32rem), calc(100vw - var(--spacing-6xl)))}.modal--lg{max-width:min(var(--ch-modal-width, 48rem), calc(100vw - var(--spacing-6xl)))}.modal::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);margin-bottom:var(--spacing-2xl)}.modal-body{overflow-y:auto}.modal-close{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:var(--text-muted);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)}.modal-close:hover{background:var(--surface-hover);color:var(--text)}.modal-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.modal-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.modal-close{transition:none}}`;
|
|
6299
6577
|
|
|
6300
6578
|
/**
|
|
6301
6579
|
* Modal dialog, built on the native `<dialog>` element and opened with
|
|
@@ -6321,6 +6599,7 @@ class ChModal {
|
|
|
6321
6599
|
this.chOpen = createEvent(this, "chOpen");
|
|
6322
6600
|
this.chClose = createEvent(this, "chClose");
|
|
6323
6601
|
}
|
|
6602
|
+
get el() { return getElement(this); }
|
|
6324
6603
|
/**
|
|
6325
6604
|
* Whether the dialog is open. Kept in sync when the user closes it with
|
|
6326
6605
|
* `Escape`, the close button or a click outside.
|
|
@@ -6330,7 +6609,7 @@ class ChModal {
|
|
|
6330
6609
|
* Accessible name for the dialog, set as `aria-label`. A slotted heading
|
|
6331
6610
|
* cannot be referenced with `aria-labelledby` across the shadow boundary, so
|
|
6332
6611
|
* the name comes through this prop — and a modal dialog needs one, so pass
|
|
6333
|
-
* the same text as the heading.
|
|
6612
|
+
* the same text as the heading. Omitting it logs a warning in development builds.
|
|
6334
6613
|
*/
|
|
6335
6614
|
label;
|
|
6336
6615
|
/**
|
|
@@ -6339,6 +6618,13 @@ class ChModal {
|
|
|
6339
6618
|
* label it would have no accessible name.
|
|
6340
6619
|
*/
|
|
6341
6620
|
closeLabel;
|
|
6621
|
+
/**
|
|
6622
|
+
* The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or
|
|
6623
|
+
* `lg` (48rem). The `--ch-modal-width` custom property overrides it for a
|
|
6624
|
+
* width none of the three cover. Either way the dialog never exceeds the
|
|
6625
|
+
* viewport.
|
|
6626
|
+
*/
|
|
6627
|
+
size = 'md';
|
|
6342
6628
|
/**
|
|
6343
6629
|
* Emitted after the dialog opens.
|
|
6344
6630
|
*/
|
|
@@ -6442,7 +6728,7 @@ class ChModal {
|
|
|
6442
6728
|
this.chClose.emit();
|
|
6443
6729
|
};
|
|
6444
6730
|
render() {
|
|
6445
|
-
return (hAsync(Host, { key: '
|
|
6731
|
+
return (hAsync(Host, { key: '2fd717f7a12a5cd27fb0ddbc4cd903ec94112476' }, hAsync("dialog", { key: '78b005ab7714b80e79cd93be03c0267e87ad1cd2', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '17849ea81a1eac448175ee6b2e0b57942256bf61', class: "modal-head" }, hAsync("slot", { key: '0d3c9d243898fe01cab1edaa8cf8d324b8463ef0', name: "heading" }), this.closeLabel && (hAsync("button", { key: '511d1859a13d0080fdf95eb10d3af60b1838633e', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: '0cf9b7e0dae8e451ca00417ed5a901c04d52de93', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: '0aa422b777b42d187ceafa2a4a5d37d363ef4d26', class: "modal-body" }, hAsync("slot", { key: '23444a2294dd29038b88904d4ab3f6fc2804ae2e' })))));
|
|
6446
6732
|
}
|
|
6447
6733
|
static get watchers() { return {
|
|
6448
6734
|
"open": [{
|
|
@@ -6456,7 +6742,8 @@ class ChModal {
|
|
|
6456
6742
|
"$members$": {
|
|
6457
6743
|
"open": [1028],
|
|
6458
6744
|
"label": [1],
|
|
6459
|
-
"closeLabel": [1, "close-label"]
|
|
6745
|
+
"closeLabel": [1, "close-label"],
|
|
6746
|
+
"size": [1]
|
|
6460
6747
|
},
|
|
6461
6748
|
"$listeners$": undefined,
|
|
6462
6749
|
"$lazyBundleId$": "-",
|
|
@@ -6540,15 +6827,12 @@ class ChRadio {
|
|
|
6540
6827
|
return;
|
|
6541
6828
|
}
|
|
6542
6829
|
internals.setFormValue(this.value ?? null);
|
|
6543
|
-
const flags = {
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
flags.customError = true;
|
|
6550
|
-
}
|
|
6551
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
6830
|
+
const { flags, message } = resolveValidity({
|
|
6831
|
+
required: this.required,
|
|
6832
|
+
empty: !this.value,
|
|
6833
|
+
invalid: this.invalid,
|
|
6834
|
+
errorMessage: this.errorMessage,
|
|
6835
|
+
});
|
|
6552
6836
|
internals.setValidity(flags, message);
|
|
6553
6837
|
}
|
|
6554
6838
|
componentDidLoad() {
|
|
@@ -6578,7 +6862,7 @@ class ChRadio {
|
|
|
6578
6862
|
}
|
|
6579
6863
|
render() {
|
|
6580
6864
|
const groupName = this.name || `${this.groupId}-group`;
|
|
6581
|
-
return (hAsync(Host, { key: '
|
|
6865
|
+
return (hAsync(Host, { key: 'a2e08f3a0b409472f8f49e3c7f1a7f16619e66ec' }, this.label && (hAsync("span", { key: '95d3bbd01c7301aeef7c64cd500d247184f5c4b3', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'fc8a4de53693e2a5e642dce6cb8d740c04b9e64e', 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 || this.formDisabled || 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 || this.formDisabled || 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: '0712a66b5344123bdce6b984de588465554b5c78', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'ce8111b984cd5280a960c4814ef124963ce95815', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
6582
6866
|
}
|
|
6583
6867
|
static get formAssociated() { return true; }
|
|
6584
6868
|
static get watchers() { return {
|
|
@@ -6698,11 +6982,11 @@ class ChSegmentedControl {
|
|
|
6698
6982
|
return;
|
|
6699
6983
|
}
|
|
6700
6984
|
internals.setFormValue(this.value ?? null);
|
|
6701
|
-
const flags = {
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
}
|
|
6705
|
-
internals.setValidity(flags,
|
|
6985
|
+
const { flags, message } = resolveValidity({
|
|
6986
|
+
required: this.required,
|
|
6987
|
+
empty: !this.value,
|
|
6988
|
+
});
|
|
6989
|
+
internals.setValidity(flags, message);
|
|
6706
6990
|
}
|
|
6707
6991
|
componentDidLoad() {
|
|
6708
6992
|
this.initialValue = this.value;
|
|
@@ -6722,7 +7006,7 @@ class ChSegmentedControl {
|
|
|
6722
7006
|
}
|
|
6723
7007
|
render() {
|
|
6724
7008
|
const groupName = this.name || `${this.groupId}-group`;
|
|
6725
|
-
return (hAsync(Host, { key: '
|
|
7009
|
+
return (hAsync(Host, { key: 'fde08d667755f78242d3c8c26e0c6df417c716ae' }, this.label && (hAsync("span", { key: 'abadad2f4b7140fc77b78e25d15b64ed95fd150e', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '7361933a554eec0728f10812907495813da8f3a3', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: "input", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), hAsync("span", { class: "label-text" }, option.label)))))));
|
|
6726
7010
|
}
|
|
6727
7011
|
static get formAssociated() { return true; }
|
|
6728
7012
|
static get watchers() { return {
|
|
@@ -6831,15 +7115,12 @@ class ChSelect {
|
|
|
6831
7115
|
return;
|
|
6832
7116
|
}
|
|
6833
7117
|
internals.setFormValue(this.value ?? '');
|
|
6834
|
-
const flags = {
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
flags.customError = true;
|
|
6841
|
-
}
|
|
6842
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
7118
|
+
const { flags, message } = resolveValidity({
|
|
7119
|
+
required: this.required,
|
|
7120
|
+
empty: !this.value,
|
|
7121
|
+
invalid: this.invalid,
|
|
7122
|
+
errorMessage: this.errorMessage,
|
|
7123
|
+
});
|
|
6843
7124
|
internals.setValidity(flags, message);
|
|
6844
7125
|
}
|
|
6845
7126
|
componentDidLoad() {
|
|
@@ -6868,7 +7149,7 @@ class ChSelect {
|
|
|
6868
7149
|
return undefined;
|
|
6869
7150
|
}
|
|
6870
7151
|
render() {
|
|
6871
|
-
return (hAsync(Host, { key: '
|
|
7152
|
+
return (hAsync(Host, { key: '62230ff57779f812a3a9bdd7683ba6be8ac8cb74' }, this.label && (hAsync("label", { key: '9a9cc9bbcefa0785f90221e6b7426b1cfe5fba02', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'e3faccac8af282a0ac571841d731d88b814f26c1', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (hAsync("option", { key: '86e5f5af47bec9867f5f53c4b9b07766f55d56a7', 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: 'a6f36d726ed141eb8cd22d914b8901af24dc78b0', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '6d65c3890e13037fa58190f619fe6abc5f8964eb', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
6872
7153
|
}
|
|
6873
7154
|
static get formAssociated() { return true; }
|
|
6874
7155
|
static get watchers() { return {
|
|
@@ -6908,6 +7189,78 @@ class ChSelect {
|
|
|
6908
7189
|
}; }
|
|
6909
7190
|
}
|
|
6910
7191
|
|
|
7192
|
+
const chSkeletonCss = () => `:host{display:block;width:100%}:host([hidden]){display:none}:host(.skeleton--circle){width:auto;display:inline-flex}.skeleton__item{display:block;background:var(--color-surface-default);border-radius:var(--radius-sm)}.skeleton--circle .skeleton__item{border-radius:50%}.skeleton--rect .skeleton__item{border-radius:var(--radius-md)}.skeleton--animated .skeleton__item{background-image:linear-gradient(90deg, transparent 0%, var(--color-surface-hover) 50%, transparent 100%);background-size:200% 100%;background-repeat:no-repeat;animation:ch-skeleton-shimmer 1.4s ease-in-out infinite}@keyframes ch-skeleton-shimmer{from{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.skeleton--animated .skeleton__item{animation:none;background-image:none}}`;
|
|
7193
|
+
|
|
7194
|
+
/**
|
|
7195
|
+
* Decorative loading placeholder that reserves the space real content will
|
|
7196
|
+
* take, so the page does not jump when the data arrives.
|
|
7197
|
+
*
|
|
7198
|
+
* It stays out of the accessibility tree on purpose: a screen reader should
|
|
7199
|
+
* hear nothing about a placeholder. Mark the region that is actually loading
|
|
7200
|
+
* with `aria-busy="true"` yourself, and announce the result when it lands.
|
|
7201
|
+
*/
|
|
7202
|
+
class ChSkeleton {
|
|
7203
|
+
constructor(hostRef) {
|
|
7204
|
+
registerInstance(this, hostRef);
|
|
7205
|
+
}
|
|
7206
|
+
/**
|
|
7207
|
+
* Width of a placeholder. For `line` and `rect` it is a CSS length or a
|
|
7208
|
+
* percentage; `circle` is square, so this sets its diameter too.
|
|
7209
|
+
*/
|
|
7210
|
+
width = '100%';
|
|
7211
|
+
/**
|
|
7212
|
+
* Height of a placeholder, as a CSS length. Ignored by `circle`, which is
|
|
7213
|
+
* square.
|
|
7214
|
+
*/
|
|
7215
|
+
height = '1rem';
|
|
7216
|
+
/**
|
|
7217
|
+
* Shape of the placeholder: `line` for text, `circle` for avatars and
|
|
7218
|
+
* icons, `rect` for images and cards.
|
|
7219
|
+
*/
|
|
7220
|
+
shape = 'line';
|
|
7221
|
+
/**
|
|
7222
|
+
* How many placeholders to render in a row, for multi-line text blocks. A
|
|
7223
|
+
* value below 1 renders one.
|
|
7224
|
+
*/
|
|
7225
|
+
count = 1;
|
|
7226
|
+
/**
|
|
7227
|
+
* Whether the shimmer runs. It is also disabled automatically for people who
|
|
7228
|
+
* asked for reduced motion.
|
|
7229
|
+
*/
|
|
7230
|
+
animated = true;
|
|
7231
|
+
get items() {
|
|
7232
|
+
const count = Number(this.count);
|
|
7233
|
+
return Number.isInteger(count) && count >= 1 ? count : 1;
|
|
7234
|
+
}
|
|
7235
|
+
get sizeStyle() {
|
|
7236
|
+
if (this.shape === 'circle') {
|
|
7237
|
+
return { width: this.width, height: this.width };
|
|
7238
|
+
}
|
|
7239
|
+
if (this.shape === 'line') {
|
|
7240
|
+
return { width: this.width, height: this.height };
|
|
7241
|
+
}
|
|
7242
|
+
return { width: this.width, height: this.height };
|
|
7243
|
+
}
|
|
7244
|
+
render() {
|
|
7245
|
+
return (hAsync(Host, { key: 'd55fcc926f439555de011ae5f730a53ac42d1a28', "aria-hidden": "true", class: { 'skeleton': true, [`skeleton--${this.shape}`]: true, 'skeleton--animated': this.animated } }, Array.from({ length: this.items }).map((value, index) => (hAsync("span", { class: "skeleton__item", style: this.sizeStyle, key: index, "data-index": String(value) })))));
|
|
7246
|
+
}
|
|
7247
|
+
static get style() { return chSkeletonCss(); }
|
|
7248
|
+
static get cmpMeta() { return {
|
|
7249
|
+
"$flags$": 521,
|
|
7250
|
+
"$tagName$": "ch-skeleton",
|
|
7251
|
+
"$members$": {
|
|
7252
|
+
"width": [1],
|
|
7253
|
+
"height": [1],
|
|
7254
|
+
"shape": [1],
|
|
7255
|
+
"count": [2],
|
|
7256
|
+
"animated": [4]
|
|
7257
|
+
},
|
|
7258
|
+
"$listeners$": undefined,
|
|
7259
|
+
"$lazyBundleId$": "-",
|
|
7260
|
+
"$attrsToReflect$": []
|
|
7261
|
+
}; }
|
|
7262
|
+
}
|
|
7263
|
+
|
|
6911
7264
|
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)}}`;
|
|
6912
7265
|
|
|
6913
7266
|
/**
|
|
@@ -6937,7 +7290,7 @@ class ChSpinner {
|
|
|
6937
7290
|
label;
|
|
6938
7291
|
render() {
|
|
6939
7292
|
const labelled = Boolean(this.label);
|
|
6940
|
-
return (hAsync(Host, { key: '
|
|
7293
|
+
return (hAsync(Host, { key: 'f90e872cf734e67bd8e422d681b7c053c882ee01' }, hAsync("span", { key: '82314f5e4ccc80e1b6f1e026b8888d5daf43f1ca', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
6941
7294
|
}
|
|
6942
7295
|
static get style() { return chSpinnerCss(); }
|
|
6943
7296
|
static get cmpMeta() { return {
|
|
@@ -6953,6 +7306,53 @@ class ChSpinner {
|
|
|
6953
7306
|
}; }
|
|
6954
7307
|
}
|
|
6955
7308
|
|
|
7309
|
+
const chStackCss = () => `:host{display:flex;flex-direction:column;box-sizing:border-box}:host([hidden]){display:none}.stack--gap-none{gap:0}.stack--gap-2xs{gap:var(--spacing-2xs)}.stack--gap-xs{gap:var(--spacing-xs)}.stack--gap-sm{gap:var(--spacing-sm)}.stack--gap-md{gap:var(--spacing-md)}.stack--gap-lg{gap:var(--spacing-lg)}.stack--gap-xl{gap:var(--spacing-xl)}.stack--gap-2xl{gap:var(--spacing-2xl)}.stack--gap-3xl{gap:var(--spacing-3xl)}.stack--gap-4xl{gap:var(--spacing-4xl)}.stack--gap-5xl{gap:var(--spacing-5xl)}.stack--gap-6xl{gap:var(--spacing-6xl)}.stack--align-stretch{align-items:stretch}.stack--align-start{align-items:flex-start}.stack--align-center{align-items:center}.stack--align-end{align-items:flex-end}.stack--justify-start{justify-content:flex-start}.stack--justify-center{justify-content:center}.stack--justify-end{justify-content:flex-end}.stack--justify-between{justify-content:space-between}.stack--justify-around{justify-content:space-around}`;
|
|
7310
|
+
|
|
7311
|
+
const GAPS = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
|
|
7312
|
+
/**
|
|
7313
|
+
* Vertical flow: children stack top to bottom with a token-driven gap.
|
|
7314
|
+
*
|
|
7315
|
+
* It is a real host with `display: flex`, not `display: contents`, so a
|
|
7316
|
+
* consumer's own classes and attributes on `<ch-stack>` keep working.
|
|
7317
|
+
*/
|
|
7318
|
+
class ChStack {
|
|
7319
|
+
constructor(hostRef) {
|
|
7320
|
+
registerInstance(this, hostRef);
|
|
7321
|
+
}
|
|
7322
|
+
/**
|
|
7323
|
+
* Space between children, as a step of the spacing scale (`2xs` … `6xl`),
|
|
7324
|
+
* or `none` for no gap. An unknown value falls back to `md`.
|
|
7325
|
+
*/
|
|
7326
|
+
gap = 'md';
|
|
7327
|
+
/**
|
|
7328
|
+
* Cross-axis alignment of the children.
|
|
7329
|
+
*/
|
|
7330
|
+
align = 'stretch';
|
|
7331
|
+
/**
|
|
7332
|
+
* Main-axis distribution of the children.
|
|
7333
|
+
*/
|
|
7334
|
+
justify = 'start';
|
|
7335
|
+
get gapStep() {
|
|
7336
|
+
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
7337
|
+
}
|
|
7338
|
+
render() {
|
|
7339
|
+
return (hAsync(Host, { key: '0408430206db8b807cd879679a643b196699e2a9', class: { stack: true, [`stack--gap-${this.gapStep}`]: true, [`stack--align-${this.align}`]: true, [`stack--justify-${this.justify}`]: true } }, hAsync("slot", { key: 'e05b9a1c4a944d8029e2738395828232098da324' })));
|
|
7340
|
+
}
|
|
7341
|
+
static get style() { return chStackCss(); }
|
|
7342
|
+
static get cmpMeta() { return {
|
|
7343
|
+
"$flags$": 777,
|
|
7344
|
+
"$tagName$": "ch-stack",
|
|
7345
|
+
"$members$": {
|
|
7346
|
+
"gap": [1],
|
|
7347
|
+
"align": [1],
|
|
7348
|
+
"justify": [1]
|
|
7349
|
+
},
|
|
7350
|
+
"$listeners$": undefined,
|
|
7351
|
+
"$lazyBundleId$": "-",
|
|
7352
|
+
"$attrsToReflect$": []
|
|
7353
|
+
}; }
|
|
7354
|
+
}
|
|
7355
|
+
|
|
6956
7356
|
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)}:host([data-touched]:invalid) .track,:host(:user-invalid) .track{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible~.track,:host(:user-invalid) .input: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)}`;
|
|
6957
7357
|
|
|
6958
7358
|
let switchIds = 0;
|
|
@@ -7027,15 +7427,12 @@ class ChSwitch {
|
|
|
7027
7427
|
return;
|
|
7028
7428
|
}
|
|
7029
7429
|
internals.setFormValue(this.checked ? this.value : null);
|
|
7030
|
-
const flags = {
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
flags.customError = true;
|
|
7037
|
-
}
|
|
7038
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
7430
|
+
const { flags, message } = resolveValidity({
|
|
7431
|
+
required: this.required,
|
|
7432
|
+
empty: !this.checked,
|
|
7433
|
+
invalid: this.invalid,
|
|
7434
|
+
errorMessage: this.errorMessage,
|
|
7435
|
+
});
|
|
7039
7436
|
internals.setValidity(flags, message);
|
|
7040
7437
|
}
|
|
7041
7438
|
componentDidLoad() {
|
|
@@ -7064,7 +7461,7 @@ class ChSwitch {
|
|
|
7064
7461
|
return undefined;
|
|
7065
7462
|
}
|
|
7066
7463
|
render() {
|
|
7067
|
-
return (hAsync(Host, { key: '
|
|
7464
|
+
return (hAsync(Host, { key: '9a11339fb6204a2166dde9d71e30408ddd078512' }, hAsync("label", { key: '6fb1c2ac4a61f1ac731c2093837a5813f82f5dbd', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, hAsync("input", { key: '5a131871ae9c0c6ed0657e8a8371d08146566cb9', 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 || this.formDisabled, 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: '5bf51dac83b3c2ba33e53b91fb3ec7819a5b8f24', class: "track" }, hAsync("span", { key: '2d130d6e369664c76b337cd39d61f14be534cf66', class: "thumb" })), this.label && hAsync("span", { key: 'e0552b9932018f6fbe7a0545db644846792cb1dc', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'd9a5ecbdff8e1b8ab5ee94cb2f02b796627e5991', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '2bcb7c3fc272b248aa0a52194d6cc97d7ec2615b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7068
7465
|
}
|
|
7069
7466
|
static get formAssociated() { return true; }
|
|
7070
7467
|
static get watchers() { return {
|
|
@@ -7187,7 +7584,7 @@ class ChTabs {
|
|
|
7187
7584
|
}
|
|
7188
7585
|
render() {
|
|
7189
7586
|
const active = this.activeValue;
|
|
7190
|
-
return (hAsync(Host, { key: '
|
|
7587
|
+
return (hAsync(Host, { key: '4dfeb1c42a7dd10d73e6372da15649eae502e565' }, hAsync("div", { key: '1c75500e73377920e3629734316c103b8c0b2a60', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
7191
7588
|
const selected = tab.value === active;
|
|
7192
7589
|
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));
|
|
7193
7590
|
})), 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}` }))))));
|
|
@@ -7295,15 +7692,12 @@ class ChTextarea {
|
|
|
7295
7692
|
return;
|
|
7296
7693
|
}
|
|
7297
7694
|
internals.setFormValue(this.value);
|
|
7298
|
-
const flags = {
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
flags.customError = true;
|
|
7305
|
-
}
|
|
7306
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
7695
|
+
const { flags, message } = resolveValidity({
|
|
7696
|
+
required: this.required,
|
|
7697
|
+
empty: this.value === '',
|
|
7698
|
+
invalid: this.invalid,
|
|
7699
|
+
errorMessage: this.errorMessage,
|
|
7700
|
+
});
|
|
7307
7701
|
internals.setValidity(flags, message);
|
|
7308
7702
|
}
|
|
7309
7703
|
componentDidLoad() {
|
|
@@ -7332,7 +7726,7 @@ class ChTextarea {
|
|
|
7332
7726
|
return undefined;
|
|
7333
7727
|
}
|
|
7334
7728
|
render() {
|
|
7335
|
-
return (hAsync(Host, { key: '
|
|
7729
|
+
return (hAsync(Host, { key: '0c7cb5ba7d3ccc84286a7cef5ca4208aa248c11b' }, this.label && (hAsync("label", { key: 'a8b5e1e97394ab822cd43b8d70683e4add572d59', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: '979f0a57566fdf8d0d946a9120b2431863f69ce4', 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 || this.formDisabled, 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: 'ca0e931102deaf36d9524f889d93a72850f70a63', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '595add930eedf5675c7a2aacd45d891fb8edb0f0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7336
7730
|
}
|
|
7337
7731
|
static get formAssociated() { return true; }
|
|
7338
7732
|
static get watchers() { return {
|
|
@@ -7457,7 +7851,7 @@ class ChTooltip {
|
|
|
7457
7851
|
trigger.setAttribute('aria-describedby', content.id);
|
|
7458
7852
|
};
|
|
7459
7853
|
render() {
|
|
7460
|
-
return (hAsync(Host, { key: '
|
|
7854
|
+
return (hAsync(Host, { key: 'e05ba1cdb8f3ee499762a04c8271c772c7cbe201' }, hAsync("span", { key: 'c5a0bd2f6107e99114fc9328a3f731dfe59753d4', class: "anchor" }, hAsync("slot", { key: 'ffd09d90395e2ffb2349e7d2eb8e349b2a7991b8', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: '4af10e86d9f61e2defef8b86df3ba55f280acd91', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, hAsync("slot", { key: '047ba42d8846f43d31823318258f1761f15efc64', name: "content", onSlotchange: this.associate })))));
|
|
7461
7855
|
}
|
|
7462
7856
|
static get style() { return chTooltipCss(); }
|
|
7463
7857
|
static get cmpMeta() { return {
|
|
@@ -7482,16 +7876,21 @@ registerComponents([
|
|
|
7482
7876
|
ChButton,
|
|
7483
7877
|
ChCard,
|
|
7484
7878
|
ChCheckbox,
|
|
7879
|
+
ChCluster,
|
|
7485
7880
|
ChDivider,
|
|
7486
7881
|
ChDrawer,
|
|
7487
7882
|
ChEmoji,
|
|
7883
|
+
ChEmptyState,
|
|
7884
|
+
ChGrid,
|
|
7488
7885
|
ChInput,
|
|
7489
7886
|
ChLink,
|
|
7490
7887
|
ChModal,
|
|
7491
7888
|
ChRadio,
|
|
7492
7889
|
ChSegmentedControl,
|
|
7493
7890
|
ChSelect,
|
|
7891
|
+
ChSkeleton,
|
|
7494
7892
|
ChSpinner,
|
|
7893
|
+
ChStack,
|
|
7495
7894
|
ChSwitch,
|
|
7496
7895
|
ChTabs,
|
|
7497
7896
|
ChTextarea,
|
|
@@ -7502,7 +7901,7 @@ exports.hydrateApp = hydrateApp;
|
|
|
7502
7901
|
|
|
7503
7902
|
|
|
7504
7903
|
/*hydrateAppClosure end*/
|
|
7505
|
-
hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve);
|
|
7904
|
+
hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve, $stencilAbortController);
|
|
7506
7905
|
}
|
|
7507
7906
|
|
|
7508
7907
|
hydrateAppClosure($stencilWindow);
|
|
@@ -7597,7 +7996,7 @@ var NAMESPACE = (
|
|
|
7597
7996
|
);
|
|
7598
7997
|
|
|
7599
7998
|
/*
|
|
7600
|
-
Stencil Hydrate Runner v4.
|
|
7999
|
+
Stencil Hydrate Runner v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
7601
8000
|
*/
|
|
7602
8001
|
var __create = Object.create;
|
|
7603
8002
|
var __defProp = Object.defineProperty;
|
|
@@ -21744,11 +22143,14 @@ function resetWindow(win2) {
|
|
|
21744
22143
|
} catch (e) {
|
|
21745
22144
|
}
|
|
21746
22145
|
}
|
|
21747
|
-
|
|
21748
|
-
|
|
21749
|
-
|
|
21750
|
-
win2.
|
|
21751
|
-
win2.
|
|
22146
|
+
const windowDestroyed = () => {
|
|
22147
|
+
throw new Error("MockWindow was already destroyed");
|
|
22148
|
+
};
|
|
22149
|
+
win2.fetch = windowDestroyed;
|
|
22150
|
+
win2.Headers = windowDestroyed;
|
|
22151
|
+
win2.Request = windowDestroyed;
|
|
22152
|
+
win2.Response = windowDestroyed;
|
|
22153
|
+
win2.FetchError = windowDestroyed;
|
|
21752
22154
|
}
|
|
21753
22155
|
}
|
|
21754
22156
|
function resetWindowDimensions(win2) {
|
|
@@ -22148,9 +22550,6 @@ var _cssColonHostContextRe = new RegExp("(" + _polyfillHostContext + _parenSuffi
|
|
|
22148
22550
|
var _cssColonSlottedRe = new RegExp("(" + _polyfillSlotted + _parenSuffix, "gim");
|
|
22149
22551
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
22150
22552
|
|
|
22151
|
-
// src/runtime/mode.ts
|
|
22152
|
-
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
22153
|
-
|
|
22154
22553
|
// src/utils/local-value.ts
|
|
22155
22554
|
var LocalValue = class _LocalValue {
|
|
22156
22555
|
type;
|
|
@@ -24227,6 +24626,37 @@ var relocateMetaCharset = (doc) => {
|
|
|
24227
24626
|
};
|
|
24228
24627
|
|
|
24229
24628
|
// src/compiler/style/css-parser/parse-css.ts
|
|
24629
|
+
var splitSelectorList = (selectors) => {
|
|
24630
|
+
const parts = [];
|
|
24631
|
+
let depth = 0;
|
|
24632
|
+
let quote = null;
|
|
24633
|
+
let start = 0;
|
|
24634
|
+
for (let i = 0; i < selectors.length; i++) {
|
|
24635
|
+
const ch = selectors[i];
|
|
24636
|
+
if (quote) {
|
|
24637
|
+
if (ch === "\\") {
|
|
24638
|
+
i++;
|
|
24639
|
+
} else if (ch === quote) {
|
|
24640
|
+
quote = null;
|
|
24641
|
+
}
|
|
24642
|
+
continue;
|
|
24643
|
+
}
|
|
24644
|
+
if (ch === '"' || ch === "'") {
|
|
24645
|
+
quote = ch;
|
|
24646
|
+
} else if (ch === "\\") {
|
|
24647
|
+
i++;
|
|
24648
|
+
} else if (ch === "(") {
|
|
24649
|
+
depth++;
|
|
24650
|
+
} else if (ch === ")") {
|
|
24651
|
+
depth = Math.max(0, depth - 1);
|
|
24652
|
+
} else if (ch === "," && depth === 0) {
|
|
24653
|
+
parts.push(selectors.slice(start, i));
|
|
24654
|
+
start = i + 1;
|
|
24655
|
+
}
|
|
24656
|
+
}
|
|
24657
|
+
parts.push(selectors.slice(start));
|
|
24658
|
+
return parts.map((s) => s.trim());
|
|
24659
|
+
};
|
|
24230
24660
|
var parseCss = (css, filePath) => {
|
|
24231
24661
|
let lineno = 1;
|
|
24232
24662
|
let column = 1;
|
|
@@ -24348,11 +24778,8 @@ var parseCss = (css, filePath) => {
|
|
|
24348
24778
|
const selector = () => {
|
|
24349
24779
|
const m = match2(/^([^{]+)/);
|
|
24350
24780
|
if (!m) return null;
|
|
24351
|
-
|
|
24352
|
-
|
|
24353
|
-
}).split(/\s*(?![^(]*\)),\s*/).map(function(s) {
|
|
24354
|
-
return s.replace(/\u200C/g, ",");
|
|
24355
|
-
});
|
|
24781
|
+
const cleaned = trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "");
|
|
24782
|
+
return splitSelectorList(cleaned);
|
|
24356
24783
|
};
|
|
24357
24784
|
const declaration = () => {
|
|
24358
24785
|
const pos = position();
|
|
@@ -25526,10 +25953,6 @@ async function render2(win2, opts, results) {
|
|
|
25526
25953
|
try {
|
|
25527
25954
|
await Promise.resolve(beforeHydrateFn(win2.document));
|
|
25528
25955
|
return new Promise((resolve) => {
|
|
25529
|
-
if (Array.isArray(opts.modes)) {
|
|
25530
|
-
modeResolutionChain.length = 0;
|
|
25531
|
-
opts.modes.forEach((mode) => setMode(mode));
|
|
25532
|
-
}
|
|
25533
25956
|
return hydrateFactory(win2, opts, results, afterHydrate, resolve);
|
|
25534
25957
|
});
|
|
25535
25958
|
} catch (e) {
|