@maggioli-design-system/mds-accordion-timer-item 2.1.1 → 3.0.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.
Files changed (77) hide show
  1. package/dist/cjs/{index-1c1f0a71.js → index-6fcb2864.js} +91 -5
  2. package/dist/cjs/loader.cjs.js +3 -2
  3. package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +6 -17
  4. package/dist/cjs/mds-accordion-timer-item.cjs.js +6 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/keyboard-manager.js +40 -0
  7. package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.css +103 -53
  8. package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.js +4 -15
  9. package/dist/collection/dictionary/icon.js +3 -1
  10. package/dist/collection/dictionary/typography.js +5 -1
  11. package/dist/components/index.d.ts +9 -0
  12. package/dist/components/index.js +1 -1
  13. package/dist/components/mds-accordion-timer-item.js +5 -16
  14. package/dist/esm/{index-2e2e1e5b.js → index-5d57a2db.js} +91 -6
  15. package/dist/esm/loader.js +3 -2
  16. package/dist/esm/mds-accordion-timer-item.entry.js +6 -17
  17. package/dist/esm/mds-accordion-timer-item.js +3 -2
  18. package/dist/esm/polyfills/css-shim.js +1 -1
  19. package/dist/esm-es5/index-5d57a2db.js +2 -0
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
  22. package/dist/esm-es5/mds-accordion-timer-item.js +1 -1
  23. package/dist/mds-accordion-timer-item/mds-accordion-timer-item.esm.js +1 -1
  24. package/dist/mds-accordion-timer-item/mds-accordion-timer-item.js +1 -1
  25. package/dist/mds-accordion-timer-item/p-09486400.system.js +1 -0
  26. package/dist/mds-accordion-timer-item/p-0df2a96d.system.js +2 -0
  27. package/dist/mds-accordion-timer-item/p-7ef8bff3.entry.js +1 -0
  28. package/dist/mds-accordion-timer-item/p-96e23db0.js +2 -0
  29. package/dist/mds-accordion-timer-item/p-a0cb79ca.system.entry.js +1 -0
  30. package/dist/stats.json +45 -42
  31. package/dist/types/common/keyboard-manager.d.ts +11 -0
  32. package/dist/types/components.d.ts +3 -3
  33. package/dist/types/dictionary/icon.d.ts +2 -1
  34. package/dist/types/dictionary/typography.d.ts +2 -1
  35. package/dist/types/stencil-public-runtime.d.ts +59 -3
  36. package/dist/types/types/autocomplete.d.ts +2 -2
  37. package/dist/types/types/button.d.ts +4 -4
  38. package/dist/types/types/floating-ui.d.ts +2 -2
  39. package/dist/types/types/form-rel.d.ts +1 -1
  40. package/dist/types/types/input-text-type.d.ts +1 -1
  41. package/dist/types/types/input-value-type.d.ts +1 -1
  42. package/dist/types/types/loading.d.ts +1 -1
  43. package/dist/types/types/typography.d.ts +9 -8
  44. package/dist/types/types/variant.d.ts +10 -10
  45. package/loader/index.d.ts +9 -0
  46. package/package.json +6 -6
  47. package/readme.md +9 -9
  48. package/src/common/keyboard-manager.ts +46 -0
  49. package/src/components/mds-accordion-timer-item/mds-accordion-timer-item.css +14 -11
  50. package/src/components/mds-accordion-timer-item/mds-accordion-timer-item.tsx +5 -23
  51. package/src/components/mds-accordion-timer-item/readme.md +9 -9
  52. package/src/components/mds-accordion-timer-item/test/mds-accordion-timer-item.e2e.ts +1 -1
  53. package/src/components.d.ts +3 -3
  54. package/src/dictionary/icon.ts +4 -0
  55. package/src/dictionary/typography.ts +9 -3
  56. package/src/fixtures/icons.json +177 -0
  57. package/src/fixtures/iconsauce.json +175 -0
  58. package/src/tailwind/components.css +1 -0
  59. package/src/types/typography.ts +4 -0
  60. package/www/build/mds-accordion-timer-item.esm.js +1 -1
  61. package/www/build/mds-accordion-timer-item.js +1 -1
  62. package/www/build/p-09486400.system.js +1 -0
  63. package/www/build/p-0df2a96d.system.js +2 -0
  64. package/www/build/p-7ef8bff3.entry.js +1 -0
  65. package/www/build/p-96e23db0.js +2 -0
  66. package/www/build/p-a0cb79ca.system.entry.js +1 -0
  67. package/dist/esm-es5/index-2e2e1e5b.js +0 -2
  68. package/dist/mds-accordion-timer-item/p-5a2b1b94.entry.js +0 -1
  69. package/dist/mds-accordion-timer-item/p-69f67485.js +0 -2
  70. package/dist/mds-accordion-timer-item/p-a21f6c71.system.js +0 -2
  71. package/dist/mds-accordion-timer-item/p-d73a3ce4.system.entry.js +0 -1
  72. package/dist/mds-accordion-timer-item/p-eb0644d6.system.js +0 -1
  73. package/www/build/p-5a2b1b94.entry.js +0 -1
  74. package/www/build/p-69f67485.js +0 -2
  75. package/www/build/p-a21f6c71.system.js +0 -2
  76. package/www/build/p-d73a3ce4.system.entry.js +0 -1
  77. package/www/build/p-eb0644d6.system.js +0 -1
