@consent.software/catalog 1.6.1 → 2.0.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.
Files changed (28) hide show
  1. package/dist_bundle/bundle.js +655 -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 +7 -20
  5. package/dist_ts_web/elements/consentsoftware-cookieconsent.js +200 -252
  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 +503 -437
  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 +218 -250
  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 property in defaultOptions2) {
19595
+ if (Object.prototype.hasOwnProperty.call(defaultOptions2, property)) {
19596
+ result[property] = defaultOptions2[property];
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 property in options) {
19600
+ if (Object.prototype.hasOwnProperty.call(options, property)) {
19601
+ if (options[property] === void 0) {
19602
+ delete result[property];
19603
19603
  } else {
19604
- result[property3] = options[property3];
19604
+ result[property] = options[property];
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(property) {
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[property];
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(property, normal, space2) {
38637
+ this.property = property;
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 property = {};
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(property, definitions[index2].property);
38655
38655
  Object.assign(normal, definitions[index2].normal);
38656
38656
  }
38657
- return new Schema(property3, normal, space2);
38657
+ return new Schema(property, 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(property, attribute) {
38673
+ this.property = property;
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(property, attribute, mask, space2) {
38722
38722
  let index2 = -1;
38723
- super(property3, attribute);
38723
+ super(property, 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 property = {};
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
+ property[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(property, 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, property) {
38799
+ return caseSensitiveTransform(attributes, property.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 property = this.isHorizontal ? "overflow-x" : "overflow-y";
44829
+ const overflow = getComputedStyle(this.rootElement)[property];
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 property = classProperties.get(key2);
47812
+ const propertyTypeString = await determinePropertyType(property);
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(property);
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,190 @@ 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
+ isMobile = false;
48431
+ static styles = [
48432
+ cssManager.defaultStyles,
48433
+ i`
48434
+ :host {
48435
+ font-size: 14px;
48436
+ user-select: none;
48437
+ }
48438
+
48439
+ .pageOverlay {
48440
+ position: fixed;
48441
+ inset: 0;
48442
+ display: grid;
48443
+ align-items: center;
48444
+ justify-content: center;
48445
+ z-index: 1000;
48446
+ background: rgba(0, 0, 0, 0);
48447
+ backdrop-filter: blur(0px);
48448
+ transition: background 0.3s ease, backdrop-filter 0.3s ease;
48449
+ }
48450
+
48451
+ .pageOverlay.shake {
48452
+ background: rgba(0, 0, 0, 0.6) !important;
48453
+ }
48454
+
48455
+ .modalBox {
48456
+ display: block;
48457
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48458
+ background: ${cssManager.bdTheme(colors.light.background, colors.dark.background)};
48459
+ box-shadow:
48460
+ 0 0 0 1px ${cssManager.bdTheme(colors.light.border, colors.dark.border)},
48461
+ 0 16px 70px ${cssManager.bdTheme("rgba(0, 0, 0, 0.15)", "rgba(0, 0, 0, 0.35)")};
48462
+ position: relative;
48463
+ border-radius: 8px;
48464
+ max-width: 520px;
48465
+ min-width: 320px;
48466
+ box-sizing: border-box;
48467
+ overflow: hidden;
48468
+ will-change: transform, opacity;
48469
+ transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
48470
+ transform: scale(0.92) translateY(20px);
48471
+ opacity: 0;
48472
+ }
48473
+
48474
+ .modalBox.visible {
48475
+ transform: scale(1) translateY(0);
48476
+ opacity: 1;
48477
+ }
48478
+
48479
+ .modalBox.hiding {
48480
+ transform: scale(0.95) translateY(10px);
48481
+ opacity: 0;
48482
+ }
48483
+
48484
+ /* Mobile: slide up from bottom */
48485
+ @media (max-width: 560px) {
48486
+ .pageOverlay {
48487
+ align-items: flex-end;
48488
+ }
48489
+
48490
+ .modalBox {
48491
+ max-width: 100%;
48492
+ min-width: 100%;
48493
+ border-radius: 16px 16px 0 0;
48494
+ transform: translateY(100%);
48495
+ opacity: 1;
48496
+ }
48497
+
48498
+ .modalBox.visible {
48499
+ transform: translateY(0);
48500
+ }
48501
+
48502
+ .modalBox.hiding {
48503
+ transform: translateY(100%);
48504
+ }
48505
+ }
48506
+
48507
+ .modalBox.shake {
48508
+ animation: shake 120ms 2 linear;
48509
+ }
48510
+
48511
+ @keyframes shake {
48512
+ 0% { transform: translateX(3px); }
48513
+ 50% { transform: translateX(-3px); }
48514
+ 100% { transform: translateX(0); }
48515
+ }
48516
+
48517
+ :host([show='false']) { display: none; }
48518
+ :host([show='true']) { display: block; }
48519
+
48520
+ .content {
48521
+ margin: auto;
48522
+ }
48523
+
48524
+ .text-container {
48525
+ padding: 12px 16px;
48526
+ font-size: 0.9em;
48527
+ line-height: 1.5;
48528
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
48529
+ }
48530
+
48531
+ .text-container a {
48532
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48533
+ text-decoration: underline;
48534
+ text-underline-offset: 2px;
48535
+ }
48536
+
48537
+ .text-container a:hover {
48538
+ opacity: 0.8;
48539
+ }
48540
+
48541
+ .button-container {
48542
+ padding: 12px 16px 16px;
48543
+ display: grid;
48544
+ grid-template-columns: repeat(3, 1fr);
48545
+ gap: 8px;
48546
+ }
48547
+
48548
+ @media (max-width: 560px) {
48549
+ .button-container {
48550
+ grid-template-columns: 1fr;
48551
+ padding-bottom: max(16px, env(safe-area-inset-bottom));
48552
+ }
48553
+ }
48554
+
48555
+ .consent-button {
48556
+ border-radius: 6px;
48557
+ background: ${cssManager.bdTheme(colors.light.secondary, colors.dark.secondary)};
48558
+ border: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48559
+ padding: 8px 16px;
48560
+ font-size: 0.85em;
48561
+ font-weight: 500;
48562
+ text-align: center;
48563
+ cursor: pointer;
48564
+ transition: all 0.15s ease;
48565
+ color: ${cssManager.bdTheme(colors.light.secondaryForeground, colors.dark.secondaryForeground)};
48566
+ }
48567
+
48568
+ .consent-button:hover {
48569
+ background: ${cssManager.bdTheme(colors.light.accent, colors.dark.accent)};
48570
+ border-color: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
48571
+ }
48572
+
48573
+ .consent-button:active {
48574
+ transform: scale(0.98);
48575
+ }
48576
+
48577
+ .consent-button:last-child {
48578
+ background: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
48579
+ color: ${cssManager.bdTheme(colors.light.primaryForeground, colors.dark.primaryForeground)};
48580
+ border-color: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
48581
+ }
48582
+
48583
+ .consent-button:last-child:hover {
48584
+ opacity: 0.9;
48585
+ }
48586
+
48587
+ .info-container {
48588
+ text-align: center;
48589
+ padding: 10px 16px;
48590
+ background: ${cssManager.bdTheme(colors.light.muted, colors.dark.muted)};
48591
+ border-top: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48592
+ font-size: 0.75em;
48593
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
48594
+ }
48595
+
48596
+ .info-container a {
48597
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48598
+ text-decoration: none;
48599
+ }
48600
+
48601
+ .info-container a:hover {
48602
+ text-decoration: underline;
48603
+ }
48604
+ `
48605
+ ];
48395
48606
  constructor() {
48396
48607
  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
48608
  this.setAttribute("show", "false");
48401
48609
  }
48402
48610
  render() {
@@ -48406,11 +48614,11 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48406
48614
  <div class="content">
48407
48615
  <consentsoftware-header></consentsoftware-header>
48408
48616
  <consentsoftware-tabs></consentsoftware-tabs>
48409
- <div class="text-container" style="padding: 16px;">
48617
+ <div class="text-container">
48410
48618
  <div class="toptext">
48411
- This page uses cookies. Please review our
48619
+ We use cookies to enhance your experience. Review our
48412
48620
  <a href="https://lossless.gmbh/cookie" target="_blank">cookie policy</a>
48413
- and choose which cookie level you are willing to accept.
48621
+ and select your preferences.
48414
48622
  </div>
48415
48623
  </div>
48416
48624
  <consentsoftware-mainselection></consentsoftware-mainselection>
@@ -48445,64 +48653,64 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48445
48653
  }
48446
48654
  /**
48447
48655
  * 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.
48656
+ * Displays the consent banner if no cookie levels are set.
48449
48657
  */
48450
48658
  async connectedCallback() {
48451
- super.connectedCallback();
48452
- this.updateTheme();
48659
+ await super.connectedCallback();
48660
+ this.isMobile = window.matchMedia("(max-width: 560px)").matches;
48453
48661
  const cookieLevel = await this.csWebclientInstance.getCookieLevels();
48454
48662
  if (!cookieLevel) {
48455
48663
  this.setAttribute("show", "true");
48456
- requestAnimationFrame(async () => {
48457
- await this.updated();
48458
- const pageOverlay = this.shadowRoot?.querySelector(".pageOverlay");
48459
- if (pageOverlay) {
48460
- pageOverlay.style.background = "rgba(0,0,0, 0.5)";
48461
- pageOverlay.style.backdropFilter = "blur(20px)";
48462
- }
48463
- const modalBox = this.shadowRoot?.querySelector(".modalBox");
48464
- if (modalBox) {
48465
- modalBox.style.transform = `scale(1)`;
48466
- modalBox.style.opacity = "1";
48467
- }
48468
- });
48664
+ await delayFor(50);
48665
+ this.animateIn();
48469
48666
  } else {
48470
48667
  this.setAttribute("show", "false");
48471
48668
  }
48472
48669
  }
48473
48670
  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
48671
  const acceptedCookieLevels = await this.csWebclientInstance.getCookieLevels();
48481
48672
  if (!this.csWebclientRan && acceptedCookieLevels) {
48482
48673
  this.csWebclientRan = true;
48483
48674
  await this.csWebclientInstance.getAndRunConsentTuples();
48484
48675
  }
48485
48676
  }
48486
- /**
48487
- * Handles consent button clicks, sets cookie levels, and hides the banner.
48488
- * Uses theme variables for styling transitions.
48489
- */
48490
- async handleConsentButtonClick(event, levelsArg) {
48491
- console.log(`Set level to ${levelsArg}`);
48677
+ animateIn() {
48492
48678
  const pageOverlay = this.shadowRoot?.querySelector(".pageOverlay");
48679
+ const modalBox = this.shadowRoot?.querySelector(".modalBox");
48493
48680
  if (pageOverlay) {
48494
- pageOverlay.style.background = "rgba(255,255,255, 0)";
48495
- pageOverlay.style.backdropFilter = "blur(0px)";
48681
+ pageOverlay.style.background = "rgba(0, 0, 0, 0.5)";
48682
+ pageOverlay.style.backdropFilter = "blur(4px)";
48683
+ }
48684
+ if (modalBox) {
48685
+ modalBox.classList.remove("hiding");
48686
+ modalBox.classList.add("visible");
48496
48687
  }
48688
+ }
48689
+ async animateOut() {
48690
+ const pageOverlay = this.shadowRoot?.querySelector(".pageOverlay");
48497
48691
  const modalBox = this.shadowRoot?.querySelector(".modalBox");
48692
+ if (pageOverlay) {
48693
+ pageOverlay.style.background = "rgba(0, 0, 0, 0)";
48694
+ pageOverlay.style.backdropFilter = "blur(0px)";
48695
+ }
48498
48696
  if (modalBox) {
48499
- modalBox.style.transform = `scale(0.95)`;
48500
- modalBox.style.opacity = "0";
48697
+ modalBox.classList.remove("visible");
48698
+ modalBox.classList.add("hiding");
48501
48699
  }
48700
+ await delayFor(350);
48701
+ }
48702
+ /**
48703
+ * Handles consent button clicks, sets cookie levels, and hides the banner.
48704
+ */
48705
+ async handleConsentButtonClick(_event, levelsArg) {
48706
+ console.log(`Set level to ${levelsArg}`);
48707
+ await this.animateOut();
48502
48708
  await this.csWebclientInstance.setCookieLevels(levelsArg);
48503
- await delayFor(300);
48504
48709
  this.setAttribute("show", "false");
48505
- this.updated();
48710
+ if (!this.csWebclientRan) {
48711
+ this.csWebclientRan = true;
48712
+ await this.csWebclientInstance.getAndRunConsentTuples();
48713
+ }
48506
48714
  }
48507
48715
  /**
48508
48716
  * Handles clicks on the page overlay. If clicked outside the modal,
@@ -48510,256 +48718,58 @@ var ConsentsoftwareCookieconsent = class extends (_a = i4, _theme_dec = [n5({ ty
48510
48718
  */
48511
48719
  async pageOverlayClick(e10) {
48512
48720
  if (e10.target === e10.currentTarget) {
48513
- const pageOverlay = this.shadowRoot?.querySelector(".pageOverlay");
48514
48721
  const modalBox = this.shadowRoot?.querySelector(".modalBox");
48515
- if (pageOverlay && modalBox) {
48516
- pageOverlay.classList.add("shake");
48722
+ if (modalBox) {
48517
48723
  modalBox.classList.add("shake");
48518
- await delayFor(2e3);
48519
- pageOverlay.classList.remove("shake");
48724
+ await delayFor(300);
48520
48725
  modalBox.classList.remove("shake");
48521
48726
  }
48522
48727
  }
48523
48728
  }
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
48729
  };
48536
48730
  _init = __decoratorStart(_a);
48537
- _theme = new WeakMap();
48538
- __decorateElement(_init, 4, "theme", _theme_dec, ConsentsoftwareCookieconsent, _theme);
48539
48731
  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
48732
  __runInitializers(_init, 1, ConsentsoftwareCookieconsent);
48737
48733
 
48738
48734
  // ts_web/elements/consentsoftware-header.ts
48739
48735
  var _ConsentsoftwareHeader_decorators, _init2, _a2;
48740
48736
  _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
- }
48737
+ var ConsentsoftwareHeader = class extends (_a2 = DeesElement) {
48738
+ static demo = () => x`<consentsoftware-header></consentsoftware-header>`;
48739
+ static styles = [
48740
+ cssManager.defaultStyles,
48741
+ i`
48742
+ :host {
48743
+ display: block;
48744
+ padding: 14px 16px;
48745
+ border-bottom: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48746
+ }
48751
48747
 
48752
- .heading {
48753
-
48754
- }
48755
- `;
48756
- constructor() {
48757
- super();
48758
- }
48748
+ .heading {
48749
+ display: flex;
48750
+ align-items: center;
48751
+ gap: 8px;
48752
+ font-size: 0.95em;
48753
+ font-weight: 600;
48754
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
48755
+ }
48756
+
48757
+ .icon {
48758
+ width: 18px;
48759
+ height: 18px;
48760
+ opacity: 0.7;
48761
+ }
48762
+ `
48763
+ ];
48759
48764
  render() {
48760
48765
  return x`
48761
48766
  <div class="heading">
48762
- What about cookies?
48767
+ <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
48768
+ <circle cx="12" cy="12" r="10"/>
48769
+ <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
48770
+ <path d="M12 17h.01"/>
48771
+ </svg>
48772
+ Cookie Preferences
48763
48773
  </div>
48764
48774
  `;
48765
48775
  }
@@ -48771,9 +48781,9 @@ __runInitializers(_init2, 1, ConsentsoftwareHeader);
48771
48781
  // ts_web/elements/consentsoftware-mainselection.ts
48772
48782
  var _selected_dec, _required_dec, _a3, _ConsentsoftwareMainSelection_decorators, _init3, _required, _selected;
48773
48783
  _ConsentsoftwareMainSelection_decorators = [t4("consentsoftware-mainselection")];
48774
- var ConsentsoftwareMainSelection = class extends (_a3 = i4, _required_dec = [n5({ type: Boolean })], _selected_dec = [n5({ type: Boolean })], _a3) {
48784
+ var ConsentsoftwareMainSelection = class extends (_a3 = DeesElement, _required_dec = [n5({ type: Boolean })], _selected_dec = [n5({ type: Boolean })], _a3) {
48775
48785
  constructor() {
48776
- super();
48786
+ super(...arguments);
48777
48787
  __privateAdd(this, _required, __runInitializers(_init3, 8, this, false)), __runInitializers(_init3, 11, this);
48778
48788
  __privateAdd(this, _selected, __runInitializers(_init3, 12, this, false)), __runInitializers(_init3, 15, this);
48779
48789
  }
@@ -48795,7 +48805,7 @@ var ConsentsoftwareMainSelection = class extends (_a3 = i4, _required_dec = [n5(
48795
48805
  </div>
48796
48806
  `;
48797
48807
  }
48798
- async getResults(mouseEvent) {
48808
+ async getResults() {
48799
48809
  }
48800
48810
  };
48801
48811
  _init3 = __decoratorStart(_a3);
@@ -48805,41 +48815,68 @@ __decorateElement(_init3, 4, "required", _required_dec, ConsentsoftwareMainSelec
48805
48815
  __decorateElement(_init3, 4, "selected", _selected_dec, ConsentsoftwareMainSelection, _selected);
48806
48816
  ConsentsoftwareMainSelection = __decorateElement(_init3, 0, "ConsentsoftwareMainSelection", _ConsentsoftwareMainSelection_decorators, ConsentsoftwareMainSelection);
48807
48817
  __publicField(ConsentsoftwareMainSelection, "demo", () => x`<consentsoftware-mainselection></consentsoftware-mainselection>`);
48808
- __publicField(ConsentsoftwareMainSelection, "styles", i`
48809
- :host {
48810
- display: block;
48811
- position: relative;
48812
- }
48818
+ __publicField(ConsentsoftwareMainSelection, "styles", [
48819
+ cssManager.defaultStyles,
48820
+ i`
48821
+ :host {
48822
+ display: block;
48823
+ position: relative;
48824
+ }
48813
48825
 
48814
- .maincontainer {
48815
- display: grid;
48816
- grid-template-columns: repeat(4, 1fr);
48817
- }
48826
+ .maincontainer {
48827
+ display: grid;
48828
+ grid-template-columns: repeat(4, 1fr);
48829
+ padding: 8px 0;
48830
+ }
48818
48831
 
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
- `);
48832
+ @media (max-width: 560px) {
48833
+ .maincontainer {
48834
+ grid-template-columns: repeat(2, 1fr);
48835
+ gap: 4px;
48836
+ }
48837
+ }
48838
+
48839
+ .itemBox {
48840
+ padding: 12px 8px;
48841
+ text-align: center;
48842
+ border-right: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48843
+ }
48844
+
48845
+ .itemBox:last-child {
48846
+ border-right: none;
48847
+ }
48848
+
48849
+ @media (max-width: 560px) {
48850
+ .itemBox {
48851
+ padding: 10px 8px;
48852
+ border-right: none;
48853
+ border-bottom: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48854
+ }
48855
+
48856
+ .itemBox:nth-child(odd) {
48857
+ border-right: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
48858
+ }
48859
+
48860
+ .itemBox:nth-last-child(-n+2) {
48861
+ border-bottom: none;
48862
+ }
48863
+ }
48864
+ `
48865
+ ]);
48829
48866
  __runInitializers(_init3, 1, ConsentsoftwareMainSelection);
48830
48867
 
48831
48868
  // ts_web/elements/consentsoftware-toggle.ts
48832
48869
  var _selected_dec2, _required_dec2, _a4, _ConsentsoftwareToggle_decorators, _init4, _required2, _selected2;
48833
48870
  _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) {
48871
+ var ConsentsoftwareToggle = class extends (_a4 = DeesElement, _required_dec2 = [n5({ type: Boolean })], _selected_dec2 = [n5({ type: Boolean, reflect: true })], _a4) {
48835
48872
  constructor() {
48836
- super();
48873
+ super(...arguments);
48837
48874
  __privateAdd(this, _required2, __runInitializers(_init4, 8, this, false)), __runInitializers(_init4, 11, this);
48838
48875
  __privateAdd(this, _selected2, __runInitializers(_init4, 12, this, false)), __runInitializers(_init4, 15, this);
48839
48876
  /**
48840
- * We always track the knob’s left offset in `currentX`.
48841
- * - 0 => fully left
48842
- * - 30 => fully right
48877
+ * Knob position tracking (0 = off, maxTravel = on)
48878
+ * This is the travel distance, not absolute left position.
48879
+ * Actual left = padding + currentX
48843
48880
  */
48844
48881
  __publicField(this, "currentX", 0);
48845
48882
  /**
@@ -48848,9 +48885,15 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48848
48885
  __publicField(this, "isDragging", false);
48849
48886
  __publicField(this, "hasDragged", false);
48850
48887
  __publicField(this, "startX", 0);
48851
- // pointerdown offset
48852
- __publicField(this, "knobWidth", 30);
48853
- __publicField(this, "trackWidth", 60);
48888
+ // Toggle dimensions (with border-box, 1px border reduces inner by 2px)
48889
+ __publicField(this, "trackWidth", 36);
48890
+ // outer width
48891
+ __publicField(this, "trackHeight", 20);
48892
+ // outer height
48893
+ __publicField(this, "knobSize", 14);
48894
+ __publicField(this, "padding", 2);
48895
+ // padding from inner edge to knob
48896
+ __publicField(this, "maxTravel", 16);
48854
48897
  }
48855
48898
  render() {
48856
48899
  return x`
@@ -48862,7 +48905,7 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48862
48905
  <!-- The knob itself, with pointer events for dragging. -->
48863
48906
  <div
48864
48907
  class="toggleKnobInner"
48865
- style="left: ${this.currentX}px;"
48908
+ style="left: ${this.padding + this.currentX}px;"
48866
48909
  @pointerdown=${this.onPointerDown}
48867
48910
  @pointermove=${this.onPointerMove}
48868
48911
  @pointerup=${this.onPointerUp}
@@ -48876,13 +48919,14 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48876
48919
  /**
48877
48920
  * If required = true on first render, auto-select and set the knob to the right.
48878
48921
  */
48879
- async firstUpdated() {
48922
+ async firstUpdated(_changedProperties) {
48923
+ await super.firstUpdated(_changedProperties);
48880
48924
  if (this.required) {
48881
48925
  this.selected = true;
48882
- this.currentX = this.knobWidth;
48926
+ this.currentX = this.maxTravel;
48883
48927
  this.requestUpdate();
48884
48928
  } else {
48885
- this.currentX = this.selected ? this.knobWidth : 0;
48929
+ this.currentX = this.selected ? this.maxTravel : 0;
48886
48930
  this.requestUpdate();
48887
48931
  }
48888
48932
  }
@@ -48896,20 +48940,20 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48896
48940
  return;
48897
48941
  }
48898
48942
  if (this.required) {
48899
- this.currentX = this.knobWidth;
48943
+ this.currentX = this.maxTravel;
48900
48944
  this.requestUpdate();
48901
48945
  await new Promise((r10) => setTimeout(r10, 10));
48902
- this.currentX = 20;
48946
+ this.currentX = this.maxTravel - 3;
48903
48947
  this.requestUpdate();
48904
- await delayFor(200);
48905
- this.currentX = this.knobWidth;
48948
+ await delayFor(150);
48949
+ this.currentX = this.maxTravel;
48906
48950
  this.requestUpdate();
48907
48951
  return;
48908
48952
  }
48909
48953
  event.stopPropagation();
48910
48954
  event.preventDefault();
48911
48955
  this.selected = !this.selected;
48912
- this.currentX = this.selected ? this.knobWidth : 0;
48956
+ this.currentX = this.selected ? this.maxTravel : 0;
48913
48957
  this.requestUpdate();
48914
48958
  this.dispatchEvent(new CustomEvent("toggle", { detail: { selected: this.selected } }));
48915
48959
  delayFor(0).then(() => {
@@ -48933,7 +48977,7 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48933
48977
  this.hasDragged = true;
48934
48978
  const toggleKnobInner = this.shadowRoot.querySelector(".toggleKnobInner");
48935
48979
  toggleKnobInner.classList.add("dragging");
48936
- this.currentX = Math.max(0, Math.min(newX, this.trackWidth - this.knobWidth));
48980
+ this.currentX = Math.max(0, Math.min(newX, this.maxTravel));
48937
48981
  this.requestUpdate();
48938
48982
  }
48939
48983
  onPointerUp(event) {
@@ -48945,9 +48989,9 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48945
48989
  }
48946
48990
  const toggleKnobInner = this.shadowRoot.querySelector(".toggleKnobInner");
48947
48991
  toggleKnobInner.classList.remove("dragging");
48948
- const midpoint = (this.trackWidth - this.knobWidth) / 2;
48992
+ const midpoint = this.maxTravel / 2;
48949
48993
  this.selected = this.currentX > midpoint;
48950
- this.currentX = this.selected ? this.knobWidth : 0;
48994
+ this.currentX = this.selected ? this.maxTravel : 0;
48951
48995
  this.requestUpdate();
48952
48996
  this.dispatchEvent(new CustomEvent("toggle", { detail: { selected: this.selected } }));
48953
48997
  delayFor(0).then(() => {
@@ -48959,7 +49003,7 @@ var ConsentsoftwareToggle = class extends (_a4 = i4, _required_dec2 = [n5({ type
48959
49003
  */
48960
49004
  updated(changedProperties) {
48961
49005
  if (changedProperties.has("selected") && !this.isDragging && !this.hasDragged && !this.required) {
48962
- this.currentX = this.selected ? this.knobWidth : 0;
49006
+ this.currentX = this.selected ? this.maxTravel : 0;
48963
49007
  this.requestUpdate();
48964
49008
  }
48965
49009
  super.updated(changedProperties);
@@ -48974,119 +49018,141 @@ _selected2 = new WeakMap();
48974
49018
  __decorateElement(_init4, 4, "required", _required_dec2, ConsentsoftwareToggle, _required2);
48975
49019
  __decorateElement(_init4, 4, "selected", _selected_dec2, ConsentsoftwareToggle, _selected2);
48976
49020
  ConsentsoftwareToggle = __decorateElement(_init4, 0, "ConsentsoftwareToggle", _ConsentsoftwareToggle_decorators, ConsentsoftwareToggle);
48977
- __publicField(ConsentsoftwareToggle, "styles", i`
48978
- :host {
48979
- display: block;
48980
- position: relative;
48981
- }
49021
+ // (36 - 2) - 14 - (2 * 2) = 34 - 14 - 4 = 16
49022
+ __publicField(ConsentsoftwareToggle, "styles", [
49023
+ cssManager.defaultStyles,
49024
+ i`
49025
+ :host {
49026
+ display: block;
49027
+ position: relative;
49028
+ }
48982
49029
 
48983
- .label {
48984
- margin-bottom: 16px;
48985
- }
49030
+ .label {
49031
+ margin-bottom: 8px;
49032
+ font-size: 0.8em;
49033
+ font-weight: 500;
49034
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
49035
+ }
48986
49036
 
48987
- .toggle {
48988
- user-select: none; /* helps avoid text selection on drag */
48989
- }
49037
+ .toggle {
49038
+ user-select: none;
49039
+ }
48990
49040
 
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
- }
49041
+ .toggleKnobArea {
49042
+ position: relative;
49043
+ margin: auto;
49044
+ height: 20px;
49045
+ width: 36px;
49046
+ border-radius: 10px;
49047
+ background: ${cssManager.bdTheme(colors.light.input, colors.dark.input)};
49048
+ border: 1px solid ${cssManager.bdTheme(colors.light.border, colors.dark.border)};
49049
+ overflow: hidden;
49050
+ transition: all 0.15s ease;
49051
+ cursor: pointer;
49052
+ }
49003
49053
 
49004
- :host([selected]) .toggleKnobArea {
49005
- background: green;
49006
- }
49054
+ .toggleKnobArea:hover {
49055
+ border-color: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
49056
+ }
49007
49057
 
49008
- .toggleKnobMover {
49009
- position: relative;
49010
- height: 100%;
49011
- width: 100%;
49012
- }
49058
+ :host([selected]) .toggleKnobArea {
49059
+ background: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
49060
+ border-color: ${cssManager.bdTheme(colors.light.primary, colors.dark.primary)};
49061
+ }
49013
49062
 
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
- }
49063
+ .toggleKnobMover {
49064
+ position: relative;
49065
+ height: 100%;
49066
+ width: 100%;
49067
+ }
49027
49068
 
49028
- .toggleKnobInner.dragging {
49029
- transition: background 0.2s ease;
49030
- }
49069
+ .toggleKnobInner {
49070
+ position: absolute;
49071
+ top: 2px;
49072
+ width: 14px;
49073
+ height: 14px;
49074
+ border-radius: 7px;
49075
+ background: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
49076
+ transition: left 0.15s ease, background 0.15s ease;
49077
+ touch-action: none;
49078
+ }
49031
49079
 
49032
- :host([selected]) .toggleKnobInner {
49033
- background: white;
49034
- }
49080
+ .toggleKnobInner.dragging {
49081
+ transition: background 0.15s ease;
49082
+ }
49035
49083
 
49036
- :host([required]) .toggleKnobArea {
49037
- background: none;
49038
- border: 1px solid rgba(255, 255, 255, 0.1);
49039
- }
49084
+ :host([selected]) .toggleKnobInner {
49085
+ background: ${cssManager.bdTheme(colors.light.primaryForeground, colors.dark.primaryForeground)};
49086
+ }
49040
49087
 
49041
- :host([required]) .toggleKnobInner {
49042
- background: rgba(255, 255, 255, 0.1);
49043
- }
49044
- `);
49088
+ :host([required]) .toggleKnobArea {
49089
+ cursor: not-allowed;
49090
+ }
49091
+
49092
+ :host([required][selected]) .toggleKnobArea {
49093
+ background: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
49094
+ border-color: ${cssManager.bdTheme(colors.light.ring, colors.dark.ring)};
49095
+ }
49096
+
49097
+ :host([required][selected]) .toggleKnobInner {
49098
+ background: ${cssManager.bdTheme(colors.light.muted, colors.dark.muted)};
49099
+ }
49100
+ `
49101
+ ]);
49045
49102
  __runInitializers(_init4, 1, ConsentsoftwareToggle);
49046
49103
 
49047
49104
  // ts_web/elements/consentsoftware-tabs.ts
49048
49105
  var _ConsentsoftwareTabs_decorators, _init5, _a5;
49049
49106
  _ConsentsoftwareTabs_decorators = [t4("consentsoftware-tabs")];
49050
- var ConsentsoftwareTabs = class extends (_a5 = i4) {
49107
+ var ConsentsoftwareTabs = class extends (_a5 = DeesElement) {
49051
49108
  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
- }
49109
+ static styles = [
49110
+ cssManager.defaultStyles,
49111
+ i`
49112
+ :host {
49113
+ display: block;
49114
+ position: relative;
49115
+ background: ${cssManager.bdTheme(colors.light.muted, colors.dark.muted)};
49116
+ }
49063
49117
 
49064
- .tabs .tab {
49065
- text-align: center;
49066
- line-height: 3em;
49067
- cursor: pointer;
49068
- }
49118
+ .tabs {
49119
+ display: grid;
49120
+ grid-template-columns: repeat(3, 1fr);
49121
+ }
49069
49122
 
49070
- /* Media query for mobile devices: stack buttons vertically */
49071
- @media (max-width: 600px) {
49072
49123
  .tabs .tab {
49124
+ text-align: center;
49125
+ padding: 8px 0;
49073
49126
  font-size: 0.8em;
49127
+ font-weight: 500;
49128
+ color: ${cssManager.bdTheme(colors.light.mutedForeground, colors.dark.mutedForeground)};
49129
+ cursor: pointer;
49130
+ transition: color 0.15s ease;
49074
49131
  }
49075
- }
49076
49132
 
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
- }
49133
+ .tabs .tab:hover {
49134
+ color: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
49135
+ }
49136
+
49137
+ @media (max-width: 560px) {
49138
+ .tabs .tab {
49139
+ font-size: 0.75em;
49140
+ padding: 6px 0;
49141
+ }
49142
+ }
49143
+
49144
+ .selector {
49145
+ position: absolute;
49146
+ width: calc(100% / 3);
49147
+ height: 2px;
49148
+ left: 0;
49149
+ bottom: 0;
49150
+ background: ${cssManager.bdTheme(colors.light.foreground, colors.dark.foreground)};
49151
+ transition: all 0.2s ease-out;
49152
+ border-radius: 1px;
49153
+ }
49154
+ `
49155
+ ];
49090
49156
  render() {
49091
49157
  return x`
49092
49158
  <div class="tabs">