@webquark/core 1.1.0-dev.1 → 1.1.0-dev.3
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/cjs/{Leaflet.GoogleMutant-BCs2oiE0.js → Leaflet.GoogleMutant-i4bYl6qy.js} +1 -2
- package/dist/cjs/{action.props-Bxf6g2CW.js → action.props-CkEZpMY6.js} +1 -1
- package/dist/cjs/chevron-up-Dysp_9UJ.js +30 -0
- package/dist/cjs/{index-D5SQkd__.js → index-B7ex88C2.js} +98 -20
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/leaflet-maplibre-gl-BJKExsns.js +1031 -0
- package/dist/{esm/leaflet-src-BeeM-7Ku.js → cjs/leaflet-src-mrRg-Srs.js} +38 -7
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q-alert.cjs.entry.js +1 -1
- package/dist/cjs/q-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q-button_2.cjs.entry.js +2 -2
- package/dist/cjs/q-card.cjs.entry.js +1 -1
- package/dist/cjs/q-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
- package/dist/cjs/q-data-table.cjs.entry.js +3 -2
- package/dist/cjs/q-dialog.cjs.entry.js +1 -1
- package/dist/cjs/q-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q-form.cjs.entry.js +1 -1
- package/dist/cjs/q-icon.cjs.entry.js +63 -4
- package/dist/cjs/q-input_2.cjs.entry.js +2 -2
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +184 -122
- package/dist/cjs/q-navbar.cjs.entry.js +1 -1
- package/dist/cjs/q-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q-panel.cjs.entry.js +1 -1
- package/dist/cjs/q-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/q-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q-reel.cjs.entry.js +1 -1
- package/dist/cjs/q-scrollable.cjs.entry.js +1 -1
- package/dist/cjs/q-sidepanel.cjs.entry.js +190 -5
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +1 -1
- package/dist/cjs/q-step-diagram.cjs.entry.js +1 -1
- package/dist/cjs/q-syntax-box.cjs.entry.js +57 -2
- package/dist/cjs/q-tabs.cjs.entry.js +1 -1
- package/dist/cjs/q-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q-thumbnail.cjs.entry.js +1 -1
- package/dist/cjs/q-toast.cjs.entry.js +1 -1
- package/dist/cjs/q-toggle.cjs.entry.js +1 -1
- package/dist/cjs/q-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/registry-BhkCNgxt.js +179 -0
- package/dist/cjs/webquark.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/data-display/data-table/internals/render-sort-indicator.js +2 -1
- package/dist/collection/components/data-display/syntax-box/syntax-box.js +2 -1
- package/dist/collection/components/inputs/input/input.css +13 -0
- package/dist/collection/components/layout/sidepanel/internals/nav-items.js +6 -2
- package/dist/collection/components/layout/sidepanel/sidepanel.css +23 -0
- package/dist/collection/components/layout/sidepanel/sidepanel.js +20 -1
- package/dist/collection/components/media/icon/icon.js +67 -6
- package/dist/collection/components/media/icon/internals/registry.js +171 -0
- package/dist/collection/components/media/icon/internals/registry.unit.test.js +42 -0
- package/dist/collection/components/media/icon/internals/render-definition.js +24 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-Dd8ZWrLX.js → p-7oXL29Gu.js} +1 -1
- package/dist/components/p-BvBRW3dl.js +1 -0
- package/dist/components/p-BygmcFxM.js +1 -0
- package/dist/components/{p-xNd-aY2K.js → p-C8fq-feq.js} +1 -1
- package/dist/components/p-CFuqfXuv.js +9 -0
- package/dist/components/{p-DCICQbw4.js → p-CQofbR9q.js} +1 -1
- package/dist/components/p-CVtof65h.js +1 -0
- package/dist/components/{p-D-SCwJg6.js → p-Czf3kP0S.js} +1 -1
- package/dist/components/p-DYMWBqU1.js +5 -0
- package/dist/components/{p-DH-PVHhr.js → p-DuX-9GOi.js} +1 -1
- package/dist/components/{p-CBVOdtO_.js → p-I81wUKud.js} +1 -1
- package/dist/components/p-g9vOVxQ4.js +13 -0
- package/dist/components/{p-CXcle-2Q.js → p-vv3X99Ji.js} +1 -1
- package/dist/components/q-alert.js +1 -1
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-button.js +1 -1
- package/dist/components/q-card.js +1 -1
- package/dist/components/q-carousel.js +1 -1
- package/dist/components/q-chip.js +1 -1
- package/dist/components/q-conversation-bubble.js +1 -1
- package/dist/components/q-data-table.js +1 -1
- package/dist/components/q-dialog.js +1 -1
- package/dist/components/q-dropdown.js +1 -1
- package/dist/components/q-form.js +1 -1
- package/dist/components/q-icon.js +1 -1
- package/dist/components/q-input.js +1 -1
- package/dist/components/q-link.js +1 -1
- package/dist/components/q-map.js +1 -1
- package/dist/components/q-navbar.js +1 -1
- package/dist/components/q-pagination.js +1 -1
- package/dist/components/q-panel.js +1 -1
- package/dist/components/q-progress.js +1 -1
- package/dist/components/q-quantity-selector.js +1 -1
- package/dist/components/q-radio-group.js +1 -1
- package/dist/components/q-reel.js +1 -1
- package/dist/components/q-scrollable.js +1 -1
- package/dist/components/q-sidepanel.js +13 -1
- package/dist/components/q-step-diagram-item.js +1 -1
- package/dist/components/q-step-diagram.js +1 -1
- package/dist/components/q-syntax-box.js +13 -1
- package/dist/components/q-tabs.js +1 -1
- package/dist/components/q-textarea.js +1 -1
- package/dist/components/q-thumbnail.js +1 -1
- package/dist/components/q-toast.js +1 -1
- package/dist/components/q-toggle.js +1 -1
- package/dist/components/q-toolbar.js +1 -1
- package/dist/components/q-tooltip.js +1 -1
- package/dist/esm/{Leaflet.GoogleMutant-BlvymWLE.js → Leaflet.GoogleMutant-MpxOb4Jm.js} +1 -2
- package/dist/esm/{action.props-CzaBbbcQ.js → action.props-CJoxGHR7.js} +1 -1
- package/dist/esm/chevron-up-g9vOVxQ4.js +27 -0
- package/dist/esm/{index-DOk7gYkf.js → index-VFWyFa-_.js} +98 -20
- package/dist/esm/index.js +1 -0
- package/dist/esm/leaflet-maplibre-gl-BVDAAs7w.js +1026 -0
- package/dist/{cjs/leaflet-src-B0ls4IKq.js → esm/leaflet-src-DYMWBqU1.js} +33 -8
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q-alert.entry.js +1 -1
- package/dist/esm/q-avatar.entry.js +1 -1
- package/dist/esm/q-button_2.entry.js +2 -2
- package/dist/esm/q-card.entry.js +1 -1
- package/dist/esm/q-carousel.entry.js +1 -1
- package/dist/esm/q-chip.entry.js +2 -2
- package/dist/esm/q-conversation-bubble.entry.js +1 -1
- package/dist/esm/q-data-table.entry.js +3 -2
- package/dist/esm/q-dialog.entry.js +1 -1
- package/dist/esm/q-dropdown.entry.js +1 -1
- package/dist/esm/q-form.entry.js +1 -1
- package/dist/esm/q-icon.entry.js +63 -4
- package/dist/esm/q-input_2.entry.js +2 -2
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +184 -122
- package/dist/esm/q-navbar.entry.js +1 -1
- package/dist/esm/q-pagination.entry.js +1 -1
- package/dist/esm/q-panel.entry.js +1 -1
- package/dist/esm/q-quantity-selector.entry.js +1 -1
- package/dist/esm/q-radio-group.entry.js +1 -1
- package/dist/esm/q-reel.entry.js +1 -1
- package/dist/esm/q-scrollable.entry.js +1 -1
- package/dist/esm/q-sidepanel.entry.js +190 -5
- package/dist/esm/q-step-diagram-item.entry.js +1 -1
- package/dist/esm/q-step-diagram.entry.js +1 -1
- package/dist/esm/q-syntax-box.entry.js +57 -2
- package/dist/esm/q-tabs.entry.js +1 -1
- package/dist/esm/q-textarea.entry.js +1 -1
- package/dist/esm/q-thumbnail.entry.js +1 -1
- package/dist/esm/q-toast.entry.js +1 -1
- package/dist/esm/q-toggle.entry.js +1 -1
- package/dist/esm/q-toolbar.entry.js +1 -1
- package/dist/esm/registry-BvBRW3dl.js +173 -0
- package/dist/esm/webquark.js +4 -4
- package/dist/loader/index.d.ts +1 -1
- package/dist/playground/build/index.esm.js +1 -1
- package/dist/playground/build/{p-6f1b98c2.entry.js → p-0053ec76.entry.js} +1 -1
- package/dist/playground/build/{p-33cfbd33.entry.js → p-0363c0e6.entry.js} +1 -1
- package/dist/{webquark/p-4557f558.entry.js → playground/build/p-0e3dbe01.entry.js} +1 -1
- package/dist/{webquark/p-cddadb39.entry.js → playground/build/p-13329777.entry.js} +1 -1
- package/dist/playground/build/{p-6deac326.entry.js → p-1c9a82b8.entry.js} +1 -1
- package/dist/{webquark/p-0aeed0be.entry.js → playground/build/p-2e2b3ca9.entry.js} +1 -1
- package/dist/playground/build/{p-09e29cf9.entry.js → p-316a92e2.entry.js} +1 -1
- package/dist/{webquark/p-48a8413d.entry.js → playground/build/p-38b92be6.entry.js} +1 -1
- package/dist/{webquark/p-33a45980.entry.js → playground/build/p-41421759.entry.js} +1 -1
- package/dist/playground/build/{p-590cde02.entry.js → p-42831108.entry.js} +1 -1
- package/dist/playground/build/{p-011bab4c.entry.js → p-50ca27f7.entry.js} +1 -1
- package/dist/playground/build/{p-ad1c341c.entry.js → p-5c08aa94.entry.js} +1 -1
- package/dist/playground/build/{p-b8aa6763.entry.js → p-611ef3e0.entry.js} +1 -1
- package/dist/playground/build/{p-254555b1.entry.js → p-684292dd.entry.js} +1 -1
- package/dist/playground/build/p-6c0bc4b9.entry.js +13 -0
- package/dist/playground/build/{p-28cc0172.entry.js → p-7081c96b.entry.js} +1 -1
- package/dist/{webquark/p-4d5d0313.entry.js → playground/build/p-789eb3c9.entry.js} +1 -1
- package/dist/playground/build/{p-dda5be3e.entry.js → p-8077aa3f.entry.js} +1 -1
- package/dist/playground/build/{p-c2032ee1.entry.js → p-885572ee.entry.js} +1 -1
- package/dist/playground/build/p-8ada8fc6.entry.js +1 -0
- package/dist/{webquark/p-711576c8.entry.js → playground/build/p-8d0aa5a7.entry.js} +1 -1
- package/dist/playground/build/{p-93ffb8ab.entry.js → p-8ec7d250.entry.js} +1 -1
- package/dist/{webquark/p-1d1ec52e.entry.js → playground/build/p-9978ae38.entry.js} +1 -1
- package/dist/playground/build/p-BvBRW3dl.js +1 -0
- package/dist/playground/build/p-CFuqfXuv.js +9 -0
- package/dist/playground/build/p-DYMWBqU1.js +5 -0
- package/dist/playground/build/{p-DD6AOr35.js → p-DoS2fiWw.js} +1 -1
- package/dist/playground/build/p-DuX-9GOi.js +1 -0
- package/dist/playground/build/p-VFWyFa-_.js +3 -0
- package/dist/playground/build/{p-f51a7a3c.entry.js → p-b5066051.entry.js} +1 -1
- package/dist/playground/build/p-b99541cd.entry.js +1 -0
- package/dist/{webquark/p-13b7bd40.entry.js → playground/build/p-ca1a1d25.entry.js} +1 -1
- package/dist/playground/build/p-d837603c.entry.js +1 -0
- package/dist/playground/build/{p-b8a75199.entry.js → p-e0e6b68f.entry.js} +1 -1
- package/dist/playground/build/{p-a054f314.entry.js → p-e15e6d76.entry.js} +1 -1
- package/dist/playground/build/p-e272dd45.entry.js +1 -0
- package/dist/{webquark/p-94413975.entry.js → playground/build/p-e8003179.entry.js} +1 -1
- package/dist/playground/build/p-e974c1f8.entry.js +13 -0
- package/dist/playground/build/p-g9vOVxQ4.js +13 -0
- package/dist/playground/build/webquark.esm.js +1 -1
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +2 -0
- package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +4 -0
- package/dist/types/components/media/icon/icon.d.ts +6 -3
- package/dist/types/components/media/icon/icon.types.d.ts +25 -0
- package/dist/types/components/media/icon/internals/registry.d.ts +11 -0
- package/dist/types/components/media/icon/internals/registry.unit.test.d.ts +1 -0
- package/dist/types/components/media/icon/internals/render-definition.d.ts +2 -0
- package/dist/types/components.d.ts +14 -6
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +73 -55
- package/dist/webquark/index.esm.js +1 -1
- package/dist/webquark/{p-6f1b98c2.entry.js → p-0053ec76.entry.js} +1 -1
- package/dist/webquark/{p-33cfbd33.entry.js → p-0363c0e6.entry.js} +1 -1
- package/dist/{playground/build/p-4557f558.entry.js → webquark/p-0e3dbe01.entry.js} +1 -1
- package/dist/{playground/build/p-cddadb39.entry.js → webquark/p-13329777.entry.js} +1 -1
- package/dist/webquark/{p-6deac326.entry.js → p-1c9a82b8.entry.js} +1 -1
- package/dist/{playground/build/p-0aeed0be.entry.js → webquark/p-2e2b3ca9.entry.js} +1 -1
- package/dist/webquark/{p-09e29cf9.entry.js → p-316a92e2.entry.js} +1 -1
- package/dist/{playground/build/p-48a8413d.entry.js → webquark/p-38b92be6.entry.js} +1 -1
- package/dist/{playground/build/p-33a45980.entry.js → webquark/p-41421759.entry.js} +1 -1
- package/dist/webquark/{p-590cde02.entry.js → p-42831108.entry.js} +1 -1
- package/dist/webquark/{p-011bab4c.entry.js → p-50ca27f7.entry.js} +1 -1
- package/dist/webquark/{p-ad1c341c.entry.js → p-5c08aa94.entry.js} +1 -1
- package/dist/webquark/{p-b8aa6763.entry.js → p-611ef3e0.entry.js} +1 -1
- package/dist/webquark/{p-254555b1.entry.js → p-684292dd.entry.js} +1 -1
- package/dist/webquark/p-6c0bc4b9.entry.js +13 -0
- package/dist/webquark/{p-28cc0172.entry.js → p-7081c96b.entry.js} +1 -1
- package/dist/{playground/build/p-4d5d0313.entry.js → webquark/p-789eb3c9.entry.js} +1 -1
- package/dist/webquark/{p-dda5be3e.entry.js → p-8077aa3f.entry.js} +1 -1
- package/dist/webquark/{p-c2032ee1.entry.js → p-885572ee.entry.js} +1 -1
- package/dist/webquark/p-8ada8fc6.entry.js +1 -0
- package/dist/{playground/build/p-711576c8.entry.js → webquark/p-8d0aa5a7.entry.js} +1 -1
- package/dist/webquark/{p-93ffb8ab.entry.js → p-8ec7d250.entry.js} +1 -1
- package/dist/{playground/build/p-1d1ec52e.entry.js → webquark/p-9978ae38.entry.js} +1 -1
- package/dist/webquark/p-BvBRW3dl.js +1 -0
- package/dist/webquark/p-CFuqfXuv.js +9 -0
- package/dist/webquark/p-DYMWBqU1.js +5 -0
- package/dist/webquark/{p-DD6AOr35.js → p-DoS2fiWw.js} +1 -1
- package/dist/webquark/p-DuX-9GOi.js +1 -0
- package/dist/webquark/p-VFWyFa-_.js +3 -0
- package/dist/webquark/{p-f51a7a3c.entry.js → p-b5066051.entry.js} +1 -1
- package/dist/webquark/p-b99541cd.entry.js +1 -0
- package/dist/{playground/build/p-13b7bd40.entry.js → webquark/p-ca1a1d25.entry.js} +1 -1
- package/dist/webquark/p-d837603c.entry.js +1 -0
- package/dist/webquark/{p-b8a75199.entry.js → p-e0e6b68f.entry.js} +1 -1
- package/dist/webquark/{p-a054f314.entry.js → p-e15e6d76.entry.js} +1 -1
- package/dist/webquark/p-e272dd45.entry.js +1 -0
- package/dist/{playground/build/p-94413975.entry.js → webquark/p-e8003179.entry.js} +1 -1
- package/dist/webquark/p-e974c1f8.entry.js +13 -0
- package/dist/webquark/p-g9vOVxQ4.js +13 -0
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +24 -16
- package/scripts/webquark-serve.js +6 -8
- package/dist/cjs/leaflet-maplibre-gl-RCEffFEM.js +0 -434
- package/dist/cjs/leaflet-src-BX4jwTf5.js +0 -33
- package/dist/components/p-2bWqVyTo.js +0 -1
- package/dist/components/p-BEBDDqVT.js +0 -1
- package/dist/components/p-BeeM-7Ku.js +0 -5
- package/dist/components/p-Ccj0labf.js +0 -1
- package/dist/components/p-DiOrwkX8.js +0 -1
- package/dist/esm/leaflet-maplibre-gl-Cgb-1z8Q.js +0 -432
- package/dist/esm/leaflet-src-BR13bdVA.js +0 -30
- package/dist/playground/build/p-0571c3ae.entry.js +0 -1
- package/dist/playground/build/p-2bWqVyTo.js +0 -1
- package/dist/playground/build/p-56644a7b.entry.js +0 -1
- package/dist/playground/build/p-58724642.entry.js +0 -1
- package/dist/playground/build/p-6cf356da.entry.js +0 -1
- package/dist/playground/build/p-9d14b8ec.entry.js +0 -1
- package/dist/playground/build/p-BEBDDqVT.js +0 -1
- package/dist/playground/build/p-BeeM-7Ku.js +0 -5
- package/dist/playground/build/p-DNFGt02p.js +0 -1
- package/dist/playground/build/p-DOk7gYkf.js +0 -2
- package/dist/playground/build/p-cfaffa33.entry.js +0 -1
- package/dist/webquark/p-0571c3ae.entry.js +0 -1
- package/dist/webquark/p-2bWqVyTo.js +0 -1
- package/dist/webquark/p-56644a7b.entry.js +0 -1
- package/dist/webquark/p-58724642.entry.js +0 -1
- package/dist/webquark/p-6cf356da.entry.js +0 -1
- package/dist/webquark/p-9d14b8ec.entry.js +0 -1
- package/dist/webquark/p-BEBDDqVT.js +0 -1
- package/dist/webquark/p-BeeM-7Ku.js +0 -5
- package/dist/webquark/p-DNFGt02p.js +0 -1
- package/dist/webquark/p-DOk7gYkf.js +0 -2
- package/dist/webquark/p-cfaffa33.entry.js +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const REGISTRY_STATE_KEY = Symbol.for('@webquark/core:q-icon-registry:v1');
|
|
4
|
+
const ICON_NAME_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/;
|
|
5
|
+
const ATTRIBUTE_NAME_PATTERN = /^[a-zA-Z_:][a-zA-Z0-9_.:-]*$/;
|
|
6
|
+
const MAX_ICON_NAME_LENGTH = 128;
|
|
7
|
+
const MAX_NODE_DEPTH = 16;
|
|
8
|
+
const MAX_NODE_COUNT = 512;
|
|
9
|
+
const SAFE_SVG_ELEMENTS = new Set([
|
|
10
|
+
'circle',
|
|
11
|
+
'clipPath',
|
|
12
|
+
'defs',
|
|
13
|
+
'ellipse',
|
|
14
|
+
'g',
|
|
15
|
+
'line',
|
|
16
|
+
'linearGradient',
|
|
17
|
+
'mask',
|
|
18
|
+
'path',
|
|
19
|
+
'polygon',
|
|
20
|
+
'polyline',
|
|
21
|
+
'radialGradient',
|
|
22
|
+
'rect',
|
|
23
|
+
'stop',
|
|
24
|
+
'symbol',
|
|
25
|
+
'use',
|
|
26
|
+
]);
|
|
27
|
+
function getRuntimeState() {
|
|
28
|
+
const globalRecord = globalThis;
|
|
29
|
+
const existing = globalRecord[REGISTRY_STATE_KEY];
|
|
30
|
+
if (existing?.version === 1 && existing.registry instanceof Map && typeof existing.strict === 'boolean') {
|
|
31
|
+
return existing;
|
|
32
|
+
}
|
|
33
|
+
const state = {
|
|
34
|
+
version: 1,
|
|
35
|
+
registry: new Map(),
|
|
36
|
+
strict: false,
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(globalRecord, REGISTRY_STATE_KEY, {
|
|
39
|
+
configurable: false,
|
|
40
|
+
enumerable: false,
|
|
41
|
+
writable: false,
|
|
42
|
+
value: state,
|
|
43
|
+
});
|
|
44
|
+
return state;
|
|
45
|
+
}
|
|
46
|
+
function isRecord(value) {
|
|
47
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
48
|
+
}
|
|
49
|
+
function containsExternalResourceReference(value) {
|
|
50
|
+
const references = Array.from(value.matchAll(/url\s*\(([^)]*)\)/gi));
|
|
51
|
+
return references.some(([, rawReference]) => {
|
|
52
|
+
const reference = rawReference.trim().replace(/^(['"])(.*)\1$/, '$2').trim();
|
|
53
|
+
return !reference.startsWith('#');
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function assertPositiveDimension(value, field, context) {
|
|
57
|
+
if (value !== undefined && (typeof value !== 'number' || !Number.isFinite(value) || value <= 0)) {
|
|
58
|
+
throw new TypeError(`${context}.${field} must be a positive finite number.`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function cloneAttributes(value, context) {
|
|
62
|
+
if (!isRecord(value)) {
|
|
63
|
+
throw new TypeError(`${context} must be an object of string SVG attributes.`);
|
|
64
|
+
}
|
|
65
|
+
const attributes = {};
|
|
66
|
+
for (const [name, rawValue] of Object.entries(value)) {
|
|
67
|
+
if (!ATTRIBUTE_NAME_PATTERN.test(name) || name.toLowerCase().startsWith('on')) {
|
|
68
|
+
throw new TypeError(`${context} contains an unsafe SVG attribute name: ${name}.`);
|
|
69
|
+
}
|
|
70
|
+
if (name.toLowerCase() === 'style' || name.toLowerCase() === 'src') {
|
|
71
|
+
throw new TypeError(`${context} contains an unsupported SVG attribute: ${name}.`);
|
|
72
|
+
}
|
|
73
|
+
if (typeof rawValue !== 'string') {
|
|
74
|
+
throw new TypeError(`${context}.${name} must be a string.`);
|
|
75
|
+
}
|
|
76
|
+
const normalizedValue = rawValue.trim().toLowerCase();
|
|
77
|
+
if (normalizedValue.includes('javascript:')) {
|
|
78
|
+
throw new TypeError(`${context}.${name} contains an unsafe SVG attribute value.`);
|
|
79
|
+
}
|
|
80
|
+
if ((name.toLowerCase() === 'href' || name.toLowerCase() === 'xlink:href') && !normalizedValue.startsWith('#')) {
|
|
81
|
+
throw new TypeError(`${context}.${name} must reference an element in the same SVG.`);
|
|
82
|
+
}
|
|
83
|
+
if (containsExternalResourceReference(rawValue)) {
|
|
84
|
+
throw new TypeError(`${context}.${name} must not reference an external resource.`);
|
|
85
|
+
}
|
|
86
|
+
attributes[name] = rawValue;
|
|
87
|
+
}
|
|
88
|
+
return Object.freeze(attributes);
|
|
89
|
+
}
|
|
90
|
+
function cloneNode(value, context, depth, nodeCounter) {
|
|
91
|
+
if (!Array.isArray(value) || (value.length !== 2 && value.length !== 3)) {
|
|
92
|
+
throw new TypeError(`${context} must be a [tagName, attributes, children?] tuple.`);
|
|
93
|
+
}
|
|
94
|
+
if (depth > MAX_NODE_DEPTH) {
|
|
95
|
+
throw new TypeError(`${context} exceeds the maximum icon node depth of ${MAX_NODE_DEPTH}.`);
|
|
96
|
+
}
|
|
97
|
+
nodeCounter.value += 1;
|
|
98
|
+
if (nodeCounter.value > MAX_NODE_COUNT) {
|
|
99
|
+
throw new TypeError(`Icon definitions may contain at most ${MAX_NODE_COUNT} SVG nodes.`);
|
|
100
|
+
}
|
|
101
|
+
const [tagName, rawAttributes, rawChildren] = value;
|
|
102
|
+
if (typeof tagName !== 'string' || !SAFE_SVG_ELEMENTS.has(tagName)) {
|
|
103
|
+
throw new TypeError(`${context} contains an unsupported SVG element: ${String(tagName)}.`);
|
|
104
|
+
}
|
|
105
|
+
const attributes = cloneAttributes(rawAttributes, `${context}[1]`);
|
|
106
|
+
if (rawChildren === undefined) {
|
|
107
|
+
return Object.freeze([tagName, attributes]);
|
|
108
|
+
}
|
|
109
|
+
if (!Array.isArray(rawChildren)) {
|
|
110
|
+
throw new TypeError(`${context}[2] must be an array of SVG nodes.`);
|
|
111
|
+
}
|
|
112
|
+
const children = Object.freeze(rawChildren.map((child, index) => (cloneNode(child, `${context}[2][${index}]`, depth + 1, nodeCounter))));
|
|
113
|
+
return Object.freeze([tagName, attributes, children]);
|
|
114
|
+
}
|
|
115
|
+
function prepareQIconDefinition(value, context = 'Icon definition') {
|
|
116
|
+
if (!isRecord(value) || !Array.isArray(value.node)) {
|
|
117
|
+
throw new TypeError(`${context} must contain a node array.`);
|
|
118
|
+
}
|
|
119
|
+
assertPositiveDimension(value.size, 'size', context);
|
|
120
|
+
assertPositiveDimension(value.width, 'width', context);
|
|
121
|
+
assertPositiveDimension(value.height, 'height', context);
|
|
122
|
+
if ((value.width === undefined) !== (value.height === undefined)) {
|
|
123
|
+
throw new TypeError(`${context}.width and ${context}.height must be provided together.`);
|
|
124
|
+
}
|
|
125
|
+
if (value.name !== undefined && typeof value.name !== 'string') {
|
|
126
|
+
throw new TypeError(`${context}.name must be a string when provided.`);
|
|
127
|
+
}
|
|
128
|
+
const nodeCounter = { value: 0 };
|
|
129
|
+
const node = Object.freeze(value.node.map((child, index) => (cloneNode(child, `${context}.node[${index}]`, 1, nodeCounter))));
|
|
130
|
+
const attributes = value.attributes === undefined
|
|
131
|
+
? undefined
|
|
132
|
+
: cloneAttributes(value.attributes, `${context}.attributes`);
|
|
133
|
+
const definition = {
|
|
134
|
+
...(value.name === undefined ? {} : { name: value.name }),
|
|
135
|
+
node,
|
|
136
|
+
...(value.size === undefined ? {} : { size: value.size }),
|
|
137
|
+
...(value.width === undefined ? {} : { width: value.width, height: value.height }),
|
|
138
|
+
...(attributes === undefined ? {} : { attributes }),
|
|
139
|
+
};
|
|
140
|
+
return Object.freeze(definition);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Atomically replaces the complete icon registry. Call once with an app-owned
|
|
144
|
+
* manifest before defining or bootstrapping WebQuark components.
|
|
145
|
+
*/
|
|
146
|
+
function registerQIcons(registry) {
|
|
147
|
+
if (!isRecord(registry)) {
|
|
148
|
+
throw new TypeError('QIcon registry must be an object keyed by icon name.');
|
|
149
|
+
}
|
|
150
|
+
const nextRegistry = new Map();
|
|
151
|
+
for (const [rawName, definition] of Object.entries(registry)) {
|
|
152
|
+
const name = rawName.trim();
|
|
153
|
+
if (name !== rawName || name.length > MAX_ICON_NAME_LENGTH || !ICON_NAME_PATTERN.test(name)) {
|
|
154
|
+
throw new TypeError(`Invalid q-icon registry name: ${JSON.stringify(rawName)}.`);
|
|
155
|
+
}
|
|
156
|
+
nextRegistry.set(name, prepareQIconDefinition(definition, `Icon definition ${JSON.stringify(name)}`));
|
|
157
|
+
}
|
|
158
|
+
getRuntimeState().registry = nextRegistry;
|
|
159
|
+
}
|
|
160
|
+
/** Configures whether unknown icon names may use URL and fetch fallbacks. */
|
|
161
|
+
function configureQIcons(configuration) {
|
|
162
|
+
if (!isRecord(configuration) || typeof configuration.strict !== 'boolean') {
|
|
163
|
+
throw new TypeError('QIcon configuration must provide a boolean strict value.');
|
|
164
|
+
}
|
|
165
|
+
getRuntimeState().strict = configuration.strict;
|
|
166
|
+
}
|
|
167
|
+
function resolveRegisteredQIcon(name) {
|
|
168
|
+
const normalizedName = name?.trim();
|
|
169
|
+
return normalizedName ? getRuntimeState().registry.get(normalizedName) : undefined;
|
|
170
|
+
}
|
|
171
|
+
function isQIconStrictMode() {
|
|
172
|
+
return getRuntimeState().strict;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
exports.configureQIcons = configureQIcons;
|
|
176
|
+
exports.isQIconStrictMode = isQIconStrictMode;
|
|
177
|
+
exports.prepareQIconDefinition = prepareQIconDefinition;
|
|
178
|
+
exports.registerQIcons = registerQIcons;
|
|
179
|
+
exports.resolveRegisteredQIcon = resolveRegisteredQIcon;
|
package/dist/cjs/webquark.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-B7ex88C2.js');
|
|
4
4
|
|
|
5
5
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
6
|
/*
|
|
7
|
-
Stencil Client Patch Browser v4.
|
|
7
|
+
Stencil Client Patch Browser v4.45.0 | MIT Licensed | https://stenciljs.com
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
var patchBrowser = () => {
|
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy(JSON.parse("[[\"q-data-table.cjs\",[[769,\"q-data-table\",{\"columns\":[1],\"items\":[1],\"keyField\":[1,\"key-field\"],\"rowGroup\":[16],\"rowActions\":[1,\"row-actions\"],\"rowClickable\":[4,\"row-clickable\"],\"selectable\":[4],\"selectedKeys\":[1040],\"sortable\":[4],\"sortMode\":[1,\"sort-mode\"],\"sortColumn\":[1025,\"sort-column\"],\"sortDirection\":[1025,\"sort-direction\"],\"showToolbar\":[4,\"show-toolbar\"],\"toolbarTitle\":[1,\"toolbar-title\"],\"ariaLabel\":[1,\"aria-label\"],\"showSearch\":[4,\"show-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchValue\":[1025,\"search-value\"],\"loading\":[4]}]]],[\"q-syntax-box.cjs\",[[849,\"q-syntax-box\",{\"code\":[1025],\"value\":[1025],\"heading\":[1],\"ariaLabel\":[1,\"aria-label\"],\"variant\":[1],\"height\":[1],\"copyable\":[4],\"editable\":[516],\"name\":[513],\"required\":[516],\"language\":[1],\"disabled\":[516],\"copied\":[32],\"copyFailed\":[32],\"scrollToBottom\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"code\":[{\"watchCode\":0}],\"value\":[{\"watchValue\":0}],\"editable\":[{\"watchEditable\":0}]}]]],[\"q-map.cjs\",[[769,\"q-map\",{\"attribution\":[1],\"attributionUrl\":[1,\"attribution-url\"],\"markers\":[1],\"clusterMarkers\":[4,\"cluster-markers\"],\"clusterRadius\":[2,\"cluster-radius\"],\"clusterMinPoints\":[2,\"cluster-min-points\"],\"clusterMaxZoom\":[2,\"cluster-max-zoom\"],\"centerLatitude\":[2,\"center-latitude\"],\"centerLongitude\":[2,\"center-longitude\"],\"zoom\":[2],\"zoomControls\":[4,\"zoom-controls\"],\"minZoom\":[2,\"min-zoom\"],\"maxZoom\":[2,\"max-zoom\"],\"maxBounds\":[1,\"max-bounds\"],\"maxBoundsViscosity\":[2,\"max-bounds-viscosity\"],\"selectedMarkerId\":[8,\"selected-marker-id\"],\"provider\":[1],\"tileUrl\":[1,\"tile-url\"],\"tilePreloadBuffer\":[2,\"tile-preload-buffer\"],\"rasterTileLoadingPolicy\":[1,\"raster-tile-loading-policy\"],\"vectorStyleUrl\":[1,\"vector-style-url\"],\"vectorPadding\":[2,\"vector-padding\"],\"googleApiKey\":[1,\"google-api-key\"],\"googleMapType\":[1,\"google-map-type\"],\"ariaLabel\":[1,\"aria-label\"],\"providerStatus\":[32],\"activeProvider\":[32],\"usingFallback\":[32],\"errorMessage\":[32],\"ensureMarkerVisible\":[64]},null,{\"provider\":[{\"handleBaseLayerChange\":0}],\"tileUrl\":[{\"handleBaseLayerChange\":0}],\"rasterTileLoadingPolicy\":[{\"handleBaseLayerChange\":0}],\"vectorStyleUrl\":[{\"handleBaseLayerChange\":0}],\"googleApiKey\":[{\"handleBaseLayerChange\":0}],\"googleMapType\":[{\"handleBaseLayerChange\":0}],\"tilePreloadBuffer\":[{\"handleTilePreloadBufferChange\":0}],\"vectorPadding\":[{\"handleVectorPaddingChange\":0}],\"markers\":[{\"handleMarkersChange\":0}],\"clusterMarkers\":[{\"handleMarkerClusteringChange\":0}],\"clusterRadius\":[{\"handleMarkerClusteringChange\":0}],\"clusterMinPoints\":[{\"handleMarkerClusteringChange\":0}],\"clusterMaxZoom\":[{\"handleMarkerClusteringChange\":0}],\"selectedMarkerId\":[{\"handleSelectedMarkerChange\":0}],\"centerLatitude\":[{\"handleViewChange\":0}],\"centerLongitude\":[{\"handleViewChange\":0}],\"zoom\":[{\"handleViewChange\":0}],\"minZoom\":[{\"handleZoomLimitsChange\":0}],\"maxZoom\":[{\"handleZoomLimitsChange\":0}],\"maxBounds\":[{\"handleBoundsChange\":0}],\"maxBoundsViscosity\":[{\"handleBoundsChange\":0}],\"zoomControls\":[{\"handleZoomControlsChange\":0}]}]]],[\"q-navbar.cjs\",[[769,\"q-navbar\",{\"brand\":[1],\"logoSrc\":[1,\"logo-src\"],\"logoAlt\":[1,\"logo-alt\"],\"brandHref\":[1,\"brand-href\"],\"items\":[1],\"activeValue\":[1,\"active-value\"],\"edge\":[513],\"sticky\":[516],\"compact\":[516],\"transparent\":[516],\"bordered\":[516],\"mobileMode\":[513,\"mobile-mode\"],\"mobileLabel\":[1,\"mobile-label\"],\"ariaLabel\":[1,\"aria-label\"],\"menuOpen\":[32],\"hasMobileContent\":[32]}]]],[\"q-radio-group.cjs\",[[593,\"q-radio-group\",{\"label\":[1],\"options\":[1],\"value\":[1025],\"size\":[513],\"orientation\":[513],\"disabled\":[516],\"required\":[516],\"error\":[513],\"errorMessage\":[1,\"error-message\"],\"name\":[513],\"ariaLabel\":[1,\"aria-label\"],\"focusElement\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"value\":[{\"watchValue\":0}],\"options\":[{\"watchConstraints\":0}],\"disabled\":[{\"watchConstraints\":0}],\"required\":[{\"watchConstraints\":0}],\"error\":[{\"watchConstraints\":0}],\"errorMessage\":[{\"watchConstraints\":0}]}]]],[\"q-sidepanel.cjs\",[[769,\"q-sidepanel\",{\"variant\":[513],\"open\":[1540],\"side\":[513],\"panelSize\":[1,\"panel-size\"],\"items\":[16],\"value\":[513],\"mode\":[1],\"expanded\":[4],\"accordion\":[4],\"collapsible\":[516],\"collapsed\":[1540],\"collapseControl\":[1,\"collapse-control\"],\"collapseControlAppearance\":[513,\"collapse-control-appearance\"],\"collapseControlPosition\":[1,\"collapse-control-position\"],\"collapseMode\":[513,\"collapse-mode\"],\"collapseLabel\":[1,\"collapse-label\"],\"ariaLabel\":[1,\"aria-label\"],\"isVisible\":[32],\"isAnimatedOpen\":[32],\"hasHeaderContent\":[32],\"hasFooterContent\":[32],\"expandedGroups\":[32],\"normalizedItems\":[32]},[[8,\"keydown\",\"handleGlobalKeyDown\"]],{\"open\":[{\"handleOpenChange\":0}],\"items\":[{\"handleItemsChange\":0}]}]]],[\"q-tabs.cjs\",[[513,\"q-tabs\",{\"items\":[1],\"value\":[1],\"orientation\":[513],\"size\":[1],\"variant\":[1],\"stretch\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-toast.cjs\",[[513,\"q-toast\",{\"position\":[513],\"maxVisible\":[2,\"max-visible\"],\"visibleToasts\":[32],\"announcementText\":[32],\"info\":[64],\"success\":[64],\"warning\":[64],\"danger\":[64],\"error\":[64],\"dismiss\":[64],\"clear\":[64]},null,{\"maxVisible\":[{\"handleMaxVisibleChange\":0}]}]]],[\"q-avatar.cjs\",[[769,\"q-avatar\",{\"src\":[1],\"name\":[1],\"initials\":[1],\"alt\":[1],\"size\":[8],\"shape\":[513],\"loading\":[1],\"imageFailed\":[32]},null,{\"src\":[{\"handleSourceChange\":0}]}]]],[\"q-card.cjs\",[[769,\"q-card\",{\"elevation\":[520],\"glass\":[516],\"lift\":[516],\"interactive\":[516],\"hasHeader\":[32]}]]],[\"q-carousel.cjs\",[[769,\"q-carousel\",{\"snapAlignment\":[513,\"snap-alignment\"],\"itemWidth\":[513,\"item-width\"],\"showArrows\":[516,\"show-arrows\"],\"showIndicators\":[516,\"show-indicators\"],\"repeat\":[516],\"activeIndex\":[32],\"maxIndex\":[32],\"isScrollable\":[32],\"isAtStart\":[32],\"isAtEnd\":[32],\"slideTo\":[64],\"updateLimits\":[64]}]]],[\"q-chip.cjs\",[[785,\"q-chip\",{\"label\":[1],\"disabled\":[516],\"href\":[1],\"rel\":[1],\"download\":[1],\"value\":[1],\"variant\":[513],\"size\":[513],\"clickable\":[516],\"removable\":[516],\"selected\":[516],\"target\":[1]}]]],[\"q-conversation-bubble.cjs\",[[769,\"q-conversation-bubble\",{\"variant\":[513],\"sender\":[1],\"timestamp\":[1],\"ariaLabel\":[1,\"aria-label\"],\"compact\":[516],\"hasAvatar\":[32],\"hasMeta\":[32],\"hasActions\":[32]}]]],[\"q-dialog.cjs\",[[769,\"q-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"ariaLabel\":[1,\"aria-label\"],\"message\":[1],\"backdropEffect\":[513,\"backdrop-effect\"],\"closeOnEsc\":[4,\"close-on-esc\"],\"closeOnOverlayClick\":[4,\"close-on-overlay-click\"],\"showCancel\":[4,\"show-cancel\"],\"cancelLabel\":[1,\"cancel-label\"],\"showConfirm\":[4,\"show-confirm\"],\"confirmLabel\":[1,\"confirm-label\"],\"loading\":[4],\"open\":[1540],\"closeLabel\":[1,\"close-label\"],\"isVisible\":[32],\"isAnimatedOpen\":[32],\"show\":[64],\"close\":[64],\"confirm\":[64],\"cancel\":[64]},[[8,\"keydown\",\"handleGlobalKeyDown\"]],{\"open\":[{\"handleOpenChange\":0}]}]]],[\"q-dropdown.cjs\",[[849,\"q-dropdown\",{\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"placeholder\":[1],\"options\":[1],\"value\":[1025],\"size\":[513],\"searchable\":[4],\"externalSearch\":[4,\"external-search\"],\"hasMore\":[4,\"has-more\"],\"loading\":[4],\"placement\":[1],\"collisionPadding\":[2,\"collision-padding\"],\"disabled\":[516],\"name\":[513],\"isOpen\":[32],\"focusedIndex\":[32],\"searchTerm\":[32],\"visibleCount\":[32],\"isScrollingLoading\":[32]},[[8,\"click\",\"handleClickOutside\"]],{\"value\":[{\"watchValue\":0}],\"options\":[{\"watchOptions\":0}],\"loading\":[{\"watchLoading\":0}]}]]],[\"q-form.cjs\",[[769,\"q-form\",{\"label\":[1],\"preventDefault\":[4,\"prevent-default\"],\"enterBehavior\":[1,\"enter-behavior\"],\"noValidate\":[4,\"no-validate\"],\"action\":[1],\"method\":[1],\"autocomplete\":[1],\"enctype\":[1],\"target\":[1],\"hasHeaderSlot\":[32],\"hasActionsSlot\":[32],\"getValues\":[64],\"setValues\":[64],\"resetForm\":[64],\"submitForm\":[64]},[[0,\"click\",\"handleComposedClick\"],[0,\"qClick\",\"handleButtonClick\"],[0,\"keydown\",\"handleKeyDown\"]]]]],[\"q-link.cjs\",[[769,\"q-link\",{\"label\":[1],\"disabled\":[516],\"href\":[1],\"rel\":[1],\"download\":[1],\"variant\":[513],\"underline\":[513],\"url\":[1],\"mailto\":[1],\"tel\":[1],\"target\":[1],\"external\":[516]}]]],[\"q-pagination.cjs\",[[513,\"q-pagination\",{\"showSummary\":[4,\"show-summary\"],\"itemLabel\":[1,\"item-label\"],\"page\":[2],\"pageSize\":[2,\"page-size\"],\"totalItems\":[2,\"total-items\"],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-panel.cjs\",[[769,\"q-panel\",{\"variant\":[513],\"noBorders\":[516,\"no-borders\"],\"padding\":[513],\"fullHeight\":[516,\"full-height\"],\"scrollable\":[516],\"stickyHeader\":[516,\"sticky-header\"],\"stickyFooter\":[516,\"sticky-footer\"],\"ariaLabel\":[1,\"aria-label\"],\"hasHeader\":[32],\"hasFooter\":[32]}]]],[\"q-quantity-selector.cjs\",[[513,\"q-quantity-selector\",{\"value\":[1026],\"min\":[2],\"max\":[2],\"step\":[2],\"variant\":[513],\"inputValue\":[32]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"q-reel.cjs\",[[769,\"q-reel\",{\"layout\":[1],\"lightbox\":[4],\"activeMedia\":[32]},[[0,\"qMaximize\",\"handleThumbnailMaximize\"],[8,\"keydown\",\"handleGlobalKeyDown\"]],{\"lightbox\":[{\"handleLightboxChange\":0}]}]]],[\"q-step-diagram.cjs\",[[769,\"q-step-diagram\",{\"layout\":[513],\"ariaLabel\":[1,\"aria-label\"]},null,{\"layout\":[{\"handleLayoutChange\":0}]}]]],[\"q-step-diagram-item.cjs\",[[769,\"q-step-diagram-item\",{\"lineStyle\":[513,\"line-style\"],\"layout\":[1537],\"status\":[513]}]]],[\"q-textarea.cjs\",[[593,\"q-textarea\",{\"value\":[1025],\"placeholder\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"rows\":[2],\"autoGrow\":[4,\"auto-grow\"],\"resizeMode\":[1,\"resize-mode\"],\"disabled\":[516],\"required\":[516],\"error\":[513],\"errorMessage\":[1,\"error-message\"],\"name\":[513],\"focusElement\":[64],\"adjustHeight\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"value\":[{\"watchValue\":0}],\"resizeMode\":[{\"handleResizeModeChange\":0}],\"autoGrow\":[{\"handleResizeModeChange\":0}]}]]],[\"q-thumbnail.cjs\",[[769,\"q-thumbnail\",{\"src\":[1],\"video\":[516],\"label\":[1],\"alt\":[1],\"highlighted\":[516]}]]],[\"q-toggle.cjs\",[[833,\"q-toggle\",{\"label\":[1],\"size\":[1],\"type\":[1],\"checked\":[1540],\"disabled\":[516],\"required\":[516],\"error\":[1],\"name\":[513],\"hasDefaultSlot\":[32],\"toggle\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"checked\":[{\"watchChecked\":0}]}]]],[\"q-toolbar.cjs\",[[769,\"q-toolbar\",{\"edge\":[513],\"sticky\":[516],\"compact\":[516],\"transparent\":[516],\"bordered\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-alert.cjs\",[[769,\"q-alert\",{\"heading\":[1],\"variant\":[513],\"dismissible\":[4],\"dismissLabel\":[1,\"dismiss-label\"],\"announcement\":[1],\"hasIcon\":[32],\"hasActions\":[32]}]]],[\"q-scrollable.cjs\",[[769,\"q-scrollable\",{\"height\":[513],\"maxHeight\":[513,\"max-height\"],\"mode\":[513],\"target\":[513],\"nativeOnMobile\":[516,\"native-on-mobile\"],\"autoHide\":[516,\"auto-hide\"],\"isScrolling\":[32],\"isDragging\":[32],\"scrollValueNow\":[32],\"scrollValueMax\":[32],\"scrollToBottom\":[64],\"scrollToPosition\":[64]},null,{\"mode\":[{\"handleModeOrTargetChange\":0}],\"target\":[{\"handleModeOrTargetChange\":0}]}]]],[\"q-input_2.cjs\",[[849,\"q-input\",{\"value\":[1025],\"placeholder\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"size\":[1],\"clearable\":[4],\"disabled\":[516],\"required\":[516],\"error\":[513],\"errorMessage\":[1,\"error-message\"],\"name\":[513],\"type\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"hasPrefix\":[32],\"hasSuffix\":[32],\"passwordVisible\":[32],\"focusElement\":[64],\"clearValue\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"value\":[{\"watchValue\":0}]}],[513,\"q-progress\",{\"value\":[2],\"label\":[1],\"indeterminate\":[516],\"ariaValueText\":[1,\"aria-valuetext\"],\"variant\":[513],\"size\":[520],\"tone\":[513],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-icon.cjs\",[[513,\"q-icon\",{\"name\":[1],\"lib\":[1],\"localPath\":[1,\"local-path\"],\"libVersion\":[1,\"lib-version\"],\"fetchTimeout\":[2,\"fetch-timeout\"],\"size\":[8],\"color\":[1],\"label\":[1],\"svgContent\":[32],\"isBinary\":[32],\"resolvedUrl\":[32],\"hasError\":[32]},null,{\"name\":[{\"watchHandler\":0}],\"lib\":[{\"watchHandler\":0}],\"localPath\":[{\"watchHandler\":0}],\"libVersion\":[{\"watchHandler\":0}]}]]],[\"q-button_2.cjs\",[[785,\"q-button\",{\"disabled\":[516],\"href\":[1],\"rel\":[1],\"download\":[1],\"icon\":[1],\"iconOnly\":[516,\"icon-only\"],\"ariaLabel\":[1,\"aria-label\"],\"variant\":[1],\"size\":[1],\"shape\":[513],\"layout\":[513],\"expand\":[516],\"loading\":[516],\"target\":[1],\"type\":[1],\"autoIconOnly\":[32]},null,{\"icon\":[{\"handleIconAccessibilityChange\":0}],\"iconOnly\":[{\"handleIconAccessibilityChange\":0}],\"ariaLabel\":[{\"handleIconAccessibilityChange\":0}]}],[769,\"q-tooltip\",{\"content\":[1],\"position\":[513],\"delay\":[2],\"visible\":[32]}]]]]"), options);
|
|
21
|
+
return index.bootstrapLazy(JSON.parse("[[\"q-data-table.cjs\",[[769,\"q-data-table\",{\"columns\":[1],\"items\":[1],\"keyField\":[1,\"key-field\"],\"rowGroup\":[16],\"rowActions\":[1,\"row-actions\"],\"rowClickable\":[4,\"row-clickable\"],\"selectable\":[4],\"selectedKeys\":[1040],\"sortable\":[4],\"sortMode\":[1,\"sort-mode\"],\"sortColumn\":[1025,\"sort-column\"],\"sortDirection\":[1025,\"sort-direction\"],\"showToolbar\":[4,\"show-toolbar\"],\"toolbarTitle\":[1,\"toolbar-title\"],\"ariaLabel\":[1,\"aria-label\"],\"showSearch\":[4,\"show-search\"],\"searchPlaceholder\":[1,\"search-placeholder\"],\"searchValue\":[1025,\"search-value\"],\"loading\":[4]}]]],[\"q-syntax-box.cjs\",[[849,\"q-syntax-box\",{\"code\":[1025],\"value\":[1025],\"heading\":[1],\"ariaLabel\":[1,\"aria-label\"],\"variant\":[1],\"height\":[1],\"copyable\":[4],\"editable\":[516],\"name\":[513],\"required\":[516],\"language\":[1],\"disabled\":[516],\"copied\":[32],\"copyFailed\":[32],\"scrollToBottom\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"code\":[{\"watchCode\":0}],\"value\":[{\"watchValue\":0}],\"editable\":[{\"watchEditable\":0}]}]]],[\"q-map.cjs\",[[769,\"q-map\",{\"attribution\":[1],\"attributionUrl\":[1,\"attribution-url\"],\"markers\":[1],\"clusterMarkers\":[4,\"cluster-markers\"],\"clusterRadius\":[2,\"cluster-radius\"],\"clusterMinPoints\":[2,\"cluster-min-points\"],\"clusterMaxZoom\":[2,\"cluster-max-zoom\"],\"centerLatitude\":[2,\"center-latitude\"],\"centerLongitude\":[2,\"center-longitude\"],\"zoom\":[2],\"zoomControls\":[4,\"zoom-controls\"],\"minZoom\":[2,\"min-zoom\"],\"maxZoom\":[2,\"max-zoom\"],\"maxBounds\":[1,\"max-bounds\"],\"maxBoundsViscosity\":[2,\"max-bounds-viscosity\"],\"selectedMarkerId\":[8,\"selected-marker-id\"],\"provider\":[1],\"tileUrl\":[1,\"tile-url\"],\"tilePreloadBuffer\":[2,\"tile-preload-buffer\"],\"rasterTileLoadingPolicy\":[1,\"raster-tile-loading-policy\"],\"vectorStyleUrl\":[1,\"vector-style-url\"],\"vectorPadding\":[2,\"vector-padding\"],\"googleApiKey\":[1,\"google-api-key\"],\"googleMapType\":[1,\"google-map-type\"],\"ariaLabel\":[1,\"aria-label\"],\"providerStatus\":[32],\"activeProvider\":[32],\"usingFallback\":[32],\"errorMessage\":[32],\"ensureMarkerVisible\":[64]},null,{\"provider\":[{\"handleBaseLayerChange\":0}],\"tileUrl\":[{\"handleBaseLayerChange\":0}],\"rasterTileLoadingPolicy\":[{\"handleBaseLayerChange\":0}],\"vectorStyleUrl\":[{\"handleBaseLayerChange\":0}],\"googleApiKey\":[{\"handleBaseLayerChange\":0}],\"googleMapType\":[{\"handleBaseLayerChange\":0}],\"tilePreloadBuffer\":[{\"handleTilePreloadBufferChange\":0}],\"vectorPadding\":[{\"handleVectorPaddingChange\":0}],\"markers\":[{\"handleMarkersChange\":0}],\"clusterMarkers\":[{\"handleMarkerClusteringChange\":0}],\"clusterRadius\":[{\"handleMarkerClusteringChange\":0}],\"clusterMinPoints\":[{\"handleMarkerClusteringChange\":0}],\"clusterMaxZoom\":[{\"handleMarkerClusteringChange\":0}],\"selectedMarkerId\":[{\"handleSelectedMarkerChange\":0}],\"centerLatitude\":[{\"handleViewChange\":0}],\"centerLongitude\":[{\"handleViewChange\":0}],\"zoom\":[{\"handleViewChange\":0}],\"minZoom\":[{\"handleZoomLimitsChange\":0}],\"maxZoom\":[{\"handleZoomLimitsChange\":0}],\"maxBounds\":[{\"handleBoundsChange\":0}],\"maxBoundsViscosity\":[{\"handleBoundsChange\":0}],\"zoomControls\":[{\"handleZoomControlsChange\":0}]}]]],[\"q-navbar.cjs\",[[769,\"q-navbar\",{\"brand\":[1],\"logoSrc\":[1,\"logo-src\"],\"logoAlt\":[1,\"logo-alt\"],\"brandHref\":[1,\"brand-href\"],\"items\":[1],\"activeValue\":[1,\"active-value\"],\"edge\":[513],\"sticky\":[516],\"compact\":[516],\"transparent\":[516],\"bordered\":[516],\"mobileMode\":[513,\"mobile-mode\"],\"mobileLabel\":[1,\"mobile-label\"],\"ariaLabel\":[1,\"aria-label\"],\"menuOpen\":[32],\"hasMobileContent\":[32]}]]],[\"q-radio-group.cjs\",[[593,\"q-radio-group\",{\"label\":[1],\"options\":[1],\"value\":[1025],\"size\":[513],\"orientation\":[513],\"disabled\":[516],\"required\":[516],\"error\":[513],\"errorMessage\":[1,\"error-message\"],\"name\":[513],\"ariaLabel\":[1,\"aria-label\"],\"focusElement\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"value\":[{\"watchValue\":0}],\"options\":[{\"watchConstraints\":0}],\"disabled\":[{\"watchConstraints\":0}],\"required\":[{\"watchConstraints\":0}],\"error\":[{\"watchConstraints\":0}],\"errorMessage\":[{\"watchConstraints\":0}]}]]],[\"q-sidepanel.cjs\",[[769,\"q-sidepanel\",{\"variant\":[513],\"open\":[1540],\"side\":[513],\"panelSize\":[1,\"panel-size\"],\"items\":[16],\"value\":[513],\"mode\":[1],\"expanded\":[4],\"accordion\":[4],\"collapsible\":[516],\"collapsed\":[1540],\"collapseControl\":[1,\"collapse-control\"],\"collapseControlAppearance\":[513,\"collapse-control-appearance\"],\"collapseControlPosition\":[1,\"collapse-control-position\"],\"collapseMode\":[513,\"collapse-mode\"],\"collapseLabel\":[1,\"collapse-label\"],\"ariaLabel\":[1,\"aria-label\"],\"isVisible\":[32],\"isAnimatedOpen\":[32],\"hasHeaderContent\":[32],\"hasFooterContent\":[32],\"expandedGroups\":[32],\"normalizedItems\":[32]},[[8,\"keydown\",\"handleGlobalKeyDown\"]],{\"open\":[{\"handleOpenChange\":0}],\"items\":[{\"handleItemsChange\":0}]}]]],[\"q-tabs.cjs\",[[513,\"q-tabs\",{\"items\":[1],\"value\":[1],\"orientation\":[513],\"size\":[1],\"variant\":[1],\"stretch\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-toast.cjs\",[[513,\"q-toast\",{\"position\":[513],\"maxVisible\":[2,\"max-visible\"],\"visibleToasts\":[32],\"announcementText\":[32],\"info\":[64],\"success\":[64],\"warning\":[64],\"danger\":[64],\"error\":[64],\"dismiss\":[64],\"clear\":[64]},null,{\"maxVisible\":[{\"handleMaxVisibleChange\":0}]}]]],[\"q-avatar.cjs\",[[769,\"q-avatar\",{\"src\":[1],\"name\":[1],\"initials\":[1],\"alt\":[1],\"size\":[8],\"shape\":[513],\"loading\":[1],\"imageFailed\":[32]},null,{\"src\":[{\"handleSourceChange\":0}]}]]],[\"q-card.cjs\",[[769,\"q-card\",{\"elevation\":[520],\"glass\":[516],\"lift\":[516],\"interactive\":[516],\"hasHeader\":[32]}]]],[\"q-carousel.cjs\",[[769,\"q-carousel\",{\"snapAlignment\":[513,\"snap-alignment\"],\"itemWidth\":[513,\"item-width\"],\"showArrows\":[516,\"show-arrows\"],\"showIndicators\":[516,\"show-indicators\"],\"repeat\":[516],\"activeIndex\":[32],\"maxIndex\":[32],\"isScrollable\":[32],\"isAtStart\":[32],\"isAtEnd\":[32],\"slideTo\":[64],\"updateLimits\":[64]}]]],[\"q-chip.cjs\",[[785,\"q-chip\",{\"label\":[1],\"disabled\":[516],\"href\":[1],\"rel\":[1],\"download\":[1],\"value\":[1],\"variant\":[513],\"size\":[513],\"clickable\":[516],\"removable\":[516],\"selected\":[516],\"target\":[1]}]]],[\"q-conversation-bubble.cjs\",[[769,\"q-conversation-bubble\",{\"variant\":[513],\"sender\":[1],\"timestamp\":[1],\"ariaLabel\":[1,\"aria-label\"],\"compact\":[516],\"hasAvatar\":[32],\"hasMeta\":[32],\"hasActions\":[32]}]]],[\"q-dialog.cjs\",[[769,\"q-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"ariaLabel\":[1,\"aria-label\"],\"message\":[1],\"backdropEffect\":[513,\"backdrop-effect\"],\"closeOnEsc\":[4,\"close-on-esc\"],\"closeOnOverlayClick\":[4,\"close-on-overlay-click\"],\"showCancel\":[4,\"show-cancel\"],\"cancelLabel\":[1,\"cancel-label\"],\"showConfirm\":[4,\"show-confirm\"],\"confirmLabel\":[1,\"confirm-label\"],\"loading\":[4],\"open\":[1540],\"closeLabel\":[1,\"close-label\"],\"isVisible\":[32],\"isAnimatedOpen\":[32],\"show\":[64],\"close\":[64],\"confirm\":[64],\"cancel\":[64]},[[8,\"keydown\",\"handleGlobalKeyDown\"]],{\"open\":[{\"handleOpenChange\":0}]}]]],[\"q-dropdown.cjs\",[[849,\"q-dropdown\",{\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"placeholder\":[1],\"options\":[1],\"value\":[1025],\"size\":[513],\"searchable\":[4],\"externalSearch\":[4,\"external-search\"],\"hasMore\":[4,\"has-more\"],\"loading\":[4],\"placement\":[1],\"collisionPadding\":[2,\"collision-padding\"],\"disabled\":[516],\"name\":[513],\"isOpen\":[32],\"focusedIndex\":[32],\"searchTerm\":[32],\"visibleCount\":[32],\"isScrollingLoading\":[32]},[[8,\"click\",\"handleClickOutside\"]],{\"value\":[{\"watchValue\":0}],\"options\":[{\"watchOptions\":0}],\"loading\":[{\"watchLoading\":0}]}]]],[\"q-form.cjs\",[[769,\"q-form\",{\"label\":[1],\"preventDefault\":[4,\"prevent-default\"],\"enterBehavior\":[1,\"enter-behavior\"],\"noValidate\":[4,\"no-validate\"],\"action\":[1],\"method\":[1],\"autocomplete\":[1],\"enctype\":[1],\"target\":[1],\"hasHeaderSlot\":[32],\"hasActionsSlot\":[32],\"getValues\":[64],\"setValues\":[64],\"resetForm\":[64],\"submitForm\":[64]},[[0,\"click\",\"handleComposedClick\"],[0,\"qClick\",\"handleButtonClick\"],[0,\"keydown\",\"handleKeyDown\"]]]]],[\"q-link.cjs\",[[769,\"q-link\",{\"label\":[1],\"disabled\":[516],\"href\":[1],\"rel\":[1],\"download\":[1],\"variant\":[513],\"underline\":[513],\"url\":[1],\"mailto\":[1],\"tel\":[1],\"target\":[1],\"external\":[516]}]]],[\"q-pagination.cjs\",[[513,\"q-pagination\",{\"showSummary\":[4,\"show-summary\"],\"itemLabel\":[1,\"item-label\"],\"page\":[2],\"pageSize\":[2,\"page-size\"],\"totalItems\":[2,\"total-items\"],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-panel.cjs\",[[769,\"q-panel\",{\"variant\":[513],\"noBorders\":[516,\"no-borders\"],\"padding\":[513],\"fullHeight\":[516,\"full-height\"],\"scrollable\":[516],\"stickyHeader\":[516,\"sticky-header\"],\"stickyFooter\":[516,\"sticky-footer\"],\"ariaLabel\":[1,\"aria-label\"],\"hasHeader\":[32],\"hasFooter\":[32]}]]],[\"q-quantity-selector.cjs\",[[513,\"q-quantity-selector\",{\"value\":[1026],\"min\":[2],\"max\":[2],\"step\":[2],\"variant\":[513],\"inputValue\":[32]},null,{\"value\":[{\"watchValue\":0}]}]]],[\"q-reel.cjs\",[[769,\"q-reel\",{\"layout\":[1],\"lightbox\":[4],\"activeMedia\":[32]},[[0,\"qMaximize\",\"handleThumbnailMaximize\"],[8,\"keydown\",\"handleGlobalKeyDown\"]],{\"lightbox\":[{\"handleLightboxChange\":0}]}]]],[\"q-step-diagram.cjs\",[[769,\"q-step-diagram\",{\"layout\":[513],\"ariaLabel\":[1,\"aria-label\"]},null,{\"layout\":[{\"handleLayoutChange\":0}]}]]],[\"q-step-diagram-item.cjs\",[[769,\"q-step-diagram-item\",{\"lineStyle\":[513,\"line-style\"],\"layout\":[1537],\"status\":[513]}]]],[\"q-textarea.cjs\",[[593,\"q-textarea\",{\"value\":[1025],\"placeholder\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"rows\":[2],\"autoGrow\":[4,\"auto-grow\"],\"resizeMode\":[1,\"resize-mode\"],\"disabled\":[516],\"required\":[516],\"error\":[513],\"errorMessage\":[1,\"error-message\"],\"name\":[513],\"focusElement\":[64],\"adjustHeight\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"value\":[{\"watchValue\":0}],\"resizeMode\":[{\"handleResizeModeChange\":0}],\"autoGrow\":[{\"handleResizeModeChange\":0}]}]]],[\"q-thumbnail.cjs\",[[769,\"q-thumbnail\",{\"src\":[1],\"video\":[516],\"label\":[1],\"alt\":[1],\"highlighted\":[516]}]]],[\"q-toggle.cjs\",[[833,\"q-toggle\",{\"label\":[1],\"size\":[1],\"type\":[1],\"checked\":[1540],\"disabled\":[516],\"required\":[516],\"error\":[1],\"name\":[513],\"hasDefaultSlot\":[32],\"toggle\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"checked\":[{\"watchChecked\":0}]}]]],[\"q-toolbar.cjs\",[[769,\"q-toolbar\",{\"edge\":[513],\"sticky\":[516],\"compact\":[516],\"transparent\":[516],\"bordered\":[516],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-alert.cjs\",[[769,\"q-alert\",{\"heading\":[1],\"variant\":[513],\"dismissible\":[4],\"dismissLabel\":[1,\"dismiss-label\"],\"announcement\":[1],\"hasIcon\":[32],\"hasActions\":[32]}]]],[\"q-scrollable.cjs\",[[769,\"q-scrollable\",{\"height\":[513],\"maxHeight\":[513,\"max-height\"],\"mode\":[513],\"target\":[513],\"nativeOnMobile\":[516,\"native-on-mobile\"],\"autoHide\":[516,\"auto-hide\"],\"isScrolling\":[32],\"isDragging\":[32],\"scrollValueNow\":[32],\"scrollValueMax\":[32],\"scrollToBottom\":[64],\"scrollToPosition\":[64]},null,{\"mode\":[{\"handleModeOrTargetChange\":0}],\"target\":[{\"handleModeOrTargetChange\":0}]}]]],[\"q-input_2.cjs\",[[849,\"q-input\",{\"value\":[1025],\"placeholder\":[1],\"label\":[1],\"ariaLabel\":[1,\"aria-label\"],\"size\":[1],\"clearable\":[4],\"disabled\":[516],\"required\":[516],\"error\":[513],\"errorMessage\":[1,\"error-message\"],\"name\":[513],\"type\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"hasPrefix\":[32],\"hasSuffix\":[32],\"passwordVisible\":[32],\"focusElement\":[64],\"clearValue\":[64],\"checkValidity\":[64],\"reportValidity\":[64]},null,{\"value\":[{\"watchValue\":0}]}],[513,\"q-progress\",{\"value\":[2],\"label\":[1],\"indeterminate\":[516],\"ariaValueText\":[1,\"aria-valuetext\"],\"variant\":[513],\"size\":[520],\"tone\":[513],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"q-icon.cjs\",[[513,\"q-icon\",{\"name\":[1],\"definition\":[16],\"lib\":[1],\"localPath\":[1,\"local-path\"],\"libVersion\":[1,\"lib-version\"],\"fetchTimeout\":[2,\"fetch-timeout\"],\"size\":[8],\"color\":[1],\"label\":[1],\"svgContent\":[32],\"isBinary\":[32],\"resolvedUrl\":[32],\"hasError\":[32],\"resolvedDefinition\":[32]},null,{\"name\":[{\"watchHandler\":0}],\"definition\":[{\"watchHandler\":0}],\"lib\":[{\"watchHandler\":0}],\"localPath\":[{\"watchHandler\":0}],\"libVersion\":[{\"watchHandler\":0}]}]]],[\"q-button_2.cjs\",[[785,\"q-button\",{\"disabled\":[516],\"href\":[1],\"rel\":[1],\"download\":[1],\"icon\":[1],\"iconOnly\":[516,\"icon-only\"],\"ariaLabel\":[1,\"aria-label\"],\"variant\":[1],\"size\":[1],\"shape\":[513],\"layout\":[513],\"expand\":[516],\"loading\":[516],\"target\":[1],\"type\":[1],\"autoIconOnly\":[32]},null,{\"icon\":[{\"handleIconAccessibilityChange\":0}],\"iconOnly\":[{\"handleIconAccessibilityChange\":0}],\"ariaLabel\":[{\"handleIconAccessibilityChange\":0}]}],[769,\"q-tooltip\",{\"content\":[1],\"position\":[513],\"delay\":[2],\"visible\":[32]}]]]]"), options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
package/dist/collection/components/data-display/data-table/internals/render-sort-indicator.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { ChevronDown, ChevronUp } from "@lucide/icons";
|
|
2
3
|
export function renderDataTableSortIndicator({ direction }) {
|
|
3
|
-
return (h("span", { class: "sort-indicator", "aria-hidden": "true" }, h("span", { class: { 'sort-arrow': true, 'is-active': direction === 'asc' } }, h("q-icon", { name: "chevron-up", size: "10px" })), h("span", { class: { 'sort-arrow': true, 'is-active': direction === 'desc' } }, h("q-icon", { name: "chevron-down", size: "10px" }))));
|
|
4
|
+
return (h("span", { class: "sort-indicator", "aria-hidden": "true" }, h("span", { class: { 'sort-arrow': true, 'is-active': direction === 'asc' } }, h("q-icon", { definition: ChevronUp, name: "chevron-up", size: "10px" })), h("span", { class: { 'sort-arrow': true, 'is-active': direction === 'desc' } }, h("q-icon", { definition: ChevronDown, name: "chevron-down", size: "10px" }))));
|
|
4
5
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { Braces, Check, Copy } from "@lucide/icons";
|
|
2
3
|
import { formatCode } from "../../../utils/formatter";
|
|
3
4
|
import { syncNativeControlValidity } from "../../../utils/form-control-validity";
|
|
4
5
|
import { highlight as highlightSyntax } from "../../../utils/syntax";
|
|
@@ -240,7 +241,7 @@ export class QSyntaxBox {
|
|
|
240
241
|
const content = this.code !== undefined ? (this.editable ? (h("div", { class: "editor-area", style: { height: resolvedHeight } }, h("span", { id: "syntax-box-keyboard-help", class: "visually-hidden" }, "Press Escape to leave the code editor. Press Tab to insert two spaces."), h("textarea", { class: "editor-textarea", value: this.code, name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.ariaLabel?.trim() || this.heading?.trim() || `${this.language.toUpperCase()} code editor`, "aria-describedby": "syntax-box-keyboard-help", onInput: this.handleInput, onChange: this.handleChange, onScroll: this.handleScroll, onKeyDown: this.handleKeyDown }), h("pre", { class: "code-body", ref: el => (this.preEl = el) }, h("code", { innerHTML: highlightSyntax(this.code, this.language) })))) : (h("pre", { class: "code-body" }, h("code", { innerHTML: highlightSyntax(this.code, this.language) })))) : (h("slot", null));
|
|
241
242
|
const bodyContent = isScrollable && !this.editable ? (h("q-scrollable", { height: resolvedHeight, ref: el => (this.scrollableEl = el) }, content)) : (content);
|
|
242
243
|
if (this.variant === 'panel') {
|
|
243
|
-
return (h(Host, { class: { 'q-syntax-box-panel': true } }, h("div", { class: "panel-container" }, h("div", { class: "panel-header" }, h("span", null, this.heading), h("div", { class: "panel-actions" }, h("slot", { name: "actions" }), this.editable && (h("q-button", { class: "format-btn", variant: "ghost", size: "sm", onClick: this.handleFormat, disabled: this.disabled }, h("q-icon", { slot: "icon-left",
|
|
244
|
+
return (h(Host, { class: { 'q-syntax-box-panel': true } }, h("div", { class: "panel-container" }, h("div", { class: "panel-header" }, h("span", null, this.heading), h("div", { class: "panel-actions" }, h("slot", { name: "actions" }), this.editable && (h("q-button", { class: "format-btn", variant: "ghost", size: "sm", onClick: this.handleFormat, disabled: this.disabled }, h("q-icon", { slot: "icon-left", definition: Braces, name: "braces", size: "sm" }), h("q-tooltip", { slot: "icon-left", position: "bottom", content: "Format Code" }))), this.copyable && (h("q-button", { variant: "ghost", size: "sm", onClick: this.copyCode, disabled: this.disabled }, h("q-icon", { slot: "icon-left", definition: this.copied ? Check : Copy, name: this.copied ? 'check' : 'copy', size: "sm" }), h("q-tooltip", { slot: "icon-left", position: "bottom", content: this.getCopyTooltipContent() }))))), bodyContent)));
|
|
244
245
|
}
|
|
245
246
|
return (h(Host, { class: { 'q-syntax-box-plain': true } }, h("div", { class: "plain-container" }, bodyContent)));
|
|
246
247
|
}
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
/* Native Input Box */
|
|
40
40
|
.input-box {
|
|
41
|
+
text-align: var(--q-input-text-align, start);
|
|
41
42
|
width: 100%;
|
|
42
43
|
background: transparent;
|
|
43
44
|
border: none;
|
|
@@ -52,6 +53,18 @@
|
|
|
52
53
|
box-sizing: border-box;
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
/* Custom spinner buttons provide number stepping; suppress duplicate native arrows. */
|
|
57
|
+
.input-box[type="number"] {
|
|
58
|
+
appearance: textfield;
|
|
59
|
+
-moz-appearance: textfield;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.input-box[type="number"]::-webkit-inner-spin-button,
|
|
63
|
+
.input-box[type="number"]::-webkit-outer-spin-button {
|
|
64
|
+
-webkit-appearance: none;
|
|
65
|
+
margin: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
55
68
|
/* Slot & Button Positioning inside the Flex Control */
|
|
56
69
|
.prefix-container,
|
|
57
70
|
.suffix-container {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { ChevronRight } from "@lucide/icons";
|
|
2
3
|
import { identifyItems } from "../../../../utils/collection-identity";
|
|
3
4
|
export function renderNavItems(options) {
|
|
4
5
|
const { items, expandedGroups, activeValue, onItemClick, depth = 0 } = options;
|
|
@@ -9,18 +10,21 @@ export function renderNavItems(options) {
|
|
|
9
10
|
const isExpanded = isAlwaysExpanded || expandedGroups.has(item.value);
|
|
10
11
|
const isActive = !hasChildren && item.value === activeValue;
|
|
11
12
|
const depthTone = depth % 2 === 0 ? 'primary' : 'secondary';
|
|
13
|
+
const count = item.badgeCount ?? 0;
|
|
14
|
+
const hasBadge = Number.isSafeInteger(count) && count > 0;
|
|
15
|
+
const accessibleLabel = hasBadge ? `${item.label}, ${item.badgeLabel?.trim() || count}` : item.label;
|
|
12
16
|
return (h("div", { class: "nav-item-group", key: key }, h("div", { class: {
|
|
13
17
|
'nav-item': true,
|
|
14
18
|
'nav-item--active': isActive,
|
|
15
19
|
'nav-item--parent': hasChildren,
|
|
16
20
|
'nav-item--always-expanded': isAlwaysExpanded,
|
|
17
|
-
}, "data-depth": depth, "data-depth-tone": depthTone, style: { paddingLeft: `${16 + depth * 16}px` }, role: isAlwaysExpanded ? 'heading' : 'button', tabindex: isAlwaysExpanded ? undefined : 0, title:
|
|
21
|
+
}, "data-depth": depth, "data-depth-tone": depthTone, style: { paddingLeft: `${16 + depth * 16}px` }, role: isAlwaysExpanded ? 'heading' : 'button', tabindex: isAlwaysExpanded ? undefined : 0, title: accessibleLabel, "aria-label": accessibleLabel, "aria-level": isAlwaysExpanded ? String(Math.min(depth + 2, 6)) : undefined, "aria-expanded": hasChildren && !isAlwaysExpanded ? String(isExpanded) : undefined, "aria-current": isActive ? 'page' : undefined, onClick: isAlwaysExpanded ? undefined : () => onItemClick(item), onKeyDown: isAlwaysExpanded
|
|
18
22
|
? undefined
|
|
19
23
|
: (e) => {
|
|
20
24
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
21
25
|
e.preventDefault();
|
|
22
26
|
onItemClick(item);
|
|
23
27
|
}
|
|
24
|
-
} }, item.icon && (h("q-icon", { class: "nav-item__icon", name: item.icon, lib: "lucide", size: "sm" })), h("span", { class: "nav-item__label" }, item.label), hasChildren && !isAlwaysExpanded && (h("q-icon", { class: { 'nav-item__chevron': true, 'nav-item__chevron--open': isExpanded }, name: "chevron-right",
|
|
28
|
+
} }, item.icon && (h("q-icon", { class: "nav-item__icon", name: item.icon, lib: "lucide", size: "sm" })), h("span", { class: "nav-item__label" }, item.label), hasBadge && (h("span", { class: "nav-item__badge", part: "item-badge", "aria-hidden": "true" }, count > 99 ? '99+' : count)), hasChildren && !isAlwaysExpanded && (h("q-icon", { class: { 'nav-item__chevron': true, 'nav-item__chevron--open': isExpanded }, definition: ChevronRight, name: "chevron-right", size: "sm" }))), hasChildren && isExpanded && (h("div", { class: "nav-children", role: "group", "aria-label": item.label }, renderNavItems({ items: item.children, expandedGroups, activeValue, onItemClick, depth: depth + 1 })))));
|
|
25
29
|
});
|
|
26
30
|
}
|
|
@@ -440,6 +440,23 @@ slot[name='footer'] {
|
|
|
440
440
|
|
|
441
441
|
/* ── Chevron ─────────────────────────────────────────────────────────────── */
|
|
442
442
|
|
|
443
|
+
.nav-item__badge {
|
|
444
|
+
box-sizing: border-box;
|
|
445
|
+
display: inline-flex;
|
|
446
|
+
flex-shrink: 0;
|
|
447
|
+
align-items: center;
|
|
448
|
+
justify-content: center;
|
|
449
|
+
min-width: 19px;
|
|
450
|
+
height: 19px;
|
|
451
|
+
padding: 0 5px;
|
|
452
|
+
border-radius: 999px;
|
|
453
|
+
color: var(--q-fg-base);
|
|
454
|
+
background: var(--q-color-primary);
|
|
455
|
+
font-size: 0.65rem;
|
|
456
|
+
font-weight: 700;
|
|
457
|
+
pointer-events: none;
|
|
458
|
+
}
|
|
459
|
+
|
|
443
460
|
.nav-item__chevron {
|
|
444
461
|
flex-shrink: 0;
|
|
445
462
|
margin-left: auto;
|
|
@@ -474,6 +491,12 @@ slot[name='footer'] {
|
|
|
474
491
|
display: none;
|
|
475
492
|
}
|
|
476
493
|
|
|
494
|
+
.nav-sidebar.is-collapsed.collapse-mode-rail .nav-item__badge {
|
|
495
|
+
position: absolute;
|
|
496
|
+
top: 0;
|
|
497
|
+
right: 4px;
|
|
498
|
+
}
|
|
499
|
+
|
|
477
500
|
.nav-sidebar.is-collapsed.collapse-mode-rail .nav-item__label,
|
|
478
501
|
.nav-sidebar.is-collapsed.collapse-mode-rail .nav-item__chevron {
|
|
479
502
|
display: none;
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp, PanelBottomClose, PanelBottomOpen, PanelLeftClose, PanelLeftOpen, PanelRightClose, PanelRightOpen, PanelTopClose, PanelTopOpen, } from "@lucide/icons";
|
|
2
3
|
import { focusFirstElement, handleTabTrap } from "../../../utils/dom";
|
|
3
4
|
import { handleDrawerOpenChange } from "./internals/drawer";
|
|
4
5
|
import { seedExpandedGroups, toggleGroup } from "./internals/groups";
|
|
5
6
|
import { renderNavItems } from "./internals/nav-items";
|
|
6
7
|
import { getSidepanelItems } from "./sidepanel.utils";
|
|
7
8
|
const DEFAULT_COLLAPSE_LABEL = 'Toggle sidebar';
|
|
9
|
+
const COLLAPSE_ICON_DEFINITIONS = {
|
|
10
|
+
'chevron-down': ChevronDown,
|
|
11
|
+
'chevron-left': ChevronLeft,
|
|
12
|
+
'chevron-right': ChevronRight,
|
|
13
|
+
'chevron-up': ChevronUp,
|
|
14
|
+
'panel-bottom-close': PanelBottomClose,
|
|
15
|
+
'panel-bottom-open': PanelBottomOpen,
|
|
16
|
+
'panel-left-close': PanelLeftClose,
|
|
17
|
+
'panel-left-open': PanelLeftOpen,
|
|
18
|
+
'panel-right-close': PanelRightClose,
|
|
19
|
+
'panel-right-open': PanelRightOpen,
|
|
20
|
+
'panel-top-close': PanelTopClose,
|
|
21
|
+
'panel-top-open': PanelTopOpen,
|
|
22
|
+
};
|
|
8
23
|
/**
|
|
9
24
|
* Drawer, persistent panel, or hierarchical navigation side panel.
|
|
10
25
|
* @slot - Main content used by drawer and panel variants.
|
|
@@ -18,6 +33,7 @@ const DEFAULT_COLLAPSE_LABEL = 'Toggle sidebar';
|
|
|
18
33
|
* @part panel - Persistent panel surface.
|
|
19
34
|
* @part header - Header region.
|
|
20
35
|
* @part body - Body or navigation region.
|
|
36
|
+
* @part item-badge - Navigation item's optional count badge.
|
|
21
37
|
* @part footer - Footer region.
|
|
22
38
|
* @part collapse-control - Built-in collapse button.
|
|
23
39
|
* @part collapse-control-adornment - Positioning wrapper for the built-in control's optional visual adornment.
|
|
@@ -229,6 +245,9 @@ export class QSidepanel {
|
|
|
229
245
|
? this.getEdgeTabCollapseIconName()
|
|
230
246
|
: this.getIconButtonCollapseIconName();
|
|
231
247
|
}
|
|
248
|
+
getCollapseIconDefinition() {
|
|
249
|
+
return COLLAPSE_ICON_DEFINITIONS[this.getCollapseIconName()];
|
|
250
|
+
}
|
|
232
251
|
getCollapseControlLabel() {
|
|
233
252
|
const label = this.collapseLabel.trim();
|
|
234
253
|
if (label && label !== DEFAULT_COLLAPSE_LABEL) {
|
|
@@ -249,7 +268,7 @@ export class QSidepanel {
|
|
|
249
268
|
[`collapse-control--${placement}`]: true,
|
|
250
269
|
'collapse-control--edge-tab': isEdgeTab,
|
|
251
270
|
'collapse-control--icon-button': !isEdgeTab,
|
|
252
|
-
}, style: controlStyle, part: "collapse-control", "aria-label": collapseControlLabel, title: collapseControlLabel, "aria-expanded": String(!this.collapsed), onClick: this.handleCollapseToggle }, h("slot", { name: iconSlotName }, h("q-icon", {
|
|
271
|
+
}, style: controlStyle, part: "collapse-control", "aria-label": collapseControlLabel, title: collapseControlLabel, "aria-expanded": String(!this.collapsed), onClick: this.handleCollapseToggle }, h("slot", { name: iconSlotName }, h("q-icon", { definition: this.getCollapseIconDefinition(), name: this.getCollapseIconName(), size: "sm" })), h("span", { class: "collapse-control__adornment", part: "collapse-control-adornment", "aria-hidden": "true" }, h("slot", { name: "collapse-control-adornment" }))));
|
|
253
272
|
}
|
|
254
273
|
render() {
|
|
255
274
|
const customSizeStyle = {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { DEFAULT_FETCH_TIMEOUT_MS } from "./internals/constants";
|
|
3
3
|
import { fetchIconSvg } from "./internals/fetch-icon";
|
|
4
|
+
import { isQIconStrictMode, prepareQIconDefinition, resolveRegisteredQIcon } from "./internals/registry";
|
|
5
|
+
import { renderQIconDefinition } from "./internals/render-definition";
|
|
4
6
|
import { sanitizeIconSvg } from "./internals/sanitize-svg";
|
|
5
7
|
import { getIconSizeStyle } from "./internals/size";
|
|
6
8
|
import { isBinaryIconUrl, resolveFetchableIconUrl, resolveIconUrl } from "./internals/url";
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @part svg - Container for
|
|
10
|
+
* Synchronous registered icon renderer with optional backwards-compatible URL loading.
|
|
11
|
+
* @part svg - Container for registered or sanitized inline SVG content.
|
|
10
12
|
* @part image - Native image used for binary icon assets.
|
|
11
13
|
* @part fallback - Error fallback shown when an icon cannot load.
|
|
12
14
|
*/
|
|
@@ -15,6 +17,8 @@ export class QIcon {
|
|
|
15
17
|
el;
|
|
16
18
|
/** Icon name or local asset filename. */
|
|
17
19
|
name;
|
|
20
|
+
/** Trusted compile-time icon data. Takes precedence over `name` and never performs I/O. */
|
|
21
|
+
definition;
|
|
18
22
|
/** Supports built-in libraries, local assets, and custom URL templates. */
|
|
19
23
|
lib = 'lucide';
|
|
20
24
|
/** Base path used when `lib="local"`. */
|
|
@@ -32,15 +36,15 @@ export class QIcon {
|
|
|
32
36
|
isBinary = false;
|
|
33
37
|
resolvedUrl = '';
|
|
34
38
|
hasError = false;
|
|
39
|
+
resolvedDefinition;
|
|
35
40
|
fetchId = 0;
|
|
36
41
|
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
37
42
|
watchHandler() {
|
|
38
43
|
void this.loadIcon();
|
|
39
44
|
}
|
|
40
45
|
componentWillLoad() {
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
// icon's dimensions; the fetched SVG is rendered when it becomes available.
|
|
46
|
+
// Registered data resolves immediately. Backwards-compatible icon I/O must
|
|
47
|
+
// not hold up this component or any parent component's hydration.
|
|
44
48
|
void this.loadIcon();
|
|
45
49
|
}
|
|
46
50
|
componentWillRender() {
|
|
@@ -89,7 +93,25 @@ export class QIcon {
|
|
|
89
93
|
async loadIcon() {
|
|
90
94
|
const currentFetchId = ++this.fetchId;
|
|
91
95
|
this.hasError = false;
|
|
96
|
+
this.resolvedDefinition = undefined;
|
|
92
97
|
this.syncHostState();
|
|
98
|
+
const definition = this.definition ?? resolveRegisteredQIcon(this.name);
|
|
99
|
+
if (definition) {
|
|
100
|
+
try {
|
|
101
|
+
this.resolvedDefinition = this.definition
|
|
102
|
+
? prepareQIconDefinition(definition, 'q-icon definition')
|
|
103
|
+
: definition;
|
|
104
|
+
this.svgContent = '';
|
|
105
|
+
this.resolvedUrl = '';
|
|
106
|
+
this.isBinary = false;
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
console.error(error);
|
|
110
|
+
this.hasError = true;
|
|
111
|
+
}
|
|
112
|
+
this.syncHostState();
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
93
115
|
if (!this.name) {
|
|
94
116
|
this.svgContent = '';
|
|
95
117
|
this.resolvedUrl = '';
|
|
@@ -97,6 +119,14 @@ export class QIcon {
|
|
|
97
119
|
this.syncHostState();
|
|
98
120
|
return;
|
|
99
121
|
}
|
|
122
|
+
if (isQIconStrictMode()) {
|
|
123
|
+
this.svgContent = '';
|
|
124
|
+
this.resolvedUrl = '';
|
|
125
|
+
this.isBinary = false;
|
|
126
|
+
this.hasError = true;
|
|
127
|
+
this.syncHostState();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
100
130
|
const url = resolveIconUrl({
|
|
101
131
|
name: this.name,
|
|
102
132
|
library: this.lib,
|
|
@@ -144,6 +174,9 @@ export class QIcon {
|
|
|
144
174
|
if (this.hasError) {
|
|
145
175
|
return (h("div", { class: "icon-fallback", part: "fallback" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true", focusable: "false" }, h("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), h("line", { x1: "9", y1: "9", x2: "15", y2: "15" }), h("line", { x1: "15", y1: "9", x2: "9", y2: "15" }))));
|
|
146
176
|
}
|
|
177
|
+
if (this.resolvedDefinition) {
|
|
178
|
+
return (h("div", { class: "svg-container", part: "svg" }, renderQIconDefinition(this.resolvedDefinition)));
|
|
179
|
+
}
|
|
147
180
|
if (this.isBinary) {
|
|
148
181
|
return (h("img", { src: this.resolvedUrl, alt: "", "aria-hidden": "true", part: "image", style: {
|
|
149
182
|
width: '100%',
|
|
@@ -193,6 +226,30 @@ export class QIcon {
|
|
|
193
226
|
"reflect": false,
|
|
194
227
|
"attribute": "name"
|
|
195
228
|
},
|
|
229
|
+
"definition": {
|
|
230
|
+
"type": "unknown",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "QIconDefinition",
|
|
234
|
+
"resolved": "QIconDefinition",
|
|
235
|
+
"references": {
|
|
236
|
+
"QIconDefinition": {
|
|
237
|
+
"location": "import",
|
|
238
|
+
"path": "./icon.types",
|
|
239
|
+
"id": "src/components/media/icon/icon.types.ts::QIconDefinition",
|
|
240
|
+
"referenceLocation": "QIconDefinition"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": false,
|
|
245
|
+
"optional": true,
|
|
246
|
+
"docs": {
|
|
247
|
+
"tags": [],
|
|
248
|
+
"text": "Trusted compile-time icon data. Takes precedence over `name` and never performs I/O."
|
|
249
|
+
},
|
|
250
|
+
"getter": false,
|
|
251
|
+
"setter": false
|
|
252
|
+
},
|
|
196
253
|
"lib": {
|
|
197
254
|
"type": "string",
|
|
198
255
|
"mutable": false,
|
|
@@ -366,7 +423,8 @@ export class QIcon {
|
|
|
366
423
|
"svgContent": {},
|
|
367
424
|
"isBinary": {},
|
|
368
425
|
"resolvedUrl": {},
|
|
369
|
-
"hasError": {}
|
|
426
|
+
"hasError": {},
|
|
427
|
+
"resolvedDefinition": {}
|
|
370
428
|
};
|
|
371
429
|
}
|
|
372
430
|
static get elementRef() { return "el"; }
|
|
@@ -374,6 +432,9 @@ export class QIcon {
|
|
|
374
432
|
return [{
|
|
375
433
|
"propName": "name",
|
|
376
434
|
"methodName": "watchHandler"
|
|
435
|
+
}, {
|
|
436
|
+
"propName": "definition",
|
|
437
|
+
"methodName": "watchHandler"
|
|
377
438
|
}, {
|
|
378
439
|
"propName": "lib",
|
|
379
440
|
"methodName": "watchHandler"
|