@karmo-co/drift-kit-public 25.16.0 → 25.17.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.
- package/components.js +45 -9
- package/drift-kit.min.css +2 -2
- package/package.json +1 -1
package/components.js
CHANGED
|
@@ -9143,7 +9143,7 @@
|
|
|
9143
9143
|
var previous = cur;
|
|
9144
9144
|
cur = i;
|
|
9145
9145
|
paint();
|
|
9146
|
-
arrive(i
|
|
9146
|
+
arrive(steps[i] || null, i < previous);
|
|
9147
9147
|
status.textContent = '';
|
|
9148
9148
|
setTimeout(function () {
|
|
9149
9149
|
if (cur >= steps.length) {
|
|
@@ -9157,16 +9157,16 @@
|
|
|
9157
9157
|
}
|
|
9158
9158
|
var arriving = null, arriveTimer = 0;
|
|
9159
9159
|
function seconds(v) { var n = parseFloat(v); return isNaN(n) ? NaN : /ms$/.test(v.trim()) ? n : n * 1000; }
|
|
9160
|
-
function arrive(step) {
|
|
9160
|
+
function arrive(step, back) {
|
|
9161
9161
|
clearTimeout(arriveTimer);
|
|
9162
9162
|
if (arriving)
|
|
9163
9163
|
arriving.removeAttribute('data-arriving');
|
|
9164
9164
|
arriving = step || null;
|
|
9165
9165
|
if (!arriving)
|
|
9166
9166
|
return;
|
|
9167
|
-
arriving.setAttribute('data-arriving', '');
|
|
9167
|
+
arriving.setAttribute('data-arriving', back ? 'back' : '');
|
|
9168
9168
|
var cs = getComputedStyle(root);
|
|
9169
|
-
var ms = seconds(cs.getPropertyValue('--dk-component-stepper-arrive-delay')) +
|
|
9169
|
+
var ms = (back ? 0 : seconds(cs.getPropertyValue('--dk-component-stepper-arrive-delay'))) +
|
|
9170
9170
|
Math.max(seconds(cs.getPropertyValue('--dk-component-stepper-state-duration')), seconds(cs.getPropertyValue('--dk-component-stepper-arrive-pulse-duration')));
|
|
9171
9171
|
arriveTimer = setTimeout(function () { if (arriving)
|
|
9172
9172
|
arriving.removeAttribute('data-arriving'); arriving = null; }, isNaN(ms) ? 1000 : ms + 50);
|
|
@@ -9502,9 +9502,9 @@
|
|
|
9502
9502
|
var T = '--dk-component-payment-form-';
|
|
9503
9503
|
var COLOUR = { primary: 1, surface: 1, border: 1, 'border-hover': 1, 'border-focus': 1, ring: 1, text: 1, 'text-secondary': 1,
|
|
9504
9504
|
placeholder: 1, danger: 1, icon: 1, 'label-color': 1, 'tab-surface': 1, 'tab-surface-hover': 1, 'tab-border': 1,
|
|
9505
|
-
'tab-selected-surface': 1, 'tab-selected-surface-hover': 1, 'tab-selected-border': 1, 'tab-selected-text': 1 };
|
|
9505
|
+
'tab-selected-surface': 1, 'tab-selected-surface-hover': 1, 'tab-selected-border': 1, 'tab-selected-text': 1, 'terms-color': 1 };
|
|
9506
9506
|
var LENGTH = { 'font-size': 1, 'spacing-unit': 1, radius: 1, 'border-width': 1, 'ring-width': 1, 'padding-block': 1,
|
|
9507
|
-
'padding-inline': 1, 'label-font-size': 1, gap: 1 };
|
|
9507
|
+
'padding-inline': 1, 'label-font-size': 1, gap: 1, 'row-gap': 1, 'label-gap': 1 };
|
|
9508
9508
|
function normalize(v) {
|
|
9509
9509
|
var s = String(v == null ? '' : v).trim();
|
|
9510
9510
|
var m = /^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+%?))?\s*\)$/.exec(s);
|
|
@@ -9577,7 +9577,7 @@
|
|
|
9577
9577
|
colorTextPlaceholder: t('placeholder'),
|
|
9578
9578
|
colorDanger: t('danger'),
|
|
9579
9579
|
colorIconTab: t('icon'),
|
|
9580
|
-
gridRowSpacing: t('gap'),
|
|
9580
|
+
gridRowSpacing: t('row-gap'),
|
|
9581
9581
|
gridColumnSpacing: t('gap'),
|
|
9582
9582
|
},
|
|
9583
9583
|
rules: {
|
|
@@ -9585,13 +9585,15 @@
|
|
|
9585
9585
|
'.Input:hover': { borderColor: t('border-hover') },
|
|
9586
9586
|
'.Input:focus': { borderColor: t('border-focus'), boxShadow: '0 0 0 ' + t('ring-width') + ' ' + t('ring') },
|
|
9587
9587
|
'.Input--invalid': { borderColor: t('danger'), color: t('text') },
|
|
9588
|
-
'.Label': { color: t('label-color'), fontSize: t('label-font-size'), fontWeight: t('label-font-weight'), letterSpacing: t('label-letter-spacing'), textTransform: 'uppercase' },
|
|
9588
|
+
'.Label': { color: t('label-color'), fontSize: t('label-font-size'), fontWeight: t('label-font-weight'), letterSpacing: t('label-letter-spacing'), textTransform: 'uppercase', marginBottom: t('label-gap') },
|
|
9589
9589
|
'.Tab': { backgroundColor: t('tab-surface'), border: border + t('tab-border'), boxShadow: 'none' },
|
|
9590
9590
|
'.Tab:hover': { backgroundColor: t('tab-surface-hover') },
|
|
9591
9591
|
'.Tab--selected': { backgroundColor: t('tab-selected-surface'), borderColor: t('tab-selected-border'), color: t('tab-selected-text'), boxShadow: 'none' },
|
|
9592
9592
|
'.Tab--selected:hover': { backgroundColor: t('tab-selected-surface-hover') },
|
|
9593
9593
|
'.TabIcon--selected': { fill: t('tab-selected-text') },
|
|
9594
9594
|
'.TabLabel--selected': { color: t('tab-selected-text') },
|
|
9595
|
+
'.TermsText': { color: t('terms-color') },
|
|
9596
|
+
'.AccordionItem': { border: 'none', boxShadow: 'none', backgroundColor: 'transparent', paddingLeft: t('ring-width'), paddingRight: t('ring-width') },
|
|
9595
9597
|
'.Error': { color: t('danger') },
|
|
9596
9598
|
},
|
|
9597
9599
|
};
|
|
@@ -12560,6 +12562,8 @@
|
|
|
12560
12562
|
if (detail.hasAttribute('data-open'))
|
|
12561
12563
|
return;
|
|
12562
12564
|
place();
|
|
12565
|
+
backdrop(true);
|
|
12566
|
+
root.setAttribute('data-detail-open', '');
|
|
12563
12567
|
detail.setAttribute('data-open', '');
|
|
12564
12568
|
sumBtn.setAttribute('aria-expanded', 'true');
|
|
12565
12569
|
document.addEventListener('pointerdown', outside, true);
|
|
@@ -12581,11 +12585,40 @@
|
|
|
12581
12585
|
}
|
|
12582
12586
|
catch (e) { }
|
|
12583
12587
|
var d = detail;
|
|
12584
|
-
|
|
12588
|
+
backdrop(false);
|
|
12589
|
+
closeTimer = setTimeout(function () {
|
|
12590
|
+
d.removeAttribute('data-closing');
|
|
12591
|
+
if (!(detail && detail.hasAttribute('data-open')))
|
|
12592
|
+
root.removeAttribute('data-detail-open');
|
|
12593
|
+
dropBackdrop();
|
|
12594
|
+
}, ms + 20);
|
|
12585
12595
|
if (focusBack)
|
|
12586
12596
|
sumBtn.focus();
|
|
12587
12597
|
emit(false);
|
|
12588
12598
|
}
|
|
12599
|
+
var shade = null;
|
|
12600
|
+
function backdrop(on) {
|
|
12601
|
+
if (on) {
|
|
12602
|
+
if (!shade || !shade.isConnected) {
|
|
12603
|
+
shade = document.createElement('div');
|
|
12604
|
+
shade.className = P + '__backdrop';
|
|
12605
|
+
shade.setAttribute('aria-hidden', 'true');
|
|
12606
|
+
if (root.parentNode)
|
|
12607
|
+
root.parentNode.insertBefore(shade, root);
|
|
12608
|
+
void shade.offsetWidth;
|
|
12609
|
+
}
|
|
12610
|
+
shade.setAttribute('data-open', '');
|
|
12611
|
+
}
|
|
12612
|
+
else if (shade)
|
|
12613
|
+
shade.removeAttribute('data-open');
|
|
12614
|
+
}
|
|
12615
|
+
function dropBackdrop() {
|
|
12616
|
+
if (shade && !(detail && detail.hasAttribute('data-open'))) {
|
|
12617
|
+
if (shade.parentNode)
|
|
12618
|
+
shade.parentNode.removeChild(shade);
|
|
12619
|
+
shade = null;
|
|
12620
|
+
}
|
|
12621
|
+
}
|
|
12589
12622
|
function outside(e) {
|
|
12590
12623
|
if (!detail)
|
|
12591
12624
|
return;
|
|
@@ -12616,6 +12649,9 @@
|
|
|
12616
12649
|
if (frame)
|
|
12617
12650
|
cancelAnimationFrame(frame);
|
|
12618
12651
|
clearTimeout(closeTimer);
|
|
12652
|
+
if (shade && shade.parentNode)
|
|
12653
|
+
shade.parentNode.removeChild(shade);
|
|
12654
|
+
shade = null;
|
|
12619
12655
|
document.removeEventListener('pointerdown', outside, true);
|
|
12620
12656
|
document.removeEventListener('keydown', onKey, true);
|
|
12621
12657
|
delete root.__dcActionBar;
|