@sebgroup/green-core 1.15.1 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -7
- package/chunks/chunk.2LQSDOD4.js +29 -0
- package/chunks/chunk.2ND5EWHE.js +65 -0
- package/chunks/chunk.2OOTOCUG.js +420 -0
- package/chunks/chunk.2WO4NHJ2.js +34 -0
- package/chunks/chunk.2Y3BHFKO.js +154 -0
- package/chunks/chunk.375BWME4.js +29 -0
- package/chunks/chunk.5VURDMKE.js +75 -0
- package/chunks/chunk.63RKNI5K.js +244 -0
- package/chunks/chunk.6NM7ENKA.js +31 -0
- package/chunks/chunk.6UA66KQU.js +153 -0
- package/chunks/chunk.7TCXY7BP.js +0 -0
- package/chunks/chunk.AQGTMWG4.js +101 -0
- package/chunks/chunk.D7H7CUS4.js +55 -0
- package/chunks/chunk.DFYMYEGD.js +78 -0
- package/chunks/chunk.EUQ5DOQM.js +560 -0
- package/chunks/chunk.HS7ICQNA.js +0 -0
- package/chunks/chunk.IYCENQZG.js +28 -0
- package/chunks/chunk.KC32OWZE.js +274 -0
- package/chunks/chunk.LUHCF4BJ.js +64 -0
- package/chunks/chunk.MAD5DQMN.js +161 -0
- package/chunks/chunk.MI4A2C2A.js +0 -0
- package/chunks/chunk.Q2T57HE7.js +0 -0
- package/chunks/chunk.QONSFT2N.js +4653 -0
- package/chunks/chunk.TMBQL2RO.js +0 -0
- package/chunks/chunk.TN6ZYAH3.js +74 -0
- package/chunks/chunk.TSDZQZBY.js +0 -0
- package/chunks/chunk.TX64TTBN.js +0 -0
- package/chunks/chunk.U4DPJ4QU.js +96 -0
- package/chunks/chunk.UF6IEONX.js +0 -0
- package/chunks/chunk.VOYMQ322.js +61 -0
- package/chunks/chunk.VYK7D6QO.js +64 -0
- package/chunks/chunk.WDZ2JTCP.js +360 -0
- package/chunks/chunk.WJDR7FTS.js +193 -0
- package/chunks/chunk.WM7HBMMV.js +54 -0
- package/chunks/chunk.XD5R3ZU3.js +460 -0
- package/chunks/chunk.XHTJVQUJ.js +140 -0
- package/chunks/chunk.XI4H54TV.js +39 -0
- package/chunks/chunk.XMPBXAGB.js +80 -0
- package/chunks/chunk.XU4HZLJL.js +0 -0
- package/chunks/chunk.YIQIH4RW.js +139 -0
- package/chunks/chunk.YJHAKLGR.js +54 -0
- package/chunks/chunk.YO24ZYAD.js +0 -0
- package/chunks/chunk.ZTE73BY2.js +655 -0
- package/chunks/chunk.ZYQWZMVY.js +467 -0
- package/components/badge/badge.js +245 -0
- package/components/button/button.d.ts +5 -5
- package/components/button/button.js +18 -0
- package/components/button/button.trans.styles.d.ts +2 -0
- package/components/button/index.d.ts +1 -0
- package/components/button/index.js +18 -0
- package/components/checkbox/checkbox.js +219 -0
- package/components/context-menu/context-menu.d.ts +2 -1
- package/components/context-menu/context-menu.js +22 -0
- package/components/context-menu/index.d.ts +3 -0
- package/components/context-menu/index.js +29 -0
- package/components/datepicker/date-part-spinner.js +10 -0
- package/components/datepicker/datepicker.d.ts +3 -2
- package/components/datepicker/datepicker.js +29 -0
- package/components/datepicker/index.d.ts +1 -0
- package/components/datepicker/index.js +29 -0
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +22 -0
- package/components/dropdown/index.d.ts +3 -0
- package/components/dropdown/index.js +30 -0
- package/components/form-control.js +12 -0
- package/components/grid/grid.d.ts +2 -2
- package/components/grid/grid.js +11 -0
- package/components/grid/grid.style.css.js +7 -0
- package/components/grid/index.d.ts +1 -0
- package/components/grid/index.js +11 -0
- package/components/grouped-list/grouped-list.js +14 -0
- package/components/grouped-list/index.d.ts +2 -0
- package/components/grouped-list/index.js +17 -0
- package/components/grouped-list/list-item.js +10 -0
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +10 -0
- package/components/icon/index.d.ts +1 -0
- package/components/icon/index.js +10 -0
- package/components/index.d.ts +4 -3
- package/components/index.js +81 -0
- package/components/input/input.js +682 -0
- package/components/radio/radio-group.js +9 -0
- package/components/radio/radio.js +240 -0
- package/components/segmented-control/index.d.ts +1 -0
- package/components/segmented-control/index.js +15 -0
- package/components/segmented-control/segment/index.d.ts +1 -0
- package/components/segmented-control/segment/index.js +13 -0
- package/components/segmented-control/segment/segment.js +12 -0
- package/components/segmented-control/segmented-control.d.ts +1 -1
- package/components/segmented-control/segmented-control.js +15 -0
- package/components/switch/switch.js +164 -0
- package/components/theme/index.d.ts +1 -0
- package/components/theme/index.js +11 -0
- package/components/theme/theme.js +11 -0
- package/components/tooltip/tooltip.js +252 -0
- package/index.js +72 -4291
- package/localization.js +3 -5
- package/package.json +7 -16
- package/primitives/calendar/calendar.js +13 -0
- package/primitives/calendar/functions.js +7 -0
- package/primitives/calendar/index.d.ts +1 -0
- package/primitives/calendar/index.js +14 -0
- package/primitives/listbox/index.d.ts +0 -1
- package/primitives/listbox/index.js +17 -0
- package/primitives/listbox/listbox.d.ts +2 -1
- package/primitives/listbox/listbox.js +16 -0
- package/primitives/listbox/option.js +14 -0
- package/primitives/menu/index.d.ts +1 -0
- package/primitives/menu/index.js +15 -0
- package/primitives/menu/menu-heading.js +11 -0
- package/primitives/menu/menu-item.d.ts +1 -2
- package/primitives/menu/menu-item.js +12 -0
- package/primitives/menu/menu.d.ts +2 -1
- package/primitives/menu/menu.js +14 -0
- package/primitives/popover/index.js +14 -0
- package/primitives/popover/popover.js +13 -0
- package/primitives/ripple/index.d.ts +1 -0
- package/primitives/ripple/index.js +11 -0
- package/primitives/ripple/ripple.d.ts +1 -1
- package/primitives/ripple/ripple.js +10 -0
- package/scoping.d.ts +1 -0
- package/scoping.js +18 -0
- package/transitional-styles.js +6 -4275
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Focusable,
|
|
3
|
+
option_styles_default
|
|
4
|
+
} from "./chunk.2ND5EWHE.js";
|
|
5
|
+
import {
|
|
6
|
+
TransitionalStyles
|
|
7
|
+
} from "./chunk.QONSFT2N.js";
|
|
8
|
+
import {
|
|
9
|
+
GdsElement
|
|
10
|
+
} from "./chunk.2LQSDOD4.js";
|
|
11
|
+
import {
|
|
12
|
+
watch
|
|
13
|
+
} from "./chunk.2WO4NHJ2.js";
|
|
14
|
+
import {
|
|
15
|
+
gdsCustomElement
|
|
16
|
+
} from "./chunk.VOYMQ322.js";
|
|
17
|
+
import {
|
|
18
|
+
__decorateClass,
|
|
19
|
+
__privateAdd,
|
|
20
|
+
__privateGet,
|
|
21
|
+
__privateMethod,
|
|
22
|
+
__privateSet
|
|
23
|
+
} from "./chunk.5VURDMKE.js";
|
|
24
|
+
|
|
25
|
+
// libs/core/src/primitives/listbox/option.ts
|
|
26
|
+
import { html } from "lit";
|
|
27
|
+
import { property, state } from "lit/decorators.js";
|
|
28
|
+
import { when } from "lit/directives/when.js";
|
|
29
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
30
|
+
import "reflect-metadata";
|
|
31
|
+
var _hidden, _emitSelect, emitSelect_fn;
|
|
32
|
+
var GdsOption = class extends Focusable(GdsElement) {
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
__privateAdd(this, _emitSelect);
|
|
36
|
+
__privateAdd(this, _hidden, false);
|
|
37
|
+
this.selected = false;
|
|
38
|
+
this.isPlaceholder = false;
|
|
39
|
+
this.addEventListener("click", __privateMethod(this, _emitSelect, emitSelect_fn));
|
|
40
|
+
this.addEventListener("keydown", (e) => {
|
|
41
|
+
if (e.key !== "Enter" && e.key !== " ")
|
|
42
|
+
return;
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
__privateMethod(this, _emitSelect, emitSelect_fn).call(this, e);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
get hidden() {
|
|
48
|
+
return __privateGet(this, _hidden);
|
|
49
|
+
}
|
|
50
|
+
set hidden(value) {
|
|
51
|
+
if (this.isPlaceholder)
|
|
52
|
+
return;
|
|
53
|
+
__privateSet(this, _hidden, value === "true" || value === true);
|
|
54
|
+
this.setAttribute("aria-hidden", value.toString());
|
|
55
|
+
}
|
|
56
|
+
connectedCallback() {
|
|
57
|
+
super.connectedCallback();
|
|
58
|
+
this.setAttribute("role", "option");
|
|
59
|
+
if (this.isPlaceholder) {
|
|
60
|
+
__privateSet(this, _hidden, true);
|
|
61
|
+
this.setAttribute("aria-hidden", "true");
|
|
62
|
+
}
|
|
63
|
+
this.updateComplete.then(
|
|
64
|
+
() => TransitionalStyles.instance.apply(this, "gds-option")
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
get parentElement() {
|
|
68
|
+
return super.parentElement;
|
|
69
|
+
}
|
|
70
|
+
_handlePlaceholderStatusChange() {
|
|
71
|
+
if (this.isPlaceholder) {
|
|
72
|
+
__privateSet(this, _hidden, true);
|
|
73
|
+
this.setAttribute("aria-hidden", "true");
|
|
74
|
+
} else {
|
|
75
|
+
__privateSet(this, _hidden, false);
|
|
76
|
+
this.setAttribute("aria-hidden", "false");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
var _a;
|
|
81
|
+
const isMultiple = (_a = this.parentElement) == null ? void 0 : _a.multiple;
|
|
82
|
+
const checkbox = html` <span
|
|
83
|
+
class="checkbox ${classMap({ checked: this.selected })}"
|
|
84
|
+
></span>`;
|
|
85
|
+
if (!isMultiple) {
|
|
86
|
+
if (this.selected)
|
|
87
|
+
this.setAttribute("highlighted", "");
|
|
88
|
+
else
|
|
89
|
+
this.removeAttribute("highlighted");
|
|
90
|
+
}
|
|
91
|
+
return html`${this._tStyles}
|
|
92
|
+
<div>${when(isMultiple, () => checkbox)} <slot></slot></div>`;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
_hidden = new WeakMap();
|
|
96
|
+
_emitSelect = new WeakSet();
|
|
97
|
+
emitSelect_fn = function(e) {
|
|
98
|
+
e.stopPropagation();
|
|
99
|
+
this.dispatchEvent(
|
|
100
|
+
new CustomEvent("gds-select", {
|
|
101
|
+
bubbles: true,
|
|
102
|
+
composed: true,
|
|
103
|
+
detail: {
|
|
104
|
+
value: this.value
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
GdsOption.styles = option_styles_default;
|
|
110
|
+
__decorateClass([
|
|
111
|
+
property()
|
|
112
|
+
], GdsOption.prototype, "value", 2);
|
|
113
|
+
__decorateClass([
|
|
114
|
+
property({
|
|
115
|
+
attribute: "aria-hidden",
|
|
116
|
+
reflect: true
|
|
117
|
+
})
|
|
118
|
+
], GdsOption.prototype, "hidden", 1);
|
|
119
|
+
__decorateClass([
|
|
120
|
+
property({
|
|
121
|
+
attribute: "aria-selected",
|
|
122
|
+
reflect: true
|
|
123
|
+
})
|
|
124
|
+
], GdsOption.prototype, "selected", 2);
|
|
125
|
+
__decorateClass([
|
|
126
|
+
property({ type: Boolean, reflect: true })
|
|
127
|
+
], GdsOption.prototype, "isPlaceholder", 2);
|
|
128
|
+
__decorateClass([
|
|
129
|
+
state()
|
|
130
|
+
], GdsOption.prototype, "_tStyles", 2);
|
|
131
|
+
__decorateClass([
|
|
132
|
+
watch("isplaceholder")
|
|
133
|
+
], GdsOption.prototype, "_handlePlaceholderStatusChange", 1);
|
|
134
|
+
GdsOption = __decorateClass([
|
|
135
|
+
gdsCustomElement("gds-option")
|
|
136
|
+
], GdsOption);
|
|
137
|
+
|
|
138
|
+
export {
|
|
139
|
+
GdsOption
|
|
140
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TransitionalStyles
|
|
3
|
+
} from "./chunk.QONSFT2N.js";
|
|
4
|
+
import {
|
|
5
|
+
GdsElement
|
|
6
|
+
} from "./chunk.2LQSDOD4.js";
|
|
7
|
+
import {
|
|
8
|
+
gdsCustomElement,
|
|
9
|
+
html
|
|
10
|
+
} from "./chunk.VOYMQ322.js";
|
|
11
|
+
import {
|
|
12
|
+
__decorateClass
|
|
13
|
+
} from "./chunk.5VURDMKE.js";
|
|
14
|
+
|
|
15
|
+
// libs/core/src/components/theme/theme.ts
|
|
16
|
+
import { property } from "lit/decorators.js";
|
|
17
|
+
var GdsTheme = class extends GdsElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.colorScheme = "light";
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
TransitionalStyles.instance.apply(this, "gds-theme");
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return html` <slot></slot> `;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
__decorateClass([
|
|
31
|
+
property({ reflect: true, attribute: "color-scheme" })
|
|
32
|
+
], GdsTheme.prototype, "colorScheme", 2);
|
|
33
|
+
GdsTheme = __decorateClass([
|
|
34
|
+
gdsCustomElement("gds-theme")
|
|
35
|
+
], GdsTheme);
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
GdsTheme
|
|
39
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// libs/core/src/components/grid/grid.style.css.ts
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
var style = css`
|
|
4
|
+
@layer grid, grid.desktop, grid.tablet, grid.mobile, grid.span, grid.space, grid.align, grid.debug;
|
|
5
|
+
|
|
6
|
+
@layer grid {
|
|
7
|
+
:host {
|
|
8
|
+
--_c: var(--gds-sys-grid-columns-12);
|
|
9
|
+
--_grid-col: repeat(var(--_c), 1fr);
|
|
10
|
+
--_grid-col-start: 1;
|
|
11
|
+
--_grid-col-end: -1;
|
|
12
|
+
--_gap-column: 0;
|
|
13
|
+
--_gap-row: 0;
|
|
14
|
+
display: grid;
|
|
15
|
+
width: 100%;
|
|
16
|
+
grid-template-columns: var(--_grid-col);
|
|
17
|
+
grid-column-gap: var(--_gap-column);
|
|
18
|
+
grid-row-gap: var(--_gap-row);
|
|
19
|
+
padding: var(--_grid-padding);
|
|
20
|
+
text-wrap: balance;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([auto-columns]) {
|
|
24
|
+
--_col-count: var(--_c, 0);
|
|
25
|
+
--_gap-count: calc(var(--_col-count) - 1);
|
|
26
|
+
--_total-gap-width: calc(var(--_gap-count) * var(--_gap-column, 0px));
|
|
27
|
+
--_col-width-max: calc(
|
|
28
|
+
(100% - var(--_total-gap-width)) / var(--_col-count)
|
|
29
|
+
);
|
|
30
|
+
grid-template-columns: repeat(
|
|
31
|
+
auto-fill,
|
|
32
|
+
minmax(max(var(--_col-width), var(--_col-width-max)), 1fr)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Responsive */
|
|
38
|
+
|
|
39
|
+
:host([columns]) {
|
|
40
|
+
--_c: var(--_columns-desktop);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host {
|
|
44
|
+
--_gap-column: var(--_gap-desktop);
|
|
45
|
+
--_gap-row: var(--_row-gap-desktop);
|
|
46
|
+
--_grid-padding: var(--_padding-desktop);
|
|
47
|
+
--_col-width: var(--_col-width-desktop);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media only screen and (max-width: 768px) {
|
|
51
|
+
:host([columns]) {
|
|
52
|
+
--_c: var(--_columns-tablet);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host {
|
|
56
|
+
--_gap-column: var(--_gap-tablet);
|
|
57
|
+
--_gap-row: var(--_row-gap-tablet);
|
|
58
|
+
--_grid-padding: var(--_padding-tablet);
|
|
59
|
+
--_col-width: var(--_col-width-tablet);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@media only screen and (max-width: 425px) {
|
|
64
|
+
:host([columns]) {
|
|
65
|
+
--_c: var(--_columns-mobile);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host {
|
|
69
|
+
--_gap-column: var(--_gap-mobile);
|
|
70
|
+
--_gap-row: var(--_row-gap-mobile);
|
|
71
|
+
--_grid-padding: var(--_padding-mobile);
|
|
72
|
+
--_col-width: var(--_col-width-mobile);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
var grid_style_css_default = style;
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
grid_style_css_default
|
|
80
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GdsElement
|
|
3
|
+
} from "./chunk.2LQSDOD4.js";
|
|
4
|
+
import {
|
|
5
|
+
watch
|
|
6
|
+
} from "./chunk.2WO4NHJ2.js";
|
|
7
|
+
import {
|
|
8
|
+
__decorateClass,
|
|
9
|
+
__privateAdd,
|
|
10
|
+
__privateGet,
|
|
11
|
+
__privateSet
|
|
12
|
+
} from "./chunk.5VURDMKE.js";
|
|
13
|
+
|
|
14
|
+
// libs/core/src/components/form-control.ts
|
|
15
|
+
import { property } from "lit/decorators.js";
|
|
16
|
+
var _internals;
|
|
17
|
+
var GdsFormControlElement = class extends GdsElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
__privateAdd(this, _internals, void 0);
|
|
21
|
+
this.invalid = false;
|
|
22
|
+
this.name = "";
|
|
23
|
+
/**
|
|
24
|
+
* Event handler for the form reset event.
|
|
25
|
+
* Can be overridden by subclasses to rcustomize the reset value.
|
|
26
|
+
*/
|
|
27
|
+
this._handleFormReset = () => {
|
|
28
|
+
this.value = void 0;
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
__privateSet(this, _internals, this.attachInternals());
|
|
32
|
+
} catch (e) {
|
|
33
|
+
__privateSet(this, _internals, {
|
|
34
|
+
form: this.closest("form"),
|
|
35
|
+
setFormValue: (value) => {
|
|
36
|
+
this.value = value;
|
|
37
|
+
},
|
|
38
|
+
setValidity: (validity, validationMessage) => {
|
|
39
|
+
this.invalid = validity.customError;
|
|
40
|
+
},
|
|
41
|
+
validationMessage: "",
|
|
42
|
+
validity: {
|
|
43
|
+
badInput: false,
|
|
44
|
+
customError: false,
|
|
45
|
+
patternMismatch: false,
|
|
46
|
+
rangeOverflow: false,
|
|
47
|
+
rangeUnderflow: false,
|
|
48
|
+
stepMismatch: false,
|
|
49
|
+
tooLong: false,
|
|
50
|
+
tooShort: false,
|
|
51
|
+
typeMismatch: false,
|
|
52
|
+
valueMissing: false,
|
|
53
|
+
valid: true
|
|
54
|
+
},
|
|
55
|
+
willValidate: true,
|
|
56
|
+
checkValidity: () => true,
|
|
57
|
+
reportValidity: () => true
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
get form() {
|
|
62
|
+
return __privateGet(this, _internals).form;
|
|
63
|
+
}
|
|
64
|
+
get validity() {
|
|
65
|
+
return __privateGet(this, _internals).validity;
|
|
66
|
+
}
|
|
67
|
+
get validationMessage() {
|
|
68
|
+
return __privateGet(this, _internals).validationMessage;
|
|
69
|
+
}
|
|
70
|
+
get willValidate() {
|
|
71
|
+
return __privateGet(this, _internals).willValidate;
|
|
72
|
+
}
|
|
73
|
+
checkValidity() {
|
|
74
|
+
return __privateGet(this, _internals).checkValidity();
|
|
75
|
+
}
|
|
76
|
+
reportValidity() {
|
|
77
|
+
return __privateGet(this, _internals).reportValidity();
|
|
78
|
+
}
|
|
79
|
+
connectedCallback() {
|
|
80
|
+
var _a;
|
|
81
|
+
super.connectedCallback();
|
|
82
|
+
(_a = __privateGet(this, _internals).form) == null ? void 0 : _a.addEventListener("reset", this._handleFormReset);
|
|
83
|
+
}
|
|
84
|
+
disconnectedCallback() {
|
|
85
|
+
var _a;
|
|
86
|
+
super.disconnectedCallback();
|
|
87
|
+
(_a = __privateGet(this, _internals).form) == null ? void 0 : _a.removeEventListener("reset", this._handleFormReset);
|
|
88
|
+
}
|
|
89
|
+
__handleValidityChange() {
|
|
90
|
+
__privateGet(this, _internals).setValidity(
|
|
91
|
+
{
|
|
92
|
+
badInput: false,
|
|
93
|
+
customError: this.invalid,
|
|
94
|
+
patternMismatch: false,
|
|
95
|
+
rangeOverflow: false,
|
|
96
|
+
rangeUnderflow: false,
|
|
97
|
+
stepMismatch: false,
|
|
98
|
+
tooLong: false,
|
|
99
|
+
tooShort: false,
|
|
100
|
+
typeMismatch: false,
|
|
101
|
+
valueMissing: false,
|
|
102
|
+
valid: !this.invalid
|
|
103
|
+
},
|
|
104
|
+
this.validationMessage || "Error message"
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
__handleValueChange() {
|
|
108
|
+
__privateGet(this, _internals).setFormValue(this.value);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
_internals = new WeakMap();
|
|
112
|
+
GdsFormControlElement.formAssociated = true;
|
|
113
|
+
__decorateClass([
|
|
114
|
+
property({
|
|
115
|
+
type: Boolean,
|
|
116
|
+
reflect: true,
|
|
117
|
+
attribute: "aria-invalid",
|
|
118
|
+
converter: {
|
|
119
|
+
fromAttribute: Boolean,
|
|
120
|
+
toAttribute: (value) => value == null ? void 0 : value.toString()
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
], GdsFormControlElement.prototype, "invalid", 2);
|
|
124
|
+
__decorateClass([
|
|
125
|
+
property()
|
|
126
|
+
], GdsFormControlElement.prototype, "value", 2);
|
|
127
|
+
__decorateClass([
|
|
128
|
+
property({ reflect: true })
|
|
129
|
+
], GdsFormControlElement.prototype, "name", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
watch("invalid")
|
|
132
|
+
], GdsFormControlElement.prototype, "__handleValidityChange", 1);
|
|
133
|
+
__decorateClass([
|
|
134
|
+
watch("value")
|
|
135
|
+
], GdsFormControlElement.prototype, "__handleValueChange", 1);
|
|
136
|
+
|
|
137
|
+
export {
|
|
138
|
+
GdsFormControlElement
|
|
139
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TransitionalStyles
|
|
3
|
+
} from "./chunk.QONSFT2N.js";
|
|
4
|
+
import {
|
|
5
|
+
GdsElement
|
|
6
|
+
} from "./chunk.2LQSDOD4.js";
|
|
7
|
+
import {
|
|
8
|
+
gdsCustomElement
|
|
9
|
+
} from "./chunk.VOYMQ322.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk.5VURDMKE.js";
|
|
13
|
+
|
|
14
|
+
// libs/core/src/primitives/menu/menu-heading.ts
|
|
15
|
+
import { html } from "lit";
|
|
16
|
+
|
|
17
|
+
// libs/core/src/primitives/menu/menu-heading.styles.ts
|
|
18
|
+
import { css } from "lit";
|
|
19
|
+
var style = css`
|
|
20
|
+
@layer base, reset, transitional-styles;
|
|
21
|
+
@layer base {
|
|
22
|
+
:host {
|
|
23
|
+
padding: 0.5 1rem;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host(:hover) {
|
|
28
|
+
background-color: grey;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
var menu_heading_styles_default = style;
|
|
33
|
+
|
|
34
|
+
// libs/core/src/primitives/menu/menu-heading.ts
|
|
35
|
+
var GdsMenuHeading = class extends GdsElement {
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
this.setAttribute("inert", "true");
|
|
39
|
+
this.updateComplete.then(
|
|
40
|
+
() => TransitionalStyles.instance.apply(this, "gds-menu-heading")
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return html`<slot></slot>`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
GdsMenuHeading.styles = menu_heading_styles_default;
|
|
48
|
+
GdsMenuHeading = __decorateClass([
|
|
49
|
+
gdsCustomElement("gds-menu-heading")
|
|
50
|
+
], GdsMenuHeading);
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
GdsMenuHeading
|
|
54
|
+
};
|
|
File without changes
|