@nectary/labs 2.0.9 → 2.1.1
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 -0
- package/package.json +8 -5
- package/lib/color-select.d.ts +0 -14
- package/lib/color-select.js +0 -76
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -2
package/Readme.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Nectary labs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nectary/labs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib/"
|
|
6
6
|
],
|
|
@@ -8,17 +8,20 @@
|
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "NODE_ENV=production && rimraf lib/ && tsc
|
|
11
|
+
"build": "NODE_ENV=production && rimraf lib/ && tsc"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@
|
|
14
|
+
"@lit-labs/scoped-registry-mixin": "^1.0.3",
|
|
15
|
+
"@nectary/components": "3.3.4",
|
|
16
|
+
"solid-element": "1.8.1",
|
|
17
|
+
"solid-js": "1.8.19"
|
|
15
18
|
},
|
|
16
19
|
"devDependencies": {
|
|
17
20
|
"@types/node": "^18.17.17",
|
|
18
21
|
"@types/react": "^18.2.21",
|
|
19
22
|
"lit": "^3.1.2",
|
|
23
|
+
"rimraf": "^3.0.2",
|
|
20
24
|
"ts-node": "^10.9.1",
|
|
21
|
-
"typescript": "^5.2.2"
|
|
22
|
-
"rimraf": "^3.0.2"
|
|
25
|
+
"typescript": "^5.2.2"
|
|
23
26
|
}
|
|
24
27
|
}
|
package/lib/color-select.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import '@nectary/components/color-menu';
|
|
2
|
-
import '@nectary/components/color-menu-option';
|
|
3
|
-
import '@nectary/components/color-swatch';
|
|
4
|
-
import '@nectary/components/popover';
|
|
5
|
-
import '@nectary/components/select-button';
|
|
6
|
-
import { LitElement } from 'lit';
|
|
7
|
-
export declare class ColorSelect extends LitElement {
|
|
8
|
-
open: boolean;
|
|
9
|
-
value: string;
|
|
10
|
-
onClose(): void;
|
|
11
|
-
onOpen(): void;
|
|
12
|
-
onChange(e: CustomEvent<string>): void;
|
|
13
|
-
render(): import("lit").TemplateResult<1>;
|
|
14
|
-
}
|
package/lib/color-select.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
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 '@nectary/components/color-menu';
|
|
8
|
-
import '@nectary/components/color-menu-option';
|
|
9
|
-
import '@nectary/components/color-swatch';
|
|
10
|
-
import '@nectary/components/popover';
|
|
11
|
-
import '@nectary/components/select-button';
|
|
12
|
-
import { html, LitElement } from 'lit';
|
|
13
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
14
|
-
const vibrantColorNames = [
|
|
15
|
-
'violet',
|
|
16
|
-
'blue',
|
|
17
|
-
'green',
|
|
18
|
-
'yellow',
|
|
19
|
-
'orange',
|
|
20
|
-
'red',
|
|
21
|
-
'pink',
|
|
22
|
-
'gray',
|
|
23
|
-
];
|
|
24
|
-
let ColorSelect = class ColorSelect extends LitElement {
|
|
25
|
-
open = false;
|
|
26
|
-
value = '';
|
|
27
|
-
onClose() {
|
|
28
|
-
this.open = false;
|
|
29
|
-
}
|
|
30
|
-
onOpen() {
|
|
31
|
-
this.open = true;
|
|
32
|
-
}
|
|
33
|
-
onChange(e) {
|
|
34
|
-
this.value = e.detail;
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return html `
|
|
38
|
-
<sinch-popover
|
|
39
|
-
open=${this.open}
|
|
40
|
-
aria-label="Select color"
|
|
41
|
-
orientation="bottom-right"
|
|
42
|
-
modal
|
|
43
|
-
@close=${this.onClose}
|
|
44
|
-
>
|
|
45
|
-
<sinch-select-button
|
|
46
|
-
slot="target"
|
|
47
|
-
text=${this.value}
|
|
48
|
-
placeholder="Select color"
|
|
49
|
-
aria-label="Open color select"
|
|
50
|
-
@click=${this.onOpen}
|
|
51
|
-
>
|
|
52
|
-
<sinch-color-swatch slot="icon" name="${this.value}" />
|
|
53
|
-
</sinch-select-button>
|
|
54
|
-
<sinch-color-menu
|
|
55
|
-
slot="content"
|
|
56
|
-
value=${this.value}
|
|
57
|
-
aria-label="Color menu"
|
|
58
|
-
@change=${this.onChange}
|
|
59
|
-
>
|
|
60
|
-
${vibrantColorNames.map((c) => html `<sinch-color-menu-option value=${c} />`)}
|
|
61
|
-
</sinch-color-menu>
|
|
62
|
-
</sinch-popover>
|
|
63
|
-
</sinch-color-menu></sinch-popover>
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
__decorate([
|
|
68
|
-
property({ type: 'boolean' })
|
|
69
|
-
], ColorSelect.prototype, "open", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
property()
|
|
72
|
-
], ColorSelect.prototype, "value", void 0);
|
|
73
|
-
ColorSelect = __decorate([
|
|
74
|
-
customElement('sinch-color-select')
|
|
75
|
-
], ColorSelect);
|
|
76
|
-
export { ColorSelect };
|
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED