@sebgroup/green-core 2.6.3 → 2.6.4
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/fab/fab.component.d.ts +1 -1
- package/components/fab/fab.component.js +1 -1
- package/components/fab/fab.styles.js +4 -0
- package/components/grid/grid.component.js +1 -0
- package/gds-element.js +1 -1
- package/generated/react/index.d.ts +1 -1
- package/generated/react/index.js +1 -1
- package/package.json +1 -1
- package/utils/decorators/style-expression-property.d.ts +4 -0
- package/utils/decorators/style-expression-property.js +14 -5
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "../../chunks/chunk.QU3DSPNU.js";
|
|
4
4
|
import { gdsCustomElement } from "../../scoping.js";
|
|
5
5
|
import { withPositioningProps } from "../../utils/mixins/declarative-layout-mixins.js";
|
|
6
|
-
import { GdsButton } from "../button/
|
|
6
|
+
import { GdsButton } from "../button/button.component.js";
|
|
7
7
|
import FABStyles from "./fab.styles.js";
|
|
8
8
|
let GdsFab = class extends withPositioningProps(GdsButton) {
|
|
9
9
|
connectedCallback() {
|
|
@@ -12,6 +12,10 @@ const style = css`
|
|
|
12
12
|
block-size: calc(var(--_block-size) + var(--gds-sys-space-xs));
|
|
13
13
|
width: max-content;
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
::slotted([gds-element='gds-signal']) {
|
|
17
|
+
margin-left: var(--gds-sys-space-xs);
|
|
18
|
+
}
|
|
15
19
|
`;
|
|
16
20
|
var fab_styles_default = style;
|
|
17
21
|
export {
|
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.6.
|
|
17
|
+
this.semanticVersion = "2.6.4";
|
|
18
18
|
this._isUsingTransitionalStyles = false;
|
|
19
19
|
this._dynamicStylesController = new DynamicStylesController(this);
|
|
20
20
|
}
|
|
@@ -52,8 +52,8 @@ export * from './formatted-number/index.js';
|
|
|
52
52
|
export * from './radio-group/index.js';
|
|
53
53
|
export * from './segment/index.js';
|
|
54
54
|
export * from './sensitive-account/index.js';
|
|
55
|
-
export * from './sensitive-number/index.js';
|
|
56
55
|
export * from './sensitive-date/index.js';
|
|
56
|
+
export * from './sensitive-number/index.js';
|
|
57
57
|
export * from './icons/icon-ai/index.js';
|
|
58
58
|
export * from './icons/icon-airplane-up/index.js';
|
|
59
59
|
export * from './icons/icon-archive/index.js';
|
package/generated/react/index.js
CHANGED
|
@@ -52,8 +52,8 @@ export * from "./formatted-number/index.js";
|
|
|
52
52
|
export * from "./radio-group/index.js";
|
|
53
53
|
export * from "./segment/index.js";
|
|
54
54
|
export * from "./sensitive-account/index.js";
|
|
55
|
-
export * from "./sensitive-number/index.js";
|
|
56
55
|
export * from "./sensitive-date/index.js";
|
|
56
|
+
export * from "./sensitive-number/index.js";
|
|
57
57
|
export * from "./icons/icon-ai/index.js";
|
|
58
58
|
export * from "./icons/icon-airplane-up/index.js";
|
|
59
59
|
export * from "./icons/icon-archive/index.js";
|
package/package.json
CHANGED
|
@@ -23,6 +23,10 @@ export type StyleExpressionPropertyOptions = {
|
|
|
23
23
|
* components with different style or value templates.
|
|
24
24
|
*/
|
|
25
25
|
cacheOverrideKey?: string;
|
|
26
|
+
/**
|
|
27
|
+
* If true, mirror the property value to a DOM attribute (for CSS selectors).
|
|
28
|
+
*/
|
|
29
|
+
reflect?: boolean;
|
|
26
30
|
};
|
|
27
31
|
/**
|
|
28
32
|
* A decorator that can be used to create a Style Expression Property.
|
|
@@ -9,17 +9,26 @@ function styleExpressionProperty(options) {
|
|
|
9
9
|
const valueTemplate = options?.valueTemplate;
|
|
10
10
|
const styleTemplate = options?.styleTemplate;
|
|
11
11
|
const cacheKey = options?.cacheOverrideKey ?? `0`;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const attributeName = options?.attribute ?? String(descriptor);
|
|
13
|
+
property({
|
|
14
|
+
attribute: attributeName,
|
|
15
|
+
reflect: options?.reflect,
|
|
16
|
+
noAccessor: true
|
|
17
|
+
})(proto, descriptor);
|
|
16
18
|
Object.defineProperty(proto, descriptor, {
|
|
17
19
|
get: function() {
|
|
18
20
|
return this["__" + String(descriptor)];
|
|
19
21
|
},
|
|
20
22
|
set: async function(newValue) {
|
|
21
|
-
|
|
23
|
+
newValue = newValue?.toString().trim() ?? "";
|
|
22
24
|
this["__" + String(descriptor)] = newValue;
|
|
25
|
+
if (options?.reflect) {
|
|
26
|
+
if (!newValue) {
|
|
27
|
+
this.removeAttribute(attributeName);
|
|
28
|
+
} else {
|
|
29
|
+
this.setAttribute(attributeName, String(newValue));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
23
32
|
await this.updateComplete;
|
|
24
33
|
const sel = options?.selector ?? this.constructor.styleExpressionBaseSelector;
|
|
25
34
|
const lvl = this.level ?? "0";
|