@vertexvis/ui 0.1.4-canary.2 → 0.1.4-canary.4

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.
Files changed (70) hide show
  1. package/dist/cjs/{banner-b18f0d54.js → banner-5628c955.js} +1 -1
  2. package/dist/cjs/{color-circle-picker-d0403f1c.js → color-circle-picker-b0927289.js} +28 -19
  3. package/dist/cjs/{color-swatch-8aaf6c0b.js → color-swatch-6d98da5f.js} +1 -1
  4. package/dist/cjs/components.cjs.js +1 -1
  5. package/dist/cjs/{icon-ef8fd0d2.js → icon-116cb9ca.js} +1 -1
  6. package/dist/cjs/{icon-button-eac5b1d5.js → icon-button-4dd2dfa4.js} +1 -1
  7. package/dist/cjs/{icon-helper-f9127d1c.js → icon-helper-475a8443.js} +18 -0
  8. package/dist/cjs/index.cjs.js +6 -6
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/vertex-banner.cjs.entry.js +2 -2
  11. package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +1 -1
  12. package/dist/cjs/vertex-color-swatch.cjs.entry.js +1 -1
  13. package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
  14. package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
  15. package/dist/collection/components/color-circle-picker/color-circle-picker.css +2 -2
  16. package/dist/collection/components/color-circle-picker/color-circle-picker.js +102 -17
  17. package/dist/collection/components/color-swatch/color-swatch.css +4 -0
  18. package/dist/collection/components/icon/icon-helper.js +9 -0
  19. package/dist/collection/components/icon/icon.js +1 -1
  20. package/dist/collection/components/icon/icons/label-off.js +2 -0
  21. package/dist/collection/components/icon/icons/label.js +2 -0
  22. package/dist/collection/components/icon/icons/tag.js +2 -0
  23. package/dist/collection/components/icon-button/icon-button.js +1 -1
  24. package/dist/collection/components/tooltip/tooltip.js +1 -1
  25. package/dist/collection/types/icon.js +3 -0
  26. package/dist/components/color-swatch.js +1 -1
  27. package/dist/components/components.esm.js +1 -1
  28. package/dist/components/icon-helper.js +18 -0
  29. package/dist/components/index.esm.js +1 -1
  30. package/dist/components/{p-1d764f4f.js → p-1ee42db8.js} +1 -1
  31. package/dist/components/p-2930bcb0.entry.js +1 -0
  32. package/dist/components/p-2e95a400.entry.js +1 -0
  33. package/dist/components/{p-6168ca0a.js → p-5256b0a6.js} +1 -1
  34. package/dist/components/p-7e6ca4fb.entry.js +1 -0
  35. package/dist/components/p-90931a94.js +1 -0
  36. package/dist/components/p-92e6b1d3.entry.js +1 -0
  37. package/dist/components/{p-401ba354.js → p-ccbcd666.js} +1 -1
  38. package/dist/components/p-d85544e7.entry.js +1 -0
  39. package/dist/components/p-e3ea44b2.js +1 -0
  40. package/dist/components/{p-7cf1a62a.js → p-f9cb8f55.js} +1 -1
  41. package/dist/components/vertex-color-circle-picker.js +49 -22
  42. package/dist/esm/{banner-45dfaee9.js → banner-38690fc8.js} +1 -1
  43. package/dist/esm/{color-circle-picker-35ad3b3e.js → color-circle-picker-c4e92fea.js} +28 -19
  44. package/dist/esm/{color-swatch-0e62d13d.js → color-swatch-ab647632.js} +1 -1
  45. package/dist/esm/components.js +1 -1
  46. package/dist/esm/{icon-af0b8a00.js → icon-3aa6a6c3.js} +1 -1
  47. package/dist/esm/{icon-button-0ad79cd2.js → icon-button-d3d5e6b7.js} +1 -1
  48. package/dist/esm/{icon-helper-5521e072.js → icon-helper-514f627f.js} +18 -0
  49. package/dist/esm/index.js +6 -6
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/esm/vertex-banner.entry.js +2 -2
  52. package/dist/esm/vertex-color-circle-picker.entry.js +1 -1
  53. package/dist/esm/vertex-color-swatch.entry.js +1 -1
  54. package/dist/esm/vertex-icon-button.entry.js +2 -2
  55. package/dist/esm/vertex-icon.entry.js +2 -2
  56. package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +33 -1
  57. package/dist/types/components/icon/icons/label-off.d.ts +3 -0
  58. package/dist/types/components/icon/icons/label.d.ts +3 -0
  59. package/dist/types/components/icon/icons/tag.d.ts +3 -0
  60. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  61. package/dist/types/components.d.ts +28 -4
  62. package/dist/types/types/icon.d.ts +3 -0
  63. package/package.json +2 -2
  64. package/dist/components/p-4eace800.entry.js +0 -1
  65. package/dist/components/p-5c7f8967.entry.js +0 -1
  66. package/dist/components/p-79da1778.entry.js +0 -1
  67. package/dist/components/p-8bbc344d.entry.js +0 -1
  68. package/dist/components/p-b9dab446.js +0 -1
  69. package/dist/components/p-d2d75bcf.entry.js +0 -1
  70. package/dist/components/p-d539f530.js +0 -1