@@ -48,7 +48,7 @@ const uniqueTime = (key, measureText) => {
48
48
  };
49
49
  }
50
50
  };
51
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
51
+ const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
52
52
  /**
53
53
  * Default style mode id
54
54
  */
@@ -63,6 +63,18 @@ const isComplexType = (o) => {
63
63
  o = typeof o;
64
64
  return o === 'object' || o === 'function';
65
65
  };
66
+ /**
67
+ * Helper method for querying a `meta` tag that contains a nonce value
68
+ * out of a DOM's head.
69
+ *
70
+ * @param doc The DOM containing the `head` to query against
71
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
72
+ * exists or the tag has no content.
73
+ */
74
+ function queryNonceMetaTagContent(doc) {
75
+ var _a, _b, _c;
76
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
77
+ }
66
78
  /**
67
79
  * Production h() function based on Preact by
68
80
  * Jason Miller (@developit)
@@ -71,7 +83,6 @@ const isComplexType = (o) => {
71
83
  *
72
84
  * Modified for Stencil's compiler and vdom
73
85
  */
74
- // const stack: any[] = [];
75
86
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
76
87
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
77
88
  const h = (nodeName, vnodeData, ...children) => {
@@ -122,6 +133,14 @@ const h = (nodeName, vnodeData, ...children) => {
122
133
  }
123
134
  return vnode;
124
135
  };
136
+ /**
137
+ * A utility function for creating a virtual DOM node from a tag and some
138
+ * possible text content.
139
+ *
140
+ * @param tag the tag for this element
141
+ * @param text possible text content for the node
142
+ * @returns a newly-minted virtual DOM node
143
+ */
125
144
  const newVNode = (tag, text) => {
126
145
  const vnode = {
127
146
  $flags$: 0,
@@ -136,6 +155,12 @@ const newVNode = (tag, text) => {
136
155
  return vnode;
137
156
  };
138
157
  const Host = {};
158
+ /**
159
+ * Check whether a given node is a Host node or not
160
+ *
161
+ * @param node the virtual DOM node to check
162
+ * @returns whether it's a Host node or not
163
+ */
139
164
  const isHost = (node) => node && node.$tag$ === Host;
140
165
  /**
141
166
  * Parse a new property value for a given property type.
@@ -228,6 +253,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
228
253
  styles.set(scopeId, style);
229
254
  };
230
255
  const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
256
+ var _a;
231
257
  let scopeId = getScopeId(cmpMeta);
232
258
  const style = styles.get(scopeId);
233
259
  // if an element is NOT connected then getRootNode() will return the wrong root node
@@ -247,6 +273,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
247
273
  styleElm = doc.createElement('style');
248
274
  styleElm.innerHTML = style;
249
275
  }
276
+ // Apply CSP nonce to the style tag if it exists
277
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
278
+ if (nonce != null) {
279
+ styleElm.setAttribute('nonce', nonce);
280
+ }
250
281
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
251
282
  }
252
283
  if (appliedStyles) {
@@ -445,6 +476,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
445
476
  }
446
477
  return elm;
447
478
  };
479
+ /**
480
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
481
+ * add them to the DOM in the appropriate place.
482
+ *
483
+ * @param parentElm the DOM node which should be used as a parent for the new
484
+ * DOM nodes
485
+ * @param before a child of the `parentElm` which the new children should be
486
+ * inserted before (optional)
487
+ * @param parentVNode the parent virtual DOM node
488
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
489
+ * @param startIdx the index in the child virtual DOM nodes at which to start
490
+ * creating DOM nodes (inclusive)
491
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
492
+ * creating DOM nodes (inclusive)
493
+ */
448
494
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
449
495
  let containerElm = (parentElm);
450
496
  let childNode;
@@ -461,6 +507,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
461
507
  }
462
508
  }
