@jumpgroup/jump-design-system 0.2.2 → 0.2.3
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-79e97f36.js → index-12f40d28.js} +58 -8
- package/dist/cjs/index-12f40d28.js.map +1 -0
- package/dist/cjs/jump-badge.cjs.entry.js +1 -1
- package/dist/cjs/jump-button.cjs.entry.js +9 -6
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-card.cjs.entry.js +2 -2
- package/dist/cjs/jump-card.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-design-system.cjs.js +2 -2
- package/dist/cjs/jump-icon.cjs.entry.js +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js +253 -0
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js +236 -0
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button-filled.stories.js +5 -259
- package/dist/collection/components/jump-button/jump-button-filled.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js +342 -0
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button-outline.stories.js +5 -74
- package/dist/collection/components/jump-button/jump-button-outline.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-text.stories.js +289 -0
- package/dist/collection/components/jump-button/jump-button-text.stories.js.map +1 -0
- package/dist/collection/components/jump-button/jump-button.css +92 -43
- package/dist/collection/components/jump-button/jump-button.js +20 -17
- package/dist/collection/components/jump-button/jump-button.js.map +1 -1
- package/dist/collection/components/jump-button/test/jump-button.spec.js +2 -2
- package/dist/collection/components/jump-button/test/jump-button.spec.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card-border-radius.stories.js +2 -14
- package/dist/collection/components/jump-card/jump-card-border-radius.stories.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card-top-border-content-radius.stories.js +1 -2
- package/dist/collection/components/jump-card/jump-card-top-border-content-radius.stories.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card.css +50 -1
- package/dist/collection/utils/utils.js +13 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/jump-button.js +24 -20
- package/dist/components/jump-button.js.map +1 -1
- package/dist/components/jump-card.js +1 -1
- package/dist/components/jump-card.js.map +1 -1
- package/dist/esm/{index-7feee8ea.js → index-d09b8a38.js} +58 -8
- package/dist/esm/index-d09b8a38.js.map +1 -0
- package/dist/esm/jump-badge.entry.js +1 -1
- package/dist/esm/jump-button.entry.js +9 -6
- package/dist/esm/jump-button.entry.js.map +1 -1
- package/dist/esm/jump-card.entry.js +2 -2
- package/dist/esm/jump-card.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +3 -3
- package/dist/esm/jump-icon.entry.js +1 -1
- package/dist/esm/jump-pagination.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-062fa189.entry.js +2 -0
- package/dist/jump-design-system/p-062fa189.entry.js.map +1 -0
- package/dist/jump-design-system/p-407027a9.js +3 -0
- package/dist/jump-design-system/p-407027a9.js.map +1 -0
- package/dist/jump-design-system/{p-99238e3f.entry.js → p-81fba573.entry.js} +2 -2
- package/dist/jump-design-system/{p-bc02e346.entry.js → p-b2967e30.entry.js} +2 -2
- package/dist/jump-design-system/{p-ddb6c98c.entry.js → p-e0c9453d.entry.js} +2 -2
- package/dist/jump-design-system/p-fea57bd7.entry.js +2 -0
- package/dist/jump-design-system/p-fea57bd7.entry.js.map +1 -0
- package/dist/types/components/jump-button/jump-button-anchor.stories.d.ts +160 -0
- package/dist/types/components/jump-button/jump-button-dimension.stories.d.ts +158 -0
- package/dist/types/components/jump-button/jump-button-filled.stories.d.ts +0 -13
- package/dist/types/components/jump-button/jump-button-only-icon.stories.d.ts +164 -0
- package/dist/types/components/jump-button/jump-button-outline.stories.d.ts +0 -2
- package/dist/types/components/jump-button/jump-button-text.stories.d.ts +161 -0
- package/dist/types/components/jump-button/jump-button.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +2 -1
- package/package.json +1 -1
- package/dist/cjs/index-79e97f36.js.map +0 -1
- package/dist/esm/index-7feee8ea.js.map +0 -1
- package/dist/jump-design-system/p-7cfed9c6.entry.js +0 -2
- package/dist/jump-design-system/p-7cfed9c6.entry.js.map +0 -1
- package/dist/jump-design-system/p-9fd6e0a0.entry.js +0 -2
- package/dist/jump-design-system/p-9fd6e0a0.entry.js.map +0 -1
- package/dist/jump-design-system/p-c560071a.js +0 -3
- package/dist/jump-design-system/p-c560071a.js.map +0 -1
- /package/dist/jump-design-system/{p-99238e3f.entry.js.map → p-81fba573.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-bc02e346.entry.js.map → p-b2967e30.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-ddb6c98c.entry.js.map → p-e0c9453d.entry.js.map} +0 -0
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'jump-design-system';
|
|
24
|
-
const BUILD = /* jump-design-system */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad:
|
|
24
|
+
const BUILD = /* jump-design-system */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Virtual DOM patching algorithm based on Snabbdom by
|
|
@@ -31,6 +31,7 @@ const BUILD = /* jump-design-system */ { allRenderFn: true, appendChildSlotFix:
|
|
|
31
31
|
*
|
|
32
32
|
* Modified for Stencil's renderer and slot projection
|
|
33
33
|
*/
|
|
34
|
+
let scopeId;
|
|
34
35
|
let contentRef;
|
|
35
36
|
let hostTagName;
|
|
36
37
|
let useNativeShadowDom = false;
|
|
@@ -68,6 +69,7 @@ const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
|
68
69
|
* Don't add values to these!!
|
|
69
70
|
*/
|
|
70
71
|
const EMPTY_OBJ = {};
|
|
72
|
+
const isDef = (v) => v != null;
|
|
71
73
|
/**
|
|
72
74
|
* Check whether a value is a 'complex type', defined here as an object or a
|
|
73
75
|
* function.
|
|
@@ -320,8 +322,20 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
320
322
|
const attachStyles = (hostRef) => {
|
|
321
323
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
322
324
|
const elm = hostRef.$hostElement$;
|
|
325
|
+
const flags = cmpMeta.$flags$;
|
|
323
326
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
324
|
-
addStyle(elm.getRootNode(), cmpMeta);
|
|
327
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
328
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
329
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
330
|
+
// or this browser doesn't support native shadow dom
|
|
331
|
+
// and this host element was NOT created with SSR
|
|
332
|
+
// let's pick out the inner content for slot projection
|
|
333
|
+
// create a node to represent where the original
|
|
334
|
+
// content was first placed, which is useful later on
|
|
335
|
+
// DOM WRITE!!
|
|
336
|
+
elm['s-sc'] = scopeId;
|
|
337
|
+
elm.classList.add(scopeId + '-h');
|
|
338
|
+
}
|
|
325
339
|
endAttachStyles();
|
|
326
340
|
};
|
|
327
341
|
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
@@ -453,6 +467,10 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
453
467
|
// remember for later we need to check to relocate nodes
|
|
454
468
|
checkSlotRelocate = true;
|
|
455
469
|
if (newVNode.$tag$ === 'slot') {
|
|
470
|
+
if (scopeId) {
|
|
471
|
+
// scoped css needs to add its scoped id to the parent element
|
|
472
|
+
parentElm.classList.add(scopeId + '-s');
|
|
473
|
+
}
|
|
456
474
|
newVNode.$flags$ |= newVNode.$children$
|
|
457
475
|
? // slot element has fallback content
|
|
458
476
|
2 /* VNODE_FLAGS.isSlotFallback */
|
|
@@ -478,10 +496,15 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
478
496
|
{
|
|
479
497
|
updateElement(null, newVNode, isSvgMode);
|
|
480
498
|
}
|
|
499
|
+
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
500
|
+
// if there is a scopeId and this is the initial render
|
|
501
|
+
// then let's add the scopeId as a css class
|
|
502
|
+
elm.classList.add((elm['s-si'] = scopeId));
|
|
503
|
+
}
|
|
481
504
|
if (newVNode.$children$) {
|
|
482
505
|
for (i = 0; i < newVNode.$children$.length; ++i) {
|
|
483
506
|
// create the node
|
|
484
|
-
childNode = createElm(oldParentVNode, newVNode, i);
|
|
507
|
+
childNode = createElm(oldParentVNode, newVNode, i, elm);
|
|
485
508
|
// return node could have been null
|
|
486
509
|
if (childNode) {
|
|
487
510
|
// append our new node
|
|
@@ -565,9 +588,12 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
565
588
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
566
589
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
567
590
|
let childNode;
|
|
591
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
592
|
+
containerElm = containerElm.shadowRoot;
|
|
593
|
+
}
|
|
568
594
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
569
595
|
if (vnodes[startIdx]) {
|
|
570
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
596
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
571
597
|
if (childNode) {
|
|
572
598
|
vnodes[startIdx].$elm$ = childNode;
|
|
573
599
|
containerElm.insertBefore(childNode, referenceNode(before) );
|
|
@@ -818,7 +844,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
|
|
|
818
844
|
elmToMove = oldCh[idxInOld];
|
|
819
845
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
820
846
|
// the tag doesn't match so we'll need a new DOM element
|
|
821
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
847
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
822
848
|
}
|
|
823
849
|
else {
|
|
824
850
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
@@ -834,7 +860,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
|
|
|
834
860
|
// the key of the first new child OR the build is not using `key`
|
|
835
861
|
// attributes at all. In either case we need to create a new element
|
|
836
862
|
// for the new node.
|
|
837
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
863
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
838
864
|
newStartVnode = newCh[++newStartIdx];
|
|
839
865
|
}
|
|
840
866
|
if (node) {
|
|
@@ -1187,7 +1213,10 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1187
1213
|
rootVnode.$tag$ = null;
|
|
1188
1214
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
1189
1215
|
hostRef.$vnode$ = rootVnode;
|
|
1190
|
-
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
|
|
1216
|
+
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
1217
|
+
{
|
|
1218
|
+
scopeId = hostElm['s-sc'];
|
|
1219
|
+
}
|
|
1191
1220
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
1192
1221
|
{
|
|
1193
1222
|
contentRef = hostElm['s-cr'];
|
|
@@ -1342,6 +1371,16 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1342
1371
|
// 2. If all functions added to the queue are asynchronous they'll all be
|
|
1343
1372
|
// called in order after `dispatchHooks` exits.
|
|
1344
1373
|
let maybePromise;
|
|
1374
|
+
if (isInitialLoad) {
|
|
1375
|
+
{
|
|
1376
|
+
// If `componentWillLoad` returns a `Promise` then we want to wait on
|
|
1377
|
+
// whatever's going on in that `Promise` before we launch into
|
|
1378
|
+
// rendering the component, doing other lifecycle stuff, etc. So
|
|
1379
|
+
// in that case we assign the returned promise to the variable we
|
|
1380
|
+
// declared above to hold a possible 'queueing' Promise
|
|
1381
|
+
maybePromise = safeCall(instance, 'componentWillLoad');
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1345
1384
|
endSchedule();
|
|
1346
1385
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1347
1386
|
};
|
|
@@ -1906,6 +1945,17 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1906
1945
|
super(self);
|
|
1907
1946
|
self = this;
|
|
1908
1947
|
registerHost(self, cmpMeta);
|
|
1948
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1949
|
+
// this component is using shadow dom
|
|
1950
|
+
// and this browser supports shadow dom
|
|
1951
|
+
// add the read-only property "shadowRoot" to the host element
|
|
1952
|
+
// adding the shadow root build conditionals to minimize runtime
|
|
1953
|
+
{
|
|
1954
|
+
{
|
|
1955
|
+
self.attachShadow({ mode: 'open' });
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1909
1959
|
}
|
|
1910
1960
|
connectedCallback() {
|
|
1911
1961
|
if (appLoadFallback) {
|
|
@@ -2129,4 +2179,4 @@ exports.promiseResolve = promiseResolve;
|
|
|
2129
2179
|
exports.registerInstance = registerInstance;
|
|
2130
2180
|
exports.setNonce = setNonce;
|
|
2131
2181
|
|
|
2132
|
-
//# sourceMappingURL=index-
|
|
2182
|
+
//# sourceMappingURL=index-12f40d28.js.map
|