@vertexvis/ui 0.1.0-testing.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/{color-circle-picker-13396ec4.js → color-circle-picker-d0403f1c.js} +2 -2
- package/dist/cjs/color-picker-2a4820fa.js +46 -0
- package/dist/cjs/{color-circle-05be54bf.js → color-swatch-8aaf6c0b.js} +42 -17
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{dialog-88e2308a.js → dialog-34f1dd6e.js} +1 -1
- package/dist/cjs/dom-a2c535e3.js +17 -0
- package/dist/cjs/{icon-460fd0f5.js → icon-3b1349ea.js} +1 -1
- package/dist/cjs/{icon-button-786427d6.js → icon-button-19061994.js} +1 -1
- package/dist/cjs/{icon-helper-ba408f49.js → icon-helper-cb479ba1.js} +107 -0
- package/dist/cjs/index.cjs.js +18 -12
- package/dist/cjs/lib-1bd1e383.js +9 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{search-bar-91cbcd07.js → search-bar-2e7ee35a.js} +130 -24
- package/dist/cjs/{select-5f8aecfe.js → select-2b2bdb97.js} +1 -1
- package/dist/cjs/{slider-13594e49.js → slider-7714cccb.js} +7 -1
- package/dist/cjs/tab-4335cd8f.js +26 -0
- package/dist/cjs/tabs-6f3e76e1.js +111 -0
- package/dist/cjs/{tooltip-e9f63631.js → tooltip-9d097c55.js} +2 -5
- package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +1 -1
- package/dist/cjs/vertex-color-picker.cjs.entry.js +2 -1
- package/dist/cjs/vertex-color-swatch.cjs.entry.js +12 -0
- package/dist/cjs/vertex-dialog.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-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/vertex-select.cjs.entry.js +1 -1
- package/dist/cjs/vertex-slider.cjs.entry.js +2 -1
- package/dist/cjs/{vertex-color-circle.cjs.entry.js → vertex-tab.cjs.entry.js} +3 -2
- package/dist/cjs/vertex-tabs.cjs.entry.js +12 -0
- package/dist/cjs/vertex-tooltip.cjs.entry.js +2 -1
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/color-circle-picker/color-circle-picker.js +8 -8
- package/dist/collection/components/color-picker/color-picker.css +95 -15
- package/dist/collection/components/color-picker/color-picker.js +57 -3
- package/dist/collection/components/color-swatch/color-swatch.css +43 -0
- package/dist/collection/components/{color-circle/color-circle.js → color-swatch/color-swatch.js} +96 -23
- package/dist/collection/components/color-swatch/lib.js +5 -0
- package/dist/collection/components/dialog/dialog.css +0 -1
- package/dist/collection/components/icon/icon-helper.js +51 -0
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icons/arrow-left-circled.js +2 -0
- package/dist/collection/components/icon/icons/arrow-right-circled.js +2 -0
- package/dist/collection/components/icon/icons/camera-add.js +2 -0
- package/dist/collection/components/icon/icons/caution.js +2 -0
- package/dist/collection/components/icon/icons/columns-add.js +2 -0
- package/dist/collection/components/icon/icons/compare.js +2 -0
- package/dist/collection/components/icon/icons/compress.js +2 -0
- package/dist/collection/components/icon/icons/cube-stack.js +2 -0
- package/dist/collection/components/icon/icons/expand.js +2 -0
- package/dist/collection/components/icon/icons/file-folder.js +2 -0
- package/dist/collection/components/icon/icons/pin-text-square.js +2 -0
- package/dist/collection/components/icon/icons/plus-with-arrow.js +2 -0
- package/dist/collection/components/icon/icons/pmi.js +2 -0
- package/dist/collection/components/icon/icons/report.js +2 -0
- package/dist/collection/components/icon/icons/square-dot-outline.js +2 -0
- package/dist/collection/components/icon/icons/update.js +2 -0
- package/dist/collection/components/icon/icons/views.js +2 -0
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/index.js +3 -1
- package/dist/collection/components/search-bar/dom.js +17 -0
- package/dist/collection/components/search-bar/lib.js +45 -4
- package/dist/collection/components/search-bar/search-bar.js +76 -23
- package/dist/collection/components/select/select.css +8 -0
- package/dist/collection/components/slider/slider.js +8 -2
- package/dist/collection/components/tab/tab.css +16 -0
- package/dist/collection/components/tab/tab.js +85 -0
- package/dist/collection/components/tab/util.js +3 -0
- package/dist/collection/components/tabs/tabs.css +67 -0
- package/dist/collection/components/tabs/tabs.js +159 -0
- package/dist/collection/types/icon.js +17 -0
- package/dist/collection/util/components/dom.js +3 -0
- package/dist/components/components.css +1 -1
- package/dist/components/components.esm.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/p-01d4be1d.entry.js +1 -0
- package/dist/components/{p-165aed7d.js → p-0d4a0d61.js} +1 -1
- package/dist/components/p-18ed73e9.js +1 -0
- package/dist/components/p-1d08dd79.entry.js +1 -0
- package/dist/components/p-2ae8175d.entry.js +1 -0
- package/dist/components/p-2b4aedaa.entry.js +1 -0
- package/dist/components/p-3438c441.js +1 -0
- package/dist/components/{p-912f6e24.js → p-4327deea.js} +1 -1
- package/dist/components/p-45848878.js +1 -0
- package/dist/components/p-48629bf1.js +1 -0
- package/dist/components/{p-103249b4.js → p-5384f198.js} +1 -1
- package/dist/components/p-655053df.js +1 -0
- package/dist/components/p-65f9817e.js +1 -0
- package/dist/components/p-6a49c365.entry.js +1 -0
- package/dist/components/p-6b6c2260.js +1 -0
- package/dist/components/p-6ff20817.js +1 -0
- package/dist/components/{p-ca52a423.js → p-7bd92281.js} +1 -1
- package/dist/components/p-8bbc344d.entry.js +1 -0
- package/dist/components/p-8d83dfff.entry.js +1 -0
- package/dist/components/p-96f55673.js +1 -0
- package/dist/components/{p-9374ef6c.js → p-b9dab446.js} +1 -1
- package/dist/components/p-c6841378.entry.js +1 -0
- package/dist/components/p-cbfc041e.entry.js +1 -0
- package/dist/components/p-d2d75bcf.entry.js +1 -0
- package/dist/components/p-d539f530.js +1 -0
- package/dist/components/p-decf635f.entry.js +1 -0
- package/dist/components/p-e35057b5.entry.js +1 -0
- package/dist/esm/{color-circle-picker-998a7e9c.js → color-circle-picker-35ad3b3e.js} +2 -2
- package/dist/esm/color-picker-1d67effe.js +44 -0
- package/dist/esm/{color-circle-842f3321.js → color-swatch-0e62d13d.js} +42 -17
- package/dist/esm/components.js +1 -1
- package/dist/esm/{dialog-e3f49527.js → dialog-1cef715c.js} +1 -1
- package/dist/esm/dom-9d0f7bf4.js +13 -0
- package/dist/esm/{icon-d37150b4.js → icon-bf8df898.js} +1 -1
- package/dist/esm/{icon-button-aad3c0e7.js → icon-button-a4bdeabc.js} +1 -1
- package/dist/esm/{icon-helper-83f10f73.js → icon-helper-94d45002.js} +107 -0
- package/dist/esm/index.js +15 -11
- package/dist/esm/lib-73fbca8b.js +7 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{search-bar-f12a3599.js → search-bar-8d18626e.js} +130 -24
- package/dist/esm/{select-d4e135b7.js → select-78aeff96.js} +1 -1
- package/dist/esm/{slider-dcdb388f.js → slider-3d8545e3.js} +8 -2
- package/dist/esm/tab-c76332b0.js +24 -0
- package/dist/esm/tabs-e9f6dcbe.js +109 -0
- package/dist/esm/{tooltip-933da261.js → tooltip-db8ebd41.js} +1 -4
- package/dist/esm/vertex-color-circle-picker.entry.js +1 -1
- package/dist/esm/vertex-color-picker.entry.js +2 -1
- package/dist/esm/vertex-color-swatch.entry.js +4 -0
- package/dist/esm/vertex-dialog.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-search-bar.entry.js +1 -1
- package/dist/esm/vertex-select.entry.js +1 -1
- package/dist/esm/vertex-slider.entry.js +2 -1
- package/dist/esm/vertex-tab.entry.js +3 -0
- package/dist/esm/vertex-tabs.entry.js +4 -0
- package/dist/esm/vertex-tooltip.entry.js +2 -1
- package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +7 -7
- package/dist/types/components/color-picker/color-picker.d.ts +19 -0
- package/dist/types/components/{color-circle/color-circle.d.ts → color-swatch/color-swatch.d.ts} +23 -5
- package/dist/types/components/color-swatch/lib.d.ts +1 -0
- package/dist/types/components/icon/icons/arrow-left-circled.d.ts +3 -0
- package/dist/types/components/icon/icons/arrow-right-circled.d.ts +3 -0
- package/dist/types/components/icon/icons/camera-add.d.ts +3 -0
- package/dist/types/components/icon/icons/caution.d.ts +3 -0
- package/dist/types/components/icon/icons/columns-add.d.ts +3 -0
- package/dist/types/components/icon/icons/compare.d.ts +3 -0
- package/dist/types/components/icon/icons/compress.d.ts +3 -0
- package/dist/types/components/icon/icons/cube-stack.d.ts +3 -0
- package/dist/types/components/icon/icons/expand.d.ts +3 -0
- package/dist/types/components/icon/icons/file-folder.d.ts +3 -0
- package/dist/types/components/icon/icons/pin-text-square.d.ts +3 -0
- package/dist/types/components/icon/icons/plus-with-arrow.d.ts +3 -0
- package/dist/types/components/icon/icons/pmi.d.ts +3 -0
- package/dist/types/components/icon/icons/report.d.ts +3 -0
- package/dist/types/components/icon/icons/square-dot-outline.d.ts +3 -0
- package/dist/types/components/icon/icons/update.d.ts +3 -0
- package/dist/types/components/icon/icons/views.d.ts +3 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/search-bar/dom.d.ts +5 -0
- package/dist/types/components/search-bar/lib.d.ts +9 -2
- package/dist/types/components/search-bar/search-bar.d.ts +1 -0
- package/dist/types/components/slider/slider.d.ts +1 -0
- package/dist/types/components/tab/tab.d.ts +11 -0
- package/dist/types/components/tab/util.d.ts +1 -0
- package/dist/types/components/tabs/tabs.d.ts +23 -0
- package/dist/types/components.d.ts +162 -76
- package/dist/types/types/icon.d.ts +17 -0
- package/dist/types/util/components/dom.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/color-picker-876ace00.js +0 -37
- package/dist/collection/components/color-circle/color-circle.css +0 -18
- package/dist/components/p-03dbb28c.js +0 -1
- package/dist/components/p-0b1cdc8a.entry.js +0 -1
- package/dist/components/p-0f8b9ede.entry.js +0 -1
- package/dist/components/p-16719272.entry.js +0 -1
- package/dist/components/p-20a74d5d.entry.js +0 -1
- package/dist/components/p-35e7ab78.entry.js +0 -1
- package/dist/components/p-7cfb3736.entry.js +0 -1
- package/dist/components/p-7dba2574.entry.js +0 -1
- package/dist/components/p-7f64b251.entry.js +0 -1
- package/dist/components/p-8434602f.js +0 -1
- package/dist/components/p-92930f2a.js +0 -1
- package/dist/components/p-cd6ddb10.js +0 -1
- package/dist/components/p-cfe369bf.entry.js +0 -1
- package/dist/components/p-d9b9aebe.js +0 -1
- package/dist/components/p-db34f10c.js +0 -1
- package/dist/components/p-f71fc166.entry.js +0 -1
- package/dist/esm/color-picker-2e3b51fa.js +0 -35
- package/dist/esm/vertex-color-circle.entry.js +0 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const colorSwatch = require('./color-swatch-8aaf6c0b.js');
|
|
6
|
+
require('./index-6a92256c.js');
|
|
7
|
+
require('./index-e1b40fa6.js');
|
|
8
|
+
require('./lib-1bd1e383.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.vertex_color_swatch = colorSwatch.ColorSwatch;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const iconButton = require('./icon-button-
|
|
5
|
+
const iconButton = require('./icon-button-19061994.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./icon-helper-
|
|
8
|
+
require('./icon-helper-cb479ba1.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const icon = require('./icon-
|
|
5
|
+
const icon = require('./icon-3b1349ea.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./icon-helper-
|
|
8
|
+
require('./icon-helper-cb479ba1.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const searchBar = require('./search-bar-
|
|
5
|
+
const searchBar = require('./search-bar-2e7ee35a.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
8
|
require('./templates-e7b3ffbb.js');
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const slider = require('./slider-
|
|
5
|
+
const slider = require('./slider-7714cccb.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
+
require('./dom-a2c535e3.js');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const tab = require('./tab-4335cd8f.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
|
+
require('./index-e1b40fa6.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
exports.
|
|
11
|
+
exports.vertex_tab = tab.Tab;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const tabs = require('./tabs-6f3e76e1.js');
|
|
6
|
+
require('./index-6a92256c.js');
|
|
7
|
+
require('./index-e1b40fa6.js');
|
|
8
|
+
require('./dom-a2c535e3.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.vertex_tabs = tabs.Tabs;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const tooltip = require('./tooltip-
|
|
5
|
+
const tooltip = require('./tooltip-9d097c55.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./tslib.es6-838fd860.js');
|
|
8
8
|
require('./index-e1b40fa6.js');
|
|
9
|
+
require('./dom-a2c535e3.js');
|
|
9
10
|
require('./slots-fb5ac359.js');
|
|
10
11
|
|
|
11
12
|
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
"./components/chip/chip.js",
|
|
8
8
|
"./components/text-field/text-field.js",
|
|
9
9
|
"./components/color-circle-picker/color-circle-picker.js",
|
|
10
|
+
"./components/color-swatch/color-swatch.js",
|
|
11
|
+
"./components/color-picker/color-picker.js",
|
|
10
12
|
"./components/popover/popover.js",
|
|
11
13
|
"./components/expandable/expandable.js",
|
|
12
14
|
"./components/icon-button/icon-button.js",
|
|
@@ -22,8 +24,6 @@
|
|
|
22
24
|
"./components/card-group/card-group.js",
|
|
23
25
|
"./components/click-to-edit-text-field/click-to-edit-text-field.js",
|
|
24
26
|
"./components/collapsible/collapsible.js",
|
|
25
|
-
"./components/color-circle/color-circle.js",
|
|
26
|
-
"./components/color-picker/color-picker.js",
|
|
27
27
|
"./components/context-menu/context-menu.js",
|
|
28
28
|
"./components/dialog/dialog.js",
|
|
29
29
|
"./components/draggable-popover/draggable-popover.js",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"./components/radio-group/radio-group.js",
|
|
38
38
|
"./components/result-list/result-list.js",
|
|
39
39
|
"./components/select/select.js",
|
|
40
|
+
"./components/tab/tab.js",
|
|
41
|
+
"./components/tabs/tabs.js",
|
|
40
42
|
"./components/tooltip/tooltip.js"
|
|
41
43
|
],
|
|
42
44
|
"compiler": {
|
|
@@ -52,9 +52,9 @@ export class ColorCirclePicker {
|
|
|
52
52
|
render() {
|
|
53
53
|
return (h(Host, null, h("div", { class: classNames('container', {
|
|
54
54
|
vertical: this.direction === 'vertical',
|
|
55
|
-
}) }, this.colorArray.map((c, i) => (h("vertex-color-
|
|
55
|
+
}) }, this.colorArray.map((c, i) => (h("vertex-color-swatch", { class: classNames('circle', {
|
|
56
56
|
selected: this.selected === c,
|
|
57
|
-
}), color: c, supplementalColor: this.supplementaryColorArray[i], onClick: this.handleClick, lightenPercentage: this.lightenPercentage, darkenPercentage: this.darkenPercentage, theme: this.theme }))))));
|
|
57
|
+
}), variant: "circle", size: "lg", color: c, supplementalColor: this.supplementaryColorArray[i], onClick: this.handleClick, lightenPercentage: this.lightenPercentage, darkenPercentage: this.darkenPercentage, theme: this.theme }))))));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "vertex-color-circle-picker"; }
|
|
60
60
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,7 +82,7 @@ export class ColorCirclePicker {
|
|
|
82
82
|
"optional": false,
|
|
83
83
|
"docs": {
|
|
84
84
|
"tags": [],
|
|
85
|
-
"text": "The colors to show in this `vertex-color-circle-picker`.\nThese values will map to the `color` property of the underlying\n`vertex-color-
|
|
85
|
+
"text": "The colors to show in this `vertex-color-circle-picker`.\nThese values will map to the `color` property of the underlying\n`vertex-color-swatch`."
|
|
86
86
|
},
|
|
87
87
|
"attribute": "colors",
|
|
88
88
|
"reflect": false,
|
|
@@ -100,7 +100,7 @@ export class ColorCirclePicker {
|
|
|
100
100
|
"optional": false,
|
|
101
101
|
"docs": {
|
|
102
102
|
"tags": [],
|
|
103
|
-
"text": "Optional supplemental colors that will be provided to the\nunderlying `vertex-color-
|
|
103
|
+
"text": "Optional supplemental colors that will be provided to the\nunderlying `vertex-color-swatch` elements for associated\nindices in the `colors` array."
|
|
104
104
|
},
|
|
105
105
|
"attribute": "supplemental-colors",
|
|
106
106
|
"reflect": false,
|
|
@@ -118,7 +118,7 @@ export class ColorCirclePicker {
|
|
|
118
118
|
"optional": false,
|
|
119
119
|
"docs": {
|
|
120
120
|
"tags": [],
|
|
121
|
-
"text": "The theme to use for this `vertex-color-circle-picker`.\nCan be either `light` or `dark`, and defaults to `dark`.\n\nWith the `dark` theme, the provided `colors` will be used\nas the background-colors for `vertex-color-
|
|
121
|
+
"text": "The theme to use for this `vertex-color-circle-picker`.\nCan be either `light` or `dark`, and defaults to `dark`.\n\nWith the `dark` theme, the provided `colors` will be used\nas the background-colors for `vertex-color-swatch` elements,\nand a `darkened` color will be used for the border-colors.\n\nWith the `light` theme, the provided `colors` will be used\nas the background-colors for `vertex-color-swatch` elements,\nand a `lightened` color will be used for the border-colors."
|
|
122
122
|
},
|
|
123
123
|
"attribute": "theme",
|
|
124
124
|
"reflect": true,
|
|
@@ -136,7 +136,7 @@ export class ColorCirclePicker {
|
|
|
136
136
|
"optional": false,
|
|
137
137
|
"docs": {
|
|
138
138
|
"tags": [],
|
|
139
|
-
"text": "The percentage lighter color to use to compute the `lightened`\ncolor for the underlying `vertex-color-
|
|
139
|
+
"text": "The percentage lighter color to use to compute the `lightened`\ncolor for the underlying `vertex-color-swatch`. This will be\nused when the `theme` is set to `light`."
|
|
140
140
|
},
|
|
141
141
|
"attribute": "lighten-percentage",
|
|
142
142
|
"reflect": false,
|
|
@@ -154,7 +154,7 @@ export class ColorCirclePicker {
|
|
|
154
154
|
"optional": false,
|
|
155
155
|
"docs": {
|
|
156
156
|
"tags": [],
|
|
157
|
-
"text": "The percentage darker color to use to compute the `darkened`\ncolor for the underlying `vertex-color-
|
|
157
|
+
"text": "The percentage darker color to use to compute the `darkened`\ncolor for the underlying `vertex-color-swatch`. This will be\nused when the `theme` is set to `dark`."
|
|
158
158
|
},
|
|
159
159
|
"attribute": "darken-percentage",
|
|
160
160
|
"reflect": false,
|
|
@@ -172,7 +172,7 @@ export class ColorCirclePicker {
|
|
|
172
172
|
"optional": true,
|
|
173
173
|
"docs": {
|
|
174
174
|
"tags": [],
|
|
175
|
-
"text": "An optional selected color. This will also be updated internally\nby the component when individual `vertex-color-
|
|
175
|
+
"text": "An optional selected color. This will also be updated internally\nby the component when individual `vertex-color-swatch` elements\nare clicked."
|
|
176
176
|
},
|
|
177
177
|
"attribute": "selected",
|
|
178
178
|
"reflect": true
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
|
|
2
4
|
/*
|
|
3
|
-
Width of element indicating the color chosen.
|
|
4
|
-
Defaults to
|
|
5
|
+
Width override of element indicating the color chosen.
|
|
6
|
+
Defaults to `initial` to fall back to the `size` property.
|
|
5
7
|
*/
|
|
6
|
-
--selected-color-width:
|
|
8
|
+
--selected-color-width: initial;
|
|
7
9
|
|
|
8
10
|
/*
|
|
9
|
-
Height of element indicating the color chosen.
|
|
10
|
-
Defaults to
|
|
11
|
+
Height override of element indicating the color chosen.
|
|
12
|
+
Defaults to `initial` to fall back to the `size` property.
|
|
11
13
|
*/
|
|
12
|
-
--selected-color-height:
|
|
14
|
+
--selected-color-height: initial;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.wrapper {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.wrapper.full {
|
|
23
|
+
padding: 0.375rem 0.5rem;
|
|
24
|
+
border: 1px solid var(--vertex-ui-neutral-300);
|
|
25
|
+
border-radius: 4px;
|
|
13
26
|
}
|
|
14
27
|
|
|
15
28
|
.color-picker {
|
|
16
29
|
display: inline-flex;
|
|
17
30
|
position: relative;
|
|
18
|
-
background: var(--vertex-ui-neutral-200);
|
|
19
|
-
border-radius: 4px;
|
|
20
31
|
cursor: pointer;
|
|
21
32
|
}
|
|
22
33
|
|
|
@@ -25,21 +36,90 @@
|
|
|
25
36
|
cursor: default;
|
|
26
37
|
}
|
|
27
38
|
|
|
39
|
+
.selected-wrapper {
|
|
40
|
+
position: relative;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wrapper.full .selected-wrapper {
|
|
46
|
+
gap: 0.75rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
28
49
|
.selected {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
50
|
+
position: relative;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.wrapper.sm .selected {
|
|
54
|
+
width: var(--selected-color-width, 1rem);
|
|
55
|
+
height: var(--selected-color-height, 1rem);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.wrapper.md .selected {
|
|
59
|
+
width: var(--selected-color-width, 1.25rem);
|
|
60
|
+
height: var(--selected-color-height, 1.25rem);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wrapper.lg .selected {
|
|
64
|
+
width: var(--selected-color-width, 1.5rem);
|
|
65
|
+
height: var(--selected-color-height, 1.5rem);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.text-wrapper {
|
|
69
|
+
position: relative;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.selected-text {
|
|
73
|
+
position: absolute;
|
|
74
|
+
left: 0;
|
|
75
|
+
top: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
bottom: 0;
|
|
78
|
+
display: flex;
|
|
79
|
+
color: var(--vertex-ui-neutral-700);
|
|
80
|
+
text-align: center;
|
|
81
|
+
font-family: var(--vertex-ui-font-family);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.hidden-text {
|
|
85
|
+
visibility: hidden;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
font-family: var(--vertex-ui-font-family-monospace);
|
|
34
88
|
}
|
|
35
89
|
|
|
36
|
-
.
|
|
90
|
+
.wrapper.sm .selected-text,
|
|
91
|
+
.wrapper.sm .hidden-text {
|
|
92
|
+
font-size: var(--vertex-ui-text-xs);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.wrapper.md .selected-text,
|
|
96
|
+
.wrapper.md .hidden-text {
|
|
97
|
+
font-size: var(--vertex-ui-text-xs);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.wrapper.lg .selected-text,
|
|
101
|
+
.wrapper.lg .hidden-text {
|
|
102
|
+
font-size: var(--vertex-ui-text-xs);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.no-value {
|
|
106
|
+
width: 100%;
|
|
107
|
+
height: 100%;
|
|
108
|
+
stroke: var(--vertex-ui-red-400);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.right-gutter {
|
|
37
112
|
display: flex;
|
|
38
113
|
align-items: center;
|
|
39
|
-
|
|
114
|
+
margin-left: auto;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
slot[name="right-gutter"]::slotted(*) {
|
|
118
|
+
padding: 0 ;
|
|
40
119
|
}
|
|
41
120
|
|
|
42
121
|
.input {
|
|
122
|
+
display: flex;
|
|
43
123
|
position: absolute;
|
|
44
124
|
pointer-events: none;
|
|
45
125
|
height: 100%;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host, } from '@stencil/core';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
+
import { isValidHexColor } from '../color-swatch/lib';
|
|
3
4
|
export class ColorPicker {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.handleInput = (event) => {
|
|
@@ -10,15 +11,23 @@ export class ColorPicker {
|
|
|
10
11
|
this.valueChanged.emit(this.value);
|
|
11
12
|
};
|
|
12
13
|
this.value = undefined;
|
|
14
|
+
this.size = 'md';
|
|
15
|
+
this.variant = 'full';
|
|
13
16
|
this.disabled = false;
|
|
14
17
|
}
|
|
15
18
|
valueChange() {
|
|
16
19
|
this.valueInput.emit(this.value);
|
|
17
20
|
}
|
|
18
21
|
render() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
var _a;
|
|
23
|
+
return (h(Host, null, h("div", { class: classNames('wrapper', this.variant, this.size) }, 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: classNames('selected-wrapper', this.variant) }, h("div", { class: "selected", title: this.value }, h("vertex-color-swatch", { class: "selected-color", supplementalColor: "var(--vertex-ui-neutral-400)", color: this.value, variant: "square", size: this.size }, h("slot", { name: "overlay", slot: "overlay" }, (this.value == null || this.value === '') && (h("svg", { class: "no-value", slot: "overlay", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16" }, h("path", { d: "M16,0L0,16" })))))), this.variant === 'full' && (h("div", { class: "text-wrapper" }, h("div", { class: "hidden-text" }, "#FFFFFF"), h("div", { class: "selected-text" }, (_a = this.getDisplayedValue()) !== null && _a !== void 0 ? _a : 'Default'))))), h("div", { class: "right-gutter" }, h("slot", { name: "right-gutter" })))));
|
|
24
|
+
}
|
|
25
|
+
getDisplayedValue() {
|
|
26
|
+
var _a;
|
|
27
|
+
if (this.value != null && isValidHexColor(this.value)) {
|
|
28
|
+
return (_a = this.value) === null || _a === void 0 ? void 0 : _a.toLocaleUpperCase();
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
22
31
|
}
|
|
23
32
|
static get is() { return "vertex-color-picker"; }
|
|
24
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,6 +60,51 @@ export class ColorPicker {
|
|
|
51
60
|
"attribute": "value",
|
|
52
61
|
"reflect": true
|
|
53
62
|
},
|
|
63
|
+
"size": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "ColorSwatchSize",
|
|
68
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
69
|
+
"references": {
|
|
70
|
+
"ColorSwatchSize": {
|
|
71
|
+
"location": "import",
|
|
72
|
+
"path": "../color-swatch/color-swatch"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": false,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": "The size of the swatch displayed for this color picker. Can be `sm`, `md`,\n`lg`, or `xl`, and defaults to `md`. If the `variant` is `full`, this value\nwill also increase the size of the associated hexadecimal value."
|
|
81
|
+
},
|
|
82
|
+
"attribute": "size",
|
|
83
|
+
"reflect": true,
|
|
84
|
+
"defaultValue": "'md'"
|
|
85
|
+
},
|
|
86
|
+
"variant": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "ColorPickerVariant",
|
|
91
|
+
"resolved": "\"full\" | \"swatch\"",
|
|
92
|
+
"references": {
|
|
93
|
+
"ColorPickerVariant": {
|
|
94
|
+
"location": "local"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": false,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": "The variant of this color picker. Can be `full` or `swatch`,\nand defaults to `full`.\n\n`full` will display both the visual color swatch and the hexadecimal\nrepresentation of the color.\n\n`swatch` will display only the visual color swatch."
|
|
103
|
+
},
|
|
104
|
+
"attribute": "variant",
|
|
105
|
+
"reflect": true,
|
|
106
|
+
"defaultValue": "'full'"
|
|
107
|
+
},
|
|
54
108
|
"disabled": {
|
|
55
109
|
"type": "boolean",
|
|
56
110
|
"mutable": false,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.root {
|
|
6
|
+
position: relative;
|
|
7
|
+
border-style: solid;
|
|
8
|
+
border-color: var(--vertex-ui-neutral-300);
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.root.circle {
|
|
13
|
+
border-width: 2px;
|
|
14
|
+
border-radius: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.root.square {
|
|
18
|
+
border-width: 1px;
|
|
19
|
+
border-radius: 3px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.root.sm {
|
|
23
|
+
width: 16px;
|
|
24
|
+
height: 16px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.root.md {
|
|
28
|
+
width: 20px;
|
|
29
|
+
height: 20px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.root.lg {
|
|
33
|
+
width: 24px;
|
|
34
|
+
height: 24px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.overlay {
|
|
38
|
+
position: absolute;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
border-radius: 2px;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
package/dist/collection/components/{color-circle/color-circle.js → color-swatch/color-swatch.js}
RENAMED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
|
-
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { isValidHexColor } from './lib';
|
|
4
|
+
export class ColorSwatch {
|
|
3
5
|
constructor() {
|
|
6
|
+
this.variant = 'circle';
|
|
7
|
+
this.size = 'md';
|
|
4
8
|
this.color = '#ffffff';
|
|
5
9
|
this.supplementalColor = undefined;
|
|
6
|
-
this.theme = '
|
|
10
|
+
this.theme = 'none';
|
|
7
11
|
this.lightenPercentage = 0.25;
|
|
8
12
|
this.darkenPercentage = 0.25;
|
|
9
13
|
this.lightened = this.adjustColor(this.color, -this.lightenPercentage);
|
|
@@ -20,22 +24,43 @@ export class ColorCircle {
|
|
|
20
24
|
this.darkened = this.adjustColor(this.color, newPercentage);
|
|
21
25
|
}
|
|
22
26
|
render() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
borderColor: supplementalColor,
|
|
31
|
-
}
|
|
32
|
-
: {
|
|
27
|
+
return (h(Host, null, h("div", { class: classNames('root', this.variant, this.size), style: this.getThemeColors() }, h("div", { class: "overlay" }, h("slot", { name: "overlay" })))));
|
|
28
|
+
}
|
|
29
|
+
getThemeColors() {
|
|
30
|
+
const supplementalColor = this.getSupplementalColor();
|
|
31
|
+
switch (this.theme) {
|
|
32
|
+
case 'light':
|
|
33
|
+
return {
|
|
33
34
|
backgroundColor: supplementalColor,
|
|
34
35
|
borderColor: this.color,
|
|
35
|
-
}
|
|
36
|
+
};
|
|
37
|
+
case 'dark':
|
|
38
|
+
return {
|
|
39
|
+
backgroundColor: this.color,
|
|
40
|
+
borderColor: supplementalColor,
|
|
41
|
+
};
|
|
42
|
+
default:
|
|
43
|
+
return {
|
|
44
|
+
backgroundColor: this.color,
|
|
45
|
+
borderColor: supplementalColor !== null && supplementalColor !== void 0 ? supplementalColor : undefined,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
getSupplementalColor() {
|
|
50
|
+
const providedSupplementalColor = this.supplementalColor != null && this.supplementalColor.length > 0
|
|
51
|
+
? this.supplementalColor
|
|
52
|
+
: undefined;
|
|
53
|
+
switch (this.theme) {
|
|
54
|
+
case 'light':
|
|
55
|
+
return providedSupplementalColor !== null && providedSupplementalColor !== void 0 ? providedSupplementalColor : this.lightened;
|
|
56
|
+
case 'dark':
|
|
57
|
+
return providedSupplementalColor !== null && providedSupplementalColor !== void 0 ? providedSupplementalColor : this.darkened;
|
|
58
|
+
default:
|
|
59
|
+
return providedSupplementalColor;
|
|
60
|
+
}
|
|
36
61
|
}
|
|
37
62
|
adjustColor(color, percentage) {
|
|
38
|
-
if (
|
|
63
|
+
if (isValidHexColor(color)) {
|
|
39
64
|
const r = Number(`0x${color.slice(1, 3)}`);
|
|
40
65
|
const g = Number(`0x${color.slice(3, 5)}`);
|
|
41
66
|
const b = Number(`0x${color.slice(5, 7)}`);
|
|
@@ -53,20 +78,64 @@ export class ColorCircle {
|
|
|
53
78
|
padHexComponent(hex) {
|
|
54
79
|
return `${'0'.repeat(2 - hex.length)}${hex}`;
|
|
55
80
|
}
|
|
56
|
-
static get is() { return "vertex-color-
|
|
81
|
+
static get is() { return "vertex-color-swatch"; }
|
|
57
82
|
static get encapsulation() { return "shadow"; }
|
|
58
83
|
static get originalStyleUrls() {
|
|
59
84
|
return {
|
|
60
|
-
"$": ["color-
|
|
85
|
+
"$": ["color-swatch.css"]
|
|
61
86
|
};
|
|
62
87
|
}
|
|
63
88
|
static get styleUrls() {
|
|
64
89
|
return {
|
|
65
|
-
"$": ["color-
|
|
90
|
+
"$": ["color-swatch.css"]
|
|
66
91
|
};
|
|
67
92
|
}
|
|
68
93
|
static get properties() {
|
|
69
94
|
return {
|
|
95
|
+
"variant": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": false,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "ColorSwatchVariant",
|
|
100
|
+
"resolved": "\"circle\" | \"square\"",
|
|
101
|
+
"references": {
|
|
102
|
+
"ColorSwatchVariant": {
|
|
103
|
+
"location": "local"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "The variant of this color swatch. Can be either `circle` or `square`,\nand defaults to `circle`."
|
|
112
|
+
},
|
|
113
|
+
"attribute": "variant",
|
|
114
|
+
"reflect": true,
|
|
115
|
+
"defaultValue": "'circle'"
|
|
116
|
+
},
|
|
117
|
+
"size": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "ColorSwatchSize",
|
|
122
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
123
|
+
"references": {
|
|
124
|
+
"ColorSwatchSize": {
|
|
125
|
+
"location": "local"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": false,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [],
|
|
133
|
+
"text": "The size of this color swatch. Can be `sm`, `md`, or `lg`,\nand defaults to `md`."
|
|
134
|
+
},
|
|
135
|
+
"attribute": "size",
|
|
136
|
+
"reflect": true,
|
|
137
|
+
"defaultValue": "'md'"
|
|
138
|
+
},
|
|
70
139
|
"color": {
|
|
71
140
|
"type": "string",
|
|
72
141
|
"mutable": false,
|
|
@@ -79,7 +148,7 @@ export class ColorCircle {
|
|
|
79
148
|
"optional": false,
|
|
80
149
|
"docs": {
|
|
81
150
|
"tags": [],
|
|
82
|
-
"text": "The primary color of this `vertex-color-
|
|
151
|
+
"text": "The primary color of this `vertex-color-swatch` in hexadecimal format.\nFor `dark` theme, this will be the background-color.\nFor `light` theme, this will be the border-color."
|
|
83
152
|
},
|
|
84
153
|
"attribute": "color",
|
|
85
154
|
"reflect": true,
|
|
@@ -106,19 +175,23 @@ export class ColorCircle {
|
|
|
106
175
|
"type": "string",
|
|
107
176
|
"mutable": false,
|
|
108
177
|
"complexType": {
|
|
109
|
-
"original": "
|
|
110
|
-
"resolved": "\"dark\" | \"light\"",
|
|
111
|
-
"references": {
|
|
178
|
+
"original": "ColorSwatchTheme",
|
|
179
|
+
"resolved": "\"dark\" | \"light\" | \"none\"",
|
|
180
|
+
"references": {
|
|
181
|
+
"ColorSwatchTheme": {
|
|
182
|
+
"location": "local"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
112
185
|
},
|
|
113
186
|
"required": false,
|
|
114
187
|
"optional": false,
|
|
115
188
|
"docs": {
|
|
116
189
|
"tags": [],
|
|
117
|
-
"text": "The theme to use for this `vertex-color-
|
|
190
|
+
"text": "The theme to use for this `vertex-color-swatch`.\nCan be `none`, `light`, or `dark`, and defaults to `none`.\n\nWith no theme (`none`), the provided `color` will be used\nas the background-color, and the border will be a neutral color.\n\nWith the `dark` theme, the provided `color` will be used\nas the background-color, and the `darkened` color will be\nused for the border-color.\n\nWith the `light` theme, the provided `color` will be used\nas the border-color, and the `lightened` color will be used\nfor the background-color."
|
|
118
191
|
},
|
|
119
192
|
"attribute": "theme",
|
|
120
193
|
"reflect": true,
|
|
121
|
-
"defaultValue": "'
|
|
194
|
+
"defaultValue": "'none'"
|
|
122
195
|
},
|
|
123
196
|
"lightenPercentage": {
|
|
124
197
|
"type": "number",
|