@sebgroup/green-core 2.4.1 → 2.5.0-rc.20250904080437086
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/components/dialog/dialog.component.d.ts +7 -3
- package/components/dialog/dialog.component.js +14 -9
- package/gds-element.js +1 -1
- package/generated/react/dialog/index.d.ts +4 -1
- package/generated/react/index.d.ts +6 -6
- package/generated/react/index.js +6 -6
- package/package.json +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GdsElement } from '../../gds-element';
|
|
2
|
-
declare const GdsDialog_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeYProps) & typeof GdsElement;
|
|
2
|
+
declare const GdsDialog_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeYProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").PaddingProps) & typeof GdsElement;
|
|
3
3
|
/**
|
|
4
4
|
* @element gds-dialog
|
|
5
5
|
*
|
|
@@ -34,9 +34,13 @@ export declare class GdsDialog extends GdsDialog_base {
|
|
|
34
34
|
*/
|
|
35
35
|
placement: 'initial' | 'top' | 'bottom' | 'left' | 'right';
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Whether the inner content of the dialog should have scrollable overflow. Scroll will appear if
|
|
38
|
+
* the content exceeds the dialog's height, which can be controlled using the `height` property.
|
|
39
|
+
*
|
|
40
|
+
* This property have no effect if the `dialog` slot is used. In that case, you need to add overflow
|
|
41
|
+
* styles to the content inside the `dialog` slot.
|
|
38
42
|
*/
|
|
39
|
-
|
|
43
|
+
scrollable: boolean;
|
|
40
44
|
private _elDialog;
|
|
41
45
|
private _elTriggerSlot;
|
|
42
46
|
/**
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from "../../chunks/chunk.QU3DSPNU.js";
|
|
8
8
|
var _returnValue, _handleNativeClose, _dispatchCloseEvent, _dispatchShowEvent, _dispatchUiStateEvent, _GdsDialog_instances, handleTriggerSlotChange_fn, _handleTriggerClick, _handleClickOutside;
|
|
9
9
|
import { localized, msg } from "@lit/localize";
|
|
10
|
+
import { nothing } from "lit";
|
|
10
11
|
import { property, query } from "lit/decorators.js";
|
|
11
12
|
import { classMap } from "lit/directives/class-map.js";
|
|
12
13
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
@@ -19,6 +20,7 @@ import {
|
|
|
19
20
|
} from "../../utils/helpers/custom-element-scoping.js";
|
|
20
21
|
import { isIOS } from "../../utils/helpers/platform.js";
|
|
21
22
|
import {
|
|
23
|
+
withPaddingProps,
|
|
22
24
|
withSizeXProps,
|
|
23
25
|
withSizeYProps
|
|
24
26
|
} from "../../utils/mixins/declarative-layout-mixins.js";
|
|
@@ -34,14 +36,16 @@ import {
|
|
|
34
36
|
unlockBodyScrolling
|
|
35
37
|
} from "./scroll-lock.js";
|
|
36
38
|
registerGlobalScrollLockStyles();
|
|
37
|
-
let GdsDialog = class extends withSizeXProps(
|
|
39
|
+
let GdsDialog = class extends withSizeXProps(
|
|
40
|
+
withSizeYProps(withPaddingProps(GdsElement))
|
|
41
|
+
) {
|
|
38
42
|
constructor() {
|
|
39
43
|
super(...arguments);
|
|
40
44
|
__privateAdd(this, _GdsDialog_instances);
|
|
41
45
|
this.open = false;
|
|
42
46
|
this.variant = "default";
|
|
43
47
|
this.placement = "initial";
|
|
44
|
-
this.
|
|
48
|
+
this.scrollable = false;
|
|
45
49
|
__privateAdd(this, _returnValue);
|
|
46
50
|
__privateAdd(this, _handleNativeClose, (e) => {
|
|
47
51
|
const dialog = e.target;
|
|
@@ -125,13 +129,10 @@ let GdsDialog = class extends withSizeXProps(withSizeYProps(GdsElement)) {
|
|
|
125
129
|
>
|
|
126
130
|
<gds-card
|
|
127
131
|
class="card"
|
|
128
|
-
display="flex"
|
|
129
132
|
variant="secondary"
|
|
130
133
|
box-shadow="xl"
|
|
131
|
-
padding=${ifDefined(this.padding)}
|
|
132
134
|
gap="l"
|
|
133
135
|
border-radius="s"
|
|
134
|
-
min-height="min-content"
|
|
135
136
|
>
|
|
136
137
|
<slot name="dialog">
|
|
137
138
|
<gds-flex justify-content="space-between">
|
|
@@ -145,7 +146,11 @@ let GdsDialog = class extends withSizeXProps(withSizeYProps(GdsElement)) {
|
|
|
145
146
|
><gds-icon-cross-small></gds-icon-cross-small
|
|
146
147
|
></gds-button>
|
|
147
148
|
</gds-flex>
|
|
148
|
-
<gds-div
|
|
149
|
+
<gds-div
|
|
150
|
+
id="content"
|
|
151
|
+
flex="1"
|
|
152
|
+
overflow=${ifDefined(this.scrollable) ? "auto" : nothing}
|
|
153
|
+
>
|
|
149
154
|
<slot></slot>
|
|
150
155
|
</gds-div>
|
|
151
156
|
<gds-flex
|
|
@@ -210,7 +215,7 @@ handleTriggerSlotChange_fn = function() {
|
|
|
210
215
|
_handleTriggerClick = new WeakMap();
|
|
211
216
|
_handleClickOutside = new WeakMap();
|
|
212
217
|
GdsDialog.styles = [DialogStyles];
|
|
213
|
-
GdsDialog.styleExpressionBaseSelector = "
|
|
218
|
+
GdsDialog.styleExpressionBaseSelector = ".card";
|
|
214
219
|
__decorateClass([
|
|
215
220
|
property({ type: Boolean, reflect: true })
|
|
216
221
|
], GdsDialog.prototype, "open", 2);
|
|
@@ -224,8 +229,8 @@ __decorateClass([
|
|
|
224
229
|
property()
|
|
225
230
|
], GdsDialog.prototype, "placement", 2);
|
|
226
231
|
__decorateClass([
|
|
227
|
-
property()
|
|
228
|
-
], GdsDialog.prototype, "
|
|
232
|
+
property({ type: Boolean })
|
|
233
|
+
], GdsDialog.prototype, "scrollable", 2);
|
|
229
234
|
__decorateClass([
|
|
230
235
|
query("dialog")
|
|
231
236
|
], GdsDialog.prototype, "_elDialog", 2);
|
package/gds-element.js
CHANGED
|
@@ -14,7 +14,7 @@ class GdsElement extends LitElement {
|
|
|
14
14
|
/**
|
|
15
15
|
* The semantic version of this element. Can be used for troubleshooting to verify the version being used.
|
|
16
16
|
*/
|
|
17
|
-
this.semanticVersion = "2.
|
|
17
|
+
this.semanticVersion = "2.5.0-rc.20250904080437086";
|
|
18
18
|
this._isUsingTransitionalStyles = false;
|
|
19
19
|
this._dynamicStylesController = new DynamicStylesController(this);
|
|
20
20
|
}
|
|
@@ -5,7 +5,7 @@ export declare const GdsDialog: (props: React.ComponentProps<ReturnType<typeof g
|
|
|
5
5
|
heading?: string | undefined;
|
|
6
6
|
variant?: "default" | "slide-out" | undefined;
|
|
7
7
|
placement?: "top" | "right" | "bottom" | "left" | "initial" | undefined;
|
|
8
|
-
|
|
8
|
+
scrollable?: boolean | undefined;
|
|
9
9
|
show?: ((reason?: string) => void) | undefined;
|
|
10
10
|
close?: ((reason: string) => void) | undefined;
|
|
11
11
|
disconnectedCallback?: (() => void) | undefined;
|
|
@@ -22,6 +22,9 @@ export declare const GdsDialog: (props: React.ComponentProps<ReturnType<typeof g
|
|
|
22
22
|
'block-size'?: string | undefined;
|
|
23
23
|
'min-block-size'?: string | undefined;
|
|
24
24
|
'max-block-size'?: string | undefined;
|
|
25
|
+
padding?: string | undefined;
|
|
26
|
+
'padding-inline'?: string | undefined;
|
|
27
|
+
'padding-block'?: string | undefined;
|
|
25
28
|
readonly semanticVersion?: "__GDS_SEM_VER__" | undefined;
|
|
26
29
|
gdsElementName?: string | undefined;
|
|
27
30
|
_isUsingTransitionalStyles?: boolean | undefined;
|
|
@@ -41,14 +41,19 @@ export * from './theme/index.js';
|
|
|
41
41
|
export * from './video/index.js';
|
|
42
42
|
export * from './form-control-footer/index.js';
|
|
43
43
|
export * from './form-control-header/index.js';
|
|
44
|
-
export * from './menu-item/index.js';
|
|
45
44
|
export * from './option/index.js';
|
|
45
|
+
export * from './menu-item/index.js';
|
|
46
46
|
export * from './checkbox-group/index.js';
|
|
47
47
|
export * from './icons/icon-details/index.js';
|
|
48
48
|
export * from './filter-chip/index.js';
|
|
49
49
|
export * from './formatted-account/index.js';
|
|
50
50
|
export * from './formatted-date/index.js';
|
|
51
51
|
export * from './formatted-number/index.js';
|
|
52
|
+
export * from './radio-group/index.js';
|
|
53
|
+
export * from './segment/index.js';
|
|
54
|
+
export * from './sensitive-account/index.js';
|
|
55
|
+
export * from './sensitive-number/index.js';
|
|
56
|
+
export * from './sensitive-date/index.js';
|
|
52
57
|
export * from './icons/icon-ai/index.js';
|
|
53
58
|
export * from './icons/icon-airplane-up/index.js';
|
|
54
59
|
export * from './icons/icon-archive/index.js';
|
|
@@ -374,8 +379,3 @@ export * from './icons/icon-youtube/index.js';
|
|
|
374
379
|
export * from './icons/icon-zap/index.js';
|
|
375
380
|
export * from './icons/icon-zoom-in/index.js';
|
|
376
381
|
export * from './icons/icon-zoom-out/index.js';
|
|
377
|
-
export * from './radio-group/index.js';
|
|
378
|
-
export * from './segment/index.js';
|
|
379
|
-
export * from './sensitive-account/index.js';
|
|
380
|
-
export * from './sensitive-date/index.js';
|
|
381
|
-
export * from './sensitive-number/index.js';
|
package/generated/react/index.js
CHANGED
|
@@ -41,14 +41,19 @@ export * from "./theme/index.js";
|
|
|
41
41
|
export * from "./video/index.js";
|
|
42
42
|
export * from "./form-control-footer/index.js";
|
|
43
43
|
export * from "./form-control-header/index.js";
|
|
44
|
-
export * from "./menu-item/index.js";
|
|
45
44
|
export * from "./option/index.js";
|
|
45
|
+
export * from "./menu-item/index.js";
|
|
46
46
|
export * from "./checkbox-group/index.js";
|
|
47
47
|
export * from "./icons/icon-details/index.js";
|
|
48
48
|
export * from "./filter-chip/index.js";
|
|
49
49
|
export * from "./formatted-account/index.js";
|
|
50
50
|
export * from "./formatted-date/index.js";
|
|
51
51
|
export * from "./formatted-number/index.js";
|
|
52
|
+
export * from "./radio-group/index.js";
|
|
53
|
+
export * from "./segment/index.js";
|
|
54
|
+
export * from "./sensitive-account/index.js";
|
|
55
|
+
export * from "./sensitive-number/index.js";
|
|
56
|
+
export * from "./sensitive-date/index.js";
|
|
52
57
|
export * from "./icons/icon-ai/index.js";
|
|
53
58
|
export * from "./icons/icon-airplane-up/index.js";
|
|
54
59
|
export * from "./icons/icon-archive/index.js";
|
|
@@ -374,8 +379,3 @@ export * from "./icons/icon-youtube/index.js";
|
|
|
374
379
|
export * from "./icons/icon-zap/index.js";
|
|
375
380
|
export * from "./icons/icon-zoom-in/index.js";
|
|
376
381
|
export * from "./icons/icon-zoom-out/index.js";
|
|
377
|
-
export * from "./radio-group/index.js";
|
|
378
|
-
export * from "./segment/index.js";
|
|
379
|
-
export * from "./sensitive-account/index.js";
|
|
380
|
-
export * from "./sensitive-date/index.js";
|
|
381
|
-
export * from "./sensitive-number/index.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-core",
|
|
3
3
|
"description": "A carefully crafted set of Web Components, laying the foundation of the Green Design System.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.0-rc.20250904080437086",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
7
7
|
"type": "module",
|