@vertexvis/ui 0.0.12-canary.9 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/{button-b72fb87a.js → button-a652f98b.js} +1 -1
- package/dist/cjs/color-circle-779577d6.js +104 -0
- package/dist/cjs/color-circle-picker-56ea92c0.js +108 -0
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{context-menu-56ac1c58.js → context-menu-a86e89ca.js} +7 -1
- package/dist/cjs/{draggable-popover-9713af9a.js → draggable-popover-14f7893a.js} +2 -6
- package/dist/cjs/{icon-button-3917b326.js → icon-button-62cb43cc.js} +1 -1
- package/dist/cjs/{icon-ba0a83f1.js → icon-c3f4d7ec.js} +1 -1
- package/dist/cjs/{icon-helper-147de3f5.js → icon-helper-55f7f888.js} +118 -0
- package/dist/cjs/index.cjs.js +16 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{menu-73db9525.js → menu-27013a38.js} +6 -2
- package/dist/cjs/{popover-eda673ce.js → popover-e8c564b3.js} +27 -7
- package/dist/cjs/{resizable-0c5917e2.js → resizable-94f71d71.js} +42 -1
- package/dist/cjs/{select-4b0361a7.js → select-bccc8f37.js} +7 -2
- package/dist/cjs/{toggle-e05cb29f.js → toggle-fc23c62a.js} +1 -1
- package/dist/cjs/{tooltip-ce04e29c.js → tooltip-66a2fb31.js} +2 -2
- package/dist/cjs/vertex-button.cjs.entry.js +1 -1
- package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +11 -0
- package/dist/cjs/vertex-color-circle.cjs.entry.js +10 -0
- package/dist/cjs/vertex-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/vertex-draggable-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
- package/dist/cjs/vertex-menu.cjs.entry.js +1 -1
- package/dist/cjs/vertex-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-resizable.cjs.entry.js +1 -1
- package/dist/cjs/vertex-select.cjs.entry.js +1 -1
- package/dist/cjs/vertex-toggle.cjs.entry.js +1 -1
- package/dist/cjs/vertex-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/button/button.css +0 -8
- package/dist/collection/components/color-circle/color-circle.css +18 -0
- package/dist/collection/components/color-circle/color-circle.js +237 -0
- package/dist/collection/components/color-circle-picker/color-circle-picker.css +51 -0
- package/dist/collection/components/color-circle-picker/color-circle-picker.js +258 -0
- package/dist/collection/components/context-menu/context-menu.js +8 -2
- package/dist/collection/components/draggable-popover/draggable-popover.js +3 -7
- package/dist/collection/components/icon/icon-helper.js +67 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icons/annotation.js +4 -0
- package/dist/collection/components/icon/icons/box-select.js +5 -0
- package/dist/collection/components/icon/icons/check-circle.js +4 -0
- package/dist/collection/components/icon/icons/close-circle.js +4 -0
- package/dist/collection/components/icon/icons/cube-orthographic.js +4 -0
- package/dist/collection/components/icon/icons/cube-perspective.js +4 -0
- package/dist/collection/components/icon/icons/export.js +4 -0
- package/dist/collection/components/icon/icons/folder-plus.js +4 -0
- package/dist/collection/components/icon/icons/invert.js +7 -0
- package/dist/collection/components/icon/icons/locate.js +4 -0
- package/dist/collection/components/icon/icons/notification.js +4 -0
- package/dist/collection/components/icon/icons/person-run.js +4 -0
- package/dist/collection/components/icon/icons/person-walk.js +4 -0
- package/dist/collection/components/icon/icons/pin-text-fill.js +4 -0
- package/dist/collection/components/icon/icons/pin-text.js +6 -0
- package/dist/collection/components/icon/icons/plus.js +4 -0
- package/dist/collection/components/icon/icons/rabbit.js +4 -0
- package/dist/collection/components/icon/icons/show-only-nearby.js +4 -0
- package/dist/collection/components/icon/icons/tape-measure.js +6 -0
- package/dist/collection/components/icon/icons/teleport-and-align.js +4 -0
- package/dist/collection/components/icon/icons/teleport.js +4 -0
- package/dist/collection/components/icon/icons/turtle.js +4 -0
- package/dist/collection/components/icon/names.js +23 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/index.js +3 -1
- package/dist/collection/components/menu/menu.css +3 -1
- package/dist/collection/components/menu/menu.js +26 -2
- package/dist/collection/components/popover/popover.js +76 -9
- package/dist/collection/components/resizable/resizable.css +5 -0
- package/dist/collection/components/resizable/resizable.js +98 -2
- package/dist/collection/components/select/select.js +34 -3
- package/dist/collection/components/toggle/toggle.css +12 -2
- package/dist/collection/components/tooltip/tooltip.css +5 -0
- package/dist/collection/components/tooltip/tooltip.js +20 -3
- package/dist/components/components.esm.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/{p-66a9e5ec.js → p-07058d48.js} +1 -1
- package/dist/components/p-1eedd7b3.entry.js +1 -0
- package/dist/components/{p-25b4f716.js → p-235c7330.js} +1 -1
- package/dist/components/p-24c72fc4.js +1 -0
- package/dist/components/p-28b10817.entry.js +1 -0
- package/dist/components/{p-3d6790be.js → p-3687b96f.js} +1 -1
- package/dist/components/p-593b134f.js +1 -0
- package/dist/components/p-7a87f7e9.js +1 -0
- package/dist/components/p-83c0458a.js +1 -0
- package/dist/components/p-8a8d22b1.js +1 -0
- package/dist/components/{p-0b617e72.js → p-8baa92e7.js} +1 -1
- package/dist/components/p-8c7e3cc6.entry.js +1 -0
- package/dist/components/p-8fdbd04b.js +1 -0
- package/dist/components/p-9bc86d34.entry.js +1 -0
- package/dist/components/p-a3dc1ece.entry.js +1 -0
- package/dist/components/p-a9970b81.js +1 -0
- package/dist/components/p-ac5fd5a1.js +1 -0
- package/dist/components/p-ad174b79.entry.js +1 -0
- package/dist/components/p-b89a0e4d.js +1 -0
- package/dist/components/p-bb805628.entry.js +1 -0
- package/dist/components/p-c44cdec7.entry.js +1 -0
- package/dist/components/p-cd34d5e9.entry.js +1 -0
- package/dist/components/p-ce7c334d.js +1 -0
- package/dist/components/p-d193a28e.entry.js +1 -0
- package/dist/components/p-d2a13733.entry.js +1 -0
- package/dist/components/p-f6682d27.entry.js +1 -0
- package/dist/components/p-fd673f6c.entry.js +1 -0
- package/dist/esm/{button-f249c963.js → button-5b943b11.js} +1 -1
- package/dist/esm/color-circle-9601bf83.js +102 -0
- package/dist/esm/color-circle-picker-13ffab09.js +106 -0
- package/dist/esm/components.js +1 -1
- package/dist/esm/{context-menu-52516069.js → context-menu-dd2d1fc5.js} +7 -1
- package/dist/esm/{draggable-popover-17967afd.js → draggable-popover-781f6fa8.js} +2 -6
- package/dist/esm/{icon-c50c2c51.js → icon-7105fc34.js} +1 -1
- package/dist/esm/{icon-button-66a2ca61.js → icon-button-c74a3174.js} +1 -1
- package/dist/esm/{icon-helper-17cdde1f.js → icon-helper-7cb7650d.js} +118 -0
- package/dist/esm/index.js +14 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{menu-6855f8db.js → menu-487c058a.js} +6 -2
- package/dist/esm/{popover-cd7e83b0.js → popover-7413e50e.js} +27 -7
- package/dist/esm/{resizable-48183d8e.js → resizable-5757d4c1.js} +43 -2
- package/dist/esm/{select-b7a7ad40.js → select-99596f5e.js} +7 -2
- package/dist/esm/{toggle-f4628c27.js → toggle-eca94cbe.js} +1 -1
- package/dist/esm/{tooltip-ca3d98e9.js → tooltip-8f514110.js} +2 -2
- package/dist/esm/vertex-button.entry.js +1 -1
- package/dist/esm/vertex-color-circle-picker.entry.js +3 -0
- package/dist/esm/vertex-color-circle.entry.js +2 -0
- package/dist/esm/vertex-context-menu.entry.js +1 -1
- package/dist/esm/vertex-draggable-popover.entry.js +1 -1
- package/dist/esm/vertex-icon-button.entry.js +2 -2
- package/dist/esm/vertex-icon.entry.js +2 -2
- package/dist/esm/vertex-menu.entry.js +1 -1
- package/dist/esm/vertex-popover.entry.js +1 -1
- package/dist/esm/vertex-resizable.entry.js +1 -1
- package/dist/esm/vertex-select.entry.js +1 -1
- package/dist/esm/vertex-toggle.entry.js +1 -1
- package/dist/esm/vertex-tooltip.entry.js +1 -1
- package/dist/types/components/color-circle/color-circle.d.ts +57 -0
- package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +64 -0
- package/dist/types/components/icon/icons/annotation.d.ts +3 -0
- package/dist/types/components/icon/icons/box-select.d.ts +3 -0
- package/dist/types/components/icon/icons/check-circle.d.ts +3 -0
- package/dist/types/components/icon/icons/close-circle.d.ts +3 -0
- package/dist/types/components/icon/icons/cube-orthographic.d.ts +3 -0
- package/dist/types/components/icon/icons/cube-perspective.d.ts +3 -0
- package/dist/types/components/icon/icons/export.d.ts +3 -0
- package/dist/types/components/icon/icons/folder-plus.d.ts +3 -0
- package/dist/types/components/icon/icons/invert.d.ts +3 -0
- package/dist/types/components/icon/icons/locate.d.ts +3 -0
- package/dist/types/components/icon/icons/notification.d.ts +3 -0
- package/dist/types/components/icon/icons/person-run.d.ts +3 -0
- package/dist/types/components/icon/icons/person-walk.d.ts +3 -0
- package/dist/types/components/icon/icons/pin-text-fill.d.ts +3 -0
- package/dist/types/components/icon/icons/pin-text.d.ts +3 -0
- package/dist/types/components/icon/icons/plus.d.ts +3 -0
- package/dist/types/components/icon/icons/rabbit.d.ts +3 -0
- package/dist/types/components/icon/icons/show-only-nearby.d.ts +3 -0
- package/dist/types/components/icon/icons/tape-measure.d.ts +3 -0
- package/dist/types/components/icon/icons/teleport-and-align.d.ts +3 -0
- package/dist/types/components/icon/icons/teleport.d.ts +3 -0
- package/dist/types/components/icon/icons/turtle.d.ts +3 -0
- package/dist/types/components/icon/names.d.ts +22 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/menu/menu.d.ts +7 -0
- package/dist/types/components/popover/popover.d.ts +11 -0
- package/dist/types/components/resizable/resizable.d.ts +30 -1
- package/dist/types/components/select/select.d.ts +5 -1
- package/dist/types/components/tooltip/tooltip.d.ts +4 -0
- package/dist/types/components.d.ts +187 -1
- package/package.json +4 -3
- package/dist/components/p-02bab18a.entry.js +0 -1
- package/dist/components/p-12d965f7.entry.js +0 -1
- package/dist/components/p-12dc204a.entry.js +0 -1
- package/dist/components/p-20e5bf44.js +0 -1
- package/dist/components/p-49c069f1.entry.js +0 -1
- package/dist/components/p-4bc47a80.entry.js +0 -1
- package/dist/components/p-59974f6e.entry.js +0 -1
- package/dist/components/p-8afd622c.js +0 -1
- package/dist/components/p-8b91e49c.js +0 -1
- package/dist/components/p-9330f080.entry.js +0 -1
- package/dist/components/p-9bbfb471.js +0 -1
- package/dist/components/p-a2d3910f.entry.js +0 -1
- package/dist/components/p-a506dec9.js +0 -1
- package/dist/components/p-a95d5826.entry.js +0 -1
- package/dist/components/p-af89dbc7.js +0 -1
- package/dist/components/p-ccd8b856.js +0 -1
- package/dist/components/p-cdedbf6f.entry.js +0 -1
- package/dist/components/p-cf1c6515.entry.js +0 -1
- package/dist/components/p-e34161e3.js +0 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-4281b6d5.js');
|
|
4
4
|
const index$1 = require('./index-b9715722.js');
|
|
5
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}:host([disabled=\"\"]){pointer-events:none}.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)
|
|
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}:host([disabled=\"\"]){pointer-events:none}.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);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
7
|
|
|
8
8
|
const Button = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
|
|
5
|
+
const colorCircleCss = ":host{display:flex;--circle-size:24px}.root{border-radius:100%;border-width:2px;border-style:solid;width:var(--circle-size);height:var(--circle-size);box-sizing:border-box}";
|
|
6
|
+
|
|
7
|
+
const ColorCircle = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
/**
|
|
11
|
+
* The primary color of this `vertex-color-circle`.
|
|
12
|
+
* For `dark` theme, this will be the background-color.
|
|
13
|
+
* For `light` theme, this will be the border-color.
|
|
14
|
+
*/
|
|
15
|
+
this.color = '#ffffff';
|
|
16
|
+
/**
|
|
17
|
+
* The theme to use for this `vertex-color-circle`.
|
|
18
|
+
* Can be either `light` or `dark`, and defaults to `dark`.
|
|
19
|
+
*
|
|
20
|
+
* With the `dark` theme, the provided `color` will be used
|
|
21
|
+
* as the background-color, and the `darkened` color will be
|
|
22
|
+
* used for the border-color.
|
|
23
|
+
*
|
|
24
|
+
* With the `light` theme, the provided `color` will be used
|
|
25
|
+
* as the border-color, and the `lightened` color will be used
|
|
26
|
+
* for the background-color.
|
|
27
|
+
*/
|
|
28
|
+
this.theme = 'dark';
|
|
29
|
+
/**
|
|
30
|
+
* The percentage lighter color to use to compute the `lightened`
|
|
31
|
+
* color. This will be used when the `theme` is set to `light`.
|
|
32
|
+
*/
|
|
33
|
+
this.lightenPercentage = 0.25;
|
|
34
|
+
/**
|
|
35
|
+
* The percentage darker color to use to compute the `darkened`
|
|
36
|
+
* color. This will be used when the `theme` is set to `dark`.
|
|
37
|
+
*/
|
|
38
|
+
this.darkenPercentage = 0.25;
|
|
39
|
+
/**
|
|
40
|
+
* The computed lighter color based on the provided `color` and
|
|
41
|
+
* `lightenPercentage`. This will be used when the `theme` is
|
|
42
|
+
* set to `light`.
|
|
43
|
+
*/
|
|
44
|
+
this.lightened = this.adjustColor(this.color, -this.lightenPercentage);
|
|
45
|
+
/**
|
|
46
|
+
* The computed darker color based on the provided `color` and
|
|
47
|
+
* `darkenPercentage`. This will be used when the `theme` is
|
|
48
|
+
* set to `dark`.
|
|
49
|
+
*/
|
|
50
|
+
this.darkened = this.adjustColor(this.color, this.darkenPercentage);
|
|
51
|
+
}
|
|
52
|
+
handleColorChanged(newColor) {
|
|
53
|
+
this.lightened = this.adjustColor(newColor, -this.lightenPercentage);
|
|
54
|
+
this.darkened = this.adjustColor(newColor, this.darkenPercentage);
|
|
55
|
+
}
|
|
56
|
+
handleLightenPercentageChanged(newPercentage) {
|
|
57
|
+
this.lightened = this.adjustColor(this.color, -newPercentage);
|
|
58
|
+
}
|
|
59
|
+
handleDarkenPercentageChanged(newPercentage) {
|
|
60
|
+
this.darkened = this.adjustColor(this.color, newPercentage);
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
const themeColor = this.theme === 'dark' ? this.darkened : this.lightened;
|
|
64
|
+
const supplementalColor = this.supplementalColor != null && this.supplementalColor.length > 0
|
|
65
|
+
? this.supplementalColor
|
|
66
|
+
: themeColor;
|
|
67
|
+
return (index.h(index.Host, null, index.h("div", { class: "root", style: this.theme === 'dark'
|
|
68
|
+
? {
|
|
69
|
+
backgroundColor: this.color,
|
|
70
|
+
borderColor: supplementalColor,
|
|
71
|
+
}
|
|
72
|
+
: {
|
|
73
|
+
backgroundColor: supplementalColor,
|
|
74
|
+
borderColor: this.color,
|
|
75
|
+
} })));
|
|
76
|
+
}
|
|
77
|
+
adjustColor(color, percentage) {
|
|
78
|
+
if (color.startsWith('#') && color.length === 7) {
|
|
79
|
+
const r = Number(`0x${color.slice(1, 3)}`);
|
|
80
|
+
const g = Number(`0x${color.slice(3, 5)}`);
|
|
81
|
+
const b = Number(`0x${color.slice(5, 7)}`);
|
|
82
|
+
const rPadded = this.padHexComponent(this.adjustComponent(r, percentage).toString(16));
|
|
83
|
+
const gPadded = this.padHexComponent(this.adjustComponent(g, percentage).toString(16));
|
|
84
|
+
const bPadded = this.padHexComponent(this.adjustComponent(b, percentage).toString(16));
|
|
85
|
+
return `#${rPadded}${gPadded}${bPadded}`;
|
|
86
|
+
}
|
|
87
|
+
return color;
|
|
88
|
+
}
|
|
89
|
+
adjustComponent(component, percentage) {
|
|
90
|
+
const scalar = percentage < 0 ? 0xff - component : 0xff;
|
|
91
|
+
return Math.max(0x00, Math.min(0xff, Math.floor(component - Math.floor(scalar * percentage))));
|
|
92
|
+
}
|
|
93
|
+
padHexComponent(hex) {
|
|
94
|
+
return `${'0'.repeat(2 - hex.length)}${hex}`;
|
|
95
|
+
}
|
|
96
|
+
static get watchers() { return {
|
|
97
|
+
"color": ["handleColorChanged"],
|
|
98
|
+
"lightenPercentage": ["handleLightenPercentageChanged"],
|
|
99
|
+
"darkenPercentage": ["handleDarkenPercentageChanged"]
|
|
100
|
+
}; }
|
|
101
|
+
};
|
|
102
|
+
ColorCircle.style = colorCircleCss;
|
|
103
|
+
|
|
104
|
+
exports.ColorCircle = ColorCircle;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4281b6d5.js');
|
|
4
|
+
const index$1 = require('./index-b9715722.js');
|
|
5
|
+
|
|
6
|
+
const colorCirclePickerCss = ":host{display:flex;--color-circle-spacing:1rem;--color-circle-hovered-outline:2px solid var(--vertex-ui-neutral-700);--color-circle-selected-outline:var(--color-circle-hovered-outline)}.container{display:flex;gap:var(--color-circle-spacing)}.container.vertical{flex-direction:column;justify-content:center}.container.horizontal{align-items:center}.circle{cursor:pointer;outline-offset:3px;border-radius:100%}.circle.selected{outline:var(--color-circle-selected-outline)}.circle:hover{outline:var(--color-circle-hovered-outline)}";
|
|
7
|
+
|
|
8
|
+
const ColorCirclePicker = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
this.selectionChanged = index.createEvent(this, "selectionChanged", 7);
|
|
12
|
+
/**
|
|
13
|
+
* The colors to show in this `vertex-color-circle-picker`.
|
|
14
|
+
* These values will map to the `color` property of the underlying
|
|
15
|
+
* `vertex-color-circle`.
|
|
16
|
+
*/
|
|
17
|
+
this.colors = [
|
|
18
|
+
'#4c87be',
|
|
19
|
+
'#f3d336',
|
|
20
|
+
'#6fbb29',
|
|
21
|
+
'#e38826',
|
|
22
|
+
'#c72e16',
|
|
23
|
+
'#8c3681',
|
|
24
|
+
'#000000',
|
|
25
|
+
'#ffffff',
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* Optional supplemental colors that will be provided to the
|
|
29
|
+
* underlying `vertex-color-circle` elements for associated
|
|
30
|
+
* indices in the `colors` array.
|
|
31
|
+
*/
|
|
32
|
+
this.supplementalColors = [];
|
|
33
|
+
/**
|
|
34
|
+
* The theme to use for this `vertex-color-circle-picker`.
|
|
35
|
+
* Can be either `light` or `dark`, and defaults to `dark`.
|
|
36
|
+
*
|
|
37
|
+
* With the `dark` theme, the provided `colors` will be used
|
|
38
|
+
* as the background-colors for `vertex-color-circle` elements,
|
|
39
|
+
* and a `darkened` color will be used for the border-colors.
|
|
40
|
+
*
|
|
41
|
+
* With the `light` theme, the provided `colors` will be used
|
|
42
|
+
* as the background-colors for `vertex-color-circle` elements,
|
|
43
|
+
* and a `lightened` color will be used for the border-colors.
|
|
44
|
+
*/
|
|
45
|
+
this.theme = 'dark';
|
|
46
|
+
/**
|
|
47
|
+
* The percentage lighter color to use to compute the `lightened`
|
|
48
|
+
* color for the underlying `vertex-color-circle`. This will be
|
|
49
|
+
* used when the `theme` is set to `light`.
|
|
50
|
+
*/
|
|
51
|
+
this.lightenPercentage = 0.25;
|
|
52
|
+
/**
|
|
53
|
+
* The percentage darker color to use to compute the `darkened`
|
|
54
|
+
* color for the underlying `vertex-color-circle`. This will be
|
|
55
|
+
* used when the `theme` is set to `dark`.
|
|
56
|
+
*/
|
|
57
|
+
this.darkenPercentage = 0.25;
|
|
58
|
+
/**
|
|
59
|
+
* The orientation of this color picker. Can be either `vertical`
|
|
60
|
+
* or `horizontal`, and defaults to `horizontal`.
|
|
61
|
+
*/
|
|
62
|
+
this.direction = 'horizontal';
|
|
63
|
+
this.colorArray = [];
|
|
64
|
+
this.supplementaryColorArray = [];
|
|
65
|
+
this.handleClick = (event) => {
|
|
66
|
+
const circle = event.target;
|
|
67
|
+
this.selectionChanged.emit({
|
|
68
|
+
color: circle.color,
|
|
69
|
+
lightened: circle.lightened,
|
|
70
|
+
darkened: circle.darkened,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
componentWillLoad() {
|
|
75
|
+
this.handleColorsChange(this.colors);
|
|
76
|
+
this.handleSupplementalColorsChange(this.supplementalColors);
|
|
77
|
+
}
|
|
78
|
+
handleColorsChange(newValue) {
|
|
79
|
+
if (typeof newValue === 'string') {
|
|
80
|
+
this.colorArray = JSON.parse(newValue);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
this.colorArray = newValue;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
handleSupplementalColorsChange(newValue) {
|
|
87
|
+
if (typeof newValue === 'string') {
|
|
88
|
+
this.supplementaryColorArray = JSON.parse(newValue);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
this.supplementaryColorArray = newValue;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
return (index.h(index.Host, null, index.h("div", { class: index$1.classnames('container', {
|
|
96
|
+
vertical: this.direction === 'vertical',
|
|
97
|
+
}) }, this.colorArray.map((c, i) => (index.h("vertex-color-circle", { class: index$1.classnames('circle', {
|
|
98
|
+
selected: this.selected === c,
|
|
99
|
+
}), color: c, supplementalColor: this.supplementaryColorArray[i], onClick: this.handleClick, lightenPercentage: this.lightenPercentage, darkenPercentage: this.darkenPercentage, theme: this.theme }))))));
|
|
100
|
+
}
|
|
101
|
+
static get watchers() { return {
|
|
102
|
+
"colors": ["handleColorsChange"],
|
|
103
|
+
"supplementalColors": ["handleSupplementalColorsChange"]
|
|
104
|
+
}; }
|
|
105
|
+
};
|
|
106
|
+
ColorCirclePicker.style = colorCirclePickerCss;
|
|
107
|
+
|
|
108
|
+
exports.ColorCirclePicker = ColorCirclePicker;
|
|
@@ -65,5 +65,5 @@ const patchDynamicImport = (base, orgScriptElm) => {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
patchBrowser().then(options => {
|
|
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],"placeholder":[1],"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);
|
|
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],"placeholder":[1],"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],"resizeObserverFactory":[16],"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-circle-picker.cjs",[[1,"vertex-color-circle-picker",{"colors":[1],"supplementalColors":[1,"supplemental-colors"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"selected":[1537],"direction":[1]}]]],["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],"disabled":[4],"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],"dimensionsComputed":[1540,"dimensions-computed"],"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-color-circle.cjs",[[1,"vertex-color-circle",{"color":[513],"supplementalColor":[513,"supplemental-color"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"lightened":[1537],"darkened":[1537]}]]],["vertex-menu.cjs",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"fallbackPlacements":[16],"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],"updateOnResize":[4,"update-on-resize"],"contentResizeObserverFactory":[16],"popperRendered":[32]}]]]], options);
|
|
69
69
|
});
|
|
@@ -42,7 +42,13 @@ const ContextMenu = class {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (index.h("vertex-menu", { open: this.open, animated: this.animated, position: this.position,
|
|
45
|
+
return (index.h("vertex-menu", { open: this.open, animated: this.animated, position: this.position, fallbackPlacements: [
|
|
46
|
+
'bottom-end',
|
|
47
|
+
'top-start',
|
|
48
|
+
'top-end',
|
|
49
|
+
'right',
|
|
50
|
+
'left',
|
|
51
|
+
], onMenuClosed: this.handleMenuClosed }, index.h("slot", null)));
|
|
46
52
|
}
|
|
47
53
|
addEventListeners(targetSelector) {
|
|
48
54
|
this.target =
|
|
@@ -58,7 +58,7 @@ const DraggablePopover = class {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
render() {
|
|
61
|
-
return (index.h("vertex-popover", { position: this.anchorPosition, boundarySelector: this.boundarySelector, backdrop: false, open: true, resizeBehavior: "fixed", overflowBehavior: {
|
|
61
|
+
return (index.h("vertex-popover", { position: this.anchorPosition, boundarySelector: this.boundarySelector, backdrop: false, open: true, resizeBehavior: "fixed", updateOnResize: !this.dragging, overflowBehavior: {
|
|
62
62
|
options: {
|
|
63
63
|
altAxis: true,
|
|
64
64
|
tether: false,
|
|
@@ -69,11 +69,7 @@ const DraggablePopover = class {
|
|
|
69
69
|
options: {
|
|
70
70
|
flipVariations: false,
|
|
71
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))));
|
|
72
|
+
} }, index.h("div", { ref: (el) => (this.containerEl = el), class: index$1.classnames('container', { dragging: this.dragging }) }, 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
73
|
}
|
|
78
74
|
static get watchers() { return {
|
|
79
75
|
"position": ["updatePosition"]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-4281b6d5.js');
|
|
4
|
-
const iconHelper = require('./icon-helper-
|
|
4
|
+
const iconHelper = require('./icon-helper-55f7f888.js');
|
|
5
5
|
const index$1 = require('./index-b9715722.js');
|
|
6
6
|
|
|
7
7
|
const iconButtonCss = "button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{--hover-background-color:var(--vertex-ui-neutral-300);--active-background-color:var(--vertex-ui-neutral-400);--focus-background-color:var(--vertex-ui-neutral-400);--hover-box-shadow:0 2px 2px rgb(0 0 0 / 20%);--active-box-shadow:none;--focus-box-shadow:0 0 0 1px var(--vertex-ui-neutral-900)}.container{display:flex;justify-content:center;align-items:center;outline:none;fill:currentColor;color:currentColor;cursor:pointer}.container:not(.plain){border-radius:4px;padding:0.25rem}.icon-button{display:flex;justify-content:center;align-items:center;fill:currentColor;height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.icon-button svg{width:100%;height:100%}.floating{background-color:var(--vertex-ui-neutral-100);box-shadow:var(--vertex-ui-overlay-shadow);color:var(--vertex-ui-neutral-700);fill:var(--vertex-ui-neutral-700);opacity:0.95}.floating.disabled{color:var(--vertex-ui-neutral-400);cursor:not-allowed}.container:not(.disabled):not(.plain):hover{background-color:var(--hover-background-color);box-shadow:var(--hover-box-shadow)}.container:not(.disabled):not(.plain):active{background-color:var(--active-background-color);box-shadow:var(--active-box-shadow)}.container:not(.disabled):not(.plain):focus-visible{background-color:var(--focus-background-color);box-shadow:var(--focus-box-shadow);color:var(--vertex-ui-neutral-900)}.container.disabled:not(.floating){cursor:not-allowed;color:var(--vertex-ui-neutral-400)}.container.primary:not(.disabled){color:var(--vertex-ui-blue-700)}.container.secondary:not(.disabled){color:var(--vertex-ui-neutral-800)}.xs{height:var(--icon-size, 0.75rem);width:var(--icon-size, 0.75rem)}.sm{height:var(--icon-size, 1rem);width:var(--icon-size, 1rem)}.md{height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.lg{height:var(--icon-size, 2rem);width:var(--icon-size, 2rem)}";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-4281b6d5.js');
|
|
4
4
|
const index$1 = require('./index-b9715722.js');
|
|
5
|
-
const iconHelper = require('./icon-helper-
|
|
5
|
+
const iconHelper = require('./icon-helper-55f7f888.js');
|
|
6
6
|
|
|
7
7
|
const iconCss = ".container{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.icon{display:flex;justify-content:center;align-items:center;fill:currentColor}.xs{height:var(--icon-size, 0.75rem);width:var(--icon-size, 0.75rem)}.sm{height:var(--icon-size, 1rem);width:var(--icon-size, 1rem)}.md{height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.lg{height:var(--icon-size, 2rem);width:var(--icon-size, 2rem)}svg{position:relative;width:100%}";
|
|
8
8
|
|