@maggioli-design-system/mds-paginator-item 2.3.0 → 2.4.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 (64) hide show
  1. package/dist/cjs/{index-969219be.js → index-30ee4c25.js} +166 -32
  2. package/dist/cjs/loader.cjs.js +2 -11
  3. package/dist/cjs/mds-paginator-item.cjs.entry.js +1 -1
  4. package/dist/cjs/mds-paginator-item.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +3 -3
  6. package/dist/collection/common/unit.js +10 -0
  7. package/dist/collection/components/mds-paginator-item/mds-paginator-item.css +1 -0
  8. package/dist/collection/components/mds-paginator-item/mds-paginator-item.js +5 -2
  9. package/dist/collection/dictionary/button.js +5 -1
  10. package/dist/collection/dictionary/icon.js +2 -2
  11. package/dist/collection/dictionary/variant.js +9 -1
  12. package/dist/components/index.d.ts +5 -3
  13. package/dist/components/index.js +1 -2
  14. package/dist/components/mds-paginator-item.js +1 -1
  15. package/dist/documentation.d.ts +361 -88
  16. package/dist/documentation.json +33 -7
  17. package/dist/esm/{index-43abfe8a.js → index-3fa51808.js} +166 -32
  18. package/dist/esm/loader.js +3 -12
  19. package/dist/esm/mds-paginator-item.entry.js +1 -1
  20. package/dist/esm/mds-paginator-item.js +3 -3
  21. package/dist/esm-es5/index-3fa51808.js +2 -0
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/mds-paginator-item.entry.js +1 -1
  24. package/dist/esm-es5/mds-paginator-item.js +1 -1
  25. package/dist/mds-paginator-item/mds-paginator-item.esm.js +1 -1
  26. package/dist/mds-paginator-item/mds-paginator-item.js +2 -6
  27. package/dist/mds-paginator-item/p-2e3a33e5.js +2 -0
  28. package/dist/mds-paginator-item/{p-fda89125.system.entry.js → p-2f534d96.system.entry.js} +1 -1
  29. package/dist/mds-paginator-item/{p-d8314fea.system.js → p-61d399b8.system.js} +1 -1
  30. package/dist/mds-paginator-item/p-8e675782.system.js +2 -0
  31. package/dist/mds-paginator-item/{p-a07f2745.entry.js → p-e78a049a.entry.js} +1 -1
  32. package/dist/stats.json +41 -33
  33. package/dist/types/common/unit.d.ts +2 -0
  34. package/dist/types/dictionary/button.d.ts +2 -1
  35. package/dist/types/dictionary/variant.d.ts +2 -1
  36. package/dist/types/stencil-public-runtime.d.ts +32 -17
  37. package/dist/types/type/button.d.ts +1 -0
  38. package/dist/types/type/variant.d.ts +1 -0
  39. package/documentation.json +374 -7
  40. package/loader/index.d.ts +2 -2
  41. package/package.json +3 -3
  42. package/readme.md +7 -0
  43. package/src/common/unit.ts +14 -0
  44. package/src/components/mds-paginator-item/mds-paginator-item.tsx +4 -0
  45. package/src/components/mds-paginator-item/readme.md +7 -0
  46. package/src/dictionary/button.ts +7 -1
  47. package/src/dictionary/variant.ts +10 -0
  48. package/src/fixtures/icons.json +39 -0
  49. package/src/fixtures/iconsauce.json +38 -0
  50. package/src/type/button.ts +4 -0
  51. package/src/type/variant.ts +9 -0
  52. package/www/build/mds-paginator-item.esm.js +1 -1
  53. package/www/build/mds-paginator-item.js +2 -6
  54. package/www/build/p-2e3a33e5.js +2 -0
  55. package/www/build/{p-fda89125.system.entry.js → p-2f534d96.system.entry.js} +1 -1
  56. package/www/build/{p-d8314fea.system.js → p-61d399b8.system.js} +1 -1
  57. package/www/build/p-8e675782.system.js +2 -0
  58. package/www/build/{p-a07f2745.entry.js → p-e78a049a.entry.js} +1 -1
  59. package/dist/esm/polyfills/css-shim.js +0 -1
  60. package/dist/esm-es5/index-43abfe8a.js +0 -2
  61. package/dist/mds-paginator-item/p-545e4388.system.js +0 -2
  62. package/dist/mds-paginator-item/p-cd35cb31.js +0 -2
  63. package/www/build/p-545e4388.system.js +0 -2
  64. package/www/build/p-cd35cb31.js +0 -2
