@supersoniks/concorde 1.1.9 → 1.1.12
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/core/components/functional/configuration/configuration.d.ts +5 -0
- package/core/components/functional/configuration/configuration.js +21 -0
- package/core/components/functional/date/date.js +3 -2
- package/core/components/functional/fetch/fetch.d.ts +32 -11
- package/core/components/functional/fetch/fetch.js +28 -12
- package/core/components/functional/functional.d.ts +1 -0
- package/core/components/functional/functional.js +1 -0
- package/core/components/functional/list/list.d.ts +15 -7
- package/core/components/functional/list/list.js +50 -20
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +5 -0
- package/core/components/functional/sonic-scope/sonic-scope.js +20 -0
- package/core/components/functional/states/states.js +0 -2
- package/core/components/functional/submit/submit.d.ts +2 -0
- package/core/components/functional/submit/submit.js +23 -8
- package/core/components/ui/alert/alert.js +4 -5
- package/core/components/ui/badge/badge.js +0 -1
- package/core/components/ui/button/button.d.ts +11 -3
- package/core/components/ui/button/button.js +20 -17
- package/core/components/ui/card/card-footer.d.ts +5 -0
- package/core/components/ui/card/card-footer.js +27 -0
- package/core/components/ui/card/card-header-descripton.d.ts +5 -0
- package/core/components/ui/card/card-header-descripton.js +33 -0
- package/core/components/ui/card/card-header.d.ts +8 -0
- package/core/components/ui/card/card-header.js +67 -0
- package/core/components/ui/card/card-main.d.ts +5 -0
- package/core/components/ui/card/card-main.js +29 -0
- package/core/components/ui/card/card.d.ts +12 -0
- package/core/components/ui/card/card.js +90 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +4 -4
- package/core/components/ui/form/checkbox/checkbox.js +3 -4
- package/core/components/ui/form/css/form-control.js +2 -0
- package/core/components/ui/form/fieldset/fieldset.js +1 -1
- package/core/components/ui/form/fieldset/legend-description.d.ts +5 -0
- package/core/components/ui/form/fieldset/legend-description.js +35 -0
- package/core/components/ui/form/fieldset/legend.d.ts +4 -5
- package/core/components/ui/form/fieldset/legend.js +21 -25
- package/core/components/ui/form/input/input.d.ts +3 -3
- package/core/components/ui/form/input/input.js +3 -3
- package/core/components/ui/form/textarea/textarea.d.ts +2 -2
- package/core/components/ui/form/textarea/textarea.js +2 -2
- package/core/components/ui/icon/icon.d.ts +16 -4
- package/core/components/ui/icon/icon.js +52 -6
- package/core/components/ui/icon/icons.d.ts +3 -2
- package/core/components/ui/icon/icons.js +78 -7
- package/core/components/ui/icon/icons.json +1 -1
- package/core/components/ui/link/link.d.ts +10 -1
- package/core/components/ui/link/link.js +21 -2
- package/core/components/ui/menu/menu.d.ts +11 -5
- package/core/components/ui/menu/menu.js +81 -35
- package/core/components/ui/pop/pop.js +5 -2
- package/core/components/ui/progress/progress.d.ts +9 -0
- package/core/components/ui/progress/progress.js +138 -0
- package/core/components/ui/table/table-caption.d.ts +5 -0
- package/core/components/ui/table/table-caption.js +24 -0
- package/core/components/ui/table/table-tbody.d.ts +5 -0
- package/core/components/ui/table/table-tbody.js +37 -0
- package/core/components/ui/table/table-td.d.ts +7 -0
- package/core/components/ui/table/table-td.js +45 -0
- package/core/components/ui/table/table-tfoot.d.ts +5 -0
- package/core/components/ui/table/table-tfoot.js +23 -0
- package/core/components/ui/table/table-th.d.ts +6 -0
- package/core/components/ui/table/table-th.js +43 -0
- package/core/components/ui/table/table-thead.d.ts +5 -0
- package/core/components/ui/table/table-thead.js +24 -0
- package/core/components/ui/table/table-tr.d.ts +5 -0
- package/core/components/ui/table/table-tr.js +24 -0
- package/core/components/ui/table/table.d.ts +16 -0
- package/core/components/ui/table/table.js +88 -0
- package/core/components/ui/tabs/tabs.d.ts +1 -0
- package/core/components/ui/tabs/tabs.js +7 -3
- package/core/components/ui/theme/theme-collection/core-variables.js +1 -1
- package/core/components/ui/theme/theme-collection/dark.js +3 -2
- package/core/components/ui/theme/theme-collection/light.js +1 -0
- package/core/components/ui/tooltip/tooltip.d.ts +1 -1
- package/core/components/ui/tooltip/tooltip.js +4 -4
- package/core/components/ui/ui.d.ts +3 -3
- package/core/components/ui/ui.js +5 -3
- package/core/mixins/Fetcher.d.ts +11 -9
- package/core/mixins/Fetcher.js +22 -4
- package/core/mixins/FormCheckable.d.ts +2 -2
- package/core/mixins/FormInput.d.ts +2 -2
- package/core/mixins/Subscriber.d.ts +2 -2
- package/core/mixins/Subscriber.js +0 -15
- package/core/utils/Electron.d.ts +3 -0
- package/core/utils/Electron.js +8 -0
- package/core/utils/LocationHandler.d.ts +2 -1
- package/core/utils/LocationHandler.js +25 -2
- package/core/utils/Objects.d.ts +2 -1
- package/core/utils/Objects.js +8 -2
- package/core/utils/PublisherProxy.mjs +42 -12
- package/core/utils/api.js +1 -1
- package/package.json +40 -1
|
@@ -31,7 +31,7 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
31
31
|
this.size = "";
|
|
32
32
|
this.list = null;
|
|
33
33
|
this.placeholder = "";
|
|
34
|
-
this.readonly =
|
|
34
|
+
this.readonly = false;
|
|
35
35
|
this.pattern = null;
|
|
36
36
|
this.min = null;
|
|
37
37
|
this.max = null;
|
|
@@ -79,9 +79,9 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
79
79
|
class="form-element input"
|
|
80
80
|
type=${this.type}
|
|
81
81
|
@input=${this.handleChange}
|
|
82
|
-
disabled
|
|
82
|
+
?disabled=${this.disabled}
|
|
83
|
+
?readonly=${this.readonly}
|
|
83
84
|
list=${ifDefined(this.list)}
|
|
84
|
-
readonly=${ifDefined(this.readonly)}
|
|
85
85
|
autofocus=${ifDefined(this.autofocus)}
|
|
86
86
|
required=${ifDefined(this.required)}
|
|
87
87
|
tabindex=${ifDefined(this.tabindex)}
|
|
@@ -18,15 +18,15 @@ declare const Textarea_base: {
|
|
|
18
18
|
_name: string;
|
|
19
19
|
name: string;
|
|
20
20
|
props: any;
|
|
21
|
+
isConnected: boolean;
|
|
21
22
|
getAncestorAttributeValue(attributeName: string): string;
|
|
22
23
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
23
24
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
24
25
|
publisher: any;
|
|
25
|
-
dataProvider:
|
|
26
|
+
dataProvider: string | null;
|
|
26
27
|
noShadowDom: string | null;
|
|
27
28
|
debug: HTMLElement | null;
|
|
28
29
|
defferedDebug: boolean | null;
|
|
29
|
-
makeShadow(props: Record<string, any>, value: any): any;
|
|
30
30
|
dispatchEvent(event: Event): void;
|
|
31
31
|
setAttribute(name: string, value: string): void;
|
|
32
32
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
@@ -56,14 +56,14 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
|
|
|
56
56
|
<div class="form-control">
|
|
57
57
|
<textarea
|
|
58
58
|
@input=${this.handleChange}
|
|
59
|
-
disabled=${
|
|
59
|
+
?disabled=${this.disabled}
|
|
60
60
|
autocomplete=${ifDefined(this.autocomplete)}
|
|
61
61
|
autofocus=${ifDefined(this.autofocus)}
|
|
62
62
|
rows=${ifDefined(this.rows)}
|
|
63
63
|
cols=${ifDefined(this.cols)}
|
|
64
64
|
maxlength=${ifDefined(this.maxlength)}
|
|
65
65
|
minlength=${ifDefined(this.minlength)}
|
|
66
|
-
readonly=${
|
|
66
|
+
?readonly=${this.readonly}
|
|
67
67
|
spellcheck=${ifDefined(this.spellcheck)}
|
|
68
68
|
wrap=${ifDefined(this.wrap)}
|
|
69
69
|
class="form-element textarea"
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import { LitElement
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
3
|
* Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
|
|
4
4
|
* les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
|
|
5
5
|
*/
|
|
6
6
|
export declare class Icon extends LitElement {
|
|
7
7
|
static styles: import("lit").CSSResult;
|
|
8
|
+
updateIcon(): Promise<void>;
|
|
9
|
+
iconText: any;
|
|
8
10
|
/**
|
|
9
11
|
* Nom identifiant l'icone ex : *info*
|
|
10
12
|
*/
|
|
11
|
-
|
|
13
|
+
private _name;
|
|
14
|
+
get name(): string;
|
|
15
|
+
set name(newName: string);
|
|
12
16
|
/**
|
|
13
17
|
* prefix de l'icone si nécessaire ex: *solid*. La valeur par défaut est "" qui est mappée sur *regular*
|
|
14
18
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
private _prefix;
|
|
20
|
+
get prefix(): string;
|
|
21
|
+
set prefix(newPrefix: string);
|
|
22
|
+
/**
|
|
23
|
+
* library de l'icone url vers un dossier en lign conenant des icônes
|
|
24
|
+
*/
|
|
25
|
+
private _library;
|
|
26
|
+
get library(): string;
|
|
27
|
+
set library(newLibrary: string);
|
|
28
|
+
render(): any;
|
|
17
29
|
}
|
|
@@ -4,7 +4,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
import { LitElement, css, nothing } from "lit";
|
|
8
17
|
import { customElement, property } from "lit/decorators.js";
|
|
9
18
|
import Icons from "./icons";
|
|
10
19
|
/**
|
|
@@ -14,14 +23,48 @@ import Icons from "./icons";
|
|
|
14
23
|
let Icon = class Icon extends LitElement {
|
|
15
24
|
constructor() {
|
|
16
25
|
super(...arguments);
|
|
26
|
+
this.iconText = "";
|
|
17
27
|
/**
|
|
18
28
|
* Nom identifiant l'icone ex : *info*
|
|
19
29
|
*/
|
|
20
|
-
this.
|
|
30
|
+
this._name = "";
|
|
21
31
|
/**
|
|
22
32
|
* prefix de l'icone si nécessaire ex: *solid*. La valeur par défaut est "" qui est mappée sur *regular*
|
|
23
33
|
*/
|
|
24
|
-
this.
|
|
34
|
+
this._prefix = "";
|
|
35
|
+
/**
|
|
36
|
+
* library de l'icone url vers un dossier en lign conenant des icônes
|
|
37
|
+
*/
|
|
38
|
+
this._library = "";
|
|
39
|
+
}
|
|
40
|
+
updateIcon() {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
if (!this.name)
|
|
43
|
+
return;
|
|
44
|
+
this.iconText = yield Icons.default.get({ name: this.name, prefix: this.prefix, library: this.library });
|
|
45
|
+
this.requestUpdate();
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
get name() {
|
|
49
|
+
return this._name;
|
|
50
|
+
}
|
|
51
|
+
set name(newName) {
|
|
52
|
+
this._name = newName;
|
|
53
|
+
this.updateIcon();
|
|
54
|
+
}
|
|
55
|
+
get prefix() {
|
|
56
|
+
return this._prefix;
|
|
57
|
+
}
|
|
58
|
+
set prefix(newPrefix) {
|
|
59
|
+
this._prefix = newPrefix;
|
|
60
|
+
this.updateIcon();
|
|
61
|
+
}
|
|
62
|
+
get library() {
|
|
63
|
+
return this._library;
|
|
64
|
+
}
|
|
65
|
+
set library(newLibrary) {
|
|
66
|
+
this._library = newLibrary;
|
|
67
|
+
this.updateIcon();
|
|
25
68
|
}
|
|
26
69
|
render() {
|
|
27
70
|
if (!this.name) {
|
|
@@ -29,7 +72,7 @@ let Icon = class Icon extends LitElement {
|
|
|
29
72
|
return nothing;
|
|
30
73
|
}
|
|
31
74
|
this.style.removeProperty("display");
|
|
32
|
-
return
|
|
75
|
+
return this.iconText;
|
|
33
76
|
}
|
|
34
77
|
};
|
|
35
78
|
Icon.styles = css `
|
|
@@ -78,10 +121,13 @@ Icon.styles = css `
|
|
|
78
121
|
`;
|
|
79
122
|
__decorate([
|
|
80
123
|
property({ type: String })
|
|
81
|
-
], Icon.prototype, "name",
|
|
124
|
+
], Icon.prototype, "name", null);
|
|
125
|
+
__decorate([
|
|
126
|
+
property({ type: String })
|
|
127
|
+
], Icon.prototype, "prefix", null);
|
|
82
128
|
__decorate([
|
|
83
129
|
property({ type: String })
|
|
84
|
-
], Icon.prototype, "
|
|
130
|
+
], Icon.prototype, "library", null);
|
|
85
131
|
Icon = __decorate([
|
|
86
132
|
customElement("sonic-icon")
|
|
87
133
|
], Icon);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export declare type IconConf = {
|
|
2
2
|
name: string;
|
|
3
3
|
prefix?: string;
|
|
4
|
+
library?: string;
|
|
4
5
|
};
|
|
5
6
|
export default class Icons {
|
|
6
7
|
static fontAwesomeNext: {
|
|
7
|
-
get: (params: IconConf) => import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/unsafe-html").UnsafeHTMLDirective
|
|
8
|
+
get: (params: IconConf) => Promise<import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/unsafe-html").UnsafeHTMLDirective>>;
|
|
8
9
|
};
|
|
9
10
|
static registerIcons(newIcons: Record<string, Record<string, string>>): void;
|
|
10
11
|
static default: {
|
|
11
|
-
get: (params: IconConf) => import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/unsafe-html").UnsafeHTMLDirective
|
|
12
|
+
get: (params: IconConf) => Promise<import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/unsafe-html").UnsafeHTMLDirective>>;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
@@ -1,6 +1,32 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var _a;
|
|
1
11
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
2
12
|
import icons from "./icons.json";
|
|
3
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Ce tableau static permet de ne pas appeler plusieurs fois le même service lors d'appel concurrents en GET.
|
|
15
|
+
*/
|
|
16
|
+
const loadingGetPromises = new Map();
|
|
17
|
+
/**
|
|
18
|
+
* Les librairies en ligne.
|
|
19
|
+
* Pour chaque identifiant de librairie a une template d'url de chargement
|
|
20
|
+
* Les propriétés name et prefix de sonic-icon servent à remplir le template.
|
|
21
|
+
* la propriété library de sonic-icon correspond à une clef de librairies.
|
|
22
|
+
*/
|
|
23
|
+
const libraries = {
|
|
24
|
+
heroicons: "https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",
|
|
25
|
+
iconoir: "https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg",
|
|
26
|
+
feathers: "https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg",
|
|
27
|
+
material: "https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",
|
|
28
|
+
fontAwesome: "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",
|
|
29
|
+
};
|
|
4
30
|
export default class Icons {
|
|
5
31
|
static registerIcons(newIcons) {
|
|
6
32
|
const record = icons;
|
|
@@ -14,12 +40,57 @@ export default class Icons {
|
|
|
14
40
|
}
|
|
15
41
|
}
|
|
16
42
|
}
|
|
43
|
+
_a = Icons;
|
|
17
44
|
Icons.fontAwesomeNext = {
|
|
18
|
-
get: (params) => {
|
|
19
|
-
var
|
|
20
|
-
let prefix = ((
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
45
|
+
get: (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
|
+
var _b;
|
|
47
|
+
let prefix = ((_b = params.prefix) === null || _b === void 0 ? void 0 : _b.replace("far", "regular").replace("fas", "solid")) || "regular";
|
|
48
|
+
let library = params.library;
|
|
49
|
+
let name = params.name || "";
|
|
50
|
+
const iconsAsRecord = icons;
|
|
51
|
+
/**
|
|
52
|
+
* SVGS en ligne
|
|
53
|
+
*/
|
|
54
|
+
if (library && libraries[library]) {
|
|
55
|
+
let libIcons = iconsAsRecord[library];
|
|
56
|
+
if (!libIcons)
|
|
57
|
+
libIcons = iconsAsRecord[library] = {};
|
|
58
|
+
/**
|
|
59
|
+
* Si l'icone a déjà été chargée on ne la recharge pas
|
|
60
|
+
*/
|
|
61
|
+
if (libIcons[name])
|
|
62
|
+
return unsafeHTML(libIcons[name]);
|
|
63
|
+
let url = libraries[library].replace("$prefix", params.prefix).replace("$name", name);
|
|
64
|
+
/**
|
|
65
|
+
* on utilise une promise mutualisée pour ne pas faire plusieurs appels concurents d'une même icone
|
|
66
|
+
*/
|
|
67
|
+
if (libIcons[name])
|
|
68
|
+
return unsafeHTML(libIcons[name]);
|
|
69
|
+
if (!loadingGetPromises.has(url)) {
|
|
70
|
+
let promise = new Promise((resolve) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
+
let result = yield fetch(url);
|
|
72
|
+
try {
|
|
73
|
+
let text = yield result.text();
|
|
74
|
+
resolve(text);
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
resolve(null);
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
loadingGetPromises.set(url, promise);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Chargement de l'icone.
|
|
84
|
+
*/
|
|
85
|
+
let result = yield loadingGetPromises.get(url);
|
|
86
|
+
loadingGetPromises.delete(url);
|
|
87
|
+
libIcons[name] = result;
|
|
88
|
+
return unsafeHTML(result);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* svgs "locaux"
|
|
92
|
+
*/
|
|
93
|
+
return unsafeHTML(iconsAsRecord[prefix][params.name] || "");
|
|
94
|
+
}),
|
|
24
95
|
};
|
|
25
96
|
Icons.default = Icons.fontAwesomeNext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"iconoir":{"cancel":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","check-circled-outline":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7 12.5L10 15.5L17 8.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","check":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5 13L9 17L19 7\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","emoji-think-left":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M10 15H7M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M8.5 9C8.22386 9 8 8.77614 8 8.5C8 8.22386 8.22386 8 8.5 8C8.77614 8 9 8.22386 9 8.5C9 8.77614 8.77614 9 8.5 9Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M15.5 9C15.2239 9 15 8.77614 15 8.5C15 8.22386 15.2239 8 15.5 8C15.7761 8 16 8.22386 16 8.5C16 8.77614 15.7761 9 15.5 9Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","info-empty":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 11.5V16.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 7.51L12.01 7.49889\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","loader":"","more-vert":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","nav-arrow-down":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","warning-circled-outline":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 7L12 13\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 17.01L12.01 16.9989\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n"}}
|
|
1
|
+
{"iconoir":{"cancel":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","check-circled-outline":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7 12.5L10 15.5L17 8.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","check":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5 13L9 17L19 7\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","emoji-think-left":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M10 15H7M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M8.5 9C8.22386 9 8 8.77614 8 8.5C8 8.22386 8.22386 8 8.5 8C8.77614 8 9 8.22386 9 8.5C9 8.77614 8.77614 9 8.5 9Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M15.5 9C15.2239 9 15 8.77614 15 8.5C15 8.22386 15.2239 8 15.5 8C15.7761 8 16 8.22386 16 8.5C16 8.77614 15.7761 9 15.5 9Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","info-empty":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 11.5V16.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 7.51L12.01 7.49889\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","loader":"","more-horiz":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","more-vert":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","nav-arrow-down":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n","warning-circled-outline":"<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 7L12 13\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 17.01L12.01 16.9989\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n"}}
|
|
@@ -5,9 +5,18 @@ export declare class Link extends LitElement {
|
|
|
5
5
|
private _location;
|
|
6
6
|
get location(): string;
|
|
7
7
|
set location(value: string);
|
|
8
|
+
/**
|
|
9
|
+
* mode d'activation du bouton :
|
|
10
|
+
* - strict : l'url courante match exactement avec le href du bouton
|
|
11
|
+
* - partial : l'url courante match à gauche avec le href du bouton
|
|
12
|
+
* - disabled : aucune activation / désactivation
|
|
13
|
+
*/
|
|
14
|
+
autoActive: "strict" | "partial" | "disabled";
|
|
8
15
|
connectedCallback(): void;
|
|
9
16
|
disconnectedCallback(): void;
|
|
10
|
-
|
|
17
|
+
private _target;
|
|
18
|
+
set target(newTarget: string | null);
|
|
19
|
+
get target(): string | null;
|
|
11
20
|
/**
|
|
12
21
|
* Si présent on passe en mode pushstate
|
|
13
22
|
*/
|
|
@@ -8,12 +8,20 @@ import LocationHandler from "@supersoniks/concorde/core/utils/LocationHandler";
|
|
|
8
8
|
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
10
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
|
+
import Electron from "@supersoniks/concorde/core/utils/Electron";
|
|
11
12
|
let Link = class Link extends LitElement {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.href = "";
|
|
15
16
|
this._location = "";
|
|
16
|
-
|
|
17
|
+
/**
|
|
18
|
+
* mode d'activation du bouton :
|
|
19
|
+
* - strict : l'url courante match exactement avec le href du bouton
|
|
20
|
+
* - partial : l'url courante match à gauche avec le href du bouton
|
|
21
|
+
* - disabled : aucune activation / désactivation
|
|
22
|
+
*/
|
|
23
|
+
this.autoActive = "partial";
|
|
24
|
+
this._target = null;
|
|
17
25
|
/**
|
|
18
26
|
* Si présent on passe en mode pushstate
|
|
19
27
|
*/
|
|
@@ -37,6 +45,14 @@ let Link = class Link extends LitElement {
|
|
|
37
45
|
LocationHandler.offChange(this);
|
|
38
46
|
super.disconnectedCallback();
|
|
39
47
|
}
|
|
48
|
+
set target(newTarget) {
|
|
49
|
+
this._target = newTarget;
|
|
50
|
+
Electron.fixBlankLink(this);
|
|
51
|
+
this.requestUpdate();
|
|
52
|
+
}
|
|
53
|
+
get target() {
|
|
54
|
+
return this._target;
|
|
55
|
+
}
|
|
40
56
|
handlePushState(e) {
|
|
41
57
|
e.preventDefault();
|
|
42
58
|
LocationHandler.changeFromComponent(this);
|
|
@@ -65,7 +81,10 @@ __decorate([
|
|
|
65
81
|
], Link.prototype, "href", void 0);
|
|
66
82
|
__decorate([
|
|
67
83
|
property({ type: String })
|
|
68
|
-
], Link.prototype, "
|
|
84
|
+
], Link.prototype, "autoActive", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: String })
|
|
87
|
+
], Link.prototype, "target", null);
|
|
69
88
|
__decorate([
|
|
70
89
|
property({ type: Boolean })
|
|
71
90
|
], Link.prototype, "pushState", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
+
import "./menu-item";
|
|
2
3
|
export declare class MenuItems extends LitElement {
|
|
3
4
|
static styles: import("lit").CSSResult[];
|
|
4
5
|
/**
|
|
@@ -7,20 +8,25 @@ export declare class MenuItems extends LitElement {
|
|
|
7
8
|
*/
|
|
8
9
|
size: "" | "xs" | "sm" | "lg";
|
|
9
10
|
/**
|
|
10
|
-
* Direction
|
|
11
|
+
* Direction
|
|
11
12
|
*/
|
|
12
|
-
direction: "
|
|
13
|
+
direction: "row" | "column";
|
|
14
|
+
align: "center" | "left" | "right";
|
|
13
15
|
/**
|
|
14
16
|
* Ombre
|
|
15
17
|
*/
|
|
16
|
-
shadow: "" | "none" | "sm" | "md";
|
|
18
|
+
shadow: "" | "none" | "sm" | "md" | 'lg' | "xl";
|
|
19
|
+
moreShape: "square" | "circle";
|
|
17
20
|
/**
|
|
18
21
|
* Propriété min-width du bouton
|
|
19
22
|
*/
|
|
20
23
|
minWidth: string;
|
|
21
24
|
menuChildren: Array<HTMLElement>;
|
|
22
|
-
|
|
25
|
+
moreElements: Array<HTMLElement>;
|
|
26
|
+
hasMoreElements: boolean;
|
|
27
|
+
checkIfMore(): void;
|
|
23
28
|
updated(_changedProperties: PropertyValues): void;
|
|
24
|
-
|
|
29
|
+
mainSlotChange(): void;
|
|
30
|
+
setChildrenSize(menuItems: Array<HTMLElement>): void;
|
|
25
31
|
render(): import("lit-html").TemplateResult<1>;
|
|
26
32
|
}
|
|
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { styleMap } from "lit/directives/style-map.js";
|
|
9
|
-
import { customElement, property, queryAssignedElements,
|
|
9
|
+
import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
|
|
10
|
+
import "./menu-item";
|
|
10
11
|
let MenuItems = class MenuItems extends LitElement {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
@@ -16,50 +17,80 @@ let MenuItems = class MenuItems extends LitElement {
|
|
|
16
17
|
*/
|
|
17
18
|
this.size = "";
|
|
18
19
|
/**
|
|
19
|
-
* Direction
|
|
20
|
+
* Direction
|
|
20
21
|
*/
|
|
21
22
|
this.direction = "column";
|
|
23
|
+
this.align = "left";
|
|
22
24
|
/**
|
|
23
25
|
* Ombre
|
|
24
26
|
*/
|
|
25
27
|
this.shadow = "none";
|
|
28
|
+
this.moreShape = "circle";
|
|
26
29
|
/**
|
|
27
30
|
* Propriété min-width du bouton
|
|
28
31
|
*/
|
|
29
32
|
this.minWidth = "0";
|
|
33
|
+
this.hasMoreElements = false;
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
updated(_changedProperties) {
|
|
35
|
-
super.updated(_changedProperties);
|
|
36
|
-
this._setChildrenSize();
|
|
35
|
+
checkIfMore() {
|
|
36
|
+
var _a;
|
|
37
|
+
this.hasMoreElements = !!((_a = this.moreElements) === null || _a === void 0 ? void 0 : _a.length);
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (!elt.hasAttribute("size")) {
|
|
43
|
-
elt.setAttribute("size", this.size);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
39
|
+
updated(_changedProperties) {
|
|
40
|
+
const moreBtn = this.querySelector('.more-btn');
|
|
41
|
+
if (this.size && moreBtn) {
|
|
42
|
+
moreBtn.setAttribute("size", this.size);
|
|
46
43
|
}
|
|
47
|
-
const
|
|
48
|
-
|
|
44
|
+
const dividers = this.querySelectorAll("sonic-divider");
|
|
45
|
+
dividers.forEach((elt) => {
|
|
49
46
|
if (!elt.hasAttribute("size")) {
|
|
50
47
|
elt.setAttribute("size", "xs");
|
|
51
48
|
}
|
|
52
49
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
super.updated(_changedProperties);
|
|
51
|
+
}
|
|
52
|
+
mainSlotChange() {
|
|
53
|
+
this.setChildrenSize(this.menuChildren);
|
|
54
|
+
}
|
|
55
|
+
setChildrenSize(menuItems) {
|
|
56
|
+
menuItems.forEach((elt) => {
|
|
57
|
+
if (this.size) {
|
|
58
|
+
elt.setAttribute("size", this.size);
|
|
59
|
+
}
|
|
60
|
+
if (this.align) {
|
|
61
|
+
elt.setAttribute("textAlign", this.align);
|
|
62
|
+
}
|
|
63
|
+
if (this.direction == "row") {
|
|
64
|
+
if (elt.getAttribute('shape') == "block") {
|
|
65
|
+
elt.setAttribute("shape", "default");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
57
69
|
}
|
|
58
70
|
render() {
|
|
59
71
|
const menuStyles = {
|
|
60
72
|
minWidth: this.minWidth,
|
|
73
|
+
flexDirection: this.direction,
|
|
74
|
+
};
|
|
75
|
+
const isMenuRow = this.direction == "row";
|
|
76
|
+
const popStyles = {
|
|
77
|
+
display: 'block',
|
|
78
|
+
alignSelf: isMenuRow ? 'center' : 'flex-start',
|
|
79
|
+
justifySelf: 'center',
|
|
80
|
+
flexDirection: this.direction
|
|
61
81
|
};
|
|
62
|
-
|
|
82
|
+
const popBtnStyles = {
|
|
83
|
+
marginLeft: isMenuRow ? '' : '.55em'
|
|
84
|
+
};
|
|
85
|
+
return html `<menu part="menu" class="shadowable" style=${styleMap(menuStyles)}>
|
|
86
|
+
<slot @slotchange=${this.mainSlotChange}></slot>
|
|
87
|
+
<sonic-pop style=${styleMap(popStyles)} class=${!this.hasMoreElements ? 'hidden' : ''}>
|
|
88
|
+
<sonic-menu-item style=${styleMap(popBtnStyles)} class="more-btn" shape=${this.moreShape} textAlign="center" >
|
|
89
|
+
<sonic-icon prefix="iconoir" size="xl" name=${isMenuRow ? "more-vert" : "more-horiz"} ></sonic-icon>
|
|
90
|
+
</sonic-menu-item>
|
|
91
|
+
<slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
|
|
92
|
+
</sonic-pop>
|
|
93
|
+
</menu>`;
|
|
63
94
|
}
|
|
64
95
|
};
|
|
65
96
|
MenuItems.styles = [
|
|
@@ -67,33 +98,39 @@ MenuItems.styles = [
|
|
|
67
98
|
:host {
|
|
68
99
|
display: block;
|
|
69
100
|
}
|
|
101
|
+
|
|
70
102
|
:host > menu {
|
|
71
103
|
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
104
|
border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
|
|
74
105
|
margin: 0;
|
|
75
106
|
padding: 0.35em;
|
|
76
107
|
gap: 0.15rem;
|
|
77
108
|
}
|
|
109
|
+
|
|
110
|
+
.hidden {
|
|
111
|
+
display:none !important;
|
|
112
|
+
}
|
|
78
113
|
|
|
79
114
|
/*OMBRE*/
|
|
80
|
-
:host([shadow])
|
|
81
|
-
:host([shadow="md"])
|
|
82
|
-
:host([shadow="true"])
|
|
115
|
+
:host([shadow]) .shadowable,
|
|
116
|
+
:host([shadow="md"]) .shadowable,
|
|
117
|
+
:host([shadow="true"]) .shadowable {
|
|
83
118
|
box-shadow: var(--sc-shadow);
|
|
84
119
|
}
|
|
85
120
|
|
|
86
|
-
:host([shadow="sm"])
|
|
121
|
+
:host([shadow="sm"]) .shadowable {
|
|
87
122
|
box-shadow: var(--sc-shadow-sm);
|
|
88
123
|
}
|
|
89
124
|
|
|
90
|
-
:host([shadow="
|
|
125
|
+
:host([shadow="lg"]) .shadowable {
|
|
126
|
+
box-shadow: var(--sc-shadow-lg);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:host([shadow="none"]) .shadowable {
|
|
91
130
|
box-shadow: none;
|
|
92
131
|
}
|
|
93
132
|
|
|
94
|
-
|
|
95
|
-
box-shadow: var(--sc-shadow-lg);
|
|
96
|
-
}
|
|
133
|
+
|
|
97
134
|
`,
|
|
98
135
|
];
|
|
99
136
|
__decorate([
|
|
@@ -102,18 +139,27 @@ __decorate([
|
|
|
102
139
|
__decorate([
|
|
103
140
|
property({ type: String, reflect: true })
|
|
104
141
|
], MenuItems.prototype, "direction", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
property({ type: String, reflect: true })
|
|
144
|
+
], MenuItems.prototype, "align", void 0);
|
|
105
145
|
__decorate([
|
|
106
146
|
property({ type: String, reflect: true })
|
|
107
147
|
], MenuItems.prototype, "shadow", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
property({ type: String })
|
|
150
|
+
], MenuItems.prototype, "moreShape", void 0);
|
|
108
151
|
__decorate([
|
|
109
152
|
property({ type: String })
|
|
110
153
|
], MenuItems.prototype, "minWidth", void 0);
|
|
111
154
|
__decorate([
|
|
112
|
-
queryAssignedElements({
|
|
155
|
+
queryAssignedElements({ selector: "sonic-menu-item" })
|
|
113
156
|
], MenuItems.prototype, "menuChildren", void 0);
|
|
114
157
|
__decorate([
|
|
115
|
-
|
|
116
|
-
], MenuItems.prototype, "
|
|
158
|
+
queryAssignedElements({ slot: "more", selector: "*" })
|
|
159
|
+
], MenuItems.prototype, "moreElements", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
state()
|
|
162
|
+
], MenuItems.prototype, "hasMoreElements", void 0);
|
|
117
163
|
MenuItems = __decorate([
|
|
118
164
|
customElement("sonic-menu")
|
|
119
165
|
], MenuItems);
|
|
@@ -163,7 +163,9 @@ Pop.styles = [
|
|
|
163
163
|
transform: translateY(1rem) scale(0.95);
|
|
164
164
|
opacity: 0;
|
|
165
165
|
pointer-events: none;
|
|
166
|
-
transition: 0.
|
|
166
|
+
transition-duration: 0.15s ;
|
|
167
|
+
transition-timing-function: ease;
|
|
168
|
+
transition-property:all;
|
|
167
169
|
border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
|
|
168
170
|
}
|
|
169
171
|
|
|
@@ -171,7 +173,8 @@ Pop.styles = [
|
|
|
171
173
|
transform: translateY(0) scale(1);
|
|
172
174
|
opacity: 1;
|
|
173
175
|
pointer-events: auto;
|
|
174
|
-
transition:
|
|
176
|
+
transition-property:scale, opacity;
|
|
177
|
+
transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
/*OMBRE*/
|