@maggioli-design-system/mds-list 3.2.0 → 3.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.
- package/dist/cjs/{index-9b88f3c8.js → index-8b891baa.js} +138 -21
- package/dist/cjs/loader.cjs.js +2 -11
- package/dist/cjs/mds-list.cjs.entry.js +1 -1
- package/dist/cjs/mds-list.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/common/aria.js +4 -2
- package/dist/collection/common/keyboard-manager.js +1 -1
- package/dist/collection/common/unit.js +10 -0
- package/dist/collection/components/mds-list/mds-list.js +4 -1
- package/dist/collection/components/mds-list/test/mds-list.stories.js +1 -1
- package/dist/collection/dictionary/button.js +5 -1
- package/dist/collection/dictionary/icon.js +2 -2
- package/dist/collection/dictionary/variant.js +9 -1
- package/dist/components/index.d.ts +5 -3
- package/dist/components/index.js +1 -2
- package/dist/components/mds-list.js +1 -1
- package/dist/documentation.d.ts +421 -0
- package/dist/documentation.json +39 -0
- package/dist/esm/{index-35c9c7b9.js → index-fc613209.js} +138 -21
- package/dist/esm/loader.js +3 -12
- package/dist/esm/mds-list.entry.js +1 -1
- package/dist/esm/mds-list.js +3 -3
- package/dist/esm-es5/index-fc613209.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-list.entry.js +1 -1
- package/dist/esm-es5/mds-list.js +1 -1
- package/dist/mds-list/mds-list.esm.js +1 -1
- package/dist/mds-list/mds-list.js +2 -6
- package/dist/mds-list/p-21fac44b.js +2 -0
- package/dist/mds-list/p-39e961ff.system.js +2 -0
- package/dist/mds-list/{p-7981ed9e.system.js → p-8f9f276f.system.js} +1 -1
- package/dist/mds-list/{p-be44e136.entry.js → p-f2362255.entry.js} +1 -1
- package/dist/mds-list/{p-8a953f63.system.entry.js → p-f2f76a70.system.entry.js} +1 -1
- package/dist/stats.json +59 -51
- package/dist/types/common/unit.d.ts +2 -0
- package/dist/types/components/mds-list/mds-list.d.ts +3 -0
- package/dist/types/dictionary/button.d.ts +2 -1
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/interface/input-value.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +32 -17
- package/dist/types/{types → type}/button.d.ts +1 -0
- package/dist/types/{types → type}/variant.d.ts +1 -0
- package/documentation.json +381 -0
- package/loader/index.d.ts +2 -2
- package/package.json +11 -5
- package/readme.md +7 -0
- package/src/common/aria.ts +2 -2
- package/src/common/keyboard-manager.ts +1 -1
- package/src/common/unit.ts +14 -0
- package/src/components/mds-list/mds-list.tsx +4 -0
- package/src/components/mds-list/readme.md +7 -0
- package/src/dictionary/button.ts +7 -1
- package/src/dictionary/variant.ts +10 -0
- package/src/fixtures/icons.json +40 -0
- package/src/fixtures/iconsauce.json +38 -0
- package/src/interface/input-value.ts +1 -1
- package/src/{types → type}/button.ts +4 -0
- package/src/{types → type}/variant.ts +9 -0
- package/www/build/mds-list.esm.js +1 -1
- package/www/build/mds-list.js +2 -6
- package/www/build/p-21fac44b.js +2 -0
- package/www/build/p-39e961ff.system.js +2 -0
- package/www/build/{p-7981ed9e.system.js → p-8f9f276f.system.js} +1 -1
- package/www/build/{p-be44e136.entry.js → p-f2362255.entry.js} +1 -1
- package/www/build/{p-8a953f63.system.entry.js → p-f2f76a70.system.entry.js} +1 -1
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm-es5/index-35c9c7b9.js +0 -2
- package/dist/mds-list/p-41726a86.js +0 -2
- package/dist/mds-list/p-f9c13cf7.system.js +0 -2
- package/www/build/p-41726a86.js +0 -2
- package/www/build/p-f9c13cf7.system.js +0 -2
- /package/dist/collection/{types → type}/autocomplete.js +0 -0
- /package/dist/collection/{types → type}/button.js +0 -0
- /package/dist/collection/{types → type}/floating-ui.js +0 -0
- /package/dist/collection/{types → type}/form-rel.js +0 -0
- /package/dist/collection/{types → type}/input-text-type.js +0 -0
- /package/dist/collection/{types → type}/input-value-type.js +0 -0
- /package/dist/collection/{types → type}/loading.js +0 -0
- /package/dist/collection/{types → type}/typography.js +0 -0
- /package/dist/collection/{types → type}/variant.js +0 -0
- /package/dist/types/{types → type}/autocomplete.d.ts +0 -0
- /package/dist/types/{types → type}/floating-ui.d.ts +0 -0
- /package/dist/types/{types → type}/form-rel.d.ts +0 -0
- /package/dist/types/{types → type}/input-text-type.d.ts +0 -0
- /package/dist/types/{types → type}/input-value-type.d.ts +0 -0
- /package/dist/types/{types → type}/loading.d.ts +0 -0
- /package/dist/types/{types → type}/typography.d.ts +0 -0
- /package/src/{types → type}/autocomplete.ts +0 -0
- /package/src/{types → type}/floating-ui.ts +0 -0
- /package/src/{types → type}/form-rel.ts +0 -0
- /package/src/{types → type}/input-text-type.ts +0 -0
- /package/src/{types → type}/input-value-type.ts +0 -0
- /package/src/{types → type}/loading.ts +0 -0
- /package/src/{types → type}/typography.ts +0 -0
|
@@ -49,6 +49,13 @@ const uniqueTime = (key, measureText) => {
|
|
|
49
49
|
};
|
|
50
50
|
const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
|
|
51
51
|
const isDef = (v) => v != null;
|
|
52
|
+
/**
|
|
53
|
+
* Check whether a value is a 'complex type', defined here as an object or a
|
|
54
|
+
* function.
|
|
55
|
+
*
|
|
56
|
+
* @param o the value to check
|
|
57
|
+
* @returns whether it's a complex type or not
|
|
58
|
+
*/
|
|
52
59
|
const isComplexType = (o) => {
|
|
53
60
|
// https://jsperf.com/typeof-fn-object/5
|
|
54
61
|
o = typeof o;
|
|
@@ -166,9 +173,9 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
166
173
|
}
|
|
167
174
|
styles.set(scopeId, style);
|
|
168
175
|
};
|
|
169
|
-
const addStyle = (styleContainerNode, cmpMeta, mode
|
|
176
|
+
const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
170
177
|
var _a;
|
|
171
|
-
|
|
178
|
+
const scopeId = getScopeId(cmpMeta);
|
|
172
179
|
const style = styles.get(scopeId);
|
|
173
180
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
174
181
|
// so the fallback is to always use the document for the root node in those cases
|
|
@@ -183,10 +190,8 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
183
190
|
}
|
|
184
191
|
if (!appliedStyles.has(scopeId)) {
|
|
185
192
|
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
styleElm.innerHTML = style;
|
|
189
|
-
}
|
|
193
|
+
styleElm = doc.createElement('style');
|
|
194
|
+
styleElm.innerHTML = style;
|
|
190
195
|
// Apply CSP nonce to the style tag if it exists
|
|
191
196
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
192
197
|
if (nonce != null) {
|
|
@@ -324,12 +329,39 @@ const patch = (oldVNode, newVNode) => {
|
|
|
324
329
|
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
325
330
|
* the DOM node into which it should be rendered.
|
|
326
331
|
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
332
|
+
* @param isInitialLoad whether or not this is the first call after page load
|
|
327
333
|
*/
|
|
328
|
-
const renderVdom = (hostRef, renderFnResults) => {
|
|
334
|
+
const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
329
335
|
const hostElm = hostRef.$hostElement$;
|
|
330
336
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
337
|
+
// if `renderFnResults` is a Host node then we can use it directly. If not,
|
|
338
|
+
// we need to call `h` again to wrap the children of our component in a
|
|
339
|
+
// 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
|
|
340
|
+
// implicitly that the top-level vdom node is 1) an only child and 2)
|
|
341
|
+
// contains attrs that need to be set on the host element.
|
|
331
342
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
332
343
|
hostTagName = hostElm.tagName;
|
|
344
|
+
// On the first render and *only* on the first render we want to check for
|
|
345
|
+
// any attributes set on the host element which are also set on the vdom
|
|
346
|
+
// node. If we find them, we override the value on the VDom node attrs with
|
|
347
|
+
// the value from the host element, which allows developers building apps
|
|
348
|
+
// with Stencil components to override e.g. the `role` attribute on a
|
|
349
|
+
// component even if it's already set on the `Host`.
|
|
350
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
351
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
352
|
+
// We have a special implementation in `setAccessor` for `style` and
|
|
353
|
+
// `class` which reconciles values coming from the VDom with values
|
|
354
|
+
// already present on the DOM element, so we don't want to override those
|
|
355
|
+
// attributes on the VDom tree with values from the host element if they
|
|
356
|
+
// are present.
|
|
357
|
+
//
|
|
358
|
+
// Likewise, `ref` and `key` are special internal values for the Stencil
|
|
359
|
+
// runtime and we don't want to override those either.
|
|
360
|
+
if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
|
|
361
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
333
365
|
rootVnode.$tag$ = null;
|
|
334
366
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
335
367
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -357,15 +389,76 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
357
389
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
358
390
|
return writeTask(dispatch) ;
|
|
359
391
|
};
|
|
392
|
+
/**
|
|
393
|
+
* Dispatch initial-render and update lifecycle hooks, enqueuing calls to
|
|
394
|
+
* component lifecycle methods like `componentWillLoad` as well as
|
|
395
|
+
* {@link updateComponent}, which will kick off the virtual DOM re-render.
|
|
396
|
+
*
|
|
397
|
+
* @param hostRef a reference to a host DOM node
|
|
398
|
+
* @param isInitialLoad whether we're on the initial load or not
|
|
399
|
+
* @returns an empty Promise which is used to enqueue a series of operations for
|
|
400
|
+
* the component
|
|
401
|
+
*/
|
|
360
402
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
361
403
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
362
404
|
const instance = hostRef.$lazyInstance$ ;
|
|
363
|
-
|
|
405
|
+
// We're going to use this variable together with `enqueue` to implement a
|
|
406
|
+
// little promise-based queue. We start out with it `undefined`. When we add
|
|
407
|
+
// the first function to the queue we'll set this variable to be that
|
|
408
|
+
// function's return value. When we attempt to add subsequent values to the
|
|
409
|
+
// queue we'll check that value and, if it was a `Promise`, we'll then chain
|
|
410
|
+
// the new function off of that `Promise` using `.then()`. This will give our
|
|
411
|
+
// queue two nice properties:
|
|
412
|
+
//
|
|
413
|
+
// 1. If all functions added to the queue are synchronous they'll be called
|
|
414
|
+
// synchronously right away.
|
|
415
|
+
// 2. If all functions added to the queue are asynchronous they'll all be
|
|
416
|
+
// called in order after `dispatchHooks` exits.
|
|
417
|
+
let maybePromise;
|
|
364
418
|
endSchedule();
|
|
365
|
-
return
|
|
419
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
366
420
|
};
|
|
421
|
+
/**
|
|
422
|
+
* This function uses a Promise to implement a simple first-in, first-out queue
|
|
423
|
+
* of functions to be called.
|
|
424
|
+
*
|
|
425
|
+
* The queue is ordered on the basis of the first argument. If it's
|
|
426
|
+
* `undefined`, then nothing is on the queue yet, so the provided function can
|
|
427
|
+
* be called synchronously (although note that this function may return a
|
|
428
|
+
* `Promise`). The idea is that then the return value of that enqueueing
|
|
429
|
+
* operation is kept around, so that if it was a `Promise` then subsequent
|
|
430
|
+
* functions can be enqueued by calling this function again with that `Promise`
|
|
431
|
+
* as the first argument.
|
|
432
|
+
*
|
|
433
|
+
* @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
|
|
434
|
+
* @param fn a function to enqueue
|
|
435
|
+
* @returns either a `Promise` or the return value of the provided function
|
|
436
|
+
*/
|
|
437
|
+
const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
|
438
|
+
/**
|
|
439
|
+
* Check that a value is a `Promise`. To check, we first see if the value is an
|
|
440
|
+
* instance of the `Promise` global. In a few circumstances, in particular if
|
|
441
|
+
* the global has been overwritten, this is could be misleading, so we also do
|
|
442
|
+
* a little 'duck typing' check to see if the `.then` property of the value is
|
|
443
|
+
* defined and a function.
|
|
444
|
+
*
|
|
445
|
+
* @param maybePromise it might be a promise!
|
|
446
|
+
* @returns whether it is or not
|
|
447
|
+
*/
|
|
448
|
+
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
|
449
|
+
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
|
450
|
+
/**
|
|
451
|
+
* Update a component given reference to its host elements and so on.
|
|
452
|
+
*
|
|
453
|
+
* @param hostRef an object containing references to the element's host node,
|
|
454
|
+
* VDom nodes, and other metadata
|
|
455
|
+
* @param instance a reference to the underlying host element where it will be
|
|
456
|
+
* rendered
|
|
457
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
458
|
+
* the first render cycle
|
|
459
|
+
*/
|
|
367
460
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
368
|
-
|
|
461
|
+
var _a;
|
|
369
462
|
const elm = hostRef.$hostElement$;
|
|
370
463
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
371
464
|
const rc = elm['s-rc'];
|
|
@@ -375,7 +468,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
375
468
|
}
|
|
376
469
|
const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
377
470
|
{
|
|
378
|
-
callRender(hostRef, instance);
|
|
471
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
379
472
|
}
|
|
380
473
|
if (rc) {
|
|
381
474
|
// ok, so turns out there are some child host elements
|
|
@@ -387,7 +480,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
387
480
|
endRender();
|
|
388
481
|
endUpdate();
|
|
389
482
|
{
|
|
390
|
-
const childrenPromises = elm['s-p'];
|
|
483
|
+
const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
|
|
391
484
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
392
485
|
if (childrenPromises.length === 0) {
|
|
393
486
|
postUpdate();
|
|
@@ -399,7 +492,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
399
492
|
}
|
|
400
493
|
}
|
|
401
494
|
};
|
|
402
|
-
|
|
495
|
+
/**
|
|
496
|
+
* Handle making the call to the VDom renderer with the proper context given
|
|
497
|
+
* various build variables
|
|
498
|
+
*
|
|
499
|
+
* @param hostRef an object containing references to the element's host node,
|
|
500
|
+
* VDom nodes, and other metadata
|
|
501
|
+
* @param instance a reference to the underlying host element where it will be
|
|
502
|
+
* rendered
|
|
503
|
+
* @param elm the Host element for the component
|
|
504
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
505
|
+
* @returns an empty promise
|
|
506
|
+
*/
|
|
507
|
+
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
403
508
|
try {
|
|
404
509
|
instance = instance.render() ;
|
|
405
510
|
{
|
|
@@ -411,7 +516,7 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
411
516
|
// or we need to update the css class/attrs on the host element
|
|
412
517
|
// DOM WRITE!
|
|
413
518
|
{
|
|
414
|
-
renderVdom(hostRef, instance);
|
|
519
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
415
520
|
}
|
|
416
521
|
}
|
|
417
522
|
}
|
|
@@ -467,9 +572,6 @@ const appDidLoad = (who) => {
|
|
|
467
572
|
}
|
|
468
573
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
469
574
|
};
|
|
470
|
-
const then = (promise, thenFn) => {
|
|
471
|
-
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
472
|
-
};
|
|
473
575
|
const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
|
|
474
576
|
;
|
|
475
577
|
/**
|
|
@@ -488,9 +590,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
488
590
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
489
591
|
// initializeComponent
|
|
490
592
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
593
|
+
// Let the runtime know that the component has been initialized
|
|
594
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
491
595
|
{
|
|
492
|
-
// we haven't initialized this element yet
|
|
493
|
-
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
494
596
|
// lazy loaded components
|
|
495
597
|
// request the component's implementation to be
|
|
496
598
|
// wired up with the host element
|
|
@@ -541,6 +643,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
541
643
|
schedule();
|
|
542
644
|
}
|
|
543
645
|
};
|
|
646
|
+
const fireConnectedCallback = (instance) => {
|
|
647
|
+
};
|
|
544
648
|
const connectedCallback = (elm) => {
|
|
545
649
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
546
650
|
const hostRef = getHostRef(elm);
|
|
@@ -568,12 +672,25 @@ const connectedCallback = (elm) => {
|
|
|
568
672
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
569
673
|
}
|
|
570
674
|
}
|
|
675
|
+
else {
|
|
676
|
+
// fire off connectedCallback() on component instance
|
|
677
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
|
|
678
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
679
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
|
680
|
+
}
|
|
681
|
+
}
|
|
571
682
|
endConnected();
|
|
572
683
|
}
|
|
573
684
|
};
|
|
574
|
-
const
|
|
685
|
+
const disconnectInstance = (instance) => {
|
|
686
|
+
};
|
|
687
|
+
const disconnectedCallback = async (elm) => {
|
|
575
688
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
576
|
-
getHostRef(elm);
|
|
689
|
+
const hostRef = getHostRef(elm);
|
|
690
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
|
|
691
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
692
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
693
|
+
}
|
|
577
694
|
}
|
|
578
695
|
};
|
|
579
696
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,20 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
9
|
-
*/
|
|
10
|
-
const patchEsm = () => {
|
|
11
|
-
return index.promiseResolve();
|
|
12
|
-
};
|
|
5
|
+
const index = require('./index-8b891baa.js');
|
|
13
6
|
|
|
14
7
|
const defineCustomElements = (win, options) => {
|
|
15
|
-
if (typeof window === 'undefined') return
|
|
16
|
-
return patchEsm().then(() => {
|
|
8
|
+
if (typeof window === 'undefined') return undefined;
|
|
17
9
|
return index.bootstrapLazy([["mds-list.cjs",[[1,"mds-list"]]]], 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-
|
|
5
|
+
const index = require('./index-8b891baa.js');
|
|
6
6
|
|
|
7
7
|
const mdsListCss = ".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{display:grid;gap:1rem;padding-left:1rem}ul{margin:0px;padding:0px}";
|
|
8
8
|
|
package/dist/cjs/mds-list.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-8b891baa.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser
|
|
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-list.cjs.js', document.baseURI).href));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
-
"
|
|
3
|
+
"components/mds-list/mds-list.js"
|
|
4
4
|
],
|
|
5
5
|
"compiler": {
|
|
6
6
|
"name": "@stencil/core",
|
|
7
|
-
"version": "2.
|
|
8
|
-
"typescriptVersion": "
|
|
7
|
+
"version": "4.2.1",
|
|
8
|
+
"typescriptVersion": "5.1.6"
|
|
9
9
|
},
|
|
10
10
|
"collections": [],
|
|
11
11
|
"bundles": []
|
|
@@ -6,11 +6,13 @@ const hash = (s) => {
|
|
|
6
6
|
return h.toString();
|
|
7
7
|
};
|
|
8
8
|
const unslugName = (name) => {
|
|
9
|
-
|
|
9
|
+
var _a, _b, _c;
|
|
10
|
+
return (_c = (_b = (_a = name.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()) === null || _b === void 0 ? void 0 : _b.replace(/-/g, ' ')) !== null && _c !== void 0 ? _c : name;
|
|
10
11
|
};
|
|
11
12
|
const setAttributeIfEmpty = (element, attribute, value) => {
|
|
13
|
+
var _a;
|
|
12
14
|
if (element.hasAttribute(attribute)) {
|
|
13
|
-
return element.getAttribute(attribute);
|
|
15
|
+
return (_a = element.getAttribute(attribute)) !== null && _a !== void 0 ? _a : '';
|
|
14
16
|
}
|
|
15
17
|
element.setAttribute(attribute, value);
|
|
16
18
|
return value;
|
|
@@ -31,7 +31,7 @@ export class KeyboardManager {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
this.detachEscapeBehavior = () => {
|
|
34
|
-
this.escapeCallback =
|
|
34
|
+
this.escapeCallback = () => { return; };
|
|
35
35
|
if (typeof window !== undefined) {
|
|
36
36
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
37
|
}
|
|
@@ -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, };
|
|
@@ -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,
|
|
30
|
+
export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonVariantDictionary, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import jsonIconsDictionary from
|
|
2
|
-
import jsonMggIconsDictionary from
|
|
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
|
-
|
|
2
|
-
|
|
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';
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
-
export { MdsList, defineCustomElement as defineCustomElementMdsList } from './mds-list.js';
|
|
1
|
+
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
|
|
3
3
|
const mdsListCss = ".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{display:grid;gap:1rem;padding-left:1rem}ul{margin:0px;padding:0px}";
|
|
4
4
|
|
|
5
|
-
const MdsList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
5
|
+
const MdsList$1 = /*@__PURE__*/ proxyCustomElement(class MdsList extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|