@vertexvis/ui 0.1.0-canary.19 → 0.1.0-canary.20

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 (55) hide show
  1. package/dist/cjs/{color-circle-picker-13396ec4.js → color-circle-picker-a8f9a80a.js} +1 -1
  2. package/dist/cjs/color-picker-2a4820fa.js +46 -0
  3. package/dist/cjs/{color-circle-05be54bf.js → color-swatch-8aaf6c0b.js} +42 -17
  4. package/dist/cjs/components.cjs.js +1 -1
  5. package/dist/cjs/index.cjs.js +5 -4
  6. package/dist/cjs/lib-1bd1e383.js +9 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/vertex-color-picker.cjs.entry.js +2 -1
  10. package/dist/cjs/vertex-color-swatch.cjs.entry.js +12 -0
  11. package/dist/collection/collection-manifest.json +2 -2
  12. package/dist/collection/components/color-circle-picker/color-circle-picker.js +7 -7
  13. package/dist/collection/components/color-picker/color-picker.css +95 -15
  14. package/dist/collection/components/color-picker/color-picker.js +57 -3
  15. package/dist/collection/components/color-swatch/color-swatch.css +43 -0
  16. package/dist/collection/components/{color-circle/color-circle.js → color-swatch/color-swatch.js} +96 -23
  17. package/dist/collection/components/color-swatch/lib.js +5 -0
  18. package/dist/collection/components/index.js +1 -1
  19. package/dist/components/components.css +1 -1
  20. package/dist/components/components.esm.js +1 -1
  21. package/dist/components/index.esm.js +1 -1
  22. package/dist/components/{p-9374ef6c.js → p-1367d3af.js} +1 -1
  23. package/dist/components/p-2b4aedaa.entry.js +1 -0
  24. package/dist/components/p-3438c441.js +1 -0
  25. package/dist/components/p-655053df.js +1 -0
  26. package/dist/components/p-8bbc344d.entry.js +1 -0
  27. package/dist/components/p-a0eac69c.entry.js +1 -0
  28. package/dist/components/p-d539f530.js +1 -0
  29. package/dist/esm/{color-circle-picker-998a7e9c.js → color-circle-picker-e2a2cfb5.js} +1 -1
  30. package/dist/esm/color-picker-1d67effe.js +44 -0
  31. package/dist/esm/{color-circle-842f3321.js → color-swatch-0e62d13d.js} +42 -17
  32. package/dist/esm/components.js +1 -1
  33. package/dist/esm/index.js +4 -3
  34. package/dist/esm/lib-73fbca8b.js +7 -0
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/esm/vertex-color-circle-picker.entry.js +1 -1
  37. package/dist/esm/vertex-color-picker.entry.js +2 -1
  38. package/dist/esm/vertex-color-swatch.entry.js +4 -0
  39. package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +7 -7
  40. package/dist/types/components/color-picker/color-picker.d.ts +19 -0
  41. package/dist/types/components/{color-circle/color-circle.d.ts → color-swatch/color-swatch.d.ts} +23 -5
  42. package/dist/types/components/color-swatch/lib.d.ts +1 -0
  43. package/dist/types/components/index.d.ts +1 -1
  44. package/dist/types/components.d.ts +111 -76
  45. package/package.json +2 -2
  46. package/dist/cjs/color-picker-876ace00.js +0 -37
  47. package/dist/cjs/vertex-color-circle.cjs.entry.js +0 -10
  48. package/dist/collection/components/color-circle/color-circle.css +0 -18
  49. package/dist/components/p-20a74d5d.entry.js +0 -1
  50. package/dist/components/p-35e7ab78.entry.js +0 -1
  51. package/dist/components/p-7f64b251.entry.js +0 -1
  52. package/dist/components/p-8434602f.js +0 -1
  53. package/dist/components/p-d9b9aebe.js +0 -1
  54. package/dist/esm/color-picker-2e3b51fa.js +0 -35
  55. package/dist/esm/vertex-color-circle.entry.js +0 -2
@@ -12,6 +12,9 @@ import { CardMode } from "./components/card/card";
12
12
  import { ChipColor, ChipVariant } from "./components/chip/chip";
13
13
  import { InputChangeEventDetail, TextSize } from "./components/text-field/text-field";
14
14
  import { SelectionChangedDetails } from "./components/color-circle-picker/color-circle-picker";
15
+ import { ColorSwatchSize } from "./components/color-swatch/color-swatch";
16
+ import { ColorPickerVariant } from "./components/color-picker/color-picker";
17
+ import { ColorSwatchSize as ColorSwatchSize1, ColorSwatchTheme, ColorSwatchVariant } from "./components/color-swatch/color-swatch";
15
18
  import { Point } from "./types/point";
16
19
  import { Popover, PopoverPlacement } from "./components/popover/popover";
17
20
  import { VertexExpandableType } from "./components/expandable/expandable";
@@ -197,75 +200,91 @@ export namespace Components {
197
200
  */
198
201
  "open": boolean;
199
202
  }
200
- interface VertexColorCircle {
203
+ interface VertexColorCirclePicker {
201
204
  /**
202
- * The primary color of this `vertex-color-circle`. For `dark` theme, this will be the background-color. For `light` theme, this will be the border-color.
205
+ * The colors to show in this `vertex-color-circle-picker`. These values will map to the `color` property of the underlying `vertex-color-swatch`.
203
206
  */
204
- "color": string;
207
+ "colors": string[] | string;
205
208
  /**
206
- * The percentage darker color to use to compute the `darkened` color. This will be used when the `theme` is set to `dark`.
209
+ * The percentage darker color to use to compute the `darkened` color for the underlying `vertex-color-swatch`. This will be used when the `theme` is set to `dark`.
207
210
  */
208
211
  "darkenPercentage": number;
209
212
  /**
210
- * The computed darker color based on the provided `color` and `darkenPercentage`. This will be used when the `theme` is set to `dark`.
213
+ * The orientation of this color picker. Can be either `vertical` or `horizontal`, and defaults to `horizontal`.
211
214
  */
212
- "darkened": string;
215
+ "direction": 'vertical' | 'horizontal';
213
216
  /**
214
- * The percentage lighter color to use to compute the `lightened` color. This will be used when the `theme` is set to `light`.
217
+ * 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`.
215
218
  */
216
219
  "lightenPercentage": number;
217
220
  /**
218
- * The computed lighter color based on the provided `color` and `lightenPercentage`. This will be used when the `theme` is set to `light`.
221
+ * An optional selected color. This will also be updated internally by the component when individual `vertex-color-swatch` elements are clicked.
219
222
  */
220
- "lightened": string;
223
+ "selected"?: string;
221
224
  /**
222
- * An optional supplemental color to be paired with the `color`. For `dark` theme, this will be the border-color. For `light` theme, this will be the background-color.
225
+ * Optional supplemental colors that will be provided to the underlying `vertex-color-swatch` elements for associated indices in the `colors` array.
223
226
  */
224
- "supplementalColor"?: string;
227
+ "supplementalColors": string[] | string;
225
228
  /**
226
- * The theme to use for this `vertex-color-circle`. Can be either `light` or `dark`, and defaults to `dark`. With the `dark` theme, the provided `color` will be used as the background-color, and the `darkened` color will be used for the border-color. With the `light` theme, the provided `color` will be used as the border-color, and the `lightened` color will be used for the background-color.
229
+ * The theme to use for this `vertex-color-circle-picker`. Can be either `light` or `dark`, and defaults to `dark`. With the `dark` theme, the provided `colors` will be used as the background-colors for `vertex-color-swatch` elements, and a `darkened` color will be used for the border-colors. With the `light` theme, the provided `colors` will be used as the background-colors for `vertex-color-swatch` elements, and a `lightened` color will be used for the border-colors.
227
230
  */
228
231
  "theme": 'light' | 'dark';
229
232
  }
230
- interface VertexColorCirclePicker {
233
+ interface VertexColorPicker {
231
234
  /**
232
- * The colors to show in this `vertex-color-circle-picker`. These values will map to the `color` property of the underlying `vertex-color-circle`.
235
+ * Whether this color picker is disabled.
233
236
  */
234
- "colors": string[] | string;
237
+ "disabled": boolean;
238
+ /**
239
+ * The size of the swatch displayed for this color picker. Can be `sm`, `md`, `lg`, or `xl`, and defaults to `md`. If the `variant` is `full`, this value will also increase the size of the associated hexadecimal value.
240
+ */
241
+ "size": ColorSwatchSize;
242
+ /**
243
+ * Optional value property to set the initial value of this input.
244
+ */
245
+ "value"?: string;
246
+ /**
247
+ * The variant of this color picker. Can be `full` or `swatch`, and defaults to `full`. `full` will display both the visual color swatch and the hexadecimal representation of the color. `swatch` will display only the visual color swatch.
248
+ */
249
+ "variant": ColorPickerVariant;
250
+ }
251
+ interface VertexColorSwatch {
235
252
  /**
236
- * The percentage darker color to use to compute the `darkened` color for the underlying `vertex-color-circle`. This will be used when the `theme` is set to `dark`.
253
+ * The primary color of this `vertex-color-swatch` in hexadecimal format. For `dark` theme, this will be the background-color. For `light` theme, this will be the border-color.
254
+ */
255
+ "color": string;
256
+ /**
257
+ * The percentage darker color to use to compute the `darkened` color. This will be used when the `theme` is set to `dark`.
237
258
  */
238
259
  "darkenPercentage": number;
239
260
  /**
240
- * The orientation of this color picker. Can be either `vertical` or `horizontal`, and defaults to `horizontal`.
261
+ * The computed darker color based on the provided `color` and `darkenPercentage`. This will be used when the `theme` is set to `dark`.
241
262
  */
242
- "direction": 'vertical' | 'horizontal';
263
+ "darkened": string;
243
264
  /**
244
- * The percentage lighter color to use to compute the `lightened` color for the underlying `vertex-color-circle`. This will be used when the `theme` is set to `light`.
265
+ * The percentage lighter color to use to compute the `lightened` color. This will be used when the `theme` is set to `light`.
245
266
  */
246
267
  "lightenPercentage": number;
247
268
  /**
248
- * An optional selected color. This will also be updated internally by the component when individual `vertex-color-circle` elements are clicked.
269
+ * The computed lighter color based on the provided `color` and `lightenPercentage`. This will be used when the `theme` is set to `light`.
249
270
  */
250
- "selected"?: string;
271
+ "lightened": string;
251
272
  /**
252
- * Optional supplemental colors that will be provided to the underlying `vertex-color-circle` elements for associated indices in the `colors` array.
273
+ * The size of this color swatch. Can be `sm`, `md`, or `lg`, and defaults to `md`.
253
274
  */
254
- "supplementalColors": string[] | string;
275
+ "size": ColorSwatchSize;
255
276
  /**
256
- * The theme to use for this `vertex-color-circle-picker`. Can be either `light` or `dark`, and defaults to `dark`. With the `dark` theme, the provided `colors` will be used as the background-colors for `vertex-color-circle` elements, and a `darkened` color will be used for the border-colors. With the `light` theme, the provided `colors` will be used as the background-colors for `vertex-color-circle` elements, and a `lightened` color will be used for the border-colors.
277
+ * An optional supplemental color to be paired with the `color`. For `dark` theme, this will be the border-color. For `light` theme, this will be the background-color.
257
278
  */
258
- "theme": 'light' | 'dark';
259
- }
260
- interface VertexColorPicker {
279
+ "supplementalColor"?: string;
261
280
  /**
262
- * Whether this color picker is disabled.
281
+ * The theme to use for this `vertex-color-swatch`. Can be `none`, `light`, or `dark`, and defaults to `none`. With no theme (`none`), the provided `color` will be used as the background-color, and the border will be a neutral color. With the `dark` theme, the provided `color` will be used as the background-color, and the `darkened` color will be used for the border-color. With the `light` theme, the provided `color` will be used as the border-color, and the `lightened` color will be used for the background-color.
263
282
  */
264
- "disabled": boolean;
283
+ "theme": ColorSwatchTheme;
265
284
  /**
266
- * Optional value property to set the initial value of this input.
285
+ * The variant of this color swatch. Can be either `circle` or `square`, and defaults to `circle`.
267
286
  */
268
- "value"?: string;
287
+ "variant": ColorSwatchVariant;
269
288
  }
270
289
  interface VertexContextMenu {
271
290
  /**
@@ -974,12 +993,6 @@ declare global {
974
993
  prototype: HTMLVertexCollapsibleElement;
975
994
  new (): HTMLVertexCollapsibleElement;
976
995
  };
977
- interface HTMLVertexColorCircleElement extends Components.VertexColorCircle, HTMLStencilElement {
978
- }
979
- var HTMLVertexColorCircleElement: {
980
- prototype: HTMLVertexColorCircleElement;
981
- new (): HTMLVertexColorCircleElement;
982
- };
983
996
  interface HTMLVertexColorCirclePickerElement extends Components.VertexColorCirclePicker, HTMLStencilElement {
984
997
  }
985
998
  var HTMLVertexColorCirclePickerElement: {
@@ -992,6 +1005,12 @@ declare global {
992
1005
  prototype: HTMLVertexColorPickerElement;
993
1006
  new (): HTMLVertexColorPickerElement;
994
1007
  };
1008
+ interface HTMLVertexColorSwatchElement extends Components.VertexColorSwatch, HTMLStencilElement {
1009
+ }
1010
+ var HTMLVertexColorSwatchElement: {
1011
+ prototype: HTMLVertexColorSwatchElement;
1012
+ new (): HTMLVertexColorSwatchElement;
1013
+ };
995
1014
  interface HTMLVertexContextMenuElement extends Components.VertexContextMenu, HTMLStencilElement {
996
1015
  }
997
1016
  var HTMLVertexContextMenuElement: {
@@ -1165,9 +1184,9 @@ declare global {
1165
1184
  "vertex-chip": HTMLVertexChipElement;
1166
1185
  "vertex-click-to-edit-textfield": HTMLVertexClickToEditTextfieldElement;
1167
1186
  "vertex-collapsible": HTMLVertexCollapsibleElement;
1168
- "vertex-color-circle": HTMLVertexColorCircleElement;
1169
1187
  "vertex-color-circle-picker": HTMLVertexColorCirclePickerElement;
1170
1188
  "vertex-color-picker": HTMLVertexColorPickerElement;
1189
+ "vertex-color-swatch": HTMLVertexColorSwatchElement;
1171
1190
  "vertex-context-menu": HTMLVertexContextMenuElement;
1172
1191
  "vertex-dialog": HTMLVertexDialogElement;
1173
1192
  "vertex-draggable-popover": HTMLVertexDraggablePopoverElement;
@@ -1390,43 +1409,13 @@ declare namespace LocalJSX {
1390
1409
  */
1391
1410
  "open"?: boolean;
1392
1411
  }
1393
- interface VertexColorCircle {
1394
- /**
1395
- * The primary color of this `vertex-color-circle`. For `dark` theme, this will be the background-color. For `light` theme, this will be the border-color.
1396
- */
1397
- "color"?: string;
1398
- /**
1399
- * The percentage darker color to use to compute the `darkened` color. This will be used when the `theme` is set to `dark`.
1400
- */
1401
- "darkenPercentage"?: number;
1402
- /**
1403
- * The computed darker color based on the provided `color` and `darkenPercentage`. This will be used when the `theme` is set to `dark`.
1404
- */
1405
- "darkened"?: string;
1406
- /**
1407
- * The percentage lighter color to use to compute the `lightened` color. This will be used when the `theme` is set to `light`.
1408
- */
1409
- "lightenPercentage"?: number;
1410
- /**
1411
- * The computed lighter color based on the provided `color` and `lightenPercentage`. This will be used when the `theme` is set to `light`.
1412
- */
1413
- "lightened"?: string;
1414
- /**
1415
- * An optional supplemental color to be paired with the `color`. For `dark` theme, this will be the border-color. For `light` theme, this will be the background-color.
1416
- */
1417
- "supplementalColor"?: string;
1418
- /**
1419
- * The theme to use for this `vertex-color-circle`. Can be either `light` or `dark`, and defaults to `dark`. With the `dark` theme, the provided `color` will be used as the background-color, and the `darkened` color will be used for the border-color. With the `light` theme, the provided `color` will be used as the border-color, and the `lightened` color will be used for the background-color.
1420
- */
1421
- "theme"?: 'light' | 'dark';
1422
- }
1423
1412
  interface VertexColorCirclePicker {
1424
1413
  /**
1425
- * The colors to show in this `vertex-color-circle-picker`. These values will map to the `color` property of the underlying `vertex-color-circle`.
1414
+ * The colors to show in this `vertex-color-circle-picker`. These values will map to the `color` property of the underlying `vertex-color-swatch`.
1426
1415
  */
1427
1416
  "colors"?: string[] | string;
1428
1417
  /**
1429
- * The percentage darker color to use to compute the `darkened` color for the underlying `vertex-color-circle`. This will be used when the `theme` is set to `dark`.
1418
+ * The percentage darker color to use to compute the `darkened` color for the underlying `vertex-color-swatch`. This will be used when the `theme` is set to `dark`.
1430
1419
  */
1431
1420
  "darkenPercentage"?: number;
1432
1421
  /**
@@ -1434,20 +1423,20 @@ declare namespace LocalJSX {
1434
1423
  */
1435
1424
  "direction"?: 'vertical' | 'horizontal';
1436
1425
  /**
1437
- * The percentage lighter color to use to compute the `lightened` color for the underlying `vertex-color-circle`. This will be used when the `theme` is set to `light`.
1426
+ * 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`.
1438
1427
  */
1439
1428
  "lightenPercentage"?: number;
1440
1429
  "onSelectionChanged"?: (event: VertexColorCirclePickerCustomEvent<SelectionChangedDetails>) => void;
1441
1430
  /**
1442
- * An optional selected color. This will also be updated internally by the component when individual `vertex-color-circle` elements are clicked.
1431
+ * An optional selected color. This will also be updated internally by the component when individual `vertex-color-swatch` elements are clicked.
1443
1432
  */
1444
1433
  "selected"?: string;
1445
1434
  /**
1446
- * Optional supplemental colors that will be provided to the underlying `vertex-color-circle` elements for associated indices in the `colors` array.
1435
+ * Optional supplemental colors that will be provided to the underlying `vertex-color-swatch` elements for associated indices in the `colors` array.
1447
1436
  */
1448
1437
  "supplementalColors"?: string[] | string;
1449
1438
  /**
1450
- * The theme to use for this `vertex-color-circle-picker`. Can be either `light` or `dark`, and defaults to `dark`. With the `dark` theme, the provided `colors` will be used as the background-colors for `vertex-color-circle` elements, and a `darkened` color will be used for the border-colors. With the `light` theme, the provided `colors` will be used as the background-colors for `vertex-color-circle` elements, and a `lightened` color will be used for the border-colors.
1439
+ * The theme to use for this `vertex-color-circle-picker`. Can be either `light` or `dark`, and defaults to `dark`. With the `dark` theme, the provided `colors` will be used as the background-colors for `vertex-color-swatch` elements, and a `darkened` color will be used for the border-colors. With the `light` theme, the provided `colors` will be used as the background-colors for `vertex-color-swatch` elements, and a `lightened` color will be used for the border-colors.
1451
1440
  */
1452
1441
  "theme"?: 'light' | 'dark';
1453
1442
  }
@@ -1464,10 +1453,56 @@ declare namespace LocalJSX {
1464
1453
  * Emitted when a new value is input.
1465
1454
  */
1466
1455
  "onValueInput"?: (event: VertexColorPickerCustomEvent<string>) => void;
1456
+ /**
1457
+ * The size of the swatch displayed for this color picker. Can be `sm`, `md`, `lg`, or `xl`, and defaults to `md`. If the `variant` is `full`, this value will also increase the size of the associated hexadecimal value.
1458
+ */
1459
+ "size"?: ColorSwatchSize;
1467
1460
  /**
1468
1461
  * Optional value property to set the initial value of this input.
1469
1462
  */
1470
1463
  "value"?: string;
1464
+ /**
1465
+ * The variant of this color picker. Can be `full` or `swatch`, and defaults to `full`. `full` will display both the visual color swatch and the hexadecimal representation of the color. `swatch` will display only the visual color swatch.
1466
+ */
1467
+ "variant"?: ColorPickerVariant;
1468
+ }
1469
+ interface VertexColorSwatch {
1470
+ /**
1471
+ * The primary color of this `vertex-color-swatch` in hexadecimal format. For `dark` theme, this will be the background-color. For `light` theme, this will be the border-color.
1472
+ */
1473
+ "color"?: string;
1474
+ /**
1475
+ * The percentage darker color to use to compute the `darkened` color. This will be used when the `theme` is set to `dark`.
1476
+ */
1477
+ "darkenPercentage"?: number;
1478
+ /**
1479
+ * The computed darker color based on the provided `color` and `darkenPercentage`. This will be used when the `theme` is set to `dark`.
1480
+ */
1481
+ "darkened"?: string;
1482
+ /**
1483
+ * The percentage lighter color to use to compute the `lightened` color. This will be used when the `theme` is set to `light`.
1484
+ */
1485
+ "lightenPercentage"?: number;
1486
+ /**
1487
+ * The computed lighter color based on the provided `color` and `lightenPercentage`. This will be used when the `theme` is set to `light`.
1488
+ */
1489
+ "lightened"?: string;
1490
+ /**
1491
+ * The size of this color swatch. Can be `sm`, `md`, or `lg`, and defaults to `md`.
1492
+ */
1493
+ "size"?: ColorSwatchSize;
1494
+ /**
1495
+ * An optional supplemental color to be paired with the `color`. For `dark` theme, this will be the border-color. For `light` theme, this will be the background-color.
1496
+ */
1497
+ "supplementalColor"?: string;
1498
+ /**
1499
+ * The theme to use for this `vertex-color-swatch`. Can be `none`, `light`, or `dark`, and defaults to `none`. With no theme (`none`), the provided `color` will be used as the background-color, and the border will be a neutral color. With the `dark` theme, the provided `color` will be used as the background-color, and the `darkened` color will be used for the border-color. With the `light` theme, the provided `color` will be used as the border-color, and the `lightened` color will be used for the background-color.
1500
+ */
1501
+ "theme"?: ColorSwatchTheme;
1502
+ /**
1503
+ * The variant of this color swatch. Can be either `circle` or `square`, and defaults to `circle`.
1504
+ */
1505
+ "variant"?: ColorSwatchVariant;
1471
1506
  }
1472
1507
  interface VertexContextMenu {
1473
1508
  /**
@@ -2141,9 +2176,9 @@ declare namespace LocalJSX {
2141
2176
  "vertex-chip": VertexChip;
2142
2177
  "vertex-click-to-edit-textfield": VertexClickToEditTextfield;
2143
2178
  "vertex-collapsible": VertexCollapsible;
2144
- "vertex-color-circle": VertexColorCircle;
2145
2179
  "vertex-color-circle-picker": VertexColorCirclePicker;
2146
2180
  "vertex-color-picker": VertexColorPicker;
2181
+ "vertex-color-swatch": VertexColorSwatch;
2147
2182
  "vertex-context-menu": VertexContextMenu;
2148
2183
  "vertex-dialog": VertexDialog;
2149
2184
  "vertex-draggable-popover": VertexDraggablePopover;
@@ -2187,9 +2222,9 @@ declare module "@stencil/core" {
2187
2222
  "vertex-chip": LocalJSX.VertexChip & JSXBase.HTMLAttributes<HTMLVertexChipElement>;
2188
2223
  "vertex-click-to-edit-textfield": LocalJSX.VertexClickToEditTextfield & JSXBase.HTMLAttributes<HTMLVertexClickToEditTextfieldElement>;
2189
2224
  "vertex-collapsible": LocalJSX.VertexCollapsible & JSXBase.HTMLAttributes<HTMLVertexCollapsibleElement>;
2190
- "vertex-color-circle": LocalJSX.VertexColorCircle & JSXBase.HTMLAttributes<HTMLVertexColorCircleElement>;
2191
2225
  "vertex-color-circle-picker": LocalJSX.VertexColorCirclePicker & JSXBase.HTMLAttributes<HTMLVertexColorCirclePickerElement>;
2192
2226
  "vertex-color-picker": LocalJSX.VertexColorPicker & JSXBase.HTMLAttributes<HTMLVertexColorPickerElement>;
2227
+ "vertex-color-swatch": LocalJSX.VertexColorSwatch & JSXBase.HTMLAttributes<HTMLVertexColorSwatchElement>;
2193
2228
  "vertex-context-menu": LocalJSX.VertexContextMenu & JSXBase.HTMLAttributes<HTMLVertexContextMenuElement>;
2194
2229
  "vertex-dialog": LocalJSX.VertexDialog & JSXBase.HTMLAttributes<HTMLVertexDialogElement>;
2195
2230
  "vertex-draggable-popover": LocalJSX.VertexDraggablePopover & JSXBase.HTMLAttributes<HTMLVertexDraggablePopoverElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertexvis/ui",
3
- "version": "0.1.0-canary.19",
3
+ "version": "0.1.0-canary.20",
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.21.0",
88
88
  "fast-deep-equal": "^3.1.3"
89
89
  },
90
- "gitHead": "5d07d65c2b358d2676ef37741e1298b48a6f072a"
90
+ "gitHead": "e096346965f339b8566f944e758847547c6f1c1a"
91
91
  }
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-6a92256c.js');
4
- const index$1 = require('./index-e1b40fa6.js');
5
-
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;pointer-events:none;height:100%;width:100%;left:0;top:0;opacity:0}";
7
-
8
- const ColorPicker = class {
9
- constructor(hostRef) {
10
- index.registerInstance(this, hostRef);
11
- this.valueInput = index.createEvent(this, "valueInput", 7);
12
- this.valueChanged = index.createEvent(this, "valueChanged", 7);
13
- this.handleInput = (event) => {
14
- const input = event.target;
15
- this.value = input.value || '';
16
- };
17
- this.handleChange = (event) => {
18
- this.valueChanged.emit(this.value);
19
- };
20
- this.value = undefined;
21
- this.disabled = false;
22
- }
23
- valueChange() {
24
- this.valueInput.emit(this.value);
25
- }
26
- render() {
27
- 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: {
28
- 'background-color': this.value,
29
- }, title: this.value }), index.h("div", { class: "handle" }, index.h("slot", { name: "handle-icon" }, index.h("vertex-icon", { name: "chevron-down", size: "sm" }))))));
30
- }
31
- static get watchers() { return {
32
- "value": ["valueChange"]
33
- }; }
34
- };
35
- ColorPicker.style = colorPickerCss;
36
-
37
- exports.ColorPicker = ColorPicker;
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const colorCircle = require('./color-circle-05be54bf.js');
6
- require('./index-6a92256c.js');
7
-
8
-
9
-
10
- exports.vertex_color_circle = colorCircle.ColorCircle;
@@ -1,18 +0,0 @@
1
- :host {
2
- display: flex;
3
-
4
- /*
5
- The size of the circle.
6
- Defaults to 24px;
7
- */
8
- --circle-size: 24px;
9
- }
10
-
11
- .root {
12
- border-radius: 100%;
13
- border-width: 2px;
14
- border-style: solid;
15
- width: var(--circle-size);
16
- height: var(--circle-size);
17
- box-sizing: border-box;
18
- }
@@ -1 +0,0 @@
1
- export{C as vertex_color_circle}from"./p-d9b9aebe.js";import"./p-6834631c.js";
@@ -1 +0,0 @@
1
- export{C as vertex_color_picker}from"./p-8434602f.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
@@ -1 +0,0 @@
1
- export{C as vertex_color_circle_picker}from"./p-9374ef6c.js";import"./p-6834631c.js";import"./p-fe062eb0.js";
@@ -1 +0,0 @@
1
- import{r as e,e as t,h as i,H as s}from"./p-6834631c.js";import{c as o}from"./p-fe062eb0.js";const r=class{constructor(i){e(this,i),this.valueInput=t(this,"valueInput",7),this.valueChanged=t(this,"valueChanged",7),this.handleInput=e=>{this.value=e.target.value||""},this.handleChange=()=>{this.valueChanged.emit(this.value)},this.value=void 0,this.disabled=!1}valueChange(){this.valueInput.emit(this.value)}render(){return i(s,null,i("label",{class:o("color-picker",{disabled:this.disabled})},i("input",{type:"color",class:"input","data-testid":"input",disabled:this.disabled,value:this.value,onInput:this.handleInput,onChange:this.handleChange}),i("div",{class:"selected",style:{"background-color":this.value},title:this.value}),i("div",{class:"handle"},i("slot",{name:"handle-icon"},i("vertex-icon",{name:"chevron-down",size:"sm"})))))}static get watchers(){return{value:["valueChange"]}}};r.style=":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;pointer-events:none;height:100%;width:100%;left:0;top:0;opacity:0}";export{r as C}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as s}from"./p-6834631c.js";const h=class{constructor(e){t(this,e),this.color="#ffffff",this.supplementalColor=void 0,this.theme="dark",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(){const t=null!=this.supplementalColor&&this.supplementalColor.length>0?this.supplementalColor:"dark"===this.theme?this.darkened:this.lightened;return e(s,null,e("div",{class:"root",style:"dark"===this.theme?{backgroundColor:this.color,borderColor:t}:{backgroundColor:t,borderColor:this.color}}))}adjustColor(t,e){if(t.startsWith("#")&&7===t.length){const s=Number(`0x${t.slice(1,3)}`),h=Number(`0x${t.slice(3,5)}`),r=Number(`0x${t.slice(5,7)}`);return`#${this.padHexComponent(this.adjustComponent(s,e).toString(16))}${this.padHexComponent(this.adjustComponent(h,e).toString(16))}${this.padHexComponent(this.adjustComponent(r,e).toString(16))}`}return t}adjustComponent(t,e){return Math.max(0,Math.min(255,Math.floor(t-Math.floor((e<0?255-t:255)*e))))}padHexComponent(t){return`${"0".repeat(2-t.length)}${t}`}static get watchers(){return{color:["handleColorChanged"],lightenPercentage:["handleLightenPercentageChanged"],darkenPercentage:["handleDarkenPercentageChanged"]}}};h.style=":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}";export{h as C}
@@ -1,35 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, H as Host } from './index-72f28b71.js';
2
- import { c as classnames } from './index-9c609209.js';
3
-
4
- 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;pointer-events:none;height:100%;width:100%;left:0;top:0;opacity:0}";
5
-
6
- const ColorPicker = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.valueInput = createEvent(this, "valueInput", 7);
10
- this.valueChanged = createEvent(this, "valueChanged", 7);
11
- this.handleInput = (event) => {
12
- const input = event.target;
13
- this.value = input.value || '';
14
- };
15
- this.handleChange = (event) => {
16
- this.valueChanged.emit(this.value);
17
- };
18
- this.value = undefined;
19
- this.disabled = false;
20
- }
21
- valueChange() {
22
- this.valueInput.emit(this.value);
23
- }
24
- render() {
25
- return (h(Host, null, h("label", { class: classnames('color-picker', { disabled: this.disabled }) }, h("input", { type: "color", class: "input", "data-testid": "input", disabled: this.disabled, value: this.value, onInput: this.handleInput, onChange: this.handleChange }), h("div", { class: "selected", style: {
26
- 'background-color': this.value,
27
- }, title: this.value }), h("div", { class: "handle" }, h("slot", { name: "handle-icon" }, h("vertex-icon", { name: "chevron-down", size: "sm" }))))));
28
- }
29
- static get watchers() { return {
30
- "value": ["valueChange"]
31
- }; }
32
- };
33
- ColorPicker.style = colorPickerCss;
34
-
35
- export { ColorPicker as C };
@@ -1,2 +0,0 @@
1
- export { C as vertex_color_circle } from './color-circle-842f3321.js';
2
- import './index-72f28b71.js';