@@ -58,6 +58,13 @@ const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
58
58
  */
59
59
  const EMPTY_OBJ = {};
60
60
  const isDef = (v) => v != null;
61
+ /**
62
+ * Check whether a value is a 'complex type', defined here as an object or a
63
+ * function.
64
+ *
65
+ * @param o the value to check
66
+ * @returns whether it's a complex type or not
67
+ */
61
68
  const isComplexType = (o) => {
62
69
  // https://jsperf.com/typeof-fn-object/5
63
70
  o = typeof o;
@@ -114,6 +121,7 @@ const h = (nodeName, vnodeData, ...children) => {
114
121
  };
115
122
  walk(children);
116
123
  if (vnodeData) {
124
+ // normalize class / className attributes
117
125
  {
118
126
  const classData = vnodeData.className || vnodeData.class;
119
127
  if (classData) {
@@ -235,9 +243,9 @@ const registerStyle = (scopeId, cssText, allowCS) => {
235
243
  }
236
244
  styles.set(scopeId, style);
237
245
  };
238
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
246
+ const addStyle = (styleContainerNode, cmpMeta, mode) => {
239
247
  var _a;
240
- let scopeId = getScopeId(cmpMeta);
248
+ const scopeId = getScopeId(cmpMeta);
241
249
  const style = styles.get(scopeId);
242
250
  // if an element is NOT connected then getRootNode() will return the wrong root node
243
251
  // so the fallback is to always use the document for the root node in those cases
@@ -252,10 +260,8 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
252
260
  }
253
261
  if (!appliedStyles.has(scopeId)) {
254
262
  {
255
- {
256
- styleElm = doc.createElement('style');
257
- styleElm.innerHTML = style;
258
- }
263
+ styleElm = doc.createElement('style');
264
+ styleElm.innerHTML = style;
259
265
  // Apply CSP nonce to the style tag if it exists
260
266
  const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
261
267
  if (nonce != null) {
@@ -302,6 +308,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
302
308
  *
303
309
  * Modified for Stencil's compiler and vdom
304
310
  */
311
+ /**
312
+ * When running a VDom render set properties present on a VDom node onto the
313
+ * corresponding HTML element.
314
+ *
315
+ * Note that this function has special functionality for the `class`,
316
+ * `style`, `key`, and `ref` attributes, as well as event handlers (like
317
+ * `onClick`, etc). All others are just passed through as-is.
318
+ *
319
+ * @param elm the HTMLElement onto which attributes should be set
320
+ * @param memberName the name of the attribute to set
321
+ * @param oldValue the old value for the attribute
322
+ * @param newValue the new value for the attribute
323
+ * @param isSvg whether we're in an svg context or not
324
+ * @param flags bitflags for Vdom variables
325
+ */
305
326
  const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
306
327
  if (oldValue !== newValue) {
307
328
  let isProp = isMemberInElement(elm, memberName);
@@ -461,15 +482,16 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
461
482
  * @param vnodes a list of virtual DOM nodes to remove
462
483
  * @param startIdx the index at which to start removing nodes (inclusive)
463
484
  * @param endIdx the index at which to stop removing nodes (inclusive)
464
- * @param vnode a VNode
465
- * @param elm an element
466
485
  */
467
- const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
468
- for (; startIdx <= endIdx; ++startIdx) {
469
- if ((vnode = vnodes[startIdx])) {
470
- elm = vnode.$elm$;
471
- // remove the vnode's element from the dom
472
- elm.remove();
486
+ const removeVnodes = (vnodes, startIdx, endIdx) => {
487
+ for (let index = startIdx; index <= endIdx; ++index) {
488
+ const vnode = vnodes[index];
489
+ if (vnode) {
490
+ const elm = vnode.$elm$;
491
+ if (elm) {
492
+ // remove the vnode's element from the dom
493
+ elm.remove();
494
+ }
473
495
  }
474
496
  }
475
497
  };
@@ -731,17 +753,44 @@ const patch = (oldVNode, newVNode) => {
731
753
  * @param hostRef data needed to root and render the virtual DOM tree, such as
732
754
  * the DOM node into which it should be rendered.
733
755
  * @param renderFnResults the virtual DOM nodes to be rendered
756
+ * @param isInitialLoad whether or not this is the first call after page load
734
757
  */
735
- const renderVdom = (hostRef, renderFnResults) => {
758
+ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
736
759
  const hostElm = hostRef.$hostElement$;
737
760
  const cmpMeta = hostRef.$cmpMeta$;
738
761
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
762
+ // if `renderFnResults` is a Host node then we can use it directly. If not,
763
+ // we need to call `h` again to wrap the children of our component in a
764
+ // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
765
+ // implicitly that the top-level vdom node is 1) an only child and 2)
766
+ // contains attrs that need to be set on the host element.
739
767
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
740
768
  hostTagName = hostElm.tagName;
741
769
  if (cmpMeta.$attrsToReflect$) {
742
770
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
743
771
  cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
744
772
  }
773
+ // On the first render and *only* on the first render we want to check for
774
+ // any attributes set on the host element which are also set on the vdom
775
+ // node. If we find them, we override the value on the VDom node attrs with
776
+ // the value from the host element, which allows developers building apps
777
+ // with Stencil components to override e.g. the `role` attribute on a
778
+ // component even if it's already set on the `Host`.
779
+ if (isInitialLoad && rootVnode.$attrs$) {
780
+ for (const key of Object.keys(rootVnode.$attrs$)) {
781
+ // We have a special implementation in `setAccessor` for `style` and
782
+ // `class` which reconciles values coming from the VDom with values
783
+ // already present on the DOM element, so we don't want to override those
784
+ // attributes on the VDom tree with values from the host element if they
785
+ // are present.
786
+ //
787
+ // Likewise, `ref` and `key` are special internal values for the Stencil
788
+ // runtime and we don't want to override those either.
789
+ if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
790
+ rootVnode.$attrs$[key] = hostElm[key];
791
+ }
792
+ }
793
+ }
745
794
  rootVnode.$tag$ = null;
746
795
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
747
796
  hostRef.$vnode$ = rootVnode;
@@ -772,15 +821,76 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
772
821
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
773
822
  return writeTask(dispatch) ;
774
823
  };
824
+ /**
825
+ * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
826
+ * component lifecycle methods like `componentWillLoad` as well as
827
+ * {@link updateComponent}, which will kick off the virtual DOM re-render.
828
+ *
829
+ * @param hostRef a reference to a host DOM node
830
+ * @param isInitialLoad whether we're on the initial load or not
831
+ * @returns an empty Promise which is used to enqueue a series of operations for
832
+ * the component
833
+ */
775
834
  const dispatchHooks = (hostRef, isInitialLoad) => {
776
835
  const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
777
836
  const instance = hostRef.$lazyInstance$ ;
778
- let promise;
837
+ // We're going to use this variable together with `enqueue` to implement a
838
+ // little promise-based queue. We start out with it `undefined`. When we add
839
+ // the first function to the queue we'll set this variable to be that
840
+ // function's return value. When we attempt to add subsequent values to the
841
+ // queue we'll check that value and, if it was a `Promise`, we'll then chain
842
+ // the new function off of that `Promise` using `.then()`. This will give our
843
+ // queue two nice properties:
844
+ //
845
+ // 1. If all functions added to the queue are synchronous they'll be called
846
+ // synchronously right away.
847
+ // 2. If all functions added to the queue are asynchronous they'll all be
848
+ // called in order after `dispatchHooks` exits.
849
+ let maybePromise;
779
850
  endSchedule();
780
- return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
851
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
781
852
  };
853
+ /**
854
+ * This function uses a Promise to implement a simple first-in, first-out queue
855
+ * of functions to be called.
856
+ *
857
+ * The queue is ordered on the basis of the first argument. If it's
858
+ * `undefined`, then nothing is on the queue yet, so the provided function can
859
+ * be called synchronously (although note that this function may return a
860
+ * `Promise`). The idea is that then the return value of that enqueueing
861
+ * operation is kept around, so that if it was a `Promise` then subsequent
862
+ * functions can be enqueued by calling this function again with that `Promise`
863
+ * as the first argument.
864
+ *
865
+ * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
866
+ * @param fn a function to enqueue
867
+ * @returns either a `Promise` or the return value of the provided function
868
+ */
869
+ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
870
+ /**
871
+ * Check that a value is a `Promise`. To check, we first see if the value is an
872
+ * instance of the `Promise` global. In a few circumstances, in particular if
873
+ * the global has been overwritten, this is could be misleading, so we also do
874
+ * a little 'duck typing' check to see if the `.then` property of the value is
875
+ * defined and a function.
876
+ *
877
+ * @param maybePromise it might be a promise!
878
+ * @returns whether it is or not
879
+ */
880
+ const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
881
+ (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
882
+ /**
883
+ * Update a component given reference to its host elements and so on.
884
+ *
885
+ * @param hostRef an object containing references to the element's host node,
886
+ * VDom nodes, and other metadata
887
+ * @param instance a reference to the underlying host element where it will be
888
+ * rendered
889
+ * @param isInitialLoad whether or not this function is being called as part of
890
+ * the first render cycle
891
+ */
782
892
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
783
- // updateComponent
893
+ var _a;
784
894
  const elm = hostRef.$hostElement$;
785
895
  const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
786
896
  const rc = elm['s-rc'];
@@ -790,7 +900,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
790
900
  }
791
901
  const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
792
902
  {
793
- callRender(hostRef, instance);
903
+ callRender(hostRef, instance, elm, isInitialLoad);
794
904
  }
795
905
  if (rc) {
796
906
  // ok, so turns out there are some child host elements
@@ -802,7 +912,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
802
912
  endRender();
803
913
  endUpdate();
804
914
  {
805
- const childrenPromises = elm['s-p'];
915
+ const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
806
916
  const postUpdate = () => postUpdateComponent(hostRef);
807
917
  if (childrenPromises.length === 0) {
808
918
  postUpdate();
@@ -814,7 +924,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
814
924
  }
815
925
  }
816
926
  };
817
- const callRender = (hostRef, instance, elm) => {
927
+ /**
928
+ * Handle making the call to the VDom renderer with the proper context given
929
+ * various build variables
930
+ *
931
+ * @param hostRef an object containing references to the element's host node,
932
+ * VDom nodes, and other metadata
933
+ * @param instance a reference to the underlying host element where it will be
934
+ * rendered
935
+ * @param elm the Host element for the component
936
+ * @param isInitialLoad whether or not this function is being called as part of
937
+ * @returns an empty promise
938
+ */
939
+ const callRender = (hostRef, instance, elm, isInitialLoad) => {
818
940
  try {
819
941
  instance = instance.render() ;
820
942
  {
@@ -829,7 +951,7 @@ const callRender = (hostRef, instance, elm) => {
829
951
  // or we need to update the css class/attrs on the host element
830
952
  // DOM WRITE!
831
953
  {
832
- renderVdom(hostRef, instance);
954
+ renderVdom(hostRef, instance, isInitialLoad);
833
955
  }
834
956
  }
835
957
  }
@@ -885,9 +1007,6 @@ const appDidLoad = (who) => {
885
1007
  }
886
1008
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
887
1009
  };
888
- const then = (promise, thenFn) => {
889
- return promise && promise.then ? promise.then(thenFn) : thenFn();
890
- };
891
1010
  const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
892
1011
  ;
893
1012
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
@@ -974,12 +1093,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
974
1093
  // customElements.define('my-component', MyComponent);
975
1094
  // </script>
976
1095
  // ```
977
- // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1096
+ // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
978
1097
  // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
979
1098
  // to the value that was set inline i.e. "some-value" from above example. When
980
- // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1099
+ // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
981
1100
  //
982
- // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1101
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
983
1102
  // by connectedCallback as this attributeChangedCallback will not fire.
984
1103
  //
985
1104
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
@@ -1021,9 +1140,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1021
1140
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1022
1141
  // initializeComponent
1023
1142
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1143
+ // Let the runtime know that the component has been initialized
1144
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1024
1145
  {
1025
- // we haven't initialized this element yet
1026
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1027
1146
  // lazy loaded components
1028
1147
  // request the component's implementation to be
1029
1148
  // wired up with the host element
@@ -1087,6 +1206,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1087
1206
  schedule();
1088
1207
  }
1089
1208
  };
1209
+ const fireConnectedCallback = (instance) => {
1210
+ };
1090
1211
  const connectedCallback = (elm) => {
1091
1212
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1092
1213
  const hostRef = getHostRef(elm);
@@ -1125,12 +1246,25 @@ const connectedCallback = (elm) => {
1125
1246
  initializeComponent(elm, hostRef, cmpMeta);
1126
1247
  }
1127
1248
  }
1249
+ else {
1250
+ // fire off connectedCallback() on component instance
1251
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1252
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1253
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1254
+ }
1255
+ }
1128
1256
  endConnected();
1129
1257
  }
1130
1258
  };
1131
- const disconnectedCallback = (elm) => {
1259
+ const disconnectInstance = (instance) => {
1260
+ };
1261
+ const disconnectedCallback = async (elm) => {
1132
1262
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1133
- getHostRef(elm);
1263
+ const hostRef = getHostRef(elm);
1264
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1265
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1266
+ hostRef.$onReadyPromise$.then(() => disconnectInstance());
1267
+ }
1134
1268
  }
1135
1269
  };
1136
1270
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -2,20 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-969219be.js');
6
-
7
- /*
8
- Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
9
- */
10
- const patchEsm = () => {
11
- return index.promiseResolve();
12
- };
5
+ const index = require('./index-30ee4c25.js');
13
6
 
14
7
  const defineCustomElements = (win, options) => {
15
- if (typeof window === 'undefined') return Promise.resolve();
16
- return patchEsm().then(() => {
8
+ if (typeof window === 'undefined') return undefined;
17
9
  return index.bootstrapLazy([["mds-paginator-item.cjs",[[1,"mds-paginator-item",{"icon":[513],"selected":[516],"disabled":[516]}]]]], options);
18
- });
19
10
  };
20
11
 
21
12
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-969219be.js');
5
+ const index = require('./index-30ee4c25.js');
6
6
 
7
7
  class KeyboardManager {
8
8
  constructor() {
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-969219be.js');
5
+ const index = require('./index-30ee4c25.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.2.1 | 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-paginator-item.cjs.js', document.baseURI).href));
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "entries": [
3
- "./components/mds-paginator-item/mds-paginator-item.js"
3
+ "components/mds-paginator-item/mds-paginator-item.js"
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.22.3",
8
- "typescriptVersion": "4.9.4"
7
+ "version": "4.2.1",
8
+ "typescriptVersion": "5.1.6"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -0,0 +1,10 @@
1
+ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
2
+ if (duration.includes('s')) {
3
+ return Number(duration.replace('s', '')) * 1000;
4
+ }
5
+ if (duration.includes('ms')) {
6
+ return Number(duration.replace('s', ''));
7
+ }
8
+ return defaultValue;
9
+ };
10
+ export { cssDurationToMilliseconds, };
@@ -81,6 +81,7 @@
81
81
  }
82
82
 
83
83
  :host( :focus-visible ) {
84
+
84
85
  --magma-outline-blur-offset: var(--magma-outline-focus-offset);
85
86
  --magma-outline-blur: var(--magma-outline-focus);
86
87
  }
@@ -1,5 +1,8 @@
1
- import { Host, h } from '@stencil/core';
2
- import { KeyboardManager } from '@common/keyboard-manager';
1
+ import { Host, h } from "@stencil/core";
2
+ import { KeyboardManager } from "../../common/keyboard-manager";
3
+ /**
4
+ * @slot default - Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here.
5
+ */
3
6
  export class MdsPaginatorItem {
4
7
  constructor() {
5
8
  this.km = new KeyboardManager();
@@ -13,6 +13,10 @@ const buttonToneVariantDictionary = [
13
13
  'ghost',
14
14
  'quiet',
15
15
  ];
16
+ const buttonTargetDictionary = [
17
+ 'blank',
18
+ 'self',
19
+ ];
16
20
  const buttonSizeDictionary = [
17
21
  'sm',
18
22
  'md',
@@ -23,4 +27,4 @@ const buttonIconPositionDictionary = [
23
27
  'left',
24
28
  'right',
25
29
  ];
26
- export { buttonSizeDictionary, buttonToneVariantDictionary, buttonVariantDictionary, buttonIconPositionDictionary, };
30
+ export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonVariantDictionary, };
@@ -1,5 +1,5 @@
1
- import jsonIconsDictionary from '../fixtures/icons.json';
2
- import jsonMggIconsDictionary from '../fixtures/iconsauce.json';
1
+ import jsonIconsDictionary from "../fixtures/icons.json";
2
+ import jsonMggIconsDictionary from "../fixtures/iconsauce.json";
3
3
  const iconsDictionary = jsonIconsDictionary;
4
4
  const mggIconsDictionary = jsonMggIconsDictionary;
5
5
  export { iconsDictionary, mggIconsDictionary, };
@@ -53,6 +53,14 @@ const toneVariantDictionary = [
53
53
  'ghost',
54
54
  'quiet',
55
55
  ];
56
+ const toneActionVariantDictionary = [
57
+ 'primary',
58
+ 'secondary',
59
+ 'tertiary',
60
+ 'strong',
61
+ 'weak',
62
+ 'quiet',
63
+ ];
56
64
  const toneSimpleVariantDictionary = [
57
65
  'strong',
58
66
  'weak',
@@ -62,4 +70,4 @@ const toneMinimalVariantDictionary = [
62
70
  'strong',
63
71
  'weak',
64
72
  ];
65
- export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
73
+ export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneActionVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
@@ -1,5 +1,8 @@
1
- /* MdsPaginatorItem custom elements */
2
- export { MdsPaginatorItem as MdsPaginatorItem } from '../types/components/mds-paginator-item/mds-paginator-item';
1
+ /**
2
+ * Get the base path to where the assets can be found. Use "setAssetPath(path)"
3
+ * if the path needs to be customized.
4
+ */
5
+ export declare const getAssetPath: (path: string) => string;
3
6
 
4
7
  /**
5
8
  * Used to manually set the base path where assets can be found.
@@ -28,4 +31,3 @@ export interface SetPlatformOptions {
28
31
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
29
32
  }
30
33
  export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
31
- export * from '../types/components';
@@ -1,2 +1 @@
1
- export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
- export { MdsPaginatorItem, defineCustomElement as defineCustomElementMdsPaginatorItem } from './mds-paginator-item.js';
1
+ export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
@@ -43,7 +43,7 @@ class KeyboardManager {
43
43
 
44
44
  const mdsPaginatorItemCss = "@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.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-paginator-item-background-disabled:rgb(var(--tone-neutral-09));--mds-paginator-item-background-hover:rgb(var(--tone-neutral-08));--mds-paginator-item-background-selected:rgb(var(--brand-maggioli-03));--mds-paginator-item-background:transparent;--mds-paginator-item-color-disabled:rgb(var(--tone-neutral-06));--mds-paginator-item-color-hover:rgb(var(--tone-neutral-02));--mds-paginator-item-color-selected:rgb(var(--tone-neutral));--mds-paginator-item-color:rgb(var(--tone-neutral-02));--mds-paginator-item-radius:200px;--mds-paginator-item-shadow-disabled:none;--mds-paginator-item-shadow-hover:none;--mds-paginator-item-shadow-selected:0 0 1px 1px rgba(0, 0, 0, 0.06), 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--mds-paginator-item-shadow:none;--mds-paginator-item-size:2.25rem;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;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding-left:0.75rem;padding-right:0.75rem;-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);background-color:var(--mds-paginator-item-background);border-radius:var(--mds-paginator-item-radius);-webkit-box-shadow:var(--mds-paginator-item-shadow);box-shadow:var(--mds-paginator-item-shadow);color:var(--mds-paginator-item-color);height:var(--mds-paginator-item-size);min-width:var(--mds-paginator-item-size);-webkit-transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, box-shadow, color, outline, outline-offset;transition-property:background-color, box-shadow, color, outline, outline-offset, -webkit-box-shadow}:host(:focus-visible){--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}:host(:hover){background-color:var(--mds-paginator-item-background-hover);-webkit-box-shadow:var(--mds-paginator-item-shadow-hover);box-shadow:var(--mds-paginator-item-shadow-hover);color:var(--mds-paginator-item-color-hover);fill:var(--mds-paginator-item-color-hover)}:host([icon]){padding:0px}:host([selected]){pointer-events:none;background-color:var(--mds-paginator-item-background-selected);-webkit-box-shadow:var(--mds-paginator-item-shadow-selected);box-shadow:var(--mds-paginator-item-shadow-selected);color:var(--mds-paginator-item-color-selected);fill:var(--mds-paginator-item-color-selected)}:host([disabled]){pointer-events:none;background-color:var(--mds-paginator-item-background-disabled);-webkit-box-shadow:var(--mds-paginator-item-shadow-disabled);box-shadow:var(--mds-paginator-item-shadow-disabled);color:var(--mds-paginator-item-color-disabled);fill:var(--mds-paginator-item-color-disabled)}.icon{padding-left:0px;padding-right:0px}";
45
45
 
46
- const MdsPaginatorItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
46
+ const MdsPaginatorItem$1 = /*@__PURE__*/ proxyCustomElement(class MdsPaginatorItem extends HTMLElement {
47
47
  constructor() {
48
48
  super();
49
49
  this.__registerHost();