@webquark/core 1.1.0-dev.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -138
- package/dist/browser/components/index.d.ts +1 -0
- package/dist/browser/components/index.js +1 -0
- package/dist/browser/components/q-accordion.d.ts +1 -0
- package/dist/browser/components/q-accordion.js +1 -0
- package/dist/browser/components/q-alert.d.ts +1 -0
- package/dist/browser/components/q-alert.js +1 -0
- package/dist/browser/components/q-avatar.d.ts +1 -0
- package/dist/browser/components/q-avatar.js +1 -0
- package/dist/browser/components/q-banner.d.ts +1 -0
- package/dist/browser/components/q-banner.js +1 -0
- package/dist/browser/components/q-button.d.ts +1 -0
- package/dist/browser/components/q-button.js +1 -0
- package/dist/browser/components/q-card.d.ts +1 -0
- package/dist/browser/components/q-card.js +1 -0
- package/dist/browser/components/q-carousel.d.ts +1 -0
- package/dist/browser/components/q-carousel.js +1 -0
- package/dist/browser/components/q-chip.d.ts +1 -0
- package/dist/browser/components/q-chip.js +1 -0
- package/dist/browser/components/q-control-group.d.ts +1 -0
- package/dist/browser/components/q-control-group.js +1 -0
- package/dist/browser/components/q-conversation-bubble.d.ts +1 -0
- package/dist/browser/components/q-conversation-bubble.js +1 -0
- package/dist/browser/components/q-data-table.d.ts +1 -0
- package/dist/browser/components/q-data-table.js +1 -0
- package/dist/browser/components/q-dialog.d.ts +1 -0
- package/dist/browser/components/q-dialog.js +1 -0
- package/dist/browser/components/q-divider.d.ts +1 -0
- package/dist/browser/components/q-divider.js +1 -0
- package/dist/browser/components/q-dropdown.d.ts +1 -0
- package/dist/browser/components/q-dropdown.js +1 -0
- package/dist/browser/components/q-form.d.ts +1 -0
- package/dist/browser/components/q-form.js +1 -0
- package/dist/browser/components/q-grid.d.ts +1 -0
- package/dist/browser/components/q-grid.js +1 -0
- package/dist/browser/components/q-icon.d.ts +1 -0
- package/dist/browser/components/q-icon.js +1 -0
- package/dist/browser/components/q-image-comparison.d.ts +1 -0
- package/dist/browser/components/q-image-comparison.js +1 -0
- package/dist/browser/components/q-inline.d.ts +1 -0
- package/dist/browser/components/q-inline.js +1 -0
- package/dist/browser/components/q-input.d.ts +1 -0
- package/dist/browser/components/q-input.js +1 -0
- package/dist/browser/components/q-link.d.ts +1 -0
- package/dist/browser/components/q-link.js +1 -0
- package/dist/browser/components/q-map.d.ts +1 -0
- package/dist/browser/components/q-map.js +1 -0
- package/dist/browser/components/q-media.d.ts +1 -0
- package/dist/browser/components/q-media.js +1 -0
- package/dist/browser/components/q-navbar.d.ts +1 -0
- package/dist/browser/components/q-navbar.js +1 -0
- package/dist/browser/components/q-pagination.d.ts +1 -0
- package/dist/browser/components/q-pagination.js +1 -0
- package/dist/browser/components/q-panel.d.ts +1 -0
- package/dist/browser/components/q-panel.js +1 -0
- package/dist/browser/components/q-progress.d.ts +1 -0
- package/dist/browser/components/q-progress.js +1 -0
- package/dist/browser/components/q-quantity-selector.d.ts +1 -0
- package/dist/browser/components/q-quantity-selector.js +1 -0
- package/dist/browser/components/q-radio-group.d.ts +1 -0
- package/dist/browser/components/q-radio-group.js +1 -0
- package/dist/browser/components/q-reel.d.ts +1 -0
- package/dist/browser/components/q-reel.js +1 -0
- package/dist/browser/components/q-scrollable.d.ts +1 -0
- package/dist/browser/components/q-scrollable.js +1 -0
- package/dist/browser/components/q-section.d.ts +1 -0
- package/dist/browser/components/q-section.js +1 -0
- package/dist/browser/components/q-sidepanel.d.ts +1 -0
- package/dist/browser/components/q-sidepanel.js +1 -0
- package/dist/browser/components/q-slider.d.ts +1 -0
- package/dist/browser/components/q-slider.js +1 -0
- package/dist/browser/components/q-stack.d.ts +1 -0
- package/dist/browser/components/q-stack.js +1 -0
- package/dist/browser/components/q-step-diagram-item.d.ts +1 -0
- package/dist/browser/components/q-step-diagram-item.js +1 -0
- package/dist/browser/components/q-step-diagram.d.ts +1 -0
- package/dist/browser/components/q-step-diagram.js +1 -0
- package/dist/browser/components/q-syntax-box.d.ts +1 -0
- package/dist/browser/components/q-syntax-box.js +1 -0
- package/dist/browser/components/q-tabs.d.ts +1 -0
- package/dist/browser/components/q-tabs.js +1 -0
- package/dist/browser/components/q-textarea.d.ts +1 -0
- package/dist/browser/components/q-textarea.js +1 -0
- package/dist/browser/components/q-thumbnail.d.ts +1 -0
- package/dist/browser/components/q-thumbnail.js +1 -0
- package/dist/browser/components/q-toast.d.ts +1 -0
- package/dist/browser/components/q-toast.js +1 -0
- package/dist/browser/components/q-toggle.d.ts +1 -0
- package/dist/browser/components/q-toggle.js +1 -0
- package/dist/browser/components/q-toolbar.d.ts +1 -0
- package/dist/browser/components/q-toolbar.js +1 -0
- package/dist/browser/components/q-tooltip.d.ts +1 -0
- package/dist/browser/components/q-tooltip.js +1 -0
- package/dist/browser/index.cjs +1 -0
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/loader/index.cjs +1 -0
- package/dist/browser/loader/index.d.ts +1 -0
- package/dist/browser/loader/index.js +1 -0
- package/dist/browser/webquark.css +1 -0
- package/dist/playground/build/index.esm.js +1 -1
- package/dist/playground/build/p-0182e114.entry.js +1 -0
- package/dist/playground/build/{p-f98f9439.entry.js → p-048103e0.entry.js} +1 -1
- package/dist/playground/build/{p-fe8c634a.entry.js → p-0a2c52de.entry.js} +1 -1
- package/dist/playground/build/p-0baf478a.entry.js +1 -0
- package/dist/playground/build/{p-9e78b796.entry.js → p-15bad9ef.entry.js} +1 -1
- package/dist/playground/build/p-17b9713f.entry.js +1 -0
- package/dist/playground/build/{p-fec6fe0a.entry.js → p-222405b8.entry.js} +1 -1
- package/dist/playground/build/p-2eaa3a9f.entry.js +1 -0
- package/dist/{webquark/p-90b0858c.entry.js → playground/build/p-3daafc56.entry.js} +1 -1
- package/dist/playground/build/{p-09cca7b9.entry.js → p-44bbe12f.entry.js} +1 -1
- package/dist/playground/build/{p-1d1f7bc3.entry.js → p-4609c362.entry.js} +1 -1
- package/dist/{webquark/p-023f8437.entry.js → playground/build/p-5b584d3c.entry.js} +1 -1
- package/dist/playground/build/p-65fe9cac.entry.js +1 -0
- package/dist/playground/build/p-846dc838.entry.js +1 -0
- package/dist/{webquark/p-030ecde3.entry.js → playground/build/p-84b350a3.entry.js} +1 -1
- package/dist/playground/build/p-85131314.entry.js +1 -0
- package/dist/{webquark/p-f1bac94c.entry.js → playground/build/p-852e88ae.entry.js} +1 -1
- package/dist/{webquark/p-0aa74ad6.entry.js → playground/build/p-86c05afd.entry.js} +1 -1
- package/dist/playground/build/p-8c5b2706.entry.js +1 -0
- package/dist/playground/build/p-923527f0.entry.js +1 -0
- package/dist/playground/build/{p-f4f97e74.entry.js → p-9a76cd71.entry.js} +1 -1
- package/dist/playground/build/p-9f99de41.css +1 -0
- package/dist/playground/build/p-BDsIecIx.js +1 -0
- package/dist/playground/build/p-CArIPzJU.js +1 -0
- package/dist/playground/build/{p-GHhpSfZU.js → p-CpI3m4_T.js} +1 -1
- package/dist/playground/build/{p-Dhsn99q4.js → p-DDUED8LT.js} +1 -1
- package/dist/playground/build/{p-DWO-pleQ.js → p-Dnz3WmdX.js} +1 -1
- package/dist/playground/build/p-DoGM9gsC.js +3 -0
- package/dist/playground/build/p-a0d97367.entry.js +1 -0
- package/dist/{webquark/p-5f232b44.entry.js → playground/build/p-a16bd8d5.entry.js} +1 -1
- package/dist/playground/build/{p-059daa8a.entry.js → p-a2334abe.entry.js} +1 -1
- package/dist/playground/build/{p-36118d90.entry.js → p-a2ff1b64.entry.js} +1 -1
- package/dist/playground/build/{p-dd115868.entry.js → p-a314bc21.entry.js} +1 -1
- package/dist/playground/build/p-a3e1096d.entry.js +1 -0
- package/dist/playground/build/{p-f63b7214.entry.js → p-a66550da.entry.js} +1 -1
- package/dist/playground/build/{p-f9ad63ff.entry.js → p-aa342e81.entry.js} +1 -1
- package/dist/{webquark/p-6e28cfe2.entry.js → playground/build/p-b1c771fb.entry.js} +1 -1
- package/dist/playground/build/p-b21ad707.entry.js +1 -0
- package/dist/playground/build/p-b45ca926.entry.js +1 -0
- package/dist/playground/build/{p-8ece2c62.entry.js → p-b8fdef4f.entry.js} +1 -1
- package/dist/playground/build/p-ca1c516e.js +1 -0
- package/dist/playground/build/{p-64096386.entry.js → p-d4788321.entry.js} +1 -1
- package/dist/playground/build/p-d86bd51d.entry.js +1 -0
- package/dist/{webquark/p-48fb5228.entry.js → playground/build/p-dbcf7592.entry.js} +1 -1
- package/dist/playground/build/p-e0943d41.entry.js +1 -0
- package/dist/playground/build/{p-6bfffa79.entry.js → p-e2721e77.entry.js} +1 -1
- package/dist/{webquark/p-3bc4629c.entry.js → playground/build/p-e723a7ae.entry.js} +1 -1
- package/dist/playground/build/p-eb800d1e.entry.js +1 -0
- package/dist/playground/build/{p-99d785ca.entry.js → p-f4d23ffe.entry.js} +1 -1
- package/dist/playground/build/{p-4d61b70d.entry.js → p-f51e1098.entry.js} +1 -1
- package/dist/{webquark/p-9ff7e5a4.entry.js → playground/build/p-fe14f038.entry.js} +1 -1
- package/dist/playground/build/webquark.css +1 -1
- package/dist/playground/build/webquark.esm.js +1 -1
- package/dist/playground/index.html +1 -29
- package/dist/playground/playground/components.manifest.json +3 -0
- package/dist/playground/playground/specs/q-control-group.sandbox.json +20 -0
- package/dist/playground/playground/specs/q-divider.sandbox.json +20 -0
- package/dist/playground/playground/specs/q-dropdown.sandbox.json +10 -2
- package/dist/playground/playground/specs/q-input.sandbox.json +6 -0
- package/dist/playground/playground/specs/q-slider.sandbox.json +1 -0
- package/dist/playground/playground/specs/q-textarea.sandbox.json +6 -0
- package/dist/playground/playground.js +220 -201
- package/dist/playground/presets.html +37 -3
- package/dist/playground/views/tooling/sample-feed.json +13 -0
- package/dist/playground/views/tooling/sample-notes.md +14 -0
- package/dist/playground/views/tooling/tooling.html +69 -0
- package/dist/tooling/changelog/index.d.ts +1 -0
- package/dist/tooling/changelog/index.js +1 -0
- package/package.json +54 -160
- package/scripts/package.json +1 -0
- package/scripts/webquark-serve.js +3 -80
- package/scripts/wq-changelog.js +4 -0
- package/scripts/wq-switch/README.md +82 -25
- package/scripts/wq-switch/dist/index.js +1 -589
- package/scripts/wq-switch/dist/setup.js +1 -368
- package/dist/cjs/Leaflet.GoogleMutant-i4bYl6qy.js +0 -768
- package/dist/cjs/action.props-N0urQtdP.js +0 -35
- package/dist/cjs/chevron-up-D4t2OSHA.js +0 -30
- package/dist/cjs/collection-identity-CV5HLD9Z.js +0 -141
- package/dist/cjs/data-table-cell-8uUCk2Qz.js +0 -51
- package/dist/cjs/dom-Dk77oFF6.js +0 -247
- package/dist/cjs/field-CsrQGhG-.js +0 -14
- package/dist/cjs/form-control-validity-D1ukC0_e.js +0 -49
- package/dist/cjs/form-field-adapter-D0CJ6poh.js +0 -51
- package/dist/cjs/form-field-state-P63wN30v.js +0 -51
- package/dist/cjs/form-submit-action-C6c4aq6C.js +0 -227
- package/dist/cjs/image-crop-BZD5Cxd7.js +0 -53
- package/dist/cjs/index-DWXhKHCB.js +0 -1869
- package/dist/cjs/index.cjs.js +0 -34
- package/dist/cjs/leaflet-maplibre-gl-JIaCQ-7v.js +0 -1025
- package/dist/cjs/leaflet-src-mrRg-Srs.js +0 -14551
- package/dist/cjs/loader.cjs.js +0 -12
- package/dist/cjs/map.types-BWymIRql.js +0 -24
- package/dist/cjs/q-accordion.cjs.entry.js +0 -18
- package/dist/cjs/q-alert.cjs.entry.js +0 -52
- package/dist/cjs/q-avatar.cjs.entry.js +0 -101
- package/dist/cjs/q-banner.cjs.entry.js +0 -19
- package/dist/cjs/q-button_2.cjs.entry.js +0 -462
- package/dist/cjs/q-card.cjs.entry.js +0 -88
- package/dist/cjs/q-carousel.cjs.entry.js +0 -718
- package/dist/cjs/q-chip.cjs.entry.js +0 -124
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +0 -70
- package/dist/cjs/q-data-table.cjs.entry.js +0 -611
- package/dist/cjs/q-dialog.cjs.entry.js +0 -271
- package/dist/cjs/q-dropdown.cjs.entry.js +0 -699
- package/dist/cjs/q-form.cjs.entry.js +0 -1002
- package/dist/cjs/q-grid.cjs.entry.js +0 -24
- package/dist/cjs/q-icon.cjs.entry.js +0 -439
- package/dist/cjs/q-image-comparison.cjs.entry.js +0 -201
- package/dist/cjs/q-inline.cjs.entry.js +0 -22
- package/dist/cjs/q-input_2.cjs.entry.js +0 -438
- package/dist/cjs/q-link.cjs.entry.js +0 -80
- package/dist/cjs/q-map.cjs.entry.js +0 -3509
- package/dist/cjs/q-media.cjs.entry.js +0 -21
- package/dist/cjs/q-navbar.cjs.entry.js +0 -415
- package/dist/cjs/q-pagination.cjs.entry.js +0 -68
- package/dist/cjs/q-panel.cjs.entry.js +0 -76
- package/dist/cjs/q-quantity-selector.cjs.entry.js +0 -204
- package/dist/cjs/q-radio-group.cjs.entry.js +0 -261
- package/dist/cjs/q-reel.cjs.entry.js +0 -170
- package/dist/cjs/q-scrollable.cjs.entry.js +0 -449
- package/dist/cjs/q-section.cjs.entry.js +0 -20
- package/dist/cjs/q-sidepanel.cjs.entry.js +0 -793
- package/dist/cjs/q-stack.cjs.entry.js +0 -20
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +0 -45
- package/dist/cjs/q-step-diagram.cjs.entry.js +0 -56
- package/dist/cjs/q-syntax-box.cjs.entry.js +0 -782
- package/dist/cjs/q-tabs.cjs.entry.js +0 -155
- package/dist/cjs/q-textarea.cjs.entry.js +0 -295
- package/dist/cjs/q-thumbnail.cjs.entry.js +0 -51
- package/dist/cjs/q-toast.cjs.entry.js +0 -400
- package/dist/cjs/q-toggle.cjs.entry.js +0 -233
- package/dist/cjs/q-toolbar.cjs.entry.js +0 -33
- package/dist/cjs/registry-C3IYlNMp.js +0 -323
- package/dist/cjs/toast-controller-CIXagxbV.js +0 -111
- package/dist/cjs/tokens-RMRaIOqv.js +0 -957
- package/dist/cjs/utils-DGQOjEwT.js +0 -33
- package/dist/cjs/webquark.cjs.js +0 -24
- package/dist/collection/assets/icons/braces.svg +0 -14
- package/dist/collection/assets/icons/check.svg +0 -1
- package/dist/collection/assets/icons/chevron-down.svg +0 -1
- package/dist/collection/assets/icons/chevron-left.svg +0 -1
- package/dist/collection/assets/icons/chevron-right.svg +0 -1
- package/dist/collection/assets/icons/chevron-up.svg +0 -1
- package/dist/collection/assets/icons/copy.svg +0 -4
- package/dist/collection/assets/icons/eye-off.svg +0 -1
- package/dist/collection/assets/icons/eye.svg +0 -1
- package/dist/collection/assets/icons/minus.svg +0 -1
- package/dist/collection/assets/icons/play.svg +0 -1
- package/dist/collection/assets/icons/plus.svg +0 -1
- package/dist/collection/assets/icons/search.svg +0 -1
- package/dist/collection/assets/icons/spinner.svg +0 -1
- package/dist/collection/assets/icons/trash-2.svg +0 -1
- package/dist/collection/assets/icons/x.svg +0 -1
- package/dist/collection/collection-manifest.json +0 -56
- package/dist/collection/components/actions/action.props.js +0 -130
- package/dist/collection/components/actions/button/button.css +0 -242
- package/dist/collection/components/actions/button/button.js +0 -748
- package/dist/collection/components/actions/button/button.types.js +0 -1
- package/dist/collection/components/actions/button/button.utils.js +0 -9
- package/dist/collection/components/actions/button/button.utils.unit.test.js +0 -44
- package/dist/collection/components/actions/button/test/button-slots.cmp.test.js +0 -70
- package/dist/collection/components/actions/link/link.css +0 -102
- package/dist/collection/components/actions/link/link.js +0 -316
- package/dist/collection/components/actions/link/link.types.js +0 -1
- package/dist/collection/components/communication/alert/alert.css +0 -118
- package/dist/collection/components/communication/alert/alert.js +0 -208
- package/dist/collection/components/communication/alert/alert.types.js +0 -1
- package/dist/collection/components/communication/conversation-bubble/conversation-bubble.css +0 -154
- package/dist/collection/components/communication/conversation-bubble/conversation-bubble.js +0 -207
- package/dist/collection/components/communication/conversation-bubble/conversation-bubble.types.js +0 -1
- package/dist/collection/components/communication/toast/internals/icons.js +0 -25
- package/dist/collection/components/communication/toast/internals/queue.js +0 -64
- package/dist/collection/components/communication/toast/internals/timers.js +0 -75
- package/dist/collection/components/communication/toast/test/toast.cmp.test.js +0 -38
- package/dist/collection/components/communication/toast/test/toast.unit.test.js +0 -104
- package/dist/collection/components/communication/toast/toast-controller.js +0 -105
- package/dist/collection/components/communication/toast/toast.css +0 -141
- package/dist/collection/components/communication/toast/toast.js +0 -556
- package/dist/collection/components/communication/toast/toast.types.js +0 -1
- package/dist/collection/components/content/banner/banner.css +0 -1
- package/dist/collection/components/content/banner/banner.js +0 -84
- package/dist/collection/components/content/banner/banner.types.js +0 -1
- package/dist/collection/components/content/card/card.css +0 -105
- package/dist/collection/components/content/card/card.js +0 -308
- package/dist/collection/components/content/card/card.types.js +0 -1
- package/dist/collection/components/content/card/card.utils.js +0 -15
- package/dist/collection/components/content/carousel/carousel.css +0 -254
- package/dist/collection/components/content/carousel/carousel.js +0 -956
- package/dist/collection/components/content/carousel/carousel.types.js +0 -1
- package/dist/collection/components/content/carousel/carousel.utils.js +0 -1
- package/dist/collection/components/content/carousel/internals/autoplay.js +0 -64
- package/dist/collection/components/content/carousel/internals/metrics.js +0 -59
- package/dist/collection/components/content/carousel/internals/slide-state.js +0 -50
- package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +0 -328
- package/dist/collection/components/data-display/accordion/accordion.css +0 -1
- package/dist/collection/components/data-display/accordion/accordion.js +0 -54
- package/dist/collection/components/data-display/accordion/accordion.types.js +0 -1
- package/dist/collection/components/data-display/chip/chip.css +0 -219
- package/dist/collection/components/data-display/chip/chip.js +0 -381
- package/dist/collection/components/data-display/chip/chip.types.js +0 -1
- package/dist/collection/components/data-display/data-table/data-table-cell.js +0 -44
- package/dist/collection/components/data-display/data-table/data-table.css +0 -429
- package/dist/collection/components/data-display/data-table/data-table.js +0 -862
- package/dist/collection/components/data-display/data-table/data-table.types.js +0 -1
- package/dist/collection/components/data-display/data-table/internals/data-access.js +0 -43
- package/dist/collection/components/data-display/data-table/internals/render-row-actions.js +0 -22
- package/dist/collection/components/data-display/data-table/internals/render-sort-indicator.js +0 -5
- package/dist/collection/components/data-display/data-table/internals/render-table-body.js +0 -59
- package/dist/collection/components/data-display/data-table/internals/render-table-head.js +0 -42
- package/dist/collection/components/data-display/data-table/internals/render-toolbar.js +0 -6
- package/dist/collection/components/data-display/data-table/internals/row-events.js +0 -27
- package/dist/collection/components/data-display/data-table/internals/selection.js +0 -31
- package/dist/collection/components/data-display/data-table/internals/sort.js +0 -57
- package/dist/collection/components/data-display/data-table/internals/table-model.js +0 -92
- package/dist/collection/components/data-display/data-table/test/row-gutter.cmp.test.js +0 -104
- package/dist/collection/components/data-display/data-table/test/two-line-rows.cmp.test.js +0 -164
- package/dist/collection/components/data-display/map/internals/base-layer.js +0 -140
- package/dist/collection/components/data-display/map/internals/bounds.js +0 -66
- package/dist/collection/components/data-display/map/internals/buffered-tile-layer.js +0 -128
- package/dist/collection/components/data-display/map/internals/cluster-collision.js +0 -73
- package/dist/collection/components/data-display/map/internals/google-maps.js +0 -117
- package/dist/collection/components/data-display/map/internals/google-mutant.js +0 -51
- package/dist/collection/components/data-display/map/internals/maplibre.js +0 -50
- package/dist/collection/components/data-display/map/internals/marker-cluster-index.js +0 -136
- package/dist/collection/components/data-display/map/internals/marker-controller.js +0 -425
- package/dist/collection/components/data-display/map/internals/marker-presentation.js +0 -266
- package/dist/collection/components/data-display/map/internals/marker-visibility.js +0 -158
- package/dist/collection/components/data-display/map/internals/markers.js +0 -191
- package/dist/collection/components/data-display/map/internals/tile-layer-readiness.js +0 -67
- package/dist/collection/components/data-display/map/internals/tile-preload-buffer.js +0 -8
- package/dist/collection/components/data-display/map/internals/vector-padding.js +0 -8
- package/dist/collection/components/data-display/map/map.css +0 -742
- package/dist/collection/components/data-display/map/map.js +0 -1595
- package/dist/collection/components/data-display/map/map.types.js +0 -12
- package/dist/collection/components/data-display/map/test/map.cmp.test.js +0 -961
- package/dist/collection/components/data-display/pagination/pagination.css +0 -81
- package/dist/collection/components/data-display/pagination/pagination.js +0 -240
- package/dist/collection/components/data-display/pagination/test/pagination.cmp.test.js +0 -57
- package/dist/collection/components/data-display/syntax-box/internals/clipboard.js +0 -9
- package/dist/collection/components/data-display/syntax-box/internals/editor-key-action.js +0 -14
- package/dist/collection/components/data-display/syntax-box/internals/value-sync.js +0 -10
- package/dist/collection/components/data-display/syntax-box/internals/value-sync.unit.test.js +0 -25
- package/dist/collection/components/data-display/syntax-box/syntax-box.css +0 -209
- package/dist/collection/components/data-display/syntax-box/syntax-box.js +0 -678
- package/dist/collection/components/data-display/syntax-box/syntax-box.types.js +0 -1
- package/dist/collection/components/data-display/syntax-box/syntax-box.utils.js +0 -1
- package/dist/collection/components/data-display/syntax-box/test/format-fixtures.js +0 -20
- package/dist/collection/components/data-display/syntax-box/test/syntax-box.cmp.test.js +0 -241
- package/dist/collection/components/data-display/syntax-box/test/syntax-fixtures.js +0 -14
- package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +0 -157
- package/dist/collection/components/indicators/progress/progress.css +0 -223
- package/dist/collection/components/indicators/progress/progress.js +0 -275
- package/dist/collection/components/indicators/progress/progress.types.js +0 -1
- package/dist/collection/components/indicators/step-diagram/step-diagram.css +0 -21
- package/dist/collection/components/indicators/step-diagram/step-diagram.js +0 -143
- package/dist/collection/components/indicators/step-diagram/step-diagram.types.js +0 -1
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.css +0 -252
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +0 -185
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.types.js +0 -1
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.utils.js +0 -3
- package/dist/collection/components/inputs/dropdown/dropdown.css +0 -387
- package/dist/collection/components/inputs/dropdown/dropdown.js +0 -1236
- package/dist/collection/components/inputs/dropdown/dropdown.types.js +0 -1
- package/dist/collection/components/inputs/dropdown/internals/options.js +0 -30
- package/dist/collection/components/inputs/dropdown/internals/position.js +0 -35
- package/dist/collection/components/inputs/dropdown/test/dropdown.cmp.test.js +0 -62
- package/dist/collection/components/inputs/form/form.css +0 -85
- package/dist/collection/components/inputs/form/form.js +0 -808
- package/dist/collection/components/inputs/form/form.types.js +0 -1
- package/dist/collection/components/inputs/form/internals/controls.js +0 -173
- package/dist/collection/components/inputs/form/internals/enter-behavior.js +0 -25
- package/dist/collection/components/inputs/form/internals/field-state.js +0 -129
- package/dist/collection/components/inputs/form/internals/reset.js +0 -50
- package/dist/collection/components/inputs/form/internals/submission.js +0 -140
- package/dist/collection/components/inputs/form/internals/values.js +0 -199
- package/dist/collection/components/inputs/form/internals/values.unit.test.js +0 -59
- package/dist/collection/components/inputs/form/test/form-reset-state.cmp.test.js +0 -559
- package/dist/collection/components/inputs/form/test/form-submit-transport.cmp.test.js +0 -352
- package/dist/collection/components/inputs/form/test/form-submit.cmp.test.js +0 -438
- package/dist/collection/components/inputs/form/test/form-values.cmp.test.js +0 -440
- package/dist/collection/components/inputs/form/test/form.cmp.test.js +0 -157
- package/dist/collection/components/inputs/input/input.css +0 -293
- package/dist/collection/components/inputs/input/input.js +0 -907
- package/dist/collection/components/inputs/input/input.types.js +0 -1
- package/dist/collection/components/inputs/input/input.utils.js +0 -3
- package/dist/collection/components/inputs/quantity-selector/internals/number-value.js +0 -64
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +0 -171
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +0 -390
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.types.js +0 -1
- package/dist/collection/components/inputs/radio-group/radio-group.css +0 -224
- package/dist/collection/components/inputs/radio-group/radio-group.js +0 -668
- package/dist/collection/components/inputs/radio-group/radio-group.types.js +0 -1
- package/dist/collection/components/inputs/radio-group/radio-group.utils.js +0 -18
- package/dist/collection/components/inputs/textarea/textarea.css +0 -172
- package/dist/collection/components/inputs/textarea/textarea.js +0 -799
- package/dist/collection/components/inputs/textarea/textarea.types.js +0 -1
- package/dist/collection/components/inputs/toggle/toggle.css +0 -252
- package/dist/collection/components/inputs/toggle/toggle.js +0 -610
- package/dist/collection/components/inputs/toggle/toggle.types.js +0 -1
- package/dist/collection/components/inputs/toggle/toggle.utils.js +0 -3
- package/dist/collection/components/layout/grid/grid.css +0 -11
- package/dist/collection/components/layout/grid/grid.js +0 -152
- package/dist/collection/components/layout/inline/inline.css +0 -4
- package/dist/collection/components/layout/inline/inline.js +0 -118
- package/dist/collection/components/layout/navbar/navbar.css +0 -584
- package/dist/collection/components/layout/navbar/navbar.js +0 -848
- package/dist/collection/components/layout/navbar/navbar.types.js +0 -1
- package/dist/collection/components/layout/navbar/navbar.utils.js +0 -13
- package/dist/collection/components/layout/navbar/test/navbar.cmp.test.js +0 -369
- package/dist/collection/components/layout/panel/panel.css +0 -114
- package/dist/collection/components/layout/panel/panel.js +0 -394
- package/dist/collection/components/layout/panel/panel.types.js +0 -1
- package/dist/collection/components/layout/scrollable/internals/metrics.js +0 -61
- package/dist/collection/components/layout/scrollable/internals/native-scrollbar.js +0 -41
- package/dist/collection/components/layout/scrollable/scrollable.css +0 -123
- package/dist/collection/components/layout/scrollable/scrollable.js +0 -565
- package/dist/collection/components/layout/scrollable/scrollable.types.js +0 -1
- package/dist/collection/components/layout/section/section.css +0 -1
- package/dist/collection/components/layout/section/section.js +0 -98
- package/dist/collection/components/layout/section/section.types.js +0 -1
- package/dist/collection/components/layout/sidepanel/internals/drawer.js +0 -98
- package/dist/collection/components/layout/sidepanel/internals/groups.js +0 -56
- package/dist/collection/components/layout/sidepanel/internals/nav-items.js +0 -30
- package/dist/collection/components/layout/sidepanel/sidepanel.css +0 -1035
- package/dist/collection/components/layout/sidepanel/sidepanel.js +0 -1001
- package/dist/collection/components/layout/sidepanel/sidepanel.types.js +0 -1
- package/dist/collection/components/layout/sidepanel/sidepanel.utils.js +0 -17
- package/dist/collection/components/layout/sidepanel/test/nav-drawer-transitions.cmp.test.js +0 -120
- package/dist/collection/components/layout/sidepanel/test/panel-transitions.cmp.test.js +0 -180
- package/dist/collection/components/layout/stack/stack.css +0 -4
- package/dist/collection/components/layout/stack/stack.js +0 -76
- package/dist/collection/components/layout/tabs/tabs.css +0 -248
- package/dist/collection/components/layout/tabs/tabs.js +0 -322
- package/dist/collection/components/layout/tabs/tabs.types.js +0 -1
- package/dist/collection/components/layout/tabs/tabs.utils.js +0 -31
- package/dist/collection/components/layout/tabs/test/tabs.cmp.test.js +0 -165
- package/dist/collection/components/layout/toolbar/toolbar.css +0 -168
- package/dist/collection/components/layout/toolbar/toolbar.js +0 -251
- package/dist/collection/components/layout/toolbar/toolbar.types.js +0 -1
- package/dist/collection/components/media/avatar/avatar.css +0 -71
- package/dist/collection/components/media/avatar/avatar.js +0 -302
- package/dist/collection/components/media/avatar/avatar.types.js +0 -1
- package/dist/collection/components/media/icon/icon.css +0 -42
- package/dist/collection/components/media/icon/icon.js +0 -510
- package/dist/collection/components/media/icon/icon.types.js +0 -1
- package/dist/collection/components/media/icon/internals/constants.js +0 -3
- package/dist/collection/components/media/icon/internals/fetch-icon.js +0 -47
- package/dist/collection/components/media/icon/internals/fetch-icon.unit.test.js +0 -51
- package/dist/collection/components/media/icon/internals/policy.js +0 -184
- package/dist/collection/components/media/icon/internals/policy.unit.test.js +0 -65
- package/dist/collection/components/media/icon/internals/registry-lucide.unit.test.js +0 -78
- package/dist/collection/components/media/icon/internals/registry.js +0 -122
- package/dist/collection/components/media/icon/internals/registry.unit.test.js +0 -42
- package/dist/collection/components/media/icon/internals/render-definition.js +0 -24
- package/dist/collection/components/media/icon/internals/sanitize-svg.js +0 -86
- package/dist/collection/components/media/icon/internals/size.js +0 -12
- package/dist/collection/components/media/icon/internals/url.js +0 -52
- package/dist/collection/components/media/icon/internals/url.unit.test.js +0 -34
- package/dist/collection/components/media/icon/test/icon-fixtures.js +0 -47
- package/dist/collection/components/media/icon/test/icon.cmp.test.js +0 -223
- package/dist/collection/components/media/image-comparison/image-comparison.css +0 -124
- package/dist/collection/components/media/image-comparison/image-comparison.js +0 -468
- package/dist/collection/components/media/image-comparison/test/image-comparison.cmp.test.js +0 -234
- package/dist/collection/components/media/media/media.css +0 -1
- package/dist/collection/components/media/media/media.js +0 -125
- package/dist/collection/components/media/media/media.types.js +0 -1
- package/dist/collection/components/media/reel/reel.css +0 -193
- package/dist/collection/components/media/reel/reel.js +0 -279
- package/dist/collection/components/media/reel/reel.types.js +0 -1
- package/dist/collection/components/media/thumbnail/thumbnail.css +0 -111
- package/dist/collection/components/media/thumbnail/thumbnail.js +0 -184
- package/dist/collection/components/media/thumbnail/thumbnail.types.js +0 -1
- package/dist/collection/components/overlays/dialog/dialog.css +0 -264
- package/dist/collection/components/overlays/dialog/dialog.js +0 -743
- package/dist/collection/components/overlays/dialog/dialog.types.js +0 -1
- package/dist/collection/components/overlays/dialog/internals/backdrop.js +0 -9
- package/dist/collection/components/overlays/dialog/internals/lifecycle.js +0 -53
- package/dist/collection/components/overlays/tooltip/internals/aria.js +0 -27
- package/dist/collection/components/overlays/tooltip/internals/positioning.js +0 -84
- package/dist/collection/components/overlays/tooltip/internals/scroll-listeners.js +0 -18
- package/dist/collection/components/overlays/tooltip/tooltip.css +0 -69
- package/dist/collection/components/overlays/tooltip/tooltip.js +0 -196
- package/dist/collection/components/overlays/tooltip/tooltip.types.js +0 -1
- package/dist/collection/components/shared/field.js +0 -8
- package/dist/collection/components/shared/test/orientation.cmp.test.js +0 -36
- package/dist/collection/index.js +0 -16
- package/dist/collection/playground/assets/comparison-after.svg +0 -1
- package/dist/collection/playground/assets/comparison-before.svg +0 -1
- package/dist/collection/playground/components/playground-code-preview/playground-code-preview.js +0 -48
- package/dist/collection/playground/components/playground-event-log/playground-event-log.js +0 -63
- package/dist/collection/playground/components/playground-header/playground-header.js +0 -65
- package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +0 -112
- package/dist/collection/playground/components/properties-panel/properties-panel.js +0 -146
- package/dist/collection/playground/components/properties-panel/property-row.js +0 -31
- package/dist/collection/playground/components/properties-panel/slot-row.js +0 -27
- package/dist/collection/playground/components/sandbox-viewport/sandbox-panel.js +0 -338
- package/dist/collection/playground/components/sandbox-viewport/sandbox-viewport.js +0 -159
- package/dist/collection/playground/components/sandbox-viewport/variant-card.js +0 -86
- package/dist/collection/playground/components/sandbox-viewport/viewport-tabs.js +0 -39
- package/dist/collection/playground/components/theme-designer/theme-designer.js +0 -69
- package/dist/collection/playground/components/theme-designer/token-row.js +0 -89
- package/dist/collection/playground/components/theme-designer/token-section.js +0 -19
- package/dist/collection/playground/dom-factory.js +0 -76
- package/dist/collection/playground/events.js +0 -37
- package/dist/collection/playground/logo.svg +0 -8
- package/dist/collection/playground/playground.bundled.js +0 -3865
- package/dist/collection/playground/playground.js +0 -10
- package/dist/collection/playground/state.js +0 -158
- package/dist/collection/playground/utils/color.js +0 -26
- package/dist/collection/playground/utils/dom.js +0 -38
- package/dist/collection/playground/utils/index.js +0 -2
- package/dist/collection/playground/views/q-button-view/q-button-view.js +0 -6
- package/dist/collection/playground/views/q-input-view/q-input-view.js +0 -6
- package/dist/collection/theme/test/foundation.cmp.test.js +0 -353
- package/dist/collection/theme/test/presets.cmp.test.js +0 -129
- package/dist/collection/theme/tokens.js +0 -960
- package/dist/collection/utils/collection-identity.js +0 -136
- package/dist/collection/utils/collection-identity.unit.test.js +0 -107
- package/dist/collection/utils/dom.js +0 -236
- package/dist/collection/utils/form-control-validity.js +0 -44
- package/dist/collection/utils/form-field-adapter.js +0 -44
- package/dist/collection/utils/form-field-state.js +0 -45
- package/dist/collection/utils/form-reset-action.js +0 -60
- package/dist/collection/utils/form-submit-action.js +0 -151
- package/dist/collection/utils/form-submit-action.unit.test.js +0 -15
- package/dist/collection/utils/formatter.js +0 -156
- package/dist/collection/utils/formatter.unit.test.js +0 -71
- package/dist/collection/utils/image-crop.js +0 -47
- package/dist/collection/utils/image-crop.unit.test.js +0 -57
- package/dist/collection/utils/math.js +0 -19
- package/dist/collection/utils/syntax.js +0 -239
- package/dist/collection/utils/syntax.unit.test.js +0 -134
- package/dist/collection/utils/utils.js +0 -28
- package/dist/collection/utils/utils.unit.test.js +0 -16
- package/dist/components/index.d.ts +0 -35
- package/dist/components/index.js +0 -1
- package/dist/components/p-6PPZ2sIO.js +0 -1
- package/dist/components/p-B4Mg1xEw.js +0 -1
- package/dist/components/p-BH4gQWub.js +0 -1
- package/dist/components/p-BIIQL66b.js +0 -1
- package/dist/components/p-BJiYCN3i.js +0 -1
- package/dist/components/p-BOdNg0jc.js +0 -1
- package/dist/components/p-BcL0NVv0.js +0 -1
- package/dist/components/p-Bj2RJb2E.js +0 -1
- package/dist/components/p-BofcK-7Z.js +0 -1
- package/dist/components/p-ByfrUWx1.js +0 -1
- package/dist/components/p-C6vxokHH.js +0 -1
- package/dist/components/p-CGZPmEUB.js +0 -1
- package/dist/components/p-CGml_DQ8.js +0 -1
- package/dist/components/p-CKuPOxKN.js +0 -1
- package/dist/components/p-CN1ut2Lb.js +0 -1
- package/dist/components/p-C_RztzNv.js +0 -5
- package/dist/components/p-CoIMrUb3.js +0 -1
- package/dist/components/p-DKrPmn2y.js +0 -13
- package/dist/components/p-DQhiqYeq.js +0 -1
- package/dist/components/p-DT6k8Yhx.js +0 -1
- package/dist/components/p-DYMWBqU1.js +0 -5
- package/dist/components/p-Dfp_If-_.js +0 -1
- package/dist/components/p-DstNl_WY.js +0 -1
- package/dist/components/p-DuX-9GOi.js +0 -1
- package/dist/components/p-GHhpSfZU.js +0 -1
- package/dist/components/p-SzKf4WZF.js +0 -1
- package/dist/components/p-ye27qtRo.js +0 -1
- package/dist/components/q-accordion.d.ts +0 -11
- package/dist/components/q-accordion.js +0 -1
- package/dist/components/q-alert.d.ts +0 -11
- package/dist/components/q-alert.js +0 -1
- package/dist/components/q-avatar.d.ts +0 -11
- package/dist/components/q-avatar.js +0 -1
- package/dist/components/q-banner.d.ts +0 -11
- package/dist/components/q-banner.js +0 -1
- package/dist/components/q-button.d.ts +0 -11
- package/dist/components/q-button.js +0 -1
- package/dist/components/q-card.d.ts +0 -11
- package/dist/components/q-card.js +0 -1
- package/dist/components/q-carousel.d.ts +0 -11
- package/dist/components/q-carousel.js +0 -1
- package/dist/components/q-chip.d.ts +0 -11
- package/dist/components/q-chip.js +0 -1
- package/dist/components/q-conversation-bubble.d.ts +0 -11
- package/dist/components/q-conversation-bubble.js +0 -1
- package/dist/components/q-data-table.d.ts +0 -11
- package/dist/components/q-data-table.js +0 -1
- package/dist/components/q-dialog.d.ts +0 -11
- package/dist/components/q-dialog.js +0 -1
- package/dist/components/q-dropdown.d.ts +0 -11
- package/dist/components/q-dropdown.js +0 -1
- package/dist/components/q-form.d.ts +0 -11
- package/dist/components/q-form.js +0 -1
- package/dist/components/q-grid.d.ts +0 -11
- package/dist/components/q-grid.js +0 -1
- package/dist/components/q-icon.d.ts +0 -11
- package/dist/components/q-icon.js +0 -1
- package/dist/components/q-image-comparison.d.ts +0 -11
- package/dist/components/q-image-comparison.js +0 -1
- package/dist/components/q-inline.d.ts +0 -11
- package/dist/components/q-inline.js +0 -1
- package/dist/components/q-input.d.ts +0 -11
- package/dist/components/q-input.js +0 -1
- package/dist/components/q-link.d.ts +0 -11
- package/dist/components/q-link.js +0 -1
- package/dist/components/q-map.d.ts +0 -11
- package/dist/components/q-map.js +0 -1
- package/dist/components/q-media.d.ts +0 -11
- package/dist/components/q-media.js +0 -1
- package/dist/components/q-navbar.d.ts +0 -11
- package/dist/components/q-navbar.js +0 -1
- package/dist/components/q-pagination.d.ts +0 -11
- package/dist/components/q-pagination.js +0 -1
- package/dist/components/q-panel.d.ts +0 -11
- package/dist/components/q-panel.js +0 -1
- package/dist/components/q-progress.d.ts +0 -11
- package/dist/components/q-progress.js +0 -1
- package/dist/components/q-quantity-selector.d.ts +0 -11
- package/dist/components/q-quantity-selector.js +0 -1
- package/dist/components/q-radio-group.d.ts +0 -11
- package/dist/components/q-radio-group.js +0 -1
- package/dist/components/q-reel.d.ts +0 -11
- package/dist/components/q-reel.js +0 -1
- package/dist/components/q-scrollable.d.ts +0 -11
- package/dist/components/q-scrollable.js +0 -1
- package/dist/components/q-section.d.ts +0 -11
- package/dist/components/q-section.js +0 -1
- package/dist/components/q-sidepanel.d.ts +0 -11
- package/dist/components/q-sidepanel.js +0 -13
- package/dist/components/q-stack.d.ts +0 -11
- package/dist/components/q-stack.js +0 -1
- package/dist/components/q-step-diagram-item.d.ts +0 -11
- package/dist/components/q-step-diagram-item.js +0 -1
- package/dist/components/q-step-diagram.d.ts +0 -11
- package/dist/components/q-step-diagram.js +0 -1
- package/dist/components/q-syntax-box.d.ts +0 -11
- package/dist/components/q-syntax-box.js +0 -13
- package/dist/components/q-tabs.d.ts +0 -11
- package/dist/components/q-tabs.js +0 -1
- package/dist/components/q-textarea.d.ts +0 -11
- package/dist/components/q-textarea.js +0 -1
- package/dist/components/q-thumbnail.d.ts +0 -11
- package/dist/components/q-thumbnail.js +0 -1
- package/dist/components/q-toast.d.ts +0 -11
- package/dist/components/q-toast.js +0 -1
- package/dist/components/q-toggle.d.ts +0 -11
- package/dist/components/q-toggle.js +0 -1
- package/dist/components/q-toolbar.d.ts +0 -11
- package/dist/components/q-toolbar.js +0 -1
- package/dist/components/q-tooltip.d.ts +0 -11
- package/dist/components/q-tooltip.js +0 -1
- package/dist/esm/Leaflet.GoogleMutant-MpxOb4Jm.js +0 -766
- package/dist/esm/action.props-CpnGza8z.js +0 -32
- package/dist/esm/chevron-up-DKrPmn2y.js +0 -27
- package/dist/esm/collection-identity-CGZPmEUB.js +0 -138
- package/dist/esm/data-table-cell-SzKf4WZF.js +0 -46
- package/dist/esm/dom-ByfrUWx1.js +0 -238
- package/dist/esm/field-zfD6OQ02.js +0 -11
- package/dist/esm/form-control-validity-Bj2RJb2E.js +0 -46
- package/dist/esm/form-field-adapter-CGml_DQ8.js +0 -46
- package/dist/esm/form-field-state-DstNl_WY.js +0 -47
- package/dist/esm/form-submit-action-CoEIvDqE.js +0 -213
- package/dist/esm/image-crop-BcL0NVv0.js +0 -49
- package/dist/esm/index-B5ElFlHv.js +0 -1858
- package/dist/esm/index.js +0 -7
- package/dist/esm/leaflet-maplibre-gl-BvKlNmWf.js +0 -1020
- package/dist/esm/leaflet-src-DYMWBqU1.js +0 -14547
- package/dist/esm/loader.js +0 -10
- package/dist/esm/map.types-CoIMrUb3.js +0 -14
- package/dist/esm/q-accordion.entry.js +0 -16
- package/dist/esm/q-alert.entry.js +0 -50
- package/dist/esm/q-avatar.entry.js +0 -99
- package/dist/esm/q-banner.entry.js +0 -17
- package/dist/esm/q-button_2.entry.js +0 -459
- package/dist/esm/q-card.entry.js +0 -86
- package/dist/esm/q-carousel.entry.js +0 -716
- package/dist/esm/q-chip.entry.js +0 -122
- package/dist/esm/q-conversation-bubble.entry.js +0 -68
- package/dist/esm/q-data-table.entry.js +0 -609
- package/dist/esm/q-dialog.entry.js +0 -269
- package/dist/esm/q-dropdown.entry.js +0 -697
- package/dist/esm/q-form.entry.js +0 -1000
- package/dist/esm/q-grid.entry.js +0 -22
- package/dist/esm/q-icon.entry.js +0 -437
- package/dist/esm/q-image-comparison.entry.js +0 -199
- package/dist/esm/q-inline.entry.js +0 -20
- package/dist/esm/q-input_2.entry.js +0 -435
- package/dist/esm/q-link.entry.js +0 -78
- package/dist/esm/q-map.entry.js +0 -3507
- package/dist/esm/q-media.entry.js +0 -19
- package/dist/esm/q-navbar.entry.js +0 -413
- package/dist/esm/q-pagination.entry.js +0 -66
- package/dist/esm/q-panel.entry.js +0 -74
- package/dist/esm/q-quantity-selector.entry.js +0 -202
- package/dist/esm/q-radio-group.entry.js +0 -259
- package/dist/esm/q-reel.entry.js +0 -168
- package/dist/esm/q-scrollable.entry.js +0 -447
- package/dist/esm/q-section.entry.js +0 -18
- package/dist/esm/q-sidepanel.entry.js +0 -791
- package/dist/esm/q-stack.entry.js +0 -18
- package/dist/esm/q-step-diagram-item.entry.js +0 -43
- package/dist/esm/q-step-diagram.entry.js +0 -54
- package/dist/esm/q-syntax-box.entry.js +0 -780
- package/dist/esm/q-tabs.entry.js +0 -153
- package/dist/esm/q-textarea.entry.js +0 -293
- package/dist/esm/q-thumbnail.entry.js +0 -49
- package/dist/esm/q-toast.entry.js +0 -398
- package/dist/esm/q-toggle.entry.js +0 -231
- package/dist/esm/q-toolbar.entry.js +0 -31
- package/dist/esm/registry-GHhpSfZU.js +0 -308
- package/dist/esm/toast-controller-BIIQL66b.js +0 -107
- package/dist/esm/tokens-B4Mg1xEw.js +0 -953
- package/dist/esm/utils-BJiYCN3i.js +0 -30
- package/dist/esm/webquark.js +0 -20
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -1
- package/dist/loader/index.cjs.js +0 -1
- package/dist/loader/index.d.ts +0 -24
- package/dist/loader/index.es2017.js +0 -1
- package/dist/loader/index.js +0 -2
- package/dist/playground/build/p-023f8437.entry.js +0 -1
- package/dist/playground/build/p-030ecde3.entry.js +0 -1
- package/dist/playground/build/p-04c8cb9e.entry.js +0 -1
- package/dist/playground/build/p-0aa74ad6.entry.js +0 -1
- package/dist/playground/build/p-0ae43d6c.entry.js +0 -1
- package/dist/playground/build/p-0c3aac3f.entry.js +0 -1
- package/dist/playground/build/p-144ef339.entry.js +0 -1
- package/dist/playground/build/p-296fbdb1.entry.js +0 -1
- package/dist/playground/build/p-3bc4629c.entry.js +0 -1
- package/dist/playground/build/p-48fb5228.entry.js +0 -1
- package/dist/playground/build/p-5f232b44.entry.js +0 -13
- package/dist/playground/build/p-6e28cfe2.entry.js +0 -1
- package/dist/playground/build/p-70d9ffde.entry.js +0 -1
- package/dist/playground/build/p-90b0858c.entry.js +0 -1
- package/dist/playground/build/p-91fff6b6.entry.js +0 -1
- package/dist/playground/build/p-923dac41.entry.js +0 -1
- package/dist/playground/build/p-97a89cae.entry.js +0 -1
- package/dist/playground/build/p-9ff7e5a4.entry.js +0 -1
- package/dist/playground/build/p-B4Mg1xEw.js +0 -1
- package/dist/playground/build/p-B5ElFlHv.js +0 -3
- package/dist/playground/build/p-ByfrUWx1.js +0 -1
- package/dist/playground/build/p-c523ec6f.entry.js +0 -1
- package/dist/playground/build/p-d0253d64.entry.js +0 -1
- package/dist/playground/build/p-d0fbd2b1.entry.js +0 -1
- package/dist/playground/build/p-f1bac94c.entry.js +0 -1
- package/dist/playground/build/p-fe200f68.entry.js +0 -1
- package/dist/types/components/actions/action.props.d.ts +0 -19
- package/dist/types/components/actions/button/button.d.ts +0 -87
- package/dist/types/components/actions/button/button.types.d.ts +0 -6
- package/dist/types/components/actions/button/button.utils.d.ts +0 -8
- package/dist/types/components/actions/button/button.utils.unit.test.d.ts +0 -1
- package/dist/types/components/actions/button/test/button-slots.cmp.test.d.ts +0 -1
- package/dist/types/components/actions/link/link.d.ts +0 -43
- package/dist/types/components/actions/link/link.types.d.ts +0 -3
- package/dist/types/components/communication/alert/alert.d.ts +0 -32
- package/dist/types/components/communication/alert/alert.types.d.ts +0 -2
- package/dist/types/components/communication/conversation-bubble/conversation-bubble.d.ts +0 -38
- package/dist/types/components/communication/conversation-bubble/conversation-bubble.types.d.ts +0 -1
- package/dist/types/components/communication/toast/internals/icons.d.ts +0 -2
- package/dist/types/components/communication/toast/internals/queue.d.ts +0 -19
- package/dist/types/components/communication/toast/internals/timers.d.ts +0 -12
- package/dist/types/components/communication/toast/test/toast.cmp.test.d.ts +0 -2
- package/dist/types/components/communication/toast/test/toast.unit.test.d.ts +0 -1
- package/dist/types/components/communication/toast/toast-controller.d.ts +0 -9
- package/dist/types/components/communication/toast/toast.d.ts +0 -44
- package/dist/types/components/communication/toast/toast.types.d.ts +0 -30
- package/dist/types/components/content/banner/banner.d.ts +0 -12
- package/dist/types/components/content/banner/banner.types.d.ts +0 -2
- package/dist/types/components/content/card/card.d.ts +0 -35
- package/dist/types/components/content/card/card.types.d.ts +0 -1
- package/dist/types/components/content/card/card.utils.d.ts +0 -5
- package/dist/types/components/content/carousel/carousel.d.ts +0 -123
- package/dist/types/components/content/carousel/carousel.types.d.ts +0 -10
- package/dist/types/components/content/carousel/carousel.utils.d.ts +0 -1
- package/dist/types/components/content/carousel/internals/autoplay.d.ts +0 -22
- package/dist/types/components/content/carousel/internals/metrics.d.ts +0 -23
- package/dist/types/components/content/carousel/internals/slide-state.d.ts +0 -8
- package/dist/types/components/content/carousel/test/transitions.cmp.test.d.ts +0 -1
- package/dist/types/components/data-display/accordion/accordion.d.ts +0 -9
- package/dist/types/components/data-display/accordion/accordion.types.d.ts +0 -1
- package/dist/types/components/data-display/chip/chip.d.ts +0 -55
- package/dist/types/components/data-display/chip/chip.types.d.ts +0 -13
- package/dist/types/components/data-display/data-table/data-table-cell.d.ts +0 -7
- package/dist/types/components/data-display/data-table/data-table.d.ts +0 -95
- package/dist/types/components/data-display/data-table/data-table.types.d.ts +0 -56
- package/dist/types/components/data-display/data-table/internals/data-access.d.ts +0 -9
- package/dist/types/components/data-display/data-table/internals/render-row-actions.d.ts +0 -9
- package/dist/types/components/data-display/data-table/internals/render-sort-indicator.d.ts +0 -5
- package/dist/types/components/data-display/data-table/internals/render-table-body.d.ts +0 -13
- package/dist/types/components/data-display/data-table/internals/render-table-head.d.ts +0 -8
- package/dist/types/components/data-display/data-table/internals/render-toolbar.d.ts +0 -9
- package/dist/types/components/data-display/data-table/internals/row-events.d.ts +0 -1
- package/dist/types/components/data-display/data-table/internals/selection.d.ts +0 -10
- package/dist/types/components/data-display/data-table/internals/sort.d.ts +0 -3
- package/dist/types/components/data-display/data-table/internals/table-model.d.ts +0 -56
- package/dist/types/components/data-display/data-table/test/row-gutter.cmp.test.d.ts +0 -1
- package/dist/types/components/data-display/data-table/test/two-line-rows.cmp.test.d.ts +0 -1
- package/dist/types/components/data-display/map/internals/base-layer.d.ts +0 -63
- package/dist/types/components/data-display/map/internals/bounds.d.ts +0 -23
- package/dist/types/components/data-display/map/internals/buffered-tile-layer.d.ts +0 -10
- package/dist/types/components/data-display/map/internals/cluster-collision.d.ts +0 -15
- package/dist/types/components/data-display/map/internals/google-maps.d.ts +0 -9
- package/dist/types/components/data-display/map/internals/google-mutant-module.d.ts +0 -11
- package/dist/types/components/data-display/map/internals/google-mutant.d.ts +0 -18
- package/dist/types/components/data-display/map/internals/maplibre.d.ts +0 -14
- package/dist/types/components/data-display/map/internals/marker-cluster-index.d.ts +0 -36
- package/dist/types/components/data-display/map/internals/marker-controller.d.ts +0 -57
- package/dist/types/components/data-display/map/internals/marker-presentation.d.ts +0 -8
- package/dist/types/components/data-display/map/internals/marker-visibility.d.ts +0 -10
- package/dist/types/components/data-display/map/internals/markers.d.ts +0 -4
- package/dist/types/components/data-display/map/internals/tile-layer-readiness.d.ts +0 -11
- package/dist/types/components/data-display/map/internals/tile-preload-buffer.d.ts +0 -4
- package/dist/types/components/data-display/map/internals/vector-padding.d.ts +0 -4
- package/dist/types/components/data-display/map/map.d.ts +0 -175
- package/dist/types/components/data-display/map/map.types.d.ts +0 -132
- package/dist/types/components/data-display/map/test/map.cmp.test.d.ts +0 -1
- package/dist/types/components/data-display/pagination/pagination.d.ts +0 -33
- package/dist/types/components/data-display/pagination/test/pagination.cmp.test.d.ts +0 -2
- package/dist/types/components/data-display/syntax-box/internals/clipboard.d.ts +0 -2
- package/dist/types/components/data-display/syntax-box/internals/editor-key-action.d.ts +0 -12
- package/dist/types/components/data-display/syntax-box/internals/value-sync.d.ts +0 -15
- package/dist/types/components/data-display/syntax-box/internals/value-sync.unit.test.d.ts +0 -1
- package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +0 -72
- package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +0 -2
- package/dist/types/components/data-display/syntax-box/syntax-box.utils.d.ts +0 -1
- package/dist/types/components/data-display/syntax-box/test/format-fixtures.d.ts +0 -6
- package/dist/types/components/data-display/syntax-box/test/syntax-box.cmp.test.d.ts +0 -1
- package/dist/types/components/data-display/syntax-box/test/syntax-fixtures.d.ts +0 -9
- package/dist/types/components/data-display/syntax-box/test/syntax-format.cmp.test.d.ts +0 -1
- package/dist/types/components/indicators/progress/progress.d.ts +0 -30
- package/dist/types/components/indicators/progress/progress.types.d.ts +0 -3
- package/dist/types/components/indicators/step-diagram/step-diagram.d.ts +0 -19
- package/dist/types/components/indicators/step-diagram/step-diagram.types.d.ts +0 -3
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.d.ts +0 -26
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.types.d.ts +0 -5
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.utils.d.ts +0 -1
- package/dist/types/components/inputs/dropdown/dropdown.d.ts +0 -108
- package/dist/types/components/inputs/dropdown/dropdown.types.d.ts +0 -9
- package/dist/types/components/inputs/dropdown/internals/options.d.ts +0 -6
- package/dist/types/components/inputs/dropdown/internals/position.d.ts +0 -26
- package/dist/types/components/inputs/dropdown/test/dropdown.cmp.test.d.ts +0 -1
- package/dist/types/components/inputs/form/form.d.ts +0 -80
- package/dist/types/components/inputs/form/form.types.d.ts +0 -40
- package/dist/types/components/inputs/form/internals/controls.d.ts +0 -8
- package/dist/types/components/inputs/form/internals/enter-behavior.d.ts +0 -2
- package/dist/types/components/inputs/form/internals/field-state.d.ts +0 -19
- package/dist/types/components/inputs/form/internals/reset.d.ts +0 -3
- package/dist/types/components/inputs/form/internals/submission.d.ts +0 -17
- package/dist/types/components/inputs/form/internals/values.d.ts +0 -10
- package/dist/types/components/inputs/form/internals/values.unit.test.d.ts +0 -1
- package/dist/types/components/inputs/form/test/form-reset-state.cmp.test.d.ts +0 -1
- package/dist/types/components/inputs/form/test/form-submit-transport.cmp.test.d.ts +0 -1
- package/dist/types/components/inputs/form/test/form-submit.cmp.test.d.ts +0 -1
- package/dist/types/components/inputs/form/test/form-values.cmp.test.d.ts +0 -1
- package/dist/types/components/inputs/form/test/form.cmp.test.d.ts +0 -4
- package/dist/types/components/inputs/input/input.d.ts +0 -89
- package/dist/types/components/inputs/input/input.types.d.ts +0 -3
- package/dist/types/components/inputs/input/input.utils.d.ts +0 -1
- package/dist/types/components/inputs/quantity-selector/internals/number-value.d.ts +0 -13
- package/dist/types/components/inputs/quantity-selector/quantity-selector.d.ts +0 -37
- package/dist/types/components/inputs/quantity-selector/quantity-selector.types.d.ts +0 -3
- package/dist/types/components/inputs/radio-group/radio-group.d.ts +0 -70
- package/dist/types/components/inputs/radio-group/radio-group.types.d.ts +0 -12
- package/dist/types/components/inputs/radio-group/radio-group.utils.d.ts +0 -2
- package/dist/types/components/inputs/textarea/textarea.d.ts +0 -79
- package/dist/types/components/inputs/textarea/textarea.types.d.ts +0 -1
- package/dist/types/components/inputs/toggle/toggle.d.ts +0 -67
- package/dist/types/components/inputs/toggle/toggle.types.d.ts +0 -3
- package/dist/types/components/inputs/toggle/toggle.utils.d.ts +0 -1
- package/dist/types/components/layout/grid/grid.d.ts +0 -13
- package/dist/types/components/layout/inline/inline.d.ts +0 -12
- package/dist/types/components/layout/navbar/navbar.d.ts +0 -94
- package/dist/types/components/layout/navbar/navbar.types.d.ts +0 -33
- package/dist/types/components/layout/navbar/navbar.utils.d.ts +0 -2
- package/dist/types/components/layout/navbar/test/navbar.cmp.test.d.ts +0 -1
- package/dist/types/components/layout/panel/panel.d.ts +0 -41
- package/dist/types/components/layout/panel/panel.types.d.ts +0 -3
- package/dist/types/components/layout/scrollable/internals/metrics.d.ts +0 -26
- package/dist/types/components/layout/scrollable/internals/native-scrollbar.d.ts +0 -4
- package/dist/types/components/layout/scrollable/scrollable.d.ts +0 -67
- package/dist/types/components/layout/scrollable/scrollable.types.d.ts +0 -6
- package/dist/types/components/layout/section/section.d.ts +0 -13
- package/dist/types/components/layout/section/section.types.d.ts +0 -1
- package/dist/types/components/layout/sidepanel/internals/drawer.d.ts +0 -2
- package/dist/types/components/layout/sidepanel/internals/groups.d.ts +0 -7
- package/dist/types/components/layout/sidepanel/internals/nav-items.d.ts +0 -2
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +0 -110
- package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +0 -43
- package/dist/types/components/layout/sidepanel/sidepanel.utils.d.ts +0 -2
- package/dist/types/components/layout/sidepanel/test/nav-drawer-transitions.cmp.test.d.ts +0 -1
- package/dist/types/components/layout/sidepanel/test/panel-transitions.cmp.test.d.ts +0 -1
- package/dist/types/components/layout/stack/stack.d.ts +0 -10
- package/dist/types/components/layout/tabs/tabs.d.ts +0 -29
- package/dist/types/components/layout/tabs/tabs.types.d.ts +0 -14
- package/dist/types/components/layout/tabs/tabs.utils.d.ts +0 -4
- package/dist/types/components/layout/tabs/test/tabs.cmp.test.d.ts +0 -1
- package/dist/types/components/layout/toolbar/toolbar.d.ts +0 -27
- package/dist/types/components/layout/toolbar/toolbar.types.d.ts +0 -1
- package/dist/types/components/media/avatar/avatar.d.ts +0 -37
- package/dist/types/components/media/avatar/avatar.types.d.ts +0 -2
- package/dist/types/components/media/icon/icon.d.ts +0 -48
- package/dist/types/components/media/icon/icon.types.d.ts +0 -30
- package/dist/types/components/media/icon/internals/constants.d.ts +0 -3
- package/dist/types/components/media/icon/internals/fetch-icon.d.ts +0 -1
- package/dist/types/components/media/icon/internals/fetch-icon.unit.test.d.ts +0 -1
- package/dist/types/components/media/icon/internals/policy.d.ts +0 -19
- package/dist/types/components/media/icon/internals/policy.unit.test.d.ts +0 -1
- package/dist/types/components/media/icon/internals/registry-lucide.unit.test.d.ts +0 -1
- package/dist/types/components/media/icon/internals/registry.d.ts +0 -11
- package/dist/types/components/media/icon/internals/registry.unit.test.d.ts +0 -1
- package/dist/types/components/media/icon/internals/render-definition.d.ts +0 -2
- package/dist/types/components/media/icon/internals/sanitize-svg.d.ts +0 -2
- package/dist/types/components/media/icon/internals/size.d.ts +0 -2
- package/dist/types/components/media/icon/internals/url.d.ts +0 -11
- package/dist/types/components/media/icon/internals/url.unit.test.d.ts +0 -1
- package/dist/types/components/media/icon/test/icon-fixtures.d.ts +0 -4
- package/dist/types/components/media/icon/test/icon.cmp.test.d.ts +0 -1
- package/dist/types/components/media/image-comparison/image-comparison.d.ts +0 -63
- package/dist/types/components/media/image-comparison/test/image-comparison.cmp.test.d.ts +0 -1
- package/dist/types/components/media/media/media.d.ts +0 -13
- package/dist/types/components/media/media/media.types.d.ts +0 -2
- package/dist/types/components/media/reel/reel.d.ts +0 -34
- package/dist/types/components/media/reel/reel.types.d.ts +0 -3
- package/dist/types/components/media/thumbnail/thumbnail.d.ts +0 -21
- package/dist/types/components/media/thumbnail/thumbnail.types.d.ts +0 -7
- package/dist/types/components/overlays/dialog/dialog.d.ts +0 -83
- package/dist/types/components/overlays/dialog/dialog.types.d.ts +0 -1
- package/dist/types/components/overlays/dialog/internals/backdrop.d.ts +0 -2
- package/dist/types/components/overlays/dialog/internals/lifecycle.d.ts +0 -21
- package/dist/types/components/overlays/tooltip/internals/aria.d.ts +0 -13
- package/dist/types/components/overlays/tooltip/internals/positioning.d.ts +0 -7
- package/dist/types/components/overlays/tooltip/internals/scroll-listeners.d.ts +0 -2
- package/dist/types/components/overlays/tooltip/tooltip.d.ts +0 -33
- package/dist/types/components/overlays/tooltip/tooltip.types.d.ts +0 -1
- package/dist/types/components/shared/field.d.ts +0 -3
- package/dist/types/components/shared/test/orientation.cmp.test.d.ts +0 -1
- package/dist/types/components.d.ts +0 -6047
- package/dist/types/declarations.d.ts +0 -14
- package/dist/types/index.d.ts +0 -31
- package/dist/types/playground/components/playground-code-preview/playground-code-preview.d.ts +0 -9
- package/dist/types/playground/components/playground-event-log/playground-event-log.d.ts +0 -11
- package/dist/types/playground/components/playground-header/playground-header.d.ts +0 -10
- package/dist/types/playground/components/playground-sidebar/playground-sidebar.d.ts +0 -13
- package/dist/types/playground/components/properties-panel/properties-panel.d.ts +0 -15
- package/dist/types/playground/components/properties-panel/property-row.d.ts +0 -6
- package/dist/types/playground/components/properties-panel/slot-row.d.ts +0 -7
- package/dist/types/playground/components/sandbox-viewport/sandbox-panel.d.ts +0 -15
- package/dist/types/playground/components/sandbox-viewport/sandbox-viewport.d.ts +0 -14
- package/dist/types/playground/components/sandbox-viewport/variant-card.d.ts +0 -7
- package/dist/types/playground/components/sandbox-viewport/viewport-tabs.d.ts +0 -5
- package/dist/types/playground/components/theme-designer/theme-designer.d.ts +0 -15
- package/dist/types/playground/components/theme-designer/token-row.d.ts +0 -14
- package/dist/types/playground/components/theme-designer/token-section.d.ts +0 -7
- package/dist/types/playground/dom-factory.d.ts +0 -12
- package/dist/types/playground/events.d.ts +0 -24
- package/dist/types/playground/playground.d.ts +0 -7
- package/dist/types/playground/state.d.ts +0 -44
- package/dist/types/playground/utils/color.d.ts +0 -8
- package/dist/types/playground/utils/dom.d.ts +0 -15
- package/dist/types/playground/utils/index.d.ts +0 -2
- package/dist/types/stencil-public-runtime.d.ts +0 -1879
- package/dist/types/theme/test/assets.d.ts +0 -4
- package/dist/types/theme/test/foundation.cmp.test.d.ts +0 -16
- package/dist/types/theme/test/presets.cmp.test.d.ts +0 -7
- package/dist/types/theme/tokens.d.ts +0 -141
- package/dist/types/utils/collection-identity.d.ts +0 -55
- package/dist/types/utils/collection-identity.unit.test.d.ts +0 -1
- package/dist/types/utils/dom.d.ts +0 -68
- package/dist/types/utils/form-control-validity.d.ts +0 -14
- package/dist/types/utils/form-field-adapter.d.ts +0 -17
- package/dist/types/utils/form-field-state.d.ts +0 -4
- package/dist/types/utils/form-reset-action.d.ts +0 -5
- package/dist/types/utils/form-submit-action.d.ts +0 -17
- package/dist/types/utils/form-submit-action.unit.test.d.ts +0 -1
- package/dist/types/utils/formatter.d.ts +0 -15
- package/dist/types/utils/formatter.unit.test.d.ts +0 -1
- package/dist/types/utils/image-crop.d.ts +0 -30
- package/dist/types/utils/image-crop.unit.test.d.ts +0 -1
- package/dist/types/utils/math.d.ts +0 -10
- package/dist/types/utils/syntax.d.ts +0 -13
- package/dist/types/utils/syntax.unit.test.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +0 -11
- package/dist/types/utils/utils.unit.test.d.ts +0 -1
- package/dist/webquark/index.esm.js +0 -1
- package/dist/webquark/native-content.css +0 -24
- package/dist/webquark/p-04c8cb9e.entry.js +0 -1
- package/dist/webquark/p-059daa8a.entry.js +0 -1
- package/dist/webquark/p-09cca7b9.entry.js +0 -1
- package/dist/webquark/p-0ae43d6c.entry.js +0 -1
- package/dist/webquark/p-0c3aac3f.entry.js +0 -1
- package/dist/webquark/p-144ef339.entry.js +0 -1
- package/dist/webquark/p-1d1f7bc3.entry.js +0 -1
- package/dist/webquark/p-296fbdb1.entry.js +0 -1
- package/dist/webquark/p-36118d90.entry.js +0 -1
- package/dist/webquark/p-4d61b70d.entry.js +0 -1
- package/dist/webquark/p-64096386.entry.js +0 -1
- package/dist/webquark/p-6bfffa79.entry.js +0 -1
- package/dist/webquark/p-70d9ffde.entry.js +0 -1
- package/dist/webquark/p-8ece2c62.entry.js +0 -1
- package/dist/webquark/p-91fff6b6.entry.js +0 -1
- package/dist/webquark/p-923dac41.entry.js +0 -1
- package/dist/webquark/p-97a89cae.entry.js +0 -1
- package/dist/webquark/p-99d785ca.entry.js +0 -1
- package/dist/webquark/p-9e78b796.entry.js +0 -1
- package/dist/webquark/p-B4Mg1xEw.js +0 -1
- package/dist/webquark/p-B5ElFlHv.js +0 -3
- package/dist/webquark/p-BIIQL66b.js +0 -1
- package/dist/webquark/p-BJiYCN3i.js +0 -1
- package/dist/webquark/p-BOdNg0jc.js +0 -1
- package/dist/webquark/p-BcL0NVv0.js +0 -1
- package/dist/webquark/p-Bj2RJb2E.js +0 -1
- package/dist/webquark/p-ByfrUWx1.js +0 -1
- package/dist/webquark/p-CGZPmEUB.js +0 -1
- package/dist/webquark/p-CGml_DQ8.js +0 -1
- package/dist/webquark/p-C_RztzNv.js +0 -5
- package/dist/webquark/p-CoIMrUb3.js +0 -1
- package/dist/webquark/p-DKrPmn2y.js +0 -13
- package/dist/webquark/p-DWO-pleQ.js +0 -1
- package/dist/webquark/p-DYMWBqU1.js +0 -5
- package/dist/webquark/p-Dhsn99q4.js +0 -1
- package/dist/webquark/p-DstNl_WY.js +0 -1
- package/dist/webquark/p-DuX-9GOi.js +0 -1
- package/dist/webquark/p-GHhpSfZU.js +0 -1
- package/dist/webquark/p-SzKf4WZF.js +0 -1
- package/dist/webquark/p-c523ec6f.entry.js +0 -1
- package/dist/webquark/p-d0253d64.entry.js +0 -1
- package/dist/webquark/p-d0fbd2b1.entry.js +0 -1
- package/dist/webquark/p-dd115868.entry.js +0 -1
- package/dist/webquark/p-f4f97e74.entry.js +0 -1
- package/dist/webquark/p-f63b7214.entry.js +0 -1
- package/dist/webquark/p-f98f9439.entry.js +0 -1
- package/dist/webquark/p-f9ad63ff.entry.js +0 -1
- package/dist/webquark/p-fe200f68.entry.js +0 -1
- package/dist/webquark/p-fe8c634a.entry.js +0 -13
- package/dist/webquark/p-fec6fe0a.entry.js +0 -1
- package/dist/webquark/webquark.css +0 -1
- package/dist/webquark/webquark.esm.js +0 -1
- /package/dist/{collection → browser}/native-content.css +0 -0
|
@@ -1,3865 +0,0 @@
|
|
|
1
|
-
// src/playground/state.ts
|
|
2
|
-
var activeEffect = null;
|
|
3
|
-
var registeredEffects = new Set;
|
|
4
|
-
function signal(initialValue) {
|
|
5
|
-
let value = initialValue;
|
|
6
|
-
const subscribers = new Set;
|
|
7
|
-
const getter = () => {
|
|
8
|
-
if (activeEffect) {
|
|
9
|
-
subscribers.add(activeEffect);
|
|
10
|
-
}
|
|
11
|
-
return value;
|
|
12
|
-
};
|
|
13
|
-
getter.set = (newValue) => {
|
|
14
|
-
if (value !== newValue) {
|
|
15
|
-
value = newValue;
|
|
16
|
-
[...subscribers].filter((fn) => registeredEffects.has(fn)).forEach((run) => run());
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
getter.update = (fn) => {
|
|
20
|
-
getter.set(fn(value));
|
|
21
|
-
};
|
|
22
|
-
return getter;
|
|
23
|
-
}
|
|
24
|
-
function effect(fn) {
|
|
25
|
-
const run = () => {
|
|
26
|
-
activeEffect = run;
|
|
27
|
-
try {
|
|
28
|
-
fn();
|
|
29
|
-
} finally {
|
|
30
|
-
activeEffect = null;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
registeredEffects.add(run);
|
|
34
|
-
run();
|
|
35
|
-
return () => registeredEffects.delete(run);
|
|
36
|
-
}
|
|
37
|
-
function computed(fn) {
|
|
38
|
-
const derived = signal();
|
|
39
|
-
effect(() => {
|
|
40
|
-
derived.set(fn());
|
|
41
|
-
});
|
|
42
|
-
return derived;
|
|
43
|
-
}
|
|
44
|
-
var SPEC_BASE_URL = "/playground/specs";
|
|
45
|
-
var activeComponent = signal("q-button");
|
|
46
|
-
var activeTab = signal("sandbox");
|
|
47
|
-
var theme = signal(document.documentElement.getAttribute("data-theme") || "dark");
|
|
48
|
-
var componentRegistry = signal({});
|
|
49
|
-
var activeSpec = computed(() => {
|
|
50
|
-
const registry = componentRegistry();
|
|
51
|
-
const active = activeComponent();
|
|
52
|
-
return registry[active] || null;
|
|
53
|
-
});
|
|
54
|
-
async function fetchComponentSpec(tag) {
|
|
55
|
-
const registry = { ...componentRegistry() };
|
|
56
|
-
if (registry[tag])
|
|
57
|
-
return;
|
|
58
|
-
try {
|
|
59
|
-
const res = await fetch(`${SPEC_BASE_URL}/${tag}.sandbox.json`);
|
|
60
|
-
if (!res.ok)
|
|
61
|
-
throw new Error(`HTTP ${res.status}`);
|
|
62
|
-
const spec = await res.json();
|
|
63
|
-
if (spec.props) {
|
|
64
|
-
Object.keys(spec.props).forEach((p) => {
|
|
65
|
-
if (spec.props) {
|
|
66
|
-
spec.props[p].currentValue = spec.props[p].default;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
if (spec.slots) {
|
|
71
|
-
Object.keys(spec.slots).forEach((s) => {
|
|
72
|
-
if (spec.slots) {
|
|
73
|
-
spec.slots[s].currentValue = spec.slots[s].default || "";
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
registry[tag] = spec;
|
|
78
|
-
componentRegistry.set(registry);
|
|
79
|
-
} catch (err) {
|
|
80
|
-
console.error(`Failed to fetch spec for ${tag}:`, err);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function updateKnobValue(type, name, value) {
|
|
84
|
-
const registry = { ...componentRegistry() };
|
|
85
|
-
const spec = registry[activeComponent()];
|
|
86
|
-
if (!spec)
|
|
87
|
-
return;
|
|
88
|
-
if (type === "prop" && spec.props) {
|
|
89
|
-
spec.props[name].currentValue = value;
|
|
90
|
-
} else if (type === "slot" && spec.slots) {
|
|
91
|
-
spec.slots[name].currentValue = value;
|
|
92
|
-
}
|
|
93
|
-
componentRegistry.set(registry);
|
|
94
|
-
}
|
|
95
|
-
function serializeComponentCode(tag, props, slots, appendScript = null) {
|
|
96
|
-
let code = `<${tag}`;
|
|
97
|
-
if (props) {
|
|
98
|
-
Object.keys(props).forEach((k) => {
|
|
99
|
-
const p = props[k];
|
|
100
|
-
const val = p && typeof p === "object" && "currentValue" in p ? p.currentValue : p;
|
|
101
|
-
if (val === true) {
|
|
102
|
-
code += ` ${k}`;
|
|
103
|
-
} else if (val !== undefined && val !== null && val !== "") {
|
|
104
|
-
code += ` ${k}="${val}"`;
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
code += ">";
|
|
109
|
-
let slotContent = "";
|
|
110
|
-
if (slots) {
|
|
111
|
-
if (typeof slots === "string") {
|
|
112
|
-
if (slots) {
|
|
113
|
-
slotContent += `
|
|
114
|
-
${slots.replace(/\n/g, `
|
|
115
|
-
`)}
|
|
116
|
-
`;
|
|
117
|
-
}
|
|
118
|
-
} else {
|
|
119
|
-
Object.keys(slots).forEach((slotName) => {
|
|
120
|
-
const s = slots[slotName];
|
|
121
|
-
const val = s && typeof s === "object" && "currentValue" in s ? s.currentValue : s;
|
|
122
|
-
if (val) {
|
|
123
|
-
if (slotName === "default") {
|
|
124
|
-
slotContent += `
|
|
125
|
-
${val.replace(/\n/g, `
|
|
126
|
-
`)}
|
|
127
|
-
`;
|
|
128
|
-
} else {
|
|
129
|
-
if (typeof val === "string" && val.includes(`slot="${slotName}"`)) {
|
|
130
|
-
slotContent += `
|
|
131
|
-
${val.replace(/\n/g, `
|
|
132
|
-
`)}
|
|
133
|
-
`;
|
|
134
|
-
} else {
|
|
135
|
-
slotContent += `
|
|
136
|
-
<span slot="${slotName}">${val.replace(/\n/g, `
|
|
137
|
-
`)}</span>
|
|
138
|
-
`;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
if (slotContent) {
|
|
146
|
-
code += slotContent + `</${tag}>`;
|
|
147
|
-
} else {
|
|
148
|
-
code += `</${tag}>`;
|
|
149
|
-
}
|
|
150
|
-
if (appendScript) {
|
|
151
|
-
code += appendScript;
|
|
152
|
-
}
|
|
153
|
-
return code;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// src/playground/dom-factory.ts
|
|
157
|
-
function h(tag, attrs, ...children) {
|
|
158
|
-
if (typeof tag === "function") {
|
|
159
|
-
return tag(attrs || {});
|
|
160
|
-
}
|
|
161
|
-
const el = document.createElement(tag);
|
|
162
|
-
if (attrs) {
|
|
163
|
-
Object.keys(attrs).forEach((key) => {
|
|
164
|
-
const val = attrs[key];
|
|
165
|
-
if (val === undefined || val === null || val === false) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (key.startsWith("on") && typeof val === "function") {
|
|
169
|
-
const rawEventName = key.slice(2);
|
|
170
|
-
const nativeEvents = ["click", "input", "change", "focus", "blur", "keydown", "keyup", "keypress", "submit", "scroll"];
|
|
171
|
-
const lowerEvent = rawEventName.toLowerCase();
|
|
172
|
-
const eventName = nativeEvents.includes(lowerEvent) ? lowerEvent : rawEventName.charAt(0).toLowerCase() + rawEventName.slice(1);
|
|
173
|
-
el.addEventListener(eventName, val);
|
|
174
|
-
} else if (key === "className" || key === "class") {
|
|
175
|
-
if (typeof val === "object") {
|
|
176
|
-
const classes = Object.keys(val).filter((k) => !!val[k]).join(" ");
|
|
177
|
-
el.setAttribute("class", classes);
|
|
178
|
-
} else {
|
|
179
|
-
el.setAttribute("class", String(val));
|
|
180
|
-
}
|
|
181
|
-
} else if (key.startsWith("data-")) {
|
|
182
|
-
el.setAttribute(key, String(val));
|
|
183
|
-
} else if (key in el && key !== "style") {
|
|
184
|
-
try {
|
|
185
|
-
el[key] = val;
|
|
186
|
-
} catch {
|
|
187
|
-
el.setAttribute(key, String(val));
|
|
188
|
-
}
|
|
189
|
-
} else {
|
|
190
|
-
el.setAttribute(key, String(val));
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
const appendChildren = (childList) => {
|
|
195
|
-
childList.forEach((child) => {
|
|
196
|
-
if (child === undefined || child === null || child === false) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
if (Array.isArray(child)) {
|
|
200
|
-
appendChildren(child);
|
|
201
|
-
} else if (child instanceof Node) {
|
|
202
|
-
el.appendChild(child);
|
|
203
|
-
} else {
|
|
204
|
-
el.appendChild(document.createTextNode(String(child)));
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
appendChildren(children);
|
|
209
|
-
return el;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// src/playground/components/playground-header/playground-header.css
|
|
213
|
-
var playground_header_default = `.app-header {
|
|
214
|
-
display: flex;
|
|
215
|
-
align-items: center;
|
|
216
|
-
justify-content: space-between;
|
|
217
|
-
padding: 8px 16px;
|
|
218
|
-
min-height: 56px;
|
|
219
|
-
background: var(--q-bg-surface-2);
|
|
220
|
-
border-bottom: var(--q-border);
|
|
221
|
-
flex-shrink: 0;
|
|
222
|
-
box-sizing: border-box;
|
|
223
|
-
gap: 16px;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.header-logo {
|
|
227
|
-
display: flex;
|
|
228
|
-
align-items: center;
|
|
229
|
-
gap: 12px;
|
|
230
|
-
flex-shrink: 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.logo-image {
|
|
234
|
-
height: 28px;
|
|
235
|
-
width: auto;
|
|
236
|
-
display: block;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.logo-text {
|
|
240
|
-
font-size: 1.15rem;
|
|
241
|
-
font-weight: 700;
|
|
242
|
-
background: linear-gradient(135deg, var(--q-fg-base) 30%, var(--q-fg-muted) 100%);
|
|
243
|
-
-webkit-background-clip: text;
|
|
244
|
-
-webkit-text-fill-color: transparent;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.header-actions {
|
|
248
|
-
display: flex;
|
|
249
|
-
align-items: center;
|
|
250
|
-
gap: 20px;
|
|
251
|
-
flex-shrink: 0;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.action-btn {
|
|
255
|
-
background: var(--q-bg-surface-2);
|
|
256
|
-
border: var(--q-border);
|
|
257
|
-
color: var(--q-fg-base);
|
|
258
|
-
padding: 6px 12px;
|
|
259
|
-
border-radius: var(--q-radius-md);
|
|
260
|
-
font-size: 0.85rem;
|
|
261
|
-
font-weight: 500;
|
|
262
|
-
cursor: pointer;
|
|
263
|
-
transition:
|
|
264
|
-
background-color 0.2s,
|
|
265
|
-
color 0.2s,
|
|
266
|
-
border-color 0.2s;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.action-btn:hover {
|
|
270
|
-
background: var(--q-color-primary);
|
|
271
|
-
color: var(--q-bg-base);
|
|
272
|
-
border-color: var(--q-color-primary);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/* Hamburger Menu Toggle styles */
|
|
276
|
-
.hamburger-menu {
|
|
277
|
-
display: none;
|
|
278
|
-
background: transparent;
|
|
279
|
-
border: none;
|
|
280
|
-
cursor: pointer;
|
|
281
|
-
padding: 8px;
|
|
282
|
-
flex-direction: column;
|
|
283
|
-
gap: 5px;
|
|
284
|
-
z-index: 1001;
|
|
285
|
-
justify-content: center;
|
|
286
|
-
align-items: center;
|
|
287
|
-
height: 40px;
|
|
288
|
-
width: 40px;
|
|
289
|
-
border-radius: var(--q-radius-md);
|
|
290
|
-
margin-right: 8px;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.hamburger-menu:hover {
|
|
294
|
-
background: var(--q-btn-hover-overlay);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.hamburger-line {
|
|
298
|
-
display: block;
|
|
299
|
-
width: 20px;
|
|
300
|
-
height: 2px;
|
|
301
|
-
background-color: var(--q-fg-base);
|
|
302
|
-
transition:
|
|
303
|
-
transform 0.3s ease,
|
|
304
|
-
opacity 0.3s ease;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/* Mobile responsive menu overrides */
|
|
308
|
-
@media (max-width: 900px) {
|
|
309
|
-
.hamburger-menu {
|
|
310
|
-
display: flex;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.hamburger-menu.open .hamburger-line:nth-child(1) {
|
|
314
|
-
transform: translateY(7px) rotate(45deg);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.hamburger-menu.open .hamburger-line:nth-child(2) {
|
|
318
|
-
opacity: 0;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.hamburger-menu.open .hamburger-line:nth-child(3) {
|
|
322
|
-
transform: translateY(-7px) rotate(-45deg);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.app-header {
|
|
326
|
-
padding: 8px 10px;
|
|
327
|
-
min-height: 52px;
|
|
328
|
-
gap: 12px;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.logo-text {
|
|
332
|
-
font-size: 1rem;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.header-actions {
|
|
336
|
-
gap: 10px;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
`;
|
|
340
|
-
|
|
341
|
-
// src/playground/components/playground-header/playground-header.tsx
|
|
342
|
-
class PlaygroundHeader extends HTMLElement {
|
|
343
|
-
cleanupThemeEffect;
|
|
344
|
-
hamburgerBtn = null;
|
|
345
|
-
connectedCallback() {
|
|
346
|
-
this.innerHTML = "";
|
|
347
|
-
this.appendChild(/* @__PURE__ */ h("header", {
|
|
348
|
-
class: "app-header"
|
|
349
|
-
}, /* @__PURE__ */ h("button", {
|
|
350
|
-
class: "hamburger-menu",
|
|
351
|
-
id: "hamburgerMenu",
|
|
352
|
-
"aria-label": "Toggle Menu",
|
|
353
|
-
type: "button",
|
|
354
|
-
onClick: () => this.toggleSidebar()
|
|
355
|
-
}, /* @__PURE__ */ h("span", {
|
|
356
|
-
class: "hamburger-line"
|
|
357
|
-
}), /* @__PURE__ */ h("span", {
|
|
358
|
-
class: "hamburger-line"
|
|
359
|
-
}), /* @__PURE__ */ h("span", {
|
|
360
|
-
class: "hamburger-line"
|
|
361
|
-
})), /* @__PURE__ */ h("div", {
|
|
362
|
-
class: "header-logo"
|
|
363
|
-
}, /* @__PURE__ */ h("img", {
|
|
364
|
-
src: "/logo.svg",
|
|
365
|
-
class: "logo-image",
|
|
366
|
-
alt: "WebQuark Logo"
|
|
367
|
-
}), /* @__PURE__ */ h("div", {
|
|
368
|
-
class: "logo-text"
|
|
369
|
-
}, "WebQuark")), /* @__PURE__ */ h("div", {
|
|
370
|
-
class: "header-actions"
|
|
371
|
-
}, /* @__PURE__ */ h("a", {
|
|
372
|
-
href: "./presets.html"
|
|
373
|
-
}, "Design presets"), /* @__PURE__ */ h("q-button", {
|
|
374
|
-
id: "themeToggle",
|
|
375
|
-
variant: "ghost",
|
|
376
|
-
onClick: () => this.toggleTheme()
|
|
377
|
-
}, /* @__PURE__ */ h("q-icon", {
|
|
378
|
-
id: "themeIcon",
|
|
379
|
-
slot: "icon-left",
|
|
380
|
-
name: "sun"
|
|
381
|
-
})))));
|
|
382
|
-
const styleId = "playground-header-style";
|
|
383
|
-
if (!document.getElementById(styleId)) {
|
|
384
|
-
const style = document.createElement("style");
|
|
385
|
-
style.id = styleId;
|
|
386
|
-
style.textContent = playground_header_default;
|
|
387
|
-
document.head.appendChild(style);
|
|
388
|
-
}
|
|
389
|
-
this.init();
|
|
390
|
-
}
|
|
391
|
-
init() {
|
|
392
|
-
this.hamburgerBtn = this.querySelector("#hamburgerMenu");
|
|
393
|
-
const backdrop = document.getElementById("sidebarBackdrop");
|
|
394
|
-
this.cleanupThemeEffect = effect(() => {
|
|
395
|
-
const currentTheme = theme();
|
|
396
|
-
document.documentElement.setAttribute("data-theme", currentTheme);
|
|
397
|
-
const iconEl = this.querySelector("#themeIcon");
|
|
398
|
-
if (iconEl) {
|
|
399
|
-
iconEl.setAttribute("name", currentTheme === "dark" ? "sun" : "moon");
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
if (backdrop) {
|
|
403
|
-
backdrop.addEventListener("click", () => {
|
|
404
|
-
const sidebar = document.querySelector("playground-sidebar");
|
|
405
|
-
if (sidebar)
|
|
406
|
-
sidebar.classList.remove("open");
|
|
407
|
-
backdrop.classList.remove("active");
|
|
408
|
-
if (this.hamburgerBtn)
|
|
409
|
-
this.hamburgerBtn.classList.remove("open");
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
toggleTheme() {
|
|
414
|
-
const newTheme = theme() === "dark" ? "light" : "dark";
|
|
415
|
-
theme.set(newTheme);
|
|
416
|
-
}
|
|
417
|
-
toggleSidebar() {
|
|
418
|
-
const sidebar = document.querySelector("playground-sidebar");
|
|
419
|
-
const backdrop = document.getElementById("sidebarBackdrop");
|
|
420
|
-
if (sidebar)
|
|
421
|
-
sidebar.classList.toggle("open");
|
|
422
|
-
if (backdrop)
|
|
423
|
-
backdrop.classList.toggle("active");
|
|
424
|
-
if (this.hamburgerBtn)
|
|
425
|
-
this.hamburgerBtn.classList.toggle("open");
|
|
426
|
-
}
|
|
427
|
-
disconnectedCallback() {
|
|
428
|
-
if (this.cleanupThemeEffect) {
|
|
429
|
-
this.cleanupThemeEffect();
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
customElements.define("playground-header", PlaygroundHeader);
|
|
434
|
-
|
|
435
|
-
// src/playground/components/playground-sidebar/playground-sidebar.css
|
|
436
|
-
var playground_sidebar_default = `/* playground-sidebar.css
|
|
437
|
-
All nav item rendering is handled by q-sidepanel variant="nav".
|
|
438
|
-
This file only styles the host element layout, the Global Styling footer
|
|
439
|
-
button (slotted light DOM), and mobile responsive overrides. */
|
|
440
|
-
|
|
441
|
-
playground-sidebar {
|
|
442
|
-
display: flex;
|
|
443
|
-
flex-direction: column;
|
|
444
|
-
flex-shrink: 0;
|
|
445
|
-
height: 100%;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
playground-sidebar q-sidepanel {
|
|
449
|
-
--q-sidepanel-bg: var(--q-bg-surface-2);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
/* Global Styling footer button — lives in q-sidepanel's footer slot (light DOM) */
|
|
453
|
-
.global-styling-btn {
|
|
454
|
-
display: flex;
|
|
455
|
-
align-items: center;
|
|
456
|
-
justify-content: center;
|
|
457
|
-
gap: 8px;
|
|
458
|
-
width: calc(100% - 24px);
|
|
459
|
-
margin: 4px 12px;
|
|
460
|
-
background: var(--q-bg-surface-2);
|
|
461
|
-
border: var(--q-border);
|
|
462
|
-
color: var(--q-fg-base);
|
|
463
|
-
padding: 10px 16px;
|
|
464
|
-
border-radius: var(--q-radius-md, 8px);
|
|
465
|
-
font-size: 0.9rem;
|
|
466
|
-
font-weight: 600;
|
|
467
|
-
cursor: pointer;
|
|
468
|
-
transition: all 0.2s ease;
|
|
469
|
-
box-sizing: border-box;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.global-styling-btn:hover {
|
|
473
|
-
background: color-mix(in srgb, var(--q-fg-base) 5%, var(--q-bg-surface-2));
|
|
474
|
-
color: var(--q-fg-base);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.global-styling-btn.active {
|
|
478
|
-
background: color-mix(in srgb, var(--q-color-primary) 12%, transparent);
|
|
479
|
-
color: var(--q-color-primary);
|
|
480
|
-
border-color: var(--q-color-primary);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.global-styling-btn:focus-visible {
|
|
484
|
-
outline: var(--q-focus-ring);
|
|
485
|
-
outline-offset: -2px;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
/* Mobile responsive: q-sidepanel handles its own internal layout,
|
|
489
|
-
we just control the host element position on small screens */
|
|
490
|
-
@media (max-width: 900px) {
|
|
491
|
-
playground-sidebar {
|
|
492
|
-
position: fixed;
|
|
493
|
-
top: 64px;
|
|
494
|
-
left: 0;
|
|
495
|
-
bottom: 0;
|
|
496
|
-
width: 280px;
|
|
497
|
-
height: calc(100vh - 64px);
|
|
498
|
-
z-index: 1000;
|
|
499
|
-
transform: translateX(-100%);
|
|
500
|
-
transition: transform 220ms ease-out;
|
|
501
|
-
box-shadow: var(--q-shadow-high);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
playground-sidebar.open {
|
|
505
|
-
transform: translateX(0);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
`;
|
|
509
|
-
|
|
510
|
-
// src/playground/components/playground-sidebar/playground-sidebar.tsx
|
|
511
|
-
var CATEGORY_LABELS = {
|
|
512
|
-
actions: "Actions",
|
|
513
|
-
communication: "Communication",
|
|
514
|
-
content: "Content",
|
|
515
|
-
"data-display": "Data display",
|
|
516
|
-
inputs: "Forms & inputs",
|
|
517
|
-
indicators: "Indicators",
|
|
518
|
-
layout: "Layout",
|
|
519
|
-
media: "Media",
|
|
520
|
-
overlays: "Overlays"
|
|
521
|
-
};
|
|
522
|
-
var CATEGORY_ORDER = Object.keys(CATEGORY_LABELS);
|
|
523
|
-
|
|
524
|
-
class PlaygroundSidebar extends HTMLElement {
|
|
525
|
-
components = [];
|
|
526
|
-
navPanel = null;
|
|
527
|
-
globalStylingBtn = null;
|
|
528
|
-
handleNavSelect;
|
|
529
|
-
cleanupActiveEffect;
|
|
530
|
-
async connectedCallback() {
|
|
531
|
-
try {
|
|
532
|
-
const res = await fetch("/playground/components.manifest.json");
|
|
533
|
-
if (!res.ok)
|
|
534
|
-
throw new Error(`HTTP ${res.status}`);
|
|
535
|
-
this.components = await res.json();
|
|
536
|
-
} catch (err) {
|
|
537
|
-
console.error("[playground-sidebar] Failed to load components.manifest.json:", err);
|
|
538
|
-
this.components = [];
|
|
539
|
-
}
|
|
540
|
-
this.innerHTML = "";
|
|
541
|
-
this.appendChild(/* @__PURE__ */ h("q-sidepanel", {
|
|
542
|
-
id: "sidebarNav",
|
|
543
|
-
variant: "nav",
|
|
544
|
-
mode: "tree"
|
|
545
|
-
}, /* @__PURE__ */ h("div", {
|
|
546
|
-
slot: "footer"
|
|
547
|
-
}, /* @__PURE__ */ h("button", {
|
|
548
|
-
id: "globalStylingBtn",
|
|
549
|
-
class: "global-styling-btn",
|
|
550
|
-
type: "button",
|
|
551
|
-
onClick: () => activeComponent.set("global-styling")
|
|
552
|
-
}, /* @__PURE__ */ h("q-icon", {
|
|
553
|
-
name: "globe",
|
|
554
|
-
library: "lucide",
|
|
555
|
-
size: "16"
|
|
556
|
-
}), /* @__PURE__ */ h("span", null, "Global Styling")))));
|
|
557
|
-
const styleId = "playground-sidebar-style";
|
|
558
|
-
if (!document.getElementById(styleId)) {
|
|
559
|
-
const style = document.createElement("style");
|
|
560
|
-
style.id = styleId;
|
|
561
|
-
style.textContent = playground_sidebar_default;
|
|
562
|
-
document.head.appendChild(style);
|
|
563
|
-
}
|
|
564
|
-
this.init();
|
|
565
|
-
}
|
|
566
|
-
init() {
|
|
567
|
-
this.navPanel = this.querySelector("#sidebarNav");
|
|
568
|
-
this.globalStylingBtn = this.querySelector("#globalStylingBtn");
|
|
569
|
-
if (!this.navPanel)
|
|
570
|
-
return;
|
|
571
|
-
this.navPanel.items = this.buildNavItems();
|
|
572
|
-
this.handleNavSelect = (e) => {
|
|
573
|
-
const { value } = e.detail;
|
|
574
|
-
activeTab.set("sandbox");
|
|
575
|
-
activeComponent.set(value);
|
|
576
|
-
fetchComponentSpec(value);
|
|
577
|
-
};
|
|
578
|
-
this.navPanel.addEventListener("qSelect", this.handleNavSelect);
|
|
579
|
-
this.cleanupActiveEffect = effect(() => {
|
|
580
|
-
const active = activeComponent();
|
|
581
|
-
if (this.navPanel) {
|
|
582
|
-
this.navPanel.value = active;
|
|
583
|
-
}
|
|
584
|
-
if (this.globalStylingBtn) {
|
|
585
|
-
this.globalStylingBtn.classList.toggle("active", active === "global-styling");
|
|
586
|
-
}
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
buildNavItems() {
|
|
590
|
-
const grouped = new Map;
|
|
591
|
-
this.components.forEach((component) => {
|
|
592
|
-
const category = component.category || "other";
|
|
593
|
-
const components = grouped.get(category) ?? [];
|
|
594
|
-
components.push(component);
|
|
595
|
-
grouped.set(category, components);
|
|
596
|
-
});
|
|
597
|
-
const orderedCategories = [
|
|
598
|
-
...CATEGORY_ORDER,
|
|
599
|
-
...Array.from(grouped.keys()).filter((category) => !CATEGORY_LABELS[category]).sort()
|
|
600
|
-
];
|
|
601
|
-
return orderedCategories.filter((category) => grouped.has(category)).map((category) => ({
|
|
602
|
-
label: CATEGORY_LABELS[category] ?? this.toTitleCase(category),
|
|
603
|
-
value: `category:${category}`,
|
|
604
|
-
children: grouped.get(category).map((component) => ({
|
|
605
|
-
label: component.name,
|
|
606
|
-
value: component.tag
|
|
607
|
-
}))
|
|
608
|
-
}));
|
|
609
|
-
}
|
|
610
|
-
toTitleCase(value) {
|
|
611
|
-
return value.split(/[-_\s]+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
612
|
-
}
|
|
613
|
-
disconnectedCallback() {
|
|
614
|
-
if (this.cleanupActiveEffect) {
|
|
615
|
-
this.cleanupActiveEffect();
|
|
616
|
-
}
|
|
617
|
-
if (this.navPanel && this.handleNavSelect) {
|
|
618
|
-
this.navPanel.removeEventListener("qSelect", this.handleNavSelect);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
customElements.define("playground-sidebar", PlaygroundSidebar);
|
|
623
|
-
|
|
624
|
-
// src/playground/components/sandbox-viewport/viewport-tabs.tsx
|
|
625
|
-
class ViewportTabs extends HTMLElement {
|
|
626
|
-
cleanupEffect;
|
|
627
|
-
connectedCallback() {
|
|
628
|
-
this.innerHTML = "";
|
|
629
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
630
|
-
class: "tabs-bar",
|
|
631
|
-
id: "tabsBar"
|
|
632
|
-
}, /* @__PURE__ */ h("div", {
|
|
633
|
-
class: "tab-buttons"
|
|
634
|
-
}, /* @__PURE__ */ h("button", {
|
|
635
|
-
class: "tab-btn",
|
|
636
|
-
"data-tab": "sandbox"
|
|
637
|
-
}, "Sandbox"), /* @__PURE__ */ h("button", {
|
|
638
|
-
class: "tab-btn",
|
|
639
|
-
"data-tab": "variants"
|
|
640
|
-
}, "Variants"), /* @__PURE__ */ h("button", {
|
|
641
|
-
class: "tab-btn",
|
|
642
|
-
"data-tab": "edgecases"
|
|
643
|
-
}, "Edge Cases")), /* @__PURE__ */ h("div", {
|
|
644
|
-
class: "active-component-badge",
|
|
645
|
-
id: "activeCompBadge"
|
|
646
|
-
}, "q-button")));
|
|
647
|
-
const tabsBar = this.querySelector("#tabsBar");
|
|
648
|
-
const activeCompBadge = this.querySelector("#activeCompBadge");
|
|
649
|
-
const tabBtns = this.querySelectorAll(".tab-btn");
|
|
650
|
-
tabBtns.forEach((btn) => {
|
|
651
|
-
btn.addEventListener("click", () => {
|
|
652
|
-
const nextTab = btn.dataset.tab;
|
|
653
|
-
if (nextTab) {
|
|
654
|
-
activeTab.set(nextTab);
|
|
655
|
-
}
|
|
656
|
-
});
|
|
657
|
-
});
|
|
658
|
-
this.cleanupEffect = effect(() => {
|
|
659
|
-
const active = activeComponent();
|
|
660
|
-
const tab = activeTab();
|
|
661
|
-
if (activeCompBadge) {
|
|
662
|
-
activeCompBadge.innerText = active === "global-styling" ? "Global Styling" : active;
|
|
663
|
-
}
|
|
664
|
-
if (tabsBar) {
|
|
665
|
-
tabsBar.style.display = active === "global-styling" ? "none" : "";
|
|
666
|
-
}
|
|
667
|
-
tabBtns.forEach((btn) => {
|
|
668
|
-
btn.classList.toggle("active", btn.dataset.tab === tab);
|
|
669
|
-
});
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
disconnectedCallback() {
|
|
673
|
-
if (this.cleanupEffect) {
|
|
674
|
-
this.cleanupEffect();
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
customElements.define("viewport-tabs", ViewportTabs);
|
|
679
|
-
|
|
680
|
-
// src/playground/events.ts
|
|
681
|
-
class TypedEventBus {
|
|
682
|
-
listeners = {};
|
|
683
|
-
on(event, callback) {
|
|
684
|
-
if (!this.listeners[event]) {
|
|
685
|
-
this.listeners[event] = new Set;
|
|
686
|
-
}
|
|
687
|
-
this.listeners[event].add(callback);
|
|
688
|
-
return () => this.off(event, callback);
|
|
689
|
-
}
|
|
690
|
-
off(event, callback) {
|
|
691
|
-
if (this.listeners[event]) {
|
|
692
|
-
this.listeners[event].delete(callback);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
emit(event, data) {
|
|
696
|
-
if (this.listeners[event]) {
|
|
697
|
-
this.listeners[event].forEach((callback) => {
|
|
698
|
-
try {
|
|
699
|
-
callback(data);
|
|
700
|
-
} catch (err) {
|
|
701
|
-
console.error(`Error in event listener for event "${String(event)}":`, err);
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
var playgroundBus = new TypedEventBus;
|
|
708
|
-
|
|
709
|
-
// src/playground/utils/color.ts
|
|
710
|
-
function convertToHex(rgbVal) {
|
|
711
|
-
if (!rgbVal)
|
|
712
|
-
return "#000000";
|
|
713
|
-
rgbVal = rgbVal.trim();
|
|
714
|
-
if (rgbVal.startsWith("#")) {
|
|
715
|
-
return rgbVal;
|
|
716
|
-
}
|
|
717
|
-
const match = rgbVal.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i);
|
|
718
|
-
if (match) {
|
|
719
|
-
const r = parseInt(match[1], 10);
|
|
720
|
-
const g = parseInt(match[2], 10);
|
|
721
|
-
const b = parseInt(match[3], 10);
|
|
722
|
-
return "#" + [r, g, b].map((x) => {
|
|
723
|
-
const hex = x.toString(16);
|
|
724
|
-
return hex.length === 1 ? "0" + hex : hex;
|
|
725
|
-
}).join("");
|
|
726
|
-
}
|
|
727
|
-
return rgbVal;
|
|
728
|
-
}
|
|
729
|
-
// src/playground/utils/dom.ts
|
|
730
|
-
function setElementProperties(el, props) {
|
|
731
|
-
if (!el || !props)
|
|
732
|
-
return;
|
|
733
|
-
const tag = el.tagName?.toLowerCase();
|
|
734
|
-
Object.keys(props).forEach((pName) => {
|
|
735
|
-
const val = props[pName];
|
|
736
|
-
const isBoolean = typeof val === "boolean" || val === "true" || val === "false";
|
|
737
|
-
if (isBoolean) {
|
|
738
|
-
const boolVal = val === true || val === "true";
|
|
739
|
-
if (tag === "q-toggle" && pName === "checked" && typeof el.setChecked === "function") {
|
|
740
|
-
el.setChecked(boolVal);
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
el[pName] = boolVal;
|
|
744
|
-
if (boolVal)
|
|
745
|
-
el.setAttribute(pName, "");
|
|
746
|
-
else
|
|
747
|
-
el.removeAttribute(pName);
|
|
748
|
-
} else {
|
|
749
|
-
el[pName] = val;
|
|
750
|
-
if (val !== undefined && val !== null && val !== "") {
|
|
751
|
-
el.setAttribute(pName, val);
|
|
752
|
-
} else {
|
|
753
|
-
el.removeAttribute(pName);
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
// src/playground/components/sandbox-viewport/sandbox-panel.tsx
|
|
759
|
-
var SYNCBACK_MAP = {
|
|
760
|
-
"q-sidepanel": { qClose: (cfg, _det) => {
|
|
761
|
-
if (cfg.props)
|
|
762
|
-
cfg.props.open.currentValue = false;
|
|
763
|
-
} },
|
|
764
|
-
"q-dialog": { qClose: (cfg, _det) => {
|
|
765
|
-
if (cfg.props)
|
|
766
|
-
cfg.props.open.currentValue = false;
|
|
767
|
-
} },
|
|
768
|
-
"q-dropdown": { qChange: (cfg, det) => {
|
|
769
|
-
if (cfg.props)
|
|
770
|
-
cfg.props.value.currentValue = det;
|
|
771
|
-
} },
|
|
772
|
-
"q-input": { qChange: (cfg, det) => {
|
|
773
|
-
if (cfg.props)
|
|
774
|
-
cfg.props.value.currentValue = det;
|
|
775
|
-
} },
|
|
776
|
-
"q-radio-group": { qChange: (cfg, det) => {
|
|
777
|
-
if (cfg.props)
|
|
778
|
-
cfg.props.value.currentValue = det;
|
|
779
|
-
} },
|
|
780
|
-
"q-textarea": { qChange: (cfg, det) => {
|
|
781
|
-
if (cfg.props)
|
|
782
|
-
cfg.props.value.currentValue = det;
|
|
783
|
-
} },
|
|
784
|
-
"q-toggle": { qChange: (cfg, det) => {
|
|
785
|
-
if (cfg.props)
|
|
786
|
-
cfg.props.checked.currentValue = det;
|
|
787
|
-
} }
|
|
788
|
-
};
|
|
789
|
-
|
|
790
|
-
class SandboxPanel extends HTMLElement {
|
|
791
|
-
stageContainer = null;
|
|
792
|
-
activeModule = null;
|
|
793
|
-
loadedTag = null;
|
|
794
|
-
syncedComponents = new Set;
|
|
795
|
-
previousSlotValues = new WeakMap;
|
|
796
|
-
cleanupEffect;
|
|
797
|
-
connectedCallback() {
|
|
798
|
-
this.innerHTML = "";
|
|
799
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
800
|
-
class: "sandbox-layout"
|
|
801
|
-
}, /* @__PURE__ */ h("div", {
|
|
802
|
-
class: "sandbox-main"
|
|
803
|
-
}, /* @__PURE__ */ h("div", {
|
|
804
|
-
class: "stage-container",
|
|
805
|
-
id: "stageContainer"
|
|
806
|
-
}), /* @__PURE__ */ h("div", {
|
|
807
|
-
class: "sandbox-bottom-panels"
|
|
808
|
-
}, /* @__PURE__ */ h("playground-event-log", null), /* @__PURE__ */ h("playground-code-preview", null)))));
|
|
809
|
-
this.stageContainer = this.querySelector("#stageContainer");
|
|
810
|
-
this.activeModule = null;
|
|
811
|
-
this.loadedTag = null;
|
|
812
|
-
this.syncedComponents = new Set;
|
|
813
|
-
this.cleanupEffect = effect(async () => {
|
|
814
|
-
const active = activeComponent();
|
|
815
|
-
const tab = activeTab();
|
|
816
|
-
const registry = componentRegistry();
|
|
817
|
-
const spec = registry[active];
|
|
818
|
-
if (active === "global-styling" || tab !== "sandbox" || !spec || !this.stageContainer) {
|
|
819
|
-
this.loadedTag = null;
|
|
820
|
-
return;
|
|
821
|
-
}
|
|
822
|
-
if (this.loadedTag !== active) {
|
|
823
|
-
this.loadedTag = active;
|
|
824
|
-
const CUSTOM_VIEW_TAGS = ["q-button", "q-input"];
|
|
825
|
-
if (CUSTOM_VIEW_TAGS.includes(active)) {
|
|
826
|
-
await this.loadComponentSandboxView(active, spec, registry);
|
|
827
|
-
} else {
|
|
828
|
-
this.renderFallback(active, spec);
|
|
829
|
-
}
|
|
830
|
-
} else {
|
|
831
|
-
const activeEl = this.stageContainer.querySelector(active);
|
|
832
|
-
if (activeEl) {
|
|
833
|
-
const STRUCTURAL_PROPS = ["type", "variant"];
|
|
834
|
-
const hasStructuralChange = STRUCTURAL_PROPS.some((propName) => {
|
|
835
|
-
if (!spec.props?.[propName])
|
|
836
|
-
return false;
|
|
837
|
-
const currentVal = activeEl.getAttribute(propName) ?? "";
|
|
838
|
-
const newVal = String(spec.props[propName].currentValue ?? "");
|
|
839
|
-
return currentVal !== newVal;
|
|
840
|
-
});
|
|
841
|
-
if (hasStructuralChange) {
|
|
842
|
-
this.loadedTag = null;
|
|
843
|
-
const CUSTOM_VIEW_TAGS = ["q-button", "q-input"];
|
|
844
|
-
if (CUSTOM_VIEW_TAGS.includes(active)) {
|
|
845
|
-
await this.loadComponentSandboxView(active, spec, registry);
|
|
846
|
-
} else {
|
|
847
|
-
this.renderFallback(active, spec);
|
|
848
|
-
}
|
|
849
|
-
this.loadedTag = active;
|
|
850
|
-
} else {
|
|
851
|
-
this.updateElementFromSpec(activeEl, spec);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
|
-
async loadComponentSandboxView(tag, spec, registry) {
|
|
858
|
-
if (!this.stageContainer)
|
|
859
|
-
return;
|
|
860
|
-
const isFirstLoad = !this.syncedComponents.has(tag);
|
|
861
|
-
if (isFirstLoad) {
|
|
862
|
-
this.syncedComponents.add(tag);
|
|
863
|
-
}
|
|
864
|
-
if (this.activeModule && typeof this.activeModule.destroy === "function") {
|
|
865
|
-
try {
|
|
866
|
-
this.activeModule.destroy(this.stageContainer);
|
|
867
|
-
} catch (err) {
|
|
868
|
-
console.error(`Error destroying previous module:`, err);
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
this.activeModule = null;
|
|
872
|
-
const existingStyle = document.getElementById("custom-view-style");
|
|
873
|
-
if (existingStyle) {
|
|
874
|
-
existingStyle.remove();
|
|
875
|
-
}
|
|
876
|
-
let customHtmlLoaded = false;
|
|
877
|
-
const timestamp = Date.now();
|
|
878
|
-
const htmlUrl = `/views/${tag}-view/${tag}-view.html?t=${timestamp}`;
|
|
879
|
-
try {
|
|
880
|
-
const htmlRes = await fetch(htmlUrl);
|
|
881
|
-
if (htmlRes.ok) {
|
|
882
|
-
const htmlText = await htmlRes.text();
|
|
883
|
-
if (htmlText.trim().startsWith("<!DOCTYPE") || htmlText.includes("<html")) {
|
|
884
|
-
throw new Error("SPA fallback page returned instead of view fragment");
|
|
885
|
-
}
|
|
886
|
-
this.stageContainer.innerHTML = htmlText;
|
|
887
|
-
const el = this.stageContainer.querySelector(tag);
|
|
888
|
-
if (el) {
|
|
889
|
-
customHtmlLoaded = true;
|
|
890
|
-
if (isFirstLoad) {
|
|
891
|
-
if (spec.props) {
|
|
892
|
-
Object.keys(spec.props).forEach((propName) => {
|
|
893
|
-
if (spec.props) {
|
|
894
|
-
const prop = spec.props[propName];
|
|
895
|
-
if (prop.type === "boolean") {
|
|
896
|
-
prop.currentValue = el.hasAttribute(propName);
|
|
897
|
-
} else {
|
|
898
|
-
const attrVal = el.getAttribute(propName);
|
|
899
|
-
if (attrVal !== null) {
|
|
900
|
-
prop.currentValue = attrVal;
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
if (spec.slots) {
|
|
907
|
-
Object.keys(spec.slots).forEach((slotName) => {
|
|
908
|
-
if (spec.slots) {
|
|
909
|
-
const slot = spec.slots[slotName];
|
|
910
|
-
if (slotName === "default") {
|
|
911
|
-
const clone = el.cloneNode(true);
|
|
912
|
-
Array.from(clone.children).forEach((child) => {
|
|
913
|
-
if (child.hasAttribute("slot"))
|
|
914
|
-
child.remove();
|
|
915
|
-
});
|
|
916
|
-
slot.currentValue = clone.innerHTML.trim();
|
|
917
|
-
} else {
|
|
918
|
-
const slotEl = el.querySelector(`[slot="${slotName}"]`);
|
|
919
|
-
if (slotEl) {
|
|
920
|
-
slot.currentValue = slotEl.innerHTML.trim();
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
});
|
|
925
|
-
}
|
|
926
|
-
componentRegistry.set({ ...registry });
|
|
927
|
-
} else {
|
|
928
|
-
this.updateElementFromSpec(el, spec);
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
} catch (err) {
|
|
933
|
-
console.warn(`Error fetching custom view for ${tag}:`, err);
|
|
934
|
-
}
|
|
935
|
-
if (!customHtmlLoaded) {
|
|
936
|
-
this.renderFallback(tag, spec);
|
|
937
|
-
}
|
|
938
|
-
const activeEl = this.stageContainer.querySelector(tag);
|
|
939
|
-
if (activeEl) {
|
|
940
|
-
this.bindEvents(activeEl, tag);
|
|
941
|
-
}
|
|
942
|
-
if (spec.options && activeEl) {
|
|
943
|
-
activeEl.options = spec.options;
|
|
944
|
-
}
|
|
945
|
-
if (spec.hasOwnProperty("stageHelper") && spec.stageHelper && activeEl) {
|
|
946
|
-
const stageHelper = spec.stageHelper;
|
|
947
|
-
const helper = document.createElement("div");
|
|
948
|
-
helper.className = "stage-helper-bar";
|
|
949
|
-
helper.innerHTML = `
|
|
950
|
-
<span class="stage-helper-text">${stageHelper.label}</span>
|
|
951
|
-
<q-button variant="secondary" size="sm" id="${stageHelper.buttonId}">${stageHelper.buttonLabel}</q-button>
|
|
952
|
-
`;
|
|
953
|
-
this.stageContainer.appendChild(helper);
|
|
954
|
-
}
|
|
955
|
-
const cssUrl = `/views/${tag}-view/${tag}-view.css`;
|
|
956
|
-
const cssUrlWithTimestamp = `${cssUrl}?t=${timestamp}`;
|
|
957
|
-
try {
|
|
958
|
-
const cssRes = await fetch(cssUrlWithTimestamp, { method: "HEAD" });
|
|
959
|
-
if (cssRes.ok) {
|
|
960
|
-
const link = document.createElement("link");
|
|
961
|
-
link.id = "custom-view-style";
|
|
962
|
-
link.rel = "stylesheet";
|
|
963
|
-
link.href = cssUrlWithTimestamp;
|
|
964
|
-
document.head.appendChild(link);
|
|
965
|
-
}
|
|
966
|
-
} catch (err) {}
|
|
967
|
-
const jsUrl = `/views/${tag}-view/${tag}-view.js`;
|
|
968
|
-
const jsUrlWithTimestamp = `${jsUrl}?t=${timestamp}`;
|
|
969
|
-
try {
|
|
970
|
-
const jsRes = await fetch(jsUrlWithTimestamp, { method: "HEAD" });
|
|
971
|
-
if (jsRes.ok) {
|
|
972
|
-
const mod = await import(jsUrlWithTimestamp);
|
|
973
|
-
this.activeModule = mod;
|
|
974
|
-
if (mod && typeof mod.init === "function") {
|
|
975
|
-
mod.init(this.stageContainer);
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
} catch (err) {
|
|
979
|
-
console.warn(`Could not initialize custom JS module for ${tag}:`, err);
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
renderFallback(tag, spec) {
|
|
983
|
-
if (!this.stageContainer)
|
|
984
|
-
return;
|
|
985
|
-
const el = document.createElement(tag);
|
|
986
|
-
this.updateElementFromSpec(el, spec);
|
|
987
|
-
this.stageContainer.innerHTML = "";
|
|
988
|
-
this.stageContainer.appendChild(el);
|
|
989
|
-
}
|
|
990
|
-
bindEvents(activeEl, tag) {
|
|
991
|
-
const eventsToLog = ["qChange", "qSelect", "qClose", "qSlideChange", "qLightboxOpen", "qLightboxClose", "qItemClick", "qScroll", "qClick", "qFocus", "qBlur"];
|
|
992
|
-
eventsToLog.forEach((eventName) => {
|
|
993
|
-
activeEl.addEventListener(eventName, (e) => {
|
|
994
|
-
const customEvent = e;
|
|
995
|
-
playgroundBus.emit("event-dispatched", {
|
|
996
|
-
name: eventName,
|
|
997
|
-
detail: customEvent.detail
|
|
998
|
-
});
|
|
999
|
-
let changed = false;
|
|
1000
|
-
const registry = componentRegistry();
|
|
1001
|
-
const config = registry[tag];
|
|
1002
|
-
if (!config)
|
|
1003
|
-
return;
|
|
1004
|
-
const handler = SYNCBACK_MAP[tag]?.[eventName];
|
|
1005
|
-
if (handler) {
|
|
1006
|
-
handler(config, customEvent.detail);
|
|
1007
|
-
changed = true;
|
|
1008
|
-
}
|
|
1009
|
-
if (changed) {
|
|
1010
|
-
componentRegistry.set({ ...registry });
|
|
1011
|
-
}
|
|
1012
|
-
});
|
|
1013
|
-
});
|
|
1014
|
-
}
|
|
1015
|
-
updateElementFromSpec(el, spec) {
|
|
1016
|
-
if (!el || !spec)
|
|
1017
|
-
return;
|
|
1018
|
-
if (spec.props) {
|
|
1019
|
-
const flatProps = {};
|
|
1020
|
-
Object.keys(spec.props).forEach((pName) => {
|
|
1021
|
-
if (spec.props) {
|
|
1022
|
-
flatProps[pName] = spec.props[pName].currentValue;
|
|
1023
|
-
}
|
|
1024
|
-
});
|
|
1025
|
-
setElementProperties(el, flatProps);
|
|
1026
|
-
}
|
|
1027
|
-
if (spec.slots) {
|
|
1028
|
-
this.updateElementSlots(el, spec);
|
|
1029
|
-
}
|
|
1030
|
-
if (spec.options) {
|
|
1031
|
-
el.options = spec.options;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
updateElementSlots(el, config) {
|
|
1035
|
-
if (!config.slots)
|
|
1036
|
-
return;
|
|
1037
|
-
let cachedSlots = this.previousSlotValues.get(el);
|
|
1038
|
-
if (!cachedSlots) {
|
|
1039
|
-
cachedSlots = {};
|
|
1040
|
-
this.previousSlotValues.set(el, cachedSlots);
|
|
1041
|
-
}
|
|
1042
|
-
let hasAnySlotChanged = false;
|
|
1043
|
-
Object.keys(config.slots).forEach((slotName) => {
|
|
1044
|
-
const currentVal = config.slots[slotName]?.currentValue ?? "";
|
|
1045
|
-
if (cachedSlots[slotName] !== currentVal) {
|
|
1046
|
-
hasAnySlotChanged = true;
|
|
1047
|
-
cachedSlots[slotName] = currentVal;
|
|
1048
|
-
}
|
|
1049
|
-
});
|
|
1050
|
-
if (!hasAnySlotChanged && Object.keys(cachedSlots).length > 0) {
|
|
1051
|
-
return;
|
|
1052
|
-
}
|
|
1053
|
-
const namedSlots = {};
|
|
1054
|
-
Array.from(el.children).forEach((child) => {
|
|
1055
|
-
const slotName = child.getAttribute("slot");
|
|
1056
|
-
if (slotName) {
|
|
1057
|
-
namedSlots[slotName] = child;
|
|
1058
|
-
}
|
|
1059
|
-
});
|
|
1060
|
-
el.innerHTML = "";
|
|
1061
|
-
const defaultSlot = config.slots.default;
|
|
1062
|
-
if (defaultSlot && defaultSlot.currentValue) {
|
|
1063
|
-
el.innerHTML = defaultSlot.currentValue;
|
|
1064
|
-
}
|
|
1065
|
-
Object.keys(config.slots).forEach((slotName) => {
|
|
1066
|
-
if (slotName === "default")
|
|
1067
|
-
return;
|
|
1068
|
-
if (config.slots) {
|
|
1069
|
-
const slot = config.slots[slotName];
|
|
1070
|
-
if (slot.currentValue) {
|
|
1071
|
-
const wrapper = document.createElement("span");
|
|
1072
|
-
wrapper.setAttribute("slot", slotName);
|
|
1073
|
-
wrapper.innerHTML = slot.currentValue;
|
|
1074
|
-
el.appendChild(wrapper);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
disconnectedCallback() {
|
|
1080
|
-
if (this.cleanupEffect) {
|
|
1081
|
-
this.cleanupEffect();
|
|
1082
|
-
}
|
|
1083
|
-
if (this.activeModule && typeof this.activeModule.destroy === "function") {
|
|
1084
|
-
try {
|
|
1085
|
-
this.activeModule.destroy(this.stageContainer);
|
|
1086
|
-
} catch (err) {}
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
customElements.define("sandbox-panel", SandboxPanel);
|
|
1091
|
-
|
|
1092
|
-
// src/playground/components/sandbox-viewport/variant-card.tsx
|
|
1093
|
-
class VariantCard extends HTMLElement {
|
|
1094
|
-
tag;
|
|
1095
|
-
item;
|
|
1096
|
-
resizeObserver;
|
|
1097
|
-
connectedCallback() {
|
|
1098
|
-
if (!this.tag || !this.item)
|
|
1099
|
-
return;
|
|
1100
|
-
const tag = this.tag;
|
|
1101
|
-
const item = this.item;
|
|
1102
|
-
const registry = componentRegistry();
|
|
1103
|
-
const config = registry[tag];
|
|
1104
|
-
if (!config)
|
|
1105
|
-
return;
|
|
1106
|
-
this.className = "variant-card";
|
|
1107
|
-
this.innerHTML = "";
|
|
1108
|
-
const titleRow = /* @__PURE__ */ h("div", {
|
|
1109
|
-
class: "variant-title-row"
|
|
1110
|
-
}, /* @__PURE__ */ h("h4", {
|
|
1111
|
-
class: "variant-card-title"
|
|
1112
|
-
}, item.name));
|
|
1113
|
-
this.appendChild(titleRow);
|
|
1114
|
-
const stage = /* @__PURE__ */ h("div", {
|
|
1115
|
-
class: "variant-card-stage"
|
|
1116
|
-
}, /* @__PURE__ */ h("span", {
|
|
1117
|
-
class: "variant-card-dimensions"
|
|
1118
|
-
}, "0px × 0px"));
|
|
1119
|
-
const el = document.createElement(tag);
|
|
1120
|
-
setElementProperties(el, item.props);
|
|
1121
|
-
const defaultSlot = item.slot !== undefined ? item.slot : config.slots?.default?.default || "";
|
|
1122
|
-
if (defaultSlot !== undefined && defaultSlot !== "") {
|
|
1123
|
-
el.innerHTML = defaultSlot;
|
|
1124
|
-
}
|
|
1125
|
-
if (item.slots) {
|
|
1126
|
-
Object.keys(item.slots).forEach((slotName) => {
|
|
1127
|
-
const wrapper = document.createElement("span");
|
|
1128
|
-
wrapper.setAttribute("slot", slotName);
|
|
1129
|
-
wrapper.innerHTML = item.slots[slotName];
|
|
1130
|
-
el.appendChild(wrapper);
|
|
1131
|
-
});
|
|
1132
|
-
} else if (config.slots) {
|
|
1133
|
-
Object.keys(config.slots).forEach((slotName) => {
|
|
1134
|
-
if (slotName !== "default" && config.slots[slotName].default) {
|
|
1135
|
-
const wrapper = document.createElement("span");
|
|
1136
|
-
wrapper.setAttribute("slot", slotName);
|
|
1137
|
-
wrapper.innerHTML = config.slots[slotName].default;
|
|
1138
|
-
el.appendChild(wrapper);
|
|
1139
|
-
}
|
|
1140
|
-
});
|
|
1141
|
-
}
|
|
1142
|
-
stage.appendChild(el);
|
|
1143
|
-
this.appendChild(stage);
|
|
1144
|
-
const dimensionsBadge = stage.querySelector(".variant-card-dimensions");
|
|
1145
|
-
if (typeof ResizeObserver !== "undefined" && dimensionsBadge) {
|
|
1146
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
1147
|
-
const rect = el.getBoundingClientRect();
|
|
1148
|
-
const width = Math.round(rect.width);
|
|
1149
|
-
const height = Math.round(rect.height);
|
|
1150
|
-
dimensionsBadge.innerText = `${width}px × ${height}px`;
|
|
1151
|
-
});
|
|
1152
|
-
this.resizeObserver.observe(el);
|
|
1153
|
-
}
|
|
1154
|
-
if (config.options) {
|
|
1155
|
-
el.options = config.options;
|
|
1156
|
-
}
|
|
1157
|
-
if (tag === "q-sidepanel") {
|
|
1158
|
-
const btn = /* @__PURE__ */ h("q-button", {
|
|
1159
|
-
variant: "secondary",
|
|
1160
|
-
size: "sm",
|
|
1161
|
-
class: "var-open-panel-btn"
|
|
1162
|
-
}, "Trigger Drawer Panel");
|
|
1163
|
-
this.appendChild(btn);
|
|
1164
|
-
}
|
|
1165
|
-
if (tag === "q-dialog") {
|
|
1166
|
-
const btn = /* @__PURE__ */ h("q-button", {
|
|
1167
|
-
variant: "secondary",
|
|
1168
|
-
size: "sm",
|
|
1169
|
-
class: "var-open-dialog-btn"
|
|
1170
|
-
}, "Trigger Dialog Overlay");
|
|
1171
|
-
this.appendChild(btn);
|
|
1172
|
-
}
|
|
1173
|
-
const slots = { default: defaultSlot };
|
|
1174
|
-
if (item.slots) {
|
|
1175
|
-
Object.assign(slots, item.slots);
|
|
1176
|
-
}
|
|
1177
|
-
const appendScript = tag === "q-dropdown" && config.options ? `
|
|
1178
|
-
|
|
1179
|
-
<!-- Programmatic dropdown options population script -->
|
|
1180
|
-
<script>
|
|
1181
|
-
const dropdown = document.querySelector('q-dropdown');
|
|
1182
|
-
dropdown.options = ${JSON.stringify(config.options, null, 2).replace(/\n/g, `
|
|
1183
|
-
`)};
|
|
1184
|
-
</script>` : null;
|
|
1185
|
-
const codeText = serializeComponentCode(tag, item.props, slots, appendScript);
|
|
1186
|
-
const syntaxBox = /* @__PURE__ */ h("q-syntax-box", {
|
|
1187
|
-
variant: "plain",
|
|
1188
|
-
code: codeText,
|
|
1189
|
-
class: "variant-card-code"
|
|
1190
|
-
});
|
|
1191
|
-
this.appendChild(syntaxBox);
|
|
1192
|
-
}
|
|
1193
|
-
disconnectedCallback() {
|
|
1194
|
-
if (this.resizeObserver) {
|
|
1195
|
-
this.resizeObserver.disconnect();
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
customElements.define("variant-card", VariantCard);
|
|
1200
|
-
|
|
1201
|
-
// src/playground/components/sandbox-viewport/sandbox-viewport.css
|
|
1202
|
-
var sandbox_viewport_default = `.main-panel {
|
|
1203
|
-
flex: 1;
|
|
1204
|
-
display: flex;
|
|
1205
|
-
flex-direction: column;
|
|
1206
|
-
min-width: 0;
|
|
1207
|
-
background: var(--q-bg-base);
|
|
1208
|
-
overflow: hidden;
|
|
1209
|
-
height: 100%;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
.tabs-bar {
|
|
1213
|
-
display: flex;
|
|
1214
|
-
align-items: center;
|
|
1215
|
-
justify-content: space-between;
|
|
1216
|
-
padding: 0 24px;
|
|
1217
|
-
height: 43px;
|
|
1218
|
-
background: var(--q-bg-surface-1);
|
|
1219
|
-
border-bottom: var(--q-border);
|
|
1220
|
-
flex-shrink: 0;
|
|
1221
|
-
gap: 16px;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
.tab-buttons {
|
|
1225
|
-
display: flex;
|
|
1226
|
-
height: 100%;
|
|
1227
|
-
flex-shrink: 0;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
.tab-btn {
|
|
1231
|
-
background: transparent;
|
|
1232
|
-
border: none;
|
|
1233
|
-
color: var(--q-fg-muted);
|
|
1234
|
-
padding: 0 20px;
|
|
1235
|
-
font-size: 0.9rem;
|
|
1236
|
-
font-weight: 600;
|
|
1237
|
-
cursor: pointer;
|
|
1238
|
-
height: 100%;
|
|
1239
|
-
display: flex;
|
|
1240
|
-
align-items: center;
|
|
1241
|
-
border-bottom: 2px solid transparent;
|
|
1242
|
-
transition: all 0.2s ease;
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
.tab-btn:hover {
|
|
1246
|
-
color: var(--q-fg-base);
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
.tab-btn.active {
|
|
1250
|
-
color: var(--q-color-primary);
|
|
1251
|
-
border-bottom-color: var(--q-color-primary);
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
.active-component-badge {
|
|
1255
|
-
font-family: monospace;
|
|
1256
|
-
background: var(--q-bg-surface-2);
|
|
1257
|
-
border: var(--q-border);
|
|
1258
|
-
padding: 4px 8px;
|
|
1259
|
-
border-radius: var(--q-radius-md);
|
|
1260
|
-
font-size: 0.8rem;
|
|
1261
|
-
color: var(--q-color-primary);
|
|
1262
|
-
flex-shrink: 0;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
.stage-content-wrapper {
|
|
1266
|
-
flex: 1;
|
|
1267
|
-
min-height: 0;
|
|
1268
|
-
position: relative;
|
|
1269
|
-
display: flex;
|
|
1270
|
-
flex-direction: column;
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
.tab-content {
|
|
1274
|
-
display: none;
|
|
1275
|
-
flex: 1;
|
|
1276
|
-
min-height: 0;
|
|
1277
|
-
flex-direction: column;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
.tab-content.active {
|
|
1281
|
-
display: flex;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
.sandbox-layout {
|
|
1285
|
-
display: flex;
|
|
1286
|
-
flex-direction: column;
|
|
1287
|
-
flex: 1;
|
|
1288
|
-
min-height: 0;
|
|
1289
|
-
box-sizing: border-box;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
.sandbox-main {
|
|
1293
|
-
flex: 1;
|
|
1294
|
-
display: flex;
|
|
1295
|
-
flex-direction: column;
|
|
1296
|
-
padding: 24px;
|
|
1297
|
-
gap: 20px;
|
|
1298
|
-
min-height: 0;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
.sandbox-bottom-panels {
|
|
1302
|
-
display: flex;
|
|
1303
|
-
gap: 20px;
|
|
1304
|
-
height: 150px;
|
|
1305
|
-
flex-shrink: 0;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
playground-event-log,
|
|
1309
|
-
playground-code-preview {
|
|
1310
|
-
flex: 1;
|
|
1311
|
-
min-width: 0;
|
|
1312
|
-
height: 100%;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
.stage-container {
|
|
1317
|
-
flex: 1;
|
|
1318
|
-
min-height: 0;
|
|
1319
|
-
background-color: var(--q-bg-base);
|
|
1320
|
-
background-image: radial-gradient(var(--q-bg-surface-2) 1.5px, transparent 1.5px);
|
|
1321
|
-
background-size: 20px 20px;
|
|
1322
|
-
border: var(--q-border);
|
|
1323
|
-
border-radius: var(--q-radius-lg);
|
|
1324
|
-
padding: 40px;
|
|
1325
|
-
display: flex;
|
|
1326
|
-
align-items: center;
|
|
1327
|
-
justify-content: center;
|
|
1328
|
-
position: relative;
|
|
1329
|
-
transition:
|
|
1330
|
-
background-color 0.3s ease,
|
|
1331
|
-
border-color 0.3s ease;
|
|
1332
|
-
transform: translate(0, 0); /* Bounded mode by default */
|
|
1333
|
-
overflow: hidden;
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
/* Helpers Panel inside stage */
|
|
1337
|
-
.stage-helper-bar {
|
|
1338
|
-
position: absolute;
|
|
1339
|
-
bottom: 16px;
|
|
1340
|
-
left: 50%;
|
|
1341
|
-
transform: translateX(-50%);
|
|
1342
|
-
background: color-mix(in srgb, var(--q-bg-surface-1) 95%, transparent);
|
|
1343
|
-
padding: 8px 16px;
|
|
1344
|
-
border-radius: 30px;
|
|
1345
|
-
border: var(--q-border);
|
|
1346
|
-
display: flex;
|
|
1347
|
-
align-items: center;
|
|
1348
|
-
gap: 10px;
|
|
1349
|
-
z-index: 100;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
.stage-helper-text {
|
|
1353
|
-
font-size: 0.8rem;
|
|
1354
|
-
color: var(--q-fg-muted);
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
/* Grid Visual Matrix styling */
|
|
1358
|
-
.variants-grid {
|
|
1359
|
-
display: grid;
|
|
1360
|
-
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
1361
|
-
gap: 24px;
|
|
1362
|
-
padding: 24px;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
.variant-card {
|
|
1366
|
-
background: var(--q-bg-surface-1);
|
|
1367
|
-
border: var(--q-border);
|
|
1368
|
-
border-radius: var(--q-radius-lg);
|
|
1369
|
-
padding: 20px;
|
|
1370
|
-
display: flex;
|
|
1371
|
-
flex-direction: column;
|
|
1372
|
-
gap: 16px;
|
|
1373
|
-
min-width: 0;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
.variant-title-row {
|
|
1377
|
-
display: flex;
|
|
1378
|
-
justify-content: space-between;
|
|
1379
|
-
align-items: center;
|
|
1380
|
-
border-bottom: var(--q-border);
|
|
1381
|
-
padding-bottom: 8px;
|
|
1382
|
-
gap: 16px;
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
.variant-card-title {
|
|
1386
|
-
font-size: 0.9rem;
|
|
1387
|
-
font-weight: 600;
|
|
1388
|
-
color: var(--q-color-primary);
|
|
1389
|
-
margin: 0;
|
|
1390
|
-
flex-shrink: 1;
|
|
1391
|
-
min-width: 0;
|
|
1392
|
-
overflow: hidden;
|
|
1393
|
-
text-overflow: ellipsis;
|
|
1394
|
-
white-space: nowrap;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
.variant-card-stage {
|
|
1398
|
-
display: flex;
|
|
1399
|
-
align-items: center;
|
|
1400
|
-
justify-content: center;
|
|
1401
|
-
min-height: 160px;
|
|
1402
|
-
min-width: 280px;
|
|
1403
|
-
background: var(--q-bg-base);
|
|
1404
|
-
border-radius: var(--q-radius-md);
|
|
1405
|
-
padding: 20px;
|
|
1406
|
-
position: relative;
|
|
1407
|
-
overflow: auto;
|
|
1408
|
-
border: var(--q-border);
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
.variant-card-dimensions {
|
|
1412
|
-
position: absolute;
|
|
1413
|
-
top: 8px;
|
|
1414
|
-
right: 8px;
|
|
1415
|
-
background: color-mix(in srgb, var(--q-bg-surface-1) 85%, transparent);
|
|
1416
|
-
border: var(--q-border);
|
|
1417
|
-
color: var(--q-fg-muted);
|
|
1418
|
-
font-family: monospace;
|
|
1419
|
-
font-size: 0.7rem;
|
|
1420
|
-
padding: 2px 6px;
|
|
1421
|
-
border-radius: 4px;
|
|
1422
|
-
pointer-events: none;
|
|
1423
|
-
z-index: 5;
|
|
1424
|
-
user-select: none;
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
.variant-card-desc {
|
|
1428
|
-
font-size: 0.8rem;
|
|
1429
|
-
color: var(--q-fg-muted);
|
|
1430
|
-
margin: 0;
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
.variant-card-code {
|
|
1434
|
-
margin: 0;
|
|
1435
|
-
padding: 10px;
|
|
1436
|
-
background: var(--q-bg-surface-1);
|
|
1437
|
-
border-radius: var(--q-radius-md);
|
|
1438
|
-
border: var(--q-border);
|
|
1439
|
-
font-family: monospace;
|
|
1440
|
-
font-size: 0.75rem;
|
|
1441
|
-
overflow-x: auto;
|
|
1442
|
-
color: var(--q-fg-base);
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
/* Responsive mobile view styles */
|
|
1446
|
-
@media (max-width: 900px) {
|
|
1447
|
-
.sandbox-layout {
|
|
1448
|
-
flex-direction: column;
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
.sandbox-main {
|
|
1452
|
-
padding: 16px;
|
|
1453
|
-
gap: 16px;
|
|
1454
|
-
overflow-y: auto;
|
|
1455
|
-
height: auto;
|
|
1456
|
-
min-height: 100%;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
.stage-container {
|
|
1460
|
-
min-height: 320px;
|
|
1461
|
-
padding: 20px;
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
.variants-grid {
|
|
1465
|
-
grid-template-columns: 1fr;
|
|
1466
|
-
padding: 16px;
|
|
1467
|
-
gap: 16px;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
.tabs-bar {
|
|
1471
|
-
flex-direction: column;
|
|
1472
|
-
height: auto;
|
|
1473
|
-
padding: 10px 16px;
|
|
1474
|
-
align-items: stretch;
|
|
1475
|
-
gap: 8px;
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
.tab-buttons {
|
|
1479
|
-
overflow-x: auto;
|
|
1480
|
-
white-space: nowrap;
|
|
1481
|
-
height: auto;
|
|
1482
|
-
padding: 4px 0;
|
|
1483
|
-
-webkit-overflow-scrolling: touch;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
.tab-buttons::-webkit-scrollbar {
|
|
1487
|
-
display: none;
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
.tab-btn {
|
|
1491
|
-
flex-shrink: 0;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
.active-component-badge {
|
|
1495
|
-
align-self: flex-start;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
.sandbox-bottom-panels {
|
|
1499
|
-
flex-direction: column;
|
|
1500
|
-
height: auto;
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
.grid-empty-state {
|
|
1505
|
-
grid-column: span 3;
|
|
1506
|
-
padding: 40px;
|
|
1507
|
-
text-align: center;
|
|
1508
|
-
color: var(--q-fg-muted);
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
/* Wide components full-width layouts */
|
|
1512
|
-
sandbox-viewport[active-component="q-data-table"] .variants-grid,
|
|
1513
|
-
sandbox-viewport[active-component="q-data-table"] .edgecases-grid,
|
|
1514
|
-
sandbox-viewport[active-component="q-step-diagram"] .variants-grid,
|
|
1515
|
-
sandbox-viewport[active-component="q-step-diagram"] .edgecases-grid {
|
|
1516
|
-
grid-template-columns: 1fr;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
.variant-card-stage > q-data-table,
|
|
1520
|
-
.variant-card-stage > q-step-diagram {
|
|
1521
|
-
width: 100%;
|
|
1522
|
-
flex: 1;
|
|
1523
|
-
}
|
|
1524
|
-
`;
|
|
1525
|
-
|
|
1526
|
-
// src/playground/components/sandbox-viewport/sandbox-viewport.tsx
|
|
1527
|
-
function emptyState(msg) {
|
|
1528
|
-
return `<div class="grid-empty-state">${msg}</div>`;
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
class SandboxViewport extends HTMLElement {
|
|
1532
|
-
variantsGrid = null;
|
|
1533
|
-
edgecasesGrid = null;
|
|
1534
|
-
cleanupEffect;
|
|
1535
|
-
connectedCallback() {
|
|
1536
|
-
this.innerHTML = "";
|
|
1537
|
-
this.appendChild(/* @__PURE__ */ h("viewport-tabs", null));
|
|
1538
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
1539
|
-
class: "stage-content-wrapper"
|
|
1540
|
-
}, /* @__PURE__ */ h("sandbox-panel", {
|
|
1541
|
-
class: "tab-content active",
|
|
1542
|
-
id: "content-sandbox"
|
|
1543
|
-
}), /* @__PURE__ */ h("div", {
|
|
1544
|
-
class: "tab-content",
|
|
1545
|
-
id: "content-variants"
|
|
1546
|
-
}, /* @__PURE__ */ h("q-scrollable", {
|
|
1547
|
-
height: "100%"
|
|
1548
|
-
}, /* @__PURE__ */ h("div", {
|
|
1549
|
-
class: "variants-grid",
|
|
1550
|
-
id: "variantsGrid"
|
|
1551
|
-
}))), /* @__PURE__ */ h("div", {
|
|
1552
|
-
class: "tab-content",
|
|
1553
|
-
id: "content-edgecases"
|
|
1554
|
-
}, /* @__PURE__ */ h("q-scrollable", {
|
|
1555
|
-
height: "100%"
|
|
1556
|
-
}, /* @__PURE__ */ h("div", {
|
|
1557
|
-
class: "variants-grid",
|
|
1558
|
-
id: "edgecasesGrid"
|
|
1559
|
-
}))), /* @__PURE__ */ h("div", {
|
|
1560
|
-
class: "tab-content",
|
|
1561
|
-
id: "content-global-styling"
|
|
1562
|
-
}, /* @__PURE__ */ h("q-scrollable", {
|
|
1563
|
-
height: "100%"
|
|
1564
|
-
}, /* @__PURE__ */ h("theme-designer", null)))));
|
|
1565
|
-
const styleId = "sandbox-viewport-style";
|
|
1566
|
-
if (!document.getElementById(styleId)) {
|
|
1567
|
-
const style = document.createElement("style");
|
|
1568
|
-
style.id = styleId;
|
|
1569
|
-
style.textContent = sandbox_viewport_default;
|
|
1570
|
-
document.head.appendChild(style);
|
|
1571
|
-
}
|
|
1572
|
-
this.init();
|
|
1573
|
-
}
|
|
1574
|
-
init() {
|
|
1575
|
-
this.variantsGrid = this.querySelector("#variantsGrid");
|
|
1576
|
-
this.edgecasesGrid = this.querySelector("#edgecasesGrid");
|
|
1577
|
-
this.addEventListener("click", (e) => {
|
|
1578
|
-
const target = e.target;
|
|
1579
|
-
if (!target)
|
|
1580
|
-
return;
|
|
1581
|
-
if (target.id === "closePanelBtn") {
|
|
1582
|
-
const panel = this.querySelector("q-sidepanel");
|
|
1583
|
-
if (panel) {
|
|
1584
|
-
panel.open = false;
|
|
1585
|
-
const registry = componentRegistry();
|
|
1586
|
-
if (registry["q-sidepanel"] && registry["q-sidepanel"].props) {
|
|
1587
|
-
registry["q-sidepanel"].props.open.currentValue = false;
|
|
1588
|
-
componentRegistry.set({ ...registry });
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
}
|
|
1592
|
-
if (target.id === "stageOpenPanelBtn") {
|
|
1593
|
-
const panel = this.querySelector("q-sidepanel");
|
|
1594
|
-
if (panel) {
|
|
1595
|
-
panel.open = true;
|
|
1596
|
-
const registry = componentRegistry();
|
|
1597
|
-
if (registry["q-sidepanel"] && registry["q-sidepanel"].props) {
|
|
1598
|
-
registry["q-sidepanel"].props.open.currentValue = true;
|
|
1599
|
-
componentRegistry.set({ ...registry });
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
if (target.id === "stageOpenDialogBtn") {
|
|
1604
|
-
const dialog = this.querySelector("q-dialog");
|
|
1605
|
-
if (dialog) {
|
|
1606
|
-
dialog.open = true;
|
|
1607
|
-
const registry = componentRegistry();
|
|
1608
|
-
if (registry["q-dialog"] && registry["q-dialog"].props) {
|
|
1609
|
-
registry["q-dialog"].props.open.currentValue = true;
|
|
1610
|
-
componentRegistry.set({ ...registry });
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
if (target.id === "stageShowToastBtn") {
|
|
1615
|
-
const toastHost = this.querySelector("q-toast");
|
|
1616
|
-
toastHost?.error("Couldn't delete user", "System-protected accounts cannot be deleted.");
|
|
1617
|
-
}
|
|
1618
|
-
if (target.classList.contains("var-open-panel-btn")) {
|
|
1619
|
-
const card = target.closest(".variant-card");
|
|
1620
|
-
if (card) {
|
|
1621
|
-
const panel = card.querySelector("q-sidepanel");
|
|
1622
|
-
if (panel)
|
|
1623
|
-
panel.open = true;
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
if (target.classList.contains("var-open-dialog-btn")) {
|
|
1627
|
-
const card = target.closest(".variant-card");
|
|
1628
|
-
if (card) {
|
|
1629
|
-
const dialog = card.querySelector("q-dialog");
|
|
1630
|
-
if (dialog)
|
|
1631
|
-
dialog.open = true;
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
});
|
|
1635
|
-
this.cleanupEffect = effect(() => {
|
|
1636
|
-
const active = activeComponent();
|
|
1637
|
-
const tab = activeTab();
|
|
1638
|
-
const registry = componentRegistry();
|
|
1639
|
-
const spec = registry[active];
|
|
1640
|
-
this.setAttribute("active-component", active);
|
|
1641
|
-
this.querySelectorAll(".stage-content-wrapper > .tab-content").forEach((c) => {
|
|
1642
|
-
if (active === "global-styling") {
|
|
1643
|
-
c.classList.toggle("active", c.id === "content-global-styling");
|
|
1644
|
-
} else {
|
|
1645
|
-
c.classList.toggle("active", c.id === `content-${tab}`);
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
1648
|
-
if (active !== "global-styling" && spec) {
|
|
1649
|
-
if (tab === "variants") {
|
|
1650
|
-
this.renderVariantsMatrix(active, spec);
|
|
1651
|
-
} else if (tab === "edgecases") {
|
|
1652
|
-
this.renderEdgeCases(active, spec);
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
});
|
|
1656
|
-
}
|
|
1657
|
-
renderVariantsMatrix(tag, config) {
|
|
1658
|
-
if (!this.variantsGrid)
|
|
1659
|
-
return;
|
|
1660
|
-
this.variantsGrid.innerHTML = "";
|
|
1661
|
-
const variants = config.variants;
|
|
1662
|
-
if (!variants || variants.length === 0) {
|
|
1663
|
-
this.variantsGrid.innerHTML = emptyState("No variant matrix defined for this component.");
|
|
1664
|
-
return;
|
|
1665
|
-
}
|
|
1666
|
-
variants.forEach((variant) => {
|
|
1667
|
-
const card = document.createElement("variant-card");
|
|
1668
|
-
card.tag = tag;
|
|
1669
|
-
card.item = variant;
|
|
1670
|
-
this.variantsGrid.appendChild(card);
|
|
1671
|
-
});
|
|
1672
|
-
}
|
|
1673
|
-
renderEdgeCases(tag, config) {
|
|
1674
|
-
if (!this.edgecasesGrid)
|
|
1675
|
-
return;
|
|
1676
|
-
this.edgecasesGrid.innerHTML = "";
|
|
1677
|
-
const edgeCases = config.edgeCases;
|
|
1678
|
-
if (!edgeCases || edgeCases.length === 0) {
|
|
1679
|
-
this.edgecasesGrid.innerHTML = emptyState("No stress-test layout edge cases defined for this component.");
|
|
1680
|
-
return;
|
|
1681
|
-
}
|
|
1682
|
-
edgeCases.forEach((edge) => {
|
|
1683
|
-
const card = document.createElement("variant-card");
|
|
1684
|
-
card.tag = tag;
|
|
1685
|
-
card.item = edge;
|
|
1686
|
-
this.edgecasesGrid.appendChild(card);
|
|
1687
|
-
});
|
|
1688
|
-
}
|
|
1689
|
-
disconnectedCallback() {
|
|
1690
|
-
if (this.cleanupEffect) {
|
|
1691
|
-
this.cleanupEffect();
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
customElements.define("sandbox-viewport", SandboxViewport);
|
|
1696
|
-
|
|
1697
|
-
// src/playground/components/playground-event-log/playground-event-log.css
|
|
1698
|
-
var playground_event_log_default = `.event-log-container {
|
|
1699
|
-
background: var(--q-bg-surface-1);
|
|
1700
|
-
border: var(--q-border);
|
|
1701
|
-
border-radius: var(--q-radius-lg);
|
|
1702
|
-
overflow: hidden;
|
|
1703
|
-
height: 100%;
|
|
1704
|
-
box-sizing: border-box;
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
.event-log-header {
|
|
1708
|
-
display: flex;
|
|
1709
|
-
justify-content: space-between;
|
|
1710
|
-
align-items: center;
|
|
1711
|
-
padding: 8px 16px;
|
|
1712
|
-
background: var(--q-bg-surface-2);
|
|
1713
|
-
border-bottom: var(--q-border);
|
|
1714
|
-
font-size: 0.8rem;
|
|
1715
|
-
color: var(--q-fg-muted);
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
.clear-log-btn {
|
|
1719
|
-
background: transparent;
|
|
1720
|
-
border: var(--q-border);
|
|
1721
|
-
color: var(--q-fg-base);
|
|
1722
|
-
border-radius: 4px;
|
|
1723
|
-
padding: 2px 6px;
|
|
1724
|
-
font-size: 0.75rem;
|
|
1725
|
-
cursor: pointer;
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
.clear-log-btn:hover {
|
|
1729
|
-
background: var(--q-btn-hover-overlay);
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
.event-log-body {
|
|
1733
|
-
padding: 12px 16px;
|
|
1734
|
-
font-family: monospace;
|
|
1735
|
-
font-size: 0.8rem;
|
|
1736
|
-
display: flex;
|
|
1737
|
-
flex-direction: column;
|
|
1738
|
-
gap: 4px;
|
|
1739
|
-
min-height: 50px;
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
.log-placeholder {
|
|
1743
|
-
color: var(--q-fg-muted);
|
|
1744
|
-
font-style: italic;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
.log-item {
|
|
1748
|
-
color: var(--q-color-success);
|
|
1749
|
-
word-break: break-all;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
.log-item-time {
|
|
1753
|
-
color: var(--q-fg-muted);
|
|
1754
|
-
margin-right: 8px;
|
|
1755
|
-
}
|
|
1756
|
-
`;
|
|
1757
|
-
|
|
1758
|
-
// src/playground/components/playground-event-log/playground-event-log.tsx
|
|
1759
|
-
class PlaygroundEventLog extends HTMLElement {
|
|
1760
|
-
logBody = null;
|
|
1761
|
-
syntaxBox = null;
|
|
1762
|
-
unsubscribeBus;
|
|
1763
|
-
connectedCallback() {
|
|
1764
|
-
this.innerHTML = "";
|
|
1765
|
-
this.appendChild(/* @__PURE__ */ h("q-syntax-box", {
|
|
1766
|
-
variant: "panel",
|
|
1767
|
-
heading: "Event Dispatches Log",
|
|
1768
|
-
id: "eventLogBox"
|
|
1769
|
-
}, /* @__PURE__ */ h("q-button", {
|
|
1770
|
-
slot: "actions",
|
|
1771
|
-
variant: "ghost",
|
|
1772
|
-
size: "sm",
|
|
1773
|
-
id: "clearLogBtn",
|
|
1774
|
-
onClick: () => this.clearLog()
|
|
1775
|
-
}, /* @__PURE__ */ h("q-icon", {
|
|
1776
|
-
slot: "icon-left",
|
|
1777
|
-
library: "local",
|
|
1778
|
-
name: "trash-2",
|
|
1779
|
-
size: "sm"
|
|
1780
|
-
}), /* @__PURE__ */ h("q-tooltip", {
|
|
1781
|
-
slot: "icon-left",
|
|
1782
|
-
position: "bottom",
|
|
1783
|
-
content: "Clear Log"
|
|
1784
|
-
})), /* @__PURE__ */ h("div", {
|
|
1785
|
-
id: "eventLogBody",
|
|
1786
|
-
class: "event-log-body"
|
|
1787
|
-
}, /* @__PURE__ */ h("span", {
|
|
1788
|
-
class: "log-placeholder"
|
|
1789
|
-
}, "Interactive events will appear here in real-time..."))));
|
|
1790
|
-
const styleId = "playground-event-log-style";
|
|
1791
|
-
if (!document.getElementById(styleId)) {
|
|
1792
|
-
const style = document.createElement("style");
|
|
1793
|
-
style.id = styleId;
|
|
1794
|
-
style.textContent = playground_event_log_default;
|
|
1795
|
-
document.head.appendChild(style);
|
|
1796
|
-
}
|
|
1797
|
-
this.init();
|
|
1798
|
-
}
|
|
1799
|
-
init() {
|
|
1800
|
-
this.logBody = this.querySelector("#eventLogBody");
|
|
1801
|
-
this.syntaxBox = this.querySelector("#eventLogBox");
|
|
1802
|
-
this.unsubscribeBus = playgroundBus.on("event-dispatched", (data) => {
|
|
1803
|
-
this.logEvent(data.name, data.detail);
|
|
1804
|
-
});
|
|
1805
|
-
}
|
|
1806
|
-
logEvent(name, detail) {
|
|
1807
|
-
if (!this.logBody)
|
|
1808
|
-
return;
|
|
1809
|
-
const placeholder = this.logBody.querySelector(".log-placeholder");
|
|
1810
|
-
if (placeholder)
|
|
1811
|
-
placeholder.remove();
|
|
1812
|
-
const now = new Date;
|
|
1813
|
-
const ms = String(now.getMilliseconds()).padStart(3, "0");
|
|
1814
|
-
const timeStr = now.toTimeString().split(" ")[0] + "." + ms;
|
|
1815
|
-
const line = document.createElement("div");
|
|
1816
|
-
line.className = "log-item";
|
|
1817
|
-
line.innerHTML = `
|
|
1818
|
-
<span class="log-item-time">[${timeStr}]</span>
|
|
1819
|
-
<strong>${name}</strong>: ${detail !== undefined ? JSON.stringify(detail) : "<em>(void detail)</em>"}
|
|
1820
|
-
`;
|
|
1821
|
-
this.logBody.appendChild(line);
|
|
1822
|
-
if (this.syntaxBox && typeof this.syntaxBox.scrollToBottom === "function") {
|
|
1823
|
-
this.syntaxBox.scrollToBottom();
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
clearLog() {
|
|
1827
|
-
if (this.logBody) {
|
|
1828
|
-
this.logBody.innerHTML = '<span class="log-placeholder">Interactive events will appear here in real-time...</span>';
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
disconnectedCallback() {
|
|
1832
|
-
if (this.unsubscribeBus) {
|
|
1833
|
-
this.unsubscribeBus();
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
customElements.define("playground-event-log", PlaygroundEventLog);
|
|
1838
|
-
|
|
1839
|
-
// src/playground/components/playground-code-preview/playground-code-preview.css
|
|
1840
|
-
var playground_code_preview_default = `.code-preview-container {
|
|
1841
|
-
position: relative;
|
|
1842
|
-
border-radius: var(--q-radius-lg);
|
|
1843
|
-
background: var(--q-bg-surface-1);
|
|
1844
|
-
border: var(--q-border);
|
|
1845
|
-
overflow: hidden;
|
|
1846
|
-
height: 100%;
|
|
1847
|
-
box-sizing: border-box;
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
.code-preview-header {
|
|
1851
|
-
display: flex;
|
|
1852
|
-
justify-content: space-between;
|
|
1853
|
-
align-items: center;
|
|
1854
|
-
padding: 8px 16px;
|
|
1855
|
-
background: var(--q-bg-surface-2);
|
|
1856
|
-
border-bottom: var(--q-border);
|
|
1857
|
-
font-size: 0.8rem;
|
|
1858
|
-
color: var(--q-fg-muted);
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
.copy-btn {
|
|
1862
|
-
background: transparent;
|
|
1863
|
-
border: var(--q-border);
|
|
1864
|
-
color: var(--q-fg-base);
|
|
1865
|
-
border-radius: 4px;
|
|
1866
|
-
padding: 4px 8px;
|
|
1867
|
-
font-size: 0.75rem;
|
|
1868
|
-
cursor: pointer;
|
|
1869
|
-
transition:
|
|
1870
|
-
background-color 0.2s,
|
|
1871
|
-
border-color 0.2s,
|
|
1872
|
-
color 0.2s;
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
.copy-btn:hover {
|
|
1876
|
-
background: var(--q-btn-hover-overlay);
|
|
1877
|
-
border-color: var(--q-fg-muted);
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
.code-preview-body {
|
|
1881
|
-
margin: 0;
|
|
1882
|
-
padding: 16px;
|
|
1883
|
-
overflow-x: auto;
|
|
1884
|
-
font-family:
|
|
1885
|
-
ui-monospace,
|
|
1886
|
-
SFMono-Regular,
|
|
1887
|
-
SF Mono,
|
|
1888
|
-
Menlo,
|
|
1889
|
-
Consolas,
|
|
1890
|
-
Liberation Mono,
|
|
1891
|
-
monospace;
|
|
1892
|
-
font-size: 0.85rem;
|
|
1893
|
-
line-height: 1.5;
|
|
1894
|
-
color: var(--q-fg-base);
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
/* Syntax highlighting */
|
|
1898
|
-
.code-comment {
|
|
1899
|
-
color: var(--q-fg-muted);
|
|
1900
|
-
font-style: italic;
|
|
1901
|
-
}
|
|
1902
|
-
.code-tag {
|
|
1903
|
-
color: var(--q-color-danger);
|
|
1904
|
-
font-weight: 600;
|
|
1905
|
-
}
|
|
1906
|
-
.code-attr {
|
|
1907
|
-
color: var(--q-color-primary);
|
|
1908
|
-
}
|
|
1909
|
-
.code-value {
|
|
1910
|
-
color: var(--q-color-success);
|
|
1911
|
-
}
|
|
1912
|
-
`;
|
|
1913
|
-
|
|
1914
|
-
// src/playground/components/playground-code-preview/playground-code-preview.tsx
|
|
1915
|
-
class PlaygroundCodePreview extends HTMLElement {
|
|
1916
|
-
codeBlockBox = null;
|
|
1917
|
-
cleanupCodeEffect;
|
|
1918
|
-
connectedCallback() {
|
|
1919
|
-
this.innerHTML = "";
|
|
1920
|
-
this.appendChild(/* @__PURE__ */ h("q-syntax-box", {
|
|
1921
|
-
variant: "panel",
|
|
1922
|
-
heading: "LIVE RENDER MARKUP",
|
|
1923
|
-
copyable: "true",
|
|
1924
|
-
id: "codeBlockBox"
|
|
1925
|
-
}));
|
|
1926
|
-
const styleId = "playground-code-preview-style";
|
|
1927
|
-
if (!document.getElementById(styleId)) {
|
|
1928
|
-
const style = document.createElement("style");
|
|
1929
|
-
style.id = styleId;
|
|
1930
|
-
style.textContent = playground_code_preview_default;
|
|
1931
|
-
document.head.appendChild(style);
|
|
1932
|
-
}
|
|
1933
|
-
this.init();
|
|
1934
|
-
}
|
|
1935
|
-
init() {
|
|
1936
|
-
this.codeBlockBox = this.querySelector("#codeBlockBox");
|
|
1937
|
-
this.cleanupCodeEffect = effect(() => {
|
|
1938
|
-
const active = activeComponent();
|
|
1939
|
-
const registry = componentRegistry();
|
|
1940
|
-
const config = registry[active];
|
|
1941
|
-
if (config) {
|
|
1942
|
-
this.updateCodeBlock(active, config);
|
|
1943
|
-
}
|
|
1944
|
-
});
|
|
1945
|
-
}
|
|
1946
|
-
updateCodeBlock(tag, config) {
|
|
1947
|
-
if (!this.codeBlockBox || !config)
|
|
1948
|
-
return;
|
|
1949
|
-
const appendScript = tag === "q-dropdown" && config.options ? `
|
|
1950
|
-
|
|
1951
|
-
<!-- Programmatic dropdown options population script -->
|
|
1952
|
-
<script>
|
|
1953
|
-
const dropdown = document.querySelector('${tag}');
|
|
1954
|
-
dropdown.options = ${JSON.stringify(config.options, null, 2).replace(/\n/g, `
|
|
1955
|
-
`)};
|
|
1956
|
-
</script>` : null;
|
|
1957
|
-
this.codeBlockBox.code = serializeComponentCode(tag, config.props, config.slots, appendScript);
|
|
1958
|
-
}
|
|
1959
|
-
disconnectedCallback() {
|
|
1960
|
-
if (this.cleanupCodeEffect) {
|
|
1961
|
-
this.cleanupCodeEffect();
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
customElements.define("playground-code-preview", PlaygroundCodePreview);
|
|
1966
|
-
|
|
1967
|
-
// src/playground/components/properties-panel/property-row.tsx
|
|
1968
|
-
var CONTROL_FACTORY = {
|
|
1969
|
-
boolean: (propName, prop) => /* @__PURE__ */ h("q-toggle", {
|
|
1970
|
-
type: "switch",
|
|
1971
|
-
size: "sm",
|
|
1972
|
-
"data-prop": propName,
|
|
1973
|
-
checked: prop.currentValue,
|
|
1974
|
-
onQChange: (e) => updateKnobValue("prop", propName, e.detail)
|
|
1975
|
-
}),
|
|
1976
|
-
select: (propName, prop) => {
|
|
1977
|
-
const options = prop.options ? prop.options.map((opt) => ({ label: opt || "(none)", value: opt })) : [];
|
|
1978
|
-
const dropdown = /* @__PURE__ */ h("q-dropdown", {
|
|
1979
|
-
size: "sm",
|
|
1980
|
-
"data-prop": propName,
|
|
1981
|
-
value: prop.currentValue,
|
|
1982
|
-
onQChange: (e) => updateKnobValue("prop", propName, e.detail)
|
|
1983
|
-
});
|
|
1984
|
-
dropdown.options = options;
|
|
1985
|
-
return dropdown;
|
|
1986
|
-
},
|
|
1987
|
-
number: (propName, prop) => /* @__PURE__ */ h("q-input", {
|
|
1988
|
-
type: "number",
|
|
1989
|
-
size: "sm",
|
|
1990
|
-
"data-prop": propName,
|
|
1991
|
-
value: prop.currentValue,
|
|
1992
|
-
onQInput: (e) => updateKnobValue("prop", propName, e.detail)
|
|
1993
|
-
})
|
|
1994
|
-
};
|
|
1995
|
-
function createPropControl(propName, prop) {
|
|
1996
|
-
const factory = CONTROL_FACTORY[prop.type];
|
|
1997
|
-
if (factory)
|
|
1998
|
-
return factory(propName, prop);
|
|
1999
|
-
return /* @__PURE__ */ h("q-input", {
|
|
2000
|
-
type: "text",
|
|
2001
|
-
size: "sm",
|
|
2002
|
-
"data-prop": propName,
|
|
2003
|
-
value: prop.currentValue,
|
|
2004
|
-
onQInput: (e) => updateKnobValue("prop", propName, e.detail)
|
|
2005
|
-
});
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
class PropertyRow extends HTMLElement {
|
|
2009
|
-
propName;
|
|
2010
|
-
prop;
|
|
2011
|
-
connectedCallback() {
|
|
2012
|
-
if (!this.propName || !this.prop)
|
|
2013
|
-
return;
|
|
2014
|
-
this.className = "property-row";
|
|
2015
|
-
this.innerHTML = "";
|
|
2016
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
2017
|
-
class: "property-meta"
|
|
2018
|
-
}, /* @__PURE__ */ h("span", {
|
|
2019
|
-
class: "property-label"
|
|
2020
|
-
}, this.propName), /* @__PURE__ */ h("span", {
|
|
2021
|
-
class: "property-label-sub"
|
|
2022
|
-
}, this.prop.description || "")));
|
|
2023
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
2024
|
-
class: "property-control-container"
|
|
2025
|
-
}, createPropControl(this.propName, this.prop)));
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
customElements.define("property-row", PropertyRow);
|
|
2029
|
-
|
|
2030
|
-
// src/playground/components/properties-panel/slot-row.tsx
|
|
2031
|
-
class SlotRow extends HTMLElement {
|
|
2032
|
-
slotName;
|
|
2033
|
-
slotConfig;
|
|
2034
|
-
activeComponentTag;
|
|
2035
|
-
connectedCallback() {
|
|
2036
|
-
if (!this.slotName || !this.slotConfig)
|
|
2037
|
-
return;
|
|
2038
|
-
this.className = "property-row vertical";
|
|
2039
|
-
this.innerHTML = "";
|
|
2040
|
-
const labelText = this.slotName === "default" ? "default (Inner content)" : `slot="${this.slotName}"`;
|
|
2041
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
2042
|
-
class: "property-meta"
|
|
2043
|
-
}, /* @__PURE__ */ h("span", {
|
|
2044
|
-
class: "property-label"
|
|
2045
|
-
}, labelText), /* @__PURE__ */ h("span", {
|
|
2046
|
-
class: "property-label-sub"
|
|
2047
|
-
}, this.slotConfig.description || "")));
|
|
2048
|
-
let inputControl;
|
|
2049
|
-
if (this.activeComponentTag === "q-data-table" && this.slotName === "footer") {
|
|
2050
|
-
inputControl = /* @__PURE__ */ h("q-syntax-box", {
|
|
2051
|
-
editable: true,
|
|
2052
|
-
language: "html",
|
|
2053
|
-
height: "110px",
|
|
2054
|
-
"data-slot": this.slotName,
|
|
2055
|
-
value: this.slotConfig.currentValue,
|
|
2056
|
-
onQInput: (e) => updateKnobValue("slot", this.slotName, e.detail)
|
|
2057
|
-
});
|
|
2058
|
-
} else if (this.slotConfig.description && (this.slotConfig.description.includes("textarea") || this.slotConfig.description.includes("html"))) {
|
|
2059
|
-
inputControl = /* @__PURE__ */ h("q-textarea", {
|
|
2060
|
-
rows: 4,
|
|
2061
|
-
"data-slot": this.slotName,
|
|
2062
|
-
value: this.slotConfig.currentValue,
|
|
2063
|
-
onQInput: (e) => updateKnobValue("slot", this.slotName, e.detail)
|
|
2064
|
-
});
|
|
2065
|
-
} else {
|
|
2066
|
-
inputControl = /* @__PURE__ */ h("q-input", {
|
|
2067
|
-
type: "text",
|
|
2068
|
-
"data-slot": this.slotName,
|
|
2069
|
-
value: this.slotConfig.currentValue,
|
|
2070
|
-
onQInput: (e) => updateKnobValue("slot", this.slotName, e.detail)
|
|
2071
|
-
});
|
|
2072
|
-
}
|
|
2073
|
-
this.appendChild(inputControl);
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
customElements.define("slot-row", SlotRow);
|
|
2077
|
-
|
|
2078
|
-
// src/playground/components/properties-panel/properties-panel.css
|
|
2079
|
-
var properties_panel_default = `.properties-panel {
|
|
2080
|
-
width: 340px;
|
|
2081
|
-
--q-sidepanel-panel-width: 340px;
|
|
2082
|
-
--q-sidepanel-panel-padding: 0;
|
|
2083
|
-
--q-sidepanel-panel-header-padding: 0;
|
|
2084
|
-
--q-sidepanel-panel-footer-padding: 0;
|
|
2085
|
-
flex-shrink: 0;
|
|
2086
|
-
display: flex;
|
|
2087
|
-
flex-direction: column;
|
|
2088
|
-
height: 100%;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
.properties-panel::part(header),
|
|
2092
|
-
.properties-panel::part(footer) {
|
|
2093
|
-
display: none;
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
.properties-panel::part(body) {
|
|
2097
|
-
overflow: hidden;
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
.properties-scroll-content {
|
|
2101
|
-
padding: 20px;
|
|
2102
|
-
display: flex;
|
|
2103
|
-
flex-direction: column;
|
|
2104
|
-
gap: 24px;
|
|
2105
|
-
box-sizing: border-box;
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
.properties-section-title {
|
|
2109
|
-
font-size: 0.8rem;
|
|
2110
|
-
text-transform: uppercase;
|
|
2111
|
-
letter-spacing: 0.05em;
|
|
2112
|
-
color: var(--q-fg-muted);
|
|
2113
|
-
border-bottom: var(--q-border);
|
|
2114
|
-
padding-bottom: 8px;
|
|
2115
|
-
margin: 0 0 12px 0;
|
|
2116
|
-
}
|
|
2117
|
-
|
|
2118
|
-
.property-row {
|
|
2119
|
-
display: flex;
|
|
2120
|
-
align-items: center;
|
|
2121
|
-
justify-content: space-between;
|
|
2122
|
-
padding: 8px 0;
|
|
2123
|
-
gap: 12px;
|
|
2124
|
-
border-bottom: 1px dashed color-mix(in srgb, var(--q-border-color) 45%, transparent);
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
.property-row.vertical {
|
|
2128
|
-
flex-direction: column;
|
|
2129
|
-
align-items: flex-start;
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
.property-meta {
|
|
2133
|
-
flex: 1;
|
|
2134
|
-
min-width: 0;
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
.property-control-container {
|
|
2138
|
-
flex: 1;
|
|
2139
|
-
display: flex;
|
|
2140
|
-
justify-content: flex-end;
|
|
2141
|
-
min-width: 0;
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
.property-label {
|
|
2145
|
-
font-size: 0.85rem;
|
|
2146
|
-
font-weight: 500;
|
|
2147
|
-
color: var(--q-fg-base);
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
.property-label-sub {
|
|
2151
|
-
font-size: 0.7rem;
|
|
2152
|
-
color: var(--q-fg-muted);
|
|
2153
|
-
display: block;
|
|
2154
|
-
margin-top: 2px;
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
.properties-panel-header {
|
|
2158
|
-
display: none;
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
.properties-toggle-btn {
|
|
2162
|
-
display: none;
|
|
2163
|
-
position: fixed;
|
|
2164
|
-
bottom: 24px;
|
|
2165
|
-
right: 24px;
|
|
2166
|
-
background: linear-gradient(135deg, var(--q-color-primary) 0%, var(--q-color-primary-hover) 100%);
|
|
2167
|
-
color: var(--q-bg-base);
|
|
2168
|
-
border: none;
|
|
2169
|
-
border-radius: 50px;
|
|
2170
|
-
padding: 12px 20px;
|
|
2171
|
-
font-weight: 600;
|
|
2172
|
-
font-size: 0.9rem;
|
|
2173
|
-
cursor: pointer;
|
|
2174
|
-
box-shadow: var(--q-glow-interactive);
|
|
2175
|
-
align-items: center;
|
|
2176
|
-
gap: 8px;
|
|
2177
|
-
z-index: 998;
|
|
2178
|
-
transition:
|
|
2179
|
-
transform 0.2s,
|
|
2180
|
-
box-shadow 0.2s;
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
.properties-toggle-btn:hover {
|
|
2184
|
-
transform: translateY(-2px);
|
|
2185
|
-
box-shadow: var(--q-shadow-medium), var(--q-glow-interactive);
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
.properties-toggle-btn:active {
|
|
2189
|
-
transform: translateY(0);
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
.properties-toggle-icon {
|
|
2193
|
-
font-size: 1rem;
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2196
|
-
/* Custom WebQuark Component Properties Layout */
|
|
2197
|
-
.property-row:not(.vertical) q-dropdown,
|
|
2198
|
-
.property-row:not(.vertical) q-input {
|
|
2199
|
-
width: 100% !important;
|
|
2200
|
-
display: block !important;
|
|
2201
|
-
min-width: 0 !important;
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
.property-row.vertical q-input,
|
|
2205
|
-
.property-row.vertical q-textarea,
|
|
2206
|
-
.property-row.vertical q-syntax-box {
|
|
2207
|
-
width: 100%;
|
|
2208
|
-
max-width: 100%;
|
|
2209
|
-
box-sizing: border-box;
|
|
2210
|
-
margin-top: 6px;
|
|
2211
|
-
display: block;
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2214
|
-
/* Mobile properties panel overrides */
|
|
2215
|
-
@media (max-width: 900px) {
|
|
2216
|
-
.properties-panel {
|
|
2217
|
-
position: fixed;
|
|
2218
|
-
bottom: 0;
|
|
2219
|
-
left: 0;
|
|
2220
|
-
right: 0;
|
|
2221
|
-
height: 60vh;
|
|
2222
|
-
width: 100%;
|
|
2223
|
-
z-index: 1000;
|
|
2224
|
-
transform: translateY(100%);
|
|
2225
|
-
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2226
|
-
--q-sidepanel-panel-width: 100%;
|
|
2227
|
-
border-left: none;
|
|
2228
|
-
box-shadow: var(--q-shadow-high);
|
|
2229
|
-
box-sizing: border-box;
|
|
2230
|
-
display: flex;
|
|
2231
|
-
flex-direction: column;
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
.properties-panel::part(panel) {
|
|
2235
|
-
border-left: none;
|
|
2236
|
-
border-top: var(--q-border);
|
|
2237
|
-
}
|
|
2238
|
-
|
|
2239
|
-
.properties-panel.open {
|
|
2240
|
-
transform: translateY(0);
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
.properties-section {
|
|
2244
|
-
flex: none;
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
.properties-panel-header {
|
|
2248
|
-
display: flex;
|
|
2249
|
-
align-items: center;
|
|
2250
|
-
justify-content: space-between;
|
|
2251
|
-
padding-bottom: 12px;
|
|
2252
|
-
border-bottom: var(--q-border);
|
|
2253
|
-
margin-bottom: 8px;
|
|
2254
|
-
gap: 16px;
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
.properties-panel-header span {
|
|
2258
|
-
font-weight: 700;
|
|
2259
|
-
font-size: 1rem;
|
|
2260
|
-
color: var(--q-fg-base);
|
|
2261
|
-
flex-shrink: 1;
|
|
2262
|
-
min-width: 0;
|
|
2263
|
-
overflow: hidden;
|
|
2264
|
-
text-overflow: ellipsis;
|
|
2265
|
-
white-space: nowrap;
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
.properties-close-btn {
|
|
2269
|
-
background: transparent;
|
|
2270
|
-
border: none;
|
|
2271
|
-
color: var(--q-fg-base);
|
|
2272
|
-
font-size: 1.5rem;
|
|
2273
|
-
cursor: pointer;
|
|
2274
|
-
padding: 4px 8px;
|
|
2275
|
-
line-height: 1;
|
|
2276
|
-
display: flex;
|
|
2277
|
-
align-items: center;
|
|
2278
|
-
justify-content: center;
|
|
2279
|
-
flex-shrink: 0;
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
|
-
.properties-toggle-btn {
|
|
2283
|
-
display: flex;
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
.property-empty-state {
|
|
2288
|
-
color: var(--q-fg-muted);
|
|
2289
|
-
font-size: 0.85rem;
|
|
2290
|
-
}
|
|
2291
|
-
`;
|
|
2292
|
-
|
|
2293
|
-
// src/playground/components/properties-panel/properties-panel.tsx
|
|
2294
|
-
class PropertiesPanel extends HTMLElement {
|
|
2295
|
-
panel = null;
|
|
2296
|
-
attrContainer = null;
|
|
2297
|
-
slotContainer = null;
|
|
2298
|
-
cleanupEffect;
|
|
2299
|
-
lastActiveComponent = null;
|
|
2300
|
-
connectedCallback() {
|
|
2301
|
-
this.innerHTML = "";
|
|
2302
|
-
const toggleBtn = /* @__PURE__ */ h("button", {
|
|
2303
|
-
class: "properties-toggle-btn",
|
|
2304
|
-
id: "propertiesToggleBtn",
|
|
2305
|
-
type: "button",
|
|
2306
|
-
onClick: () => this.openPanel()
|
|
2307
|
-
}, /* @__PURE__ */ h("span", {
|
|
2308
|
-
class: "properties-toggle-icon"
|
|
2309
|
-
}, "⚙️"), /* @__PURE__ */ h("span", null, "Properties"));
|
|
2310
|
-
const closeBtn = /* @__PURE__ */ h("button", {
|
|
2311
|
-
class: "properties-close-btn",
|
|
2312
|
-
id: "propertiesCloseBtn",
|
|
2313
|
-
type: "button",
|
|
2314
|
-
onClick: () => this.closePanel()
|
|
2315
|
-
}, "×");
|
|
2316
|
-
this.panel = /* @__PURE__ */ h("q-sidepanel", {
|
|
2317
|
-
class: "properties-panel",
|
|
2318
|
-
id: "propertiesPanel",
|
|
2319
|
-
variant: "panel",
|
|
2320
|
-
side: "right"
|
|
2321
|
-
}, /* @__PURE__ */ h("q-scrollable", {
|
|
2322
|
-
height: "100%"
|
|
2323
|
-
}, /* @__PURE__ */ h("div", {
|
|
2324
|
-
class: "properties-scroll-content"
|
|
2325
|
-
}, /* @__PURE__ */ h("div", {
|
|
2326
|
-
class: "properties-panel-header"
|
|
2327
|
-
}, /* @__PURE__ */ h("span", null, "Component Properties"), closeBtn), /* @__PURE__ */ h("div", {
|
|
2328
|
-
class: "properties-section"
|
|
2329
|
-
}, /* @__PURE__ */ h("h3", {
|
|
2330
|
-
class: "properties-section-title"
|
|
2331
|
-
}, "Properties"), /* @__PURE__ */ h("div", {
|
|
2332
|
-
id: "attributeProperties"
|
|
2333
|
-
})), /* @__PURE__ */ h("div", {
|
|
2334
|
-
class: "properties-section",
|
|
2335
|
-
style: "margin-top: 10px;"
|
|
2336
|
-
}, /* @__PURE__ */ h("h3", {
|
|
2337
|
-
class: "properties-section-title"
|
|
2338
|
-
}, "Slots (Content)"), /* @__PURE__ */ h("div", {
|
|
2339
|
-
id: "slotProperties"
|
|
2340
|
-
})))));
|
|
2341
|
-
this.appendChild(toggleBtn);
|
|
2342
|
-
this.appendChild(this.panel);
|
|
2343
|
-
const styleId = "properties-panel-style";
|
|
2344
|
-
let style = document.getElementById(styleId);
|
|
2345
|
-
if (!style) {
|
|
2346
|
-
style = document.createElement("style");
|
|
2347
|
-
style.id = styleId;
|
|
2348
|
-
document.head.appendChild(style);
|
|
2349
|
-
}
|
|
2350
|
-
style.textContent = properties_panel_default;
|
|
2351
|
-
this.init(toggleBtn);
|
|
2352
|
-
}
|
|
2353
|
-
init(toggleBtn) {
|
|
2354
|
-
this.attrContainer = this.querySelector("#attributeProperties");
|
|
2355
|
-
this.slotContainer = this.querySelector("#slotProperties");
|
|
2356
|
-
this.cleanupEffect = effect(() => {
|
|
2357
|
-
const active = activeComponent();
|
|
2358
|
-
const tab = activeTab();
|
|
2359
|
-
const registry = componentRegistry();
|
|
2360
|
-
const config = registry[active];
|
|
2361
|
-
if (active === "global-styling" || tab !== "sandbox") {
|
|
2362
|
-
this.style.display = "none";
|
|
2363
|
-
toggleBtn.style.display = "none";
|
|
2364
|
-
if (this.panel)
|
|
2365
|
-
this.panel.classList.remove("open");
|
|
2366
|
-
return;
|
|
2367
|
-
}
|
|
2368
|
-
this.style.display = "";
|
|
2369
|
-
toggleBtn.style.display = "";
|
|
2370
|
-
if (config) {
|
|
2371
|
-
this.buildProperties(config, active);
|
|
2372
|
-
}
|
|
2373
|
-
});
|
|
2374
|
-
}
|
|
2375
|
-
buildProperties(config, active) {
|
|
2376
|
-
if (!this.attrContainer || !this.slotContainer)
|
|
2377
|
-
return;
|
|
2378
|
-
if (this.lastActiveComponent !== active) {
|
|
2379
|
-
this.attrContainer.innerHTML = "";
|
|
2380
|
-
if (config.props && Object.keys(config.props).length > 0) {
|
|
2381
|
-
Object.keys(config.props).forEach((propName) => {
|
|
2382
|
-
if (config.props) {
|
|
2383
|
-
const prop = config.props[propName];
|
|
2384
|
-
const row = document.createElement("property-row");
|
|
2385
|
-
row.propName = propName;
|
|
2386
|
-
row.prop = prop;
|
|
2387
|
-
this.attrContainer.appendChild(row);
|
|
2388
|
-
}
|
|
2389
|
-
});
|
|
2390
|
-
} else {
|
|
2391
|
-
this.attrContainer.appendChild(/* @__PURE__ */ h("div", {
|
|
2392
|
-
class: "property-empty-state"
|
|
2393
|
-
}, "No customizable attributes."));
|
|
2394
|
-
}
|
|
2395
|
-
} else {
|
|
2396
|
-
if (config.props) {
|
|
2397
|
-
Object.keys(config.props).forEach((propName) => {
|
|
2398
|
-
const prop = config.props[propName];
|
|
2399
|
-
const control = this.attrContainer.querySelector(`[data-prop="${propName}"]`);
|
|
2400
|
-
if (control) {
|
|
2401
|
-
if (prop.type === "boolean") {
|
|
2402
|
-
if (control.checked !== prop.currentValue) {
|
|
2403
|
-
control.checked = prop.currentValue;
|
|
2404
|
-
}
|
|
2405
|
-
} else {
|
|
2406
|
-
if (control.value !== prop.currentValue && document.activeElement !== control) {
|
|
2407
|
-
control.value = prop.currentValue;
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
}
|
|
2411
|
-
});
|
|
2412
|
-
}
|
|
2413
|
-
}
|
|
2414
|
-
if (this.lastActiveComponent !== active) {
|
|
2415
|
-
this.slotContainer.innerHTML = "";
|
|
2416
|
-
if (config.slots && Object.keys(config.slots).length > 0) {
|
|
2417
|
-
Object.keys(config.slots).forEach((slotName) => {
|
|
2418
|
-
if (config.slots) {
|
|
2419
|
-
const slot = config.slots[slotName];
|
|
2420
|
-
const row = document.createElement("slot-row");
|
|
2421
|
-
row.slotName = slotName;
|
|
2422
|
-
row.slotConfig = slot;
|
|
2423
|
-
row.activeComponentTag = active;
|
|
2424
|
-
this.slotContainer.appendChild(row);
|
|
2425
|
-
}
|
|
2426
|
-
});
|
|
2427
|
-
} else {
|
|
2428
|
-
this.slotContainer.appendChild(/* @__PURE__ */ h("div", {
|
|
2429
|
-
class: "property-empty-state"
|
|
2430
|
-
}, "No slot options configured."));
|
|
2431
|
-
}
|
|
2432
|
-
} else {
|
|
2433
|
-
if (config.slots) {
|
|
2434
|
-
Object.keys(config.slots).forEach((slotName) => {
|
|
2435
|
-
const slot = config.slots[slotName];
|
|
2436
|
-
const control = this.slotContainer.querySelector(`[data-slot="${slotName}"]`);
|
|
2437
|
-
if (control) {
|
|
2438
|
-
if (control.value !== slot.currentValue && document.activeElement !== control) {
|
|
2439
|
-
control.value = slot.currentValue;
|
|
2440
|
-
}
|
|
2441
|
-
}
|
|
2442
|
-
});
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
this.lastActiveComponent = active;
|
|
2446
|
-
}
|
|
2447
|
-
openPanel() {
|
|
2448
|
-
if (this.panel)
|
|
2449
|
-
this.panel.classList.add("open");
|
|
2450
|
-
}
|
|
2451
|
-
closePanel() {
|
|
2452
|
-
if (this.panel)
|
|
2453
|
-
this.panel.classList.remove("open");
|
|
2454
|
-
}
|
|
2455
|
-
disconnectedCallback() {
|
|
2456
|
-
if (this.cleanupEffect) {
|
|
2457
|
-
this.cleanupEffect();
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
customElements.define("properties-panel", PropertiesPanel);
|
|
2462
|
-
|
|
2463
|
-
// src/playground/components/theme-designer/token-row.tsx
|
|
2464
|
-
class TokenRow extends HTMLElement {
|
|
2465
|
-
token;
|
|
2466
|
-
pixelValue(value) {
|
|
2467
|
-
const rootSize = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
2468
|
-
return (parseFloat(value) || 0) * (value.endsWith("rem") ? rootSize : 1);
|
|
2469
|
-
}
|
|
2470
|
-
syncValue() {
|
|
2471
|
-
const computedStyle = window.getComputedStyle(document.documentElement);
|
|
2472
|
-
const val = computedStyle.getPropertyValue(this.token.name).trim();
|
|
2473
|
-
if (this.token.type === "text") {
|
|
2474
|
-
const input = this.querySelector(".token-text-input");
|
|
2475
|
-
if (input)
|
|
2476
|
-
input.value = val;
|
|
2477
|
-
} else if (this.token.type === "color") {
|
|
2478
|
-
const hexVal = convertToHex(val);
|
|
2479
|
-
const picker = this.querySelector(".color-swatch-picker");
|
|
2480
|
-
const textInput = this.querySelector(".color-text-input");
|
|
2481
|
-
if (picker)
|
|
2482
|
-
picker.value = hexVal;
|
|
2483
|
-
if (textInput)
|
|
2484
|
-
textInput.value = hexVal;
|
|
2485
|
-
} else {
|
|
2486
|
-
const numVal = this.pixelValue(val);
|
|
2487
|
-
const slider = this.querySelector(".range-slider-input");
|
|
2488
|
-
const display = this.querySelector(".range-slider-value");
|
|
2489
|
-
if (slider)
|
|
2490
|
-
slider.value = String(numVal);
|
|
2491
|
-
if (display)
|
|
2492
|
-
display.innerText = `${numVal}px`;
|
|
2493
|
-
}
|
|
2494
|
-
}
|
|
2495
|
-
connectedCallback() {
|
|
2496
|
-
if (!this.token)
|
|
2497
|
-
return;
|
|
2498
|
-
this.className = "token-row";
|
|
2499
|
-
this.innerHTML = "";
|
|
2500
|
-
const computedStyle = window.getComputedStyle(document.documentElement);
|
|
2501
|
-
const val = computedStyle.getPropertyValue(this.token.name).trim();
|
|
2502
|
-
let control;
|
|
2503
|
-
if (this.token.type === "text") {
|
|
2504
|
-
control = /* @__PURE__ */ h("input", {
|
|
2505
|
-
type: "text",
|
|
2506
|
-
class: "color-text-input token-text-input",
|
|
2507
|
-
"aria-label": this.token.label,
|
|
2508
|
-
value: val,
|
|
2509
|
-
onChange: (event) => {
|
|
2510
|
-
const value = event.target.value.trim();
|
|
2511
|
-
if (value)
|
|
2512
|
-
document.documentElement.style.setProperty(this.token.name, value);
|
|
2513
|
-
else
|
|
2514
|
-
document.documentElement.style.removeProperty(this.token.name);
|
|
2515
|
-
}
|
|
2516
|
-
});
|
|
2517
|
-
} else if (this.token.type === "color") {
|
|
2518
|
-
const hexVal = convertToHex(val);
|
|
2519
|
-
const picker = /* @__PURE__ */ h("input", {
|
|
2520
|
-
type: "color",
|
|
2521
|
-
class: "color-swatch-picker",
|
|
2522
|
-
"data-token": this.token.name,
|
|
2523
|
-
value: hexVal,
|
|
2524
|
-
onInput: (e) => {
|
|
2525
|
-
const target = e.target;
|
|
2526
|
-
const textInput = this.querySelector(".color-text-input");
|
|
2527
|
-
if (textInput)
|
|
2528
|
-
textInput.value = target.value;
|
|
2529
|
-
document.documentElement.style.setProperty(this.token.name, target.value);
|
|
2530
|
-
}
|
|
2531
|
-
});
|
|
2532
|
-
const textInput = /* @__PURE__ */ h("input", {
|
|
2533
|
-
type: "text",
|
|
2534
|
-
class: "color-text-input",
|
|
2535
|
-
"data-token": this.token.name,
|
|
2536
|
-
value: hexVal,
|
|
2537
|
-
onInput: (e) => {
|
|
2538
|
-
const target = e.target;
|
|
2539
|
-
const newColor = target.value;
|
|
2540
|
-
if (/^#[0-9A-F]{6}$/i.test(newColor)) {
|
|
2541
|
-
const pickerEl = this.querySelector(".color-swatch-picker");
|
|
2542
|
-
if (pickerEl)
|
|
2543
|
-
pickerEl.value = newColor;
|
|
2544
|
-
document.documentElement.style.setProperty(this.token.name, newColor);
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
});
|
|
2548
|
-
control = /* @__PURE__ */ h("div", {
|
|
2549
|
-
class: "color-input-container"
|
|
2550
|
-
}, /* @__PURE__ */ h("div", {
|
|
2551
|
-
class: "color-picker-wrapper"
|
|
2552
|
-
}, picker), textInput);
|
|
2553
|
-
} else {
|
|
2554
|
-
const numVal = this.pixelValue(val);
|
|
2555
|
-
const valDisplay = /* @__PURE__ */ h("span", {
|
|
2556
|
-
class: "range-slider-value",
|
|
2557
|
-
"data-token": this.token.name
|
|
2558
|
-
}, numVal, "px");
|
|
2559
|
-
const slider = /* @__PURE__ */ h("input", {
|
|
2560
|
-
type: "range",
|
|
2561
|
-
step: "0.5",
|
|
2562
|
-
class: "range-slider-input",
|
|
2563
|
-
min: String(this.token.min ?? 0),
|
|
2564
|
-
max: String(this.token.max ?? 40),
|
|
2565
|
-
value: String(numVal),
|
|
2566
|
-
"data-token": this.token.name,
|
|
2567
|
-
onInput: (e) => {
|
|
2568
|
-
const target = e.target;
|
|
2569
|
-
valDisplay.innerText = `${target.value}px`;
|
|
2570
|
-
const rootSize = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
2571
|
-
document.documentElement.style.setProperty(this.token.name, this.token.type === "dimension" ? `${Number(target.value) / rootSize}rem` : `${target.value}px`);
|
|
2572
|
-
}
|
|
2573
|
-
});
|
|
2574
|
-
control = /* @__PURE__ */ h("div", {
|
|
2575
|
-
class: "range-slider-container"
|
|
2576
|
-
}, slider, valDisplay);
|
|
2577
|
-
}
|
|
2578
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
2579
|
-
class: "token-info"
|
|
2580
|
-
}, /* @__PURE__ */ h("span", {
|
|
2581
|
-
class: "token-label"
|
|
2582
|
-
}, this.token.label), /* @__PURE__ */ h("span", {
|
|
2583
|
-
class: "token-desc"
|
|
2584
|
-
}, this.token.desc)));
|
|
2585
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
2586
|
-
class: "token-control-wrapper"
|
|
2587
|
-
}, control));
|
|
2588
|
-
}
|
|
2589
|
-
}
|
|
2590
|
-
customElements.define("token-row", TokenRow);
|
|
2591
|
-
|
|
2592
|
-
// src/playground/components/theme-designer/token-section.tsx
|
|
2593
|
-
class TokenSection extends HTMLElement {
|
|
2594
|
-
categoryName;
|
|
2595
|
-
tokens;
|
|
2596
|
-
connectedCallback() {
|
|
2597
|
-
if (!this.categoryName || !this.tokens)
|
|
2598
|
-
return;
|
|
2599
|
-
this.className = "theme-section-card";
|
|
2600
|
-
this.innerHTML = "";
|
|
2601
|
-
this.appendChild(/* @__PURE__ */ h("h3", null, this.categoryName));
|
|
2602
|
-
this.tokens.forEach((token) => {
|
|
2603
|
-
const row = document.createElement("token-row");
|
|
2604
|
-
row.token = token;
|
|
2605
|
-
this.appendChild(row);
|
|
2606
|
-
});
|
|
2607
|
-
}
|
|
2608
|
-
}
|
|
2609
|
-
customElements.define("token-section", TokenSection);
|
|
2610
|
-
|
|
2611
|
-
// src/playground/components/theme-designer/theme-designer.css
|
|
2612
|
-
var theme_designer_default = `.theme-designer-container {
|
|
2613
|
-
padding: 32px 24px;
|
|
2614
|
-
max-width: 1000px;
|
|
2615
|
-
margin: 0 auto;
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
.theme-designer-header {
|
|
2619
|
-
display: flex;
|
|
2620
|
-
align-items: center;
|
|
2621
|
-
justify-content: space-between;
|
|
2622
|
-
margin-bottom: 8px;
|
|
2623
|
-
flex-wrap: wrap;
|
|
2624
|
-
gap: 16px;
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
.theme-designer-header h2 {
|
|
2628
|
-
font-size: 1.75rem;
|
|
2629
|
-
font-weight: 700;
|
|
2630
|
-
margin: 0;
|
|
2631
|
-
background: linear-gradient(135deg, var(--q-fg-base) 30%, var(--q-color-primary) 100%);
|
|
2632
|
-
-webkit-background-clip: text;
|
|
2633
|
-
-webkit-text-fill-color: transparent;
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
.theme-designer-desc {
|
|
2637
|
-
font-size: 0.95rem;
|
|
2638
|
-
color: var(--q-fg-muted);
|
|
2639
|
-
margin: 0 0 32px 0;
|
|
2640
|
-
line-height: 1.5;
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
.reset-theme-btn {
|
|
2644
|
-
display: flex;
|
|
2645
|
-
align-items: center;
|
|
2646
|
-
gap: 8px;
|
|
2647
|
-
background: transparent;
|
|
2648
|
-
border: var(--q-border);
|
|
2649
|
-
color: var(--q-fg-base);
|
|
2650
|
-
padding: 8px 16px;
|
|
2651
|
-
border-radius: var(--q-radius-md, 8px);
|
|
2652
|
-
font-size: 0.85rem;
|
|
2653
|
-
font-weight: 600;
|
|
2654
|
-
cursor: pointer;
|
|
2655
|
-
transition: all 0.2s ease;
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
.reset-theme-btn:hover {
|
|
2659
|
-
background: var(--q-btn-hover-overlay);
|
|
2660
|
-
border-color: var(--q-fg-base);
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
.theme-sections-grid {
|
|
2664
|
-
display: grid;
|
|
2665
|
-
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
2666
|
-
gap: 24px;
|
|
2667
|
-
margin-top: 16px;
|
|
2668
|
-
}
|
|
2669
|
-
|
|
2670
|
-
.theme-section-card {
|
|
2671
|
-
background: var(--q-bg-surface-1);
|
|
2672
|
-
border: var(--q-border);
|
|
2673
|
-
border-radius: var(--q-radius-lg, 12px);
|
|
2674
|
-
padding: 24px;
|
|
2675
|
-
box-shadow: var(--q-shadow-low);
|
|
2676
|
-
}
|
|
2677
|
-
|
|
2678
|
-
.theme-section-card h3 {
|
|
2679
|
-
font-size: 1.15rem;
|
|
2680
|
-
font-weight: 600;
|
|
2681
|
-
margin: 0 0 20px 0;
|
|
2682
|
-
padding-bottom: 10px;
|
|
2683
|
-
border-bottom: var(--q-border);
|
|
2684
|
-
color: var(--q-fg-base);
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2687
|
-
.token-row {
|
|
2688
|
-
display: flex;
|
|
2689
|
-
flex-direction: column;
|
|
2690
|
-
gap: 8px;
|
|
2691
|
-
margin-bottom: 20px;
|
|
2692
|
-
}
|
|
2693
|
-
|
|
2694
|
-
.token-row:last-child {
|
|
2695
|
-
margin-bottom: 0;
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
.token-info {
|
|
2699
|
-
display: flex;
|
|
2700
|
-
flex-direction: column;
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
.token-label {
|
|
2704
|
-
font-size: 0.9rem;
|
|
2705
|
-
font-weight: 600;
|
|
2706
|
-
color: var(--q-fg-base);
|
|
2707
|
-
}
|
|
2708
|
-
|
|
2709
|
-
.token-desc {
|
|
2710
|
-
font-size: 0.75rem;
|
|
2711
|
-
color: var(--q-fg-muted);
|
|
2712
|
-
}
|
|
2713
|
-
|
|
2714
|
-
.token-control-wrapper {
|
|
2715
|
-
display: flex;
|
|
2716
|
-
align-items: center;
|
|
2717
|
-
gap: 12px;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
/* Color control styling */
|
|
2721
|
-
.color-input-container {
|
|
2722
|
-
display: flex;
|
|
2723
|
-
align-items: center;
|
|
2724
|
-
gap: 8px;
|
|
2725
|
-
width: 100%;
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
.color-picker-wrapper {
|
|
2729
|
-
position: relative;
|
|
2730
|
-
width: 38px;
|
|
2731
|
-
height: 38px;
|
|
2732
|
-
border-radius: var(--q-radius-md, 8px);
|
|
2733
|
-
overflow: hidden;
|
|
2734
|
-
border: var(--q-border);
|
|
2735
|
-
cursor: pointer;
|
|
2736
|
-
flex-shrink: 0;
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
.color-swatch-picker {
|
|
2740
|
-
position: absolute;
|
|
2741
|
-
top: -8px;
|
|
2742
|
-
left: -8px;
|
|
2743
|
-
width: 56px;
|
|
2744
|
-
height: 56px;
|
|
2745
|
-
padding: 0;
|
|
2746
|
-
border: 0;
|
|
2747
|
-
cursor: pointer;
|
|
2748
|
-
background: none;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
.color-text-input {
|
|
2752
|
-
flex: 1;
|
|
2753
|
-
background: var(--q-bg-base);
|
|
2754
|
-
border: var(--q-border);
|
|
2755
|
-
color: var(--q-fg-base);
|
|
2756
|
-
padding: 8px 12px;
|
|
2757
|
-
border-radius: var(--q-radius-md, 8px);
|
|
2758
|
-
font-size: 0.85rem;
|
|
2759
|
-
font-family: monospace;
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
.color-text-input:focus {
|
|
2763
|
-
outline: none;
|
|
2764
|
-
border-color: var(--q-color-primary);
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
/* Range input/slider overrides */
|
|
2768
|
-
.range-slider-container {
|
|
2769
|
-
display: flex;
|
|
2770
|
-
align-items: center;
|
|
2771
|
-
gap: 12px;
|
|
2772
|
-
width: 100%;
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
.range-slider-input {
|
|
2776
|
-
flex: 1;
|
|
2777
|
-
-webkit-appearance: none;
|
|
2778
|
-
appearance: none;
|
|
2779
|
-
height: 6px;
|
|
2780
|
-
border-radius: 3px;
|
|
2781
|
-
background: var(--q-bg-surface-2);
|
|
2782
|
-
outline: none;
|
|
2783
|
-
}
|
|
2784
|
-
|
|
2785
|
-
.range-slider-input::-webkit-slider-thumb {
|
|
2786
|
-
-webkit-appearance: none;
|
|
2787
|
-
appearance: none;
|
|
2788
|
-
width: 16px;
|
|
2789
|
-
height: 16px;
|
|
2790
|
-
border-radius: 50%;
|
|
2791
|
-
background: var(--q-color-primary);
|
|
2792
|
-
cursor: pointer;
|
|
2793
|
-
transition: transform 0.1s ease;
|
|
2794
|
-
}
|
|
2795
|
-
|
|
2796
|
-
.range-slider-input::-webkit-slider-thumb:hover {
|
|
2797
|
-
transform: scale(1.2);
|
|
2798
|
-
}
|
|
2799
|
-
|
|
2800
|
-
.range-slider-value {
|
|
2801
|
-
font-size: 0.85rem;
|
|
2802
|
-
font-family: monospace;
|
|
2803
|
-
color: var(--q-fg-base);
|
|
2804
|
-
min-width: 40px;
|
|
2805
|
-
text-align: right;
|
|
2806
|
-
}
|
|
2807
|
-
`;
|
|
2808
|
-
|
|
2809
|
-
// src/theme/tokens.ts
|
|
2810
|
-
var spaces = { none: 0, xs: 4, sm: 8, md: 12, lg: 16, xl: 24, "2xl": 32, "3xl": 48 };
|
|
2811
|
-
var controls = {
|
|
2812
|
-
sm: { height: 28, font: 12, line: 16, padding: 8, icon: 14, radius: 5.5 },
|
|
2813
|
-
md: { height: 36, font: 14, line: 20, padding: 12, icon: 16, radius: 7 },
|
|
2814
|
-
lg: { height: 44, font: 16, line: 24, padding: 16, icon: 20, radius: 8.5 }
|
|
2815
|
-
};
|
|
2816
|
-
var rem = (pixels) => `${pixels / 16}rem`;
|
|
2817
|
-
var dimensionTokens = [
|
|
2818
|
-
...Object.entries(spaces).map(([key, value]) => ({ name: `--q-space-${key}`, value: rem(value), label: `Space ${key}` })),
|
|
2819
|
-
...Object.entries(controls).flatMap(([size, metrics]) => Object.entries(metrics).map(([key, value]) => ({
|
|
2820
|
-
name: `--q-control-${key}-${size}`,
|
|
2821
|
-
value: rem(value),
|
|
2822
|
-
label: `${size} control ${key}`
|
|
2823
|
-
})))
|
|
2824
|
-
];
|
|
2825
|
-
var themeGroups = [
|
|
2826
|
-
{
|
|
2827
|
-
category: "Colors",
|
|
2828
|
-
tokens: [
|
|
2829
|
-
{
|
|
2830
|
-
name: "--q-color-primary",
|
|
2831
|
-
value: "#60a5fa",
|
|
2832
|
-
light: "#3b82f6",
|
|
2833
|
-
dark: "#60a5fa"
|
|
2834
|
-
},
|
|
2835
|
-
{
|
|
2836
|
-
name: "--q-color-primary-hover",
|
|
2837
|
-
value: "#93c5fd",
|
|
2838
|
-
light: "#2563eb",
|
|
2839
|
-
dark: "#93c5fd"
|
|
2840
|
-
},
|
|
2841
|
-
{
|
|
2842
|
-
name: "--q-color-secondary",
|
|
2843
|
-
value: "#9777ea",
|
|
2844
|
-
light: "#7c3aed",
|
|
2845
|
-
dark: "#9777ea"
|
|
2846
|
-
},
|
|
2847
|
-
{
|
|
2848
|
-
name: "--q-color-success",
|
|
2849
|
-
value: "#34d399",
|
|
2850
|
-
light: "#10b981",
|
|
2851
|
-
dark: "#34d399"
|
|
2852
|
-
},
|
|
2853
|
-
{
|
|
2854
|
-
name: "--q-color-warning",
|
|
2855
|
-
value: "#fbbf24",
|
|
2856
|
-
light: "#f59e0b",
|
|
2857
|
-
dark: "#fbbf24"
|
|
2858
|
-
},
|
|
2859
|
-
{
|
|
2860
|
-
name: "--q-color-danger",
|
|
2861
|
-
value: "#f87171",
|
|
2862
|
-
light: "#ef4444",
|
|
2863
|
-
dark: "#f87171"
|
|
2864
|
-
}
|
|
2865
|
-
]
|
|
2866
|
-
},
|
|
2867
|
-
{
|
|
2868
|
-
category: "Hierarchical Surfaces & Backgrounds",
|
|
2869
|
-
tokens: [
|
|
2870
|
-
{
|
|
2871
|
-
name: "--q-bg-base",
|
|
2872
|
-
value: "#0b0f19",
|
|
2873
|
-
light: "#ffffff",
|
|
2874
|
-
dark: "#0b0f19"
|
|
2875
|
-
},
|
|
2876
|
-
{
|
|
2877
|
-
name: "--q-bg-surface-1",
|
|
2878
|
-
value: "#111827",
|
|
2879
|
-
light: "#f0f3f9",
|
|
2880
|
-
dark: "#111827"
|
|
2881
|
-
},
|
|
2882
|
-
{
|
|
2883
|
-
name: "--q-bg-surface-2",
|
|
2884
|
-
value: "#19243b",
|
|
2885
|
-
light: "#dee5f2",
|
|
2886
|
-
dark: "#19243b"
|
|
2887
|
-
},
|
|
2888
|
-
{
|
|
2889
|
-
name: "--q-bg-surface-3",
|
|
2890
|
-
value: "#22304d",
|
|
2891
|
-
light: "#c7d1e6",
|
|
2892
|
-
dark: "#22304d"
|
|
2893
|
-
},
|
|
2894
|
-
{
|
|
2895
|
-
name: "--q-bg-surface-4",
|
|
2896
|
-
value: "#2c3a58",
|
|
2897
|
-
light: "#aab8d5",
|
|
2898
|
-
dark: "#2c3a58"
|
|
2899
|
-
},
|
|
2900
|
-
{
|
|
2901
|
-
name: "--q-bg-surface-5",
|
|
2902
|
-
value: "#374761",
|
|
2903
|
-
light: "#8b9dc1",
|
|
2904
|
-
dark: "#374761"
|
|
2905
|
-
},
|
|
2906
|
-
{
|
|
2907
|
-
name: "--q-bg-glass",
|
|
2908
|
-
value: "rgba(25, 36, 59, 0.85)",
|
|
2909
|
-
light: "rgba(255, 255, 255, 0.85)",
|
|
2910
|
-
dark: "rgba(25, 36, 59, 0.85)"
|
|
2911
|
-
},
|
|
2912
|
-
{
|
|
2913
|
-
name: "--q-bg-overlay",
|
|
2914
|
-
value: "rgba(0, 0, 0, 0.85)",
|
|
2915
|
-
light: "rgba(0, 0, 0, 0.6)",
|
|
2916
|
-
dark: "rgba(0, 0, 0, 0.85)"
|
|
2917
|
-
},
|
|
2918
|
-
{
|
|
2919
|
-
name: "--q-fg-base",
|
|
2920
|
-
value: "#f9fafb",
|
|
2921
|
-
light: "#1f2937",
|
|
2922
|
-
dark: "#f9fafb"
|
|
2923
|
-
},
|
|
2924
|
-
{
|
|
2925
|
-
name: "--q-fg-muted",
|
|
2926
|
-
value: "#9ca3af",
|
|
2927
|
-
light: "#4b5563",
|
|
2928
|
-
dark: "#9ca3af"
|
|
2929
|
-
},
|
|
2930
|
-
{
|
|
2931
|
-
name: "--q-border-color",
|
|
2932
|
-
value: "#374151",
|
|
2933
|
-
light: "#e5e7eb",
|
|
2934
|
-
dark: "#374151"
|
|
2935
|
-
}
|
|
2936
|
-
]
|
|
2937
|
-
},
|
|
2938
|
-
{
|
|
2939
|
-
category: "Shadows & OSR-safe glass surfaces",
|
|
2940
|
-
tokens: [
|
|
2941
|
-
{
|
|
2942
|
-
name: "--q-dialog-backdrop-bg",
|
|
2943
|
-
value: "var(--q-bg-overlay, rgba(0, 0, 0, 0.85))"
|
|
2944
|
-
},
|
|
2945
|
-
{
|
|
2946
|
-
name: "--q-dialog-backdrop-solid-bg",
|
|
2947
|
-
value: "var(--q-bg-overlay, rgba(0, 0, 0, 0.85))"
|
|
2948
|
-
},
|
|
2949
|
-
{
|
|
2950
|
-
name: "--q-shadow-low",
|
|
2951
|
-
value: "0 2px 4px rgba(0, 0, 0, 0.2)",
|
|
2952
|
-
light: "0 2px 4px rgba(0, 0, 0, 0.05)",
|
|
2953
|
-
dark: "0 2px 4px rgba(0, 0, 0, 0.2)"
|
|
2954
|
-
},
|
|
2955
|
-
{
|
|
2956
|
-
name: "--q-shadow-medium",
|
|
2957
|
-
value: "0 8px 16px rgba(0, 0, 0, 0.3)",
|
|
2958
|
-
light: "0 8px 16px rgba(0, 0, 0, 0.08)",
|
|
2959
|
-
dark: "0 8px 16px rgba(0, 0, 0, 0.3)"
|
|
2960
|
-
},
|
|
2961
|
-
{
|
|
2962
|
-
name: "--q-shadow-high",
|
|
2963
|
-
value: "0 16px 32px rgba(0, 0, 0, 0.45)",
|
|
2964
|
-
light: "0 16px 32px rgba(0, 0, 0, 0.12)",
|
|
2965
|
-
dark: "0 16px 32px rgba(0, 0, 0, 0.45)"
|
|
2966
|
-
},
|
|
2967
|
-
{
|
|
2968
|
-
name: "--q-glow-interactive",
|
|
2969
|
-
value: "0 0 20px rgba(96, 165, 250, 0.3)",
|
|
2970
|
-
light: "0 0 20px rgba(59, 130, 246, 0.3)",
|
|
2971
|
-
dark: "0 0 20px rgba(96, 165, 250, 0.3)"
|
|
2972
|
-
}
|
|
2973
|
-
]
|
|
2974
|
-
},
|
|
2975
|
-
{
|
|
2976
|
-
category: "Borders & Outlines",
|
|
2977
|
-
tokens: [
|
|
2978
|
-
{
|
|
2979
|
-
name: "--q-border-width",
|
|
2980
|
-
value: "1px"
|
|
2981
|
-
},
|
|
2982
|
-
{
|
|
2983
|
-
name: "--q-border",
|
|
2984
|
-
value: "var(--q-border-width) solid var(--q-border-color)"
|
|
2985
|
-
},
|
|
2986
|
-
{
|
|
2987
|
-
name: "--q-focus-ring",
|
|
2988
|
-
value: "2px solid var(--q-color-primary)"
|
|
2989
|
-
}
|
|
2990
|
-
]
|
|
2991
|
-
},
|
|
2992
|
-
{
|
|
2993
|
-
category: "Typography",
|
|
2994
|
-
tokens: [
|
|
2995
|
-
{
|
|
2996
|
-
name: "--q-font-family",
|
|
2997
|
-
value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"
|
|
2998
|
-
},
|
|
2999
|
-
{
|
|
3000
|
-
name: "--q-font-size-sm",
|
|
3001
|
-
value: "0.7rem"
|
|
3002
|
-
},
|
|
3003
|
-
{
|
|
3004
|
-
name: "--q-font-size-base",
|
|
3005
|
-
value: "0.9rem"
|
|
3006
|
-
},
|
|
3007
|
-
{
|
|
3008
|
-
name: "--q-font-size-lg",
|
|
3009
|
-
value: "1rem"
|
|
3010
|
-
},
|
|
3011
|
-
{
|
|
3012
|
-
name: "--q-font-weight-normal",
|
|
3013
|
-
value: "400"
|
|
3014
|
-
},
|
|
3015
|
-
{
|
|
3016
|
-
name: "--q-font-weight-bold",
|
|
3017
|
-
value: "600"
|
|
3018
|
-
}
|
|
3019
|
-
]
|
|
3020
|
-
},
|
|
3021
|
-
{
|
|
3022
|
-
category: "Spacing & Radii",
|
|
3023
|
-
tokens: [
|
|
3024
|
-
{
|
|
3025
|
-
name: "--q-radius-sm",
|
|
3026
|
-
value: "4px"
|
|
3027
|
-
},
|
|
3028
|
-
{
|
|
3029
|
-
name: "--q-radius-md",
|
|
3030
|
-
value: "7px"
|
|
3031
|
-
},
|
|
3032
|
-
{
|
|
3033
|
-
name: "--q-radius-lg",
|
|
3034
|
-
value: "11px"
|
|
3035
|
-
},
|
|
3036
|
-
{
|
|
3037
|
-
name: "--q-padding-sm",
|
|
3038
|
-
value: "var(--q-space-sm, .5rem)"
|
|
3039
|
-
},
|
|
3040
|
-
{
|
|
3041
|
-
name: "--q-padding-md",
|
|
3042
|
-
value: "var(--q-space-md, .75rem)"
|
|
3043
|
-
},
|
|
3044
|
-
{
|
|
3045
|
-
name: "--q-padding-lg",
|
|
3046
|
-
value: "var(--q-space-lg, 1rem)"
|
|
3047
|
-
}
|
|
3048
|
-
]
|
|
3049
|
-
},
|
|
3050
|
-
{
|
|
3051
|
-
category: "Transitions",
|
|
3052
|
-
tokens: [
|
|
3053
|
-
{
|
|
3054
|
-
name: "--q-transition-fast",
|
|
3055
|
-
value: "150ms ease"
|
|
3056
|
-
},
|
|
3057
|
-
{
|
|
3058
|
-
name: "--q-transition-normal",
|
|
3059
|
-
value: "250ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3060
|
-
},
|
|
3061
|
-
{
|
|
3062
|
-
name: "--q-transition-slow",
|
|
3063
|
-
value: "400ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3064
|
-
}
|
|
3065
|
-
]
|
|
3066
|
-
},
|
|
3067
|
-
{
|
|
3068
|
-
category: "Z-index",
|
|
3069
|
-
tokens: [
|
|
3070
|
-
{
|
|
3071
|
-
name: "--q-z-index-overlay",
|
|
3072
|
-
value: "1000"
|
|
3073
|
-
},
|
|
3074
|
-
{
|
|
3075
|
-
name: "--q-z-index-popover",
|
|
3076
|
-
value: "1100"
|
|
3077
|
-
},
|
|
3078
|
-
{
|
|
3079
|
-
name: "--q-z-index-toast",
|
|
3080
|
-
value: "1200"
|
|
3081
|
-
}
|
|
3082
|
-
]
|
|
3083
|
-
},
|
|
3084
|
-
{
|
|
3085
|
-
category: "Global Animation Base",
|
|
3086
|
-
tokens: [
|
|
3087
|
-
{
|
|
3088
|
-
name: "--q-hover-transform",
|
|
3089
|
-
value: "translateY(-4px) scale(1.02)"
|
|
3090
|
-
}
|
|
3091
|
-
]
|
|
3092
|
-
},
|
|
3093
|
-
{
|
|
3094
|
-
category: "Theme-aware hover overlays (automatically flips in light mode)",
|
|
3095
|
-
tokens: [
|
|
3096
|
-
{
|
|
3097
|
-
name: "--q-btn-hover-overlay",
|
|
3098
|
-
value: "color-mix(in srgb, var(--q-fg-base) 8%, transparent)"
|
|
3099
|
-
}
|
|
3100
|
-
]
|
|
3101
|
-
},
|
|
3102
|
-
{
|
|
3103
|
-
category: "Card (q-card)",
|
|
3104
|
-
tokens: [
|
|
3105
|
-
{
|
|
3106
|
-
name: "--q-card-border",
|
|
3107
|
-
value: "var(--q-border)"
|
|
3108
|
-
},
|
|
3109
|
-
{
|
|
3110
|
-
name: "--q-card-hover-transform",
|
|
3111
|
-
value: "var(--q-hover-transform)"
|
|
3112
|
-
},
|
|
3113
|
-
{
|
|
3114
|
-
name: "--q-card-transition-duration",
|
|
3115
|
-
value: "var(--q-transition-normal)"
|
|
3116
|
-
}
|
|
3117
|
-
]
|
|
3118
|
-
},
|
|
3119
|
-
{
|
|
3120
|
-
category: "Step Diagram (q-step-diagram / q-step-diagram-item)",
|
|
3121
|
-
tokens: [
|
|
3122
|
-
{
|
|
3123
|
-
name: "--q-step-diag-line",
|
|
3124
|
-
value: "2px solid var(--q-border-color)"
|
|
3125
|
-
},
|
|
3126
|
-
{
|
|
3127
|
-
name: "--q-step-diag-border",
|
|
3128
|
-
value: "var(--q-border)"
|
|
3129
|
-
},
|
|
3130
|
-
{
|
|
3131
|
-
name: "--q-step-diag-icon-size",
|
|
3132
|
-
value: "32px"
|
|
3133
|
-
},
|
|
3134
|
-
{
|
|
3135
|
-
name: "--q-step-diag-item-gap",
|
|
3136
|
-
value: "24px"
|
|
3137
|
-
}
|
|
3138
|
-
]
|
|
3139
|
-
},
|
|
3140
|
-
{
|
|
3141
|
-
category: "Media Reel & Thumbnail (q-reel / q-thumbnail)",
|
|
3142
|
-
tokens: [
|
|
3143
|
-
{
|
|
3144
|
-
name: "--q-thumb-aspect-ratio",
|
|
3145
|
-
value: "16 / 9"
|
|
3146
|
-
},
|
|
3147
|
-
{
|
|
3148
|
-
name: "--q-thumb-border",
|
|
3149
|
-
value: "2px solid var(--q-thumb-border-color)"
|
|
3150
|
-
},
|
|
3151
|
-
{
|
|
3152
|
-
name: "--q-thumb-hover-transform",
|
|
3153
|
-
value: "var(--q-hover-transform)"
|
|
3154
|
-
},
|
|
3155
|
-
{
|
|
3156
|
-
name: "--q-thumb-overlay-bg",
|
|
3157
|
-
value: "rgba(0, 0, 0, 0.4)"
|
|
3158
|
-
},
|
|
3159
|
-
{
|
|
3160
|
-
name: "--q-thumb-radius",
|
|
3161
|
-
value: "var(--q-radius-md)"
|
|
3162
|
-
},
|
|
3163
|
-
{
|
|
3164
|
-
name: "--q-thumb-border-color",
|
|
3165
|
-
value: "transparent"
|
|
3166
|
-
},
|
|
3167
|
-
{
|
|
3168
|
-
name: "--q-thumb-glow",
|
|
3169
|
-
value: "var(--q-glow-interactive)"
|
|
3170
|
-
},
|
|
3171
|
-
{
|
|
3172
|
-
name: "--q-reel-gap",
|
|
3173
|
-
value: "12px"
|
|
3174
|
-
},
|
|
3175
|
-
{
|
|
3176
|
-
name: "--q-reel-columns-desktop",
|
|
3177
|
-
value: "repeat(auto-fill, minmax(200px, 1fr))"
|
|
3178
|
-
},
|
|
3179
|
-
{
|
|
3180
|
-
name: "--q-reel-columns-mobile",
|
|
3181
|
-
value: "1fr"
|
|
3182
|
-
},
|
|
3183
|
-
{
|
|
3184
|
-
name: "--q-lightbox-max-size",
|
|
3185
|
-
value: "90vh"
|
|
3186
|
-
},
|
|
3187
|
-
{
|
|
3188
|
-
name: "--q-reel-lightbox-btn-bg",
|
|
3189
|
-
value: "rgba(0, 0, 0, 0.5)"
|
|
3190
|
-
},
|
|
3191
|
-
{
|
|
3192
|
-
name: "--q-reel-lightbox-btn-border",
|
|
3193
|
-
value: "1px solid rgba(255, 255, 255, 0.2)"
|
|
3194
|
-
},
|
|
3195
|
-
{
|
|
3196
|
-
name: "--q-reel-lightbox-btn-color",
|
|
3197
|
-
value: "#ffffff"
|
|
3198
|
-
},
|
|
3199
|
-
{
|
|
3200
|
-
name: "--q-reel-lightbox-btn-hover-bg",
|
|
3201
|
-
value: "rgba(255, 255, 255, 0.2)"
|
|
3202
|
-
}
|
|
3203
|
-
]
|
|
3204
|
-
},
|
|
3205
|
-
{
|
|
3206
|
-
category: "Avatar (q-avatar)",
|
|
3207
|
-
tokens: [
|
|
3208
|
-
{
|
|
3209
|
-
name: "--q-avatar-size-sm",
|
|
3210
|
-
value: "28px"
|
|
3211
|
-
},
|
|
3212
|
-
{
|
|
3213
|
-
name: "--q-avatar-size-md",
|
|
3214
|
-
value: "40px"
|
|
3215
|
-
},
|
|
3216
|
-
{
|
|
3217
|
-
name: "--q-avatar-size-lg",
|
|
3218
|
-
value: "56px"
|
|
3219
|
-
},
|
|
3220
|
-
{
|
|
3221
|
-
name: "--q-avatar-bg",
|
|
3222
|
-
value: "var(--q-bg-surface-3)"
|
|
3223
|
-
},
|
|
3224
|
-
{
|
|
3225
|
-
name: "--q-avatar-fg",
|
|
3226
|
-
value: "var(--q-fg-base)"
|
|
3227
|
-
},
|
|
3228
|
-
{
|
|
3229
|
-
name: "--q-avatar-border",
|
|
3230
|
-
value: "var(--q-border)"
|
|
3231
|
-
}
|
|
3232
|
-
]
|
|
3233
|
-
},
|
|
3234
|
-
{
|
|
3235
|
-
category: "Conversation bubble (q-conversation-bubble)",
|
|
3236
|
-
tokens: [
|
|
3237
|
-
{
|
|
3238
|
-
name: "--q-conversation-incoming-bg",
|
|
3239
|
-
value: "var(--q-bg-surface-2)"
|
|
3240
|
-
},
|
|
3241
|
-
{
|
|
3242
|
-
name: "--q-conversation-outgoing-bg",
|
|
3243
|
-
value: "var(--q-color-primary)"
|
|
3244
|
-
},
|
|
3245
|
-
{
|
|
3246
|
-
name: "--q-conversation-outgoing-fg",
|
|
3247
|
-
value: "#ffffff"
|
|
3248
|
-
},
|
|
3249
|
-
{
|
|
3250
|
-
name: "--q-conversation-system-bg",
|
|
3251
|
-
value: "transparent"
|
|
3252
|
-
},
|
|
3253
|
-
{
|
|
3254
|
-
name: "--q-conversation-system-fg",
|
|
3255
|
-
value: "var(--q-fg-muted)"
|
|
3256
|
-
}
|
|
3257
|
-
]
|
|
3258
|
-
},
|
|
3259
|
-
{
|
|
3260
|
-
category: "Carousel (q-carousel)",
|
|
3261
|
-
tokens: [
|
|
3262
|
-
{
|
|
3263
|
-
name: "--q-carousel-gap",
|
|
3264
|
-
value: "16px"
|
|
3265
|
-
},
|
|
3266
|
-
{
|
|
3267
|
-
name: "--q-carousel-padding",
|
|
3268
|
-
value: "24px 20px"
|
|
3269
|
-
},
|
|
3270
|
-
{
|
|
3271
|
-
name: "--q-carousel-arrow-bg",
|
|
3272
|
-
value: "var(--q-bg-overlay)"
|
|
3273
|
-
},
|
|
3274
|
-
{
|
|
3275
|
-
name: "--q-carousel-arrow-border",
|
|
3276
|
-
value: "var(--q-border)"
|
|
3277
|
-
},
|
|
3278
|
-
{
|
|
3279
|
-
name: "--q-carousel-arrow-color",
|
|
3280
|
-
value: "#ffffff"
|
|
3281
|
-
},
|
|
3282
|
-
{
|
|
3283
|
-
name: "--q-carousel-arrow-size",
|
|
3284
|
-
value: "40px"
|
|
3285
|
-
},
|
|
3286
|
-
{
|
|
3287
|
-
name: "--q-carousel-indicator-gap",
|
|
3288
|
-
value: "8px"
|
|
3289
|
-
},
|
|
3290
|
-
{
|
|
3291
|
-
name: "--q-carousel-indicator-size",
|
|
3292
|
-
value: "6px"
|
|
3293
|
-
}
|
|
3294
|
-
]
|
|
3295
|
-
},
|
|
3296
|
-
{
|
|
3297
|
-
category: "Progress (q-progress)",
|
|
3298
|
-
tokens: [
|
|
3299
|
-
{
|
|
3300
|
-
name: "--q-progress-transition",
|
|
3301
|
-
value: "var(--q-transition-normal)"
|
|
3302
|
-
},
|
|
3303
|
-
{
|
|
3304
|
-
name: "--q-progress-indeterminate-duration",
|
|
3305
|
-
value: "1.4s"
|
|
3306
|
-
},
|
|
3307
|
-
{
|
|
3308
|
-
name: "--q-progress-linear-height-sm",
|
|
3309
|
-
value: "4px"
|
|
3310
|
-
},
|
|
3311
|
-
{
|
|
3312
|
-
name: "--q-progress-linear-height-md",
|
|
3313
|
-
value: "6px"
|
|
3314
|
-
},
|
|
3315
|
-
{
|
|
3316
|
-
name: "--q-progress-linear-height-lg",
|
|
3317
|
-
value: "8px"
|
|
3318
|
-
},
|
|
3319
|
-
{
|
|
3320
|
-
name: "--q-progress-linear-radius",
|
|
3321
|
-
value: "999px"
|
|
3322
|
-
},
|
|
3323
|
-
{
|
|
3324
|
-
name: "--q-progress-circular-size-sm",
|
|
3325
|
-
value: "64px"
|
|
3326
|
-
},
|
|
3327
|
-
{
|
|
3328
|
-
name: "--q-progress-circular-size-md",
|
|
3329
|
-
value: "120px"
|
|
3330
|
-
},
|
|
3331
|
-
{
|
|
3332
|
-
name: "--q-progress-circular-size-lg",
|
|
3333
|
-
value: "180px"
|
|
3334
|
-
},
|
|
3335
|
-
{
|
|
3336
|
-
name: "--q-progress-circular-stroke-width-sm",
|
|
3337
|
-
value: "6px"
|
|
3338
|
-
},
|
|
3339
|
-
{
|
|
3340
|
-
name: "--q-progress-circular-stroke-width-md",
|
|
3341
|
-
value: "8px"
|
|
3342
|
-
},
|
|
3343
|
-
{
|
|
3344
|
-
name: "--q-progress-circular-stroke-width-lg",
|
|
3345
|
-
value: "10px"
|
|
3346
|
-
},
|
|
3347
|
-
{
|
|
3348
|
-
name: "--q-progress-circular-linecap",
|
|
3349
|
-
value: "round"
|
|
3350
|
-
},
|
|
3351
|
-
{
|
|
3352
|
-
name: "--q-progress-circular-font-weight",
|
|
3353
|
-
value: "var(--q-font-weight-bold)"
|
|
3354
|
-
}
|
|
3355
|
-
]
|
|
3356
|
-
},
|
|
3357
|
-
{
|
|
3358
|
-
category: "Button (q-button)",
|
|
3359
|
-
tokens: [
|
|
3360
|
-
{
|
|
3361
|
-
name: "--q-btn-font-weight",
|
|
3362
|
-
value: "var(--q-font-weight-bold)"
|
|
3363
|
-
},
|
|
3364
|
-
{
|
|
3365
|
-
name: "--q-btn-active-transform",
|
|
3366
|
-
value: "scale(0.97)"
|
|
3367
|
-
},
|
|
3368
|
-
{
|
|
3369
|
-
name: "--q-btn-transition",
|
|
3370
|
-
value: "all 150ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3371
|
-
},
|
|
3372
|
-
{
|
|
3373
|
-
name: "--q-btn-icon-padding-sm",
|
|
3374
|
-
value: "4px"
|
|
3375
|
-
},
|
|
3376
|
-
{
|
|
3377
|
-
name: "--q-btn-icon-padding-md",
|
|
3378
|
-
value: "6px"
|
|
3379
|
-
},
|
|
3380
|
-
{
|
|
3381
|
-
name: "--q-btn-icon-padding-lg",
|
|
3382
|
-
value: "9px"
|
|
3383
|
-
}
|
|
3384
|
-
]
|
|
3385
|
-
},
|
|
3386
|
-
{
|
|
3387
|
-
category: "Chip (q-chip)",
|
|
3388
|
-
tokens: [
|
|
3389
|
-
{
|
|
3390
|
-
name: "--q-chip-radius",
|
|
3391
|
-
value: "999px"
|
|
3392
|
-
},
|
|
3393
|
-
{
|
|
3394
|
-
name: "--q-chip-border",
|
|
3395
|
-
value: "var(--q-border)"
|
|
3396
|
-
},
|
|
3397
|
-
{
|
|
3398
|
-
name: "--q-chip-font-weight",
|
|
3399
|
-
value: "var(--q-font-weight-bold)"
|
|
3400
|
-
},
|
|
3401
|
-
{
|
|
3402
|
-
name: "--q-chip-padding-sm",
|
|
3403
|
-
value: "4px 9px"
|
|
3404
|
-
},
|
|
3405
|
-
{
|
|
3406
|
-
name: "--q-chip-padding-md",
|
|
3407
|
-
value: "6px 11px"
|
|
3408
|
-
},
|
|
3409
|
-
{
|
|
3410
|
-
name: "--q-chip-padding-lg",
|
|
3411
|
-
value: "8px 14px"
|
|
3412
|
-
},
|
|
3413
|
-
{
|
|
3414
|
-
name: "--q-chip-height-sm",
|
|
3415
|
-
value: "24px"
|
|
3416
|
-
},
|
|
3417
|
-
{
|
|
3418
|
-
name: "--q-chip-height-md",
|
|
3419
|
-
value: "30px"
|
|
3420
|
-
},
|
|
3421
|
-
{
|
|
3422
|
-
name: "--q-chip-height-lg",
|
|
3423
|
-
value: "36px"
|
|
3424
|
-
},
|
|
3425
|
-
{
|
|
3426
|
-
name: "--q-chip-active-transform",
|
|
3427
|
-
value: "scale(0.97)"
|
|
3428
|
-
}
|
|
3429
|
-
]
|
|
3430
|
-
},
|
|
3431
|
-
{
|
|
3432
|
-
category: "Unified Form Field Variables (Borders & Radius Consistency)",
|
|
3433
|
-
tokens: [
|
|
3434
|
-
{
|
|
3435
|
-
name: "--q-field-border",
|
|
3436
|
-
value: "var(--q-border)"
|
|
3437
|
-
},
|
|
3438
|
-
{
|
|
3439
|
-
name: "--q-field-border-color-focus",
|
|
3440
|
-
value: "var(--q-color-primary)"
|
|
3441
|
-
}
|
|
3442
|
-
]
|
|
3443
|
-
},
|
|
3444
|
-
{
|
|
3445
|
-
category: "Input & Textarea (q-input / q-textarea) mapped to unified field tokens",
|
|
3446
|
-
tokens: [
|
|
3447
|
-
{
|
|
3448
|
-
name: "--q-input-border",
|
|
3449
|
-
value: "var(--q-field-border)"
|
|
3450
|
-
}
|
|
3451
|
-
]
|
|
3452
|
-
},
|
|
3453
|
-
{
|
|
3454
|
-
category: "Dropdown (q-dropdown) mapped to unified field tokens",
|
|
3455
|
-
tokens: [
|
|
3456
|
-
{
|
|
3457
|
-
name: "--q-dropdown-border",
|
|
3458
|
-
value: "var(--q-field-border)"
|
|
3459
|
-
}
|
|
3460
|
-
]
|
|
3461
|
-
},
|
|
3462
|
-
{
|
|
3463
|
-
category: "Panel (q-panel)",
|
|
3464
|
-
tokens: [
|
|
3465
|
-
{
|
|
3466
|
-
name: "--q-panel-border",
|
|
3467
|
-
value: "var(--q-border)"
|
|
3468
|
-
}
|
|
3469
|
-
]
|
|
3470
|
-
},
|
|
3471
|
-
{
|
|
3472
|
-
category: "Sidepanel (q-sidepanel)",
|
|
3473
|
-
tokens: [
|
|
3474
|
-
{
|
|
3475
|
-
name: "--q-sidepanel-bg",
|
|
3476
|
-
value: "var(--q-bg-surface-1)",
|
|
3477
|
-
light: "var(--q-bg-surface-1)",
|
|
3478
|
-
dark: "var(--q-bg-surface-1)"
|
|
3479
|
-
},
|
|
3480
|
-
{
|
|
3481
|
-
name: "--q-sidepanel-border",
|
|
3482
|
-
value: "var(--q-border)"
|
|
3483
|
-
},
|
|
3484
|
-
{
|
|
3485
|
-
name: "--q-sidepanel-shadow",
|
|
3486
|
-
value: "var(--q-shadow-high)"
|
|
3487
|
-
},
|
|
3488
|
-
{
|
|
3489
|
-
name: "--q-sidepanel-panel-width",
|
|
3490
|
-
value: "320px"
|
|
3491
|
-
},
|
|
3492
|
-
{
|
|
3493
|
-
name: "--q-sidepanel-panel-padding",
|
|
3494
|
-
value: "var(--q-padding-lg)"
|
|
3495
|
-
},
|
|
3496
|
-
{
|
|
3497
|
-
name: "--q-sidepanel-panel-header-padding",
|
|
3498
|
-
value: "var(--q-padding-lg)"
|
|
3499
|
-
},
|
|
3500
|
-
{
|
|
3501
|
-
name: "--q-sidepanel-panel-footer-padding",
|
|
3502
|
-
value: "var(--q-padding-lg)"
|
|
3503
|
-
},
|
|
3504
|
-
{
|
|
3505
|
-
name: "--q-sidepanel-panel-section-border",
|
|
3506
|
-
value: "var(--q-border)"
|
|
3507
|
-
}
|
|
3508
|
-
]
|
|
3509
|
-
},
|
|
3510
|
-
{
|
|
3511
|
-
category: "Map (q-map)",
|
|
3512
|
-
tokens: [
|
|
3513
|
-
{
|
|
3514
|
-
name: "--q-map-height",
|
|
3515
|
-
value: "100%"
|
|
3516
|
-
},
|
|
3517
|
-
{
|
|
3518
|
-
name: "--q-map-min-height",
|
|
3519
|
-
value: "240px"
|
|
3520
|
-
},
|
|
3521
|
-
{
|
|
3522
|
-
name: "--q-map-bg",
|
|
3523
|
-
value: "var(--q-bg-surface-1)"
|
|
3524
|
-
},
|
|
3525
|
-
{
|
|
3526
|
-
name: "--q-map-border",
|
|
3527
|
-
value: "var(--q-border)"
|
|
3528
|
-
},
|
|
3529
|
-
{
|
|
3530
|
-
name: "--q-map-radius",
|
|
3531
|
-
value: "var(--q-radius-lg)"
|
|
3532
|
-
},
|
|
3533
|
-
{
|
|
3534
|
-
name: "--q-map-marker-size",
|
|
3535
|
-
value: "20px"
|
|
3536
|
-
},
|
|
3537
|
-
{
|
|
3538
|
-
name: "--q-map-marker-size-small",
|
|
3539
|
-
value: "16px"
|
|
3540
|
-
},
|
|
3541
|
-
{
|
|
3542
|
-
name: "--q-map-marker-size-medium",
|
|
3543
|
-
value: "var(--q-map-marker-size)"
|
|
3544
|
-
},
|
|
3545
|
-
{
|
|
3546
|
-
name: "--q-map-marker-size-large",
|
|
3547
|
-
value: "24px"
|
|
3548
|
-
},
|
|
3549
|
-
{
|
|
3550
|
-
name: "--q-map-marker-color",
|
|
3551
|
-
value: "var(--q-color-primary)"
|
|
3552
|
-
},
|
|
3553
|
-
{
|
|
3554
|
-
name: "--q-map-marker-success",
|
|
3555
|
-
value: "var(--q-color-success)"
|
|
3556
|
-
},
|
|
3557
|
-
{
|
|
3558
|
-
name: "--q-map-marker-warning",
|
|
3559
|
-
value: "var(--q-color-warning)"
|
|
3560
|
-
},
|
|
3561
|
-
{
|
|
3562
|
-
name: "--q-map-marker-danger",
|
|
3563
|
-
value: "var(--q-color-danger)"
|
|
3564
|
-
},
|
|
3565
|
-
{
|
|
3566
|
-
name: "--q-map-marker-muted",
|
|
3567
|
-
value: "var(--q-fg-muted)"
|
|
3568
|
-
},
|
|
3569
|
-
{
|
|
3570
|
-
name: "--q-map-marker-selected-color",
|
|
3571
|
-
value: "var(--q-fg-base)"
|
|
3572
|
-
},
|
|
3573
|
-
{
|
|
3574
|
-
name: "--q-map-marker-selected-shadow",
|
|
3575
|
-
value: "var(--q-shadow-medium)"
|
|
3576
|
-
},
|
|
3577
|
-
{
|
|
3578
|
-
name: "--q-map-attribution-bg",
|
|
3579
|
-
value: "var(--q-bg-base)"
|
|
3580
|
-
},
|
|
3581
|
-
{
|
|
3582
|
-
name: "--q-map-attribution-color",
|
|
3583
|
-
value: "var(--q-fg-muted)"
|
|
3584
|
-
}
|
|
3585
|
-
]
|
|
3586
|
-
},
|
|
3587
|
-
{
|
|
3588
|
-
category: "Scrollbars",
|
|
3589
|
-
tokens: [
|
|
3590
|
-
{
|
|
3591
|
-
name: "--q-scrollbar-width",
|
|
3592
|
-
value: "6px"
|
|
3593
|
-
},
|
|
3594
|
-
{
|
|
3595
|
-
name: "--q-scrollbar-width-thin",
|
|
3596
|
-
value: "thin"
|
|
3597
|
-
},
|
|
3598
|
-
{
|
|
3599
|
-
name: "--q-scrollbar-track-color",
|
|
3600
|
-
value: "transparent"
|
|
3601
|
-
},
|
|
3602
|
-
{
|
|
3603
|
-
name: "--q-scrollbar-thumb-color",
|
|
3604
|
-
value: "var(--q-border-color, #374151)"
|
|
3605
|
-
},
|
|
3606
|
-
{
|
|
3607
|
-
name: "--q-scrollbar-thumb-color-hover",
|
|
3608
|
-
value: "var(--q-color-primary, #60a5fa)"
|
|
3609
|
-
},
|
|
3610
|
-
{
|
|
3611
|
-
name: "--q-scrollbar-radius",
|
|
3612
|
-
value: "var(--q-radius-sm, 4px)"
|
|
3613
|
-
}
|
|
3614
|
-
]
|
|
3615
|
-
}
|
|
3616
|
-
];
|
|
3617
|
-
var comfortablePreset = {
|
|
3618
|
-
"--q-space-none": "0rem",
|
|
3619
|
-
"--q-space-xs": "0.375rem",
|
|
3620
|
-
"--q-space-sm": "0.75rem",
|
|
3621
|
-
"--q-space-md": "1rem",
|
|
3622
|
-
"--q-space-lg": "1.5rem",
|
|
3623
|
-
"--q-space-xl": "2rem",
|
|
3624
|
-
"--q-space-2xl": "3rem",
|
|
3625
|
-
"--q-space-3xl": "4rem",
|
|
3626
|
-
"--q-control-height-sm": "2.25rem",
|
|
3627
|
-
"--q-control-font-sm": "0.875rem",
|
|
3628
|
-
"--q-control-line-sm": "1.25rem",
|
|
3629
|
-
"--q-control-padding-sm": "0.75rem",
|
|
3630
|
-
"--q-control-icon-sm": "1rem",
|
|
3631
|
-
"--q-control-height-md": "2.75rem",
|
|
3632
|
-
"--q-control-font-md": "1rem",
|
|
3633
|
-
"--q-control-line-md": "1.5rem",
|
|
3634
|
-
"--q-control-padding-md": "1rem",
|
|
3635
|
-
"--q-control-icon-md": "1.25rem",
|
|
3636
|
-
"--q-control-height-lg": "3.25rem",
|
|
3637
|
-
"--q-control-font-lg": "1.125rem",
|
|
3638
|
-
"--q-control-line-lg": "1.75rem",
|
|
3639
|
-
"--q-control-padding-lg": "1.25rem",
|
|
3640
|
-
"--q-control-icon-lg": "1.5rem",
|
|
3641
|
-
"--q-font-size-sm": "0.875rem",
|
|
3642
|
-
"--q-font-size-base": "1.125rem",
|
|
3643
|
-
"--q-font-size-lg": "1.5rem",
|
|
3644
|
-
"--q-padding-sm": "var(--q-space-sm, .75rem)",
|
|
3645
|
-
"--q-padding-md": "var(--q-space-md, 1rem)",
|
|
3646
|
-
"--q-padding-lg": "var(--q-space-lg, 1.5rem)",
|
|
3647
|
-
"--q-step-diag-icon-size": "40px",
|
|
3648
|
-
"--q-step-diag-item-gap": "32px",
|
|
3649
|
-
"--q-reel-gap": "24px",
|
|
3650
|
-
"--q-avatar-size-sm": "32px",
|
|
3651
|
-
"--q-avatar-size-md": "48px",
|
|
3652
|
-
"--q-avatar-size-lg": "64px",
|
|
3653
|
-
"--q-carousel-gap": "24px",
|
|
3654
|
-
"--q-carousel-padding": "32px 24px",
|
|
3655
|
-
"--q-carousel-arrow-size": "44px",
|
|
3656
|
-
"--q-carousel-indicator-gap": "12px",
|
|
3657
|
-
"--q-carousel-indicator-size": "8px",
|
|
3658
|
-
"--q-progress-linear-height-sm": "6px",
|
|
3659
|
-
"--q-progress-linear-height-md": "8px",
|
|
3660
|
-
"--q-progress-linear-height-lg": "10px",
|
|
3661
|
-
"--q-progress-circular-size-sm": "80px",
|
|
3662
|
-
"--q-progress-circular-size-md": "144px",
|
|
3663
|
-
"--q-progress-circular-size-lg": "200px",
|
|
3664
|
-
"--q-progress-circular-stroke-width-sm": "8px",
|
|
3665
|
-
"--q-progress-circular-stroke-width-md": "10px",
|
|
3666
|
-
"--q-progress-circular-stroke-width-lg": "12px",
|
|
3667
|
-
"--q-btn-icon-padding-sm": "6px",
|
|
3668
|
-
"--q-btn-icon-padding-md": "8px",
|
|
3669
|
-
"--q-btn-icon-padding-lg": "12px",
|
|
3670
|
-
"--q-chip-padding-sm": "6px 12px",
|
|
3671
|
-
"--q-chip-padding-md": "8px 16px",
|
|
3672
|
-
"--q-chip-padding-lg": "10px 20px",
|
|
3673
|
-
"--q-chip-height-sm": "32px",
|
|
3674
|
-
"--q-chip-height-md": "40px",
|
|
3675
|
-
"--q-chip-height-lg": "48px",
|
|
3676
|
-
"--q-sidepanel-panel-padding": "var(--q-padding-lg)",
|
|
3677
|
-
"--q-sidepanel-panel-header-padding": "var(--q-padding-lg)",
|
|
3678
|
-
"--q-sidepanel-panel-footer-padding": "var(--q-padding-lg)",
|
|
3679
|
-
"--q-map-marker-size": "24px",
|
|
3680
|
-
"--q-map-marker-size-small": "20px",
|
|
3681
|
-
"--q-map-marker-size-medium": "var(--q-map-marker-size)",
|
|
3682
|
-
"--q-map-marker-size-large": "28px"
|
|
3683
|
-
};
|
|
3684
|
-
var semanticPresetTokens = {
|
|
3685
|
-
"--q-text-body-size": { compact: "var(--q-font-size-base)", comfortable: "var(--q-font-size-base)" },
|
|
3686
|
-
"--q-text-body-line-height": { compact: "1.5", comfortable: "1.6" },
|
|
3687
|
-
"--q-text-small-size": { compact: "var(--q-font-size-sm)", comfortable: "var(--q-font-size-sm)" },
|
|
3688
|
-
"--q-text-small-line-height": { compact: "1.5", comfortable: "1.5" },
|
|
3689
|
-
"--q-heading-display-size": { compact: "var(--q-font-size-lg)", comfortable: "clamp(2.5rem, 1.75rem + 3vw, 4rem)" },
|
|
3690
|
-
"--q-heading-display-line-height": { compact: "1.3", comfortable: "1.1" },
|
|
3691
|
-
"--q-heading-1-size": { compact: "var(--q-font-size-lg)", comfortable: "clamp(27px, 1.5rem + 2vw, 36px)" },
|
|
3692
|
-
"--q-heading-2-size": {
|
|
3693
|
-
compact: "var(--q-font-size-lg)",
|
|
3694
|
-
comfortable: "clamp(1.4rem, 1.1rem + 1.2vw, 2rem)"
|
|
3695
|
-
},
|
|
3696
|
-
"--q-heading-3-size": {
|
|
3697
|
-
compact: "var(--q-font-size-lg)",
|
|
3698
|
-
comfortable: "clamp(1.265625rem, 1.0546875rem + 0.84375vw, 1.6875rem)"
|
|
3699
|
-
},
|
|
3700
|
-
"--q-heading-4-size": {
|
|
3701
|
-
compact: "var(--q-font-size-lg)",
|
|
3702
|
-
comfortable: "1.25rem"
|
|
3703
|
-
},
|
|
3704
|
-
"--q-heading-5-size": { compact: "var(--q-font-size-lg)", comfortable: "1.25rem" },
|
|
3705
|
-
"--q-heading-6-size": { compact: "var(--q-font-size-lg)", comfortable: "1.125rem" },
|
|
3706
|
-
...Object.fromEntries([1, 2, 3, 4, 5, 6].map((level) => [
|
|
3707
|
-
`--q-heading-${level}-line-height`,
|
|
3708
|
-
{ compact: "1.3", comfortable: level <= 2 ? "1.2" : "1.3" }
|
|
3709
|
-
])),
|
|
3710
|
-
"--q-content-paragraph-gap": { compact: "var(--q-padding-lg)", comfortable: "1.5rem" },
|
|
3711
|
-
"--q-content-heading-gap": { compact: "var(--q-padding-lg)", comfortable: "1.5rem" },
|
|
3712
|
-
"--q-content-section-gap": { compact: "var(--q-space-2xl)", comfortable: "clamp(3rem, 2rem + 4vw, 6rem)" },
|
|
3713
|
-
"--q-content-padding": { compact: "var(--q-padding-lg)", comfortable: "clamp(1.5rem, 1rem + 2vw, 3rem)" },
|
|
3714
|
-
"--q-field-text-size": { compact: ".75rem", comfortable: ".875rem" },
|
|
3715
|
-
"--q-field-text-line": { compact: "1rem", comfortable: "1.25rem" }
|
|
3716
|
-
};
|
|
3717
|
-
var componentPresetTokens = {
|
|
3718
|
-
"--q-toolbar-height": { compact: "0px", comfortable: "72px" },
|
|
3719
|
-
"--q-toolbar-compact-height": { compact: "0px", comfortable: "60px" },
|
|
3720
|
-
"--q-font-size-xs": { compact: "0.7rem", comfortable: "0.8125rem" },
|
|
3721
|
-
"--q-font-size-2xs": { compact: "0.625rem", comfortable: "0.75rem" },
|
|
3722
|
-
"--q-btn-circle-size": { compact: "120px", comfortable: "144px" },
|
|
3723
|
-
"--q-btn-circle-padding": { compact: "12px", comfortable: "16px" },
|
|
3724
|
-
"--q-table-toolbar-padding-block": { compact: "12px", comfortable: "16px" },
|
|
3725
|
-
"--q-table-toolbar-padding-inline": { compact: "16px", comfortable: "24px" },
|
|
3726
|
-
"--q-bar-edge-padding": { compact: "24px", comfortable: "32px" },
|
|
3727
|
-
"--q-bar-edge-compact-padding": { compact: "16px", comfortable: "24px" },
|
|
3728
|
-
"--q-table-cell-padding-block": { compact: "4.5px", comfortable: "10px" },
|
|
3729
|
-
"--q-table-cell-padding-inline": { compact: "8px", comfortable: "14px" },
|
|
3730
|
-
"--q-dropdown-option-padding": { compact: "10px 14px", comfortable: "12px 18px" },
|
|
3731
|
-
"--q-tooltip-padding": { compact: "6px 10px", comfortable: "8px 14px" },
|
|
3732
|
-
"--q-syntax-padding": { compact: "16px", comfortable: "24px" },
|
|
3733
|
-
"--q-syntax-compact-padding": { compact: "10px", comfortable: "16px" },
|
|
3734
|
-
"--q-syntax-header-padding": { compact: "4px 16px", comfortable: "8px 24px" },
|
|
3735
|
-
"--q-sidepanel-nav-font": { compact: "0.875rem", comfortable: "1rem" },
|
|
3736
|
-
"--q-sidepanel-nav-small-font": { compact: "0.75rem", comfortable: "0.875rem" },
|
|
3737
|
-
"--q-sidepanel-nav-badge-font": { compact: "0.65rem", comfortable: "0.75rem" },
|
|
3738
|
-
"--q-navbar-item-height": { compact: "36px", comfortable: "44px" },
|
|
3739
|
-
"--q-navbar-gap": { compact: "20px", comfortable: "28px" },
|
|
3740
|
-
"--q-navbar-height": { compact: "64px", comfortable: "72px" },
|
|
3741
|
-
"--q-navbar-compact-height": { compact: "52px", comfortable: "60px" },
|
|
3742
|
-
"--q-navbar-logo-size": { compact: "32px", comfortable: "40px" },
|
|
3743
|
-
"--q-navbar-brand-size": { compact: "1rem", comfortable: "1.25rem" },
|
|
3744
|
-
"--q-navbar-nav-gap": { compact: "6px", comfortable: "10px" },
|
|
3745
|
-
"--q-navbar-action-gap": { compact: "8px", comfortable: "12px" },
|
|
3746
|
-
"--q-navbar-item-gap": { compact: "8px", comfortable: "12px" },
|
|
3747
|
-
"--q-navbar-item-padding": { compact: "7px 10px", comfortable: "10px 14px" },
|
|
3748
|
-
"--q-navbar-item-size": { compact: "0.9rem", comfortable: "1rem" },
|
|
3749
|
-
"--q-navbar-item-icon-only-size": { compact: "40px", comfortable: "44px" },
|
|
3750
|
-
"--q-navbar-item-icon-only-padding": { compact: "8px", comfortable: "10px" },
|
|
3751
|
-
"--q-navbar-mobile-panel-padding": { compact: "8px 16px 16px", comfortable: "12px 24px 24px" },
|
|
3752
|
-
"--q-avatar-font-size": { compact: "0.8rem", comfortable: "1rem" },
|
|
3753
|
-
"--q-avatar-font-size-sm": { compact: "0.65rem", comfortable: "0.75rem" },
|
|
3754
|
-
"--q-avatar-font-size-lg": { compact: "1rem", comfortable: "1.25rem" },
|
|
3755
|
-
"--q-conversation-gap": { compact: "10px", comfortable: "16px" },
|
|
3756
|
-
"--q-conversation-header-gap": { compact: "4px", comfortable: "6px" },
|
|
3757
|
-
"--q-conversation-header-inset": { compact: "4px", comfortable: "6px" },
|
|
3758
|
-
"--q-conversation-padding": { compact: "11px 13px", comfortable: "16px 20px" },
|
|
3759
|
-
"--q-conversation-footer-gap": { compact: "10px", comfortable: "16px" },
|
|
3760
|
-
"--q-conversation-footer-margin": { compact: "6px", comfortable: "10px" },
|
|
3761
|
-
"--q-conversation-meta-gap": { compact: "6px", comfortable: "10px" },
|
|
3762
|
-
"--q-conversation-compact-padding": { compact: "7px 10px", comfortable: "10px 14px" },
|
|
3763
|
-
"--q-alert-padding": { compact: "12px 14px", comfortable: "16px 20px" },
|
|
3764
|
-
"--q-alert-gap": { compact: "10px", comfortable: "16px" },
|
|
3765
|
-
"--q-alert-actions-gap": { compact: "8px", comfortable: "12px" },
|
|
3766
|
-
"--q-pagination-button-height": { compact: "30px", comfortable: "44px" },
|
|
3767
|
-
"--q-pagination-button-padding": { compact: "5px 8px", comfortable: "8px 12px" }
|
|
3768
|
-
};
|
|
3769
|
-
var presetTokens = Object.entries(comfortablePreset).map(([name, comfortable]) => {
|
|
3770
|
-
const token = [...dimensionTokens, ...themeGroups.flatMap((group) => group.tokens)].find((token) => token.name === name);
|
|
3771
|
-
if (!token)
|
|
3772
|
-
throw new Error(`Preset token has no compact default: ${name}`);
|
|
3773
|
-
return { name, compact: token.value, comfortable };
|
|
3774
|
-
}).concat(Object.entries({ ...semanticPresetTokens, ...componentPresetTokens }).map(([name, values]) => ({ name, ...values })));
|
|
3775
|
-
|
|
3776
|
-
// src/playground/components/theme-designer/theme-designer.tsx
|
|
3777
|
-
var THEME_TOKENS = [
|
|
3778
|
-
{
|
|
3779
|
-
category: "Spacing & Control Sizing",
|
|
3780
|
-
tokens: dimensionTokens.map((token) => ({ ...token, type: "dimension", min: 0, max: 64, desc: token.name }))
|
|
3781
|
-
},
|
|
3782
|
-
...themeGroups.map((group) => ({
|
|
3783
|
-
category: group.category,
|
|
3784
|
-
tokens: group.tokens.map((token) => ({
|
|
3785
|
-
name: token.name,
|
|
3786
|
-
label: token.name.replace("--q-", "").replaceAll("-", " "),
|
|
3787
|
-
type: /^#[0-9a-f]{6}$/i.test(token.value) ? "color" : token.name.startsWith("--q-radius-") ? "radius" : "text",
|
|
3788
|
-
desc: token.name
|
|
3789
|
-
}))
|
|
3790
|
-
}))
|
|
3791
|
-
];
|
|
3792
|
-
|
|
3793
|
-
class ThemeDesigner extends HTMLElement {
|
|
3794
|
-
cleanupThemeSync;
|
|
3795
|
-
connectedCallback() {
|
|
3796
|
-
this.innerHTML = "";
|
|
3797
|
-
this.appendChild(/* @__PURE__ */ h("div", {
|
|
3798
|
-
class: "theme-designer-container"
|
|
3799
|
-
}, /* @__PURE__ */ h("div", {
|
|
3800
|
-
class: "theme-designer-header"
|
|
3801
|
-
}, /* @__PURE__ */ h("div", {
|
|
3802
|
-
style: "flex: 1"
|
|
3803
|
-
}, /* @__PURE__ */ h("h2", {
|
|
3804
|
-
style: "margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--q-fg-base)"
|
|
3805
|
-
}, "Theme Designer"), /* @__PURE__ */ h("p", {
|
|
3806
|
-
class: "theme-designer-desc"
|
|
3807
|
-
}, "Customize colors, dimensions, and component defaults. Overrides apply to all sandbox components.")), /* @__PURE__ */ h("button", {
|
|
3808
|
-
id: "resetThemeBtn",
|
|
3809
|
-
class: "reset-theme-btn",
|
|
3810
|
-
type: "button",
|
|
3811
|
-
onClick: () => this.resetTheme()
|
|
3812
|
-
}, /* @__PURE__ */ h("q-icon", {
|
|
3813
|
-
name: "refresh-cw",
|
|
3814
|
-
library: "lucide",
|
|
3815
|
-
size: "16"
|
|
3816
|
-
}), /* @__PURE__ */ h("span", null, "Reset to Default"))), this.renderGrid()));
|
|
3817
|
-
const styleId = "theme-designer-style";
|
|
3818
|
-
if (!document.getElementById(styleId)) {
|
|
3819
|
-
const style = document.createElement("style");
|
|
3820
|
-
style.id = styleId;
|
|
3821
|
-
style.textContent = theme_designer_default;
|
|
3822
|
-
document.head.appendChild(style);
|
|
3823
|
-
}
|
|
3824
|
-
this.init();
|
|
3825
|
-
}
|
|
3826
|
-
init() {
|
|
3827
|
-
this.cleanupThemeSync = effect(() => {
|
|
3828
|
-
theme();
|
|
3829
|
-
setTimeout(() => this.syncThemeInputs(), 50);
|
|
3830
|
-
});
|
|
3831
|
-
}
|
|
3832
|
-
renderGrid() {
|
|
3833
|
-
const grid = /* @__PURE__ */ h("div", {
|
|
3834
|
-
class: "theme-sections-grid",
|
|
3835
|
-
id: "themeSectionsGrid"
|
|
3836
|
-
});
|
|
3837
|
-
THEME_TOKENS.forEach((cat) => {
|
|
3838
|
-
const card = document.createElement("token-section");
|
|
3839
|
-
card.categoryName = cat.category;
|
|
3840
|
-
card.tokens = cat.tokens;
|
|
3841
|
-
grid.appendChild(card);
|
|
3842
|
-
});
|
|
3843
|
-
return grid;
|
|
3844
|
-
}
|
|
3845
|
-
resetTheme() {
|
|
3846
|
-
document.documentElement.style.cssText = "";
|
|
3847
|
-
setTimeout(() => this.syncThemeInputs(), 50);
|
|
3848
|
-
}
|
|
3849
|
-
syncThemeInputs() {
|
|
3850
|
-
this.querySelectorAll("token-row").forEach((row) => {
|
|
3851
|
-
if (typeof row.syncValue === "function") {
|
|
3852
|
-
row.syncValue();
|
|
3853
|
-
}
|
|
3854
|
-
});
|
|
3855
|
-
}
|
|
3856
|
-
disconnectedCallback() {
|
|
3857
|
-
if (this.cleanupThemeSync) {
|
|
3858
|
-
this.cleanupThemeSync();
|
|
3859
|
-
}
|
|
3860
|
-
}
|
|
3861
|
-
}
|
|
3862
|
-
customElements.define("theme-designer", ThemeDesigner);
|
|
3863
|
-
|
|
3864
|
-
// src/playground/playground.ts
|
|
3865
|
-
fetchComponentSpec("q-button");
|