@sebgroup/green-core 1.20.0 → 1.20.2
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/chunks/{chunk.DFYMYEGD.js → chunk.2X23R32H.js} +0 -1
- package/chunks/{chunk.ZLWSCK7R.js → chunk.4QOFEG6G.js} +17 -8
- package/chunks/{chunk.CGZNEIGV.js → chunk.4ZTSWZUY.js} +6 -7
- package/chunks/{chunk.3KJV6CHY.js → chunk.5EPIZQO6.js} +2 -2
- package/chunks/{chunk.6LA2CKUM.js → chunk.73TOOYEY.js} +1 -1
- package/chunks/{chunk.YDYO7HP5.js → chunk.ATEP56AI.js} +2 -2
- package/chunks/{chunk.NYOCHFZE.js → chunk.BJOJYTQV.js} +5 -5
- package/chunks/{chunk.Z5NACNXH.js → chunk.BLKXWE5L.js} +2 -2
- package/chunks/{chunk.BKSMVF4C.js → chunk.DFTJBJPB.js} +1 -1
- package/chunks/{chunk.Y42J4CV3.js → chunk.FQUH54AY.js} +2 -2
- package/chunks/{chunk.PE6MD3MB.js → chunk.GJ4HS4M4.js} +3 -3
- package/chunks/{chunk.NRYXPR4Z.js → chunk.HHH2BCUH.js} +3 -4
- package/chunks/{chunk.RSCI4LL2.js → chunk.IKRRGS7G.js} +7 -6
- package/chunks/{chunk.YEV6STTM.js → chunk.JG4R6KQ7.js} +1 -1
- package/chunks/{chunk.GOOHCUU6.js → chunk.KMGYMMFU.js} +39 -11
- package/chunks/{chunk.VHKGMBUL.js → chunk.KPNRNWRS.js} +3 -3
- package/chunks/{chunk.BJCCPLEO.js → chunk.LZXR7Q7Q.js} +2 -2
- package/chunks/{chunk.5PHLJFEX.js → chunk.METO6ZWZ.js} +2 -3
- package/chunks/{chunk.XOARVFGN.js → chunk.MZSK66DN.js} +4 -1
- package/chunks/{chunk.EC77QYRA.js → chunk.NI33W56L.js} +2 -2
- package/chunks/{chunk.2RF5VP6K.js → chunk.PKBOP746.js} +4 -4
- package/chunks/{chunk.A62LO4CP.js → chunk.UDH3TBG6.js} +1 -1
- package/chunks/chunk.VOYMQ322.js +1 -1
- package/chunks/{chunk.CH2GIVY6.js → chunk.VXAUXCMI.js} +31 -5
- package/chunks/{chunk.CUR4WRCG.js → chunk.Z43CP7DK.js} +4 -4
- package/chunks/{chunk.W2XAWNZY.js → chunk.ZE4NFOBK.js} +4 -4
- package/chunks/{chunk.EM7MZKG5.js → chunk.ZQ4D5K7J.js} +5 -1
- package/components/button/button.d.ts +5 -2
- package/components/button/button.js +7 -8
- package/components/button/button.trans.styles.js +1 -1
- package/components/button/index.js +7 -8
- package/components/context-menu/context-menu.d.ts +1 -1
- package/components/context-menu/context-menu.js +9 -9
- package/components/context-menu/context-menu.trans.styles.js +1 -1
- package/components/context-menu/index.js +12 -12
- package/components/datepicker/datepicker.js +12 -12
- package/components/datepicker/datepicker.trans.styles.js +1 -1
- package/components/datepicker/index.js +12 -12
- package/components/dropdown/dropdown.d.ts +0 -1
- package/components/dropdown/dropdown.js +9 -9
- package/components/dropdown/dropdown.trans.styles.js +1 -1
- package/components/dropdown/index.js +10 -10
- package/components/filter-chips/filter-chip/filter-chip.d.ts +3 -5
- package/components/filter-chips/filter-chip/filter-chip.js +9 -10
- package/components/filter-chips/filter-chip/filter-chip.trans.styles.js +1 -1
- package/components/filter-chips/filter-chip/index.js +9 -10
- package/components/filter-chips/filter-chips.d.ts +8 -0
- package/components/filter-chips/filter-chips.js +11 -12
- package/components/filter-chips/filter-chips.trans.styles.js +1 -1
- package/components/filter-chips/index.js +11 -12
- package/components/form-control.d.ts +3 -0
- package/components/form-control.js +2 -2
- package/components/grid/grid.d.ts +6 -6
- package/components/grid/grid.js +3 -3
- package/components/grid/index.js +3 -3
- package/components/grouped-list/grouped-list.js +5 -5
- package/components/grouped-list/grouped-list.trans.styles.js +1 -1
- package/components/grouped-list/index.js +5 -5
- package/components/grouped-list/list-item.js +2 -2
- package/components/icon/icon.js +2 -2
- package/components/icon/index.js +2 -2
- package/components/index.js +44 -45
- package/components/radio/radio-group.js +70 -5
- package/components/segmented-control/index.js +7 -5
- package/components/segmented-control/segment/index.js +4 -4
- package/components/segmented-control/segment/segment.js +4 -4
- package/components/segmented-control/segment/segment.trans.styles.js +1 -1
- package/components/segmented-control/segmented-control.d.ts +1 -0
- package/components/segmented-control/segmented-control.js +7 -5
- package/components/segmented-control/segmented-control.trans.styles.js +1 -1
- package/components/theme/index.js +3 -3
- package/components/theme/theme.js +3 -3
- package/components/theme/theme.trans.styles.js +1 -1
- package/gds-element.d.ts +8 -1
- package/index.js +44 -45
- package/mixins/focusable.d.ts +1 -1
- package/package.json +4 -4
- package/primitives/calendar/calendar.d.ts +26 -0
- package/primitives/calendar/calendar.js +3 -3
- package/primitives/calendar/functions.d.ts +1 -1
- package/primitives/calendar/index.js +3 -3
- package/primitives/listbox/index.js +5 -5
- package/primitives/listbox/listbox.d.ts +0 -1
- package/primitives/listbox/listbox.js +5 -5
- package/primitives/listbox/option.d.ts +0 -1
- package/primitives/listbox/option.js +3 -3
- package/primitives/menu/index.js +5 -5
- package/primitives/menu/menu-heading.js +3 -3
- package/primitives/menu/menu-item.js +3 -3
- package/primitives/menu/menu.js +5 -5
- package/primitives/popover/index.js +3 -3
- package/primitives/popover/popover.js +3 -3
- package/primitives/ripple/index.js +2 -2
- package/primitives/ripple/ripple.js +2 -2
- package/transitional-styles.js +1 -1
- package/utils/decorators/observe-light-dom.d.ts +1 -1
- package/utils/decorators/resize-observer.d.ts +1 -1
- package/utils/decorators/watch-media-query.d.ts +1 -1
- package/utils/decorators/watch.d.ts +1 -1
- package/utils/helpers/custom-element-scoping.d.ts +1 -3
- package/utils/localization/localization.d.ts +1 -1
- package/chunks/chunk.3RYYLMGT.js +0 -74
- package/chunks/chunk.YBOK7MI7.js +0 -31
- package/components/badge/badge.d.ts +0 -43
- package/components/badge/badge.js +0 -245
- package/components/checkbox/checkbox.d.ts +0 -12
- package/components/checkbox/checkbox.js +0 -219
- package/components/input/input.d.ts +0 -69
- package/components/input/input.js +0 -658
- package/components/radio/radio.d.ts +0 -14
- package/components/radio/radio.js +0 -240
- package/components/switch/switch.d.ts +0 -12
- package/components/switch/switch.js +0 -164
- package/components/tooltip/tooltip.d.ts +0 -14
- package/components/tooltip/tooltip.js +0 -252
|
@@ -274,8 +274,7 @@ var dropdown_trans_styles_default = `/**
|
|
|
274
274
|
:host(:invalid) button + .form-info::before {
|
|
275
275
|
background: transparent;
|
|
276
276
|
border-radius: 0 0 4px 4px;
|
|
277
|
-
|
|
278
|
-
clip-path: inset(4px 0 0 0);
|
|
277
|
+
clip-path: inset(4px 0 0 0);
|
|
279
278
|
content: "";
|
|
280
279
|
display: block;
|
|
281
280
|
height: 4px;
|
|
@@ -286,8 +285,7 @@ var dropdown_trans_styles_default = `/**
|
|
|
286
285
|
}
|
|
287
286
|
:host(:invalid) button + .form-info::before {
|
|
288
287
|
background: var(--intent-danger-background);
|
|
289
|
-
|
|
290
|
-
clip-path: inset(1px 0 0 0);
|
|
288
|
+
clip-path: inset(1px 0 0 0);
|
|
291
289
|
}
|
|
292
290
|
::slotted([slot=trigger]) {
|
|
293
291
|
overflow: hidden;
|
|
@@ -3080,8 +3078,7 @@ i.sg-icon.sg-icon-ellipsis::before {
|
|
|
3080
3078
|
:host(:invalid) .field + .form-info::before {
|
|
3081
3079
|
background: transparent;
|
|
3082
3080
|
border-radius: 0 0 4px 4px;
|
|
3083
|
-
|
|
3084
|
-
clip-path: inset(4px 0 0 0);
|
|
3081
|
+
clip-path: inset(4px 0 0 0);
|
|
3085
3082
|
content: "";
|
|
3086
3083
|
display: block;
|
|
3087
3084
|
height: 4px;
|
|
@@ -3092,8 +3089,7 @@ i.sg-icon.sg-icon-ellipsis::before {
|
|
|
3092
3089
|
}
|
|
3093
3090
|
:host(:invalid) .field + .form-info::before {
|
|
3094
3091
|
background: var(--intent-danger-background);
|
|
3095
|
-
|
|
3096
|
-
clip-path: inset(1px 0 0 0);
|
|
3092
|
+
clip-path: inset(1px 0 0 0);
|
|
3097
3093
|
}
|
|
3098
3094
|
.header {
|
|
3099
3095
|
padding-top: 0.5rem;
|
|
@@ -3351,6 +3347,19 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
|
|
|
3351
3347
|
:host table tbody tr td.disabled.sg-date-holiday {
|
|
3352
3348
|
color: hsla(var(--sg-hsl-red-2), 0.25);
|
|
3353
3349
|
}
|
|
3350
|
+
:host table tbody tr td.custom-date {
|
|
3351
|
+
position: relative;
|
|
3352
|
+
}
|
|
3353
|
+
:host table tbody .indicator_dot {
|
|
3354
|
+
display: block;
|
|
3355
|
+
width: 0.375rem;
|
|
3356
|
+
height: 0.375rem;
|
|
3357
|
+
border-radius: 50%;
|
|
3358
|
+
margin: auto;
|
|
3359
|
+
position: absolute;
|
|
3360
|
+
inset-block-end: 0.125rem;
|
|
3361
|
+
inset-inline: 0;
|
|
3362
|
+
}
|
|
3354
3363
|
table {
|
|
3355
3364
|
flex-grow: 1;
|
|
3356
3365
|
width: 100%;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsFormControlElement
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.MZSK66DN.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk.
|
|
5
|
+
constrainSlots
|
|
6
|
+
} from "./chunk.KBYQYDL3.js";
|
|
7
7
|
import {
|
|
8
8
|
TransitionalStyles
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.4QOFEG6G.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./chunk.
|
|
11
|
+
observeLightDOM
|
|
12
|
+
} from "./chunk.WM7HBMMV.js";
|
|
13
13
|
import {
|
|
14
14
|
watch
|
|
15
15
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -33,7 +33,6 @@ import { when } from "lit/directives/when.js";
|
|
|
33
33
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
34
34
|
import { classMap } from "lit/directives/class-map.js";
|
|
35
35
|
import { msg, str, updateWhenLocaleChanges } from "@lit/localize";
|
|
36
|
-
import "reflect-metadata";
|
|
37
36
|
|
|
38
37
|
// libs/core/src/components/dropdown/dropdown.styles.ts
|
|
39
38
|
import { css } from "lit";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk.NBEFLQNK.js";
|
|
4
4
|
import {
|
|
5
5
|
tokens
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.ZE4NFOBK.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
10
10
|
import {
|
|
11
11
|
watch
|
|
12
12
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
constrainSlots
|
|
3
|
+
} from "./chunk.KBYQYDL3.js";
|
|
1
4
|
import {
|
|
2
5
|
TransitionalStyles
|
|
3
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.4QOFEG6G.js";
|
|
4
7
|
import {
|
|
5
8
|
GdsElement
|
|
6
|
-
} from "./chunk.
|
|
7
|
-
import {
|
|
8
|
-
constrainSlots
|
|
9
|
-
} from "./chunk.KBYQYDL3.js";
|
|
9
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk.C3ECHGX7.js";
|
|
5
5
|
import {
|
|
6
6
|
GdsFormControlElement
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.MZSK66DN.js";
|
|
8
8
|
import {
|
|
9
9
|
TransitionalStyles
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.4QOFEG6G.js";
|
|
11
11
|
import {
|
|
12
12
|
watch
|
|
13
13
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ListboxKbNavController,
|
|
3
3
|
unwrap
|
|
4
|
-
} from "./chunk.
|
|
4
|
+
} from "./chunk.2X23R32H.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.4QOFEG6G.js";
|
|
8
8
|
import {
|
|
9
9
|
GdsElement
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
11
11
|
import {
|
|
12
12
|
gdsCustomElement,
|
|
13
13
|
html
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ListboxKbNavController,
|
|
3
3
|
unwrap
|
|
4
|
-
} from "./chunk.
|
|
4
|
+
} from "./chunk.2X23R32H.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.4QOFEG6G.js";
|
|
8
8
|
import {
|
|
9
9
|
GdsElement
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
11
11
|
import {
|
|
12
12
|
watch
|
|
13
13
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
// libs/core/src/primitives/listbox/listbox.ts
|
|
25
25
|
import { property } from "lit/decorators.js";
|
|
26
26
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
27
|
-
import "reflect-metadata";
|
|
28
27
|
|
|
29
28
|
// libs/core/src/primitives/listbox/listbox.styles.ts
|
|
30
29
|
import { css } from "lit";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
constrainSlots
|
|
3
|
+
} from "./chunk.KBYQYDL3.js";
|
|
1
4
|
import {
|
|
2
5
|
TransitionalStyles
|
|
3
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.4QOFEG6G.js";
|
|
4
7
|
import {
|
|
5
8
|
GdsElement
|
|
6
|
-
} from "./chunk.
|
|
7
|
-
import {
|
|
8
|
-
constrainSlots
|
|
9
|
-
} from "./chunk.KBYQYDL3.js";
|
|
9
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
|
@@ -128,7 +128,8 @@ __decorateClass([
|
|
|
128
128
|
], GdsContextMenu.prototype, "buttonLabel", 2);
|
|
129
129
|
__decorateClass([
|
|
130
130
|
property({
|
|
131
|
-
attribute: "show-label"
|
|
131
|
+
attribute: "show-label",
|
|
132
|
+
type: Boolean
|
|
132
133
|
})
|
|
133
134
|
], GdsContextMenu.prototype, "showLabel", 2);
|
|
134
135
|
__decorateClass([
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
forwardAttributes
|
|
3
|
-
} from "./chunk.YBOK7MI7.js";
|
|
4
1
|
import {
|
|
5
2
|
tokens
|
|
6
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.ZE4NFOBK.js";
|
|
7
4
|
import {
|
|
8
5
|
GdsFormControlElement
|
|
9
|
-
} from "./chunk.
|
|
10
|
-
import {
|
|
11
|
-
TransitionalStyles
|
|
12
|
-
} from "./chunk.ZLWSCK7R.js";
|
|
6
|
+
} from "./chunk.MZSK66DN.js";
|
|
13
7
|
import {
|
|
14
8
|
constrainSlots
|
|
15
9
|
} from "./chunk.KBYQYDL3.js";
|
|
10
|
+
import {
|
|
11
|
+
TransitionalStyles
|
|
12
|
+
} from "./chunk.4QOFEG6G.js";
|
|
16
13
|
import {
|
|
17
14
|
gdsCustomElement,
|
|
18
15
|
html
|
|
@@ -25,11 +22,39 @@ import {
|
|
|
25
22
|
} from "./chunk.5VURDMKE.js";
|
|
26
23
|
|
|
27
24
|
// libs/core/src/components/button/button.ts
|
|
28
|
-
import { nothing, unsafeCSS } from "lit";
|
|
25
|
+
import { nothing as nothing2, unsafeCSS } from "lit";
|
|
29
26
|
import { property, query } from "lit/decorators.js";
|
|
30
27
|
import { when } from "lit/directives/when.js";
|
|
31
28
|
import { classMap } from "lit/directives/class-map.js";
|
|
32
29
|
|
|
30
|
+
// libs/core/src/utils/directives/forward-attributes.ts
|
|
31
|
+
import { Directive, PartType, directive } from "lit/directive.js";
|
|
32
|
+
import { nothing } from "lit/html.js";
|
|
33
|
+
var ForwardAttributesDirective = class extends Directive {
|
|
34
|
+
constructor(partInfo) {
|
|
35
|
+
super(partInfo);
|
|
36
|
+
if (partInfo.type !== PartType.ELEMENT) {
|
|
37
|
+
throw new Error(
|
|
38
|
+
"The `forwardAttributes` directive must be used in element bindings"
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
render(_filter) {
|
|
43
|
+
return nothing;
|
|
44
|
+
}
|
|
45
|
+
update(part, [filter]) {
|
|
46
|
+
var _a;
|
|
47
|
+
const element = part.element;
|
|
48
|
+
const host = (_a = part.options) == null ? void 0 : _a.host;
|
|
49
|
+
Array.from(host.attributes).forEach((attr) => {
|
|
50
|
+
if (filter(attr)) {
|
|
51
|
+
element.setAttribute(attr.name.replace("gds-", ""), attr.value);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var forwardAttributes = directive(ForwardAttributesDirective);
|
|
57
|
+
|
|
33
58
|
// libs/core/src/components/button/button.style.css
|
|
34
59
|
var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, disabled;
|
|
35
60
|
|
|
@@ -365,7 +390,7 @@ var GdsButton = class extends GdsFormControlElement {
|
|
|
365
390
|
super();
|
|
366
391
|
this.disabled = false;
|
|
367
392
|
this.rank = "primary";
|
|
368
|
-
this.variant = "
|
|
393
|
+
this.variant = "neutral";
|
|
369
394
|
this.size = "medium";
|
|
370
395
|
this.label = "";
|
|
371
396
|
__privateAdd(this, _isIconButton, false);
|
|
@@ -417,7 +442,7 @@ var GdsButton = class extends GdsFormControlElement {
|
|
|
417
442
|
?type="${this.type}"
|
|
418
443
|
?disabled="${this.disabled}"
|
|
419
444
|
@click="${__privateGet(this, _handleClick)}"
|
|
420
|
-
aria-label=${this.label ||
|
|
445
|
+
aria-label=${this.label || nothing2}
|
|
421
446
|
part="_button"
|
|
422
447
|
${forwardAttributes(
|
|
423
448
|
(attr) => attr.name.startsWith("gds-aria") || attr.name === "gds-role"
|
|
@@ -438,6 +463,9 @@ _isIconButton = new WeakMap();
|
|
|
438
463
|
_mainSlotChange = new WeakMap();
|
|
439
464
|
_handleClick = new WeakMap();
|
|
440
465
|
GdsButton.styles = [tokens, unsafeCSS(button_style_default)];
|
|
466
|
+
/**
|
|
467
|
+
* @internal
|
|
468
|
+
*/
|
|
441
469
|
GdsButton.shadowRootOptions = {
|
|
442
470
|
mode: "open",
|
|
443
471
|
delegatesFocus: true
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tokens
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.ZE4NFOBK.js";
|
|
4
4
|
import {
|
|
5
5
|
TransitionalStyles
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.4QOFEG6G.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk.2ND5EWHE.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.4QOFEG6G.js";
|
|
8
8
|
import {
|
|
9
9
|
GdsElement
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
11
11
|
import {
|
|
12
12
|
watch
|
|
13
13
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -27,7 +27,6 @@ import { html } from "lit";
|
|
|
27
27
|
import { property } from "lit/decorators.js";
|
|
28
28
|
import { when } from "lit/directives/when.js";
|
|
29
29
|
import { classMap } from "lit/directives/class-map.js";
|
|
30
|
-
import "reflect-metadata";
|
|
31
30
|
var _hidden, _emitSelect, emitSelect_fn;
|
|
32
31
|
var GdsOption = class extends Focusable(GdsElement) {
|
|
33
32
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsElement
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
4
4
|
import {
|
|
5
5
|
watch
|
|
6
6
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -58,6 +58,9 @@ var GdsFormControlElement = class extends GdsElement {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* The form element that the form control is associated with.
|
|
63
|
+
*/
|
|
61
64
|
get form() {
|
|
62
65
|
return __privateGet(this, _internals).form;
|
|
63
66
|
}
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk.2ND5EWHE.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.4QOFEG6G.js";
|
|
8
8
|
import {
|
|
9
9
|
GdsElement
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
11
11
|
import {
|
|
12
12
|
gdsCustomElement,
|
|
13
13
|
html
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsSegment
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.KPNRNWRS.js";
|
|
4
4
|
import {
|
|
5
5
|
resizeObserver
|
|
6
6
|
} from "./chunk.VHN4JEZC.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.ZE4NFOBK.js";
|
|
10
10
|
import {
|
|
11
11
|
TransitionalStyles
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.4QOFEG6G.js";
|
|
13
13
|
import {
|
|
14
14
|
GdsElement
|
|
15
|
-
} from "./chunk.
|
|
15
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
16
16
|
import {
|
|
17
17
|
watch
|
|
18
18
|
} from "./chunk.2WO4NHJ2.js";
|
package/chunks/chunk.VOYMQ322.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// libs/core/src/utils/helpers/custom-element-scoping.ts
|
|
2
2
|
import { html as litHtml } from "lit";
|
|
3
3
|
import { customElement } from "lit/decorators.js";
|
|
4
|
-
var VER_SUFFIX = "-
|
|
4
|
+
var VER_SUFFIX = "-dd3549";
|
|
5
5
|
var elementLookupTable = /* @__PURE__ */ new Map();
|
|
6
6
|
var gdsCustomElement = (tagName) => {
|
|
7
7
|
if (globalThis.GDS_DISABLE_VERSIONED_ELEMENTS) {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk.375BWME4.js";
|
|
4
4
|
import {
|
|
5
5
|
TransitionalStyles
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.4QOFEG6G.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
10
10
|
import {
|
|
11
11
|
watch
|
|
12
12
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -16,7 +16,8 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
__decorateClass,
|
|
18
18
|
__privateAdd,
|
|
19
|
-
__privateMethod
|
|
19
|
+
__privateMethod,
|
|
20
|
+
__spreadValues
|
|
20
21
|
} from "./chunk.5VURDMKE.js";
|
|
21
22
|
|
|
22
23
|
// libs/core/src/primitives/calendar/calendar.ts
|
|
@@ -124,12 +125,23 @@ var GdsCalendar = class extends GdsElement {
|
|
|
124
125
|
</td>`
|
|
125
126
|
)}
|
|
126
127
|
${week.days.map((day) => {
|
|
128
|
+
const customization = __spreadValues({
|
|
129
|
+
// Defaults
|
|
130
|
+
color: "currentColor",
|
|
131
|
+
// Get baseline disabled state from the disabledDates prop (or false if unset)
|
|
132
|
+
disabled: Boolean(
|
|
133
|
+
this.disabledDates && this.disabledDates.some((d) => isSameDay(d, day))
|
|
134
|
+
)
|
|
135
|
+
}, this.customizedDates && this.customizedDates.find(
|
|
136
|
+
(d) => isSameDay(d.date, day)
|
|
137
|
+
));
|
|
127
138
|
const isOutsideCurrentMonth = !isSameMonth(this.focusedDate, day) || day < this.min || day > this.max;
|
|
128
139
|
const isWeekend = day.getDay() === 0 || day.getDay() === 6;
|
|
129
|
-
const isDisabled = isOutsideCurrentMonth || this.disabledWeekends && isWeekend
|
|
140
|
+
const isDisabled = customization.disabled || isOutsideCurrentMonth || this.disabledWeekends && isWeekend;
|
|
130
141
|
return html`
|
|
131
142
|
<td
|
|
132
143
|
class="${classMap({
|
|
144
|
+
"custom-date": Boolean(customization),
|
|
133
145
|
disabled: Boolean(isDisabled),
|
|
134
146
|
today: isSameDay(currentDate, day)
|
|
135
147
|
})}"
|
|
@@ -140,7 +152,18 @@ var GdsCalendar = class extends GdsElement {
|
|
|
140
152
|
@click=${() => isDisabled ? null : __privateMethod(this, _setSelectedDate, setSelectedDate_fn).call(this, day)}
|
|
141
153
|
id="dateCell-${day.getDate()}"
|
|
142
154
|
>
|
|
143
|
-
|
|
155
|
+
<span
|
|
156
|
+
style="color: ${customization ? customization == null ? void 0 : customization.color : ""}"
|
|
157
|
+
>${day.getDate()}</span
|
|
158
|
+
>
|
|
159
|
+
|
|
160
|
+
${when(
|
|
161
|
+
customization.indicator,
|
|
162
|
+
() => html`<span
|
|
163
|
+
class="indicator_${customization == null ? void 0 : customization.indicator}"
|
|
164
|
+
style="background-color: ${customization == null ? void 0 : customization.color}"
|
|
165
|
+
></span>`
|
|
166
|
+
)}
|
|
144
167
|
</td>
|
|
145
168
|
`;
|
|
146
169
|
})}
|
|
@@ -255,6 +278,9 @@ __decorateClass([
|
|
|
255
278
|
__decorateClass([
|
|
256
279
|
property({ type: Boolean })
|
|
257
280
|
], GdsCalendar.prototype, "showWeekNumbers", 2);
|
|
281
|
+
__decorateClass([
|
|
282
|
+
property({ attribute: false })
|
|
283
|
+
], GdsCalendar.prototype, "customizedDates", 2);
|
|
258
284
|
__decorateClass([
|
|
259
285
|
query('td[tabindex="0"]')
|
|
260
286
|
], GdsCalendar.prototype, "_elFocusedCell", 2);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TransitionalStyles
|
|
3
|
+
} from "./chunk.4QOFEG6G.js";
|
|
1
4
|
import {
|
|
2
5
|
watchMediaQuery
|
|
3
6
|
} from "./chunk.WM7HBMMV.js";
|
|
4
|
-
import {
|
|
5
|
-
TransitionalStyles
|
|
6
|
-
} from "./chunk.ZLWSCK7R.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.ZQ4D5K7J.js";
|
|
10
10
|
import {
|
|
11
11
|
watch
|
|
12
12
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -4,7 +4,7 @@ import { unsafeCSS } from "lit";
|
|
|
4
4
|
// dist/libs/tokens/internal/pallet.css
|
|
5
5
|
var pallet_default = `/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on Fri,
|
|
7
|
+
* Generated on Fri, 24 May 2024 11:07:47 GMT
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
:host {
|
|
@@ -165,7 +165,7 @@ var pallet_default = `/**
|
|
|
165
165
|
// dist/libs/tokens/internal/theme/light.css
|
|
166
166
|
var light_default = `/**
|
|
167
167
|
* Do not edit directly
|
|
168
|
-
* Generated on Fri,
|
|
168
|
+
* Generated on Fri, 24 May 2024 11:07:47 GMT
|
|
169
169
|
*/
|
|
170
170
|
|
|
171
171
|
:host {
|
|
@@ -286,7 +286,7 @@ var light_default = `/**
|
|
|
286
286
|
// dist/libs/tokens/internal/size.css
|
|
287
287
|
var size_default = `/**
|
|
288
288
|
* Do not edit directly
|
|
289
|
-
* Generated on Fri,
|
|
289
|
+
* Generated on Fri, 24 May 2024 11:07:47 GMT
|
|
290
290
|
*/
|
|
291
291
|
|
|
292
292
|
:host {
|
|
@@ -532,7 +532,7 @@ var size_default = `/**
|
|
|
532
532
|
// dist/libs/tokens/internal/motion.css
|
|
533
533
|
var motion_default = `/**
|
|
534
534
|
* Do not edit directly
|
|
535
|
-
* Generated on Fri,
|
|
535
|
+
* Generated on Fri, 24 May 2024 11:07:47 GMT
|
|
536
536
|
*/
|
|
537
537
|
|
|
538
538
|
:host {
|
|
@@ -11,11 +11,15 @@ import {
|
|
|
11
11
|
// libs/core/src/gds-element.ts
|
|
12
12
|
import { state } from "lit/decorators.js";
|
|
13
13
|
import { LitElement } from "lit";
|
|
14
|
+
import "reflect-metadata";
|
|
14
15
|
var GdsElement = class extends LitElement {
|
|
15
16
|
constructor() {
|
|
16
17
|
super();
|
|
17
18
|
/**
|
|
18
|
-
* The unscoped name of this element.
|
|
19
|
+
* The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.
|
|
20
|
+
*
|
|
21
|
+
* @attribute gds-element
|
|
22
|
+
* @readonly
|
|
19
23
|
*/
|
|
20
24
|
this.gdsElementName = "";
|
|
21
25
|
this._isUsingTransitionalStyles = false;
|
|
@@ -14,6 +14,9 @@ import { GdsFormControlElement } from '../../components/form-control';
|
|
|
14
14
|
export declare class GdsButton<ValueT = any> extends GdsFormControlElement<ValueT> {
|
|
15
15
|
#private;
|
|
16
16
|
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
17
20
|
static shadowRootOptions: ShadowRootInit;
|
|
18
21
|
/**
|
|
19
22
|
* Whether the button is disabled.
|
|
@@ -28,9 +31,9 @@ export declare class GdsButton<ValueT = any> extends GdsFormControlElement<Value
|
|
|
28
31
|
*/
|
|
29
32
|
rank: 'primary' | 'secondary' | 'tertiary';
|
|
30
33
|
/**
|
|
31
|
-
* Defines which
|
|
34
|
+
* Defines which variant the button belongs to. Defaults to "neutral".
|
|
32
35
|
*/
|
|
33
|
-
variant: '
|
|
36
|
+
variant: 'neutral' | 'positive' | 'negative';
|
|
34
37
|
/**
|
|
35
38
|
* Sets the size of the button. Defaults to "small".
|
|
36
39
|
*/
|