@alegendstale/holly-components 0.2.9 → 0.2.10
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/dist/components/absolute-container/absolute-container.js +113 -91
- package/dist/components/absolute-container/absolute-container.stories.js +36 -0
- package/dist/components/absolute-container/index.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.js +415 -308
- package/dist/components/bottom-sheet/bottom-sheet.stories.js +43 -0
- package/dist/components/bottom-sheet/bottom-sheet.test.js +15 -0
- package/dist/components/bottom-sheet/index.js +1 -1
- package/dist/components/canvas/canvas-base.d.ts +2 -1
- package/dist/components/canvas/canvas-base.d.ts.map +1 -1
- package/dist/components/canvas/canvas-base.js +56 -44
- package/dist/components/canvas/canvas-gradient.js +61 -45
- package/dist/components/canvas/canvas-image.js +158 -111
- package/dist/components/canvas/index.js +2 -2
- package/dist/components/carousel-scroller/carousel-scroller.js +133 -121
- package/dist/components/carousel-scroller/carousel-scroller.stories.js +40 -0
- package/dist/components/carousel-scroller/index.js +1 -1
- package/dist/components/color-palette/color-palette-utils.js +105 -41
- package/dist/components/color-palette/color-palette.js +429 -337
- package/dist/components/color-palette/component/color-palette-component.js +184 -142
- package/dist/components/color-palette/component/color-palette-component.stories.js +74 -0
- package/dist/components/color-palette/component/index.js +1 -0
- package/dist/components/color-palette/editor/color-palette-editor.js +702 -591
- package/dist/components/color-palette/editor/color-palette-editor.stories.js +39 -0
- package/dist/components/color-palette/editor/index.js +1 -0
- package/dist/components/color-palette/index.js +5 -7
- package/dist/components/color-palette/item/color-palette-item-edit.js +114 -87
- package/dist/components/color-palette/item/color-palette-item.js +155 -140
- package/dist/components/color-palette/item/index.js +2 -0
- package/dist/components/color-palette/menu/color-palette-menu.js +241 -217
- package/dist/components/color-palette/menu/color-palette-reorder.js +117 -103
- package/dist/components/color-palette/menu/index.js +2 -0
- package/dist/components/color-palette/storybook/color-palette-invalid.stories.js +90 -0
- package/dist/components/color-palette/storybook/color-palette-valid.stories.js +295 -0
- package/dist/components/color-palette/storybook/color-palette.stories.js +76 -0
- package/dist/components/tool-tip/Tooltip2.js +103 -0
- package/dist/components/tool-tip/index.js +1 -1
- package/dist/components/tool-tip/tool-tip.d.ts +1 -0
- package/dist/components/tool-tip/tool-tip.d.ts.map +1 -1
- package/dist/components/tool-tip/tool-tip.js +125 -102
- package/dist/components/tool-tip/tool-tip.stories.js +30 -0
- package/dist/index.js +6 -14
- package/dist/utils/EventEmitter.js +23 -23
- package/dist/utils/basicUtils.js +149 -32
- package/dist/utils/dragDropUtils.js +121 -0
- package/dist/utils/generateUtils.js +73 -39
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/utils/types.js +1 -0
- package/package.json +1 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/_virtual/x11.js +0 -4
- package/dist/node_modules/colorsea/colors/x11.js +0 -14
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { Combination, generateColors } from '../../../utils/generateUtils';
|
|
3
|
+
import { ref } from 'lit/directives/ref.js';
|
|
4
|
+
import { ColorPaletteEditor } from './color-palette-editor';
|
|
5
|
+
import { defaultSettings } from '../color-palette-utils';
|
|
6
|
+
import { pluginToPaletteSettings } from '../../../utils/basicUtils';
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Color Palette/Palette Editor',
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
component: 'color-palette-editor',
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
function setEditorEvents(editor) {
|
|
14
|
+
if (!(editor instanceof ColorPaletteEditor))
|
|
15
|
+
return;
|
|
16
|
+
editor.emitter.clear();
|
|
17
|
+
editor.emitter.on('submit', (colors, settings) => {
|
|
18
|
+
alert(`colors ${colors} settings ${JSON.stringify(settings)}`);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
const Template = {
|
|
22
|
+
render: ({ colors, settings }) => {
|
|
23
|
+
return html `
|
|
24
|
+
<color-palette-editor
|
|
25
|
+
.colors=${colors}
|
|
26
|
+
.settings=${settings}
|
|
27
|
+
${ref(setEditorEvents)}
|
|
28
|
+
>
|
|
29
|
+
</color-palette-editor>
|
|
30
|
+
`;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
export const Default = {
|
|
34
|
+
...Template,
|
|
35
|
+
args: {
|
|
36
|
+
colors: generateColors(Combination.Random).colors,
|
|
37
|
+
settings: pluginToPaletteSettings(defaultSettings)
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './color-palette-editor';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "./component/color-palette-component.js";
|
|
7
|
-
import "./editor/color-palette-editor.js";
|
|
1
|
+
import './color-palette';
|
|
2
|
+
import './item';
|
|
3
|
+
import './menu';
|
|
4
|
+
import './component';
|
|
5
|
+
import './editor';
|
|
@@ -1,91 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, css } from 'lit';
|
|
8
|
+
import { customElement } from 'lit/decorators.js';
|
|
9
|
+
import { EventEmitter } from "../../../utils/EventEmitter";
|
|
10
|
+
import { ColorPaletteItem } from "./color-palette-item";
|
|
11
|
+
import { createElement, Trash2 } from 'lucide';
|
|
12
|
+
let ColorPaletteItemEdit = class ColorPaletteItemEdit extends ColorPaletteItem {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.storedAlias = '';
|
|
16
|
+
this.emitter = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
content() {
|
|
19
|
+
return html `
|
|
20
|
+
<input
|
|
21
|
+
value=${this.alias || this.color}
|
|
22
|
+
@pointerdown=${(e) => {
|
|
23
|
+
// Focus color & allow for editing alias
|
|
24
|
+
if (!(e.target instanceof HTMLInputElement))
|
|
25
|
+
return;
|
|
26
|
+
e.stopPropagation();
|
|
27
|
+
this.storedAlias = e.target.value;
|
|
28
|
+
e.target.value = '';
|
|
29
|
+
e.target.focus();
|
|
30
|
+
}}
|
|
31
|
+
@contextmenu=${(e) => {
|
|
32
|
+
// Remove alias on right click
|
|
33
|
+
if (!(e.target instanceof HTMLInputElement))
|
|
34
|
+
return;
|
|
35
|
+
e.stopPropagation();
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
e.target.value = this.color.toUpperCase();
|
|
38
|
+
this.alias = '';
|
|
39
|
+
e.target.blur();
|
|
40
|
+
}}
|
|
41
|
+
@keypress=${(e) => {
|
|
42
|
+
if (!(e.target instanceof HTMLInputElement))
|
|
43
|
+
return;
|
|
44
|
+
if (e.key === 'Enter')
|
|
45
|
+
e.target.blur();
|
|
46
|
+
}}
|
|
47
|
+
@focusout=${(e) => {
|
|
48
|
+
// Set alias if changed & de-focus
|
|
49
|
+
if (!(e.target instanceof HTMLInputElement))
|
|
50
|
+
return;
|
|
51
|
+
// Reset input text to stored if user left it empty
|
|
52
|
+
if (e.target.value.trim() === '')
|
|
53
|
+
e.target.value = this.storedAlias;
|
|
54
|
+
// Set alias color if user modified text
|
|
55
|
+
else if (e.target.value !== this.color) {
|
|
56
|
+
this.alias = e.target.value;
|
|
57
|
+
}
|
|
58
|
+
this.emitter.emit('alias', this.alias);
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
<button
|
|
62
|
+
id='trash'
|
|
63
|
+
title='Remove'
|
|
64
|
+
@click=${(e) => this.emitter.emit('trash', e)}
|
|
65
|
+
>
|
|
66
|
+
${createElement(Trash2)}
|
|
67
|
+
</button>
|
|
39
68
|
`;
|
|
40
|
-
|
|
69
|
+
}
|
|
41
70
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
:host(:not([preventHover]):hover) {
|
|
46
|
-
flex-basis: 0 !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#container {
|
|
50
|
-
input {
|
|
51
|
-
color: var(--palette-item-color);
|
|
52
|
-
font-size: var(--palette-item-font-size);
|
|
53
|
-
font-weight: bold;
|
|
54
|
-
user-select: none;
|
|
55
|
-
border: none;
|
|
56
|
-
background-color: transparent;
|
|
57
|
-
field-sizing: content;
|
|
58
|
-
min-width: 2rem;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
text-align: center;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Color Trash Button */
|
|
64
|
-
#trash {
|
|
65
|
-
background-color: var(--palette-item-background-color);
|
|
66
|
-
color: var(--palette-item-color);
|
|
67
|
-
box-shadow: rgba(0, 0, 0, 0.35) 0px -50px 20px -28px inset;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
|
|
70
|
-
border: none;
|
|
71
|
-
border-radius: 5px;
|
|
72
|
-
padding: 4px 12px;
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
background-color: rgb(75, 75, 75);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
svg {
|
|
79
|
-
width: 18px;
|
|
80
|
-
height: 18px;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
71
|
+
ColorPaletteItemEdit.styles = [
|
|
72
|
+
...(void 0).styles,
|
|
73
|
+
css `
|
|
74
|
+
:host(:not([preventHover]):hover) {
|
|
75
|
+
flex-basis: 0 !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
#container {
|
|
79
|
+
input {
|
|
80
|
+
color: var(--palette-item-color);
|
|
81
|
+
font-size: var(--palette-item-font-size);
|
|
82
|
+
font-weight: bold;
|
|
83
|
+
user-select: none;
|
|
84
|
+
border: none;
|
|
85
|
+
background-color: transparent;
|
|
86
|
+
field-sizing: content;
|
|
87
|
+
min-width: 2rem;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
text-align: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Color Trash Button */
|
|
93
|
+
#trash {
|
|
94
|
+
background-color: var(--palette-item-background-color);
|
|
95
|
+
color: var(--palette-item-color);
|
|
96
|
+
box-shadow: rgba(0, 0, 0, 0.35) 0px -50px 20px -28px inset;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
|
|
99
|
+
border: none;
|
|
100
|
+
border-radius: 5px;
|
|
101
|
+
padding: 4px 12px;
|
|
102
|
+
|
|
103
|
+
&:hover {
|
|
104
|
+
background-color: rgb(75, 75, 75);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
svg {
|
|
108
|
+
width: 18px;
|
|
109
|
+
height: 18px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
84
113
|
`
|
|
85
114
|
];
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
],
|
|
89
|
-
export {
|
|
90
|
-
a as ColorPaletteItemEdit
|
|
91
|
-
};
|
|
115
|
+
ColorPaletteItemEdit = __decorate([
|
|
116
|
+
customElement('color-palette-item-edit')
|
|
117
|
+
], ColorPaletteItemEdit);
|
|
118
|
+
export { ColorPaletteItemEdit };
|
|
@@ -1,146 +1,161 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { getForegroundColor as b, getAdjustedFontSize as C } from "../../../utils/basicUtils.js";
|
|
7
|
-
var M = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, e = (r, l, a, n) => {
|
|
8
|
-
for (var i = n > 1 ? void 0 : n ? $(l, a) : l, c = r.length - 1, p; c >= 0; c--)
|
|
9
|
-
(p = r[c]) && (i = (n ? p(l, a, i) : p(i)) || i);
|
|
10
|
-
return n && i && M(l, a, i), i;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
6
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
7
|
+
import { LitElement, html, css, nothing } from 'lit';
|
|
8
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
9
|
+
import { AliasMode, defaultSettings } from '../color-palette-utils';
|
|
10
|
+
import { EventEmitter } from '../../../utils/EventEmitter';
|
|
11
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
12
|
+
import { getAdjustedFontSize, getForegroundColor } from '../../../utils/basicUtils';
|
|
13
|
+
let ColorPaletteItem = class ColorPaletteItem extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.color = '';
|
|
17
|
+
this.alias = '';
|
|
18
|
+
this.aliasMode = defaultSettings.aliasMode;
|
|
19
|
+
this.direction = defaultSettings.direction;
|
|
20
|
+
this.editMode = false;
|
|
21
|
+
this.height = defaultSettings.height;
|
|
22
|
+
this.preventHover = false;
|
|
23
|
+
this.hoverWhileEditing = false;
|
|
24
|
+
this.colorCount = 0;
|
|
25
|
+
this.emitter = new EventEmitter();
|
|
26
|
+
}
|
|
27
|
+
disconnectedCallback() {
|
|
28
|
+
super.disconnectedCallback();
|
|
29
|
+
this.emitter.clear();
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
const containerStyles = {
|
|
33
|
+
'--palette-item-background-color': this.color,
|
|
34
|
+
'--palette-item-color': getForegroundColor(this.color),
|
|
35
|
+
'--palette-item-font-size': `${getAdjustedFontSize(this.colorCount)}px`
|
|
36
|
+
};
|
|
37
|
+
return html `
|
|
38
|
+
<div
|
|
39
|
+
id='container'
|
|
40
|
+
style=${styleMap(containerStyles)}
|
|
41
|
+
@click=${(e) => this.emitter.emit('click', e)}
|
|
42
|
+
>
|
|
43
|
+
${this.content()}
|
|
44
|
+
</div>
|
|
33
45
|
`;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
${
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
}
|
|
47
|
+
content() {
|
|
48
|
+
// Display hex if alias mode is set to both OR if alias is not set
|
|
49
|
+
const showText = this.aliasMode === AliasMode.Both || this.alias == null || this.alias.trim() === '';
|
|
50
|
+
return html `
|
|
51
|
+
${showText
|
|
52
|
+
? html `<span id='text'>${this.color.trim().toUpperCase()}</span>`
|
|
53
|
+
: nothing}
|
|
54
|
+
${this.alias !== ''
|
|
55
|
+
? html `
|
|
56
|
+
<span id="alias">${this.alias}</span>
|
|
57
|
+
`
|
|
58
|
+
: nothing}
|
|
59
|
+
|
|
43
60
|
`;
|
|
44
|
-
|
|
61
|
+
}
|
|
45
62
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
:host {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex: 1;
|
|
51
|
-
transition: all 0.1s ease-in-out;
|
|
52
|
-
--palette-item-background-color: #000000;
|
|
53
|
-
--palette-item-color: #ffffff;
|
|
54
|
-
--palette-item-font-size: 16px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host(:not([preventHover]):hover) {
|
|
58
|
-
flex-basis: var(--palette-column-flex-basis);
|
|
59
|
-
|
|
60
|
-
#container > span {
|
|
61
|
-
display: block;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host([direction='column']:not([preventHover]):hover) {
|
|
66
|
-
flex-basis: 80px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
:host([direction='column']) > #container{
|
|
70
|
-
display: flex;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
:host([direction='row']) > #container {
|
|
76
|
-
display: flex;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
:host([direction='row'][editMode]) > #container {
|
|
81
|
-
display: grid;
|
|
82
|
-
grid-template-columns: 1fr 1fr;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
#container {
|
|
86
|
-
flex: 1;
|
|
87
|
-
gap: 3%;
|
|
88
|
-
background-color: var(--palette-item-background-color);
|
|
89
|
-
color: var(--palette-item-color);
|
|
90
|
-
|
|
91
|
-
*:first-child {
|
|
92
|
-
justify-self: flex-end;
|
|
93
|
-
align-self: center;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
*:last-child {
|
|
97
|
-
justify-self: flex-start;
|
|
98
|
-
align-self: center;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
span {
|
|
102
|
-
display: none;
|
|
103
|
-
text-align: center;
|
|
104
|
-
font-size: 100%;
|
|
105
|
-
font-weight: bold;
|
|
106
|
-
user-select: none;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
63
|
+
ColorPaletteItem.styles = [
|
|
64
|
+
css `
|
|
65
|
+
:host {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex: 1;
|
|
68
|
+
transition: all 0.1s ease-in-out;
|
|
69
|
+
--palette-item-background-color: #000000;
|
|
70
|
+
--palette-item-color: #ffffff;
|
|
71
|
+
--palette-item-font-size: 16px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host(:not([preventHover]):hover) {
|
|
75
|
+
flex-basis: var(--palette-column-flex-basis);
|
|
76
|
+
|
|
77
|
+
#container > span {
|
|
78
|
+
display: block;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([direction='column']:not([preventHover]):hover) {
|
|
83
|
+
flex-basis: 80px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host([direction='column']) > #container{
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host([direction='row']) > #container {
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host([direction='row'][editMode]) > #container {
|
|
98
|
+
display: grid;
|
|
99
|
+
grid-template-columns: 1fr 1fr;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#container {
|
|
103
|
+
flex: 1;
|
|
104
|
+
gap: 3%;
|
|
105
|
+
background-color: var(--palette-item-background-color);
|
|
106
|
+
color: var(--palette-item-color);
|
|
107
|
+
|
|
108
|
+
*:first-child {
|
|
109
|
+
justify-self: flex-end;
|
|
110
|
+
align-self: center;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
*:last-child {
|
|
114
|
+
justify-self: flex-start;
|
|
115
|
+
align-self: center;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
span {
|
|
119
|
+
display: none;
|
|
120
|
+
text-align: center;
|
|
121
|
+
font-size: 100%;
|
|
122
|
+
font-weight: bold;
|
|
123
|
+
user-select: none;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
109
126
|
`
|
|
110
127
|
];
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
],
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
],
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
],
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
],
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
],
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
],
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
],
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
],
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
],
|
|
144
|
-
export {
|
|
145
|
-
t as ColorPaletteItem
|
|
146
|
-
};
|
|
128
|
+
__decorate([
|
|
129
|
+
query('#container')
|
|
130
|
+
], ColorPaletteItem.prototype, "container", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ type: String })
|
|
133
|
+
], ColorPaletteItem.prototype, "color", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: String })
|
|
136
|
+
], ColorPaletteItem.prototype, "alias", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ type: String })
|
|
139
|
+
], ColorPaletteItem.prototype, "aliasMode", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
property({ type: String, reflect: true })
|
|
142
|
+
], ColorPaletteItem.prototype, "direction", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
property({ type: Boolean, reflect: true })
|
|
145
|
+
], ColorPaletteItem.prototype, "editMode", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
property({ type: Number })
|
|
148
|
+
], ColorPaletteItem.prototype, "height", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
property({ type: Boolean, reflect: true })
|
|
151
|
+
], ColorPaletteItem.prototype, "preventHover", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
property({ type: Boolean })
|
|
154
|
+
], ColorPaletteItem.prototype, "hoverWhileEditing", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({ type: Number })
|
|
157
|
+
], ColorPaletteItem.prototype, "colorCount", void 0);
|
|
158
|
+
ColorPaletteItem = __decorate([
|
|
159
|
+
customElement('color-palette-item')
|
|
160
|
+
], ColorPaletteItem);
|
|
161
|
+
export { ColorPaletteItem };
|