@maggioli-design-system/mds-accordion-timer-item 1.0.0 → 1.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.
- package/dist/cjs/{index-2ee34dd7.js → index-12f10871.js} +33 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-accordion-timer-item.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.css +17 -5
- package/dist/collection/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.js +27 -28
- package/dist/collection/dictionary/floating-ui.js +19 -0
- package/dist/collection/dictionary/icon.js +2 -2
- package/dist/collection/dictionary/typography.js +7 -1
- package/dist/collection/dictionary/variant.js +1 -0
- package/dist/collection/types/floating-ui.js +1 -0
- package/dist/{custom-elements → components}/index.d.ts +2 -21
- package/dist/components/index.js +1 -0
- package/dist/components/mds-accordion-timer-item.d.ts +11 -0
- package/dist/components/mds-accordion-timer-item.js +121 -0
- package/dist/esm/{index-4339770f.js → index-e1bd79fc.js} +33 -5
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-accordion-timer-item.entry.js +3 -3
- package/dist/esm/mds-accordion-timer-item.js +2 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/index-e1bd79fc.js +2 -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-c7b8cf9d.system.js → p-0a14f155.system.js} +1 -1
- package/dist/mds-accordion-timer-item/p-13669e01.js +2 -0
- package/dist/mds-accordion-timer-item/p-4aec1fdb.system.js +2 -0
- package/dist/mds-accordion-timer-item/p-bcfc5555.system.entry.js +1 -0
- package/dist/mds-accordion-timer-item/p-be90eb6c.entry.js +1 -0
- package/dist/stats.json +50 -40
- package/dist/types/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.d.ts +43 -0
- package/dist/types/components.d.ts +7 -3
- package/dist/types/dictionary/floating-ui.d.ts +3 -0
- package/dist/types/dictionary/typography.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/types/floating-ui.d.ts +2 -0
- package/dist/types/types/typography.d.ts +3 -2
- package/dist/types/types/variant.d.ts +1 -1
- package/package.json +10 -9
- package/src/components/mds-accordion-timer-item/.gitlab-ci.yml +19 -0
- package/src/components/mds-accordion-timer-item/mds-accordion-timer-item.css +1 -1
- package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.e2e.ts +2 -1
- package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.spec.tsx +8 -7
- package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.tsx +57 -0
- package/src/components.d.ts +7 -3
- package/src/dictionary/floating-ui.ts +25 -0
- package/src/dictionary/icon.ts +2 -2
- package/src/dictionary/typography.ts +8 -0
- package/src/dictionary/variant.ts +1 -0
- package/src/fixtures/icons.json +64 -0
- package/src/tailwind/components.css +14 -0
- package/src/types/floating-ui.ts +17 -0
- package/src/types/typography.ts +6 -0
- package/src/types/variant.ts +2 -1
- 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-c7b8cf9d.system.js → p-0a14f155.system.js} +1 -1
- package/www/build/p-13669e01.js +2 -0
- package/www/build/p-4aec1fdb.system.js +2 -0
- package/www/build/p-bcfc5555.system.entry.js +1 -0
- package/www/build/p-be90eb6c.entry.js +1 -0
- package/dist/custom-elements/index.js +0 -112
- package/dist/esm-es5/index-4339770f.js +0 -1
- package/dist/mds-accordion-timer-item/p-08901cb1.entry.js +0 -1
- package/dist/mds-accordion-timer-item/p-7e30d5f8.js +0 -1
- package/dist/mds-accordion-timer-item/p-9b9f6cb9.system.js +0 -1
- package/dist/mds-accordion-timer-item/p-d8623772.system.entry.js +0 -1
- package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.js +0 -49
- package/www/build/p-08901cb1.entry.js +0 -1
- package/www/build/p-7e30d5f8.js +0 -1
- package/www/build/p-9b9f6cb9.system.js +0 -1
- package/www/build/p-d8623772.system.entry.js +0 -1
|
@@ -76,7 +76,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
76
76
|
};
|
|
77
77
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
78
78
|
let scopeId = getScopeId(cmpMeta);
|
|
79
|
-
|
|
79
|
+
const style = styles.get(scopeId);
|
|
80
80
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
81
81
|
// so the fallback is to always use the document for the root node in those cases
|
|
82
82
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -156,7 +156,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
156
156
|
let child = null;
|
|
157
157
|
let simple = false;
|
|
158
158
|
let lastSimple = false;
|
|
159
|
-
|
|
159
|
+
const vNodeChildren = [];
|
|
160
160
|
const walk = (c) => {
|
|
161
161
|
for (let i = 0; i < c.length; i++) {
|
|
162
162
|
child = c[i];
|
|
@@ -279,7 +279,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
279
279
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
280
280
|
try {
|
|
281
281
|
if (!elm.tagName.includes('-')) {
|
|
282
|
-
|
|
282
|
+
const n = newValue == null ? '' : newValue;
|
|
283
283
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
284
284
|
if (memberName === 'list') {
|
|
285
285
|
isProp = false;
|
|
@@ -336,7 +336,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
336
336
|
};
|
|
337
337
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
338
338
|
// tslint:disable-next-line: prefer-const
|
|
339
|
-
|
|
339
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
340
340
|
let i = 0;
|
|
341
341
|
let elm;
|
|
342
342
|
let childNode;
|
|
@@ -711,6 +711,29 @@ const then = (promise, thenFn) => {
|
|
|
711
711
|
};
|
|
712
712
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
713
713
|
;
|
|
714
|
+
/**
|
|
715
|
+
* Parse a new property value for a given property type.
|
|
716
|
+
*
|
|
717
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
718
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
719
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
720
|
+
* 2. the type stored from `propType`.
|
|
721
|
+
*
|
|
722
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
723
|
+
*
|
|
724
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
725
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
726
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
727
|
+
* ```tsx
|
|
728
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
729
|
+
* ```
|
|
730
|
+
*
|
|
731
|
+
* HTML prop values on the other hand, will always a string
|
|
732
|
+
*
|
|
733
|
+
* @param propValue the new value to coerce to some type
|
|
734
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
735
|
+
* @returns the parsed/coerced value
|
|
736
|
+
*/
|
|
714
737
|
const parsePropertyValue = (propValue, propType) => {
|
|
715
738
|
// ensure this value is of the correct prop type
|
|
716
739
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -744,7 +767,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
744
767
|
const flags = hostRef.$flags$;
|
|
745
768
|
const instance = hostRef.$lazyInstance$ ;
|
|
746
769
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
747
|
-
|
|
770
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
771
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
772
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
773
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
748
774
|
// gadzooks! the property's value has changed!!
|
|
749
775
|
// set our new value!
|
|
750
776
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
@@ -1117,7 +1143,9 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1117
1143
|
if (module) {
|
|
1118
1144
|
return module[exportName];
|
|
1119
1145
|
}
|
|
1146
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1120
1147
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1148
|
+
/* @vite-ignore */
|
|
1121
1149
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1122
1150
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1123
1151
|
/* webpackMode: "lazy" */
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-12f10871.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.16.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -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-12f10871.js');
|
|
6
6
|
|
|
7
7
|
function toVal(mix) {
|
|
8
8
|
var k, y, str='';
|
|
@@ -45,9 +45,9 @@ function clsx () {
|
|
|
45
45
|
return str;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const mdsAccordionTimerItemCss = ".contents{display:contents}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0
|
|
48
|
+
const mdsAccordionTimerItemCss = ".fixed{position:fixed}.absolute{position:absolute}.contents{display:contents}.border{border-width:1px}.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{position:relative;display:grid;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(--color, rgb(var(--adjust-tone-02)))}:host(:hover:not(.active)) .progress-bar{--background-active:rgb(var(--adjust-tone-07))}.row{display:-ms-flexbox;display:flex;gap:1rem}.accordion{display:grid}.progress-bar{-ms-flex-negative:0;flex-shrink:0;--thickness:0.25rem}.header{cursor:pointer}:host(.active) .header{cursor:auto}.contents{display:grid;height:0px;gap:1rem;overflow:hidden;padding-top:0px;opacity:0;-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:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.25, 0.46, 0.45, 0.94);transition-timing-function:cubic-bezier(0.25, 0.46, 0.45, 0.94)}.contents--opened{height:auto;padding-top:1rem;opacity:1}";
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
const MdsAccordionTimerItem = class {
|
|
51
51
|
constructor(hostRef) {
|
|
52
52
|
index.registerInstance(this, hostRef);
|
|
53
53
|
this.clickActive = index.createEvent(this, "clickActive", 7);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-12f10871.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
6
|
+
Stencil Client Patch Browser v2.16.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
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));
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
.fixed {
|
|
2
|
+
|
|
3
|
+
position: fixed;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.absolute {
|
|
7
|
+
|
|
8
|
+
position: absolute;
|
|
9
|
+
}
|
|
10
|
+
|
|
1
11
|
.contents {
|
|
2
12
|
|
|
3
13
|
display: contents;
|
|
@@ -10,7 +20,9 @@
|
|
|
10
20
|
|
|
11
21
|
.shadow {
|
|
12
22
|
|
|
13
|
-
--tw-shadow: 0 1px 3px 0
|
|
23
|
+
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
24
|
+
|
|
25
|
+
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
14
26
|
|
|
15
27
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
16
28
|
}
|
|
@@ -31,9 +43,9 @@
|
|
|
31
43
|
|
|
32
44
|
padding-bottom: 1rem;
|
|
33
45
|
|
|
34
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
46
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
35
47
|
|
|
36
|
-
transition-
|
|
48
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
37
49
|
|
|
38
50
|
transition-duration: 500ms;
|
|
39
51
|
|
|
@@ -90,9 +102,9 @@
|
|
|
90
102
|
|
|
91
103
|
opacity: 0;
|
|
92
104
|
|
|
93
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
105
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
94
106
|
|
|
95
|
-
transition-
|
|
107
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
108
|
|
|
97
109
|
transition-duration: 300ms;
|
|
98
110
|
|
package/dist/collection/components/mds-accordion-timer-item/test/mds-accordion-timer-item.stories.js
CHANGED
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import faker from 'faker'
|
|
5
|
-
|
|
1
|
+
import { typographyPrimaryDictionary } from '@dictionary/typography';
|
|
2
|
+
import { h } from '@stencil/core';
|
|
3
|
+
import { lokiDisabled } from '@test/loki-disabled';
|
|
6
4
|
export default {
|
|
7
5
|
title: 'UI / Accordion Timer / Accordion Timer Item',
|
|
8
|
-
component: MdsAccordionTimerItem,
|
|
9
6
|
argTypes: {
|
|
10
7
|
description: {
|
|
11
|
-
type: { name: 'string'
|
|
8
|
+
type: { name: 'string' },
|
|
12
9
|
description: 'Specifies the title shown when the accordion is closed or opened',
|
|
13
10
|
},
|
|
14
11
|
active: {
|
|
15
|
-
type: { name: 'boolean'
|
|
12
|
+
type: { name: 'boolean' },
|
|
16
13
|
description: 'Specifies if the accordion item is opened or not',
|
|
17
14
|
},
|
|
18
15
|
progress: {
|
|
19
16
|
control: { type: 'range', step: 0.01, min: 0, max: 1 },
|
|
20
|
-
type: { name: 'number'
|
|
17
|
+
type: { name: 'number' },
|
|
21
18
|
description: 'A value between 0 and 100 that rapresents the status progress',
|
|
22
19
|
},
|
|
23
20
|
typography: {
|
|
24
|
-
type: { name: 'string'
|
|
21
|
+
type: { name: 'string' },
|
|
25
22
|
description: 'Specifies the typography of the element',
|
|
26
23
|
options: typographyPrimaryDictionary,
|
|
27
24
|
control: { type: 'select' },
|
|
28
25
|
},
|
|
29
26
|
},
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<mds-text typography="paragraph" class="text-adjust-tone-08">{ faker.lorem.paragraphs(2) }</mds-text>
|
|
36
|
-
</mds-accordion-timer-item>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
export const Default = Template.bind({})
|
|
27
|
+
};
|
|
28
|
+
const Template = args => h("div", null,
|
|
29
|
+
h("mds-accordion-timer-item", Object.assign({}, args),
|
|
30
|
+
h("mds-text", null, "Blipbug presenta delle fattezze riconducibili agli insetti nello stadio pre-crisalide. Il suo corpo si sviluppa in lunghezza, ed \u00E8 formato principalmente da tre parti: la sua grande testa, il suo collo (molto simile ad un collare), e il corpo vero e proprio. La prima di queste \u00E8 suddivisa in una parte color crema e una parte color denim; dello stesso colore sono le appenidici a forma di \"V\" che si trovano sopra e ai lati della testa. I suoi occhi sono enormi e grigi, ed hanno delle sottilissime sopracciglia sopra di essi. Il suo \"collare\", anch'esso color denim, presenta delle \"setole\" giallo sabbia, con le quali percepisce i segnali esterni: stesso colore si presenta nel segmento centrale della sua parte inferiore, dove sono presenti un primo paio di zampe crema. Il segmento superiore del corpo \u00E8 bianco e ospita delle zampe anteriori color crema, ed infine, la parte finale, o la \"coda\", \u00E8 color denim e finisce con un'appendice a \"V\" un po' pi\u00FA grossa.")));
|
|
31
|
+
export const Default = Template.bind({});
|
|
40
32
|
Default.args = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const active = Template.bind({})
|
|
46
|
-
active.args = {
|
|
33
|
+
description: 'Blipbug',
|
|
34
|
+
};
|
|
35
|
+
export const Active = Template.bind({});
|
|
36
|
+
Active.args = {
|
|
47
37
|
active: true,
|
|
48
|
-
description: '
|
|
49
|
-
}
|
|
38
|
+
description: 'Blipbug',
|
|
39
|
+
};
|
|
40
|
+
export const Progress = Template.bind({});
|
|
41
|
+
Progress.args = {
|
|
42
|
+
active: true,
|
|
43
|
+
description: 'Blipbug',
|
|
44
|
+
progress: 0.5,
|
|
45
|
+
};
|
|
46
|
+
Default.story = lokiDisabled;
|
|
47
|
+
Active.story = lokiDisabled;
|
|
48
|
+
Progress.story = lokiDisabled;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const floatingUIPlacementDictionary = [
|
|
2
|
+
'bottom',
|
|
3
|
+
'bottom-end',
|
|
4
|
+
'bottom-start',
|
|
5
|
+
'left',
|
|
6
|
+
'left-end',
|
|
7
|
+
'left-start',
|
|
8
|
+
'right',
|
|
9
|
+
'right-end',
|
|
10
|
+
'right-start',
|
|
11
|
+
'top',
|
|
12
|
+
'top-end',
|
|
13
|
+
'top-start',
|
|
14
|
+
];
|
|
15
|
+
const floatingUIStrategyDictionary = [
|
|
16
|
+
'absolute',
|
|
17
|
+
'fixed',
|
|
18
|
+
];
|
|
19
|
+
export { floatingUIPlacementDictionary, floatingUIStrategyDictionary, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const iconsDictionary =
|
|
1
|
+
import jsonIconsDictionary from '../fixtures/icons.json';
|
|
2
|
+
const iconsDictionary = jsonIconsDictionary;
|
|
3
3
|
export { iconsDictionary, };
|
|
@@ -13,6 +13,7 @@ const typographyDictionary = [
|
|
|
13
13
|
'label',
|
|
14
14
|
'option',
|
|
15
15
|
'paragraph',
|
|
16
|
+
'tip',
|
|
16
17
|
];
|
|
17
18
|
const typographyMonoDictionary = [
|
|
18
19
|
'code',
|
|
@@ -33,5 +34,10 @@ const typographySecondaryDictionary = [
|
|
|
33
34
|
'label',
|
|
34
35
|
'option',
|
|
35
36
|
'paragraph',
|
|
37
|
+
'tip',
|
|
36
38
|
];
|
|
37
|
-
|
|
39
|
+
const typographySmallerDictionary = [
|
|
40
|
+
'option',
|
|
41
|
+
'tip',
|
|
42
|
+
];
|
|
43
|
+
export { typographyDictionary, typographyMonoDictionary, typographyPrimaryDictionary, typographySecondaryDictionary, typographySmallerDictionary, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
/* MdsAccordionTimerItem custom elements
|
|
1
|
+
/* MdsAccordionTimerItem custom elements */
|
|
2
2
|
|
|
3
3
|
import type { Components, JSX } from "../types/components";
|
|
4
4
|
|
|
5
|
-
interface MdsAccordionTimerItem extends Components.MdsAccordionTimerItem, HTMLElement {}
|
|
6
|
-
export const MdsAccordionTimerItem: {
|
|
7
|
-
prototype: MdsAccordionTimerItem;
|
|
8
|
-
new (): MdsAccordionTimerItem;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Utility to define all custom elements within this package using the tag name provided in the component's source.
|
|
13
|
-
* When defining each custom element, it will also check it's safe to define by:
|
|
14
|
-
*
|
|
15
|
-
* 1. Ensuring the "customElements" registry is available in the global context (window).
|
|
16
|
-
* 2. The component tag name is not already defined.
|
|
17
|
-
*
|
|
18
|
-
* Use the standard [customElements.define()](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)
|
|
19
|
-
* method instead to define custom elements individually, or to provide a different tag name.
|
|
20
|
-
*/
|
|
21
|
-
export declare const defineCustomElements: (opts?: any) => void;
|
|
22
|
-
|
|
23
5
|
/**
|
|
24
6
|
* Used to manually set the base path where assets can be found.
|
|
25
7
|
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
@@ -27,7 +9,7 @@ export declare const defineCustomElements: (opts?: any) => void;
|
|
|
27
9
|
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
28
10
|
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
29
11
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
30
|
-
*
|
|
12
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
31
13
|
* will have to ensure the static assets are copied to its build directory.
|
|
32
14
|
*/
|
|
33
15
|
export declare const setAssetPath: (path: string) => void;
|
|
@@ -36,7 +18,6 @@ export interface SetPlatformOptions {
|
|
|
36
18
|
raf?: (c: FrameRequestCallback) => number;
|
|
37
19
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
38
20
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
39
|
-
ce?: (eventName: string, opts?: any) => CustomEvent;
|
|
40
21
|
}
|
|
41
22
|
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
42
23
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface MdsAccordionTimerItem extends Components.MdsAccordionTimerItem, HTMLElement {}
|
|
4
|
+
export const MdsAccordionTimerItem: {
|
|
5
|
+
prototype: MdsAccordionTimerItem;
|
|
6
|
+
new (): MdsAccordionTimerItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
function toVal(mix) {
|
|
4
|
+
var k, y, str='';
|
|
5
|
+
|
|
6
|
+
if (typeof mix === 'string' || typeof mix === 'number') {
|
|
7
|
+
str += mix;
|
|
8
|
+
} else if (typeof mix === 'object') {
|
|
9
|
+
if (Array.isArray(mix)) {
|
|
10
|
+
for (k=0; k < mix.length; k++) {
|
|
11
|
+
if (mix[k]) {
|
|
12
|
+
if (y = toVal(mix[k])) {
|
|
13
|
+
str && (str += ' ');
|
|
14
|
+
str += y;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
} else {
|
|
19
|
+
for (k in mix) {
|
|
20
|
+
if (mix[k]) {
|
|
21
|
+
str && (str += ' ');
|
|
22
|
+
str += k;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return str;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function clsx () {
|
|
32
|
+
var i=0, tmp, x, str='';
|
|
33
|
+
while (i < arguments.length) {
|
|
34
|
+
if (tmp = arguments[i++]) {
|
|
35
|
+
if (x = toVal(tmp)) {
|
|
36
|
+
str && (str += ' ');
|
|
37
|
+
str += x;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return str;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const mdsAccordionTimerItemCss = ".fixed{position:fixed}.absolute{position:absolute}.contents{display:contents}.border{border-width:1px}.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{position:relative;display:grid;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(--color, rgb(var(--adjust-tone-02)))}:host(:hover:not(.active)) .progress-bar{--background-active:rgb(var(--adjust-tone-07))}.row{display:-ms-flexbox;display:flex;gap:1rem}.accordion{display:grid}.progress-bar{-ms-flex-negative:0;flex-shrink:0;--thickness:0.25rem}.header{cursor:pointer}:host(.active) .header{cursor:auto}.contents{display:grid;height:0px;gap:1rem;overflow:hidden;padding-top:0px;opacity:0;-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:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.25, 0.46, 0.45, 0.94);transition-timing-function:cubic-bezier(0.25, 0.46, 0.45, 0.94)}.contents--opened{height:auto;padding-top:1rem;opacity:1}";
|
|
45
|
+
|
|
46
|
+
const MdsAccordionTimerItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
47
|
+
constructor() {
|
|
48
|
+
super();
|
|
49
|
+
this.__registerHost();
|
|
50
|
+
this.__attachShadow();
|
|
51
|
+
this.clickActive = createEvent(this, "clickActive", 7);
|
|
52
|
+
this.mouseEnterActive = createEvent(this, "mouseEnterActive", 7);
|
|
53
|
+
this.mouseLeaveActive = createEvent(this, "mouseLeaveActive", 7);
|
|
54
|
+
/**
|
|
55
|
+
* Specifies the typography of the element
|
|
56
|
+
*/
|
|
57
|
+
this.typography = 'h5';
|
|
58
|
+
/**
|
|
59
|
+
* A value between 0 and 100 that rapresents the status progress
|
|
60
|
+
*/
|
|
61
|
+
this.progress = 0;
|
|
62
|
+
/**
|
|
63
|
+
* Used automatically by MdsAccordionTimer wrapper to handle it's siblings
|
|
64
|
+
*/
|
|
65
|
+
this.uuid = 0;
|
|
66
|
+
this.toggle = () => {
|
|
67
|
+
if (!this.isActive) {
|
|
68
|
+
this.isActive = true;
|
|
69
|
+
this.clickActive.emit(this.description);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
this.mouseEnter = () => {
|
|
73
|
+
if (this.isActive) {
|
|
74
|
+
this.mouseEnterActive.emit(this.description);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
this.mouseLeave = () => {
|
|
78
|
+
if (this.isActive) {
|
|
79
|
+
this.mouseLeaveActive.emit(this.description);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
componentWillLoad() {
|
|
84
|
+
this.isActive = this.active;
|
|
85
|
+
}
|
|
86
|
+
validateOpened(newValue) {
|
|
87
|
+
this.isActive = newValue;
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
return (h(Host, { class: clsx(this.isActive && 'active'), onMouseEnter: this.mouseEnter, onMouseLeave: this.mouseLeave }, h("div", { class: "row" }, h("mds-progress", { class: "progress-bar", progress: this.progress, direction: "vertical" }), h("div", { class: "accordion" }, h("div", { class: "header", onClick: this.toggle }, h("mds-text", { typography: this.typography }, this.description)), h("div", { class: clsx('contents', this.isActive && 'contents--opened') }, h("slot", null))))));
|
|
91
|
+
}
|
|
92
|
+
static get watchers() { return {
|
|
93
|
+
"active": ["validateOpened"]
|
|
94
|
+
}; }
|
|
95
|
+
static get style() { return mdsAccordionTimerItemCss; }
|
|
96
|
+
}, [1, "mds-accordion-timer-item", {
|
|
97
|
+
"typography": [1],
|
|
98
|
+
"active": [516],
|
|
99
|
+
"description": [1],
|
|
100
|
+
"progress": [2],
|
|
101
|
+
"uuid": [2],
|
|
102
|
+
"isActive": [32]
|
|
103
|
+
}]);
|
|
104
|
+
function defineCustomElement$1() {
|
|
105
|
+
if (typeof customElements === "undefined") {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const components = ["mds-accordion-timer-item"];
|
|
109
|
+
components.forEach(tagName => { switch (tagName) {
|
|
110
|
+
case "mds-accordion-timer-item":
|
|
111
|
+
if (!customElements.get(tagName)) {
|
|
112
|
+
customElements.define(tagName, MdsAccordionTimerItem$1);
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
} });
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const MdsAccordionTimerItem = MdsAccordionTimerItem$1;
|
|
119
|
+
const defineCustomElement = defineCustomElement$1;
|
|
120
|
+
|
|
121
|
+
export { MdsAccordionTimerItem, defineCustomElement };
|
|
@@ -54,7 +54,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
54
54
|
};
|
|
55
55
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
56
56
|
let scopeId = getScopeId(cmpMeta);
|
|
57
|
-
|
|
57
|
+
const style = styles.get(scopeId);
|
|
58
58
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
59
59
|
// so the fallback is to always use the document for the root node in those cases
|
|
60
60
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -134,7 +134,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
134
134
|
let child = null;
|
|
135
135
|
let simple = false;
|
|
136
136
|
let lastSimple = false;
|
|
137
|
-
|
|
137
|
+
const vNodeChildren = [];
|
|
138
138
|
const walk = (c) => {
|
|
139
139
|
for (let i = 0; i < c.length; i++) {
|
|
140
140
|
child = c[i];
|
|
@@ -257,7 +257,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
257
257
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
258
258
|
try {
|
|
259
259
|
if (!elm.tagName.includes('-')) {
|
|
260
|
-
|
|
260
|
+
const n = newValue == null ? '' : newValue;
|
|
261
261
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
262
262
|
if (memberName === 'list') {
|
|
263
263
|
isProp = false;
|
|
@@ -314,7 +314,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
314
314
|
};
|
|
315
315
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
316
316
|
// tslint:disable-next-line: prefer-const
|
|
317
|
-
|
|
317
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
318
318
|
let i = 0;
|
|
319
319
|
let elm;
|
|
320
320
|
let childNode;
|
|
@@ -689,6 +689,29 @@ const then = (promise, thenFn) => {
|
|
|
689
689
|
};
|
|
690
690
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
691
691
|
;
|
|
692
|
+
/**
|
|
693
|
+
* Parse a new property value for a given property type.
|
|
694
|
+
*
|
|
695
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
696
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
697
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
698
|
+
* 2. the type stored from `propType`.
|
|
699
|
+
*
|
|
700
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
701
|
+
*
|
|
702
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
703
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
704
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
705
|
+
* ```tsx
|
|
706
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
707
|
+
* ```
|
|
708
|
+
*
|
|
709
|
+
* HTML prop values on the other hand, will always a string
|
|
710
|
+
*
|
|
711
|
+
* @param propValue the new value to coerce to some type
|
|
712
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
713
|
+
* @returns the parsed/coerced value
|
|
714
|
+
*/
|
|
692
715
|
const parsePropertyValue = (propValue, propType) => {
|
|
693
716
|
// ensure this value is of the correct prop type
|
|
694
717
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -722,7 +745,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
722
745
|
const flags = hostRef.$flags$;
|
|
723
746
|
const instance = hostRef.$lazyInstance$ ;
|
|
724
747
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
725
|
-
|
|
748
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
749
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
750
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
751
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
726
752
|
// gadzooks! the property's value has changed!!
|
|
727
753
|
// set our new value!
|
|
728
754
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
@@ -1095,7 +1121,9 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1095
1121
|
if (module) {
|
|
1096
1122
|
return module[exportName];
|
|
1097
1123
|
}
|
|
1124
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1098
1125
|
return import(
|
|
1126
|
+
/* @vite-ignore */
|
|
1099
1127
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1100
1128
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1101
1129
|
/* webpackMode: "lazy" */
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-e1bd79fc.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
4
|
+
Stencil Client Patch Esm v2.16.1 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|