463
509
  };
510
+ /**
511
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
512
+ * This can be used to, for instance, clean up after a list of children which
513
+ * should no longer be shown.
514
+ *
515
+ * This function also handles some of Stencil's slot relocation logic.
516
+ *
517
+ * @param vnodes a list of virtual DOM nodes to remove
518
+ * @param startIdx the index at which to start removing nodes (inclusive)
519
+ * @param endIdx the index at which to stop removing nodes (inclusive)
520
+ * @param vnode a VNode
521
+ * @param elm an element
522
+ */
464
523
  const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
465
524
  for (; startIdx <= endIdx; ++startIdx) {
466
525
  if ((vnode = vnodes[startIdx])) {
@@ -652,7 +711,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
652
711
  *
653
712
  * So, in other words, if `key` attrs are not set on VNodes which may be
654
713
  * changing order within a `children` array or something along those lines then
655
- * we could obtain a false positive and then have to do needless re-rendering.
714
+ * we could obtain a false negative and then have to do needless re-rendering
715
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
656
716
  *
657
717
  * @param leftVNode the first VNode to check
658
718
  * @param rightVNode the second VNode to check
@@ -716,6 +776,18 @@ const patch = (oldVNode, newVNode) => {
716
776
  elm.data = text;
717
777
  }
718
778
  };
779
+ /**
780
+ * The main entry point for Stencil's virtual DOM-based rendering engine
781
+ *
782
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
783
+ * function will handle creating a virtual DOM tree with a single root, patching
784
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
785
+ * relocation, and reflecting attributes.
786
+ *
787
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
788
+ * the DOM node into which it should be rendered.
789
+ * @param renderFnResults the virtual DOM nodes to be rendered
790
+ */
719
791
  const renderVdom = (hostRef, renderFnResults) => {
720
792
  const hostElm = hostRef.$hostElement$;
721
793
  const cmpMeta = hostRef.$cmpMeta$;
@@ -872,8 +944,8 @@ const appDidLoad = (who) => {
872
944
  const then = (promise, thenFn) => {
873
945
  return promise && promise.then ? promise.then(thenFn) : thenFn();
874
946
  };
875
- const addHydratedFlag = (elm) => elm.classList.add('hydrated')
876
- ;
947
+ const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
948
+ ;
877
949
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
878
950
  const setValue = (ref, propName, newVal, cmpMeta) => {
879
951
  // check our new property value against our internal value
@@ -1118,6 +1190,7 @@ const disconnectedCallback = (elm) => {
1118
1190
  }
1119
1191
  };
1120
1192
  const bootstrapLazy = (lazyBundles, options = {}) => {
1193
+ var _a;
1121
1194
  const endBootstrap = createTime();
1122
1195
  const cmpTags = [];
1123
1196
  const exclude = options.exclude || [];
@@ -1194,6 +1267,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1194
1267
  {
1195
1268
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1196
1269
  visibilityStyle.setAttribute('data-styles', '');
1270
+ // Apply CSP nonce to the style tag if it exists
1271
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1272
+ if (nonce != null) {
1273
+ visibilityStyle.setAttribute('nonce', nonce);
1274
+ }
1197
1275
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1198
1276
  }
1199
1277
  // Process deferred connectedCallbacks now all components have been registered
@@ -1209,6 +1287,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1209
1287
  // Fallback appLoad event
1210
1288
  endBootstrap();
1211
1289
  };
1290
+ /**
1291
+ * Assigns the given value to the nonce property on the runtime platform object.
1292
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1293
+ * @param nonce The value to be assigned to the platform nonce property.
1294
+ * @returns void
1295
+ */
1296
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1212
1297
  const hostRefs = /*@__PURE__*/ new WeakMap();
1213
1298
  const getHostRef = (ref) => hostRefs.get(ref);
1214
1299
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1321,3 +1406,4 @@ exports.createEvent = createEvent;
1321
1406
  exports.h = h;
1322
1407
  exports.promiseResolve = promiseResolve;
1323
1408
  exports.registerInstance = registerInstance;
1409
+ exports.setNonce = setNonce;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1c1f0a71.js');
5
+ const index = require('./index-6fcb2864.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.19.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return index.promiseResolve();
@@ -18,4 +18,5 @@ const defineCustomElements = (win, options) => {
18
18
  });
19
19
  };
20
20
 
21
+ exports.setNonce = index.setNonce;
21
22
  exports.defineCustomElements = defineCustomElements;
@@ -2,25 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1c1f0a71.js');
5
+ const index = require('./index-6fcb2864.js');
6
6
 
7
- 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{--progress-bar-color:rgb(var(--tone-neutral-03));--progress-bar-background:rgb(var(--tone-neutral-08));--progress-bar-thickness:0.25rem;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(--tone-neutral-02)))}.row{display:-ms-flexbox;display:flex;gap:1rem}.accordion{display:grid}.progress-bar{-ms-flex-negative:0;flex-shrink:0;--color:var(--progress-bar-color);--background:var(--progress-bar-background);--thickness:var(--progress-bar-thickness)}.action{cursor:pointer;border-style:none;background-color:transparent;padding:0px;text-align:left}:host([active]) .action{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)}:host([active]) .contents{height:auto;padding-top:1rem;opacity:1}";
7
+ const mdsAccordionTimerItemCss = "@tailwind components; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-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}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.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{--mds-accordion-timer-item-progress-bar-color:rgb(var(--tone-neutral-03));--mds-accordion-timer-item-progress-bar-background:rgb(var(--tone-neutral-08));--mds-accordion-timer-item-progress-bar-thickness:0.25rem;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(--mds-accordion-timer-item-color, rgb(var(--tone-neutral-02)))}.row{display:-ms-flexbox;display:flex;gap:1rem}.accordion{display:grid}.progress-bar{-ms-flex-negative:0;flex-shrink:0;--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)}.action{cursor:pointer;border-radius:0.75rem;border-style:none;background-color:transparent;padding:0px;text-align:left}:host([active]) .action{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)}:host([active]) .contents{height:auto;padding-top:1rem;opacity:1}";
8
8
 
