@sebgroup/green-core 1.15.0 → 1.16.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.274BU2AI.js +244 -0
- 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.3SEVAGLE.js +96 -0
- package/chunks/chunk.522C22QY.js +460 -0
- package/chunks/chunk.5VURDMKE.js +75 -0
- package/chunks/chunk.6NM7ENKA.js +31 -0
- package/chunks/chunk.6UA66KQU.js +153 -0
- package/chunks/chunk.7P5N6NZL.js +560 -0
- package/chunks/chunk.7TCXY7BP.js +0 -0
- package/chunks/chunk.D7H7CUS4.js +55 -0
- package/chunks/chunk.DFYMYEGD.js +78 -0
- package/chunks/chunk.HS7ICQNA.js +0 -0
- package/chunks/chunk.IYCENQZG.js +28 -0
- package/chunks/chunk.J2A6J77W.js +81 -0
- package/chunks/chunk.KC32OWZE.js +274 -0
- package/chunks/chunk.KV4SDMFS.js +101 -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.NOYHINYP.js +467 -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.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.XHTJVQUJ.js +140 -0
- package/chunks/chunk.XI4H54TV.js +39 -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/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 -4278
- package/localization.js +40 -44
- 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,245 @@
|
|
|
1
|
+
import "../../chunks/chunk.7TCXY7BP.js";
|
|
2
|
+
import {
|
|
3
|
+
constrainSlots
|
|
4
|
+
} from "../../chunks/chunk.6NM7ENKA.js";
|
|
5
|
+
import {
|
|
6
|
+
__decorateClass,
|
|
7
|
+
__privateAdd,
|
|
8
|
+
__privateSet
|
|
9
|
+
} from "../../chunks/chunk.5VURDMKE.js";
|
|
10
|
+
|
|
11
|
+
// libs/core/src/components/badge/badge.ts
|
|
12
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
13
|
+
import { customElement, property } from "lit/decorators.js";
|
|
14
|
+
import { when } from "lit/directives/when.js";
|
|
15
|
+
|
|
16
|
+
// libs/core/src/components/badge/style/badge.styles.css
|
|
17
|
+
var badge_styles_default = `@layer gds-badge, shell, tokens, a11y, variants, types;
|
|
18
|
+
|
|
19
|
+
@layer gds-badge {
|
|
20
|
+
@layer tokens {
|
|
21
|
+
:host {
|
|
22
|
+
--gds-badge-cl: rgba(53, 53, 49, 1);
|
|
23
|
+
--gds-badge-bg: rgba(243, 243, 242, 1);
|
|
24
|
+
|
|
25
|
+
--gds-badge-cl-information: rgba(53, 53, 49, 1);
|
|
26
|
+
--gds-badge-bg-information: rgba(243, 243, 242, 1);
|
|
27
|
+
|
|
28
|
+
--gds-badge-cl-success: rgba(0, 109, 49, 1);
|
|
29
|
+
--gds-badge-bg-success: rgba(234, 255, 232, 1);
|
|
30
|
+
|
|
31
|
+
--gds-badge-cl-warning: rgba(125, 87, 0, 1);
|
|
32
|
+
--gds-badge-bg-warning: rgba(255, 238, 217, 1);
|
|
33
|
+
|
|
34
|
+
--gds-badge-cl-error: rgba(186, 29, 0, 1);
|
|
35
|
+
--gds-badge-bg-error: rgba(255, 237, 233, 1);
|
|
36
|
+
|
|
37
|
+
--gds-badge-cl-disabled: rgba(157, 157, 149, 1);
|
|
38
|
+
--gds-badge-bg-disabled: rgba(249, 249, 249, 1);
|
|
39
|
+
|
|
40
|
+
--gds-badge-cl-surface: rgba(106, 106, 98, 1);
|
|
41
|
+
--gds-badge-bg-surface: rgba(255, 255, 255, 1);
|
|
42
|
+
|
|
43
|
+
/* Dark Mode */
|
|
44
|
+
--gds-badge-cl-dark: rgba(53, 53, 49, 1);
|
|
45
|
+
--gds-badge-bg-dark: rgba(243, 243, 242, 1);
|
|
46
|
+
|
|
47
|
+
--gds-badge-cl-information-dark: rgba(53, 53, 49, 1);
|
|
48
|
+
--gds-badge-bg-information-dark: rgba(243, 243, 242, 1);
|
|
49
|
+
|
|
50
|
+
--gds-badge-cl-success-dark: rgba(0, 109, 49, 1);
|
|
51
|
+
--gds-badge-bg-success-dark: rgba(234, 255, 232, 1);
|
|
52
|
+
|
|
53
|
+
--gds-badge-cl-warning-dark: rgba(125, 87, 0, 1);
|
|
54
|
+
--gds-badge-bg-warning-dark: rgba(255, 238, 217, 1);
|
|
55
|
+
|
|
56
|
+
--gds-badge-cl-error-dark: rgba(186, 29, 0, 1);
|
|
57
|
+
--gds-badge-bg-error-dark: rgba(255, 237, 233, 1);
|
|
58
|
+
|
|
59
|
+
--gds-badge-cl-disabled-dark: rgba(157, 157, 149, 1);
|
|
60
|
+
--gds-badge-bg-disabled-dark: rgba(249, 249, 249, 1);
|
|
61
|
+
|
|
62
|
+
--gds-badge-cl-surface-dark: rgba(106, 106, 98, 1);
|
|
63
|
+
--gds-badge-bg-surface-dark: rgba(255, 255, 255, 1);
|
|
64
|
+
|
|
65
|
+
--gds-badge-radii: 4px;
|
|
66
|
+
|
|
67
|
+
--gds-badge-fs: 12px;
|
|
68
|
+
--gds-badge-lh: 1;
|
|
69
|
+
--gds-badge-fw: 500;
|
|
70
|
+
--gds-badge-inline-padding: 10px;
|
|
71
|
+
--gds-badge-block-padding: 6px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
@layer a11y {
|
|
75
|
+
@media (prefers-color-scheme: dark) {
|
|
76
|
+
:host {
|
|
77
|
+
--gds-badge-cl: var(--gds-badge-cl-dark);
|
|
78
|
+
--gds-badge-bg: var(--gds-badge-bg-dark);
|
|
79
|
+
|
|
80
|
+
--gds-badge-cl-information: var(--gds-badge-cl-information-dark);
|
|
81
|
+
--gds-badge-bg-information: var(--gds-badge-bg-information-dark);
|
|
82
|
+
|
|
83
|
+
--gds-badge-cl-success: var(--gds-badge-cl-success-dark);
|
|
84
|
+
--gds-badge-bg-success: var(--gds-badge-bg-success-dark);
|
|
85
|
+
|
|
86
|
+
--gds-badge-cl-warning: var(--gds-badge-cl-warning-dark);
|
|
87
|
+
--gds-badge-bg-warning: var(--gds-badge-bg-warning-dark);
|
|
88
|
+
|
|
89
|
+
--gds-badge-cl-error: var(--gds-badge-cl-error-dark);
|
|
90
|
+
--gds-badge-bg-error: var(--gds-badge-bg-error-dark);
|
|
91
|
+
|
|
92
|
+
--gds-badge-cl-disabled: var(--gds-badge-cl-disabled-dark);
|
|
93
|
+
--gds-badge-bg-disabled: var(--gds-badge-bg-disabled-dark);
|
|
94
|
+
|
|
95
|
+
--gds-badge-cl-surface: var(--gds-badge-cl-surface-dark);
|
|
96
|
+
--gds-badge-bg-surface: var(--gds-badge-bg-surface-dark);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (prefers-reduced-motion: reduce) {
|
|
101
|
+
:host {
|
|
102
|
+
--gds-badge-motion: 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
107
|
+
:host {
|
|
108
|
+
--gds-badge-transparency: 1;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@media (prefers-contrast: more) {
|
|
113
|
+
:root {
|
|
114
|
+
--gds-badge-contrast: 1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@layer shell {
|
|
120
|
+
.gds-badge {
|
|
121
|
+
align-items: center;
|
|
122
|
+
background-color: var(--gds-badge-bg);
|
|
123
|
+
border-radius: var(--gds-badge-radii);
|
|
124
|
+
color: var(--gds-badge-cl);
|
|
125
|
+
display: flex;
|
|
126
|
+
font-size: var(--gds-badge-fs);
|
|
127
|
+
font-weight: var(--gds-badge-fw);
|
|
128
|
+
gap: 1ch;
|
|
129
|
+
height: 1lh;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
letter-spacing: normal;
|
|
132
|
+
line-height: var(--gds-badge-lh);
|
|
133
|
+
max-width: -moz-max-content;
|
|
134
|
+
max-width: max-content;
|
|
135
|
+
padding-block: var(--gds-badge-block-padding);
|
|
136
|
+
padding-inline: var(--gds-badge-inline-padding);
|
|
137
|
+
text-overflow: ellipsis;
|
|
138
|
+
text-transform: uppercase;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
|
|
141
|
+
@layer variants {
|
|
142
|
+
:host([variant='information']) & {
|
|
143
|
+
--gds-badge-cl: var(--gds-badge-cl-information);
|
|
144
|
+
--gds-badge-bg: var(--gds-badge-bg-information);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:host([variant='success']) & {
|
|
148
|
+
--gds-badge-cl: var(--gds-badge-cl-success);
|
|
149
|
+
--gds-badge-bg: var(--gds-badge-bg-success);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([variant='warning']) & {
|
|
153
|
+
--gds-badge-cl: var(--gds-badge-cl-warning);
|
|
154
|
+
--gds-badge-bg: var(--gds-badge-bg-warning);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host([variant='error']) & {
|
|
158
|
+
--gds-badge-cl: var(--gds-badge-cl-error);
|
|
159
|
+
--gds-badge-bg: var(--gds-badge-bg-error);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([variant='disabled']) & {
|
|
163
|
+
--gds-badge-cl: var(--gds-badge-cl-disabled);
|
|
164
|
+
--gds-badge-bg: var(--gds-badge-bg-disabled);
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host([variant='surface']) & {
|
|
169
|
+
--gds-badge-cl: var(--gds-badge-cl-surface);
|
|
170
|
+
--gds-badge-bg: var(--gds-badge-bg-surface);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@layer types {
|
|
175
|
+
:host([type='counter']) & {
|
|
176
|
+
max-width: var(--gds-badge-counter-max-width);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
`;
|
|
183
|
+
|
|
184
|
+
// libs/core/src/components/badge/badge.ts
|
|
185
|
+
var _internals;
|
|
186
|
+
var GdsBadge = class extends LitElement {
|
|
187
|
+
constructor() {
|
|
188
|
+
super();
|
|
189
|
+
// Private members
|
|
190
|
+
__privateAdd(this, _internals, void 0);
|
|
191
|
+
this.variant = "";
|
|
192
|
+
this.type = "";
|
|
193
|
+
this.icon = "";
|
|
194
|
+
__privateSet(this, _internals, this.attachInternals());
|
|
195
|
+
constrainSlots(this);
|
|
196
|
+
}
|
|
197
|
+
slotIcon() {
|
|
198
|
+
return html` <slot name="icon" gds-allow="gds-icon"></slot> `;
|
|
199
|
+
}
|
|
200
|
+
slotLabel() {
|
|
201
|
+
var _a;
|
|
202
|
+
const content = ((_a = this.textContent) == null ? void 0 : _a.trim()) || "";
|
|
203
|
+
const hasLabel = content !== "";
|
|
204
|
+
let label = content;
|
|
205
|
+
if (this.type.toLowerCase() === "counter" && label.length > 4) {
|
|
206
|
+
label = label.substring(0, 4);
|
|
207
|
+
return hasLabel ? html`${label}` : "";
|
|
208
|
+
}
|
|
209
|
+
return hasLabel ? html`<slot part="label" gds-allow="#text"></slot>` : "";
|
|
210
|
+
}
|
|
211
|
+
// slotLabel() {
|
|
212
|
+
// return this.textContent
|
|
213
|
+
// ? html`<slot part="label" gds-allow="#text"></slot>`
|
|
214
|
+
// : ''
|
|
215
|
+
// }
|
|
216
|
+
render() {
|
|
217
|
+
const hasIconSlot = this.querySelector('[slot="icon"]') !== null;
|
|
218
|
+
const content = html`${when(
|
|
219
|
+
hasIconSlot,
|
|
220
|
+
() => html`<slot name="icon" gds-allow="gds-icon"></slot>`
|
|
221
|
+
)}${this.slotLabel()}`;
|
|
222
|
+
return html`<div class="gds-badge">${content}</div>`;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
_internals = new WeakMap();
|
|
226
|
+
GdsBadge.styles = unsafeCSS(badge_styles_default);
|
|
227
|
+
GdsBadge.shadowRootOptions = {
|
|
228
|
+
mode: "open",
|
|
229
|
+
delegatesFocus: true
|
|
230
|
+
};
|
|
231
|
+
__decorateClass([
|
|
232
|
+
property({ type: String, reflect: true, attribute: "variant" })
|
|
233
|
+
], GdsBadge.prototype, "variant", 2);
|
|
234
|
+
__decorateClass([
|
|
235
|
+
property({ type: String, reflect: true, attribute: "type" })
|
|
236
|
+
], GdsBadge.prototype, "type", 2);
|
|
237
|
+
__decorateClass([
|
|
238
|
+
property({ type: String, reflect: true, attribute: "icon" })
|
|
239
|
+
], GdsBadge.prototype, "icon", 2);
|
|
240
|
+
GdsBadge = __decorateClass([
|
|
241
|
+
customElement("gds-badge")
|
|
242
|
+
], GdsBadge);
|
|
243
|
+
export {
|
|
244
|
+
GdsBadge
|
|
245
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '../../primitives/ripple/ripple';
|
|
1
|
+
import '../../primitives/ripple';
|
|
3
2
|
import { GdsFormControlElement } from '../../components/form-control';
|
|
4
3
|
/**
|
|
5
4
|
* @element gds-button
|
|
@@ -25,13 +24,13 @@ export declare class GdsButton<ValueT = any> extends GdsFormControlElement<Value
|
|
|
25
24
|
*/
|
|
26
25
|
type?: HTMLButtonElement['type'];
|
|
27
26
|
/**
|
|
28
|
-
* The
|
|
27
|
+
* The rank of the button. Defaults to "primary".
|
|
29
28
|
*/
|
|
30
|
-
|
|
29
|
+
rank: 'primary' | 'secondary' | 'tertiary';
|
|
31
30
|
/**
|
|
32
31
|
* Defines which set the button belongs to. Defaults to "neutral".
|
|
33
32
|
*/
|
|
34
|
-
|
|
33
|
+
variant: 'default' | 'positive' | 'negative';
|
|
35
34
|
/**
|
|
36
35
|
* Sets the size of the button. Defaults to "small".
|
|
37
36
|
*/
|
|
@@ -42,5 +41,6 @@ export declare class GdsButton<ValueT = any> extends GdsFormControlElement<Value
|
|
|
42
41
|
label: string;
|
|
43
42
|
private _mainSlot?;
|
|
44
43
|
constructor();
|
|
44
|
+
connectedCallback(): void;
|
|
45
45
|
render(): any;
|
|
46
46
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GdsButton
|
|
3
|
+
} from "../../chunks/chunk.NOYHINYP.js";
|
|
4
|
+
import "../../chunks/chunk.TX64TTBN.js";
|
|
5
|
+
import "../../chunks/chunk.KV4SDMFS.js";
|
|
6
|
+
import "../../chunks/chunk.YIQIH4RW.js";
|
|
7
|
+
import "../../chunks/chunk.7P5N6NZL.js";
|
|
8
|
+
import "../../chunks/chunk.QONSFT2N.js";
|
|
9
|
+
import "../../chunks/chunk.WM7HBMMV.js";
|
|
10
|
+
import "../../chunks/chunk.2LQSDOD4.js";
|
|
11
|
+
import "../../chunks/chunk.6NM7ENKA.js";
|
|
12
|
+
import "../../chunks/chunk.YO24ZYAD.js";
|
|
13
|
+
import "../../chunks/chunk.2WO4NHJ2.js";
|
|
14
|
+
import "../../chunks/chunk.VOYMQ322.js";
|
|
15
|
+
import "../../chunks/chunk.5VURDMKE.js";
|
|
16
|
+
export {
|
|
17
|
+
GdsButton
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GdsButton
|
|
3
|
+
} from "../../chunks/chunk.NOYHINYP.js";
|
|
4
|
+
import "../../chunks/chunk.TX64TTBN.js";
|
|
5
|
+
import "../../chunks/chunk.KV4SDMFS.js";
|
|
6
|
+
import "../../chunks/chunk.YIQIH4RW.js";
|
|
7
|
+
import "../../chunks/chunk.7P5N6NZL.js";
|
|
8
|
+
import "../../chunks/chunk.QONSFT2N.js";
|
|
9
|
+
import "../../chunks/chunk.WM7HBMMV.js";
|
|
10
|
+
import "../../chunks/chunk.2LQSDOD4.js";
|
|
11
|
+
import "../../chunks/chunk.6NM7ENKA.js";
|
|
12
|
+
import "../../chunks/chunk.YO24ZYAD.js";
|
|
13
|
+
import "../../chunks/chunk.2WO4NHJ2.js";
|
|
14
|
+
import "../../chunks/chunk.VOYMQ322.js";
|
|
15
|
+
import "../../chunks/chunk.5VURDMKE.js";
|
|
16
|
+
export {
|
|
17
|
+
GdsButton
|
|
18
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import "../../chunks/chunk.7TCXY7BP.js";
|
|
2
|
+
import {
|
|
3
|
+
constrainSlots
|
|
4
|
+
} from "../../chunks/chunk.6NM7ENKA.js";
|
|
5
|
+
import {
|
|
6
|
+
__decorateClass,
|
|
7
|
+
__privateAdd,
|
|
8
|
+
__privateSet
|
|
9
|
+
} from "../../chunks/chunk.5VURDMKE.js";
|
|
10
|
+
|
|
11
|
+
// libs/core/src/components/checkbox/checkbox.ts
|
|
12
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
13
|
+
import { customElement } from "lit/decorators.js";
|
|
14
|
+
|
|
15
|
+
// libs/core/src/components/checkbox/checkbox.css
|
|
16
|
+
var checkbox_default = `:host {
|
|
17
|
+
--gds-checkbox-bg-color: hsl(0, 0%, 100%);
|
|
18
|
+
--gds-checkbox-border-color: hsla(60, 4%, 50%, 1);
|
|
19
|
+
--gds-checkbox-border-width: 2px;
|
|
20
|
+
--gds-checkbox-border-radius: 4px;
|
|
21
|
+
--gds-checkbox-color-hover: hsla(60, 6%, 90%, 1);
|
|
22
|
+
--gds-checkbox-color-active: hsla(60, 4%, 85%, 1);
|
|
23
|
+
--gds-checkbox-checked-color: hsla(60, 4%, 20%, 1);
|
|
24
|
+
--gds-checkbox-color-tick: hsl(0, 0%, 100%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.gds-checkbox {
|
|
28
|
+
align-items: center;
|
|
29
|
+
border-radius: calc(var(--gds-checkbox-border-radius) * 2);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
display: flex;
|
|
32
|
+
height: 32px;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
position: relative;
|
|
35
|
+
transition: all 248ms ease-in-out;
|
|
36
|
+
width: 32px;
|
|
37
|
+
|
|
38
|
+
input {
|
|
39
|
+
-webkit-appearance: none;
|
|
40
|
+
-moz-appearance: none;
|
|
41
|
+
appearance: none;
|
|
42
|
+
aspect-ratio: 1/1;
|
|
43
|
+
background-color: var(--gds-checkbox-bg-color);
|
|
44
|
+
border: var(--gds-checkbox-border-width) solid
|
|
45
|
+
var(--gds-checkbox-border-color);
|
|
46
|
+
border-radius: var(--gds-checkbox-border-radius);
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
height: 16px;
|
|
50
|
+
margin: unset;
|
|
51
|
+
padding: unset;
|
|
52
|
+
position: relative;
|
|
53
|
+
transition: all 248ms cubic-bezier(0.2, 0.85, 0.32, 1.2);
|
|
54
|
+
width: 16px;
|
|
55
|
+
|
|
56
|
+
&::after {
|
|
57
|
+
border: var(--gds-checkbox-border-width) solid
|
|
58
|
+
var(--gds-checkbox-color-tick);
|
|
59
|
+
border-left: 0;
|
|
60
|
+
border-top: 0;
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
content: '';
|
|
63
|
+
height: 8px;
|
|
64
|
+
inset: 1px 0 0 3.5px;
|
|
65
|
+
opacity: 0;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
position: absolute;
|
|
68
|
+
rotate: 43deg;
|
|
69
|
+
scale: 0.8;
|
|
70
|
+
transition: all 248ms cubic-bezier(0.2, 0.85, 0.32, 1.2);
|
|
71
|
+
width: 5px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:checked {
|
|
75
|
+
background-color: var(--gds-checkbox-checked-color);
|
|
76
|
+
border-color: var(--gds-checkbox-checked-color);
|
|
77
|
+
color: var(--gds-checkbox-checked-color-tick);
|
|
78
|
+
|
|
79
|
+
&::after {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
scale: 1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&[indeterminate],
|
|
86
|
+
&:indeterminate {
|
|
87
|
+
&::after {
|
|
88
|
+
border-left: 0;
|
|
89
|
+
border-radius: 0;
|
|
90
|
+
border-top: 0;
|
|
91
|
+
height: var(--gds-checkbox-border-width);
|
|
92
|
+
inset: 5px 0 0 2px;
|
|
93
|
+
opacity: 1;
|
|
94
|
+
rotate: 0deg;
|
|
95
|
+
scale: 1;
|
|
96
|
+
width: 8px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:disabled {
|
|
101
|
+
cursor: not-allowed;
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:hover:has(input:not([disabled])) {
|
|
107
|
+
background-color: var(--gds-checkbox-color-hover);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:active:has(input:not([disabled])) {
|
|
111
|
+
background-color: var(--gds-checkbox-color-active);
|
|
112
|
+
|
|
113
|
+
.gds-checkbox-core {
|
|
114
|
+
border-color: var(--gds-checkbox-checked-color);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:has(input:checked) {
|
|
119
|
+
background-color: var(--gds-checkbox-color-hover);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:has(input:disabled) {
|
|
123
|
+
cursor: not-allowed;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Invalid state */
|
|
127
|
+
|
|
128
|
+
&:has(input:invalid) {
|
|
129
|
+
--gds-checkbox-bg-color: hsla(13, 75%, 95%, 1);
|
|
130
|
+
--gds-checkbox-border-color: hsla(9, 75%, 38%, 1);
|
|
131
|
+
--gds-checkbox-checked-color: hsla(9, 75%, 38%, 1);
|
|
132
|
+
--gds-checkbox-color-active: hsla(12, 78%, 86%, 1);
|
|
133
|
+
--gds-checkbox-color-hover: hsla(12, 75%, 91%, 1);
|
|
134
|
+
--gds-checkbox-color-tick: hsla(0, 0%, 100%, 1);
|
|
135
|
+
|
|
136
|
+
input {
|
|
137
|
+
&::after {
|
|
138
|
+
border-color: var(--gds-checkbox-color-tick);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:checked {
|
|
142
|
+
background-color: var(--gds-checkbox-checked-color);
|
|
143
|
+
border-color: var(--gds-checkbox-checked-color);
|
|
144
|
+
color: var(--gds-checkbox-checked-color-tick);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:hover:has(input:not([disabled])) {
|
|
149
|
+
background-color: var(--gds-checkbox-color-hover);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:active:has(input:not([disabled])) {
|
|
153
|
+
background-color: var(--gds-checkbox-color-active);
|
|
154
|
+
|
|
155
|
+
.gds-checkbox-core {
|
|
156
|
+
border-color: var(--gds-checkbox-checked-color);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:has(input:checked) {
|
|
161
|
+
background-color: var(--gds-checkbox-color-hover);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
`;
|
|
166
|
+
|
|
167
|
+
// libs/core/src/components/checkbox/checkbox.ts
|
|
168
|
+
var _internals;
|
|
169
|
+
var GdsCheckbox = class extends LitElement {
|
|
170
|
+
constructor() {
|
|
171
|
+
super();
|
|
172
|
+
// Private members
|
|
173
|
+
__privateAdd(this, _internals, void 0);
|
|
174
|
+
this.inputElement = null;
|
|
175
|
+
this.exludeAttr = ["id", "label"];
|
|
176
|
+
__privateSet(this, _internals, this.attachInternals());
|
|
177
|
+
constrainSlots(this);
|
|
178
|
+
}
|
|
179
|
+
reflectAttributesToInput() {
|
|
180
|
+
if (this.inputElement) {
|
|
181
|
+
const attributes = this.attributes;
|
|
182
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
183
|
+
const attribute = attributes[i];
|
|
184
|
+
if (!this.exludeAttr.includes(attribute.name)) {
|
|
185
|
+
this.inputElement.setAttribute(attribute.name, attribute.value);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
update(changedProperties) {
|
|
191
|
+
var _a;
|
|
192
|
+
super.update(changedProperties);
|
|
193
|
+
if (!this.inputElement) {
|
|
194
|
+
this.inputElement = (_a = this.shadowRoot) == null ? void 0 : _a.getElementById(
|
|
195
|
+
"checkbox"
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
this.reflectAttributesToInput();
|
|
199
|
+
}
|
|
200
|
+
render() {
|
|
201
|
+
return html`
|
|
202
|
+
<label class="gds-checkbox">
|
|
203
|
+
<input id="checkbox" type="checkbox" />
|
|
204
|
+
</label>
|
|
205
|
+
`;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
_internals = new WeakMap();
|
|
209
|
+
GdsCheckbox.styles = unsafeCSS(checkbox_default);
|
|
210
|
+
GdsCheckbox.shadowRootOptions = {
|
|
211
|
+
mode: "open",
|
|
212
|
+
delegatesFocus: true
|
|
213
|
+
};
|
|
214
|
+
GdsCheckbox = __decorateClass([
|
|
215
|
+
customElement("gds-checkbox")
|
|
216
|
+
], GdsCheckbox);
|
|
217
|
+
export {
|
|
218
|
+
GdsCheckbox
|
|
219
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GdsContextMenu
|
|
3
|
+
} from "../../chunks/chunk.6UA66KQU.js";
|
|
4
|
+
import "../../chunks/chunk.UF6IEONX.js";
|
|
5
|
+
import "../../chunks/chunk.LUHCF4BJ.js";
|
|
6
|
+
import "../../chunks/chunk.VYK7D6QO.js";
|
|
7
|
+
import "../../chunks/chunk.XU4HZLJL.js";
|
|
8
|
+
import "../../chunks/chunk.WDZ2JTCP.js";
|
|
9
|
+
import "../../chunks/chunk.DFYMYEGD.js";
|
|
10
|
+
import "../../chunks/chunk.2ND5EWHE.js";
|
|
11
|
+
import "../../chunks/chunk.QONSFT2N.js";
|
|
12
|
+
import "../../chunks/chunk.WM7HBMMV.js";
|
|
13
|
+
import "../../chunks/chunk.2LQSDOD4.js";
|
|
14
|
+
import "../../chunks/chunk.7TCXY7BP.js";
|
|
15
|
+
import "../../chunks/chunk.6NM7ENKA.js";
|
|
16
|
+
import "../../chunks/chunk.YO24ZYAD.js";
|
|
17
|
+
import "../../chunks/chunk.2WO4NHJ2.js";
|
|
18
|
+
import "../../chunks/chunk.VOYMQ322.js";
|
|
19
|
+
import "../../chunks/chunk.5VURDMKE.js";
|
|
20
|
+
export {
|
|
21
|
+
GdsContextMenu
|
|
22
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GdsMenuHeading
|
|
3
|
+
} from "../../chunks/chunk.YJHAKLGR.js";
|
|
4
|
+
import {
|
|
5
|
+
GdsContextMenu
|
|
6
|
+
} from "../../chunks/chunk.6UA66KQU.js";
|
|
7
|
+
import "../../chunks/chunk.UF6IEONX.js";
|
|
8
|
+
import "../../chunks/chunk.LUHCF4BJ.js";
|
|
9
|
+
import {
|
|
10
|
+
GdsMenuItem
|
|
11
|
+
} from "../../chunks/chunk.VYK7D6QO.js";
|
|
12
|
+
import "../../chunks/chunk.XU4HZLJL.js";
|
|
13
|
+
import "../../chunks/chunk.WDZ2JTCP.js";
|
|
14
|
+
import "../../chunks/chunk.DFYMYEGD.js";
|
|
15
|
+
import "../../chunks/chunk.2ND5EWHE.js";
|
|
16
|
+
import "../../chunks/chunk.QONSFT2N.js";
|
|
17
|
+
import "../../chunks/chunk.WM7HBMMV.js";
|
|
18
|
+
import "../../chunks/chunk.2LQSDOD4.js";
|
|
19
|
+
import "../../chunks/chunk.7TCXY7BP.js";
|
|
20
|
+
import "../../chunks/chunk.6NM7ENKA.js";
|
|
21
|
+
import "../../chunks/chunk.YO24ZYAD.js";
|
|
22
|
+
import "../../chunks/chunk.2WO4NHJ2.js";
|
|
23
|
+
import "../../chunks/chunk.VOYMQ322.js";
|
|
24
|
+
import "../../chunks/chunk.5VURDMKE.js";
|
|
25
|
+
export {
|
|
26
|
+
GdsContextMenu,
|
|
27
|
+
GdsMenuHeading,
|
|
28
|
+
GdsMenuItem
|
|
29
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GdsDatePartSpinner
|
|
3
|
+
} from "../../chunks/chunk.WJDR7FTS.js";
|
|
4
|
+
import "../../chunks/chunk.YO24ZYAD.js";
|
|
5
|
+
import "../../chunks/chunk.2WO4NHJ2.js";
|
|
6
|
+
import "../../chunks/chunk.VOYMQ322.js";
|
|
7
|
+
import "../../chunks/chunk.5VURDMKE.js";
|
|
8
|
+
export {
|
|
9
|
+
GdsDatePartSpinner
|
|
10
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GdsFormControlElement } from '../../components/form-control';
|
|
2
|
-
import '../../primitives/popover
|
|
3
|
-
import '../../primitives/calendar
|
|
2
|
+
import '../../primitives/popover';
|
|
3
|
+
import '../../primitives/calendar';
|
|
4
|
+
import '../../components/dropdown';
|
|
4
5
|
import './date-part-spinner';
|
|
5
6
|
/**
|
|
6
7
|
* @element gds-datepicker
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GdsDatepicker
|
|
3
|
+
} from "../../chunks/chunk.ZTE73BY2.js";
|
|
4
|
+
import "../../chunks/chunk.TMBQL2RO.js";
|
|
5
|
+
import "../../chunks/chunk.KC32OWZE.js";
|
|
6
|
+
import "../../chunks/chunk.375BWME4.js";
|
|
7
|
+
import "../../chunks/chunk.Q2T57HE7.js";
|
|
8
|
+
import "../../chunks/chunk.2OOTOCUG.js";
|
|
9
|
+
import "../../chunks/chunk.MI4A2C2A.js";
|
|
10
|
+
import "../../chunks/chunk.MAD5DQMN.js";
|
|
11
|
+
import "../../chunks/chunk.XHTJVQUJ.js";
|
|
12
|
+
import "../../chunks/chunk.YIQIH4RW.js";
|
|
13
|
+
import "../../chunks/chunk.YJHAKLGR.js";
|
|
14
|
+
import "../../chunks/chunk.XU4HZLJL.js";
|
|
15
|
+
import "../../chunks/chunk.WDZ2JTCP.js";
|
|
16
|
+
import "../../chunks/chunk.DFYMYEGD.js";
|
|
17
|
+
import "../../chunks/chunk.2ND5EWHE.js";
|
|
18
|
+
import "../../chunks/chunk.QONSFT2N.js";
|
|
19
|
+
import "../../chunks/chunk.WM7HBMMV.js";
|
|
20
|
+
import "../../chunks/chunk.2LQSDOD4.js";
|
|
21
|
+
import "../../chunks/chunk.6NM7ENKA.js";
|
|
22
|
+
import "../../chunks/chunk.WJDR7FTS.js";
|
|
23
|
+
import "../../chunks/chunk.YO24ZYAD.js";
|
|
24
|
+
import "../../chunks/chunk.2WO4NHJ2.js";
|
|
25
|
+
import "../../chunks/chunk.VOYMQ322.js";
|
|
26
|
+
import "../../chunks/chunk.5VURDMKE.js";
|
|
27
|
+
export {
|
|
28
|
+
GdsDatepicker
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './datepicker';
|