@sebgroup/green-core 3.26.3 → 3.27.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/components/avatar/avatar.component.d.ts +1 -1
- package/components/div/div.component.d.ts +1 -1
- package/components/icon/icon.component.d.ts +1 -1
- package/components/input/input.styles.js +5 -0
- package/components/slider/slider.component.d.ts +16 -0
- package/components/slider/slider.component.js +119 -13
- package/components/slider/slider.styles.js +107 -45
- package/custom-elements.json +23974 -23903
- package/gds-element.js +1 -1
- package/generated/mcp/components.json +1 -1
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/slider/api.md +2 -0
- package/generated/mcp/tokens.json +1 -1
- package/generated/react/index.d.ts +5 -5
- package/generated/react/index.js +5 -5
- package/generated/react/slider/index.d.ts +2 -0
- package/package.json +1 -1
- package/primitives/field-base/field-base.styles.js +10 -6
- package/utils/decorators/aria-forwarding.d.ts +2 -1
- package/utils/decorators/aria-forwarding.js +5 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
package/gds-element.js
CHANGED
|
@@ -16,7 +16,7 @@ class GdsElement extends LitElement {
|
|
|
16
16
|
/**
|
|
17
17
|
* The semantic version of this element. Can be used for troubleshooting to verify the version being used.
|
|
18
18
|
*/
|
|
19
|
-
this.semanticVersion = "3.
|
|
19
|
+
this.semanticVersion = "3.27.0";
|
|
20
20
|
this.syncFirstRender = false;
|
|
21
21
|
this._isUsingTransitionalStyles = false;
|
|
22
22
|
this._dynamicStylesController = new DynamicStylesController(this);
|
package/generated/mcp/icons.json
CHANGED
package/generated/mcp/index.json
CHANGED
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
| `range` | `boolean` | `-` | Renders a dual-thumb range slider when true. |
|
|
41
41
|
| `value` | `GdsSliderValue` | `-` | The current value. A plain number in single-value mode, or a `[start, end]` tuple when `range` is set. |
|
|
42
42
|
| `hideTextbox` | `boolean` | `-` | Hides the interactive min/max value textboxes. |
|
|
43
|
+
| `minLabel` | `string` | `-` | Label rendered underneath the control, pinned to its start edge. Works with or without the value textboxes. |
|
|
44
|
+
| `maxLabel` | `string` | `-` | Label rendered underneath the control, pinned to its end edge. Works with or without the value textboxes. |
|
|
43
45
|
| `readonly` | `boolean` | `-` | Makes the entire control read-only — slider thumbs and textbox inputs are non-interactive. |
|
|
44
46
|
| `validator` | `GdsValidator \| undefined` | `-` | A validator that can be used to validate the form control and set an error message. |
|
|
45
47
|
| `required` | `boolean` | `-` | The required attribute can be used to communicate to users of assistive technology that the control is required. Validation still needs to be done in a validator or equivalent. |
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
export * from './list-item-pattern-01/index.js';
|
|
2
|
+
export * from './card-pattern-01/index.js';
|
|
1
3
|
export * from './alert/index.js';
|
|
2
|
-
export * from './badge/index.js';
|
|
3
4
|
export * from './avatar/index.js';
|
|
4
|
-
export * from './
|
|
5
|
+
export * from './badge/index.js';
|
|
5
6
|
export * from './blur/index.js';
|
|
6
7
|
export * from './breadcrumbs/index.js';
|
|
8
|
+
export * from './button/index.js';
|
|
7
9
|
export * from './calendar/index.js';
|
|
8
10
|
export * from './card/index.js';
|
|
9
11
|
export * from './card-linked/index.js';
|
|
@@ -46,8 +48,6 @@ export * from './text/index.js';
|
|
|
46
48
|
export * from './textarea/index.js';
|
|
47
49
|
export * from './theme/index.js';
|
|
48
50
|
export * from './video/index.js';
|
|
49
|
-
export * from './card-pattern-01/index.js';
|
|
50
|
-
export * from './list-item-pattern-01/index.js';
|
|
51
51
|
export * from './avatar-group/index.js';
|
|
52
52
|
export * from './breadcrumb/index.js';
|
|
53
53
|
export * from './checkbox-group/index.js';
|
|
@@ -62,7 +62,6 @@ export * from './segment/index.js';
|
|
|
62
62
|
export * from './sensitive-account/index.js';
|
|
63
63
|
export * from './sensitive-date/index.js';
|
|
64
64
|
export * from './sensitive-number/index.js';
|
|
65
|
-
export * from './tab/index.js';
|
|
66
65
|
export * from './icons/icon-ai/index.js';
|
|
67
66
|
export * from './icons/icon-airplane-up/index.js';
|
|
68
67
|
export * from './icons/icon-archive/index.js';
|
|
@@ -375,6 +374,7 @@ export * from './icons/icon-youtube/index.js';
|
|
|
375
374
|
export * from './icons/icon-zap/index.js';
|
|
376
375
|
export * from './icons/icon-zoom-in/index.js';
|
|
377
376
|
export * from './icons/icon-zoom-out/index.js';
|
|
377
|
+
export * from './tab/index.js';
|
|
378
378
|
export * from './tab-panel/index.js';
|
|
379
379
|
export * from './menu-item/index.js';
|
|
380
380
|
export * from './menu-heading/index.js';
|
package/generated/react/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
export * from "./list-item-pattern-01/index.js";
|
|
2
|
+
export * from "./card-pattern-01/index.js";
|
|
1
3
|
export * from "./alert/index.js";
|
|
2
|
-
export * from "./badge/index.js";
|
|
3
4
|
export * from "./avatar/index.js";
|
|
4
|
-
export * from "./
|
|
5
|
+
export * from "./badge/index.js";
|
|
5
6
|
export * from "./blur/index.js";
|
|
6
7
|
export * from "./breadcrumbs/index.js";
|
|
8
|
+
export * from "./button/index.js";
|
|
7
9
|
export * from "./calendar/index.js";
|
|
8
10
|
export * from "./card/index.js";
|
|
9
11
|
export * from "./card-linked/index.js";
|
|
@@ -46,8 +48,6 @@ export * from "./text/index.js";
|
|
|
46
48
|
export * from "./textarea/index.js";
|
|
47
49
|
export * from "./theme/index.js";
|
|
48
50
|
export * from "./video/index.js";
|
|
49
|
-
export * from "./card-pattern-01/index.js";
|
|
50
|
-
export * from "./list-item-pattern-01/index.js";
|
|
51
51
|
export * from "./avatar-group/index.js";
|
|
52
52
|
export * from "./breadcrumb/index.js";
|
|
53
53
|
export * from "./checkbox-group/index.js";
|
|
@@ -62,7 +62,6 @@ export * from "./segment/index.js";
|
|
|
62
62
|
export * from "./sensitive-account/index.js";
|
|
63
63
|
export * from "./sensitive-date/index.js";
|
|
64
64
|
export * from "./sensitive-number/index.js";
|
|
65
|
-
export * from "./tab/index.js";
|
|
66
65
|
export * from "./icons/icon-ai/index.js";
|
|
67
66
|
export * from "./icons/icon-airplane-up/index.js";
|
|
68
67
|
export * from "./icons/icon-archive/index.js";
|
|
@@ -375,6 +374,7 @@ export * from "./icons/icon-youtube/index.js";
|
|
|
375
374
|
export * from "./icons/icon-zap/index.js";
|
|
376
375
|
export * from "./icons/icon-zoom-in/index.js";
|
|
377
376
|
export * from "./icons/icon-zoom-out/index.js";
|
|
377
|
+
export * from "./tab/index.js";
|
|
378
378
|
export * from "./tab-panel/index.js";
|
|
379
379
|
export * from "./menu-item/index.js";
|
|
380
380
|
export * from "./menu-heading/index.js";
|
|
@@ -43,6 +43,8 @@ export declare const GdsSlider: {
|
|
|
43
43
|
range?: boolean;
|
|
44
44
|
value?: import("../../../components/slider/slider.component").GdsSliderValue | undefined;
|
|
45
45
|
hideTextbox?: boolean;
|
|
46
|
+
minLabel?: string;
|
|
47
|
+
maxLabel?: string;
|
|
46
48
|
readonly?: boolean;
|
|
47
49
|
connectedCallback?: (() => void) | undefined;
|
|
48
50
|
disconnectedCallback?: (() => void) | undefined;
|
package/package.json
CHANGED
|
@@ -23,12 +23,15 @@ const style = css`
|
|
|
23
23
|
justify-content: space-between;
|
|
24
24
|
gap: var(--gds-sys-space-xs);
|
|
25
25
|
padding-block: var(--gds-sys-space-xs);
|
|
26
|
-
padding-inline: var(
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
padding-inline: var(
|
|
27
|
+
--_gds-input-padding-inline,
|
|
28
|
+
var(--gds-sys-space-m) var(--gds-sys-space-s)
|
|
29
|
+
);
|
|
30
|
+
min-block-size: var(--_gds-input-block-size, var(--gds-sys-space-4xl));
|
|
31
|
+
block-size: var(--_gds-input-block-size, var(--gds-sys-space-4xl));
|
|
29
32
|
outline-style: solid;
|
|
30
33
|
outline-width: 0;
|
|
31
|
-
border-radius: var(--gds-sys-radius-xs);
|
|
34
|
+
border-radius: var(--_gds-input-radius, var(--gds-sys-radius-xs));
|
|
32
35
|
background: var(--gds-sys-color-l3-neutral-02);
|
|
33
36
|
color: var(--gds-sys-color-content-neutral-01);
|
|
34
37
|
outline-offset: 0;
|
|
@@ -63,10 +66,11 @@ const style = css`
|
|
|
63
66
|
|
|
64
67
|
.field.small {
|
|
65
68
|
gap: var(--gds-sys-space-3xs);
|
|
66
|
-
padding: var(--gds-sys-space-3xs)
|
|
69
|
+
padding-block: var(--gds-sys-space-3xs);
|
|
70
|
+
padding-inline: var(--_gds-input-padding-inline, var(--gds-sys-space-xs));
|
|
67
71
|
min-block-size: var(--gds-sys-space-2xl);
|
|
68
72
|
block-size: var(--gds-sys-space-2xl);
|
|
69
|
-
border-radius: var(--gds-sys-radius-2xs);
|
|
73
|
+
border-radius: var(--_gds-input-radius, var(--gds-sys-radius-2xs));
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
.field.multiline {
|
|
@@ -14,7 +14,8 @@ type Constructor<T = LitElement> = new (...args: any[]) => T;
|
|
|
14
14
|
* from the host web component to inner shadow DOM elements.
|
|
15
15
|
*
|
|
16
16
|
* Both `aria-*` and `gds-aria-*` attributes are observed. When either changes,
|
|
17
|
-
* the space-separated IDs are resolved
|
|
17
|
+
* the space-separated IDs are resolved against the host's own root, so a host nested
|
|
18
|
+
* in a shadow root looks up IDs in that shadow root rather than the document, and
|
|
18
19
|
* forwarded to the configured target element using the ARIAMixin element-reference
|
|
19
20
|
* property (e.g., `ariaLabelledByElements`).
|
|
20
21
|
*
|
|
@@ -17,6 +17,10 @@ function getAriaRefMeta(key) {
|
|
|
17
17
|
}
|
|
18
18
|
const ARIA_STORE = /* @__PURE__ */ Symbol("ariaForwardingStore");
|
|
19
19
|
const ARIA_INIT = /* @__PURE__ */ Symbol("ariaForwardingInit");
|
|
20
|
+
function resolveId(host, id) {
|
|
21
|
+
const root = host.getRootNode();
|
|
22
|
+
return root.getElementById?.(id) ?? host.ownerDocument.getElementById(id);
|
|
23
|
+
}
|
|
20
24
|
function setElementProperty(el, prop, value, type = "list") {
|
|
21
25
|
const record = el;
|
|
22
26
|
if (value === null) {
|
|
@@ -128,7 +132,7 @@ function ariaForwarding(config) {
|
|
|
128
132
|
return;
|
|
129
133
|
}
|
|
130
134
|
const ids = value.trim().split(/\s+/);
|
|
131
|
-
const elements = ids.map((id) => host
|
|
135
|
+
const elements = ids.map((id) => resolveId(host, id)).filter((el) => el !== null);
|
|
132
136
|
const resolved = meta.type === "single" ? elements[0] ?? null : elements.length > 0 ? elements : null;
|
|
133
137
|
targets.forEach((t) => setElementProperty(t, meta.property, resolved, meta.type));
|
|
134
138
|
});
|