@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.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var stream = require('stream');
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const modeResolver = [];
|
|
6
|
+
|
|
7
|
+
// captured here, at true module scope, before hydrateFactory shadows the
|
|
8
|
+
// AbortController identifier for component code below.
|
|
9
|
+
var $stencilNativeAbortController = AbortController;
|
|
6
10
|
|
|
7
11
|
function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve) {
|
|
8
12
|
var globalThis = $stencilWindow;
|
|
@@ -95,8 +99,46 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
95
99
|
|
|
96
100
|
var fetch, FetchError, Headers, Request, Response;
|
|
97
101
|
|
|
102
|
+
// Aborted when the render times out or errors, so in-flight fetch() calls
|
|
103
|
+
// made by component code stop holding the render's window/results alive
|
|
104
|
+
// instead of running to completion against a torn-down window. See #6864.
|
|
105
|
+
var $stencilAbortController = new $stencilNativeAbortController();
|
|
106
|
+
|
|
107
|
+
// Any AbortController a component creates itself is transparently wired to
|
|
108
|
+
// cascade-abort when the render times out too, so component code using the
|
|
109
|
+
// standard AbortController convention for its own cancellable work (axios,
|
|
110
|
+
// aws-sdk v3, the mongodb driver, etc.) gets cancelled automatically.
|
|
111
|
+
var AbortController = function () {
|
|
112
|
+
var controller = new $stencilNativeAbortController();
|
|
113
|
+
$stencilAbortController.signal.addEventListener(
|
|
114
|
+
'abort',
|
|
115
|
+
function () {
|
|
116
|
+
controller.abort();
|
|
117
|
+
},
|
|
118
|
+
{ once: true },
|
|
119
|
+
);
|
|
120
|
+
return controller;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
function $stencilFetchSignal(callerSignal) {
|
|
124
|
+
if (!callerSignal) {
|
|
125
|
+
return $stencilAbortController.signal;
|
|
126
|
+
}
|
|
127
|
+
if (callerSignal.aborted || $stencilAbortController.signal.aborted) {
|
|
128
|
+
return callerSignal.aborted ? callerSignal : $stencilAbortController.signal;
|
|
129
|
+
}
|
|
130
|
+
var merged = new $stencilNativeAbortController();
|
|
131
|
+
var onAbort = function () { merged.abort(); };
|
|
132
|
+
callerSignal.addEventListener('abort', onAbort, { once: true });
|
|
133
|
+
$stencilAbortController.signal.addEventListener('abort', onAbort, { once: true });
|
|
134
|
+
return merged.signal;
|
|
135
|
+
}
|
|
136
|
+
|
|
98
137
|
if (typeof $stencilWindow.fetch === 'function') {
|
|
99
|
-
|
|
138
|
+
var $stencilRawFetch = $stencilWindow.fetch;
|
|
139
|
+
fetch = $stencilWindow.fetch = function(input, init) {
|
|
140
|
+
return $stencilRawFetch(input, Object.assign({}, init, { signal: $stencilFetchSignal(init && init.signal) }));
|
|
141
|
+
};
|
|
100
142
|
} else {
|
|
101
143
|
fetch = $stencilWindow.fetch = function() { throw new Error('fetch() is not implemented'); };
|
|
102
144
|
}
|
|
@@ -135,7 +177,7 @@ const NAMESPACE = 'chucao';
|
|
|
135
177
|
const BUILD = /* chucao */ { hotModuleReplacement: false, slotRelocation: true, state: true, updatable: true};
|
|
136
178
|
|
|
137
179
|
/*
|
|
138
|
-
Stencil Hydrate Platform v4.
|
|
180
|
+
Stencil Hydrate Platform v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
139
181
|
*/
|
|
140
182
|
var __create = Object.create;
|
|
141
183
|
var __defProp = Object.defineProperty;
|
|
@@ -1527,13 +1569,14 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
|
|
|
1527
1569
|
}
|
|
1528
1570
|
}).join(", ");
|
|
1529
1571
|
};
|
|
1572
|
+
var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
|
|
1530
1573
|
var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
1531
1574
|
return processRules(cssText, (rule) => {
|
|
1532
1575
|
let selector = rule.selector;
|
|
1533
1576
|
let content = rule.content;
|
|
1534
1577
|
if (rule.selector[0] !== "@") {
|
|
1535
1578
|
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
|
1536
|
-
} else if (
|
|
1579
|
+
} else if (isScopableAtRule(rule.selector)) {
|
|
1537
1580
|
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
|
|
1538
1581
|
}
|
|
1539
1582
|
const cssRule = {
|
|
@@ -1612,15 +1655,16 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
1612
1655
|
rule.selector = placeholder + rule.selector;
|
|
1613
1656
|
return rule;
|
|
1614
1657
|
};
|
|
1615
|
-
|
|
1658
|
+
const commentSelectors = (input) => processRules(input, (rule) => {
|
|
1616
1659
|
if (rule.selector[0] !== "@") {
|
|
1617
1660
|
return processCommentedSelector(rule);
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1661
|
+
}
|
|
1662
|
+
if (isScopableAtRule(rule.selector)) {
|
|
1663
|
+
rule.content = commentSelectors(rule.content);
|
|
1621
1664
|
}
|
|
1622
1665
|
return rule;
|
|
1623
1666
|
});
|
|
1667
|
+
cssText = commentSelectors(cssText);
|
|
1624
1668
|
}
|
|
1625
1669
|
const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId);
|
|
1626
1670
|
cssText = [scoped.cssText, ...commentsWithHash].join("\n");
|
|
@@ -1636,6 +1680,8 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
|
|
|
1636
1680
|
cssText = expandPartSelectors(cssText);
|
|
1637
1681
|
return cssText;
|
|
1638
1682
|
};
|
|
1683
|
+
var setMode = (handler) => {
|
|
1684
|
+
};
|
|
1639
1685
|
|
|
1640
1686
|
// src/runtime/normalize-watchers.ts
|
|
1641
1687
|
var normalizeWatchers = (raw) => {
|
|
@@ -1843,6 +1889,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
1843
1889
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
1844
1890
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
1845
1891
|
}
|
|
1892
|
+
} else if (memberName === "style") {
|
|
1893
|
+
{
|
|
1894
|
+
for (const prop in oldValue) {
|
|
1895
|
+
if (!newValue || newValue[prop] == null) {
|
|
1896
|
+
{
|
|
1897
|
+
elm.style[prop] = "";
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
for (const prop in newValue) {
|
|
1903
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1904
|
+
{
|
|
1905
|
+
elm.style[prop] = newValue[prop];
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1846
1909
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1847
1910
|
if (newValue) {
|
|
1848
1911
|
queueRefAttachment(newValue, elm);
|
|
@@ -2213,7 +2276,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2213
2276
|
if (idxInOld >= 0) {
|
|
2214
2277
|
elmToMove = oldCh[idxInOld];
|
|
2215
2278
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
2216
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
2279
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
2217
2280
|
} else {
|
|
2218
2281
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
2219
2282
|
oldCh[idxInOld] = void 0;
|
|
@@ -4951,7 +5014,7 @@ function forceUpdate2() {
|
|
|
4951
5014
|
}
|
|
4952
5015
|
|
|
4953
5016
|
// src/hydrate/platform/hydrate-app.ts
|
|
4954
|
-
function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
5017
|
+
function hydrateApp(win2, opts, results, afterHydrate, resolve, abortController) {
|
|
4955
5018
|
const connectedElements = /* @__PURE__ */ new Set();
|
|
4956
5019
|
const createdElements = /* @__PURE__ */ new Set();
|
|
4957
5020
|
const waitingElements = /* @__PURE__ */ new Set();
|
|
@@ -4961,6 +5024,13 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
4961
5024
|
setScopedSSR(opts);
|
|
4962
5025
|
let tmrId;
|
|
4963
5026
|
let ranCompleted = false;
|
|
5027
|
+
const abortedPromise = new Promise((res) => {
|
|
5028
|
+
if (abortController.signal.aborted) {
|
|
5029
|
+
res();
|
|
5030
|
+
} else {
|
|
5031
|
+
abortController.signal.addEventListener("abort", () => res(), { once: true });
|
|
5032
|
+
}
|
|
5033
|
+
});
|
|
4964
5034
|
function hydratedComplete() {
|
|
4965
5035
|
globalThis.clearTimeout(tmrId);
|
|
4966
5036
|
createdElements.clear();
|
|
@@ -4982,6 +5052,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
4982
5052
|
}
|
|
4983
5053
|
function hydratedError(err2) {
|
|
4984
5054
|
renderCatchError(opts, results, err2);
|
|
5055
|
+
abortController.abort();
|
|
4985
5056
|
hydratedComplete();
|
|
4986
5057
|
}
|
|
4987
5058
|
function timeoutExceeded() {
|
|
@@ -5027,7 +5098,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
5027
5098
|
if (isValidComponent(elm, opts) && results.hydratedCount < opts.maxHydrateCount) {
|
|
5028
5099
|
if (!connectedElements.has(elm) && shouldHydrate(elm)) {
|
|
5029
5100
|
connectedElements.add(elm);
|
|
5030
|
-
return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements);
|
|
5101
|
+
return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements, abortedPromise);
|
|
5031
5102
|
}
|
|
5032
5103
|
}
|
|
5033
5104
|
return resolved2;
|
|
@@ -5050,13 +5121,16 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
5050
5121
|
};
|
|
5051
5122
|
tmrId = globalThis.setTimeout(timeoutExceeded, opts.timeout);
|
|
5052
5123
|
plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./", win2.document.baseURI).href;
|
|
5124
|
+
if (Array.isArray(opts.modes)) {
|
|
5125
|
+
opts.modes.forEach((mode) => setMode());
|
|
5126
|
+
}
|
|
5053
5127
|
patchChild2(win2.document.body);
|
|
5054
5128
|
waitLoop2().then(hydratedComplete).catch(hydratedError);
|
|
5055
5129
|
} catch (e) {
|
|
5056
5130
|
hydratedError(e);
|
|
5057
5131
|
}
|
|
5058
5132
|
}
|
|
5059
|
-
async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
|
|
5133
|
+
async function hydrateComponent(win2, results, tagName, elm, waitingElements, aborted) {
|
|
5060
5134
|
tagName = tagName.toLowerCase();
|
|
5061
5135
|
const Cstr = loadModule(
|
|
5062
5136
|
{
|
|
@@ -5072,17 +5146,19 @@ async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
|
|
|
5072
5146
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
5073
5147
|
try {
|
|
5074
5148
|
connectedCallback(elm);
|
|
5075
|
-
await elm.componentOnReady();
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
results.components.
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5149
|
+
const wasAborted = await Promise.race([elm.componentOnReady().then(() => false), aborted.then(() => true)]);
|
|
5150
|
+
if (!wasAborted) {
|
|
5151
|
+
results.hydratedCount++;
|
|
5152
|
+
const ref = getHostRef(elm);
|
|
5153
|
+
const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
|
|
5154
|
+
if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
|
|
5155
|
+
results.components.push({
|
|
5156
|
+
tag: tagName,
|
|
5157
|
+
mode: modeName,
|
|
5158
|
+
count: 0,
|
|
5159
|
+
depth: -1
|
|
5160
|
+
});
|
|
5161
|
+
}
|
|
5086
5162
|
}
|
|
5087
5163
|
} catch (e) {
|
|
5088
5164
|
win2.console.error(e);
|
|
@@ -5461,6 +5537,18 @@ class ChBadge {
|
|
|
5461
5537
|
}; }
|
|
5462
5538
|
}
|
|
5463
5539
|
|
|
5540
|
+
function hasLightDomText(host) {
|
|
5541
|
+
return Array.from(host.childNodes).some(child => {
|
|
5542
|
+
if (child.nodeType !== 3 && child.nodeType !== 1) {
|
|
5543
|
+
return false;
|
|
5544
|
+
}
|
|
5545
|
+
if (child.nodeType === 1 && child.hasAttribute('slot')) {
|
|
5546
|
+
return false;
|
|
5547
|
+
}
|
|
5548
|
+
return (child.textContent ?? '').trim() !== '';
|
|
5549
|
+
});
|
|
5550
|
+
}
|
|
5551
|
+
|
|
5464
5552
|
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)))}`;
|
|
5465
5553
|
|
|
5466
5554
|
class ChButton {
|
|
@@ -5468,6 +5556,7 @@ class ChButton {
|
|
|
5468
5556
|
registerInstance(this, hostRef);
|
|
5469
5557
|
this.chClick = createEvent(this, "chClick");
|
|
5470
5558
|
}
|
|
5559
|
+
get el() { return getElement(this); }
|
|
5471
5560
|
/**
|
|
5472
5561
|
* The visual style of the button. One of `primary`, `secondary`, `ghost`,
|
|
5473
5562
|
* or `danger`.
|
|
@@ -5500,7 +5589,8 @@ class ChButton {
|
|
|
5500
5589
|
/**
|
|
5501
5590
|
* Accessible label set as `aria-label` on the native element. Use it when
|
|
5502
5591
|
* the button's content doesn't convey its purpose on its own (e.g. an
|
|
5503
|
-
* icon-only button).
|
|
5592
|
+
* icon-only button). Omitting it on an icon-only button logs a warning in
|
|
5593
|
+
* development builds.
|
|
5504
5594
|
*/
|
|
5505
5595
|
label;
|
|
5506
5596
|
/**
|
|
@@ -5521,6 +5611,7 @@ class ChButton {
|
|
|
5521
5611
|
return [this.loading ? hAsync("ch-spinner", { size: this.spinnerSize }) : hAsync("slot", { name: "start" }), hAsync("slot", null), hAsync("slot", { name: "end" })];
|
|
5522
5612
|
}
|
|
5523
5613
|
render() {
|
|
5614
|
+
if (!this.label && !hasLightDomText(this.el)) ;
|
|
5524
5615
|
const classes = {
|
|
5525
5616
|
'btn': true,
|
|
5526
5617
|
[`btn--${this.variant}`]: true,
|
|
@@ -5561,7 +5652,7 @@ class ChCard {
|
|
|
5561
5652
|
registerInstance(this, hostRef);
|
|
5562
5653
|
}
|
|
5563
5654
|
render() {
|
|
5564
|
-
return (hAsync(Host, { key: '
|
|
5655
|
+
return (hAsync(Host, { key: '6c580300a397e9ebdab80b8fe470c000bdde13c2' }, hAsync("div", { key: '9601023775e7dea48da78b45c6743df8d3d88f44', class: "card" }, hAsync("slot", { key: '16fff3c0a071db7b54a69fd661513647463072fc' }))));
|
|
5565
5656
|
}
|
|
5566
5657
|
static get style() { return chCardCss(); }
|
|
5567
5658
|
static get cmpMeta() { return {
|
|
@@ -5574,6 +5665,26 @@ class ChCard {
|
|
|
5574
5665
|
}; }
|
|
5575
5666
|
}
|
|
5576
5667
|
|
|
5668
|
+
const VALUE_MISSING_MESSAGE = 'Please fill out this field.';
|
|
5669
|
+
/**
|
|
5670
|
+
* Turns a form control's state into the flags and message passed to
|
|
5671
|
+
* `ElementInternals.setValidity()`, so the six controls that mirror their
|
|
5672
|
+
* props into constraint validation cannot drift apart.
|
|
5673
|
+
*
|
|
5674
|
+
* A custom error wins over `valueMissing` for the message, matching the native
|
|
5675
|
+
* rule order, while both flags are reported when both apply.
|
|
5676
|
+
*/
|
|
5677
|
+
function resolveValidity({ required, empty, invalid, errorMessage }) {
|
|
5678
|
+
const flags = {};
|
|
5679
|
+
if (required && empty) {
|
|
5680
|
+
flags.valueMissing = true;
|
|
5681
|
+
}
|
|
5682
|
+
if (invalid && errorMessage) {
|
|
5683
|
+
flags.customError = true;
|
|
5684
|
+
}
|
|
5685
|
+
return { flags, message: errorMessage || (flags.valueMissing ? VALUE_MISSING_MESSAGE : undefined) };
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5577
5688
|
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)}`;
|
|
5578
5689
|
|
|
5579
5690
|
let checkboxIds = 0;
|
|
@@ -5648,15 +5759,12 @@ class ChCheckbox {
|
|
|
5648
5759
|
return;
|
|
5649
5760
|
}
|
|
5650
5761
|
internals.setFormValue(this.checked ? this.value : null);
|
|
5651
|
-
const flags = {
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
flags.customError = true;
|
|
5658
|
-
}
|
|
5659
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
5762
|
+
const { flags, message } = resolveValidity({
|
|
5763
|
+
required: this.required,
|
|
5764
|
+
empty: !this.checked,
|
|
5765
|
+
invalid: this.invalid,
|
|
5766
|
+
errorMessage: this.errorMessage,
|
|
5767
|
+
});
|
|
5660
5768
|
internals.setValidity(flags, message);
|
|
5661
5769
|
}
|
|
5662
5770
|
componentDidLoad() {
|
|
@@ -5685,7 +5793,7 @@ class ChCheckbox {
|
|
|
5685
5793
|
return undefined;
|
|
5686
5794
|
}
|
|
5687
5795
|
render() {
|
|
5688
|
-
return (hAsync(Host, { key: '
|
|
5796
|
+
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))));
|
|
5689
5797
|
}
|
|
5690
5798
|
static get formAssociated() { return true; }
|
|
5691
5799
|
static get watchers() { return {
|
|
@@ -5724,6 +5832,62 @@ class ChCheckbox {
|
|
|
5724
5832
|
}; }
|
|
5725
5833
|
}
|
|
5726
5834
|
|
|
5835
|
+
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}`;
|
|
5836
|
+
|
|
5837
|
+
const GAPS$2 = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
|
|
5838
|
+
/**
|
|
5839
|
+
* Horizontal flow that wraps when it runs out of room, with a token-driven
|
|
5840
|
+
* gap in both axes — the layout a toolbar, a tag list or a button row needs.
|
|
5841
|
+
*/
|
|
5842
|
+
class ChCluster {
|
|
5843
|
+
constructor(hostRef) {
|
|
5844
|
+
registerInstance(this, hostRef);
|
|
5845
|
+
}
|
|
5846
|
+
/**
|
|
5847
|
+
* Space between children in both axes, as a step of the spacing scale
|
|
5848
|
+
* (`2xs` … `6xl`), or `none`. An unknown value falls back to `md`.
|
|
5849
|
+
*/
|
|
5850
|
+
gap = 'md';
|
|
5851
|
+
/**
|
|
5852
|
+
* Cross-axis alignment of the children.
|
|
5853
|
+
*/
|
|
5854
|
+
align = 'center';
|
|
5855
|
+
/**
|
|
5856
|
+
* Main-axis distribution of the children.
|
|
5857
|
+
*/
|
|
5858
|
+
justify = 'start';
|
|
5859
|
+
/**
|
|
5860
|
+
* Whether the children wrap onto a new line when they run out of room.
|
|
5861
|
+
*/
|
|
5862
|
+
wrap = true;
|
|
5863
|
+
get gapStep() {
|
|
5864
|
+
return GAPS$2.has(this.gap) ? this.gap : 'md';
|
|
5865
|
+
}
|
|
5866
|
+
render() {
|
|
5867
|
+
return (hAsync(Host, { key: 'c1220f3c278df07c4b2008684b0dd44830cc8654', class: {
|
|
5868
|
+
'cluster': true,
|
|
5869
|
+
[`cluster--gap-${this.gapStep}`]: true,
|
|
5870
|
+
[`cluster--align-${this.align}`]: true,
|
|
5871
|
+
[`cluster--justify-${this.justify}`]: true,
|
|
5872
|
+
'cluster--nowrap': !this.wrap,
|
|
5873
|
+
} }, hAsync("slot", { key: 'b25c1b342bf5edf9202395cffc9abf427113c076' })));
|
|
5874
|
+
}
|
|
5875
|
+
static get style() { return chClusterCss(); }
|
|
5876
|
+
static get cmpMeta() { return {
|
|
5877
|
+
"$flags$": 777,
|
|
5878
|
+
"$tagName$": "ch-cluster",
|
|
5879
|
+
"$members$": {
|
|
5880
|
+
"gap": [1],
|
|
5881
|
+
"align": [1],
|
|
5882
|
+
"justify": [1],
|
|
5883
|
+
"wrap": [4]
|
|
5884
|
+
},
|
|
5885
|
+
"$listeners$": undefined,
|
|
5886
|
+
"$lazyBundleId$": "-",
|
|
5887
|
+
"$attrsToReflect$": []
|
|
5888
|
+
}; }
|
|
5889
|
+
}
|
|
5890
|
+
|
|
5727
5891
|
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%}`;
|
|
5728
5892
|
|
|
5729
5893
|
class ChDivider {
|
|
@@ -5735,7 +5899,7 @@ class ChDivider {
|
|
|
5735
5899
|
*/
|
|
5736
5900
|
orientation = 'horizontal';
|
|
5737
5901
|
render() {
|
|
5738
|
-
return (hAsync(Host, { key: '
|
|
5902
|
+
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 })));
|
|
5739
5903
|
}
|
|
5740
5904
|
static get style() { return chDividerCss(); }
|
|
5741
5905
|
static get cmpMeta() { return {
|
|
@@ -5813,6 +5977,7 @@ class ChDrawer {
|
|
|
5813
5977
|
this.chOpen = createEvent(this, "chOpen");
|
|
5814
5978
|
this.chClose = createEvent(this, "chClose");
|
|
5815
5979
|
}
|
|
5980
|
+
get el() { return getElement(this); }
|
|
5816
5981
|
/**
|
|
5817
5982
|
* Whether the drawer is open. Kept in sync when the user closes it with
|
|
5818
5983
|
* `Escape`, the close button or a click outside.
|
|
@@ -5827,7 +5992,7 @@ class ChDrawer {
|
|
|
5827
5992
|
* Accessible name for the drawer, set as `aria-label`. A slotted heading
|
|
5828
5993
|
* cannot be referenced with `aria-labelledby` across the shadow boundary, so
|
|
5829
5994
|
* the name comes through this prop — and a modal dialog needs one, so pass
|
|
5830
|
-
* the same text as the heading.
|
|
5995
|
+
* the same text as the heading. Omitting it logs a warning in development builds.
|
|
5831
5996
|
*/
|
|
5832
5997
|
label;
|
|
5833
5998
|
/**
|
|
@@ -5939,7 +6104,7 @@ class ChDrawer {
|
|
|
5939
6104
|
this.chClose.emit();
|
|
5940
6105
|
};
|
|
5941
6106
|
render() {
|
|
5942
|
-
return (hAsync(Host, { key: '
|
|
6107
|
+
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" }))));
|
|
5943
6108
|
}
|
|
5944
6109
|
static get watchers() { return {
|
|
5945
6110
|
"open": [{
|
|
@@ -6051,7 +6216,7 @@ class ChEmoji {
|
|
|
6051
6216
|
this.loaded = true;
|
|
6052
6217
|
};
|
|
6053
6218
|
render() {
|
|
6054
|
-
return (hAsync(Host, { key: '
|
|
6219
|
+
return (hAsync(Host, { key: '42f3336ba7ebd388abb55fc7b7cfbc65f6771c83' }, hAsync("img", { key: '6984f725514653ccaf36ebcb06bbb6ba79c8877f', class: {
|
|
6055
6220
|
'emoji': true,
|
|
6056
6221
|
[`emoji--${this.size}`]: true,
|
|
6057
6222
|
'emoji--hidden': !this.loaded,
|
|
@@ -6079,6 +6244,122 @@ class ChEmoji {
|
|
|
6079
6244
|
}; }
|
|
6080
6245
|
}
|
|
6081
6246
|
|
|
6247
|
+
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)}`;
|
|
6248
|
+
|
|
6249
|
+
/**
|
|
6250
|
+
* The standard "there is nothing here" block: an optional visual, a title, a
|
|
6251
|
+
* description and an action, laid out the same way everywhere.
|
|
6252
|
+
*
|
|
6253
|
+
* It works both inside a table cell and as a whole-page view: it fills its
|
|
6254
|
+
* container but never claims a fixed height.
|
|
6255
|
+
*/
|
|
6256
|
+
class ChEmptyState {
|
|
6257
|
+
constructor(hostRef) {
|
|
6258
|
+
registerInstance(this, hostRef);
|
|
6259
|
+
}
|
|
6260
|
+
/**
|
|
6261
|
+
* Short heading stating what is missing, used as the accessible name of the
|
|
6262
|
+
* block.
|
|
6263
|
+
*/
|
|
6264
|
+
title;
|
|
6265
|
+
/**
|
|
6266
|
+
* One or two sentences explaining what the user can do about it.
|
|
6267
|
+
*/
|
|
6268
|
+
description;
|
|
6269
|
+
/**
|
|
6270
|
+
* Visual density. `sm` is for a region inside a page (a card, a table cell),
|
|
6271
|
+
* `md` for a whole view.
|
|
6272
|
+
*/
|
|
6273
|
+
size = 'md';
|
|
6274
|
+
render() {
|
|
6275
|
+
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' })))));
|
|
6276
|
+
}
|
|
6277
|
+
static get style() { return chEmptyStateCss(); }
|
|
6278
|
+
static get cmpMeta() { return {
|
|
6279
|
+
"$flags$": 777,
|
|
6280
|
+
"$tagName$": "ch-empty-state",
|
|
6281
|
+
"$members$": {
|
|
6282
|
+
"title": [1],
|
|
6283
|
+
"description": [1],
|
|
6284
|
+
"size": [1]
|
|
6285
|
+
},
|
|
6286
|
+
"$listeners$": undefined,
|
|
6287
|
+
"$lazyBundleId$": "-",
|
|
6288
|
+
"$attrsToReflect$": []
|
|
6289
|
+
}; }
|
|
6290
|
+
}
|
|
6291
|
+
|
|
6292
|
+
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)}`;
|
|
6293
|
+
|
|
6294
|
+
const GAPS$1 = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
|
|
6295
|
+
/**
|
|
6296
|
+
* Responsive grid of equal cells.
|
|
6297
|
+
*
|
|
6298
|
+
* `columns` takes a fixed count (`1`…`12`) or `auto-fit`, which fits as many
|
|
6299
|
+
* columns as `min-item-width` allows into the available width. That second mode
|
|
6300
|
+
* is the one a card list almost always wants: it needs no breakpoints and no
|
|
6301
|
+
* media queries of its own.
|
|
6302
|
+
*/
|
|
6303
|
+
class ChGrid {
|
|
6304
|
+
constructor(hostRef) {
|
|
6305
|
+
registerInstance(this, hostRef);
|
|
6306
|
+
}
|
|
6307
|
+
get el() { return getElement(this); }
|
|
6308
|
+
/**
|
|
6309
|
+
* Number of equal columns (`1`…`12`), or `auto-fit` to fit as many as
|
|
6310
|
+
* `min-item-width` allows. An unknown value falls back to `auto-fit`.
|
|
6311
|
+
*/
|
|
6312
|
+
columns = 'auto-fit';
|
|
6313
|
+
/**
|
|
6314
|
+
* Space between cells in both axes, as a step of the spacing scale
|
|
6315
|
+
* (`2xs` … `6xl`), or `none`. An unknown value falls back to `md`.
|
|
6316
|
+
*/
|
|
6317
|
+
gap = 'md';
|
|
6318
|
+
/**
|
|
6319
|
+
* Smallest width a cell may take in `auto-fit` mode, as a CSS length. It also
|
|
6320
|
+
* caps the column count in fixed mode, so a cell never gets narrower than it.
|
|
6321
|
+
*/
|
|
6322
|
+
minItemWidth = '16rem';
|
|
6323
|
+
get gapStep() {
|
|
6324
|
+
return GAPS$1.has(this.gap) ? this.gap : 'md';
|
|
6325
|
+
}
|
|
6326
|
+
get fixedColumns() {
|
|
6327
|
+
const count = Number(this.columns);
|
|
6328
|
+
return Number.isInteger(count) && count >= 1 && count <= 12 ? count : null;
|
|
6329
|
+
}
|
|
6330
|
+
componentWillLoad() {
|
|
6331
|
+
this.applyColumns();
|
|
6332
|
+
}
|
|
6333
|
+
componentDidUpdate() {
|
|
6334
|
+
this.applyColumns();
|
|
6335
|
+
}
|
|
6336
|
+
/**
|
|
6337
|
+
* The column template is written as a CSS custom property rather than an
|
|
6338
|
+
* inline style: the template carries a comma and an internal `1fr`, and a
|
|
6339
|
+
* custom property keeps it out of the style string Stencil parses.
|
|
6340
|
+
*/
|
|
6341
|
+
applyColumns() {
|
|
6342
|
+
const template = this.fixedColumns === null ? `repeat(auto-fit, minmax(min(${this.minItemWidth}, 100%), 1fr))` : `repeat(${this.fixedColumns}, minmax(0, 1fr))`;
|
|
6343
|
+
this.el.style.setProperty('--ch-grid-columns', template);
|
|
6344
|
+
}
|
|
6345
|
+
render() {
|
|
6346
|
+
return (hAsync(Host, { key: '62473c599b185ea190f3d1349c5ac096cc07f453', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, hAsync("slot", { key: 'a05391e90211544058afcea9353a232617e2edfd' })));
|
|
6347
|
+
}
|
|
6348
|
+
static get style() { return chGridCss(); }
|
|
6349
|
+
static get cmpMeta() { return {
|
|
6350
|
+
"$flags$": 777,
|
|
6351
|
+
"$tagName$": "ch-grid",
|
|
6352
|
+
"$members$": {
|
|
6353
|
+
"columns": [1],
|
|
6354
|
+
"gap": [1],
|
|
6355
|
+
"minItemWidth": [1, "min-item-width"]
|
|
6356
|
+
},
|
|
6357
|
+
"$listeners$": undefined,
|
|
6358
|
+
"$lazyBundleId$": "-",
|
|
6359
|
+
"$attrsToReflect$": []
|
|
6360
|
+
}; }
|
|
6361
|
+
}
|
|
6362
|
+
|
|
6082
6363
|
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)}`;
|
|
6083
6364
|
|
|
6084
6365
|
let inputIds = 0;
|
|
@@ -6166,15 +6447,12 @@ class ChInput {
|
|
|
6166
6447
|
return;
|
|
6167
6448
|
}
|
|
6168
6449
|
internals.setFormValue(this.value);
|
|
6169
|
-
const flags = {
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
flags.customError = true;
|
|
6176
|
-
}
|
|
6177
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
6450
|
+
const { flags, message } = resolveValidity({
|
|
6451
|
+
required: this.required,
|
|
6452
|
+
empty: this.value === '',
|
|
6453
|
+
invalid: this.invalid,
|
|
6454
|
+
errorMessage: this.errorMessage,
|
|
6455
|
+
});
|
|
6178
6456
|
internals.setValidity(flags, message);
|
|
6179
6457
|
}
|
|
6180
6458
|
componentDidLoad() {
|
|
@@ -6203,7 +6481,7 @@ class ChInput {
|
|
|
6203
6481
|
return undefined;
|
|
6204
6482
|
}
|
|
6205
6483
|
render() {
|
|
6206
|
-
return (hAsync(Host, { key: '
|
|
6484
|
+
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))));
|
|
6207
6485
|
}
|
|
6208
6486
|
static get formAssociated() { return true; }
|
|
6209
6487
|
static get watchers() { return {
|
|
@@ -6297,7 +6575,7 @@ class ChLink {
|
|
|
6297
6575
|
}; }
|
|
6298
6576
|
}
|
|
6299
6577
|
|
|
6300
|
-
const chModalCss = () => `.modal{box-sizing:border-box;max-
|
|
6578
|
+
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}}`;
|
|
6301
6579
|
|
|
6302
6580
|
/**
|
|
6303
6581
|
* Modal dialog, built on the native `<dialog>` element and opened with
|
|
@@ -6323,6 +6601,7 @@ class ChModal {
|
|
|
6323
6601
|
this.chOpen = createEvent(this, "chOpen");
|
|
6324
6602
|
this.chClose = createEvent(this, "chClose");
|
|
6325
6603
|
}
|
|
6604
|
+
get el() { return getElement(this); }
|
|
6326
6605
|
/**
|
|
6327
6606
|
* Whether the dialog is open. Kept in sync when the user closes it with
|
|
6328
6607
|
* `Escape`, the close button or a click outside.
|
|
@@ -6332,7 +6611,7 @@ class ChModal {
|
|
|
6332
6611
|
* Accessible name for the dialog, set as `aria-label`. A slotted heading
|
|
6333
6612
|
* cannot be referenced with `aria-labelledby` across the shadow boundary, so
|
|
6334
6613
|
* the name comes through this prop — and a modal dialog needs one, so pass
|
|
6335
|
-
* the same text as the heading.
|
|
6614
|
+
* the same text as the heading. Omitting it logs a warning in development builds.
|
|
6336
6615
|
*/
|
|
6337
6616
|
label;
|
|
6338
6617
|
/**
|
|
@@ -6341,6 +6620,13 @@ class ChModal {
|
|
|
6341
6620
|
* label it would have no accessible name.
|
|
6342
6621
|
*/
|
|
6343
6622
|
closeLabel;
|
|
6623
|
+
/**
|
|
6624
|
+
* The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or
|
|
6625
|
+
* `lg` (48rem). The `--ch-modal-width` custom property overrides it for a
|
|
6626
|
+
* width none of the three cover. Either way the dialog never exceeds the
|
|
6627
|
+
* viewport.
|
|
6628
|
+
*/
|
|
6629
|
+
size = 'md';
|
|
6344
6630
|
/**
|
|
6345
6631
|
* Emitted after the dialog opens.
|
|
6346
6632
|
*/
|
|
@@ -6444,7 +6730,7 @@ class ChModal {
|
|
|
6444
6730
|
this.chClose.emit();
|
|
6445
6731
|
};
|
|
6446
6732
|
render() {
|
|
6447
|
-
return (hAsync(Host, { key: '
|
|
6733
|
+
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' })))));
|
|
6448
6734
|
}
|
|
6449
6735
|
static get watchers() { return {
|
|
6450
6736
|
"open": [{
|
|
@@ -6458,7 +6744,8 @@ class ChModal {
|
|
|
6458
6744
|
"$members$": {
|
|
6459
6745
|
"open": [1028],
|
|
6460
6746
|
"label": [1],
|
|
6461
|
-
"closeLabel": [1, "close-label"]
|
|
6747
|
+
"closeLabel": [1, "close-label"],
|
|
6748
|
+
"size": [1]
|
|
6462
6749
|
},
|
|
6463
6750
|
"$listeners$": undefined,
|
|
6464
6751
|
"$lazyBundleId$": "-",
|
|
@@ -6542,15 +6829,12 @@ class ChRadio {
|
|
|
6542
6829
|
return;
|
|
6543
6830
|
}
|
|
6544
6831
|
internals.setFormValue(this.value ?? null);
|
|
6545
|
-
const flags = {
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
flags.customError = true;
|
|
6552
|
-
}
|
|
6553
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
6832
|
+
const { flags, message } = resolveValidity({
|
|
6833
|
+
required: this.required,
|
|
6834
|
+
empty: !this.value,
|
|
6835
|
+
invalid: this.invalid,
|
|
6836
|
+
errorMessage: this.errorMessage,
|
|
6837
|
+
});
|
|
6554
6838
|
internals.setValidity(flags, message);
|
|
6555
6839
|
}
|
|
6556
6840
|
componentDidLoad() {
|
|
@@ -6580,7 +6864,7 @@ class ChRadio {
|
|
|
6580
6864
|
}
|
|
6581
6865
|
render() {
|
|
6582
6866
|
const groupName = this.name || `${this.groupId}-group`;
|
|
6583
|
-
return (hAsync(Host, { key: '
|
|
6867
|
+
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))));
|
|
6584
6868
|
}
|
|
6585
6869
|
static get formAssociated() { return true; }
|
|
6586
6870
|
static get watchers() { return {
|
|
@@ -6700,11 +6984,11 @@ class ChSegmentedControl {
|
|
|
6700
6984
|
return;
|
|
6701
6985
|
}
|
|
6702
6986
|
internals.setFormValue(this.value ?? null);
|
|
6703
|
-
const flags = {
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
}
|
|
6707
|
-
internals.setValidity(flags,
|
|
6987
|
+
const { flags, message } = resolveValidity({
|
|
6988
|
+
required: this.required,
|
|
6989
|
+
empty: !this.value,
|
|
6990
|
+
});
|
|
6991
|
+
internals.setValidity(flags, message);
|
|
6708
6992
|
}
|
|
6709
6993
|
componentDidLoad() {
|
|
6710
6994
|
this.initialValue = this.value;
|
|
@@ -6724,7 +7008,7 @@ class ChSegmentedControl {
|
|
|
6724
7008
|
}
|
|
6725
7009
|
render() {
|
|
6726
7010
|
const groupName = this.name || `${this.groupId}-group`;
|
|
6727
|
-
return (hAsync(Host, { key: '
|
|
7011
|
+
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)))))));
|
|
6728
7012
|
}
|
|
6729
7013
|
static get formAssociated() { return true; }
|
|
6730
7014
|
static get watchers() { return {
|
|
@@ -6833,15 +7117,12 @@ class ChSelect {
|
|
|
6833
7117
|
return;
|
|
6834
7118
|
}
|
|
6835
7119
|
internals.setFormValue(this.value ?? '');
|
|
6836
|
-
const flags = {
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
flags.customError = true;
|
|
6843
|
-
}
|
|
6844
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
7120
|
+
const { flags, message } = resolveValidity({
|
|
7121
|
+
required: this.required,
|
|
7122
|
+
empty: !this.value,
|
|
7123
|
+
invalid: this.invalid,
|
|
7124
|
+
errorMessage: this.errorMessage,
|
|
7125
|
+
});
|
|
6845
7126
|
internals.setValidity(flags, message);
|
|
6846
7127
|
}
|
|
6847
7128
|
componentDidLoad() {
|
|
@@ -6870,7 +7151,7 @@ class ChSelect {
|
|
|
6870
7151
|
return undefined;
|
|
6871
7152
|
}
|
|
6872
7153
|
render() {
|
|
6873
|
-
return (hAsync(Host, { key: '
|
|
7154
|
+
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))));
|
|
6874
7155
|
}
|
|
6875
7156
|
static get formAssociated() { return true; }
|
|
6876
7157
|
static get watchers() { return {
|
|
@@ -6910,6 +7191,78 @@ class ChSelect {
|
|
|
6910
7191
|
}; }
|
|
6911
7192
|
}
|
|
6912
7193
|
|
|
7194
|
+
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}}`;
|
|
7195
|
+
|
|
7196
|
+
/**
|
|
7197
|
+
* Decorative loading placeholder that reserves the space real content will
|
|
7198
|
+
* take, so the page does not jump when the data arrives.
|
|
7199
|
+
*
|
|
7200
|
+
* It stays out of the accessibility tree on purpose: a screen reader should
|
|
7201
|
+
* hear nothing about a placeholder. Mark the region that is actually loading
|
|
7202
|
+
* with `aria-busy="true"` yourself, and announce the result when it lands.
|
|
7203
|
+
*/
|
|
7204
|
+
class ChSkeleton {
|
|
7205
|
+
constructor(hostRef) {
|
|
7206
|
+
registerInstance(this, hostRef);
|
|
7207
|
+
}
|
|
7208
|
+
/**
|
|
7209
|
+
* Width of a placeholder. For `line` and `rect` it is a CSS length or a
|
|
7210
|
+
* percentage; `circle` is square, so this sets its diameter too.
|
|
7211
|
+
*/
|
|
7212
|
+
width = '100%';
|
|
7213
|
+
/**
|
|
7214
|
+
* Height of a placeholder, as a CSS length. Ignored by `circle`, which is
|
|
7215
|
+
* square.
|
|
7216
|
+
*/
|
|
7217
|
+
height = '1rem';
|
|
7218
|
+
/**
|
|
7219
|
+
* Shape of the placeholder: `line` for text, `circle` for avatars and
|
|
7220
|
+
* icons, `rect` for images and cards.
|
|
7221
|
+
*/
|
|
7222
|
+
shape = 'line';
|
|
7223
|
+
/**
|
|
7224
|
+
* How many placeholders to render in a row, for multi-line text blocks. A
|
|
7225
|
+
* value below 1 renders one.
|
|
7226
|
+
*/
|
|
7227
|
+
count = 1;
|
|
7228
|
+
/**
|
|
7229
|
+
* Whether the shimmer runs. It is also disabled automatically for people who
|
|
7230
|
+
* asked for reduced motion.
|
|
7231
|
+
*/
|
|
7232
|
+
animated = true;
|
|
7233
|
+
get items() {
|
|
7234
|
+
const count = Number(this.count);
|
|
7235
|
+
return Number.isInteger(count) && count >= 1 ? count : 1;
|
|
7236
|
+
}
|
|
7237
|
+
get sizeStyle() {
|
|
7238
|
+
if (this.shape === 'circle') {
|
|
7239
|
+
return { width: this.width, height: this.width };
|
|
7240
|
+
}
|
|
7241
|
+
if (this.shape === 'line') {
|
|
7242
|
+
return { width: this.width, height: this.height };
|
|
7243
|
+
}
|
|
7244
|
+
return { width: this.width, height: this.height };
|
|
7245
|
+
}
|
|
7246
|
+
render() {
|
|
7247
|
+
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) })))));
|
|
7248
|
+
}
|
|
7249
|
+
static get style() { return chSkeletonCss(); }
|
|
7250
|
+
static get cmpMeta() { return {
|
|
7251
|
+
"$flags$": 521,
|
|
7252
|
+
"$tagName$": "ch-skeleton",
|
|
7253
|
+
"$members$": {
|
|
7254
|
+
"width": [1],
|
|
7255
|
+
"height": [1],
|
|
7256
|
+
"shape": [1],
|
|
7257
|
+
"count": [2],
|
|
7258
|
+
"animated": [4]
|
|
7259
|
+
},
|
|
7260
|
+
"$listeners$": undefined,
|
|
7261
|
+
"$lazyBundleId$": "-",
|
|
7262
|
+
"$attrsToReflect$": []
|
|
7263
|
+
}; }
|
|
7264
|
+
}
|
|
7265
|
+
|
|
6913
7266
|
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)}}`;
|
|
6914
7267
|
|
|
6915
7268
|
/**
|
|
@@ -6939,7 +7292,7 @@ class ChSpinner {
|
|
|
6939
7292
|
label;
|
|
6940
7293
|
render() {
|
|
6941
7294
|
const labelled = Boolean(this.label);
|
|
6942
|
-
return (hAsync(Host, { key: '
|
|
7295
|
+
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' })));
|
|
6943
7296
|
}
|
|
6944
7297
|
static get style() { return chSpinnerCss(); }
|
|
6945
7298
|
static get cmpMeta() { return {
|
|
@@ -6955,6 +7308,53 @@ class ChSpinner {
|
|
|
6955
7308
|
}; }
|
|
6956
7309
|
}
|
|
6957
7310
|
|
|
7311
|
+
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}`;
|
|
7312
|
+
|
|
7313
|
+
const GAPS = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
|
|
7314
|
+
/**
|
|
7315
|
+
* Vertical flow: children stack top to bottom with a token-driven gap.
|
|
7316
|
+
*
|
|
7317
|
+
* It is a real host with `display: flex`, not `display: contents`, so a
|
|
7318
|
+
* consumer's own classes and attributes on `<ch-stack>` keep working.
|
|
7319
|
+
*/
|
|
7320
|
+
class ChStack {
|
|
7321
|
+
constructor(hostRef) {
|
|
7322
|
+
registerInstance(this, hostRef);
|
|
7323
|
+
}
|
|
7324
|
+
/**
|
|
7325
|
+
* Space between children, as a step of the spacing scale (`2xs` … `6xl`),
|
|
7326
|
+
* or `none` for no gap. An unknown value falls back to `md`.
|
|
7327
|
+
*/
|
|
7328
|
+
gap = 'md';
|
|
7329
|
+
/**
|
|
7330
|
+
* Cross-axis alignment of the children.
|
|
7331
|
+
*/
|
|
7332
|
+
align = 'stretch';
|
|
7333
|
+
/**
|
|
7334
|
+
* Main-axis distribution of the children.
|
|
7335
|
+
*/
|
|
7336
|
+
justify = 'start';
|
|
7337
|
+
get gapStep() {
|
|
7338
|
+
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
7339
|
+
}
|
|
7340
|
+
render() {
|
|
7341
|
+
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' })));
|
|
7342
|
+
}
|
|
7343
|
+
static get style() { return chStackCss(); }
|
|
7344
|
+
static get cmpMeta() { return {
|
|
7345
|
+
"$flags$": 777,
|
|
7346
|
+
"$tagName$": "ch-stack",
|
|
7347
|
+
"$members$": {
|
|
7348
|
+
"gap": [1],
|
|
7349
|
+
"align": [1],
|
|
7350
|
+
"justify": [1]
|
|
7351
|
+
},
|
|
7352
|
+
"$listeners$": undefined,
|
|
7353
|
+
"$lazyBundleId$": "-",
|
|
7354
|
+
"$attrsToReflect$": []
|
|
7355
|
+
}; }
|
|
7356
|
+
}
|
|
7357
|
+
|
|
6958
7358
|
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)}`;
|
|
6959
7359
|
|
|
6960
7360
|
let switchIds = 0;
|
|
@@ -7029,15 +7429,12 @@ class ChSwitch {
|
|
|
7029
7429
|
return;
|
|
7030
7430
|
}
|
|
7031
7431
|
internals.setFormValue(this.checked ? this.value : null);
|
|
7032
|
-
const flags = {
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
flags.customError = true;
|
|
7039
|
-
}
|
|
7040
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
7432
|
+
const { flags, message } = resolveValidity({
|
|
7433
|
+
required: this.required,
|
|
7434
|
+
empty: !this.checked,
|
|
7435
|
+
invalid: this.invalid,
|
|
7436
|
+
errorMessage: this.errorMessage,
|
|
7437
|
+
});
|
|
7041
7438
|
internals.setValidity(flags, message);
|
|
7042
7439
|
}
|
|
7043
7440
|
componentDidLoad() {
|
|
@@ -7066,7 +7463,7 @@ class ChSwitch {
|
|
|
7066
7463
|
return undefined;
|
|
7067
7464
|
}
|
|
7068
7465
|
render() {
|
|
7069
|
-
return (hAsync(Host, { key: '
|
|
7466
|
+
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))));
|
|
7070
7467
|
}
|
|
7071
7468
|
static get formAssociated() { return true; }
|
|
7072
7469
|
static get watchers() { return {
|
|
@@ -7189,7 +7586,7 @@ class ChTabs {
|
|
|
7189
7586
|
}
|
|
7190
7587
|
render() {
|
|
7191
7588
|
const active = this.activeValue;
|
|
7192
|
-
return (hAsync(Host, { key: '
|
|
7589
|
+
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 => {
|
|
7193
7590
|
const selected = tab.value === active;
|
|
7194
7591
|
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));
|
|
7195
7592
|
})), 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}` }))))));
|
|
@@ -7297,15 +7694,12 @@ class ChTextarea {
|
|
|
7297
7694
|
return;
|
|
7298
7695
|
}
|
|
7299
7696
|
internals.setFormValue(this.value);
|
|
7300
|
-
const flags = {
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
flags.customError = true;
|
|
7307
|
-
}
|
|
7308
|
-
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
7697
|
+
const { flags, message } = resolveValidity({
|
|
7698
|
+
required: this.required,
|
|
7699
|
+
empty: this.value === '',
|
|
7700
|
+
invalid: this.invalid,
|
|
7701
|
+
errorMessage: this.errorMessage,
|
|
7702
|
+
});
|
|
7309
7703
|
internals.setValidity(flags, message);
|
|
7310
7704
|
}
|
|
7311
7705
|
componentDidLoad() {
|
|
@@ -7334,7 +7728,7 @@ class ChTextarea {
|
|
|
7334
7728
|
return undefined;
|
|
7335
7729
|
}
|
|
7336
7730
|
render() {
|
|
7337
|
-
return (hAsync(Host, { key: '
|
|
7731
|
+
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))));
|
|
7338
7732
|
}
|
|
7339
7733
|
static get formAssociated() { return true; }
|
|
7340
7734
|
static get watchers() { return {
|
|
@@ -7459,7 +7853,7 @@ class ChTooltip {
|
|
|
7459
7853
|
trigger.setAttribute('aria-describedby', content.id);
|
|
7460
7854
|
};
|
|
7461
7855
|
render() {
|
|
7462
|
-
return (hAsync(Host, { key: '
|
|
7856
|
+
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 })))));
|
|
7463
7857
|
}
|
|
7464
7858
|
static get style() { return chTooltipCss(); }
|
|
7465
7859
|
static get cmpMeta() { return {
|
|
@@ -7484,16 +7878,21 @@ registerComponents([
|
|
|
7484
7878
|
ChButton,
|
|
7485
7879
|
ChCard,
|
|
7486
7880
|
ChCheckbox,
|
|
7881
|
+
ChCluster,
|
|
7487
7882
|
ChDivider,
|
|
7488
7883
|
ChDrawer,
|
|
7489
7884
|
ChEmoji,
|
|
7885
|
+
ChEmptyState,
|
|
7886
|
+
ChGrid,
|
|
7490
7887
|
ChInput,
|
|
7491
7888
|
ChLink,
|
|
7492
7889
|
ChModal,
|
|
7493
7890
|
ChRadio,
|
|
7494
7891
|
ChSegmentedControl,
|
|
7495
7892
|
ChSelect,
|
|
7893
|
+
ChSkeleton,
|
|
7496
7894
|
ChSpinner,
|
|
7895
|
+
ChStack,
|
|
7497
7896
|
ChSwitch,
|
|
7498
7897
|
ChTabs,
|
|
7499
7898
|
ChTextarea,
|
|
@@ -7504,7 +7903,7 @@ exports.hydrateApp = hydrateApp;
|
|
|
7504
7903
|
|
|
7505
7904
|
|
|
7506
7905
|
/*hydrateAppClosure end*/
|
|
7507
|
-
hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve);
|
|
7906
|
+
hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve, $stencilAbortController);
|
|
7508
7907
|
}
|
|
7509
7908
|
|
|
7510
7909
|
hydrateAppClosure($stencilWindow);
|
|
@@ -7599,7 +7998,7 @@ var NAMESPACE = (
|
|
|
7599
7998
|
);
|
|
7600
7999
|
|
|
7601
8000
|
/*
|
|
7602
|
-
Stencil Hydrate Runner v4.
|
|
8001
|
+
Stencil Hydrate Runner v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
7603
8002
|
*/
|
|
7604
8003
|
var __create = Object.create;
|
|
7605
8004
|
var __defProp = Object.defineProperty;
|
|
@@ -21746,11 +22145,14 @@ function resetWindow(win2) {
|
|
|
21746
22145
|
} catch (e) {
|
|
21747
22146
|
}
|
|
21748
22147
|
}
|
|
21749
|
-
|
|
21750
|
-
|
|
21751
|
-
|
|
21752
|
-
win2.
|
|
21753
|
-
win2.
|
|
22148
|
+
const windowDestroyed = () => {
|
|
22149
|
+
throw new Error("MockWindow was already destroyed");
|
|
22150
|
+
};
|
|
22151
|
+
win2.fetch = windowDestroyed;
|
|
22152
|
+
win2.Headers = windowDestroyed;
|
|
22153
|
+
win2.Request = windowDestroyed;
|
|
22154
|
+
win2.Response = windowDestroyed;
|
|
22155
|
+
win2.FetchError = windowDestroyed;
|
|
21754
22156
|
}
|
|
21755
22157
|
}
|
|
21756
22158
|
function resetWindowDimensions(win2) {
|
|
@@ -22150,9 +22552,6 @@ var _cssColonHostContextRe = new RegExp("(" + _polyfillHostContext + _parenSuffi
|
|
|
22150
22552
|
var _cssColonSlottedRe = new RegExp("(" + _polyfillSlotted + _parenSuffix, "gim");
|
|
22151
22553
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
22152
22554
|
|
|
22153
|
-
// src/runtime/mode.ts
|
|
22154
|
-
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
22155
|
-
|
|
22156
22555
|
// src/utils/local-value.ts
|
|
22157
22556
|
var LocalValue = class _LocalValue {
|
|
22158
22557
|
type;
|
|
@@ -24229,6 +24628,37 @@ var relocateMetaCharset = (doc) => {
|
|
|
24229
24628
|
};
|
|
24230
24629
|
|
|
24231
24630
|
// src/compiler/style/css-parser/parse-css.ts
|
|
24631
|
+
var splitSelectorList = (selectors) => {
|
|
24632
|
+
const parts = [];
|
|
24633
|
+
let depth = 0;
|
|
24634
|
+
let quote = null;
|
|
24635
|
+
let start = 0;
|
|
24636
|
+
for (let i = 0; i < selectors.length; i++) {
|
|
24637
|
+
const ch = selectors[i];
|
|
24638
|
+
if (quote) {
|
|
24639
|
+
if (ch === "\\") {
|
|
24640
|
+
i++;
|
|
24641
|
+
} else if (ch === quote) {
|
|
24642
|
+
quote = null;
|
|
24643
|
+
}
|
|
24644
|
+
continue;
|
|
24645
|
+
}
|
|
24646
|
+
if (ch === '"' || ch === "'") {
|
|
24647
|
+
quote = ch;
|
|
24648
|
+
} else if (ch === "\\") {
|
|
24649
|
+
i++;
|
|
24650
|
+
} else if (ch === "(") {
|
|
24651
|
+
depth++;
|
|
24652
|
+
} else if (ch === ")") {
|
|
24653
|
+
depth = Math.max(0, depth - 1);
|
|
24654
|
+
} else if (ch === "," && depth === 0) {
|
|
24655
|
+
parts.push(selectors.slice(start, i));
|
|
24656
|
+
start = i + 1;
|
|
24657
|
+
}
|
|
24658
|
+
}
|
|
24659
|
+
parts.push(selectors.slice(start));
|
|
24660
|
+
return parts.map((s) => s.trim());
|
|
24661
|
+
};
|
|
24232
24662
|
var parseCss = (css, filePath) => {
|
|
24233
24663
|
let lineno = 1;
|
|
24234
24664
|
let column = 1;
|
|
@@ -24350,11 +24780,8 @@ var parseCss = (css, filePath) => {
|
|
|
24350
24780
|
const selector = () => {
|
|
24351
24781
|
const m = match2(/^([^{]+)/);
|
|
24352
24782
|
if (!m) return null;
|
|
24353
|
-
|
|
24354
|
-
|
|
24355
|
-
}).split(/\s*(?![^(]*\)),\s*/).map(function(s) {
|
|
24356
|
-
return s.replace(/\u200C/g, ",");
|
|
24357
|
-
});
|
|
24783
|
+
const cleaned = trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "");
|
|
24784
|
+
return splitSelectorList(cleaned);
|
|
24358
24785
|
};
|
|
24359
24786
|
const declaration = () => {
|
|
24360
24787
|
const pos = position();
|
|
@@ -25528,10 +25955,6 @@ async function render2(win2, opts, results) {
|
|
|
25528
25955
|
try {
|
|
25529
25956
|
await Promise.resolve(beforeHydrateFn(win2.document));
|
|
25530
25957
|
return new Promise((resolve) => {
|
|
25531
|
-
if (Array.isArray(opts.modes)) {
|
|
25532
|
-
modeResolutionChain.length = 0;
|
|
25533
|
-
opts.modes.forEach((mode) => setMode(mode));
|
|
25534
|
-
}
|
|
25535
25958
|
return hydrateFactory(win2, opts, results, afterHydrate, resolve);
|
|
25536
25959
|
});
|
|
25537
25960
|
} catch (e) {
|