smoothly 0.1.89 → 0.1.93
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/GoogleFont-6c4f0da1.js +21 -0
- package/dist/cjs/{index-de5d1ee1.js → index-40d009d5.js} +2 -0
- package/dist/cjs/{index-bc3845e8.js → index-d66869d7.js} +7 -5
- package/dist/cjs/index.cjs.js +8 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_47.cjs.entry.js +31 -6
- package/dist/cjs/smoothly-dialog.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-display-demo.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-display.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-frame.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-google-font.cjs.entry.js +17 -0
- package/dist/cjs/smoothly-input.cjs.entry.js +24 -2
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -1
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/google-font/index.js +33 -0
- package/dist/collection/components/input/index.js +44 -0
- package/dist/collection/components/input/style.css +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/model/GoogleFont.js +19 -0
- package/dist/collection/model/index.js +1 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +63 -7
- package/dist/esm/GoogleFont-8474516b.js +21 -0
- package/dist/esm/{index-37a67c97.js → index-401c6ce3.js} +7 -5
- package/dist/{smoothly/index-68492ed9.js → esm/index-c8b5d468.js} +2 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_47.entry.js +31 -6
- package/dist/esm/smoothly-dialog.entry.js +2 -1
- package/dist/esm/smoothly-display-demo.entry.js +2 -1
- package/dist/esm/smoothly-display.entry.js +1 -1
- package/dist/esm/smoothly-frame.entry.js +2 -1
- package/dist/esm/smoothly-google-font.entry.js +13 -0
- package/dist/esm/smoothly-input.entry.js +24 -2
- package/dist/esm/smoothly-trigger-sink.entry.js +2 -1
- package/dist/esm/smoothly-trigger-source.entry.js +2 -1
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/GoogleFont-8474516b.js +21 -0
- package/dist/smoothly/{index-37a67c97.js → index-401c6ce3.js} +7 -5
- package/dist/{esm/index-68492ed9.js → smoothly/index-c8b5d468.js} +2 -0
- package/dist/smoothly/index.esm.js +2 -1
- package/dist/smoothly/p-14232157.entry.js +1 -0
- package/dist/smoothly/p-22d4d5a7.entry.js +1 -0
- package/dist/smoothly/p-39db800c.entry.js +1 -0
- package/dist/smoothly/p-b8a3e273.entry.js +1 -0
- package/dist/smoothly/p-bd478a53.js +1 -0
- package/dist/smoothly/smoothly-dialog.entry.js +2 -1
- package/dist/smoothly/smoothly-display-demo.entry.js +2 -1
- package/dist/smoothly/smoothly-display.entry.js +1 -1
- package/dist/smoothly/smoothly-frame.entry.js +2 -1
- package/dist/smoothly/smoothly-google-font.entry.js +13 -0
- package/dist/smoothly/smoothly-input.entry.js +24 -2
- package/dist/smoothly/smoothly-trigger-sink.entry.js +2 -1
- package/dist/smoothly/smoothly-trigger-source.entry.js +2 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/google-font/index.d.ts +5 -0
- package/dist/types/components/input/index.d.ts +5 -0
- package/dist/types/components.d.ts +17 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model/GoogleFont.d.ts +6 -0
- package/dist/types/model/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/smoothly/p-09d633f8.entry.js +0 -1
- package/dist/smoothly/p-1a81597b.entry.js +0 -1
- package/dist/smoothly/p-8a51635f.entry.js +0 -1
|
@@ -210,6 +210,8 @@ var Action;
|
|
|
210
210
|
function apply(formatter, state, action) {
|
|
211
211
|
var _a, _b;
|
|
212
212
|
let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
|
|
213
|
+
if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
|
|
214
|
+
(action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
|
|
213
215
|
if (action) {
|
|
214
216
|
if (action.ctrlKey || action.metaKey) {
|
|
215
217
|
if (action.key == "a")
|
|
@@ -341,7 +343,7 @@ class Handler {
|
|
|
341
343
|
return typeof value == "string" ? value : undefined;
|
|
342
344
|
}
|
|
343
345
|
format(unformated) {
|
|
344
|
-
return Object.assign(Object.assign({}, unformated), { type: "
|
|
346
|
+
return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
|
|
345
347
|
}
|
|
346
348
|
unformat(formated) {
|
|
347
349
|
return formated;
|
|
@@ -377,7 +379,7 @@ class Handler {
|
|
|
377
379
|
result = result.prepend("0");
|
|
378
380
|
if (result.value.length > 1)
|
|
379
381
|
result = result.insert(2, " / ");
|
|
380
|
-
return Object.assign(Object.assign({}, result), { type: "
|
|
382
|
+
return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
|
|
381
383
|
}
|
|
382
384
|
unformat(formated) {
|
|
383
385
|
return formated.delete(" / ");
|
|
@@ -405,8 +407,8 @@ class Handler {
|
|
|
405
407
|
}
|
|
406
408
|
format(unformated) {
|
|
407
409
|
const issuer = getIssuer(unformated.value);
|
|
408
|
-
const result = unformated.map((symbol, index) =>
|
|
409
|
-
return Object.assign(Object.assign({}, result), { type: "
|
|
410
|
+
const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
|
|
411
|
+
return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
|
|
410
412
|
}
|
|
411
413
|
unformat(formated) {
|
|
412
414
|
return formated.delete(" ");
|
|
@@ -1535,7 +1537,7 @@ class Handler {
|
|
|
1535
1537
|
}
|
|
1536
1538
|
fromString(value) {
|
|
1537
1539
|
const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
|
|
1538
|
-
return result && !isNaN(result) ? result : undefined;
|
|
1540
|
+
return result != undefined && !isNaN(result) ? result : undefined;
|
|
1539
1541
|
}
|
|
1540
1542
|
format(unformated) {
|
|
1541
1543
|
var _a;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { A as App } from './App-c5f6000f.js';
|
|
2
|
-
export { C as ClientIdentifier, M as Message, N as Notice, T as Trigger } from './index-
|
|
2
|
+
export { C as ClientIdentifier, M as Message, N as Notice, T as Trigger } from './index-c8b5d468.js';
|
|
3
|
+
export { G as GoogleFont } from './GoogleFont-8474516b.js';
|
|
3
4
|
import './index-02a70ac1.js';
|
|
4
5
|
|
|
5
6
|
var Hex;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as o,a as r}from"./p-074a0448.js";import{M as e,T as i}from"./p-2cda1784.js";import"./p-bd478a53.js";let a=class{constructor(o){s(this,o),this.trigger=t(this,"trigger",7),this.message=t(this,"message",7)}componentDidLoad(){e.listen(this.listen,((s,t)=>{i.is(t)?this.trigger.emit(t):this.message.emit({destination:s,content:t})}),window)}render(){return o("slot",null)}get element(){return r(this)}};a.style=".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";export{a as smoothly_trigger_source}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as t}from"./p-074a0448.js";import{T as i,M as r}from"./p-2cda1784.js";import"./p-bd478a53.js";let o=class{constructor(t){s(this,t)}get filters(){return this.filtersValue||(this.filtersValue=this.filter?this.filter.split(" "):[]),this.filtersValue}TriggerListener(s){i.is(s.detail)&&this.filters.some((t=>t==s.detail.name))&&(r.send(this.destination,s.detail,this.context||window),s.preventDefault(),s.stopPropagation())}render(){return t("slot",null)}};o.style=".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";export{o as smoothly_trigger_sink}
|