9
9
  const MdsAccordionTimerItem = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
- this.clickActive = index.createEvent(this, "clickActive", 7);
13
- this.mouseEnterActive = index.createEvent(this, "mouseEnterActive", 7);
14
- this.mouseLeaveActive = index.createEvent(this, "mouseLeaveActive", 7);
15
- // componentWillLoad (): void {
16
- // this.isActive = this.active
17
- // }
18
- // componentDidLoad (): void {
19
- // this.element.shadowRoot.querySelector<HTMLMdsProgressElement>('mds-progress').setAttribute('direction', 'vertical')
20
- // }
12
+ this.clickActive = index.createEvent(this, "activeClicked", 7);
13
+ this.mouseEnterActive = index.createEvent(this, "activeMouseEnter", 7);
14
+ this.mouseLeaveActive = index.createEvent(this, "activeMouseLeave", 7);
21
15
  this.toggle = () => {
22
16
  if (!this.active) {
23
- // this.isActive = true
24
17
  this.clickActive.emit(this.description);
25
18
  }
26
19
  };
@@ -40,12 +33,8 @@ const MdsAccordionTimerItem = class {
40
33
  this.progress = 0;
41
34
  this.uuid = 0;
42
35
  }
43
- // @Watch('active')
44
- // activeChanged (newValue: boolean): void {
45
- // this.isActive = newValue
46
- // }
47
36
  render() {
48
- return (index.h(index.Host, { onMouseEnter: this.mouseEnter, onMouseLeave: this.mouseLeave }, index.h("div", { class: "row" }, index.h("mds-progress", { class: "progress-bar", progress: Number(this.progress.toFixed(2)), direction: "vertical" }), index.h("div", { class: "accordion" }, index.h("button", { "aria-controls": "contents", "aria-expanded": this.active ? 'true' : 'false', class: "action", id: "action", onClick: this.toggle, role: "button", tabindex: "0" }, index.h("mds-text", { typography: this.typography }, this.description)), index.h("div", { class: "contents", id: "contents" }, index.h("slot", null))))));
37
+ return (index.h(index.Host, { onMouseEnter: this.mouseEnter, onMouseLeave: this.mouseLeave }, index.h("div", { class: "row" }, index.h("mds-progress", { class: "progress-bar", progress: Number(this.progress.toFixed(2)), direction: "vertical" }), index.h("div", { class: "accordion" }, index.h("button", { "aria-controls": "contents", "aria-expanded": this.active ? 'true' : 'false', class: "action focusable", id: "action", onClick: this.toggle, role: "button", tabindex: "0" }, index.h("mds-text", { typography: this.typography }, this.description)), index.h("div", { class: "contents", id: "contents" }, index.h("slot", null))))));
49
38
  }
