@consent.software/catalog 1.6.1 → 2.0.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.
Files changed (28) hide show
  1. package/dist_bundle/bundle.js +626 -329
  2. package/dist_bundle/bundle.js.map +4 -4
  3. package/dist_ts_web/00_commitinfo_data.js +1 -1
  4. package/dist_ts_web/elements/consentsoftware-cookieconsent.d.ts +4 -20
  5. package/dist_ts_web/elements/consentsoftware-cookieconsent.js +143 -222
  6. package/dist_ts_web/elements/consentsoftware-header.d.ts +3 -4
  7. package/dist_ts_web/elements/consentsoftware-header.js +35 -23
  8. package/dist_ts_web/elements/consentsoftware-mainselection.d.ts +4 -5
  9. package/dist_ts_web/elements/consentsoftware-mainselection.js +54 -28
  10. package/dist_ts_web/elements/consentsoftware-tabs.d.ts +4 -5
  11. package/dist_ts_web/elements/consentsoftware-tabs.js +44 -36
  12. package/dist_ts_web/elements/consentsoftware-toggle.d.ts +11 -9
  13. package/dist_ts_web/elements/consentsoftware-toggle.js +103 -94
  14. package/dist_ts_web/elements/shared.d.ts +35 -1
  15. package/dist_ts_web/elements/shared.js +36 -2
  16. package/dist_ts_web/pages/page1.d.ts +1 -1
  17. package/dist_ts_web/pages/page1.js +2 -2
  18. package/dist_watch/bundle.js +447 -413
  19. package/dist_watch/bundle.js.map +3 -3
  20. package/package.json +3 -3
  21. package/ts_web/00_commitinfo_data.ts +1 -1
  22. package/ts_web/elements/consentsoftware-cookieconsent.ts +150 -218
  23. package/ts_web/elements/consentsoftware-header.ts +40 -23
  24. package/ts_web/elements/consentsoftware-mainselection.ts +60 -30
  25. package/ts_web/elements/consentsoftware-tabs.ts +51 -37
  26. package/ts_web/elements/consentsoftware-toggle.ts +123 -107
  27. package/ts_web/elements/shared.ts +38 -2
  28. package/ts_web/pages/page1.ts +1 -1
