@maggioli-design-system/mds-progress 2.8.2 → 2.9.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/dist/cjs/{index-53e759e9.js → index-ef941864.js} +22 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-progress.cjs.entry.js +2 -2
- package/dist/cjs/mds-progress.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/file.js +48 -0
- package/dist/collection/common/icon.js +15 -0
- package/dist/collection/common/unit.js +15 -3
- package/dist/collection/common/yugop/core.js +16 -0
- package/dist/collection/common/yugop/index.js +3 -0
- package/dist/collection/common/yugop/random-text.js +59 -0
- package/dist/collection/common/yugop/utils/math.js +11 -0
- package/dist/collection/common/yugop/utils/noop.js +1 -0
- package/dist/collection/common/yugop/utils/prng.js +21 -0
- package/dist/collection/common/yugop/utils/string.js +2 -0
- package/dist/collection/components/mds-progress/mds-progress.css +192 -2
- package/dist/collection/dictionary/file-extensions.js +64 -0
- package/dist/collection/dictionary/icon.js +6 -1
- package/dist/collection/dictionary/text.js +6 -0
- package/dist/collection/dictionary/variant.js +18 -1
- package/dist/collection/fixtures/filenames.js +57 -0
- package/dist/collection/type/file-types.js +1 -0
- package/dist/collection/type/text.js +1 -0
- package/dist/collection/type/variant-file-format.js +111 -0
- package/dist/components/mds-progress.js +1 -1
- package/dist/documentation.d.ts +1 -21
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-d7c3a08c.js → index-370f577b.js} +22 -14
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-progress.entry.js +2 -2
- package/dist/esm/mds-progress.js +3 -3
- package/dist/esm-es5/index-370f577b.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-progress.entry.js +1 -1
- package/dist/esm-es5/mds-progress.js +1 -1
- package/dist/mds-progress/mds-progress.esm.js +1 -1
- package/dist/mds-progress/mds-progress.js +1 -1
- package/dist/mds-progress/p-20cc5857.system.entry.js +1 -0
- package/dist/mds-progress/p-87430859.js +2 -0
- package/dist/mds-progress/{p-72564754.system.js → p-91249106.system.js} +1 -1
- package/dist/mds-progress/p-b8ddb760.entry.js +1 -0
- package/dist/mds-progress/p-bf3c5077.system.js +2 -0
- package/dist/stats.json +77 -35
- package/dist/types/common/file.d.ts +12 -0
- package/dist/types/common/icon.d.ts +5 -0
- package/dist/types/common/unit.d.ts +2 -1
- package/dist/types/common/yugop/core.d.ts +10 -0
- package/dist/types/common/yugop/index.d.ts +1 -0
- package/dist/types/common/yugop/random-text.d.ts +31 -0
- package/dist/types/common/yugop/utils/math.d.ts +3 -0
- package/dist/types/common/yugop/utils/noop.d.ts +1 -0
- package/dist/types/common/yugop/utils/prng.d.ts +8 -0
- package/dist/types/common/yugop/utils/string.d.ts +1 -0
- package/dist/types/dictionary/file-extensions.d.ts +11 -0
- package/dist/types/dictionary/icon.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +2 -0
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/fixtures/filenames.d.ts +2 -0
- package/dist/types/type/file-types.d.ts +1 -0
- package/dist/types/type/text.d.ts +1 -0
- package/dist/types/type/variant-file-format.d.ts +11 -0
- package/dist/types/type/variant.d.ts +1 -0
- package/documentation.json +51 -12
- package/package.json +3 -3
- package/readme.md +2 -0
- package/src/common/file.ts +63 -0
- package/src/common/icon.ts +25 -0
- package/src/common/unit.ts +21 -2
- package/src/common/yugop/core.ts +47 -0
- package/src/common/yugop/index.ts +4 -0
- package/src/common/yugop/random-text.ts +95 -0
- package/src/common/yugop/utils/math.ts +21 -0
- package/src/common/yugop/utils/noop.ts +1 -0
- package/src/common/yugop/utils/prng.ts +35 -0
- package/src/common/yugop/utils/string.ts +4 -0
- package/src/dictionary/file-extensions.ts +81 -0
- package/src/dictionary/icon.ts +6 -0
- package/src/dictionary/text.ts +9 -0
- package/src/dictionary/variant.ts +19 -0
- package/src/fixtures/filenames.ts +60 -0
- package/src/fixtures/icons.json +10 -0
- package/src/fixtures/iconsauce.json +3 -0
- package/src/type/file-types.ts +55 -0
- package/src/type/text.ts +4 -0
- package/src/type/variant-file-format.ts +128 -0
- package/src/type/variant.ts +17 -0
- package/www/build/mds-progress.esm.js +1 -1
- package/www/build/mds-progress.js +1 -1
- package/www/build/p-20cc5857.system.entry.js +1 -0
- package/www/build/p-87430859.js +2 -0
- package/www/build/{p-72564754.system.js → p-91249106.system.js} +1 -1
- package/www/build/p-b8ddb760.entry.js +1 -0
- package/www/build/p-bf3c5077.system.js +2 -0
- package/dist/esm-es5/index-d7c3a08c.js +0 -1
- package/dist/mds-progress/p-3fd7c0e1.system.js +0 -2
- package/dist/mds-progress/p-ba0c7117.entry.js +0 -1
- package/dist/mds-progress/p-e157ffcb.js +0 -2
- package/dist/mds-progress/p-efdf2de7.system.entry.js +0 -1
- package/www/build/p-3fd7c0e1.system.js +0 -2
- package/www/build/p-ba0c7117.entry.js +0 -1
- package/www/build/p-e157ffcb.js +0 -2
- package/www/build/p-efdf2de7.system.entry.js +0 -1
|
@@ -479,6 +479,9 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
+
// This needs to always happen so we can hide nodes that are projected
|
|
483
|
+
// to another component but don't end up in a slot
|
|
484
|
+
elm['s-hn'] = hostTagName;
|
|
482
485
|
return elm;
|
|
483
486
|
};
|
|
484
487
|
/**
|
|
@@ -602,8 +605,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
602
605
|
* @param oldCh the old children of the parent node
|
|
603
606
|
* @param newVNode the new VNode which will replace the parent
|
|
604
607
|
* @param newCh the new children of the parent node
|
|
608
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
605
609
|
*/
|
|
606
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
610
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
607
611
|
let oldStartIdx = 0;
|
|
608
612
|
let newStartIdx = 0;
|
|
609
613
|
let oldEndIdx = oldCh.length - 1;
|
|
@@ -627,25 +631,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
627
631
|
else if (newEndVnode == null) {
|
|
628
632
|
newEndVnode = newCh[--newEndIdx];
|
|
629
633
|
}
|
|
630
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
634
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
631
635
|
// if the start nodes are the same then we should patch the new VNode
|
|
632
636
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
633
637
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
634
638
|
// since things are matched up in order.
|
|
635
|
-
patch(oldStartVnode, newStartVnode);
|
|
639
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
636
640
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
637
641
|
newStartVnode = newCh[++newStartIdx];
|
|
638
642
|
}
|
|
639
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
643
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
640
644
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
641
645
|
// decrement our end indices, and also likewise in this case we don't
|
|
642
646
|
// need to move any DOM Nodes.
|
|
643
|
-
patch(oldEndVnode, newEndVnode);
|
|
647
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
644
648
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
645
649
|
newEndVnode = newCh[--newEndIdx];
|
|
646
650
|
}
|
|
647
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
648
|
-
patch(oldStartVnode, newEndVnode);
|
|
651
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
652
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
649
653
|
// We need to move the element for `oldStartVnode` into a position which
|
|
650
654
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
651
655
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -667,8 +671,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
667
671
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
668
672
|
newEndVnode = newCh[--newEndIdx];
|
|
669
673
|
}
|
|
670
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
671
|
-
patch(oldEndVnode, newStartVnode);
|
|
674
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
675
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
672
676
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
673
677
|
// the same node, so since we're here we know that they are not. Thus we
|
|
674
678
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -722,9 +726,10 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
722
726
|
*
|
|
723
727
|
* @param leftVNode the first VNode to check
|
|
724
728
|
* @param rightVNode the second VNode to check
|
|
729
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
725
730
|
* @returns whether they're equal or not
|
|
726
731
|
*/
|
|
727
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
732
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
728
733
|
// compare if two vnode to see if they're "technically" the same
|
|
729
734
|
// need to have the same element tag, and same key to be the same
|
|
730
735
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
@@ -739,8 +744,9 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
739
744
|
*
|
|
740
745
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
741
746
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
747
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
742
748
|
*/
|
|
743
|
-
const patch = (oldVNode, newVNode) => {
|
|
749
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
744
750
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
745
751
|
const oldChildren = oldVNode.$children$;
|
|
746
752
|
const newChildren = newVNode.$children$;
|
|
@@ -756,7 +762,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
756
762
|
if (oldChildren !== null && newChildren !== null) {
|
|
757
763
|
// looks like there's child vnodes for both the old and new vnodes
|
|
758
764
|
// so we need to call `updateChildren` to reconcile them
|
|
759
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
765
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
760
766
|
}
|
|
761
767
|
else if (newChildren !== null) {
|
|
762
768
|
// add the new vnode children
|
|
@@ -825,7 +831,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
825
831
|
scopeId = hostElm['s-sc'];
|
|
826
832
|
}
|
|
827
833
|
// synchronous patch
|
|
828
|
-
patch(oldVNode, rootVnode);
|
|
834
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
829
835
|
};
|
|
830
836
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
831
837
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
@@ -1496,12 +1502,14 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1496
1502
|
// If we have styles, add them to the DOM
|
|
1497
1503
|
if (dataStyles.innerHTML.length) {
|
|
1498
1504
|
dataStyles.setAttribute('data-styles', '');
|
|
1499
|
-
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1500
1505
|
// Apply CSP nonce to the style tag if it exists
|
|
1501
1506
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1502
1507
|
if (nonce != null) {
|
|
1503
1508
|
dataStyles.setAttribute('nonce', nonce);
|
|
1504
1509
|
}
|
|
1510
|
+
// Insert the styles into the document head
|
|
1511
|
+
// NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
|
|
1512
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1505
1513
|
}
|
|
1506
1514
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1507
1515
|
isBootstrapping = false;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ef941864.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ef941864.js');
|
|
6
6
|
|
|
7
|
-
const mdsProgressCss = "@tailwind utilities; :host{--mds-progress-background:rgb(var(--tone-neutral-08));--mds-progress-color:rgb(var(--brand-maggioli-03));--mds-progress-duration:750ms;--mds-progress-radius:0.5rem;--mds-progress-thickness:0.5rem;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms;background-color:var(--mds-progress-background);border-radius:var(--mds-progress-radius);display:-ms-flexbox;display:flex;height:var(--mds-progress-thickness);min-width:var(--mds-progress-thickness);overflow:hidden;width:100%}:host([direction=\"vertical\"]){-ms-flex-direction:column;flex-direction:column;height:unset;min-height:var(--mds-progress-thickness);width:var(--mds-progress-thickness)}.progress{-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-progress-color);border-radius:var(--mds-progress-radius);-webkit-transition-duration:var(--mds-progress-duration);transition-duration:var(--mds-progress-duration);-webkit-transition-property:background-color, flex-grow;transition-property:background-color, flex-grow;transition-property:background-color, flex-grow, -ms-flex-positive}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.text{
|
|
7
|
+
const mdsProgressCss = "@tailwind utilities; :host{--mds-progress-background:rgb(var(--tone-neutral-08));--mds-progress-color:rgb(var(--brand-maggioli-03));--mds-progress-duration:750ms;--mds-progress-radius:0.5rem;--mds-progress-thickness:0.5rem;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms;background-color:var(--mds-progress-background);border-radius:var(--mds-progress-radius);display:-ms-flexbox;display:flex;height:var(--mds-progress-thickness);min-width:var(--mds-progress-thickness);overflow:hidden;width:100%}:host([direction=\"vertical\"]){-ms-flex-direction:column;flex-direction:column;height:unset;min-height:var(--mds-progress-thickness);width:var(--mds-progress-thickness)}.progress{-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-progress-color);border-radius:var(--mds-progress-radius);-webkit-transition-duration:var(--mds-progress-duration);transition-duration:var(--mds-progress-duration);-webkit-transition-property:background-color, flex-grow;transition-property:background-color, flex-grow;transition-property:background-color, flex-grow, -ms-flex-positive}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.bg-label-amaranth-10{--tw-bg-opacity:1;background-color:rgb(var(--label-amaranth-10) / var(--tw-bg-opacity))}.bg-label-aqua-10{--tw-bg-opacity:1;background-color:rgb(var(--label-aqua-10) / var(--tw-bg-opacity))}.bg-label-blue-10{--tw-bg-opacity:1;background-color:rgb(var(--label-blue-10) / var(--tw-bg-opacity))}.bg-label-green-10{--tw-bg-opacity:1;background-color:rgb(var(--label-green-10) / var(--tw-bg-opacity))}.bg-label-lime-10{--tw-bg-opacity:1;background-color:rgb(var(--label-lime-10) / var(--tw-bg-opacity))}.bg-label-orange-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orange-10) / var(--tw-bg-opacity))}.bg-label-orchid-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orchid-10) / var(--tw-bg-opacity))}.bg-label-violet-10{--tw-bg-opacity:1;background-color:rgb(var(--label-violet-10) / var(--tw-bg-opacity))}.bg-label-yellow-10{--tw-bg-opacity:1;background-color:rgb(var(--label-yellow-10) / var(--tw-bg-opacity))}.bg-tone-neutral-10{--tw-bg-opacity:1;background-color:rgb(var(--tone-neutral-10) / var(--tw-bg-opacity))}.fill-label-amaranth-04{fill:rgb(var(--label-amaranth-04))}.fill-label-aqua-04{fill:rgb(var(--label-aqua-04))}.fill-label-blue-04{fill:rgb(var(--label-blue-04))}.fill-label-green-04{fill:rgb(var(--label-green-04))}.fill-label-lime-04{fill:rgb(var(--label-lime-04))}.fill-label-orange-04{fill:rgb(var(--label-orange-04))}.fill-label-orchid-04{fill:rgb(var(--label-orchid-04))}.fill-label-violet-04{fill:rgb(var(--label-violet-04))}.fill-label-yellow-04{fill:rgb(var(--label-yellow-04))}.fill-tone-neutral-04{fill:rgb(var(--tone-neutral-04))}.text-label-amaranth-04{--tw-text-opacity:1;color:rgb(var(--label-amaranth-04) / var(--tw-text-opacity))}.text-label-aqua-04{--tw-text-opacity:1;color:rgb(var(--label-aqua-04) / var(--tw-text-opacity))}.text-label-blue-04{--tw-text-opacity:1;color:rgb(var(--label-blue-04) / var(--tw-text-opacity))}.text-label-green-04{--tw-text-opacity:1;color:rgb(var(--label-green-04) / var(--tw-text-opacity))}.text-label-lime-04{--tw-text-opacity:1;color:rgb(var(--label-lime-04) / var(--tw-text-opacity))}.text-label-orange-04{--tw-text-opacity:1;color:rgb(var(--label-orange-04) / var(--tw-text-opacity))}.text-label-orchid-04{--tw-text-opacity:1;color:rgb(var(--label-orchid-04) / var(--tw-text-opacity))}.text-label-violet-04{--tw-text-opacity:1;color:rgb(var(--label-violet-04) / var(--tw-text-opacity))}.text-label-yellow-04{--tw-text-opacity:1;color:rgb(var(--label-yellow-04) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([variant=\"dark\"]){--mds-progress-color:rgb(var(--tone-neutral-04));--mds-progress-background:rgb(var(--tone-neutral-08))}:host([variant=\"light\"]){--mds-progress-color:rgb(var(--tone-neutral));--mds-progress-background:rgb(var(--tone-neutral-05))}:host([variant=\"error\"]){--mds-progress-color:rgb(var(--status-error-06));--mds-progress-background:rgb(var(--status-error-09))}:host([variant=\"warning\"]){--mds-progress-color:rgb(var(--status-warning-06));--mds-progress-background:rgb(var(--status-warning-09))}:host([variant=\"success\"]){--mds-progress-color:rgb(var(--status-success-06));--mds-progress-background:rgb(var(--status-success-09))}:host([variant=\"info\"]){--mds-progress-color:rgb(var(--status-info-06));--mds-progress-background:rgb(var(--status-info-09))}:host([variant=\"primary\"]){--mds-progress-color:rgb(var(--brand-maggioli-03));--mds-progress-background:rgb(var(--tone-neutral-08))}";
|
|
8
8
|
|
|
9
9
|
const MdsProgress = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ef941864.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.10.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-progress.cjs.js', document.baseURI).href));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { fileExtensionsDictionary } from "../dictionary/file-extensions";
|
|
2
|
+
import { fileFormatsVariant } from "../type/variant-file-format";
|
|
3
|
+
const sanitizeFilename = (filename, error = 'Attribute "filename" is undefined.') => {
|
|
4
|
+
var _a;
|
|
5
|
+
if (filename === undefined) {
|
|
6
|
+
throw console.error(error);
|
|
7
|
+
}
|
|
8
|
+
if (filename.includes('/')) {
|
|
9
|
+
return (_a = filename.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
10
|
+
}
|
|
11
|
+
return filename;
|
|
12
|
+
};
|
|
13
|
+
const sanitizeSuffix = (rawFilename) => {
|
|
14
|
+
var _a;
|
|
15
|
+
const filename = sanitizeFilename(rawFilename);
|
|
16
|
+
if (filename.includes('.')) {
|
|
17
|
+
return (_a = filename.split('.').pop()) !== null && _a !== void 0 ? _a : '';
|
|
18
|
+
}
|
|
19
|
+
return filename;
|
|
20
|
+
};
|
|
21
|
+
const getName = (rawFilename) => {
|
|
22
|
+
var _a;
|
|
23
|
+
const filename = sanitizeFilename(rawFilename);
|
|
24
|
+
if (filename.includes('.')) {
|
|
25
|
+
return (_a = filename.split('.')[0]) !== null && _a !== void 0 ? _a : '';
|
|
26
|
+
}
|
|
27
|
+
return filename;
|
|
28
|
+
};
|
|
29
|
+
const getSuffix = (rawFilename, suffixOverride) => {
|
|
30
|
+
const suffix = sanitizeSuffix(rawFilename);
|
|
31
|
+
const filename = sanitizeFilename(rawFilename);
|
|
32
|
+
if (suffixOverride !== null && suffixOverride !== undefined) {
|
|
33
|
+
return suffixOverride.toLowerCase();
|
|
34
|
+
}
|
|
35
|
+
if (suffix !== filename) {
|
|
36
|
+
return suffix;
|
|
37
|
+
}
|
|
38
|
+
return 'default';
|
|
39
|
+
};
|
|
40
|
+
const getExtensionInfos = (rawFilename, suffixOverride) => {
|
|
41
|
+
var _a;
|
|
42
|
+
const suffix = getSuffix(rawFilename, suffixOverride).toLocaleLowerCase();
|
|
43
|
+
return (_a = fileExtensionsDictionary[suffix]) !== null && _a !== void 0 ? _a : fileExtensionsDictionary.default;
|
|
44
|
+
};
|
|
45
|
+
const getFormatsVariant = (rawFilename, suffixOverride) => {
|
|
46
|
+
return fileFormatsVariant[getExtensionInfos(rawFilename, suffixOverride).format];
|
|
47
|
+
};
|
|
48
|
+
export { getExtensionInfos, getFormatsVariant, getSuffix, getName, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const BASE64_SVG_ICON = 'data:image/svg+xml;base64,';
|
|
2
|
+
const MARKUP_SVG_ICON = '<svg ';
|
|
3
|
+
const isIconFormatIsBase64 = (icon) => {
|
|
4
|
+
if (!icon) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
return icon.startsWith(BASE64_SVG_ICON);
|
|
8
|
+
};
|
|
9
|
+
const isIconFormatIsSVG = (icon) => {
|
|
10
|
+
if (!icon) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return icon.startsWith(MARKUP_SVG_ICON);
|
|
14
|
+
};
|
|
15
|
+
export { isIconFormatIsBase64, isIconFormatIsSVG, BASE64_SVG_ICON, MARKUP_SVG_ICON, };
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
2
|
+
if (duration.includes('ms')) {
|
|
3
|
+
return Number(duration.replace('ms', ''));
|
|
4
|
+
}
|
|
2
5
|
if (duration.includes('s')) {
|
|
3
6
|
return Number(duration.replace('s', '')) * 1000;
|
|
4
7
|
}
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
return defaultValue;
|
|
9
|
+
};
|
|
10
|
+
const cssSizeToNumber = (size, defaultValue = 0) => {
|
|
11
|
+
if (size.includes('px')) {
|
|
12
|
+
return Number(size.replace('px', ''));
|
|
13
|
+
}
|
|
14
|
+
if (size.includes('rem')) {
|
|
15
|
+
return Number(size.replace('rem', '')) * 16;
|
|
16
|
+
}
|
|
17
|
+
if (size.includes('em')) {
|
|
18
|
+
return Number(size.replace('em', '')) * 16;
|
|
7
19
|
}
|
|
8
20
|
return defaultValue;
|
|
9
21
|
};
|
|
10
|
-
export { cssDurationToMilliseconds, };
|
|
22
|
+
export { cssDurationToMilliseconds, cssSizeToNumber, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { generator } from "./utils/prng";
|
|
2
|
+
import { strToCharCodeArray } from "./utils/string";
|
|
3
|
+
import { randomSign, minMaxLooped } from "./utils/math";
|
|
4
|
+
const rand = generator();
|
|
5
|
+
const random = (base, offset) => () => (base + rand.range(0, offset)) * randomSign();
|
|
6
|
+
export const generateRandomCharCodeArray = (base, offset) => str => strToCharCodeArray(str).map(random(base, offset));
|
|
7
|
+
export const charCodeArrayToString = ({ str, minCharCode, maxCharCode, placeholderChar, charStep, }) => charCodes => charCodes.reduce((acc, item, index) => {
|
|
8
|
+
if (item !== 0) {
|
|
9
|
+
if (Math.abs(item) > charStep) {
|
|
10
|
+
return acc + placeholderChar;
|
|
11
|
+
}
|
|
12
|
+
return (acc +
|
|
13
|
+
String.fromCharCode(minMaxLooped(minCharCode, maxCharCode)(str.charCodeAt(index) + item)));
|
|
14
|
+
}
|
|
15
|
+
return acc + str.charAt(index);
|
|
16
|
+
}, '');
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { generateRandomCharCodeArray, charCodeArrayToString } from "./core";
|
|
2
|
+
import { noop } from "./utils/noop";
|
|
3
|
+
class RandomText {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
this.start = () => {
|
|
6
|
+
const { frameOffset, charOffset, str, speed } = this;
|
|
7
|
+
const randoms = generateRandomCharCodeArray(frameOffset, charOffset)(str);
|
|
8
|
+
this.stop();
|
|
9
|
+
this.rafId = requestAnimationFrame(() => {
|
|
10
|
+
this.step(randoms, speed, speed);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
Object.assign(this, Object.assign(Object.assign({}, RandomText.defaults), options));
|
|
14
|
+
}
|
|
15
|
+
stop() {
|
|
16
|
+
cancelAnimationFrame(this.rafId);
|
|
17
|
+
}
|
|
18
|
+
step(randoms, stepCount, speed) {
|
|
19
|
+
const { str, charStep, minCharCode, maxCharCode, placeholderChar, onProgress, onComplete, } = this;
|
|
20
|
+
const stepArray = randoms.slice(0, stepCount);
|
|
21
|
+
const steppedArray = stepArray.map(item => {
|
|
22
|
+
if (item > 0)
|
|
23
|
+
return item - 1;
|
|
24
|
+
if (item < 0)
|
|
25
|
+
return item + 1;
|
|
26
|
+
return 0;
|
|
27
|
+
});
|
|
28
|
+
const output = charCodeArrayToString({
|
|
29
|
+
str,
|
|
30
|
+
minCharCode,
|
|
31
|
+
maxCharCode,
|
|
32
|
+
placeholderChar,
|
|
33
|
+
charStep,
|
|
34
|
+
})(steppedArray);
|
|
35
|
+
const updatedRandoms = [...steppedArray, ...randoms.slice(stepCount)];
|
|
36
|
+
onProgress(output);
|
|
37
|
+
if (output !== str) {
|
|
38
|
+
this.rafId = requestAnimationFrame(() => {
|
|
39
|
+
this.step(updatedRandoms, stepCount + speed, speed);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
onComplete(output);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
RandomText.defaults = {
|
|
48
|
+
str: '',
|
|
49
|
+
speed: 2,
|
|
50
|
+
placeholderChar: '_',
|
|
51
|
+
frameOffset: 30,
|
|
52
|
+
charOffset: 20,
|
|
53
|
+
charStep: 10,
|
|
54
|
+
minCharCode: 32,
|
|
55
|
+
maxCharCode: 122,
|
|
56
|
+
onProgress: noop,
|
|
57
|
+
onComplete: noop,
|
|
58
|
+
};
|
|
59
|
+
export default RandomText;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { generator } from "./prng";
|
|
2
|
+
const rand = generator();
|
|
3
|
+
export const randomSign = () => (Math.round(Math.random()) - 0.5) * 2;
|
|
4
|
+
export const generateRandomNumbers = base => charOffset => length => [...Array(length)].map(() => (base + rand.range(0, charOffset)) * randomSign());
|
|
5
|
+
export const minMaxLooped = (min, max) => value => {
|
|
6
|
+
if (value > max)
|
|
7
|
+
return min + (value - max);
|
|
8
|
+
if (value < min)
|
|
9
|
+
return max + (value - min);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const noop = () => { };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const int32 = 2147483647;
|
|
2
|
+
const gen = v => (v * 16807) % int32;
|
|
3
|
+
const randomFloat = v => gen(v) / int32;
|
|
4
|
+
const randomInt = v => gen(v);
|
|
5
|
+
export const generator = (seed = 1) => {
|
|
6
|
+
let value = seed < 1 ? 1 : seed;
|
|
7
|
+
const next = () => {
|
|
8
|
+
value = randomInt(value);
|
|
9
|
+
return value;
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
random: () => next(),
|
|
13
|
+
randomFloat: () => randomFloat(next()),
|
|
14
|
+
range: (min, max) => {
|
|
15
|
+
const minimum = min - 0.4999;
|
|
16
|
+
const maximum = max + 0.4999;
|
|
17
|
+
return Math.round(minimum + (maximum - minimum) * randomFloat(next()));
|
|
18
|
+
},
|
|
19
|
+
rangeFloat: (min, max) => min + (max - min) * randomFloat(next()),
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
transition-property: background-color, flex-grow;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
.static{
|
|
49
|
+
|
|
50
|
+
position: static;
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
.fixed{
|
|
49
54
|
|
|
50
55
|
position: fixed;
|
|
@@ -60,9 +65,194 @@
|
|
|
60
65
|
border-width: 1px;
|
|
61
66
|
}
|
|
62
67
|
|
|
63
|
-
.
|
|
68
|
+
.bg-label-amaranth-10{
|
|
69
|
+
|
|
70
|
+
--tw-bg-opacity: 1;
|
|
71
|
+
|
|
72
|
+
background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bg-label-aqua-10{
|
|
76
|
+
|
|
77
|
+
--tw-bg-opacity: 1;
|
|
78
|
+
|
|
79
|
+
background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.bg-label-blue-10{
|
|
83
|
+
|
|
84
|
+
--tw-bg-opacity: 1;
|
|
85
|
+
|
|
86
|
+
background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.bg-label-green-10{
|
|
90
|
+
|
|
91
|
+
--tw-bg-opacity: 1;
|
|
92
|
+
|
|
93
|
+
background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.bg-label-lime-10{
|
|
97
|
+
|
|
98
|
+
--tw-bg-opacity: 1;
|
|
99
|
+
|
|
100
|
+
background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.bg-label-orange-10{
|
|
104
|
+
|
|
105
|
+
--tw-bg-opacity: 1;
|
|
106
|
+
|
|
107
|
+
background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.bg-label-orchid-10{
|
|
111
|
+
|
|
112
|
+
--tw-bg-opacity: 1;
|
|
113
|
+
|
|
114
|
+
background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.bg-label-violet-10{
|
|
118
|
+
|
|
119
|
+
--tw-bg-opacity: 1;
|
|
120
|
+
|
|
121
|
+
background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.bg-label-yellow-10{
|
|
125
|
+
|
|
126
|
+
--tw-bg-opacity: 1;
|
|
127
|
+
|
|
128
|
+
background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.bg-tone-neutral-10{
|
|
132
|
+
|
|
133
|
+
--tw-bg-opacity: 1;
|
|
134
|
+
|
|
135
|
+
background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.fill-label-amaranth-04{
|
|
139
|
+
|
|
140
|
+
fill: rgb(var(--label-amaranth-04));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.fill-label-aqua-04{
|
|
144
|
+
|
|
145
|
+
fill: rgb(var(--label-aqua-04));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.fill-label-blue-04{
|
|
149
|
+
|
|
150
|
+
fill: rgb(var(--label-blue-04));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.fill-label-green-04{
|
|
154
|
+
|
|
155
|
+
fill: rgb(var(--label-green-04));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.fill-label-lime-04{
|
|
159
|
+
|
|
160
|
+
fill: rgb(var(--label-lime-04));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.fill-label-orange-04{
|
|
164
|
+
|
|
165
|
+
fill: rgb(var(--label-orange-04));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.fill-label-orchid-04{
|
|
169
|
+
|
|
170
|
+
fill: rgb(var(--label-orchid-04));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.fill-label-violet-04{
|
|
174
|
+
|
|
175
|
+
fill: rgb(var(--label-violet-04));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.fill-label-yellow-04{
|
|
179
|
+
|
|
180
|
+
fill: rgb(var(--label-yellow-04));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.fill-tone-neutral-04{
|
|
184
|
+
|
|
185
|
+
fill: rgb(var(--tone-neutral-04));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.text-label-amaranth-04{
|
|
189
|
+
|
|
190
|
+
--tw-text-opacity: 1;
|
|
191
|
+
|
|
192
|
+
color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.text-label-aqua-04{
|
|
196
|
+
|
|
197
|
+
--tw-text-opacity: 1;
|
|
198
|
+
|
|
199
|
+
color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.text-label-blue-04{
|
|
203
|
+
|
|
204
|
+
--tw-text-opacity: 1;
|
|
205
|
+
|
|
206
|
+
color: rgb(var(--label-blue-04) / var(--tw-text-opacity));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.text-label-green-04{
|
|
210
|
+
|
|
211
|
+
--tw-text-opacity: 1;
|
|
212
|
+
|
|
213
|
+
color: rgb(var(--label-green-04) / var(--tw-text-opacity));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.text-label-lime-04{
|
|
217
|
+
|
|
218
|
+
--tw-text-opacity: 1;
|
|
219
|
+
|
|
220
|
+
color: rgb(var(--label-lime-04) / var(--tw-text-opacity));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.text-label-orange-04{
|
|
224
|
+
|
|
225
|
+
--tw-text-opacity: 1;
|
|
226
|
+
|
|
227
|
+
color: rgb(var(--label-orange-04) / var(--tw-text-opacity));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.text-label-orchid-04{
|
|
231
|
+
|
|
232
|
+
--tw-text-opacity: 1;
|
|
233
|
+
|
|
234
|
+
color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.text-label-violet-04{
|
|
238
|
+
|
|
239
|
+
--tw-text-opacity: 1;
|
|
240
|
+
|
|
241
|
+
color: rgb(var(--label-violet-04) / var(--tw-text-opacity));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.text-label-yellow-04{
|
|
245
|
+
|
|
246
|
+
--tw-text-opacity: 1;
|
|
247
|
+
|
|
248
|
+
color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.text-tone-neutral-04{
|
|
252
|
+
|
|
253
|
+
--tw-text-opacity: 1;
|
|
64
254
|
|
|
65
|
-
|
|
255
|
+
color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));
|
|
66
256
|
}
|
|
67
257
|
|
|
68
258
|
.shadow{
|