@@ -12,12 +12,12 @@ import { ButtonColor, ButtonExpand, ButtonSize, ButtonType, ButtonVariant } from
12
12
  import { CardMode } from "./components/card/card";
13
13
  import { ChipColor, ChipVariant } from "./components/chip/chip";
14
14
  import { InputChangeEventDetail, TextSize } from "./components/text-field/text-field";
15
- import { SelectionChangedDetails } from "./components/color-circle-picker/color-circle-picker";
15
+ import { Popover, PopoverPlacement } from "./components/popover/popover";
16
+ import { ColorPickerSizeSize, SelectionChangedDetails } from "./components/color-circle-picker/color-circle-picker";
16
17
  import { ColorSwatchSize } from "./components/color-swatch/color-swatch";
17
18
  import { ColorPickerExpand, ColorPickerVariant } from "./components/color-picker/color-picker";
18
19
  import { ColorSwatchSize as ColorSwatchSize1, ColorSwatchTheme, ColorSwatchVariant } from "./components/color-swatch/color-swatch";
19
20
  import { Point } from "./types/point";
20
- import { Popover, PopoverPlacement } from "./components/popover/popover";
21
21
  import { VertexExpandableType } from "./components/expandable/expandable";
22
22
  import { IconName, IconSize } from "./types/icon";
23
23
  import { IconButtonIconColor, IconButtonVariant } from "./components/icon-button/icon-button";
