@vertexvis/ui 0.0.11-canary.6 → 0.0.11
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.template.md +11 -1
- package/dist/cjs/auto-resize-textarea-6f700406.js +151 -0
- package/dist/cjs/{avatar-6c7b9b0d.js → avatar-1a0305f3.js} +1 -1
- package/dist/cjs/{avatar-group-b8e45ba3.js → avatar-group-3e79ca71.js} +1 -1
- package/dist/cjs/button-771ea5bc.js +85 -0
- package/dist/cjs/card-2bccb1e2.js +38 -0
- package/dist/cjs/card-group-268041cb.js +34 -0
- package/dist/cjs/chip-63de5487.js +33 -0
- package/dist/cjs/{click-to-edit-text-field-1052edd3.js → click-to-edit-text-field-57f9ad64.js} +1 -1
- package/dist/cjs/collapsible-fca4d66d.js +27 -0
- package/dist/cjs/{color-picker-277978d9.js → color-picker-6954e944.js} +8 -3
- package/dist/cjs/components.cjs.js +2 -2
- package/dist/cjs/{context-menu-214891e9.js → context-menu-56ac1c58.js} +1 -1
- package/dist/cjs/{dialog-0e0d74df.js → dialog-401b43d0.js} +1 -1
- package/dist/cjs/draggable-popover-9713af9a.js +84 -0
- package/dist/cjs/{dropdown-menu-e387d409.js → dropdown-menu-0f605871.js} +1 -1
- package/dist/cjs/expandable-724c3988.js +106 -0
- package/dist/cjs/help-tooltip-3aaffd14.js +41 -0
- package/dist/cjs/{icon-957d67c3.js → icon-4867271c.js} +2 -2
- package/dist/cjs/icon-button-218ffc03.js +60 -0
- package/dist/cjs/{icon-helper-f7bc1a03.js → icon-helper-6900ca6b.js} +78 -1
- package/dist/cjs/{index-686e5bc4.js → index-4281b6d5.js} +70 -3
- package/dist/cjs/index.cjs.js +49 -30
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{logo-loading-1c359628.js → logo-loading-f5b077a7.js} +1 -1
- package/dist/cjs/{menu-93cecf17.js → menu-73db9525.js} +1 -1
- package/dist/cjs/{menu-divider-a3baa781.js → menu-divider-958fc5aa.js} +1 -1
- package/dist/cjs/{menu-item-e2d93f1e.js → menu-item-51632152.js} +1 -1
- package/dist/cjs/{popover-9c66384c.js → popover-eda673ce.js} +38 -14
- package/dist/cjs/{radio-ca2ae5ea.js → radio-6ad34c3d.js} +1 -1
- package/dist/cjs/{radio-group-6032874c.js → radio-group-70b56393.js} +1 -1
- package/dist/cjs/{resizable-8b65426f.js → resizable-0c5917e2.js} +5 -5
- package/dist/cjs/result-list-ad4e4841.js +257 -0
- package/dist/cjs/search-bar-cd572112.js +284 -0
- package/dist/cjs/{select-c2d7e2e4.js → select-4b0361a7.js} +1 -1
- package/dist/cjs/slider-b24243c2.js +47 -0
- package/dist/cjs/{spinner-623f6272.js → spinner-5e2183ef.js} +1 -1
- package/dist/cjs/templates-4243180f.js +254 -0
- package/dist/cjs/{text-field-c7f1e4f3.js → text-field-9d449de9.js} +40 -4
- package/dist/cjs/toast-c040b045.js +111 -0
- package/dist/cjs/toggle-e05cb29f.js +52 -0
- package/dist/cjs/{tooltip-936f98ab.js → tooltip-ce04e29c.js} +1 -1
- package/dist/cjs/vertex-auto-resize-textarea.cjs.entry.js +10 -0
- package/dist/cjs/vertex-avatar-group.cjs.entry.js +2 -2
- package/dist/cjs/vertex-avatar.cjs.entry.js +2 -2
- package/dist/cjs/vertex-button.cjs.entry.js +2 -2
- package/dist/cjs/vertex-card-group.cjs.entry.js +2 -2
- package/dist/cjs/vertex-card.cjs.entry.js +2 -2
- package/dist/cjs/vertex-chip.cjs.entry.js +11 -0
- package/dist/cjs/vertex-click-to-edit-textfield.cjs.entry.js +2 -2
- package/dist/cjs/vertex-collapsible.cjs.entry.js +2 -2
- package/dist/cjs/vertex-color-picker.cjs.entry.js +3 -2
- package/dist/cjs/vertex-context-menu.cjs.entry.js +2 -2
- package/dist/cjs/vertex-dialog.cjs.entry.js +2 -2
- package/dist/cjs/vertex-draggable-popover.cjs.entry.js +11 -0
- package/dist/cjs/vertex-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/vertex-expandable.cjs.entry.js +11 -0
- package/dist/cjs/vertex-help-tooltip.cjs.entry.js +10 -0
- package/dist/cjs/vertex-icon-button.cjs.entry.js +3 -3
- package/dist/cjs/vertex-icon.cjs.entry.js +3 -3
- package/dist/cjs/vertex-logo-loading.cjs.entry.js +2 -2
- package/dist/cjs/vertex-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/vertex-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/vertex-menu.cjs.entry.js +2 -2
- package/dist/cjs/vertex-popover.cjs.entry.js +2 -2
- package/dist/cjs/vertex-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/vertex-radio.cjs.entry.js +2 -2
- package/dist/cjs/vertex-resizable.cjs.entry.js +2 -2
- package/dist/cjs/vertex-result-list.cjs.entry.js +12 -0
- package/dist/cjs/vertex-search-bar.cjs.entry.js +12 -0
- package/dist/cjs/vertex-select.cjs.entry.js +2 -2
- package/dist/cjs/vertex-slider.cjs.entry.js +11 -0
- package/dist/cjs/vertex-spinner.cjs.entry.js +2 -2
- package/dist/cjs/vertex-textfield.cjs.entry.js +2 -2
- package/dist/cjs/vertex-toast.cjs.entry.js +11 -0
- package/dist/cjs/vertex-toggle.cjs.entry.js +2 -2
- package/dist/cjs/vertex-tooltip.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +11 -2
- package/dist/collection/components/auto-resize-textarea/auto-resize-textarea.css +21 -0
- package/dist/collection/components/auto-resize-textarea/auto-resize-textarea.js +195 -0
- package/dist/collection/components/auto-resize-textarea/utils.js +4 -0
- package/dist/collection/components/button/button.css +15 -1
- package/dist/collection/components/button/button.js +8 -4
- package/dist/collection/components/card/card.css +13 -6
- package/dist/collection/components/card/card.js +75 -8
- package/dist/collection/components/card-group/card-group.css +11 -1
- package/dist/collection/components/card-group/card-group.js +28 -31
- package/dist/collection/components/chip/chip.css +46 -0
- package/dist/collection/components/chip/chip.js +83 -0
- package/dist/collection/components/collapsible/collapsible.css +5 -14
- package/dist/collection/components/collapsible/collapsible.js +12 -64
- package/dist/collection/components/color-picker/color-picker.css +5 -0
- package/dist/collection/components/color-picker/color-picker.js +26 -3
- package/dist/collection/components/draggable-popover/draggable-popover.css +85 -0
- package/dist/collection/components/draggable-popover/draggable-popover.js +154 -0
- package/dist/collection/components/expandable/expandable.css +30 -0
- package/dist/collection/components/expandable/expandable.js +259 -0
- package/dist/collection/components/help-tooltip/help-tooltip.css +24 -0
- package/dist/collection/components/help-tooltip/help-tooltip.js +129 -0
- package/dist/collection/components/icon/icon-helper.js +46 -1
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icons/adjustments.js +5 -0
- package/dist/collection/components/icon/icons/attachment.js +4 -0
- package/dist/collection/components/icon/icons/close-circle-fill.js +4 -0
- package/dist/collection/components/icon/icons/columns.js +4 -0
- package/dist/collection/components/icon/icons/comment-reopen.js +4 -0
- package/dist/collection/components/icon/icons/download.js +4 -0
- package/dist/collection/components/icon/icons/drag-indicator.js +4 -0
- package/dist/collection/components/icon/icons/error-circle.js +4 -0
- package/dist/collection/components/icon/icons/file-pdf.js +4 -0
- package/dist/collection/components/icon/icons/file.js +4 -0
- package/dist/collection/components/icon/icons/open-window.js +4 -0
- package/dist/collection/components/icon/icons/open.js +4 -0
- package/dist/collection/components/icon/icons/precise-measurement.js +5 -0
- package/dist/collection/components/icon/icons/search.js +4 -0
- package/dist/collection/components/icon/icons/star.js +4 -0
- package/dist/collection/components/icon/names.js +16 -1
- package/dist/collection/components/icon-button/icon-button.css +62 -13
- package/dist/collection/components/icon-button/icon-button.js +59 -18
- package/dist/collection/components/index.js +12 -3
- package/dist/collection/components/popover/popover.css +30 -3
- package/dist/collection/components/popover/popover.js +92 -13
- package/dist/collection/components/resizable/resizable.js +5 -5
- package/dist/collection/components/result-list/lib.js +11 -0
- package/dist/collection/components/result-list/result-list.css +24 -0
- package/dist/collection/components/result-list/result-list.js +391 -0
- package/dist/collection/components/search-bar/lib.js +22 -0
- package/dist/collection/components/search-bar/search-bar.css +164 -0
- package/dist/collection/components/search-bar/search-bar.js +538 -0
- package/dist/collection/components/slider/slider.css +116 -0
- package/dist/collection/components/slider/slider.js +175 -0
- package/dist/collection/components/text-field/text-field.js +100 -10
- package/dist/collection/components/toast/toast.css +105 -0
- package/dist/collection/components/toast/toast.js +253 -0
- package/dist/collection/components/toggle/toggle.css +1 -0
- package/dist/collection/util/components/slots.js +13 -0
- package/dist/collection/util/templates/binding.js +156 -0
- package/dist/collection/util/templates/disposable.js +2 -0
- package/dist/collection/util/templates/element-pool.js +67 -0
- package/dist/collection/util/templates/templates.js +20 -0
- package/dist/components/components.css +1 -1
- package/dist/components/components.esm.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/p-05b12626.js +1 -0
- package/dist/components/p-05e2ba16.entry.js +1 -0
- package/dist/components/{p-386780d5.js → p-06625c6f.js} +1 -1
- package/dist/components/p-08d523d6.entry.js +1 -0
- package/dist/components/p-0b7d4efe.js +1 -0
- package/dist/components/p-12dc204a.entry.js +1 -0
- package/dist/components/p-12f54164.entry.js +1 -0
- package/dist/components/p-15e9570e.js +1 -0
- package/dist/components/p-1918b0ef.entry.js +1 -0
- package/dist/components/{p-d1886df3.js → p-1bcbfcba.js} +1 -1
- package/dist/components/p-20e5bf44.js +1 -0
- package/dist/components/p-22578c30.entry.js +1 -0
- package/dist/components/p-25b4f716.js +1 -0
- package/dist/components/p-317a3368.js +1 -0
- package/dist/components/{p-b8d385a4.js → p-34c11b2a.js} +1 -1
- package/dist/components/p-3514e8e0.entry.js +1 -0
- package/dist/components/p-381506d7.entry.js +1 -0
- package/dist/components/p-3ee9bcfc.js +1 -0
- package/dist/components/p-40f9b3d8.js +1 -0
- package/dist/components/p-43065ccd.entry.js +1 -0
- package/dist/components/p-440602aa.entry.js +1 -0
- package/dist/components/p-45da3920.js +1 -0
- package/dist/components/{p-35ae7b18.js → p-479c4e5e.js} +1 -1
- package/dist/components/p-4b870389.entry.js +1 -0
- package/dist/components/p-4bc47a80.entry.js +1 -0
- package/dist/components/{p-8f84655a.js → p-54cb7401.js} +1 -1
- package/dist/components/p-59974f6e.entry.js +1 -0
- package/dist/components/p-5a440d35.entry.js +1 -0
- package/dist/components/p-5b99775d.js +1 -0
- package/dist/components/p-61ed6890.entry.js +1 -0
- package/dist/components/p-63d22bf8.js +1 -0
- package/dist/components/p-667e123c.js +1 -0
- package/dist/components/{p-5e84316d.js → p-6eb3f87c.js} +1 -1
- package/dist/components/p-785a3900.entry.js +1 -0
- package/dist/components/p-7ab7afc1.js +1 -0
- package/dist/components/p-7c48864f.entry.js +1 -0
- package/dist/components/{p-47a61067.js → p-7f4caa63.js} +1 -1
- package/dist/components/p-8292d068.js +1 -0
- package/dist/components/p-867b2cdf.js +15 -0
- package/dist/components/p-8a2769f7.js +1 -0
- package/dist/components/{p-bb2716e4.js → p-8afd622c.js} +1 -1
- package/dist/components/p-8b91e49c.js +1 -0
- package/dist/components/p-8d547271.js +1 -0
- package/dist/components/p-9330f080.entry.js +1 -0
- package/dist/components/p-936b801d.entry.js +1 -0
- package/dist/components/p-97b25a96.entry.js +1 -0
- package/dist/components/p-9bbfb471.js +1 -0
- package/dist/components/p-9f6e5cdd.entry.js +1 -0
- package/dist/components/p-a2d3910f.entry.js +1 -0
- package/dist/components/p-a364ec4e.entry.js +1 -0
- package/dist/components/{p-d7e8d539.js → p-a506dec9.js} +1 -1
- package/dist/components/p-a6b02956.js +1 -0
- package/dist/components/p-a95d5826.entry.js +1 -0
- package/dist/components/{p-9b58b9e1.js → p-af89dbc7.js} +1 -1
- package/dist/components/p-afdb78f8.entry.js +1 -0
- package/dist/components/{p-d5629e53.js → p-b002a04b.js} +1 -1
- package/dist/components/p-b414f6fe.js +1 -0
- package/dist/components/{p-ac5078b4.js → p-b74e1985.js} +1 -1
- package/dist/components/p-b7ef853a.entry.js +1 -0
- package/dist/components/{p-b7b5da40.js → p-b8643f10.js} +1 -1
- package/dist/components/p-bdccf19a.entry.js +1 -0
- package/dist/components/p-bfcb57ab.entry.js +1 -0
- package/dist/components/p-c0b1cfa0.entry.js +1 -0
- package/dist/components/p-c320c9f6.entry.js +1 -0
- package/dist/components/p-c760427c.entry.js +1 -0
- package/dist/components/p-cdedbf6f.entry.js +1 -0
- package/dist/components/p-cf1c6515.entry.js +1 -0
- package/dist/components/p-d5c845bf.entry.js +1 -0
- package/dist/components/p-db5cca1c.js +1 -0
- package/dist/components/{p-3162b222.js → p-e34161e3.js} +1 -1
- package/dist/components/p-edfbb91a.entry.js +1 -0
- package/dist/components/{p-5b44b755.js → p-ee7cc472.js} +1 -1
- package/dist/components/p-fd3c6198.js +1 -0
- package/dist/esm/auto-resize-textarea-b8418d63.js +149 -0
- package/dist/esm/{avatar-1d2d8710.js → avatar-10a81069.js} +1 -1
- package/dist/esm/{avatar-group-3ffc2fcc.js → avatar-group-58ccdbe7.js} +1 -1
- package/dist/esm/button-561a3647.js +83 -0
- package/dist/esm/card-c15779c5.js +36 -0
- package/dist/esm/card-group-95c313e0.js +32 -0
- package/dist/esm/chip-b2031c29.js +31 -0
- package/dist/esm/{click-to-edit-text-field-5e38e65e.js → click-to-edit-text-field-b2d879fa.js} +1 -1
- package/dist/esm/collapsible-01aab65e.js +25 -0
- package/dist/esm/{color-picker-7c6769ce.js → color-picker-413f4132.js} +8 -3
- package/dist/esm/components.js +2 -2
- package/dist/esm/{context-menu-5ec22c7f.js → context-menu-52516069.js} +1 -1
- package/dist/esm/{dialog-ca9e8cb4.js → dialog-b43841f0.js} +1 -1
- package/dist/esm/draggable-popover-17967afd.js +82 -0
- package/dist/esm/{dropdown-menu-2ee607bd.js → dropdown-menu-9f73ccd5.js} +1 -1
- package/dist/esm/expandable-882f1c73.js +104 -0
- package/dist/esm/help-tooltip-18d1146c.js +39 -0
- package/dist/esm/{icon-b508dcd1.js → icon-6373d26c.js} +2 -2
- package/dist/esm/icon-button-e8515654.js +58 -0
- package/dist/esm/{icon-helper-52edcc94.js → icon-helper-85d2ac2f.js} +78 -1
- package/dist/esm/{index-f7227aea.js → index-9f6e1d98.js} +70 -3
- package/dist/esm/index.js +38 -28
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{logo-loading-81446270.js → logo-loading-ddbaff14.js} +1 -1
- package/dist/esm/{menu-feee40c5.js → menu-6855f8db.js} +1 -1
- package/dist/esm/{menu-divider-69071bd4.js → menu-divider-2de8cacc.js} +1 -1
- package/dist/esm/{menu-item-5f735fd2.js → menu-item-52c56036.js} +1 -1
- package/dist/esm/{popover-123c9334.js → popover-cd7e83b0.js} +38 -14
- package/dist/esm/{radio-cc869108.js → radio-6aed1650.js} +1 -1
- package/dist/esm/{radio-group-05acb62b.js → radio-group-94ebc592.js} +1 -1
- package/dist/esm/{resizable-990de013.js → resizable-48183d8e.js} +5 -5
- package/dist/esm/result-list-aa1ee177.js +255 -0
- package/dist/esm/search-bar-11c535bf.js +282 -0
- package/dist/esm/{select-c2ad78d3.js → select-b7a7ad40.js} +1 -1
- package/dist/esm/slider-f3e64050.js +45 -0
- package/dist/esm/{spinner-86b04055.js → spinner-5effba22.js} +1 -1
- package/dist/esm/templates-ddfd8942.js +252 -0
- package/dist/esm/{text-field-318c6eab.js → text-field-a82d4ba8.js} +40 -4
- package/dist/esm/toast-f836c6c4.js +109 -0
- package/dist/esm/toggle-f4628c27.js +50 -0
- package/dist/esm/{tooltip-f61f1ac6.js → tooltip-ca3d98e9.js} +1 -1
- package/dist/esm/vertex-auto-resize-textarea.entry.js +2 -0
- package/dist/esm/vertex-avatar-group.entry.js +2 -2
- package/dist/esm/vertex-avatar.entry.js +2 -2
- package/dist/esm/vertex-button.entry.js +2 -2
- package/dist/esm/vertex-card-group.entry.js +2 -2
- package/dist/esm/vertex-card.entry.js +2 -2
- package/dist/esm/vertex-chip.entry.js +3 -0
- package/dist/esm/vertex-click-to-edit-textfield.entry.js +2 -2
- package/dist/esm/vertex-collapsible.entry.js +2 -2
- package/dist/esm/vertex-color-picker.entry.js +3 -2
- package/dist/esm/vertex-context-menu.entry.js +2 -2
- package/dist/esm/vertex-dialog.entry.js +2 -2
- package/dist/esm/vertex-draggable-popover.entry.js +3 -0
- package/dist/esm/vertex-dropdown-menu.entry.js +2 -2
- package/dist/esm/vertex-expandable.entry.js +3 -0
- package/dist/esm/vertex-help-tooltip.entry.js +2 -0
- package/dist/esm/vertex-icon-button.entry.js +3 -3
- package/dist/esm/vertex-icon.entry.js +3 -3
- package/dist/esm/vertex-logo-loading.entry.js +2 -2
- package/dist/esm/vertex-menu-divider.entry.js +2 -2
- package/dist/esm/vertex-menu-item.entry.js +2 -2
- package/dist/esm/vertex-menu.entry.js +2 -2
- package/dist/esm/vertex-popover.entry.js +2 -2
- package/dist/esm/vertex-radio-group.entry.js +2 -2
- package/dist/esm/vertex-radio.entry.js +2 -2
- package/dist/esm/vertex-resizable.entry.js +2 -2
- package/dist/esm/vertex-result-list.entry.js +4 -0
- package/dist/esm/vertex-search-bar.entry.js +4 -0
- package/dist/esm/vertex-select.entry.js +2 -2
- package/dist/esm/vertex-slider.entry.js +3 -0
- package/dist/esm/vertex-spinner.entry.js +2 -2
- package/dist/esm/vertex-textfield.entry.js +2 -2
- package/dist/esm/vertex-toast.entry.js +3 -0
- package/dist/esm/vertex-toggle.entry.js +2 -2
- package/dist/esm/vertex-tooltip.entry.js +2 -2
- package/dist/types/components/auto-resize-textarea/auto-resize-textarea.d.ts +42 -0
- package/dist/types/components/auto-resize-textarea/utils.d.ts +1 -0
- package/dist/types/components/button/button.d.ts +5 -2
- package/dist/types/components/card/card.d.ts +20 -1
- package/dist/types/components/card-group/card-group.d.ts +1 -8
- package/dist/types/components/chip/chip.d.ts +16 -0
- package/dist/types/components/collapsible/collapsible.d.ts +0 -8
- package/dist/types/components/color-picker/color-picker.d.ts +4 -0
- package/dist/types/components/draggable-popover/draggable-popover.d.ts +31 -0
- package/dist/types/components/expandable/expandable.d.ts +62 -0
- package/dist/types/components/help-tooltip/help-tooltip.d.ts +26 -0
- package/dist/types/components/icon/icons/adjustments.d.ts +3 -0
- package/dist/types/components/icon/icons/attachment.d.ts +3 -0
- package/dist/types/components/icon/icons/close-circle-fill.d.ts +3 -0
- package/dist/types/components/icon/icons/columns.d.ts +3 -0
- package/dist/types/components/icon/icons/comment-reopen.d.ts +3 -0
- package/dist/types/components/icon/icons/download.d.ts +3 -0
- package/dist/types/components/icon/icons/drag-indicator.d.ts +3 -0
- package/dist/types/components/icon/icons/error-circle.d.ts +3 -0
- package/dist/types/components/icon/icons/file-pdf.d.ts +3 -0
- package/dist/types/components/icon/icons/file.d.ts +3 -0
- package/dist/types/components/icon/icons/open-window.d.ts +3 -0
- package/dist/types/components/icon/icons/open.d.ts +3 -0
- package/dist/types/components/icon/icons/precise-measurement.d.ts +3 -0
- package/dist/types/components/icon/icons/search.d.ts +3 -0
- package/dist/types/components/icon/icons/star.d.ts +3 -0
- package/dist/types/components/icon/names.d.ts +15 -0
- package/dist/types/components/icon-button/icon-button.d.ts +13 -2
- package/dist/types/components/index.d.ts +11 -2
- package/dist/types/components/popover/popover.d.ts +35 -0
- package/dist/types/components/result-list/lib.d.ts +2 -0
- package/dist/types/components/result-list/result-list.d.ts +43 -0
- package/dist/types/components/search-bar/lib.d.ts +6 -0
- package/dist/types/components/search-bar/search-bar.d.ts +63 -0
- package/dist/types/components/slider/slider.d.ts +41 -0
- package/dist/types/components/text-field/text-field.d.ts +19 -0
- package/dist/types/components/toast/toast.d.ts +55 -0
- package/dist/types/components.d.ts +508 -13
- package/dist/types/util/components/slots.d.ts +6 -0
- package/dist/types/util/templates/binding.d.ts +35 -0
- package/dist/types/util/templates/disposable.d.ts +10 -0
- package/dist/types/util/templates/element-pool.d.ts +18 -0
- package/dist/types/util/templates/templates.d.ts +7 -0
- package/package.json +7 -5
- package/dist/cjs/button-29046f0a.js +0 -81
- package/dist/cjs/card-03cba918.js +0 -17
- package/dist/cjs/card-group-3b1229ec.js +0 -41
- package/dist/cjs/collapsible-a913f59c.js +0 -57
- package/dist/cjs/icon-button-6a95b57b.js +0 -42
- package/dist/cjs/toggle-efae78c4.js +0 -52
- package/dist/components/p-0936489f.entry.js +0 -1
- package/dist/components/p-0ea6eda3.entry.js +0 -1
- package/dist/components/p-15e0f205.js +0 -1
- package/dist/components/p-1a457440.entry.js +0 -1
- package/dist/components/p-259345f4.entry.js +0 -1
- package/dist/components/p-2ff86e8d.entry.js +0 -1
- package/dist/components/p-31d4f522.entry.js +0 -1
- package/dist/components/p-36a79035.entry.js +0 -1
- package/dist/components/p-387be653.js +0 -1
- package/dist/components/p-38e13170.entry.js +0 -1
- package/dist/components/p-404bb1f0.entry.js +0 -1
- package/dist/components/p-4a194288.entry.js +0 -1
- package/dist/components/p-53cfd6d4.entry.js +0 -1
- package/dist/components/p-5454bbde.js +0 -1
- package/dist/components/p-68dadb74.entry.js +0 -1
- package/dist/components/p-74343e91.js +0 -1
- package/dist/components/p-7aac51f5.entry.js +0 -1
- package/dist/components/p-8db46bd0.js +0 -1
- package/dist/components/p-94e485e8.js +0 -1
- package/dist/components/p-a310d670.entry.js +0 -1
- package/dist/components/p-a31969b4.js +0 -1
- package/dist/components/p-a425b1e9.entry.js +0 -1
- package/dist/components/p-a42da124.js +0 -1
- package/dist/components/p-a63b1737.entry.js +0 -1
- package/dist/components/p-b2d03ec3.entry.js +0 -1
- package/dist/components/p-b6a45219.js +0 -1
- package/dist/components/p-d5317abd.js +0 -1
- package/dist/components/p-d939ec2f.entry.js +0 -1
- package/dist/components/p-dad17f2e.js +0 -1
- package/dist/components/p-dcfd18fd.js +0 -1
- package/dist/components/p-e8764d7d.entry.js +0 -1
- package/dist/components/p-ea226178.entry.js +0 -1
- package/dist/components/p-ec8ccc44.entry.js +0 -1
- package/dist/components/p-ef63a2cf.entry.js +0 -1
- package/dist/components/p-f46d56c3.entry.js +0 -1
- package/dist/components/p-f67c24b1.entry.js +0 -1
- package/dist/components/p-f79852e2.js +0 -1
- package/dist/components/p-f9a82669.entry.js +0 -1
- package/dist/components/p-feb35651.entry.js +0 -1
- package/dist/esm/button-fc62e759.js +0 -79
- package/dist/esm/card-4a6413ac.js +0 -15
- package/dist/esm/card-group-283ee02b.js +0 -39
- package/dist/esm/collapsible-59a14c6d.js +0 -55
- package/dist/esm/icon-button-b4e4b3d0.js +0 -40
- package/dist/esm/toggle-4c3f1480.js +0 -50
package/README.template.md
CHANGED
|
@@ -40,4 +40,14 @@ async function main() {
|
|
|
40
40
|
defineCustomElements(window).then(() => main());
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
### Local development
|
|
44
|
+
|
|
45
|
+
For local development, we use story book to see your components and make changes. After following the initial setup in the root of this project, in this module you are able to run the following commands:
|
|
46
|
+
```
|
|
47
|
+
yarn build
|
|
48
|
+
yarn start
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
In your browser storybook should open up to `http://localhost:6006`
|
|
52
|
+
|
|
53
|
+
[web components]: https://developer.mozilla.org/en-US/docs/Web/Web_Components
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
|
|
5
|
+
function getFirstSlottedElement({ hostElement, slotName, selector, }) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7
|
+
if (selector != null) {
|
|
8
|
+
return ((_c = (_b = (_a = hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(selector)) !== null && _b !== void 0 ? _b : hostElement.querySelector(selector)) !== null && _c !== void 0 ? _c : undefined);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
const slotted = (_e = (_d = hostElement.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector(slotName != null ? `slot[name="${slotName}"]` : 'slot')) !== null && _e !== void 0 ? _e : undefined;
|
|
12
|
+
if ((_g = (_f = slotted === null || slotted === void 0 ? void 0 : slotted.assignedElements) === null || _f === void 0 ? void 0 : _f.call(slotted).length) !== null && _g !== void 0 ? _g : 0 > 0) {
|
|
13
|
+
return slotted === null || slotted === void 0 ? void 0 : slotted.assignedElements()[0];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function isTextareaElement(el) {
|
|
19
|
+
return (el === null || el === void 0 ? void 0 : el.tagName) === 'TEXTAREA';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const autoResizeTextareaCss = ":host{position:relative;width:100%;height:100%;font-size:0}.hidden-text{position:absolute;box-sizing:border-box;top:0;left:0;height:0;width:100%;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;overflow:hidden}";
|
|
23
|
+
|
|
24
|
+
const AutoResizeTextArea = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
index.registerInstance(this, hostRef);
|
|
27
|
+
/**
|
|
28
|
+
* The minimum number of rows that the textarea will be constrained to.
|
|
29
|
+
*
|
|
30
|
+
* Defaults to `1`.
|
|
31
|
+
*/
|
|
32
|
+
this.minRows = 1;
|
|
33
|
+
this.previousScrollTop = 0;
|
|
34
|
+
this.rowCount = 0;
|
|
35
|
+
this.prepareHiddenTextElement = this.prepareHiddenTextElement.bind(this);
|
|
36
|
+
this.updateScrollTop = this.updateScrollTop.bind(this);
|
|
37
|
+
this.computeRowHeights = this.computeRowHeights.bind(this);
|
|
38
|
+
this.updateValue = this.updateValue.bind(this);
|
|
39
|
+
this.updatePreviousScrollTop = this.updatePreviousScrollTop.bind(this);
|
|
40
|
+
this.updateOverflow = this.updateOverflow.bind(this);
|
|
41
|
+
this.resizeObserver = new ResizeObserver(this.computeRowHeights);
|
|
42
|
+
}
|
|
43
|
+
componentWillLoad() {
|
|
44
|
+
this.computeRowHeights();
|
|
45
|
+
}
|
|
46
|
+
componentDidLoad() {
|
|
47
|
+
this.slottedElement = this.getSlottedTextareaElement();
|
|
48
|
+
this.prepareHiddenTextElement();
|
|
49
|
+
if (this.slottedElement != null) {
|
|
50
|
+
this.resizeObserver.observe(this.slottedElement);
|
|
51
|
+
this.addEventListener();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
componentDidRender() {
|
|
55
|
+
// This re-computes the number of rows after a rerender has
|
|
56
|
+
// rendered the current value to the hidden textarea.
|
|
57
|
+
this.computeRowHeights();
|
|
58
|
+
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
this.removeEventListener();
|
|
61
|
+
this.resizeObserver.disconnect();
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return (index.h(index.Host, null, index.h("textarea", { class: "hidden-text", ref: (el) => {
|
|
65
|
+
this.hiddenTextRef = el;
|
|
66
|
+
} }, this.textValue), index.h("slot", null)));
|
|
67
|
+
}
|
|
68
|
+
addEventListener() {
|
|
69
|
+
var _a, _b;
|
|
70
|
+
(_a = this.slottedElement) === null || _a === void 0 ? void 0 : _a.addEventListener('input', this.updateValue);
|
|
71
|
+
(_b = this.slottedElement) === null || _b === void 0 ? void 0 : _b.addEventListener('keydown', this.updatePreviousScrollTop);
|
|
72
|
+
}
|
|
73
|
+
removeEventListener() {
|
|
74
|
+
var _a, _b;
|
|
75
|
+
(_a = this.slottedElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('input', this.updateValue);
|
|
76
|
+
(_b = this.slottedElement) === null || _b === void 0 ? void 0 : _b.removeEventListener('keydown', this.updatePreviousScrollTop);
|
|
77
|
+
}
|
|
78
|
+
updateValue() {
|
|
79
|
+
if (this.slottedElement != null) {
|
|
80
|
+
this.textValue = this.slottedElement.value;
|
|
81
|
+
this.updateOverflow();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
updatePreviousScrollTop() {
|
|
85
|
+
if (this.slottedElement != null) {
|
|
86
|
+
this.previousScrollTop = this.slottedElement.scrollTop;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
updateScrollTop() {
|
|
90
|
+
if (this.slottedElement != null) {
|
|
91
|
+
// This prevents an issue where the slotted textarea auto-scrolls
|
|
92
|
+
// to a newline. This is desired behavior if we're capped at the
|
|
93
|
+
// max rows, but undesired if the component will continue to expand.
|
|
94
|
+
this.slottedElement.scrollTop =
|
|
95
|
+
this.maxRows == null || this.rowCount >= this.maxRows
|
|
96
|
+
? this.slottedElement.scrollTop
|
|
97
|
+
: this.previousScrollTop;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
computeRowHeights() {
|
|
101
|
+
this.updateScrollTop();
|
|
102
|
+
index.readTask(() => {
|
|
103
|
+
var _a;
|
|
104
|
+
if (typeof window !== 'undefined' &&
|
|
105
|
+
this.slottedElement != null &&
|
|
106
|
+
this.hiddenTextRef != null) {
|
|
107
|
+
const bounds = this.slottedElement.getBoundingClientRect();
|
|
108
|
+
const computedStyles = window.getComputedStyle(this.slottedElement);
|
|
109
|
+
const lineHeight = Math.floor(parseFloat(computedStyles.lineHeight));
|
|
110
|
+
const rowCount = Math.floor(this.hiddenTextRef.scrollHeight / lineHeight);
|
|
111
|
+
const colCount = Math.ceil(this.hiddenTextRef.scrollWidth / bounds.width);
|
|
112
|
+
const totalRows = Math.max(0, rowCount + colCount - 1);
|
|
113
|
+
this.rowCount = Math.max(this.minRows, Math.min((_a = this.maxRows) !== null && _a !== void 0 ? _a : totalRows, totalRows));
|
|
114
|
+
this.slottedElement.rows = this.rowCount;
|
|
115
|
+
this.updateOverflow();
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
prepareHiddenTextElement() {
|
|
120
|
+
index.readTask(() => {
|
|
121
|
+
if (typeof window !== 'undefined' &&
|
|
122
|
+
this.slottedElement != null &&
|
|
123
|
+
this.hiddenTextRef != null) {
|
|
124
|
+
const computedStyles = window.getComputedStyle(this.slottedElement);
|
|
125
|
+
this.hiddenTextRef.setAttribute('style', `line-height: ${computedStyles.lineHeight}; font-size: ${computedStyles.fontSize}; font-family: ${computedStyles.fontFamily}; padding-left: ${computedStyles.paddingLeft}; padding-right: ${computedStyles.paddingRight};`);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
getSlottedTextareaElement() {
|
|
130
|
+
const el = getFirstSlottedElement({
|
|
131
|
+
hostElement: this.hostElement,
|
|
132
|
+
selector: this.textareaSelector,
|
|
133
|
+
});
|
|
134
|
+
if (isTextareaElement(el)) {
|
|
135
|
+
return el;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
throw new Error('The vertex-auto-resize-textarea component is only compatible with `HTMLTextAreaElement`s');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
updateOverflow() {
|
|
142
|
+
var _a;
|
|
143
|
+
(_a = this.slottedElement) === null || _a === void 0 ? void 0 : _a.setAttribute('style', this.maxRows && this.rowCount >= this.maxRows
|
|
144
|
+
? 'overflow-y: auto;'
|
|
145
|
+
: 'overflow: hidden;');
|
|
146
|
+
}
|
|
147
|
+
get hostElement() { return index.getElement(this); }
|
|
148
|
+
};
|
|
149
|
+
AutoResizeTextArea.style = autoResizeTextareaCss;
|
|
150
|
+
|
|
151
|
+
exports.AutoResizeTextArea = AutoResizeTextArea;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
4
|
const index$1 = require('./index-b9715722.js');
|
|
5
5
|
|
|
6
6
|
const avatarCss = ".root{width:1.875rem;height:1.875rem;font-size:var(--vertex-ui-text-xs)}.small{width:1.5rem;height:1.5rem;font-size:var(--vertex-ui-text-t)}.avatar{border-radius:50%;font-weight:var(--vertex-ui-font-weight-medium);font-family:var(--vertex-ui-font-family);color:var(--vertex-ui-blue-800);border:solid 1px var(--vertex-ui-blue-800);background-color:var(--vertex-ui-neutral-050);display:flex;align-items:center;justify-content:center;user-select:none}.avatar.value{color:var(--vertex-ui-white);border:solid 1px var(--vertex-ui-white);background-color:var(--vertex-ui-neutral-500)}.avatar.active{cursor:pointer}.avatar.active:hover{background-color:var(--vertex-ui-neutral-200)}";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
const index$1 = require('./index-b9715722.js');
|
|
5
|
+
|
|
6
|
+
const buttonCss = "button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}a{text-decoration:none;font-family:var(--vertex-ui-font-family)}:host([type]){-webkit-appearance:none !important}.btn{display:flex;align-items:center;justify-content:center;border-radius:0.25rem;box-sizing:border-box;text-decoration:none;cursor:pointer}.btn-full{width:100%}.btn.disabled,.btn:not(.disabled):focus,.btn:not(.disabled):active{outline:none}.btn.disabled{cursor:not-allowed}.btn-sm{font-size:var(--vertex-ui-text-sm)}.btn-sm:not(.btn-plaintext){padding:0 0.25rem}.btn-md{font-size:var(--vertex-ui-text-base)}.btn-md:not(.btn-plaintext){padding:0.5rem 1rem}.btn-lg{font-size:var(--vertex-ui-text-lg)}.btn-lg:not(.btn-plaintext){padding:0.75rem 0.75rem}.btn-plaintext{color:var(--vertex-ui-neutral-800)}.btn-primary{color:white;background-color:var(--vertex-ui-blue-700)}.btn-primary:not(.disabled):hover{background-color:var(--vertex-ui-blue-500)}.btn-primary:not(.disabled):focus,.btn-primary:not(.disabled):active{background-color:var(--vertex-ui-blue-600)}.btn-primary:not(.disabled):focus{box-shadow:0 0 0 1px var(--vertex-ui-blue-900)}.btn-primary:not(.disabled):active{box-shadow:none}.btn-primary.disabled{background-color:var(--vertex-ui-blue-200);cursor:not-allowed}.btn-secondary{color:var(--vertex-ui-neutral-800);background-color:var(--vertex-ui-neutral-300)}.btn-secondary:not(.disabled):hover{box-shadow:0 2px 2px rgb(0 0 0 / 20%)}.btn-secondary:not(.disabled):focus,.btn-secondary:not(.disabled):active{background-color:var(--vertex-ui-neutral-400)}.btn-secondary:not(.disabled):focus{box-shadow:0 0 0 1px var(--vertex-ui-neutral-900)}.btn-secondary:not(.disabled):active{box-shadow:none}.btn-secondary.disabled{background-color:var(--vertex-ui-neutral-200);color:var(--vertex-ui-neutral-400)}.btn-danger{color:white;background-color:var(--vertex-ui-red-600)}.btn-danger:not(.disabled):hover{background-color:var(--vertex-ui-red-400)}.btn-danger:not(.disabled):focus{background-color:var(--vertex-ui-red-500);box-shadow:0 0 0 1px var(--vertex-ui-red-900)}.btn-danger:not(.disabled):active{background-color:var(--vertex-ui-red-600);box-shadow:none}.btn-danger.disabled{background-color:var(--vertex-ui-red-200);box-shadow:none}.btn-txt-primary{color:var(--vertex-ui-blue-600)}.btn-txt-primary:not(.disabled):hover{color:var(--vertex-ui-blue-800);background-color:var(--vertex-ui-blue-200)}.btn-txt-primary:not(.disabled):focus,.btn-txt-primary:not(.disabled):active{color:var(--vertex-ui-blue-800);background-color:var(--vertex-ui-blue-300)}.btn-txt-primary:not(.disabled):focus{box-shadow:0 0 0 1px var(--vertex-ui-blue-900)}.btn-txt-primary:not(.disabled):active{box-shadow:none}.btn-txt-primary.disabled{color:var(--vertex-ui-blue-300);box-shadow:none}.btn-txt-secondary{color:var(--vertex-ui-neutral-700)}.btn-txt-secondary:not(.disabled):hover,.btn-txt-secondary:not(.disabled):active,.btn-txt-secondary:not(.disabled):focus{color:var(--vertex-ui-neutral-800)}.btn-txt-secondary:not(.disabled):hover{background-color:var(--vertex-ui-neutral-200)}.btn-txt-secondary:not(.disabled):focus,.btn-txt-secondary:not(.disabled):active{background-color:var(--vertex-ui-neutral-300)}.btn-txt-secondary:not(.disabled):focus{box-shadow:0 0 0 1px var(--vertex-ui-neutral-900)}.btn-txt-secondary.disabled{color:var(--vertex-ui-neutral-300);box-shadow:none}.btn-txt-danger{color:var(--vertex-ui-red-600)}.btn-txt-danger:not(.disabled):focus,.btn-txt-danger:not(.disabled):active,.btn-txt-danger:not(.disabled):hover{color:var(--vertex-ui-red-800)}.btn-txt-danger:not(.disabled):hover{background-color:var(--vertex-ui-red-200)}.btn-txt-danger:not(.disabled):focus,.btn-txt-danger:not(.disabled):active{background-color:var(--vertex-ui-red-300)}.btn-txt-danger:not(.disabled):focus{box-shadow:0 0 0 1px var(--vertex-ui-red-900)}.btn-txt-danger:not(.disabled):active{box-shadow:none}.btn-txt-danger.disabled{color:var(--vertex-ui-red-300);box-shadow:none}";
|
|
7
|
+
|
|
8
|
+
const Button = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* The color of this <vertex-button>.
|
|
13
|
+
* Can be "primary", "secondary", or "danger" and defaults to "secondary".
|
|
14
|
+
*/
|
|
15
|
+
this.color = 'secondary';
|
|
16
|
+
/**
|
|
17
|
+
* The variant of this <vertex-button>.
|
|
18
|
+
* Can be "solid", "text", or "plaintext" and defaults to "solid".
|
|
19
|
+
*
|
|
20
|
+
* Setting this value to "plaintext" will cause the "color"
|
|
21
|
+
* property to be ignored.
|
|
22
|
+
*/
|
|
23
|
+
this.variant = 'solid';
|
|
24
|
+
/**
|
|
25
|
+
* The size of this <vertex-button>.
|
|
26
|
+
* Can be "sm", "md", or "lg" and defaults to "md".
|
|
27
|
+
*/
|
|
28
|
+
this.size = 'md';
|
|
29
|
+
/**
|
|
30
|
+
* The expansion behavior of this <vertex-button>.
|
|
31
|
+
* Can be set to "full" to cause the button to stretch to fill
|
|
32
|
+
* its container, or "block" to cause the button to be sized based
|
|
33
|
+
* on its contents.
|
|
34
|
+
* Defaults to "block".
|
|
35
|
+
*/
|
|
36
|
+
this.expand = 'block';
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
if (this.hostElement != null && this.type === 'submit') {
|
|
40
|
+
const form = this.hostElement.closest('form');
|
|
41
|
+
if (form != null) {
|
|
42
|
+
this.fakeButton = document.createElement('button');
|
|
43
|
+
this.fakeButton.setAttribute('type', this.type);
|
|
44
|
+
this.fakeButton.setAttribute('style', 'display: none');
|
|
45
|
+
this.fakeButton.setAttribute('data-testid', 'vertex-fake-button');
|
|
46
|
+
form.appendChild(this.fakeButton);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
if (this.hostElement != null && this.fakeButton != null) {
|
|
52
|
+
this.fakeButton.remove();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
const classes = index$1.classnames('btn', {
|
|
57
|
+
'btn-full': this.expand === 'full',
|
|
58
|
+
'btn-sm': this.size === 'sm',
|
|
59
|
+
'btn-md': this.size === 'md',
|
|
60
|
+
'btn-lg': this.size === 'lg',
|
|
61
|
+
'btn-primary': this.color === 'primary' && this.variant === 'solid',
|
|
62
|
+
'btn-secondary': this.color === 'secondary' && this.variant === 'solid',
|
|
63
|
+
'btn-danger': this.color === 'danger' && this.variant === 'solid',
|
|
64
|
+
'btn-txt-primary': this.color === 'primary' && this.variant === 'text',
|
|
65
|
+
'btn-txt-secondary': this.color === 'secondary' && this.variant === 'text',
|
|
66
|
+
'btn-txt-danger': this.color === 'danger' && this.variant === 'text',
|
|
67
|
+
'btn-plaintext': this.variant === 'plaintext',
|
|
68
|
+
disabled: this.disabled,
|
|
69
|
+
});
|
|
70
|
+
if (this.href != null && this.type != null) {
|
|
71
|
+
console.warn('The type attribute is ignored when href is provided');
|
|
72
|
+
}
|
|
73
|
+
return this.href != null && this.href !== '' ? (index.h("a", { href: this.href, target: this.target, class: classes, tabIndex: this.disabled ? -1 : 0 }, index.h("slot", null))) : (index.h("button", { class: classes, disabled: this.disabled, type: this.type, onClick: (event) => this.handleClick(event) }, index.h("slot", { name: "left" }), index.h("slot", null)));
|
|
74
|
+
}
|
|
75
|
+
handleClick(event) {
|
|
76
|
+
if (this.fakeButton != null) {
|
|
77
|
+
event.preventDefault();
|
|
78
|
+
this.fakeButton.click();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
get hostElement() { return index.getElement(this); }
|
|
82
|
+
};
|
|
83
|
+
Button.style = buttonCss;
|
|
84
|
+
|
|
85
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
|
|
5
|
+
const cardCss = ":host{width:100%;height:100%;display:flex;position:relative;--border:1px solid var(--vertex-ui-neutral-200)}.content{display:flex;flex-direction:column;width:100%;height:100%;font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-base);color:var(--vertex-ui-neutral-800);border:var(--border)}.header{display:flex;align-items:center;padding:0.5rem 0.5rem 0 0.5rem}.header-text{display:flex;flex-direction:column}.text{padding:0.75rem 0.5rem 0.75rem 1rem;color:var(--vertex-ui-neutral-700);white-space:pre-line}.avatar{padding-left:0.25rem;padding-right:0.75rem}.label slot::slotted(*){font-weight:var(--vertex-ui-font-weight-bold)}.timestamp slot::slotted(*){padding-top:0.125rem;font-size:var(--vertex-ui-text-sm);color:var(--vertex-ui-neutral-500)}.action{margin-left:auto;margin-bottom:auto}.actions *::slotted(*){display:flex;justify-content:flex-end;padding:0 0.5rem 0.5rem 0.5rem}";
|
|
6
|
+
|
|
7
|
+
const Card = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.contentClick = index.createEvent(this, "contentClick", 7);
|
|
11
|
+
/**
|
|
12
|
+
* The visual mode of this `Card`. Can be either
|
|
13
|
+
* `editing` or `display`, and defaults to `display`.
|
|
14
|
+
*
|
|
15
|
+
* Setting this to `editing` will stop propagation of
|
|
16
|
+
* clicks on on the default slotted elements to allow
|
|
17
|
+
* for clicking in an input.
|
|
18
|
+
*/
|
|
19
|
+
this.mode = 'display';
|
|
20
|
+
this.handleContentClick = (event) => {
|
|
21
|
+
this.contentClick.emit(event);
|
|
22
|
+
};
|
|
23
|
+
this.handleTextClick = (event) => {
|
|
24
|
+
if (this.mode === 'edit') {
|
|
25
|
+
event.stopImmediatePropagation();
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
this.contentClick.emit(event);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return (index.h(index.Host, null, index.h("div", { class: "content" }, index.h("div", { class: "header", onClick: this.handleContentClick }, index.h("div", { class: "avatar" }, index.h("slot", { name: "avatar" })), index.h("div", { class: "header-text" }, index.h("div", { class: "label" }, index.h("slot", { name: "label" })), index.h("div", { class: "timestamp" }, index.h("slot", { name: "timestamp" }))), index.h("div", { class: "action" }, index.h("slot", { name: "action" }))), index.h("div", { class: "text", onClick: this.handleTextClick }, index.h("slot", null)), index.h("div", { class: "actions" }, index.h("slot", { name: "actions" }))), index.h("slot", { name: "overlay" })));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
Card.style = cardCss;
|
|
37
|
+
|
|
38
|
+
exports.Card = Card;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
const index$1 = require('./index-b9715722.js');
|
|
5
|
+
|
|
6
|
+
const cardGroupCss = ":host{width:100%;height:100%;position:relative;display:inline-block;--selected-color:var(--vertex-ui-blue-700)}.root{position:relative}.root.selected,.root:hover{box-shadow:0 2px 4px rgba(0, 0, 0, 0.25)}.content{cursor:pointer}.selected::after{content:\" \";position:absolute;width:0.1875rem;height:100%;left:0;top:0;background-color:var(--selected-color)}.expand-target{font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-base);color:var(--vertex-ui-neutral-700);cursor:pointer}.expand-target slot::slotted(*){padding:0.5rem 0.5rem 0.5rem 0.75rem}.hidden{display:none}";
|
|
7
|
+
|
|
8
|
+
const CardGroup = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Whether this card should be displayed with a selected state.
|
|
13
|
+
*/
|
|
14
|
+
this.selected = false;
|
|
15
|
+
/**
|
|
16
|
+
* Whether this card's expandable content is expanded or not.
|
|
17
|
+
*/
|
|
18
|
+
this.expanded = false;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (index.h(index.Host, null, index.h("div", { class: index$1.classnames('root', {
|
|
22
|
+
selected: this.selected,
|
|
23
|
+
}) }, index.h("div", { class: "content" }, index.h("slot", { name: "primary" })), index.h("div", { class: index$1.classnames({
|
|
24
|
+
hidden: !this.selected,
|
|
25
|
+
}) }, index.h("slot", null), index.h("div", { "data-testid": "expanded-content-wrapper", class: index$1.classnames({
|
|
26
|
+
hidden: !this.expanded,
|
|
27
|
+
}) }, index.h("slot", { name: "expanded-content" })), index.h("div", { "data-testid": "expanded-target-wrapper", class: index$1.classnames({
|
|
28
|
+
hidden: this.expanded,
|
|
29
|
+
}) }, index.h("div", { class: "expand-target" }, index.h("slot", { name: "expand-target" })))), index.h("div", { class: "action" }, index.h("slot", { name: "action" }))), index.h("slot", { name: "overlay" })));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
CardGroup.style = cardGroupCss;
|
|
33
|
+
|
|
34
|
+
exports.CardGroup = CardGroup;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
const index$1 = require('./index-b9715722.js');
|
|
5
|
+
|
|
6
|
+
const chipCss = ".root{display:flex;align-items:center;width:fit-content;border-radius:16px;font-size:var(--vertex-ui-text-base);padding:0.5rem;padding-left:0.25rem;max-height:1rem}.filled{color:white}.chip-primary{color:white}.chip-secondary{color:var(--vertex-ui-neutral-800)}.filled.chip-secondary{color:var(--vertex-ui-neutral-800);background-color:var(--vertex-ui-neutral-300)}.filled.chip-primary{background-color:var(--vertex-ui-blue-700)}.outlined.chip-primary{border:1px solid var(--vertex-ui-blue-700);color:var(--vertex-ui-blue-700)}.outlined.chip-secondary{border:1px solid var(--vertex-ui-neutral-300);color:var(--vertex-ui-neutral-700)}.avatar{margin-right:0.25rem}";
|
|
7
|
+
|
|
8
|
+
const Chip = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* The variant of this <vertex-chip>.
|
|
13
|
+
* Can be "filled" or "outlined" and defaults to "filled".
|
|
14
|
+
*/
|
|
15
|
+
this.variant = 'filled';
|
|
16
|
+
/**
|
|
17
|
+
* The color of this <vertex-chip>.
|
|
18
|
+
* Can be "primary" or "secondary" and defaults to "secondary".
|
|
19
|
+
*/
|
|
20
|
+
this.color = 'secondary';
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (index.h("div", { class: index$1.classnames('root', {
|
|
24
|
+
filled: this.variant === 'filled',
|
|
25
|
+
outlined: this.variant === 'outlined',
|
|
26
|
+
'chip-primary': this.color === 'primary',
|
|
27
|
+
'chip-secondary': this.color === 'secondary',
|
|
28
|
+
}) }, index.h("div", { class: "avatar" }, index.h("slot", { name: "avatar" })), index.h("slot", null), index.h("slot", { name: "icon" })));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
Chip.style = chipCss;
|
|
32
|
+
|
|
33
|
+
exports.Chip = Chip;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
const index$1 = require('./index-b9715722.js');
|
|
5
|
+
|
|
6
|
+
const collapsibleCss = "button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{--hover-color:var(--vertex-ui-blue-700)}.collapsible-target{width:100%;display:flex;align-items:center;cursor:pointer;padding:0.75rem 0.25rem;outline:none}.collapsible-target:focus-visible{border-radius:0.25rem;box-shadow:0 0 0 1px var(--hover-color, var(--vertex-ui-blue-700))}.collapsible-target:focus-visible,.collapsible-target:hover{color:var(--hover-color, var(--vertex-ui-blue-700))}.collapsible-expand{display:flex;justify-content:center;align-items:center;transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms;margin-left:auto}.rotated{transform:rotateZ(90deg)}.collapsible-content{font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-base);box-sizing:border-box}";
|
|
7
|
+
|
|
8
|
+
const Collapsible = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Whether this collapsible is expanded.
|
|
13
|
+
*/
|
|
14
|
+
this.open = false;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (index.h("vertex-expandable", { controlled: true, expanded: this.open }, index.h("button", { slot: "header", "data-testid": "expand-click-target", class: "collapsible-target", onClick: () => this.setOpen(!this.open), onSubmit: () => this.setOpen(!this.open) }, this.label != null ? (index.h("span", null, this.label)) : (index.h("slot", { name: "label" })), index.h("div", { class: index$1.classnames('collapsible-expand', {
|
|
18
|
+
rotated: this.open,
|
|
19
|
+
}) }, index.h("slot", { name: "expand-icon" }, index.h("vertex-icon", { name: "caret-right" })))), index.h("div", { class: "collapsible-content-container" }, index.h("slot", null))));
|
|
20
|
+
}
|
|
21
|
+
setOpen(open) {
|
|
22
|
+
this.open = open;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
Collapsible.style = collapsibleCss;
|
|
26
|
+
|
|
27
|
+
exports.Collapsible = Collapsible;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
const index$1 = require('./index-b9715722.js');
|
|
4
5
|
|
|
5
|
-
const colorPickerCss = ":host{--selected-color-width:30px;--selected-color-height:30px}.color-picker{display:inline-flex;position:relative;background:var(--vertex-ui-neutral-200);border-radius:4px;cursor:pointer}.selected{height:var(--selected-color-height);width:var(--selected-color-width);box-sizing:content-box;border:1px solid var(--vertex-ui-neutral-300);border-radius:4px}.handle{display:flex;align-items:center;padding:0 3px}.input{position:absolute;height:0;width:100%;left:0;bottom:0;visibility:hidden}";
|
|
6
|
+
const colorPickerCss = ":host{--selected-color-width:30px;--selected-color-height:30px}.color-picker{display:inline-flex;position:relative;background:var(--vertex-ui-neutral-200);border-radius:4px;cursor:pointer}.color-picker.disabled{opacity:0.5;cursor:default}.selected{height:var(--selected-color-height);width:var(--selected-color-width);box-sizing:content-box;border:1px solid var(--vertex-ui-neutral-300);border-radius:4px}.handle{display:flex;align-items:center;padding:0 3px}.input{position:absolute;height:0;width:100%;left:0;bottom:0;visibility:hidden}";
|
|
6
7
|
|
|
7
8
|
const ColorPicker = class {
|
|
8
9
|
constructor(hostRef) {
|
|
9
10
|
index.registerInstance(this, hostRef);
|
|
10
11
|
this.valueInput = index.createEvent(this, "valueInput", 7);
|
|
11
12
|
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
13
|
+
/**
|
|
14
|
+
* Whether this color picker is disabled.
|
|
15
|
+
*/
|
|
16
|
+
this.disabled = false;
|
|
12
17
|
this.handleInput = (event) => {
|
|
13
18
|
const input = event.target;
|
|
14
19
|
this.value = input.value || '';
|
|
@@ -21,7 +26,7 @@ const ColorPicker = class {
|
|
|
21
26
|
this.valueInput.emit(this.value);
|
|
22
27
|
}
|
|
23
28
|
render() {
|
|
24
|
-
return (index.h(index.Host, null, index.h("label", { class:
|
|
29
|
+
return (index.h(index.Host, null, index.h("label", { class: index$1.classnames('color-picker', { disabled: this.disabled }) }, index.h("input", { type: "color", class: "input", "data-testid": "input", disabled: this.disabled, value: this.value, onInput: this.handleInput, onChange: this.handleChange }), index.h("div", { class: "selected", style: {
|
|
25
30
|
'background-color': this.value,
|
|
26
31
|
}, title: this.value }), index.h("div", { class: "handle" }, index.h("vertex-icon", { name: "chevron-down", size: "sm" })))));
|
|
27
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.5.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -65,5 +65,5 @@ const patchDynamicImport = (base, orgScriptElm) => {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
patchBrowser().then(options => {
|
|
68
|
-
return index.bootstrapLazy([["vertex-
|
|
68
|
+
return index.bootstrapLazy([["vertex-collapsible.cjs",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-click-to-edit-textfield.cjs",[[2,"vertex-click-to-edit-textfield",{"placeholder":[1],"disabled":[516],"value":[1032],"autoFocus":[4,"auto-focus"]}]]],["vertex-context-menu.cjs",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-draggable-popover.cjs",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu.cjs",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip.cjs",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar.cjs",[[6,"vertex-search-bar",{"variant":[1],"resultItems":[16],"triggerCharacters":[16],"triggerCharacter":[1,"trigger-character"],"breakCharacters":[16],"debounce":[2],"placement":[1],"cursorPosition":[32],"open":[32],"triggerKey":[32],"triggerRange":[32],"replaceTriggeredValue":[64],"getEditableContent":[64]}]]],["vertex-select.cjs",[[1,"vertex-select",{"value":[513],"placeholder":[513],"disabled":[516],"animated":[4],"open":[32],"position":[32],"displayValue":[32]}]]],["vertex-toast.cjs",[[1,"vertex-toast",{"content":[1],"placement":[1],"duration":[2],"animated":[4],"open":[4],"type":[1],"isOpen":[32]}]]],["vertex-color-picker.cjs",[[1,"vertex-color-picker",{"value":[1537],"disabled":[4]}]]],["vertex-dialog.cjs",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4]},[[4,"keydown","keyDownListener"]]]]],["vertex-toggle.cjs",[[1,"vertex-toggle",{"variant":[1],"disabled":[4],"checked":[1540]}]]],["vertex-tooltip.cjs",[[1,"vertex-tooltip",{"content":[1],"placement":[1],"delay":[2],"animated":[4],"open":[32]}]]],["vertex-avatar.cjs",[[1,"vertex-avatar",{"firstName":[1,"first-name"],"lastName":[1,"last-name"],"value":[1],"active":[4],"variant":[1]}]]],["vertex-avatar-group.cjs",[[1,"vertex-avatar-group"]]],["vertex-button.cjs",[[1,"vertex-button",{"type":[1],"color":[1],"variant":[1],"size":[1],"expand":[1],"href":[1],"target":[1],"disabled":[516]}]]],["vertex-card.cjs",[[1,"vertex-card",{"mode":[1]}]]],["vertex-card-group.cjs",[[1,"vertex-card-group",{"selected":[516],"expanded":[516]}]]],["vertex-chip.cjs",[[1,"vertex-chip",{"variant":[1],"color":[1]}]]],["vertex-logo-loading.cjs",[[1,"vertex-logo-loading"]]],["vertex-menu-divider.cjs",[[1,"vertex-menu-divider"]]],["vertex-menu-item.cjs",[[1,"vertex-menu-item",{"disabled":[516]}]]],["vertex-radio.cjs",[[2,"vertex-radio",{"disabled":[516],"value":[513],"label":[513],"name":[513],"checked":[516]}]]],["vertex-radio-group.cjs",[[1,"vertex-radio-group",{"name":[513],"value":[1537]}]]],["vertex-resizable.cjs",[[1,"vertex-resizable",{"horizontalDirection":[1,"horizontal-direction"],"verticalDirection":[1,"vertical-direction"],"initialHorizontalScale":[2,"initial-horizontal-scale"],"initialVerticalScale":[2,"initial-vertical-scale"],"initializeWithOffset":[4,"initialize-with-offset"],"parentSelector":[1,"parent-selector"],"verticalSiblingSelector":[1,"vertical-sibling-selector"],"horizontalSiblingSelector":[1,"horizontal-sibling-selector"],"contentSelector":[1,"content-selector"],"position":[1],"width":[32],"minWidth":[32],"maxWidth":[32],"height":[32],"minHeight":[32],"maxHeight":[32],"left":[32],"top":[32],"hoveredLocation":[32],"dragStartLocation":[32],"updateDimensions":[64]}]]],["vertex-slider.cjs",[[1,"vertex-slider",{"min":[2],"max":[2],"step":[8],"value":[1026],"disabled":[4]}]]],["vertex-spinner.cjs",[[1,"vertex-spinner",{"color":[1],"size":[1]}]]],["vertex-expandable.cjs",[[1,"vertex-expandable",{"expanded":[1540],"expanding":[1540],"collapsing":[1540],"controlled":[516],"expandType":[513,"expand-type"],"animated":[4],"contentScrollHeight":[32]}]]],["vertex-result-list.cjs",[[1,"vertex-result-list",{"items":[16],"itemsJson":[1,"items"],"viewportStartIndex":[1026,"viewport-start-index"],"viewportEndIndex":[1026,"viewport-end-index"],"resultHeight":[1026,"result-height"],"overScanCount":[2,"over-scan-count"],"placement":[1],"position":[1],"open":[4],"listHeight":[32],"parsedResults":[32],"scrollTop":[32],"lastStartIndex":[32],"lastFocusedIndex":[32],"stateMap":[32]}]]],["vertex-auto-resize-textarea.cjs",[[1,"vertex-auto-resize-textarea",{"textareaSelector":[1,"textarea-selector"],"minRows":[514,"min-rows"],"maxRows":[514,"max-rows"],"textValue":[32]}]]],["vertex-textfield.cjs",[[6,"vertex-textfield",{"type":[1],"name":[1],"variant":[1],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"placeholder":[1],"autoFocus":[4,"auto-focus"],"autoComplete":[1,"auto-complete"],"autoCorrect":[1,"auto-correct"],"value":[1032],"disabled":[516],"hasError":[4,"has-error"],"updateInput":[64],"blurInput":[64],"getInputValue":[64],"selectAll":[64]}]]],["vertex-menu.cjs",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"position":[1040]}]]],["vertex-icon-button.cjs",[[1,"vertex-icon-button",{"iconName":[1,"icon-name"],"disabled":[516],"variant":[1],"iconColor":[1,"icon-color"],"iconSize":[1,"icon-size"]}]]],["vertex-icon.cjs",[[1,"vertex-icon",{"name":[1],"size":[1]}]]],["vertex-popover.cjs",[[1,"vertex-popover",{"open":[1540],"placement":[1],"position":[1025],"backdrop":[4],"animated":[4],"anchorSelector":[1,"anchor-selector"],"boundarySelector":[1,"boundary-selector"],"resizeBehavior":[1,"resize-behavior"],"overflowBehavior":[16],"flipBehavior":[16]}]]]], options);
|
|
69
69
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
4
|
const index$1 = require('./index-b9715722.js');
|
|
5
5
|
|
|
6
6
|
const dialogCss = ":host{--min-width:21.875rem}.hidden>.dialog{opacity:0;width:0;height:0;visibility:hidden}.hidden{pointer-events:none;display:none}.close{margin-left:auto}.header{width:100%;display:flex;font-size:1.125rem;height:2rem;margin-bottom:1rem}.dialog-backdrop{position:fixed;z-index:var(--vertex-ui-dialog-layer);left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,0.4)}.dialog{background-color:var(--vertex-ui-white);position:absolute;align-items:center;color:var(--vertex-ui-neutral-800);font-family:var(--vertex-ui-font-family)}.overlay{top:50%;left:50%;transform:translate(-50%, -50%);border:1px solid var(--vertex-ui-neutral-300);border-radius:6px;min-width:var(--min-width);box-shadow:0 1px 2px rgba(0, 0, 0, 0.15)}.fullscreen{height:100vh;width:100vw}.contents{padding:1.5rem}.close:hover,.close:focus{color:black;text-decoration:none;cursor:pointer}.footer{display:flex}";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
const index$1 = require('./index-b9715722.js');
|
|
5
|
+
|
|
6
|
+
const draggablePopoverCss = "button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{position:fixed;top:0;left:0;white-space:nowrap;--background-color:var(--vertex-ui-white);--color:var(--vertex-ui-neutral-700);--font-family:var(--vertex-ui-font-family);--font-size:var(--vertex-ui-text-base);--drag-icon:all-scroll;--dragging-icon:all-scroll}.container{display:flex;column-gap:0.5rem;padding:0.8125rem 0.5625rem 1rem 0.625rem;background-color:var(--background-color);opacity:0.95;border-radius:0.5rem;box-shadow:0 0 5px rgba(0, 0, 0, 0.25);color:var(--color);font-family:var(--font-family);font-size:var(--font-size)}.container:not(.dragging) .icon{cursor:var(--drag-icon)}.container.dragging{cursor:var(--dragging-icon)}.container.dragging *{user-select:none}.icon-container{display:flex;flex-direction:column}.icon-button{display:flex;align-items:center}";
|
|
7
|
+
|
|
8
|
+
const DraggablePopover = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
this.anchorPosition = { x: 0, y: 0 };
|
|
12
|
+
this.lastPosition = { x: 0, y: 0 };
|
|
13
|
+
this.dragging = false;
|
|
14
|
+
this.handlePointerDown = (event) => {
|
|
15
|
+
this.updateAnchorPosition();
|
|
16
|
+
this.lastPosition = { x: event.clientX, y: event.clientY };
|
|
17
|
+
this.dragging = true;
|
|
18
|
+
window.addEventListener('pointermove', this.handlePointerMove);
|
|
19
|
+
window.addEventListener('pointerup', this.handlePointerUp);
|
|
20
|
+
};
|
|
21
|
+
this.handlePointerMove = (event) => {
|
|
22
|
+
const currentPosition = {
|
|
23
|
+
x: event.clientX,
|
|
24
|
+
y: event.clientY,
|
|
25
|
+
};
|
|
26
|
+
const deltaX = currentPosition.x - this.lastPosition.x;
|
|
27
|
+
const deltaY = currentPosition.y - this.lastPosition.y;
|
|
28
|
+
this.anchorPosition = {
|
|
29
|
+
x: this.anchorPosition.x + deltaX,
|
|
30
|
+
y: this.anchorPosition.y + deltaY,
|
|
31
|
+
};
|
|
32
|
+
this.lastPosition = currentPosition;
|
|
33
|
+
};
|
|
34
|
+
this.handlePointerUp = (event) => {
|
|
35
|
+
this.updateAnchorPosition();
|
|
36
|
+
this.lastPosition = this.anchorPosition;
|
|
37
|
+
this.dragging = false;
|
|
38
|
+
window.removeEventListener('pointermove', this.handlePointerMove);
|
|
39
|
+
window.removeEventListener('pointerup', this.handlePointerUp);
|
|
40
|
+
};
|
|
41
|
+
this.updateAnchorPosition = () => {
|
|
42
|
+
index.readTask(() => {
|
|
43
|
+
if (this.containerEl != null) {
|
|
44
|
+
const rect = this.containerEl.getBoundingClientRect();
|
|
45
|
+
this.anchorPosition = { x: rect.x, y: rect.y };
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
connectedCallback() {
|
|
51
|
+
this.updatePosition(this.position);
|
|
52
|
+
}
|
|
53
|
+
updatePosition(position) {
|
|
54
|
+
if (position != null) {
|
|
55
|
+
this.anchorPosition =
|
|
56
|
+
typeof position === 'object' ? position : JSON.parse(position);
|
|
57
|
+
this.lastPosition = this.anchorPosition;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
return (index.h("vertex-popover", { position: this.anchorPosition, boundarySelector: this.boundarySelector, backdrop: false, open: true, resizeBehavior: "fixed", overflowBehavior: {
|
|
62
|
+
options: {
|
|
63
|
+
altAxis: true,
|
|
64
|
+
tether: false,
|
|
65
|
+
padding: this.boundaryPadding,
|
|
66
|
+
},
|
|
67
|
+
}, flipBehavior: {
|
|
68
|
+
enabled: false,
|
|
69
|
+
options: {
|
|
70
|
+
flipVariations: false,
|
|
71
|
+
},
|
|
72
|
+
} }, index.h("div", { ref: (el) => {
|
|
73
|
+
this.containerEl = el;
|
|
74
|
+
}, class: index$1.classnames('container', {
|
|
75
|
+
dragging: this.dragging,
|
|
76
|
+
}) }, index.h("div", { class: "icon-container" }, index.h("div", { class: "icon", onPointerDown: this.handlePointerDown }, index.h("slot", { name: "drag-icon" }, index.h("vertex-icon", { size: "sm", name: "drag-indicator" })))), index.h("slot", null))));
|
|
77
|
+
}
|
|
78
|
+
static get watchers() { return {
|
|
79
|
+
"position": ["updatePosition"]
|
|
80
|
+
}; }
|
|
81
|
+
};
|
|
82
|
+
DraggablePopover.style = draggablePopoverCss;
|
|
83
|
+
|
|
84
|
+
exports.DraggablePopover = DraggablePopover;
|