@maggioli-design-system/mds-accordion-timer-item 3.6.3 → 3.7.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-3f08e534.js → index-8c0e2a15.js} +22 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-accordion-timer-item.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-accordion-timer-item/mds-accordion-timer-item.css +124 -4
- package/dist/collection/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.js +3 -3
- 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-accordion-timer-item.js +1 -1
- package/dist/documentation.d.ts +1 -21
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-f19cd1cd.js → index-fc4ad4eb.js} +22 -14
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-accordion-timer-item.entry.js +2 -2
- package/dist/esm/mds-accordion-timer-item.js +3 -3
- package/dist/esm-es5/index-fc4ad4eb.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer-item.js +1 -1
- package/dist/mds-accordion-timer-item/mds-accordion-timer-item.esm.js +1 -1
- package/dist/mds-accordion-timer-item/mds-accordion-timer-item.js +1 -1
- package/dist/mds-accordion-timer-item/p-7700d179.js +2 -0
- package/dist/mds-accordion-timer-item/p-7a002faf.entry.js +1 -0
- package/dist/mds-accordion-timer-item/p-b5e64a55.system.js +2 -0
- package/dist/mds-accordion-timer-item/p-c76b32a8.system.entry.js +1 -0
- package/dist/mds-accordion-timer-item/{p-651ad9a5.system.js → p-ce1e3ef1.system.js} +1 -1
- 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/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.d.ts +1 -1
- 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 +47 -12
- package/package.json +5 -5
- 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/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.tsx +3 -3
- 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-accordion-timer-item.esm.js +1 -1
- package/www/build/mds-accordion-timer-item.js +1 -1
- package/www/build/p-7700d179.js +2 -0
- package/www/build/p-7a002faf.entry.js +1 -0
- package/www/build/p-b5e64a55.system.js +2 -0
- package/www/build/p-c76b32a8.system.entry.js +1 -0
- package/www/build/{p-651ad9a5.system.js → p-ce1e3ef1.system.js} +1 -1
- package/dist/esm-es5/index-f19cd1cd.js +0 -1
- package/dist/mds-accordion-timer-item/p-1e2aba26.entry.js +0 -1
- package/dist/mds-accordion-timer-item/p-45efdd90.system.entry.js +0 -1
- package/dist/mds-accordion-timer-item/p-477aad5a.system.js +0 -2
- package/dist/mds-accordion-timer-item/p-a71f8ebc.js +0 -2
- package/www/build/p-1e2aba26.entry.js +0 -1
- package/www/build/p-45efdd90.system.entry.js +0 -1
- package/www/build/p-477aad5a.system.js +0 -2
- package/www/build/p-a71f8ebc.js +0 -2
|
@@ -525,6 +525,9 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
+
// This needs to always happen so we can hide nodes that are projected
|
|
529
|
+
// to another component but don't end up in a slot
|
|
530
|
+
elm['s-hn'] = hostTagName;
|
|
528
531
|
return elm;
|
|
529
532
|
};
|
|
530
533
|
/**
|
|
@@ -648,8 +651,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
648
651
|
* @param oldCh the old children of the parent node
|
|
649
652
|
* @param newVNode the new VNode which will replace the parent
|
|
650
653
|
* @param newCh the new children of the parent node
|
|
654
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
651
655
|
*/
|
|
652
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
656
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
653
657
|
let oldStartIdx = 0;
|
|
654
658
|
let newStartIdx = 0;
|
|
655
659
|
let oldEndIdx = oldCh.length - 1;
|
|
@@ -673,25 +677,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
673
677
|
else if (newEndVnode == null) {
|
|
674
678
|
newEndVnode = newCh[--newEndIdx];
|
|
675
679
|
}
|
|
676
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
680
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
677
681
|
// if the start nodes are the same then we should patch the new VNode
|
|
678
682
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
679
683
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
680
684
|
// since things are matched up in order.
|
|
681
|
-
patch(oldStartVnode, newStartVnode);
|
|
685
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
682
686
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
683
687
|
newStartVnode = newCh[++newStartIdx];
|
|
684
688
|
}
|
|
685
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
689
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
686
690
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
687
691
|
// decrement our end indices, and also likewise in this case we don't
|
|
688
692
|
// need to move any DOM Nodes.
|
|
689
|
-
patch(oldEndVnode, newEndVnode);
|
|
693
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
690
694
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
691
695
|
newEndVnode = newCh[--newEndIdx];
|
|
692
696
|
}
|
|
693
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
694
|
-
patch(oldStartVnode, newEndVnode);
|
|
697
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
698
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
695
699
|
// We need to move the element for `oldStartVnode` into a position which
|
|
696
700
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
697
701
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -713,8 +717,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
713
717
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
714
718
|
newEndVnode = newCh[--newEndIdx];
|
|
715
719
|
}
|
|
716
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
717
|
-
patch(oldEndVnode, newStartVnode);
|
|
720
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
721
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
718
722
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
719
723
|
// the same node, so since we're here we know that they are not. Thus we
|
|
720
724
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -768,9 +772,10 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
768
772
|
*
|
|
769
773
|
* @param leftVNode the first VNode to check
|
|
770
774
|
* @param rightVNode the second VNode to check
|
|
775
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
771
776
|
* @returns whether they're equal or not
|
|
772
777
|
*/
|
|
773
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
778
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
774
779
|
// compare if two vnode to see if they're "technically" the same
|
|
775
780
|
// need to have the same element tag, and same key to be the same
|
|
776
781
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
@@ -785,8 +790,9 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
785
790
|
*
|
|
786
791
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
787
792
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
793
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
788
794
|
*/
|
|
789
|
-
const patch = (oldVNode, newVNode) => {
|
|
795
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
790
796
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
791
797
|
const oldChildren = oldVNode.$children$;
|
|
792
798
|
const newChildren = newVNode.$children$;
|
|
@@ -806,7 +812,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
806
812
|
if (oldChildren !== null && newChildren !== null) {
|
|
807
813
|
// looks like there's child vnodes for both the old and new vnodes
|
|
808
814
|
// so we need to call `updateChildren` to reconcile them
|
|
809
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
815
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
810
816
|
}
|
|
811
817
|
else if (newChildren !== null) {
|
|
812
818
|
// no old child vnodes, but there are new child vnodes to add
|
|
@@ -885,7 +891,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
885
891
|
scopeId = hostElm['s-sc'];
|
|
886
892
|
}
|
|
887
893
|
// synchronous patch
|
|
888
|
-
patch(oldVNode, rootVnode);
|
|
894
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
889
895
|
};
|
|
890
896
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
891
897
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
@@ -1492,12 +1498,14 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1492
1498
|
// If we have styles, add them to the DOM
|
|
1493
1499
|
if (dataStyles.innerHTML.length) {
|
|
1494
1500
|
dataStyles.setAttribute('data-styles', '');
|
|
1495
|
-
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1496
1501
|
// Apply CSP nonce to the style tag if it exists
|
|
1497
1502
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1498
1503
|
if (nonce != null) {
|
|
1499
1504
|
dataStyles.setAttribute('nonce', nonce);
|
|
1500
1505
|
}
|
|
1506
|
+
// Insert the styles into the document head
|
|
1507
|
+
// NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
|
|
1508
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1501
1509
|
}
|
|
1502
1510
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1503
1511
|
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-8c0e2a15.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-8c0e2a15.js');
|
|
6
6
|
|
|
7
|
-
const mdsAccordionTimerItemCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@tailwind components; .focus-bounce{-webkit-animation-duration:var(--magma-outline-animation-duration, 1s);animation-duration:var(--magma-outline-animation-duration, 1s);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:focus-bounce;animation-name:focus-bounce;-webkit-animation-play-state:paused;animation-play-state:paused;-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);outline:var(--magma-outline-blur);-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-bounce--focused,.focus-bounce:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}.fixed{position:fixed}.absolute{position:absolute}.contents{display:contents}.border{border-width:1px}.text{
|
|
7
|
+
const mdsAccordionTimerItemCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; .focus-bounce{-webkit-animation-duration:var(--magma-outline-animation-duration, 1s);animation-duration:var(--magma-outline-animation-duration, 1s);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:focus-bounce;animation-name:focus-bounce;-webkit-animation-play-state:paused;animation-play-state:paused;-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);outline:var(--magma-outline-blur);-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-bounce--focused,.focus-bounce:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1/1;height:100%;width:100%}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.contents{display:contents}.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{--mds-accordion-timer-item-progress-bar-color:var(--mds-accordion-timer-progress-bar-color, rgb(var(--tone-neutral-03)));--mds-accordion-timer-item-progress-bar-background:var(--mds-accordion-timer-progress-bar-background, rgb(var(--tone-neutral-08)));--mds-accordion-timer-item-progress-bar-thickness:var(--mds-accordion-timer-progress-bar-thickness, 0.25rem);--mds-accordion-timer-item-duration:var(--mds-accordion-timer-duration, 500ms);padding-top:1rem;padding-bottom:1rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);color:var(--mds-accordion-timer-item-color, rgb(var(--tone-neutral-02)));display:grid;position:relative}.row{gap:1rem;display:-ms-flexbox;display:flex}.accordion{display:grid}.progress-bar{--mds-progress-color:var(--mds-accordion-timer-item-progress-bar-color);--mds-progress-background:var(--mds-accordion-timer-item-progress-bar-background);--mds-progress-thickness:var(--mds-accordion-timer-item-progress-bar-thickness);-ms-flex-negative:0;flex-shrink:0}.action{border-radius:0.75rem;background-color:transparent;border:0;cursor:pointer;padding:0;text-align:left}:host([selected]) .action{cursor:auto}.contents{gap:1rem;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);display:grid;grid-template-rows:0fr;min-height:0;opacity:0;overflow:hidden;padding-top:0;-webkit-transition-duration:var(--mds-accordion-timer-item-duration);transition-duration:var(--mds-accordion-timer-item-duration);-webkit-transition-property:grid-template-rows opacity padding;transition-property:grid-template-rows opacity padding;transition-property:grid-template-rows opacity padding, -ms-grid-rows opacity padding}.contents-expander{min-height:0}:host([selected]) .contents{padding-top:1rem;opacity:1;grid-template-rows:1fr}";
|
|
8
8
|
|
|
9
9
|
const MdsAccordionTimerItem = 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-8c0e2a15.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-accordion-timer-item.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
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@keyframes focus-bounce {
|
|
2
2
|
0%, 75%, 100% {
|
|
3
|
-
outline-offset: var(--magma-outline-focus-offset);
|
|
3
|
+
outline-offset: var(--magma-outline-focus-offset, 6px);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
50% {
|
|
7
|
-
outline-offset: var(--magma-outline-blur-offset);
|
|
7
|
+
outline-offset: var(--magma-outline-blur-offset, 2px);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/* included for focus effect */
|
|
@@ -30,6 +30,19 @@
|
|
|
30
30
|
|
|
31
31
|
animation-play-state: running;
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
.svg {
|
|
35
|
+
display: flex;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.svg svg {
|
|
39
|
+
aspect-ratio: 1/1;
|
|
40
|
+
height: 100%;
|
|
41
|
+
width: 100%;
|
|
42
|
+
}
|
|
43
|
+
.static {
|
|
44
|
+
position: static;
|
|
45
|
+
}
|
|
33
46
|
.fixed {
|
|
34
47
|
position: fixed;
|
|
35
48
|
}
|
|
@@ -42,8 +55,115 @@
|
|
|
42
55
|
.border {
|
|
43
56
|
border-width: 1px;
|
|
44
57
|
}
|
|
45
|
-
.
|
|
46
|
-
|
|
58
|
+
.bg-label-amaranth-10 {
|
|
59
|
+
--tw-bg-opacity: 1;
|
|
60
|
+
background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));
|
|
61
|
+
}
|
|
62
|
+
.bg-label-aqua-10 {
|
|
63
|
+
--tw-bg-opacity: 1;
|
|
64
|
+
background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));
|
|
65
|
+
}
|
|
66
|
+
.bg-label-blue-10 {
|
|
67
|
+
--tw-bg-opacity: 1;
|
|
68
|
+
background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));
|
|
69
|
+
}
|
|
70
|
+
.bg-label-green-10 {
|
|
71
|
+
--tw-bg-opacity: 1;
|
|
72
|
+
background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));
|
|
73
|
+
}
|
|
74
|
+
.bg-label-lime-10 {
|
|
75
|
+
--tw-bg-opacity: 1;
|
|
76
|
+
background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));
|
|
77
|
+
}
|
|
78
|
+
.bg-label-orange-10 {
|
|
79
|
+
--tw-bg-opacity: 1;
|
|
80
|
+
background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));
|
|
81
|
+
}
|
|
82
|
+
.bg-label-orchid-10 {
|
|
83
|
+
--tw-bg-opacity: 1;
|
|
84
|
+
background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));
|
|
85
|
+
}
|
|
86
|
+
.bg-label-violet-10 {
|
|
87
|
+
--tw-bg-opacity: 1;
|
|
88
|
+
background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));
|
|
89
|
+
}
|
|
90
|
+
.bg-label-yellow-10 {
|
|
91
|
+
--tw-bg-opacity: 1;
|
|
92
|
+
background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));
|
|
93
|
+
}
|
|
94
|
+
.bg-tone-neutral-10 {
|
|
95
|
+
--tw-bg-opacity: 1;
|
|
96
|
+
background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));
|
|
97
|
+
}
|
|
98
|
+
.fill-label-amaranth-04 {
|
|
99
|
+
fill: rgb(var(--label-amaranth-04));
|
|
100
|
+
}
|
|
101
|
+
.fill-label-aqua-04 {
|
|
102
|
+
fill: rgb(var(--label-aqua-04));
|
|
103
|
+
}
|
|
104
|
+
.fill-label-blue-04 {
|
|
105
|
+
fill: rgb(var(--label-blue-04));
|
|
106
|
+
}
|
|
107
|
+
.fill-label-green-04 {
|
|
108
|
+
fill: rgb(var(--label-green-04));
|
|
109
|
+
}
|
|
110
|
+
.fill-label-lime-04 {
|
|
111
|
+
fill: rgb(var(--label-lime-04));
|
|
112
|
+
}
|
|
113
|
+
.fill-label-orange-04 {
|
|
114
|
+
fill: rgb(var(--label-orange-04));
|
|
115
|
+
}
|
|
116
|
+
.fill-label-orchid-04 {
|
|
117
|
+
fill: rgb(var(--label-orchid-04));
|
|
118
|
+
}
|
|
119
|
+
.fill-label-violet-04 {
|
|
120
|
+
fill: rgb(var(--label-violet-04));
|
|
121
|
+
}
|
|
122
|
+
.fill-label-yellow-04 {
|
|
123
|
+
fill: rgb(var(--label-yellow-04));
|
|
124
|
+
}
|
|
125
|
+
.fill-tone-neutral-04 {
|
|
126
|
+
fill: rgb(var(--tone-neutral-04));
|
|
127
|
+
}
|
|
128
|
+
.text-label-amaranth-04 {
|
|
129
|
+
--tw-text-opacity: 1;
|
|
130
|
+
color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));
|
|
131
|
+
}
|
|
132
|
+
.text-label-aqua-04 {
|
|
133
|
+
--tw-text-opacity: 1;
|
|
134
|
+
color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));
|
|
135
|
+
}
|
|
136
|
+
.text-label-blue-04 {
|
|
137
|
+
--tw-text-opacity: 1;
|
|
138
|
+
color: rgb(var(--label-blue-04) / var(--tw-text-opacity));
|
|
139
|
+
}
|
|
140
|
+
.text-label-green-04 {
|
|
141
|
+
--tw-text-opacity: 1;
|
|
142
|
+
color: rgb(var(--label-green-04) / var(--tw-text-opacity));
|
|
143
|
+
}
|
|
144
|
+
.text-label-lime-04 {
|
|
145
|
+
--tw-text-opacity: 1;
|
|
146
|
+
color: rgb(var(--label-lime-04) / var(--tw-text-opacity));
|
|
147
|
+
}
|
|
148
|
+
.text-label-orange-04 {
|
|
149
|
+
--tw-text-opacity: 1;
|
|
150
|
+
color: rgb(var(--label-orange-04) / var(--tw-text-opacity));
|
|
151
|
+
}
|
|
152
|
+
.text-label-orchid-04 {
|
|
153
|
+
--tw-text-opacity: 1;
|
|
154
|
+
color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));
|
|
155
|
+
}
|
|
156
|
+
.text-label-violet-04 {
|
|
157
|
+
--tw-text-opacity: 1;
|
|
158
|
+
color: rgb(var(--label-violet-04) / var(--tw-text-opacity));
|
|
159
|
+
}
|
|
160
|
+
.text-label-yellow-04 {
|
|
161
|
+
--tw-text-opacity: 1;
|
|
162
|
+
color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));
|
|
163
|
+
}
|
|
164
|
+
.text-tone-neutral-04 {
|
|
165
|
+
--tw-text-opacity: 1;
|
|
166
|
+
color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));
|
|
47
167
|
}
|
|
48
168
|
.shadow {
|
|
49
169
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
package/dist/collection/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.js
CHANGED
|
@@ -30,8 +30,8 @@ export const Default = Template.bind({});
|
|
|
30
30
|
Default.args = {
|
|
31
31
|
description: 'Blipbug',
|
|
32
32
|
};
|
|
33
|
-
export const
|
|
34
|
-
|
|
33
|
+
export const Selected = Template.bind({});
|
|
34
|
+
Selected.args = {
|
|
35
35
|
selected: true,
|
|
36
36
|
description: 'Blipbug',
|
|
37
37
|
};
|
|
@@ -42,5 +42,5 @@ Progress.args = {
|
|
|
42
42
|
progress: 0.5,
|
|
43
43
|
};
|
|
44
44
|
Default.story = lokiDisabled;
|
|
45
|
-
|
|
45
|
+
Selected.story = lokiDisabled;
|
|
46
46
|
Progress.story = lokiDisabled;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const fileExtensionsDictionary = {
|
|
2
|
+
'7z': { format: 'archive', description: 'Archivio compresso' },
|
|
3
|
+
ace: { format: 'archive', description: 'Archivio compresso' },
|
|
4
|
+
ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
5
|
+
dart: { format: 'code', description: 'Dart' },
|
|
6
|
+
db: { format: 'data', description: 'File di database' },
|
|
7
|
+
default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
8
|
+
dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
9
|
+
doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
10
|
+
docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
11
|
+
docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
12
|
+
eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
13
|
+
eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
14
|
+
exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
15
|
+
flac: { format: 'audio', description: 'Audio non compresso' },
|
|
16
|
+
gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
17
|
+
htm: { format: 'markup', description: 'Pagina web' },
|
|
18
|
+
heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
19
|
+
html: { format: 'markup', description: 'Pagina web' },
|
|
20
|
+
jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
21
|
+
jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
22
|
+
jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
23
|
+
js: { format: 'code', description: 'JavaScript' },
|
|
24
|
+
json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
25
|
+
jsx: { format: 'code', description: 'JavaScript' },
|
|
26
|
+
m2v: { format: 'video', description: 'Filmato SD' },
|
|
27
|
+
mp2: { format: 'audio', description: 'Audio compresso' },
|
|
28
|
+
mp3: { format: 'audio', description: 'Audio compresso' },
|
|
29
|
+
mp4: { format: 'video', description: 'Filmato HD' },
|
|
30
|
+
mp4v: { format: 'video', description: 'Filmato HD' },
|
|
31
|
+
mpeg: { format: 'video', description: 'Filmato SD' },
|
|
32
|
+
mpg4: { format: 'video', description: 'Filmato SD' },
|
|
33
|
+
mpg: { format: 'video', description: 'Filmato SD' },
|
|
34
|
+
mpga: { format: 'audio', description: 'Audio compresso' },
|
|
35
|
+
odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
36
|
+
ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
37
|
+
odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
38
|
+
pdf: { format: 'document', description: 'Documento Adobe' },
|
|
39
|
+
php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
40
|
+
png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
41
|
+
ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
42
|
+
rar: { format: 'archive', description: 'Archivio compresso' },
|
|
43
|
+
rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
44
|
+
sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
45
|
+
shtml: { format: 'markup', description: 'Pagina web' },
|
|
46
|
+
svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
47
|
+
tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
48
|
+
tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
49
|
+
ts: { format: 'code', description: 'TypeScript' },
|
|
50
|
+
tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
51
|
+
txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
52
|
+
wav: { format: 'audio', description: 'Audio non compresso' },
|
|
53
|
+
webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
54
|
+
xar: { format: 'archive', description: 'Archivio compresso' },
|
|
55
|
+
xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
56
|
+
xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
57
|
+
zip: { format: 'archive', description: 'Archivio compresso' },
|
|
58
|
+
};
|
|
59
|
+
const genericMimeToExt = new Map([
|
|
60
|
+
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
61
|
+
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|
|
62
|
+
['video', ['.mv2', '.mp4', '.mp4v', '.mpeg', '.mpg4', '.mpg']],
|
|
63
|
+
]);
|
|
64
|
+
export { fileExtensionsDictionary, genericMimeToExt, };
|
|
@@ -2,4 +2,9 @@ import jsonIconsDictionary from "../fixtures/icons.json";
|
|
|
2
2
|
import jsonMggIconsDictionary from "../fixtures/iconsauce.json";
|
|
3
3
|
const iconsDictionary = jsonIconsDictionary;
|
|
4
4
|
const mggIconsDictionary = jsonMggIconsDictionary;
|
|
5
|
-
|
|
5
|
+
const svgIconsDictionary = [
|
|
6
|
+
`${location.origin}/svg/mi/baseline/email.svg`,
|
|
7
|
+
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Im0yMzMtODAgNjUtMjgxTDgwLTU1MGwyODgtMjUgMTEyLTI2NSAxMTIgMjY1IDI4OCAyNS0yMTggMTg5IDY1IDI4MS0yNDctMTQ5TDIzMy04MFoiLz48L3N2Zz4=',
|
|
8
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6s-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8s-3.58-8-8-8z"/></svg>',
|
|
9
|
+
];
|
|
10
|
+
export { iconsDictionary, mggIconsDictionary, svgIconsDictionary, };
|