@@ -240,6 +240,14 @@ export namespace Components {
240
240
  * The orientation of this color picker. Can be either `vertical` or `horizontal`, and defaults to `horizontal`.
241
241
  */
242
242
  "direction": 'vertical' | 'horizontal';
243
+ /**
244
+ * The placement of the tooltip around the swatch elements. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'auto', 'auto-start', or 'auto-end', and defaults to 'bottom'. Note: placement will adjust based on the amount of available space, so tooltips close to screen edges may appear in a different location.
245
+ */
246
+ "labelPlacement": PopoverPlacement;
247
+ /**
248
+ * Optional labels that will be displayed as a tooltip on the underlying `vertex-color-swatch` elements for associated colors in the `colors` array.
249
+ */
250
+ "labels": Record<string, string> | string;
243
251
  /**
244
252
  * The percentage lighter color to use to compute the `lightened` color for the underlying `vertex-color-swatch`. This will be used when the `theme` is set to `light`.
245
253
  */
@@ -248,6 +256,10 @@ export namespace Components {
248
256
  * An optional selected color. This will also be updated internally by the component when individual `vertex-color-swatch` elements are clicked.
249
257
  */
250
258
  "selected"?: string;
259
+ /**
260
+ * The size of this color picker. Can be `sm`, `md`, or `lg`, and defaults to `lg`.
261
+ */
262
+ "size": ColorPickerSizeSize;
251
263
  /**
252
264
  * Optional supplemental colors that will be provided to the underlying `vertex-color-swatch` elements for associated indices in the `colors` array.
253
265
  */
@@ -866,7 +878,7 @@ export namespace Components {
866
878
  */
867
879
  "disabled"?: boolean;
868
880
  /**
869
- * The placement of the tooltip at the clicked point. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'auto', 'auto-start', or 'auto-end', and defaults to 'bottom'. Note: placement will adjust based on the amount of available space, so tooltips close to screen edges may appear in a different location.
881
+ * The placement of the tooltip around the slotted element. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'auto', 'auto-start', or 'auto-end', and defaults to 'bottom'. Note: placement will adjust based on the amount of available space, so tooltips close to screen edges may appear in a different location.
870
882
  */
871
883
  "placement": PopoverPlacement;
872
884
  }
@@ -1498,6 +1510,14 @@ declare namespace LocalJSX {
1498
1510
  * The orientation of this color picker. Can be either `vertical` or `horizontal`, and defaults to `horizontal`.
1499
1511
  */
1500
1512
  "direction"?: 'vertical' | 'horizontal';
1513
+ /**
1514
+ * The placement of the tooltip around the swatch elements. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'auto', 'auto-start', or 'auto-end', and defaults to 'bottom'. Note: placement will adjust based on the amount of available space, so tooltips close to screen edges may appear in a different location.
1515
+ */
1516
+ "labelPlacement"?: PopoverPlacement;
1517
+ /**
1518
+ * Optional labels that will be displayed as a tooltip on the underlying `vertex-color-swatch` elements for associated colors in the `colors` array.
1519
+ */
1520
+ "labels"?: Record<string, string> | string;
1501
1521
  /**
1502
1522
  * The percentage lighter color to use to compute the `lightened` color for the underlying `vertex-color-swatch`. This will be used when the `theme` is set to `light`.
1503
1523
  */
@@ -1507,6 +1527,10 @@ declare namespace LocalJSX {
1507
1527
  * An optional selected color. This will also be updated internally by the component when individual `vertex-color-swatch` elements are clicked.
1508
1528
  */
1509
1529
  "selected"?: string;
1530
+ /**
1531
+ * The size of this color picker. Can be `sm`, `md`, or `lg`, and defaults to `lg`.
1532
+ */
1533
+ "size"?: ColorPickerSizeSize;
1510
1534
  /**
1511
1535
  * Optional supplemental colors that will be provided to the underlying `vertex-color-swatch` elements for associated indices in the `colors` array.
1512
1536
  */
@@ -2245,7 +2269,7 @@ declare namespace LocalJSX {
2245
2269
  */
2246
2270
  "disabled"?: boolean;
2247
2271
  /**
2248
- * The placement of the tooltip at the clicked point. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'auto', 'auto-start', or 'auto-end', and defaults to 'bottom'. Note: placement will adjust based on the amount of available space, so tooltips close to screen edges may appear in a different location.
2272
+ * The placement of the tooltip around the slotted element. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'auto', 'auto-start', or 'auto-end', and defaults to 'bottom'. Note: placement will adjust based on the amount of available space, so tooltips close to screen edges may appear in a different location.
2249
2273
  */
2250
2274
  "placement"?: PopoverPlacement;
2251
2275
  }
@@ -74,6 +74,8 @@ export declare enum IconNames {
74
74
  'help' = "help",
75
75
  'info' = "info",
76
76
  'invert' = "invert",
77
+ 'label' = "label",
78
+ 'label-off' = "label-off",
77
79
  'line' = "line",
78
80
  'line-dot-left' = "line-dot-left",
79
81
  'line-dot-right' = "line-dot-right",
@@ -119,6 +121,7 @@ export declare enum IconNames {
119
121
  'snapshots' = "snapshots",
120
122
  'star' = "star",
121
123
  'square-dot-outline' = "square-dot-outline",
124
+ 'tag' = "tag",
122
125
  'tape-measure' = "tape-measure",
123
126
  'teleport-and-align' = "teleport-and-align",
124
127
  'teleport-toward' = "teleport-toward",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertexvis/ui",
3
- "version": "0.1.4-canary.2",
3
+ "version": "0.1.4-canary.4",
4
4
  "description": "The Vertex UI component library.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -87,5 +87,5 @@
87
87
  "@vertexvis/utils": "^0.23.2",
88
88
  "fast-deep-equal": "^3.1.3"
89
89
  },
90
- "gitHead": "062093a784993026f3b34f55f07e51d0a5563c5b"
90
+ "gitHead": "fdbaa970a03172d27c2d3551fe53ead86d2d41b9"
91
91
  }
@@ -1 +0,0 @@
1
- export{B as vertex_banner}from"./p-7cf1a62a.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-401ba354.js";
@@ -1 +0,0 @@
1
- export{I as vertex_icon_button}from"./p-6168ca0a.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-401ba354.js";
@@ -1 +0,0 @@
1
- export{I as vertex_icon}from"./p-1d764f4f.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-401ba354.js";
@@ -1 +0,0 @@
1
- export{C as vertex_color_swatch}from"./p-d539f530.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-3438c441.js";
@@ -1 +0,0 @@
1
- import{r as e,e as t,h as i,H as r}from"./p-6834631c.js";import{c as o}from"./p-fe062eb0.js";const l=class{constructor(i){e(this,i),this.selectionChanged=t(this,"selectionChanged",7),this.colorArray=[],this.supplementaryColorArray=[],this.handleClick=e=>{const t=e.target;this.selectionChanged.emit({color:t.color,lightened:t.lightened,darkened:t.darkened})},this.colors=["#4c87be","#f3d336","#6fbb29","#e38826","#c72e16","#8c3681","#000000","#ffffff"],this.supplementalColors=[],this.theme="dark",this.lightenPercentage=.25,this.darkenPercentage=.25,this.selected=void 0,this.direction="horizontal"}componentWillLoad(){this.handleColorsChange(this.colors),this.handleSupplementalColorsChange(this.supplementalColors)}handleColorsChange(e){this.colorArray="string"==typeof e?JSON.parse(e):e}handleSupplementalColorsChange(e){this.supplementaryColorArray="string"==typeof e?JSON.parse(e):e}render(){return i(r,null,i("div",{class:o("container",{vertical:"vertical"===this.direction})},this.colorArray.map(((e,t)=>i("vertex-color-swatch",{class:o("circle",{selected:this.selected===e}),variant:"circle",size:"lg",color:e,supplementalColor:this.supplementaryColorArray[t],onClick:this.handleClick,lightenPercentage:this.lightenPercentage,darkenPercentage:this.darkenPercentage,theme:this.theme})))))}static get watchers(){return{colors:["handleColorsChange"],supplementalColors:["handleSupplementalColorsChange"]}}};l.style=":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)}";export{l as C}
@@ -1 +0,0 @@
1
- export{C as vertex_color_circle_picker}from"./p-b9dab446.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
@@ -1 +0,0 @@
1
- import{r as t,h as r,H as e}from"./p-6834631c.js";import{c as s}from"./p-fe062eb0.js";import{i}from"./p-3438c441.js";const o=class{constructor(r){t(this,r),this.variant="circle",this.size="md",this.color="#ffffff",this.supplementalColor=void 0,this.theme="none",this.lightenPercentage=.25,this.darkenPercentage=.25,this.lightened=this.adjustColor(this.color,-this.lightenPercentage),this.darkened=this.adjustColor(this.color,this.darkenPercentage)}handleColorChanged(t){this.lightened=this.adjustColor(t,-this.lightenPercentage),this.darkened=this.adjustColor(t,this.darkenPercentage)}handleLightenPercentageChanged(t){this.lightened=this.adjustColor(this.color,-t)}handleDarkenPercentageChanged(t){this.darkened=this.adjustColor(this.color,t)}render(){return r(e,null,r("div",{class:s("root",this.variant,this.size),style:this.getThemeColors()},r("div",{class:"overlay"},r("slot",{name:"overlay"}))))}getThemeColors(){const t=this.getSupplementalColor();switch(this.theme){case"light":return{backgroundColor:t,borderColor:this.color};case"dark":return{backgroundColor:this.color,borderColor:t};default:return{backgroundColor:this.color,borderColor:null!=t?t:void 0}}}getSupplementalColor(){const t=null!=this.supplementalColor&&this.supplementalColor.length>0?this.supplementalColor:void 0;switch(this.theme){case"light":return null!=t?t:this.lightened;case"dark":return null!=t?t:this.darkened;default:return t}}adjustColor(t,r){if(i(t)){const e=Number(`0x${t.slice(1,3)}`),s=Number(`0x${t.slice(3,5)}`),i=Number(`0x${t.slice(5,7)}`);return`#${this.padHexComponent(this.adjustComponent(e,r).toString(16))}${this.padHexComponent(this.adjustComponent(s,r).toString(16))}${this.padHexComponent(this.adjustComponent(i,r).toString(16))}`}return t}adjustComponent(t,r){return Math.max(0,Math.min(255,Math.floor(t-Math.floor((r<0?255-t:255)*r))))}padHexComponent(t){return`${"0".repeat(2-t.length)}${t}`}static get watchers(){return{color:["handleColorChanged"],lightenPercentage:["handleLightenPercentageChanged"],darkenPercentage:["handleDarkenPercentageChanged"]}}};o.style=":host{display:flex}.root{position:relative;border-style:solid;border-color:var(--vertex-ui-neutral-300);box-sizing:border-box}.root.circle{border-width:2px;border-radius:100%}.root.square{border-width:1px;border-radius:3px}.root.sm{width:16px;height:16px}.root.md{width:20px;height:20px}.root.lg{width:24px;height:24px}.overlay{position:absolute;width:100%;height:100%;border-radius:2px;overflow:hidden}";export{o as C}