@synergy-design-system/components 1.4.0 → 1.5.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/dist/chunks/chunk.3B24TYVN.js +51 -0
- package/dist/chunks/chunk.3B24TYVN.js.map +7 -0
- package/dist/chunks/chunk.3HPG73GG.js +132 -0
- package/dist/chunks/chunk.3HPG73GG.js.map +7 -0
- package/dist/chunks/chunk.4KLCSMRA.js +96 -0
- package/dist/chunks/chunk.4KLCSMRA.js.map +7 -0
- package/dist/chunks/{chunk.BOURWTS5.js → chunk.4ZO3EKCL.js} +2 -2
- package/dist/chunks/{chunk.JFCQYLZB.js → chunk.5NJ7WWJW.js} +2 -2
- package/dist/chunks/{chunk.C2S53NYE.js → chunk.63IJYG6Q.js} +2 -2
- package/dist/chunks/chunk.6XU6OLZ3.js +310 -0
- package/dist/chunks/chunk.6XU6OLZ3.js.map +7 -0
- package/dist/chunks/{chunk.MMNPLBTH.js → chunk.7BHGTNHS.js} +2 -2
- package/dist/chunks/chunk.7HS3TULI.js +12 -0
- package/dist/chunks/chunk.7HS3TULI.js.map +7 -0
- package/dist/chunks/{chunk.VYKSU5VJ.js → chunk.A4YWJJLD.js} +2 -2
- package/dist/chunks/{chunk.43NPPDUU.js → chunk.AVJQ2BSM.js} +2 -2
- package/dist/chunks/{chunk.W46CFM2R.js → chunk.B2EJGIGY.js} +7 -13
- package/dist/chunks/chunk.B2EJGIGY.js.map +7 -0
- package/dist/chunks/chunk.BQG5LF7J.js +47 -0
- package/dist/chunks/chunk.BQG5LF7J.js.map +7 -0
- package/dist/chunks/{chunk.SNP6OECI.js → chunk.C5W2Y6KW.js} +8 -8
- package/dist/chunks/{chunk.SNP6OECI.js.map → chunk.C5W2Y6KW.js.map} +2 -2
- package/dist/chunks/{chunk.NZAZG5AN.js → chunk.CUHMPG7E.js} +3 -3
- package/dist/chunks/{chunk.7CKINLE4.js → chunk.DLDE3BC5.js} +2 -2
- package/dist/chunks/{chunk.RSGJ7C32.js → chunk.DPTZN6HY.js} +2 -2
- package/dist/chunks/{chunk.GKFUZ44I.js → chunk.ELPJP6AL.js} +2 -2
- package/dist/chunks/{chunk.4NG4BW3G.js → chunk.FLCUFEHS.js} +2 -2
- package/dist/chunks/chunk.FOTO5B4G.js +12 -0
- package/dist/chunks/chunk.FOTO5B4G.js.map +7 -0
- package/dist/chunks/{chunk.3CAAVHZZ.js → chunk.GAMJZXEL.js} +2 -2
- package/dist/chunks/{chunk.QT64OSWO.js → chunk.GGNKDYC2.js} +7 -7
- package/dist/chunks/{chunk.POZGJMTS.js → chunk.GYDJFPHM.js} +2 -2
- package/dist/chunks/{chunk.YL6PYHOS.js → chunk.IESSP23D.js} +7 -7
- package/dist/chunks/{chunk.62GAQV3Z.js → chunk.IYKQTZIY.js} +3 -3
- package/dist/chunks/{chunk.I2JLECCQ.js → chunk.JEOPTEUQ.js} +3 -3
- package/dist/chunks/{chunk.QBM7YT5M.js → chunk.JLTYAQFG.js} +2 -2
- package/dist/chunks/chunk.JN7CLMQZ.js +53 -0
- package/dist/chunks/chunk.JN7CLMQZ.js.map +7 -0
- package/dist/chunks/{chunk.7DUTGUSD.js → chunk.JQWJ7PHD.js} +2 -2
- package/dist/chunks/chunk.JXOHBU6V.js +334 -0
- package/dist/chunks/chunk.JXOHBU6V.js.map +7 -0
- package/dist/chunks/chunk.KG52EHDB.js +60 -0
- package/dist/chunks/chunk.KG52EHDB.js.map +7 -0
- package/dist/chunks/{chunk.OXUFFH57.js → chunk.KUZJTGHQ.js} +2 -2
- package/dist/chunks/{chunk.T27ALSOE.js → chunk.LL3V6HVM.js} +2 -2
- package/dist/chunks/{chunk.A4KYHNIH.js → chunk.LTCRPIZ5.js} +2 -2
- package/dist/chunks/{chunk.2Z2FGA3I.js → chunk.OPVDSHPD.js} +2 -2
- package/dist/chunks/chunk.OWMT6OL2.js +82 -0
- package/dist/chunks/chunk.OWMT6OL2.js.map +7 -0
- package/dist/chunks/{chunk.FSHPI6B5.js → chunk.PQLAXTRQ.js} +3 -3
- package/dist/chunks/{chunk.SHF6MEDK.js → chunk.RU7P5HHF.js} +2 -2
- package/dist/chunks/chunk.SS46QCYH.js +811 -0
- package/dist/chunks/chunk.SS46QCYH.js.map +7 -0
- package/dist/chunks/{chunk.ZKVZHEJM.js → chunk.TY5F2VTK.js} +2 -2
- package/dist/chunks/{chunk.533DZ5GZ.js → chunk.UGYBBM5O.js} +3 -3
- package/dist/chunks/chunk.UXUMV3TL.js +12 -0
- package/dist/chunks/chunk.UXUMV3TL.js.map +7 -0
- package/dist/chunks/chunk.W6V7TPGK.js +104 -0
- package/dist/chunks/chunk.W6V7TPGK.js.map +7 -0
- package/dist/chunks/{chunk.NQZRYJEZ.js → chunk.Y6HNLEFW.js} +2 -2
- package/dist/components/button/button.component.js +5 -5
- package/dist/components/button/button.js +6 -6
- package/dist/components/button-group/button-group.component.js +2 -2
- package/dist/components/button-group/button-group.js +3 -3
- package/dist/components/checkbox/checkbox.component.js +3 -3
- package/dist/components/checkbox/checkbox.js +4 -4
- package/dist/components/divider/divider.component.js +2 -2
- package/dist/components/divider/divider.js +3 -3
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon-button/icon-button.component.js +3 -3
- package/dist/components/icon-button/icon-button.js +4 -4
- package/dist/components/input/input.component.js +6 -6
- package/dist/components/input/input.custom.styles.js +1 -1
- package/dist/components/input/input.js +7 -7
- package/dist/components/input/input.styles.js +2 -2
- package/dist/components/optgroup/optgroup.component.d.ts +47 -0
- package/dist/components/optgroup/optgroup.component.js +16 -0
- package/dist/components/optgroup/optgroup.component.js.map +7 -0
- package/dist/components/optgroup/optgroup.d.ts +8 -0
- package/dist/components/optgroup/optgroup.js +17 -0
- package/dist/components/optgroup/optgroup.js.map +7 -0
- package/dist/components/optgroup/optgroup.styles.d.ts +2 -0
- package/dist/components/optgroup/optgroup.styles.js +8 -0
- package/dist/components/optgroup/optgroup.styles.js.map +7 -0
- package/dist/components/option/option.component.d.ts +51 -0
- package/dist/components/option/option.component.js +22 -0
- package/dist/components/option/option.component.js.map +7 -0
- package/dist/components/option/option.custom.styles.d.ts +2 -0
- package/dist/components/option/option.custom.styles.js +8 -0
- package/dist/components/option/option.custom.styles.js.map +7 -0
- package/dist/components/option/option.d.ts +8 -0
- package/dist/components/option/option.js +23 -0
- package/dist/components/option/option.js.map +7 -0
- package/dist/components/option/option.styles.d.ts +2 -0
- package/dist/components/option/option.styles.js +10 -0
- package/dist/components/option/option.styles.js.map +7 -0
- package/dist/components/popup/popup.component.d.ts +139 -0
- package/dist/components/popup/popup.component.js +11 -0
- package/dist/components/popup/popup.component.js.map +7 -0
- package/dist/components/popup/popup.styles.d.ts +2 -0
- package/dist/components/popup/popup.styles.js +9 -0
- package/dist/components/popup/popup.styles.js.map +7 -0
- package/dist/components/radio/radio.component.js +3 -3
- package/dist/components/radio/radio.js +4 -4
- package/dist/components/radio-button/radio-button.component.js +2 -2
- package/dist/components/radio-button/radio-button.js +3 -3
- package/dist/components/radio-group/radio-group.component.js +3 -3
- package/dist/components/radio-group/radio-group.js +4 -4
- package/dist/components/select/select.component.d.ts +180 -0
- package/dist/components/select/select.component.js +35 -0
- package/dist/components/select/select.component.js.map +7 -0
- package/dist/components/select/select.custom.styles.d.ts +2 -0
- package/dist/components/select/select.custom.styles.js +8 -0
- package/dist/components/select/select.custom.styles.js.map +7 -0
- package/dist/components/select/select.d.ts +8 -0
- package/dist/components/select/select.js +36 -0
- package/dist/components/select/select.js.map +7 -0
- package/dist/components/select/select.styles.d.ts +2 -0
- package/dist/components/select/select.styles.js +11 -0
- package/dist/components/select/select.styles.js.map +7 -0
- package/dist/components/spinner/spinner.component.js +2 -2
- package/dist/components/switch/switch.component.js +2 -2
- package/dist/components/switch/switch.js +3 -3
- package/dist/components/tag/tag.component.js +4 -4
- package/dist/components/tag/tag.js +5 -5
- package/dist/components/textarea/textarea.component.js +2 -2
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/custom-elements.json +2376 -556
- package/dist/events/events.d.ts +5 -0
- package/dist/events/syn-after-hide.d.ts +6 -0
- package/dist/events/syn-after-show.d.ts +6 -0
- package/dist/events/syn-hide.d.ts +6 -0
- package/dist/events/syn-reposition.d.ts +6 -0
- package/dist/events/syn-show.d.ts +6 -0
- package/dist/internal/animate.d.ts +22 -0
- package/dist/internal/event.d.ts +2 -0
- package/dist/internal/offset.d.ts +11 -0
- package/dist/internal/scroll.d.ts +11 -0
- package/dist/synergy.d.ts +3 -0
- package/dist/synergy.js +63 -40
- package/dist/utilities/animation-registry.d.ts +24 -0
- package/dist/utilities/animation-registry.js +12 -0
- package/dist/utilities/animation-registry.js.map +7 -0
- package/dist/vscode.html-custom-data.json +304 -17
- package/dist/web-types.json +664 -30
- package/package.json +32 -31
- package/dist/chunks/chunk.W46CFM2R.js.map +0 -7
- /package/dist/chunks/{chunk.BOURWTS5.js.map → chunk.4ZO3EKCL.js.map} +0 -0
- /package/dist/chunks/{chunk.JFCQYLZB.js.map → chunk.5NJ7WWJW.js.map} +0 -0
- /package/dist/chunks/{chunk.C2S53NYE.js.map → chunk.63IJYG6Q.js.map} +0 -0
- /package/dist/chunks/{chunk.MMNPLBTH.js.map → chunk.7BHGTNHS.js.map} +0 -0
- /package/dist/chunks/{chunk.VYKSU5VJ.js.map → chunk.A4YWJJLD.js.map} +0 -0
- /package/dist/chunks/{chunk.43NPPDUU.js.map → chunk.AVJQ2BSM.js.map} +0 -0
- /package/dist/chunks/{chunk.NZAZG5AN.js.map → chunk.CUHMPG7E.js.map} +0 -0
- /package/dist/chunks/{chunk.7CKINLE4.js.map → chunk.DLDE3BC5.js.map} +0 -0
- /package/dist/chunks/{chunk.RSGJ7C32.js.map → chunk.DPTZN6HY.js.map} +0 -0
- /package/dist/chunks/{chunk.GKFUZ44I.js.map → chunk.ELPJP6AL.js.map} +0 -0
- /package/dist/chunks/{chunk.4NG4BW3G.js.map → chunk.FLCUFEHS.js.map} +0 -0
- /package/dist/chunks/{chunk.3CAAVHZZ.js.map → chunk.GAMJZXEL.js.map} +0 -0
- /package/dist/chunks/{chunk.QT64OSWO.js.map → chunk.GGNKDYC2.js.map} +0 -0
- /package/dist/chunks/{chunk.POZGJMTS.js.map → chunk.GYDJFPHM.js.map} +0 -0
- /package/dist/chunks/{chunk.YL6PYHOS.js.map → chunk.IESSP23D.js.map} +0 -0
- /package/dist/chunks/{chunk.62GAQV3Z.js.map → chunk.IYKQTZIY.js.map} +0 -0
- /package/dist/chunks/{chunk.I2JLECCQ.js.map → chunk.JEOPTEUQ.js.map} +0 -0
- /package/dist/chunks/{chunk.QBM7YT5M.js.map → chunk.JLTYAQFG.js.map} +0 -0
- /package/dist/chunks/{chunk.7DUTGUSD.js.map → chunk.JQWJ7PHD.js.map} +0 -0
- /package/dist/chunks/{chunk.OXUFFH57.js.map → chunk.KUZJTGHQ.js.map} +0 -0
- /package/dist/chunks/{chunk.T27ALSOE.js.map → chunk.LL3V6HVM.js.map} +0 -0
- /package/dist/chunks/{chunk.A4KYHNIH.js.map → chunk.LTCRPIZ5.js.map} +0 -0
- /package/dist/chunks/{chunk.2Z2FGA3I.js.map → chunk.OPVDSHPD.js.map} +0 -0
- /package/dist/chunks/{chunk.FSHPI6B5.js.map → chunk.PQLAXTRQ.js.map} +0 -0
- /package/dist/chunks/{chunk.SHF6MEDK.js.map → chunk.RU7P5HHF.js.map} +0 -0
- /package/dist/chunks/{chunk.ZKVZHEJM.js.map → chunk.TY5F2VTK.js.map} +0 -0
- /package/dist/chunks/{chunk.533DZ5GZ.js.map → chunk.UGYBBM5O.js.map} +0 -0
- /package/dist/chunks/{chunk.NQZRYJEZ.js.map → chunk.Y6HNLEFW.js.map} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// src/components/option/option.custom.styles.ts
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
var option_custom_styles_default = css`
|
|
4
|
+
.option {
|
|
5
|
+
/* Height is dependent on line-height of .option__label, which does not fit completely to layout */
|
|
6
|
+
min-height: 48px;
|
|
7
|
+
padding: var(--syn-spacing-small) var(--syn-spacing-medium);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.option:not(.option--current) {
|
|
11
|
+
color: var(--syn-color-neutral-950);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.option__label {
|
|
15
|
+
line-height: var(--syn-line-height-normal);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.option__check {
|
|
19
|
+
color: var(--syn-color-primary-600);
|
|
20
|
+
font-size: var(--syn-spacing-large);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.option .option__check {
|
|
24
|
+
padding-inline-end: var(--syn-spacing-small);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Invert the check mark when keyboard navigation is used */
|
|
28
|
+
.option--current .option__check {
|
|
29
|
+
color: var(--syn-color-neutral-0);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Use larger spacing between icons and content */
|
|
33
|
+
.option__prefix::slotted(*) {
|
|
34
|
+
margin-inline-end: var(--syn-spacing-small);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.option__suffix::slotted(*) {
|
|
38
|
+
margin-inline-start: var(--syn-spacing-small);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Set correct icon size when someone uses syn-icon in the slots */
|
|
42
|
+
.option__prefix::slotted(syn-icon),
|
|
43
|
+
.option__suffix::slotted(syn-icon) {
|
|
44
|
+
font-size: var(--syn-spacing-large);
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
option_custom_styles_default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=chunk.3B24TYVN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/option/option.custom.styles.ts"],
|
|
4
|
+
"sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n .option {\n /* Height is dependent on line-height of .option__label, which does not fit completely to layout */\n min-height: 48px;\n padding: var(--syn-spacing-small) var(--syn-spacing-medium);\n }\n\n .option:not(.option--current) {\n color: var(--syn-color-neutral-950);\n }\n\n .option__label {\n line-height: var(--syn-line-height-normal);\n }\n\n .option__check {\n color: var(--syn-color-primary-600);\n font-size: var(--syn-spacing-large);\n }\n\n .option .option__check {\n padding-inline-end: var(--syn-spacing-small);\n }\n\n /* Invert the check mark when keyboard navigation is used */\n .option--current .option__check {\n color: var(--syn-color-neutral-0);\n }\n\n /* Use larger spacing between icons and content */\n .option__prefix::slotted(*) {\n margin-inline-end: var(--syn-spacing-small);\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: var(--syn-spacing-small);\n }\n\n /* Set correct icon size when someone uses syn-icon in the slots */\n .option__prefix::slotted(syn-icon),\n .option__suffix::slotted(syn-icon) {\n font-size: var(--syn-spacing-large);\n }\n`;\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,+BAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import {
|
|
2
|
+
option_styles_default
|
|
3
|
+
} from "./chunk.W6V7TPGK.js";
|
|
4
|
+
import {
|
|
5
|
+
LocalizeController
|
|
6
|
+
} from "./chunk.LAB4YJYE.js";
|
|
7
|
+
import {
|
|
8
|
+
SynIcon
|
|
9
|
+
} from "./chunk.63IJYG6Q.js";
|
|
10
|
+
import {
|
|
11
|
+
watch
|
|
12
|
+
} from "./chunk.VZ7S7YYN.js";
|
|
13
|
+
import {
|
|
14
|
+
SynergyElement
|
|
15
|
+
} from "./chunk.C5W2Y6KW.js";
|
|
16
|
+
import {
|
|
17
|
+
__decorateClass
|
|
18
|
+
} from "./chunk.DJOAQ4JU.js";
|
|
19
|
+
|
|
20
|
+
// src/components/option/option.component.ts
|
|
21
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
22
|
+
import { html } from "lit";
|
|
23
|
+
import { property, query, state } from "lit/decorators.js";
|
|
24
|
+
var SynOption = class extends SynergyElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
// @ts-expect-error - Controller is currently unused
|
|
28
|
+
this.localize = new LocalizeController(this);
|
|
29
|
+
this.current = false;
|
|
30
|
+
this.selected = false;
|
|
31
|
+
this.hasHover = false;
|
|
32
|
+
this.value = "";
|
|
33
|
+
this.disabled = false;
|
|
34
|
+
}
|
|
35
|
+
connectedCallback() {
|
|
36
|
+
super.connectedCallback();
|
|
37
|
+
this.setAttribute("role", "option");
|
|
38
|
+
this.setAttribute("aria-selected", "false");
|
|
39
|
+
}
|
|
40
|
+
handleDefaultSlotChange() {
|
|
41
|
+
const textLabel = this.getTextLabel();
|
|
42
|
+
if (typeof this.cachedTextLabel === "undefined") {
|
|
43
|
+
this.cachedTextLabel = textLabel;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (textLabel !== this.cachedTextLabel) {
|
|
47
|
+
this.cachedTextLabel = textLabel;
|
|
48
|
+
this.emit("slotchange", { bubbles: true, composed: false, cancelable: false });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
handleMouseEnter() {
|
|
52
|
+
this.hasHover = true;
|
|
53
|
+
}
|
|
54
|
+
handleMouseLeave() {
|
|
55
|
+
this.hasHover = false;
|
|
56
|
+
}
|
|
57
|
+
handleDisabledChange() {
|
|
58
|
+
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
|
59
|
+
}
|
|
60
|
+
handleSelectedChange() {
|
|
61
|
+
this.setAttribute("aria-selected", this.selected ? "true" : "false");
|
|
62
|
+
}
|
|
63
|
+
handleValueChange() {
|
|
64
|
+
if (typeof this.value !== "string") {
|
|
65
|
+
this.value = String(this.value);
|
|
66
|
+
}
|
|
67
|
+
if (this.value.includes(" ")) {
|
|
68
|
+
console.error(`Option values cannot include a space. All spaces have been replaced with underscores.`, this);
|
|
69
|
+
this.value = this.value.replace(/ /g, "_");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** Returns a plain text label based on the option's content. */
|
|
73
|
+
getTextLabel() {
|
|
74
|
+
var _a;
|
|
75
|
+
return ((_a = this.textContent) != null ? _a : "").trim();
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
return html`
|
|
79
|
+
<div
|
|
80
|
+
part="base"
|
|
81
|
+
class=${classMap({
|
|
82
|
+
option: true,
|
|
83
|
+
"option--current": this.current,
|
|
84
|
+
"option--disabled": this.disabled,
|
|
85
|
+
"option--selected": this.selected,
|
|
86
|
+
"option--hover": this.hasHover
|
|
87
|
+
})}
|
|
88
|
+
@mouseenter=${this.handleMouseEnter}
|
|
89
|
+
@mouseleave=${this.handleMouseLeave}
|
|
90
|
+
>
|
|
91
|
+
<syn-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></syn-icon>
|
|
92
|
+
<slot part="prefix" name="prefix" class="option__prefix"></slot>
|
|
93
|
+
<slot part="label" class="option__label" @slotchange=${this.handleDefaultSlotChange}></slot>
|
|
94
|
+
<slot part="suffix" name="suffix" class="option__suffix"></slot>
|
|
95
|
+
</div>
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
SynOption.styles = option_styles_default;
|
|
100
|
+
SynOption.dependencies = { "syn-icon": SynIcon };
|
|
101
|
+
__decorateClass([
|
|
102
|
+
query(".option__label")
|
|
103
|
+
], SynOption.prototype, "defaultSlot", 2);
|
|
104
|
+
__decorateClass([
|
|
105
|
+
state()
|
|
106
|
+
], SynOption.prototype, "current", 2);
|
|
107
|
+
__decorateClass([
|
|
108
|
+
state()
|
|
109
|
+
], SynOption.prototype, "selected", 2);
|
|
110
|
+
__decorateClass([
|
|
111
|
+
state()
|
|
112
|
+
], SynOption.prototype, "hasHover", 2);
|
|
113
|
+
__decorateClass([
|
|
114
|
+
property({ reflect: true })
|
|
115
|
+
], SynOption.prototype, "value", 2);
|
|
116
|
+
__decorateClass([
|
|
117
|
+
property({ type: Boolean, reflect: true })
|
|
118
|
+
], SynOption.prototype, "disabled", 2);
|
|
119
|
+
__decorateClass([
|
|
120
|
+
watch("disabled")
|
|
121
|
+
], SynOption.prototype, "handleDisabledChange", 1);
|
|
122
|
+
__decorateClass([
|
|
123
|
+
watch("selected")
|
|
124
|
+
], SynOption.prototype, "handleSelectedChange", 1);
|
|
125
|
+
__decorateClass([
|
|
126
|
+
watch("value")
|
|
127
|
+
], SynOption.prototype, "handleValueChange", 1);
|
|
128
|
+
|
|
129
|
+
export {
|
|
130
|
+
SynOption
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=chunk.3HPG73GG.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/option/option.component.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport styles from './option.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Options define the selectable items within various form controls such as [select](/components/select).\n * @documentation https://synergy.style/components/option\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @slot - The option's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @csspart checked-icon - The checked icon, an `<syn-icon>` element.\n * @csspart base - The component's base wrapper.\n * @csspart label - The option's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n */\nexport default class SynOption extends SynergyElement {\n static styles: CSSResultGroup = styles;\n static dependencies = { 'syn-icon': SynIcon };\n\n private cachedTextLabel: string;\n // @ts-expect-error - Controller is currently unused\n private readonly localize = new LocalizeController(this);\n\n @query('.option__label') defaultSlot: HTMLSlotElement;\n\n @state() current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)\n @state() selected = false; // the option is selected and has aria-selected=\"true\"\n @state() hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging\n\n /**\n * The option's value. When selected, the containing form control will receive this value. The value must be unique\n * from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\n * multiple values.\n */\n @property({ reflect: true }) value = '';\n\n /** Draws the option in a disabled state, preventing selection. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', 'false');\n }\n\n private handleDefaultSlotChange() {\n const textLabel = this.getTextLabel();\n\n // Ignore the first time the label is set\n if (typeof this.cachedTextLabel === 'undefined') {\n this.cachedTextLabel = textLabel;\n return;\n }\n\n // When the label changes, emit a slotchange event so parent controls see it\n if (textLabel !== this.cachedTextLabel) {\n this.cachedTextLabel = textLabel;\n this.emit('slotchange', { bubbles: true, composed: false, cancelable: false });\n }\n }\n\n private handleMouseEnter() {\n this.hasHover = true;\n }\n\n private handleMouseLeave() {\n this.hasHover = false;\n }\n\n @watch('disabled')\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('selected')\n handleSelectedChange() {\n this.setAttribute('aria-selected', this.selected ? 'true' : 'false');\n }\n\n @watch('value')\n handleValueChange() {\n // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers\n // instead of requiring them to cast the value to a string.\n if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n if (this.value.includes(' ')) {\n console.error(`Option values cannot include a space. All spaces have been replaced with underscores.`, this);\n this.value = this.value.replace(/ /g, '_');\n }\n }\n\n /** Returns a plain text label based on the option's content. */\n getTextLabel() {\n return (this.textContent ?? '').trim();\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n option: true,\n 'option--current': this.current,\n 'option--disabled': this.disabled,\n 'option--selected': this.selected,\n 'option--hover': this.hasHover\n })}\n @mouseenter=${this.handleMouseEnter}\n @mouseleave=${this.handleMouseLeave}\n >\n <syn-icon part=\"checked-icon\" class=\"option__check\" name=\"check\" library=\"system\" aria-hidden=\"true\"></syn-icon>\n <slot part=\"prefix\" name=\"prefix\" class=\"option__prefix\"></slot>\n <slot part=\"label\" class=\"option__label\" @slotchange=${this.handleDefaultSlotChange}></slot>\n <slot part=\"suffix\" name=\"suffix\" class=\"option__suffix\"></slot>\n </div>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAMA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAErB,SAAS,UAAU,OAAO,aAAa;AAyBvC,IAAqB,YAArB,cAAuC,eAAe;AAAA,EAAtD;AAAA;AAME;AAAA,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAI9C,mBAAU;AACV,oBAAW;AACX,oBAAW;AAOS,iBAAQ;AAGO,oBAAW;AAAA;AAAA,EAEvD,oBAAoB;AAClB,UAAM,kBAAkB;AACxB,SAAK,aAAa,QAAQ,QAAQ;AAClC,SAAK,aAAa,iBAAiB,OAAO;AAAA,EAC5C;AAAA,EAEQ,0BAA0B;AAChC,UAAM,YAAY,KAAK,aAAa;AAGpC,QAAI,OAAO,KAAK,oBAAoB,aAAa;AAC/C,WAAK,kBAAkB;AACvB;AAAA,IACF;AAGA,QAAI,cAAc,KAAK,iBAAiB;AACtC,WAAK,kBAAkB;AACvB,WAAK,KAAK,cAAc,EAAE,SAAS,MAAM,UAAU,OAAO,YAAY,MAAM,CAAC;AAAA,IAC/E;AAAA,EACF;AAAA,EAEQ,mBAAmB;AACzB,SAAK,WAAW;AAAA,EAClB;AAAA,EAEQ,mBAAmB;AACzB,SAAK,WAAW;AAAA,EAClB;AAAA,EAGA,uBAAuB;AACrB,SAAK,aAAa,iBAAiB,KAAK,WAAW,SAAS,OAAO;AAAA,EACrE;AAAA,EAGA,uBAAuB;AACrB,SAAK,aAAa,iBAAiB,KAAK,WAAW,SAAS,OAAO;AAAA,EACrE;AAAA,EAGA,oBAAoB;AAGlB,QAAI,OAAO,KAAK,UAAU,UAAU;AAClC,WAAK,QAAQ,OAAO,KAAK,KAAK;AAAA,IAChC;AAEA,QAAI,KAAK,MAAM,SAAS,GAAG,GAAG;AAC5B,cAAQ,MAAM,yFAAyF,IAAI;AAC3G,WAAK,QAAQ,KAAK,MAAM,QAAQ,MAAM,GAAG;AAAA,IAC3C;AAAA,EACF;AAAA;AAAA,EAGA,eAAe;AAjHjB;AAkHI,aAAQ,UAAK,gBAAL,YAAoB,IAAI,KAAK;AAAA,EACvC;AAAA,EAEA,SAAS;AACP,WAAO;AAAA;AAAA;AAAA,gBAGK,SAAS;AAAA,MACf,QAAQ;AAAA,MACR,mBAAmB,KAAK;AAAA,MACxB,oBAAoB,KAAK;AAAA,MACzB,oBAAoB,KAAK;AAAA,MACzB,iBAAiB,KAAK;AAAA,IACxB,CAAC,CAAC;AAAA,sBACY,KAAK,gBAAgB;AAAA,sBACrB,KAAK,gBAAgB;AAAA;AAAA;AAAA;AAAA,+DAIoB,KAAK,uBAAuB;AAAA;AAAA;AAAA;AAAA,EAIzF;AACF;AAxGqB,UACZ,SAAyB;AADb,UAEZ,eAAe,EAAE,YAAY,QAAQ;AAMnB;AAAA,EAAxB,MAAM,gBAAgB;AAAA,GARJ,UAQM;AAEhB;AAAA,EAAR,MAAM;AAAA,GAVY,UAUV;AACA;AAAA,EAAR,MAAM;AAAA,GAXY,UAWV;AACA;AAAA,EAAR,MAAM;AAAA,GAZY,UAYV;AAOoB;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAnBR,UAmBU;AAGe;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAtBvB,UAsByB;AAiC5C;AAAA,EADC,MAAM,UAAU;AAAA,GAtDE,UAuDnB;AAKA;AAAA,EADC,MAAM,UAAU;AAAA,GA3DE,UA4DnB;AAKA;AAAA,EADC,MAAM,OAAO;AAAA,GAhEK,UAiEnB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
optgroup_styles_default
|
|
3
|
+
} from "./chunk.KG52EHDB.js";
|
|
4
|
+
import {
|
|
5
|
+
SynDivider
|
|
6
|
+
} from "./chunk.LTCRPIZ5.js";
|
|
7
|
+
import {
|
|
8
|
+
HasSlotController
|
|
9
|
+
} from "./chunk.XGXFE6IF.js";
|
|
10
|
+
import {
|
|
11
|
+
watch
|
|
12
|
+
} from "./chunk.VZ7S7YYN.js";
|
|
13
|
+
import {
|
|
14
|
+
SynergyElement
|
|
15
|
+
} from "./chunk.C5W2Y6KW.js";
|
|
16
|
+
import {
|
|
17
|
+
__decorateClass
|
|
18
|
+
} from "./chunk.DJOAQ4JU.js";
|
|
19
|
+
|
|
20
|
+
// src/components/optgroup/optgroup.component.ts
|
|
21
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
22
|
+
import { html } from "lit/static-html.js";
|
|
23
|
+
import { property, query } from "lit/decorators.js";
|
|
24
|
+
var SynOptgroup = class extends SynergyElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.hasSlotController = new HasSlotController(this, "[default]", "prefix", "suffix", "label");
|
|
28
|
+
this.disabled = false;
|
|
29
|
+
this.label = "";
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Syncs the disabled prop for all slotted syn-options when it is triggered
|
|
33
|
+
*/
|
|
34
|
+
handleDisableOptions() {
|
|
35
|
+
const { disabled } = this;
|
|
36
|
+
this.defaultSlot.assignedElements().filter((opt) => opt.tagName.toLowerCase() === "syn-option").forEach((opt) => {
|
|
37
|
+
opt.disabled = disabled;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
handleDisabledChange() {
|
|
41
|
+
this.handleDisableOptions();
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
const { disabled } = this;
|
|
45
|
+
const hasLabelSlot = this.hasSlotController.test("label");
|
|
46
|
+
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
47
|
+
return html`
|
|
48
|
+
<div
|
|
49
|
+
class=${classMap({
|
|
50
|
+
optgroup: true,
|
|
51
|
+
"optgroup--has-label": hasLabel,
|
|
52
|
+
"optgroup--has-prefix": this.hasSlotController.test("prefix"),
|
|
53
|
+
"optgroup--has-suffix": this.hasSlotController.test("suffix"),
|
|
54
|
+
"optgroup--is-disabled": this.disabled
|
|
55
|
+
})}
|
|
56
|
+
role="${disabled ? "presentation" : "group"}"
|
|
57
|
+
part="base"
|
|
58
|
+
>
|
|
59
|
+
<syn-divider class="optgroup__divider" part="divider"></syn-divider>
|
|
60
|
+
<div class="optgroup__label-container" part="label-container">
|
|
61
|
+
<slot name="prefix" part="prefix" class="optgroup__prefix"></slot>
|
|
62
|
+
<slot name="label" part="label" class="optgroup__label">
|
|
63
|
+
<span class="optgroup__label-content">
|
|
64
|
+
${this.label}
|
|
65
|
+
</span>
|
|
66
|
+
</slot>
|
|
67
|
+
<slot name="suffix" part="suffix" class="optgroup__suffix"></slot>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="optgroup__options" role="group" part="options">
|
|
70
|
+
<slot @slotchange=${this.handleDisableOptions}></slot>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
`;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
SynOptgroup.styles = optgroup_styles_default;
|
|
77
|
+
SynOptgroup.dependencies = {
|
|
78
|
+
"syn-divider": SynDivider
|
|
79
|
+
};
|
|
80
|
+
__decorateClass([
|
|
81
|
+
query("slot:not([name])")
|
|
82
|
+
], SynOptgroup.prototype, "defaultSlot", 2);
|
|
83
|
+
__decorateClass([
|
|
84
|
+
property({ reflect: true, type: Boolean })
|
|
85
|
+
], SynOptgroup.prototype, "disabled", 2);
|
|
86
|
+
__decorateClass([
|
|
87
|
+
property()
|
|
88
|
+
], SynOptgroup.prototype, "label", 2);
|
|
89
|
+
__decorateClass([
|
|
90
|
+
watch("disabled", { waitUntilFirstUpdate: true })
|
|
91
|
+
], SynOptgroup.prototype, "handleDisabledChange", 1);
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
SynOptgroup
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=chunk.4KLCSMRA.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/optgroup/optgroup.component.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/unbound-method */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit/static-html.js';\nimport { property, query } from 'lit/decorators.js';\nimport type { CSSResultGroup } from 'lit';\nimport { watch } from '../../internal/watch.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport SynDivider from '../divider/divider.component.js';\nimport type SynOption from '../option/option.component.js';\nimport styles from './optgroup.styles.js';\n\n/**\n * @summary The <syn-optgroup> element creates a grouping for <syn-option>s within a <syn-select>.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-optgroup--docs\n * @status stable\n * @since 1.3.0\n *\n * @dependency syn-divider\n *\n * @slot - The given options. Must be `<syn-option>` elements.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot label - The label for the optgroup\n * @slot suffix - A presentational suffix icon or similar element.\n *\n * @csspart base - The component's base wrapper.\n * @csspart label-container - The container that wraps prefix, label and base\n * @csspart divider - The divider that is displayed above the content\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart options - The container that wraps the <syn-option> elements.\n *\n * @cssproperty --display-divider - Display property of the divider. Defaults to \"block\"\n */\nexport default class SynOptgroup extends SynergyElement {\n static styles: CSSResultGroup = styles;\n\n static dependencies = {\n 'syn-divider': SynDivider,\n };\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix', 'label');\n\n @query('slot:not([name])') defaultSlot: HTMLSlotElement;\n\n /**\n * Syncs the disabled prop for all slotted syn-options when it is triggered\n */\n private handleDisableOptions() {\n const { disabled } = this;\n this.defaultSlot\n .assignedElements()\n .filter(opt => opt.tagName.toLowerCase() === 'syn-option')\n .forEach((opt: SynOption) => {\n // eslint-disable-next-line no-param-reassign\n opt.disabled = disabled;\n });\n }\n\n /**\n * Disables all options in the optgroup.\n */\n @property({ reflect: true, type: Boolean }) disabled = false;\n\n /**\n * The optgroups label. If you need to display HTML, use the `label` slot instead.\n */\n @property() label = '';\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n this.handleDisableOptions();\n }\n\n render() {\n const { disabled } = this;\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n return html`\n <div\n class=${classMap({\n optgroup: true,\n 'optgroup--has-label': hasLabel,\n 'optgroup--has-prefix': this.hasSlotController.test('prefix'),\n 'optgroup--has-suffix': this.hasSlotController.test('suffix'),\n 'optgroup--is-disabled': this.disabled,\n })}\n role=\"${disabled ? 'presentation' : 'group'}\"\n part=\"base\"\n >\n <syn-divider class=\"optgroup__divider\" part=\"divider\"></syn-divider>\n <div class=\"optgroup__label-container\" part=\"label-container\">\n <slot name=\"prefix\" part=\"prefix\" class=\"optgroup__prefix\"></slot>\n <slot name=\"label\" part=\"label\" class=\"optgroup__label\">\n <span class=\"optgroup__label-content\">\n ${this.label}\n </span>\n </slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"optgroup__suffix\"></slot>\n </div>\n <div class=\"optgroup__options\" role=\"group\" part=\"options\">\n <slot @slotchange=${this.handleDisableOptions}></slot>\n </div>\n </div>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,UAAU,aAAa;AA+BhC,IAAqB,cAArB,cAAyC,eAAe;AAAA,EAAxD;AAAA;AAOE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,UAAU,UAAU,OAAO;AAqB7D,oBAAW;AAK3C,iBAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAnBZ,uBAAuB;AAC7B,UAAM,EAAE,SAAS,IAAI;AACrB,SAAK,YACF,iBAAiB,EACjB,OAAO,SAAO,IAAI,QAAQ,YAAY,MAAM,YAAY,EACxD,QAAQ,CAAC,QAAmB;AAE3B,UAAI,WAAW;AAAA,IACjB,CAAC;AAAA,EACL;AAAA,EAaA,uBAAuB;AACrB,SAAK,qBAAqB;AAAA,EAC5B;AAAA,EAEA,SAAS;AACP,UAAM,EAAE,SAAS,IAAI;AACrB,UAAM,eAAe,KAAK,kBAAkB,KAAK,OAAO;AACxD,UAAM,WAAW,KAAK,QAAQ,OAAO,CAAC,CAAC;AACvC,WAAO;AAAA;AAAA,gBAEK,SAAS;AAAA,MACf,UAAU;AAAA,MACV,uBAAuB;AAAA,MACvB,wBAAwB,KAAK,kBAAkB,KAAK,QAAQ;AAAA,MAC5D,wBAAwB,KAAK,kBAAkB,KAAK,QAAQ;AAAA,MAC5D,yBAAyB,KAAK;AAAA,IAChC,CAAC,CAAC;AAAA,gBACM,WAAW,iBAAiB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAQnC,KAAK,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAMI,KAAK,oBAAoB;AAAA;AAAA;AAAA;AAAA,EAIrD;AACF;AAxEqB,YACZ,SAAyB;AADb,YAGZ,eAAe;AAAA,EACpB,eAAe;AACjB;AAI2B;AAAA,EAA1B,MAAM,kBAAkB;AAAA,GATN,YASQ;AAmBiB;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GA5BvB,YA4ByB;AAKhC;AAAA,EAAX,SAAS;AAAA,GAjCS,YAiCP;AAGZ;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAnC9B,YAoCnB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynButtonGroup
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.OPVDSHPD.js";
|
|
4
4
|
|
|
5
5
|
// src/components/button-group/button-group.ts
|
|
6
6
|
var button_group_default = SynButtonGroup;
|
|
@@ -9,4 +9,4 @@ SynButtonGroup.define("syn-button-group");
|
|
|
9
9
|
export {
|
|
10
10
|
button_group_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.4ZO3EKCL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynSwitch
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.DPTZN6HY.js";
|
|
4
4
|
|
|
5
5
|
// src/components/switch/switch.ts
|
|
6
6
|
var switch_default = SynSwitch;
|
|
@@ -9,4 +9,4 @@ SynSwitch.define("syn-switch");
|
|
|
9
9
|
export {
|
|
10
10
|
switch_default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.5NJ7WWJW.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk.VZ7S7YYN.js";
|
|
12
12
|
import {
|
|
13
13
|
SynergyElement
|
|
14
|
-
} from "./chunk.
|
|
14
|
+
} from "./chunk.C5W2Y6KW.js";
|
|
15
15
|
import {
|
|
16
16
|
__decorateClass
|
|
17
17
|
} from "./chunk.DJOAQ4JU.js";
|
|
@@ -172,4 +172,4 @@ __decorateClass([
|
|
|
172
172
|
export {
|
|
173
173
|
SynIcon
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=chunk.
|
|
175
|
+
//# sourceMappingURL=chunk.63IJYG6Q.js.map
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import {
|
|
2
|
+
select_custom_styles_default
|
|
3
|
+
} from "./chunk.OWMT6OL2.js";
|
|
4
|
+
import {
|
|
5
|
+
form_control_styles_default
|
|
6
|
+
} from "./chunk.JHXCBOUD.js";
|
|
7
|
+
import {
|
|
8
|
+
component_styles_default
|
|
9
|
+
} from "./chunk.O7USYXBT.js";
|
|
10
|
+
|
|
11
|
+
// src/components/select/select.styles.ts
|
|
12
|
+
import { css } from "lit";
|
|
13
|
+
var select_styles_default = css`
|
|
14
|
+
/* stylelint-disable */
|
|
15
|
+
${component_styles_default}
|
|
16
|
+
${form_control_styles_default}
|
|
17
|
+
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** The popup */
|
|
23
|
+
.select {
|
|
24
|
+
flex: 1 1 auto;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
width: 100%;
|
|
27
|
+
position: relative;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.select::part(popup) {
|
|
32
|
+
z-index: var(--syn-z-index-dropdown);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.select[data-current-placement^='top']::part(popup) {
|
|
36
|
+
transform-origin: bottom;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.select[data-current-placement^='bottom']::part(popup) {
|
|
40
|
+
transform-origin: top;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Combobox */
|
|
44
|
+
.select__combobox {
|
|
45
|
+
flex: 1;
|
|
46
|
+
display: flex;
|
|
47
|
+
width: 100%;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
position: relative;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: start;
|
|
52
|
+
font-family: var(--syn-input-font-family);
|
|
53
|
+
font-weight: var(--syn-input-font-weight);
|
|
54
|
+
letter-spacing: var(--syn-input-letter-spacing);
|
|
55
|
+
vertical-align: middle;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
transition:
|
|
59
|
+
var(--syn-transition-fast) color,
|
|
60
|
+
var(--syn-transition-fast) border,
|
|
61
|
+
var(--syn-transition-fast) box-shadow,
|
|
62
|
+
var(--syn-transition-fast) background-color;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.select__display-input {
|
|
66
|
+
position: relative;
|
|
67
|
+
width: 100%;
|
|
68
|
+
font: inherit;
|
|
69
|
+
border: none;
|
|
70
|
+
background: none;
|
|
71
|
+
color: var(--syn-input-color);
|
|
72
|
+
cursor: inherit;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
padding: 0;
|
|
75
|
+
margin: 0;
|
|
76
|
+
-webkit-appearance: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.select__display-input::placeholder {
|
|
80
|
+
color: var(--syn-input-placeholder-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.select:not(.select--disabled):hover .select__display-input {
|
|
84
|
+
color: var(--syn-input-color-hover);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.select__display-input:focus {
|
|
88
|
+
outline: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Visually hide the display input when multiple is enabled */
|
|
92
|
+
.select--multiple:not(.select--placeholder-visible) .select__display-input {
|
|
93
|
+
position: absolute;
|
|
94
|
+
z-index: -1;
|
|
95
|
+
top: 0;
|
|
96
|
+
left: 0;
|
|
97
|
+
width: 100%;
|
|
98
|
+
height: 100%;
|
|
99
|
+
opacity: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.select__value-input {
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: 0;
|
|
105
|
+
left: 0;
|
|
106
|
+
width: 100%;
|
|
107
|
+
height: 100%;
|
|
108
|
+
padding: 0;
|
|
109
|
+
margin: 0;
|
|
110
|
+
opacity: 0;
|
|
111
|
+
z-index: -1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.select__tags {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex: 1;
|
|
117
|
+
align-items: center;
|
|
118
|
+
flex-wrap: wrap;
|
|
119
|
+
margin-inline-start: var(--syn-spacing-2x-small);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.select__tags::slotted(syn-tag) {
|
|
123
|
+
cursor: pointer !important;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.select--disabled .select__tags,
|
|
127
|
+
.select--disabled .select__tags::slotted(syn-tag) {
|
|
128
|
+
cursor: not-allowed !important;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Standard selects */
|
|
132
|
+
.select--standard .select__combobox {
|
|
133
|
+
background-color: var(--syn-input-background-color);
|
|
134
|
+
border: solid var(--syn-input-border-width) var(--syn-input-border-color);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.select--standard.select--disabled .select__combobox {
|
|
138
|
+
background-color: var(--syn-input-background-color-disabled);
|
|
139
|
+
border-color: var(--syn-input-border-color-disabled);
|
|
140
|
+
color: var(--syn-input-color-disabled);
|
|
141
|
+
opacity: 0.5;
|
|
142
|
+
cursor: not-allowed;
|
|
143
|
+
outline: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.select--standard:not(.select--disabled).select--open .select__combobox,
|
|
147
|
+
.select--standard:not(.select--disabled).select--focused .select__combobox {
|
|
148
|
+
background-color: var(--syn-input-background-color-focus);
|
|
149
|
+
border-color: var(--syn-input-border-color-focus);
|
|
150
|
+
box-shadow: 0 0 0 var(--syn-focus-ring-width) var(--syn-input-focus-ring-color);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Sizes */
|
|
154
|
+
.select--small .select__combobox {
|
|
155
|
+
border-radius: var(--syn-input-border-radius-small);
|
|
156
|
+
font-size: var(--syn-input-font-size-small);
|
|
157
|
+
min-height: var(--syn-input-height-small);
|
|
158
|
+
padding-block: 0;
|
|
159
|
+
padding-inline: var(--syn-input-spacing-small);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.select--small .select__clear {
|
|
163
|
+
margin-inline-start: var(--syn-input-spacing-small);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.select--small .select__prefix::slotted(*) {
|
|
167
|
+
margin-inline-end: var(--syn-input-spacing-small);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.select--small.select--multiple:not(.select--placeholder-visible) .select__combobox {
|
|
171
|
+
padding-block: 2px;
|
|
172
|
+
padding-inline-start: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.select--small .select__tags {
|
|
176
|
+
gap: 2px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.select--medium .select__combobox {
|
|
180
|
+
border-radius: var(--syn-input-border-radius-medium);
|
|
181
|
+
font-size: var(--syn-input-font-size-medium);
|
|
182
|
+
min-height: var(--syn-input-height-medium);
|
|
183
|
+
padding-block: 0;
|
|
184
|
+
padding-inline: var(--syn-input-spacing-medium);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.select--medium .select__clear {
|
|
188
|
+
margin-inline-start: var(--syn-input-spacing-medium);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.select--medium .select__prefix::slotted(*) {
|
|
192
|
+
margin-inline-end: var(--syn-input-spacing-medium);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.select--medium.select--multiple:not(.select--placeholder-visible) .select__combobox {
|
|
196
|
+
padding-inline-start: 0;
|
|
197
|
+
padding-block: 3px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.select--medium .select__tags {
|
|
201
|
+
gap: 3px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.select--large .select__combobox {
|
|
205
|
+
border-radius: var(--syn-input-border-radius-large);
|
|
206
|
+
font-size: var(--syn-input-font-size-large);
|
|
207
|
+
min-height: var(--syn-input-height-large);
|
|
208
|
+
padding-block: 0;
|
|
209
|
+
padding-inline: var(--syn-input-spacing-large);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.select--large .select__clear {
|
|
213
|
+
margin-inline-start: var(--syn-input-spacing-large);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.select--large .select__prefix::slotted(*) {
|
|
217
|
+
margin-inline-end: var(--syn-input-spacing-large);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.select--large.select--multiple:not(.select--placeholder-visible) .select__combobox {
|
|
221
|
+
padding-inline-start: 0;
|
|
222
|
+
padding-block: 4px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.select--large .select__tags {
|
|
226
|
+
gap: 4px;
|
|
227
|
+
}/* Prefix */
|
|
228
|
+
.select__prefix {
|
|
229
|
+
flex: 0;
|
|
230
|
+
display: inline-flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
color: var(--syn-input-placeholder-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Clear button */
|
|
236
|
+
.select__clear {
|
|
237
|
+
display: inline-flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
justify-content: center;
|
|
240
|
+
font-size: inherit;
|
|
241
|
+
color: var(--syn-input-icon-color);
|
|
242
|
+
border: none;
|
|
243
|
+
background: none;
|
|
244
|
+
padding: 0;
|
|
245
|
+
transition: var(--syn-transition-fast) color;
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.select__clear:hover {
|
|
250
|
+
color: var(--syn-input-icon-color-hover);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.select__clear:focus {
|
|
254
|
+
outline: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* Expand icon */
|
|
258
|
+
.select__expand-icon {
|
|
259
|
+
flex: 0 0 auto;
|
|
260
|
+
display: flex;
|
|
261
|
+
align-items: center;
|
|
262
|
+
transition: var(--syn-transition-medium) rotate ease;
|
|
263
|
+
rotate: 0;
|
|
264
|
+
margin-inline-start: var(--syn-spacing-small);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.select--open .select__expand-icon {
|
|
268
|
+
rotate: -180deg;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* Listbox */
|
|
272
|
+
.select__listbox {
|
|
273
|
+
display: block;
|
|
274
|
+
position: relative;
|
|
275
|
+
font-family: var(--syn-font-sans);
|
|
276
|
+
font-size: var(--syn-font-size-medium);
|
|
277
|
+
font-weight: var(--syn-font-weight-normal);
|
|
278
|
+
box-shadow: var(--syn-shadow-large);
|
|
279
|
+
background: var(--syn-panel-background-color);
|
|
280
|
+
border: solid var(--syn-panel-border-width) var(--syn-panel-border-color);
|
|
281
|
+
border-radius: var(--syn-border-radius-medium);
|
|
282
|
+
padding-block: var(--syn-spacing-x-small);
|
|
283
|
+
padding-inline: 0;
|
|
284
|
+
overflow: auto;
|
|
285
|
+
overscroll-behavior: none;
|
|
286
|
+
|
|
287
|
+
/* Make sure it adheres to the popup's auto size */
|
|
288
|
+
max-width: var(--auto-size-available-width);
|
|
289
|
+
max-height: var(--auto-size-available-height);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.select__listbox ::slotted(syn-divider) {
|
|
293
|
+
--spacing: var(--syn-spacing-x-small);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.select__listbox ::slotted(small) {
|
|
297
|
+
font-size: var(--syn-font-size-small);
|
|
298
|
+
font-weight: var(--syn-font-weight-semibold);
|
|
299
|
+
color: var(--syn-color-neutral-500);
|
|
300
|
+
padding-block: var(--syn-spacing-x-small);
|
|
301
|
+
padding-inline: var(--syn-spacing-x-large);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
${select_custom_styles_default}
|
|
305
|
+
`;
|
|
306
|
+
|
|
307
|
+
export {
|
|
308
|
+
select_styles_default
|
|
309
|
+
};
|
|
310
|
+
//# sourceMappingURL=chunk.6XU6OLZ3.js.map
|