smoothly 1.0.0-alpha.63 → 1.0.0-alpha.65
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-8adc5c1b.js → index-43af753b.js} +55 -2
- package/dist/cjs/index-43af753b.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{redirect-27d21fcc.js → redirect-aecfeda0.js} +2 -2
- package/dist/cjs/{redirect-27d21fcc.js.map → redirect-aecfeda0.js.map} +1 -1
- package/dist/cjs/{smoothly-accordion_64.cjs.entry.js → smoothly-accordion_66.cjs.entry.js} +402 -195
- package/dist/cjs/smoothly-accordion_66.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-address-display.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-address.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-addresses.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-color.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-country.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-display-date-time.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-reorder.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +1 -1
- package/dist/cjs/smoothly.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/display-demo/index.js +1 -1
- package/dist/collection/components/display-demo/index.js.map +1 -1
- package/dist/collection/components/form/index.js +1 -1
- package/dist/collection/components/form/index.js.map +1 -1
- package/dist/collection/components/icon/index.js +6 -10
- package/dist/collection/components/icon/index.js.map +1 -1
- package/dist/collection/components/input/date/range/index.js +0 -1
- package/dist/collection/components/input/date/range/index.js.map +1 -1
- package/dist/collection/components/input/demo/index.js +1 -3
- package/dist/collection/components/input/demo/index.js.map +1 -1
- package/dist/collection/components/picker/demo/index.js +78 -0
- package/dist/collection/components/picker/demo/index.js.map +1 -0
- package/dist/collection/components/picker/demo/style.css +7 -0
- package/dist/collection/components/picker/index.js +64 -73
- package/dist/collection/components/picker/index.js.map +1 -1
- package/dist/collection/components/picker/menu/index.js +149 -58
- package/dist/collection/components/picker/menu/index.js.map +1 -1
- package/dist/collection/components/picker/menu/style.css +12 -31
- package/dist/collection/components/picker/option/index.js +67 -68
- package/dist/collection/components/picker/option/index.js.map +1 -1
- package/dist/collection/components/picker/option/style.css +13 -14
- package/dist/collection/components/picker/slot-elements/index.js +109 -0
- package/dist/collection/components/picker/slot-elements/index.js.map +1 -0
- package/dist/collection/components/picker/slot-elements/style.css +3 -0
- package/dist/collection/components/picker/slotted-elements/index.js +84 -0
- package/dist/collection/components/picker/slotted-elements/index.js.map +1 -0
- package/dist/collection/components/picker/slotted-elements/style.css +3 -0
- package/dist/collection/components/picker/style.css +6 -20
- package/dist/collection/model/Notice.js +1 -1
- package/dist/collection/model/Notice.js.map +1 -1
- package/dist/collection/model/Option.js.map +1 -1
- package/dist/custom-elements/index.d.ts +18 -6
- package/dist/custom-elements/index.js +425 -213
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{index-6ac4212d.js → index-258984d3.js} +55 -2
- package/dist/esm/index-258984d3.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{redirect-ef0be9e9.js → redirect-1e0be743.js} +2 -2
- package/dist/esm/{redirect-ef0be9e9.js.map → redirect-1e0be743.js.map} +1 -1
- package/dist/esm/{smoothly-accordion_64.entry.js → smoothly-accordion_66.entry.js} +400 -195
- package/dist/esm/smoothly-accordion_66.entry.js.map +1 -0
- package/dist/esm/smoothly-address-display.entry.js +1 -1
- package/dist/esm/smoothly-address.entry.js +1 -1
- package/dist/esm/smoothly-addresses.entry.js +1 -1
- package/dist/esm/smoothly-color.entry.js +1 -1
- package/dist/esm/smoothly-country.entry.js +1 -1
- package/dist/esm/smoothly-display-date-time.entry.js +1 -1
- package/dist/esm/smoothly-google-font.entry.js +1 -1
- package/dist/esm/smoothly-radio-group.entry.js +1 -1
- package/dist/esm/smoothly-reorder.entry.js +1 -1
- package/dist/esm/smoothly-trigger-sink.entry.js +1 -1
- package/dist/esm/smoothly-trigger-source.entry.js +1 -1
- package/dist/esm/smoothly.js +3 -3
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/{p-04fb45e1.entry.js → p-12182a73.entry.js} +2 -2
- package/dist/smoothly/{p-ae33d7e1.entry.js → p-1244744c.entry.js} +2 -2
- package/dist/smoothly/{p-49ce4ef4.entry.js → p-1bae4997.entry.js} +2 -2
- package/dist/smoothly/p-1bae4997.entry.js.map +1 -0
- package/dist/smoothly/p-47151a53.entry.js +2 -0
- package/dist/smoothly/{p-8b08019e.js → p-4eff8c31.js} +2 -2
- package/dist/smoothly/{p-8b08019e.js.map → p-4eff8c31.js.map} +1 -1
- package/dist/smoothly/p-5e387578.js +3 -0
- package/dist/smoothly/p-5e387578.js.map +1 -0
- package/dist/smoothly/{p-16cba662.entry.js → p-66e9a8b1.entry.js} +2 -2
- package/dist/smoothly/{p-0fec28cc.entry.js → p-6aebb818.entry.js} +2 -2
- package/dist/smoothly/{p-15898b2f.entry.js → p-70dede91.entry.js} +2 -2
- package/dist/smoothly/{p-ae467192.entry.js → p-7bf147bf.entry.js} +2 -2
- package/dist/smoothly/{p-49221a9d.entry.js → p-863ff3c6.entry.js} +2 -2
- package/dist/smoothly/{p-b3eef141.entry.js → p-b3eac6af.entry.js} +2 -2
- package/dist/smoothly/{p-3a6873ed.entry.js → p-cb493516.entry.js} +2 -2
- package/dist/smoothly/{p-3e485d3a.entry.js → p-eef1c80b.entry.js} +2 -2
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/smoothly/smoothly.esm.js.map +1 -1
- package/dist/types/components/icon/index.d.ts +1 -4
- package/dist/types/components/picker/demo/index.d.ts +17 -0
- package/dist/types/components/picker/index.d.ts +10 -7
- package/dist/types/components/picker/menu/index.d.ts +23 -10
- package/dist/types/components/picker/option/index.d.ts +7 -6
- package/dist/types/components/picker/slot-elements/index.d.ts +15 -0
- package/dist/types/components/picker/slotted-elements/index.d.ts +8 -0
- package/dist/types/components.d.ts +64 -27
- package/dist/types/model/Notice.d.ts +1 -1
- package/dist/types/model/Option.d.ts +14 -2
- package/package.json +1 -1
- package/dist/cjs/index-8adc5c1b.js.map +0 -1
- package/dist/cjs/smoothly-accordion_64.cjs.entry.js.map +0 -1
- package/dist/collection/components/picker/testing/index.js +0 -30
- package/dist/collection/components/picker/testing/index.js.map +0 -1
- package/dist/collection/components/picker/testing/style.css +0 -0
- package/dist/esm/index-6ac4212d.js.map +0 -1
- package/dist/esm/smoothly-accordion_64.entry.js.map +0 -1
- package/dist/smoothly/p-49ce4ef4.entry.js.map +0 -1
- package/dist/smoothly/p-b98cd447.js +0 -3
- package/dist/smoothly/p-b98cd447.js.map +0 -1
- package/dist/smoothly/p-f29cc9ff.entry.js +0 -2
- package/dist/types/components/picker/testing/index.d.ts +0 -7
- /package/dist/smoothly/{p-04fb45e1.entry.js.map → p-12182a73.entry.js.map} +0 -0
- /package/dist/smoothly/{p-ae33d7e1.entry.js.map → p-1244744c.entry.js.map} +0 -0
- /package/dist/smoothly/{p-f29cc9ff.entry.js.map → p-47151a53.entry.js.map} +0 -0
- /package/dist/smoothly/{p-16cba662.entry.js.map → p-66e9a8b1.entry.js.map} +0 -0
- /package/dist/smoothly/{p-0fec28cc.entry.js.map → p-6aebb818.entry.js.map} +0 -0
- /package/dist/smoothly/{p-15898b2f.entry.js.map → p-70dede91.entry.js.map} +0 -0
- /package/dist/smoothly/{p-ae467192.entry.js.map → p-7bf147bf.entry.js.map} +0 -0
- /package/dist/smoothly/{p-49221a9d.entry.js.map → p-863ff3c6.entry.js.map} +0 -0
- /package/dist/smoothly/{p-b3eef141.entry.js.map → p-b3eac6af.entry.js.map} +0 -0
- /package/dist/smoothly/{p-3a6873ed.entry.js.map → p-cb493516.entry.js.map} +0 -0
- /package/dist/smoothly/{p-3e485d3a.entry.js.map → p-eef1c80b.entry.js.map} +0 -0
|
@@ -96,6 +96,7 @@ function queryNonceMetaTagContent(doc) {
|
|
|
96
96
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
97
97
|
const h = (nodeName, vnodeData, ...children) => {
|
|
98
98
|
let child = null;
|
|
99
|
+
let key = null;
|
|
99
100
|
let slotName = null;
|
|
100
101
|
let simple = false;
|
|
101
102
|
let lastSimple = false;
|
|
@@ -124,6 +125,10 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
124
125
|
};
|
|
125
126
|
walk(children);
|
|
126
127
|
if (vnodeData) {
|
|
128
|
+
// normalize class / classname attributes
|
|
129
|
+
if (vnodeData.key) {
|
|
130
|
+
key = vnodeData.key;
|
|
131
|
+
}
|
|
127
132
|
if (vnodeData.name) {
|
|
128
133
|
slotName = vnodeData.name;
|
|
129
134
|
}
|
|
@@ -148,6 +153,9 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
148
153
|
if (vNodeChildren.length > 0) {
|
|
149
154
|
vnode.$children$ = vNodeChildren;
|
|
150
155
|
}
|
|
156
|
+
{
|
|
157
|
+
vnode.$key$ = key;
|
|
158
|
+
}
|
|
151
159
|
{
|
|
152
160
|
vnode.$name$ = slotName;
|
|
153
161
|
}
|
|
@@ -172,6 +180,9 @@ const newVNode = (tag, text) => {
|
|
|
172
180
|
{
|
|
173
181
|
vnode.$attrs$ = null;
|
|
174
182
|
}
|
|
183
|
+
{
|
|
184
|
+
vnode.$key$ = null;
|
|
185
|
+
}
|
|
175
186
|
{
|
|
176
187
|
vnode.$name$ = null;
|
|
177
188
|
}
|
|
@@ -434,6 +445,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
434
445
|
}
|
|
435
446
|
}
|
|
436
447
|
}
|
|
448
|
+
else if (memberName === 'key')
|
|
449
|
+
;
|
|
437
450
|
else if (memberName === 'ref') {
|
|
438
451
|
// minifier will clean this up
|
|
439
452
|
if (newValue) {
|
|
@@ -807,6 +820,8 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
807
820
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
808
821
|
let oldStartIdx = 0;
|
|
809
822
|
let newStartIdx = 0;
|
|
823
|
+
let idxInOld = 0;
|
|
824
|
+
let i = 0;
|
|
810
825
|
let oldEndIdx = oldCh.length - 1;
|
|
811
826
|
let oldStartVnode = oldCh[0];
|
|
812
827
|
let oldEndVnode = oldCh[oldEndIdx];
|
|
@@ -814,6 +829,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
814
829
|
let newStartVnode = newCh[0];
|
|
815
830
|
let newEndVnode = newCh[newEndIdx];
|
|
816
831
|
let node;
|
|
832
|
+
let elmToMove;
|
|
817
833
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
818
834
|
if (oldStartVnode == null) {
|
|
819
835
|
// VNode might have been moved left
|
|
@@ -915,7 +931,41 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
915
931
|
newStartVnode = newCh[++newStartIdx];
|
|
916
932
|
}
|
|
917
933
|
else {
|
|
934
|
+
// Here we do some checks to match up old and new nodes based on the
|
|
935
|
+
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
936
|
+
// in the JSX for a DOM element in the implementation of a Stencil
|
|
937
|
+
// component.
|
|
938
|
+
//
|
|
939
|
+
// First we check to see if there are any nodes in the array of old
|
|
940
|
+
// children which have the same key as the first node in the new
|
|
941
|
+
// children.
|
|
942
|
+
idxInOld = -1;
|
|
918
943
|
{
|
|
944
|
+
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
945
|
+
if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
|
|
946
|
+
idxInOld = i;
|
|
947
|
+
break;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
if (idxInOld >= 0) {
|
|
952
|
+
// We found a node in the old children which matches up with the first
|
|
953
|
+
// node in the new children! So let's deal with that
|
|
954
|
+
elmToMove = oldCh[idxInOld];
|
|
955
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
956
|
+
// the tag doesn't match so we'll need a new DOM element
|
|
957
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
958
|
+
}
|
|
959
|
+
else {
|
|
960
|
+
patch(elmToMove, newStartVnode);
|
|
961
|
+
// invalidate the matching old node so that we won't try to update it
|
|
962
|
+
// again later on
|
|
963
|
+
oldCh[idxInOld] = undefined;
|
|
964
|
+
node = elmToMove.$elm$;
|
|
965
|
+
}
|
|
966
|
+
newStartVnode = newCh[++newStartIdx];
|
|
967
|
+
}
|
|
968
|
+
else {
|
|
919
969
|
// We either didn't find an element in the old children that matches
|
|
920
970
|
// the key of the first new child OR the build is not using `key`
|
|
921
971
|
// attributes at all. In either case we need to create a new element
|
|
@@ -967,7 +1017,10 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
967
1017
|
if (leftVNode.$tag$ === 'slot') {
|
|
968
1018
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
969
1019
|
}
|
|
970
|
-
|
|
1020
|
+
// this will be set if components in the build have `key` attrs set on them
|
|
1021
|
+
{
|
|
1022
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
1023
|
+
}
|
|
971
1024
|
}
|
|
972
1025
|
return false;
|
|
973
1026
|
};
|
|
@@ -2046,4 +2099,4 @@ exports.promiseResolve = promiseResolve;
|
|
|
2046
2099
|
exports.registerInstance = registerInstance;
|
|
2047
2100
|
exports.setNonce = setNonce;
|
|
2048
2101
|
|
|
2049
|
-
//# sourceMappingURL=index-
|
|
2102
|
+
//# sourceMappingURL=index-43af753b.js.map
|