@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,192 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-DOk7gYkf.js';
|
|
2
|
+
import { i as identifyItems } from './collection-identity-CGZPmEUB.js';
|
|
3
|
+
import { s as safeParseJson } from './utils-BJiYCN3i.js';
|
|
4
|
+
|
|
5
|
+
function getNavbarItems(items) {
|
|
6
|
+
return safeParseJson(items, [], 'QNavbar').flatMap((item) => {
|
|
7
|
+
if (typeof item === 'string') {
|
|
8
|
+
const value = item.trim();
|
|
9
|
+
return value ? [{ label: value, value }] : [];
|
|
10
|
+
}
|
|
11
|
+
if (item && typeof item === 'object' && typeof item.label === 'string') {
|
|
12
|
+
return [item];
|
|
13
|
+
}
|
|
14
|
+
return [];
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const navbarCss = () => `:host{display:block;width:100%;box-sizing:border-box;z-index:var(--q-navbar-z-index, 100)}:host([edge='top']){--q-navbar-edge-padding:max(0px, env(safe-area-inset-top, 0px)) 24px 0;--q-navbar-edge-compact-padding:max(0px, env(safe-area-inset-top, 0px)) 16px 0;--q-navbar-edge-mobile-padding:max(0px, env(safe-area-inset-top, 0px)) 16px 0}:host([edge='bottom']){--q-navbar-edge-padding:0 24px max(0px, env(safe-area-inset-bottom, 0px));--q-navbar-edge-compact-padding:0 16px max(0px, env(safe-area-inset-bottom, 0px));--q-navbar-edge-mobile-padding:0 16px max(0px, env(safe-area-inset-bottom, 0px))}:host([edge='left']),:host([edge='right']){width:auto;height:100%}:host([edge='left']){--q-navbar-edge-padding:16px 16px 16px max(16px, env(safe-area-inset-left, 0px));--q-navbar-edge-compact-padding:12px 12px 12px max(12px, env(safe-area-inset-left, 0px))}:host([edge='right']){--q-navbar-edge-padding:16px max(16px, env(safe-area-inset-right, 0px)) 16px 16px;--q-navbar-edge-compact-padding:12px max(12px, env(safe-area-inset-right, 0px)) 12px 12px}:host([sticky][edge='top']){position:sticky;top:0}:host([sticky][edge='right']){position:sticky;right:0}:host([sticky][edge='bottom']){position:sticky;bottom:0}:host([sticky][edge='left']){position:sticky;left:0}.navbar{width:100%;color:var(--q-navbar-fg, var(--q-fg-base, #f9fafb));background:var(--q-navbar-bg, var(--q-bg-surface-1, #1f2937));font-family:var(--q-font-family, inherit);box-sizing:border-box}:host([edge='left']) .navbar,:host([edge='right']) .navbar{height:100%}.navbar.is-transparent{background:transparent}:host([edge='top']) .navbar.is-bordered{border-bottom:var(--q-navbar-border, 1px solid var(--q-border-color, #374151))}:host([edge='right']) .navbar.is-bordered{border-left:var(--q-navbar-border, 1px solid var(--q-border-color, #374151))}:host([edge='bottom']) .navbar.is-bordered{border-top:var(--q-navbar-border, 1px solid var(--q-border-color, #374151))}:host([edge='left']) .navbar.is-bordered{border-right:var(--q-navbar-border, 1px solid var(--q-border-color, #374151))}.navbar-row{display:flex;align-items:center;gap:var(--q-navbar-gap, 20px);min-height:var(--q-navbar-height, 64px);padding:var(--q-navbar-padding, var(--q-navbar-edge-padding, 0 24px));box-sizing:border-box}.is-compact .navbar-row{min-height:var(--q-navbar-compact-height, 52px);padding:var(--q-navbar-compact-padding, var(--q-navbar-edge-compact-padding, 0 16px))}:host([edge='left']) .navbar-row,:host([edge='right']) .navbar-row{flex-direction:column;align-items:stretch;width:var(--q-navbar-width, 240px);height:100%;min-height:0}:host([edge='left']) .is-compact .navbar-row,:host([edge='right']) .is-compact .navbar-row{width:var(--q-navbar-compact-width, 200px);min-height:0}.brand-link{display:inline-flex;align-items:center;min-width:0;color:inherit;text-decoration:none}.brand-content{display:inline-flex;align-items:center;gap:10px;min-width:0}.brand-logo{width:var(--q-navbar-logo-size, 32px);height:var(--q-navbar-logo-size, 32px);object-fit:contain;flex:0 0 auto}.brand-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--q-navbar-brand-size, 1rem);font-weight:var(--q-font-weight-bold, 600)}.desktop-nav{display:flex;align-items:center;gap:var(--q-navbar-nav-gap, 6px);min-width:0;flex:1 1 auto}.desktop-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--q-navbar-action-gap, 8px);flex:0 0 auto}.nav-item-shell{position:relative;display:inline-flex;align-items:center;justify-content:center;justify-self:center;width:var(--q-navbar-item-width, fit-content);min-width:0}.nav-item{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--q-navbar-item-width, auto);gap:var(--q-navbar-item-gap, 8px);min-height:36px;padding:var(--q-navbar-item-padding, 7px 10px);border:0;border-radius:var(--q-navbar-item-radius, var(--q-radius-md, 7px));color:var(--q-navbar-item-fg, var(--q-fg-muted, #9ca3af));background:transparent;font:inherit;font-size:var(--q-navbar-item-size, 0.9rem);font-weight:var(--q-font-weight-medium, 500);line-height:1.2;text-decoration:none;cursor:pointer;transition:color var(--q-transition-fast, 150ms ease), background var(--q-transition-fast, 150ms ease)}.nav-item__addon{position:absolute;z-index:1;display:inline-flex;max-width:none}.nav-item__addon.is-top-start{inset-block-start:0;inset-inline-start:0;transform:translateY(-50%)}.nav-item__addon.is-top-center{inset-block-start:0;inset-inline-start:50%;transform:translate(-50%, -50%)}.nav-item__addon.is-top-end{inset-block-start:0;inset-inline-end:0;transform:translateY(-50%)}.nav-item__addon.is-bottom-start{inset-block-end:0;inset-inline-start:0;transform:translateY(50%)}.nav-item__addon.is-bottom-center{inset-block-end:0;inset-inline-start:50%;transform:translate(-50%, 50%)}.nav-item__addon.is-bottom-end{inset-block-end:0;inset-inline-end:0;transform:translateY(50%)}.nav-item:hover,.nav-item:focus-visible{color:var(--q-navbar-item-fg-hover, var(--q-fg-base, #f9fafb));background:var(--q-navbar-item-bg-hover, var(--q-bg-surface-2, #374151));outline:none}.nav-item:focus-visible{box-shadow:var(--q-glow-interactive, 0 0 20px rgba(96, 165, 250, 0.3))}.nav-item.is-active{color:var(--q-navbar-item-active-fg, var(--q-color-primary, #60a5fa));background:var(--q-navbar-item-active-bg, color-mix(in srgb, var(--q-color-primary, #60a5fa) 10%, transparent))}.nav-item.is-disabled,.nav-item:disabled{color:var(--q-navbar-item-disabled-fg, var(--q-fg-muted, #9ca3af));cursor:not-allowed;opacity:0.7}.nav-item__icon{flex:0 0 auto}:host([edge='left']) .brand-link,:host([edge='right']) .brand-link,:host([edge='left']) .desktop-nav,:host([edge='right']) .desktop-nav,:host([edge='left']) .desktop-actions,:host([edge='right']) .desktop-actions{width:100%}:host([edge='left']) .desktop-nav,:host([edge='right']) .desktop-nav,:host([edge='left']) .desktop-actions,:host([edge='right']) .desktop-actions{flex-direction:column;align-items:stretch}:host([edge='left']) .desktop-actions,:host([edge='right']) .desktop-actions{justify-content:flex-end}:host([edge='left']) .nav-item,:host([edge='right']) .nav-item{width:100%;justify-content:flex-start}:host([edge='left']) .nav-item-shell,:host([edge='right']) .nav-item-shell{justify-self:stretch;width:100%}:host([edge='left']) .nav-item-shell.is-icon-only,:host([edge='right']) .nav-item-shell.is-icon-only{width:var(--q-navbar-item-icon-only-size, 40px);align-self:center}:host([edge='left']) .nav-item.is-icon-only,:host([edge='right']) .nav-item.is-icon-only{width:var(--q-navbar-item-icon-only-size, 40px);align-self:center;justify-content:center}.nav-item__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-item.is-icon-only{min-width:var(--q-navbar-item-icon-only-size, 40px);min-height:var(--q-navbar-item-icon-only-size, 40px);padding:var(--q-navbar-item-icon-only-padding, 8px)}.nav-item.is-icon-only .nav-item__label{display:none}.menu-button{display:none;width:40px;height:40px;align-items:center;justify-content:center;flex-direction:column;gap:4px;border:var(--q-navbar-menu-border, 1px solid var(--q-border-color, #374151));border-radius:var(--q-radius-md, 7px);color:var(--q-navbar-fg, var(--q-fg-base, #f9fafb));background:var(--q-navbar-menu-bg, transparent);cursor:pointer}.menu-button span{display:block;width:18px;height:2px;border-radius:999px;background:currentColor}.mobile-panel{display:none}@media (max-width: 720px){:host([edge='top']) .desktop-actions,:host([edge='bottom']) .desktop-actions{display:none}:host([edge='top']) .navbar-row,:host([edge='bottom']) .navbar-row{flex-wrap:wrap;justify-content:space-between;padding:var(--q-navbar-mobile-padding, var(--q-navbar-edge-mobile-padding, 0 16px))}:host([edge='top'][mobile-mode='menu']) .desktop-nav,:host([edge='bottom'][mobile-mode='menu']) .desktop-nav{display:none;order:3;flex:1 0 100%;flex-direction:column;align-items:stretch;gap:6px}:host([edge='bottom'][mobile-mode='menu']) .desktop-nav{order:-1}:host([edge='top'][mobile-mode='menu']) .navbar.is-open .desktop-nav,:host([edge='bottom'][mobile-mode='menu']) .navbar.is-open .desktop-nav{display:flex}:host([edge='top'][mobile-mode='menu']) .desktop-nav .nav-item-shell,:host([edge='bottom'][mobile-mode='menu']) .desktop-nav .nav-item-shell,:host([edge='top'][mobile-mode='menu']) .desktop-nav .nav-item,:host([edge='bottom'][mobile-mode='menu']) .desktop-nav .nav-item{width:100%}:host([edge='top'][mobile-mode='menu']) .desktop-nav .nav-item,:host([edge='bottom'][mobile-mode='menu']) .desktop-nav .nav-item{justify-content:flex-start}:host([edge='top'][mobile-mode='menu']) .desktop-nav slot[name='nav'],:host([edge='bottom'][mobile-mode='menu']) .desktop-nav slot[name='nav']{display:none}:host([edge='top']) .menu-button,:host([edge='bottom']) .menu-button{display:inline-flex}:host([edge='top']) .mobile-panel,:host([edge='bottom']) .mobile-panel{display:none;padding:var(--q-navbar-mobile-panel-padding, 8px 16px 16px);background:var(--q-navbar-mobile-bg, var(--q-navbar-bg, var(--q-bg-surface-1, #1f2937)))}:host([edge='top']) .mobile-panel{border-top:var(--q-navbar-border, 1px solid var(--q-border-color, #374151))}:host([edge='bottom']) .navbar{display:flex;flex-direction:column-reverse}:host([edge='bottom']) .mobile-panel{border-bottom:var(--q-navbar-border, 1px solid var(--q-border-color, #374151))}:host([edge='top']) .navbar.is-open .mobile-panel.has-content,:host([edge='bottom']) .navbar.is-open .mobile-panel.has-content{display:block}.mobile-nav,.mobile-actions{display:flex;flex-direction:column;gap:6px}.mobile-actions{margin-top:12px}.mobile-nav .nav-item{justify-content:flex-start;width:100%}:host([edge='top'][mobile-mode='inline']) .desktop-nav,:host([edge='bottom'][mobile-mode='inline']) .desktop-nav{display:flex}:host([edge='top'][mobile-mode='inline']) .menu-button,:host([edge='top'][mobile-mode='inline']) .mobile-panel,:host([edge='bottom'][mobile-mode='inline']) .menu-button,:host([edge='bottom'][mobile-mode='inline']) .mobile-panel{display:none}}`;
|
|
19
|
+
|
|
20
|
+
let navbarIds = 0;
|
|
21
|
+
const QNavbar = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
registerInstance(this, hostRef);
|
|
24
|
+
this.qSelect = createEvent(this, "qSelect");
|
|
25
|
+
this.qMenuToggle = createEvent(this, "qMenuToggle");
|
|
26
|
+
}
|
|
27
|
+
get el() { return getElement(this); }
|
|
28
|
+
brand;
|
|
29
|
+
logoSrc;
|
|
30
|
+
/** Accessible text for a logo-only brand image. */
|
|
31
|
+
logoAlt = '';
|
|
32
|
+
brandHref = '/';
|
|
33
|
+
/** Navigation items; strings use the same text for label and value, while objects enable links, icons, and state. */
|
|
34
|
+
items = [];
|
|
35
|
+
/** Matches either an item's value or `href`. */
|
|
36
|
+
activeValue = '';
|
|
37
|
+
edge = 'top';
|
|
38
|
+
sticky = false;
|
|
39
|
+
compact = false;
|
|
40
|
+
transparent = false;
|
|
41
|
+
bordered = true;
|
|
42
|
+
/** Controls whether mobile widths collapse items into a menu or keep them inline. */
|
|
43
|
+
mobileMode = 'menu';
|
|
44
|
+
/** Accessible label for the mobile menu toggle button. */
|
|
45
|
+
mobileLabel = 'Menu';
|
|
46
|
+
/** Accessible name for the desktop and mobile navigation regions. */
|
|
47
|
+
ariaLabel = null;
|
|
48
|
+
qSelect;
|
|
49
|
+
qMenuToggle;
|
|
50
|
+
// ========================= [2] INTERNAL STATE & REFS =========================
|
|
51
|
+
menuOpen = false;
|
|
52
|
+
hasMobileContent = false;
|
|
53
|
+
instanceId = ++navbarIds;
|
|
54
|
+
primaryNavId = `q-navbar-primary-nav-${this.instanceId}`;
|
|
55
|
+
mobilePanelId = `q-navbar-mobile-panel-${this.instanceId}`;
|
|
56
|
+
dismissListenersActive = false;
|
|
57
|
+
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
this.removeMenuDismissListeners();
|
|
60
|
+
}
|
|
61
|
+
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
62
|
+
get parsedItems() {
|
|
63
|
+
return getNavbarItems(this.items);
|
|
64
|
+
}
|
|
65
|
+
handleMenuToggle = () => {
|
|
66
|
+
this.setMenuOpen(!this.menuOpen);
|
|
67
|
+
};
|
|
68
|
+
handleMenuClose = () => {
|
|
69
|
+
this.setMenuOpen(false);
|
|
70
|
+
};
|
|
71
|
+
setMenuOpen(open) {
|
|
72
|
+
if (this.menuOpen === open)
|
|
73
|
+
return;
|
|
74
|
+
this.menuOpen = open;
|
|
75
|
+
this.qMenuToggle.emit(open);
|
|
76
|
+
if (open) {
|
|
77
|
+
this.addMenuDismissListeners();
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.removeMenuDismissListeners();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
addMenuDismissListeners() {
|
|
84
|
+
if (this.dismissListenersActive || typeof document === 'undefined' || typeof window === 'undefined')
|
|
85
|
+
return;
|
|
86
|
+
document.addEventListener('keydown', this.handleDocumentKeyDown);
|
|
87
|
+
window.addEventListener('click', this.handleWindowClick);
|
|
88
|
+
this.dismissListenersActive = true;
|
|
89
|
+
}
|
|
90
|
+
removeMenuDismissListeners() {
|
|
91
|
+
if (!this.dismissListenersActive || typeof document === 'undefined' || typeof window === 'undefined')
|
|
92
|
+
return;
|
|
93
|
+
document.removeEventListener('keydown', this.handleDocumentKeyDown);
|
|
94
|
+
window.removeEventListener('click', this.handleWindowClick);
|
|
95
|
+
this.dismissListenersActive = false;
|
|
96
|
+
}
|
|
97
|
+
handleDocumentKeyDown = (ev) => {
|
|
98
|
+
if (ev.key === 'Escape') {
|
|
99
|
+
this.handleMenuClose();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
handleWindowClick = (ev) => {
|
|
103
|
+
const path = typeof ev.composedPath === 'function' ? ev.composedPath() : [];
|
|
104
|
+
if (path.includes(this.el))
|
|
105
|
+
return;
|
|
106
|
+
if (!path.length && ev.target instanceof Node && this.el.contains(ev.target))
|
|
107
|
+
return;
|
|
108
|
+
this.handleMenuClose();
|
|
109
|
+
};
|
|
110
|
+
handleItemClick = (item, ev) => {
|
|
111
|
+
if (item.disabled) {
|
|
112
|
+
ev.preventDefault();
|
|
113
|
+
ev.stopPropagation();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const value = item.value || item.href || item.label;
|
|
117
|
+
this.qSelect.emit({
|
|
118
|
+
value,
|
|
119
|
+
label: item.label,
|
|
120
|
+
item,
|
|
121
|
+
originalEvent: ev,
|
|
122
|
+
});
|
|
123
|
+
this.handleMenuClose();
|
|
124
|
+
};
|
|
125
|
+
handleMobileSlotChange = () => {
|
|
126
|
+
this.hasMobileContent = !!this.el.querySelector('[slot="mobile-nav"], [slot="mobile-actions"]');
|
|
127
|
+
};
|
|
128
|
+
setIconAttribute(el, name, value) {
|
|
129
|
+
if (value === undefined || value === null || value === '') {
|
|
130
|
+
el.removeAttribute(name);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const nextValue = String(value);
|
|
134
|
+
if (el.getAttribute(name) !== nextValue) {
|
|
135
|
+
el.setAttribute(name, nextValue);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
syncIconAttributes = (el, item) => {
|
|
139
|
+
if (!el || !item.icon)
|
|
140
|
+
return;
|
|
141
|
+
this.setIconAttribute(el, 'name', item.icon);
|
|
142
|
+
this.setIconAttribute(el, 'lib', item.iconLib || 'lucide');
|
|
143
|
+
this.setIconAttribute(el, 'size', item.iconSize || 'sm');
|
|
144
|
+
this.setIconAttribute(el, 'local-path', item.iconLocalPath);
|
|
145
|
+
};
|
|
146
|
+
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
147
|
+
renderBrand() {
|
|
148
|
+
const logoAlt = this.logoAlt || (this.brand ? '' : 'Brand');
|
|
149
|
+
const content = (h("span", { class: "brand-content" }, this.logoSrc && h("img", { class: "brand-logo", src: this.logoSrc, alt: logoAlt }), this.brand && h("span", { class: "brand-text" }, this.brand)));
|
|
150
|
+
return (h("a", { class: "brand-link", href: this.brandHref, part: "brand" }, h("slot", { name: "brand" }, content)));
|
|
151
|
+
}
|
|
152
|
+
renderNavItem({ item, key }) {
|
|
153
|
+
const active = item.active || (!!this.activeValue && (item.value === this.activeValue || item.href === this.activeValue));
|
|
154
|
+
const iconOnly = !!item.iconOnly && !!item.icon;
|
|
155
|
+
const accessibleLabel = iconOnly ? item.ariaLabel || item.label : undefined;
|
|
156
|
+
const addonPlacement = item.addonPlacement || 'top-end';
|
|
157
|
+
const classes = {
|
|
158
|
+
'nav-item': true,
|
|
159
|
+
'is-active': active,
|
|
160
|
+
'is-disabled': !!item.disabled,
|
|
161
|
+
'is-icon-only': iconOnly,
|
|
162
|
+
};
|
|
163
|
+
const content = [
|
|
164
|
+
item.icon && (h("q-icon", { class: "nav-item__icon", name: item.icon, lib: item.iconLib || 'lucide', localPath: item.iconLocalPath, size: item.iconSize || 'sm', ref: (el) => this.syncIconAttributes(el, item) })),
|
|
165
|
+
h("span", { class: "nav-item__label", "aria-hidden": iconOnly ? 'true' : undefined }, item.label),
|
|
166
|
+
];
|
|
167
|
+
const addon = item.addonSlot ? (h("span", { class: `nav-item__addon is-${addonPlacement}`, part: "item-addon" }, h("slot", { name: item.addonSlot }))) : null;
|
|
168
|
+
if (item.href) {
|
|
169
|
+
return (h("span", { key: key, class: { 'nav-item-shell': true, 'is-icon-only': iconOnly } }, h("a", { class: classes, href: item.disabled ? undefined : item.href, target: item.disabled ? undefined : item.target, rel: item.target === '_blank' ? 'noopener noreferrer' : undefined, "aria-current": active ? 'page' : undefined, "aria-disabled": item.disabled ? 'true' : 'false', "aria-label": accessibleLabel, onClick: (ev) => this.handleItemClick(item, ev) }, content), addon));
|
|
170
|
+
}
|
|
171
|
+
return (h("span", { key: key, class: { 'nav-item-shell': true, 'is-icon-only': iconOnly } }, h("button", { class: classes, type: "button", disabled: item.disabled, "aria-current": active ? 'page' : undefined, "aria-label": accessibleLabel, onClick: (ev) => this.handleItemClick(item, ev) }, content), addon));
|
|
172
|
+
}
|
|
173
|
+
renderNavItems(items) {
|
|
174
|
+
return items.map(item => this.renderNavItem(item));
|
|
175
|
+
}
|
|
176
|
+
render() {
|
|
177
|
+
const items = identifyItems(this.parsedItems, item => item.value, { warningContext: 'q-navbar.items' });
|
|
178
|
+
const hasItems = items.length > 0;
|
|
179
|
+
const ariaLabel = this.ariaLabel?.trim() || undefined;
|
|
180
|
+
return (h("div", { key: '77cc56653221231e5c95e254f3a0a171ea7b106f', class: {
|
|
181
|
+
'navbar': true,
|
|
182
|
+
'is-open': this.menuOpen,
|
|
183
|
+
'is-sticky': this.sticky,
|
|
184
|
+
'is-compact': this.compact,
|
|
185
|
+
'is-transparent': this.transparent,
|
|
186
|
+
'is-bordered': this.bordered,
|
|
187
|
+
}, part: "navbar" }, h("div", { key: '5b5a7ec4ba5a373fcb9c5bc669439e72ad7b2e23', class: "navbar-row" }, this.renderBrand(), h("nav", { key: '02f2947daccb81607cd4f054987dc3e435c95c1e', id: this.primaryNavId, class: "desktop-nav", "aria-label": ariaLabel || 'Primary navigation', part: "nav" }, hasItems && this.renderNavItems(items), h("slot", { key: '889f9dd19f8af50df8889887c9c6829639b71fd9', name: "nav" })), h("div", { key: 'ffc832b4c1cb89fc30706a5a62e7e357221ec1e9', class: "desktop-actions", part: "actions" }, h("slot", { key: '8ca4fa6172b1d0fbc101b2e9122c1be73ee3b020', name: "actions" })), h("button", { key: 'a739412839bee1c5cba098393597dc6cf23e07b2', class: "menu-button", type: "button", "aria-label": this.mobileLabel, "aria-expanded": this.menuOpen ? 'true' : 'false', "aria-controls": `${this.primaryNavId} ${this.mobilePanelId}`, "aria-haspopup": "true", onClick: this.handleMenuToggle, part: "menu-button" }, h("span", { key: '1007e6f53c2971d78651d306f146ee313eb0ecc3' }), h("span", { key: 'e6cba5db5e9ebf0c37225dab7d9bfc65ca3bf17a' }), h("span", { key: '146332c68f1f31b6b84c3ddaa433ac29ce1a03ec' }))), h("div", { key: '3d94112d9b8e89c2593c33c08f302bbcc53fe5de', id: this.mobilePanelId, class: { 'mobile-panel': true, 'has-content': this.hasMobileContent }, part: "mobile-panel" }, h("nav", { key: '4ebe894bbab5ef8503c0d23b04f8fb902c51c0d5', class: "mobile-nav", "aria-label": ariaLabel || 'Mobile navigation' }, h("slot", { key: 'dd4d2b0d0c90dd14d20ddca1e5fc0c2e6d3c9d5d', name: "mobile-nav", onSlotchange: this.handleMobileSlotChange })), h("div", { key: '6d94a67f38a16a6ed8fd41de1a34bcb6561696b6', class: "mobile-actions" }, h("slot", { key: 'f6c5d38103197044d57a951428df6fcbcef23c4e', name: "mobile-actions", onSlotchange: this.handleMobileSlotChange })))));
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
QNavbar.style = navbarCss();
|
|
191
|
+
|
|
192
|
+
export { QNavbar as q_navbar };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-DOk7gYkf.js';
|
|
2
|
+
|
|
3
|
+
const paginationCss = () => `:host{display:block;min-width:0;color:var(--q-pagination-fg, var(--q-fg-muted, #9ca3af));font-family:var(--q-font-family, inherit);font-size:var(--q-pagination-font-size, var(--q-font-size-sm, 0.8125rem));font-weight:var(--q-pagination-font-weight, 600)}.pagination{display:flex;flex:1 1 auto;align-items:center;justify-content:space-between;gap:var(--q-pagination-gap, 12px);box-sizing:border-box;width:100%;min-width:0}.summary{min-width:0}.controls{display:inline-flex;flex:0 0 auto;align-items:center;gap:var(--q-pagination-controls-gap, 8px)}.page-button{box-sizing:border-box;min-height:var(--q-pagination-button-height, 30px);padding:var(--q-pagination-button-padding, 5px 8px);color:var(--q-pagination-button-fg, var(--q-fg-base, #f9fafb));border:var(--q-pagination-button-border, 1px solid var(--q-border-color, #374151));border-radius:var(--q-pagination-button-radius, var(--q-radius-sm, 4px));background:var(--q-pagination-button-bg, transparent);font:inherit;cursor:pointer;transition:background-color 150ms ease, border-color 150ms ease, color 150ms ease}.page-button:hover:not(:disabled){color:var(--q-pagination-button-hover-fg, var(--q-color-primary, #60a5fa));border-color:var(--q-pagination-button-hover-border, var(--q-color-primary, #60a5fa));background:var( --q-pagination-button-hover-bg, color-mix(in srgb, var(--q-fg-base, #f9fafb) 8%, transparent) )}.page-button:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:2px}.page-button:disabled{opacity:0.45;cursor:not-allowed}.page-count{min-width:var(--q-pagination-page-count-width, 48px);text-align:center}@media (max-width: 480px){.pagination{align-items:flex-start;flex-direction:column}.controls{align-self:flex-end}}`;
|
|
4
|
+
|
|
5
|
+
const QPagination = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.qPageChange = createEvent(this, "qPageChange");
|
|
9
|
+
}
|
|
10
|
+
// ======== [1] STENCIL API (Props, Events, AttachInternals, Elements) =========
|
|
11
|
+
showSummary = true;
|
|
12
|
+
/** Noun used in the visible range summary, for example "users" or "templates". */
|
|
13
|
+
itemLabel = 'items';
|
|
14
|
+
/** One-based; out-of-range values are clamped for display and navigation. */
|
|
15
|
+
page = 1;
|
|
16
|
+
/** Non-positive or non-finite values fall back to 1. */
|
|
17
|
+
pageSize = 10;
|
|
18
|
+
/** Negative or non-finite values are treated as zero. */
|
|
19
|
+
totalItems = 0;
|
|
20
|
+
disabled = false;
|
|
21
|
+
/** Accessible name for the pagination navigation landmark. */
|
|
22
|
+
ariaLabel = 'Pagination';
|
|
23
|
+
/** Emitted with a requested one-based page. The component does not mutate `page`. */
|
|
24
|
+
qPageChange;
|
|
25
|
+
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
26
|
+
get normalizedPageSize() {
|
|
27
|
+
return positiveInteger(this.pageSize, 1);
|
|
28
|
+
}
|
|
29
|
+
get normalizedTotalItems() {
|
|
30
|
+
return nonNegativeInteger(this.totalItems);
|
|
31
|
+
}
|
|
32
|
+
get pageCount() {
|
|
33
|
+
return Math.max(1, Math.ceil(this.normalizedTotalItems / this.normalizedPageSize));
|
|
34
|
+
}
|
|
35
|
+
get currentPage() {
|
|
36
|
+
return Math.min(positiveInteger(this.page, 1), this.pageCount);
|
|
37
|
+
}
|
|
38
|
+
requestPage(page) {
|
|
39
|
+
const requestedPage = Math.min(Math.max(page, 1), this.pageCount);
|
|
40
|
+
if (!this.disabled && requestedPage !== this.currentPage) {
|
|
41
|
+
this.qPageChange.emit(requestedPage);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
45
|
+
render() {
|
|
46
|
+
const page = this.currentPage;
|
|
47
|
+
const pageCount = this.pageCount;
|
|
48
|
+
const totalItems = this.normalizedTotalItems;
|
|
49
|
+
const pageSize = this.normalizedPageSize;
|
|
50
|
+
const pageStart = totalItems === 0 ? 0 : (page - 1) * pageSize + 1;
|
|
51
|
+
const pageEnd = Math.min(page * pageSize, totalItems);
|
|
52
|
+
const itemLabel = this.itemLabel.trim() || 'items';
|
|
53
|
+
const previousDisabled = this.disabled || totalItems === 0 || page <= 1;
|
|
54
|
+
const nextDisabled = this.disabled || totalItems === 0 || page >= pageCount;
|
|
55
|
+
return (h("nav", { key: 'd1c972c7bf6048f10de2764bc61e8350f0d4fede', class: "pagination", part: "container", "aria-label": this.ariaLabel?.trim() || 'Pagination' }, this.showSummary && (h("span", { key: '829198f5d22ebc6d365dcf3ba980eae29714a110', class: "summary", part: "summary", "aria-live": "polite" }, "Showing ", pageStart, "-", pageEnd, " of ", totalItems, " ", itemLabel)), h("div", { key: '0ef1c550c5d6f246fb874a040c008e6fda296ffb', class: "controls", part: "controls" }, h("button", { key: '2313c4f44307bd6caac9f88c5ecde28204a07e27', class: "page-button", part: "previous-button", type: "button", disabled: previousDisabled, "aria-label": "Previous page", onClick: () => this.requestPage(page - 1) }, "Previous"), h("span", { key: '87fcfd14ee3baf2dc275687d9676b905abb06a61', class: "page-count", part: "page-count", "aria-label": `Page ${page} of ${pageCount}` }, page, " / ", pageCount), h("button", { key: '2bcbda566df84901c0ec68ff829ea214fb882001', class: "page-button", part: "next-button", type: "button", disabled: nextDisabled, "aria-label": "Next page", onClick: () => this.requestPage(page + 1) }, "Next"))));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function positiveInteger(value, fallback) {
|
|
59
|
+
return Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback;
|
|
60
|
+
}
|
|
61
|
+
function nonNegativeInteger(value) {
|
|
62
|
+
return Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;
|
|
63
|
+
}
|
|
64
|
+
QPagination.style = paginationCss();
|
|
65
|
+
|
|
66
|
+
export { QPagination as q_pagination };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { r as registerInstance, a as getElement, h } from './index-DOk7gYkf.js';
|
|
2
|
+
import { g as getSlottedElements } from './dom-ByfrUWx1.js';
|
|
3
|
+
|
|
4
|
+
const panelCss = () => `:host{display:block;min-width:0;min-height:0;box-sizing:border-box}:host([full-height]){height:100%}.panel{display:flex;flex-direction:column;min-width:0;min-height:0;width:100%;height:auto;box-sizing:border-box;overflow:hidden;color:var(--q-panel-fg, var(--q-fg-base, #f9fafb));font-family:var(--q-font-family, inherit)}.panel.is-full-height{height:100%}.variant-plain{background:transparent;border:0}.variant-surface{background:var(--q-panel-bg, var(--q-bg-surface-1, #1f2937))}.variant-bordered{background:var(--q-panel-bg, var(--q-bg-surface-1, #1f2937));border:var(--q-panel-border, var(--q-border, 1px solid var(--q-border-color, #374151)));border-radius:var(--q-panel-radius, var(--q-radius-md, 7px))}.panel.has-no-borders{border:0}.panel-header,.panel-footer{flex:0 0 auto;display:block;padding:var(--q-panel-header-padding, var(--q-padding-lg, 16px));background:var(--q-panel-header-bg, transparent);z-index:1}.panel-header{border-bottom:var(--q-panel-divider, 1px solid transparent)}.panel-footer{border-top:var(--q-panel-divider, 1px solid transparent)}.uses-sticky-scroll{overflow:auto}.uses-sticky-scroll .panel-body{overflow:visible}.uses-sticky-scroll.has-sticky-header .panel-header{position:sticky;top:0}.uses-sticky-scroll.has-sticky-footer .panel-footer{position:sticky;bottom:0}.panel-header.is-hidden,.panel-footer.is-hidden{display:none}.panel-body{flex:1 1 auto;min-width:0;min-height:0;box-sizing:border-box}.is-scrollable .panel-body{overflow:auto}.padding-none .panel-body{padding:0}.padding-sm .panel-body{padding:var(--q-panel-padding-sm, var(--q-padding-sm, 4px))}.padding-md .panel-body{padding:var(--q-panel-padding-md, var(--q-padding-md, 9px))}.padding-lg .panel-body{padding:var(--q-panel-padding-lg, var(--q-padding-lg, 16px))}`;
|
|
5
|
+
|
|
6
|
+
const QPanel = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
get el() { return getElement(this); }
|
|
11
|
+
variant = 'bordered';
|
|
12
|
+
/** Removes the panel border while preserving the selected variant's other styling. */
|
|
13
|
+
noBorders = false;
|
|
14
|
+
padding = 'md';
|
|
15
|
+
fullHeight = false;
|
|
16
|
+
scrollable = false;
|
|
17
|
+
/** Keeps the header pinned when the panel itself is the scroll container. */
|
|
18
|
+
stickyHeader = false;
|
|
19
|
+
/** Keeps the footer pinned when the panel itself is the scroll container. */
|
|
20
|
+
stickyFooter = false;
|
|
21
|
+
/** Accessible label for the panel container and scrollable body region. */
|
|
22
|
+
ariaLabel = null;
|
|
23
|
+
// ========================= [2] INTERNAL STATE & REFS =========================
|
|
24
|
+
hasHeader = false;
|
|
25
|
+
hasFooter = false;
|
|
26
|
+
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
27
|
+
componentDidLoad() {
|
|
28
|
+
this.handleSlotChange();
|
|
29
|
+
}
|
|
30
|
+
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
31
|
+
handleSlotChange = () => {
|
|
32
|
+
const header = this.el.shadowRoot?.querySelector('.panel-header');
|
|
33
|
+
const footer = this.el.shadowRoot?.querySelector('.panel-footer');
|
|
34
|
+
this.hasHeader = header ? getSlottedElements(header).length > 0 : false;
|
|
35
|
+
this.hasFooter = footer ? getSlottedElements(footer).length > 0 : false;
|
|
36
|
+
};
|
|
37
|
+
get scrollRegionLabel() {
|
|
38
|
+
if (!this.scrollable)
|
|
39
|
+
return undefined;
|
|
40
|
+
return this.ariaLabel ? `${this.ariaLabel} content` : 'Panel content';
|
|
41
|
+
}
|
|
42
|
+
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
43
|
+
render() {
|
|
44
|
+
return (h("section", { key: 'a59a7f97d1f36a536d4de1b46294ba8e4ba3dc4a', class: {
|
|
45
|
+
'panel': true,
|
|
46
|
+
[`variant-${this.variant}`]: true,
|
|
47
|
+
'has-no-borders': this.noBorders,
|
|
48
|
+
[`padding-${this.padding}`]: true,
|
|
49
|
+
'is-scrollable': this.scrollable,
|
|
50
|
+
'is-full-height': this.fullHeight,
|
|
51
|
+
'has-sticky-header': this.stickyHeader,
|
|
52
|
+
'has-sticky-footer': this.stickyFooter,
|
|
53
|
+
'uses-sticky-scroll': this.scrollable && (this.stickyHeader || this.stickyFooter),
|
|
54
|
+
}, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '0223ff913d2c0822b7a3b4946c5850af1ba96c94', class: {
|
|
55
|
+
'panel-header': true,
|
|
56
|
+
'is-hidden': !this.hasHeader,
|
|
57
|
+
}, part: "header" }, h("slot", { key: 'dd12673ef5a82cce5eae03cf425b404a43625d2e', name: "header", onSlotchange: this.handleSlotChange })), h("div", { key: '0d318be486ef22b43e5e03319f9adc71c82c4782', class: "panel-body", part: "body", tabindex: this.scrollable ? 0 : undefined, role: this.scrollable ? 'region' : undefined, "aria-label": this.scrollRegionLabel }, h("slot", { key: 'b64941e7f6c507370f6b595bbc0a178c5f2d14af' })), h("div", { key: 'd7d7fd0145eb99bd140afb12165d49a3c0a01cac', class: {
|
|
58
|
+
'panel-footer': true,
|
|
59
|
+
'is-hidden': !this.hasFooter,
|
|
60
|
+
}, part: "footer" }, h("slot", { key: '2f343fe8f12d3ff1ad0980b77d9fd300795d95c5', name: "footer", onSlotchange: this.handleSlotChange }))));
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
QPanel.style = panelCss();
|
|
64
|
+
|
|
65
|
+
export { QPanel as q_panel };
|
|
@@ -1,6 +1,71 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-DOk7gYkf.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
function hasQuantityBound(value) {
|
|
4
|
+
return value !== undefined && value !== null;
|
|
5
|
+
}
|
|
6
|
+
function toFiniteQuantity(value, fallback = 0) {
|
|
7
|
+
return Number.isFinite(value) ? value : fallback;
|
|
8
|
+
}
|
|
9
|
+
function clampQuantityValue(value, bounds) {
|
|
10
|
+
let clamped = value;
|
|
11
|
+
if (hasQuantityBound(bounds.min)) {
|
|
12
|
+
clamped = Math.max(bounds.min, clamped);
|
|
13
|
+
}
|
|
14
|
+
if (hasQuantityBound(bounds.max)) {
|
|
15
|
+
clamped = Math.min(bounds.max, clamped);
|
|
16
|
+
}
|
|
17
|
+
return clamped;
|
|
18
|
+
}
|
|
19
|
+
function stepQuantityValue(value, step, direction, bounds) {
|
|
20
|
+
const current = toFiniteQuantity(value);
|
|
21
|
+
return clampQuantityValue(current + step * direction, bounds);
|
|
22
|
+
}
|
|
23
|
+
function sanitizeQuantityInput(rawValue) {
|
|
24
|
+
let value = rawValue.replace(/[^0-9.-]/g, '');
|
|
25
|
+
if (value.startsWith('-')) {
|
|
26
|
+
value = '-' + value.slice(1).replace(/-/g, '');
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
value = value.replace(/-/g, '');
|
|
30
|
+
}
|
|
31
|
+
const parts = value.split('.');
|
|
32
|
+
if (parts.length > 2) {
|
|
33
|
+
value = parts[0] + '.' + parts.slice(1).join('');
|
|
34
|
+
}
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
function parseQuantityInput(value) {
|
|
38
|
+
const parsed = parseFloat(value);
|
|
39
|
+
return Number.isNaN(parsed) ? undefined : parsed;
|
|
40
|
+
}
|
|
41
|
+
function isWithinQuantityBounds(value, bounds) {
|
|
42
|
+
const isAboveMin = !hasQuantityBound(bounds.min) || value >= bounds.min;
|
|
43
|
+
const isBelowMax = !hasQuantityBound(bounds.max) || value <= bounds.max;
|
|
44
|
+
return isAboveMin && isBelowMax;
|
|
45
|
+
}
|
|
46
|
+
function reconcileQuantityInput(value, bounds) {
|
|
47
|
+
let parsed = parseQuantityInput(value);
|
|
48
|
+
if (parsed === undefined) {
|
|
49
|
+
if (hasQuantityBound(bounds.min)) {
|
|
50
|
+
parsed = bounds.min;
|
|
51
|
+
}
|
|
52
|
+
else if (hasQuantityBound(bounds.max)) {
|
|
53
|
+
parsed = Math.min(0, bounds.max);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
parsed = 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return clampQuantityValue(parsed, bounds);
|
|
60
|
+
}
|
|
61
|
+
function getQuantityInputCharCount(value, bounds) {
|
|
62
|
+
if (hasQuantityBound(bounds.min) || hasQuantityBound(bounds.max)) {
|
|
63
|
+
return Math.max(3, bounds.min?.toString().length ?? 0, bounds.max?.toString().length ?? 0);
|
|
64
|
+
}
|
|
65
|
+
return Math.max(3, value?.toString().length ?? 0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const quantitySelectorCss = () => `:host{--q-quantity-selector-height:38px;--q-quantity-selector-width-vertical:50px;--q-quantity-selector-bg:var(--q-bg-surface-2, #374151);--q-quantity-selector-border-color:var(--q-border-color, #4b5563);--q-quantity-selector-radius:var(--q-radius-md, 8px);--q-quantity-selector-input-bg:var(--q-bg-base, #111827);--q-quantity-selector-input-fg:var(--q-fg-base, #f9fafb);--q-quantity-selector-btn-bg:transparent;--q-quantity-selector-btn-bg-hover:var(--q-bg-surface-3, #4b5563);--q-quantity-selector-btn-fg:var(--q-fg-muted, #9ca3af);--q-quantity-selector-btn-fg-hover:var(--q-fg-base, #f9fafb);--q-quantity-selector-char-width:1ch;--q-quantity-selector-input-padding:16px;display:inline-block;box-sizing:border-box}.quantity-selector{display:inline-flex;border:1px solid var(--q-quantity-selector-border-color);border-radius:var(--q-quantity-selector-radius);background:var(--q-quantity-selector-bg);box-sizing:border-box;overflow:hidden}.quantity-selector.variant-horizontal{flex-direction:row;align-items:center;height:var(--q-quantity-selector-height)}.quantity-selector.variant-vertical{flex-direction:column;align-items:center;width:var(--q-quantity-selector-width-vertical)}.quantity-input{border:none;background:var(--q-quantity-selector-input-bg);color:var(--q-quantity-selector-input-fg);text-align:center;font-family:var(--q-font-family, inherit);font-size:var(--q-font-size-base, 0.9rem);margin:0;box-sizing:border-box;outline:none}.variant-horizontal .quantity-input{height:100%}.variant-vertical .quantity-input{width:100%;padding:var(--q-padding-sm, 4px) 0}.quantity-btn{display:flex;align-items:center;justify-content:center;border:none;background:var(--q-quantity-selector-btn-bg);color:var(--q-quantity-selector-btn-fg);cursor:pointer;padding:0;margin:0;box-sizing:border-box;transition:background-color var(--q-transition-fast, 150ms ease), color var(--q-transition-fast, 150ms ease)}.quantity-btn:hover:not(:disabled){background:var(--q-quantity-selector-btn-bg-hover);color:var(--q-quantity-selector-btn-fg-hover)}.quantity-btn:disabled{opacity:0.4;cursor:not-allowed}.variant-horizontal .quantity-btn{width:var(--q-quantity-selector-height);height:100%}.variant-horizontal .quantity-btn-decrement{border-right:1px solid var(--q-quantity-selector-border-color)}.variant-horizontal .quantity-btn-increment{border-left:1px solid var(--q-quantity-selector-border-color)}.variant-vertical .quantity-btn{width:100%;height:var(--q-quantity-selector-height)}.variant-vertical .quantity-btn-increment{border-bottom:1px solid var(--q-quantity-selector-border-color)}.variant-vertical .quantity-btn-decrement{border-top:1px solid var(--q-quantity-selector-border-color)}.btn-icon{width:16px;height:16px}`;
|
|
4
69
|
|
|
5
70
|
const QQuantitySelector = class {
|
|
6
71
|
constructor(hostRef) {
|
|
@@ -11,106 +76,54 @@ const QQuantitySelector = class {
|
|
|
11
76
|
this.qClick = createEvent(this, "qClick");
|
|
12
77
|
}
|
|
13
78
|
// ======== [1] STENCIL API (Props, Events, AttachInternals, Elements) =========
|
|
14
|
-
/** The current quantity value. */
|
|
15
79
|
value = 0;
|
|
16
|
-
/** The increment/decrement step amount. */
|
|
17
|
-
step = 1;
|
|
18
|
-
/** Minimum allowed value limit (optional). */
|
|
19
80
|
min;
|
|
20
|
-
/** Maximum allowed value limit (optional). */
|
|
21
81
|
max;
|
|
22
|
-
|
|
82
|
+
step = 1;
|
|
23
83
|
variant = 'horizontal';
|
|
24
|
-
/** Emitted when the quantity value changes. */
|
|
25
84
|
qChange;
|
|
26
85
|
qFocus;
|
|
86
|
+
/** Emitted when the input loses focus, after the value is reconciled. */
|
|
27
87
|
qBlur;
|
|
28
88
|
qClick;
|
|
89
|
+
// ========================= [2] INTERNAL STATE & REFS =========================
|
|
29
90
|
inputValue = '0';
|
|
91
|
+
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
30
92
|
watchValue(newValue) {
|
|
31
93
|
if (newValue !== parseFloat(this.inputValue)) {
|
|
32
|
-
this.inputValue = newValue
|
|
94
|
+
this.inputValue = Number.isFinite(newValue) ? String(newValue) : '0';
|
|
33
95
|
}
|
|
34
96
|
}
|
|
35
|
-
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
36
97
|
componentWillLoad() {
|
|
37
|
-
this.inputValue =
|
|
98
|
+
this.inputValue = Number.isFinite(this.value) ? String(this.value) : '0';
|
|
38
99
|
}
|
|
39
100
|
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
40
101
|
getCalculatedWidth() {
|
|
41
|
-
const
|
|
42
|
-
const maxSet = this.max !== undefined && this.max !== null;
|
|
43
|
-
let charCount = 3;
|
|
44
|
-
if (minSet || maxSet) {
|
|
45
|
-
const lengths = [3];
|
|
46
|
-
if (minSet) {
|
|
47
|
-
lengths.push(this.min.toString().length);
|
|
48
|
-
}
|
|
49
|
-
if (maxSet) {
|
|
50
|
-
lengths.push(this.max.toString().length);
|
|
51
|
-
}
|
|
52
|
-
charCount = Math.max(...lengths);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
const currentLength = (this.value !== undefined && this.value !== null) ? this.value.toString().length : 0;
|
|
56
|
-
charCount = Math.max(3, currentLength);
|
|
57
|
-
}
|
|
102
|
+
const charCount = getQuantityInputCharCount(this.value, { min: this.min, max: this.max });
|
|
58
103
|
return `calc(${charCount} * var(--q-quantity-selector-char-width, 1ch) + var(--q-quantity-selector-input-padding, 16px))`;
|
|
59
104
|
}
|
|
60
105
|
increment = () => {
|
|
61
|
-
const
|
|
62
|
-
let next = current + this.step;
|
|
63
|
-
if (this.max !== undefined && this.max !== null) {
|
|
64
|
-
next = Math.min(this.max, next);
|
|
65
|
-
}
|
|
66
|
-
if (this.min !== undefined && this.min !== null) {
|
|
67
|
-
next = Math.max(this.min, next);
|
|
68
|
-
}
|
|
106
|
+
const next = stepQuantityValue(this.value, this.step, 1, { min: this.min, max: this.max });
|
|
69
107
|
this.value = next;
|
|
70
108
|
this.inputValue = String(next);
|
|
71
109
|
this.qChange.emit(this.value);
|
|
72
110
|
};
|
|
73
111
|
decrement = () => {
|
|
74
|
-
const
|
|
75
|
-
let next = current - this.step;
|
|
76
|
-
if (this.min !== undefined && this.min !== null) {
|
|
77
|
-
next = Math.max(this.min, next);
|
|
78
|
-
}
|
|
79
|
-
if (this.max !== undefined && this.max !== null) {
|
|
80
|
-
next = Math.min(this.max, next);
|
|
81
|
-
}
|
|
112
|
+
const next = stepQuantityValue(this.value, this.step, -1, { min: this.min, max: this.max });
|
|
82
113
|
this.value = next;
|
|
83
114
|
this.inputValue = String(next);
|
|
84
115
|
this.qChange.emit(this.value);
|
|
85
116
|
};
|
|
86
117
|
handleInput = (ev) => {
|
|
87
118
|
const target = ev.target;
|
|
88
|
-
|
|
89
|
-
// Sanitize input to only allow numbers, minus sign, and decimal point
|
|
90
|
-
val = val.replace(/[^0-9.-]/g, '');
|
|
91
|
-
// Handle minus sign position
|
|
92
|
-
if (val.startsWith('-')) {
|
|
93
|
-
val = '-' + val.slice(1).replace(/-/g, '');
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
val = val.replace(/-/g, '');
|
|
97
|
-
}
|
|
98
|
-
// Handle decimal points
|
|
99
|
-
const parts = val.split('.');
|
|
100
|
-
if (parts.length > 2) {
|
|
101
|
-
val = parts[0] + '.' + parts.slice(1).join('');
|
|
102
|
-
}
|
|
119
|
+
const val = sanitizeQuantityInput(target.value);
|
|
103
120
|
target.value = val;
|
|
104
121
|
this.inputValue = val;
|
|
105
|
-
const parsed =
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (this.value !== parsed) {
|
|
111
|
-
this.value = parsed;
|
|
112
|
-
this.qChange.emit(this.value);
|
|
113
|
-
}
|
|
122
|
+
const parsed = parseQuantityInput(val);
|
|
123
|
+
if (parsed !== undefined && isWithinQuantityBounds(parsed, { min: this.min, max: this.max })) {
|
|
124
|
+
if (this.value !== parsed) {
|
|
125
|
+
this.value = parsed;
|
|
126
|
+
this.qChange.emit(this.value);
|
|
114
127
|
}
|
|
115
128
|
}
|
|
116
129
|
};
|
|
@@ -127,26 +140,30 @@ const QQuantitySelector = class {
|
|
|
127
140
|
handleChange = () => {
|
|
128
141
|
this.reconcileValue();
|
|
129
142
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
parsed = this.min;
|
|
135
|
-
}
|
|
136
|
-
else if (this.max !== undefined && this.max !== null) {
|
|
137
|
-
parsed = Math.min(0, this.max);
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
parsed = 0;
|
|
141
|
-
}
|
|
143
|
+
handleKeyDown = (ev) => {
|
|
144
|
+
if (ev.key === 'ArrowUp') {
|
|
145
|
+
ev.preventDefault();
|
|
146
|
+
this.increment();
|
|
142
147
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
else if (ev.key === 'ArrowDown') {
|
|
149
|
+
ev.preventDefault();
|
|
150
|
+
this.decrement();
|
|
146
151
|
}
|
|
147
|
-
if (
|
|
148
|
-
|
|
152
|
+
else if (ev.key === 'Home' && hasQuantityBound(this.min)) {
|
|
153
|
+
ev.preventDefault();
|
|
154
|
+
this.value = clampQuantityValue(this.min, { min: this.min, max: this.max });
|
|
155
|
+
this.inputValue = String(this.value);
|
|
156
|
+
this.qChange.emit(this.value);
|
|
149
157
|
}
|
|
158
|
+
else if (ev.key === 'End' && hasQuantityBound(this.max)) {
|
|
159
|
+
ev.preventDefault();
|
|
160
|
+
this.value = clampQuantityValue(this.max, { min: this.min, max: this.max });
|
|
161
|
+
this.inputValue = String(this.value);
|
|
162
|
+
this.qChange.emit(this.value);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
reconcileValue() {
|
|
166
|
+
const clamped = reconcileQuantityInput(this.inputValue, { min: this.min, max: this.max });
|
|
150
167
|
this.inputValue = String(clamped);
|
|
151
168
|
if (this.value !== clamped) {
|
|
152
169
|
this.value = clamped;
|
|
@@ -155,15 +172,17 @@ const QQuantitySelector = class {
|
|
|
155
172
|
}
|
|
156
173
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
157
174
|
render() {
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
const
|
|
175
|
+
const finiteValue = toFiniteQuantity(this.value);
|
|
176
|
+
const hasFiniteValue = Number.isFinite(this.value);
|
|
177
|
+
const isMinDisabled = hasFiniteValue && hasQuantityBound(this.min) && finiteValue <= this.min;
|
|
178
|
+
const isMaxDisabled = hasFiniteValue && hasQuantityBound(this.max) && finiteValue >= this.max;
|
|
179
|
+
const decBtn = (h("button", { key: 'a4871c4c925608d1681246b4b63f7585d3321758', type: "button", class: "quantity-btn quantity-btn-decrement", onClick: this.decrement, disabled: isMinDisabled, "aria-label": "Decrement quantity" }, h("svg", { key: 'f82b97c781dc1d756fc939ae45a9c0805267bd18', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "btn-icon", "aria-hidden": "true" }, h("line", { key: '170ff6bd9592687baa4c561615f540ad1c7400e4', x1: "5", y1: "12", x2: "19", y2: "12" }))));
|
|
180
|
+
const incBtn = (h("button", { key: '4d2d5b6833de797e8e0a157b85901999fb066b11', type: "button", class: "quantity-btn quantity-btn-increment", onClick: this.increment, disabled: isMaxDisabled, "aria-label": "Increment quantity" }, h("svg", { key: '716c5dbff6b6b774b1df0430837b438efc6e26fa', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "btn-icon", "aria-hidden": "true" }, h("line", { key: '8ffa844072e376651bd583a7cd1bf1030a57825f', x1: "12", y1: "5", x2: "12", y2: "19" }), h("line", { key: 'd3cd8317a8fca18d718abbc87588abece06fd38a', x1: "5", y1: "12", x2: "19", y2: "12" }))));
|
|
162
181
|
const calculatedWidth = this.variant === 'horizontal' ? this.getCalculatedWidth() : '100%';
|
|
163
|
-
return (h("div", { key: '
|
|
182
|
+
return (h("div", { key: '8ef065bc31eda45bd9c7b347387d51bb85d70860', class: {
|
|
164
183
|
'quantity-selector': true,
|
|
165
|
-
[`variant-${this.variant}`]: true
|
|
166
|
-
}, onClick: this.handleClick }, this.variant === 'vertical' ? incBtn : decBtn, h("input", { key: '
|
|
184
|
+
[`variant-${this.variant}`]: true,
|
|
185
|
+
}, onClick: this.handleClick }, this.variant === 'vertical' ? incBtn : decBtn, h("input", { key: 'cdaa539f5694171230e184d073eaf8af6d0a891b', type: "text", class: "quantity-input", value: this.inputValue, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange, onKeyDown: this.handleKeyDown, role: "spinbutton", "aria-valuenow": hasFiniteValue ? String(this.value) : undefined, "aria-valuemin": hasQuantityBound(this.min) ? String(this.min) : undefined, "aria-valuemax": hasQuantityBound(this.max) ? String(this.max) : undefined, "aria-label": "Quantity", style: { width: calculatedWidth }, part: "input" }), this.variant === 'vertical' ? decBtn : incBtn));
|
|
167
186
|
}
|
|
168
187
|
static get watchers() { return {
|
|
169
188
|
"value": [{
|