@webquark/core 1.0.1 → 1.1.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{readme.md → README.md} +14 -1
- package/dist/cjs/Leaflet.GoogleMutant-BCs2oiE0.js +769 -0
- package/dist/cjs/action.props-Bxf6g2CW.js +35 -0
- package/dist/cjs/collection-identity-CV5HLD9Z.js +141 -0
- package/dist/cjs/data-table-cell-BAv6IIYx.js +46 -0
- package/dist/cjs/{dom-CTqgGpWA.js → dom-Dk77oFF6.js} +15 -6
- package/dist/cjs/form-control-validity-D1ukC0_e.js +49 -0
- package/dist/cjs/{index-CLlvFbDw.js → index-D5SQkd__.js} +21 -3
- package/dist/cjs/index.cjs.js +21 -2
- package/dist/cjs/leaflet-maplibre-gl-RCEffFEM.js +434 -0
- package/dist/cjs/leaflet-src-B0ls4IKq.js +14522 -0
- package/dist/cjs/leaflet-src-BX4jwTf5.js +33 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/map.types-DNrz8rJh.js +24 -0
- package/dist/cjs/q-alert.cjs.entry.js +52 -0
- package/dist/cjs/q-avatar.cjs.entry.js +101 -0
- package/dist/cjs/q-button_2.cjs.entry.js +375 -0
- package/dist/cjs/q-card.cjs.entry.js +31 -9
- package/dist/cjs/q-carousel.cjs.entry.js +121 -78
- package/dist/cjs/q-chip.cjs.entry.js +124 -0
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +70 -0
- package/dist/cjs/q-data-table.cjs.entry.js +469 -118
- package/dist/cjs/q-dialog.cjs.entry.js +136 -22
- package/dist/cjs/q-dropdown.cjs.entry.js +318 -64
- package/dist/cjs/q-form.cjs.entry.js +509 -0
- package/dist/cjs/q-icon.cjs.entry.js +232 -100
- package/dist/cjs/q-input_2.cjs.entry.js +363 -0
- package/dist/cjs/q-link.cjs.entry.js +80 -0
- package/dist/cjs/q-map.cjs.entry.js +3328 -0
- package/dist/cjs/q-navbar.cjs.entry.js +194 -0
- package/dist/cjs/q-pagination.cjs.entry.js +68 -0
- package/dist/cjs/q-panel.cjs.entry.js +67 -0
- package/dist/cjs/q-quantity-selector.cjs.entry.js +112 -93
- package/dist/cjs/q-radio-group.cjs.entry.js +217 -0
- package/dist/cjs/q-reel.cjs.entry.js +86 -33
- package/dist/cjs/q-scrollable.cjs.entry.js +449 -0
- package/dist/cjs/q-sidepanel.cjs.entry.js +380 -114
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +11 -17
- package/dist/cjs/q-step-diagram.cjs.entry.js +9 -10
- package/dist/cjs/q-syntax-box.cjs.entry.js +326 -173
- package/dist/cjs/q-tabs.cjs.entry.js +155 -0
- package/dist/cjs/q-textarea.cjs.entry.js +69 -9
- package/dist/cjs/q-thumbnail.cjs.entry.js +18 -11
- package/dist/cjs/q-toast.cjs.entry.js +400 -0
- package/dist/cjs/q-toggle.cjs.entry.js +57 -26
- package/dist/cjs/q-toolbar.cjs.entry.js +29 -0
- package/dist/cjs/toast-controller-CIXagxbV.js +111 -0
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +37 -21
- package/dist/collection/components/actions/action.props.js +130 -0
- package/dist/collection/components/{button → actions/button}/button.css +191 -174
- package/dist/collection/components/{button → actions/button}/button.js +243 -89
- package/dist/collection/components/actions/button/button.types.js +1 -0
- package/dist/collection/components/actions/button/button.utils.js +9 -0
- package/dist/collection/components/actions/button/button.utils.unit.test.js +44 -0
- package/dist/collection/components/actions/chip/chip.css +219 -0
- package/dist/collection/components/actions/chip/chip.js +381 -0
- package/dist/collection/components/actions/chip/chip.types.js +1 -0
- package/dist/collection/components/actions/link/link.css +102 -0
- package/dist/collection/components/actions/link/link.js +313 -0
- package/dist/collection/components/actions/link/link.types.js +1 -0
- package/dist/collection/components/data-display/alert/alert.css +118 -0
- package/dist/collection/components/data-display/alert/alert.js +208 -0
- package/dist/collection/components/data-display/alert/alert.types.js +1 -0
- package/dist/collection/components/data-display/conversation-bubble/conversation-bubble.css +154 -0
- package/dist/collection/components/data-display/conversation-bubble/conversation-bubble.js +207 -0
- package/dist/collection/components/data-display/conversation-bubble/conversation-bubble.types.js +1 -0
- package/dist/collection/components/data-display/data-table/data-table-cell.js +40 -0
- package/dist/collection/components/{data-table → data-display/data-table}/data-table.css +158 -21
- package/dist/collection/components/data-display/data-table/data-table.js +748 -0
- package/dist/collection/components/data-display/data-table/data-table.types.js +1 -0
- package/dist/collection/components/data-display/data-table/internals/data-access.js +43 -0
- package/dist/collection/components/data-display/data-table/internals/render-row-actions.js +22 -0
- package/dist/collection/components/data-display/data-table/internals/render-sort-indicator.js +4 -0
- package/dist/collection/components/data-display/data-table/internals/render-table-body.js +47 -0
- package/dist/collection/components/data-display/data-table/internals/render-table-head.js +42 -0
- package/dist/collection/components/data-display/data-table/internals/render-toolbar.js +6 -0
- package/dist/collection/components/data-display/data-table/internals/row-events.js +27 -0
- package/dist/collection/components/data-display/data-table/internals/selection.js +31 -0
- package/dist/collection/components/data-display/data-table/internals/sort.js +57 -0
- package/dist/collection/components/data-display/data-table/internals/table-model.js +84 -0
- package/dist/collection/components/data-display/map/internals/base-layer.js +140 -0
- package/dist/collection/components/data-display/map/internals/bounds.js +66 -0
- package/dist/collection/components/data-display/map/internals/buffered-tile-layer.js +128 -0
- package/dist/collection/components/data-display/map/internals/cluster-collision.js +73 -0
- package/dist/collection/components/data-display/map/internals/google-maps.js +117 -0
- package/dist/collection/components/data-display/map/internals/google-mutant.js +51 -0
- package/dist/collection/components/data-display/map/internals/maplibre.js +50 -0
- package/dist/collection/components/data-display/map/internals/marker-cluster-index.js +136 -0
- package/dist/collection/components/data-display/map/internals/marker-controller.js +403 -0
- package/dist/collection/components/data-display/map/internals/marker-presentation.js +217 -0
- package/dist/collection/components/data-display/map/internals/marker-visibility.js +158 -0
- package/dist/collection/components/data-display/map/internals/markers.js +176 -0
- package/dist/collection/components/data-display/map/internals/tile-layer-readiness.js +67 -0
- package/dist/collection/components/data-display/map/internals/tile-preload-buffer.js +8 -0
- package/dist/collection/components/data-display/map/internals/vector-padding.js +8 -0
- package/dist/collection/components/data-display/map/map.css +711 -0
- package/dist/collection/components/data-display/map/map.js +1514 -0
- package/dist/collection/components/data-display/map/map.types.js +12 -0
- package/dist/collection/components/data-display/map/test/map.cmp.test.js +748 -0
- package/dist/collection/components/data-display/pagination/pagination.css +81 -0
- package/dist/collection/components/data-display/pagination/pagination.js +240 -0
- package/dist/collection/components/data-display/pagination/test/pagination.cmp.test.js +57 -0
- package/dist/collection/components/data-display/syntax-box/internals/clipboard.js +9 -0
- package/dist/collection/components/data-display/syntax-box/internals/editor-key-action.js +14 -0
- package/dist/collection/components/data-display/syntax-box/internals/value-sync.js +27 -0
- package/dist/collection/components/{syntax-box → data-display/syntax-box}/syntax-box.css +202 -206
- package/dist/collection/components/data-display/syntax-box/syntax-box.js +622 -0
- package/dist/collection/components/data-display/syntax-box/syntax-box.types.js +1 -0
- package/dist/collection/components/data-display/syntax-box/syntax-box.utils.js +1 -0
- package/dist/collection/components/indicators/progress/progress.css +223 -0
- package/dist/collection/components/indicators/progress/progress.js +275 -0
- package/dist/collection/components/indicators/progress/progress.types.js +1 -0
- package/dist/collection/components/{step-diagram → indicators/step-diagram}/step-diagram.css +21 -21
- package/dist/collection/components/{step-diagram → indicators/step-diagram}/step-diagram.js +42 -12
- package/dist/collection/components/indicators/step-diagram/step-diagram.types.js +1 -0
- package/dist/collection/components/{step-diagram-item → indicators/step-diagram-item}/step-diagram-item.css +252 -253
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +153 -0
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.types.js +1 -0
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.utils.js +3 -0
- package/dist/collection/components/{dropdown → inputs/dropdown}/dropdown.css +344 -292
- package/dist/collection/components/inputs/dropdown/dropdown.js +986 -0
- package/dist/collection/components/inputs/dropdown/dropdown.types.js +1 -0
- package/dist/collection/components/inputs/dropdown/internals/options.js +30 -0
- package/dist/collection/components/inputs/dropdown/internals/position.js +35 -0
- package/dist/collection/components/inputs/dropdown/test/dropdown.cmp.test.js +62 -0
- package/dist/collection/components/{input → inputs/input}/input.css +264 -276
- package/dist/collection/components/{input → inputs/input}/input.js +242 -83
- package/dist/collection/components/inputs/input/input.types.js +1 -0
- package/dist/collection/components/inputs/input/input.utils.js +3 -0
- package/dist/collection/components/inputs/quantity-selector/internals/number-value.js +64 -0
- package/dist/collection/components/{quantity-selector → inputs/quantity-selector}/quantity-selector.css +2 -2
- package/dist/collection/components/{quantity-selector → inputs/quantity-selector}/quantity-selector.js +75 -109
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.types.js +1 -0
- package/dist/collection/components/inputs/radio-group/radio-group.css +177 -0
- package/dist/collection/components/inputs/radio-group/radio-group.js +558 -0
- package/dist/collection/components/inputs/radio-group/radio-group.types.js +1 -0
- package/dist/collection/components/inputs/radio-group/radio-group.utils.js +18 -0
- package/dist/collection/components/{textarea → inputs/textarea}/textarea.css +88 -83
- package/dist/collection/components/{textarea → inputs/textarea}/textarea.js +162 -18
- package/dist/collection/components/inputs/textarea/textarea.types.js +1 -0
- package/dist/collection/components/{toggle → inputs/toggle}/toggle.css +220 -212
- package/dist/collection/components/{toggle → inputs/toggle}/toggle.js +158 -51
- package/dist/collection/components/inputs/toggle/toggle.types.js +1 -0
- package/dist/collection/components/inputs/toggle/toggle.utils.js +3 -0
- package/dist/collection/components/{card → layout/card}/card.css +93 -96
- package/dist/collection/components/{card → layout/card}/card.js +40 -19
- package/dist/collection/components/layout/card/card.types.js +1 -0
- package/dist/collection/components/layout/card/card.utils.js +15 -0
- package/dist/collection/components/{carousel → layout/carousel}/carousel.css +168 -177
- package/dist/collection/components/{carousel → layout/carousel}/carousel.js +103 -105
- package/dist/collection/components/layout/carousel/carousel.types.js +1 -0
- package/dist/collection/components/layout/carousel/carousel.utils.js +1 -0
- package/dist/collection/components/layout/carousel/internals/metrics.js +59 -0
- package/dist/collection/components/layout/form/form.css +49 -0
- package/dist/collection/components/layout/form/form.js +613 -0
- package/dist/collection/components/layout/form/form.types.js +1 -0
- package/dist/collection/components/layout/form/internals/controls.js +79 -0
- package/dist/collection/components/layout/form/internals/enter-behavior.js +36 -0
- package/dist/collection/components/layout/form/internals/values.js +176 -0
- package/dist/collection/components/layout/form/test/form.cmp.test.js +157 -0
- package/dist/collection/components/layout/navbar/navbar.css +465 -0
- package/dist/collection/components/layout/navbar/navbar.js +547 -0
- package/dist/collection/components/layout/navbar/navbar.types.js +1 -0
- package/dist/collection/components/layout/navbar/navbar.utils.js +13 -0
- package/dist/collection/components/layout/navbar/test/navbar.cmp.test.js +53 -0
- package/dist/collection/components/layout/panel/panel.css +113 -0
- package/dist/collection/components/layout/panel/panel.js +265 -0
- package/dist/collection/components/layout/panel/panel.types.js +1 -0
- package/dist/collection/components/layout/scrollable/internals/metrics.js +61 -0
- package/dist/collection/components/layout/scrollable/internals/native-scrollbar.js +41 -0
- package/dist/collection/components/{scrollable → layout/scrollable}/scrollable.css +123 -122
- package/dist/collection/components/{scrollable → layout/scrollable}/scrollable.js +165 -136
- package/dist/collection/components/layout/scrollable/scrollable.types.js +1 -0
- package/dist/collection/components/layout/sidepanel/internals/drawer.js +60 -0
- package/dist/collection/components/layout/sidepanel/internals/groups.js +56 -0
- package/dist/collection/components/layout/sidepanel/internals/nav-items.js +26 -0
- package/dist/collection/components/layout/sidepanel/sidepanel.css +881 -0
- package/dist/collection/components/layout/sidepanel/sidepanel.js +813 -0
- package/dist/collection/components/layout/sidepanel/sidepanel.types.js +1 -0
- package/dist/collection/components/layout/sidepanel/sidepanel.utils.js +17 -0
- package/dist/collection/components/layout/tabs/tabs.css +248 -0
- package/dist/collection/components/layout/tabs/tabs.js +322 -0
- package/dist/collection/components/layout/tabs/tabs.types.js +1 -0
- package/dist/collection/components/layout/tabs/tabs.utils.js +31 -0
- package/dist/collection/components/layout/tabs/test/tabs.cmp.test.js +165 -0
- package/dist/collection/components/layout/toolbar/toolbar.css +145 -0
- package/dist/collection/components/layout/toolbar/toolbar.js +173 -0
- package/dist/collection/components/layout/toolbar/toolbar.types.js +1 -0
- package/dist/collection/components/media/avatar/avatar.css +71 -0
- package/dist/collection/components/media/avatar/avatar.js +302 -0
- package/dist/collection/components/media/avatar/avatar.types.js +1 -0
- package/dist/collection/components/{icon → media/icon}/icon.css +42 -39
- package/dist/collection/components/media/icon/icon.js +388 -0
- package/dist/collection/components/media/icon/icon.types.js +1 -0
- package/dist/collection/components/media/icon/internals/constants.js +3 -0
- package/dist/collection/components/media/icon/internals/fetch-icon.js +18 -0
- package/dist/collection/components/media/icon/internals/sanitize-svg.js +63 -0
- package/dist/collection/components/media/icon/internals/size.js +12 -0
- package/dist/collection/components/media/icon/internals/url.js +48 -0
- package/dist/collection/components/{reel → media/reel}/reel.css +193 -185
- package/dist/collection/components/{reel → media/reel}/reel.js +99 -34
- package/dist/collection/components/media/reel/reel.types.js +1 -0
- package/dist/collection/components/{thumbnail → media/thumbnail}/thumbnail.css +111 -109
- package/dist/collection/components/{thumbnail → media/thumbnail}/thumbnail.js +32 -19
- package/dist/collection/components/media/thumbnail/thumbnail.types.js +1 -0
- package/dist/collection/components/{dialog → overlays/dialog}/dialog.css +248 -240
- package/dist/collection/components/{dialog → overlays/dialog}/dialog.js +190 -58
- package/dist/collection/components/overlays/dialog/dialog.types.js +1 -0
- package/dist/collection/components/overlays/dialog/internals/backdrop.js +9 -0
- package/dist/collection/components/overlays/dialog/internals/lifecycle.js +53 -0
- package/dist/collection/components/overlays/toast/internals/icons.js +25 -0
- package/dist/collection/components/overlays/toast/internals/queue.js +64 -0
- package/dist/collection/components/overlays/toast/internals/timers.js +75 -0
- package/dist/collection/components/overlays/toast/test/toast.cmp.test.js +38 -0
- package/dist/collection/components/overlays/toast/test/toast.unit.test.js +104 -0
- package/dist/collection/components/overlays/toast/toast-controller.js +105 -0
- package/dist/collection/components/overlays/toast/toast.css +141 -0
- package/dist/collection/components/overlays/toast/toast.js +556 -0
- package/dist/collection/components/overlays/toast/toast.types.js +1 -0
- package/dist/collection/components/overlays/tooltip/internals/aria.js +27 -0
- package/dist/collection/components/overlays/tooltip/internals/positioning.js +69 -0
- package/dist/collection/components/overlays/tooltip/internals/scroll-listeners.js +18 -0
- package/dist/collection/components/{tooltip → overlays/tooltip}/tooltip.css +65 -65
- package/dist/collection/components/overlays/tooltip/tooltip.js +190 -0
- package/dist/collection/components/overlays/tooltip/tooltip.types.js +1 -0
- package/dist/collection/index.js +4 -0
- package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +42 -6
- package/dist/collection/playground/components/properties-panel/properties-panel.js +1 -1
- package/dist/collection/playground/components/sandbox-viewport/sandbox-panel.js +4 -0
- package/dist/collection/playground/components/sandbox-viewport/sandbox-viewport.js +4 -0
- package/dist/collection/playground/components/theme-designer/theme-designer.js +6 -4
- package/dist/collection/playground/playground.bundled.js +759 -697
- package/dist/collection/playground/views/q-button-view/q-button-view.js +6 -6
- package/dist/collection/playground/views/q-input-view/q-input-view.js +6 -6
- package/dist/collection/utils/collection-identity.js +136 -0
- package/dist/collection/utils/collection-identity.unit.test.js +107 -0
- package/dist/collection/utils/dom.js +14 -6
- package/dist/collection/utils/form-control-validity.js +44 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-2bWqVyTo.js +1 -0
- package/dist/components/p-BEBDDqVT.js +1 -0
- package/dist/components/p-BIIQL66b.js +1 -0
- package/dist/components/p-BJiYCN3i.js +1 -0
- package/dist/components/p-BeeM-7Ku.js +5 -0
- package/dist/components/p-Bj2RJb2E.js +1 -0
- package/dist/components/p-ByfrUWx1.js +1 -0
- package/dist/components/p-CBVOdtO_.js +1 -0
- package/dist/components/p-CGZPmEUB.js +1 -0
- package/dist/components/p-CXcle-2Q.js +1 -0
- package/dist/components/p-Ccj0labf.js +1 -0
- package/dist/components/p-D-SCwJg6.js +1 -0
- package/dist/components/p-DCICQbw4.js +1 -0
- package/dist/components/p-DH-PVHhr.js +1 -0
- package/dist/components/p-DQhiqYeq.js +1 -0
- package/dist/components/p-Dd8ZWrLX.js +1 -0
- package/dist/components/p-DiOrwkX8.js +1 -0
- package/dist/components/p-DmqVhVoj.js +1 -0
- package/dist/components/p-WJHaLJS_.js +1 -0
- package/dist/components/p-xNd-aY2K.js +1 -0
- package/dist/components/{q-circular-progress.d.ts → q-alert.d.ts} +4 -4
- package/dist/components/q-alert.js +1 -0
- package/dist/components/q-avatar.d.ts +11 -0
- package/dist/components/q-avatar.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/q-chip.js +1 -0
- package/dist/components/q-conversation-bubble.d.ts +11 -0
- package/dist/components/q-conversation-bubble.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/q-form.js +1 -0
- package/dist/components/q-icon.js +1 -1
- package/dist/components/q-input.js +1 -1
- package/dist/components/q-link.d.ts +11 -0
- package/dist/components/q-link.js +1 -0
- package/dist/components/q-map.d.ts +11 -0
- package/dist/components/q-map.js +1 -0
- package/dist/components/q-navbar.d.ts +11 -0
- package/dist/components/q-navbar.js +1 -0
- package/dist/components/q-pagination.d.ts +11 -0
- package/dist/components/q-pagination.js +1 -0
- package/dist/components/q-panel.d.ts +11 -0
- package/dist/components/q-panel.js +1 -0
- package/dist/components/q-progress.d.ts +11 -0
- package/dist/components/q-progress.js +1 -0
- package/dist/components/q-quantity-selector.js +1 -1
- package/dist/components/q-radio-group.d.ts +11 -0
- package/dist/components/q-radio-group.js +1 -0
- package/dist/components/q-reel.js +1 -1
- package/dist/components/q-scrollable.js +1 -1
- package/dist/components/q-sidepanel.js +1 -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 +1 -1
- package/dist/components/q-tabs.d.ts +11 -0
- package/dist/components/q-tabs.js +1 -0
- package/dist/components/q-textarea.js +1 -1
- package/dist/components/q-thumbnail.js +1 -1
- package/dist/components/q-toast.d.ts +11 -0
- package/dist/components/q-toast.js +1 -0
- package/dist/components/q-toggle.js +1 -1
- package/dist/components/q-toolbar.d.ts +11 -0
- package/dist/components/q-toolbar.js +1 -0
- package/dist/components/q-tooltip.js +1 -1
- package/dist/esm/Leaflet.GoogleMutant-BlvymWLE.js +767 -0
- package/dist/esm/action.props-CzaBbbcQ.js +32 -0
- package/dist/esm/collection-identity-CGZPmEUB.js +138 -0
- package/dist/esm/data-table-cell-DmqVhVoj.js +42 -0
- package/dist/esm/{dom-DoQvrOHk.js → dom-ByfrUWx1.js} +15 -7
- package/dist/esm/form-control-validity-Bj2RJb2E.js +46 -0
- package/dist/esm/{index-CYoQ4Zv3.js → index-DOk7gYkf.js} +21 -4
- package/dist/esm/index.js +5 -1
- package/dist/esm/leaflet-maplibre-gl-Cgb-1z8Q.js +432 -0
- package/dist/esm/leaflet-src-BR13bdVA.js +30 -0
- package/dist/esm/leaflet-src-BeeM-7Ku.js +14520 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/map.types-WJHaLJS_.js +14 -0
- package/dist/esm/q-alert.entry.js +50 -0
- package/dist/esm/q-avatar.entry.js +99 -0
- package/dist/esm/q-button_2.entry.js +372 -0
- package/dist/esm/q-card.entry.js +31 -9
- package/dist/esm/q-carousel.entry.js +121 -78
- package/dist/esm/q-chip.entry.js +122 -0
- package/dist/esm/q-conversation-bubble.entry.js +68 -0
- package/dist/esm/q-data-table.entry.js +469 -118
- package/dist/esm/q-dialog.entry.js +136 -22
- package/dist/esm/q-dropdown.entry.js +318 -64
- package/dist/esm/q-form.entry.js +507 -0
- package/dist/esm/q-icon.entry.js +232 -100
- package/dist/esm/q-input_2.entry.js +360 -0
- package/dist/esm/q-link.entry.js +78 -0
- package/dist/esm/q-map.entry.js +3326 -0
- package/dist/esm/q-navbar.entry.js +192 -0
- package/dist/esm/q-pagination.entry.js +66 -0
- package/dist/esm/q-panel.entry.js +65 -0
- package/dist/esm/q-quantity-selector.entry.js +112 -93
- package/dist/esm/q-radio-group.entry.js +215 -0
- package/dist/esm/q-reel.entry.js +86 -33
- package/dist/esm/q-scrollable.entry.js +447 -0
- package/dist/esm/q-sidepanel.entry.js +380 -114
- package/dist/esm/q-step-diagram-item.entry.js +11 -17
- package/dist/esm/q-step-diagram.entry.js +9 -10
- package/dist/esm/q-syntax-box.entry.js +326 -173
- package/dist/esm/q-tabs.entry.js +153 -0
- package/dist/esm/q-textarea.entry.js +69 -9
- package/dist/esm/q-thumbnail.entry.js +18 -11
- package/dist/esm/q-toast.entry.js +398 -0
- package/dist/esm/q-toggle.entry.js +57 -26
- package/dist/esm/q-toolbar.entry.js +27 -0
- package/dist/esm/toast-controller-BIIQL66b.js +107 -0
- package/dist/esm/webquark.js +3 -3
- package/dist/playground/build/index.esm.js +1 -1
- package/dist/playground/build/p-011bab4c.entry.js +1 -0
- package/dist/playground/build/p-0571c3ae.entry.js +1 -0
- package/dist/playground/build/p-09e29cf9.entry.js +1 -0
- package/dist/playground/build/p-0aeed0be.entry.js +1 -0
- package/dist/playground/build/p-13b7bd40.entry.js +1 -0
- package/dist/playground/build/p-1d1ec52e.entry.js +1 -0
- package/dist/playground/build/p-254555b1.entry.js +1 -0
- package/dist/playground/build/p-28cc0172.entry.js +1 -0
- package/dist/playground/build/p-2bWqVyTo.js +1 -0
- package/dist/playground/build/p-33a45980.entry.js +1 -0
- package/dist/playground/build/p-33cfbd33.entry.js +1 -0
- package/dist/playground/build/p-4557f558.entry.js +1 -0
- package/dist/playground/build/p-48a8413d.entry.js +1 -0
- package/dist/playground/build/p-4d5d0313.entry.js +1 -0
- package/dist/playground/build/p-56644a7b.entry.js +1 -0
- package/dist/playground/build/p-58724642.entry.js +1 -0
- package/dist/playground/build/p-590cde02.entry.js +1 -0
- package/dist/playground/build/p-6cf356da.entry.js +1 -0
- package/dist/playground/build/p-6deac326.entry.js +1 -0
- package/dist/playground/build/p-6f1b98c2.entry.js +1 -0
- package/dist/playground/build/p-711576c8.entry.js +1 -0
- package/dist/playground/build/p-93ffb8ab.entry.js +1 -0
- package/dist/playground/build/p-94413975.entry.js +1 -0
- package/dist/playground/build/p-9d14b8ec.entry.js +1 -0
- package/dist/playground/build/p-BEBDDqVT.js +1 -0
- package/dist/playground/build/p-BIIQL66b.js +1 -0
- package/dist/playground/build/p-BeeM-7Ku.js +5 -0
- package/dist/playground/build/p-Bj2RJb2E.js +1 -0
- package/dist/playground/build/p-ByfrUWx1.js +1 -0
- package/dist/playground/build/p-CGZPmEUB.js +1 -0
- package/dist/playground/build/p-DD6AOr35.js +1 -0
- package/dist/playground/build/p-DNFGt02p.js +1 -0
- package/dist/playground/build/p-DOk7gYkf.js +2 -0
- package/dist/playground/build/p-DmqVhVoj.js +1 -0
- package/dist/playground/build/p-WJHaLJS_.js +1 -0
- package/dist/playground/build/p-a054f314.entry.js +1 -0
- package/dist/playground/build/p-ad1c341c.entry.js +1 -0
- package/dist/playground/build/p-b8a75199.entry.js +1 -0
- package/dist/playground/build/p-b8aa6763.entry.js +1 -0
- package/dist/playground/build/p-c2032ee1.entry.js +1 -0
- package/dist/playground/build/p-cddadb39.entry.js +1 -0
- package/dist/playground/build/p-cfaffa33.entry.js +1 -0
- package/dist/playground/build/p-dda5be3e.entry.js +1 -0
- package/dist/playground/build/p-f51a7a3c.entry.js +1 -0
- package/dist/playground/build/webquark.css +1 -1
- package/dist/playground/build/webquark.esm.js +1 -1
- package/dist/playground/css/base.css +122 -145
- package/dist/playground/index.html +29 -29
- package/dist/playground/playground/components.manifest.json +37 -20
- package/dist/playground/playground/specs/q-avatar.sandbox.json +24 -0
- package/dist/playground/playground/specs/q-button.sandbox.json +14 -3
- package/dist/playground/playground/specs/q-chip.sandbox.json +105 -0
- package/dist/playground/playground/specs/q-conversation-bubble.sandbox.json +26 -0
- package/dist/playground/playground/specs/q-data-table.sandbox.json +53 -0
- package/dist/playground/playground/specs/q-dropdown.sandbox.json +5 -0
- package/dist/playground/playground/specs/q-form.sandbox.json +20 -0
- package/dist/playground/playground/specs/q-link.sandbox.json +27 -0
- package/dist/playground/playground/specs/q-map.sandbox.json +203 -0
- package/dist/playground/playground/specs/q-navbar.sandbox.json +32 -0
- package/dist/playground/playground/specs/q-panel.sandbox.json +28 -0
- package/dist/playground/playground/specs/q-progress.sandbox.json +117 -0
- package/dist/playground/playground/specs/q-radio-group.sandbox.json +58 -0
- package/dist/playground/playground/specs/q-scrollable.sandbox.json +3 -3
- package/dist/playground/playground/specs/q-sidepanel.sandbox.json +7 -2
- package/dist/playground/playground/specs/q-syntax-box.sandbox.json +1 -1
- package/dist/playground/playground/specs/q-toast.sandbox.json +32 -0
- package/dist/playground/playground/specs/q-toggle.sandbox.json +3 -3
- package/dist/playground/playground/specs/q-toolbar.sandbox.json +26 -0
- package/dist/playground/playground.css +1 -1
- package/dist/playground/playground.js +759 -697
- package/dist/playground/views/q-button-view/q-button-view.css +1 -1
- package/dist/playground/views/q-button-view/q-button-view.html +1 -1
- package/dist/playground/views/q-button-view/q-button-view.js +6 -6
- package/dist/playground/views/q-input-view/q-input-view.css +1 -1
- package/dist/playground/views/q-input-view/q-input-view.html +1 -1
- package/dist/playground/views/q-input-view/q-input-view.js +6 -6
- package/dist/types/components/actions/action.props.d.ts +19 -0
- package/dist/types/components/actions/button/button.d.ts +61 -0
- package/dist/types/components/actions/button/button.types.d.ts +5 -0
- package/dist/types/components/actions/button/button.utils.d.ts +8 -0
- package/dist/types/components/actions/button/button.utils.unit.test.d.ts +1 -0
- package/dist/types/components/actions/chip/chip.d.ts +55 -0
- package/dist/types/components/actions/chip/chip.types.d.ts +13 -0
- package/dist/types/components/actions/link/link.d.ts +43 -0
- package/dist/types/components/actions/link/link.types.d.ts +3 -0
- package/dist/types/components/data-display/alert/alert.d.ts +32 -0
- package/dist/types/components/data-display/alert/alert.types.d.ts +2 -0
- package/dist/types/components/data-display/conversation-bubble/conversation-bubble.d.ts +38 -0
- package/dist/types/components/data-display/conversation-bubble/conversation-bubble.types.d.ts +1 -0
- package/dist/types/components/data-display/data-table/data-table-cell.d.ts +5 -0
- package/dist/types/components/data-display/data-table/data-table.d.ts +78 -0
- package/dist/types/components/data-display/data-table/data-table.types.d.ts +53 -0
- package/dist/types/components/data-display/data-table/internals/data-access.d.ts +9 -0
- package/dist/types/components/data-display/data-table/internals/render-row-actions.d.ts +9 -0
- package/dist/types/components/data-display/data-table/internals/render-sort-indicator.d.ts +5 -0
- package/dist/types/components/data-display/data-table/internals/render-table-body.d.ts +12 -0
- package/dist/types/components/data-display/data-table/internals/render-table-head.d.ts +8 -0
- package/dist/types/components/data-display/data-table/internals/render-toolbar.d.ts +9 -0
- package/dist/types/components/data-display/data-table/internals/row-events.d.ts +1 -0
- package/dist/types/components/data-display/data-table/internals/selection.d.ts +10 -0
- package/dist/types/components/data-display/data-table/internals/sort.d.ts +3 -0
- package/dist/types/components/data-display/data-table/internals/table-model.d.ts +52 -0
- package/dist/types/components/data-display/map/internals/base-layer.d.ts +63 -0
- package/dist/types/components/data-display/map/internals/bounds.d.ts +23 -0
- package/dist/types/components/data-display/map/internals/buffered-tile-layer.d.ts +10 -0
- package/dist/types/components/data-display/map/internals/cluster-collision.d.ts +15 -0
- package/dist/types/components/data-display/map/internals/google-maps.d.ts +9 -0
- package/dist/types/components/data-display/map/internals/google-mutant-module.d.ts +11 -0
- package/dist/types/components/data-display/map/internals/google-mutant.d.ts +18 -0
- package/dist/types/components/data-display/map/internals/maplibre.d.ts +14 -0
- package/dist/types/components/data-display/map/internals/marker-cluster-index.d.ts +36 -0
- package/dist/types/components/data-display/map/internals/marker-controller.d.ts +55 -0
- package/dist/types/components/data-display/map/internals/marker-presentation.d.ts +8 -0
- package/dist/types/components/data-display/map/internals/marker-visibility.d.ts +10 -0
- package/dist/types/components/data-display/map/internals/markers.d.ts +4 -0
- package/dist/types/components/data-display/map/internals/tile-layer-readiness.d.ts +11 -0
- package/dist/types/components/data-display/map/internals/tile-preload-buffer.d.ts +4 -0
- package/dist/types/components/data-display/map/internals/vector-padding.d.ts +4 -0
- package/dist/types/components/data-display/map/map.d.ts +171 -0
- package/dist/types/components/data-display/map/map.types.d.ts +122 -0
- package/dist/types/components/data-display/map/test/map.cmp.test.d.ts +1 -0
- package/dist/types/components/data-display/pagination/pagination.d.ts +33 -0
- package/dist/types/components/data-display/pagination/test/pagination.cmp.test.d.ts +2 -0
- package/dist/types/components/data-display/syntax-box/internals/clipboard.d.ts +2 -0
- package/dist/types/components/data-display/syntax-box/internals/editor-key-action.d.ts +12 -0
- package/dist/types/components/data-display/syntax-box/internals/value-sync.d.ts +18 -0
- package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +66 -0
- package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +2 -0
- package/dist/types/components/data-display/syntax-box/syntax-box.utils.d.ts +1 -0
- package/dist/types/components/indicators/progress/progress.d.ts +30 -0
- package/dist/types/components/indicators/progress/progress.types.d.ts +3 -0
- package/dist/types/components/indicators/step-diagram/step-diagram.d.ts +16 -0
- package/dist/types/components/indicators/step-diagram/step-diagram.types.d.ts +1 -0
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.d.ts +24 -0
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.types.d.ts +3 -0
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.utils.d.ts +1 -0
- package/dist/types/components/inputs/dropdown/dropdown.d.ts +90 -0
- package/dist/types/components/inputs/dropdown/dropdown.types.d.ts +8 -0
- package/dist/types/components/inputs/dropdown/internals/options.d.ts +6 -0
- package/dist/types/components/inputs/dropdown/internals/position.d.ts +26 -0
- package/dist/types/components/inputs/dropdown/test/dropdown.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/input/input.d.ts +77 -0
- package/dist/types/components/inputs/input/input.types.d.ts +2 -0
- package/dist/types/components/inputs/input/input.utils.d.ts +1 -0
- package/dist/types/components/inputs/quantity-selector/internals/number-value.d.ts +13 -0
- package/dist/types/components/{quantity-selector → inputs/quantity-selector}/quantity-selector.d.ts +10 -9
- package/dist/types/components/inputs/quantity-selector/quantity-selector.types.d.ts +1 -0
- package/dist/types/components/inputs/radio-group/radio-group.d.ts +60 -0
- package/dist/types/components/inputs/radio-group/radio-group.types.d.ts +11 -0
- package/dist/types/components/inputs/radio-group/radio-group.utils.d.ts +2 -0
- package/dist/types/components/inputs/textarea/textarea.d.ts +59 -0
- package/dist/types/components/inputs/textarea/textarea.types.d.ts +1 -0
- package/dist/types/components/inputs/toggle/toggle.d.ts +56 -0
- package/dist/types/components/inputs/toggle/toggle.types.d.ts +2 -0
- package/dist/types/components/inputs/toggle/toggle.utils.d.ts +1 -0
- package/dist/types/components/layout/card/card.d.ts +24 -0
- package/dist/types/components/layout/card/card.types.d.ts +1 -0
- package/dist/types/components/layout/card/card.utils.d.ts +5 -0
- package/dist/types/components/{carousel → layout/carousel}/carousel.d.ts +19 -7
- package/dist/types/components/layout/carousel/carousel.types.d.ts +5 -0
- package/dist/types/components/layout/carousel/carousel.utils.d.ts +1 -0
- package/dist/types/components/layout/carousel/internals/metrics.d.ts +23 -0
- package/dist/types/components/layout/form/form.d.ts +69 -0
- package/dist/types/components/layout/form/form.types.d.ts +38 -0
- package/dist/types/components/layout/form/internals/controls.d.ts +5 -0
- package/dist/types/components/layout/form/internals/enter-behavior.d.ts +2 -0
- package/dist/types/components/layout/form/internals/values.d.ts +5 -0
- package/dist/types/components/layout/form/test/form.cmp.test.d.ts +4 -0
- package/dist/types/components/layout/navbar/navbar.d.ts +66 -0
- package/dist/types/components/layout/navbar/navbar.types.d.ts +31 -0
- package/dist/types/components/layout/navbar/navbar.utils.d.ts +2 -0
- package/dist/types/components/layout/navbar/test/navbar.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/panel/panel.d.ts +33 -0
- package/dist/types/components/layout/panel/panel.types.d.ts +2 -0
- package/dist/types/components/layout/scrollable/internals/metrics.d.ts +26 -0
- package/dist/types/components/layout/scrollable/internals/native-scrollbar.d.ts +4 -0
- package/dist/types/components/layout/scrollable/scrollable.d.ts +67 -0
- package/dist/types/components/layout/scrollable/scrollable.types.d.ts +6 -0
- package/dist/types/components/layout/sidepanel/internals/drawer.d.ts +2 -0
- package/dist/types/components/layout/sidepanel/internals/groups.d.ts +7 -0
- package/dist/types/components/layout/sidepanel/internals/nav-items.d.ts +2 -0
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +92 -0
- package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +39 -0
- package/dist/types/components/layout/sidepanel/sidepanel.utils.d.ts +2 -0
- package/dist/types/components/layout/tabs/tabs.d.ts +29 -0
- package/dist/types/components/layout/tabs/tabs.types.d.ts +14 -0
- package/dist/types/components/layout/tabs/tabs.utils.d.ts +4 -0
- package/dist/types/components/layout/tabs/test/tabs.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/toolbar/toolbar.d.ts +23 -0
- package/dist/types/components/layout/toolbar/toolbar.types.d.ts +1 -0
- package/dist/types/components/media/avatar/avatar.d.ts +37 -0
- package/dist/types/components/media/avatar/avatar.types.d.ts +2 -0
- package/dist/types/components/media/icon/icon.d.ts +41 -0
- package/dist/types/components/media/icon/icon.types.d.ts +5 -0
- package/dist/types/components/media/icon/internals/constants.d.ts +3 -0
- package/dist/types/components/media/icon/internals/fetch-icon.d.ts +1 -0
- package/dist/types/components/media/icon/internals/sanitize-svg.d.ts +2 -0
- package/dist/types/components/media/icon/internals/size.d.ts +2 -0
- package/dist/types/components/media/icon/internals/url.d.ts +11 -0
- package/dist/types/components/media/reel/reel.d.ts +34 -0
- package/dist/types/components/media/reel/reel.types.d.ts +3 -0
- package/dist/types/components/media/thumbnail/thumbnail.d.ts +21 -0
- package/dist/types/components/media/thumbnail/thumbnail.types.d.ts +7 -0
- package/dist/types/components/overlays/dialog/dialog.d.ts +71 -0
- package/dist/types/components/overlays/dialog/dialog.types.d.ts +1 -0
- package/dist/types/components/overlays/dialog/internals/backdrop.d.ts +2 -0
- package/dist/types/components/overlays/dialog/internals/lifecycle.d.ts +21 -0
- package/dist/types/components/overlays/toast/internals/icons.d.ts +2 -0
- package/dist/types/components/overlays/toast/internals/queue.d.ts +19 -0
- package/dist/types/components/overlays/toast/internals/timers.d.ts +12 -0
- package/dist/types/components/overlays/toast/test/toast.cmp.test.d.ts +2 -0
- package/dist/types/components/overlays/toast/test/toast.unit.test.d.ts +1 -0
- package/dist/types/components/overlays/toast/toast-controller.d.ts +9 -0
- package/dist/types/components/overlays/toast/toast.d.ts +44 -0
- package/dist/types/components/overlays/toast/toast.types.d.ts +30 -0
- package/dist/types/components/overlays/tooltip/internals/aria.d.ts +13 -0
- package/dist/types/components/overlays/tooltip/internals/positioning.d.ts +7 -0
- package/dist/types/components/overlays/tooltip/internals/scroll-listeners.d.ts +2 -0
- package/dist/types/components/overlays/tooltip/tooltip.d.ts +28 -0
- package/dist/types/components/overlays/tooltip/tooltip.types.d.ts +1 -0
- package/dist/types/components.d.ts +3600 -569
- package/dist/types/declarations.d.ts +5 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/playground/components/playground-sidebar/playground-sidebar.d.ts +2 -0
- package/dist/types/utils/collection-identity.d.ts +55 -0
- package/dist/types/utils/collection-identity.unit.test.d.ts +1 -0
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils/form-control-validity.d.ts +14 -0
- package/dist/webquark/index.esm.js +1 -1
- package/dist/webquark/p-011bab4c.entry.js +1 -0
- package/dist/webquark/p-0571c3ae.entry.js +1 -0
- package/dist/webquark/p-09e29cf9.entry.js +1 -0
- package/dist/webquark/p-0aeed0be.entry.js +1 -0
- package/dist/webquark/p-13b7bd40.entry.js +1 -0
- package/dist/webquark/p-1d1ec52e.entry.js +1 -0
- package/dist/webquark/p-254555b1.entry.js +1 -0
- package/dist/webquark/p-28cc0172.entry.js +1 -0
- package/dist/webquark/p-2bWqVyTo.js +1 -0
- package/dist/webquark/p-33a45980.entry.js +1 -0
- package/dist/webquark/p-33cfbd33.entry.js +1 -0
- package/dist/webquark/p-4557f558.entry.js +1 -0
- package/dist/webquark/p-48a8413d.entry.js +1 -0
- package/dist/webquark/p-4d5d0313.entry.js +1 -0
- package/dist/webquark/p-56644a7b.entry.js +1 -0
- package/dist/webquark/p-58724642.entry.js +1 -0
- package/dist/webquark/p-590cde02.entry.js +1 -0
- package/dist/webquark/p-6cf356da.entry.js +1 -0
- package/dist/webquark/p-6deac326.entry.js +1 -0
- package/dist/webquark/p-6f1b98c2.entry.js +1 -0
- package/dist/webquark/p-711576c8.entry.js +1 -0
- package/dist/webquark/p-93ffb8ab.entry.js +1 -0
- package/dist/webquark/p-94413975.entry.js +1 -0
- package/dist/webquark/p-9d14b8ec.entry.js +1 -0
- package/dist/webquark/p-BEBDDqVT.js +1 -0
- package/dist/webquark/p-BIIQL66b.js +1 -0
- package/dist/webquark/p-BeeM-7Ku.js +5 -0
- package/dist/webquark/p-Bj2RJb2E.js +1 -0
- package/dist/webquark/p-ByfrUWx1.js +1 -0
- package/dist/webquark/p-CGZPmEUB.js +1 -0
- package/dist/webquark/p-DD6AOr35.js +1 -0
- package/dist/webquark/p-DNFGt02p.js +1 -0
- package/dist/webquark/p-DOk7gYkf.js +2 -0
- package/dist/webquark/p-DmqVhVoj.js +1 -0
- package/dist/webquark/p-WJHaLJS_.js +1 -0
- package/dist/webquark/p-a054f314.entry.js +1 -0
- package/dist/webquark/p-ad1c341c.entry.js +1 -0
- package/dist/webquark/p-b8a75199.entry.js +1 -0
- package/dist/webquark/p-b8aa6763.entry.js +1 -0
- package/dist/webquark/p-c2032ee1.entry.js +1 -0
- package/dist/webquark/p-cddadb39.entry.js +1 -0
- package/dist/webquark/p-cfaffa33.entry.js +1 -0
- package/dist/webquark/p-dda5be3e.entry.js +1 -0
- package/dist/webquark/p-f51a7a3c.entry.js +1 -0
- package/dist/webquark/webquark.css +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +29 -8
- package/scripts/webquark-serve.js +8 -6
- package/dist/cjs/q-button_3.cjs.entry.js +0 -603
- package/dist/cjs/q-circular-progress_2.cjs.entry.js +0 -255
- package/dist/collection/components/circular-progress/circular-progress.css +0 -85
- package/dist/collection/components/circular-progress/circular-progress.js +0 -122
- package/dist/collection/components/data-table/data-table.js +0 -481
- package/dist/collection/components/dropdown/dropdown.js +0 -606
- package/dist/collection/components/icon/icon.js +0 -297
- package/dist/collection/components/sidepanel/sidepanel.css +0 -371
- package/dist/collection/components/sidepanel/sidepanel.js +0 -460
- package/dist/collection/components/step-diagram-item/step-diagram-item.js +0 -131
- package/dist/collection/components/syntax-box/syntax-box.js +0 -534
- package/dist/collection/components/tooltip/tooltip.js +0 -249
- package/dist/components/p-91lJS0-v.js +0 -1
- package/dist/components/p-B7e76DLW.js +0 -1
- package/dist/components/p-BCSpNDGG.js +0 -1
- package/dist/components/p-BRNv11Jn.js +0 -1
- package/dist/components/p-CYfD9z8O.js +0 -1
- package/dist/components/p-DfTW9B7V.js +0 -1
- package/dist/components/p-DgaKWrjd.js +0 -1
- package/dist/components/p-DoQvrOHk.js +0 -1
- package/dist/components/q-circular-progress.js +0 -1
- package/dist/esm/q-button_3.entry.js +0 -599
- package/dist/esm/q-circular-progress_2.entry.js +0 -252
- package/dist/playground/build/p-095635d3.entry.js +0 -1
- package/dist/playground/build/p-1238a2cc.entry.js +0 -1
- package/dist/playground/build/p-389e2cd3.entry.js +0 -1
- package/dist/playground/build/p-4f133a25.entry.js +0 -1
- package/dist/playground/build/p-5c67a28e.entry.js +0 -1
- package/dist/playground/build/p-679fa494.entry.js +0 -1
- package/dist/playground/build/p-6dc7b987.entry.js +0 -1
- package/dist/playground/build/p-7083c5ff.entry.js +0 -1
- package/dist/playground/build/p-7f47861b.entry.js +0 -1
- package/dist/playground/build/p-8a94a0a2.entry.js +0 -1
- package/dist/playground/build/p-9afa3fe8.entry.js +0 -1
- package/dist/playground/build/p-9bb8ed97.entry.js +0 -1
- package/dist/playground/build/p-CYoQ4Zv3.js +0 -2
- package/dist/playground/build/p-DoQvrOHk.js +0 -1
- package/dist/playground/build/p-aa9be919.entry.js +0 -1
- package/dist/playground/build/p-b1e68119.entry.js +0 -1
- package/dist/playground/build/p-c8d6af8e.entry.js +0 -1
- package/dist/playground/build/p-f48dd3dd.entry.js +0 -1
- package/dist/playground/build/p-f7b5b155.entry.js +0 -1
- package/dist/playground/playground/specs/q-circular-progress.sandbox.json +0 -91
- package/dist/types/components/button/button.d.ts +0 -26
- package/dist/types/components/card/card.d.ts +0 -12
- package/dist/types/components/circular-progress/circular-progress.d.ts +0 -7
- package/dist/types/components/data-table/data-table.d.ts +0 -45
- package/dist/types/components/dialog/dialog.d.ts +0 -35
- package/dist/types/components/dropdown/dropdown.d.ts +0 -49
- package/dist/types/components/icon/icon.d.ts +0 -33
- package/dist/types/components/input/input.d.ts +0 -43
- package/dist/types/components/reel/reel.d.ts +0 -23
- package/dist/types/components/scrollable/scrollable.d.ts +0 -47
- package/dist/types/components/sidepanel/sidepanel.d.ts +0 -58
- package/dist/types/components/step-diagram/step-diagram.d.ts +0 -10
- package/dist/types/components/step-diagram-item/step-diagram-item.d.ts +0 -12
- package/dist/types/components/syntax-box/syntax-box.d.ts +0 -37
- package/dist/types/components/textarea/textarea.d.ts +0 -36
- package/dist/types/components/thumbnail/thumbnail.d.ts +0 -18
- package/dist/types/components/toggle/toggle.d.ts +0 -36
- package/dist/types/components/tooltip/tooltip.d.ts +0 -29
- package/dist/webquark/p-095635d3.entry.js +0 -1
- package/dist/webquark/p-1238a2cc.entry.js +0 -1
- package/dist/webquark/p-389e2cd3.entry.js +0 -1
- package/dist/webquark/p-4f133a25.entry.js +0 -1
- package/dist/webquark/p-5c67a28e.entry.js +0 -1
- package/dist/webquark/p-679fa494.entry.js +0 -1
- package/dist/webquark/p-6dc7b987.entry.js +0 -1
- package/dist/webquark/p-7083c5ff.entry.js +0 -1
- package/dist/webquark/p-7f47861b.entry.js +0 -1
- package/dist/webquark/p-8a94a0a2.entry.js +0 -1
- package/dist/webquark/p-9afa3fe8.entry.js +0 -1
- package/dist/webquark/p-9bb8ed97.entry.js +0 -1
- package/dist/webquark/p-CYoQ4Zv3.js +0 -2
- package/dist/webquark/p-DoQvrOHk.js +0 -1
- package/dist/webquark/p-aa9be919.entry.js +0 -1
- package/dist/webquark/p-b1e68119.entry.js +0 -1
- package/dist/webquark/p-c8d6af8e.entry.js +0 -1
- package/dist/webquark/p-f48dd3dd.entry.js +0 -1
- package/dist/webquark/p-f7b5b155.entry.js +0 -1
- /package/dist/cjs/{index-DGQOjEwT.js → utils-DGQOjEwT.js} +0 -0
- /package/dist/esm/{index-BJiYCN3i.js → utils-BJiYCN3i.js} +0 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import { Q_MAP_MARKER_SIZES } from "../map.types";
|
|
2
|
+
import { resolveMapMarkerCollisionOffsets, } from "./cluster-collision";
|
|
3
|
+
import { MapMarkerClusterIndex, } from "./marker-cluster-index";
|
|
4
|
+
import { createCalloutContent, createClusterContent, createMarkerContent, getMarkerAccessibleLabel, updateCalloutContent, updateClusterPresentation, updateMarkerPresentation, } from "./marker-presentation";
|
|
5
|
+
import { getMapMarkerKey, getMapMarkers } from "./markers";
|
|
6
|
+
const STANDALONE_MARKER_Z_INDEX_OFFSET = 2_000;
|
|
7
|
+
const DEFAULT_MARKER_DIAMETER = 20;
|
|
8
|
+
const DEFAULT_CLUSTER_DIAMETER = 32;
|
|
9
|
+
const MARKER_SIZE_CLASSES = Q_MAP_MARKER_SIZES.map(size => markerSizeClassName(size));
|
|
10
|
+
/** Owns marker normalization, clustering, stable reconciliation, accessibility, and cleanup. */
|
|
11
|
+
export class MapMarkerController {
|
|
12
|
+
options;
|
|
13
|
+
layers = new Map();
|
|
14
|
+
markers = new Map();
|
|
15
|
+
clusterIndex = new MapMarkerClusterIndex();
|
|
16
|
+
visibleItems = new Map();
|
|
17
|
+
pendingFocusMarkerKey;
|
|
18
|
+
handleViewportChange = () => this.reconcile();
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.options = options;
|
|
21
|
+
options.map.on('moveend zoomend', this.handleViewportChange);
|
|
22
|
+
}
|
|
23
|
+
sync(markers) {
|
|
24
|
+
const normalized = getMapMarkers(markers);
|
|
25
|
+
this.markers.clear();
|
|
26
|
+
for (const marker of normalized)
|
|
27
|
+
this.markers.set(getMapMarkerKey(marker.id), marker);
|
|
28
|
+
const clustering = this.options.getClusteringOptions();
|
|
29
|
+
if (clustering.enabled)
|
|
30
|
+
this.clusterIndex.load(normalized, clustering);
|
|
31
|
+
else
|
|
32
|
+
this.clusterIndex.clear();
|
|
33
|
+
this.reconcile();
|
|
34
|
+
}
|
|
35
|
+
syncSelection() {
|
|
36
|
+
this.reconcile();
|
|
37
|
+
}
|
|
38
|
+
getVisibilityTarget(markerId) {
|
|
39
|
+
const markerKey = getMapMarkerKey(markerId);
|
|
40
|
+
const marker = this.markers.get(markerKey);
|
|
41
|
+
if (!marker)
|
|
42
|
+
return undefined;
|
|
43
|
+
const directLayer = this.layers.get(markerKey);
|
|
44
|
+
if (directLayer?.kind === 'marker') {
|
|
45
|
+
return {
|
|
46
|
+
latitude: marker.latitude,
|
|
47
|
+
longitude: marker.longitude,
|
|
48
|
+
rendered: { kind: directLayer.kind, element: directLayer.element },
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
for (const layer of this.layers.values()) {
|
|
52
|
+
if (!layer.markerKeys.includes(markerKey))
|
|
53
|
+
continue;
|
|
54
|
+
return {
|
|
55
|
+
latitude: marker.latitude,
|
|
56
|
+
longitude: marker.longitude,
|
|
57
|
+
rendered: { kind: layer.kind, element: layer.element },
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return { latitude: marker.latitude, longitude: marker.longitude };
|
|
61
|
+
}
|
|
62
|
+
destroy() {
|
|
63
|
+
this.options.map.off('moveend zoomend', this.handleViewportChange);
|
|
64
|
+
for (const key of [...this.layers.keys()])
|
|
65
|
+
this.remove(key);
|
|
66
|
+
this.visibleItems.clear();
|
|
67
|
+
this.markers.clear();
|
|
68
|
+
this.clusterIndex.clear();
|
|
69
|
+
}
|
|
70
|
+
reconcile() {
|
|
71
|
+
const focusIntent = this.captureFocusIntent();
|
|
72
|
+
const items = this.getVisibleItems();
|
|
73
|
+
this.visibleItems = new Map(items.map(item => [item.key, item]));
|
|
74
|
+
for (const key of [...this.layers.keys()]) {
|
|
75
|
+
if (!this.visibleItems.has(key))
|
|
76
|
+
this.remove(key);
|
|
77
|
+
}
|
|
78
|
+
for (const item of items) {
|
|
79
|
+
const current = this.layers.get(item.key);
|
|
80
|
+
if (current && current.kind !== item.kind)
|
|
81
|
+
this.remove(item.key);
|
|
82
|
+
const record = this.layers.get(item.key) ?? this.add(item);
|
|
83
|
+
if (record)
|
|
84
|
+
this.update(record, item);
|
|
85
|
+
}
|
|
86
|
+
this.syncCollisionOffsets(items);
|
|
87
|
+
const preservedFocus = focusIntent
|
|
88
|
+
&& this.layers.get(focusIntent.renderKey)?.element === focusIntent.element;
|
|
89
|
+
if (this.pendingFocusMarkerKey) {
|
|
90
|
+
const restored = this.restoreFocus(this.pendingFocusMarkerKey);
|
|
91
|
+
if (restored)
|
|
92
|
+
this.pendingFocusMarkerKey = undefined;
|
|
93
|
+
}
|
|
94
|
+
else if (focusIntent && !preservedFocus) {
|
|
95
|
+
if (!this.restoreFocus(focusIntent.markerKey))
|
|
96
|
+
this.options.map.getContainer().focus();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
getVisibleItems() {
|
|
100
|
+
const clustering = this.options.getClusteringOptions();
|
|
101
|
+
if (!clustering.enabled) {
|
|
102
|
+
return [...this.markers].map(([key, marker]) => ({ kind: 'marker', key, marker }));
|
|
103
|
+
}
|
|
104
|
+
const bounds = this.options.map.getBounds().pad(0.2);
|
|
105
|
+
const south = Math.max(-90, bounds.getSouth());
|
|
106
|
+
const north = Math.min(90, bounds.getNorth());
|
|
107
|
+
const west = Math.max(-180, bounds.getWest());
|
|
108
|
+
const east = Math.min(180, bounds.getEast());
|
|
109
|
+
const safeBounds = east > west
|
|
110
|
+
? [west, south, east, north]
|
|
111
|
+
: [-180, south, 180, north];
|
|
112
|
+
return this.clusterIndex.getViewportItems(safeBounds, this.options.map.getZoom(), this.options.getSelectedMarkerId());
|
|
113
|
+
}
|
|
114
|
+
add(item) {
|
|
115
|
+
const document = this.options.map.getContainer().ownerDocument;
|
|
116
|
+
const surface = item.kind === 'marker'
|
|
117
|
+
? createMarkerContent(document)
|
|
118
|
+
: createClusterContent(document);
|
|
119
|
+
const className = item.kind === 'marker'
|
|
120
|
+
? 'q-map-marker-position'
|
|
121
|
+
: 'q-map-cluster-position';
|
|
122
|
+
const label = item.kind === 'marker' ? item.marker.label : `${item.count} map markers`;
|
|
123
|
+
const layer = this.options.leaflet.marker([this.getLatitude(item), this.getLongitude(item)], {
|
|
124
|
+
bubblingMouseEvents: false,
|
|
125
|
+
icon: this.options.leaflet.divIcon({
|
|
126
|
+
className,
|
|
127
|
+
html: surface,
|
|
128
|
+
iconAnchor: [0, 0],
|
|
129
|
+
iconSize: [0, 0],
|
|
130
|
+
}),
|
|
131
|
+
keyboard: false,
|
|
132
|
+
riseOnHover: true,
|
|
133
|
+
riseOffset: 1000,
|
|
134
|
+
title: label,
|
|
135
|
+
zIndexOffset: this.getZIndexOffset(item),
|
|
136
|
+
});
|
|
137
|
+
layer.addTo(this.options.map);
|
|
138
|
+
const element = layer.getElement();
|
|
139
|
+
if (!element) {
|
|
140
|
+
layer.remove();
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
if (!element.contains(surface)) {
|
|
144
|
+
layer.remove();
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
const click = (event) => {
|
|
148
|
+
event.stopPropagation();
|
|
149
|
+
this.activate(item.key, event);
|
|
150
|
+
};
|
|
151
|
+
const keydown = (event) => {
|
|
152
|
+
if (event.key !== 'Enter' && event.key !== ' ')
|
|
153
|
+
return;
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
event.stopPropagation();
|
|
156
|
+
this.activate(item.key, event);
|
|
157
|
+
};
|
|
158
|
+
surface.addEventListener('click', click);
|
|
159
|
+
surface.addEventListener('keydown', keydown);
|
|
160
|
+
const record = {
|
|
161
|
+
kind: item.kind,
|
|
162
|
+
layer,
|
|
163
|
+
element: surface,
|
|
164
|
+
markerKeys: [],
|
|
165
|
+
click,
|
|
166
|
+
keydown,
|
|
167
|
+
};
|
|
168
|
+
this.layers.set(item.key, record);
|
|
169
|
+
return record;
|
|
170
|
+
}
|
|
171
|
+
update(record, item) {
|
|
172
|
+
record.layer.setLatLng([this.getLatitude(item), this.getLongitude(item)]);
|
|
173
|
+
record.layer.setZIndexOffset(this.getZIndexOffset(item));
|
|
174
|
+
record.markerKeys = item.kind === 'marker'
|
|
175
|
+
? [getMapMarkerKey(item.marker.id)]
|
|
176
|
+
: item.markerKeys;
|
|
177
|
+
if (item.kind === 'marker') {
|
|
178
|
+
const selected = this.isSelected(item.marker.id);
|
|
179
|
+
this.syncMarkerSize(record, item.marker.size);
|
|
180
|
+
updateMarkerPresentation(record.element, item.marker, selected);
|
|
181
|
+
record.element.setAttribute('role', 'button');
|
|
182
|
+
record.element.setAttribute('tabindex', '0');
|
|
183
|
+
record.element.setAttribute('aria-label', getMarkerAccessibleLabel(item.marker));
|
|
184
|
+
record.element.setAttribute('aria-pressed', selected ? 'true' : 'false');
|
|
185
|
+
record.element.setAttribute('data-marker-id', item.key);
|
|
186
|
+
record.element.setAttribute('title', item.marker.label);
|
|
187
|
+
this.syncCallout(record, item.marker, selected);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.unbindCallout(record);
|
|
191
|
+
updateClusterPresentation(record.element, item.count, item.containsSelection);
|
|
192
|
+
record.element.setAttribute('role', 'button');
|
|
193
|
+
record.element.setAttribute('tabindex', '0');
|
|
194
|
+
record.element.setAttribute('aria-label', `${item.count} map markers${item.containsSelection ? ', including the selected marker' : ''}`);
|
|
195
|
+
record.element.setAttribute('part', `cluster ${clusterGroupPartName(item.clusterGroup)}`);
|
|
196
|
+
record.element.setAttribute('data-cluster-id', item.clusterId);
|
|
197
|
+
record.element.setAttribute('data-cluster-group', item.clusterGroup);
|
|
198
|
+
record.element.setAttribute('title', `${item.count} map markers`);
|
|
199
|
+
record.element.removeAttribute('aria-pressed');
|
|
200
|
+
}
|
|
201
|
+
getZIndexOffset(item) {
|
|
202
|
+
return item.kind === 'marker' && item.marker.clusterable === false
|
|
203
|
+
? STANDALONE_MARKER_Z_INDEX_OFFSET
|
|
204
|
+
: 0;
|
|
205
|
+
}
|
|
206
|
+
syncMarkerSize(record, size) {
|
|
207
|
+
const position = record.layer.getElement();
|
|
208
|
+
if (!position)
|
|
209
|
+
return;
|
|
210
|
+
position.classList.remove(...MARKER_SIZE_CLASSES);
|
|
211
|
+
if (size)
|
|
212
|
+
position.classList.add(markerSizeClassName(size));
|
|
213
|
+
}
|
|
214
|
+
syncCollisionOffsets(items) {
|
|
215
|
+
const collisionItems = [];
|
|
216
|
+
for (const item of items) {
|
|
217
|
+
const record = this.layers.get(item.key);
|
|
218
|
+
if (!record || record.kind !== item.kind)
|
|
219
|
+
continue;
|
|
220
|
+
const point = this.options.map.latLngToContainerPoint([
|
|
221
|
+
this.getLatitude(item),
|
|
222
|
+
this.getLongitude(item),
|
|
223
|
+
]);
|
|
224
|
+
const position = record.layer.getElement();
|
|
225
|
+
const bounds = position?.getBoundingClientRect();
|
|
226
|
+
const diameter = Math.max(bounds?.width ?? 0, bounds?.height ?? 0)
|
|
227
|
+
|| (item.kind === 'cluster'
|
|
228
|
+
? DEFAULT_CLUSTER_DIAMETER
|
|
229
|
+
: DEFAULT_MARKER_DIAMETER);
|
|
230
|
+
collisionItems.push({
|
|
231
|
+
key: item.key,
|
|
232
|
+
x: point.x,
|
|
233
|
+
y: point.y,
|
|
234
|
+
diameter,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
const offsets = resolveMapMarkerCollisionOffsets(collisionItems);
|
|
238
|
+
for (const item of collisionItems) {
|
|
239
|
+
const record = this.layers.get(item.key);
|
|
240
|
+
if (!record)
|
|
241
|
+
continue;
|
|
242
|
+
const offset = offsets.get(item.key);
|
|
243
|
+
if (!offset || (Math.abs(offset.x) < 0.01 && Math.abs(offset.y) < 0.01)) {
|
|
244
|
+
record.element.style.removeProperty('translate');
|
|
245
|
+
this.syncCalloutCollisionOffset(record, 0, 0);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
record.element.style.setProperty('translate', `${formatCollisionOffset(offset.x)}px ${formatCollisionOffset(offset.y)}px`);
|
|
249
|
+
this.syncCalloutCollisionOffset(record, offset.x, offset.y);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
syncCalloutCollisionOffset(record, x, y) {
|
|
253
|
+
const tooltip = record.layer.getTooltip();
|
|
254
|
+
if (!tooltip)
|
|
255
|
+
return;
|
|
256
|
+
const normalizedX = formatCollisionOffset(x);
|
|
257
|
+
const normalizedY = formatCollisionOffset(y);
|
|
258
|
+
const collisionOffset = `${normalizedX}:${normalizedY}`;
|
|
259
|
+
if (record.calloutCollisionOffset === collisionOffset
|
|
260
|
+
|| (record.calloutCollisionOffset === undefined
|
|
261
|
+
&& normalizedX === 0
|
|
262
|
+
&& normalizedY === 0))
|
|
263
|
+
return;
|
|
264
|
+
record.calloutCollisionOffset = collisionOffset;
|
|
265
|
+
tooltip.options.offset = this.options.leaflet.point(normalizedX, normalizedY);
|
|
266
|
+
tooltip.update();
|
|
267
|
+
}
|
|
268
|
+
syncCallout(record, marker, selected) {
|
|
269
|
+
const callout = marker.callout;
|
|
270
|
+
const visible = callout && (callout.visibility !== 'selected' || selected);
|
|
271
|
+
if (!callout || !visible) {
|
|
272
|
+
this.unbindCallout(record);
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
const placement = callout.placement ?? 'auto';
|
|
276
|
+
if (record.calloutBound && record.calloutPlacement !== placement)
|
|
277
|
+
this.unbindCallout(record);
|
|
278
|
+
record.calloutContent ??= createCalloutContent(record.element.ownerDocument);
|
|
279
|
+
updateCalloutContent(record.calloutContent, callout);
|
|
280
|
+
record.calloutPlacement = placement;
|
|
281
|
+
if (!record.calloutBound) {
|
|
282
|
+
record.layer.bindTooltip(record.calloutContent, {
|
|
283
|
+
className: 'q-map-callout',
|
|
284
|
+
direction: placement,
|
|
285
|
+
interactive: false,
|
|
286
|
+
opacity: 1,
|
|
287
|
+
permanent: true,
|
|
288
|
+
});
|
|
289
|
+
record.calloutBound = true;
|
|
290
|
+
}
|
|
291
|
+
record.layer.setTooltipContent(record.calloutContent);
|
|
292
|
+
record.layer.openTooltip();
|
|
293
|
+
const tooltip = record.layer.getTooltip()?.getElement();
|
|
294
|
+
tooltip?.setAttribute('part', 'marker-callout');
|
|
295
|
+
tooltip?.setAttribute('aria-hidden', 'true');
|
|
296
|
+
}
|
|
297
|
+
unbindCallout(record) {
|
|
298
|
+
if (!record.calloutBound)
|
|
299
|
+
return;
|
|
300
|
+
record.layer.unbindTooltip();
|
|
301
|
+
record.calloutBound = false;
|
|
302
|
+
record.calloutCollisionOffset = undefined;
|
|
303
|
+
}
|
|
304
|
+
activate(key, originalEvent) {
|
|
305
|
+
const item = this.visibleItems.get(key);
|
|
306
|
+
if (!item)
|
|
307
|
+
return;
|
|
308
|
+
if (item.kind === 'marker') {
|
|
309
|
+
this.options.onMarkerSelect(item.marker, originalEvent);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
this.activateCluster(item, originalEvent);
|
|
313
|
+
}
|
|
314
|
+
activateCluster(item, originalEvent) {
|
|
315
|
+
const expansionZoom = Math.min(this.options.map.getMaxZoom(), Math.max(this.options.map.getZoom() + 1, item.expansionZoom));
|
|
316
|
+
const prevented = this.options.onClusterSelect({
|
|
317
|
+
clusterId: item.clusterId,
|
|
318
|
+
clusterGroup: item.clusterGroup,
|
|
319
|
+
markerIds: item.markerIds,
|
|
320
|
+
latitude: item.latitude,
|
|
321
|
+
longitude: item.longitude,
|
|
322
|
+
expansionZoom,
|
|
323
|
+
originalEvent,
|
|
324
|
+
});
|
|
325
|
+
if (prevented)
|
|
326
|
+
return;
|
|
327
|
+
if (originalEvent instanceof KeyboardEvent) {
|
|
328
|
+
const selected = this.options.getSelectedMarkerId();
|
|
329
|
+
const selectedKey = selected === undefined ? undefined : getMapMarkerKey(selected);
|
|
330
|
+
this.pendingFocusMarkerKey = selectedKey && item.markerKeys.includes(selectedKey)
|
|
331
|
+
? selectedKey
|
|
332
|
+
: item.markerKeys[0];
|
|
333
|
+
}
|
|
334
|
+
this.options.map.setView([item.latitude, item.longitude], expansionZoom, {
|
|
335
|
+
animate: !this.options.prefersReducedMotion(),
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
captureFocusIntent() {
|
|
339
|
+
for (const [renderKey, record] of this.layers) {
|
|
340
|
+
const root = record.element.getRootNode();
|
|
341
|
+
if (root.activeElement !== record.element)
|
|
342
|
+
continue;
|
|
343
|
+
const selected = this.options.getSelectedMarkerId();
|
|
344
|
+
const selectedKey = selected === undefined ? undefined : getMapMarkerKey(selected);
|
|
345
|
+
return {
|
|
346
|
+
element: record.element,
|
|
347
|
+
renderKey,
|
|
348
|
+
markerKey: selectedKey && record.markerKeys.includes(selectedKey)
|
|
349
|
+
? selectedKey
|
|
350
|
+
: record.markerKeys[0],
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
return undefined;
|
|
354
|
+
}
|
|
355
|
+
restoreFocus(markerKey) {
|
|
356
|
+
const marker = this.layers.get(markerKey);
|
|
357
|
+
if (marker?.kind === 'marker') {
|
|
358
|
+
marker.element.focus();
|
|
359
|
+
return true;
|
|
360
|
+
}
|
|
361
|
+
for (const record of this.layers.values()) {
|
|
362
|
+
if (record.kind === 'cluster' && record.markerKeys.includes(markerKey)) {
|
|
363
|
+
record.element.focus();
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
369
|
+
isSelected(id) {
|
|
370
|
+
const selectedId = this.options.getSelectedMarkerId();
|
|
371
|
+
return selectedId !== undefined && getMapMarkerKey(selectedId) === getMapMarkerKey(id);
|
|
372
|
+
}
|
|
373
|
+
getLatitude(item) {
|
|
374
|
+
return item.kind === 'marker' ? item.marker.latitude : item.latitude;
|
|
375
|
+
}
|
|
376
|
+
getLongitude(item) {
|
|
377
|
+
return item.kind === 'marker' ? item.marker.longitude : item.longitude;
|
|
378
|
+
}
|
|
379
|
+
remove(key) {
|
|
380
|
+
const record = this.layers.get(key);
|
|
381
|
+
if (!record)
|
|
382
|
+
return;
|
|
383
|
+
record.element.removeEventListener('click', record.click);
|
|
384
|
+
record.element.removeEventListener('keydown', record.keydown);
|
|
385
|
+
this.unbindCallout(record);
|
|
386
|
+
record.layer.remove();
|
|
387
|
+
this.layers.delete(key);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
function markerSizeClassName(size) {
|
|
391
|
+
return `size-${size}`;
|
|
392
|
+
}
|
|
393
|
+
function clusterGroupPartName(clusterGroup) {
|
|
394
|
+
const normalizedGroup = clusterGroup
|
|
395
|
+
.toLowerCase()
|
|
396
|
+
.replace(/[^a-z0-9_-]+/g, '-')
|
|
397
|
+
.replace(/-+/g, '-')
|
|
398
|
+
.replace(/^-|-$/g, '');
|
|
399
|
+
return `cluster-group-${normalizedGroup || 'default'}`;
|
|
400
|
+
}
|
|
401
|
+
function formatCollisionOffset(value) {
|
|
402
|
+
return Math.round(value * 100) / 100;
|
|
403
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { Q_MAP_MARKER_VARIANTS } from "../map.types";
|
|
2
|
+
const KIND_CLASSES = ['kind-dot', 'kind-avatar', 'kind-icon'];
|
|
3
|
+
const RING_CLASSES = ['ring-none', 'ring-solid', 'ring-dashed'];
|
|
4
|
+
const ICON_SIZE_PROPERTY = '--q-map-marker-icon-size';
|
|
5
|
+
const ICON_OFFSET_X_PROPERTY = '--q-map-marker-icon-offset-x';
|
|
6
|
+
const ICON_OFFSET_Y_PROPERTY = '--q-map-marker-icon-offset-y';
|
|
7
|
+
function createIcon(document, className) {
|
|
8
|
+
const icon = document.createElement('q-icon');
|
|
9
|
+
icon.className = className;
|
|
10
|
+
icon.setAttribute('size', '100%');
|
|
11
|
+
icon.setAttribute('aria-hidden', 'true');
|
|
12
|
+
return icon;
|
|
13
|
+
}
|
|
14
|
+
function updateIcon(icon, name) {
|
|
15
|
+
icon.hidden = !name;
|
|
16
|
+
if (name)
|
|
17
|
+
icon.setAttribute('name', name);
|
|
18
|
+
else
|
|
19
|
+
icon.removeAttribute('name');
|
|
20
|
+
}
|
|
21
|
+
export function createMarkerContent(document) {
|
|
22
|
+
const surface = document.createElement('span');
|
|
23
|
+
surface.className = 'q-map-marker';
|
|
24
|
+
surface.setAttribute('part', 'marker');
|
|
25
|
+
const content = document.createElement('span');
|
|
26
|
+
content.className = 'q-map-marker__content';
|
|
27
|
+
content.setAttribute('aria-hidden', 'true');
|
|
28
|
+
const center = document.createElement('span');
|
|
29
|
+
center.className = 'q-map-marker__center';
|
|
30
|
+
const fallback = document.createElement('span');
|
|
31
|
+
fallback.className = 'q-map-marker__fallback';
|
|
32
|
+
fallback.hidden = true;
|
|
33
|
+
const image = document.createElement('img');
|
|
34
|
+
image.className = 'q-map-marker__image';
|
|
35
|
+
image.alt = '';
|
|
36
|
+
image.decoding = 'async';
|
|
37
|
+
image.draggable = false;
|
|
38
|
+
image.hidden = true;
|
|
39
|
+
image.setAttribute('aria-hidden', 'true');
|
|
40
|
+
image.addEventListener('load', () => {
|
|
41
|
+
if (image.dataset.source !== image.getAttribute('src'))
|
|
42
|
+
return;
|
|
43
|
+
image.hidden = false;
|
|
44
|
+
center.classList.add('has-image');
|
|
45
|
+
});
|
|
46
|
+
image.addEventListener('error', () => {
|
|
47
|
+
if (image.dataset.source !== image.getAttribute('src'))
|
|
48
|
+
return;
|
|
49
|
+
image.hidden = true;
|
|
50
|
+
center.classList.remove('has-image');
|
|
51
|
+
});
|
|
52
|
+
const icon = createIcon(document, 'q-map-marker__icon');
|
|
53
|
+
icon.hidden = true;
|
|
54
|
+
const badge = document.createElement('span');
|
|
55
|
+
badge.className = 'q-map-marker__badge';
|
|
56
|
+
badge.setAttribute('part', 'marker-badge');
|
|
57
|
+
badge.hidden = true;
|
|
58
|
+
const badgeIcon = createIcon(document, 'q-map-marker__badge-icon');
|
|
59
|
+
badgeIcon.hidden = true;
|
|
60
|
+
const badgeText = document.createElement('span');
|
|
61
|
+
badgeText.className = 'q-map-marker__badge-text';
|
|
62
|
+
badgeText.hidden = true;
|
|
63
|
+
center.append(fallback, image, icon);
|
|
64
|
+
badge.append(badgeIcon, badgeText);
|
|
65
|
+
content.append(center, badge);
|
|
66
|
+
surface.append(content);
|
|
67
|
+
return surface;
|
|
68
|
+
}
|
|
69
|
+
function updateImage(center, image, imageUrl) {
|
|
70
|
+
if (!imageUrl) {
|
|
71
|
+
image.hidden = true;
|
|
72
|
+
image.removeAttribute('src');
|
|
73
|
+
delete image.dataset.source;
|
|
74
|
+
center.classList.remove('has-image');
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (image.dataset.source === imageUrl)
|
|
78
|
+
return;
|
|
79
|
+
image.hidden = true;
|
|
80
|
+
center.classList.remove('has-image');
|
|
81
|
+
image.dataset.source = imageUrl;
|
|
82
|
+
image.src = imageUrl;
|
|
83
|
+
}
|
|
84
|
+
export function getMarkerAccessibleLabel(marker) {
|
|
85
|
+
return marker.badge ? `${marker.label}. ${marker.badge.ariaLabel}` : marker.label;
|
|
86
|
+
}
|
|
87
|
+
export function updateMarkerPresentation(element, marker, selected) {
|
|
88
|
+
for (const variant of Q_MAP_MARKER_VARIANTS)
|
|
89
|
+
element.classList.remove(`variant-${variant}`);
|
|
90
|
+
element.classList.remove(...KIND_CLASSES, ...RING_CLASSES);
|
|
91
|
+
element.classList.add(`variant-${marker.variant ?? 'default'}`, `ring-${marker.ring ?? 'none'}`);
|
|
92
|
+
const kind = marker.kind === 'icon' && !marker.icon ? 'dot' : marker.kind;
|
|
93
|
+
if (kind)
|
|
94
|
+
element.classList.add(`kind-${kind}`);
|
|
95
|
+
element.classList.toggle('is-pulsing', marker.pulse === true);
|
|
96
|
+
element.classList.toggle('is-selected', selected);
|
|
97
|
+
syncFinitePixelProperty(element, ICON_SIZE_PROPERTY, marker.iconSize);
|
|
98
|
+
syncFinitePixelProperty(element, ICON_OFFSET_X_PROPERTY, marker.iconOffsetX);
|
|
99
|
+
syncFinitePixelProperty(element, ICON_OFFSET_Y_PROPERTY, marker.iconOffsetY);
|
|
100
|
+
const center = element.querySelector('.q-map-marker__center');
|
|
101
|
+
const fallback = center?.querySelector('.q-map-marker__fallback');
|
|
102
|
+
const image = center?.querySelector('.q-map-marker__image');
|
|
103
|
+
const icon = center?.querySelector('.q-map-marker__icon');
|
|
104
|
+
if (!center || !fallback || !image || !icon)
|
|
105
|
+
return;
|
|
106
|
+
const avatarContent = kind === 'avatar' || kind === undefined;
|
|
107
|
+
const fallbackText = avatarContent ? marker.fallbackText ?? '' : '';
|
|
108
|
+
const imageUrl = avatarContent ? marker.imageUrl : undefined;
|
|
109
|
+
const iconName = kind === 'icon' ? marker.icon : undefined;
|
|
110
|
+
fallback.textContent = fallbackText;
|
|
111
|
+
fallback.hidden = !fallbackText;
|
|
112
|
+
updateImage(center, image, imageUrl);
|
|
113
|
+
updateIcon(icon, iconName);
|
|
114
|
+
element.classList.toggle('has-content', Boolean(fallbackText || imageUrl || iconName));
|
|
115
|
+
const badge = element.querySelector('.q-map-marker__badge');
|
|
116
|
+
const badgeIcon = badge?.querySelector('.q-map-marker__badge-icon');
|
|
117
|
+
const badgeText = badge?.querySelector('.q-map-marker__badge-text');
|
|
118
|
+
if (!badge || !badgeIcon || !badgeText)
|
|
119
|
+
return;
|
|
120
|
+
for (const variant of Q_MAP_MARKER_VARIANTS)
|
|
121
|
+
badge.classList.remove(`variant-${variant}`);
|
|
122
|
+
badge.hidden = !marker.badge;
|
|
123
|
+
badge.classList.add(`variant-${marker.badge?.variant ?? 'default'}`);
|
|
124
|
+
updateIcon(badgeIcon, marker.badge?.icon);
|
|
125
|
+
badgeText.textContent = marker.badge?.text ?? '';
|
|
126
|
+
badgeText.hidden = !marker.badge?.text;
|
|
127
|
+
}
|
|
128
|
+
function syncFinitePixelProperty(element, property, value) {
|
|
129
|
+
if (!Number.isFinite(value)) {
|
|
130
|
+
element.style.removeProperty(property);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
element.style.setProperty(property, `${Object.is(value, -0) ? 0 : value}px`);
|
|
134
|
+
}
|
|
135
|
+
export function createClusterContent(document) {
|
|
136
|
+
const surface = document.createElement('span');
|
|
137
|
+
surface.className = 'q-map-cluster';
|
|
138
|
+
surface.setAttribute('part', 'cluster');
|
|
139
|
+
const content = document.createElement('span');
|
|
140
|
+
content.className = 'q-map-cluster__content';
|
|
141
|
+
content.setAttribute('aria-hidden', 'true');
|
|
142
|
+
const count = document.createElement('span');
|
|
143
|
+
count.className = 'q-map-cluster__count';
|
|
144
|
+
content.append(count);
|
|
145
|
+
surface.append(content);
|
|
146
|
+
return surface;
|
|
147
|
+
}
|
|
148
|
+
export function updateClusterPresentation(element, count, containsSelection) {
|
|
149
|
+
const countElement = element.querySelector('.q-map-cluster__count');
|
|
150
|
+
if (countElement)
|
|
151
|
+
countElement.textContent = count > 999 ? `${Math.floor(count / 100) / 10}k` : String(count);
|
|
152
|
+
element.classList.toggle('contains-selection', containsSelection);
|
|
153
|
+
}
|
|
154
|
+
export function createCalloutContent(document) {
|
|
155
|
+
const content = document.createElement('div');
|
|
156
|
+
content.className = 'q-map-callout__content';
|
|
157
|
+
content.setAttribute('aria-hidden', 'true');
|
|
158
|
+
const heading = document.createElement('span');
|
|
159
|
+
heading.className = 'q-map-callout__heading';
|
|
160
|
+
const title = document.createElement('span');
|
|
161
|
+
title.className = 'q-map-callout__title';
|
|
162
|
+
const status = document.createElement('span');
|
|
163
|
+
status.className = 'q-map-callout__status';
|
|
164
|
+
status.hidden = true;
|
|
165
|
+
const subtitle = document.createElement('span');
|
|
166
|
+
subtitle.className = 'q-map-callout__subtitle';
|
|
167
|
+
subtitle.hidden = true;
|
|
168
|
+
const meta = document.createElement('span');
|
|
169
|
+
meta.className = 'q-map-callout__meta';
|
|
170
|
+
meta.hidden = true;
|
|
171
|
+
const stats = document.createElement('dl');
|
|
172
|
+
stats.className = 'q-map-callout__stats';
|
|
173
|
+
stats.hidden = true;
|
|
174
|
+
heading.append(title, status);
|
|
175
|
+
content.append(heading, subtitle, meta, stats);
|
|
176
|
+
return content;
|
|
177
|
+
}
|
|
178
|
+
export function updateCalloutContent(element, callout) {
|
|
179
|
+
const title = element.querySelector('.q-map-callout__title');
|
|
180
|
+
const subtitle = element.querySelector('.q-map-callout__subtitle');
|
|
181
|
+
const status = element.querySelector('.q-map-callout__status');
|
|
182
|
+
const meta = element.querySelector('.q-map-callout__meta');
|
|
183
|
+
const stats = element.querySelector('.q-map-callout__stats');
|
|
184
|
+
if (!title || !subtitle || !status || !meta || !stats)
|
|
185
|
+
return;
|
|
186
|
+
for (const variant of Q_MAP_MARKER_VARIANTS)
|
|
187
|
+
element.classList.remove(`variant-${variant}`);
|
|
188
|
+
element.classList.add(`variant-${callout.variant ?? 'default'}`);
|
|
189
|
+
title.textContent = callout.title;
|
|
190
|
+
subtitle.textContent = callout.subtitle ?? '';
|
|
191
|
+
subtitle.hidden = !callout.subtitle;
|
|
192
|
+
for (const variant of Q_MAP_MARKER_VARIANTS)
|
|
193
|
+
status.classList.remove(`variant-${variant}`);
|
|
194
|
+
status.classList.add(`variant-${callout.status?.variant ?? 'default'}`);
|
|
195
|
+
status.textContent = callout.status?.label ?? '';
|
|
196
|
+
status.hidden = !callout.status;
|
|
197
|
+
meta.textContent = callout.meta ?? '';
|
|
198
|
+
meta.hidden = !callout.meta;
|
|
199
|
+
updateCalloutStats(stats, callout.stats ?? []);
|
|
200
|
+
}
|
|
201
|
+
function updateCalloutStats(element, stats) {
|
|
202
|
+
const items = stats.map((stat) => {
|
|
203
|
+
const item = element.ownerDocument.createElement('div');
|
|
204
|
+
item.className = `q-map-callout__stat layout-${stat.layout ?? 'compact'}`;
|
|
205
|
+
const label = element.ownerDocument.createElement('dt');
|
|
206
|
+
label.className = 'q-map-callout__stat-label';
|
|
207
|
+
label.textContent = stat.label;
|
|
208
|
+
const value = element.ownerDocument.createElement('dd');
|
|
209
|
+
value.className = 'q-map-callout__stat-value';
|
|
210
|
+
value.textContent = String(stat.value);
|
|
211
|
+
item.append(label, value);
|
|
212
|
+
return item;
|
|
213
|
+
});
|
|
214
|
+
element.textContent = '';
|
|
215
|
+
element.append(...items);
|
|
216
|
+
element.hidden = items.length === 0;
|
|
217
|
+
}
|