@karmo-co/drift-kit-public 25.22.0 → 25.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components.js CHANGED
@@ -505,6 +505,22 @@
505
505
  }
506
506
  return beat + 1;
507
507
  }
508
+ if (el.hasAttribute(A + '-parts')) {
509
+ var holders = Array.prototype.slice.call(el.children), most = -1;
510
+ for (var h = 0; h < holders.length; h++) {
511
+ var parts = holders[h].querySelectorAll('[' + A + '-part]'), step = -1;
512
+ for (var q = 0; q < parts.length; q++) {
513
+ var named = (parts[q].getAttribute(A + '-part') || '').trim();
514
+ step = /^[0-9]+$/.test(named) ? +named : step + 1;
515
+ if (getComputedStyle(parts[q]).getPropertyValue('display') === 'none')
516
+ continue;
517
+ set(parts[q], beat + step, max);
518
+ if (step > most)
519
+ most = step;
520
+ }
521
+ }
522
+ return beat + most + 1;
523
+ }
508
524
  if (el.hasAttribute(A + '-list')) {
509
525
  var rows = Array.prototype.slice.call(el.children);
510
526
  for (var r = 0; r < rows.length; r++)
@@ -4634,7 +4650,7 @@
4634
4650
  var node = scope || document;
4635
4651
  if (node.matches && node.matches('.dk-component-select'))
4636
4652
  initSelect(node);
4637
- var nodes = node.querySelectorAll ? node.querySelectorAll('.dk-component-select') : [];
4653
+ var nodes = node.querySelectorAll ? node.querySelectorAll('.dk-component-select:not([data-dk-react])') : [];
4638
4654
  Array.prototype.forEach.call(nodes, initSelect);
4639
4655
  }
4640
4656
  var dk = window.dk = window.dk || {};
@@ -6260,7 +6276,7 @@
6260
6276
  var holder = root.closest('[data-device]');
6261
6277
  var device = holder && holder.getAttribute('data-device');
6262
6278
  var force = device === 'phone' || device === 'tablet' ? 'always' : device === 'desktop' ? 'never' : 'auto';
6263
- return dk.sheet ? dk.sheet.wants(root, '--dk-breakpoint-phone', force) : force === 'always';
6279
+ return dk.sheet ? dk.sheet.wants(root, '--dk-breakpoint-compact', force) : force === 'always';
6264
6280
  }
6265
6281
  function isViewer(root) { return root.getAttribute('data-variant') === 'viewer'; }
6266
6282
  function presentationOf(root) {
@@ -6834,7 +6850,7 @@
6834
6850
  var s = scope || document;
6835
6851
  if (s.matches && s.matches('.' + P))
6836
6852
  initRoot(s);
6837
- Array.prototype.forEach.call(s.querySelectorAll('.' + P), initRoot);
6853
+ Array.prototype.forEach.call(s.querySelectorAll('.' + P + ':not([data-dk-react])'), initRoot);
6838
6854
  }
6839
6855
  function sync(root) { if (root)
6840
6856
  initRoot(root); }
@@ -11123,7 +11139,7 @@
11123
11139
  var holder = root.closest('[data-device]');
11124
11140
  var device = holder && holder.getAttribute('data-device');
11125
11141
  var force = device === 'phone' || device === 'tablet' ? 'always' : device === 'desktop' ? 'never' : 'auto';
11126
- return dk.sheet ? dk.sheet.wants(root, '--dk-breakpoint-phone', force) : force === 'always';
11142
+ return dk.sheet ? dk.sheet.wants(root, '--dk-breakpoint-compact', force) : force === 'always';
11127
11143
  }
11128
11144
  function computePresentation() {
11129
11145
  if (!phoneWanted())
@@ -12404,7 +12420,7 @@
12404
12420
  var s = scope || document;
12405
12421
  if (s.matches && s.matches('.' + P))
12406
12422
  initRoot(s);
12407
- Array.prototype.forEach.call(s.querySelectorAll('.' + P), initRoot);
12423
+ Array.prototype.forEach.call(s.querySelectorAll('.' + P + ':not([data-dk-react])'), initRoot);
12408
12424
  }
12409
12425
  dk.component.sidebar = { init: init };
12410
12426
  if (document.readyState !== 'loading')