@@ -19591,17 +19591,17 @@ var setDayOfYear_default = setDayOfYear;
19591
19591
  function setDefaultOptions2(options) {
19592
19592
  const result = {};
19593
19593
  const defaultOptions2 = getDefaultOptions();
19594
- for (const property3 in defaultOptions2) {
19595
- if (Object.prototype.hasOwnProperty.call(defaultOptions2, property3)) {
19596
- result[property3] = defaultOptions2[property3];
19594
+ for (const property2 in defaultOptions2) {
19595
+ if (Object.prototype.hasOwnProperty.call(defaultOptions2, property2)) {
19596
+ result[property2] = defaultOptions2[property2];
19597
19597
  }
19598
19598
  }
19599
- for (const property3 in options) {
19600
- if (Object.prototype.hasOwnProperty.call(options, property3)) {
19601
- if (options[property3] === void 0) {
19602
- delete result[property3];
19599
+ for (const property2 in options) {
19600
+ if (Object.prototype.hasOwnProperty.call(options, property2)) {
19601
+ if (options[property2] === void 0) {
19602
+ delete result[property2];
19603
19603
  } else {
19604
- result[property3] = options[property3];
19604
+ result[property2] = options[property2];
19605
19605
  }
19606
19606
  }
19607
19607
  }
@@ -26537,7 +26537,7 @@ var CallableInstance = (
26537
26537
  * @param {string | symbol} property
26538
26538
  * @returns {(...parameters: Array<unknown>) => unknown}
26539
26539
  */
26540
- (function(property3) {
26540
+ (function(property2) {
26541
26541
  const self2 = this;
26542
26542
  const constr = self2.constructor;
26543
26543
  const proto = (
@@ -26546,7 +26546,7 @@ var CallableInstance = (
26546
26546
  // type-coverage:ignore-next-line
26547
26547
  constr.prototype
26548
26548
  );
26549
- const value2 = proto[property3];
26549
+ const value2 = proto[property2];
26550
26550
  const apply = function() {
26551
26551
  return value2.apply(apply, arguments);
26552
26552
  };
@@ -38633,8 +38633,8 @@ var Schema = class {
38633
38633
  * @param {Normal} normal
38634
38634
  * @param {string} [space]
38635
38635
  */
38636
- constructor(property3, normal, space2) {
38637
- this.property = property3;
38636
+ constructor(property2, normal, space2) {
38637
+ this.property = property2;
38638
38638
  this.normal = normal;
38639
38639
  if (space2) {
38640
38640
  this.space = space2;
@@ -38647,14 +38647,14 @@ Schema.prototype.space = null;
38647
38647
 
38648
38648
  // node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/merge.js
38649
38649
  function merge3(definitions, space2) {
38650
- const property3 = {};
38650
+ const property2 = {};
38651
38651
  const normal = {};
38652
38652
  let index2 = -1;
38653
38653
  while (++index2 < definitions.length) {
38654
- Object.assign(property3, definitions[index2].property);
38654
+ Object.assign(property2, definitions[index2].property);
38655
38655
  Object.assign(normal, definitions[index2].normal);
38656
38656
  }
38657
- return new Schema(property3, normal, space2);
38657
+ return new Schema(property2, normal, space2);
38658
38658
  }
38659
38659
 
38660
38660
  // node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/normalize.js
@@ -38669,8 +38669,8 @@ var Info = class {
38669
38669
  * @param {string} property
38670
38670
  * @param {string} attribute
38671
38671
  */
38672
- constructor(property3, attribute) {
38673
- this.property = property3;
38672
+ constructor(property2, attribute) {
38673
+ this.property = property2;
38674
38674
  this.attribute = attribute;
38675
38675
  }
38676
38676
  };
@@ -38718,9 +38718,9 @@ var DefinedInfo = class extends Info {
38718
38718
  * @param {number|null} [mask]
38719
38719
  * @param {string} [space]
38720
38720
  */
38721
- constructor(property3, attribute, mask, space2) {
38721
+ constructor(property2, attribute, mask, space2) {
38722
38722
  let index2 = -1;
38723
- super(property3, attribute);
38723
+ super(property2, attribute);
38724
38724
  mark(this, "space", space2);
38725
38725
  if (typeof mask === "number") {
38726
38726
  while (++index2 < checks.length) {
@@ -38740,7 +38740,7 @@ function mark(values, key2, value2) {
38740
38740
  // node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/create.js
38741
38741
  var own9 = {}.hasOwnProperty;
38742
38742
  function create6(definition3) {
38743
- const property3 = {};
38743
+ const property2 = {};
38744
38744
  const normal = {};
38745
38745
  let prop;
38746
38746
  for (prop in definition3.properties) {
@@ -38755,12 +38755,12 @@ function create6(definition3) {
38755
38755
  if (definition3.mustUseProperty && definition3.mustUseProperty.includes(prop)) {
38756
38756
  info.mustUseProperty = true;
38757
38757
  }
38758
- property3[prop] = info;
38758
+ property2[prop] = info;
38759
38759
  normal[normalize4(prop)] = prop;
38760
38760
  normal[normalize4(info.attribute)] = prop;
38761
38761
  }
38762
38762
  }
38763
- return new Schema(property3, normal, definition3.space);
38763
+ return new Schema(property2, normal, definition3.space);
38764
38764
  }
38765
38765
 
38766
38766
  // node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/xlink.js
@@ -38795,8 +38795,8 @@ function caseSensitiveTransform(attributes, attribute) {
38795
38795
  }
38796
38796
 
38797
38797
  // node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/case-insensitive-transform.js
38798
- function caseInsensitiveTransform(attributes, property3) {
38799
- return caseSensitiveTransform(attributes, property3.toLowerCase());
38798
+ function caseInsensitiveTransform(attributes, property2) {
38799
+ return caseSensitiveTransform(attributes, property2.toLowerCase());
38800
38800
  }
38801
38801
 
38802
38802
  // node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/xmlns.js
@@ -44825,8 +44825,8 @@ var Lenis = class {
44825
44825
  };
44826
44826
  onTransitionEnd = (event) => {
44827
44827
  if (event.propertyName.includes("overflow")) {
44828
- const property3 = this.isHorizontal ? "overflow-x" : "overflow-y";
44829
- const overflow = getComputedStyle(this.rootElement)[property3];
44828
+ const property2 = this.isHorizontal ? "overflow-x" : "overflow-y";
44829
+ const overflow = getComputedStyle(this.rootElement)[property2];
44830
44830
  if (["hidden", "clip"].includes(overflow)) {
44831
44831
  this.internalStop();
44832
44832
  } else {
@@ -47808,8 +47808,8 @@ var WccProperties = class WccProperties2 extends DeesElement {
47808
47808
  continue;
47809
47809
  }
47810
47810
  try {
47811
- const property3 = classProperties.get(key2);
47812
- const propertyTypeString = await determinePropertyType(property3);
47811
+ const property2 = classProperties.get(key2);
47812
+ const propertyTypeString = await determinePropertyType(property2);
47813
47813
  propertyArray.push(x`
47814
47814
  <div class="property">
47815
47815
  <div class="property-label">${key2} (${propertyTypeString})</div>
@@ -47840,7 +47840,7 @@ var WccProperties = class WccProperties2 extends DeesElement {
47840
47840
  }}"
47841
47841
  />`;
47842
47842
  case "Enum":
47843
- const enumValues = getEnumValues(property3);
47843
+ const enumValues = getEnumValues(property2);
47844
47844
  return x`<select
47845
47845
  .value=${firstFoundInstantiatedElement[key2] || ""}
47846
47846
  @change="${(eventArg) => {
@@ -48323,6 +48323,38 @@ __export(elements_exports, {
48323
48323
 
48324
48324
  // ts_web/elements/shared.ts
48325
48325
  var fontStack = r('system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif');
48326
+ var colors = {
48327
+ light: {
48328
+ background: "#ffffff",
48329
+ foreground: "#09090b",
48330
+ muted: "#f4f4f5",
48331
+ mutedForeground: "#71717a",
48332
+ border: "#e4e4e7",
48333
+ input: "#e4e4e7",
48334
+ primary: "#18181b",
48335
+ primaryForeground: "#fafafa",
48336
+ secondary: "#f4f4f5",
48337
+ secondaryForeground: "#18181b",
48338
+ accent: "#f4f4f5",
48339
+ accentForeground: "#18181b",
48340
+ ring: "#a1a1aa"
48341
+ },
48342
+ dark: {
48343
+ background: "#09090b",
48344
+ foreground: "#fafafa",
48345
+ muted: "#27272a",
48346
+ mutedForeground: "#a1a1aa",
48347
+ border: "#27272a",
48348
+ input: "#27272a",
48349
+ primary: "#fafafa",
48350
+ primaryForeground: "#18181b",
48351
+ secondary: "#27272a",
48352
+ secondaryForeground: "#fafafa",
48353
+ accent: "#27272a",
48354
+ accentForeground: "#fafafa",
48355
+ ring: "#52525b"
48356
+ }
48357
+ };
48326
48358
 
48327
48359
  // node_modules/.pnpm/@consent.software+interfaces@1.0.14/node_modules/@consent.software/interfaces/dist_ts/index.js
48328
48360
  var dist_ts_exports32 = {};
@@ -48389,14 +48421,160 @@ var CsWebclient = class {
48389
48421
  };
48390
48422
 
48391
48423
  // ts_web/elements/consentsoftware-cookieconsent.ts
48392
- var _theme_dec, _a, _ConsentsoftwareCookieconsent_decorators, _init, _theme;
48424
+ var _ConsentsoftwareCookieconsent_decorators, _init, _a;
48393
48425
  _ConsentsoftwareCookieconsent_decorators = [t4("consentsoftware-cookieconsent")];
48394
- var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ type: String, reflect: true })], _a) {
48426
+ var ConsentsoftwareCookieconsent = class extends (_a = DeesElement) {
48427
+ static demo = () => x`<consentsoftware-cookieconsent></consentsoftware-cookieconsent>`;
48428
+ csWebclientInstance = new CsWebclient();
48429
+ csWebclientRan = false;
48430
+ static styles = [
48431
+ cssManager.defaultStyles,
48432
+ i`
48433
+ :host {
48434
+ font-size: 14px;
48435
+ user-select: none;
48436
+ }
48437
+
48438
+ .pageOverlay {
48439
+ position: fixed;
48440
+ inset: 0;
48441
+ display: grid;
48442
+ align-items: center;
48443
+ justify-content: center;
48444
+ z-index: 1000;
48445
+ background: rgba(0, 0, 0, 0);
48446
+ backdrop-filter: blur(0px);
48447
+ transition: all 0.2s ease-out;
48448
+ }
48449
+
48450
+ .pageOverlay.shake {
48451
+ background: rgba(0, 0, 0, 0.6) !important;
48452
+ }
48453
+
48454
+ .modalBox {
48455
+ display: block;
48456
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48457
+ background: ${cssManager.bdTheme(colors.light.background, colors.dark.background)};
48458
+ box-shadow:
48459
+ 0 0 0 1px ${cssManager.bdTheme(colors.light.border, colors.dark.border)},
48460
+ 0 16px 70px ${cssManager.bdTheme("rgba(0, 0, 0, 0.15)", "rgba(0, 0, 0, 0.35)")};
48461
+ position: relative;
48462
+ border-radius: 8px;
48463
+ max-width: 520px;
48464
+ min-width: 320px;
48465
+ box-sizing: border-box;
48466
+ overflow: hidden;
48467
+ will-change: transform;
48468
+ transition: all 0.2s ease-out;
48469
+ transform: scale(0.96);
48470
+ opacity: 0;
48471
+ }
48472
+
48473
+ @media (max-width: 560px) {
48474
+ .modalBox {
48475
+ max-width: 100%;
48476
+ min-width: 100%;
48477
+ height: 100vh;
48478
+ border-radius: 0;
48479
+ }
48480
+ }
48481
+
48482
+ .modalBox.shake {
48483
+ animation: shake 120ms 2 linear;
48484
+ }
48485
+
48486
+ @keyframes shake {
48487
+ 0% { transform: translateX(3px); }
48488
+ 50% { transform: translateX(-3px); }
48489
+ 100% { transform: translateX(0); }
48490
+ }
48491
+
48492
+ :host([show='false']) { display: none; }
48493
+ :host([show='true']) { display: block; }
48494
+
48495
+ .content {
48496
+ margin: auto;
48497
+ }
48498
+
48499
+ .text-container {
48500
+ padding: 12px 16px;
48501
+ font-size: 0.9em;
48502
+ line-height: 1.5;
48503
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
48504
+ }
48505
+
48506
+ .text-container a {
48507
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48508
+ text-decoration: underline;
48509
+ text-underline-offset: 2px;
48510
+ }
48511
+
48512
+ .text-container a:hover {
48513
+ opacity: 0.8;
48514
+ }
48515
+
48516
+ .button-container {
48517
+ padding: 12px 16px 16px;
48518
+ display: grid;
48519
+ grid-template-columns: repeat(3, 1fr);
48520
+ gap: 8px;
48521
+ }
48522
+
48523
+ @media (max-width: 560px) {
48524
+ .button-container {
48525
+ grid-template-columns: 1fr;
48526
+ }
48527
+ }
48528
+
48529
+ .consent-button {
48530
+ border-radius: 6px;
48531
+ background: ${cssManager.bdTheme(colors.light.secondary, colors.dark.secondary)};
48532
+ border: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48533
+ padding: 8px 16px;
48534
+ font-size: 0.85em;
48535
+ font-weight: 500;
48536
+ text-align: center;
48537
+ cursor: pointer;
48538
+ transition: all 0.15s ease;
48539
+ color: ${cssManager.bdTheme(colors.light.secondaryForeground, colors.dark.secondaryForeground)};
48540
+ }
48541
+
48542
+ .consent-button:hover {
48543
+ background: ${cssManager.bdTheme(colors.light.accent, colors.dark.accent)};
48544
+ border-color: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
48545
+ }
48546
+
48547
+ .consent-button:last-child {
48548
+ background: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
48549
+ color: ${cssManager.bdTheme(colors.light.primaryForeground, colors.dark.primaryForeground)};
48550
+ border-color: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
48551
+ }
48552
+
48553
+ .consent-button:last-child:hover {
48554
+ opacity: 0.9;
48555
+ }
48556
+
48557
+ .info-container {
48558
+ text-align: center;
48559
+ padding: 10px 16px;
48560
+ background: ${cssManager.bdTheme(colors.light.muted, colors.dark.muted)};
48561
+ border-top: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48562
+ font-size: 0.75em;
48563
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
48564
+ }
48565
+
48566
+ .info-container a {
48567
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48568
+ text-decoration: none;
48569
+ }
48570
+
48571
+ .info-container a:hover {
48572
+ text-decoration: underline;
48573
+ }
48574
+ `
48575
+ ];
48395
48576
  constructor() {
48396
48577
  super();
48397
- __publicField(this, "csWebclientInstance", new CsWebclient());
48398
- __publicField(this, "csWebclientRan", false);
48399
- __privateAdd(this, _theme, __runInitializers(_init, 8, this, "light")), __runInitializers(_init, 11, this);
48400
48578
  this.setAttribute("show", "false");
48401
48579
  }
48402
48580
  render() {
@@ -48406,11 +48584,11 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48406
48584
  <div class="content">
48407
48585
  <consentsoftware-header></consentsoftware-header>
48408
48586
  <consentsoftware-tabs></consentsoftware-tabs>
48409
- <div class="text-container" style="padding: 16px;">
48587
+ <div class="text-container">
48410
48588
  <div class="toptext">
48411
- This page uses cookies. Please review our
48589
+ We use cookies to enhance your experience. Review our
48412
48590
  <a href="https://lossless.gmbh/cookie" target="_blank">cookie policy</a>
48413
- and choose which cookie level you are willing to accept.
48591
+ and select your preferences.
48414
48592
  </div>
48415
48593
  </div>
48416
48594
  <consentsoftware-mainselection></consentsoftware-mainselection>
@@ -48445,20 +48623,19 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48445
48623
  }
48446
48624
  /**
48447
48625
  * Lifecycle method called when the element is connected to the DOM.
48448
- * It sets up the theme and displays the consent banner if no cookie levels are set.
48626
+ * Displays the consent banner if no cookie levels are set.
48449
48627
  */
48450
48628
  async connectedCallback() {
48451
- super.connectedCallback();
48452
- this.updateTheme();
48629
+ await super.connectedCallback();
48453
48630
  const cookieLevel = await this.csWebclientInstance.getCookieLevels();
48454
48631
  if (!cookieLevel) {
48455
48632
  this.setAttribute("show", "true");
48456
48633
  requestAnimationFrame(async () => {
48457
- await this.updated();
48634
+ await this.updateComplete;
48458
48635
  const pageOverlay = this.shadowRoot?.querySelector(".pageOverlay");
48459
48636
  if (pageOverlay) {
48460
- pageOverlay.style.background = "rgba(0,0,0, 0.5)";
48461
- pageOverlay.style.backdropFilter = "blur(20px)";
48637
+ pageOverlay.style.background = "rgba(0,0,0, 0.6)";
48638
+ pageOverlay.style.backdropFilter = "blur(4px)";
48462
48639
  }
48463
48640
  const modalBox = this.shadowRoot?.querySelector(".modalBox");
48464
48641
  if (modalBox) {
@@ -48471,12 +48648,6 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48471
48648
  }
48472
48649
  }
48473
48650
  async firstUpdated() {
48474
- }
48475
- /**
48476
- * Called after updates. Logs banner height and runs consent scripts if necessary.
48477
- */
48478
- async updated() {
48479
- console.log(`The height of the cookie banner is ${this.shadowRoot?.host?.clientHeight}px`);
48480
48651
  const acceptedCookieLevels = await this.csWebclientInstance.getCookieLevels();
48481
48652
  if (!this.csWebclientRan && acceptedCookieLevels) {
48482
48653
  this.csWebclientRan = true;
@@ -48485,13 +48656,12 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48485
48656
  }
48486
48657
  /**
48487
48658
  * Handles consent button clicks, sets cookie levels, and hides the banner.
48488
- * Uses theme variables for styling transitions.
48489
48659
  */
48490
48660
  async handleConsentButtonClick(event, levelsArg) {
48491
48661
  console.log(`Set level to ${levelsArg}`);
48492
48662
  const pageOverlay = this.shadowRoot?.querySelector(".pageOverlay");
48493
48663
  if (pageOverlay) {
48494
- pageOverlay.style.background = "rgba(255,255,255, 0)";
48664
+ pageOverlay.style.background = "rgba(0,0,0, 0)";
48495
48665
  pageOverlay.style.backdropFilter = "blur(0px)";
48496
48666
  }
48497
48667
  const modalBox = this.shadowRoot?.querySelector(".modalBox");
@@ -48502,7 +48672,10 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48502
48672
  await this.csWebclientInstance.setCookieLevels(levelsArg);
48503
48673
  await delayFor(300);
48504
48674
  this.setAttribute("show", "false");
48505
- this.updated();
48675
+ if (!this.csWebclientRan) {
48676
+ this.csWebclientRan = true;
48677
+ await this.csWebclientInstance.getAndRunConsentTuples();
48678
+ }
48506
48679
  }
48507
48680
  /**
48508
48681
  * Handles clicks on the page overlay. If clicked outside the modal,
@@ -48521,245 +48694,50 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48521
48694
  }
48522
48695
  }
48523
48696
  }
48524
- /**
48525
- * Dynamically switches the theme between light and dark.
48526
- * Listens for system theme changes to update the component's theme.
48527
- */
48528
- updateTheme() {
48529
- const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
48530
- this.theme = prefersDark ? "dark" : "light";
48531
- window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e10) => {
48532
- this.theme = e10.matches ? "dark" : "light";
48533
- });
48534
- }
48535
48697
  };
48536
48698
  _init = __decoratorStart(_a);
48537
- _theme = new WeakMap();
48538
- __decorateElement(_init, 4, "theme", _theme_dec, ConsentsoftwareCookieconsent, _theme);
48539
48699
  ConsentsoftwareCookieconsent = __decorateElement(_init, 0, "ConsentsoftwareCookieconsent", _ConsentsoftwareCookieconsent_decorators, ConsentsoftwareCookieconsent);
48540
- __publicField(ConsentsoftwareCookieconsent, "demo", () => x`<consentsoftware-cookieconsent></consentsoftware-cookieconsent>`);
48541
- /**
48542
- * Define component styles with CSS variables that adjust based on theme.
48543
- * The default variables serve as baseline for the light theme.
48544
- * Theme-specific overrides modify these for dark mode.
48545
- */
48546
- __publicField(ConsentsoftwareCookieconsent, "styles", i`
48547
- :host {
48548
- font-family: ${fontStack};
48549
- user-select: none;
48550
- /* Default variables for Light Theme */
48551
- --text-color: #333;
48552
- --background-color: #eeeeee;
48553
- --accent-color: #333333;
48554
- --button-bg: #ffffff;
48555
- --button-hover-bg: #f2f2f2;
48556
- --icon-color: #4496f5;
48557
- --link-color: #333;
48558
- --padding-sides: 16px;
48559
- /* Additional variables for modal and info container styling */
48560
- --info-bg: rgba(0, 0, 0, 0.1);
48561
- --info-text: rgba(255, 255, 255, 0.5);
48562
- --modal-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
48563
- }
48564
-
48565
- /* Dark Theme Overrides:
48566
- When theme attribute is 'dark', override variables accordingly. */
48567
- :host([theme='dark']) {
48568
- --text-color: #fff;
48569
- --background-color: #111;
48570
- --accent-color: #333333;
48571
- --button-bg: #252525;
48572
- --button-hover-bg: #222222;
48573
- --icon-color: #4496f5;
48574
- --link-color: #fff;
48575
- --info-bg: rgba(0, 0, 0, 0.1);
48576
- --info-text: rgba(255, 255, 255, 0.5);
48577
- --modal-box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.6);
48578
- }
48579
-
48580
- /* Light Theme Overrides:
48581
- Explicit light theme settings, currently matching defaults.
48582
- Can be customized independently if desired. */
48583
- :host([theme='light']) {
48584
- --text-color: #333;
48585
- --background-color: #eeeeee;
48586
- --accent-color: #333333;
48587
- --button-bg: #ffffff;
48588
- --button-hover-bg: #f2f2f2;
48589
- --icon-color: #4496f5;
48590
- --link-color: #333;
48591
- --info-bg: rgba(0, 0, 0, 0.1);
48592
- --info-text: rgba(0, 0, 0, 0.5);
48593
- --modal-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
48594
- }
48595
-
48596
- /* Overlay covering the page behind the modal */
48597
- .pageOverlay {
48598
- position: fixed;
48599
- top: 0;
48600
- bottom: 0;
48601
- right: 0;
48602
- left: 0;
48603
- display: grid;
48604
- align-items: center;
48605
- justify-content: center;
48606
- z-index: 1000; /* Ensures the overlay is on top of other elements */
48607
- background: rgba(255, 255, 255, 0);
48608
- backdrop-filter: blur(0px);
48609
- transition: all 0.2s;
48610
- }
48611
-
48612
- /* Shake animation for overlay when clicked */
48613
- .pageOverlay.shake {
48614
- background: rgba(0, 0, 0, 0.5) !important;
48615
- }
48616
-
48617
- /* Modal box styling using theme variables for colors and shadows */
48618
- .modalBox {
48619
- display: block;
48620
- color: var(--text-color);
48621
- background: var(--background-color);
48622
- box-shadow: var(--modal-box-shadow);
48623
- position: relative;
48624
- border: 1px dotted rgba(255, 255, 255, 0.1);
48625
- border-top: 1px solid var(--accent-color);
48626
- border-radius: 16px;
48627
- max-width: 1100px;
48628
- min-width: calc(100vw / 3);
48629
- box-sizing: border-box;
48630
- overflow: hidden;
48631
- will-change: transform;
48632
- transition: all 0.3s;
48633
- transform: scale(0.95);
48634
- opacity: 0;
48635
- }
48636
-
48637
- /* Media query for mobile devices: stack buttons vertically */
48638
- @media (max-width: 600px) {
48639
- .modalBox {
48640
- height: 100vh;
48641
- box-shadow: none;
48642
- border-radius: 0px;
48643
- }
48644
- }
48645
-
48646
- /* Shake animation for modal box */
48647
- .modalBox.shake {
48648
- animation: shake 150ms 2 linear;
48649
- }
48650
-
48651
- @keyframes shake {
48652
- 0% {
48653
- transform: translate(3px, 0);
48654
- }
48655
- 50% {
48656
- transform: translate(-3px, 0);
48657
- }
48658
- 100% {
48659
- transform: translate(0, 0);
48660
- }
48661
- }
48662
-
48663
- /* Toggle display based on [show] attribute */
48664
- :host([show='false']) {
48665
- display: none;
48666
- }
48667
- :host([show='true']) {
48668
- display: block;
48669
- }
48670
-
48671
- .content {
48672
- margin: auto;
48673
- }
48674
-
48675
- .text-container {
48676
- padding-left: var(--padding-sides);
48677
- padding-right: var(--padding-sides);
48678
- display: grid;
48679
- grid-template-columns: auto;
48680
- }
48681
-
48682
- .text-container a {
48683
- color: var(--link-color);
48684
- text-decoration: none;
48685
- }
48686
-
48687
- .button-container {
48688
- padding: var(--padding-sides);
48689
- display: grid;
48690
- grid-template-columns: repeat(3, 1fr);
48691
- gap: 16px;
48692
- }
48693
-
48694
- /* Media query for mobile devices: stack buttons vertically */
48695
- @media (max-width: 600px) {
48696
- .button-container {
48697
- grid-template-columns: 1fr;
48698
- }
48699
- }
48700
-
48701
- /* Consent button styling using theme variables */
48702
- .consent-button {
48703
- border-radius: 3px;
48704
- background: var(--button-bg);
48705
- box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
48706
- padding: 10px;
48707
- line-height: 30px;
48708
- text-align: center;
48709
- cursor: pointer;
48710
- transition: all 0.2s;
48711
- }
48712
-
48713
- .consent-button:hover {
48714
- background: var(--button-hover-bg);
48715
- }
48716
-
48717
- /* Use theme variables for info container background and text */
48718
- .info-container {
48719
- text-align: center;
48720
- line-height: 3em;
48721
- background: var(--info-bg);
48722
- border-top: 1px dotted rgba(255, 255, 255, 0.1);
48723
- font-size: 0.8em;
48724
- color: var(--info-text);
48725
- }
48726
-
48727
- .info-container a {
48728
- text-decoration: underline;
48729
- color: var(--link-color);
48730
- transition: color 0.2s;
48731
- }
48732
- .info-container a:hover {
48733
- color: #ffffff;
48734
- }
48735
- `);
48736
48700
  __runInitializers(_init, 1, ConsentsoftwareCookieconsent);
48737
48701
 
48738
48702
  // ts_web/elements/consentsoftware-header.ts
48739
48703
  var _ConsentsoftwareHeader_decorators, _init2, _a2;
48740
48704
  _ConsentsoftwareHeader_decorators = [t4("consentsoftware-header")];
48741
- var ConsentsoftwareHeader = class extends (_a2 = i4) {
48742
- static demo = () => x`<consentsoftware-tabs></consentsoftware-tabs>`;
48743
- static styles = i`
48744
- :host {
48745
- display: block;
48746
- line-height: 3em;
48747
- text-align: center;
48748
- font-family: ${fontStack};
48749
- border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
48750
- }
48705
+ var ConsentsoftwareHeader = class extends (_a2 = DeesElement) {
48706
+ static demo = () => x`<consentsoftware-header></consentsoftware-header>`;
48707
+ static styles = [
48708
+ cssManager.defaultStyles,
48709
+ i`
48710
+ :host {
48711
+ display: block;
48712
+ padding: 14px 16px;
48713
+ border-bottom: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48714
+ }
48751
48715
 
48752
- .heading {
48753
-
48754
- }
48755
- `;
48756
- constructor() {
48757
- super();
48758
- }
48716
+ .heading {
48717
+ display: flex;
48718
+ align-items: center;
48719
+ gap: 8px;
48720
+ font-size: 0.95em;
48721
+ font-weight: 600;
48722
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48723
+ }
48724
+
48725
+ .icon {
48726
+ width: 18px;
48727
+ height: 18px;
48728
+ opacity: 0.7;
48729
+ }
48730
+ `
48731
+ ];
48759
48732
  render() {
48760
48733
  return x`
48761
48734
  <div class="heading">
48762
- What about cookies?
48735
+ <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
48736
+ <circle cx="12" cy="12" r="10"/>
48737
+ <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
48738
+ <path d="M12 17h.01"/>
48739
+ </svg>
48740
+ Cookie Preferences
48763
48741
  </div>
48764
48742
  `;
48765
48743
  }
@@ -48771,9 +48749,9 @@ __runInitializers(_init2, 1, ConsentsoftwareHeader);
48771
48749
  // ts_web/elements/consentsoftware-mainselection.ts
48772
48750
  var _selected_dec, _required_dec, _a3, _ConsentsoftwareMainSelection_decorators, _init3, _required, _selected;
48773
48751
  _ConsentsoftwareMainSelection_decorators = [t4("consentsoftware-mainselection")];
48774
- var ConsentsoftwareMainSelection = class extends (_a3 = i4, _required_dec = [n5({ type: Boolean })], _selected_dec = [n5({ type: Boolean })], _a3) {
48752
+ var ConsentsoftwareMainSelection = class extends (_a3 = DeesElement, _required_dec = [n5({ type: Boolean })], _selected_dec = [n5({ type: Boolean })], _a3) {
48775
48753
  constructor() {
48776
- super();
48754
+ super(...arguments);
48777
48755
  __privateAdd(this, _required, __runInitializers(_init3, 8, this, false)), __runInitializers(_init3, 11, this);
48778
48756
  __privateAdd(this, _selected, __runInitializers(_init3, 12, this, false)), __runInitializers(_init3, 15, this);
48779
48757
  }
@@ -48795,7 +48773,7 @@ var ConsentsoftwareMainSelection = class extends (_a3 = i4, _required_dec = [n5(
48795
48773
  </div>
48796
48774
  `;
48797
48775
  }
48798
- async getResults(mouseEvent) {
48776
+ async getResults() {
48799
48777
  }
48800
48778
  };
48801
48779
  _init3 = __decoratorStart(_a3);
@@ -48805,41 +48783,68 @@ __decorateElement(_init3, 4, "required", _required_dec, ConsentsoftwareMainSelec
48805
48783
  __decorateElement(_init3, 4, "selected", _selected_dec, ConsentsoftwareMainSelection, _selected);
48806
48784
  ConsentsoftwareMainSelection = __decorateElement(_init3, 0, "ConsentsoftwareMainSelection", _ConsentsoftwareMainSelection_decorators, ConsentsoftwareMainSelection);
48807
48785
  __publicField(ConsentsoftwareMainSelection, "demo", () => x`<consentsoftware-mainselection></consentsoftware-mainselection>`);
48808
- __publicField(ConsentsoftwareMainSelection, "styles", i`
48809
- :host {
48810
- display: block;
48811
- position: relative;
48812
- }
48786
+ __publicField(ConsentsoftwareMainSelection, "styles", [
48787
+ cssManager.defaultStyles,
48788
+ i`
48789
+ :host {
48790
+ display: block;
48791
+ position: relative;
48792
+ }
48813
48793
 
48814
- .maincontainer {
48815
- display: grid;
48816
- grid-template-columns: repeat(4, 1fr);
48817
- }
48794
+ .maincontainer {
48795
+ display: grid;
48796
+ grid-template-columns: repeat(4, 1fr);
48797
+ padding: 8px 0;
48798
+ }
48818
48799
 
48819
- .itemBox {
48820
- padding: 16px;
48821
- text-align: center;
48822
- border-right: 1px solid;
48823
- border-image: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%) 1;
48824
- }
48825
- .itemBox:last-child {
48826
- border-right: none;
48827
- }
48828
- `);
48800
+ @media (max-width: 560px) {
48801
+ .maincontainer {
48802
+ grid-template-columns: repeat(2, 1fr);
48803
+ gap: 4px;
48804
+ }
48805
+ }
48806
+
48807
+ .itemBox {
48808
+ padding: 12px 8px;
48809
+ text-align: center;
48810
+ border-right: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48811
+ }
48812
+
48813
+ .itemBox:last-child {
48814
+ border-right: none;
48815
+ }
48816
+
48817
+ @media (max-width: 560px) {
48818
+ .itemBox {
48819
+ padding: 10px 8px;
48820
+ border-right: none;
48821
+ border-bottom: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48822
+ }
48823
+
48824
+ .itemBox:nth-child(odd) {
48825
+ border-right: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48826
+ }
48827
+
48828
+ .itemBox:nth-last-child(-n+2) {
48829
+ border-bottom: none;
48830
+ }
48831
+ }
48832
+ `
48833
+ ]);
48829
48834
  __runInitializers(_init3, 1, ConsentsoftwareMainSelection);
48830
48835
 
48831
48836
  // ts_web/elements/consentsoftware-toggle.ts
48832
48837
  var _selected_dec2, _required_dec2, _a4, _ConsentsoftwareToggle_decorators, _init4, _required2, _selected2;
48833
48838
  _ConsentsoftwareToggle_decorators = [t4("consentsoftware-toggle")];
48834
- var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type: Boolean })], _selected_dec2 = [n5({ type: Boolean, reflect: true })], _a4) {
48839
+ var ConsentsoftwareToggle = class extends (_a4 = DeesElement, _required_dec2 = [n5({ type: Boolean })], _selected_dec2 = [n5({ type: Boolean, reflect: true })], _a4) {
48835
48840
  constructor() {
48836
- super();
48841
+ super(...arguments);
48837
48842
  __privateAdd(this, _required2, __runInitializers(_init4, 8, this, false)), __runInitializers(_init4, 11, this);
48838
48843
  __privateAdd(this, _selected2, __runInitializers(_init4, 12, this, false)), __runInitializers(_init4, 15, this);
48839
48844
  /**
48840
- * We always track the knob’s left offset in `currentX`.
48841
- * - 0 => fully left
48842
- * - 30 => fully right
48845
+ * Knob position tracking (0 = off, maxTravel = on)
48846
+ * This is the travel distance, not absolute left position.
48847
+ * Actual left = padding + currentX
48843
48848
  */
48844
48849
  __publicField(this, "currentX", 0);
48845
48850
  /**
@@ -48848,9 +48853,15 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48848
48853
  __publicField(this, "isDragging", false);
48849
48854
  __publicField(this, "hasDragged", false);
48850
48855
  __publicField(this, "startX", 0);
48851
- // pointerdown offset
48852
- __publicField(this, "knobWidth", 30);
48853
- __publicField(this, "trackWidth", 60);
48856
+ // Toggle dimensions (with border-box, 1px border reduces inner by 2px)
48857
+ __publicField(this, "trackWidth", 36);
48858
+ // outer width
48859
+ __publicField(this, "trackHeight", 20);
48860
+ // outer height
48861
+ __publicField(this, "knobSize", 14);
48862
+ __publicField(this, "padding", 2);
48863
+ // padding from inner edge to knob
48864
+ __publicField(this, "maxTravel", 16);
48854
48865
  }
48855
48866
  render() {
48856
48867
  return x`
@@ -48862,7 +48873,7 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48862
48873
  <!-- The knob itself, with pointer events for dragging. -->
48863
48874
  <div
48864
48875
  class="toggleKnobInner"
48865
- style="left: ${this.currentX}px;"
48876
+ style="left: ${this.padding + this.currentX}px;"
48866
48877
  @pointerdown=${this.onPointerDown}
48867
48878
  @pointermove=${this.onPointerMove}
48868
48879
  @pointerup=${this.onPointerUp}
@@ -48876,13 +48887,14 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48876
48887
  /**
48877
48888
  * If required = true on first render, auto-select and set the knob to the right.
48878
48889
  */
48879
- async firstUpdated() {
48890
+ async firstUpdated(_changedProperties) {
48891
+ await super.firstUpdated(_changedProperties);
48880
48892
  if (this.required) {
48881
48893
  this.selected = true;
48882
- this.currentX = this.knobWidth;
48894
+ this.currentX = this.maxTravel;
48883
48895
  this.requestUpdate();
48884
48896
  } else {
48885
- this.currentX = this.selected ? this.knobWidth : 0;
48897
+ this.currentX = this.selected ? this.maxTravel : 0;
48886
48898
  this.requestUpdate();
48887
48899
  }
48888
48900
  }
@@ -48896,20 +48908,20 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48896
48908
  return;
48897
48909
  }
48898
48910
  if (this.required) {
48899
- this.currentX = this.knobWidth;
48911
+ this.currentX = this.maxTravel;
48900
48912
  this.requestUpdate();
48901
48913
  await new Promise((r10) => setTimeout(r10, 10));
48902
- this.currentX = 20;
48914
+ this.currentX = this.maxTravel - 3;
48903
48915
  this.requestUpdate();
48904
- await delayFor(200);
48905
- this.currentX = this.knobWidth;
48916
+ await delayFor(150);
48917
+ this.currentX = this.maxTravel;
48906
48918
  this.requestUpdate();
48907
48919
  return;
48908
48920
  }
48909
48921
  event.stopPropagation();
48910
48922
  event.preventDefault();
48911
48923
  this.selected = !this.selected;
48912
- this.currentX = this.selected ? this.knobWidth : 0;
48924
+ this.currentX = this.selected ? this.maxTravel : 0;
48913
48925
  this.requestUpdate();
48914
48926
  this.dispatchEvent(new CustomEvent("toggle", { detail: { selected: this.selected } }));
48915
48927
  delayFor(0).then(() => {
@@ -48933,7 +48945,7 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48933
48945
  this.hasDragged = true;
48934
48946
  const toggleKnobInner = this.shadowRoot.querySelector(".toggleKnobInner");
48935
48947
  toggleKnobInner.classList.add("dragging");
48936
- this.currentX = Math.max(0, Math.min(newX, this.trackWidth - this.knobWidth));
48948
+ this.currentX = Math.max(0, Math.min(newX, this.maxTravel));
48937
48949
  this.requestUpdate();
48938
48950
  }
48939
48951
  onPointerUp(event) {
@@ -48945,9 +48957,9 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48945
48957
  }
48946
48958
  const toggleKnobInner = this.shadowRoot.querySelector(".toggleKnobInner");
48947
48959
  toggleKnobInner.classList.remove("dragging");
48948
- const midpoint = (this.trackWidth - this.knobWidth) / 2;
48960
+ const midpoint = this.maxTravel / 2;
48949
48961
  this.selected = this.currentX > midpoint;
48950
- this.currentX = this.selected ? this.knobWidth : 0;
48962
+ this.currentX = this.selected ? this.maxTravel : 0;
48951
48963
  this.requestUpdate();
48952
48964
  this.dispatchEvent(new CustomEvent("toggle", { detail: { selected: this.selected } }));
48953
48965
  delayFor(0).then(() => {
@@ -48959,7 +48971,7 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48959
48971
  */
48960
48972
  updated(changedProperties) {
48961
48973
  if (changedProperties.has("selected") && !this.isDragging && !this.hasDragged && !this.required) {
48962
- this.currentX = this.selected ? this.knobWidth : 0;
48974
+ this.currentX = this.selected ? this.maxTravel : 0;
48963
48975
  this.requestUpdate();
48964
48976
  }
48965
48977
  super.updated(changedProperties);
@@ -48974,119 +48986,141 @@ _selected2 = new WeakMap();
48974
48986
  __decorateElement(_init4, 4, "required", _required_dec2, ConsentsoftwareToggle, _required2);
48975
48987
  __decorateElement(_init4, 4, "selected", _selected_dec2, ConsentsoftwareToggle, _selected2);
48976
48988
  ConsentsoftwareToggle = __decorateElement(_init4, 0, "ConsentsoftwareToggle", _ConsentsoftwareToggle_decorators, ConsentsoftwareToggle);
48977
- __publicField(ConsentsoftwareToggle, "styles", i`
48978
- :host {
48979
- display: block;
48980
- position: relative;
48981
- }
48989
+ // (36 - 2) - 14 - (2 * 2) = 34 - 14 - 4 = 16
48990
+ __publicField(ConsentsoftwareToggle, "styles", [
48991
+ cssManager.defaultStyles,
48992
+ i`
48993
+ :host {
48994
+ display: block;
48995
+ position: relative;
48996
+ }
48982
48997
 
48983
- .label {
48984
- margin-bottom: 16px;
48985
- }
48998
+ .label {
48999
+ margin-bottom: 8px;
49000
+ font-size: 0.8em;
49001
+ font-weight: 500;
49002
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
49003
+ }
48986
49004
 
48987
- .toggle {
48988
- user-select: none; /* helps avoid text selection on drag */
48989
- }
49005
+ .toggle {
49006
+ user-select: none;
49007
+ }
48990
49008
 
48991
- .toggleKnobArea {
48992
- position: relative;
48993
- margin: auto;
48994
- height: 30px;
48995
- width: 60px;
48996
- border-radius: 20px;
48997
- background: rgba(255, 255, 255, 0.1);
48998
- border: 1px solid rgba(255, 255, 255, 0);
48999
- overflow: hidden;
49000
- transition: background 0.2s ease;
49001
- cursor: pointer;
49002
- }
49009
+ .toggleKnobArea {
49010
+ position: relative;
49011
+ margin: auto;
49012
+ height: 20px;
49013
+ width: 36px;
49014
+ border-radius: 10px;
49015
+ background: ${cssManager.bdTheme(colors.light.input, colors.dark.input)};
49016
+ border: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
49017
+ overflow: hidden;
49018
+ transition: all 0.15s ease;
49019
+ cursor: pointer;
49020
+ }
49003
49021
 
49004
- :host([selected]) .toggleKnobArea {
49005
- background: green;
49006
- }
49022
+ .toggleKnobArea:hover {
49023
+ border-color: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
49024
+ }
49007
49025
 
49008
- .toggleKnobMover {
49009
- position: relative;
49010
- height: 100%;
49011
- width: 100%;
49012
- }
49026
+ :host([selected]) .toggleKnobArea {
49027
+ background: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
49028
+ border-color: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
49029
+ }
49013
49030
 
49014
- .toggleKnobInner {
49015
- position: absolute;
49016
- top: 0;
49017
- left: 0;
49018
- width: 30px;
49019
- height: 30px;
49020
- border-radius: 15px;
49021
- background: rgba(255, 255, 255, 0.5);
49022
- transition: left 0.2s ease, background 0.2s ease;
49023
- transform: scale(0.7);
49024
- /* Prevent scroll gestures on mobile */
49025
- touch-action: none;
49026
- }
49031
+ .toggleKnobMover {
49032
+ position: relative;
49033
+ height: 100%;
49034
+ width: 100%;
49035
+ }
49027
49036
 
49028
- .toggleKnobInner.dragging {
49029
- transition: background 0.2s ease;
49030
- }
49037
+ .toggleKnobInner {
49038
+ position: absolute;
49039
+ top: 2px;
49040
+ width: 14px;
49041
+ height: 14px;
49042
+ border-radius: 7px;
49043
+ background: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
49044
+ transition: left 0.15s ease, background 0.15s ease;
49045
+ touch-action: none;
49046
+ }
49031
49047
 
49032
- :host([selected]) .toggleKnobInner {
49033
- background: white;
49034
- }
49048
+ .toggleKnobInner.dragging {
49049
+ transition: background 0.15s ease;
49050
+ }
49035
49051
 
49036
- :host([required]) .toggleKnobArea {
49037
- background: none;
49038
- border: 1px solid rgba(255, 255, 255, 0.1);
49039
- }
49052
+ :host([selected]) .toggleKnobInner {
49053
+ background: ${cssManager.bdTheme(colors.light.primaryForeground, colors.dark.primaryForeground)};
49054
+ }
49040
49055
 
49041
- :host([required]) .toggleKnobInner {
49042
- background: rgba(255, 255, 255, 0.1);
49043
- }
49044
- `);
49056
+ :host([required]) .toggleKnobArea {
49057
+ cursor: not-allowed;
49058
+ }
49059
+
49060
+ :host([required][selected]) .toggleKnobArea {
49061
+ background: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
49062
+ border-color: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
49063
+ }
49064
+
49065
+ :host([required][selected]) .toggleKnobInner {
49066
+ background: ${cssManager.bdTheme(colors.light.muted, colors.dark.muted)};
49067
+ }
49068
+ `
49069
+ ]);
49045
49070
  __runInitializers(_init4, 1, ConsentsoftwareToggle);
49046
49071
 
49047
49072
  // ts_web/elements/consentsoftware-tabs.ts
49048
49073
  var _ConsentsoftwareTabs_decorators, _init5, _a5;
49049
49074
  _ConsentsoftwareTabs_decorators = [t4("consentsoftware-tabs")];
49050
- var ConsentsoftwareTabs = class extends (_a5 = i4) {
49075
+ var ConsentsoftwareTabs = class extends (_a5 = DeesElement) {
49051
49076
  static demo = () => x`<consentsoftware-tabs></consentsoftware-tabs>`;
49052
- static styles = i`
49053
- :host {
49054
- display: block;
49055
- position: relative;
49056
- border-bottom: 1px solid rgba(255, 255, 255, 0.1);
49057
- }
49058
-
49059
- .tabs {
49060
- display: grid;
49061
- grid-template-columns: repeat(3, 1fr);
49062
- }
49077
+ static styles = [
49078
+ cssManager.defaultStyles,
49079
+ i`
49080
+ :host {
49081
+ display: block;
49082
+ position: relative;
49083
+ background: ${cssManager.bdTheme(colors.light.muted, colors.dark.muted)};
49084
+ }
49063
49085
 
49064
- .tabs .tab {
49065
- text-align: center;
49066
- line-height: 3em;
49067
- cursor: pointer;
49068
- }
49086
+ .tabs {
49087
+ display: grid;
49088
+ grid-template-columns: repeat(3, 1fr);
49089
+ }
49069
49090
 
49070
- /* Media query for mobile devices: stack buttons vertically */
49071
- @media (max-width: 600px) {
49072
49091
  .tabs .tab {
49092
+ text-align: center;
49093
+ padding: 8px 0;
49073
49094
  font-size: 0.8em;
49095
+ font-weight: 500;
49096
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
49097
+ cursor: pointer;
49098
+ transition: color 0.15s ease;
49074
49099
  }
49075
- }
49076
49100
 
49077
- .selector {
49078
- position: absolute;
49079
- width: calc(100% / 3);
49080
- height: 1px;
49081
- left: 0;
49082
- bottom: 0px;
49083
- background: orange;
49084
- transition: all 0.2s;
49085
- }
49086
- `;
49087
- constructor() {
49088
- super();
49089
- }
49101
+ .tabs .tab:hover {
49102
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
49103
+ }
49104
+
49105
+ @media (max-width: 560px) {
49106
+ .tabs .tab {
49107
+ font-size: 0.75em;
49108
+ padding: 6px 0;
49109
+ }
49110
+ }
49111
+
49112
+ .selector {
49113
+ position: absolute;
49114
+ width: calc(100% / 3);
49115
+ height: 2px;
49116
+ left: 0;
49117
+ bottom: 0;
49118
+ background: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
49119
+ transition: all 0.2s ease-out;
49120
+ border-radius: 1px;
49121
+ }
49122
+ `
49123
+ ];
49090
49124
  render() {
49091
49125
  return x`
49092
49126
  <div class="tabs">