@sebgroup/green-core 1.14.1 → 1.15.1

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.
@@ -8,3 +8,4 @@ export * from './grid/grid';
8
8
  export * from './grouped-list/grouped-list';
9
9
  export * from './segmented-control/segmented-control';
10
10
  export * from './icon/icon';
11
+ export * from './theme/theme';
@@ -0,0 +1,20 @@
1
+ import { GdsElement } from '../../gds-element';
2
+ /**
3
+ * @element gds-theme
4
+ *
5
+ * A component that provides CSS variables for a part of the DOM tree.
6
+ * Every descendant of this component will inherit the CSS variables
7
+ * provided by the theme set on this component.
8
+ *
9
+ * @slot - The content to apply the theme to.
10
+ *
11
+ * @status beta
12
+ */
13
+ export declare class GdsTheme extends GdsElement {
14
+ /**
15
+ * The theme mode. Can be `light`, `dark`, or `auto`.
16
+ */
17
+ colorScheme: 'light' | 'dark' | 'auto';
18
+ connectedCallback(): void;
19
+ render(): any;
20
+ }
File without changes
@@ -0,0 +1,2 @@
1
+ export declare function register(): void;
2
+ export default register;
package/gds-element.d.ts CHANGED
@@ -4,6 +4,10 @@ export declare class GdsElement extends LitElement {
4
4
  * The unscoped name of this element.
5
5
  */
6
6
  gdsElementName: string;
7
- isUsingTransitionalStyles: boolean;
7
+ /**
8
+ * Whether the element is using transitional styles.
9
+ * @internal
10
+ */
11
+ _isUsingTransitionalStyles: boolean;
8
12
  connectedCallback(): void;
9
13
  }