50
39
  };
51
40
  MdsAccordionTimerItem.style = mdsAccordionTimerItemCss;
@@ -1,9 +1,11 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-1c1f0a71.js');
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-6fcb2864.js');
4
6
 
5
7
  /*
6
- Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com
7
9
  */
8
10
  const patchBrowser = () => {
9
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));
@@ -17,3 +19,5 @@ const patchBrowser = () => {
17
19
  patchBrowser().then(options => {
18
20
  return index.bootstrapLazy([["mds-accordion-timer-item.cjs",[[1,"mds-accordion-timer-item",{"typography":[1],"active":[516],"description":[1],"progress":[2],"uuid":[2]}]]]], options);
19
21
  });
22
+
23
+ exports.setNonce = index.setNonce;
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.19.3",
8
- "typescriptVersion": "4.7.4"
7
+ "version": "2.22.2",
8
+ "typescriptVersion": "4.9.4"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -0,0 +1,40 @@
1
+ export class KeyboardManager {
2
+ constructor() {
3
+ this.elements = [];
4
+ this.handleClickBehaviorDispatchEvent = (event) => {
5
+ if (event.code === 'Space' || event.code === 'Enter' || event.code === 'NumpadEnter') {
6
+ event.target.click();
7
+ }
8
+ };
9
+ this.handleEscapeBehaviorDispatchEvent = (event) => {
10
+ if (event.code === 'Escape' && this.escapeCallback) {
11
+ this.escapeCallback();
12
+ }
13
+ };
14
+ this.addElement = (el, name = 'element') => {
15
+ this.elements[name] = el;
16
+ };
17
+ this.attachClickBehavior = (name = 'element') => {
18
+ if (this.elements[name]) {
19
+ this.elements[name].addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
20
+ }
21
+ };
22
+ this.detachClickBehavior = (name = 'element') => {
23
+ if (this.elements[name]) {
24
+ this.elements[name].removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
25
+ }
26
+ };
27
+ this.attachEscapeBehavior = (callBack) => {
28
+ this.escapeCallback = callBack;
29
+ if (typeof window !== undefined) {
30
+ window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
31
+ }
32
+ };
33
+ this.detachEscapeBehavior = () => {
34
+ this.escapeCallback = null;
35
+ if (typeof window !== undefined) {
36
+ window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
37
+ }
38
+ };
39
+ }
40
+ }
@@ -1,36 +1,61 @@
1
- .fixed {
2
- position: fixed;
1
+ @tailwind components;
2
+
3
+ .focus-off,
4
+ .focusable,
5
+ .focusable-light,
6
+ .focusable-light-off{
7
+
8
+ transition-duration: 200ms;
9
+
10
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
11
+
12
+ outline-offset: var(--magma-outline-blur-offset);
13
+ outline: var(--magma-outline-blur);
14
+ transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
15
+ }
16
+
17
+ .focus-on,
18
+ .focusable-light:focus-visible,
19
+ .focusable:focus-visible {
20
+ --magma-outline-blur-offset: var(--magma-outline-focus-offset);
21
+ --magma-outline-blur: var(--magma-outline-focus);
22
+ }
23
+ .fixed{
24
+
25
+ position: fixed;
3
26
  }
27
+ .absolute{
4
28
 
5
- .absolute {
6
- position: absolute;
29
+ position: absolute;
7
30
  }
31
+ .contents{
8
32
 
9
- .contents {
10
- display: contents;
33
+ display: contents;
11
34
  }
35
+ .border{
12
36
 
13
- .border {
14
- border-width: 1px;
37
+ border-width: 1px;
15
38
  }
39
+ .shadow{
40
+
41
+ --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
16
42
 
17
- .shadow {
18
- --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
19
- --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
20
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
43
+ --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
44
+
45
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
21
46
  }
22
47
 
23
48
  /**
24
- * @prop --progress-bar-color: Sets the color of the progress bar when the item is selected
25
- * @prop --progress-bar-background: Sets the background-color of the progress bar when the item is selected
26
- * @prop --color: Sets the text color of the component
27
- * @prop --progress-bar-thickness: Sets thickness of the progress bar
49
+ * @prop --mds-accordion-timer-item-progress-bar-color: Sets the color of the progress bar when the item is selected
50
+ * @prop --mds-accordion-timer-item-progress-bar-background: Sets the background-color of the progress bar when the item is selected
51
+ * @prop --mds-accordion-timer-item-color: Sets the text color of the component
52
+ * @prop --mds-accordion-timer-item-progress-bar-thickness: Sets thickness of the progress bar
28
53
  */
29
54
 
30
55
  :host {
31
- --progress-bar-color: rgb(var(--tone-neutral-03));
32
- --progress-bar-background: rgb(var(--tone-neutral-08));
33
- --progress-bar-thickness: 0.25rem;
56
+ --mds-accordion-timer-item-progress-bar-color: rgb(var(--tone-neutral-03));
57
+ --mds-accordion-timer-item-progress-bar-background: rgb(var(--tone-neutral-08));
58
+ --mds-accordion-timer-item-progress-bar-thickness: 0.25rem;
34
59
  position: relative;
35
60
  display: grid;
36
61
  padding-top: 1rem;
@@ -40,53 +65,78 @@
40
65
  transition-duration: 500ms;
41
66
  transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
42
67
 
43
- color: var(--color, rgb(var(--tone-neutral-02)));
68
+ color: var(--mds-accordion-timer-item-color, rgb(var(--tone-neutral-02)));
44
69
  }
45
70
 
46
- .row {
47
- display: flex;
48
- gap: 1rem;
71
+ .row{
72
+
73
+ display: flex;
74
+
75
+ gap: 1rem;
49
76
  }
50
77
 
51
- .accordion {
52
- display: grid;
78
+ .accordion{
79
+
80
+ display: grid;
53
81
  }
54
82
 
55
- .progress-bar {
56
- flex-shrink: 0;
83
+ .progress-bar{
57
84
 
58
- --color: var(--progress-bar-color);
59
- --background: var(--progress-bar-background);
60
- --thickness: var(--progress-bar-thickness);
85
+ flex-shrink: 0;
86
+
87
+ --mds-progress-color: var(--mds-accordion-timer-item-progress-bar-color);
88
+ --mds-progress-background: var(--mds-accordion-timer-item-progress-bar-background);
89
+ --mds-progress-thickness: var(--mds-accordion-timer-item-progress-bar-thickness);
61
90
  }
62
91
 
63
- .action {
64
- cursor: pointer;
65
- border-style: none;
66
- background-color: transparent;
67
- padding: 0px;
68
- text-align: left;
92
+ .action{
93
+
94
+ cursor: pointer;
95
+
96
+ border-radius: 0.75rem;
97
+
98
+ border-style: none;
99
+
100
+ background-color: transparent;
101
+
102
+ padding: 0px;
103
+
104
+ text-align: left;
69
105
  }
70
106
 
71
- :host ( [active] ) .action {
72
- cursor: auto;
107
+ :host ( [active] ) .action{
108
+
109
+ cursor: auto;
73
110
  }
74
111
 
75
- .contents {
76
- display: grid;
77
- height: 0px;
78
- gap: 1rem;
79
- overflow: hidden;
80
- padding-top: 0px;
81
- opacity: 0;
82
- transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
83
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
84
- transition-duration: 300ms;
85
- transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
112
+ .contents{
113
+
114
+ display: grid;
115
+
116
+ height: 0px;
117
+
118
+ gap: 1rem;
119
+
120
+ overflow: hidden;
121
+
122
+ padding-top: 0px;
123
+
124
+ opacity: 0;
125
+
126
+ transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
127
+
128
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
129
+
130
+ transition-duration: 300ms;
131
+
132
+ transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
86
133
  }
87
134
 
88
- :host ( [active] ) .contents {
89
- height: auto;
90
- padding-top: 1rem;
91
- opacity: 1;
135
+ :host ( [active] ) .contents{
136
+
137
+ height: auto;
138
+
139
+ padding-top: 1rem;
140
+
141
+ opacity: 1;
92
142
  }
@@ -2,15 +2,8 @@ import { Host, h } from '@stencil/core';
2
2
  // import { DirectionType } from '../mds-progress/meta/types'
3
3
  export class MdsAccordionTimerItem {
4
4
  constructor() {
5
- // componentWillLoad (): void {
6
- // this.isActive = this.active
7
- // }
8
- // componentDidLoad (): void {
9
- // this.element.shadowRoot.querySelector<HTMLMdsProgressElement>('mds-progress').setAttribute('direction', 'vertical')
10
- // }
11
5
  this.toggle = () => {
12
6
  if (!this.active) {
13
- // this.isActive = true
14
7
  this.clickActive.emit(this.description);
15
8
  }
16
9
  };
@@ -30,12 +23,8 @@ export class MdsAccordionTimerItem {
30
23
  this.progress = 0;
31
24
  this.uuid = 0;
32
25
  }
33
- // @Watch('active')
34
- // activeChanged (newValue: boolean): void {
35
- // this.isActive = newValue
36
- // }
37
26
  render() {
38
- return (h(Host, { onMouseEnter: this.mouseEnter, onMouseLeave: this.mouseLeave }, h("div", { class: "row" }, h("mds-progress", { class: "progress-bar", progress: Number(this.progress.toFixed(2)), direction: "vertical" }), h("div", { class: "accordion" }, h("button", { "aria-controls": "contents", "aria-expanded": this.active ? 'true' : 'false', class: "action", id: "action", onClick: this.toggle, role: "button", tabindex: "0" }, h("mds-text", { typography: this.typography }, this.description)), h("div", { class: "contents", id: "contents" }, h("slot", null))))));
27
+ return (h(Host, { onMouseEnter: this.mouseEnter, onMouseLeave: this.mouseLeave }, h("div", { class: "row" }, h("mds-progress", { class: "progress-bar", progress: Number(this.progress.toFixed(2)), direction: "vertical" }), h("div", { class: "accordion" }, h("button", { "aria-controls": "contents", "aria-expanded": this.active ? 'true' : 'false', class: "action focusable", id: "action", onClick: this.toggle, role: "button", tabindex: "0" }, h("mds-text", { typography: this.typography }, this.description)), h("div", { class: "contents", id: "contents" }, h("slot", null))))));
39
28
  }
40
29
  static get is() { return "mds-accordion-timer-item"; }
41
30
  static get encapsulation() { return "shadow"; }
@@ -149,7 +138,7 @@ export class MdsAccordionTimerItem {
149
138
  static get events() {
150
139
  return [{
151
140
  "method": "clickActive",
152
- "name": "clickActive",
141
+ "name": "activeClicked",
153
142
  "bubbles": true,
154
143
  "cancelable": true,
155
144
  "composed": true,
@@ -164,7 +153,7 @@ export class MdsAccordionTimerItem {
164
153
  }
165
154
  }, {
166
155
  "method": "mouseEnterActive",
167
- "name": "mouseEnterActive",
156
+ "name": "activeMouseEnter",
168
157
  "bubbles": true,
169
158
  "cancelable": true,
170
159
  "composed": true,
@@ -179,7 +168,7 @@ export class MdsAccordionTimerItem {
179
168
  }
180
169
  }, {
181
170
  "method": "mouseLeaveActive",
182
- "name": "mouseLeaveActive",
171
+ "name": "activeMouseLeave",
183
172
  "bubbles": true,
184
173
  "cancelable": true,
185
174
  "composed": true,
@@ -1,3 +1,5 @@
1
1
  import jsonIconsDictionary from '../fixtures/icons.json';
2
+ import jsonMggIconsDictionary from '../fixtures/iconsauce.json';
2
3
  const iconsDictionary = jsonIconsDictionary;
3
- export { iconsDictionary, };
4
+ const mggIconsDictionary = jsonMggIconsDictionary;
5
+ export { iconsDictionary, mggIconsDictionary, };
@@ -21,6 +21,10 @@ const typographyVariationsDictionary = [
21
21
  'read',
22
22
  'code',
23
23
  ];
24
+ const typographyReadingVariationsDictionary = [
25
+ 'info',
26
+ 'read',
27
+ ];
24
28
  const typographyMonoDictionary = [
25
29
  'snippet',
26
30
  'hack',
@@ -56,4 +60,4 @@ const typographyTooltipDictionary = [
56
60
  'detail',
57
61
  'tip',
58
62
  ];
59
- export { typographyDictionary, typographyVariationsDictionary, typographyMonoDictionary, typographyTitleDictionary, typographyInfoDictionary, typographyReadDictionary, typographySmallerDictionary, typographyTooltipDictionary, };
63
+ export { typographyDictionary, typographyInfoDictionary, typographyReadingVariationsDictionary, typographyMonoDictionary, typographyReadDictionary, typographySmallerDictionary, typographyTitleDictionary, typographyTooltipDictionary, typographyVariationsDictionary, };
@@ -13,6 +13,15 @@ export { MdsAccordionTimerItem as MdsAccordionTimerItem } from '../types/compone
13
13
  */
14
14
  export declare const setAssetPath: (path: string) => void;
15
15
 
16
+ /**
17
+ * Used to specify a nonce value that corresponds with an application's CSP.
18
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
19
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
20
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
21
+ * will result in the same behavior.
22
+ */
23
+ export declare const setNonce: (nonce: string) => void
24
+
16
25
  export interface SetPlatformOptions {
17
26
  raf?: (c: FrameRequestCallback) => number;
18
27
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
@@ -1,2 +1,2 @@
1
- export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
1
+ export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
2
  export { MdsAccordionTimerItem, defineCustomElement as defineCustomElementMdsAccordionTimerItem } from './mds-accordion-timer-item.js';