@mcp-b/web-components 0.2.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/LICENSE +21 -0
- package/README.md +49 -0
- package/dist/accordion-B1Q3kuP_.d.ts +373 -0
- package/dist/accordion-item-DvPfhpm8.js +307 -0
- package/dist/accordion-item-bPRIahNn.d.ts +63 -0
- package/dist/accordion-zDr-Br4V.js +483 -0
- package/dist/action-bar-CYsjmhwP.d.ts +29 -0
- package/dist/action-bar-CjN_UcnP.js +56 -0
- package/dist/alert-dialog-4CnO3Nb5.d.ts +60 -0
- package/dist/alert-dialog-D25Oi_TS.js +126 -0
- package/dist/avatar-Bje_KpZo.d.ts +141 -0
- package/dist/avatar-CRP0kW3x.js +224 -0
- package/dist/badge-Ct95U4UO.js +301 -0
- package/dist/badge-D1DNQrWn.d.ts +106 -0
- package/dist/breadcrumb-BxZ-nQE5.d.ts +365 -0
- package/dist/breadcrumb-item-BC454oQe.d.ts +59 -0
- package/dist/breadcrumb-item-P5pdq_gE.js +151 -0
- package/dist/breadcrumb-uURhiqWJ.js +384 -0
- package/dist/button-5k_aL_gD.js +802 -0
- package/dist/button-BQofnUt4.d.ts +354 -0
- package/dist/button-group-BydvJTQy.js +197 -0
- package/dist/button-group-COodHeuB.d.ts +155 -0
- package/dist/callout-B8zTf8Go.js +188 -0
- package/dist/callout-DFwPao36.d.ts +103 -0
- package/dist/card-BYDzdMAU.d.ts +177 -0
- package/dist/card-DIg1-X2G.js +332 -0
- package/dist/carousel-Bktu7wrD.js +843 -0
- package/dist/carousel-DQITCtEY.d.ts +423 -0
- package/dist/carousel-item-B5-X31Ha.js +79 -0
- package/dist/carousel-item-BB3jL2tk.d.ts +34 -0
- package/dist/cdn/loader.js +530 -0
- package/dist/checkbox-D6r7PVPj.js +641 -0
- package/dist/checkbox-DoFcDEKB.d.ts +354 -0
- package/dist/checkbox-group-CLvNAO_F.js +201 -0
- package/dist/checkbox-group-Cnh8rAn4.d.ts +152 -0
- package/dist/color-input-Bky89xg_.d.ts +470 -0
- package/dist/color-input-DPIxi9wR.js +894 -0
- package/dist/color-picker-adwOmtRl.js +1240 -0
- package/dist/color-picker-wQw8bPsq.d.ts +360 -0
- package/dist/combobox-B6al50UG.js +1693 -0
- package/dist/combobox-item-D2H1CMxC.d.ts +714 -0
- package/dist/combobox-item-yM6tDrGG.js +225 -0
- package/dist/comparison-B1-nMwmp.d.ts +134 -0
- package/dist/comparison-CyqKrCN-.js +435 -0
- package/dist/components/accordion/accordion.d.ts +2 -0
- package/dist/components/accordion/accordion.js +2 -0
- package/dist/components/accordion-item/accordion-item.d.ts +2 -0
- package/dist/components/accordion-item/accordion-item.js +2 -0
- package/dist/components/action-bar/action-bar.d.ts +2 -0
- package/dist/components/action-bar/action-bar.js +2 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog.js +2 -0
- package/dist/components/avatar/avatar.d.ts +2 -0
- package/dist/components/avatar/avatar.js +2 -0
- package/dist/components/badge/badge.d.ts +2 -0
- package/dist/components/badge/badge.js +2 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.js +2 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +2 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -0
- package/dist/components/button/button.d.ts +2 -0
- package/dist/components/button/button.js +2 -0
- package/dist/components/button-group/button-group.d.ts +2 -0
- package/dist/components/button-group/button-group.js +2 -0
- package/dist/components/callout/callout.d.ts +2 -0
- package/dist/components/callout/callout.js +2 -0
- package/dist/components/card/card.d.ts +2 -0
- package/dist/components/card/card.js +2 -0
- package/dist/components/carousel/carousel.d.ts +2 -0
- package/dist/components/carousel/carousel.js +2 -0
- package/dist/components/carousel-item/carousel-item.d.ts +2 -0
- package/dist/components/carousel-item/carousel-item.js +2 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +2 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.js +2 -0
- package/dist/components/color-input/color-input.d.ts +2 -0
- package/dist/components/color-input/color-input.js +2 -0
- package/dist/components/color-picker/color-picker.d.ts +2 -0
- package/dist/components/color-picker/color-picker.js +2 -0
- package/dist/components/combobox/combobox.d.ts +2 -0
- package/dist/components/combobox/combobox.js +2 -0
- package/dist/components/combobox-item/combobox-item.d.ts +2 -0
- package/dist/components/combobox-item/combobox-item.js +2 -0
- package/dist/components/comparison/comparison.d.ts +2 -0
- package/dist/components/comparison/comparison.js +2 -0
- package/dist/components/copy/copy.d.ts +2 -0
- package/dist/components/copy/copy.js +291 -0
- package/dist/components/data-table/data-table.d.ts +2 -0
- package/dist/components/data-table/data-table.js +2 -0
- package/dist/components/date/date.d.ts +2 -0
- package/dist/components/date/date.js +2 -0
- package/dist/components/dialog/dialog.d.ts +2 -0
- package/dist/components/dialog/dialog.js +2 -0
- package/dist/components/divider/divider.d.ts +2 -0
- package/dist/components/divider/divider.js +2 -0
- package/dist/components/dropdown/dropdown.d.ts +2 -0
- package/dist/components/dropdown/dropdown.js +2 -0
- package/dist/components/dropdown-item/dropdown-item.d.ts +2 -0
- package/dist/components/dropdown-item/dropdown-item.js +2 -0
- package/dist/components/empty-result/empty-result.d.ts +2 -0
- package/dist/components/empty-result/empty-result.js +2 -0
- package/dist/components/empty-state/empty-state.d.ts +2 -0
- package/dist/components/empty-state/empty-state.js +2 -0
- package/dist/components/expander/expander.d.ts +2 -0
- package/dist/components/expander/expander.js +2 -0
- package/dist/components/field/field.d.ts +2 -0
- package/dist/components/field/field.js +2 -0
- package/dist/components/file-input/file-input.d.ts +2 -0
- package/dist/components/file-input/file-input.js +2 -0
- package/dist/components/filter-bar/filter-bar.d.ts +2 -0
- package/dist/components/filter-bar/filter-bar.js +2 -0
- package/dist/components/form-section/form-section.d.ts +2 -0
- package/dist/components/form-section/form-section.js +2 -0
- package/dist/components/icon/icon.d.ts +2 -0
- package/dist/components/icon/icon.js +2 -0
- package/dist/components/include/include.d.ts +2 -0
- package/dist/components/include/include.js +2 -0
- package/dist/components/index.d.ts +85 -0
- package/dist/components/index.js +86 -0
- package/dist/components/infinite-scroller/infinite-scroller.d.ts +2 -0
- package/dist/components/infinite-scroller/infinite-scroller.js +2 -0
- package/dist/components/intersection-observer/intersection-observer.d.ts +2 -0
- package/dist/components/intersection-observer/intersection-observer.js +2 -0
- package/dist/components/listbox/listbox.d.ts +2 -0
- package/dist/components/listbox/listbox.js +2 -0
- package/dist/components/listbox-item/listbox-item.d.ts +2 -0
- package/dist/components/listbox-item/listbox-item.js +2 -0
- package/dist/components/lorem-ipsum/lorem-ipsum.d.ts +2 -0
- package/dist/components/lorem-ipsum/lorem-ipsum.js +2 -0
- package/dist/components/meter/meter.d.ts +2 -0
- package/dist/components/meter/meter.js +2 -0
- package/dist/components/metric/metric.d.ts +2 -0
- package/dist/components/metric/metric.js +2 -0
- package/dist/components/metric-grid/metric-grid.d.ts +2 -0
- package/dist/components/metric-grid/metric-grid.js +2 -0
- package/dist/components/mutation-observer/mutation-observer.d.ts +2 -0
- package/dist/components/mutation-observer/mutation-observer.js +2 -0
- package/dist/components/navicon/navicon.d.ts +2 -0
- package/dist/components/navicon/navicon.js +2 -0
- package/dist/components/number/number.d.ts +2 -0
- package/dist/components/number/number.js +2 -0
- package/dist/components/number-field/number-field.d.ts +2 -0
- package/dist/components/number-field/number-field.js +2 -0
- package/dist/components/pagination/pagination.d.ts +2 -0
- package/dist/components/pagination/pagination.js +2 -0
- package/dist/components/popover/popover.d.ts +2 -0
- package/dist/components/popover/popover.js +2 -0
- package/dist/components/preview-card/preview-card.d.ts +2 -0
- package/dist/components/preview-card/preview-card.js +2 -0
- package/dist/components/progress/progress.d.ts +2 -0
- package/dist/components/progress/progress.js +2 -0
- package/dist/components/radio/radio.d.ts +2 -0
- package/dist/components/radio/radio.js +2 -0
- package/dist/components/radio-item/radio-item.d.ts +2 -0
- package/dist/components/radio-item/radio-item.js +2 -0
- package/dist/components/random-content/random-content.d.ts +2 -0
- package/dist/components/random-content/random-content.js +2 -0
- package/dist/components/rating/rating.d.ts +2 -0
- package/dist/components/rating/rating.js +2 -0
- package/dist/components/resize-observer/resize-observer.d.ts +2 -0
- package/dist/components/resize-observer/resize-observer.js +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.js +2 -0
- package/dist/components/scroller/scroller.d.ts +2 -0
- package/dist/components/scroller/scroller.js +2 -0
- package/dist/components/search-list/search-list.d.ts +2 -0
- package/dist/components/search-list/search-list.js +2 -0
- package/dist/components/select/select.d.ts +2 -0
- package/dist/components/select/select.js +2 -0
- package/dist/components/selection-summary/selection-summary.d.ts +2 -0
- package/dist/components/selection-summary/selection-summary.js +2 -0
- package/dist/components/share/share.d.ts +2 -0
- package/dist/components/share/share.js +2 -0
- package/dist/components/slide-activator/slide-activator.d.ts +2 -0
- package/dist/components/slide-activator/slide-activator.js +2 -0
- package/dist/components/slider/slider.d.ts +2 -0
- package/dist/components/slider/slider.js +2 -0
- package/dist/components/sparkline/sparkline.d.ts +2 -0
- package/dist/components/sparkline/sparkline.js +2 -0
- package/dist/components/spinner/spinner.d.ts +2 -0
- package/dist/components/spinner/spinner.js +2 -0
- package/dist/components/splitter/splitter.d.ts +2 -0
- package/dist/components/splitter/splitter.js +2 -0
- package/dist/components/switch/switch.d.ts +2 -0
- package/dist/components/switch/switch.js +2 -0
- package/dist/components/tab/tab.d.ts +2 -0
- package/dist/components/tab/tab.js +2 -0
- package/dist/components/tab-list/tab-list.d.ts +2 -0
- package/dist/components/tab-list/tab-list.js +2 -0
- package/dist/components/tab-panel/tab-panel.d.ts +2 -0
- package/dist/components/tab-panel/tab-panel.js +2 -0
- package/dist/components/text-area/text-area.d.ts +2 -0
- package/dist/components/text-area/text-area.js +2 -0
- package/dist/components/text-field/text-field.d.ts +2 -0
- package/dist/components/text-field/text-field.js +2 -0
- package/dist/components/text-mask/text-mask.d.ts +2 -0
- package/dist/components/text-mask/text-mask.js +2 -0
- package/dist/components/timed-content/timed-content.d.ts +2 -0
- package/dist/components/timed-content/timed-content.js +2 -0
- package/dist/components/toast/toast.d.ts +2 -0
- package/dist/components/toast/toast.js +2 -0
- package/dist/components/toast-item/toast-item.d.ts +2 -0
- package/dist/components/toast-item/toast-item.js +2 -0
- package/dist/components/toggle-icon/toggle-icon.d.ts +2 -0
- package/dist/components/toggle-icon/toggle-icon.js +2 -0
- package/dist/components/toggle-tag/toggle-tag.d.ts +2 -0
- package/dist/components/toggle-tag/toggle-tag.js +2 -0
- package/dist/components/toolbar/toolbar.d.ts +2 -0
- package/dist/components/toolbar/toolbar.js +2 -0
- package/dist/components/tooltip/tooltip.d.ts +2 -0
- package/dist/components/tooltip/tooltip.js +2 -0
- package/dist/components/transition-group/transition-group.d.ts +2 -0
- package/dist/components/transition-group/transition-group.js +2 -0
- package/dist/components/zoomable-frame/zoomable-frame.d.ts +2 -0
- package/dist/components/zoomable-frame/zoomable-frame.js +2 -0
- package/dist/copy-CvC9vaGw.d.ts +206 -0
- package/dist/copy.styles-DWGvGNTP.js +100 -0
- package/dist/data-table-CITa8DSn.js +247 -0
- package/dist/data-table-DL5RhE0d.d.ts +89 -0
- package/dist/date-CJPmOdi9.js +146 -0
- package/dist/date-DtaTBM71.d.ts +142 -0
- package/dist/decorate-DcF3lt7P.js +9 -0
- package/dist/dialog-Cx46HMaZ.js +983 -0
- package/dist/dialog-N-v0woIy.d.ts +414 -0
- package/dist/divider-9vNsfHW8.js +169 -0
- package/dist/divider-DWuAxcXv.d.ts +79 -0
- package/dist/docs/custom-elements.json +29301 -0
- package/dist/dropdown-BXSKpVX9.js +1123 -0
- package/dist/dropdown-Bo00Vlr5.d.ts +537 -0
- package/dist/dropdown-item-_lIs-Tfd.d.ts +111 -0
- package/dist/dropdown-item-i77cRuN6.js +504 -0
- package/dist/empty-result-B2ln1yFL.js +65 -0
- package/dist/empty-result-B54x_Ab2.d.ts +31 -0
- package/dist/empty-state-BLWjtKUo.js +186 -0
- package/dist/empty-state-SGKjpwp3.d.ts +117 -0
- package/dist/expander-BUev0BmM.d.ts +174 -0
- package/dist/expander-Bwvxj6Oa.js +342 -0
- package/dist/field-BEyS909F.js +163 -0
- package/dist/field-ITx0jVw-.d.ts +69 -0
- package/dist/file-input-BEumLJjg.js +841 -0
- package/dist/file-input-D2D6YC0B.d.ts +378 -0
- package/dist/filter-bar-Bj2QzEn9.d.ts +35 -0
- package/dist/filter-bar-Dcs67aXo.js +66 -0
- package/dist/form-section-BchPetkj.js +83 -0
- package/dist/form-section-xFBTBULQ.d.ts +34 -0
- package/dist/icon-BPVkNsY4.js +165 -0
- package/dist/icon-Ci9CPZJV.d.ts +72 -0
- package/dist/icon-library-D_if7p2h.d.ts +2 -0
- package/dist/include-CQHVVtNs.d.ts +103 -0
- package/dist/include-qNUh_6kT.js +155 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.js +92 -0
- package/dist/infinite-scroller-BmmtnWNt.js +285 -0
- package/dist/infinite-scroller-CuUEAlB9.d.ts +174 -0
- package/dist/intersection-observer-B6TciOAQ.js +503 -0
- package/dist/intersection-observer-B7nmP7Zz.d.ts +418 -0
- package/dist/listbox-C3XXRWGX.js +1257 -0
- package/dist/listbox-DD4ujIJe.d.ts +682 -0
- package/dist/listbox-item-CwD9s3VY.js +135 -0
- package/dist/listbox-item-DQEJWp4Z.d.ts +53 -0
- package/dist/localize-322EtXNX.d.ts +66 -0
- package/dist/lorem-ipsum-B2x3V-v8.js +198 -0
- package/dist/lorem-ipsum-CR82CSuJ.d.ts +130 -0
- package/dist/meter-BC7uaJWf.d.ts +73 -0
- package/dist/meter-BIDyjwFp.js +155 -0
- package/dist/metric-CjlLq_VA.d.ts +36 -0
- package/dist/metric-DbuOcDp_.js +86 -0
- package/dist/metric-grid-C2Pb0Zl3.js +37 -0
- package/dist/metric-grid-C5Xbb1_0.d.ts +27 -0
- package/dist/mutation-observer-BmrZ-GER.d.ts +326 -0
- package/dist/mutation-observer-DS8EBuOp.js +388 -0
- package/dist/navicon-Dic5Qjzb.d.ts +159 -0
- package/dist/navicon-_yMHY27-.js +486 -0
- package/dist/number-BNtNXNF3.js +162 -0
- package/dist/number-BwbnErlB.d.ts +143 -0
- package/dist/number-field-BQHB7UYo.js +726 -0
- package/dist/number-field-odk4lKXM.d.ts +422 -0
- package/dist/pagination-6z2qcf3U.d.ts +322 -0
- package/dist/pagination-DuKPuzdb.js +679 -0
- package/dist/popover-D0sxTU6o.d.ts +259 -0
- package/dist/popover-DJBrJ0za.js +556 -0
- package/dist/preview-card-C7H1FPfd.js +287 -0
- package/dist/preview-card-DitOCZTD.d.ts +86 -0
- package/dist/progress-Db0_axHQ.d.ts +181 -0
- package/dist/progress-DzVk260j.js +494 -0
- package/dist/radio-BtDG9xJM.js +658 -0
- package/dist/radio-CieMa4zU.d.ts +460 -0
- package/dist/radio-item-DIrUStAX.js +264 -0
- package/dist/radio-item-Xq2U3cMu.d.ts +69 -0
- package/dist/random-content-BhSeJFKz.d.ts +380 -0
- package/dist/random-content-BwiirXdG.js +450 -0
- package/dist/rating-4xNsWumY.d.ts +369 -0
- package/dist/rating-C1BcJDIO.js +722 -0
- package/dist/resize-observer-BseSbVWP.d.ts +187 -0
- package/dist/resize-observer-DcrLhddo.js +236 -0
- package/dist/scroll-area-COc1857S.js +127 -0
- package/dist/scroll-area-CVYDf5qY.d.ts +61 -0
- package/dist/scroller-LYgBVyfY.js +590 -0
- package/dist/scroller-bB2rGs7b.d.ts +374 -0
- package/dist/search-list-Clmrg8EV.js +884 -0
- package/dist/search-list-n0GYO7rh.d.ts +777 -0
- package/dist/select-CkZK2jJn.d.ts +506 -0
- package/dist/select-DLIaRnA4.js +690 -0
- package/dist/selection-summary-BVnNJ8Lw.js +48 -0
- package/dist/selection-summary-DmFkGyZI.d.ts +34 -0
- package/dist/share-DPlqP2dc.d.ts +162 -0
- package/dist/share-bsgXZCl7.js +250 -0
- package/dist/sigvelo.d.ts +5 -0
- package/dist/sigvelo.js +5 -0
- package/dist/sigvelo.loader.d.ts +3 -0
- package/dist/sigvelo.loader.js +102 -0
- package/dist/slide-activator-D7bBz69E.d.ts +429 -0
- package/dist/slide-activator-DlxQt9R9.js +798 -0
- package/dist/slider-B0FVsV1o.d.ts +921 -0
- package/dist/slider-B90Il7x3.js +1744 -0
- package/dist/sparkline-CcpTaJ_Z.js +358 -0
- package/dist/sparkline-DlCIt81-.d.ts +235 -0
- package/dist/spinner-C04Dmc0H.js +188 -0
- package/dist/spinner-CZ19x_dC.d.ts +99 -0
- package/dist/splitter-DBDJAzsp.d.ts +325 -0
- package/dist/splitter-MnD4In9H.js +638 -0
- package/dist/switch-CPaEKbog.js +581 -0
- package/dist/switch-Cief9M59.d.ts +248 -0
- package/dist/tab-BcqYGsuW.d.ts +44 -0
- package/dist/tab-C-FtuNmh.js +102 -0
- package/dist/tab-list-B_Ye_Oj9.js +691 -0
- package/dist/tab-list-DDvS8qHr.d.ts +450 -0
- package/dist/tab-panel-BaBl6eep.js +60 -0
- package/dist/tab-panel-BzSJlSfd.d.ts +38 -0
- package/dist/text-area-B_mjCE9W.d.ts +327 -0
- package/dist/text-area-Czixaz-_.js +556 -0
- package/dist/text-field-BClWMp6q.d.ts +424 -0
- package/dist/text-field-inpJfp0A.js +687 -0
- package/dist/text-mask-CNKVKSFp.d.ts +336 -0
- package/dist/text-mask-DDEurj90.js +370 -0
- package/dist/themes/sigvelo.css +10 -0
- package/dist/themes/utilities.css +9 -0
- package/dist/timed-content-D2mGFamc.d.ts +181 -0
- package/dist/timed-content-pvEP4l5V.js +226 -0
- package/dist/toast-BnZaIg6Z.js +636 -0
- package/dist/toast-cEBVK9NQ.d.ts +487 -0
- package/dist/toast-item-BPpJT6vD.d.ts +159 -0
- package/dist/toast-item-IS8IFUEg.js +372 -0
- package/dist/toggle-icon-4oLDeEt4.js +752 -0
- package/dist/toggle-icon-DlwMMWZL.d.ts +359 -0
- package/dist/toggle-tag-1sfTFJtg.js +434 -0
- package/dist/toggle-tag-IVvMGT4R.d.ts +245 -0
- package/dist/toolbar-CABq0ZL1.d.ts +122 -0
- package/dist/toolbar-CEZ0-F-X.js +196 -0
- package/dist/tooltip-DbyoPFNe.js +521 -0
- package/dist/tooltip-ahFthek8.d.ts +192 -0
- package/dist/transition-group-3hnAnwSd.js +801 -0
- package/dist/transition-group-DD_CjSNC.d.ts +608 -0
- package/dist/translations/en.d.ts +6 -0
- package/dist/translations/en.js +75 -0
- package/dist/translations/es.d.ts +6 -0
- package/dist/translations/es.js +75 -0
- package/dist/types/custom-element-jsx.d.ts +13723 -0
- package/dist/utilities/icon-library.d.ts +3 -0
- package/dist/utilities/icon-library.js +93 -0
- package/dist/utilities/localize.d.ts +2 -0
- package/dist/utilities/localize.js +6 -0
- package/dist/zoomable-frame-Cldvj5sE.js +398 -0
- package/dist/zoomable-frame-r6S6587z.d.ts +162 -0
- package/package.json +83 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { t as SigveloIcon } from "../icon-Ci9CPZJV.js";
|
|
2
|
+
import { a as connectIcon, c as getObservedIcons, d as updateConnectedIcons, i as ResolveFunction, l as registerIconLibrary, n as Library, o as disconnectIcon, r as MutateFunction, s as getLibrary, t as IconElement, u as unregisterIconLibrary } from "../icon-library-D_if7p2h.js";
|
|
3
|
+
export { type IconElement, type Library, type MutateFunction, type ResolveFunction, type SigveloIcon, connectIcon, disconnectIcon, getLibrary, getObservedIcons, registerIconLibrary, unregisterIconLibrary, updateConnectedIcons };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { connectIcon, disconnectIcon, getLibrary, getObservedIcons, registerIconLibrary, registerIconLibrary as registerIconLibrary$1, unregisterIconLibrary, updateConnectedIcons } from "@mcp-b/wc-support/utilities/icon-library";
|
|
2
|
+
//#region src/utilities/icon-library.ts
|
|
3
|
+
const encode = (svg) => `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
4
|
+
registerIconLibrary$1("system", { resolve: (name, family) => {
|
|
5
|
+
if (name === "check" && family === "outline") return encode(`
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10" /></svg>
|
|
7
|
+
`);
|
|
8
|
+
if (name === "chevron-down" && family === "outline") return encode(`
|
|
9
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>
|
|
10
|
+
`);
|
|
11
|
+
if (name === "chevron-left" && family === "outline") return encode(`
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>
|
|
13
|
+
`);
|
|
14
|
+
if (name === "chevron-right" && family === "outline") return encode(`
|
|
15
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>
|
|
16
|
+
`);
|
|
17
|
+
if (name === "chevrons-right" && family === "outline") return encode(`
|
|
18
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7l5 5l-5 5" /><path d="M13 7l5 5l-5 5" /></svg>
|
|
19
|
+
`);
|
|
20
|
+
if (name === "circle" && family === "filled") return encode(`
|
|
21
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z" /></svg>
|
|
22
|
+
`);
|
|
23
|
+
if (name === "circle-x" && family === "outline") return encode(`
|
|
24
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /><path d="M10 10l4 4m0 -4l-4 4" /></svg>
|
|
25
|
+
`);
|
|
26
|
+
if (name === "color-picker" && family === "outline") return encode(`
|
|
27
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M11 7l6 6" /><path d="M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z" /></svg>
|
|
28
|
+
`);
|
|
29
|
+
if (name === "copy" && family === "outline") return encode(`
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" /></svg>
|
|
31
|
+
`);
|
|
32
|
+
if (name === "dots" && family === "filled") return encode(`
|
|
33
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /><path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /></svg>filled
|
|
34
|
+
`);
|
|
35
|
+
if (name === "eye" && family === "outline") return encode(`
|
|
36
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" /></svg>
|
|
37
|
+
`);
|
|
38
|
+
if (name === "eye-off" && family === "outline") return encode(`
|
|
39
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828" /><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87" /><path d="M3 3l18 18" /></svg>
|
|
40
|
+
`);
|
|
41
|
+
if (name === "file" && family === "outline") return encode(`
|
|
42
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /></svg>
|
|
43
|
+
`);
|
|
44
|
+
if (name === "file-zip" && family === "outline") return encode(`
|
|
45
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1" /><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z" /><path d="M11 5l-1 0" /><path d="M13 7l-1 0" /><path d="M11 9l-1 0" /><path d="M13 11l-1 0" /><path d="M11 13l-1 0" /><path d="M13 15l-1 0" /></svg>
|
|
46
|
+
`);
|
|
47
|
+
if (name === "grip-horizontal" && family === "filled") return encode(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-grip-horizontal"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="5" cy="9" r="1" fill="currentColor" /><circle cx="5" cy="15" r="1" fill="currentColor" /><circle cx="12" cy="9" r="1" fill="currentColor" /><circle cx="12" cy="15" r="1" fill="currentColor" /><circle cx="19" cy="9" r="1" fill="currentColor" /><circle cx="19" cy="15" r="1" fill="currentColor" /></svg>`);
|
|
48
|
+
if (name === "grip-vertical" && family === "filled") return encode(`
|
|
49
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /><path d="M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /><path d="M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /><path d="M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /><path d="M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /><path d="M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="currentColor" /></svg>
|
|
50
|
+
`);
|
|
51
|
+
if (name === "minus" && family === "outline") return encode(`
|
|
52
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0" /></svg>
|
|
53
|
+
`);
|
|
54
|
+
if (name === "music" && family === "outline") return encode(`
|
|
55
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" /><path d="M13 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" /><path d="M9 17v-13h10v13" /><path d="M9 8h10" /></svg>
|
|
56
|
+
`);
|
|
57
|
+
if (name === "photo" && family === "outline") return encode(`
|
|
58
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 8h.01" /><path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z" /><path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5" /><path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3" /></svg>
|
|
59
|
+
`);
|
|
60
|
+
if (name === "plus" && family === "outline") return encode(`
|
|
61
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 5l0 14" /><path d="M5 12l14 0" /></svg>
|
|
62
|
+
`);
|
|
63
|
+
if (name === "selector" && family === "outline") return encode(`
|
|
64
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8 9l4 -4l4 4" /><path d="M16 15l-4 4l-4 -4" /></svg>
|
|
65
|
+
`);
|
|
66
|
+
if (name === "search" && family === "outline") return encode(`
|
|
67
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>
|
|
68
|
+
`);
|
|
69
|
+
if (name === "share-3" && family === "outline") return encode(`
|
|
70
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M13 4v4c-6.575 1.028 -9.02 6.788 -10 12c-.037 .206 5.384 -5.962 10 -6v4l8 -7l-8 -7z" /></svg>
|
|
71
|
+
`);
|
|
72
|
+
if (name === "star" && family === "filled") return encode(`
|
|
73
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z" /></svg>
|
|
74
|
+
`);
|
|
75
|
+
if (name === "star" && family === "outline") return encode(`
|
|
76
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" /></svg>
|
|
77
|
+
`);
|
|
78
|
+
if (name === "upload" && family === "outline") return encode(`
|
|
79
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" /><path d="M7 9l5 -5l5 5" /><path d="M12 4l0 12" /></svg>
|
|
80
|
+
`);
|
|
81
|
+
if (name === "user" && family === "filled") return encode(`
|
|
82
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d"M0 0h24v24H0z" fill="none"/><path d="M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z" /><path d="M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z" /></svg>
|
|
83
|
+
`);
|
|
84
|
+
if (name === "video" && family === "outline") return encode(`
|
|
85
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z" /><path d="M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z" /></svg>
|
|
86
|
+
`);
|
|
87
|
+
if (name === "x" && family === "outline") return encode(`
|
|
88
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>
|
|
89
|
+
`);
|
|
90
|
+
return encode("");
|
|
91
|
+
} });
|
|
92
|
+
//#endregion
|
|
93
|
+
export { connectIcon, disconnectIcon, getLibrary, getObservedIcons, registerIconLibrary, unregisterIconLibrary, updateConnectedIcons };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as registerDefaultTranslation, i as Translation, n as Localize, o as registerTranslation, r as LocalizeController, s as update, t as BaseTranslation } from "../localize-322EtXNX.js";
|
|
2
|
+
export { type BaseTranslation, Localize, LocalizeController, Translation, registerDefaultTranslation, registerTranslation, update };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LocalizeController, LocalizeController as LocalizeController$1, registerDefaultTranslation, registerTranslation, update } from "@mcp-b/wc-support";
|
|
2
|
+
//#region src/utilities/localize.ts
|
|
3
|
+
/** `LocalizeController` pre-typed with the Sigvelo component library translations. */
|
|
4
|
+
var Localize = class extends LocalizeController$1 {};
|
|
5
|
+
//#endregion
|
|
6
|
+
export { Localize, LocalizeController, registerDefaultTranslation, registerTranslation, update };
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import { Localize } from "./utilities/localize.js";
|
|
2
|
+
import "./icon-BPVkNsY4.js";
|
|
3
|
+
import { t as __decorate } from "./decorate-DcF3lt7P.js";
|
|
4
|
+
import { css, html } from "lit";
|
|
5
|
+
import { property, query } from "lit/decorators.js";
|
|
6
|
+
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
7
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
8
|
+
import { parseDelimitedTokens } from "@mcp-b/wc-support/utilities/parse";
|
|
9
|
+
//#region src/components/zoomable-frame/zoomable-frame.styles.ts
|
|
10
|
+
var zoomable_frame_styles_default = css`
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
position: relative;
|
|
14
|
+
aspect-ratio: 16 / 9;
|
|
15
|
+
width: 100%;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
border-radius: var(--sigvelo-radius-md);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#frame-container {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
width: calc(100% / var(--zoom));
|
|
25
|
+
height: calc(100% / var(--zoom));
|
|
26
|
+
transform: scale(var(--zoom));
|
|
27
|
+
transform-origin: 0 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#iframe {
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
border: none;
|
|
34
|
+
border-radius: inherit;
|
|
35
|
+
/* Prevent the iframe from being selected, e.g. by a double click. Doesn't affect selection withing the iframe. */
|
|
36
|
+
user-select: none;
|
|
37
|
+
-webkit-user-select: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#controls {
|
|
41
|
+
display: flex;
|
|
42
|
+
position: absolute;
|
|
43
|
+
bottom: 0.5em;
|
|
44
|
+
align-items: center;
|
|
45
|
+
padding: 0.25em 0.5em;
|
|
46
|
+
gap: 0.5em;
|
|
47
|
+
border-radius: 0.375em;
|
|
48
|
+
background: #000b;
|
|
49
|
+
color: white;
|
|
50
|
+
font-size: min(12px, 0.75em);
|
|
51
|
+
user-select: none;
|
|
52
|
+
-webkit-user-select: none;
|
|
53
|
+
|
|
54
|
+
&:dir(ltr) {
|
|
55
|
+
right: 0.5em;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:dir(rtl) {
|
|
59
|
+
left: 0.5em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
button {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
padding: 0.25em;
|
|
66
|
+
border: none;
|
|
67
|
+
background: none;
|
|
68
|
+
color: inherit;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
|
|
71
|
+
&:active:not(:disabled) {
|
|
72
|
+
translate: 0 var(--sigvelo-motion-distance-xs);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:focus {
|
|
76
|
+
outline: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:focus-visible {
|
|
80
|
+
outline: var(--sigvelo-focus-ring);
|
|
81
|
+
outline-offset: calc(var(--sigvelo-border-width) * -1);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:disabled {
|
|
85
|
+
cursor: not-allowed;
|
|
86
|
+
opacity: 0.5;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
sigvelo-icon,
|
|
91
|
+
::slotted(sigvelo-icon) {
|
|
92
|
+
font-size: 1.25em;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
span {
|
|
96
|
+
min-width: 4.5ch; /* extra space so numbers don't shift */
|
|
97
|
+
font-variant-numeric: tabular-nums;
|
|
98
|
+
text-align: center;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/zoomable-frame/zoomable-frame.ts
|
|
104
|
+
/**
|
|
105
|
+
* <sigvelo-zoomable-frame>
|
|
106
|
+
*
|
|
107
|
+
* @summary Renders iframe content with zoom and interaction controls.
|
|
108
|
+
* @tag sigvelo-zoomable-frame
|
|
109
|
+
* @documentation https://design-system.sigvelo.com/docs/components/zoomable-frame
|
|
110
|
+
* @status stable
|
|
111
|
+
* @since 1.0
|
|
112
|
+
*
|
|
113
|
+
* @dependency sigvelo-icon
|
|
114
|
+
*
|
|
115
|
+
* @slot zoom-in-icon - The slot that contains the zoom in icon.
|
|
116
|
+
* @slot zoom-out-icon - The slot that contains the zoom out icon.
|
|
117
|
+
*
|
|
118
|
+
* @event load - Emitted when the internal iframe when it finishes loading.
|
|
119
|
+
* @event error - Emitted from the internal iframe when it fails to load.
|
|
120
|
+
*
|
|
121
|
+
* @csspart iframe - The internal `<iframe>` element.
|
|
122
|
+
* @csspart controls - The container that surrounds zoom control buttons.
|
|
123
|
+
* @csspart zoom-in-button - The zoom in button.
|
|
124
|
+
* @csspart zoom-out-button - The zoom out button.
|
|
125
|
+
*
|
|
126
|
+
* @cssproperty [--aspect-ratio=16/9] - The aspect ratio of the frame.
|
|
127
|
+
*
|
|
128
|
+
* @cssstate loading - Applied when the iframe is loading.
|
|
129
|
+
* @cssstate error - Applied when the iframe failed to load.
|
|
130
|
+
*
|
|
131
|
+
* @example Default
|
|
132
|
+
* ```html
|
|
133
|
+
* <sigvelo-zoomable-frame src="https://design-system.sigvelo.com/" zoom="0.5">
|
|
134
|
+
* </sigvelo-zoomable-frame>
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* @example Providing content
|
|
138
|
+
* Use the `src` attribute to load content from a URL. This is useful for embedding external websites or resources. Ensure the URL is accessible and, if cross-origin, be aware that access to the iframe’s `document` or `window` may be restricted due to the Same-Origin Policy.
|
|
139
|
+
*
|
|
140
|
+
* ```html
|
|
141
|
+
* <sigvelo-zoomable-frame src="https://example.com/">
|
|
142
|
+
* </sigvelo-zoomable-frame>
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* By default, the zoomable frame spans 100% of the width and uses a 16/9 aspect ratio. You can adjust this using the `aspect-ratio` CSS property.
|
|
146
|
+
*
|
|
147
|
+
* ```html
|
|
148
|
+
* <sigvelo-zoomable-frame src="https://example.com/" style="aspect-ratio: 4/3;">
|
|
149
|
+
* </sigvelo-zoomable-frame>
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* Use the `srcdoc` attribute or property to render inline HTML content directly within the iframe. This is ideal for displaying custom HTML without needing an external resource.
|
|
153
|
+
*
|
|
154
|
+
* ```html
|
|
155
|
+
* <sigvelo-zoomable-frame srcdoc="<html><body><h1>Hello, World!</h1><p>This is inline content.</p></body></html>">
|
|
156
|
+
* </sigvelo-zoomable-frame>
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* **Note:** If both `src` and `srcdoc` are provided, `srcdoc` takes precedence.
|
|
160
|
+
*
|
|
161
|
+
* @example Zooming
|
|
162
|
+
* Set the `zoom` attribute to change the frame's zoom level. A value of `1` means 100%, a value of `2` means 200%, etc.
|
|
163
|
+
*
|
|
164
|
+
* Use the `zoom-levels` attribute to define specific zoom steps that users can navigate through with the zoom controls. You can specify levels as a space-delimited set of percentages and decimal values, e.g. `zoom-levels="0.25 0.5 75% 100%"`.
|
|
165
|
+
*
|
|
166
|
+
* ```html
|
|
167
|
+
* <sigvelo-zoomable-frame
|
|
168
|
+
* src="https://design-system.sigvelo.com/"
|
|
169
|
+
* zoom="0.5"
|
|
170
|
+
* zoom-levels="50% 0.75 100%"
|
|
171
|
+
* >
|
|
172
|
+
* </sigvelo-zoomable-frame>
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* @example Removing zoom controls
|
|
176
|
+
* Add the `without-controls` attribute to remove the zoom controls from the frame.
|
|
177
|
+
*
|
|
178
|
+
* ```html
|
|
179
|
+
* <sigvelo-zoomable-frame
|
|
180
|
+
* src="https://design-system.sigvelo.com/"
|
|
181
|
+
* without-controls
|
|
182
|
+
* zoom="0.5"
|
|
183
|
+
* >
|
|
184
|
+
* </sigvelo-zoomable-frame>
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* @example Disabling interactions
|
|
188
|
+
* To make the frame inert, add the `without-interaction` attribute. Users won't be able to tab into the frame when this is applied, potentially affecting accessibility.
|
|
189
|
+
*
|
|
190
|
+
* ```html
|
|
191
|
+
* <sigvelo-zoomable-frame
|
|
192
|
+
* src="https://design-system.sigvelo.com/"
|
|
193
|
+
* zoom="0.5"
|
|
194
|
+
* without-interaction
|
|
195
|
+
* >
|
|
196
|
+
* </sigvelo-zoomable-frame>
|
|
197
|
+
* ```
|
|
198
|
+
*
|
|
199
|
+
* @example Browser frame example
|
|
200
|
+
* Zoomable frames work really well with browser frames.
|
|
201
|
+
*
|
|
202
|
+
* ```html
|
|
203
|
+
* <sigvelo-browser-frame label="Sigvelo" style="--body-padding: 0;">
|
|
204
|
+
* <sigvelo-zoomable-frame src="https://design-system.sigvelo.com/" zoom="0.5">
|
|
205
|
+
* </sigvelo-zoomable-frame>
|
|
206
|
+
* </sigvelo-browser-frame>
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
var SigveloZoomableFrame = class extends SigveloElement {
|
|
210
|
+
constructor(..._args) {
|
|
211
|
+
super(..._args);
|
|
212
|
+
this.localize = new Localize(this);
|
|
213
|
+
this.availableZoomLevels = [];
|
|
214
|
+
this.label = "Embedded content";
|
|
215
|
+
this.allowfullscreen = false;
|
|
216
|
+
this.loading = "eager";
|
|
217
|
+
this.zoom = 1;
|
|
218
|
+
this.zoomLevels = "25% 50% 75% 100% 125% 150% 175% 200%";
|
|
219
|
+
this.withoutControls = false;
|
|
220
|
+
this.withoutInteraction = false;
|
|
221
|
+
}
|
|
222
|
+
static {
|
|
223
|
+
this.styles = [zoomable_frame_styles_default];
|
|
224
|
+
}
|
|
225
|
+
/** Returns the internal iframe's `window` object. (Readonly property) */
|
|
226
|
+
get contentWindow() {
|
|
227
|
+
return this.iframe?.contentWindow || null;
|
|
228
|
+
}
|
|
229
|
+
/** Returns the internal iframe's `document` object. (Readonly property) */
|
|
230
|
+
get contentDocument() {
|
|
231
|
+
return this.iframe?.contentDocument || null;
|
|
232
|
+
}
|
|
233
|
+
parseZoomLevels(zoomLevelsString) {
|
|
234
|
+
const tokens = parseDelimitedTokens(zoomLevelsString);
|
|
235
|
+
const levels = [];
|
|
236
|
+
for (const token of tokens) {
|
|
237
|
+
let value;
|
|
238
|
+
if (token.endsWith("%")) {
|
|
239
|
+
const percentage = parseFloat(token.slice(0, -1));
|
|
240
|
+
if (!isNaN(percentage)) value = Math.max(0, percentage / 100);
|
|
241
|
+
else continue;
|
|
242
|
+
} else {
|
|
243
|
+
value = parseFloat(token);
|
|
244
|
+
if (!isNaN(value)) value = Math.max(0, value);
|
|
245
|
+
else continue;
|
|
246
|
+
}
|
|
247
|
+
levels.push(value);
|
|
248
|
+
}
|
|
249
|
+
return [...new Set(levels)].toSorted((a, b) => a - b);
|
|
250
|
+
}
|
|
251
|
+
getCurrentZoomIndex() {
|
|
252
|
+
if (this.availableZoomLevels.length === 0) return -1;
|
|
253
|
+
let closestIndex = 0;
|
|
254
|
+
let closestDiff = Math.abs(this.availableZoomLevels[0] - this.zoom);
|
|
255
|
+
for (let i = 1; i < this.availableZoomLevels.length; i++) {
|
|
256
|
+
const diff = Math.abs(this.availableZoomLevels[i] - this.zoom);
|
|
257
|
+
if (diff < closestDiff) {
|
|
258
|
+
closestDiff = diff;
|
|
259
|
+
closestIndex = i;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return closestIndex;
|
|
263
|
+
}
|
|
264
|
+
isZoomInDisabled() {
|
|
265
|
+
if (this.availableZoomLevels.length === 0) return false;
|
|
266
|
+
return this.getCurrentZoomIndex() >= this.availableZoomLevels.length - 1;
|
|
267
|
+
}
|
|
268
|
+
isZoomOutDisabled() {
|
|
269
|
+
if (this.availableZoomLevels.length === 0) return false;
|
|
270
|
+
return this.getCurrentZoomIndex() <= 0;
|
|
271
|
+
}
|
|
272
|
+
updated(changedProperties) {
|
|
273
|
+
if (changedProperties.has("src") || changedProperties.has("srcdoc")) {
|
|
274
|
+
this.customStates.set("loading", true);
|
|
275
|
+
this.customStates.set("error", false);
|
|
276
|
+
}
|
|
277
|
+
if (changedProperties.has("zoom")) this.style.setProperty("--zoom", `${this.zoom}`);
|
|
278
|
+
if (changedProperties.has("zoomLevels")) {
|
|
279
|
+
this.availableZoomLevels = this.parseZoomLevels(this.zoomLevels);
|
|
280
|
+
if (this.availableZoomLevels.length > 0) {
|
|
281
|
+
const currentIndex = this.getCurrentZoomIndex();
|
|
282
|
+
if (Math.abs(this.availableZoomLevels[currentIndex] - this.zoom) > .001) this.zoom = this.availableZoomLevels[currentIndex];
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/** Zooms in to the next available zoom level. */
|
|
287
|
+
zoomIn() {
|
|
288
|
+
if (this.availableZoomLevels.length === 0) {
|
|
289
|
+
this.zoom = Math.min(this.zoom + .05, 2);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
const currentIndex = this.getCurrentZoomIndex();
|
|
293
|
+
if (currentIndex < this.availableZoomLevels.length - 1) this.zoom = this.availableZoomLevels[currentIndex + 1];
|
|
294
|
+
}
|
|
295
|
+
/** Zooms out to the previous available zoom level. */
|
|
296
|
+
zoomOut() {
|
|
297
|
+
if (this.availableZoomLevels.length === 0) {
|
|
298
|
+
this.zoom = Math.max(this.zoom - .05, 0);
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const currentIndex = this.getCurrentZoomIndex();
|
|
302
|
+
if (currentIndex > 0) this.zoom = this.availableZoomLevels[currentIndex - 1];
|
|
303
|
+
}
|
|
304
|
+
handleLoad() {
|
|
305
|
+
this.customStates.set("loading", false);
|
|
306
|
+
this.dispatchEvent(new Event("load", {
|
|
307
|
+
bubbles: false,
|
|
308
|
+
cancelable: false,
|
|
309
|
+
composed: true
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
312
|
+
handleError() {
|
|
313
|
+
this.customStates.set("loading", false);
|
|
314
|
+
this.customStates.set("error", true);
|
|
315
|
+
this.dispatchEvent(new Event("error", {
|
|
316
|
+
bubbles: false,
|
|
317
|
+
cancelable: false,
|
|
318
|
+
composed: true
|
|
319
|
+
}));
|
|
320
|
+
}
|
|
321
|
+
render() {
|
|
322
|
+
return html`
|
|
323
|
+
<div id="frame-container">
|
|
324
|
+
<iframe
|
|
325
|
+
id="iframe"
|
|
326
|
+
part="iframe"
|
|
327
|
+
title=${this.label}
|
|
328
|
+
?inert=${this.withoutInteraction}
|
|
329
|
+
?allowfullscreen=${this.allowfullscreen}
|
|
330
|
+
loading=${this.loading}
|
|
331
|
+
referrerpolicy=${this.referrerpolicy}
|
|
332
|
+
sandbox=${ifDefined(this.sandbox ?? void 0)}
|
|
333
|
+
src=${ifDefined(this.src ?? void 0)}
|
|
334
|
+
srcdoc=${ifDefined(this.srcdoc ?? void 0)}
|
|
335
|
+
@load=${this.handleLoad}
|
|
336
|
+
@error=${this.handleError}
|
|
337
|
+
></iframe>
|
|
338
|
+
</div>
|
|
339
|
+
|
|
340
|
+
${!this.withoutControls ? html`
|
|
341
|
+
<div id="controls" part="controls">
|
|
342
|
+
<button
|
|
343
|
+
part="zoom-out-button"
|
|
344
|
+
aria-label=${this.localize.term("zoomOut")}
|
|
345
|
+
@click=${this.zoomOut}
|
|
346
|
+
?disabled=${this.isZoomOutDisabled()}
|
|
347
|
+
>
|
|
348
|
+
<slot name="zoom-out-icon">
|
|
349
|
+
<sigvelo-icon name="minus" label="Zoom out"></sigvelo-icon>
|
|
350
|
+
</slot>
|
|
351
|
+
</button>
|
|
352
|
+
<span
|
|
353
|
+
>${this.localize.number(this.zoom, {
|
|
354
|
+
style: "percent",
|
|
355
|
+
maximumFractionDigits: 1
|
|
356
|
+
})}</span
|
|
357
|
+
>
|
|
358
|
+
<button
|
|
359
|
+
part="zoom-in-button"
|
|
360
|
+
aria-label=${this.localize.term("zoomIn")}
|
|
361
|
+
@click=${this.zoomIn}
|
|
362
|
+
?disabled=${this.isZoomInDisabled()}
|
|
363
|
+
>
|
|
364
|
+
<slot name="zoom-in-icon">
|
|
365
|
+
<sigvelo-icon name="plus" label="Zoom in"></sigvelo-icon>
|
|
366
|
+
</slot>
|
|
367
|
+
</button>
|
|
368
|
+
</div>
|
|
369
|
+
` : ""}
|
|
370
|
+
`;
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
__decorate([query("#iframe")], SigveloZoomableFrame.prototype, "iframe", void 0);
|
|
374
|
+
__decorate([property()], SigveloZoomableFrame.prototype, "src", void 0);
|
|
375
|
+
__decorate([property()], SigveloZoomableFrame.prototype, "srcdoc", void 0);
|
|
376
|
+
__decorate([property()], SigveloZoomableFrame.prototype, "label", void 0);
|
|
377
|
+
__decorate([property({ type: Boolean })], SigveloZoomableFrame.prototype, "allowfullscreen", void 0);
|
|
378
|
+
__decorate([property()], SigveloZoomableFrame.prototype, "loading", void 0);
|
|
379
|
+
__decorate([property()], SigveloZoomableFrame.prototype, "referrerpolicy", void 0);
|
|
380
|
+
__decorate([property()], SigveloZoomableFrame.prototype, "sandbox", void 0);
|
|
381
|
+
__decorate([property({
|
|
382
|
+
type: Number,
|
|
383
|
+
reflect: true
|
|
384
|
+
})], SigveloZoomableFrame.prototype, "zoom", void 0);
|
|
385
|
+
__decorate([property({ attribute: "zoom-levels" })], SigveloZoomableFrame.prototype, "zoomLevels", void 0);
|
|
386
|
+
__decorate([property({
|
|
387
|
+
type: Boolean,
|
|
388
|
+
attribute: "without-controls",
|
|
389
|
+
reflect: true
|
|
390
|
+
})], SigveloZoomableFrame.prototype, "withoutControls", void 0);
|
|
391
|
+
__decorate([property({
|
|
392
|
+
type: Boolean,
|
|
393
|
+
attribute: "without-interaction",
|
|
394
|
+
reflect: true
|
|
395
|
+
})], SigveloZoomableFrame.prototype, "withoutInteraction", void 0);
|
|
396
|
+
customElements.define("sigvelo-zoomable-frame", SigveloZoomableFrame);
|
|
397
|
+
//#endregion
|
|
398
|
+
export { SigveloZoomableFrame as t };
|