package/index.js CHANGED
@@ -85,8 +85,8 @@ function watch(propertyName, options) {
85
85
  const { update } = proto;
86
86
  const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
87
87
  proto.update = function(changedProps) {
88
- watchedProperties.forEach((property14) => {
89
- const key = property14;
88
+ watchedProperties.forEach((property15) => {
89
+ const key = property15;
90
90
  if (changedProps.has(key)) {
91
91
  const oldValue = changedProps.get(key);
92
92
  const newValue = this[key];
@@ -152,7 +152,7 @@ function watchMediaQuery(q) {
152
152
  // libs/core/src/utils/helpers/custom-element-scoping.ts
153
153
  import { html as litHtml } from "lit";
154
154
  import { customElement } from "lit/decorators.js";
155
- var VER_SUFFIX = "-791bd2";
155
+ var VER_SUFFIX = "-cbb91a";
156
156
  var elementLookupTable = /* @__PURE__ */ new Map();
157
157
  var gdsCustomElement = (tagName) => {
158
158
  if (globalThis.GDS_DISABLE_VERSIONED_ELEMENTS) {
@@ -204,7 +204,7 @@ function getUnscopedTagName(tagName) {
204
204
  import { property, state } from "lit/decorators.js";
205
205
  import { createRef, ref } from "lit/directives/ref.js";
206
206
 
207
- // libs/core/src/utils/helpers/transitional-styles.ts
207
+ // libs/core/src/utils/transitional-styles/transitional-styles.ts
208
208
  import { html as html2 } from "lit";
209
209
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
210
210
  function supportsConstructedStylesheets() {
@@ -215,18 +215,19 @@ function supportsConstructedStylesheets() {
215
215
  return false;
216
216
  }
217
217
  }
218
- var TransitionalStyles = class {
218
+ var TransitionalStyles = class _TransitionalStyles {
219
219
  constructor() {
220
220
  this.sheets = /* @__PURE__ */ new Map();
221
221
  this.elements = /* @__PURE__ */ new Map();
222
222
  this.sheetsLegacy = /* @__PURE__ */ new Map();
223
223
  this.useLegacyStylesheets = !supportsConstructedStylesheets();
224
+ this.chlorophyllTokens = new CSSStyleSheet();
224
225
  }
225
226
  static get instance() {
226
227
  if (!globalThis.__gdsTransitionalStyles?.[VER_SUFFIX])
227
228
  globalThis.__gdsTransitionalStyles = {
228
229
  ...globalThis.__gdsTransitionalStyles,
229
- [VER_SUFFIX]: new TransitionalStyles()
230
+ [VER_SUFFIX]: new _TransitionalStyles()
230
231
  };
231
232
  return globalThis.__gdsTransitionalStyles[VER_SUFFIX];
232
233
  }
@@ -248,10 +249,10 @@ var TransitionalStyles = class {
248
249
  const element = this.elements.get(styleKey);
249
250
  if (!element || !element.shadowRoot)
250
251
  return;
251
- element.shadowRoot.adoptedStyleSheets = [sheet];
252
- element.isUsingTransitionalStyles = true;
252
+ element.shadowRoot.adoptedStyleSheets = [this.chlorophyllTokens, sheet];
253
+ element._isUsingTransitionalStyles = true;
253
254
  }
254
- // This is a fallback for browsers that don't support constructed stylesheets.
255
+ // This is a fallback for browsers that dosen't support constructed stylesheets.
255
256
  // Primarily, this is here to support Safari/iOS 15.x
256
257
  //
257
258
  // To work around the lack of Constructed Stylesheets, we use a regular <style>
@@ -261,7 +262,7 @@ var TransitionalStyles = class {
261
262
  // Lit itself will also add a <style> element to the shadow root in these browsers,
262
263
  // meaning that we have to override the base styles added from the static style
263
264
  // property in this case. This is what the `all: revert` rule is for.
264
- // We can use cascade layers to ensure that the revert rule ovverides the base styles
265
+ // We can use cascade layers to ensure that the revert rule overides the base styles
265
266
  // but not the transitional styles.
266
267
  // `@layer base, reset, transitional-styles;`
267
268
  applyToElementLegacy(styleKey) {
@@ -277,6 +278,7 @@ var TransitionalStyles = class {
277
278
  }
278
279
  ${unsafeHTML(sheet)}
279
280
  </style>`;
281
+ element._isUsingTransitionalStyles = true;
280
282
  }
281
283
  register(name, styles2) {
282
284
  if (this.useLegacyStylesheets) {
@@ -295,15 +297,19 @@ var TransitionalStyles = class {
295
297
  import "reflect-metadata";
296
298
 
297
299
  // libs/core/src/gds-element.ts
298
- import { LitElement as LitElement2 } from "lit";
299
- var GdsElement = class extends LitElement2 {
300
+ import { LitElement } from "lit";
301
+ var GdsElement = class extends LitElement {
300
302
  constructor() {
301
303
  super(...arguments);
302
304
  /**
303
305
  * The unscoped name of this element.
304
306
  */
305
307
  this.gdsElementName = "";
306
- this.isUsingTransitionalStyles = false;
308
+ /**
309
+ * Whether the element is using transitional styles.
310
+ * @internal
311
+ */
312
+ this._isUsingTransitionalStyles = false;
307
313
  }
308
314
  connectedCallback() {
309
315
  super.connectedCallback();
@@ -637,8 +643,8 @@ var GdsOption = class extends Focusable(GdsElement) {
637
643
  else
638
644
  this.removeAttribute("highlighted");
639
645
  }
640
- return html3`${this._tStyles}${when(isMultiple, () => checkbox)}
641
- <slot></slot>`;
646
+ return html3`${this._tStyles}
647
+ <div>${when(isMultiple, () => checkbox)} <slot></slot></div>`;
642
648
  }
643
649
  };
644
650
  _hidden = new WeakMap();
@@ -717,7 +723,9 @@ var style3 = css3`
717
723
  box-sizing: border-box;
718
724
  right: 0;
719
725
  margin: 0;
720
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 1rem 28px rgba(0, 0, 0, 0.15);
726
+ box-shadow:
727
+ 0 0 0 1px rgba(0, 0, 0, 0.2),
728
+ 0 1rem 28px rgba(0, 0, 0, 0.15);
721
729
  border-width: 0;
722
730
  border-radius: 0.5rem;
723
731
  }
@@ -1008,11 +1016,9 @@ GdsPopover = __decorateClass([
1008
1016
 
1009
1017
  // libs/core/src/components/form-control.ts
1010
1018
  import { property as property4 } from "lit/decorators.js";
1011
- var _internals;
1012
1019
  var GdsFormControlElement = class extends GdsElement {
1013
1020
  constructor() {
1014
1021
  super();
1015
- __privateAdd(this, _internals, void 0);
1016
1022
  this.invalid = false;
1017
1023
  this.name = "";
1018
1024
  /**
@@ -1023,9 +1029,9 @@ var GdsFormControlElement = class extends GdsElement {
1023
1029
  this.value = void 0;
1024
1030
  };
1025
1031
  try {
1026
- __privateSet(this, _internals, this.attachInternals());
1032
+ this.#internals = this.attachInternals();
1027
1033
  } catch (e) {
1028
- __privateSet(this, _internals, {
1034
+ this.#internals = {
1029
1035
  form: this.closest("form"),
1030
1036
  setFormValue: (value) => {
1031
1037
  this.value = value;
@@ -1050,37 +1056,41 @@ var GdsFormControlElement = class extends GdsElement {
1050
1056
  willValidate: true,
1051
1057
  checkValidity: () => true,
1052
1058
  reportValidity: () => true
1053
- });
1059
+ };
1054
1060
  }
1055
1061
  }
1062
+ #internals;
1063
+ static {
1064
+ this.formAssociated = true;
1065
+ }
1056
1066
  get form() {
1057
- return __privateGet(this, _internals).form;
1067
+ return this.#internals.form;
1058
1068
  }
1059
1069
  get validity() {
1060
- return __privateGet(this, _internals).validity;
1070
+ return this.#internals.validity;
1061
1071
  }
1062
1072
  get validationMessage() {
1063
- return __privateGet(this, _internals).validationMessage;
1073
+ return this.#internals.validationMessage;
1064
1074
  }
1065
1075
  get willValidate() {
1066
- return __privateGet(this, _internals).willValidate;
1076
+ return this.#internals.willValidate;
1067
1077
  }
1068
1078
  checkValidity() {
1069
- return __privateGet(this, _internals).checkValidity();
1079
+ return this.#internals.checkValidity();
1070
1080
  }
1071
1081
  reportValidity() {
1072
- return __privateGet(this, _internals).reportValidity();
1082
+ return this.#internals.reportValidity();
1073
1083
  }
1074
1084
  connectedCallback() {
1075
1085
  super.connectedCallback();
1076
- __privateGet(this, _internals).form?.addEventListener("reset", this._handleFormReset);
1086
+ this.#internals.form?.addEventListener("reset", this._handleFormReset);
1077
1087
  }
1078
1088
  disconnectedCallback() {
1079
1089
  super.disconnectedCallback();
1080
- __privateGet(this, _internals).form?.removeEventListener("reset", this._handleFormReset);
1090
+ this.#internals.form?.removeEventListener("reset", this._handleFormReset);
1081
1091
  }
1082
1092
  __handleValidityChange() {
1083
- __privateGet(this, _internals).setValidity(
1093
+ this.#internals.setValidity(
1084
1094
  {
1085
1095
  badInput: false,
1086
1096
  customError: this.invalid,
@@ -1098,11 +1108,9 @@ var GdsFormControlElement = class extends GdsElement {
1098
1108
  );
1099
1109
  }
1100
1110
  __handleValueChange() {
1101
- __privateGet(this, _internals).setFormValue(this.value);
1111
+ this.#internals.setFormValue(this.value);
1102
1112
  }
1103
1113
  };
1104
- _internals = new WeakMap();
1105
- GdsFormControlElement.formAssociated = true;
1106
1114
  __decorateClass([
1107
1115
  property4({
1108
1116
  type: Boolean,
@@ -1321,13 +1329,13 @@ var GdsDropdown = class extends GdsFormControlElement {
1321
1329
  ${when2(
1322
1330
  this.searchable,
1323
1331
  () => html`<input
1324
- id="searchinput"
1325
- type="text"
1326
- aria-label="${msg2("Filter available options")}"
1327
- placeholder="${msg2("Search")}"
1328
- @keydown=${__privateGet(this, _handleSearchFieldKeyDown)}
1329
- @keyup=${__privateGet(this, _handleSearchFieldKeyUp)}
1330
- />`
1332
+ id="searchinput"
1333
+ type="text"
1334
+ aria-label="${msg2("Filter available options")}"
1335
+ placeholder="${msg2("Search")}"
1336
+ @keydown=${__privateGet(this, _handleSearchFieldKeyDown)}
1337
+ @keyup=${__privateGet(this, _handleSearchFieldKeyUp)}
1338
+ />`
1331
1339
  )}
1332
1340
 
1333
1341
  <gds-listbox
@@ -1566,22 +1574,22 @@ var context_menu_styles_default = style6;
1566
1574
  // libs/core/src/primitives/menu/menu.ts
1567
1575
  import { createRef as createRef3, ref as ref3 } from "lit/directives/ref.js";
1568
1576
  import { state as state5 } from "lit/decorators.js";
1577
+ var _slotRef2;
1569
1578
  var GdsMenu = class extends GdsElement {
1570
1579
  constructor() {
1571
1580
  super();
1572
- this.#slotRef = createRef3();
1581
+ __privateAdd(this, _slotRef2, createRef3());
1573
1582
  new ListboxKbNavController(this);
1574
1583
  }
1575
- #slotRef;
1576
1584
  connectedCallback() {
1577
1585
  super.connectedCallback();
1578
1586
  this.setAttribute("role", "menu");
1579
1587
  TransitionalStyles.instance.apply(this, "gds-listbox");
1580
1588
  }
1581
1589
  get navigableItems() {
1582
- if (!this.#slotRef.value)
1590
+ if (!__privateGet(this, _slotRef2).value)
1583
1591
  return [];
1584
- return unwrap(this.#slotRef.value).assignedElements().filter(
1592
+ return unwrap(__privateGet(this, _slotRef2).value).assignedElements().filter(
1585
1593
  (o) => !o.hasAttribute("isplaceholder") && o.gdsElementName === "gds-menu-item"
1586
1594
  ) || [];
1587
1595
  }
@@ -1592,9 +1600,10 @@ var GdsMenu = class extends GdsElement {
1592
1600
  this.navigableItems[0]?.focus();
1593
1601
  }
1594
1602
  render() {
1595
- return html`${this._tStyles}<slot ${ref3(this.#slotRef)}></slot>`;
1603
+ return html`${this._tStyles}<slot ${ref3(__privateGet(this, _slotRef2))}></slot>`;
1596
1604
  }
1597
1605
  };
1606
+ _slotRef2 = new WeakMap();
1598
1607
  __decorateClass([
1599
1608
  state5()
1600
1609
  ], GdsMenu.prototype, "_tStyles", 2);
@@ -1730,7 +1739,8 @@ var GdsMenuItem = class extends Focusable(GdsElement) {
1730
1739
  TransitionalStyles.instance.apply(this, "gds-option");
1731
1740
  }
1732
1741
  render() {
1733
- return html`${this._tStyles}<slot></slot>`;
1742
+ return html`${this._tStyles}
1743
+ <div><slot></slot></div>`;
1734
1744
  }
1735
1745
  };
1736
1746
  _handleOnClick = new WeakMap();
@@ -2026,10 +2036,10 @@ GdsCalendar = __decorateClass([
2026
2036
  ], GdsCalendar);
2027
2037
 
2028
2038
  // libs/core/src/components/datepicker/date-part-spinner.ts
2029
- import { LitElement as LitElement6 } from "lit";
2039
+ import { LitElement as LitElement5 } from "lit";
2030
2040
  import { property as property8, state as state9 } from "lit/decorators.js";
2031
2041
  var _inputBuffer, _increment, _decrement, _handleClick, _handleFocus, _handleBlur, _handleWheel, _handleKeyDown2, _focusNextSpinner, focusNextSpinner_fn, _dispatchChangeEvent, dispatchChangeEvent_fn, _formatNumber, formatNumber_fn, _clamp, clamp_fn, _clearInputBuffer, clearInputBuffer_fn;
2032
- var GdsDatePartSpinner = class extends LitElement6 {
2042
+ var GdsDatePartSpinner = class extends LitElement5 {
2033
2043
  constructor() {
2034
2044
  super(...arguments);
2035
2045
  __privateAdd(this, _focusNextSpinner);
@@ -2812,7 +2822,7 @@ GdsDatepicker = __decorateClass([
2812
2822
  ], GdsDatepicker);
2813
2823
 
2814
2824
  // libs/core/src/components/grid/grid.ts
2815
- import { css as css10, LitElement as LitElement7, unsafeCSS as unsafeCSS3 } from "lit";
2825
+ import { css as css10, LitElement as LitElement6, unsafeCSS as unsafeCSS3 } from "lit";
2816
2826
  import { property as property10, state as state11 } from "lit/decorators.js";
2817
2827
 
2818
2828
  // libs/core/src/tokens.style.ts
@@ -2821,7 +2831,7 @@ import { unsafeCSS as unsafeCSS2 } from "lit";
2821
2831
  // dist/libs/tokens/internal/pallet.css
2822
2832
  var pallet_default = `/**
2823
2833
  * Do not edit directly
2824
- * Generated on Wed, 17 Apr 2024 14:10:00 GMT
2834
+ * Generated on Mon, 22 Apr 2024 10:32:32 GMT
2825
2835
  */
2826
2836
 
2827
2837
  :host {
@@ -2982,7 +2992,7 @@ var pallet_default = `/**
2982
2992
  // dist/libs/tokens/internal/theme/light.css
2983
2993
  var light_default = `/**
2984
2994
  * Do not edit directly
2985
- * Generated on Wed, 17 Apr 2024 14:10:00 GMT
2995
+ * Generated on Mon, 22 Apr 2024 10:32:32 GMT
2986
2996
  */
2987
2997
 
2988
2998
  :host {
@@ -3103,7 +3113,7 @@ var light_default = `/**
3103
3113
  // dist/libs/tokens/internal/size.css
3104
3114
  var size_default = `/**
3105
3115
  * Do not edit directly
3106
- * Generated on Wed, 17 Apr 2024 14:10:00 GMT
3116
+ * Generated on Mon, 22 Apr 2024 10:32:32 GMT
3107
3117
  */
3108
3118
 
3109
3119
  :host {
@@ -3303,8 +3313,12 @@ var style8 = css9`
3303
3313
  }
3304
3314
 
3305
3315
  /* Responsive */
3306
- :host {
3316
+
3317
+ :host([columns]) {
3307
3318
  --_c: var(--_columns-desktop);
3319
+ }
3320
+
3321
+ :host {
3308
3322
  --_gap-column: var(--_gap-desktop);
3309
3323
  --_gap-row: var(--_row-gap-desktop);
3310
3324
  --_grid-padding: var(--_padding-desktop);
@@ -3312,8 +3326,11 @@ var style8 = css9`
3312
3326
  }
3313
3327
 
3314
3328
  @media only screen and (max-width: 768px) {
3315
- :host {
3329
+ :host([columns]) {
3316
3330
  --_c: var(--_columns-tablet);
3331
+ }
3332
+
3333
+ :host {
3317
3334
  --_gap-column: var(--_gap-tablet);
3318
3335
  --_gap-row: var(--_row-gap-tablet);
3319
3336
  --_grid-padding: var(--_padding-tablet);
@@ -3322,6 +3339,10 @@ var style8 = css9`
3322
3339
  }
3323
3340
 
3324
3341
  @media only screen and (max-width: 425px) {
3342
+ :host([columns]) {
3343
+ --_c: var(--_columns-mobile);
3344
+ }
3345
+
3325
3346
  :host {
3326
3347
  --_c: var(--_columns-mobile);
3327
3348
  --_gap-column: var(--_gap-mobile);
@@ -3335,7 +3356,7 @@ var grid_style_css_default = style8;
3335
3356
 
3336
3357
  // libs/core/src/components/grid/grid.ts
3337
3358
  var BreakpointPattern = /(?<l>l:([a-z0-9]+))?\s*(?<m>m:([a-z0-9]+))?\s*(?<s>s:([a-z0-9]+))?/;
3338
- var GdsGrid = class extends LitElement7 {
3359
+ var GdsGrid = class extends LitElement6 {
3339
3360
  constructor() {
3340
3361
  super(...arguments);
3341
3362
  this._gridVariables = {
@@ -3616,30 +3637,30 @@ import { unsafeCSS as unsafeCSS4 } from "lit";
3616
3637
 
3617
3638
  // libs/core/src/components/segmented-control/segment/segment.style.css
3618
3639
  var segment_style_default = `:host {
3619
- z-index: 1;
3620
3640
  display: flex;
3621
3641
  transition: 0.2s;
3642
+ z-index: 1;
3622
3643
  }
3623
3644
 
3624
3645
  button {
3625
- flex-shrink: 0;
3626
- flex-grow: 1;
3627
- font-family: inherit;
3628
- padding: 0 1rem;
3629
- text-align: center;
3630
- cursor: pointer;
3631
- border-radius: calc(infinity * 1px);
3632
3646
  -webkit-appearance: none;
3633
3647
  -moz-appearance: none;
3634
3648
  appearance: none;
3635
3649
  background: transparent;
3650
+ border-radius: calc(infinity * 1px);
3636
3651
  border-width: 0;
3652
+ color: var(--gds-sys-color-content-content);
3653
+ cursor: pointer;
3654
+ flex-grow: 1;
3655
+ flex-shrink: 0;
3656
+ font-family: inherit;
3637
3657
  font-size: inherit;
3638
3658
  overflow: hidden;
3639
- white-space: nowrap;
3659
+ padding: 0 1rem;
3660
+ text-align: center;
3640
3661
  text-overflow: ellipsis;
3662
+ white-space: nowrap;
3641
3663
  width: 100%;
3642
- color: var(--gds-sys-color-content-content);
3643
3664
  }
3644
3665
 
3645
3666
  @media (pointer: fine) {
@@ -3688,16 +3709,16 @@ GdsSegment = __decorateClass([
3688
3709
 
3689
3710
  // libs/core/src/components/segmented-control/segmented-control.style.css
3690
3711
  var segmented_control_style_default = `:host {
3691
- box-sizing: border-box;
3692
- display: inline-flex;
3693
3712
  background-color: var(--gds-sys-color-container-container-dim1);
3694
3713
  border: 0.25rem solid var(--gds-sys-color-container-container-dim1);
3695
- gap: 0.25rem;
3696
3714
  border-radius: calc(infinity * 1px);
3715
+ box-sizing: border-box;
3697
3716
  contain: layout;
3717
+ display: inline-flex;
3718
+ gap: 0.25rem;
3719
+ height: 3rem;
3698
3720
  max-width: 100%;
3699
3721
  overflow: hidden;
3700
- height: 3rem;
3701
3722
  }
3702
3723
 
3703
3724
  :host([size='small']) {
@@ -3709,37 +3730,37 @@ var segmented_control_style_default = `:host {
3709
3730
  display: flex;
3710
3731
  flex-grow: 0;
3711
3732
  flex-shrink: 1;
3712
- width: 100%;
3713
- position: relative;
3714
3733
  overflow: hidden;
3734
+ position: relative;
3735
+ width: 100%;
3715
3736
  }
3716
3737
 
3717
3738
  #segments {
3718
3739
  box-sizing: border-box;
3719
3740
  display: inline-flex;
3720
- transition: 0.2s;
3741
+ gap: 0.25rem;
3721
3742
  position: relative;
3743
+ transition: 0.2s;
3722
3744
  z-index: 1;
3723
- gap: 0.25rem;
3724
3745
  }
3725
3746
 
3726
3747
  #btn-prev,
3727
3748
  #btn-next {
3728
- display: flex;
3729
3749
  align-items: center;
3730
- justify-content: center;
3731
- font-size: 1rem;
3732
- border-radius: calc(infinity * 1px);
3733
- background-color: var(--gds-sys-color-container-container-dim1);
3734
- border-width: 0;
3735
3750
  -webkit-appearance: none;
3736
3751
  -moz-appearance: none;
3737
3752
  appearance: none;
3738
3753
  aspect-ratio: 1;
3754
+ background-color: var(--gds-sys-color-container-container-dim1);
3755
+ border-radius: calc(infinity * 1px);
3756
+ border-width: 0;
3757
+ color: var(--gds-sys-color-content-content);
3758
+ cursor: pointer;
3759
+ display: flex;
3760
+ font-size: 1rem;
3739
3761
  height: 100%;
3762
+ justify-content: center;
3740
3763
  width: 2.5rem;
3741
- cursor: pointer;
3742
- color: var(--gds-sys-color-content-content);
3743
3764
 
3744
3765
  @media (pointer: fine) {
3745
3766
  &:hover {
@@ -3758,18 +3779,20 @@ var segmented_control_style_default = `:host {
3758
3779
  }
3759
3780
 
3760
3781
  ::slotted(*) {
3761
- flex-shrink: 0;
3762
3782
  flex-grow: 1;
3783
+ flex-shrink: 0;
3763
3784
  z-index: 1;
3764
3785
  }
3765
3786
 
3766
3787
  #indicator {
3767
- position: absolute;
3768
- left: 0;
3769
- height: 100%;
3770
3788
  background-color: var(--gds-sys-color-container-container-bright);
3771
3789
  border-radius: calc(infinity * 1px);
3772
- transition: transform 0.2s, width 0.2s;
3790
+ height: 100%;
3791
+ left: 0;
3792
+ position: absolute;
3793
+ transition:
3794
+ transform 0.2s,
3795
+ width 0.2s;
3773
3796
  z-index: 0;
3774
3797
  }
3775
3798
  `;
@@ -3850,14 +3873,14 @@ var GdsSegmentedControl = class extends GdsElement {
3850
3873
  if (availableWidth / numSegments > this.segMinWidth) {
3851
3874
  return {
3852
3875
  count: numSegments,
3853
- segmentWidth: (availableWidth - getSegmentGap(this.isUsingTransitionalStyles) * (numSegments - 1)) / numSegments
3876
+ segmentWidth: (availableWidth - getSegmentGap(this._isUsingTransitionalStyles) * (numSegments - 1)) / numSegments
3854
3877
  };
3855
3878
  }
3856
3879
  const availableWidthIncBtns = this.offsetWidth - BTN_SIZE[this.size] * 2;
3857
3880
  const maxVisibleSegments = Math.floor(
3858
3881
  availableWidthIncBtns / this.segMinWidth
3859
3882
  );
3860
- const segmentWidth = (availableWidth - getSegmentGap(this.isUsingTransitionalStyles) * (maxVisibleSegments - 1)) / maxVisibleSegments;
3883
+ const segmentWidth = (availableWidth - getSegmentGap(this._isUsingTransitionalStyles) * (maxVisibleSegments - 1)) / maxVisibleSegments;
3861
3884
  return {
3862
3885
  count: maxVisibleSegments,
3863
3886
  segmentWidth
@@ -3887,7 +3910,7 @@ var GdsSegmentedControl = class extends GdsElement {
3887
3910
  this.segments.forEach((segment) => {
3888
3911
  segment.style.width = segmentWidth + "px";
3889
3912
  });
3890
- __privateSet(this, _segmentsContainerLeft, -__privateGet(this, _firstVisibleIndex) * segmentWidth - getSegmentGap(this.isUsingTransitionalStyles) * __privateGet(this, _firstVisibleIndex));
3913
+ __privateSet(this, _segmentsContainerLeft, -__privateGet(this, _firstVisibleIndex) * segmentWidth - getSegmentGap(this._isUsingTransitionalStyles) * __privateGet(this, _firstVisibleIndex));
3891
3914
  __privateGet(this, _applySegmentsTransform).call(this);
3892
3915
  __privateSet(this, _calculatedSegmentWidth, segmentWidth);
3893
3916
  __privateSet(this, _segmentWidth, segmentWidth);
@@ -3917,7 +3940,7 @@ var GdsSegmentedControl = class extends GdsElement {
3917
3940
  const segment = this.segments.find((s) => s.selected);
3918
3941
  if (segment) {
3919
3942
  const selectedSegmentIndex = this.segments.indexOf(segment);
3920
- const offset2 = selectedSegmentIndex * __privateGet(this, _segmentWidth) + getSegmentGap(this.isUsingTransitionalStyles) * selectedSegmentIndex;
3943
+ const offset2 = selectedSegmentIndex * __privateGet(this, _segmentWidth) + getSegmentGap(this._isUsingTransitionalStyles) * selectedSegmentIndex;
3921
3944
  this._elIndicator.style.transform = `translateX(${offset2}px)`;
3922
3945
  this._elIndicator.style.width = `${__privateGet(this, _segmentWidth)}px`;
3923
3946
  } else {
@@ -4107,7 +4130,7 @@ GdsSegmentedControl = __decorateClass([
4107
4130
  ], GdsSegmentedControl);
4108
4131
 
4109
4132
  // libs/core/src/components/icon/icon.ts
4110
- import { LitElement as LitElement8, unsafeCSS as unsafeCSS6 } from "lit";
4133
+ import { LitElement as LitElement7, unsafeCSS as unsafeCSS6 } from "lit";
4111
4134
 
4112
4135
  // libs/core/src/components/icon/stem.styles.scss
4113
4136
  var stem_styles_default = `svg:not([display=none]) {
@@ -4130,7 +4153,7 @@ symbol {
4130
4153
  }`;
4131
4154
 
4132
4155
  // libs/core/src/components/icon/icon.ts
4133
- var GdsIcon = class extends LitElement8 {
4156
+ var GdsIcon = class extends LitElement7 {
4134
4157
  constructor() {
4135
4158
  super(...arguments);
4136
4159
  this.open = false;
@@ -4245,6 +4268,30 @@ GdsIcon.properties = {
4245
4268
  GdsIcon = __decorateClass([
4246
4269
  gdsCustomElement("gds-icon")
4247
4270
  ], GdsIcon);
4271
+
4272
+ // libs/core/src/components/theme/theme.ts
4273
+ import { property as property14 } from "lit/decorators.js";
4274
+ var GdsTheme = class extends GdsElement {
4275
+ constructor() {
4276
+ super(...arguments);
4277
+ this.colorScheme = "light";
4278
+ }
4279
+ connectedCallback() {
4280
+ super.connectedCallback();
4281
+ TransitionalStyles.instance.apply(this, "gds-theme");
4282
+ }
4283
+ render() {
4284
+ return html`
4285
+ <slot></slot>
4286
+ `;
4287
+ }
4288
+ };
4289
+ __decorateClass([
4290
+ property14({ reflect: true, attribute: "color-scheme" })
4291
+ ], GdsTheme.prototype, "colorScheme", 2);
4292
+ GdsTheme = __decorateClass([
4293
+ gdsCustomElement("gds-theme")
4294
+ ], GdsTheme);
4248
4295
  export {
4249
4296
  GdsContextMenu,
4250
4297
  GdsDatepicker,
@@ -4256,6 +4303,7 @@ export {
4256
4303
  GdsMenuItem,
4257
4304
  GdsOption,
4258
4305
  GdsSegmentedControl,
4306
+ GdsTheme,
4259
4307
  VER_SUFFIX,
4260
4308
  gdsCustomElement,
4261
4309
  getScopedTagName,